The Ultimate Video Player For WordPress – by Presto Player - Version 1.8.6

Version Description

  • February 07, 2022 =
  • Fix: Quality switcher missing on iOS device for HLS videos.
  • Fix: Incorrect video links on RSS feed.
Download this release

Release Info

Developer 2winfactor
Plugin Icon 128x128 The Ultimate Video Player For WordPress – by Presto Player
Version 1.8.6
Comparing to
See all releases

Code changes from version 1.8.5 to 1.8.6

dist/components/cjs/{hls-4a58b3d2.js → hls-9d3ab8ac.js} RENAMED
@@ -1,7 +1,7 @@
1
  'use strict';
2
 
3
  const index = require('./index-5011582e.js');
4
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-91209ca1.js');
5
 
6
  var loadHLS = function loadHLS(_ref) {
7
  var config = _ref.config,
@@ -37,7 +37,7 @@ var loadHLS = function loadHLS(_ref) {
37
  break;
38
 
39
  case 6:
40
- if (!window.Hls.isSupported()) {
41
  _context.next = 14;
42
  break;
43
  }
1
  'use strict';
2
 
3
  const index = require('./index-5011582e.js');
4
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-59fb9967.js');
5
 
6
  var loadHLS = function loadHLS(_ref) {
7
  var config = _ref.config,
37
  break;
38
 
39
  case 6:
40
+ if (!(window.Hls.isSupported() || selector.canPlayType('application/vnd.apple.mpegurl'))) {
41
  _context.next = 14;
42
  break;
43
  }
dist/components/cjs/{learndash-9175adea.js → learndash-ee6472e7.js} RENAMED
@@ -1,6 +1,6 @@
1
  'use strict';
2
 
3
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-91209ca1.js');
4
  require('./index-5011582e.js');
5
 
6
  const learndash = (function (player) {
1
  'use strict';
2
 
3
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-59fb9967.js');
4
  require('./index-5011582e.js');
5
 
6
  const learndash = (function (player) {
dist/components/cjs/presto-action-bar_22.cjs.entry.js CHANGED
@@ -2,7 +2,7 @@
2
 
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
 
5
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-91209ca1.js');
6
  require('./index-5011582e.js');
7
 
8
 
2
 
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
 
5
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-59fb9967.js');
6
  require('./index-5011582e.js');
7
 
8
 
dist/components/collection/components/core/player/functions/hls.js CHANGED
@@ -6,7 +6,7 @@ const loadHLS = ({ config, selector, src, preload }) => {
6
  while (!window.hasOwnProperty('Hls')) await new Promise(resolve => setTimeout(resolve, 50));
7
  }
8
 
9
- if (window.Hls.isSupported()) {
10
  // should we autoload start
11
  let autoStartLoad = !['metadata', 'none'].includes(preload);
12
 
6
  while (!window.hasOwnProperty('Hls')) await new Promise(resolve => setTimeout(resolve, 50));
7
  }
8
 
9
+ if (window.Hls.isSupported() || selector.canPlayType('application/vnd.apple.mpegurl')) {
10
  // should we autoload start
11
  let autoStartLoad = !['metadata', 'none'].includes(preload);
12
 
dist/components/esm/{hls-8d165879.js → hls-5fe0a521.js} RENAMED
@@ -1,5 +1,5 @@
1
  import { m as _asyncToGenerator, a as _objectSpread2 } from './index-7a7ef49c.js';
2
- import { P as PrestoPlayer } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-8c8b42ea.js';
3
 
4
  var loadHLS = function loadHLS(_ref) {
5
  var config = _ref.config,
@@ -35,7 +35,7 @@ var loadHLS = function loadHLS(_ref) {
35
  break;
36
 
37
  case 6:
38
- if (!window.Hls.isSupported()) {
39
  _context.next = 14;
40
  break;
41
  }
1
  import { m as _asyncToGenerator, a as _objectSpread2 } from './index-7a7ef49c.js';
2
+ import { P as PrestoPlayer } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-b238f941.js';
3
 
4
  var loadHLS = function loadHLS(_ref) {
5
  var config = _ref.config,
35
  break;
36
 
37
  case 6:
38
+ if (!(window.Hls.isSupported() || selector.canPlayType('application/vnd.apple.mpegurl'))) {
39
  _context.next = 14;
40
  break;
41
  }
dist/components/esm/{learndash-4b7f896a.js → learndash-9382bcc5.js} RENAMED
@@ -1,4 +1,4 @@
1
- import { r as resumeProgress } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-8c8b42ea.js';
2
  import './index-7a7ef49c.js';
3
 
4
  const learndash = (function (player) {
1
+ import { r as resumeProgress } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-b238f941.js';
2
  import './index-7a7ef49c.js';
3
 
4
  const learndash = (function (player) {
dist/components/esm/presto-action-bar_22.entry.js CHANGED
@@ -1,2 +1,2 @@
1
- export { a as presto_action_bar, b as presto_action_bar_controller, c as presto_action_bar_ui, d as presto_audio, e as presto_bunny, f as presto_cta_overlay, g as presto_cta_overlay_controller, C as presto_cta_overlay_ui, h as presto_dynamic_overlay_ui, i as presto_dynamic_overlays, j as presto_email_overlay, k as presto_email_overlay_controller, E as presto_email_overlay_ui, l as presto_muted_overlay, m as presto_player, n as presto_player_button, o as presto_player_spinner, p as presto_timestamp, q as presto_video, s as presto_vimeo, t as presto_youtube, u as presto_youtube_subscribe_button } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-8c8b42ea.js';
2
  import './index-7a7ef49c.js';
1
+ export { a as presto_action_bar, b as presto_action_bar_controller, c as presto_action_bar_ui, d as presto_audio, e as presto_bunny, f as presto_cta_overlay, g as presto_cta_overlay_controller, C as presto_cta_overlay_ui, h as presto_dynamic_overlay_ui, i as presto_dynamic_overlays, j as presto_email_overlay, k as presto_email_overlay_controller, E as presto_email_overlay_ui, l as presto_muted_overlay, m as presto_player, n as presto_player_button, o as presto_player_spinner, p as presto_timestamp, q as presto_video, s as presto_vimeo, t as presto_youtube, u as presto_youtube_subscribe_button } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-b238f941.js';
2
  import './index-7a7ef49c.js';
dist/components/web-components/p-17b8399c.js DELETED
@@ -1 +0,0 @@
1
- import{m as n,a as r}from"./p-fd4ad57a.js";import{P as e}from"./p-83f26425.js";export default function(t){var o=t.config,a=t.selector,i=t.src,u=t.preload;return new Promise(function(){var t=n(regeneratorRuntime.mark((function n(t){var c,s,f;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(window.Hls){n.next=6;break}case 1:if(window.hasOwnProperty("Hls")){n.next=6;break}return n.next=4,new Promise((function(n){return setTimeout(n,50)}));case 4:n.next=1;break;case 6:if(!window.Hls.isSupported()){n.next=14;break}return s=!["metadata","none"].includes(u),null!==(c=wp)&&void 0!==c&&c.blocks&&(s=!0),(f=new window.Hls({autoStartLoad:s})).loadSource(i),f.on(window.Hls.Events.LEVEL_SWITCHED,(function(n,r){a.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span").innerHTML=f.autoLevelEnabled?"AUTO (".concat(f.levels[r.level].height,"p)"):"AUTO"})),f.on(window.Hls.Events.MANIFEST_PARSED,(function(){var n=f.levels.map((function(n){return n.height}));n.unshift(0);var i=n.findIndex((function(n){var r;return n===parseInt(null===(r=prestoPlayer)||void 0===r?void 0:r.hls_start_level)}));f.startLevel=i?i-1:2,o.quality={default:0,options:n,forced:!0,onChange:function(n){0===n?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach((function(r,e){r.height===n&&(console.log("Found quality match with "+n),prestoHLS.currentLevel=e)}))}},f.attachMedia(a),window.prestoHLS=f;var u=new e(a,r({},o));return u.hls=f,u.on("waiting",(function n(){f.startLoad(-1),u.off("waiting",n)})),u.on("languagechange",(function(){setTimeout((function(){return f.subtitleTrack=u.currentTrack}),50)})),t(u)})),n.abrupt("return");case 14:return n.abrupt("return",t(new e(a,r({},o))));case 15:case"end":return n.stop()}}),n)})));return function(n,r){return t.apply(this,arguments)}}())}
 
dist/components/web-components/{p-c98de32f.js → p-2cf645b3.js} RENAMED
@@ -1 +1 @@
1
- import{r as e}from"./p-83f26425.js";import"./p-fd4ad57a.js";export default function(a){var d,o,s,i,r,_,l,t,n,p,v;if("undefined"!=typeof learndash_video_data&&"presto"===(null===(d=learndash_video_data)||void 0===d?void 0:d.videos_found_provider)){if(e(a),window.learndash_video_data.videos_auto_complete="on"===(null===(o=prestoPlayer)||void 0===o||null===(s=o.learndash)||void 0===s?void 0:s.lesson_video_auto_complete),window.learndash_video_data.videos_hide_complete_button="AFTER"===(null===(i=learndash_video_data)||void 0===i?void 0:i.videos_shown)&&"on"===(null===(r=prestoPlayer)||void 0===r||null===(_=r.learndash)||void 0===_?void 0:_.lesson_video_hide_complete_button),window.learndash_video_data.videos_auto_complete_delay=null===(l=prestoPlayer)||void 0===l||null===(t=l.learndash)||void 0===t?void 0:t.lesson_video_auto_complete_delay,window.learndash_video_data.videos_auto_complete_delay_message=null===(n=prestoPlayer)||void 0===n||null===(p=n.learndash)||void 0===p?void 0:p.videos_auto_complete_delay_message,window.learndash_video_data.video_track_path="/","BEFORE"===(null===(v=learndash_video_data)||void 0===v?void 0:v.videos_shown))return learndash_video_data.videos_auto_complete=!1,jQuery(document).trigger("learndash_video_disable_assets",[!0]),void jQuery((function(){"1"===learndash_video_data.video_debug&&console.log("PRESTO: init"),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').length&&("1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(true)"),LearnDash_disable_assets(!0),LearnDash_watchPlayers(),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').forEach((function(e,a){var d="presto-player__wrapper-player-"+a,o=e.getAttribute("id");void 0!==o&&""!=o||e.setAttribute("id",o=d),ld_video_players[d]={},ld_video_players[d].player_key=d,ld_video_players[d].player_type=learndash_video_data.videos_found_provider,ld_video_players[d].player_id=o,ld_video_players[d].player_wrapper=e.closest("presto-player"),void 0!==ld_video_players[d].player_wrapper?ld_video_players[d].player_cookie_key=ld_video_players[d].player_wrapper.getAttribute("data-video-cookie-key"):ld_video_players[d].player_cookie_key="",ld_video_players[d].player_cookie_values=LearnDash_Video_Progress_initSettings(ld_video_players[d]),"complete"===LearnDash_Video_Progress_getSetting(ld_video_players[d],"video_state")?(LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()):(wp.hooks.addAction("presto.playerTimeUpdate","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),e.duration&&e.duration===e.currentTime&&(LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd())})),wp.hooks.addAction("presto.playerPlaying","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","play")})),wp.hooks.addAction("presto.playerPause","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is paused"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),console.log(e.duration),console.log(e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","pause")})),wp.hooks.addAction("presto.playerEnded","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: video ended"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: setting 'video_state' to 'complete'"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()})))})))}));window.LearnDash_disable_assets(!0),wp.hooks.addAction("presto.playerEnded","presto-player",(function(){window.LearnDash_disable_assets(!1)}))}}
1
+ import{r as e}from"./p-eda63047.js";import"./p-fd4ad57a.js";export default function(a){var d,o,s,i,r,_,l,t,n,p,v;if("undefined"!=typeof learndash_video_data&&"presto"===(null===(d=learndash_video_data)||void 0===d?void 0:d.videos_found_provider)){if(e(a),window.learndash_video_data.videos_auto_complete="on"===(null===(o=prestoPlayer)||void 0===o||null===(s=o.learndash)||void 0===s?void 0:s.lesson_video_auto_complete),window.learndash_video_data.videos_hide_complete_button="AFTER"===(null===(i=learndash_video_data)||void 0===i?void 0:i.videos_shown)&&"on"===(null===(r=prestoPlayer)||void 0===r||null===(_=r.learndash)||void 0===_?void 0:_.lesson_video_hide_complete_button),window.learndash_video_data.videos_auto_complete_delay=null===(l=prestoPlayer)||void 0===l||null===(t=l.learndash)||void 0===t?void 0:t.lesson_video_auto_complete_delay,window.learndash_video_data.videos_auto_complete_delay_message=null===(n=prestoPlayer)||void 0===n||null===(p=n.learndash)||void 0===p?void 0:p.videos_auto_complete_delay_message,window.learndash_video_data.video_track_path="/","BEFORE"===(null===(v=learndash_video_data)||void 0===v?void 0:v.videos_shown))return learndash_video_data.videos_auto_complete=!1,jQuery(document).trigger("learndash_video_disable_assets",[!0]),void jQuery((function(){"1"===learndash_video_data.video_debug&&console.log("PRESTO: init"),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').length&&("1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(true)"),LearnDash_disable_assets(!0),LearnDash_watchPlayers(),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').forEach((function(e,a){var d="presto-player__wrapper-player-"+a,o=e.getAttribute("id");void 0!==o&&""!=o||e.setAttribute("id",o=d),ld_video_players[d]={},ld_video_players[d].player_key=d,ld_video_players[d].player_type=learndash_video_data.videos_found_provider,ld_video_players[d].player_id=o,ld_video_players[d].player_wrapper=e.closest("presto-player"),void 0!==ld_video_players[d].player_wrapper?ld_video_players[d].player_cookie_key=ld_video_players[d].player_wrapper.getAttribute("data-video-cookie-key"):ld_video_players[d].player_cookie_key="",ld_video_players[d].player_cookie_values=LearnDash_Video_Progress_initSettings(ld_video_players[d]),"complete"===LearnDash_Video_Progress_getSetting(ld_video_players[d],"video_state")?(LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()):(wp.hooks.addAction("presto.playerTimeUpdate","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),e.duration&&e.duration===e.currentTime&&(LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd())})),wp.hooks.addAction("presto.playerPlaying","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","play")})),wp.hooks.addAction("presto.playerPause","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is paused"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),console.log(e.duration),console.log(e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","pause")})),wp.hooks.addAction("presto.playerEnded","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: video ended"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: setting 'video_state' to 'complete'"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()})))})))}));window.LearnDash_disable_assets(!0),wp.hooks.addAction("presto.playerEnded","presto-player",(function(){window.LearnDash_disable_assets(!1)}))}}
dist/components/web-components/p-83f26425.js DELETED
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as e,c as r,_ as o,a as n,d as a,e as s,f as l,i as p,j as u,k as d,l as c,m as h,n as v,H as y}from"./p-fd4ad57a.js";let f=class{constructor(i){t(this,i)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var i,e;this.currentTime=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return i("presto-action-bar-controller",{ended:this.ended,config:this.config,currentTime:this.currentTime,duration:this.duration,direction:this.direction,youtube:this.youtube})}get el(){return e(this)}};function g({current:t,duration:i,showAfter:e=null}){if(0===e)return!0;if(null===e||!i)return!1;if(t===e)return!0;let r=t/i*100;return 99.9<r&&(r=100),r>=e}function b(t){if(!t)return;let i,e,r,o;if(t.match(/^rgb/)){const o=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);i=o[1],e=o[2],r=o[3]}else{const o=+("0x"+t.slice(1).replace(t.length<5&&/./g,"$&$&"));i=o>>16,e=o>>8&255,r=255&o}return o=Math.sqrt(i*i*.299+e*e*.587+r*r*.114),o>127.5?"light":"dark"}function m(t){let i,e=t.split(":");return e.length>1&&(i=60*parseInt(e[0])),parseInt(e[1])+parseInt(i)}function _(){var t=navigator.userAgent||navigator.vendor;return/windows phone/i.test(t)?"Windows Phone":/android/i.test(t)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}f.style=":host{display:block}";let w=class{constructor(i){t(this,i),this.actionBarStateChange=r(this,"actionBarStateChange",7),this.show=!1,this.youtubeRenderKey=1,this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleDuration(){this.handleTime()}handleEnded(t){var i;if(t){if(100!==(null===(i=null==this?void 0:this.config)||void 0===i?void 0:i.percentage_start))return;this.show=!0}}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleTime(){this.checkTime()}checkTime(){var t,i;this.show=!!(null===(t=null===window||void 0===window?void 0:window.wp)||void 0===t?void 0:t.blocks)||g({current:this.currentTime,duration:this.duration,showAfter:null===(i=this.config)||void 0===i?void 0:i.percentage_start})}handleButtonCountChange(t,i){(null==t?void 0:t.button_count)!==(null==i?void 0:i.button_count)&&this.youtubeRenderKey++,(null==t?void 0:t.enabled)&&this.handleDuration()}youtubeButton(){var t,e,r,o;if("youtube"===(null===(t=this.config)||void 0===t?void 0:t.button_type)&&(null===(e=this.youtube)||void 0===e?void 0:e.channelId))return i("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(r=this.youtube)||void 0===r?void 0:r.channelId,showCount:null===(o=this.config)||void 0===o?void 0:o.button_count})}customButton(){var t,e,r,o,n,a,s,l,p,u,d;if("custom"===(null===(t=this.config)||void 0===t?void 0:t.button_type))return i("presto-player-button",{type:"primary",size:"small",href:null===(r=null===(e=this.config)||void 0===e?void 0:e.button_link)||void 0===r?void 0:r.url,target:(null===(n=null===(o=this.config)||void 0===o?void 0:o.button_link)||void 0===n?void 0:n.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(a=this.config)||void 0===a?void 0:a.button_radius}px`},(null===(s=this.config)||void 0===s?void 0:s.button_color)?{"--presto-player-button-color":`${null===(l=this.config)||void 0===l?void 0:l.button_color}`}:{}),(null===(p=this.config)||void 0===p?void 0:p.button_text_color)?{"--presto-player-button-text":`${null===(u=this.config)||void 0===u?void 0:u.button_text_color}`}:{})},null===(d=this.config)||void 0===d?void 0:d.button_text)}handleCtaStateChange(t){this.actionBarStateChange.emit(t)}render(){var t,e;return i("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(t=this.config)||void 0===t?void 0:t.background_color)||"#1d1d1d"}},null===(e=this.config)||void 0===e?void 0:e.text,i("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return e(this)}static get watchers(){return{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"],show:["handleCtaStateChange"]}}};w.style=":host{display:block}";let k=class{constructor(i){t(this,i)}render(){return i("div",{class:{bar:!0,"bar--open":this.open}},i("span",{part:"content",class:"bar__content"},i("slot",null)),i("span",{part:"button",class:"bar__button"},i("slot",{name:"button"})))}};k.style=":host{display:block;overflow:hidden}.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;background:var(--presto-action-bar-background, #1d1d1d);color:#fff;padding:0 var(--presto-action-bar-padding, 6px);line-height:1em;font-size:16px;margin-top:-100%;transition:margin var(--presto-action-bar-animation-speed, 0.5s) ease-in-out;transform:translate3d(0);border-radius:0px 0px var(--presto-player-border-radius) var(--presto-player-border-radius)}.bar.bar--open{margin-top:0}.bar__button{margin:var(--presto-action-bar-padding, 6px);display:flex;align-items:center}.bar__content{margin:var(--presto-action-bar-padding, 6px);width:100%;text-align:center}@media screen and (min-width: 480px){.bar__content{width:auto}}";let x=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7)}renderPosterImage(){if(this.poster)return i("div",{class:"presto-audio__poster"},i("img",{src:this.poster}))}hasPosterArea(){var t;return!!this.poster||!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])}renderMobilePoster(){var t;return i("div",{class:"presto-audio__poster-wrapper-mobile"},!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&this.renderLargePlay("presto-audio__large-play-button is-relative"),i("div",{class:"presto-audio__mobile-title"},this.mediaTitle))}renderLargePlay(t="presto-audio__large-play-button"){return i("div",{class:t,onClick:()=>{this.player.playing?this.pauseVideo.emit():this.playVideo.emit()}},i("svg",{class:"presto-audio__icon-play",width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M15.5588 9.00005L0.117662 17.915L0.117662 0.0850823L15.5588 9.00005Z"})),i("svg",{class:"presto-audio__icon-pause",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("rect",{width:"5",height:"17"}),i("rect",{x:"12",width:"5",height:"17"})))}componentDidLoad(){"ResizeObserver"in window&&new ResizeObserver((t=>{t.forEach((t=>this.width=t.contentRect.width))})).observe(this.el)}render(){var t,e,r,o,n;return i("div",{ref:t=>this.el=t,class:{"presto-audio__wrapper":!0,"has-poster":!!this.poster,"has-play-large":!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"]),"is-playing":null===(e=this.player)||void 0===e?void 0:e.playing,"has-light-background":"light"===b(null===(r=this.preset)||void 0===r?void 0:r.background_color),"has-dark-background":"dark"===b(null===(o=this.preset)||void 0===o?void 0:o.background_color),"breakpoint-small":this.width<520,"skin-stacked":this.width<520,"breakpoint-large":this.width>=520}},this.hasPosterArea()&&i("div",{class:"presto-audio__poster-wrapper"},!!(null===(n=this.preset)||void 0===n?void 0:n["play-large"])&&i("div",{class:"presto-audio__large-play-wrapper"},this.renderLargePlay()),this.renderPosterImage()),this.hasPosterArea()&&this.renderMobilePoster(),i("div",{class:"presto-audio__controls-wrapper"},i("div",{class:"presto-audio__title"},this.mediaTitle),i("audio",{part:"audio-player",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster},i("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>i("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))))}};x.style=":host{display:block}.presto-audio__wrapper{border-radius:var(--presto-player-border-radius, 0px)}.presto-audio__wrapper .plyr--audio .plyr__controls{padding:0}.presto-audio__wrapper .plyr--audio .plyr__control.plyr__tab-focus,.presto-audio__wrapper .plyr--audio .plyr__control:hover,.presto-audio__wrapper .plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.presto-audio__wrapper{display:flex;background:var(--plyr-audio-controls-background, #fff)}.presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2);flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0}.has-poster .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 3)}.has-play-large:not(.has-poster) .presto-audio__controls-wrapper{padding-left:0}.presto-audio__title,.presto-audio__mobile-title{font-size:18px;font-weight:500;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--plyr-audio-control-color)}.presto-audio__title{margin:calc(var(--plyr-control-spacing, 10px) / 2);margin-top:0}.presto-audio__poster-wrapper{position:relative;width:100px;min-height:100px;flex:0 0 100px}.presto-audio__poster-wrapper img{border-radius:var(--presto-player-border-radius, 0px) 0 0 var(--presto-player-border-radius, 0px);width:100%;height:100%;object-fit:cover;aspect-ratio:1;display:block}.has-poster .presto-audio__poster-wrapper{width:140px;height:140px;flex:0 0 140px}.presto-audio__poster{width:100%;height:100%}.presto-audio__large-play-button{user-select:none;cursor:pointer;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%, -50%);width:50px;height:50px;color:white;border-radius:100%;background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__large-play-button.is-relative{position:relative;top:auto;left:auto;transform:none}.has-light-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.has-dark-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__icon-play,.presto-audio__icon-pause{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);fill:currentColor;display:block;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;margin:0 auto;text-align:center}.presto-audio__icon-pause{opacity:0;visibility:hidden}.presto-audio__wrapper.is-playing .presto-audio__icon-pause{opacity:1;visibility:visible}.presto-audio__icon-play{margin-left:2px;opacity:1;visibility:visible}.presto-audio__wrapper.is-playing .presto-audio__icon-play{opacity:0;visibility:hidden}.presto-audio__poster-wrapper-mobile{display:none;min-width:0}.presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 50px}.presto-audio__wrapper.breakpoint-small{flex-direction:column}.presto-audio__wrapper.breakpoint-small .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__title{text-align:center;margin:calc(var(--plyr-control-spacing, 10px) * 1.5)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__poster-wrapper{margin:30px auto auto auto;overflow:hidden;border-radius:var(--presto-player-border-radius, 0px);width:225px;height:225px;flex:0 0 225px}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper,.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__title{display:none}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.skin-stacked.presto-sticky-audio .presto-audio__wrapper{height:115px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:115px;height:115px;flex:0 0 115px}.presto-sticky-audio .presto-audio__wrapper{height:100px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:100px;height:100px;flex:0 0 100px}.action-bar-active .presto-audio__wrapper{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}@media screen and (max-width: 520px){.presto-sticky-audio .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.presto-sticky-audio .presto-audio__poster-wrapper,.presto-sticky-audio .presto-audio__title{display:none}.presto-sticky-audio .presto-audio__wrapper{height:140px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:0px}.presto-sticky-audio .presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 40px;height:40px}}";let z=class{constructor(i){t(this,i)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return i("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}},j=class{constructor(i){t(this,i)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var i,e;this.currentTime=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t;return i("presto-cta-overlay-controller",{ended:this.ended,currentTime:this.currentTime,duration:this.duration,direction:this.direction,cta:null===(t=this.preset)||void 0===t?void 0:t.cta,i18n:this.i18n,provider:this.provider})}};j.style=":host{display:block}";let T=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",7),this.ctaStateChange=r(this,"ctaStateChange",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleEnded(t){var i;if(t){if(100!==(null===(i=null==this?void 0:this.cta)||void 0===i?void 0:i.percentage))return;this.show=!0}}handleDuration(){var t;this.enabled=!this.skipped&&(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.enabled),this.handleTime()}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleEnabled(){this.show&&(this.skipped||this.pauseVideo.emit(!0))}handleTime(){var t;this.enabled&&(this.skipped||100!==(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}checkTime(){var t;this.show=g({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)||0})}skip(){this.skipped=!0,this.show=!1,this.playVideo.emit()}rewatch(){this.ended=!1,this.show=!1,this.restartVideo.emit()}handleCtaStateChange(t){this.ctaStateChange.emit(t)}render(){var t,e,r,o,n,a,s,l,p,u,d,c,h,v;if(this.show)return i("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.button_radius}px`},(null===(e=null==this?void 0:this.cta)||void 0===e?void 0:e.background_opacity)?{"--presto-player-cta-background-opacity":""+(null===(r=null==this?void 0:this.cta)||void 0===r?void 0:r.background_opacity)/100}:{}),(null===(o=null==this?void 0:this.cta)||void 0===o?void 0:o.button_color)?{"--presto-player-button-color":`${null===(n=null==this?void 0:this.cta)||void 0===n?void 0:n.button_color}`}:{}),(null===(a=null==this?void 0:this.cta)||void 0===a?void 0:a.button_text_color)?{"--presto-player-button-text":`${null===(s=null==this?void 0:this.cta)||void 0===s?void 0:s.button_text_color}`}:{}),direction:this.direction,class:"cta-overlay",i18n:this.i18n,headline:null===(l=null==this?void 0:this.cta)||void 0===l?void 0:l.headline,"bottom-text":null===(p=null==this?void 0:this.cta)||void 0===p?void 0:p.bottom_text,"show-button":null===(u=null==this?void 0:this.cta)||void 0===u?void 0:u.show_button,buttonLink:null===(d=null==this?void 0:this.cta)||void 0===d?void 0:d.button_link,allowSkip:!this.ended&&(null===(c=null==this?void 0:this.cta)||void 0===c?void 0:c.show_skip),allowRewatch:this.ended&&(null===(h=null==this?void 0:this.cta)||void 0===h?void 0:h.show_rewatch),"button-text":null===(v=null==this?void 0:this.cta)||void 0===v?void 0:v.button_text,onSkip:()=>this.skip(),onRewatch:()=>this.rewatch(),provider:this.provider})}static get watchers(){return{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"],show:["handleCtaStateChange"]}}};T.style=":host{display:block}";const S=function(t,i,e){var r=function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}({minFontSize:-1/0,maxFontSize:1/0,container:t},e),o=function(t){var e=i||1,o=function(){var i;t.style.fontSize=Math.max(Math.min(((null==r||null===(i=r.container)||void 0===i?void 0:i.clientWidth)||0)/(10*e),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize))+"px"};if(o(),"ResizeObserver"in window==0)var n=import("./p-58f5339e.js").then((function(){window.ResizeObserver=n.ResizeObserver,new ResizeObserver(o).observe(r.container)}));else new ResizeObserver(o).observe(r.container)};if(t.length)for(var n=0;n<t.length;n++)o(t[n]);else o(t);return t};let C=class{constructor(i){t(this,i),this.skip=r(this,"skip",7),this.rewatch=r(this,"rewatch",7)}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),S(this.textInput,3,{maxFontSize:!0===this.isAudioProvider?15:20,minFontSize:8})}handleCTAClick(t){var i;(null===(i=this.buttonLink)||void 0===i?void 0:i.url)&&(t.preventDefault(),t.stopPropagation(),this.handleLink())}handleLink(){var t,i,e;(null===(t=this.buttonLink)||void 0===t?void 0:t.opensInNewTab)?window.open(null===(i=this.buttonLink)||void 0===i?void 0:i.url,"_blank"):window.location.href=null===(e=this.buttonLink)||void 0===e?void 0:e.url}render(){var t,e,r,o,n;return i("div",{class:"wrapper",ref:t=>this.textInput=t},i("div",{onClick:t=>this.handleCTAClick(t),class:`overlay ${"rtl"===this.direction?"rtl":""} ${(null===(t=this.buttonLink)||void 0===t?void 0:t.url)?"has-link":""}`},i("div",{class:this.isAudioProvider?"content is-centered":"content"},i("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&i("p",{class:this.isAudioProvider&&"is-small",part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&i("presto-player-button",{full:!0,onClick:t=>this.handleCTAClick(t),part:"cta-button",href:null===(e=null==this?void 0:this.buttonLink)||void 0===e?void 0:e.url,target:(null===(r=null==this?void 0:this.buttonLink)||void 0===r?void 0:r.opensInNewTab)?"_blank":"_self",class:"button",type:"primary"},this.buttonText))),!!this.allowRewatch&&i("div",{class:"rewatch",onClick:t=>{t.preventDefault(),t.stopImmediatePropagation(),this.rewatch.emit()}},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-corner-up-left"},i("polyline",{points:"9 14 4 9 9 4"}),i("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})),null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.rewatch),!!this.allowSkip&&i("div",{class:"skip",onClick:t=>{t.preventDefault(),this.skip.emit()}},null===(n=null==this?void 0:this.i18n)||void 0===n?void 0:n.skip," →"))}};C.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999;user-select:none}*{box-sizing:border-box}a{color:#fff}.wrapper{height:100%;position:relative;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif)}.overlay{position:relative;display:flex;align-items:center;justify-content:center;padding:48px;height:100%}.overlay.has-link{cursor:pointer}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-cta-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-cta-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.content{width:80%;max-width:600px}.content *~*{margin-top:22px}button{background:var(--plyr-color-main, #000);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;color:#fff;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-cta-border-radius, 0) var(--presto-player-cta-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}h1{font-size:1.5em;font-weight:500;margin:0;line-height:1.1em}.skip,.rewatch{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}.rewatch{display:inline-flex;align-items:center;right:auto;left:0}.rewatch .icon{margin-right:5px}p{font-size:0.85em;margin:0;margin-top:1.5em;line-height:1.4em;opacity:0.75}p.is-small{font-size:0.85em;margin:1.5em 0px 0px;line-height:0.1em;opacity:0.75}.is-centered{text-align:center}';let P=class{constructor(i){t(this,i),this.position="top-right"}closestElement(t,i){return i&&i!=document&&i!=window&&i.closest(t)||i&&this.closestElement(t,i.getRootNode().host)}componentDidLoad(){let t=this.closestElement("presto-player",this.el);S(this.text,3,{maxFontSize:16,minFontSize:10,container:t})}render(){return i(this.href?"a":"span",{class:{"overlay-text":!0,"overlay--top-left":"top-left"===this.position,"overlay--top-right":"top-right"===this.position},href:this.href,target:this.target,part:"overlay-text",ref:t=>this.text=t},i("slot",null))}get el(){return e(this)}};P.style=":host{display:block}.overlay-text{text-decoration:none;display:inline-block;user-select:none;line-height:1;opacity:var(--presto-dynamic-overlay-opacity, 1);font-size:var(--presto-dynamic-overlay-font-size, 18px);padding:var(--presto-dynamic-overlay-padding, 0.65em 0.85em);font-weight:var(--presto-dynamic-overlay-font-weight, 500);border-radius:var(--presto-dynamic-overlay-radius, 0.25em);background:var(--presto-dynamic-overlay-background, rgba(0, 0, 0, 0.8));color:var(--presto-dynamic-overlay-color, #fff);opacity:var(--presto-dynamic-overlay-opacity, 1);word-break:break-word}a.overlay-text{cursor:pointer}";let O=class{constructor(i){t(this,i),this.reloadComponent=r(this,"reloadComponent",7),this.watermarkRef={left:null,right:null},this.destroy=!1,this.refs={}}componentDidLoad(){this.player&&this.player.on("timeupdate",(t=>{this.currentTime=t.detail.plyr.currentTime,this.checkValidity()}))}checkValidity(){var t,i,e,r,o,n,a,s,l,p;this.player.playing&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(e=null===(i=this.preset)||void 0===i?void 0:i.watermark)||void 0===e?void 0:e.enabled))&&((null===(r=this.container)||void 0===r?void 0:r.offsetParent)&&(null===(o=this.topLeft)||void 0===o?void 0:o.offsetParent)&&(null===(n=this.topRight)||void 0===n?void 0:n.offsetParent)||this.reloadComponent.emit(),Object.keys(this.refs||{}).forEach((t=>{const{overlay:i,component:e}=this.refs[t];this.checkComponent(e,i.text,(()=>this.reloadComponent.emit()))})),this.shouldShowWatermark("top-left")&&this.watermarkRef.left&&this.checkComponent(this.watermarkRef.left,null===(s=null===(a=this.preset)||void 0===a?void 0:a.watermark)||void 0===s?void 0:s.text,(()=>this.reloadComponent.emit())),this.shouldShowWatermark("top-right")&&this.watermarkRef.right&&this.checkComponent(this.watermarkRef.right,null===(p=null===(l=this.preset)||void 0===l?void 0:l.watermark)||void 0===p?void 0:p.text,(()=>this.reloadComponent.emit())))}checkComponent(t,i,e){if(!(null==t?void 0:t.offsetParent))return e();if(!t.shadowRoot.querySelector("slot"))return e();if(this.player&&this.player.playing){const r=t.shadowRoot.querySelector("slot").assignedNodes()[0];if(r){if(r.parentElement.innerHTML!=i)return e();const t=getComputedStyle(r.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(t.fontSize,10)<10)return e();const o=function(t){var i=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return i?[i[1],i[2],i[3],"1"]:(i=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[i[1],i[2],i[3],i[4]]:void 0}(t.color);if("1"!==(null==o?void 0:o[3]))return e()}}}shouldShowOverlay(t){if(void 0!==this.currentTime)return!(this.currentTime<m(null==t?void 0:t.startTime)||this.currentTime>m(null==t?void 0:t.endTime))}renderOverlay(t){var e,r;return i("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(t)},ref:i=>this.refs[t.id]={overlay:t,component:i},key:t.id,position:t.position,href:null===(e=null==t?void 0:t.link)||void 0===e?void 0:e.url,target:(null===(r=null==t?void 0:t.link)||void 0===r?void 0:r.opensInNewTab)?"_blank":"_self",innerHTML:this.shouldShowOverlay(t)?t.text:"",style:{"--presto-dynamic-overlay-color":(null==t?void 0:t.color)||"#fff","--presto-dynamic-overlay-background":(null==t?void 0:t.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null==t?void 0:t.opacity)?(t.opacity/100).toString():"1"}})}shouldShowWatermark(t){var i,e,r;if(!(null===(e=null===(i=this.preset)||void 0===i?void 0:i.watermark)||void 0===e?void 0:e.enabled))return!1;const o=null===(r=this.preset)||void 0===r?void 0:r.watermark;return"randomize"===o.position?Math.floor((this.player.currentTime||0)/10)%2==0?"top-left"===t:"top-right"===t:o.position===t||!o.position&&"top-right"===t}render(){var t,e,r,o,n,a,s,l,p,u,d;if(this.enabled&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(r=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===r?void 0:r.enabled)))return i("div",{class:"overlays",ref:t=>this.container=t},i("div",{class:"top-left",ref:t=>this.topLeft=t},!!this.shouldShowWatermark("top-left")&&i("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.left=t,style:{"--presto-dynamic-overlay-color":(null===(o=this.preset.watermark)||void 0===o?void 0:o.color)||"#fff","--presto-dynamic-overlay-background":(null===(n=this.preset.watermark)||void 0===n?void 0:n.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(a=this.preset.watermark)||void 0===a?void 0:a.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-left",innerHTML:this.preset.watermark.text}),!!(null===(s=null==this?void 0:this.overlays)||void 0===s?void 0:s.length)&&this.overlays.map((t=>"top-left"!==t.position?"":this.renderOverlay(t)))),i("div",{class:"top-right",ref:t=>this.topRight=t},!!this.shouldShowWatermark("top-right")&&i("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.right=t,style:{"--presto-dynamic-overlay-color":(null===(l=this.preset.watermark)||void 0===l?void 0:l.color)||"#fff","--presto-dynamic-overlay-background":(null===(p=this.preset.watermark)||void 0===p?void 0:p.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(u=this.preset.watermark)||void 0===u?void 0:u.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-right",innerHTML:this.preset.watermark.text}),!!(null===(d=null==this?void 0:this.overlays)||void 0===d?void 0:d.length)&&this.overlays.map((t=>"top-right"!==t.position?"":this.renderOverlay(t)))))}get el(){return e(this)}};O.style=".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}";let I=class{constructor(i){t(this,i)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var i,e;this.currentTime=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t,e;return i("presto-email-overlay-controller",{ended:this.ended,currentTime:this.currentTime,videoId:this.videoId,duration:this.duration,direction:this.direction,presetId:null===(t=this.preset)||void 0===t?void 0:t.id,emailCollection:null===(e=this.preset)||void 0===e?void 0:e.email_collection,i18n:this.i18n,provider:this.provider})}};I.style=":host{display:block}";let A=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",7),this.emailStateChange=r(this,"emailStateChange",7),this.percentagePassed=0}setStorage(t){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify({[this.videoId]:t}))}getStorage(){return window.localStorage.getItem("presto.videos.email_collection")}componentWillLoad(){this.handleDuration()}handleDuration(){var t;this.enabled=!this.getStorage()&&(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.enabled),this.handleTimeCheck()}handleTimeCheck(){this.enabled&&(this.getStorage()||this.checkTime())}handleShowChange(){this.show&&this.pauseVideo.emit(!0)}checkTime(){var t;this.show=g({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.percentage)||0})}async getNonce(){var t;return fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`)}async submit(t){var i;this.loading=!0,this.error="";const e=await this.getNonce(),{data:r}=await e.json();try{let e=await fetch(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:r,preset_id:this.presetId,video_id:this.videoId},(null==t?void 0:t.detail)||{}))});const{success:o,data:n}=await e.json();if(!o)throw n;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(t){const i=null==t?void 0:t[0];i&&"string"==typeof i&&(this.error=i)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}handleEmailStateChange(t){this.emailStateChange.emit(t)}render(){var t,e,r,o,n,a,s,l;if(this.show)return i("presto-email-overlay-ui",{style:Object.assign(Object.assign({},(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.button_color)?{"--presto-player-button-color":`${null===(e=null==this?void 0:this.emailCollection)||void 0===e?void 0:e.button_color}`}:{}),(null===(r=null==this?void 0:this.emailCollection)||void 0===r?void 0:r.button_text_color)?{"--presto-player-button-text":`${null===(o=null==this?void 0:this.emailCollection)||void 0===o?void 0:o.button_text_color}`}:{}),direction:this.direction,class:"email-overlay",headline:null===(n=null==this?void 0:this.emailCollection)||void 0===n?void 0:n.headline,bottomText:null===(a=null==this?void 0:this.emailCollection)||void 0===a?void 0:a.bottom_text,allowSkip:null===(s=null==this?void 0:this.emailCollection)||void 0===s?void 0:s.allow_skip,buttonText:null===(l=null==this?void 0:this.emailCollection)||void 0===l?void 0:l.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:t=>this.submit(t),onSkip:()=>this.skip(),i18n:this.i18n,provider:this.provider})}static get watchers(){return{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"],show:["handleEmailStateChange"]}}};A.style=":host{display:block}";let M=class{constructor(i){t(this,i),this.submitForm=r(this,"submitForm",7),this.skip=r(this,"skip",7)}handleSubmit(t){this.submitForm.emit({email:this.email}),t.preventDefault()}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),S(this.textInput,3,{maxFontSize:this.isAudioProvider?15:20,minFontSize:8})}handleChange(t){this.email=t.target.value}render(){var t,e,r,o;return i("div",{class:"overlay "+("rtl"===this.direction?"rtl":""),ref:t=>this.textInput=t},i("div",{class:"content"},i("h1",{class:this.isAudioProvider&&"is-small"},this.headline||(null===(t=null==this?void 0:this.i18n)||void 0===t?void 0:t.emailDefaultHeadline)),this.isLoading?i("presto-player-spinner",null):i("form",{onSubmit:t=>this.handleSubmit(t)},i("input",{type:"email",placeholder:null===(e=null==this?void 0:this.i18n)||void 0===e?void 0:e.emailPlaceholder,value:this.email,onInput:t=>this.handleChange(t),required:!0}),i("button",{type:"submit"},this.buttonText||(null===(r=null==this?void 0:this.i18n)||void 0===r?void 0:r.play))),this.errorMessage&&i("p",{class:"error"},this.errorMessage),this.bottomText&&i("p",{innerHTML:this.bottomText,class:this.isAudioProvider&&"is-small"}),!!this.allowSkip&&i("div",{class:"skip",onClick:()=>{this.skip.emit()}},null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.skip," →")))}};M.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999}*{box-sizing:border-box}a{color:#fff}.overlay{position:relative;display:flex;align-items:center;text-align:center;justify-content:center;padding:48px;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif);height:100%}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-email-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-email-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.overlay.rtl form{flex-direction:row-reverse}.content{width:20em}form{display:flex;align-items:stretch;justify-content:center}input{background:#fff;border:none;font-size:0.8em;line-height:20px;padding:6px 8px;border-radius:0;border-width:1px;border-style:solid;border-color:transparent;border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius);flex:1}@media screen and (min-width: 700px){input{padding:10px 14px}}input:focus{border-color:var(--plyr-color-main, #000);z-index:1}input:focus,input:hover{outline:none}.rtl input{border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}button{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}.rtl button{border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius)}h1{font-size:1.5em;font-weight:500;margin:0 0 22px 0;max-width:600px;line-height:1.1em}h1.is-small{margin-bottom:1em;font-size:1.1em}.skip{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}p{font-size:0.7em;margin:0;margin-top:1.5em}p.is-small{font-size:0.9em;margin-top:1em}';let E=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7)}render(){var t,e,r,o,n,a,s,l,p;return i("div",{class:"presto-player__muted-overlay",onClick:()=>{this.mutedPreview=!1,this.playVideo.emit()}},(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&i("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},i("svg",{id:"plyr-play",viewBox:"0 0 18 18"},i("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),i("span",{class:"plyr__sr-only"},"Play")),(null===(e=this.mutedOverlay)||void 0===e?void 0:e.enabled)&&(null===(r=this.mutedOverlay)||void 0===r?void 0:r.src)?i("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:`${(null===(o=this.mutedOverlay)||void 0===o?void 0:o.width)||50}%`,left:100*((null===(a=null===(n=this.mutedOverlay)||void 0===n?void 0:n.focalPoint)||void 0===a?void 0:a.x)||.5)+"%",top:100*((null===(l=null===(s=this.mutedOverlay)||void 0===s?void 0:s.focalPoint)||void 0===l?void 0:l.y)||.5)+"%"}},i("img",{src:null===(p=this.mutedOverlay)||void 0===p?void 0:p.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};E.style=":host{display:block}";var F=["premium","referrerPolicy"];function L(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function R(t,i){for(var e=0;e<i.length;e++){var r=i[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function N(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function B(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,r)}return e}function D(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{};i%2?B(Object(e),!0).forEach((function(i){N(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):B(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}return t}var $={addCSS:!0,thumbWidth:15,watch:!0};function q(t,i){return function(){return Array.from(document.querySelectorAll(i)).includes(this)}.call(t,i)}var V=function(t){return null!=t?t.constructor:null},H=function(t,i){return!!(t&&i&&t instanceof i)},U=function(t){return V(t)===String},Q=function(t){return Array.isArray(t)},W=function(t){return H(t,NodeList)},Y=U,J=Q,G=W,K=function(t){return H(t,Element)},X=function(t){return H(t,Event)},Z=function(t){return function(t){return null==t}(t)||(U(t)||Q(t)||W(t))&&!t.length||function(t){return V(t)===Object}(t)&&!Object.keys(t).length};var tt,it,et,rt=function(){function t(i,e){(function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),K(i)?this.element=i:Y(i)&&(this.element=document.querySelector(i)),K(this.element)&&Z(this.element.rangeTouch)&&(this.config=D({},$,{},e),this.init())}return function(t,i,e){i&&R(t.prototype,i),e&&R(t,e)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var i=this,e=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){i.element[e](t,(function(t){return i.set(t)}),!1)}))}},{key:"get",value:function(i){if(!t.enabled||!X(i))return null;var e,r=i.target,o=i.changedTouches[0],n=parseFloat(r.getAttribute("min"))||0,a=parseFloat(r.getAttribute("max"))||100,s=parseFloat(r.getAttribute("step"))||1,l=r.getBoundingClientRect(),p=100/l.width*(this.config.thumbWidth/2)/100;return 0>(e=100/l.width*(o.clientX-l.left))?e=0:100<e&&(e=100),50>e?e-=(100-2*e)*p:50<e&&(e+=2*(e-50)*p),n+function(t,i){if(1>i){var e=function(t){var i="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}(i);return parseFloat(t.toFixed(e))}return Math.round(t/i)*i}(e/100*(a-n),s)}},{key:"set",value:function(i){t.enabled&&X(i)&&!i.target.disabled&&(i.preventDefault(),i.target.value=this.get(i),function(t,i){if(t&&i){var e=new Event(i,{bubbles:!0});t.dispatchEvent(e)}}(i.target,"touchend"===i.type?"change":"input"))}}],[{key:"setup",value:function(i){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null;if(Z(i)||Y(i)?r=Array.from(document.querySelectorAll(Y(i)?i:'input[type="range"]')):K(i)?r=[i]:G(i)?r=Array.from(i):J(i)&&(r=i.filter(K)),Z(r))return null;var o=D({},$,{},e);if(Y(i)&&o.watch){var n=new MutationObserver((function(e){Array.from(e).forEach((function(e){Array.from(e.addedNodes).forEach((function(e){K(e)&&q(e,i)&&new t(e,o)}))}))}));n.observe(document.body,{childList:!0,subtree:!0})}return r.map((function(i){return new t(i,e)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),ot=function(t){return null!=t?t.constructor:null},nt=function(t,i){return Boolean(t&&i&&t instanceof i)},at=function(t){return null==t},st=function(t){return ot(t)===Object},lt=function(t){return ot(t)===String},pt=function(t){return ot(t)===Function},ut=function(t){return Array.isArray(t)},dt=function(t){return nt(t,NodeList)},ct=function(t){return at(t)||(lt(t)||ut(t)||dt(t))&&!t.length||st(t)&&!Object.keys(t).length},ht=at,vt=st,yt=function(t){return ot(t)===Number&&!Number.isNaN(t)},ft=lt,gt=function(t){return ot(t)===Boolean},bt=pt,mt=ut,_t=dt,wt=function(t){return null!==t&&"object"==l(t)&&1===t.nodeType&&"object"==l(t.style)&&"object"==l(t.ownerDocument)},kt=function(t){return nt(t,Event)},xt=function(t){return nt(t,KeyboardEvent)},zt=function(t){return nt(t,TextTrack)||!at(t)&&lt(t.kind)},jt=function(t){if(nt(t,window.URL))return!0;if(!lt(t))return!1;var i=t;t.startsWith("http://")&&t.startsWith("https://")||(i="http://".concat(t));try{return!ct(new URL(i).hostname)}catch(t){return!1}},Tt=ct,St=(tt=document.createElement("span"),it={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},et=Object.keys(it).find((function(t){return void 0!==tt.style[t]})),!!ft(et)&&it[et]);function Ct(t,i){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),i)}var Pt={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Ot(t,i){return i.split(".").reduce((function(t,i){return t&&t[i]}),t)}function It(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];if(!e.length)return t;var o=e.shift();return vt(o)?(Object.keys(o).forEach((function(i){vt(o[i])?(Object.keys(t).includes(i)||Object.assign(t,a({},i,{})),It(t[i],o[i])):Object.assign(t,a({},i,o[i]))})),It.apply(void 0,[t].concat(e))):t}function At(t,i){Array.from(t.length?t:[t]).reverse().forEach((function(t,e){var r=e>0?i.cloneNode(!0):i,o=t.parentNode,n=t.nextSibling;r.appendChild(t),n?o.insertBefore(r,n):o.appendChild(r)}))}function Mt(t,i){wt(t)&&!Tt(i)&&Object.entries(i).filter((function(t){var i=o(t,2);return!ht(i[1])})).forEach((function(i){var e=o(i,2);return t.setAttribute(e[0],e[1])}))}function Et(t,i,e){var r=document.createElement(t);return vt(i)&&Mt(r,i),ft(e)&&(r.innerText=e),r}function Ft(t,i,e,r){wt(i)&&i.appendChild(Et(t,e,r))}function Lt(t){_t(t)||mt(t)?Array.from(t).forEach(Lt):wt(t)&&wt(t.parentNode)&&t.parentNode.removeChild(t)}function Rt(t){if(wt(t))for(var i=t.childNodes.length;i>0;)t.removeChild(t.lastChild),i-=1}function Nt(t,i){return wt(i)&&wt(i.parentNode)&&wt(t)?(i.parentNode.replaceChild(t,i),t):null}function Bt(t,i){if(!ft(t)||Tt(t))return{};var e={},r=It({},i);return t.split(",").forEach((function(t){var i=t.trim(),n=i.replace(".",""),a=i.replace(/[[\]]/g,"").split("="),s=o(a,1)[0],l=a.length>1?a[1].replace(/["']/g,""):"";switch(i.charAt(0)){case".":e.class=ft(r.class)?"".concat(r.class," ").concat(n):n;break;case"#":e.id=i.replace("#","");break;case"[":e[s]=l}})),It(r,e)}function Dt(t,i){if(wt(t)){var e=i;gt(e)||(e=!t.hidden),t.hidden=e}}function $t(t,i,e){if(_t(t))return Array.from(t).map((function(t){return $t(t,i,e)}));if(wt(t)){var r="toggle";return void 0!==e&&(r=e?"add":"remove"),t.classList[r](i),t.classList.contains(i)}return!1}function qt(t,i){return wt(t)&&t.classList.contains(i)}function Vt(t,i){var e=Element.prototype;return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(t,i)}function Ht(t){return this.elements.container.querySelectorAll(t)}function Ut(t){return this.elements.container.querySelector(t)}function Qt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];wt(t)&&(t.focus({preventScroll:!0}),i&&$t(t,this.config.classNames.tabFocus))}var Wt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Yt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,i,e){var r=Yt[t]||"html5"!==i;return{api:r,ui:r&&Yt.rangeInput&&("video"!==t||!Pt.isIPhone||Pt.isIPhone&&e&&Yt.playsinline)}},pip:!(Pt.isIPhone||!bt(Et("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Et("video").disablePictureInPicture)),airplay:bt(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(Tt(t))return!1;var i=t.split("/"),e=o(i,1),r=t;if(!this.isHTML5||e[0]!==this.type)return!1;Object.keys(Wt).includes(r)&&(r+='; codecs="'.concat(Wt[t],'"'));try{return Boolean(r&&this.media.canPlayType(r).replace(/no/,""))}catch(t){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var t=document.createElement("input");return t.type="range","range"===t.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==St,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Jt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(t){}return t}();function Gt(t,i,e){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!Tt(i)&&bt(e)){var s=i.split(" "),l=a;Jt&&(l={passive:n,capture:a}),s.forEach((function(i){r&&r.eventListeners&&o&&r.eventListeners.push({element:t,type:i,callback:e,options:l}),t[o?"addEventListener":"removeEventListener"](i,e,l)}))}}function Kt(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Gt.call(this,t,i,e,!0,r,o)}function Xt(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Gt.call(this,t,i,e,!1,r,o)}function Zt(t){var i=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function a(){for(var s=arguments.length,l=new Array(s),p=0;p<s;p++)l[p]=arguments[p];Xt(t,e,a,o,n),r.apply(i,l)};Gt.call(this,t,e,a,!0,o,n)}function ti(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(wt(t)&&!Tt(i)){var o=new CustomEvent(i,{bubbles:e,detail:n(n({},r),{},{plyr:this})});t.dispatchEvent(o)}}function ii(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function ei(){var t=this;return new Promise((function(i){return t.ready?setTimeout(i,0):Kt.call(t,t.elements.container,"ready",i)})).then((function(){}))}function ri(t){(function(t){return nt(t,Promise)&&pt(t.then)})(t)&&t.then(null,(function(){}))}function oi(t){return mt(t)?t.filter((function(i,e){return t.indexOf(i)===e})):t}function ni(t,i){return mt(t)&&t.length?t.reduce((function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t})):null}function ai(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var si=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(t,i){var e=o(i,2),r=e[0],s=e[1];return n(n({},t),{},a({},r/s,[r,s]))}),{});function li(t){return!!(mt(t)||ft(t)&&t.includes(":"))&&(mt(t)?t:t.split(":")).map(Number).every(yt)}function pi(t){if(!mt(t)||!t.every(yt))return null;var i=o(t,2),e=i[0],r=i[1],n=function t(i,e){return 0===e?i:t(e,i%e)}(e,r);return[e/n,r/n]}function ui(t){var i=function(t){return li(t)?t.split(":").map(Number):null},e=i(t);if(null===e&&(e=i(this.config.ratio)),null===e&&!Tt(this.embed)&&mt(this.embed.ratio)&&(e=this.embed.ratio),null===e&&this.isHTML5){var r=this.media;e=[r.videoWidth,r.videoHeight]}return pi(e)}function di(t){if(!this.isVideo)return{};var i=this.elements.wrapper,e=ui.call(this,t);if(!mt(e))return{};var r=pi(e),n=o(r,2),a=n[0],s=n[1],l=100/a*s;if(ai("aspect-ratio: ".concat(a,"/").concat(s))?i.style.aspectRatio="".concat(a,"/").concat(s):i.style.paddingBottom="".concat(l,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),u=(p-l)/(p/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:l,ratio:e}}function ci(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,r=t/i,o=ni(Object.keys(si),r);return Math.abs(o-r)<=e?si[o]:[t,i]}var hi={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(i){var e=i.getAttribute("type");return!!Tt(e)||Yt.mime.call(t,e)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:hi.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,Tt(this.config.ratio)||di.call(t),Object.defineProperty(t.media,"quality",{get:function(){var i=hi.getSources.call(t).find((function(i){return i.getAttribute("src")===t.source}));return i&&Number(i.getAttribute("size"))},set:function(i){if(t.quality!==i){if(t.config.quality.forced&&bt(t.config.quality.onChange))t.config.quality.onChange(i);else{var e=hi.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===i}));if(!e)return;var r=t.media,o=r.currentTime,n=r.paused,a=r.preload,s=r.readyState,l=r.playbackRate;t.media.src=e.getAttribute("src"),("none"!==a||s)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=o,n||ri(t.play())})),t.media.load())}ti.call(t,t.media,"qualitychange",!1,{quality:i})}}})}},cancelRequests:function(){this.isHTML5&&(Lt(hi.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function vi(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function yi(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];return Tt(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,i){return e[i].toString()}))}var fi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),e.toString())},gi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function bi(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=t.toString();return i=fi(i,"-"," "),i=fi(i,"_"," "),i=gi(i),fi(i," ","")}function mi(t){var i=document.createElement("div");return i.appendChild(t),i.innerHTML}var _i={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},wi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Tt(t)||Tt(i))return"";var e=Ot(i.i18n,t);if(Tt(e))return Object.keys(_i).includes(t)?_i[t]:"";var r={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(r).forEach((function(t){var i=o(t,2);e=fi(e,i[0],i[1])})),e},ki=function(){function t(i){var e=this;p(this,t),L(this,"get",(function(i){if(!t.supported||!e.enabled)return null;var r=window.localStorage.getItem(e.key);if(Tt(r))return null;var o=JSON.parse(r);return ft(i)&&i.length?o[i]:o})),L(this,"set",(function(i){if(t.supported&&e.enabled&&vt(i)){var r=e.get();Tt(r)&&(r={}),It(r,i);try{window.localStorage.setItem(e.key,JSON.stringify(r))}catch(i){}}})),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}return s(t,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),t}();function xi(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(e,r){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===i)try{e(JSON.parse(o.responseText))}catch(t){e(o.responseText)}else e(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",t,!0),o.responseType=i,o.send()}catch(t){r(t)}}))}function zi(t,i){if(ft(t)){var e=ft(i),r=function(){return null!==document.getElementById(i)},o=function(t,i){t.innerHTML=i,e&&r()||document.body.insertAdjacentElement("afterbegin",t)};if(!e||!r()){var n=ki.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),e&&a.setAttribute("id",i),n){var s=window.localStorage.getItem("cache-".concat(i));if(null!==s){var l=JSON.parse(s);o(a,l.content)}}xi(t).then((function(t){if(!Tt(t)){if(n)try{window.localStorage.setItem("cache-".concat(i),JSON.stringify({content:t}))}catch(t){}o(a,t)}})).catch((function(){}))}}}var ji=function(t){return Math.trunc(t/60/60%60,10)},Ti=function(t){return Math.trunc(t%60,10)};function Si(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!yt(t))return Si(void 0,i,e);var r,o=function(t){return"0".concat(t).slice(-2)},n=ji(t),a=(r=t,Math.trunc(r/60%60,10)),s=Ti(t);return n=i||n>0?"".concat(n,":"):"","".concat(e&&t>0?"-":"").concat(n).concat(o(a),":").concat(o(s))}var Ci={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,e=t.host!==i||Pt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=Ut.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Ht.call(this,this.config.selectors.buttons.play),pause:Ut.call(this,this.config.selectors.buttons.pause),restart:Ut.call(this,this.config.selectors.buttons.restart),rewind:Ut.call(this,this.config.selectors.buttons.rewind),fastForward:Ut.call(this,this.config.selectors.buttons.fastForward),mute:Ut.call(this,this.config.selectors.buttons.mute),pip:Ut.call(this,this.config.selectors.buttons.pip),airplay:Ut.call(this,this.config.selectors.buttons.airplay),settings:Ut.call(this,this.config.selectors.buttons.settings),captions:Ut.call(this,this.config.selectors.buttons.captions),fullscreen:Ut.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Ut.call(this,this.config.selectors.progress),this.elements.inputs={seek:Ut.call(this,this.config.selectors.inputs.seek),volume:Ut.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Ut.call(this,this.config.selectors.display.buffer),currentTime:Ut.call(this,this.config.selectors.display.currentTime),duration:Ut.call(this,this.config.selectors.display.duration)},wt(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,i){var e="http://www.w3.org/2000/svg",r=Ci.getIconUrl.call(this),o="".concat(r.cors?"":r.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(e,"svg");Mt(n,It(i,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(e,"use"),s="".concat(o,"-").concat(t);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),n.appendChild(a),n},createLabel:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=wi(t,this.config);return Et("span",n(n({},i),{},{class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),e)},createBadge:function(t){if(Tt(t))return null;var i=Et("span",{class:this.config.classNames.menu.value});return i.appendChild(Et("span",{class:this.config.classNames.menu.badge},t)),i},createButton:function(t,i){var e=this,r=It({},i),o=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=bi(t)).charAt(0).toLowerCase()+t.slice(1)}(t),n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(r).includes(t)&&(n[t]=r[t],delete r[t])})),"button"!==n.element||Object.keys(r).includes("type")||(r.type="button"),Object.keys(r).includes("class")?r.class.split(" ").some((function(t){return t===e.config.classNames.control}))||It(r,{class:"".concat(r.class," ").concat(this.config.classNames.control)}):r.class=this.config.classNames.control,t){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":r.class+=" ".concat(this.config.classNames.control,"--overlaid"),o="play",n.label="play",n.icon="play";break;default:Tt(n.label)&&(n.label=o),Tt(n.icon)&&(n.icon=t)}var a=Et(n.element);return n.toggle?(a.appendChild(Ci.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(Ci.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(Ci.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(Ci.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(Ci.createIcon.call(this,n.icon)),a.appendChild(Ci.createLabel.call(this,n.label))),It(r,Bt(this.config.selectors.buttons[o],r)),Mt(a,r),"play"===o?(mt(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange:function(t,i){var e=Et("input",It(Bt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":wi(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[t]=e,Ci.updateRangeFill.call(this,e),rt.setup(e),e},createProgress:function(t,i){var e=Et("progress",It(Bt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if("volume"!==t){e.appendChild(Et("span",null,"0"));var r={played:"played",buffer:"buffered"}[t],o=r?wi(r,this.config):"";e.innerText="% ".concat(o.toLowerCase())}return this.elements.display[t]=e,e},createTime:function(t,i){var e=Bt(this.config.selectors.display[t],i),r=Et("div",It(e,{class:"".concat(e.class?e.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":wi(t,this.config)}),"00:00");return this.elements.display[t]=r,r},bindMenuItemShortcuts:function(t,i){var e=this;Kt.call(this,t,"keydown keyup",(function(r){if([32,38,39,40].includes(r.which)&&(r.preventDefault(),r.stopPropagation(),"keydown"!==r.type)){var o,n=Vt(t,'[role="menuitemradio"]');!n&&[32,39].includes(r.which)?Ci.showMenuPanel.call(e,i,!0):32!==r.which&&(40===r.which||n&&39===r.which?wt(o=t.nextElementSibling)||(o=t.parentNode.firstElementChild):wt(o=t.previousElementSibling)||(o=t.parentNode.lastElementChild),Qt.call(e,o,!0))}}),!1),Kt.call(this,t,"keyup",(function(t){13===t.which&&Ci.focusFirstMenuItem.call(e,null,!0)}))},createMenuItem:function(t){var i=this,e=t.value,r=t.list,o=t.type,n=t.title,a=t.badge,s=void 0===a?null:a,l=t.checked,p=void 0!==l&&l,u=Bt(this.config.selectors.inputs[o]),d=Et("button",It(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:e})),c=Et("span");c.innerHTML=n,wt(s)&&c.appendChild(s),d.appendChild(c),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(t){t&&Array.from(d.parentNode.children).filter((function(t){return Vt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(d,"click keyup",(function(t){if(!xt(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),d.checked=!0,o){case"language":i.currentTrack=Number(e);break;case"quality":i.quality=e;break;case"speed":i.speed=parseFloat(e)}Ci.showMenuPanel.call(i,"home",xt(t))}}),o,!1),Ci.bindMenuItemShortcuts.call(this,d,o),r.appendChild(d)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return yt(t)?Si(t,ji(this.duration)>0,i):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];wt(t)&&yt(i)&&(t.innerText=Ci.formatTime(i,e))},updateVolume:function(){this.supported.ui&&(wt(this.elements.inputs.volume)&&Ci.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),wt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;wt(t)&&(t.value=i,Ci.updateRangeFill.call(this,t))},updateProgress:function(t){var i=this;if(this.supported.ui&&kt(t)){var e=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=function(t,i){return 0===t||0===i||Number.isNaN(t)||Number.isNaN(i)?0:(t/i*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&Ci.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":!function(t,e){var r=yt(e)?e:0,o=wt(t)?t:i.elements.display.buffer;if(wt(o)){o.value=r;var n=o.getElementsByTagName("span")[0];wt(n)&&(n.childNodes[0].nodeValue=r)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var i=kt(t)?t.target:t;if(wt(i)&&"range"===i.getAttribute("type")){if(Vt(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);var e=Ci.formatTime(this.currentTime),r=Ci.formatTime(this.duration),o=wi("seekLabel",this.config);i.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",r))}else if(Vt(i,this.config.selectors.inputs.volume)){var n=100*i.value;i.setAttribute("aria-valuenow",n),i.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else i.setAttribute("aria-valuenow",i.value);Pt.isWebkit&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip:function(t){var i=this;if(this.config.tooltips.seek&&wt(this.elements.inputs.seek)&&wt(this.elements.display.seekTooltip)&&0!==this.duration){var e="".concat(this.config.classNames.tooltip,"--visible"),r=function(t){return $t(i.elements.display.seekTooltip,e,t)};if(this.touch)r(!1);else{var o=0,n=this.elements.progress.getBoundingClientRect();if(kt(t))o=100/n.width*(t.pageX-n.left);else{if(!qt(this.elements.display.seekTooltip,e))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Ci.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),kt(t)&&["mouseenter","mouseleave"].includes(t.type)&&r("mouseenter"===t.type)}}},timeUpdate:function(t){var i=!wt(this.elements.display.duration)&&this.config.invertTime;Ci.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),t&&"timeupdate"===t.type&&this.media.seeking||Ci.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Dt(this.elements.display.currentTime,!0),void Dt(this.elements.progress,!0);wt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=wt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Ci.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Ci.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Ci.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,i){Dt(this.elements.settings.buttons[t],!i)},updateSetting:function(t,i,e){var r=this.elements.settings.panels[t],o=null,n=i;if("captions"===t)o=this.currentTrack;else{if(o=Tt(e)?this[t]:e,Tt(o)&&(o=this.config[t].default),!Tt(this.options[t])&&!this.options[t].includes(o))return void this.debug.warn("Unsupported value of '".concat(o,"' for ").concat(t));if(!this.config[t].options.includes(o))return void this.debug.warn("Disabled value of '".concat(o,"' for ").concat(t))}if(wt(n)||(n=r&&r.querySelector('[role="menu"]')),wt(n)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Ci.getLabel.call(this,t,o);var a=n&&n.querySelector('[value="'.concat(o,'"]'));wt(a)&&(a.checked=!0)}},getLabel:function(t,i){switch(t){case"speed":return 1===i?wi("normal",this.config):"".concat(i,"&times;");case"quality":if(yt(i)){if(0===i)return wi("auto",this.config);var e=wi("qualityLabel.".concat(i),this.config);return e.length?e:"".concat(i,"p")}return gi(i);case"captions":return Ii.getLabel.call(this);default:return null}},setQualityMenu:function(t){var i=this;if(wt(this.elements.settings.panels.quality)){var e="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');mt(t)&&(this.options.quality=oi(t).filter((function(t){return i.config.quality.options.includes(t)})));var o=!Tt(this.options.quality)&&this.options.quality.length>1;if(Ci.toggleMenuButton.call(this,e,o),Rt(r),Ci.checkMenu.call(this),o){var n=function(t){var e=wi("qualityBadge.".concat(t),i.config);return e.length?Ci.createBadge.call(i,e):null};this.options.quality.sort((function(t,e){var r=i.config.quality.options;return r.indexOf(t)>r.indexOf(e)?1:-1})).forEach((function(t){Ci.createMenuItem.call(i,{value:t,list:r,type:e,title:Ci.getLabel.call(i,"quality",t),badge:n(t)})})),Ci.updateSetting.call(this,e,r)}}},setCaptionsMenu:function(){var t=this;if(wt(this.elements.settings.panels.captions)){var i="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=Ii.getTracks.call(this),o=Boolean(r.length);if(Ci.toggleMenuButton.call(this,i,o),Rt(e),Ci.checkMenu.call(this),o){var n=r.map((function(i,r){return{value:r,checked:t.captions.toggled&&t.currentTrack===r,title:Ii.getLabel.call(t,i),badge:i.language&&Ci.createBadge.call(t,i.language.toUpperCase()),list:e,type:"language"}}));n.unshift({value:-1,checked:!this.captions.toggled,title:wi("disabled",this.config),list:e,type:"language"}),n.forEach(Ci.createMenuItem.bind(this)),Ci.updateSetting.call(this,i,e)}}},setSpeedMenu:function(){var t=this;if(wt(this.elements.settings.panels.speed)){var i="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(i){return i>=t.minimumSpeed&&i<=t.maximumSpeed}));var r=!Tt(this.options.speed)&&this.options.speed.length>1;Ci.toggleMenuButton.call(this,i,r),Rt(e),Ci.checkMenu.call(this),r&&(this.options.speed.forEach((function(r){Ci.createMenuItem.call(t,{value:r,list:e,type:i,title:Ci.getLabel.call(t,"speed",r)})})),Ci.updateSetting.call(this,i,e))}},checkMenu:function(){var t=this.elements.settings.buttons,i=!Tt(t)&&Object.values(t).some((function(t){return!t.hidden}));Dt(this.elements.settings.menu,!i)},focusFirstMenuItem:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var e=t;wt(e)||(e=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var r=e.querySelector('[role^="menuitem"]');Qt.call(this,r,i)}},toggleMenu:function(t){var i=this.elements.settings.popup,e=this.elements.buttons.settings;if(wt(i)&&wt(e)){var r=i.hidden,o=r;if(gt(t))o=t;else if(xt(t)&&27===t.which)o=!1;else if(kt(t)){var n=bt(t.composedPath)?t.composedPath()[0]:t.target,a=i.contains(n);if(a||!a&&t.target!==e&&o)return}e.setAttribute("aria-expanded",o),Dt(i,!o),$t(this.elements.container,this.config.classNames.menu.open,o),o&&xt(t)?Ci.focusFirstMenuItem.call(this,null,!0):o||r||Qt.call(this,e,xt(t))}},getMenuSize:function(t){var i=t.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),t.parentNode.appendChild(i);var e=i.scrollWidth,r=i.scrollHeight;return Lt(i),{width:e,height:r}},showMenuPanel:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(i));if(wt(r)){var o=r.parentNode,n=Array.from(o.children).find((function(t){return!t.hidden}));if(Yt.transitions&&!Yt.reducedMotion){o.style.width="".concat(n.scrollWidth,"px"),o.style.height="".concat(n.scrollHeight,"px");var a=Ci.getMenuSize.call(this,r),s=function i(e){e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",Xt.call(t,o,St,i))};Kt.call(this,o,St,s),o.style.width="".concat(a.width,"px"),o.style.height="".concat(a.height,"px")}Dt(n,!0),Dt(r,!1),Ci.focusFirstMenuItem.call(this,r,e)}},setDownloadUrl:function(){var t=this.elements.buttons.download;wt(t)&&t.setAttribute("href",this.download)},create:function(t){var i=this,e=Ci.bindMenuItemShortcuts,r=Ci.createButton,o=Ci.createProgress,n=Ci.createRange,a=Ci.createTime,s=Ci.setQualityMenu,l=Ci.setSpeedMenu,p=Ci.showMenuPanel;this.elements.controls=null,mt(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));var u=Et("div",Bt(this.config.selectors.controls.wrapper));this.elements.controls=u;var d={class:"plyr__controls__item"};return oi(mt(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&u.appendChild(r.call(i,"restart",d)),"rewind"===s&&u.appendChild(r.call(i,"rewind",d)),"play"===s&&u.appendChild(r.call(i,"play",d)),"fast-forward"===s&&u.appendChild(r.call(i,"fast-forward",d)),"progress"===s){var l=Et("div",{class:"".concat(d.class," plyr__progress__container")}),c=Et("div",Bt(i.config.selectors.progress));if(c.appendChild(n.call(i,"seek",{id:"plyr-seek-".concat(t.id)})),c.appendChild(o.call(i,"buffer")),i.config.tooltips.seek){var h=Et("span",{class:i.config.classNames.tooltip},"00:00");c.appendChild(h),i.elements.display.seekTooltip=h}i.elements.progress=c,l.appendChild(i.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(a.call(i,"currentTime",d)),"duration"===s&&u.appendChild(a.call(i,"duration",d)),"mute"===s||"volume"===s){var v=i.elements.volume;wt(v)&&u.contains(v)||(v=Et("div",It({},d,{class:"".concat(d.class," plyr__volume").trim()})),i.elements.volume=v,u.appendChild(v)),"mute"===s&&v.appendChild(r.call(i,"mute")),"volume"!==s||Pt.isIos||v.appendChild(n.call(i,"volume",It({max:1,step:.05,value:i.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===s&&u.appendChild(r.call(i,"captions",d)),"settings"===s&&!Tt(i.config.settings)){var y=Et("div",It({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));y.appendChild(r.call(i,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var f=Et("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),g=Et("div"),b=Et("div",{id:"plyr-settings-".concat(t.id,"-home")}),m=Et("div",{role:"menu"});b.appendChild(m),g.appendChild(b),i.elements.settings.panels.home=b,i.config.settings.forEach((function(r){var o=Et("button",It(Bt(i.config.selectors.buttons.settings),{type:"button",class:"".concat(i.config.classNames.control," ").concat(i.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(i,o,r),Kt.call(i,o,"click",(function(){p.call(i,r,!1)}));var n=Et("span",null,wi(r,i.config)),a=Et("span",{class:i.config.classNames.menu.value});a.innerHTML=t[r],n.appendChild(a),o.appendChild(n),m.appendChild(o);var s=Et("div",{id:"plyr-settings-".concat(t.id,"-").concat(r),hidden:""}),l=Et("button",{type:"button",class:"".concat(i.config.classNames.control," ").concat(i.config.classNames.control,"--back")});l.appendChild(Et("span",{"aria-hidden":!0},wi(r,i.config))),l.appendChild(Et("span",{class:i.config.classNames.hidden},wi("menuBack",i.config))),Kt.call(i,s,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(i,"home",!0))}),!1),Kt.call(i,l,"click",(function(){p.call(i,"home",!1)})),s.appendChild(l),s.appendChild(Et("div",{role:"menu"})),g.appendChild(s),i.elements.settings.buttons[r]=o,i.elements.settings.panels[r]=s})),f.appendChild(g),y.appendChild(f),u.appendChild(y),i.elements.settings.popup=f,i.elements.settings.menu=y}if("pip"===s&&Yt.pip&&u.appendChild(r.call(i,"pip",d)),"airplay"===s&&Yt.airplay&&u.appendChild(r.call(i,"airplay",d)),"download"===s){var _=It({},d,{element:"a",href:i.download,target:"_blank"});i.isHTML5&&(_.download=""),!jt(i.config.urls.download)&&i.isEmbed&&It(_,{icon:"logo-".concat(i.provider),label:i.provider}),u.appendChild(r.call(i,"download",_))}"fullscreen"===s&&u.appendChild(r.call(i,"fullscreen",d))})),this.isHTML5&&s.call(this,hi.getQualityOptions.call(this)),l.call(this),u},inject:function(){var t=this;if(this.config.loadSprite){var i=Ci.getIconUrl.call(this);i.cors&&zi(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var e=null;this.elements.controls=null;var r,n={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(bt(this.config.controls)&&(this.config.controls=this.config.controls.call(this,n)),this.config.controls||(this.config.controls=[]),wt(this.config.controls)||ft(this.config.controls)?e=this.config.controls:(e=Ci.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ii.getLabel.call(this)}),a=!1),a&&ft(this.config.controls)&&(e=function(t){var i=t;return Object.entries(n).forEach((function(t){var e=o(t,2),r=e[1];i=fi(i,"{".concat(e[0],"}"),r)})),i}(e)),ft(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),wt(r)||(r=this.elements.container),r[wt(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),wt(this.elements.controls)||Ci.findElements.call(this),!Tt(this.elements.buttons)){var s=function(i){var e=t.config.classNames.controlPressed;Object.defineProperty(i,"pressed",{enumerable:!0,get:function(){return qt(i,e)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];$t(i,e,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){mt(t)||_t(t)?Array.from(t).filter(Boolean).forEach(s):s(t)}))}if(Pt.isEdge&&Ct(r),this.config.tooltips.controls){var l=this.config,p=l.classNames,u=l.selectors,d="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),c=Ht.call(this,d);Array.from(c).forEach((function(i){$t(i,t.config.classNames.hidden,!1),$t(i,t.config.classNames.tooltip,!0)}))}}};function Pi(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;if(i){var r=document.createElement("a");r.href=e,e=r.href}try{return new URL(e)}catch(t){return null}}function Oi(t){var i=new URLSearchParams;return vt(t)&&Object.entries(t).forEach((function(t){var e=o(t,2);i.set(e[0],e[1])})),i}var Ii={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Yt.textTracks)mt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ci.setCaptionsMenu.call(this);else{if(wt(this.elements.captions)||(this.elements.captions=Et("div",Bt(this.config.selectors.captions)),function(t,i){wt(t)&&wt(i)&&i.parentNode.insertBefore(t,i.nextSibling)}(this.elements.captions,this.elements.wrapper)),Pt.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var i=t.getAttribute("src"),e=Pi(i);null!==e&&e.hostname!==window.location.href.hostname&&["http:","https:"].includes(e.protocol)&&xi(i,"blob").then((function(i){t.setAttribute("src",window.URL.createObjectURL(i))})).catch((function(){Lt(t)}))}))}var i=oi((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===e&&(e=o(i,1)[0]);var r=this.storage.get("captions");gt(r)||(r=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:r,language:e,languages:i}),this.isHTML5&&Kt.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",Ii.update.bind(this)),setTimeout(Ii.update.bind(this),0)}},update:function(){var t=this,i=Ii.getTracks.call(this,!0),e=this.captions,r=e.active,o=e.language,n=e.meta,a=e.currentTrackNode,s=Boolean(i.find((function(t){return t.language===o})));this.isHTML5&&this.isVideo&&i.filter((function(t){return!n.get(t)})).forEach((function(i){t.debug.log("Track added",i),n.set(i,{default:"showing"===i.mode}),"showing"===i.mode&&(i.mode="hidden"),Kt.call(t,i,"cuechange",(function(){return Ii.updateCues.call(t)}))})),(s&&this.language!==o||!i.includes(a))&&(Ii.setLanguage.call(this,o),Ii.toggle.call(this,r&&s)),this.elements&&$t(this.elements.container,this.config.classNames.captions.enabled,!Tt(i)),mt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ci.setCaptionsMenu.call(this)},toggle:function(t){var i=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var r=this.captions.toggled,o=this.config.classNames.captions.active,n=ht(t)?!r:t;if(n!==r){if(e||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!e){var a=Ii.getTracks.call(this),s=Ii.findTrack.call(this,[this.captions.language].concat(u(this.captions.languages)),!0);return this.captions.language=s.language,void Ii.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),$t(this.elements.container,o,n),this.captions.toggled=n,Ci.updateSetting.call(this,"captions"),ti.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout((function(){n&&i.captions.toggled&&i.captions.currentTrackNode&&(i.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=Ii.getTracks.call(this);if(-1!==t)if(yt(t))if(t in e){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var r=e[t],o=r||{},n=o.language;this.captions.currentTrackNode=r,Ci.updateSetting.call(this,"captions"),i||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),ti.call(this,this.media,"languagechange")}Ii.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&Ii.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Ii.toggle.call(this,!1,i)},setLanguage:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(ft(t)){var e=t.toLowerCase();this.captions.language=e;var r=Ii.getTracks.call(this),o=Ii.findTrack.call(this,[e]);Ii.set.call(this,r.indexOf(o),i)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(e){return!t.isHTML5||i||t.captions.meta.has(e)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var i,e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Ii.getTracks.call(this),n=function(t){return Number((e.captions.meta.get(t)||{}).default)},a=Array.from(o).sort((function(t,i){return n(i)-n(t)}));return t.every((function(t){return!(i=a.find((function(i){return i.language===t})))})),i||(r?a[0]:void 0)},getCurrentTrack:function(){return Ii.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var i=t;return!zt(i)&&Yt.textTracks&&this.captions.toggled&&(i=Ii.getCurrentTrack.call(this)),zt(i)?Tt(i.label)?Tt(i.language)?wi("enabled",this.config):t.language.toUpperCase():i.label:wi("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(wt(this.elements.captions))if(ht(t)||Array.isArray(t)){var i=t;if(!i){var e=Ii.getCurrentTrack.call(this);i=Array.from((e||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(mi)}var r=i.map((function(t){return t.trim()})).join("\n");if(r!==this.elements.captions.innerHTML){Rt(this.elements.captions);var o=Et("span",Bt(this.config.selectors.caption));o.innerHTML=r,this.elements.captions.appendChild(o),ti.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},Ai={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.9/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Mi={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ei=function(){},Fi=function(){function t(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];p(this,t),this.enabled=window.console&&i,this.enabled&&this.log("Debugging enabled")}return s(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Ei}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ei}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Ei}}]),t}(),Li=function(){function t(i){var e=this;p(this,t),L(this,"onChange",(function(){if(e.enabled){var t=e.player.elements.buttons.fullscreen;wt(t)&&(t.pressed=e.active),ti.call(e.player,e.target===e.player.media?e.target:e.player.elements.container,e.active?"enterfullscreen":"exitfullscreen",!0)}})),L(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?e.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(e.scrollPosition.x,e.scrollPosition.y),document.body.style.overflow=t?"hidden":"",$t(e.target,e.player.config.classNames.fullscreen.fallback,t),Pt.isIos){var i=document.head.querySelector('meta[name="viewport"]'),r="viewport-fit=cover";i||(i=document.createElement("meta")).setAttribute("name","viewport");var o=ft(i.content)&&i.content.includes(r);t?(e.cleanupViewport=!o,o||(i.content+=",".concat(r))):e.cleanupViewport&&(i.content=i.content.split(",").filter((function(t){return t.trim()!==r})).join(","))}e.onChange()})),L(this,"trapFocus",(function(t){if(!Pt.isIos&&e.active&&"Tab"===t.key&&9===t.keyCode){var i=document.activeElement,r=Ht.call(e.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),n=o(r,1)[0],a=r[r.length-1];i!==a||t.shiftKey?i===n&&t.shiftKey&&(a.focus(),t.preventDefault()):(n.focus(),t.preventDefault())}})),L(this,"update",(function(){e.player.debug.log(e.enabled?"".concat(e.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),$t(e.player.elements.container,e.player.config.classNames.fullscreen.enabled,e.enabled)})),L(this,"enter",(function(){e.enabled&&(Pt.isIos&&e.player.config.fullscreen.iosNative?e.player.isVimeo?e.player.embed.requestFullscreen():e.target.webkitEnterFullscreen():!t.native||e.forceFallback?e.toggleFallback(!0):e.prefix?Tt(e.prefix)||e.target["".concat(e.prefix,"Request").concat(e.property)]():e.target.requestFullscreen({navigationUI:"hide"}))})),L(this,"exit",(function(){if(e.enabled)if(Pt.isIos&&e.player.config.fullscreen.iosNative)e.target.webkitExitFullscreen(),ri(e.player.play());else if(!t.native||e.forceFallback)e.toggleFallback(!1);else if(e.prefix){if(!Tt(e.prefix)){var i="moz"===e.prefix?"Cancel":"Exit";document["".concat(e.prefix).concat(i).concat(e.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),L(this,"toggle",(function(){e.active?e.exit():e.enter()})),this.player=i,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===i.config.fullscreen.fallback,this.player.elements.fullscreen=i.config.fullscreen.container&&function(t,i){return(Element.prototype.closest||function(){var t=this;do{if(Vt.matches(t,i))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,i)}(this.player.elements.container,i.config.fullscreen.container),Kt.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){e.onChange()})),Kt.call(this.player,this.player.elements.container,"dblclick",(function(t){wt(e.player.elements.controls)&&e.player.elements.controls.contains(t.target)||e.player.listeners.proxy(t,e.toggle,"fullscreen")})),Kt.call(this,this.player.elements.container,"keydown",(function(t){return e.trapFocus(t)})),this.update()}return s(t,[{key:"usingNative",get:function(){return t.native&&!this.forceFallback}},{key:"enabled",get:function(){return(t.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!t.native||this.forceFallback)return qt(this.target,this.player.config.classNames.fullscreen.fallback);var i=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}},{key:"target",get:function(){return Pt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(bt(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(i){return!(!bt(document["".concat(i,"ExitFullscreen")])&&!bt(document["".concat(i,"CancelFullScreen")])||(t=i,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),t}();function Ri(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,r){var o=new Image,n=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=i?e:r)(o)};Object.assign(o,{onload:n,onerror:n,src:t})}))}var Ni={addStyleHook:function(){$t(this.elements.container,this.config.selectors.container.replace(".",""),!0),$t(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void Ni.toggleNativeControls.call(this,!0);wt(this.elements.controls)||(Ci.inject.call(this),this.listeners.controls()),Ni.toggleNativeControls.call(this),this.isHTML5&&Ii.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ci.updateVolume.call(this),Ci.timeUpdate.call(this),Ci.durationUpdate.call(this),Ni.checkPlaying.call(this),$t(this.elements.container,this.config.classNames.pip.supported,Yt.pip&&this.isHTML5&&this.isVideo),$t(this.elements.container,this.config.classNames.airplay.supported,Yt.airplay&&this.isHTML5),$t(this.elements.container,this.config.classNames.isIos,Pt.isIos),$t(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){ti.call(t,t.media,"ready")}),0),Ni.setTitle.call(this),this.poster&&Ni.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Ci.durationUpdate.call(this)},setTitle:function(){var t=wi("play",this.config);if(ft(this.config.title)&&!Tt(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(i){i.setAttribute("aria-label",t)})),this.isEmbed){var i=Ut.call(this,"iframe");if(!wt(i))return;var e=Tt(this.config.title)?"video":this.config.title,r=wi("frameTitle",this.config);i.setAttribute("title",r.replace("{title}",e))}},togglePoster:function(t){$t(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var i=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),ei.call(this).then((function(){return Ri(t)})).catch((function(e){throw t===i.poster&&Ni.togglePoster.call(i,!1),e})).then((function(){if(t!==i.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(i.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),Ni.togglePoster.call(i,!0),t})))},checkPlaying:function(t){var i=this;$t(this.elements.container,this.config.classNames.playing,this.playing),$t(this.elements.container,this.config.classNames.paused,this.paused),$t(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:i.playing}),t.setAttribute("aria-label",wi(i.playing?"pause":"play",i.config))})),kt(t)&&"timeupdate"===t.type||Ni.toggleControls.call(this)},checkLoading:function(t){var i=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){$t(i.elements.container,i.config.classNames.loading,i.loading),Ni.toggleControls.call(i)}),this.loading?250:0)},toggleControls:function(t){var i=this.elements.controls;if(i&&this.config.hideControls){var e=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||i.pressed||i.hover||e))}},migrateStyles:function(){var t=this;Object.values(n({},this.media.style)).filter((function(t){return!Tt(t)&&ft(t)&&t.startsWith("--plyr")})).forEach((function(i){t.elements.container.style.setProperty(i,t.media.style.getPropertyValue(i)),t.media.style.removeProperty(i)})),Tt(this.media.style)&&this.media.removeAttribute("style")}},Bi=function(){function t(i){var e=this;p(this,t),L(this,"firstTouch",(function(){var t=e.player,i=t.elements;t.touch=!0,$t(i.container,t.config.classNames.isTouch,!0)})),L(this,"setTabFocus",(function(t){var i=e.player,r=i.elements;clearTimeout(e.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(e.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-e.lastKeyDown<=20)&&(function(){var t=i.config.classNames.tabFocus;$t(Ht.call(i,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(e.focusTimer=setTimeout((function(){var t=document.activeElement;r.container.contains(t)&&$t(document.activeElement,i.config.classNames.tabFocus,!0)}),10))))})),L(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=e.player;i.config.keyboard.global&&Gt.call(i,window,"keydown keyup",e.handleKey,t,!1),Gt.call(i,document.body,"click",e.toggleMenu,t),Zt.call(i,document.body,"touchstart",e.firstTouch),Gt.call(i,document.body,"keydown focus blur focusout",e.setTabFocus,t,!1,!0)})),L(this,"container",(function(){var t=e.player,i=t.config,r=t.elements,n=t.timers;!i.keyboard.global&&i.keyboard.focused&&Kt.call(t,r.container,"keydown keyup",e.handleKey,!1),Kt.call(t,r.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(i){var e=r.controls;e&&"enterfullscreen"===i.type&&(e.pressed=!1,e.hover=!1);var o=0;["touchstart","touchmove","mousemove"].includes(i.type)&&(Ni.toggleControls.call(t,!0),o=t.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((function(){return Ni.toggleControls.call(t,!1)}),o)}));var a=function(){if(t.isVimeo&&!t.config.vimeo.premium){var i=r.wrapper,e=t.fullscreen.active,n=ui.call(t),a=o(n,2),s=a[0],l=a[1],p=ai("aspect-ratio: ".concat(s," / ").concat(l));if(e){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],d=o(u,2),c=d[1],h=d[0]/c>s/l;p?(i.style.width=h?"auto":"100%",i.style.height=h?"100%":"auto"):(i.style.maxWidth=h?c/l*s+"px":null,i.style.margin=h?"0 auto":null)}else p?(i.style.width=null,i.style.height=null):(i.style.maxWidth=null,i.style.margin=null)}},s=function(){clearTimeout(n.resized),n.resized=setTimeout(a,50)};Kt.call(t,r.container,"enterfullscreen exitfullscreen",(function(i){t.fullscreen.target===r.container&&(!t.isEmbed&&Tt(t.config.ratio)||(a(),("enterfullscreen"===i.type?Kt:Xt).call(t,window,"resize",s)))}))})),L(this,"media",(function(){var t=e.player,i=t.elements;if(Kt.call(t,t.media,"timeupdate seeking seeked",(function(i){return Ci.timeUpdate.call(t,i)})),Kt.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(i){return Ci.durationUpdate.call(t,i)})),Kt.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),Kt.call(t,t.media,"progress playing seeking seeked",(function(i){return Ci.updateProgress.call(t,i)})),Kt.call(t,t.media,"volumechange",(function(i){return Ci.updateVolume.call(t,i)})),Kt.call(t,t.media,"playing play pause ended emptied timeupdate",(function(i){return Ni.checkPlaying.call(t,i)})),Kt.call(t,t.media,"waiting canplay seeked playing",(function(i){return Ni.checkLoading.call(t,i)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var r=Ut.call(t,".".concat(t.config.classNames.video));if(!wt(r))return;Kt.call(t,i.container,"click",(function(o){([i.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(o,t.restart,"restart"),e.proxy(o,(function(){ri(t.play())}),"play")):e.proxy(o,(function(){ri(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&Kt.call(t,i.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),Kt.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),Kt.call(t,t.media,"ratechange",(function(){Ci.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),Kt.call(t,t.media,"qualitychange",(function(i){Ci.updateSetting.call(t,"quality",null,i.detail.quality)})),Kt.call(t,t.media,"ready qualitychange",(function(){Ci.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");Kt.call(t,t.media,o,(function(e){var r=e.detail,o=void 0===r?{}:r;"error"===e.type&&(o=t.media.error),ti.call(t,i.container,e.type,!0,o)}))})),L(this,"proxy",(function(t,i,r){var o=e.player,n=o.config.listeners[r],a=!0;bt(n)&&(a=n.call(o,t)),!1!==a&&bt(i)&&i.call(o,t)})),L(this,"bind",(function(t,i,r,o){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e.player,s=a.config.listeners[o],l=bt(s);Kt.call(a,t,i,(function(t){return e.proxy(t,r,o)}),n&&!l)})),L(this,"controls",(function(){var t=e.player,i=t.elements,r=Pt.isIE?"change":"input";if(i.buttons.play&&Array.from(i.buttons.play).forEach((function(i){e.bind(i,"click",(function(){ri(t.togglePlay())}),"play")})),e.bind(i.buttons.restart,"click",t.restart,"restart"),e.bind(i.buttons.rewind,"click",(function(){t.lastSeekTime=Date.now(),t.rewind()}),"rewind"),e.bind(i.buttons.fastForward,"click",(function(){t.lastSeekTime=Date.now(),t.forward()}),"fastForward"),e.bind(i.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),e.bind(i.buttons.captions,"click",(function(){return t.toggleCaptions()})),e.bind(i.buttons.download,"click",(function(){ti.call(t,t.media,"download")}),"download"),e.bind(i.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),e.bind(i.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),e.bind(i.buttons.airplay,"click",t.airplay,"airplay"),e.bind(i.buttons.settings,"click",(function(i){i.stopPropagation(),i.preventDefault(),Ci.toggleMenu.call(t,i)}),null,!1),e.bind(i.buttons.settings,"keyup",(function(i){var e=i.which;[13,32].includes(e)&&(13!==e?(i.preventDefault(),i.stopPropagation(),Ci.toggleMenu.call(t,i)):Ci.focusFirstMenuItem.call(t,null,!0))}),null,!1),e.bind(i.settings.menu,"keydown",(function(i){27===i.which&&Ci.toggleMenu.call(t,i)})),e.bind(i.inputs.seek,"mousedown mousemove",(function(t){var e=i.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/e.width*(t.pageX-e.left))})),e.bind(i.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(i){var e=i.currentTarget,r=i.keyCode?i.keyCode:i.which,o="play-on-seeked";if(!xt(i)||39===r||37===r){t.lastSeekTime=Date.now();var n=e.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(i.type);n&&a?(e.removeAttribute(o),ri(t.play())):!a&&t.playing&&(e.setAttribute(o,""),t.pause())}})),Pt.isIos){var n=Ht.call(t,'input[type="range"]');Array.from(n).forEach((function(t){return e.bind(t,r,(function(t){return Ct(t.target)}))}))}e.bind(i.inputs.seek,r,(function(i){var e=i.currentTarget,r=e.getAttribute("seek-value");Tt(r)&&(r=e.value),e.removeAttribute("seek-value"),t.currentTime=r/e.max*t.duration}),"seek"),e.bind(i.progress,"mouseenter mouseleave mousemove",(function(i){return Ci.updateSeekTooltip.call(t,i)})),e.bind(i.progress,"mousemove touchmove",(function(i){var e=t.previewThumbnails;e&&e.loaded&&e.startMove(i)})),e.bind(i.progress,"mouseleave touchend click",(function(){var i=t.previewThumbnails;i&&i.loaded&&i.endMove(!1,!0)})),e.bind(i.progress,"mousedown touchstart",(function(i){var e=t.previewThumbnails;e&&e.loaded&&e.startScrubbing(i)})),e.bind(i.progress,"mouseup touchend",(function(i){var e=t.previewThumbnails;e&&e.loaded&&e.endScrubbing(i)})),Pt.isWebkit&&Array.from(Ht.call(t,'input[type="range"]')).forEach((function(i){e.bind(i,"input",(function(i){return Ci.updateRangeFill.call(t,i.target)}))})),t.config.toggleInvert&&!wt(i.display.duration)&&e.bind(i.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Ci.timeUpdate.call(t))})),e.bind(i.inputs.volume,r,(function(i){t.volume=i.target.value}),"volume"),e.bind(i.controls,"mouseenter mouseleave",(function(e){i.controls.hover=!t.touch&&"mouseenter"===e.type})),i.fullscreen&&Array.from(i.fullscreen.children).filter((function(t){return!t.contains(i.container)})).forEach((function(r){e.bind(r,"mouseenter mouseleave",(function(e){i.controls&&(i.controls.hover=!t.touch&&"mouseenter"===e.type)}))})),e.bind(i.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){i.controls.pressed=["mousedown","touchstart"].includes(t.type)})),e.bind(i.controls,"focusin",(function(){var r=t.config,o=t.timers;$t(i.controls,r.classNames.noTransition,!0),Ni.toggleControls.call(t,!0),setTimeout((function(){$t(i.controls,r.classNames.noTransition,!1)}),0);var n=e.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return Ni.toggleControls.call(t,!1)}),n)})),e.bind(i.inputs.volume,"wheel",(function(i){var e=i.webkitDirectionInvertedFromDevice,r=[i.deltaX,-i.deltaY].map((function(t){return e?-t:t})),n=o(r,2),a=n[0],s=n[1],l=Math.sign(Math.abs(a)>Math.abs(s)?a:s);t.increaseVolume(l/50);var p=t.media.volume;(1===l&&p<1||-1===l&&p>0)&&i.preventDefault()}),"volume",!1)})),this.player=i,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return s(t,[{key:"handleKey",value:function(t){var i=this.player,e=i.elements,r=t.keyCode?t.keyCode:t.which,o="keydown"===t.type,n=o&&r===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&yt(r))if(o){var a=document.activeElement;if(wt(a)){if(a!==e.inputs.seek&&Vt(a,i.config.selectors.editable))return;if(32===t.which&&Vt(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(r)&&(t.preventDefault(),t.stopPropagation()),r){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:n||(i.currentTime=i.duration/10*(r-48));break;case 32:case 75:n||ri(i.togglePlay());break;case 38:i.increaseVolume(.1);break;case 40:i.decreaseVolume(.1);break;case 77:n||(i.muted=!i.muted);break;case 39:i.forward();break;case 37:i.rewind();break;case 70:i.fullscreen.toggle();break;case 67:n||i.toggleCaptions();break;case 76:i.loop=!i.loop}27===r&&!i.fullscreen.usingNative&&i.fullscreen.active&&i.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Ci.toggleMenu.call(this.player,t)}}]),t}(),Di=function(t,i){return function(t){t.exports=function(){var t=function(){},i={},e={},r={};function o(t,i){if(t){var o=r[t];if(e[t]=i,o)for(;o.length;)o[0](t,i),o.splice(0,1)}}function n(i,e){i.call&&(i={success:i}),e.length?(i.error||t)(e):(i.success||t)(i)}function a(i,e,r,o){var n,s,l=document,p=r.async,u=(r.numRetries||0)+1,d=r.before||t,c=i.replace(/[\?|#].*$/,""),h=i.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(c)?((s=l.createElement("link")).rel="stylesheet",s.href=h,(n="hideFocus"in s)&&s.relList&&(n=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(c)?(s=l.createElement("img")).src=h:((s=l.createElement("script")).src=i,s.async=void 0===p||p),s.onload=s.onerror=s.onbeforeload=function(t){var l=t.type[0];if(n)try{s.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((o+=1)<u)return a(i,e,r,o)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";e(i,l,t.defaultPrevented)},!1!==d(i,s)&&l.head.appendChild(s)}function s(t,i,e){var r,o,n=(t=t.push?t:[t]).length,s=n,l=[];for(r=function(t,e,r){if("e"==e&&l.push(t),"b"==e){if(!r)return;l.push(t)}--n||i(l)},o=0;o<s;o++)a(t[o],r,e)}function l(t,e,r){var a,l;if(e&&e.trim&&(a=e),l=(a?r:e)||{},a){if(a in i)throw"LoadJS";i[a]=!0}function p(i,e){s(t,(function(t){n(l,t),i&&n({success:i,error:e},t),o(a,t)}),l)}if(l.returnPromise)return new Promise(p);p()}return l.ready=function(t,i){return function(t,i){var o,n,a,s=[],l=(t=t.push?t:[t]).length,p=l;for(o=function(t,e){e.length&&s.push(t),--p||i(s)};l--;)(a=e[n=t[l]])?o(n,a):(r[n]=r[n]||[]).push(o)}(t,(function(t){n(i,t)})),l},l.done=function(t){o(t,[])},l.reset=function(){i={},e={},r={}},l.isDefined=function(t){return t in i},l}()}(i={exports:{}}),i.exports}();function $i(t){return new Promise((function(i,e){Di(t,{success:i,error:e})}))}function qi(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ti.call(this,this.media,t?"play":"pause"))}var Vi={setup:function(){var t=this;$t(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,di.call(t),vt(window.Vimeo)?Vi.ready.call(t):$i(t.config.urls.vimeo.sdk).then((function(){Vi.ready.call(t)})).catch((function(i){t.debug.warn("Vimeo SDK (player.js) failed to load",i)}))},ready:function(){var t=this,i=this,e=i.config.vimeo,r=e.premium,a=e.referrerPolicy,s=d(e,F),l=i.media.getAttribute("src"),p="";Tt(l)?(l=i.media.getAttribute(i.config.attributes.embed.id),p=i.media.getAttribute(i.config.attributes.embed.hash)):p=function(t){var i=t.match(c(/^.*(?:vimeo.com\/|video\/)(?:[0-9]+)(?:\?.*&*h=|\/)+([,0-9a-f]+)/,{hash:1}));return i?i.groups.hash:null}(l);var u=p?{h:p}:{};r&&Object.assign(s,{controls:!1,sidedock:!1});var h=Oi(n(n({loop:i.config.loop.active,autoplay:i.autoplay,muted:i.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},u),s)),v=function(t){return Tt(t)?null:yt(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(l),y=Et("iframe"),f=yi(i.config.urls.vimeo.iframe,v,h);if(y.setAttribute("src",f),y.setAttribute("allowfullscreen",""),y.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Tt(a)||y.setAttribute("referrerPolicy",a),r||!e.customControls)y.setAttribute("data-poster",i.poster),i.media=Nt(y,i.media);else{var g=Et("div",{class:i.config.classNames.embedContainer,"data-poster":i.poster});g.appendChild(y),i.media=Nt(g,i.media)}e.customControls||xi(yi(i.config.urls.vimeo.api,f)).then((function(t){!Tt(t)&&t.thumbnail_url&&Ni.setPoster.call(i,t.thumbnail_url).catch((function(){}))})),i.embed=new window.Vimeo.Player(y,{autopause:i.config.autopause,muted:i.muted}),i.media.paused=!0,i.media.currentTime=0,i.supported.ui&&i.embed.disableTextTrack(),i.media.play=function(){return qi.call(i,!0),i.embed.play()},i.media.pause=function(){return qi.call(i,!1),i.embed.pause()},i.media.stop=function(){i.pause(),i.currentTime=0};var b=i.media.currentTime;Object.defineProperty(i.media,"currentTime",{get:function(){return b},set:function(t){var e=i.embed,r=i.media,o=i.volume,n=i.paused&&!e.hasPlayed;r.seeking=!0,ti.call(i,r,"seeking"),Promise.resolve(n&&e.setVolume(0)).then((function(){return e.setCurrentTime(t)})).then((function(){return n&&e.pause()})).then((function(){return n&&e.setVolume(o)})).catch((function(){}))}});var m=i.config.speed.selected;Object.defineProperty(i.media,"playbackRate",{get:function(){return m},set:function(t){i.embed.setPlaybackRate(t).then((function(){m=t,ti.call(i,i.media,"ratechange")})).catch((function(){i.options.speed=[1]}))}});var _=i.config.volume;Object.defineProperty(i.media,"volume",{get:function(){return _},set:function(t){i.embed.setVolume(t).then((function(){_=t,ti.call(i,i.media,"volumechange")}))}});var w=i.config.muted;Object.defineProperty(i.media,"muted",{get:function(){return w},set:function(t){var e=!!gt(t)&&t;i.embed.setVolume(e?0:i.config.volume).then((function(){w=e,ti.call(i,i.media,"volumechange")}))}});var k,x=i.config.loop;Object.defineProperty(i.media,"loop",{get:function(){return x},set:function(t){var e=gt(t)?t:i.config.loop.active;i.embed.setLoop(e).then((function(){x=e}))}}),i.embed.getVideoUrl().then((function(t){k=t,Ci.setDownloadUrl.call(i)})).catch((function(i){t.debug.warn(i)})),Object.defineProperty(i.media,"currentSrc",{get:function(){return k}}),Object.defineProperty(i.media,"ended",{get:function(){return i.currentTime===i.duration}}),Promise.all([i.embed.getVideoWidth(),i.embed.getVideoHeight()]).then((function(e){var r=o(e,2);i.embed.ratio=ci(r[0],r[1]),di.call(t)})),i.embed.setAutopause(i.config.autopause).then((function(t){i.config.autopause=t})),i.embed.getVideoTitle().then((function(e){i.config.title=e,Ni.setTitle.call(t)})),i.embed.getCurrentTime().then((function(t){b=t,ti.call(i,i.media,"timeupdate")})),i.embed.getDuration().then((function(t){i.media.duration=t,ti.call(i,i.media,"durationchange")})),i.embed.getTextTracks().then((function(t){i.media.textTracks=t,Ii.setup.call(i)})),i.embed.on("cuechange",(function(t){var e=t.cues,r=(void 0===e?[]:e).map((function(t){return function(t){var i=document.createDocumentFragment(),e=document.createElement("div");return i.appendChild(e),e.innerHTML=t,i.firstChild.innerText}(t.text)}));Ii.updateCues.call(i,r)})),i.embed.on("loaded",(function(){i.embed.getPaused().then((function(t){qi.call(i,!t),t||ti.call(i,i.media,"playing")})),wt(i.embed.element)&&i.supported.ui&&i.embed.element.setAttribute("tabindex",-1)})),i.embed.on("bufferstart",(function(){ti.call(i,i.media,"waiting")})),i.embed.on("bufferend",(function(){ti.call(i,i.media,"playing")})),i.embed.on("play",(function(){qi.call(i,!0),ti.call(i,i.media,"playing")})),i.embed.on("pause",(function(){qi.call(i,!1)})),i.embed.on("timeupdate",(function(t){i.media.seeking=!1,b=t.seconds,ti.call(i,i.media,"timeupdate")})),i.embed.on("progress",(function(t){i.media.buffered=t.percent,ti.call(i,i.media,"progress"),1===parseInt(t.percent,10)&&ti.call(i,i.media,"canplaythrough"),i.embed.getDuration().then((function(t){t!==i.media.duration&&(i.media.duration=t,ti.call(i,i.media,"durationchange"))}))})),i.embed.on("seeked",(function(){i.media.seeking=!1,ti.call(i,i.media,"seeked")})),i.embed.on("ended",(function(){i.media.paused=!0,ti.call(i,i.media,"ended")})),i.embed.on("error",(function(t){i.media.error=t,ti.call(i,i.media,"error")})),e.customControls&&setTimeout((function(){return Ni.build.call(i)}),0)}};function Hi(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ti.call(this,this.media,t?"play":"pause"))}function Ui(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Qi,Wi,Yi,Ji,Gi,Ki,Xi={setup:function(){var t=this;if($t(this.elements.wrapper,this.config.classNames.embed,!0),vt(window.YT)&&bt(window.YT.Player))Xi.ready.call(this);else{var i=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){bt(i)&&i(),Xi.ready.call(t)},$i(this.config.urls.youtube.sdk).catch((function(i){t.debug.warn("YouTube API failed to load",i)}))}},getTitle:function(t){var i=this;xi(yi(this.config.urls.youtube.api,t)).then((function(t){if(vt(t)){var e=t.height,r=t.width;i.config.title=t.title,Ni.setTitle.call(i),i.embed.ratio=ci(r,e)}di.call(i)})).catch((function(){di.call(i)}))},ready:function(){var t=this,i=t.config.youtube,e=t.media&&t.media.getAttribute("id");if(Tt(e)||!e.startsWith("youtube-")){var r=t.media.getAttribute("src");Tt(r)&&(r=t.media.getAttribute(this.config.attributes.embed.id));var o=function(t){return Tt(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(r),n=Et("div",{id:vi(t.provider),"data-poster":i.customControls?t.poster:void 0});if(t.media=Nt(n,t.media),i.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};Ri(a("maxres"),121).catch((function(){return Ri(a("sd"),121)})).catch((function(){return Ri(a("hq"))})).then((function(i){return Ni.setPoster.call(t,i.src)})).then((function(i){i.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:Ui(i),playerVars:It({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},i),events:{onError:function(i){if(!t.media.error){var e=i.data;t.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},ti.call(t,t.media,"error")}},onPlaybackRateChange:function(i){t.media.playbackRate=i.target.getPlaybackRate(),ti.call(t,t.media,"ratechange")},onReady:function(e){if(!bt(t.media.play)){var r=e.target;Xi.getTitle.call(t,o),t.media.play=function(){Hi.call(t,!0),r.playVideo()},t.media.pause=function(){Hi.call(t,!1),r.pauseVideo()},t.media.stop=function(){r.stopVideo()},t.media.duration=r.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(r.getCurrentTime())},set:function(i){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,ti.call(t,t.media,"seeking"),r.seekTo(i)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return r.getPlaybackRate()},set:function(t){r.setPlaybackRate(t)}});var n=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return n},set:function(i){r.setVolume(100*(n=i)),ti.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(i){var e=gt(i)?i:a;a=e,r[e?"mute":"unMute"](),r.setVolume(100*n),ti.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return r.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var s=r.getAvailablePlaybackRates();t.options.speed=s.filter((function(i){return t.config.speed.options.includes(i)})),t.supported.ui&&i.customControls&&t.media.setAttribute("tabindex",-1),ti.call(t,t.media,"timeupdate"),ti.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=r.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&ti.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),ti.call(t,t.media,"canplaythrough"))}),200),i.customControls&&setTimeout((function(){return Ni.build.call(t)}),50)}},onStateChange:function(e){var r=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,ti.call(t,t.media,"seeked")),e.data){case-1:ti.call(t,t.media,"timeupdate"),t.media.buffered=r.getVideoLoadedFraction(),ti.call(t,t.media,"progress");break;case 0:Hi.call(t,!1),t.media.loop?(r.stopVideo(),r.playVideo()):ti.call(t,t.media,"ended");break;case 1:i.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(Hi.call(t,!0),ti.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){ti.call(t,t.media,"timeupdate")}),50),t.media.duration!==r.getDuration()&&(t.media.duration=r.getDuration(),ti.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),Hi.call(t,!1);break;case 3:ti.call(t,t.media,"waiting")}ti.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}}},Zi={setup:function(){this.media?($t(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),$t(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&$t(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Et("div",{class:this.config.classNames.video}),At(this.media,this.elements.wrapper),this.elements.poster=Et("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?hi.setup.call(this):this.isYouTube?Xi.setup.call(this):this.isVimeo&&Vi.setup.call(this)):this.debug.warn("No media element found!")}},te=function(){function t(i){var e=this;p(this,t),L(this,"load",(function(){e.enabled&&(vt(window.google)&&vt(window.google.ima)?e.ready():$i(e.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))})),L(this,"ready",(function(){var t;e.enabled||((t=e).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),e.startSafetyTimer(12e3,"ready()"),e.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),e.listeners(),e.setupIMA()})),L(this,"setupIMA",(function(){e.elements.container=Et("div",{class:e.player.config.classNames.ads}),e.player.elements.container.appendChild(e.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(e.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(e.player.config.playsinline),e.elements.displayContainer=new google.ima.AdDisplayContainer(e.elements.container,e.player.media),e.loader=new google.ima.AdsLoader(e.elements.displayContainer),e.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),e.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),e.requestAds()})),L(this,"requestAds",(function(){var t=e.player.elements.container;try{var i=new google.ima.AdsRequest;i.adTagUrl=e.tagUrl,i.linearAdSlotWidth=t.offsetWidth,i.linearAdSlotHeight=t.offsetHeight,i.nonLinearAdSlotWidth=t.offsetWidth,i.nonLinearAdSlotHeight=t.offsetHeight,i.forceNonLinearFullSlot=!1,i.setAdWillPlayMuted(!e.player.muted),e.loader.requestAds(i)}catch(t){e.onAdError(t)}})),L(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(e.countdownTimer),void e.elements.container.removeAttribute("data-badge-text");e.countdownTimer=setInterval((function(){var t=Si(Math.max(e.manager.getRemainingTime(),0)),i="".concat(wi("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",i)}),100)})),L(this,"onAdsManagerLoaded",(function(t){if(e.enabled){var i=new google.ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.enablePreloading=!0,e.manager=t.getAdsManager(e.player,i),e.cuePoints=e.manager.getCuePoints(),e.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),e.trigger("loaded")}})),L(this,"addCuePoints",(function(){Tt(e.cuePoints)||e.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var i=e.player.elements.progress;if(wt(i)){var r=100/e.player.duration*t,o=Et("span",{class:e.player.config.classNames.cues});o.style.left="".concat(r.toString(),"%"),i.appendChild(o)}}}))})),L(this,"onAdEvent",(function(t){var i=e.player.elements.container,r=t.getAd(),o=t.getAdData();switch(function(t){ti.call(e.player,e.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:e.trigger("loaded"),e.pollCountdown(!0),r.isLinear()||(r.width=i.offsetWidth,r.height=i.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:e.manager.setVolume(e.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:e.player.ended?e.loadAds():e.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e.pollCountdown(),e.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&e.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}})),L(this,"onAdError",(function(t){e.cancel(),e.player.debug.warn("Ads error",t)})),L(this,"listeners",(function(){var t,i=e.player.elements.container;e.player.on("canplay",(function(){e.addCuePoints()})),e.player.on("ended",(function(){e.loader.contentComplete()})),e.player.on("timeupdate",(function(){t=e.player.currentTime})),e.player.on("seeked",(function(){var i=e.player.currentTime;Tt(e.cuePoints)||e.cuePoints.forEach((function(r,o){t<r&&r<i&&(e.manager.discardAdBreak(),e.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){e.manager&&e.manager.resize(i.offsetWidth,i.offsetHeight,google.ima.ViewMode.NORMAL)}))})),L(this,"play",(function(){var t=e.player.elements.container;e.managerPromise||e.resumeContent(),e.managerPromise.then((function(){e.manager.setVolume(e.player.volume),e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}})).catch((function(){}))})),L(this,"resumeContent",(function(){e.elements.container.style.zIndex="",e.playing=!1,ri(e.player.media.play())})),L(this,"pauseContent",(function(){e.elements.container.style.zIndex=3,e.playing=!0,e.player.media.pause()})),L(this,"cancel",(function(){e.initialized&&e.resumeContent(),e.trigger("error"),e.loadAds()})),L(this,"loadAds",(function(){e.managerPromise.then((function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise((function(t){e.on("loaded",t),e.player.debug.log(e.manager)})),e.initialized=!1,e.requestAds()})).catch((function(){}))})),L(this,"trigger",(function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];var n=e.events[t];mt(n)&&n.forEach((function(t){bt(t)&&t.apply(e,r)}))})),L(this,"on",(function(t,i){return mt(e.events[t])||(e.events[t]=[]),e.events[t].push(i),e})),L(this,"startSafetyTimer",(function(t,i){e.player.debug.log("Safety timer invoked from: ".concat(i)),e.safetyTimer=setTimeout((function(){e.cancel(),e.clearSafetyTimer("startSafetyTimer()")}),t)})),L(this,"clearSafetyTimer",(function(t){ht(e.safetyTimer)||(e.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(e.safetyTimer),e.safetyTimer=null)})),this.player=i,this.config=i.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(t,i){e.on("loaded",t),e.on("error",i)})),this.load()}return s(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!Tt(t.publisherId)||jt(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return jt(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Oi({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId}))}}]),t}(),ie=function(t){var i=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var e={};t.split(/\r\n|\n|\r/).forEach((function(t){if(yt(e.startTime)){if(!Tt(t.trim())&&Tt(e.text)){var i,r,n,a=t.trim().split("#xywh=");i=o(a,1),e.text=i[0],a[1]&&(r=a[1].split(","),n=o(r,4),e.x=n[0],e.y=n[1],e.w=n[2],e.h=n[3])}}else{var s=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(e.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),e.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),e.text&&i.push(e)})),i},ee=function(t,i){var e={};return t>i.width/i.height?(e.width=i.width,e.height=1/t*i.width):(e.height=i.height,e.width=t*i.height),e},re=function(){function t(i){var e=this;p(this,t),L(this,"load",(function(){e.player.elements.display.seekTooltip&&(e.player.elements.display.seekTooltip.hidden=e.enabled),e.enabled&&e.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))})),L(this,"getThumbnails",(function(){return new Promise((function(t){var i=e.player.config.previewThumbnails.src;if(Tt(i))throw new Error("Missing previewThumbnails.src config attribute");var r=function(){e.thumbnails.sort((function(t,i){return t.height-i.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(bt(i))i((function(t){e.thumbnails=t,r()}));else{var o=(ft(i)?[i]:i).map((function(t){return e.getThumbnail(t)}));Promise.all(o).then(r)}}))})),L(this,"getThumbnail",(function(t){return new Promise((function(i){xi(t).then((function(r){var o={frames:ie(r),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var n=new Image;n.onload=function(){o.height=n.naturalHeight,o.width=n.naturalWidth,e.thumbnails.push(o),i()},n.src=o.urlPrefix+o.frames[0].text}))}))})),L(this,"startMove",(function(t){if(e.loaded&&kt(t)&&["touchmove","mousemove"].includes(t.type)&&e.player.media.duration){if("touchmove"===t.type)e.seekTime=e.player.media.duration*(e.player.elements.inputs.seek.value/100);else{var i=e.player.elements.progress.getBoundingClientRect();e.seekTime=e.player.media.duration*(100/i.width*(t.pageX-i.left)/100),e.seekTime<0&&(e.seekTime=0),e.seekTime>e.player.media.duration-1&&(e.seekTime=e.player.media.duration-1),e.mousePosX=t.pageX,e.elements.thumb.time.innerText=Si(e.seekTime)}e.showImageAtCurrentTime()}})),L(this,"endMove",(function(){e.toggleThumbContainer(!1,!0)})),L(this,"startScrubbing",(function(t){(ht(t.button)||!1===t.button||0===t.button)&&(e.mouseDown=!0,e.player.media.duration&&(e.toggleScrubbingContainer(!0),e.toggleThumbContainer(!1,!0),e.showImageAtCurrentTime()))})),L(this,"endScrubbing",(function(){e.mouseDown=!1,Math.ceil(e.lastTime)===Math.ceil(e.player.media.currentTime)?e.toggleScrubbingContainer(!1):Zt.call(e.player,e.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))})),L(this,"listeners",(function(){e.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),e.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),e.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))})),L(this,"render",(function(){e.elements.thumb.container=Et("div",{class:e.player.config.classNames.previewThumbnails.thumbContainer}),e.elements.thumb.imageContainer=Et("div",{class:e.player.config.classNames.previewThumbnails.imageContainer}),e.elements.thumb.container.appendChild(e.elements.thumb.imageContainer);var t=Et("div",{class:e.player.config.classNames.previewThumbnails.timeContainer});e.elements.thumb.time=Et("span",{},"00:00"),t.appendChild(e.elements.thumb.time),e.elements.thumb.container.appendChild(t),wt(e.player.elements.progress)&&e.player.elements.progress.appendChild(e.elements.thumb.container),e.elements.scrubbing.container=Et("div",{class:e.player.config.classNames.previewThumbnails.scrubbingContainer}),e.player.elements.wrapper.appendChild(e.elements.scrubbing.container)})),L(this,"destroy",(function(){e.elements.thumb.container&&e.elements.thumb.container.remove(),e.elements.scrubbing.container&&e.elements.scrubbing.container.remove()})),L(this,"showImageAtCurrentTime",(function(){e.mouseDown?e.setScrubbingContainerSize():e.setThumbContainerSizeAndPos();var t=e.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),i=t>=0,r=0;e.mouseDown||e.toggleThumbContainer(i),i&&(e.thumbnails.forEach((function(i,o){e.loadedImages.includes(i.frames[t].text)&&(r=o)})),t!==e.showingThumb&&(e.showingThumb=t,e.loadImage(r)))})),L(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=e.showingThumb,r=e.thumbnails[t],o=r.urlPrefix,n=r.frames[i],a=r.frames[i].text,s=o+a;if(e.currentImageElement&&e.currentImageElement.dataset.filename===a)e.showImage(e.currentImageElement,n,t,i,a,!1),e.currentImageElement.dataset.index=i,e.removeOldImages(e.currentImageElement);else{e.loadingImage&&e.usingSprites&&(e.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=i,l.dataset.filename=a,e.showingThumbFilename=a,e.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return e.showImage(l,n,t,i,a,!0)},e.loadingImage=l,e.removeOldImages(l)}})),L(this,"showImage",(function(t,i,r,o,n){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e.player.debug.log("Showing thumb: ".concat(n,". num: ").concat(o,". qual: ").concat(r,". newimg: ").concat(a)),e.setImageSizeAndOffset(t,i),a&&(e.currentImageContainer.appendChild(t),e.currentImageElement=t,e.loadedImages.includes(n)||e.loadedImages.push(n)),e.preloadNearby(o,!0).then(e.preloadNearby(o,!1)).then(e.getHigherQuality(r,t,i,n))})),L(this,"removeOldImages",(function(t){Array.from(e.currentImageContainer.children).forEach((function(i){if("img"===i.tagName.toLowerCase()){var r=e.usingSprites?500:1e3;if(i.dataset.index!==t.dataset.index&&!i.dataset.deleting){i.dataset.deleting=!0;var o=e.currentImageContainer;setTimeout((function(){o.removeChild(i),e.player.debug.log("Removing thumb: ".concat(i.dataset.filename))}),r)}}}))})),L(this,"preloadNearby",(function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(r){setTimeout((function(){var o=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===o){var n;n=i?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var a=!1;n.forEach((function(t){var i=t.text;if(i!==o&&!e.loadedImages.includes(i)){a=!0,e.player.debug.log("Preloading thumb filename: ".concat(i));var n=e.thumbnails[0].urlPrefix+i,s=new Image;s.src=n,s.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(i)),e.loadedImages.includes(i)||e.loadedImages.push(i),r()}}})),a||r()}}),300)}))})),L(this,"getHigherQuality",(function(t,i,r,o){if(t<e.thumbnails.length-1){var n=i.naturalHeight;e.usingSprites&&(n=r.h),n<e.thumbContainerHeight&&setTimeout((function(){e.showingThumbFilename===o&&(e.player.debug.log("Showing higher quality thumb for: ".concat(o)),e.loadImage(t+1))}),300)}})),L(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.player.config.classNames.previewThumbnails.thumbContainerShown;e.elements.thumb.container.classList.toggle(r,t),!t&&i&&(e.showingThumb=null,e.showingThumbFilename=null)})),L(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=e.player.config.classNames.previewThumbnails.scrubbingContainerShown;e.elements.scrubbing.container.classList.toggle(i,t),t||(e.showingThumb=null,e.showingThumbFilename=null)})),L(this,"determineContainerAutoSizing",(function(){(e.elements.thumb.imageContainer.clientHeight>20||e.elements.thumb.imageContainer.clientWidth>20)&&(e.sizeSpecifiedInCSS=!0)})),L(this,"setThumbContainerSizeAndPos",(function(){if(e.sizeSpecifiedInCSS){if(e.elements.thumb.imageContainer.clientHeight>20&&e.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(e.elements.thumb.imageContainer.clientHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(e.elements.thumb.imageContainer.clientHeight<20&&e.elements.thumb.imageContainer.clientWidth>20){var i=Math.floor(e.elements.thumb.imageContainer.clientWidth/e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(i,"px")}}else{var r=Math.floor(e.thumbContainerHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(e.thumbContainerHeight,"px"),e.elements.thumb.imageContainer.style.width="".concat(r,"px")}e.setThumbContainerPos()})),L(this,"setThumbContainerPos",(function(){var t=e.player.elements.progress.getBoundingClientRect(),i=e.player.elements.container.getBoundingClientRect(),r=e.elements.thumb.container,o=i.left-t.left+10,n=i.right-t.left-r.clientWidth-10,a=e.mousePosX-t.left-r.clientWidth/2;a<o&&(a=o),a>n&&(a=n),r.style.left="".concat(a,"px")})),L(this,"setScrubbingContainerSize",(function(){var t=ee(e.thumbAspectRatio,{width:e.player.media.clientWidth,height:e.player.media.clientHeight}),i=t.height;e.elements.scrubbing.container.style.width="".concat(t.width,"px"),e.elements.scrubbing.container.style.height="".concat(i,"px")})),L(this,"setImageSizeAndOffset",(function(t,i){if(e.usingSprites){var r=e.thumbContainerHeight/i.h;t.style.height=t.naturalHeight*r+"px",t.style.width=t.naturalWidth*r+"px",t.style.left="-".concat(i.x*r,"px"),t.style.top="-".concat(i.y*r,"px")}})),this.player=i,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return s(t,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?ee(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),t}(),oe={insertElements:function(t,i){var e=this;ft(i)?Ft(t,this.media,{src:i}):mt(i)&&i.forEach((function(i){Ft(t,e.media,i)}))},change:function(t){var i=this;Ot(t,"sources.length")?(hi.cancelRequests.call(this),this.destroy.call(this,(function(){i.options.quality=[],Lt(i.media),i.media=null,wt(i.elements.container)&&i.elements.container.removeAttribute("class");var e=t.sources,r=t.type,n=o(e,1)[0],a=n.provider,s=void 0===a?Mi.html5:a,l="html5"===s?r:"div",p="html5"===s?{}:{src:n.src};Object.assign(i,{provider:s,type:r,supported:Yt.check(r,s,i.config.playsinline),media:Et(l,p)}),i.elements.container.appendChild(i.media),gt(t.autoplay)&&(i.config.autoplay=t.autoplay),i.isHTML5&&(i.config.crossorigin&&i.media.setAttribute("crossorigin",""),i.config.autoplay&&i.media.setAttribute("autoplay",""),Tt(t.poster)||(i.poster=t.poster),i.config.loop.active&&i.media.setAttribute("loop",""),i.config.muted&&i.media.setAttribute("muted",""),i.config.playsinline&&i.media.setAttribute("playsinline","")),Ni.addStyleHook.call(i),i.isHTML5&&oe.insertElements.call(i,"source",e),i.config.title=t.title,Zi.setup.call(i),i.isHTML5&&Object.keys(t).includes("tracks")&&oe.insertElements.call(i,"track",t.tracks),(i.isHTML5||i.isEmbed&&!i.supported.ui)&&Ni.build.call(i),i.isHTML5&&i.media.load(),Tt(t.previewThumbnails)||(Object.assign(i.config.previewThumbnails,t.previewThumbnails),i.previewThumbnails&&i.previewThumbnails.loaded&&(i.previewThumbnails.destroy(),i.previewThumbnails=null),i.config.previewThumbnails.enabled&&(i.previewThumbnails=new re(i))),i.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},ne=function(){function t(i,e){var r=this;if(p(this,t),L(this,"play",(function(){return bt(r.media.play)?(r.ads&&r.ads.enabled&&r.ads.managerPromise.then((function(){return r.ads.play()})).catch((function(){return ri(r.media.play())})),r.media.play()):null})),L(this,"pause",(function(){return r.playing&&bt(r.media.pause)?r.media.pause():null})),L(this,"togglePlay",(function(t){return(gt(t)?t:!r.playing)?r.play():r.pause()})),L(this,"stop",(function(){r.isHTML5?(r.pause(),r.restart()):bt(r.media.stop)&&r.media.stop()})),L(this,"restart",(function(){r.currentTime=0})),L(this,"rewind",(function(t){r.currentTime-=yt(t)?t:r.config.seekTime})),L(this,"forward",(function(t){r.currentTime+=yt(t)?t:r.config.seekTime})),L(this,"increaseVolume",(function(t){r.volume=(r.media.muted?0:r.volume)+(yt(t)?t:0)})),L(this,"decreaseVolume",(function(t){r.increaseVolume(-t)})),L(this,"airplay",(function(){Yt.airplay&&r.media.webkitShowPlaybackTargetPicker()})),L(this,"toggleControls",(function(t){if(r.supported.ui&&!r.isAudio){var i=qt(r.elements.container,r.config.classNames.hideControls),e=$t(r.elements.container,r.config.classNames.hideControls,void 0===t?void 0:!t);return e&&mt(r.config.controls)&&r.config.controls.includes("settings")&&!Tt(r.config.settings)&&Ci.toggleMenu.call(r,!1),e!==i&&ti.call(r,r.media,e?"controlshidden":"controlsshown"),!e}return!1})),L(this,"on",(function(t,i){Kt.call(r,r.elements.container,t,i)})),L(this,"once",(function(t,i){Zt.call(r,r.elements.container,t,i)})),L(this,"off",(function(t,i){Xt(r.elements.container,t,i)})),L(this,"destroy",(function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r.ready){var e=function(){document.body.style.overflow="",r.embed=null,i?(Object.keys(r.elements).length&&(Lt(r.elements.buttons.play),Lt(r.elements.captions),Lt(r.elements.controls),Lt(r.elements.wrapper),r.elements.buttons.play=null,r.elements.captions=null,r.elements.controls=null,r.elements.wrapper=null),bt(t)&&t()):(ii.call(r),hi.cancelRequests.call(r),Nt(r.elements.original,r.elements.container),ti.call(r,r.elements.original,"destroyed",!0),bt(t)&&t.call(r.elements.original),r.ready=!1,setTimeout((function(){r.elements=null,r.media=null}),200))};r.stop(),clearTimeout(r.timers.loading),clearTimeout(r.timers.controls),clearTimeout(r.timers.resized),r.isHTML5?(Ni.toggleNativeControls.call(r,!0),e()):r.isYouTube?(clearInterval(r.timers.buffering),clearInterval(r.timers.playing),null!==r.embed&&bt(r.embed.destroy)&&r.embed.destroy(),e()):r.isVimeo&&(null!==r.embed&&r.embed.unload().then(e),setTimeout(e,200))}})),L(this,"supports",(function(t){return Yt.mime.call(r,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Yt.touch,this.media=i,ft(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||_t(this.media)||mt(this.media))&&(this.media=this.media[0]),this.config=It({},Ai,t.defaults,e||{},function(){try{return JSON.parse(r.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Fi(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Yt),!ht(this.media)&&wt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Yt.check().api){var o=this.media.cloneNode(!0);o.autoplay=!1,this.elements.original=o;var n=this.media.tagName.toLowerCase(),a=null,s=null;switch(n){case"div":if(a=this.media.querySelector("iframe"),wt(a)){if(s=Pi(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Mi.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Mi.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Tt(this.provider)||!Object.values(Mi).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=n,this.provider=Mi.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Yt.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Bi(this),this.storage=new ki(this),this.media.plyr=this,wt(this.elements.container)||(this.elements.container=Et("div",{tabindex:0}),At(this.media,this.elements.container)),Ni.migrateStyles.call(this),Ni.addStyleHook.call(this),Zi.setup.call(this),this.config.debug&&Kt.call(this,this.elements.container,this.config.events.join(" "),(function(t){r.debug.log("event: ".concat(t.type))})),this.fullscreen=new Li(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Ni.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new te(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return ri(r.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new re(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return s(t,[{key:"isHTML5",get:function(){return this.provider===Mi.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Mi.youtube}},{key:"isVimeo",get:function(){return this.provider===Mi.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(t){if(this.duration){var i=yt(t)&&t>0;this.media.currentTime=i?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var t=this.media.buffered;return yt(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),i=(this.media||{}).duration,e=yt(i)&&i!==1/0?i:0;return t||e}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var i=t;ft(i)&&(i=Number(i)),yt(i)||(i=this.storage.get("volume")),yt(i)||(i=this.config.volume),i>1&&(i=1),i<0&&(i=0),this.config.volume=i,this.media.volume=i,!Tt(t)&&this.muted&&i>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var i=t;gt(i)||(i=this.storage.get("muted")),gt(i)||(i=this.config.muted),this.config.muted=i,this.media.muted=i}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(t){var i=this,e=null;yt(t)&&(e=t),yt(e)||(e=this.storage.get("speed")),yt(e)||(e=this.config.speed.selected),e=function(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),t)}(e,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=e,setTimeout((function(){i.media&&(i.media.playbackRate=e)}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,u(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,u(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(t){var i=this.config.quality,e=this.options.quality;if(e.length){var r=[!Tt(t)&&Number(t),this.storage.get("quality"),i.selected,i.default].find(yt),o=!0;if(!e.includes(r)){var n=ni(e,r);this.debug.warn("Unsupported quality option: ".concat(r,", using ").concat(n," instead")),r=n,o=!1}i.selected=r,this.media.quality=r,o&&this.storage.set({quality:r})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(t){var i=gt(t)?t:this.config.loop.active;this.config.loop.active=i,this.media.loop=i}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){oe.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return jt(t)?t:this.source},set:function(t){jt(t)&&(this.config.urls.download=t,Ci.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(t){this.isVideo?Ni.setPoster.call(this,t,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var t=pi(ui.call(this));return mt(t)?t.join(":"):t},set:function(t){this.isVideo?ft(t)&&li(t)?(this.config.ratio=pi(t),di.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(t,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(t){var i=gt(t)?t:this.config.autoplay;this.config.autoplay=i}},{key:"toggleCaptions",value:function(t){Ii.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){Ii.set.call(this,t,!1),Ii.setup()}},{key:"language",get:function(){return(Ii.getCurrentTrack.call(this)||{}).language},set:function(t){Ii.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Yt.pip?Tt(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Yt.pip){var i=gt(t)?t:!this.pip;bt(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(i?"picture-in-picture":"inline"),bt(this.media.requestPictureInPicture)&&(!this.pip&&i?this.media.requestPictureInPicture():this.pip&&!i&&document.exitPictureInPicture())}}},{key:"setPreviewThumbnails",value:function(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new re(this))}}],[{key:"supported",value:function(t,i,e){return Yt.check(t,i,e)}},{key:"loadSprite",value:function(t,i){return zi(t,i)}},{key:"setup",value:function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;return ft(i)?r=Array.from(document.querySelectorAll(i)):_t(i)?r=Array.from(i):mt(i)&&(r=i.filter(wt)),Tt(r)?null:r.map((function(i){return new t(i,e)}))}}]),t}();function ae(t){t.on("timeupdate",(function(){return function(t){var i,e;null!=t&&null!==(i=t.config)&&void 0!==i&&null!==(e=i.mutedPreview)&&void 0!==e&&e.enabled||function(t){var i;0!==t.currentTime&&null!=t&&null!==(i=t.config)&&void 0!==i&&i.save_player_position&&localStorage.setItem("player-progress-".concat(se(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return le(t)})),t.on("loadeddata",(function(){return le(t)}))}function se(t){var i,e;return null==t||null===(i=t.config)||void 0===i||null===(e=i.blockAttributes)||void 0===e?void 0:e.id}function le(t){var i,e,r;if(null!=t&&null!==(i=t.config)&&void 0!==i&&i.save_player_position&&(null==t||null===(e=t.config)||void 0===e||null===(r=e.mutedPreview)||void 0===r||!r.enabled)){var o=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(se(t))))}(t);return t.hls&&o>=0&&t.hls.startLoad(o),t.duration&&(o=Math.min(o,t.duration)),!o||o<1?0:(t.currentTime=o,null!=t&&t.isVimeo&&setTimeout((function(){t.embed.setCurrentTime(o||0)}),0),o)}}ne.defaults=JSON.parse(JSON.stringify(Ai));var pe=(null===(Qi=window)||void 0===Qi||null===(Wi=Qi.prestoPlayer)||void 0===Wi||null===(Yi=Wi.i18n)||void 0===Yi?void 0:Yi.hide_chapters)||"Hide Chapters",ue=(null===(Ji=window)||void 0===Ji||null===(Gi=Ji.prestoPlayer)||void 0===Gi||null===(Ki=Gi.i18n)||void 0===Ki?void 0:Ki.show_chapters)||"Show Chapters";const de='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(pe,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(ue,"</span>\n</button>\n");var ce,he,ve;const ye='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(ce=window)||void 0===ce||null===(he=ce.prestoPlayer)||void 0===he||null===(ve=he.i18n)||void 0===ve?void 0:ve.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function fe(t){var i,e,r,o,n,a,s,p,d,c,h,v,y,f=0,g={},b=null,m=0;if("undefined"!=typeof jQuery)if(r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return t;var i={};return t.forEach((function(t){var e,r=t.time.split(":");r.length>1&&(e=60*parseInt(r[0]));var o=parseInt(r[1])+parseInt(e);i[o]=t})),i}((null===(i=o=t.detail.plyr)||void 0===i||null===(e=i.config)||void 0===e?void 0:e.chapters)||[]),"html5"!==o.provider||o.duration){if(r&&Object.keys(r).length){n=jQuery(o.elements.container).closest(".presto-player__wrapper").find(".plyr");var _=(y=jQuery(o.elements.controls)).find(".plyr__time");_=_.length?_:y.find(".plyr__progress__container"),(d=n.find('[data-plyr="chapters"]')).length||(d=jQuery(de).insertAfter(_)),(s=n.find(".presto-player-toc__wrapper")).length||(s=jQuery(ye).appendTo(n)),c=s.find("[data-player-toc-cover]"),p=s.find("[data-player-toc]"),a=n.find(".plyr__progress__container");var w,k=jQuery('<div class="presto-player__chapters"></div>').appendTo(a);h=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(k),w=0,p.find(".presto-player-toc__chapter").length||(Object.keys(r).forEach((function(t){w++;var i=jQuery(function(t){var i=t.name,e=void 0===i?"Untitled":i,r=t.order,o=void 0===r?1:r,n=t.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==n&&n?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(o,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(e,"\n </div>\n</div>")}({name:r[t].title,order:w})).appendTo(p);i.data("presto-player-timestamp",t),g[t]=i,i.on("click",(function(){o.currentTime=parseFloat(t),o.play(),j(!1)}))})),v=s.find("[data-chapter-item]")),z(),d.off("click"),d.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),b=window.setInterval((function(){m++,o.duration&&(z(),window.clearInterval(b)),m>50&&window.clearInterval(b)}),100),c.off("click"),c.on("click",(function(){return j(!1)})),p.off("mouseleave"),p.on("mouseleave",(function t(){if(o.playing){var i=setTimeout((function(){j(!1),p.off("mouseleave",t)}),2e3);p.on("mouseenter",(function(){clearTimeout(i)}))}}))}}else o.on("loadedmetadata",fe);function x(){f=o.currentTime;var t=Object.keys(r).filter((function(t){return t<=f})).map((function(t){return parseInt(t,10)})),i=Math.max.apply(Math,u(t));v&&v.removeClass("is-highlighted"),jQuery(g[i||0]).addClass("is-highlighted")}function z(){o.duration&&(Object.keys(r).forEach((function(t){if(parseInt(t)&&!h.find("[data-timestamp=".concat(t,"]")).length){var i,e,n,a,s=r[t],l=parseInt(t)/o.duration*100,p=jQuery((i={position:l,name:"".concat(s.title)},e=i.position,n=i.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===e?0:e,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(a,"</span>\n </div>"))).prependTo(h);p.attr("data-timestamp",t),p.data("timestamp",t),p.on("click",(function(){o.currentTime=parseInt(t),o.play()}))}})),s.find("[data-timeline-marker]"))}function j(t){void 0!==l(t)?s.toggleClass("is-showing",t):s.toggleClass("is-showing")}}var ge;function be(t){"undefined"!=typeof jQuery&&(ge=t,jQuery(ge.elements.container).closest(".presto-player__wrapper"),ge.on("ready",fe),ge.on("controlshidden",me),ge.on("controlsshown",_e))}function me(t){var i,e,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(i=t.detail)||void 0===i||null===(e=i.plyr)||void 0===e||null===(r=e.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function _e(t){var i,e,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(i=t.detail)||void 0===i||null===(e=i.plyr)||void 0===e||null===(r=e.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function we(t){var i,e;return n(n(n({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(i=t.config)&&void 0!==i&&i.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}function ke(t){var i,e;null!=t&&null!==(i=t.config)&&void 0!==i&&i.hasPlayed||(t.config.hasPlayed=!0,null===(e=window)||void 0===e||e.gtag("event","Play",we(t)))}function xe(t){var i;null===(i=window)||void 0===i||i.gtag("event","Pause",we(t))}function ze(t){var i,e;null!=t&&null!==(i=t.config)&&void 0!==i&&i.hasLoaded||(t.config.hasLoaded=!0,null===(e=window)||void 0===e||e.gtag("event","Player Load",we(t)))}var je,Te={25:!1,50:!1,75:!1,100:!1};function Se(t){if(t.currentTime){var i=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(Te).forEach((function(e){var r;!Te[e]&&i>=parseInt(e)&&(Te[e]=!0,null===(r=window)||void 0===r||r.gtag("event","".concat(e," Percent Played"),we(t)))}))}}var Ce="presto-player.analytics",Pe="",Oe=0;function Ie(t){var i,e;(je=t).config.analytics&&null!==(i=window)&&void 0!==i&&null!==(e=i.wp)&&void 0!==e&&e.hooks&&(wp.hooks.hasAction("presto.nonceRefreshed",Ce)||wp.hooks.addAction("presto.nonceRefreshed",Ce,(function(t){Pe=t})),wp.hooks.hasAction("presto.playerPlay",Ce)||wp.hooks.addAction("presto.playerPlay",Ce,Ae),wp.hooks.hasAction("presto.playerEnded",Ce)||wp.hooks.addAction("presto.playerEnded",Ce,Ae),wp.hooks.hasAction("presto.playerHidden",Ce)||wp.hooks.addAction("presto.playerHidden",Ce,Ae),wp.hooks.hasAction("presto.playerPause",Ce)||wp.hooks.addAction("presto.playerPause",Ce,Ae),wp.hooks.hasAction("presto.playerSeeked",Ce)||wp.hooks.addAction("presto.playerSeeked",Ce,Ae))}function Ae(t){isNaN(null==t?void 0:t.currentTime)||Me(function(t){var i,e;return t.currentTime>Oe&&(Oe=t.currentTime),t.currentTime>=t.duration&&(Oe=t.duration),n(n(n({video_current_time:parseInt(Oe),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(i=t.config)&&void 0!==i&&i.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}(t))}function Me(t){var i,e,r,o,n,a,s,l;if(Pe){var p,u,d=new FormData;d.append("action","presto_player_progress"),d.append("duration",null==t?void 0:t.video_current_time),d.append("video_id",null===(i=je)||void 0===i||null===(e=i.config)||void 0===e?void 0:e.id),d.append("nonce",Pe),null!==(r=window)&&void 0!==r&&null!==(o=r.prestoPlayer)&&void 0!==o&&o.debug_navigator?"undefined"!=typeof jQuery&&jQuery.ajax({type:"POST",url:null===(n=window)||void 0===n||null===(a=n.prestoPlayer)||void 0===a?void 0:a.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==t?void 0:t.video_current_time,video_id:null===(s=je)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:Pe}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,d)}}function Ee(t){var i,e;null!==(i=window)&&void 0!==i&&null!==(e=i.prestoPlayer)&&void 0!==e&&e.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",ke),wp.hooks.addAction("presto.playerPause","presto-player",xe),wp.hooks.addAction("presto.playerReady","presto-player",ze),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",Se))}(),Ie(t))}const Fe=function(t){t.on("ready",(function(){var i,e,r,o;null==t||null===(i=t.config)||void 0===i||!i.logo||null!=t&&null!==(e=t.config)&&void 0!==e&&e.logo_added||"undefined"!=typeof jQuery&&(t.isAudio||(jQuery('<img src="'.concat(null==t||null===(r=t.config)||void 0===r?void 0:r.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==t||null===(o=t.elements)||void 0===o?void 0:o.controls),t.config.logo_added=!0))}))};function Le(t){var i;null!=t&&null!==(i=t.config)&&void 0!==i&&i.poster&&(t.poster=t.config.poster)}const Re=function(t){var i,e;null!==(i=window)&&void 0!==i&&null!==(e=i.wp)&&void 0!==e&&e.hooks&&(t.on("ready",(function(){Ne("Ready",t)})),t.on("play",(function(){Ne("Play",t)})),t.on("playing",(function(){Ne("Playing",t)})),t.on("pause",(function(){Ne("Pause",t)})),t.on("ended",(function(){Ne("Ended",t)})),t.on("seeked",(function(){Ne("Seeked",t)})),t.on("timeupdate",(function(){Ne("TimeUpdate",t)})),t.on("enterfullscreen",(function(){Ne("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){Ne("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){Ne("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(i){var e;switch(null==i||null===(e=i.detail)||void 0===e?void 0:e.code){case 0:Ne("Ended",t);break;case 1:Ne("Play",t);break;case 2:Ne("Pause",t)}})))};function Ne(t,i){window.wp.hooks.doAction("presto.player".concat(t),i)}let Be,De=Date.now();const $e=t=>{var i,e;if(!t.automations)return;(null===(e=null===(i=null===window||void 0===window?void 0:window.wp)||void 0===i?void 0:i.hooks)||void 0===e?void 0:e.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{Be=t})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",o),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(t=>o(t,100)));let r={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1};function o(t,i=null){var e;Be&&(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.ajaxProgress)&&(i||(i=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(r).forEach((e=>{var r,o,n,a,s,l,p,u,d;const c=parseInt(e);if(!t.watched[c]&&i>=c){t.watched[c]=!0;let i=new FormData;if(i.append("action","presto_player_progress_percent"),i.append("id",null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.id),i.append("percent",c.toString()),i.append("visit_time",De.toString()),i.append("nonce",Be),(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug)&&console.log(`${c} percent watched.`),null===(n=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===n?void 0:n.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(u=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===u?void 0:u.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(d=null==t?void 0:t.config)||void 0===d?void 0:d.id,visit_time:De,percent:c,nonce:Be}});else{let e=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,i);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(e?console.log("Successfully queued progress:",{id:null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.id,percent:c,visit_time:De,nonce:Be}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:c,visit_time:De,nonce:Be}))}}})))}};let qe=!1,Ve=!1;function He(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const Ue=t=>{var i,e;(t.config.analytics||t.config.automations)&&(null===(e=null===(i=null===window||void 0===window?void 0:window.wp)||void 0===i?void 0:i.hooks)||void 0===e||e.addAction("presto.playerPlaying","presto-player",(()=>{null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(()=>{var t;qe||Ve||(Ve=!0,fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`).then(He).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),qe=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{Ve=!1})))})))},Qe=function(t){var i=window.navigator.userAgent;if(i.match(/iPad/i)||i.match(/iPhone/i)){var e=function(t,i){for(var e,r,o,n=null==t||null===(e=t.elements)||void 0===e||null===(r=e.container)||void 0===r||null===(o=r.getRootNode())||void 0===o?void 0:o.host;(null!=n?n.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==n.tagName&&"HTML"!==n.tagName;)i?n.classList.add("presto-player-fullscreen-open"):n.classList.remove("presto-player-fullscreen-open"),n=n.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var i;null!=t&&null!==(i=t.fullscreen)&&void 0!==i&&i.active&&e(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var i;null!=t&&null!==(i=t.fullscreen)&&void 0!==i&&i.active||e(t,!1)}))}},We=function(){var t=h(regeneratorRuntime.mark((function t(i){var e,r,o,n,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof jQuery){t.next=2;break}return t.abrupt("return");case 2:if("ResizeObserver"in window!=0){t.next=7;break}return t.next=5,import("./p-58f5339e.js");case 5:window.ResizeObserver=t.sent.ResizeObserver;case 7:if(l=new ResizeObserver((function(t){var i,e=v(t);try{for(e.s();!(i=e.n()).done;){var r=i.value,o=r.contentRect;jQuery(r.target).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(o.height-48,200),"px")})}}catch(t){e.e(t)}finally{e.f()}})),null!=i&&null!==(e=i.elements)&&void 0!==e&&null!==(r=e.container)&&void 0!==r&&null!==(o=r.getRootNode())&&void 0!==o&&o.firstChild){t.next=10;break}return t.abrupt("return");case 10:if(l.observe(null==i||null===(n=i.elements)||void 0===n||null===(a=n.container)||void 0===a||null===(s=a.getRootNode())||void 0===s?void 0:s.firstChild),i){t.next=13;break}return t.abrupt("return");case 13:i.on("playing",(function(){var t,e,r,o,n=null==i||null===(t=i.elements)||void 0===t||null===(e=t.container)||void 0===e?void 0:e.getRootNode().firstChild.getBoundingClientRect();jQuery(null==i||null===(r=i.elements)||void 0===r||null===(o=r.container)||void 0===o?void 0:o.getRootNode()).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(n.height-48,200),"px")})}));case 14:case"end":return t.stop()}}),t)})));return function(i){return t.apply(this,arguments)}}();function Ye(t){var i,e,r,o,a,s,l,p,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=n(n(n({},u),null!==(i=window)&&void 0!==i&&null!==(e=i.prestoPlayer)&&void 0!==e&&e.plugin_url?{iconUrl:"".concat(null===(r=window)||void 0===r||null===(o=r.prestoPlayer)||void 0===o?void 0:o.plugin_url,"img/sprite.svg")}:{}),{chapters:(null==u?void 0:u.chapters)||[],controls:(null==u?void 0:u.controls)||[],settings:Object.keys((null==u?void 0:u.settings)||{}).length?u.settings:{}}),c=new ne(t,d);return"undefined"!=typeof learndash_video_data&&import("./p-c98de32f.js").then((function(t){(0,t.default)(c)})),"undefined"!=typeof _tutorobject&&import("./p-0e1cd603.js").then((function(t){(0,t.default)(c)})),void 0!==window.llms&&!0===(null===(l=prestoPlayer)||void 0===l||null===(p=l.lifter)||void 0===p?void 0:p.isLesson)&&import("./p-68f17ca9.js").then((function(t){(0,t.default)(c)})),Re(c),Qe(c),We(c),Fe(c),Le(c),be(c),null!==(a=window)&&void 0!==a&&null!==(s=a.prestoPlayer)&&void 0!==s&&s.isAdmin||(Ue(c),$e(d),ae(c),Ee(c)),c}function Je(t){return"string"==typeof t&&t.includes(".m3u8")}let Ge=class{constructor(i){t(this,i),this.loaded=r(this,"loaded",7),this.currentMediaPlayer=r(this,"currentMediaPlayer",7),this.isAdmin=!1,this.previouslyPlaying=!1,this.ctaActive=!1,this.emailActive=!1,this.actionBarActive=!1,this.components={cta:null,email:null,overlays:null}}async play(t=!1){this.shouldLazyLoad=!1,t&&(this.mutedPreview=!1),this.player.play()}async goToAndPlay(t){this.player.play(),this.player.currentTime=t}handleScroll(t){t.detail.id!==this.player.id&&(this.mutedPreview||this.pause())}async restart(){return this.shouldLazyLoad=!1,this.player.restart()}async pause(){return this.player.pause()}async stop(){return this.player.stop()}async fullscreenToggle(t){return this.player.fullscreen.toggle(t)}async on(t,i){return this.player.on(t,i)}async once(t,i){return this.player.once(t,i)}async off(t,i){return this.player.off(t,i)}async handleCurrentTimeChange(t){this.player&&Number.isInteger(t)&&(this.player.duration&&(this.player.currentTime=Math.min(this.player.currentTime,this.player.duration)),this.shouldLazyLoad&&(this.shouldLazyLoad=!1,await new Promise((t=>{setTimeout((async()=>{await this.initialize(),t()}),50)}))),this.player.embed&&!this.player.playing?(this.player.currentTime=t,this.player.muted=!0,this.player.play(),this.player.once("timeupdate",(()=>{this.player.pause(),this.player.currentTime=t,this.player.muted=!1}))):this.player.currentTime=t)}handleStickyChange(){(function(t){for(var i=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)i.push(t=t.parentNode);return i})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:i,branding:e,src:r,analytics:o,automations:n,autoplay:a,blockAttributes:s={},provider:l="",provider_video_id:p="",youtube:u,type:d,isAdmin:c,i18n:h,storage:v={enabled:!c,key:`presto-player-${t.id}`}}){var y,f,g,b;const m=["settings"],_=[...["youtube","vimeo"].includes(l)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((i=>((null==t?void 0:t[i])||m.includes(i))&&!_.includes(i)));(null===(y=null==s?void 0:s.mutedPreview)||void 0===y?void 0:y.enabled)&&(v={enabled:!1});let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==s?void 0:s.id,title:(null==s?void 0:s.title)||"",blockAttributes:Object.assign(Object.assign({},s),{type:d}),src:r,ajaxProgress:!0,analytics:o,automations:n,mutedPreview:{enabled:null===(f=null==s?void 0:s.mutedPreview)||void 0===f?void 0:f.enabled},loop:{active:"loop"===(null==t?void 0:t.on_video_end)},chapters:i,controls:w,settings:["captions","quality","loop",...(null==t?void 0:t.speed)?["speed"]:[]],hideControls:null==t?void 0:t.auto_hide,captions:{active:null==t?void 0:t.captions_enabled,language:"auto",update:!1},logo:null==e?void 0:e.logo,logo_width:null==e?void 0:e.logo_width,hide_logo:null==t?void 0:t.hide_logo,lazy_load_youtube:null==t?void 0:t.lazy_load_youtube,save_player_position:!!(null==t?void 0:t.save_player_position),sticky_scroll:null==t?void 0:t.sticky_scroll,play_video_viewport:null==t?void 0:t.play_video_viewport,autoplay:!(!a||(null===(g=window.wp)||void 0===g?void 0:g.blocks))},l?{provider:l}:{}),p?{provider_video_id:p}:{}),(null==s?void 0:s.poster)?{poster:s.poster}:{}),{invertTime:!t.hasOwnProperty("invert_time")||(null==t?void 0:t.invert_time),storage:v,keyboard:{focused:!1,global:!1},resetOnEnd:!!(null==t?void 0:t.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==s?void 0:s.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==s?void 0:s.playsInline)},tooltips:{controls:!0,seek:!0},i18n:h});return(null===(b=null===window||void 0===window?void 0:window.wp)||void 0===b?void 0:b.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}getPlayerData(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}async createPlayer(){return await(t=this.getPlayerData(),i=t.config,e=t.selector,r=t.src,o=t.preload,r&&Je(r)?import("./p-17b8399c.js").then((function(t){return(0,t.default)({config:i,selector:e,src:r,preload:o})})):new Promise((function(t){return t(new Ye(e,n({},i)))})));var t,i,e,r,o}handlePlayerElementChange(){var t;(({src:t,el:i,preload:e,currentTime:r})=>{if(!i.getAttribute("hls_loaded")&&["metadata","none"].includes(e)&&Je(t)){if(r>0)return i.style.height=null,i.style.paddingBottom=null,void i.setAttribute("hls_loaded","1");i.style.height="0px",i.style.paddingBottom="56.25%"}})({src:this.src,el:this.playerEl,preload:this.preload,currentTime:null===(t=null==this?void 0:this.player)||void 0===t?void 0:t.currentTime})}handleMutedPreview(t,i){var e,r,o,n,a,s,l;this.player&&!this.isAdmin&&(!t&&i&&this.player.once("timeupdate",(()=>{var t,i;this.player.loop="loop"===(null===(t=this.preset)||void 0===t?void 0:t.on_video_end),this.player.toggleCaptions(null===(i=null==this?void 0:this.preset)||void 0===i?void 0:i.captions_enabled)})),(null===(o=null===(r=null===(e=this.originalConfig)||void 0===e?void 0:e.blockAttributes)||void 0===r?void 0:r.mutedPreview)||void 0===o?void 0:o.enabled)&&(({player:t,mutedPreview:i,captions:e,progress:r,savePosition:o,onPlay:n})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=i,t.muted=i,t.loop=i,t.config.ajaxProgress=!i&&r,t.config.save_player_position=!i&&o;try{t.toggleCaptions(!!i&&!!e)}catch(t){}return setTimeout((()=>{le(t)||t.restart(),setTimeout((()=>{t.muted=i,n()}),50)}),0),t}console.log("ios device, do not do muted autoplay")})({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(a=null===(n=this.blockAttributes)||void 0===n?void 0:n.mutedPreview)||void 0===a?void 0:a.captions),progress:null===(s=this.originalConfig)||void 0===s?void 0:s.ajaxProgress,savePosition:null===(l=this.originalConfig)||void 0===l?void 0:l.save_player_position,onPlay:()=>this.play()}))}onPlayerReady(){var t,i,e;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(i=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===i?void 0:i.enabled,this.renderDynamicOverlays(),this.renderVideoCTA(),this.renderEmailOverlay(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Je(this.src)&&this.player.once("playing",(()=>{this.playerEl.style.height=null,this.playerEl.style.paddingBottom=null,this.playerEl.setAttribute("hls_loaded","1")})),this.player.on("playing",(()=>this.playClass="presto-player--playing")),this.player.on("pause",(()=>this.playClass="presto-player--paused")),this.player.on("ended",(()=>this.playClass="presto-player--ended")),this.player.on("playing",(t=>this.currentMediaPlayer.emit(t.detail.plyr))),"go-to-start"===(null===(e=this.preset)||void 0===e?void 0:e.on_video_end)&&this.player.on("ended",(()=>{this.restart(),"youtube"===this.provider&&this.stop()}))}handlePlayerEvents(t){t.on("ready",(t=>{this.player=t.detail.plyr,this.onPlayerReady()}))}handleLazyLoadChange(){"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((()=>{this.onReload("play")}),50)}shouldLazyLoadVideo(){var t,i,e;return"youtube"===this.provider&&!this.autoplay&&!(null===(i=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===i?void 0:i.enabled)&&!!(null===(e=this.preset)||void 0===e?void 0:e.lazy_load_youtube)}componentWillLoad(){var t,i,e;const r=null===(t=this.el.children)||void 0===t?void 0:t[0];r&&r.classList&&r.classList.contains("presto-iframe-fallback-container")&&r.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.i18n)||(null===(e=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===e?void 0:e.i18n),this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}async componentDidLoad(){setTimeout((()=>{this.initialize(),this.loaded.emit(!0)}),0)}async initialize(){const t=await this.createPlayer();return this.handlePlayerEvents(t),this.syncVideoHeight(),((t,i)=>{if(!i)return;const e=document.createElement("style");t.shadowRoot.append(e),e.appendChild(document.createTextNode(i))})(this.el,this.css),t}async onReload(t){const i=await this.initialize();"play"==t&&i.on("ready",(()=>{this.play(),i.muted=!0,i.muted=!1,i.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-58f5339e.js");window.ResizeObserver=t.ResizeObserver}new ResizeObserver((()=>{this.isSticky||(this.videoHeight=this.el.getBoundingClientRect().height)})).observe(this.el)}handleRestartVideo(){this.player.once("timeupdate",(()=>{setTimeout((()=>this.play()),500)})),this.player.restart()}handlePlayVideo(){this.play()}handlePauseVideo(t){this.pause(),t.detail&&function(t){var i,e,r,o,n;if("unknown"!==_()&&!(null===(e=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.blockAttributes)||void 0===e?void 0:e.playsinline)){"function"==typeof(null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.webkitExitFullScreen)&&(null==t||t.media.webkitExitFullScreen()),"function"==typeof(null===(o=null==t?void 0:t.embed)||void 0===o?void 0:o.exitFullscreen)&&(null===(n=null==t?void 0:t.embed)||void 0===n||n.exitFullscreen());const i=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=i}))}}(this.player)}playVideoOnlyInViewport(){var t;!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}trackIntersection(){this.observer=new IntersectionObserver((t=>{this.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}handleVisibilityIntersection(t){t&&(this.handleStickyScroll(t),this.handleVisibilityPlayChange(t))}handleStickyScroll(t){var i,e;if(!(null===(i=this.preset)||void 0===i?void 0:i.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.playing))return void(this.isSticky=!1);let r=t.boundingClientRect;if(this.isSticky=r.height<-r.top,"visible"===document.visibilityState&&this.isSticky&&this.player){const t=()=>{window.removeEventListener("scroll",t),this.player.paused&&(this.isSticky=!1)};this.player.once("pause",(()=>{window.addEventListener("scroll",t)}))}}handleVisibilityPlayChange(t){var i,e,r;if(!this.isAdmin&&(null===(i=this.preset)||void 0===i?void 0:i.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==t?void 0:t.isIntersecting)),this.player)){if(null==t?void 0:t.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(r=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===r?void 0:r.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(()=>{this.previouslyPlaying=!0,this.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}renderMutedOverlay(){var t;if(this.player&&this.mutedPreview&&!this.isAdmin)return i("presto-muted-overlay",{mutedOverlay:null===(t=this.player.config.blockAttributes)||void 0===t?void 0:t.mutedOverlay,preset:this.preset,onPlayVideo:()=>{this.mutedPreview=!1,this.play()}})}renderVideo(){var t;switch(this.provider){case"vimeo":return i("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return i("presto-youtube",{onReload:t=>this.onReload(null==t?void 0:t.detail),player:this.player,getRef:t=>this.playerEl=t,lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return i("presto-bunny",{thumbnail:null===(t=null==this?void 0:this.bunny)||void 0===t?void 0:t.thumbnail,getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks});case"audio":return i("presto-audio",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,preset:this.preset,src:this.src,tracks:this.tracks,mediaTitle:this.mediaTitle});default:return i("presto-video",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}}renderVideoCTA(){var t,i,e,r;(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&(this.isAdmin||(null===(e=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===e?void 0:e.enabled)&&((null===(r=this.components.cta)||void 0===r?void 0:r.offsetParent)||"audio"!==this.provider&&(this.components.cta=document.createElement("presto-cta-overlay"),this.components.cta.direction=this.direction,this.components.cta.player=this.player,this.components.cta.preset=this.preset,this.components.cta.i18n=this.i18n,this.player.elements.container.append(this.components.cta))))}renderAudioCTA(){var t,e;if("audio"===this.provider&&this.player&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.cta)||void 0===e?void 0:e.enabled))return i("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderEmailOverlay(){var t,i,e;!(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)||this.isAdmin||(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.logged_in)||(null===(e=this.components.email)||void 0===e?void 0:e.offsetParent)||"audio"!==this.provider&&(this.components.email=document.createElement("presto-email-overlay"),this.components.email.direction=this.direction,this.components.email.player=this.player,this.components.email.preset=this.preset,this.components.email.i18n=this.i18n,this.components.email.videoId=this.video_id,this.player.elements.container.append(this.components.email))}renderAudioEmail(){var t,e;if("audio"===this.provider&&this.player&&(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&!(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.logged_in))return i("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderActionBar(){var t,e;if((null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)&&this.player)return i("presto-action-bar",{config:this.preset.action_bar,player:null==this?void 0:this.player,youtube:this.youtube})}stickyPositionClass(){var t,i;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(i=this.preset)||void 0===i?void 0:i.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,i,e,r,o,n,a;this.player&&((null===(t=null==this?void 0:this.overlaysComponent)||void 0===t?void 0:t.offsetParent)||(this.overlaysComponent=document.createElement("presto-dynamic-overlays"),this.overlaysComponent.addEventListener("reloadComponent",(()=>{this.overlaysComponent.remove(),this.overlaysComponent=document.createElement("presto-dynamic-overlays")}),{once:!0})),this.overlaysComponent.style.cssText="display: block !important; opacity: 1 !important; visibility: visible !important;",this.overlaysComponent.overlays=this.overlays,this.overlaysComponent.preset=this.preset,this.overlaysComponent.player=this.player,this.overlaysComponent.enabled=!(null===(r=null===(e=null===(i=this.player)||void 0===i?void 0:i.config)||void 0===e?void 0:e.mutedPreview)||void 0===r?void 0:r.enabled),(null===(o=null==this?void 0:this.overlaysComponent)||void 0===o?void 0:o.offsetParent)||null===(a=null===(n=this.player.elements)||void 0===n?void 0:n.wrapper)||void 0===a||a.append(this.overlaysComponent))}handleCtaStateChange(t){this.ctaActive=t.detail}handleEmailStateChange(t){this.emailActive=t.detail}handleActionBarStateChange(t){this.actionBarActive=t.detail}render(){var t,e,r,o,n,a,s;return i(y,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},i("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"audio"===this.provider?"presto-sticky-audio":"presto-sticky":""}\n ${"audio"!==this.provider?this.stickyPositionClass():""}\n ${"rtl"===this.direction?"rtl":""}\n ${!0===this.ctaActive?"cta-active":""}\n ${!0===this.emailActive?"email-active":""}\n ${!0===this.actionBarActive&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)?"action-bar-active":""}\n ${!!(null===(r=this.preset)||void 0===r?void 0:r.skin)&&`skin-${null===(o=this.preset)||void 0===o?void 0:o.skin}`}\n ${(null===(n=this.preset)||void 0===n?void 0:n.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(a=this.preset)||void 0===a?void 0:a.caption_style)?`caption-style-${null===(s=this.preset)||void 0===s?void 0:s.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}\n ${this.classes||""}`},i("div",null,i("slot",{name:"player-start"}),i("slot",{name:"player-before-video"}),this.renderVideo(),i("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),this.renderAudioCTA(),this.renderAudioEmail(),i("slot",{name:"player-end"}))))}get el(){return e(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};Ge.style='@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui *::after,.plyr--full-ui *::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background-image:linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2 * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%, 0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0, 10px) scale(0.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));height:100%;margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-webkit-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-moz-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-moz-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-ms-fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads:empty::after{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none !important}.plyr__sr-only{clip:rect(1px, 1px, 1px, 1px);overflow:hidden;border:0 !important;height:1px !important;padding:0 !important;position:absolute !important;width:1px !important}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr--html5 .plyr__video-wrapper,.plyr--youtube .plyr__video-wrapper{height:100%}.plyr__video-wrapper{z-index:1}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr{border-radius:var(--presto-player-border-radius)}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper .presto-player__wrapper .plyr__control--overlaid{z-index:4}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--video .plyr__controls{padding-bottom:calc(var(--plyr-control-spacing, 10px) + env(safe-area-inset-bottom))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:100%;max-width:100%;background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper.action-bar-active .presto-audio__poster img{border-bottom-left-radius:0px}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.presto-player--hide-scrim .plyr__controls{background:transparent}.presto-player__wrapper presto-audio .presto-player-toc{max-height:350px}.presto-player__wrapper presto-action-bar{position:relative;z-index:1}.skin-stacked .plyr__controls{flex-wrap:wrap}.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.skin-stacked .plyr__controls{justify-content:flex-start}.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:50%}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}.presto-sticky-audio{position:fixed;z-index:3000;width:100vw;bottom:0px;right:0px;left:0px}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;align-items:center;justify-content:center}.presto-player__muted-overlay img{display:none}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay.presto-player--playing .presto-player__muted-overlay img{display:block}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper .plyr__captions{z-index:1}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media (min-aspect-ratio: 16/9){.hide-youtube-ui presto-youtube .plyr:fullscreen .plyr__video-wrapper{width:177.7777777778vh}}.cta-email-active,.cta-email-active .presto-audio__wrapper{min-height:140px}.cta-active,.email-active,.cta-active .presto-audio__wrapper,.email-active .presto-audio__wrapper{min-height:140px}.action-bar-active .plyr{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}';const Ke=function(t,i){return u(i)};let Xe=class{constructor(i){t(this,i),this.prestoBlur=r(this,"prestoBlur",7),this.prestoFocus=r(this,"prestoFocus",7),this.hasFocus=!1,this.hasLabel=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.type="default",this.size="medium",this.full=!1,this.disabled=!1,this.submit=!1}componentWillLoad(){this.handleSlotChange()}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}handleSlotChange(){this.hasLabel=!!this.button.children,this.hasPrefix=!!this.button.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.button.querySelector('[slot="suffix"]')}handleBlur(){this.hasFocus=!1,this.prestoBlur.emit()}handleFocus(){this.hasFocus=!0,this.prestoFocus.emit()}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}render(){const t=!!this.href,e=i(Ke,null,i("span",{part:"prefix",class:"button__prefix"},i("slot",{onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),i("span",{part:"label",class:"button__label"},i("slot",{onSlotchange:()=>this.handleSlotChange()})),i("span",{part:"suffix",class:"button__suffix"},i("slot",{onSlotchange:()=>this.handleSlotChange(),name:"suffix"}))),r=i("button",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},disabled:this.disabled,type:this.submit?"submit":"button",name:this.name,value:this.value,onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e),o=i("a",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},href:this.href,target:this.target,download:this.download,rel:this.target?"noreferrer noopener":void 0,role:"button","aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?"-1":"0",onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e);return t?o:r}get button(){return e(this)}};Xe.style=":host{display:inline-block;width:auto;cursor:pointer}:host([full]){display:block}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--presto-player-button-border-width);font-family:var(--plyr-font-family, inherit);font-weight:var(--presto-player-button-font-weight, 500);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--presto--player-transition-fast, 150ms) background-color, var(--presto-player-transition-fast, 150ms) color, var(--presto-player-transition-fast, 150ms) border, var(--presto--player-transition-fast, 150ms) box-shadow;cursor:inherit;border-radius:var(--presto-player-button-border-radius, 0.25em)}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button.button--disabled{opacity:0.5;cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button ::slotted(.presto--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(presto-icon){vertical-align:-2px}.button.button--default{background-color:var(--presto-player-color-white, #fff);border-color:var(--presto-player-color-gray-300, #d1d5db);color:var(--presto-player-color-gray-600, #4b5563)}.button.button--default:hover:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:0.75}.button.button--default:focus:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--default:active:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--primary{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff)}.button.button--primary:hover:not(.button--disabled){opacity:0.9}.button.button--primary:focus:not(.button--disabled){opacity:1}.button.button--primary:active:not(.button--disabled){opacity:1}.button--text{background-color:transparent;border-color:transparent;color:var(--presto-player-button-color, var(--plyr-color-main))}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.8}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--small{font-size:var(--presto-player-button-font-size-small, 0.875em);height:var(--presto-player-button-height-small, 1.875em);line-height:calc(var(--presto-player-button-height-small, 1.875em) - var(--presto-player-button-border-width, 1px) * 2)}.button--medium{font-size:var(--presto-player-button-font-size-medium, 1em);height:var(--presto-player-button-height-medium, 2.5em);line-height:calc(var(--presto-player-button-height-medium, 2.5em) - var(--presto-player-button-border-width, 1px) * 2)}.button--large{font-size:var(--presto-player-button-font-size-large, 1.25em);height:var(--presto-player-button-height-large, 3.125em);line-height:calc(var(--presto-player-button-height-large, 3.125em) - var(--presto-player-button-border-width, 1px) * 2)}.button--full{display:block}.button--has-label.button--small .button__label{padding:0 var(--presto-player-button-spacing-small, 0.75em)}.button--has-label.button--medium .button__label{padding:0 var(--presto-player-button-spacing-medium, 1em)}.button--has-label.button--large .button__label{padding:0 var(--presto-player-button-spacing-large, 1.25em)}.button--has-prefix.button--small{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--small .button__label{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--medium{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--medium .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}";let Ze=class{constructor(i){t(this,i)}render(){return i("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}};Ze.style=":host{position:relative;box-sizing:border-box;--track-color:#0d131e20;--indicator-color:var(--plyr-color-main);--stroke-width:2px;display:inline-flex}:host *,:host *:before,:host *:after{box-sizing:inherit}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";let tr=class{constructor(i){t(this,i)}handleClick(t){t.preventDefault();const i=document.body.querySelector("presto-player");i&&i.goToAndPlay(this.timeToSeconds(this.time))}timeToSeconds(t){let i,e=t.split(":");return e.length>1&&(i=60*parseInt(e[0])),parseInt(e[1])+parseInt(i)}render(){return i("a",{href:"#",class:"presto-timestamp",onClick:t=>this.handleClick(t)},i("slot",null,this.time))}};tr.style=":host{display:inline}";let ir=class{constructor(i){t(this,i)}render(){return i("video",{class:{"presto-player__player":!0,"plyr__video-embed":["youtube","vimeo"].includes(this.provider)},part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},i("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>i("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))}};ir.style=":host{display:block}";let er=class{constructor(i){t(this,i)}getId(t){const i=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(t||"");return(null==i?void 0:i[5])||""}parseHash(t){const i=t.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*\&*h=|\/)+(?<hash>[\d,a-f]+)/);return i?i.groups.hash:null}render(){if(this.src)return"Android"!==_()||(t=window.navigator.standalone,e=window.navigator.userAgent.toLowerCase(),r=/safari/.test(e),/iphone|ipod|ipad/.test(e)?!t&&r||t||r:!e.includes("wv"))?i("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src),"data-plyr-embed-hash":this.parseHash(this.src)}):i("div",{class:"presto-iframe-fallback-container"},i("iframe",{src:`https://player.vimeo.com/video/${this.getId(this.src)}?h=${this.parseHash(this.src)}&amp;loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media`,allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"}));var t,e,r}};er.style=":host{display:block}";let rr=class{constructor(i){t(this,i),this.reload=r(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.once("statechange",(t=>{var i,e,r,o,n;1===t.detail.code&&((null===(n=null===(o=null===(r=null===(e=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr)||void 0===e?void 0:e.config)||void 0===r?void 0:r.blockAttributes)||void 0===o?void 0:o.mutedPreview)||void 0===n?void 0:n.enabled)||(this.player.muted=!1))}))}getId(t){var i;const e=(t||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===(null===(i=null==e?void 0:e[2])||void 0===i?void 0:i.length)?e[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var t;let i=null===(t=window.navigator)||void 0===t?void 0:t.standalone,e=window.navigator.userAgent.toLowerCase(),r=/safari/.test(e),o=/iphone|ipod|ipad/.test(e);this.isWebView=o?!i&&!r:e.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&"iOS"===_()&&(this.lazyLoad=!1)}render(){return this.isWebView?i("div",{class:"fallback-container"},i("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?i("div",null,i("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),i("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):i("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}static get watchers(){return{player:["handlePlayerChange"]}}};rr.style=":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";let or=class{constructor(i){t(this,i),this.layout="default"}waitForApi(t){var i=setInterval((function(){var e;(null===(e=null===window||void 0===window?void 0:window.gapi)||void 0===e?void 0:e.ytsubscribe)&&(clearInterval(i),t())}),50)}componentDidLoad(){const t=document.createElement("script");t.type="text/javascript",t.async=!1,t.src="https://apis.google.com/js/platform.js";const i=document.getElementsByTagName("script")[0];i&&i.parentNode.insertBefore(t,i),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return i("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};or.style=":host{display:block}";export{C,M as E,Ye as P,f as a,w as b,k as c,x as d,z as e,j as f,T as g,P as h,O as i,I as j,A as k,E as l,Ge as m,Xe as n,Ze as o,tr as p,ir as q,le as r,er as s,rr as t,or as u}
 
dist/components/web-components/p-b8dcbd9c.js ADDED
@@ -0,0 +1 @@
 
1
+ import{m as n,a as e}from"./p-fd4ad57a.js";import{P as r}from"./p-eda63047.js";export default function(t){var a=t.config,o=t.selector,i=t.src,u=t.preload;return new Promise(function(){var t=n(regeneratorRuntime.mark((function n(t){var c,s,f;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(window.Hls){n.next=6;break}case 1:if(window.hasOwnProperty("Hls")){n.next=6;break}return n.next=4,new Promise((function(n){return setTimeout(n,50)}));case 4:n.next=1;break;case 6:if(!window.Hls.isSupported()&&!o.canPlayType("application/vnd.apple.mpegurl")){n.next=14;break}return s=!["metadata","none"].includes(u),null!==(c=wp)&&void 0!==c&&c.blocks&&(s=!0),(f=new window.Hls({autoStartLoad:s})).loadSource(i),f.on(window.Hls.Events.LEVEL_SWITCHED,(function(n,e){o.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span").innerHTML=f.autoLevelEnabled?"AUTO (".concat(f.levels[e.level].height,"p)"):"AUTO"})),f.on(window.Hls.Events.MANIFEST_PARSED,(function(){var n=f.levels.map((function(n){return n.height}));n.unshift(0);var i=n.findIndex((function(n){var e;return n===parseInt(null===(e=prestoPlayer)||void 0===e?void 0:e.hls_start_level)}));f.startLevel=i?i-1:2,a.quality={default:0,options:n,forced:!0,onChange:function(n){0===n?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach((function(e,r){e.height===n&&(console.log("Found quality match with "+n),prestoHLS.currentLevel=r)}))}},f.attachMedia(o),window.prestoHLS=f;var u=new r(o,e({},a));return u.hls=f,u.on("waiting",(function n(){f.startLoad(-1),u.off("waiting",n)})),u.on("languagechange",(function(){setTimeout((function(){return f.subtitleTrack=u.currentTrack}),50)})),t(u)})),n.abrupt("return");case 14:return n.abrupt("return",t(new r(o,e({},a))));case 15:case"end":return n.stop()}}),n)})));return function(n,e){return t.apply(this,arguments)}}())}
dist/components/web-components/{p-74dab128.entry.js → p-e47874b6.entry.js} RENAMED
@@ -1 +1 @@
1
- export{a as presto_action_bar,b as presto_action_bar_controller,c as presto_action_bar_ui,d as presto_audio,e as presto_bunny,f as presto_cta_overlay,g as presto_cta_overlay_controller,C as presto_cta_overlay_ui,h as presto_dynamic_overlay_ui,i as presto_dynamic_overlays,j as presto_email_overlay,k as presto_email_overlay_controller,E as presto_email_overlay_ui,l as presto_muted_overlay,m as presto_player,n as presto_player_button,o as presto_player_spinner,p as presto_timestamp,q as presto_video,s as presto_vimeo,t as presto_youtube,u as presto_youtube_subscribe_button}from"./p-83f26425.js";import"./p-fd4ad57a.js";
1
+ export{a as presto_action_bar,b as presto_action_bar_controller,c as presto_action_bar_ui,d as presto_audio,e as presto_bunny,f as presto_cta_overlay,g as presto_cta_overlay_controller,C as presto_cta_overlay_ui,h as presto_dynamic_overlay_ui,i as presto_dynamic_overlays,j as presto_email_overlay,k as presto_email_overlay_controller,E as presto_email_overlay_ui,l as presto_muted_overlay,m as presto_player,n as presto_player_button,o as presto_player_spinner,p as presto_timestamp,q as presto_video,s as presto_vimeo,t as presto_youtube,u as presto_youtube_subscribe_button}from"./p-eda63047.js";import"./p-fd4ad57a.js";
dist/components/web-components/p-eda63047.js ADDED
@@ -0,0 +1 @@
 
1
+ import{r as t,h as i,g as e,c as r,_ as o,a as n,d as a,e as s,f as l,i as p,j as u,k as d,l as c,m as h,n as v,H as y}from"./p-fd4ad57a.js";let f=class{constructor(i){t(this,i)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var i,e;this.currentTime=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return i("presto-action-bar-controller",{ended:this.ended,config:this.config,currentTime:this.currentTime,duration:this.duration,direction:this.direction,youtube:this.youtube})}get el(){return e(this)}};function g({current:t,duration:i,showAfter:e=null}){if(0===e)return!0;if(null===e||!i)return!1;if(t===e)return!0;let r=t/i*100;return 99.9<r&&(r=100),r>=e}function b(t){if(!t)return;let i,e,r,o;if(t.match(/^rgb/)){const o=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);i=o[1],e=o[2],r=o[3]}else{const o=+("0x"+t.slice(1).replace(t.length<5&&/./g,"$&$&"));i=o>>16,e=o>>8&255,r=255&o}return o=Math.sqrt(i*i*.299+e*e*.587+r*r*.114),o>127.5?"light":"dark"}function m(t){let i,e=t.split(":");return e.length>1&&(i=60*parseInt(e[0])),parseInt(e[1])+parseInt(i)}function _(){var t=navigator.userAgent||navigator.vendor;return/windows phone/i.test(t)?"Windows Phone":/android/i.test(t)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}f.style=":host{display:block}";let w=class{constructor(i){t(this,i),this.actionBarStateChange=r(this,"actionBarStateChange",7),this.show=!1,this.youtubeRenderKey=1,this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleDuration(){this.handleTime()}handleEnded(t){var i;if(t){if(100!==(null===(i=null==this?void 0:this.config)||void 0===i?void 0:i.percentage_start))return;this.show=!0}}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleTime(){this.checkTime()}checkTime(){var t,i;this.show=!!(null===(t=null===window||void 0===window?void 0:window.wp)||void 0===t?void 0:t.blocks)||g({current:this.currentTime,duration:this.duration,showAfter:null===(i=this.config)||void 0===i?void 0:i.percentage_start})}handleButtonCountChange(t,i){(null==t?void 0:t.button_count)!==(null==i?void 0:i.button_count)&&this.youtubeRenderKey++,(null==t?void 0:t.enabled)&&this.handleDuration()}youtubeButton(){var t,e,r,o;if("youtube"===(null===(t=this.config)||void 0===t?void 0:t.button_type)&&(null===(e=this.youtube)||void 0===e?void 0:e.channelId))return i("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(r=this.youtube)||void 0===r?void 0:r.channelId,showCount:null===(o=this.config)||void 0===o?void 0:o.button_count})}customButton(){var t,e,r,o,n,a,s,l,p,u,d;if("custom"===(null===(t=this.config)||void 0===t?void 0:t.button_type))return i("presto-player-button",{type:"primary",size:"small",href:null===(r=null===(e=this.config)||void 0===e?void 0:e.button_link)||void 0===r?void 0:r.url,target:(null===(n=null===(o=this.config)||void 0===o?void 0:o.button_link)||void 0===n?void 0:n.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(a=this.config)||void 0===a?void 0:a.button_radius}px`},(null===(s=this.config)||void 0===s?void 0:s.button_color)?{"--presto-player-button-color":`${null===(l=this.config)||void 0===l?void 0:l.button_color}`}:{}),(null===(p=this.config)||void 0===p?void 0:p.button_text_color)?{"--presto-player-button-text":`${null===(u=this.config)||void 0===u?void 0:u.button_text_color}`}:{})},null===(d=this.config)||void 0===d?void 0:d.button_text)}handleCtaStateChange(t){this.actionBarStateChange.emit(t)}render(){var t,e;return i("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(t=this.config)||void 0===t?void 0:t.background_color)||"#1d1d1d"}},null===(e=this.config)||void 0===e?void 0:e.text,i("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return e(this)}static get watchers(){return{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"],show:["handleCtaStateChange"]}}};w.style=":host{display:block}";let k=class{constructor(i){t(this,i)}render(){return i("div",{class:{bar:!0,"bar--open":this.open}},i("span",{part:"content",class:"bar__content"},i("slot",null)),i("span",{part:"button",class:"bar__button"},i("slot",{name:"button"})))}};k.style=":host{display:block;overflow:hidden}.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;background:var(--presto-action-bar-background, #1d1d1d);color:#fff;padding:0 var(--presto-action-bar-padding, 6px);line-height:1em;font-size:16px;margin-top:-100%;transition:margin var(--presto-action-bar-animation-speed, 0.5s) ease-in-out;transform:translate3d(0);border-radius:0px 0px var(--presto-player-border-radius) var(--presto-player-border-radius)}.bar.bar--open{margin-top:0}.bar__button{margin:var(--presto-action-bar-padding, 6px);display:flex;align-items:center}.bar__content{margin:var(--presto-action-bar-padding, 6px);width:100%;text-align:center}@media screen and (min-width: 480px){.bar__content{width:auto}}";let x=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7)}renderPosterImage(){if(this.poster)return i("div",{class:"presto-audio__poster"},i("img",{src:this.poster}))}hasPosterArea(){var t;return!!this.poster||!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])}renderMobilePoster(){var t;return i("div",{class:"presto-audio__poster-wrapper-mobile"},!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&this.renderLargePlay("presto-audio__large-play-button is-relative"),i("div",{class:"presto-audio__mobile-title"},this.mediaTitle))}renderLargePlay(t="presto-audio__large-play-button"){return i("div",{class:t,onClick:()=>{this.player.playing?this.pauseVideo.emit():this.playVideo.emit()}},i("svg",{class:"presto-audio__icon-play",width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M15.5588 9.00005L0.117662 17.915L0.117662 0.0850823L15.5588 9.00005Z"})),i("svg",{class:"presto-audio__icon-pause",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("rect",{width:"5",height:"17"}),i("rect",{x:"12",width:"5",height:"17"})))}componentDidLoad(){"ResizeObserver"in window&&new ResizeObserver((t=>{t.forEach((t=>this.width=t.contentRect.width))})).observe(this.el)}render(){var t,e,r,o,n;return i("div",{ref:t=>this.el=t,class:{"presto-audio__wrapper":!0,"has-poster":!!this.poster,"has-play-large":!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"]),"is-playing":null===(e=this.player)||void 0===e?void 0:e.playing,"has-light-background":"light"===b(null===(r=this.preset)||void 0===r?void 0:r.background_color),"has-dark-background":"dark"===b(null===(o=this.preset)||void 0===o?void 0:o.background_color),"breakpoint-small":this.width<520,"skin-stacked":this.width<520,"breakpoint-large":this.width>=520}},this.hasPosterArea()&&i("div",{class:"presto-audio__poster-wrapper"},!!(null===(n=this.preset)||void 0===n?void 0:n["play-large"])&&i("div",{class:"presto-audio__large-play-wrapper"},this.renderLargePlay()),this.renderPosterImage()),this.hasPosterArea()&&this.renderMobilePoster(),i("div",{class:"presto-audio__controls-wrapper"},i("div",{class:"presto-audio__title"},this.mediaTitle),i("audio",{part:"audio-player",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster},i("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>i("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))))}};x.style=":host{display:block}.presto-audio__wrapper{border-radius:var(--presto-player-border-radius, 0px)}.presto-audio__wrapper .plyr--audio .plyr__controls{padding:0}.presto-audio__wrapper .plyr--audio .plyr__control.plyr__tab-focus,.presto-audio__wrapper .plyr--audio .plyr__control:hover,.presto-audio__wrapper .plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.presto-audio__wrapper{display:flex;background:var(--plyr-audio-controls-background, #fff)}.presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2);flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0}.has-poster .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 3)}.has-play-large:not(.has-poster) .presto-audio__controls-wrapper{padding-left:0}.presto-audio__title,.presto-audio__mobile-title{font-size:18px;font-weight:500;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--plyr-audio-control-color)}.presto-audio__title{margin:calc(var(--plyr-control-spacing, 10px) / 2);margin-top:0}.presto-audio__poster-wrapper{position:relative;width:100px;min-height:100px;flex:0 0 100px}.presto-audio__poster-wrapper img{border-radius:var(--presto-player-border-radius, 0px) 0 0 var(--presto-player-border-radius, 0px);width:100%;height:100%;object-fit:cover;aspect-ratio:1;display:block}.has-poster .presto-audio__poster-wrapper{width:140px;height:140px;flex:0 0 140px}.presto-audio__poster{width:100%;height:100%}.presto-audio__large-play-button{user-select:none;cursor:pointer;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%, -50%);width:50px;height:50px;color:white;border-radius:100%;background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__large-play-button.is-relative{position:relative;top:auto;left:auto;transform:none}.has-light-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.has-dark-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__icon-play,.presto-audio__icon-pause{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);fill:currentColor;display:block;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;margin:0 auto;text-align:center}.presto-audio__icon-pause{opacity:0;visibility:hidden}.presto-audio__wrapper.is-playing .presto-audio__icon-pause{opacity:1;visibility:visible}.presto-audio__icon-play{margin-left:2px;opacity:1;visibility:visible}.presto-audio__wrapper.is-playing .presto-audio__icon-play{opacity:0;visibility:hidden}.presto-audio__poster-wrapper-mobile{display:none;min-width:0}.presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 50px}.presto-audio__wrapper.breakpoint-small{flex-direction:column}.presto-audio__wrapper.breakpoint-small .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__title{text-align:center;margin:calc(var(--plyr-control-spacing, 10px) * 1.5)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__poster-wrapper{margin:30px auto auto auto;overflow:hidden;border-radius:var(--presto-player-border-radius, 0px);width:225px;height:225px;flex:0 0 225px}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper,.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__title{display:none}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.skin-stacked.presto-sticky-audio .presto-audio__wrapper{height:115px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:115px;height:115px;flex:0 0 115px}.presto-sticky-audio .presto-audio__wrapper{height:100px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:100px;height:100px;flex:0 0 100px}.action-bar-active .presto-audio__wrapper{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}@media screen and (max-width: 520px){.presto-sticky-audio .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.presto-sticky-audio .presto-audio__poster-wrapper,.presto-sticky-audio .presto-audio__title{display:none}.presto-sticky-audio .presto-audio__wrapper{height:140px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:0px}.presto-sticky-audio .presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 40px;height:40px}}";let z=class{constructor(i){t(this,i)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return i("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}},j=class{constructor(i){t(this,i)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var i,e;this.currentTime=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t;return i("presto-cta-overlay-controller",{ended:this.ended,currentTime:this.currentTime,duration:this.duration,direction:this.direction,cta:null===(t=this.preset)||void 0===t?void 0:t.cta,i18n:this.i18n,provider:this.provider})}};j.style=":host{display:block}";let T=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",7),this.ctaStateChange=r(this,"ctaStateChange",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleEnded(t){var i;if(t){if(100!==(null===(i=null==this?void 0:this.cta)||void 0===i?void 0:i.percentage))return;this.show=!0}}handleDuration(){var t;this.enabled=!this.skipped&&(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.enabled),this.handleTime()}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleEnabled(){this.show&&(this.skipped||this.pauseVideo.emit(!0))}handleTime(){var t;this.enabled&&(this.skipped||100!==(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}checkTime(){var t;this.show=g({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)||0})}skip(){this.skipped=!0,this.show=!1,this.playVideo.emit()}rewatch(){this.ended=!1,this.show=!1,this.restartVideo.emit()}handleCtaStateChange(t){this.ctaStateChange.emit(t)}render(){var t,e,r,o,n,a,s,l,p,u,d,c,h,v;if(this.show)return i("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.button_radius}px`},(null===(e=null==this?void 0:this.cta)||void 0===e?void 0:e.background_opacity)?{"--presto-player-cta-background-opacity":""+(null===(r=null==this?void 0:this.cta)||void 0===r?void 0:r.background_opacity)/100}:{}),(null===(o=null==this?void 0:this.cta)||void 0===o?void 0:o.button_color)?{"--presto-player-button-color":`${null===(n=null==this?void 0:this.cta)||void 0===n?void 0:n.button_color}`}:{}),(null===(a=null==this?void 0:this.cta)||void 0===a?void 0:a.button_text_color)?{"--presto-player-button-text":`${null===(s=null==this?void 0:this.cta)||void 0===s?void 0:s.button_text_color}`}:{}),direction:this.direction,class:"cta-overlay",i18n:this.i18n,headline:null===(l=null==this?void 0:this.cta)||void 0===l?void 0:l.headline,"bottom-text":null===(p=null==this?void 0:this.cta)||void 0===p?void 0:p.bottom_text,"show-button":null===(u=null==this?void 0:this.cta)||void 0===u?void 0:u.show_button,buttonLink:null===(d=null==this?void 0:this.cta)||void 0===d?void 0:d.button_link,allowSkip:!this.ended&&(null===(c=null==this?void 0:this.cta)||void 0===c?void 0:c.show_skip),allowRewatch:this.ended&&(null===(h=null==this?void 0:this.cta)||void 0===h?void 0:h.show_rewatch),"button-text":null===(v=null==this?void 0:this.cta)||void 0===v?void 0:v.button_text,onSkip:()=>this.skip(),onRewatch:()=>this.rewatch(),provider:this.provider})}static get watchers(){return{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"],show:["handleCtaStateChange"]}}};T.style=":host{display:block}";const S=function(t,i,e){var r=function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}({minFontSize:-1/0,maxFontSize:1/0,container:t},e),o=function(t){var e=i||1,o=function(){var i;t.style.fontSize=Math.max(Math.min(((null==r||null===(i=r.container)||void 0===i?void 0:i.clientWidth)||0)/(10*e),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize))+"px"};if(o(),"ResizeObserver"in window==0)var n=import("./p-58f5339e.js").then((function(){window.ResizeObserver=n.ResizeObserver,new ResizeObserver(o).observe(r.container)}));else new ResizeObserver(o).observe(r.container)};if(t.length)for(var n=0;n<t.length;n++)o(t[n]);else o(t);return t};let C=class{constructor(i){t(this,i),this.skip=r(this,"skip",7),this.rewatch=r(this,"rewatch",7)}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),S(this.textInput,3,{maxFontSize:!0===this.isAudioProvider?15:20,minFontSize:8})}handleCTAClick(t){var i;(null===(i=this.buttonLink)||void 0===i?void 0:i.url)&&(t.preventDefault(),t.stopPropagation(),this.handleLink())}handleLink(){var t,i,e;(null===(t=this.buttonLink)||void 0===t?void 0:t.opensInNewTab)?window.open(null===(i=this.buttonLink)||void 0===i?void 0:i.url,"_blank"):window.location.href=null===(e=this.buttonLink)||void 0===e?void 0:e.url}render(){var t,e,r,o,n;return i("div",{class:"wrapper",ref:t=>this.textInput=t},i("div",{onClick:t=>this.handleCTAClick(t),class:`overlay ${"rtl"===this.direction?"rtl":""} ${(null===(t=this.buttonLink)||void 0===t?void 0:t.url)?"has-link":""}`},i("div",{class:this.isAudioProvider?"content is-centered":"content"},i("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&i("p",{class:this.isAudioProvider&&"is-small",part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&i("presto-player-button",{full:!0,onClick:t=>this.handleCTAClick(t),part:"cta-button",href:null===(e=null==this?void 0:this.buttonLink)||void 0===e?void 0:e.url,target:(null===(r=null==this?void 0:this.buttonLink)||void 0===r?void 0:r.opensInNewTab)?"_blank":"_self",class:"button",type:"primary"},this.buttonText))),!!this.allowRewatch&&i("div",{class:"rewatch",onClick:t=>{t.preventDefault(),t.stopImmediatePropagation(),this.rewatch.emit()}},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-corner-up-left"},i("polyline",{points:"9 14 4 9 9 4"}),i("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})),null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.rewatch),!!this.allowSkip&&i("div",{class:"skip",onClick:t=>{t.preventDefault(),this.skip.emit()}},null===(n=null==this?void 0:this.i18n)||void 0===n?void 0:n.skip," →"))}};C.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999;user-select:none}*{box-sizing:border-box}a{color:#fff}.wrapper{height:100%;position:relative;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif)}.overlay{position:relative;display:flex;align-items:center;justify-content:center;padding:48px;height:100%}.overlay.has-link{cursor:pointer}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-cta-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-cta-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.content{width:80%;max-width:600px}.content *~*{margin-top:22px}button{background:var(--plyr-color-main, #000);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;color:#fff;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-cta-border-radius, 0) var(--presto-player-cta-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}h1{font-size:1.5em;font-weight:500;margin:0;line-height:1.1em}.skip,.rewatch{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}.rewatch{display:inline-flex;align-items:center;right:auto;left:0}.rewatch .icon{margin-right:5px}p{font-size:0.85em;margin:0;margin-top:1.5em;line-height:1.4em;opacity:0.75}p.is-small{font-size:0.85em;margin:1.5em 0px 0px;line-height:0.1em;opacity:0.75}.is-centered{text-align:center}';let P=class{constructor(i){t(this,i),this.position="top-right"}closestElement(t,i){return i&&i!=document&&i!=window&&i.closest(t)||i&&this.closestElement(t,i.getRootNode().host)}componentDidLoad(){let t=this.closestElement("presto-player",this.el);S(this.text,3,{maxFontSize:16,minFontSize:10,container:t})}render(){return i(this.href?"a":"span",{class:{"overlay-text":!0,"overlay--top-left":"top-left"===this.position,"overlay--top-right":"top-right"===this.position},href:this.href,target:this.target,part:"overlay-text",ref:t=>this.text=t},i("slot",null))}get el(){return e(this)}};P.style=":host{display:block}.overlay-text{text-decoration:none;display:inline-block;user-select:none;line-height:1;opacity:var(--presto-dynamic-overlay-opacity, 1);font-size:var(--presto-dynamic-overlay-font-size, 18px);padding:var(--presto-dynamic-overlay-padding, 0.65em 0.85em);font-weight:var(--presto-dynamic-overlay-font-weight, 500);border-radius:var(--presto-dynamic-overlay-radius, 0.25em);background:var(--presto-dynamic-overlay-background, rgba(0, 0, 0, 0.8));color:var(--presto-dynamic-overlay-color, #fff);opacity:var(--presto-dynamic-overlay-opacity, 1);word-break:break-word}a.overlay-text{cursor:pointer}";let O=class{constructor(i){t(this,i),this.reloadComponent=r(this,"reloadComponent",7),this.watermarkRef={left:null,right:null},this.destroy=!1,this.refs={}}componentDidLoad(){this.player&&this.player.on("timeupdate",(t=>{this.currentTime=t.detail.plyr.currentTime,this.checkValidity()}))}checkValidity(){var t,i,e,r,o,n,a,s,l,p;this.player.playing&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(e=null===(i=this.preset)||void 0===i?void 0:i.watermark)||void 0===e?void 0:e.enabled))&&((null===(r=this.container)||void 0===r?void 0:r.offsetParent)&&(null===(o=this.topLeft)||void 0===o?void 0:o.offsetParent)&&(null===(n=this.topRight)||void 0===n?void 0:n.offsetParent)||this.reloadComponent.emit(),Object.keys(this.refs||{}).forEach((t=>{const{overlay:i,component:e}=this.refs[t];this.checkComponent(e,i.text,(()=>this.reloadComponent.emit()))})),this.shouldShowWatermark("top-left")&&this.watermarkRef.left&&this.checkComponent(this.watermarkRef.left,null===(s=null===(a=this.preset)||void 0===a?void 0:a.watermark)||void 0===s?void 0:s.text,(()=>this.reloadComponent.emit())),this.shouldShowWatermark("top-right")&&this.watermarkRef.right&&this.checkComponent(this.watermarkRef.right,null===(p=null===(l=this.preset)||void 0===l?void 0:l.watermark)||void 0===p?void 0:p.text,(()=>this.reloadComponent.emit())))}checkComponent(t,i,e){if(!(null==t?void 0:t.offsetParent))return e();if(!t.shadowRoot.querySelector("slot"))return e();if(this.player&&this.player.playing){const r=t.shadowRoot.querySelector("slot").assignedNodes()[0];if(r){if(r.parentElement.innerHTML!=i)return e();const t=getComputedStyle(r.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(t.fontSize,10)<10)return e();const o=function(t){var i=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return i?[i[1],i[2],i[3],"1"]:(i=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[i[1],i[2],i[3],i[4]]:void 0}(t.color);if("1"!==(null==o?void 0:o[3]))return e()}}}shouldShowOverlay(t){if(void 0!==this.currentTime)return!(this.currentTime<m(null==t?void 0:t.startTime)||this.currentTime>m(null==t?void 0:t.endTime))}renderOverlay(t){var e,r;return i("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(t)},ref:i=>this.refs[t.id]={overlay:t,component:i},key:t.id,position:t.position,href:null===(e=null==t?void 0:t.link)||void 0===e?void 0:e.url,target:(null===(r=null==t?void 0:t.link)||void 0===r?void 0:r.opensInNewTab)?"_blank":"_self",innerHTML:this.shouldShowOverlay(t)?t.text:"",style:{"--presto-dynamic-overlay-color":(null==t?void 0:t.color)||"#fff","--presto-dynamic-overlay-background":(null==t?void 0:t.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null==t?void 0:t.opacity)?(t.opacity/100).toString():"1"}})}shouldShowWatermark(t){var i,e,r;if(!(null===(e=null===(i=this.preset)||void 0===i?void 0:i.watermark)||void 0===e?void 0:e.enabled))return!1;const o=null===(r=this.preset)||void 0===r?void 0:r.watermark;return"randomize"===o.position?Math.floor((this.player.currentTime||0)/10)%2==0?"top-left"===t:"top-right"===t:o.position===t||!o.position&&"top-right"===t}render(){var t,e,r,o,n,a,s,l,p,u,d;if(this.enabled&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(r=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===r?void 0:r.enabled)))return i("div",{class:"overlays",ref:t=>this.container=t},i("div",{class:"top-left",ref:t=>this.topLeft=t},!!this.shouldShowWatermark("top-left")&&i("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.left=t,style:{"--presto-dynamic-overlay-color":(null===(o=this.preset.watermark)||void 0===o?void 0:o.color)||"#fff","--presto-dynamic-overlay-background":(null===(n=this.preset.watermark)||void 0===n?void 0:n.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(a=this.preset.watermark)||void 0===a?void 0:a.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-left",innerHTML:this.preset.watermark.text}),!!(null===(s=null==this?void 0:this.overlays)||void 0===s?void 0:s.length)&&this.overlays.map((t=>"top-left"!==t.position?"":this.renderOverlay(t)))),i("div",{class:"top-right",ref:t=>this.topRight=t},!!this.shouldShowWatermark("top-right")&&i("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.right=t,style:{"--presto-dynamic-overlay-color":(null===(l=this.preset.watermark)||void 0===l?void 0:l.color)||"#fff","--presto-dynamic-overlay-background":(null===(p=this.preset.watermark)||void 0===p?void 0:p.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(u=this.preset.watermark)||void 0===u?void 0:u.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-right",innerHTML:this.preset.watermark.text}),!!(null===(d=null==this?void 0:this.overlays)||void 0===d?void 0:d.length)&&this.overlays.map((t=>"top-right"!==t.position?"":this.renderOverlay(t)))))}get el(){return e(this)}};O.style=".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}";let I=class{constructor(i){t(this,i)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var i,e;this.currentTime=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t,e;return i("presto-email-overlay-controller",{ended:this.ended,currentTime:this.currentTime,videoId:this.videoId,duration:this.duration,direction:this.direction,presetId:null===(t=this.preset)||void 0===t?void 0:t.id,emailCollection:null===(e=this.preset)||void 0===e?void 0:e.email_collection,i18n:this.i18n,provider:this.provider})}};I.style=":host{display:block}";let A=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",7),this.emailStateChange=r(this,"emailStateChange",7),this.percentagePassed=0}setStorage(t){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify({[this.videoId]:t}))}getStorage(){return window.localStorage.getItem("presto.videos.email_collection")}componentWillLoad(){this.handleDuration()}handleDuration(){var t;this.enabled=!this.getStorage()&&(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.enabled),this.handleTimeCheck()}handleTimeCheck(){this.enabled&&(this.getStorage()||this.checkTime())}handleShowChange(){this.show&&this.pauseVideo.emit(!0)}checkTime(){var t;this.show=g({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.percentage)||0})}async getNonce(){var t;return fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`)}async submit(t){var i;this.loading=!0,this.error="";const e=await this.getNonce(),{data:r}=await e.json();try{let e=await fetch(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:r,preset_id:this.presetId,video_id:this.videoId},(null==t?void 0:t.detail)||{}))});const{success:o,data:n}=await e.json();if(!o)throw n;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(t){const i=null==t?void 0:t[0];i&&"string"==typeof i&&(this.error=i)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}handleEmailStateChange(t){this.emailStateChange.emit(t)}render(){var t,e,r,o,n,a,s,l;if(this.show)return i("presto-email-overlay-ui",{style:Object.assign(Object.assign({},(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.button_color)?{"--presto-player-button-color":`${null===(e=null==this?void 0:this.emailCollection)||void 0===e?void 0:e.button_color}`}:{}),(null===(r=null==this?void 0:this.emailCollection)||void 0===r?void 0:r.button_text_color)?{"--presto-player-button-text":`${null===(o=null==this?void 0:this.emailCollection)||void 0===o?void 0:o.button_text_color}`}:{}),direction:this.direction,class:"email-overlay",headline:null===(n=null==this?void 0:this.emailCollection)||void 0===n?void 0:n.headline,bottomText:null===(a=null==this?void 0:this.emailCollection)||void 0===a?void 0:a.bottom_text,allowSkip:null===(s=null==this?void 0:this.emailCollection)||void 0===s?void 0:s.allow_skip,buttonText:null===(l=null==this?void 0:this.emailCollection)||void 0===l?void 0:l.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:t=>this.submit(t),onSkip:()=>this.skip(),i18n:this.i18n,provider:this.provider})}static get watchers(){return{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"],show:["handleEmailStateChange"]}}};A.style=":host{display:block}";let M=class{constructor(i){t(this,i),this.submitForm=r(this,"submitForm",7),this.skip=r(this,"skip",7)}handleSubmit(t){this.submitForm.emit({email:this.email}),t.preventDefault()}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),S(this.textInput,3,{maxFontSize:this.isAudioProvider?15:20,minFontSize:8})}handleChange(t){this.email=t.target.value}render(){var t,e,r,o;return i("div",{class:"overlay "+("rtl"===this.direction?"rtl":""),ref:t=>this.textInput=t},i("div",{class:"content"},i("h1",{class:this.isAudioProvider&&"is-small"},this.headline||(null===(t=null==this?void 0:this.i18n)||void 0===t?void 0:t.emailDefaultHeadline)),this.isLoading?i("presto-player-spinner",null):i("form",{onSubmit:t=>this.handleSubmit(t)},i("input",{type:"email",placeholder:null===(e=null==this?void 0:this.i18n)||void 0===e?void 0:e.emailPlaceholder,value:this.email,onInput:t=>this.handleChange(t),required:!0}),i("button",{type:"submit"},this.buttonText||(null===(r=null==this?void 0:this.i18n)||void 0===r?void 0:r.play))),this.errorMessage&&i("p",{class:"error"},this.errorMessage),this.bottomText&&i("p",{innerHTML:this.bottomText,class:this.isAudioProvider&&"is-small"}),!!this.allowSkip&&i("div",{class:"skip",onClick:()=>{this.skip.emit()}},null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.skip," →")))}};M.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999}*{box-sizing:border-box}a{color:#fff}.overlay{position:relative;display:flex;align-items:center;text-align:center;justify-content:center;padding:48px;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif);height:100%}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-email-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-email-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.overlay.rtl form{flex-direction:row-reverse}.content{width:20em}form{display:flex;align-items:stretch;justify-content:center}input{background:#fff;border:none;font-size:0.8em;line-height:20px;padding:6px 8px;border-radius:0;border-width:1px;border-style:solid;border-color:transparent;border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius);flex:1}@media screen and (min-width: 700px){input{padding:10px 14px}}input:focus{border-color:var(--plyr-color-main, #000);z-index:1}input:focus,input:hover{outline:none}.rtl input{border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}button{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}.rtl button{border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius)}h1{font-size:1.5em;font-weight:500;margin:0 0 22px 0;max-width:600px;line-height:1.1em}h1.is-small{margin-bottom:1em;font-size:1.1em}.skip{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}p{font-size:0.7em;margin:0;margin-top:1.5em}p.is-small{font-size:0.9em;margin-top:1em}';let E=class{constructor(i){t(this,i),this.playVideo=r(this,"playVideo",7)}render(){var t,e,r,o,n,a,s,l,p;return i("div",{class:"presto-player__muted-overlay",onClick:()=>{this.mutedPreview=!1,this.playVideo.emit()}},(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&i("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},i("svg",{id:"plyr-play",viewBox:"0 0 18 18"},i("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),i("span",{class:"plyr__sr-only"},"Play")),(null===(e=this.mutedOverlay)||void 0===e?void 0:e.enabled)&&(null===(r=this.mutedOverlay)||void 0===r?void 0:r.src)?i("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:`${(null===(o=this.mutedOverlay)||void 0===o?void 0:o.width)||50}%`,left:100*((null===(a=null===(n=this.mutedOverlay)||void 0===n?void 0:n.focalPoint)||void 0===a?void 0:a.x)||.5)+"%",top:100*((null===(l=null===(s=this.mutedOverlay)||void 0===s?void 0:s.focalPoint)||void 0===l?void 0:l.y)||.5)+"%"}},i("img",{src:null===(p=this.mutedOverlay)||void 0===p?void 0:p.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};E.style=":host{display:block}";var F=["premium","referrerPolicy"];function L(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function R(t,i){for(var e=0;e<i.length;e++){var r=i[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function N(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function B(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,r)}return e}function D(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{};i%2?B(Object(e),!0).forEach((function(i){N(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):B(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}return t}var $={addCSS:!0,thumbWidth:15,watch:!0};function q(t,i){return function(){return Array.from(document.querySelectorAll(i)).includes(this)}.call(t,i)}var V=function(t){return null!=t?t.constructor:null},H=function(t,i){return!!(t&&i&&t instanceof i)},U=function(t){return V(t)===String},Q=function(t){return Array.isArray(t)},W=function(t){return H(t,NodeList)},Y=U,J=Q,G=W,K=function(t){return H(t,Element)},X=function(t){return H(t,Event)},Z=function(t){return function(t){return null==t}(t)||(U(t)||Q(t)||W(t))&&!t.length||function(t){return V(t)===Object}(t)&&!Object.keys(t).length};var tt,it,et,rt=function(){function t(i,e){(function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),K(i)?this.element=i:Y(i)&&(this.element=document.querySelector(i)),K(this.element)&&Z(this.element.rangeTouch)&&(this.config=D({},$,{},e),this.init())}return function(t,i,e){i&&R(t.prototype,i),e&&R(t,e)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var i=this,e=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){i.element[e](t,(function(t){return i.set(t)}),!1)}))}},{key:"get",value:function(i){if(!t.enabled||!X(i))return null;var e,r=i.target,o=i.changedTouches[0],n=parseFloat(r.getAttribute("min"))||0,a=parseFloat(r.getAttribute("max"))||100,s=parseFloat(r.getAttribute("step"))||1,l=r.getBoundingClientRect(),p=100/l.width*(this.config.thumbWidth/2)/100;return 0>(e=100/l.width*(o.clientX-l.left))?e=0:100<e&&(e=100),50>e?e-=(100-2*e)*p:50<e&&(e+=2*(e-50)*p),n+function(t,i){if(1>i){var e=function(t){var i="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}(i);return parseFloat(t.toFixed(e))}return Math.round(t/i)*i}(e/100*(a-n),s)}},{key:"set",value:function(i){t.enabled&&X(i)&&!i.target.disabled&&(i.preventDefault(),i.target.value=this.get(i),function(t,i){if(t&&i){var e=new Event(i,{bubbles:!0});t.dispatchEvent(e)}}(i.target,"touchend"===i.type?"change":"input"))}}],[{key:"setup",value:function(i){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null;if(Z(i)||Y(i)?r=Array.from(document.querySelectorAll(Y(i)?i:'input[type="range"]')):K(i)?r=[i]:G(i)?r=Array.from(i):J(i)&&(r=i.filter(K)),Z(r))return null;var o=D({},$,{},e);if(Y(i)&&o.watch){var n=new MutationObserver((function(e){Array.from(e).forEach((function(e){Array.from(e.addedNodes).forEach((function(e){K(e)&&q(e,i)&&new t(e,o)}))}))}));n.observe(document.body,{childList:!0,subtree:!0})}return r.map((function(i){return new t(i,e)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),ot=function(t){return null!=t?t.constructor:null},nt=function(t,i){return Boolean(t&&i&&t instanceof i)},at=function(t){return null==t},st=function(t){return ot(t)===Object},lt=function(t){return ot(t)===String},pt=function(t){return ot(t)===Function},ut=function(t){return Array.isArray(t)},dt=function(t){return nt(t,NodeList)},ct=function(t){return at(t)||(lt(t)||ut(t)||dt(t))&&!t.length||st(t)&&!Object.keys(t).length},ht=at,vt=st,yt=function(t){return ot(t)===Number&&!Number.isNaN(t)},ft=lt,gt=function(t){return ot(t)===Boolean},bt=pt,mt=ut,_t=dt,wt=function(t){return null!==t&&"object"==l(t)&&1===t.nodeType&&"object"==l(t.style)&&"object"==l(t.ownerDocument)},kt=function(t){return nt(t,Event)},xt=function(t){return nt(t,KeyboardEvent)},zt=function(t){return nt(t,TextTrack)||!at(t)&&lt(t.kind)},jt=function(t){if(nt(t,window.URL))return!0;if(!lt(t))return!1;var i=t;t.startsWith("http://")&&t.startsWith("https://")||(i="http://".concat(t));try{return!ct(new URL(i).hostname)}catch(t){return!1}},Tt=ct,St=(tt=document.createElement("span"),it={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},et=Object.keys(it).find((function(t){return void 0!==tt.style[t]})),!!ft(et)&&it[et]);function Ct(t,i){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),i)}var Pt={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Ot(t,i){return i.split(".").reduce((function(t,i){return t&&t[i]}),t)}function It(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];if(!e.length)return t;var o=e.shift();return vt(o)?(Object.keys(o).forEach((function(i){vt(o[i])?(Object.keys(t).includes(i)||Object.assign(t,a({},i,{})),It(t[i],o[i])):Object.assign(t,a({},i,o[i]))})),It.apply(void 0,[t].concat(e))):t}function At(t,i){Array.from(t.length?t:[t]).reverse().forEach((function(t,e){var r=e>0?i.cloneNode(!0):i,o=t.parentNode,n=t.nextSibling;r.appendChild(t),n?o.insertBefore(r,n):o.appendChild(r)}))}function Mt(t,i){wt(t)&&!Tt(i)&&Object.entries(i).filter((function(t){var i=o(t,2);return!ht(i[1])})).forEach((function(i){var e=o(i,2);return t.setAttribute(e[0],e[1])}))}function Et(t,i,e){var r=document.createElement(t);return vt(i)&&Mt(r,i),ft(e)&&(r.innerText=e),r}function Ft(t,i,e,r){wt(i)&&i.appendChild(Et(t,e,r))}function Lt(t){_t(t)||mt(t)?Array.from(t).forEach(Lt):wt(t)&&wt(t.parentNode)&&t.parentNode.removeChild(t)}function Rt(t){if(wt(t))for(var i=t.childNodes.length;i>0;)t.removeChild(t.lastChild),i-=1}function Nt(t,i){return wt(i)&&wt(i.parentNode)&&wt(t)?(i.parentNode.replaceChild(t,i),t):null}function Bt(t,i){if(!ft(t)||Tt(t))return{};var e={},r=It({},i);return t.split(",").forEach((function(t){var i=t.trim(),n=i.replace(".",""),a=i.replace(/[[\]]/g,"").split("="),s=o(a,1)[0],l=a.length>1?a[1].replace(/["']/g,""):"";switch(i.charAt(0)){case".":e.class=ft(r.class)?"".concat(r.class," ").concat(n):n;break;case"#":e.id=i.replace("#","");break;case"[":e[s]=l}})),It(r,e)}function Dt(t,i){if(wt(t)){var e=i;gt(e)||(e=!t.hidden),t.hidden=e}}function $t(t,i,e){if(_t(t))return Array.from(t).map((function(t){return $t(t,i,e)}));if(wt(t)){var r="toggle";return void 0!==e&&(r=e?"add":"remove"),t.classList[r](i),t.classList.contains(i)}return!1}function qt(t,i){return wt(t)&&t.classList.contains(i)}function Vt(t,i){var e=Element.prototype;return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(t,i)}function Ht(t){return this.elements.container.querySelectorAll(t)}function Ut(t){return this.elements.container.querySelector(t)}function Qt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];wt(t)&&(t.focus({preventScroll:!0}),i&&$t(t,this.config.classNames.tabFocus))}var Wt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Yt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,i,e){var r=Yt[t]||"html5"!==i;return{api:r,ui:r&&Yt.rangeInput&&("video"!==t||!Pt.isIPhone||Pt.isIPhone&&e&&Yt.playsinline)}},pip:!(Pt.isIPhone||!bt(Et("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Et("video").disablePictureInPicture)),airplay:bt(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(Tt(t))return!1;var i=t.split("/"),e=o(i,1),r=t;if(!this.isHTML5||e[0]!==this.type)return!1;Object.keys(Wt).includes(r)&&(r+='; codecs="'.concat(Wt[t],'"'));try{return Boolean(r&&this.media.canPlayType(r).replace(/no/,""))}catch(t){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var t=document.createElement("input");return t.type="range","range"===t.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==St,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Jt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(t){}return t}();function Gt(t,i,e){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!Tt(i)&&bt(e)){var s=i.split(" "),l=a;Jt&&(l={passive:n,capture:a}),s.forEach((function(i){r&&r.eventListeners&&o&&r.eventListeners.push({element:t,type:i,callback:e,options:l}),t[o?"addEventListener":"removeEventListener"](i,e,l)}))}}function Kt(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Gt.call(this,t,i,e,!0,r,o)}function Xt(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Gt.call(this,t,i,e,!1,r,o)}function Zt(t){var i=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function a(){for(var s=arguments.length,l=new Array(s),p=0;p<s;p++)l[p]=arguments[p];Xt(t,e,a,o,n),r.apply(i,l)};Gt.call(this,t,e,a,!0,o,n)}function ti(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(wt(t)&&!Tt(i)){var o=new CustomEvent(i,{bubbles:e,detail:n(n({},r),{},{plyr:this})});t.dispatchEvent(o)}}function ii(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function ei(){var t=this;return new Promise((function(i){return t.ready?setTimeout(i,0):Kt.call(t,t.elements.container,"ready",i)})).then((function(){}))}function ri(t){(function(t){return nt(t,Promise)&&pt(t.then)})(t)&&t.then(null,(function(){}))}function oi(t){return mt(t)?t.filter((function(i,e){return t.indexOf(i)===e})):t}function ni(t,i){return mt(t)&&t.length?t.reduce((function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t})):null}function ai(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var si=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(t,i){var e=o(i,2),r=e[0],s=e[1];return n(n({},t),{},a({},r/s,[r,s]))}),{});function li(t){return!!(mt(t)||ft(t)&&t.includes(":"))&&(mt(t)?t:t.split(":")).map(Number).every(yt)}function pi(t){if(!mt(t)||!t.every(yt))return null;var i=o(t,2),e=i[0],r=i[1],n=function t(i,e){return 0===e?i:t(e,i%e)}(e,r);return[e/n,r/n]}function ui(t){var i=function(t){return li(t)?t.split(":").map(Number):null},e=i(t);if(null===e&&(e=i(this.config.ratio)),null===e&&!Tt(this.embed)&&mt(this.embed.ratio)&&(e=this.embed.ratio),null===e&&this.isHTML5){var r=this.media;e=[r.videoWidth,r.videoHeight]}return pi(e)}function di(t){if(!this.isVideo)return{};var i=this.elements.wrapper,e=ui.call(this,t);if(!mt(e))return{};var r=pi(e),n=o(r,2),a=n[0],s=n[1],l=100/a*s;if(ai("aspect-ratio: ".concat(a,"/").concat(s))?i.style.aspectRatio="".concat(a,"/").concat(s):i.style.paddingBottom="".concat(l,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),u=(p-l)/(p/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:l,ratio:e}}function ci(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,r=t/i,o=ni(Object.keys(si),r);return Math.abs(o-r)<=e?si[o]:[t,i]}var hi={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(i){var e=i.getAttribute("type");return!!Tt(e)||Yt.mime.call(t,e)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:hi.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,Tt(this.config.ratio)||di.call(t),Object.defineProperty(t.media,"quality",{get:function(){var i=hi.getSources.call(t).find((function(i){return i.getAttribute("src")===t.source}));return i&&Number(i.getAttribute("size"))},set:function(i){if(t.quality!==i){if(t.config.quality.forced&&bt(t.config.quality.onChange))t.config.quality.onChange(i);else{var e=hi.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===i}));if(!e)return;var r=t.media,o=r.currentTime,n=r.paused,a=r.preload,s=r.readyState,l=r.playbackRate;t.media.src=e.getAttribute("src"),("none"!==a||s)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=o,n||ri(t.play())})),t.media.load())}ti.call(t,t.media,"qualitychange",!1,{quality:i})}}})}},cancelRequests:function(){this.isHTML5&&(Lt(hi.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function vi(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function yi(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];return Tt(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,i){return e[i].toString()}))}var fi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),e.toString())},gi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function bi(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=t.toString();return i=fi(i,"-"," "),i=fi(i,"_"," "),i=gi(i),fi(i," ","")}function mi(t){var i=document.createElement("div");return i.appendChild(t),i.innerHTML}var _i={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},wi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Tt(t)||Tt(i))return"";var e=Ot(i.i18n,t);if(Tt(e))return Object.keys(_i).includes(t)?_i[t]:"";var r={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(r).forEach((function(t){var i=o(t,2);e=fi(e,i[0],i[1])})),e},ki=function(){function t(i){var e=this;p(this,t),L(this,"get",(function(i){if(!t.supported||!e.enabled)return null;var r=window.localStorage.getItem(e.key);if(Tt(r))return null;var o=JSON.parse(r);return ft(i)&&i.length?o[i]:o})),L(this,"set",(function(i){if(t.supported&&e.enabled&&vt(i)){var r=e.get();Tt(r)&&(r={}),It(r,i);try{window.localStorage.setItem(e.key,JSON.stringify(r))}catch(i){}}})),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}return s(t,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),t}();function xi(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(e,r){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===i)try{e(JSON.parse(o.responseText))}catch(t){e(o.responseText)}else e(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",t,!0),o.responseType=i,o.send()}catch(t){r(t)}}))}function zi(t,i){if(ft(t)){var e=ft(i),r=function(){return null!==document.getElementById(i)},o=function(t,i){t.innerHTML=i,e&&r()||document.body.insertAdjacentElement("afterbegin",t)};if(!e||!r()){var n=ki.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),e&&a.setAttribute("id",i),n){var s=window.localStorage.getItem("cache-".concat(i));if(null!==s){var l=JSON.parse(s);o(a,l.content)}}xi(t).then((function(t){if(!Tt(t)){if(n)try{window.localStorage.setItem("cache-".concat(i),JSON.stringify({content:t}))}catch(t){}o(a,t)}})).catch((function(){}))}}}var ji=function(t){return Math.trunc(t/60/60%60,10)},Ti=function(t){return Math.trunc(t%60,10)};function Si(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!yt(t))return Si(void 0,i,e);var r,o=function(t){return"0".concat(t).slice(-2)},n=ji(t),a=(r=t,Math.trunc(r/60%60,10)),s=Ti(t);return n=i||n>0?"".concat(n,":"):"","".concat(e&&t>0?"-":"").concat(n).concat(o(a),":").concat(o(s))}var Ci={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,e=t.host!==i||Pt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=Ut.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Ht.call(this,this.config.selectors.buttons.play),pause:Ut.call(this,this.config.selectors.buttons.pause),restart:Ut.call(this,this.config.selectors.buttons.restart),rewind:Ut.call(this,this.config.selectors.buttons.rewind),fastForward:Ut.call(this,this.config.selectors.buttons.fastForward),mute:Ut.call(this,this.config.selectors.buttons.mute),pip:Ut.call(this,this.config.selectors.buttons.pip),airplay:Ut.call(this,this.config.selectors.buttons.airplay),settings:Ut.call(this,this.config.selectors.buttons.settings),captions:Ut.call(this,this.config.selectors.buttons.captions),fullscreen:Ut.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Ut.call(this,this.config.selectors.progress),this.elements.inputs={seek:Ut.call(this,this.config.selectors.inputs.seek),volume:Ut.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Ut.call(this,this.config.selectors.display.buffer),currentTime:Ut.call(this,this.config.selectors.display.currentTime),duration:Ut.call(this,this.config.selectors.display.duration)},wt(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,i){var e="http://www.w3.org/2000/svg",r=Ci.getIconUrl.call(this),o="".concat(r.cors?"":r.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(e,"svg");Mt(n,It(i,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(e,"use"),s="".concat(o,"-").concat(t);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),n.appendChild(a),n},createLabel:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=wi(t,this.config);return Et("span",n(n({},i),{},{class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),e)},createBadge:function(t){if(Tt(t))return null;var i=Et("span",{class:this.config.classNames.menu.value});return i.appendChild(Et("span",{class:this.config.classNames.menu.badge},t)),i},createButton:function(t,i){var e=this,r=It({},i),o=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=bi(t)).charAt(0).toLowerCase()+t.slice(1)}(t),n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(r).includes(t)&&(n[t]=r[t],delete r[t])})),"button"!==n.element||Object.keys(r).includes("type")||(r.type="button"),Object.keys(r).includes("class")?r.class.split(" ").some((function(t){return t===e.config.classNames.control}))||It(r,{class:"".concat(r.class," ").concat(this.config.classNames.control)}):r.class=this.config.classNames.control,t){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":r.class+=" ".concat(this.config.classNames.control,"--overlaid"),o="play",n.label="play",n.icon="play";break;default:Tt(n.label)&&(n.label=o),Tt(n.icon)&&(n.icon=t)}var a=Et(n.element);return n.toggle?(a.appendChild(Ci.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(Ci.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(Ci.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(Ci.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(Ci.createIcon.call(this,n.icon)),a.appendChild(Ci.createLabel.call(this,n.label))),It(r,Bt(this.config.selectors.buttons[o],r)),Mt(a,r),"play"===o?(mt(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange:function(t,i){var e=Et("input",It(Bt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":wi(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[t]=e,Ci.updateRangeFill.call(this,e),rt.setup(e),e},createProgress:function(t,i){var e=Et("progress",It(Bt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if("volume"!==t){e.appendChild(Et("span",null,"0"));var r={played:"played",buffer:"buffered"}[t],o=r?wi(r,this.config):"";e.innerText="% ".concat(o.toLowerCase())}return this.elements.display[t]=e,e},createTime:function(t,i){var e=Bt(this.config.selectors.display[t],i),r=Et("div",It(e,{class:"".concat(e.class?e.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":wi(t,this.config)}),"00:00");return this.elements.display[t]=r,r},bindMenuItemShortcuts:function(t,i){var e=this;Kt.call(this,t,"keydown keyup",(function(r){if([32,38,39,40].includes(r.which)&&(r.preventDefault(),r.stopPropagation(),"keydown"!==r.type)){var o,n=Vt(t,'[role="menuitemradio"]');!n&&[32,39].includes(r.which)?Ci.showMenuPanel.call(e,i,!0):32!==r.which&&(40===r.which||n&&39===r.which?wt(o=t.nextElementSibling)||(o=t.parentNode.firstElementChild):wt(o=t.previousElementSibling)||(o=t.parentNode.lastElementChild),Qt.call(e,o,!0))}}),!1),Kt.call(this,t,"keyup",(function(t){13===t.which&&Ci.focusFirstMenuItem.call(e,null,!0)}))},createMenuItem:function(t){var i=this,e=t.value,r=t.list,o=t.type,n=t.title,a=t.badge,s=void 0===a?null:a,l=t.checked,p=void 0!==l&&l,u=Bt(this.config.selectors.inputs[o]),d=Et("button",It(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:e})),c=Et("span");c.innerHTML=n,wt(s)&&c.appendChild(s),d.appendChild(c),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(t){t&&Array.from(d.parentNode.children).filter((function(t){return Vt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(d,"click keyup",(function(t){if(!xt(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),d.checked=!0,o){case"language":i.currentTrack=Number(e);break;case"quality":i.quality=e;break;case"speed":i.speed=parseFloat(e)}Ci.showMenuPanel.call(i,"home",xt(t))}}),o,!1),Ci.bindMenuItemShortcuts.call(this,d,o),r.appendChild(d)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return yt(t)?Si(t,ji(this.duration)>0,i):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];wt(t)&&yt(i)&&(t.innerText=Ci.formatTime(i,e))},updateVolume:function(){this.supported.ui&&(wt(this.elements.inputs.volume)&&Ci.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),wt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;wt(t)&&(t.value=i,Ci.updateRangeFill.call(this,t))},updateProgress:function(t){var i=this;if(this.supported.ui&&kt(t)){var e=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=function(t,i){return 0===t||0===i||Number.isNaN(t)||Number.isNaN(i)?0:(t/i*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&Ci.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":!function(t,e){var r=yt(e)?e:0,o=wt(t)?t:i.elements.display.buffer;if(wt(o)){o.value=r;var n=o.getElementsByTagName("span")[0];wt(n)&&(n.childNodes[0].nodeValue=r)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var i=kt(t)?t.target:t;if(wt(i)&&"range"===i.getAttribute("type")){if(Vt(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);var e=Ci.formatTime(this.currentTime),r=Ci.formatTime(this.duration),o=wi("seekLabel",this.config);i.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",r))}else if(Vt(i,this.config.selectors.inputs.volume)){var n=100*i.value;i.setAttribute("aria-valuenow",n),i.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else i.setAttribute("aria-valuenow",i.value);Pt.isWebkit&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip:function(t){var i=this;if(this.config.tooltips.seek&&wt(this.elements.inputs.seek)&&wt(this.elements.display.seekTooltip)&&0!==this.duration){var e="".concat(this.config.classNames.tooltip,"--visible"),r=function(t){return $t(i.elements.display.seekTooltip,e,t)};if(this.touch)r(!1);else{var o=0,n=this.elements.progress.getBoundingClientRect();if(kt(t))o=100/n.width*(t.pageX-n.left);else{if(!qt(this.elements.display.seekTooltip,e))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Ci.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),kt(t)&&["mouseenter","mouseleave"].includes(t.type)&&r("mouseenter"===t.type)}}},timeUpdate:function(t){var i=!wt(this.elements.display.duration)&&this.config.invertTime;Ci.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),t&&"timeupdate"===t.type&&this.media.seeking||Ci.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Dt(this.elements.display.currentTime,!0),void Dt(this.elements.progress,!0);wt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=wt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Ci.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Ci.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Ci.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,i){Dt(this.elements.settings.buttons[t],!i)},updateSetting:function(t,i,e){var r=this.elements.settings.panels[t],o=null,n=i;if("captions"===t)o=this.currentTrack;else{if(o=Tt(e)?this[t]:e,Tt(o)&&(o=this.config[t].default),!Tt(this.options[t])&&!this.options[t].includes(o))return void this.debug.warn("Unsupported value of '".concat(o,"' for ").concat(t));if(!this.config[t].options.includes(o))return void this.debug.warn("Disabled value of '".concat(o,"' for ").concat(t))}if(wt(n)||(n=r&&r.querySelector('[role="menu"]')),wt(n)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Ci.getLabel.call(this,t,o);var a=n&&n.querySelector('[value="'.concat(o,'"]'));wt(a)&&(a.checked=!0)}},getLabel:function(t,i){switch(t){case"speed":return 1===i?wi("normal",this.config):"".concat(i,"&times;");case"quality":if(yt(i)){if(0===i)return wi("auto",this.config);var e=wi("qualityLabel.".concat(i),this.config);return e.length?e:"".concat(i,"p")}return gi(i);case"captions":return Ii.getLabel.call(this);default:return null}},setQualityMenu:function(t){var i=this;if(wt(this.elements.settings.panels.quality)){var e="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');mt(t)&&(this.options.quality=oi(t).filter((function(t){return i.config.quality.options.includes(t)})));var o=!Tt(this.options.quality)&&this.options.quality.length>1;if(Ci.toggleMenuButton.call(this,e,o),Rt(r),Ci.checkMenu.call(this),o){var n=function(t){var e=wi("qualityBadge.".concat(t),i.config);return e.length?Ci.createBadge.call(i,e):null};this.options.quality.sort((function(t,e){var r=i.config.quality.options;return r.indexOf(t)>r.indexOf(e)?1:-1})).forEach((function(t){Ci.createMenuItem.call(i,{value:t,list:r,type:e,title:Ci.getLabel.call(i,"quality",t),badge:n(t)})})),Ci.updateSetting.call(this,e,r)}}},setCaptionsMenu:function(){var t=this;if(wt(this.elements.settings.panels.captions)){var i="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=Ii.getTracks.call(this),o=Boolean(r.length);if(Ci.toggleMenuButton.call(this,i,o),Rt(e),Ci.checkMenu.call(this),o){var n=r.map((function(i,r){return{value:r,checked:t.captions.toggled&&t.currentTrack===r,title:Ii.getLabel.call(t,i),badge:i.language&&Ci.createBadge.call(t,i.language.toUpperCase()),list:e,type:"language"}}));n.unshift({value:-1,checked:!this.captions.toggled,title:wi("disabled",this.config),list:e,type:"language"}),n.forEach(Ci.createMenuItem.bind(this)),Ci.updateSetting.call(this,i,e)}}},setSpeedMenu:function(){var t=this;if(wt(this.elements.settings.panels.speed)){var i="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(i){return i>=t.minimumSpeed&&i<=t.maximumSpeed}));var r=!Tt(this.options.speed)&&this.options.speed.length>1;Ci.toggleMenuButton.call(this,i,r),Rt(e),Ci.checkMenu.call(this),r&&(this.options.speed.forEach((function(r){Ci.createMenuItem.call(t,{value:r,list:e,type:i,title:Ci.getLabel.call(t,"speed",r)})})),Ci.updateSetting.call(this,i,e))}},checkMenu:function(){var t=this.elements.settings.buttons,i=!Tt(t)&&Object.values(t).some((function(t){return!t.hidden}));Dt(this.elements.settings.menu,!i)},focusFirstMenuItem:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var e=t;wt(e)||(e=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var r=e.querySelector('[role^="menuitem"]');Qt.call(this,r,i)}},toggleMenu:function(t){var i=this.elements.settings.popup,e=this.elements.buttons.settings;if(wt(i)&&wt(e)){var r=i.hidden,o=r;if(gt(t))o=t;else if(xt(t)&&27===t.which)o=!1;else if(kt(t)){var n=bt(t.composedPath)?t.composedPath()[0]:t.target,a=i.contains(n);if(a||!a&&t.target!==e&&o)return}e.setAttribute("aria-expanded",o),Dt(i,!o),$t(this.elements.container,this.config.classNames.menu.open,o),o&&xt(t)?Ci.focusFirstMenuItem.call(this,null,!0):o||r||Qt.call(this,e,xt(t))}},getMenuSize:function(t){var i=t.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),t.parentNode.appendChild(i);var e=i.scrollWidth,r=i.scrollHeight;return Lt(i),{width:e,height:r}},showMenuPanel:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(i));if(wt(r)){var o=r.parentNode,n=Array.from(o.children).find((function(t){return!t.hidden}));if(Yt.transitions&&!Yt.reducedMotion){o.style.width="".concat(n.scrollWidth,"px"),o.style.height="".concat(n.scrollHeight,"px");var a=Ci.getMenuSize.call(this,r),s=function i(e){e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",Xt.call(t,o,St,i))};Kt.call(this,o,St,s),o.style.width="".concat(a.width,"px"),o.style.height="".concat(a.height,"px")}Dt(n,!0),Dt(r,!1),Ci.focusFirstMenuItem.call(this,r,e)}},setDownloadUrl:function(){var t=this.elements.buttons.download;wt(t)&&t.setAttribute("href",this.download)},create:function(t){var i=this,e=Ci.bindMenuItemShortcuts,r=Ci.createButton,o=Ci.createProgress,n=Ci.createRange,a=Ci.createTime,s=Ci.setQualityMenu,l=Ci.setSpeedMenu,p=Ci.showMenuPanel;this.elements.controls=null,mt(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));var u=Et("div",Bt(this.config.selectors.controls.wrapper));this.elements.controls=u;var d={class:"plyr__controls__item"};return oi(mt(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&u.appendChild(r.call(i,"restart",d)),"rewind"===s&&u.appendChild(r.call(i,"rewind",d)),"play"===s&&u.appendChild(r.call(i,"play",d)),"fast-forward"===s&&u.appendChild(r.call(i,"fast-forward",d)),"progress"===s){var l=Et("div",{class:"".concat(d.class," plyr__progress__container")}),c=Et("div",Bt(i.config.selectors.progress));if(c.appendChild(n.call(i,"seek",{id:"plyr-seek-".concat(t.id)})),c.appendChild(o.call(i,"buffer")),i.config.tooltips.seek){var h=Et("span",{class:i.config.classNames.tooltip},"00:00");c.appendChild(h),i.elements.display.seekTooltip=h}i.elements.progress=c,l.appendChild(i.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(a.call(i,"currentTime",d)),"duration"===s&&u.appendChild(a.call(i,"duration",d)),"mute"===s||"volume"===s){var v=i.elements.volume;wt(v)&&u.contains(v)||(v=Et("div",It({},d,{class:"".concat(d.class," plyr__volume").trim()})),i.elements.volume=v,u.appendChild(v)),"mute"===s&&v.appendChild(r.call(i,"mute")),"volume"!==s||Pt.isIos||v.appendChild(n.call(i,"volume",It({max:1,step:.05,value:i.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===s&&u.appendChild(r.call(i,"captions",d)),"settings"===s&&!Tt(i.config.settings)){var y=Et("div",It({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));y.appendChild(r.call(i,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var f=Et("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),g=Et("div"),b=Et("div",{id:"plyr-settings-".concat(t.id,"-home")}),m=Et("div",{role:"menu"});b.appendChild(m),g.appendChild(b),i.elements.settings.panels.home=b,i.config.settings.forEach((function(r){var o=Et("button",It(Bt(i.config.selectors.buttons.settings),{type:"button",class:"".concat(i.config.classNames.control," ").concat(i.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(i,o,r),Kt.call(i,o,"click",(function(){p.call(i,r,!1)}));var n=Et("span",null,wi(r,i.config)),a=Et("span",{class:i.config.classNames.menu.value});a.innerHTML=t[r],n.appendChild(a),o.appendChild(n),m.appendChild(o);var s=Et("div",{id:"plyr-settings-".concat(t.id,"-").concat(r),hidden:""}),l=Et("button",{type:"button",class:"".concat(i.config.classNames.control," ").concat(i.config.classNames.control,"--back")});l.appendChild(Et("span",{"aria-hidden":!0},wi(r,i.config))),l.appendChild(Et("span",{class:i.config.classNames.hidden},wi("menuBack",i.config))),Kt.call(i,s,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(i,"home",!0))}),!1),Kt.call(i,l,"click",(function(){p.call(i,"home",!1)})),s.appendChild(l),s.appendChild(Et("div",{role:"menu"})),g.appendChild(s),i.elements.settings.buttons[r]=o,i.elements.settings.panels[r]=s})),f.appendChild(g),y.appendChild(f),u.appendChild(y),i.elements.settings.popup=f,i.elements.settings.menu=y}if("pip"===s&&Yt.pip&&u.appendChild(r.call(i,"pip",d)),"airplay"===s&&Yt.airplay&&u.appendChild(r.call(i,"airplay",d)),"download"===s){var _=It({},d,{element:"a",href:i.download,target:"_blank"});i.isHTML5&&(_.download=""),!jt(i.config.urls.download)&&i.isEmbed&&It(_,{icon:"logo-".concat(i.provider),label:i.provider}),u.appendChild(r.call(i,"download",_))}"fullscreen"===s&&u.appendChild(r.call(i,"fullscreen",d))})),this.isHTML5&&s.call(this,hi.getQualityOptions.call(this)),l.call(this),u},inject:function(){var t=this;if(this.config.loadSprite){var i=Ci.getIconUrl.call(this);i.cors&&zi(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var e=null;this.elements.controls=null;var r,n={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(bt(this.config.controls)&&(this.config.controls=this.config.controls.call(this,n)),this.config.controls||(this.config.controls=[]),wt(this.config.controls)||ft(this.config.controls)?e=this.config.controls:(e=Ci.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ii.getLabel.call(this)}),a=!1),a&&ft(this.config.controls)&&(e=function(t){var i=t;return Object.entries(n).forEach((function(t){var e=o(t,2),r=e[1];i=fi(i,"{".concat(e[0],"}"),r)})),i}(e)),ft(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),wt(r)||(r=this.elements.container),r[wt(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),wt(this.elements.controls)||Ci.findElements.call(this),!Tt(this.elements.buttons)){var s=function(i){var e=t.config.classNames.controlPressed;Object.defineProperty(i,"pressed",{enumerable:!0,get:function(){return qt(i,e)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];$t(i,e,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){mt(t)||_t(t)?Array.from(t).filter(Boolean).forEach(s):s(t)}))}if(Pt.isEdge&&Ct(r),this.config.tooltips.controls){var l=this.config,p=l.classNames,u=l.selectors,d="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),c=Ht.call(this,d);Array.from(c).forEach((function(i){$t(i,t.config.classNames.hidden,!1),$t(i,t.config.classNames.tooltip,!0)}))}}};function Pi(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;if(i){var r=document.createElement("a");r.href=e,e=r.href}try{return new URL(e)}catch(t){return null}}function Oi(t){var i=new URLSearchParams;return vt(t)&&Object.entries(t).forEach((function(t){var e=o(t,2);i.set(e[0],e[1])})),i}var Ii={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Yt.textTracks)mt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ci.setCaptionsMenu.call(this);else{if(wt(this.elements.captions)||(this.elements.captions=Et("div",Bt(this.config.selectors.captions)),function(t,i){wt(t)&&wt(i)&&i.parentNode.insertBefore(t,i.nextSibling)}(this.elements.captions,this.elements.wrapper)),Pt.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var i=t.getAttribute("src"),e=Pi(i);null!==e&&e.hostname!==window.location.href.hostname&&["http:","https:"].includes(e.protocol)&&xi(i,"blob").then((function(i){t.setAttribute("src",window.URL.createObjectURL(i))})).catch((function(){Lt(t)}))}))}var i=oi((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===e&&(e=o(i,1)[0]);var r=this.storage.get("captions");gt(r)||(r=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:r,language:e,languages:i}),this.isHTML5&&Kt.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",Ii.update.bind(this)),setTimeout(Ii.update.bind(this),0)}},update:function(){var t=this,i=Ii.getTracks.call(this,!0),e=this.captions,r=e.active,o=e.language,n=e.meta,a=e.currentTrackNode,s=Boolean(i.find((function(t){return t.language===o})));this.isHTML5&&this.isVideo&&i.filter((function(t){return!n.get(t)})).forEach((function(i){t.debug.log("Track added",i),n.set(i,{default:"showing"===i.mode}),"showing"===i.mode&&(i.mode="hidden"),Kt.call(t,i,"cuechange",(function(){return Ii.updateCues.call(t)}))})),(s&&this.language!==o||!i.includes(a))&&(Ii.setLanguage.call(this,o),Ii.toggle.call(this,r&&s)),this.elements&&$t(this.elements.container,this.config.classNames.captions.enabled,!Tt(i)),mt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ci.setCaptionsMenu.call(this)},toggle:function(t){var i=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var r=this.captions.toggled,o=this.config.classNames.captions.active,n=ht(t)?!r:t;if(n!==r){if(e||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!e){var a=Ii.getTracks.call(this),s=Ii.findTrack.call(this,[this.captions.language].concat(u(this.captions.languages)),!0);return this.captions.language=s.language,void Ii.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),$t(this.elements.container,o,n),this.captions.toggled=n,Ci.updateSetting.call(this,"captions"),ti.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout((function(){n&&i.captions.toggled&&i.captions.currentTrackNode&&(i.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=Ii.getTracks.call(this);if(-1!==t)if(yt(t))if(t in e){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var r=e[t],o=r||{},n=o.language;this.captions.currentTrackNode=r,Ci.updateSetting.call(this,"captions"),i||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),ti.call(this,this.media,"languagechange")}Ii.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&Ii.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Ii.toggle.call(this,!1,i)},setLanguage:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(ft(t)){var e=t.toLowerCase();this.captions.language=e;var r=Ii.getTracks.call(this),o=Ii.findTrack.call(this,[e]);Ii.set.call(this,r.indexOf(o),i)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(e){return!t.isHTML5||i||t.captions.meta.has(e)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var i,e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Ii.getTracks.call(this),n=function(t){return Number((e.captions.meta.get(t)||{}).default)},a=Array.from(o).sort((function(t,i){return n(i)-n(t)}));return t.every((function(t){return!(i=a.find((function(i){return i.language===t})))})),i||(r?a[0]:void 0)},getCurrentTrack:function(){return Ii.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var i=t;return!zt(i)&&Yt.textTracks&&this.captions.toggled&&(i=Ii.getCurrentTrack.call(this)),zt(i)?Tt(i.label)?Tt(i.language)?wi("enabled",this.config):t.language.toUpperCase():i.label:wi("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(wt(this.elements.captions))if(ht(t)||Array.isArray(t)){var i=t;if(!i){var e=Ii.getCurrentTrack.call(this);i=Array.from((e||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(mi)}var r=i.map((function(t){return t.trim()})).join("\n");if(r!==this.elements.captions.innerHTML){Rt(this.elements.captions);var o=Et("span",Bt(this.config.selectors.caption));o.innerHTML=r,this.elements.captions.appendChild(o),ti.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},Ai={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.9/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Mi={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ei=function(){},Fi=function(){function t(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];p(this,t),this.enabled=window.console&&i,this.enabled&&this.log("Debugging enabled")}return s(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Ei}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ei}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Ei}}]),t}(),Li=function(){function t(i){var e=this;p(this,t),L(this,"onChange",(function(){if(e.enabled){var t=e.player.elements.buttons.fullscreen;wt(t)&&(t.pressed=e.active),ti.call(e.player,e.target===e.player.media?e.target:e.player.elements.container,e.active?"enterfullscreen":"exitfullscreen",!0)}})),L(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?e.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(e.scrollPosition.x,e.scrollPosition.y),document.body.style.overflow=t?"hidden":"",$t(e.target,e.player.config.classNames.fullscreen.fallback,t),Pt.isIos){var i=document.head.querySelector('meta[name="viewport"]'),r="viewport-fit=cover";i||(i=document.createElement("meta")).setAttribute("name","viewport");var o=ft(i.content)&&i.content.includes(r);t?(e.cleanupViewport=!o,o||(i.content+=",".concat(r))):e.cleanupViewport&&(i.content=i.content.split(",").filter((function(t){return t.trim()!==r})).join(","))}e.onChange()})),L(this,"trapFocus",(function(t){if(!Pt.isIos&&e.active&&"Tab"===t.key&&9===t.keyCode){var i=document.activeElement,r=Ht.call(e.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),n=o(r,1)[0],a=r[r.length-1];i!==a||t.shiftKey?i===n&&t.shiftKey&&(a.focus(),t.preventDefault()):(n.focus(),t.preventDefault())}})),L(this,"update",(function(){e.player.debug.log(e.enabled?"".concat(e.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),$t(e.player.elements.container,e.player.config.classNames.fullscreen.enabled,e.enabled)})),L(this,"enter",(function(){e.enabled&&(Pt.isIos&&e.player.config.fullscreen.iosNative?e.player.isVimeo?e.player.embed.requestFullscreen():e.target.webkitEnterFullscreen():!t.native||e.forceFallback?e.toggleFallback(!0):e.prefix?Tt(e.prefix)||e.target["".concat(e.prefix,"Request").concat(e.property)]():e.target.requestFullscreen({navigationUI:"hide"}))})),L(this,"exit",(function(){if(e.enabled)if(Pt.isIos&&e.player.config.fullscreen.iosNative)e.target.webkitExitFullscreen(),ri(e.player.play());else if(!t.native||e.forceFallback)e.toggleFallback(!1);else if(e.prefix){if(!Tt(e.prefix)){var i="moz"===e.prefix?"Cancel":"Exit";document["".concat(e.prefix).concat(i).concat(e.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),L(this,"toggle",(function(){e.active?e.exit():e.enter()})),this.player=i,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===i.config.fullscreen.fallback,this.player.elements.fullscreen=i.config.fullscreen.container&&function(t,i){return(Element.prototype.closest||function(){var t=this;do{if(Vt.matches(t,i))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,i)}(this.player.elements.container,i.config.fullscreen.container),Kt.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){e.onChange()})),Kt.call(this.player,this.player.elements.container,"dblclick",(function(t){wt(e.player.elements.controls)&&e.player.elements.controls.contains(t.target)||e.player.listeners.proxy(t,e.toggle,"fullscreen")})),Kt.call(this,this.player.elements.container,"keydown",(function(t){return e.trapFocus(t)})),this.update()}return s(t,[{key:"usingNative",get:function(){return t.native&&!this.forceFallback}},{key:"enabled",get:function(){return(t.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!t.native||this.forceFallback)return qt(this.target,this.player.config.classNames.fullscreen.fallback);var i=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}},{key:"target",get:function(){return Pt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(bt(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(i){return!(!bt(document["".concat(i,"ExitFullscreen")])&&!bt(document["".concat(i,"CancelFullScreen")])||(t=i,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),t}();function Ri(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,r){var o=new Image,n=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=i?e:r)(o)};Object.assign(o,{onload:n,onerror:n,src:t})}))}var Ni={addStyleHook:function(){$t(this.elements.container,this.config.selectors.container.replace(".",""),!0),$t(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void Ni.toggleNativeControls.call(this,!0);wt(this.elements.controls)||(Ci.inject.call(this),this.listeners.controls()),Ni.toggleNativeControls.call(this),this.isHTML5&&Ii.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ci.updateVolume.call(this),Ci.timeUpdate.call(this),Ci.durationUpdate.call(this),Ni.checkPlaying.call(this),$t(this.elements.container,this.config.classNames.pip.supported,Yt.pip&&this.isHTML5&&this.isVideo),$t(this.elements.container,this.config.classNames.airplay.supported,Yt.airplay&&this.isHTML5),$t(this.elements.container,this.config.classNames.isIos,Pt.isIos),$t(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){ti.call(t,t.media,"ready")}),0),Ni.setTitle.call(this),this.poster&&Ni.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Ci.durationUpdate.call(this)},setTitle:function(){var t=wi("play",this.config);if(ft(this.config.title)&&!Tt(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(i){i.setAttribute("aria-label",t)})),this.isEmbed){var i=Ut.call(this,"iframe");if(!wt(i))return;var e=Tt(this.config.title)?"video":this.config.title,r=wi("frameTitle",this.config);i.setAttribute("title",r.replace("{title}",e))}},togglePoster:function(t){$t(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var i=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),ei.call(this).then((function(){return Ri(t)})).catch((function(e){throw t===i.poster&&Ni.togglePoster.call(i,!1),e})).then((function(){if(t!==i.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(i.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),Ni.togglePoster.call(i,!0),t})))},checkPlaying:function(t){var i=this;$t(this.elements.container,this.config.classNames.playing,this.playing),$t(this.elements.container,this.config.classNames.paused,this.paused),$t(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:i.playing}),t.setAttribute("aria-label",wi(i.playing?"pause":"play",i.config))})),kt(t)&&"timeupdate"===t.type||Ni.toggleControls.call(this)},checkLoading:function(t){var i=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){$t(i.elements.container,i.config.classNames.loading,i.loading),Ni.toggleControls.call(i)}),this.loading?250:0)},toggleControls:function(t){var i=this.elements.controls;if(i&&this.config.hideControls){var e=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||i.pressed||i.hover||e))}},migrateStyles:function(){var t=this;Object.values(n({},this.media.style)).filter((function(t){return!Tt(t)&&ft(t)&&t.startsWith("--plyr")})).forEach((function(i){t.elements.container.style.setProperty(i,t.media.style.getPropertyValue(i)),t.media.style.removeProperty(i)})),Tt(this.media.style)&&this.media.removeAttribute("style")}},Bi=function(){function t(i){var e=this;p(this,t),L(this,"firstTouch",(function(){var t=e.player,i=t.elements;t.touch=!0,$t(i.container,t.config.classNames.isTouch,!0)})),L(this,"setTabFocus",(function(t){var i=e.player,r=i.elements;clearTimeout(e.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(e.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-e.lastKeyDown<=20)&&(function(){var t=i.config.classNames.tabFocus;$t(Ht.call(i,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(e.focusTimer=setTimeout((function(){var t=document.activeElement;r.container.contains(t)&&$t(document.activeElement,i.config.classNames.tabFocus,!0)}),10))))})),L(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=e.player;i.config.keyboard.global&&Gt.call(i,window,"keydown keyup",e.handleKey,t,!1),Gt.call(i,document.body,"click",e.toggleMenu,t),Zt.call(i,document.body,"touchstart",e.firstTouch),Gt.call(i,document.body,"keydown focus blur focusout",e.setTabFocus,t,!1,!0)})),L(this,"container",(function(){var t=e.player,i=t.config,r=t.elements,n=t.timers;!i.keyboard.global&&i.keyboard.focused&&Kt.call(t,r.container,"keydown keyup",e.handleKey,!1),Kt.call(t,r.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(i){var e=r.controls;e&&"enterfullscreen"===i.type&&(e.pressed=!1,e.hover=!1);var o=0;["touchstart","touchmove","mousemove"].includes(i.type)&&(Ni.toggleControls.call(t,!0),o=t.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((function(){return Ni.toggleControls.call(t,!1)}),o)}));var a=function(){if(t.isVimeo&&!t.config.vimeo.premium){var i=r.wrapper,e=t.fullscreen.active,n=ui.call(t),a=o(n,2),s=a[0],l=a[1],p=ai("aspect-ratio: ".concat(s," / ").concat(l));if(e){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],d=o(u,2),c=d[1],h=d[0]/c>s/l;p?(i.style.width=h?"auto":"100%",i.style.height=h?"100%":"auto"):(i.style.maxWidth=h?c/l*s+"px":null,i.style.margin=h?"0 auto":null)}else p?(i.style.width=null,i.style.height=null):(i.style.maxWidth=null,i.style.margin=null)}},s=function(){clearTimeout(n.resized),n.resized=setTimeout(a,50)};Kt.call(t,r.container,"enterfullscreen exitfullscreen",(function(i){t.fullscreen.target===r.container&&(!t.isEmbed&&Tt(t.config.ratio)||(a(),("enterfullscreen"===i.type?Kt:Xt).call(t,window,"resize",s)))}))})),L(this,"media",(function(){var t=e.player,i=t.elements;if(Kt.call(t,t.media,"timeupdate seeking seeked",(function(i){return Ci.timeUpdate.call(t,i)})),Kt.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(i){return Ci.durationUpdate.call(t,i)})),Kt.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),Kt.call(t,t.media,"progress playing seeking seeked",(function(i){return Ci.updateProgress.call(t,i)})),Kt.call(t,t.media,"volumechange",(function(i){return Ci.updateVolume.call(t,i)})),Kt.call(t,t.media,"playing play pause ended emptied timeupdate",(function(i){return Ni.checkPlaying.call(t,i)})),Kt.call(t,t.media,"waiting canplay seeked playing",(function(i){return Ni.checkLoading.call(t,i)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var r=Ut.call(t,".".concat(t.config.classNames.video));if(!wt(r))return;Kt.call(t,i.container,"click",(function(o){([i.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(o,t.restart,"restart"),e.proxy(o,(function(){ri(t.play())}),"play")):e.proxy(o,(function(){ri(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&Kt.call(t,i.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),Kt.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),Kt.call(t,t.media,"ratechange",(function(){Ci.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),Kt.call(t,t.media,"qualitychange",(function(i){Ci.updateSetting.call(t,"quality",null,i.detail.quality)})),Kt.call(t,t.media,"ready qualitychange",(function(){Ci.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");Kt.call(t,t.media,o,(function(e){var r=e.detail,o=void 0===r?{}:r;"error"===e.type&&(o=t.media.error),ti.call(t,i.container,e.type,!0,o)}))})),L(this,"proxy",(function(t,i,r){var o=e.player,n=o.config.listeners[r],a=!0;bt(n)&&(a=n.call(o,t)),!1!==a&&bt(i)&&i.call(o,t)})),L(this,"bind",(function(t,i,r,o){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e.player,s=a.config.listeners[o],l=bt(s);Kt.call(a,t,i,(function(t){return e.proxy(t,r,o)}),n&&!l)})),L(this,"controls",(function(){var t=e.player,i=t.elements,r=Pt.isIE?"change":"input";if(i.buttons.play&&Array.from(i.buttons.play).forEach((function(i){e.bind(i,"click",(function(){ri(t.togglePlay())}),"play")})),e.bind(i.buttons.restart,"click",t.restart,"restart"),e.bind(i.buttons.rewind,"click",(function(){t.lastSeekTime=Date.now(),t.rewind()}),"rewind"),e.bind(i.buttons.fastForward,"click",(function(){t.lastSeekTime=Date.now(),t.forward()}),"fastForward"),e.bind(i.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),e.bind(i.buttons.captions,"click",(function(){return t.toggleCaptions()})),e.bind(i.buttons.download,"click",(function(){ti.call(t,t.media,"download")}),"download"),e.bind(i.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),e.bind(i.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),e.bind(i.buttons.airplay,"click",t.airplay,"airplay"),e.bind(i.buttons.settings,"click",(function(i){i.stopPropagation(),i.preventDefault(),Ci.toggleMenu.call(t,i)}),null,!1),e.bind(i.buttons.settings,"keyup",(function(i){var e=i.which;[13,32].includes(e)&&(13!==e?(i.preventDefault(),i.stopPropagation(),Ci.toggleMenu.call(t,i)):Ci.focusFirstMenuItem.call(t,null,!0))}),null,!1),e.bind(i.settings.menu,"keydown",(function(i){27===i.which&&Ci.toggleMenu.call(t,i)})),e.bind(i.inputs.seek,"mousedown mousemove",(function(t){var e=i.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/e.width*(t.pageX-e.left))})),e.bind(i.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(i){var e=i.currentTarget,r=i.keyCode?i.keyCode:i.which,o="play-on-seeked";if(!xt(i)||39===r||37===r){t.lastSeekTime=Date.now();var n=e.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(i.type);n&&a?(e.removeAttribute(o),ri(t.play())):!a&&t.playing&&(e.setAttribute(o,""),t.pause())}})),Pt.isIos){var n=Ht.call(t,'input[type="range"]');Array.from(n).forEach((function(t){return e.bind(t,r,(function(t){return Ct(t.target)}))}))}e.bind(i.inputs.seek,r,(function(i){var e=i.currentTarget,r=e.getAttribute("seek-value");Tt(r)&&(r=e.value),e.removeAttribute("seek-value"),t.currentTime=r/e.max*t.duration}),"seek"),e.bind(i.progress,"mouseenter mouseleave mousemove",(function(i){return Ci.updateSeekTooltip.call(t,i)})),e.bind(i.progress,"mousemove touchmove",(function(i){var e=t.previewThumbnails;e&&e.loaded&&e.startMove(i)})),e.bind(i.progress,"mouseleave touchend click",(function(){var i=t.previewThumbnails;i&&i.loaded&&i.endMove(!1,!0)})),e.bind(i.progress,"mousedown touchstart",(function(i){var e=t.previewThumbnails;e&&e.loaded&&e.startScrubbing(i)})),e.bind(i.progress,"mouseup touchend",(function(i){var e=t.previewThumbnails;e&&e.loaded&&e.endScrubbing(i)})),Pt.isWebkit&&Array.from(Ht.call(t,'input[type="range"]')).forEach((function(i){e.bind(i,"input",(function(i){return Ci.updateRangeFill.call(t,i.target)}))})),t.config.toggleInvert&&!wt(i.display.duration)&&e.bind(i.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Ci.timeUpdate.call(t))})),e.bind(i.inputs.volume,r,(function(i){t.volume=i.target.value}),"volume"),e.bind(i.controls,"mouseenter mouseleave",(function(e){i.controls.hover=!t.touch&&"mouseenter"===e.type})),i.fullscreen&&Array.from(i.fullscreen.children).filter((function(t){return!t.contains(i.container)})).forEach((function(r){e.bind(r,"mouseenter mouseleave",(function(e){i.controls&&(i.controls.hover=!t.touch&&"mouseenter"===e.type)}))})),e.bind(i.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){i.controls.pressed=["mousedown","touchstart"].includes(t.type)})),e.bind(i.controls,"focusin",(function(){var r=t.config,o=t.timers;$t(i.controls,r.classNames.noTransition,!0),Ni.toggleControls.call(t,!0),setTimeout((function(){$t(i.controls,r.classNames.noTransition,!1)}),0);var n=e.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return Ni.toggleControls.call(t,!1)}),n)})),e.bind(i.inputs.volume,"wheel",(function(i){var e=i.webkitDirectionInvertedFromDevice,r=[i.deltaX,-i.deltaY].map((function(t){return e?-t:t})),n=o(r,2),a=n[0],s=n[1],l=Math.sign(Math.abs(a)>Math.abs(s)?a:s);t.increaseVolume(l/50);var p=t.media.volume;(1===l&&p<1||-1===l&&p>0)&&i.preventDefault()}),"volume",!1)})),this.player=i,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return s(t,[{key:"handleKey",value:function(t){var i=this.player,e=i.elements,r=t.keyCode?t.keyCode:t.which,o="keydown"===t.type,n=o&&r===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&yt(r))if(o){var a=document.activeElement;if(wt(a)){if(a!==e.inputs.seek&&Vt(a,i.config.selectors.editable))return;if(32===t.which&&Vt(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(r)&&(t.preventDefault(),t.stopPropagation()),r){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:n||(i.currentTime=i.duration/10*(r-48));break;case 32:case 75:n||ri(i.togglePlay());break;case 38:i.increaseVolume(.1);break;case 40:i.decreaseVolume(.1);break;case 77:n||(i.muted=!i.muted);break;case 39:i.forward();break;case 37:i.rewind();break;case 70:i.fullscreen.toggle();break;case 67:n||i.toggleCaptions();break;case 76:i.loop=!i.loop}27===r&&!i.fullscreen.usingNative&&i.fullscreen.active&&i.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Ci.toggleMenu.call(this.player,t)}}]),t}(),Di=function(t,i){return function(t){t.exports=function(){var t=function(){},i={},e={},r={};function o(t,i){if(t){var o=r[t];if(e[t]=i,o)for(;o.length;)o[0](t,i),o.splice(0,1)}}function n(i,e){i.call&&(i={success:i}),e.length?(i.error||t)(e):(i.success||t)(i)}function a(i,e,r,o){var n,s,l=document,p=r.async,u=(r.numRetries||0)+1,d=r.before||t,c=i.replace(/[\?|#].*$/,""),h=i.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(c)?((s=l.createElement("link")).rel="stylesheet",s.href=h,(n="hideFocus"in s)&&s.relList&&(n=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(c)?(s=l.createElement("img")).src=h:((s=l.createElement("script")).src=i,s.async=void 0===p||p),s.onload=s.onerror=s.onbeforeload=function(t){var l=t.type[0];if(n)try{s.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((o+=1)<u)return a(i,e,r,o)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";e(i,l,t.defaultPrevented)},!1!==d(i,s)&&l.head.appendChild(s)}function s(t,i,e){var r,o,n=(t=t.push?t:[t]).length,s=n,l=[];for(r=function(t,e,r){if("e"==e&&l.push(t),"b"==e){if(!r)return;l.push(t)}--n||i(l)},o=0;o<s;o++)a(t[o],r,e)}function l(t,e,r){var a,l;if(e&&e.trim&&(a=e),l=(a?r:e)||{},a){if(a in i)throw"LoadJS";i[a]=!0}function p(i,e){s(t,(function(t){n(l,t),i&&n({success:i,error:e},t),o(a,t)}),l)}if(l.returnPromise)return new Promise(p);p()}return l.ready=function(t,i){return function(t,i){var o,n,a,s=[],l=(t=t.push?t:[t]).length,p=l;for(o=function(t,e){e.length&&s.push(t),--p||i(s)};l--;)(a=e[n=t[l]])?o(n,a):(r[n]=r[n]||[]).push(o)}(t,(function(t){n(i,t)})),l},l.done=function(t){o(t,[])},l.reset=function(){i={},e={},r={}},l.isDefined=function(t){return t in i},l}()}(i={exports:{}}),i.exports}();function $i(t){return new Promise((function(i,e){Di(t,{success:i,error:e})}))}function qi(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ti.call(this,this.media,t?"play":"pause"))}var Vi={setup:function(){var t=this;$t(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,di.call(t),vt(window.Vimeo)?Vi.ready.call(t):$i(t.config.urls.vimeo.sdk).then((function(){Vi.ready.call(t)})).catch((function(i){t.debug.warn("Vimeo SDK (player.js) failed to load",i)}))},ready:function(){var t=this,i=this,e=i.config.vimeo,r=e.premium,a=e.referrerPolicy,s=d(e,F),l=i.media.getAttribute("src"),p="";Tt(l)?(l=i.media.getAttribute(i.config.attributes.embed.id),p=i.media.getAttribute(i.config.attributes.embed.hash)):p=function(t){var i=t.match(c(/^.*(?:vimeo.com\/|video\/)(?:[0-9]+)(?:\?.*&*h=|\/)+([,0-9a-f]+)/,{hash:1}));return i?i.groups.hash:null}(l);var u=p?{h:p}:{};r&&Object.assign(s,{controls:!1,sidedock:!1});var h=Oi(n(n({loop:i.config.loop.active,autoplay:i.autoplay,muted:i.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},u),s)),v=function(t){return Tt(t)?null:yt(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(l),y=Et("iframe"),f=yi(i.config.urls.vimeo.iframe,v,h);if(y.setAttribute("src",f),y.setAttribute("allowfullscreen",""),y.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Tt(a)||y.setAttribute("referrerPolicy",a),r||!e.customControls)y.setAttribute("data-poster",i.poster),i.media=Nt(y,i.media);else{var g=Et("div",{class:i.config.classNames.embedContainer,"data-poster":i.poster});g.appendChild(y),i.media=Nt(g,i.media)}e.customControls||xi(yi(i.config.urls.vimeo.api,f)).then((function(t){!Tt(t)&&t.thumbnail_url&&Ni.setPoster.call(i,t.thumbnail_url).catch((function(){}))})),i.embed=new window.Vimeo.Player(y,{autopause:i.config.autopause,muted:i.muted}),i.media.paused=!0,i.media.currentTime=0,i.supported.ui&&i.embed.disableTextTrack(),i.media.play=function(){return qi.call(i,!0),i.embed.play()},i.media.pause=function(){return qi.call(i,!1),i.embed.pause()},i.media.stop=function(){i.pause(),i.currentTime=0};var b=i.media.currentTime;Object.defineProperty(i.media,"currentTime",{get:function(){return b},set:function(t){var e=i.embed,r=i.media,o=i.volume,n=i.paused&&!e.hasPlayed;r.seeking=!0,ti.call(i,r,"seeking"),Promise.resolve(n&&e.setVolume(0)).then((function(){return e.setCurrentTime(t)})).then((function(){return n&&e.pause()})).then((function(){return n&&e.setVolume(o)})).catch((function(){}))}});var m=i.config.speed.selected;Object.defineProperty(i.media,"playbackRate",{get:function(){return m},set:function(t){i.embed.setPlaybackRate(t).then((function(){m=t,ti.call(i,i.media,"ratechange")})).catch((function(){i.options.speed=[1]}))}});var _=i.config.volume;Object.defineProperty(i.media,"volume",{get:function(){return _},set:function(t){i.embed.setVolume(t).then((function(){_=t,ti.call(i,i.media,"volumechange")}))}});var w=i.config.muted;Object.defineProperty(i.media,"muted",{get:function(){return w},set:function(t){var e=!!gt(t)&&t;i.embed.setVolume(e?0:i.config.volume).then((function(){w=e,ti.call(i,i.media,"volumechange")}))}});var k,x=i.config.loop;Object.defineProperty(i.media,"loop",{get:function(){return x},set:function(t){var e=gt(t)?t:i.config.loop.active;i.embed.setLoop(e).then((function(){x=e}))}}),i.embed.getVideoUrl().then((function(t){k=t,Ci.setDownloadUrl.call(i)})).catch((function(i){t.debug.warn(i)})),Object.defineProperty(i.media,"currentSrc",{get:function(){return k}}),Object.defineProperty(i.media,"ended",{get:function(){return i.currentTime===i.duration}}),Promise.all([i.embed.getVideoWidth(),i.embed.getVideoHeight()]).then((function(e){var r=o(e,2);i.embed.ratio=ci(r[0],r[1]),di.call(t)})),i.embed.setAutopause(i.config.autopause).then((function(t){i.config.autopause=t})),i.embed.getVideoTitle().then((function(e){i.config.title=e,Ni.setTitle.call(t)})),i.embed.getCurrentTime().then((function(t){b=t,ti.call(i,i.media,"timeupdate")})),i.embed.getDuration().then((function(t){i.media.duration=t,ti.call(i,i.media,"durationchange")})),i.embed.getTextTracks().then((function(t){i.media.textTracks=t,Ii.setup.call(i)})),i.embed.on("loaded",(function(){i.embed.getPaused().then((function(t){qi.call(i,!t),t||ti.call(i,i.media,"playing")})),wt(i.embed.element)&&i.supported.ui&&i.embed.element.setAttribute("tabindex",-1)})),i.embed.on("bufferstart",(function(){ti.call(i,i.media,"waiting")})),i.embed.on("bufferend",(function(){ti.call(i,i.media,"playing")})),i.embed.on("play",(function(){qi.call(i,!0),ti.call(i,i.media,"playing")})),i.embed.on("pause",(function(){qi.call(i,!1)})),i.embed.on("timeupdate",(function(t){i.media.seeking=!1,b=t.seconds,ti.call(i,i.media,"timeupdate")})),i.embed.on("progress",(function(t){i.media.buffered=t.percent,ti.call(i,i.media,"progress"),1===parseInt(t.percent,10)&&ti.call(i,i.media,"canplaythrough"),i.embed.getDuration().then((function(t){t!==i.media.duration&&(i.media.duration=t,ti.call(i,i.media,"durationchange"))}))})),i.embed.on("seeked",(function(){i.media.seeking=!1,ti.call(i,i.media,"seeked")})),i.embed.on("ended",(function(){i.media.paused=!0,ti.call(i,i.media,"ended")})),i.embed.on("error",(function(t){i.media.error=t,ti.call(i,i.media,"error")})),e.customControls&&setTimeout((function(){return Ni.build.call(i)}),0)}};function Hi(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ti.call(this,this.media,t?"play":"pause"))}function Ui(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Qi,Wi,Yi,Ji,Gi,Ki,Xi={setup:function(){var t=this;if($t(this.elements.wrapper,this.config.classNames.embed,!0),vt(window.YT)&&bt(window.YT.Player))Xi.ready.call(this);else{var i=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){bt(i)&&i(),Xi.ready.call(t)},$i(this.config.urls.youtube.sdk).catch((function(i){t.debug.warn("YouTube API failed to load",i)}))}},getTitle:function(t){var i=this;xi(yi(this.config.urls.youtube.api,t)).then((function(t){if(vt(t)){var e=t.height,r=t.width;i.config.title=t.title,Ni.setTitle.call(i),i.embed.ratio=ci(r,e)}di.call(i)})).catch((function(){di.call(i)}))},ready:function(){var t=this,i=t.config.youtube,e=t.media&&t.media.getAttribute("id");if(Tt(e)||!e.startsWith("youtube-")){var r=t.media.getAttribute("src");Tt(r)&&(r=t.media.getAttribute(this.config.attributes.embed.id));var o=function(t){return Tt(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(r),n=Et("div",{id:vi(t.provider),"data-poster":i.customControls?t.poster:void 0});if(t.media=Nt(n,t.media),i.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};Ri(a("maxres"),121).catch((function(){return Ri(a("sd"),121)})).catch((function(){return Ri(a("hq"))})).then((function(i){return Ni.setPoster.call(t,i.src)})).then((function(i){i.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:Ui(i),playerVars:It({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},i),events:{onError:function(i){if(!t.media.error){var e=i.data;t.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},ti.call(t,t.media,"error")}},onPlaybackRateChange:function(i){t.media.playbackRate=i.target.getPlaybackRate(),ti.call(t,t.media,"ratechange")},onReady:function(e){if(!bt(t.media.play)){var r=e.target;Xi.getTitle.call(t,o),t.media.play=function(){Hi.call(t,!0),r.playVideo()},t.media.pause=function(){Hi.call(t,!1),r.pauseVideo()},t.media.stop=function(){r.stopVideo()},t.media.duration=r.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(r.getCurrentTime())},set:function(i){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,ti.call(t,t.media,"seeking"),r.seekTo(i)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return r.getPlaybackRate()},set:function(t){r.setPlaybackRate(t)}});var n=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return n},set:function(i){r.setVolume(100*(n=i)),ti.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(i){var e=gt(i)?i:a;a=e,r[e?"mute":"unMute"](),r.setVolume(100*n),ti.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return r.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var s=r.getAvailablePlaybackRates();t.options.speed=s.filter((function(i){return t.config.speed.options.includes(i)})),t.supported.ui&&i.customControls&&t.media.setAttribute("tabindex",-1),ti.call(t,t.media,"timeupdate"),ti.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=r.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&ti.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),ti.call(t,t.media,"canplaythrough"))}),200),i.customControls&&setTimeout((function(){return Ni.build.call(t)}),50)}},onStateChange:function(e){var r=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,ti.call(t,t.media,"seeked")),e.data){case-1:ti.call(t,t.media,"timeupdate"),t.media.buffered=r.getVideoLoadedFraction(),ti.call(t,t.media,"progress");break;case 0:Hi.call(t,!1),t.media.loop?(r.stopVideo(),r.playVideo()):ti.call(t,t.media,"ended");break;case 1:i.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(Hi.call(t,!0),ti.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){ti.call(t,t.media,"timeupdate")}),50),t.media.duration!==r.getDuration()&&(t.media.duration=r.getDuration(),ti.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),Hi.call(t,!1);break;case 3:ti.call(t,t.media,"waiting")}ti.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}}},Zi={setup:function(){this.media?($t(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),$t(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&$t(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Et("div",{class:this.config.classNames.video}),At(this.media,this.elements.wrapper),this.elements.poster=Et("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?hi.setup.call(this):this.isYouTube?Xi.setup.call(this):this.isVimeo&&Vi.setup.call(this)):this.debug.warn("No media element found!")}},te=function(){function t(i){var e=this;p(this,t),L(this,"load",(function(){e.enabled&&(vt(window.google)&&vt(window.google.ima)?e.ready():$i(e.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))})),L(this,"ready",(function(){var t;e.enabled||((t=e).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),e.startSafetyTimer(12e3,"ready()"),e.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),e.listeners(),e.setupIMA()})),L(this,"setupIMA",(function(){e.elements.container=Et("div",{class:e.player.config.classNames.ads}),e.player.elements.container.appendChild(e.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(e.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(e.player.config.playsinline),e.elements.displayContainer=new google.ima.AdDisplayContainer(e.elements.container,e.player.media),e.loader=new google.ima.AdsLoader(e.elements.displayContainer),e.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),e.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),e.requestAds()})),L(this,"requestAds",(function(){var t=e.player.elements.container;try{var i=new google.ima.AdsRequest;i.adTagUrl=e.tagUrl,i.linearAdSlotWidth=t.offsetWidth,i.linearAdSlotHeight=t.offsetHeight,i.nonLinearAdSlotWidth=t.offsetWidth,i.nonLinearAdSlotHeight=t.offsetHeight,i.forceNonLinearFullSlot=!1,i.setAdWillPlayMuted(!e.player.muted),e.loader.requestAds(i)}catch(t){e.onAdError(t)}})),L(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(e.countdownTimer),void e.elements.container.removeAttribute("data-badge-text");e.countdownTimer=setInterval((function(){var t=Si(Math.max(e.manager.getRemainingTime(),0)),i="".concat(wi("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",i)}),100)})),L(this,"onAdsManagerLoaded",(function(t){if(e.enabled){var i=new google.ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.enablePreloading=!0,e.manager=t.getAdsManager(e.player,i),e.cuePoints=e.manager.getCuePoints(),e.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),e.trigger("loaded")}})),L(this,"addCuePoints",(function(){Tt(e.cuePoints)||e.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var i=e.player.elements.progress;if(wt(i)){var r=100/e.player.duration*t,o=Et("span",{class:e.player.config.classNames.cues});o.style.left="".concat(r.toString(),"%"),i.appendChild(o)}}}))})),L(this,"onAdEvent",(function(t){var i=e.player.elements.container,r=t.getAd(),o=t.getAdData();switch(function(t){ti.call(e.player,e.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:e.trigger("loaded"),e.pollCountdown(!0),r.isLinear()||(r.width=i.offsetWidth,r.height=i.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:e.manager.setVolume(e.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:e.player.ended?e.loadAds():e.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e.pollCountdown(),e.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&e.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}})),L(this,"onAdError",(function(t){e.cancel(),e.player.debug.warn("Ads error",t)})),L(this,"listeners",(function(){var t,i=e.player.elements.container;e.player.on("canplay",(function(){e.addCuePoints()})),e.player.on("ended",(function(){e.loader.contentComplete()})),e.player.on("timeupdate",(function(){t=e.player.currentTime})),e.player.on("seeked",(function(){var i=e.player.currentTime;Tt(e.cuePoints)||e.cuePoints.forEach((function(r,o){t<r&&r<i&&(e.manager.discardAdBreak(),e.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){e.manager&&e.manager.resize(i.offsetWidth,i.offsetHeight,google.ima.ViewMode.NORMAL)}))})),L(this,"play",(function(){var t=e.player.elements.container;e.managerPromise||e.resumeContent(),e.managerPromise.then((function(){e.manager.setVolume(e.player.volume),e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}})).catch((function(){}))})),L(this,"resumeContent",(function(){e.elements.container.style.zIndex="",e.playing=!1,ri(e.player.media.play())})),L(this,"pauseContent",(function(){e.elements.container.style.zIndex=3,e.playing=!0,e.player.media.pause()})),L(this,"cancel",(function(){e.initialized&&e.resumeContent(),e.trigger("error"),e.loadAds()})),L(this,"loadAds",(function(){e.managerPromise.then((function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise((function(t){e.on("loaded",t),e.player.debug.log(e.manager)})),e.initialized=!1,e.requestAds()})).catch((function(){}))})),L(this,"trigger",(function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];var n=e.events[t];mt(n)&&n.forEach((function(t){bt(t)&&t.apply(e,r)}))})),L(this,"on",(function(t,i){return mt(e.events[t])||(e.events[t]=[]),e.events[t].push(i),e})),L(this,"startSafetyTimer",(function(t,i){e.player.debug.log("Safety timer invoked from: ".concat(i)),e.safetyTimer=setTimeout((function(){e.cancel(),e.clearSafetyTimer("startSafetyTimer()")}),t)})),L(this,"clearSafetyTimer",(function(t){ht(e.safetyTimer)||(e.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(e.safetyTimer),e.safetyTimer=null)})),this.player=i,this.config=i.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(t,i){e.on("loaded",t),e.on("error",i)})),this.load()}return s(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!Tt(t.publisherId)||jt(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return jt(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Oi({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId}))}}]),t}(),ie=function(t){var i=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var e={};t.split(/\r\n|\n|\r/).forEach((function(t){if(yt(e.startTime)){if(!Tt(t.trim())&&Tt(e.text)){var i,r,n,a=t.trim().split("#xywh=");i=o(a,1),e.text=i[0],a[1]&&(r=a[1].split(","),n=o(r,4),e.x=n[0],e.y=n[1],e.w=n[2],e.h=n[3])}}else{var s=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(e.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),e.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),e.text&&i.push(e)})),i},ee=function(t,i){var e={};return t>i.width/i.height?(e.width=i.width,e.height=1/t*i.width):(e.height=i.height,e.width=t*i.height),e},re=function(){function t(i){var e=this;p(this,t),L(this,"load",(function(){e.player.elements.display.seekTooltip&&(e.player.elements.display.seekTooltip.hidden=e.enabled),e.enabled&&e.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))})),L(this,"getThumbnails",(function(){return new Promise((function(t){var i=e.player.config.previewThumbnails.src;if(Tt(i))throw new Error("Missing previewThumbnails.src config attribute");var r=function(){e.thumbnails.sort((function(t,i){return t.height-i.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(bt(i))i((function(t){e.thumbnails=t,r()}));else{var o=(ft(i)?[i]:i).map((function(t){return e.getThumbnail(t)}));Promise.all(o).then(r)}}))})),L(this,"getThumbnail",(function(t){return new Promise((function(i){xi(t).then((function(r){var o={frames:ie(r),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var n=new Image;n.onload=function(){o.height=n.naturalHeight,o.width=n.naturalWidth,e.thumbnails.push(o),i()},n.src=o.urlPrefix+o.frames[0].text}))}))})),L(this,"startMove",(function(t){if(e.loaded&&kt(t)&&["touchmove","mousemove"].includes(t.type)&&e.player.media.duration){if("touchmove"===t.type)e.seekTime=e.player.media.duration*(e.player.elements.inputs.seek.value/100);else{var i=e.player.elements.progress.getBoundingClientRect();e.seekTime=e.player.media.duration*(100/i.width*(t.pageX-i.left)/100),e.seekTime<0&&(e.seekTime=0),e.seekTime>e.player.media.duration-1&&(e.seekTime=e.player.media.duration-1),e.mousePosX=t.pageX,e.elements.thumb.time.innerText=Si(e.seekTime)}e.showImageAtCurrentTime()}})),L(this,"endMove",(function(){e.toggleThumbContainer(!1,!0)})),L(this,"startScrubbing",(function(t){(ht(t.button)||!1===t.button||0===t.button)&&(e.mouseDown=!0,e.player.media.duration&&(e.toggleScrubbingContainer(!0),e.toggleThumbContainer(!1,!0),e.showImageAtCurrentTime()))})),L(this,"endScrubbing",(function(){e.mouseDown=!1,Math.ceil(e.lastTime)===Math.ceil(e.player.media.currentTime)?e.toggleScrubbingContainer(!1):Zt.call(e.player,e.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))})),L(this,"listeners",(function(){e.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),e.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),e.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))})),L(this,"render",(function(){e.elements.thumb.container=Et("div",{class:e.player.config.classNames.previewThumbnails.thumbContainer}),e.elements.thumb.imageContainer=Et("div",{class:e.player.config.classNames.previewThumbnails.imageContainer}),e.elements.thumb.container.appendChild(e.elements.thumb.imageContainer);var t=Et("div",{class:e.player.config.classNames.previewThumbnails.timeContainer});e.elements.thumb.time=Et("span",{},"00:00"),t.appendChild(e.elements.thumb.time),e.elements.thumb.container.appendChild(t),wt(e.player.elements.progress)&&e.player.elements.progress.appendChild(e.elements.thumb.container),e.elements.scrubbing.container=Et("div",{class:e.player.config.classNames.previewThumbnails.scrubbingContainer}),e.player.elements.wrapper.appendChild(e.elements.scrubbing.container)})),L(this,"destroy",(function(){e.elements.thumb.container&&e.elements.thumb.container.remove(),e.elements.scrubbing.container&&e.elements.scrubbing.container.remove()})),L(this,"showImageAtCurrentTime",(function(){e.mouseDown?e.setScrubbingContainerSize():e.setThumbContainerSizeAndPos();var t=e.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),i=t>=0,r=0;e.mouseDown||e.toggleThumbContainer(i),i&&(e.thumbnails.forEach((function(i,o){e.loadedImages.includes(i.frames[t].text)&&(r=o)})),t!==e.showingThumb&&(e.showingThumb=t,e.loadImage(r)))})),L(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=e.showingThumb,r=e.thumbnails[t],o=r.urlPrefix,n=r.frames[i],a=r.frames[i].text,s=o+a;if(e.currentImageElement&&e.currentImageElement.dataset.filename===a)e.showImage(e.currentImageElement,n,t,i,a,!1),e.currentImageElement.dataset.index=i,e.removeOldImages(e.currentImageElement);else{e.loadingImage&&e.usingSprites&&(e.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=i,l.dataset.filename=a,e.showingThumbFilename=a,e.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return e.showImage(l,n,t,i,a,!0)},e.loadingImage=l,e.removeOldImages(l)}})),L(this,"showImage",(function(t,i,r,o,n){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e.player.debug.log("Showing thumb: ".concat(n,". num: ").concat(o,". qual: ").concat(r,". newimg: ").concat(a)),e.setImageSizeAndOffset(t,i),a&&(e.currentImageContainer.appendChild(t),e.currentImageElement=t,e.loadedImages.includes(n)||e.loadedImages.push(n)),e.preloadNearby(o,!0).then(e.preloadNearby(o,!1)).then(e.getHigherQuality(r,t,i,n))})),L(this,"removeOldImages",(function(t){Array.from(e.currentImageContainer.children).forEach((function(i){if("img"===i.tagName.toLowerCase()){var r=e.usingSprites?500:1e3;if(i.dataset.index!==t.dataset.index&&!i.dataset.deleting){i.dataset.deleting=!0;var o=e.currentImageContainer;setTimeout((function(){o.removeChild(i),e.player.debug.log("Removing thumb: ".concat(i.dataset.filename))}),r)}}}))})),L(this,"preloadNearby",(function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(r){setTimeout((function(){var o=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===o){var n;n=i?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var a=!1;n.forEach((function(t){var i=t.text;if(i!==o&&!e.loadedImages.includes(i)){a=!0,e.player.debug.log("Preloading thumb filename: ".concat(i));var n=e.thumbnails[0].urlPrefix+i,s=new Image;s.src=n,s.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(i)),e.loadedImages.includes(i)||e.loadedImages.push(i),r()}}})),a||r()}}),300)}))})),L(this,"getHigherQuality",(function(t,i,r,o){if(t<e.thumbnails.length-1){var n=i.naturalHeight;e.usingSprites&&(n=r.h),n<e.thumbContainerHeight&&setTimeout((function(){e.showingThumbFilename===o&&(e.player.debug.log("Showing higher quality thumb for: ".concat(o)),e.loadImage(t+1))}),300)}})),L(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.player.config.classNames.previewThumbnails.thumbContainerShown;e.elements.thumb.container.classList.toggle(r,t),!t&&i&&(e.showingThumb=null,e.showingThumbFilename=null)})),L(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=e.player.config.classNames.previewThumbnails.scrubbingContainerShown;e.elements.scrubbing.container.classList.toggle(i,t),t||(e.showingThumb=null,e.showingThumbFilename=null)})),L(this,"determineContainerAutoSizing",(function(){(e.elements.thumb.imageContainer.clientHeight>20||e.elements.thumb.imageContainer.clientWidth>20)&&(e.sizeSpecifiedInCSS=!0)})),L(this,"setThumbContainerSizeAndPos",(function(){if(e.sizeSpecifiedInCSS){if(e.elements.thumb.imageContainer.clientHeight>20&&e.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(e.elements.thumb.imageContainer.clientHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(e.elements.thumb.imageContainer.clientHeight<20&&e.elements.thumb.imageContainer.clientWidth>20){var i=Math.floor(e.elements.thumb.imageContainer.clientWidth/e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(i,"px")}}else{var r=Math.floor(e.thumbContainerHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(e.thumbContainerHeight,"px"),e.elements.thumb.imageContainer.style.width="".concat(r,"px")}e.setThumbContainerPos()})),L(this,"setThumbContainerPos",(function(){var t=e.player.elements.progress.getBoundingClientRect(),i=e.player.elements.container.getBoundingClientRect(),r=e.elements.thumb.container,o=i.left-t.left+10,n=i.right-t.left-r.clientWidth-10,a=e.mousePosX-t.left-r.clientWidth/2;a<o&&(a=o),a>n&&(a=n),r.style.left="".concat(a,"px")})),L(this,"setScrubbingContainerSize",(function(){var t=ee(e.thumbAspectRatio,{width:e.player.media.clientWidth,height:e.player.media.clientHeight}),i=t.height;e.elements.scrubbing.container.style.width="".concat(t.width,"px"),e.elements.scrubbing.container.style.height="".concat(i,"px")})),L(this,"setImageSizeAndOffset",(function(t,i){if(e.usingSprites){var r=e.thumbContainerHeight/i.h;t.style.height=t.naturalHeight*r+"px",t.style.width=t.naturalWidth*r+"px",t.style.left="-".concat(i.x*r,"px"),t.style.top="-".concat(i.y*r,"px")}})),this.player=i,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return s(t,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?ee(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),t}(),oe={insertElements:function(t,i){var e=this;ft(i)?Ft(t,this.media,{src:i}):mt(i)&&i.forEach((function(i){Ft(t,e.media,i)}))},change:function(t){var i=this;Ot(t,"sources.length")?(hi.cancelRequests.call(this),this.destroy.call(this,(function(){i.options.quality=[],Lt(i.media),i.media=null,wt(i.elements.container)&&i.elements.container.removeAttribute("class");var e=t.sources,r=t.type,n=o(e,1)[0],a=n.provider,s=void 0===a?Mi.html5:a,l="html5"===s?r:"div",p="html5"===s?{}:{src:n.src};Object.assign(i,{provider:s,type:r,supported:Yt.check(r,s,i.config.playsinline),media:Et(l,p)}),i.elements.container.appendChild(i.media),gt(t.autoplay)&&(i.config.autoplay=t.autoplay),i.isHTML5&&(i.config.crossorigin&&i.media.setAttribute("crossorigin",""),i.config.autoplay&&i.media.setAttribute("autoplay",""),Tt(t.poster)||(i.poster=t.poster),i.config.loop.active&&i.media.setAttribute("loop",""),i.config.muted&&i.media.setAttribute("muted",""),i.config.playsinline&&i.media.setAttribute("playsinline","")),Ni.addStyleHook.call(i),i.isHTML5&&oe.insertElements.call(i,"source",e),i.config.title=t.title,Zi.setup.call(i),i.isHTML5&&Object.keys(t).includes("tracks")&&oe.insertElements.call(i,"track",t.tracks),(i.isHTML5||i.isEmbed&&!i.supported.ui)&&Ni.build.call(i),i.isHTML5&&i.media.load(),Tt(t.previewThumbnails)||(Object.assign(i.config.previewThumbnails,t.previewThumbnails),i.previewThumbnails&&i.previewThumbnails.loaded&&(i.previewThumbnails.destroy(),i.previewThumbnails=null),i.config.previewThumbnails.enabled&&(i.previewThumbnails=new re(i))),i.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},ne=function(){function t(i,e){var r=this;if(p(this,t),L(this,"play",(function(){return bt(r.media.play)?(r.ads&&r.ads.enabled&&r.ads.managerPromise.then((function(){return r.ads.play()})).catch((function(){return ri(r.media.play())})),r.media.play()):null})),L(this,"pause",(function(){return r.playing&&bt(r.media.pause)?r.media.pause():null})),L(this,"togglePlay",(function(t){return(gt(t)?t:!r.playing)?r.play():r.pause()})),L(this,"stop",(function(){r.isHTML5?(r.pause(),r.restart()):bt(r.media.stop)&&r.media.stop()})),L(this,"restart",(function(){r.currentTime=0})),L(this,"rewind",(function(t){r.currentTime-=yt(t)?t:r.config.seekTime})),L(this,"forward",(function(t){r.currentTime+=yt(t)?t:r.config.seekTime})),L(this,"increaseVolume",(function(t){r.volume=(r.media.muted?0:r.volume)+(yt(t)?t:0)})),L(this,"decreaseVolume",(function(t){r.increaseVolume(-t)})),L(this,"airplay",(function(){Yt.airplay&&r.media.webkitShowPlaybackTargetPicker()})),L(this,"toggleControls",(function(t){if(r.supported.ui&&!r.isAudio){var i=qt(r.elements.container,r.config.classNames.hideControls),e=$t(r.elements.container,r.config.classNames.hideControls,void 0===t?void 0:!t);return e&&mt(r.config.controls)&&r.config.controls.includes("settings")&&!Tt(r.config.settings)&&Ci.toggleMenu.call(r,!1),e!==i&&ti.call(r,r.media,e?"controlshidden":"controlsshown"),!e}return!1})),L(this,"on",(function(t,i){Kt.call(r,r.elements.container,t,i)})),L(this,"once",(function(t,i){Zt.call(r,r.elements.container,t,i)})),L(this,"off",(function(t,i){Xt(r.elements.container,t,i)})),L(this,"destroy",(function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r.ready){var e=function(){document.body.style.overflow="",r.embed=null,i?(Object.keys(r.elements).length&&(Lt(r.elements.buttons.play),Lt(r.elements.captions),Lt(r.elements.controls),Lt(r.elements.wrapper),r.elements.buttons.play=null,r.elements.captions=null,r.elements.controls=null,r.elements.wrapper=null),bt(t)&&t()):(ii.call(r),hi.cancelRequests.call(r),Nt(r.elements.original,r.elements.container),ti.call(r,r.elements.original,"destroyed",!0),bt(t)&&t.call(r.elements.original),r.ready=!1,setTimeout((function(){r.elements=null,r.media=null}),200))};r.stop(),clearTimeout(r.timers.loading),clearTimeout(r.timers.controls),clearTimeout(r.timers.resized),r.isHTML5?(Ni.toggleNativeControls.call(r,!0),e()):r.isYouTube?(clearInterval(r.timers.buffering),clearInterval(r.timers.playing),null!==r.embed&&bt(r.embed.destroy)&&r.embed.destroy(),e()):r.isVimeo&&(null!==r.embed&&r.embed.unload().then(e),setTimeout(e,200))}})),L(this,"supports",(function(t){return Yt.mime.call(r,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Yt.touch,this.media=i,ft(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||_t(this.media)||mt(this.media))&&(this.media=this.media[0]),this.config=It({},Ai,t.defaults,e||{},function(){try{return JSON.parse(r.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Fi(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Yt),!ht(this.media)&&wt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Yt.check().api){var o=this.media.cloneNode(!0);o.autoplay=!1,this.elements.original=o;var n=this.media.tagName.toLowerCase(),a=null,s=null;switch(n){case"div":if(a=this.media.querySelector("iframe"),wt(a)){if(s=Pi(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Mi.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Mi.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Tt(this.provider)||!Object.values(Mi).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=n,this.provider=Mi.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Yt.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Bi(this),this.storage=new ki(this),this.media.plyr=this,wt(this.elements.container)||(this.elements.container=Et("div",{tabindex:0}),At(this.media,this.elements.container)),Ni.migrateStyles.call(this),Ni.addStyleHook.call(this),Zi.setup.call(this),this.config.debug&&Kt.call(this,this.elements.container,this.config.events.join(" "),(function(t){r.debug.log("event: ".concat(t.type))})),this.fullscreen=new Li(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Ni.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new te(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return ri(r.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new re(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return s(t,[{key:"isHTML5",get:function(){return this.provider===Mi.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Mi.youtube}},{key:"isVimeo",get:function(){return this.provider===Mi.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(t){if(this.duration){var i=yt(t)&&t>0;this.media.currentTime=i?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var t=this.media.buffered;return yt(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),i=(this.media||{}).duration,e=yt(i)&&i!==1/0?i:0;return t||e}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var i=t;ft(i)&&(i=Number(i)),yt(i)||(i=this.storage.get("volume")),yt(i)||(i=this.config.volume),i>1&&(i=1),i<0&&(i=0),this.config.volume=i,this.media.volume=i,!Tt(t)&&this.muted&&i>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var i=t;gt(i)||(i=this.storage.get("muted")),gt(i)||(i=this.config.muted),this.config.muted=i,this.media.muted=i}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(t){var i=this,e=null;yt(t)&&(e=t),yt(e)||(e=this.storage.get("speed")),yt(e)||(e=this.config.speed.selected),e=function(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),t)}(e,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=e,setTimeout((function(){i.media&&(i.media.playbackRate=e)}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,u(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,u(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(t){var i=this.config.quality,e=this.options.quality;if(e.length){var r=[!Tt(t)&&Number(t),this.storage.get("quality"),i.selected,i.default].find(yt),o=!0;if(!e.includes(r)){var n=ni(e,r);this.debug.warn("Unsupported quality option: ".concat(r,", using ").concat(n," instead")),r=n,o=!1}i.selected=r,this.media.quality=r,o&&this.storage.set({quality:r})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(t){var i=gt(t)?t:this.config.loop.active;this.config.loop.active=i,this.media.loop=i}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){oe.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return jt(t)?t:this.source},set:function(t){jt(t)&&(this.config.urls.download=t,Ci.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(t){this.isVideo?Ni.setPoster.call(this,t,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var t=pi(ui.call(this));return mt(t)?t.join(":"):t},set:function(t){this.isVideo?ft(t)&&li(t)?(this.config.ratio=pi(t),di.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(t,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(t){var i=gt(t)?t:this.config.autoplay;this.config.autoplay=i}},{key:"toggleCaptions",value:function(t){Ii.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){Ii.set.call(this,t,!1),Ii.setup()}},{key:"language",get:function(){return(Ii.getCurrentTrack.call(this)||{}).language},set:function(t){Ii.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Yt.pip?Tt(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Yt.pip){var i=gt(t)?t:!this.pip;bt(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(i?"picture-in-picture":"inline"),bt(this.media.requestPictureInPicture)&&(!this.pip&&i?this.media.requestPictureInPicture():this.pip&&!i&&document.exitPictureInPicture())}}},{key:"setPreviewThumbnails",value:function(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new re(this))}}],[{key:"supported",value:function(t,i,e){return Yt.check(t,i,e)}},{key:"loadSprite",value:function(t,i){return zi(t,i)}},{key:"setup",value:function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;return ft(i)?r=Array.from(document.querySelectorAll(i)):_t(i)?r=Array.from(i):mt(i)&&(r=i.filter(wt)),Tt(r)?null:r.map((function(i){return new t(i,e)}))}}]),t}();function ae(t){t.on("timeupdate",(function(){return function(t){var i,e;null!=t&&null!==(i=t.config)&&void 0!==i&&null!==(e=i.mutedPreview)&&void 0!==e&&e.enabled||function(t){var i;0!==t.currentTime&&null!=t&&null!==(i=t.config)&&void 0!==i&&i.save_player_position&&localStorage.setItem("player-progress-".concat(se(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return le(t)})),t.on("loadeddata",(function(){return le(t)}))}function se(t){var i,e;return null==t||null===(i=t.config)||void 0===i||null===(e=i.blockAttributes)||void 0===e?void 0:e.id}function le(t){var i,e,r;if(null!=t&&null!==(i=t.config)&&void 0!==i&&i.save_player_position&&(null==t||null===(e=t.config)||void 0===e||null===(r=e.mutedPreview)||void 0===r||!r.enabled)){var o=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(se(t))))}(t);return t.hls&&o>=0&&t.hls.startLoad(o),t.duration&&(o=Math.min(o,t.duration)),!o||o<1?0:(t.currentTime=o,null!=t&&t.isVimeo&&setTimeout((function(){t.embed.setCurrentTime(o||0)}),0),o)}}ne.defaults=JSON.parse(JSON.stringify(Ai));var pe=(null===(Qi=window)||void 0===Qi||null===(Wi=Qi.prestoPlayer)||void 0===Wi||null===(Yi=Wi.i18n)||void 0===Yi?void 0:Yi.hide_chapters)||"Hide Chapters",ue=(null===(Ji=window)||void 0===Ji||null===(Gi=Ji.prestoPlayer)||void 0===Gi||null===(Ki=Gi.i18n)||void 0===Ki?void 0:Ki.show_chapters)||"Show Chapters";const de='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(pe,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(ue,"</span>\n</button>\n");var ce,he,ve;const ye='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(ce=window)||void 0===ce||null===(he=ce.prestoPlayer)||void 0===he||null===(ve=he.i18n)||void 0===ve?void 0:ve.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function fe(t){var i,e,r,o,n,a,s,p,d,c,h,v,y,f=0,g={},b=null,m=0;if("undefined"!=typeof jQuery)if(r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return t;var i={};return t.forEach((function(t){var e,r=t.time.split(":");r.length>1&&(e=60*parseInt(r[0]));var o=parseInt(r[1])+parseInt(e);i[o]=t})),i}((null===(i=o=t.detail.plyr)||void 0===i||null===(e=i.config)||void 0===e?void 0:e.chapters)||[]),"html5"!==o.provider||o.duration){if(r&&Object.keys(r).length){n=jQuery(o.elements.container).closest(".presto-player__wrapper").find(".plyr");var _=(y=jQuery(o.elements.controls)).find(".plyr__time");_=_.length?_:y.find(".plyr__progress__container"),(d=n.find('[data-plyr="chapters"]')).length||(d=jQuery(de).insertAfter(_)),(s=n.find(".presto-player-toc__wrapper")).length||(s=jQuery(ye).appendTo(n)),c=s.find("[data-player-toc-cover]"),p=s.find("[data-player-toc]"),a=n.find(".plyr__progress__container");var w,k=jQuery('<div class="presto-player__chapters"></div>').appendTo(a);h=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(k),w=0,p.find(".presto-player-toc__chapter").length||(Object.keys(r).forEach((function(t){w++;var i=jQuery(function(t){var i=t.name,e=void 0===i?"Untitled":i,r=t.order,o=void 0===r?1:r,n=t.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==n&&n?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(o,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(e,"\n </div>\n</div>")}({name:r[t].title,order:w})).appendTo(p);i.data("presto-player-timestamp",t),g[t]=i,i.on("click",(function(){o.currentTime=parseFloat(t),o.play(),j(!1)}))})),v=s.find("[data-chapter-item]")),z(),d.off("click"),d.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),b=window.setInterval((function(){m++,o.duration&&(z(),window.clearInterval(b)),m>50&&window.clearInterval(b)}),100),c.off("click"),c.on("click",(function(){return j(!1)})),p.off("mouseleave"),p.on("mouseleave",(function t(){if(o.playing){var i=setTimeout((function(){j(!1),p.off("mouseleave",t)}),2e3);p.on("mouseenter",(function(){clearTimeout(i)}))}}))}}else o.on("loadedmetadata",fe);function x(){f=o.currentTime;var t=Object.keys(r).filter((function(t){return t<=f})).map((function(t){return parseInt(t,10)})),i=Math.max.apply(Math,u(t));v&&v.removeClass("is-highlighted"),jQuery(g[i||0]).addClass("is-highlighted")}function z(){o.duration&&(Object.keys(r).forEach((function(t){if(parseInt(t)&&!h.find("[data-timestamp=".concat(t,"]")).length){var i,e,n,a,s=r[t],l=parseInt(t)/o.duration*100,p=jQuery((i={position:l,name:"".concat(s.title)},e=i.position,n=i.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===e?0:e,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(a,"</span>\n </div>"))).prependTo(h);p.attr("data-timestamp",t),p.data("timestamp",t),p.on("click",(function(){o.currentTime=parseInt(t),o.play()}))}})),s.find("[data-timeline-marker]"))}function j(t){void 0!==l(t)?s.toggleClass("is-showing",t):s.toggleClass("is-showing")}}var ge;function be(t){"undefined"!=typeof jQuery&&(ge=t,jQuery(ge.elements.container).closest(".presto-player__wrapper"),ge.on("ready",fe),ge.on("controlshidden",me),ge.on("controlsshown",_e))}function me(t){var i,e,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(i=t.detail)||void 0===i||null===(e=i.plyr)||void 0===e||null===(r=e.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function _e(t){var i,e,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(i=t.detail)||void 0===i||null===(e=i.plyr)||void 0===e||null===(r=e.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function we(t){var i,e;return n(n(n({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(i=t.config)&&void 0!==i&&i.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}function ke(t){var i,e;null!=t&&null!==(i=t.config)&&void 0!==i&&i.hasPlayed||(t.config.hasPlayed=!0,null===(e=window)||void 0===e||e.gtag("event","Play",we(t)))}function xe(t){var i;null===(i=window)||void 0===i||i.gtag("event","Pause",we(t))}function ze(t){var i,e;null!=t&&null!==(i=t.config)&&void 0!==i&&i.hasLoaded||(t.config.hasLoaded=!0,null===(e=window)||void 0===e||e.gtag("event","Player Load",we(t)))}var je,Te={25:!1,50:!1,75:!1,100:!1};function Se(t){if(t.currentTime){var i=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(Te).forEach((function(e){var r;!Te[e]&&i>=parseInt(e)&&(Te[e]=!0,null===(r=window)||void 0===r||r.gtag("event","".concat(e," Percent Played"),we(t)))}))}}var Ce="presto-player.analytics",Pe="",Oe=0;function Ie(t){var i,e;(je=t).config.analytics&&null!==(i=window)&&void 0!==i&&null!==(e=i.wp)&&void 0!==e&&e.hooks&&(wp.hooks.hasAction("presto.nonceRefreshed",Ce)||wp.hooks.addAction("presto.nonceRefreshed",Ce,(function(t){Pe=t})),wp.hooks.hasAction("presto.playerPlay",Ce)||wp.hooks.addAction("presto.playerPlay",Ce,Ae),wp.hooks.hasAction("presto.playerEnded",Ce)||wp.hooks.addAction("presto.playerEnded",Ce,Ae),wp.hooks.hasAction("presto.playerHidden",Ce)||wp.hooks.addAction("presto.playerHidden",Ce,Ae),wp.hooks.hasAction("presto.playerPause",Ce)||wp.hooks.addAction("presto.playerPause",Ce,Ae),wp.hooks.hasAction("presto.playerSeeked",Ce)||wp.hooks.addAction("presto.playerSeeked",Ce,Ae))}function Ae(t){isNaN(null==t?void 0:t.currentTime)||Me(function(t){var i,e;return t.currentTime>Oe&&(Oe=t.currentTime),t.currentTime>=t.duration&&(Oe=t.duration),n(n(n({video_current_time:parseInt(Oe),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(i=t.config)&&void 0!==i&&i.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}(t))}function Me(t){var i,e,r,o,n,a,s,l;if(Pe){var p,u,d=new FormData;d.append("action","presto_player_progress"),d.append("duration",null==t?void 0:t.video_current_time),d.append("video_id",null===(i=je)||void 0===i||null===(e=i.config)||void 0===e?void 0:e.id),d.append("nonce",Pe),null!==(r=window)&&void 0!==r&&null!==(o=r.prestoPlayer)&&void 0!==o&&o.debug_navigator?"undefined"!=typeof jQuery&&jQuery.ajax({type:"POST",url:null===(n=window)||void 0===n||null===(a=n.prestoPlayer)||void 0===a?void 0:a.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==t?void 0:t.video_current_time,video_id:null===(s=je)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:Pe}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,d)}}function Ee(t){var i,e;null!==(i=window)&&void 0!==i&&null!==(e=i.prestoPlayer)&&void 0!==e&&e.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",ke),wp.hooks.addAction("presto.playerPause","presto-player",xe),wp.hooks.addAction("presto.playerReady","presto-player",ze),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",Se))}(),Ie(t))}const Fe=function(t){t.on("ready",(function(){var i,e,r,o;null==t||null===(i=t.config)||void 0===i||!i.logo||null!=t&&null!==(e=t.config)&&void 0!==e&&e.logo_added||"undefined"!=typeof jQuery&&(t.isAudio||(jQuery('<img src="'.concat(null==t||null===(r=t.config)||void 0===r?void 0:r.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==t||null===(o=t.elements)||void 0===o?void 0:o.controls),t.config.logo_added=!0))}))};function Le(t){var i;null!=t&&null!==(i=t.config)&&void 0!==i&&i.poster&&(t.poster=t.config.poster)}const Re=function(t){var i,e;null!==(i=window)&&void 0!==i&&null!==(e=i.wp)&&void 0!==e&&e.hooks&&(t.on("ready",(function(){Ne("Ready",t)})),t.on("play",(function(){Ne("Play",t)})),t.on("playing",(function(){Ne("Playing",t)})),t.on("pause",(function(){Ne("Pause",t)})),t.on("ended",(function(){Ne("Ended",t)})),t.on("seeked",(function(){Ne("Seeked",t)})),t.on("timeupdate",(function(){Ne("TimeUpdate",t)})),t.on("enterfullscreen",(function(){Ne("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){Ne("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){Ne("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(i){var e;switch(null==i||null===(e=i.detail)||void 0===e?void 0:e.code){case 0:Ne("Ended",t);break;case 1:Ne("Play",t);break;case 2:Ne("Pause",t)}})))};function Ne(t,i){window.wp.hooks.doAction("presto.player".concat(t),i)}let Be,De=Date.now();const $e=t=>{var i,e;if(!t.automations)return;(null===(e=null===(i=null===window||void 0===window?void 0:window.wp)||void 0===i?void 0:i.hooks)||void 0===e?void 0:e.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{Be=t})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",o),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(t=>o(t,100)));let r={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1};function o(t,i=null){var e;Be&&(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.ajaxProgress)&&(i||(i=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(r).forEach((e=>{var r,o,n,a,s,l,p,u,d;const c=parseInt(e);if(!t.watched[c]&&i>=c){t.watched[c]=!0;let i=new FormData;if(i.append("action","presto_player_progress_percent"),i.append("id",null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.id),i.append("percent",c.toString()),i.append("visit_time",De.toString()),i.append("nonce",Be),(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug)&&console.log(`${c} percent watched.`),null===(n=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===n?void 0:n.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(u=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===u?void 0:u.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(d=null==t?void 0:t.config)||void 0===d?void 0:d.id,visit_time:De,percent:c,nonce:Be}});else{let e=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,i);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(e?console.log("Successfully queued progress:",{id:null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.id,percent:c,visit_time:De,nonce:Be}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:c,visit_time:De,nonce:Be}))}}})))}};let qe=!1,Ve=!1;function He(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const Ue=t=>{var i,e;(t.config.analytics||t.config.automations)&&(null===(e=null===(i=null===window||void 0===window?void 0:window.wp)||void 0===i?void 0:i.hooks)||void 0===e||e.addAction("presto.playerPlaying","presto-player",(()=>{null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(()=>{var t;qe||Ve||(Ve=!0,fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`).then(He).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),qe=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{Ve=!1})))})))},Qe=function(t){var i=window.navigator.userAgent;if(i.match(/iPad/i)||i.match(/iPhone/i)){var e=function(t,i){for(var e,r,o,n=null==t||null===(e=t.elements)||void 0===e||null===(r=e.container)||void 0===r||null===(o=r.getRootNode())||void 0===o?void 0:o.host;(null!=n?n.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==n.tagName&&"HTML"!==n.tagName;)i?n.classList.add("presto-player-fullscreen-open"):n.classList.remove("presto-player-fullscreen-open"),n=n.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var i;null!=t&&null!==(i=t.fullscreen)&&void 0!==i&&i.active&&e(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var i;null!=t&&null!==(i=t.fullscreen)&&void 0!==i&&i.active||e(t,!1)}))}},We=function(){var t=h(regeneratorRuntime.mark((function t(i){var e,r,o,n,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof jQuery){t.next=2;break}return t.abrupt("return");case 2:if("ResizeObserver"in window!=0){t.next=7;break}return t.next=5,import("./p-58f5339e.js");case 5:window.ResizeObserver=t.sent.ResizeObserver;case 7:if(l=new ResizeObserver((function(t){var i,e=v(t);try{for(e.s();!(i=e.n()).done;){var r=i.value,o=r.contentRect;jQuery(r.target).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(o.height-48,200),"px")})}}catch(t){e.e(t)}finally{e.f()}})),null!=i&&null!==(e=i.elements)&&void 0!==e&&null!==(r=e.container)&&void 0!==r&&null!==(o=r.getRootNode())&&void 0!==o&&o.firstChild){t.next=10;break}return t.abrupt("return");case 10:if(l.observe(null==i||null===(n=i.elements)||void 0===n||null===(a=n.container)||void 0===a||null===(s=a.getRootNode())||void 0===s?void 0:s.firstChild),i){t.next=13;break}return t.abrupt("return");case 13:i.on("playing",(function(){var t,e,r,o,n=null==i||null===(t=i.elements)||void 0===t||null===(e=t.container)||void 0===e?void 0:e.getRootNode().firstChild.getBoundingClientRect();jQuery(null==i||null===(r=i.elements)||void 0===r||null===(o=r.container)||void 0===o?void 0:o.getRootNode()).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(n.height-48,200),"px")})}));case 14:case"end":return t.stop()}}),t)})));return function(i){return t.apply(this,arguments)}}();function Ye(t){var i,e,r,o,a,s,l,p,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=n(n(n({},u),null!==(i=window)&&void 0!==i&&null!==(e=i.prestoPlayer)&&void 0!==e&&e.plugin_url?{iconUrl:"".concat(null===(r=window)||void 0===r||null===(o=r.prestoPlayer)||void 0===o?void 0:o.plugin_url,"img/sprite.svg")}:{}),{chapters:(null==u?void 0:u.chapters)||[],controls:(null==u?void 0:u.controls)||[],settings:Object.keys((null==u?void 0:u.settings)||{}).length?u.settings:{}}),c=new ne(t,d);return"undefined"!=typeof learndash_video_data&&import("./p-2cf645b3.js").then((function(t){(0,t.default)(c)})),"undefined"!=typeof _tutorobject&&import("./p-0e1cd603.js").then((function(t){(0,t.default)(c)})),void 0!==window.llms&&!0===(null===(l=prestoPlayer)||void 0===l||null===(p=l.lifter)||void 0===p?void 0:p.isLesson)&&import("./p-68f17ca9.js").then((function(t){(0,t.default)(c)})),Re(c),Qe(c),We(c),Fe(c),Le(c),be(c),null!==(a=window)&&void 0!==a&&null!==(s=a.prestoPlayer)&&void 0!==s&&s.isAdmin||(Ue(c),$e(d),ae(c),Ee(c)),c}function Je(t){return"string"==typeof t&&t.includes(".m3u8")}let Ge=class{constructor(i){t(this,i),this.loaded=r(this,"loaded",7),this.currentMediaPlayer=r(this,"currentMediaPlayer",7),this.isAdmin=!1,this.previouslyPlaying=!1,this.ctaActive=!1,this.emailActive=!1,this.actionBarActive=!1,this.components={cta:null,email:null,overlays:null}}async play(t=!1){this.shouldLazyLoad=!1,t&&(this.mutedPreview=!1),this.player.play()}async goToAndPlay(t){this.player.play(),this.player.currentTime=t}handleScroll(t){t.detail.id!==this.player.id&&(this.mutedPreview||this.pause())}async restart(){return this.shouldLazyLoad=!1,this.player.restart()}async pause(){return this.player.pause()}async stop(){return this.player.stop()}async fullscreenToggle(t){return this.player.fullscreen.toggle(t)}async on(t,i){return this.player.on(t,i)}async once(t,i){return this.player.once(t,i)}async off(t,i){return this.player.off(t,i)}async handleCurrentTimeChange(t){this.player&&Number.isInteger(t)&&(this.player.duration&&(this.player.currentTime=Math.min(this.player.currentTime,this.player.duration)),this.shouldLazyLoad&&(this.shouldLazyLoad=!1,await new Promise((t=>{setTimeout((async()=>{await this.initialize(),t()}),50)}))),this.player.embed&&!this.player.playing?(this.player.currentTime=t,this.player.muted=!0,this.player.play(),this.player.once("timeupdate",(()=>{this.player.pause(),this.player.currentTime=t,this.player.muted=!1}))):this.player.currentTime=t)}handleStickyChange(){(function(t){for(var i=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)i.push(t=t.parentNode);return i})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:i,branding:e,src:r,analytics:o,automations:n,autoplay:a,blockAttributes:s={},provider:l="",provider_video_id:p="",youtube:u,type:d,isAdmin:c,i18n:h,storage:v={enabled:!c,key:`presto-player-${t.id}`}}){var y,f,g,b;const m=["settings"],_=[...["youtube","vimeo"].includes(l)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((i=>((null==t?void 0:t[i])||m.includes(i))&&!_.includes(i)));(null===(y=null==s?void 0:s.mutedPreview)||void 0===y?void 0:y.enabled)&&(v={enabled:!1});let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==s?void 0:s.id,title:(null==s?void 0:s.title)||"",blockAttributes:Object.assign(Object.assign({},s),{type:d}),src:r,ajaxProgress:!0,analytics:o,automations:n,mutedPreview:{enabled:null===(f=null==s?void 0:s.mutedPreview)||void 0===f?void 0:f.enabled},loop:{active:"loop"===(null==t?void 0:t.on_video_end)},chapters:i,controls:w,settings:["captions","quality","loop",...(null==t?void 0:t.speed)?["speed"]:[]],hideControls:null==t?void 0:t.auto_hide,captions:{active:null==t?void 0:t.captions_enabled,language:"auto",update:!1},logo:null==e?void 0:e.logo,logo_width:null==e?void 0:e.logo_width,hide_logo:null==t?void 0:t.hide_logo,lazy_load_youtube:null==t?void 0:t.lazy_load_youtube,save_player_position:!!(null==t?void 0:t.save_player_position),sticky_scroll:null==t?void 0:t.sticky_scroll,play_video_viewport:null==t?void 0:t.play_video_viewport,autoplay:!(!a||(null===(g=window.wp)||void 0===g?void 0:g.blocks))},l?{provider:l}:{}),p?{provider_video_id:p}:{}),(null==s?void 0:s.poster)?{poster:s.poster}:{}),{invertTime:!t.hasOwnProperty("invert_time")||(null==t?void 0:t.invert_time),storage:v,keyboard:{focused:!1,global:!1},resetOnEnd:!!(null==t?void 0:t.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==s?void 0:s.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==s?void 0:s.playsInline)},tooltips:{controls:!0,seek:!0},i18n:h});return(null===(b=null===window||void 0===window?void 0:window.wp)||void 0===b?void 0:b.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}getPlayerData(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}async createPlayer(){return await(t=this.getPlayerData(),i=t.config,e=t.selector,r=t.src,o=t.preload,r&&Je(r)?import("./p-b8dcbd9c.js").then((function(t){return(0,t.default)({config:i,selector:e,src:r,preload:o})})):new Promise((function(t){return t(new Ye(e,n({},i)))})));var t,i,e,r,o}handlePlayerElementChange(){var t;(({src:t,el:i,preload:e,currentTime:r})=>{if(!i.getAttribute("hls_loaded")&&["metadata","none"].includes(e)&&Je(t)){if(r>0)return i.style.height=null,i.style.paddingBottom=null,void i.setAttribute("hls_loaded","1");i.style.height="0px",i.style.paddingBottom="56.25%"}})({src:this.src,el:this.playerEl,preload:this.preload,currentTime:null===(t=null==this?void 0:this.player)||void 0===t?void 0:t.currentTime})}handleMutedPreview(t,i){var e,r,o,n,a,s,l;this.player&&!this.isAdmin&&(!t&&i&&this.player.once("timeupdate",(()=>{var t,i;this.player.loop="loop"===(null===(t=this.preset)||void 0===t?void 0:t.on_video_end),this.player.toggleCaptions(null===(i=null==this?void 0:this.preset)||void 0===i?void 0:i.captions_enabled)})),(null===(o=null===(r=null===(e=this.originalConfig)||void 0===e?void 0:e.blockAttributes)||void 0===r?void 0:r.mutedPreview)||void 0===o?void 0:o.enabled)&&(({player:t,mutedPreview:i,captions:e,progress:r,savePosition:o,onPlay:n})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=i,t.muted=i,t.loop=i,t.config.ajaxProgress=!i&&r,t.config.save_player_position=!i&&o;try{t.toggleCaptions(!!i&&!!e)}catch(t){}return setTimeout((()=>{le(t)||t.restart(),setTimeout((()=>{t.muted=i,n()}),50)}),0),t}console.log("ios device, do not do muted autoplay")})({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(a=null===(n=this.blockAttributes)||void 0===n?void 0:n.mutedPreview)||void 0===a?void 0:a.captions),progress:null===(s=this.originalConfig)||void 0===s?void 0:s.ajaxProgress,savePosition:null===(l=this.originalConfig)||void 0===l?void 0:l.save_player_position,onPlay:()=>this.play()}))}onPlayerReady(){var t,i,e;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(i=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===i?void 0:i.enabled,this.renderDynamicOverlays(),this.renderVideoCTA(),this.renderEmailOverlay(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Je(this.src)&&this.player.once("playing",(()=>{this.playerEl.style.height=null,this.playerEl.style.paddingBottom=null,this.playerEl.setAttribute("hls_loaded","1")})),this.player.on("playing",(()=>this.playClass="presto-player--playing")),this.player.on("pause",(()=>this.playClass="presto-player--paused")),this.player.on("ended",(()=>this.playClass="presto-player--ended")),this.player.on("playing",(t=>this.currentMediaPlayer.emit(t.detail.plyr))),"go-to-start"===(null===(e=this.preset)||void 0===e?void 0:e.on_video_end)&&this.player.on("ended",(()=>{this.restart(),"youtube"===this.provider&&this.stop()}))}handlePlayerEvents(t){t.on("ready",(t=>{this.player=t.detail.plyr,this.onPlayerReady()}))}handleLazyLoadChange(){"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((()=>{this.onReload("play")}),50)}shouldLazyLoadVideo(){var t,i,e;return"youtube"===this.provider&&!this.autoplay&&!(null===(i=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===i?void 0:i.enabled)&&!!(null===(e=this.preset)||void 0===e?void 0:e.lazy_load_youtube)}componentWillLoad(){var t,i,e;const r=null===(t=this.el.children)||void 0===t?void 0:t[0];r&&r.classList&&r.classList.contains("presto-iframe-fallback-container")&&r.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.i18n)||(null===(e=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===e?void 0:e.i18n),this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}async componentDidLoad(){setTimeout((()=>{this.initialize(),this.loaded.emit(!0)}),0)}async initialize(){const t=await this.createPlayer();return this.handlePlayerEvents(t),this.syncVideoHeight(),((t,i)=>{if(!i)return;const e=document.createElement("style");t.shadowRoot.append(e),e.appendChild(document.createTextNode(i))})(this.el,this.css),t}async onReload(t){const i=await this.initialize();"play"==t&&i.on("ready",(()=>{this.play(),i.muted=!0,i.muted=!1,i.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-58f5339e.js");window.ResizeObserver=t.ResizeObserver}new ResizeObserver((()=>{this.isSticky||(this.videoHeight=this.el.getBoundingClientRect().height)})).observe(this.el)}handleRestartVideo(){this.player.once("timeupdate",(()=>{setTimeout((()=>this.play()),500)})),this.player.restart()}handlePlayVideo(){this.play()}handlePauseVideo(t){this.pause(),t.detail&&function(t){var i,e,r,o,n;if("unknown"!==_()&&!(null===(e=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.blockAttributes)||void 0===e?void 0:e.playsinline)){"function"==typeof(null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.webkitExitFullScreen)&&(null==t||t.media.webkitExitFullScreen()),"function"==typeof(null===(o=null==t?void 0:t.embed)||void 0===o?void 0:o.exitFullscreen)&&(null===(n=null==t?void 0:t.embed)||void 0===n||n.exitFullscreen());const i=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=i}))}}(this.player)}playVideoOnlyInViewport(){var t;!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}trackIntersection(){this.observer=new IntersectionObserver((t=>{this.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}handleVisibilityIntersection(t){t&&(this.handleStickyScroll(t),this.handleVisibilityPlayChange(t))}handleStickyScroll(t){var i,e;if(!(null===(i=this.preset)||void 0===i?void 0:i.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.playing))return void(this.isSticky=!1);let r=t.boundingClientRect;if(this.isSticky=r.height<-r.top,"visible"===document.visibilityState&&this.isSticky&&this.player){const t=()=>{window.removeEventListener("scroll",t),this.player.paused&&(this.isSticky=!1)};this.player.once("pause",(()=>{window.addEventListener("scroll",t)}))}}handleVisibilityPlayChange(t){var i,e,r;if(!this.isAdmin&&(null===(i=this.preset)||void 0===i?void 0:i.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==t?void 0:t.isIntersecting)),this.player)){if(null==t?void 0:t.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(r=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===r?void 0:r.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(()=>{this.previouslyPlaying=!0,this.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}renderMutedOverlay(){var t;if(this.player&&this.mutedPreview&&!this.isAdmin)return i("presto-muted-overlay",{mutedOverlay:null===(t=this.player.config.blockAttributes)||void 0===t?void 0:t.mutedOverlay,preset:this.preset,onPlayVideo:()=>{this.mutedPreview=!1,this.play()}})}renderVideo(){var t;switch(this.provider){case"vimeo":return i("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return i("presto-youtube",{onReload:t=>this.onReload(null==t?void 0:t.detail),player:this.player,getRef:t=>this.playerEl=t,lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return i("presto-bunny",{thumbnail:null===(t=null==this?void 0:this.bunny)||void 0===t?void 0:t.thumbnail,getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks});case"audio":return i("presto-audio",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,preset:this.preset,src:this.src,tracks:this.tracks,mediaTitle:this.mediaTitle});default:return i("presto-video",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}}renderVideoCTA(){var t,i,e,r;(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&(this.isAdmin||(null===(e=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===e?void 0:e.enabled)&&((null===(r=this.components.cta)||void 0===r?void 0:r.offsetParent)||"audio"!==this.provider&&(this.components.cta=document.createElement("presto-cta-overlay"),this.components.cta.direction=this.direction,this.components.cta.player=this.player,this.components.cta.preset=this.preset,this.components.cta.i18n=this.i18n,this.player.elements.container.append(this.components.cta))))}renderAudioCTA(){var t,e;if("audio"===this.provider&&this.player&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.cta)||void 0===e?void 0:e.enabled))return i("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderEmailOverlay(){var t,i,e;!(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)||this.isAdmin||(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.logged_in)||(null===(e=this.components.email)||void 0===e?void 0:e.offsetParent)||"audio"!==this.provider&&(this.components.email=document.createElement("presto-email-overlay"),this.components.email.direction=this.direction,this.components.email.player=this.player,this.components.email.preset=this.preset,this.components.email.i18n=this.i18n,this.components.email.videoId=this.video_id,this.player.elements.container.append(this.components.email))}renderAudioEmail(){var t,e;if("audio"===this.provider&&this.player&&(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&!(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.logged_in))return i("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderActionBar(){var t,e;if((null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)&&this.player)return i("presto-action-bar",{config:this.preset.action_bar,player:null==this?void 0:this.player,youtube:this.youtube})}stickyPositionClass(){var t,i;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(i=this.preset)||void 0===i?void 0:i.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,i,e,r,o,n,a;this.player&&((null===(t=null==this?void 0:this.overlaysComponent)||void 0===t?void 0:t.offsetParent)||(this.overlaysComponent=document.createElement("presto-dynamic-overlays"),this.overlaysComponent.addEventListener("reloadComponent",(()=>{this.overlaysComponent.remove(),this.overlaysComponent=document.createElement("presto-dynamic-overlays")}),{once:!0})),this.overlaysComponent.style.cssText="display: block !important; opacity: 1 !important; visibility: visible !important;",this.overlaysComponent.overlays=this.overlays,this.overlaysComponent.preset=this.preset,this.overlaysComponent.player=this.player,this.overlaysComponent.enabled=!(null===(r=null===(e=null===(i=this.player)||void 0===i?void 0:i.config)||void 0===e?void 0:e.mutedPreview)||void 0===r?void 0:r.enabled),(null===(o=null==this?void 0:this.overlaysComponent)||void 0===o?void 0:o.offsetParent)||null===(a=null===(n=this.player.elements)||void 0===n?void 0:n.wrapper)||void 0===a||a.append(this.overlaysComponent))}handleCtaStateChange(t){this.ctaActive=t.detail}handleEmailStateChange(t){this.emailActive=t.detail}handleActionBarStateChange(t){this.actionBarActive=t.detail}render(){var t,e,r,o,n,a,s;return i(y,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},i("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"audio"===this.provider?"presto-sticky-audio":"presto-sticky":""}\n ${"audio"!==this.provider?this.stickyPositionClass():""}\n ${"rtl"===this.direction?"rtl":""}\n ${!0===this.ctaActive?"cta-active":""}\n ${!0===this.emailActive?"email-active":""}\n ${!0===this.actionBarActive&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)?"action-bar-active":""}\n ${!!(null===(r=this.preset)||void 0===r?void 0:r.skin)&&`skin-${null===(o=this.preset)||void 0===o?void 0:o.skin}`}\n ${(null===(n=this.preset)||void 0===n?void 0:n.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(a=this.preset)||void 0===a?void 0:a.caption_style)?`caption-style-${null===(s=this.preset)||void 0===s?void 0:s.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}\n ${this.classes||""}`},i("div",null,i("slot",{name:"player-start"}),i("slot",{name:"player-before-video"}),this.renderVideo(),i("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),this.renderAudioCTA(),this.renderAudioEmail(),i("slot",{name:"player-end"}))))}get el(){return e(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};Ge.style='@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui *::after,.plyr--full-ui *::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background-image:linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2 * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%, 0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0, 10px) scale(0.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));height:100%;margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-webkit-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-moz-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-moz-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-ms-fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads:empty::after{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none !important}.plyr__sr-only{clip:rect(1px, 1px, 1px, 1px);overflow:hidden;border:0 !important;height:1px !important;padding:0 !important;position:absolute !important;width:1px !important}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr--html5 .plyr__video-wrapper,.plyr--youtube .plyr__video-wrapper{height:100%}.plyr__video-wrapper{z-index:1}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr{border-radius:var(--presto-player-border-radius)}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper .presto-player__wrapper .plyr__control--overlaid{z-index:4}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--video .plyr__controls{padding-bottom:calc(var(--plyr-control-spacing, 10px) + env(safe-area-inset-bottom))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:100%;max-width:100%;background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper.action-bar-active .presto-audio__poster img{border-bottom-left-radius:0px}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.presto-player--hide-scrim .plyr__controls{background:transparent}.presto-player__wrapper presto-audio .presto-player-toc{max-height:350px}.presto-player__wrapper presto-action-bar{position:relative;z-index:1}.skin-stacked .plyr__controls{flex-wrap:wrap}.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.skin-stacked .plyr__controls{justify-content:flex-start}.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:50%}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}.presto-sticky-audio{position:fixed;z-index:3000;width:100vw;bottom:0px;right:0px;left:0px}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;align-items:center;justify-content:center}.presto-player__muted-overlay img{display:none}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay.presto-player--playing .presto-player__muted-overlay img{display:block}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper .plyr__captions{z-index:1}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media (min-aspect-ratio: 16/9){.hide-youtube-ui presto-youtube .plyr:fullscreen .plyr__video-wrapper{width:177.7777777778vh}}.cta-email-active,.cta-email-active .presto-audio__wrapper{min-height:140px}.cta-active,.email-active,.cta-active .presto-audio__wrapper,.email-active .presto-audio__wrapper{min-height:140px}.action-bar-active .plyr{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}';const Ke=function(t,i){return u(i)};let Xe=class{constructor(i){t(this,i),this.prestoBlur=r(this,"prestoBlur",7),this.prestoFocus=r(this,"prestoFocus",7),this.hasFocus=!1,this.hasLabel=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.type="default",this.size="medium",this.full=!1,this.disabled=!1,this.submit=!1}componentWillLoad(){this.handleSlotChange()}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}handleSlotChange(){this.hasLabel=!!this.button.children,this.hasPrefix=!!this.button.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.button.querySelector('[slot="suffix"]')}handleBlur(){this.hasFocus=!1,this.prestoBlur.emit()}handleFocus(){this.hasFocus=!0,this.prestoFocus.emit()}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}render(){const t=!!this.href,e=i(Ke,null,i("span",{part:"prefix",class:"button__prefix"},i("slot",{onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),i("span",{part:"label",class:"button__label"},i("slot",{onSlotchange:()=>this.handleSlotChange()})),i("span",{part:"suffix",class:"button__suffix"},i("slot",{onSlotchange:()=>this.handleSlotChange(),name:"suffix"}))),r=i("button",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},disabled:this.disabled,type:this.submit?"submit":"button",name:this.name,value:this.value,onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e),o=i("a",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},href:this.href,target:this.target,download:this.download,rel:this.target?"noreferrer noopener":void 0,role:"button","aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?"-1":"0",onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e);return t?o:r}get button(){return e(this)}};Xe.style=":host{display:inline-block;width:auto;cursor:pointer}:host([full]){display:block}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--presto-player-button-border-width);font-family:var(--plyr-font-family, inherit);font-weight:var(--presto-player-button-font-weight, 500);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--presto--player-transition-fast, 150ms) background-color, var(--presto-player-transition-fast, 150ms) color, var(--presto-player-transition-fast, 150ms) border, var(--presto--player-transition-fast, 150ms) box-shadow;cursor:inherit;border-radius:var(--presto-player-button-border-radius, 0.25em)}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button.button--disabled{opacity:0.5;cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button ::slotted(.presto--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(presto-icon){vertical-align:-2px}.button.button--default{background-color:var(--presto-player-color-white, #fff);border-color:var(--presto-player-color-gray-300, #d1d5db);color:var(--presto-player-color-gray-600, #4b5563)}.button.button--default:hover:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:0.75}.button.button--default:focus:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--default:active:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--primary{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff)}.button.button--primary:hover:not(.button--disabled){opacity:0.9}.button.button--primary:focus:not(.button--disabled){opacity:1}.button.button--primary:active:not(.button--disabled){opacity:1}.button--text{background-color:transparent;border-color:transparent;color:var(--presto-player-button-color, var(--plyr-color-main))}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.8}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--small{font-size:var(--presto-player-button-font-size-small, 0.875em);height:var(--presto-player-button-height-small, 1.875em);line-height:calc(var(--presto-player-button-height-small, 1.875em) - var(--presto-player-button-border-width, 1px) * 2)}.button--medium{font-size:var(--presto-player-button-font-size-medium, 1em);height:var(--presto-player-button-height-medium, 2.5em);line-height:calc(var(--presto-player-button-height-medium, 2.5em) - var(--presto-player-button-border-width, 1px) * 2)}.button--large{font-size:var(--presto-player-button-font-size-large, 1.25em);height:var(--presto-player-button-height-large, 3.125em);line-height:calc(var(--presto-player-button-height-large, 3.125em) - var(--presto-player-button-border-width, 1px) * 2)}.button--full{display:block}.button--has-label.button--small .button__label{padding:0 var(--presto-player-button-spacing-small, 0.75em)}.button--has-label.button--medium .button__label{padding:0 var(--presto-player-button-spacing-medium, 1em)}.button--has-label.button--large .button__label{padding:0 var(--presto-player-button-spacing-large, 1.25em)}.button--has-prefix.button--small{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--small .button__label{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--medium{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--medium .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}";let Ze=class{constructor(i){t(this,i)}render(){return i("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}};Ze.style=":host{position:relative;box-sizing:border-box;--track-color:#0d131e20;--indicator-color:var(--plyr-color-main);--stroke-width:2px;display:inline-flex}:host *,:host *:before,:host *:after{box-sizing:inherit}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";let tr=class{constructor(i){t(this,i)}handleClick(t){t.preventDefault();const i=document.body.querySelector("presto-player");i&&i.goToAndPlay(this.timeToSeconds(this.time))}timeToSeconds(t){let i,e=t.split(":");return e.length>1&&(i=60*parseInt(e[0])),parseInt(e[1])+parseInt(i)}render(){return i("a",{href:"#",class:"presto-timestamp",onClick:t=>this.handleClick(t)},i("slot",null,this.time))}};tr.style=":host{display:inline}";let ir=class{constructor(i){t(this,i)}render(){return i("video",{class:{"presto-player__player":!0,"plyr__video-embed":["youtube","vimeo"].includes(this.provider)},part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},i("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>i("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))}};ir.style=":host{display:block}";let er=class{constructor(i){t(this,i)}getId(t){const i=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(t||"");return(null==i?void 0:i[5])||""}parseHash(t){const i=t.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*\&*h=|\/)+(?<hash>[\d,a-f]+)/);return i?i.groups.hash:null}render(){if(this.src)return"Android"!==_()||(t=window.navigator.standalone,e=window.navigator.userAgent.toLowerCase(),r=/safari/.test(e),/iphone|ipod|ipad/.test(e)?!t&&r||t||r:!e.includes("wv"))?i("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src),"data-plyr-embed-hash":this.parseHash(this.src)}):i("div",{class:"presto-iframe-fallback-container"},i("iframe",{src:`https://player.vimeo.com/video/${this.getId(this.src)}?h=${this.parseHash(this.src)}&amp;loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media`,allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"}));var t,e,r}};er.style=":host{display:block}";let rr=class{constructor(i){t(this,i),this.reload=r(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.once("statechange",(t=>{var i,e,r,o,n;1===t.detail.code&&((null===(n=null===(o=null===(r=null===(e=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr)||void 0===e?void 0:e.config)||void 0===r?void 0:r.blockAttributes)||void 0===o?void 0:o.mutedPreview)||void 0===n?void 0:n.enabled)||(this.player.muted=!1))}))}getId(t){var i;const e=(t||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===(null===(i=null==e?void 0:e[2])||void 0===i?void 0:i.length)?e[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var t;let i=null===(t=window.navigator)||void 0===t?void 0:t.standalone,e=window.navigator.userAgent.toLowerCase(),r=/safari/.test(e),o=/iphone|ipod|ipad/.test(e);this.isWebView=o?!i&&!r:e.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&"iOS"===_()&&(this.lazyLoad=!1)}render(){return this.isWebView?i("div",{class:"fallback-container"},i("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?i("div",null,i("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),i("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):i("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}static get watchers(){return{player:["handlePlayerChange"]}}};rr.style=":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";let or=class{constructor(i){t(this,i),this.layout="default"}waitForApi(t){var i=setInterval((function(){var e;(null===(e=null===window||void 0===window?void 0:window.gapi)||void 0===e?void 0:e.ytsubscribe)&&(clearInterval(i),t())}),50)}componentDidLoad(){const t=document.createElement("script");t.type="text/javascript",t.async=!1,t.src="https://apis.google.com/js/platform.js";const i=document.getElementsByTagName("script")[0];i&&i.parentNode.insertBefore(t,i),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return i("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};or.style=":host{display:block}";export{C,M as E,Ye as P,f as a,w as b,k as c,x as d,z as e,j as f,T as g,P as h,O as i,I as j,A as k,E as l,Ge as m,Xe as n,Ze as o,tr as p,ir as q,le as r,er as s,rr as t,or as u}
dist/components/web-components/web-components.esm.js CHANGED
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-fd4ad57a.js";var r,o;(r=import.meta.url,o={},""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)).then((e=>t([["p-62215320",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-27c587b3",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["p-74dab128",[[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[1],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[2,"current-time"],mediaTitle:[1,"media-title"],classes:[1],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],ctaActive:[32],emailActive:[32],actionBarActive:[32],play:[64],goToAndPlay:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],once:[64],off:[64]},[[8,"currentMediaPlayer","handleScroll"],[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"],[0,"ctaStateChange","handleCtaStateChange"],[0,"emailStateChange","handleEmailStateChange"],[0,"actionBarStateChange","handleActionBarStateChange"]]],[4,"presto-timestamp",{time:[1]}],[1,"presto-action-bar",{player:[8],config:[16],direction:[1],youtube:[16],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-cta-overlay",{player:[8],direction:[1],preset:[16],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"]}],[1,"presto-dynamic-overlays",{overlays:[16],player:[8],preset:[16],enabled:[4],currentTime:[32],destroy:[32]}],[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]}],[0,"presto-audio",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],preset:[16],tracks:[16],provider:[1],mediaTitle:[1,"media-title"],width:[32]}],[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}],[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}],[1,"presto-action-bar-controller",{ended:[4],config:[16],currentTime:[514,"current-time"],duration:[514],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32],percentagePassed:[32]}],[0,"presto-cta-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],cta:[16],i18n:[16],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32]}],[0,"presto-email-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],emailCollection:[16],i18n:[16],videoId:[2,"video-id"],presetId:[2,"preset-id"],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],percentagePassed:[32]}],[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}],[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],direction:[1],i18n:[16],provider:[1],type:[1],isAudioProvider:[32]}],[1,"presto-email-overlay-ui",{headline:[1],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],i18n:[16],provider:[1],type:[1],email:[32],isAudioProvider:[32]}],[1,"presto-action-bar-ui",{open:[4]}],[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1]}],[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}],[1,"presto-player-spinner"],[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]]]],e)));
1
+ import{p as e,b as t}from"./p-fd4ad57a.js";var r,o;(r=import.meta.url,o={},""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)).then((e=>t([["p-62215320",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-27c587b3",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["p-e47874b6",[[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[1],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[2,"current-time"],mediaTitle:[1,"media-title"],classes:[1],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],ctaActive:[32],emailActive:[32],actionBarActive:[32],play:[64],goToAndPlay:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],once:[64],off:[64]},[[8,"currentMediaPlayer","handleScroll"],[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"],[0,"ctaStateChange","handleCtaStateChange"],[0,"emailStateChange","handleEmailStateChange"],[0,"actionBarStateChange","handleActionBarStateChange"]]],[4,"presto-timestamp",{time:[1]}],[1,"presto-action-bar",{player:[8],config:[16],direction:[1],youtube:[16],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-cta-overlay",{player:[8],direction:[1],preset:[16],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"]}],[1,"presto-dynamic-overlays",{overlays:[16],player:[8],preset:[16],enabled:[4],currentTime:[32],destroy:[32]}],[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]}],[0,"presto-audio",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],preset:[16],tracks:[16],provider:[1],mediaTitle:[1,"media-title"],width:[32]}],[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}],[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}],[1,"presto-action-bar-controller",{ended:[4],config:[16],currentTime:[514,"current-time"],duration:[514],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32],percentagePassed:[32]}],[0,"presto-cta-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],cta:[16],i18n:[16],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32]}],[0,"presto-email-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],emailCollection:[16],i18n:[16],videoId:[2,"video-id"],presetId:[2,"preset-id"],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],percentagePassed:[32]}],[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}],[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],direction:[1],i18n:[16],provider:[1],type:[1],isAudioProvider:[32]}],[1,"presto-email-overlay-ui",{headline:[1],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],i18n:[16],provider:[1],type:[1],email:[32],isAudioProvider:[32]}],[1,"presto-action-bar-ui",{open:[4]}],[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1]}],[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}],[1,"presto-player-spinner"],[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]]]],e)));
inc/Support/Block.php CHANGED
@@ -321,7 +321,7 @@ class Block
321
  'text' => DynamicData::replaceText($preset->watermark['text'])
322
  ];
323
 
324
- $preset->watermark = wp_parse_args( $watermark_text, $preset->watermark );
325
  }
326
 
327
  return apply_filters('presto_player/presto_player_presets/data', $preset, 'video');
@@ -590,35 +590,30 @@ class Block
590
  public function getFeedHtml($atts)
591
  {
592
  if (is_feed()) {
 
593
 
594
- if (in_array($atts['provider'], array('self-hosted', 'bunny'))) {
595
-
596
- ob_start();
597
- ?>
598
  <video controls preload="none">
599
- <source src="<?php echo esc_attr($atts['src']); ?>" />
600
  </video>
601
- <?php
602
- return ob_get_clean();
603
- } else if ($atts['provider'] == 'youtube') {
604
-
605
- ob_start();
606
- ?>
607
- <div class="presto-iframe-fallback-container">
608
- <iframe style="width: 100%" class="presto-fallback-iframe" id="presto-iframe-fallback-<?php echo (int) $atts['id']; ?>" src="https://www.youtube.com/embed/<?php echo esc_attr($atts['id']); ?>"></iframe>
609
- </div>
610
- <?php
611
- return ob_get_clean();
612
- } else {
 
 
 
613
 
614
- ob_start();
615
- ?>
616
- <div class="presto-iframe-fallback-container">
617
- <iframe style="width: 100%" class="presto-fallback-iframe" id="presto-iframe-fallback-<?php echo (int) $atts['id']; ?>" src="https://player.vimeo.com/video/<?php echo esc_attr($atts['id']); ?>"></iframe>
618
- </div>
619
  <?php
620
- return ob_get_clean();
621
- }
622
  }
623
  }
624
  }
321
  'text' => DynamicData::replaceText($preset->watermark['text'])
322
  ];
323
 
324
+ $preset->watermark = wp_parse_args($watermark_text, $preset->watermark);
325
  }
326
 
327
  return apply_filters('presto_player/presto_player_presets/data', $preset, 'video');
590
  public function getFeedHtml($atts)
591
  {
592
  if (is_feed()) {
593
+ ob_start(); ?>
594
 
595
+ <?php if (in_array($this->name, array('self-hosted', 'bunny')) && !empty($atts['src'])) { ?>
 
 
 
596
  <video controls preload="none">
597
+ <source src="<?php echo esc_url($atts['src']); ?>" />
598
  </video>
599
+ <?php } ?>
600
+
601
+ <?php if ('audio' === $this->name && !empty($atts['src'])) { ?>
602
+ <audio controls preload="none">
603
+ <source src="<?php echo esc_url($atts['src']); ?>" />
604
+ </audio>
605
+ <?php } ?>
606
+
607
+ <?php if ('youtube' === $this->name && !empty($atts['video_id'])) { ?>
608
+ <?php echo wp_oembed_get('https://www.youtube.com/watch?v=' . $atts['video_id']); ?>
609
+ <?php } ?>
610
+
611
+ <?php if ('vimeo' === $this->name && !empty($atts['video_id'])) { ?>
612
+ <?php echo wp_oembed_get('https://vimeo.com/' . $atts['video_id']); ?>
613
+ <?php } ?>
614
 
 
 
 
 
 
615
  <?php
616
+ return ob_get_clean();
 
617
  }
618
  }
619
  }
languages/presto-player.pot CHANGED
@@ -7,7 +7,7 @@ msgstr ""
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "POT-Creation-Date: 2022-01-28T15:09:39+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.5.0\n"
13
 
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
+ "POT-Creation-Date: 2022-02-07T15:24:52+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.5.0\n"
13
 
presto-player.php CHANGED
@@ -4,8 +4,9 @@
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
  * Description: A beautiful, fast media player for WordPress.
7
- * Version: 1.8.5
8
  * Author: Presto Made, Inc
 
9
  * Text Domain: presto-player
10
  * Tags: private, video, lms, hls
11
  * Domain Path: languages
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
  * Description: A beautiful, fast media player for WordPress.
7
+ * Version: 1.8.6
8
  * Author: Presto Made, Inc
9
+ * Author URI: https://prestoplayer.com/
10
  * Text Domain: presto-player
11
  * Tags: private, video, lms, hls
12
  * Domain Path: languages
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://prestoplayer.com
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 5.9
7
- Stable tag: 1.8.5
8
  Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -152,6 +152,10 @@ It is also important to point out that BunnyNet has a $1 per month minimum.
152
 
153
 
154
  == Changelog ==
 
 
 
 
155
  = 1.8.5 - January 28, 2022 =
156
  * Fix: Bunny.net popup UI issue with WordPress 5.9.
157
  * Fix: Undefined error on click of private audio switch.
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 5.9
7
+ Stable tag: 1.8.6
8
  Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
152
 
153
 
154
  == Changelog ==
155
+ = 1.8.6 - February 07, 2022 =
156
+ * Fix: Quality switcher missing on iOS device for HLS videos.
157
+ * Fix: Incorrect video links on RSS feed.
158
+
159
  = 1.8.5 - January 28, 2022 =
160
  * Fix: Bunny.net popup UI issue with WordPress 5.9.
161
  * Fix: Undefined error on click of private audio switch.