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

Version Description

  • November 17, 2021 =
  • Compatibility update with WordPress.com hosting stripping out player tag.
  • Fix z-index issue where action bar is below muted preview.
  • Fix double-play button issue on iOS devices when muted preview and large play button are enabled.
  • Automatically set media hub title when left blank.
  • Update php requirements in readme.txt.
Download this release

Release Info

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

Code changes from version 1.7.0 to 1.7.1

dist/components/cjs/{hls-cce701e2.js → hls-ffa89ea3.js} RENAMED
@@ -1,7 +1,7 @@
1
  'use strict';
2
 
3
  const index = require('./index-e08d9481.js');
4
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-ba89ff03.js');
5
 
6
  var loadHLS = function loadHLS(_ref) {
7
  var config = _ref.config,
1
  'use strict';
2
 
3
  const index = require('./index-e08d9481.js');
4
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-d2fef94c.js');
5
 
6
  var loadHLS = function loadHLS(_ref) {
7
  var config = _ref.config,
dist/components/cjs/{learndash-06d5665a.js → learndash-b9a401d1.js} RENAMED
@@ -1,6 +1,6 @@
1
  'use strict';
2
 
3
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-ba89ff03.js');
4
  require('./index-e08d9481.js');
5
 
6
  const learndash = (function (player) {
1
  'use strict';
2
 
3
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-d2fef94c.js');
4
  require('./index-e08d9481.js');
5
 
6
  const learndash = (function (player) {
dist/components/cjs/presto-action-bar_20.cjs.entry.js CHANGED
@@ -2,7 +2,7 @@
2
 
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
 
5
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-ba89ff03.js');
6
  require('./index-e08d9481.js');
7
 
8
 
2
 
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
 
5
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoBunny_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-d2fef94c.js');
6
  require('./index-e08d9481.js');
7
 
8
 
dist/components/collection/components/core/player/presto-player.css CHANGED
@@ -1493,6 +1493,10 @@ https://github.com/prestomade/presto-player/issues/140
1493
  .presto-player__wrapper.presto-player--hide-scrim .plyr__controls {
1494
  background: transparent;
1495
  }
 
 
 
 
1496
 
1497
  .presto-player__wrapper.skin-stacked .plyr__controls {
1498
  flex-wrap: wrap;
@@ -1682,7 +1686,7 @@ https://github.com/prestomade/presto-player/issues/140
1682
  left: 0;
1683
  right: 0;
1684
  bottom: 0;
1685
- display: flex;
1686
  align-items: center;
1687
  justify-content: center;
1688
  }
@@ -1694,6 +1698,9 @@ https://github.com/prestomade/presto-player/issues/140
1694
  .presto-player__wrapper.is-muted-overlay {
1695
  cursor: pointer;
1696
  }
 
 
 
1697
  .presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid {
1698
  opacity: 1;
1699
  visibility: visible;
1493
  .presto-player__wrapper.presto-player--hide-scrim .plyr__controls {
1494
  background: transparent;
1495
  }
1496
+ .presto-player__wrapper presto-action-bar {
1497
+ position: relative;
1498
+ z-index: 1;
1499
+ }
1500
 
1501
  .presto-player__wrapper.skin-stacked .plyr__controls {
1502
  flex-wrap: wrap;
1686
  left: 0;
1687
  right: 0;
1688
  bottom: 0;
1689
+ display: none;
1690
  align-items: center;
1691
  justify-content: center;
1692
  }
1698
  .presto-player__wrapper.is-muted-overlay {
1699
  cursor: pointer;
1700
  }
1701
+ .presto-player__wrapper.is-muted-overlay.presto-player--playing .presto-player__muted-overlay {
1702
+ display: flex;
1703
+ }
1704
  .presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid {
1705
  opacity: 1;
1706
  visibility: visible;
dist/components/esm/{hls-dd27ea38.js → hls-a3306123.js} RENAMED
@@ -1,5 +1,5 @@
1
  import { m as _asyncToGenerator, a as _objectSpread2 } from './index-68468f45.js';
2
- import { P as PrestoPlayer } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-bae02fe2.js';
3
 
4
  var loadHLS = function loadHLS(_ref) {
5
  var config = _ref.config,
1
  import { m as _asyncToGenerator, a as _objectSpread2 } from './index-68468f45.js';
2
+ import { P as PrestoPlayer } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1d8e7935.js';
3
 
4
  var loadHLS = function loadHLS(_ref) {
5
  var config = _ref.config,
dist/components/esm/{learndash-dcb5fc70.js → learndash-0c65cde4.js} RENAMED
@@ -1,4 +1,4 @@
1
- import { r as resumeProgress } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-bae02fe2.js';
2
  import './index-68468f45.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-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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1d8e7935.js';
2
  import './index-68468f45.js';
3
 
4
  const learndash = (function (player) {
dist/components/esm/presto-action-bar_20.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_bunny, e as presto_cta_overlay, f as presto_cta_overlay_controller, C as presto_cta_overlay_ui, g as presto_dynamic_overlay_ui, h as presto_dynamic_overlays, i as presto_email_overlay, j as presto_email_overlay_controller, E as presto_email_overlay_ui, k as presto_muted_overlay, l as presto_player, m as presto_player_button, n as presto_player_spinner, o as presto_video, p as presto_vimeo, q as presto_youtube, s as presto_youtube_subscribe_button } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-bae02fe2.js';
2
  import './index-68468f45.js';
1
+ export { a as presto_action_bar, b as presto_action_bar_controller, c as presto_action_bar_ui, d as presto_bunny, e as presto_cta_overlay, f as presto_cta_overlay_controller, C as presto_cta_overlay_ui, g as presto_dynamic_overlay_ui, h as presto_dynamic_overlays, i as presto_email_overlay, j as presto_email_overlay_controller, E as presto_email_overlay_ui, k as presto_muted_overlay, l as presto_player, m as presto_player_button, n as presto_player_spinner, o as presto_video, p as presto_vimeo, q as presto_youtube, s as presto_youtube_subscribe_button } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.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-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1d8e7935.js';
2
  import './index-68468f45.js';
dist/components/web-components/{p-461063ec.js → p-4b2c013c.js} RENAMED
@@ -1 +1 @@
1
- import{r as e}from"./p-fdc16b88.js";import"./p-99303c1a.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-915822ef.js";import"./p-99303c1a.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-bfec07bf.js → p-619153e5.js} RENAMED
@@ -1 +1 @@
1
- import{m as n,a as r}from"./p-99303c1a.js";import{P as e}from"./p-fdc16b88.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)}}())}
1
+ import{m as n,a as r}from"./p-99303c1a.js";import{P as e}from"./p-915822ef.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-fdc16b88.js → p-915822ef.js} RENAMED
@@ -1 +1 @@
1
- import{r as t,h as e,g as i,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 c,l as d,m as h,n as v,H as y}from"./p-99303c1a.js";let f=class{constructor(e){t(this,e)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var e,i;this.currentTime=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.currentTime,this.duration=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return e("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 i(this)}};function g({current:t,duration:e,showAfter:i=null}){if(0===i)return!0;if(null===i||!e)return!1;if(t===i)return!0;let r=t/e*100;return 99.9<r&&(r=100),console.log(r,i),r>=i}function m(t){let e,i=t.split(":");return i.length>1&&(e=60*parseInt(i[0])),parseInt(i[1])+parseInt(e)}function b(){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 _=class{constructor(e){t(this,e),this.show=!1,this.youtubeRenderKey=1,this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleDuration(){this.handleTime()}handleEnded(t){var e;if(t){if(100!==(null===(e=null==this?void 0:this.config)||void 0===e?void 0:e.percentage_start))return;this.show=!0}}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleTime(){this.checkTime()}checkTime(){var t,e;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===(e=this.config)||void 0===e?void 0:e.percentage_start})}handleButtonCountChange(t,e){(null==t?void 0:t.button_count)!==(null==e?void 0:e.button_count)&&this.youtubeRenderKey++,(null==t?void 0:t.enabled)&&this.handleDuration()}youtubeButton(){var t,i,r,o;if("youtube"===(null===(t=this.config)||void 0===t?void 0:t.button_type)&&(null===(i=this.youtube)||void 0===i?void 0:i.channelId))return e("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,i,r,o,n,a,s,l,p,u,c;if("custom"===(null===(t=this.config)||void 0===t?void 0:t.button_type))return e("presto-player-button",{type:"primary",size:"small",href:null===(r=null===(i=this.config)||void 0===i?void 0:i.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===(c=this.config)||void 0===c?void 0:c.button_text)}render(){var t,i;return e("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===(i=this.config)||void 0===i?void 0:i.text,e("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return i(this)}static get watchers(){return{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"]}}};_.style=":host{display:block}";let w=class{constructor(e){t(this,e)}render(){return e("div",{class:{bar:!0,"bar--open":this.open}},e("span",{part:"content",class:"bar__content"},e("slot",null)),e("span",{part:"button",class:"bar__button"},e("slot",{name:"button"})))}};w.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)}.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 k=class{constructor(e){t(this,e)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return e("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})}},x=class{constructor(e){t(this,e)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var e,i;this.currentTime=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.currentTime,this.duration=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t;return e("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})}};x.style=":host{display:block}";let z=class{constructor(e){t(this,e),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleEnded(t){var e;if(t){if(100!==(null===(e=null==this?void 0:this.cta)||void 0===e?void 0:e.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()}render(){var t,i,r,o,n,a,s,l,p,u,c,d,h,v;if(this.show)return e("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===(i=null==this?void 0:this.cta)||void 0===i?void 0:i.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===(c=null==this?void 0:this.cta)||void 0===c?void 0:c.button_link,allowSkip:!this.ended&&(null===(d=null==this?void 0:this.cta)||void 0===d?void 0:d.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()})}static get watchers(){return{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"]}}};z.style=":host{display:block}";const j=function(t,e,i){var r=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}({minFontSize:-1/0,maxFontSize:1/0,container:t},i),o=function(t){var i=e||1,o=function(){var e;t.style.fontSize=Math.max(Math.min(((null==r||null===(e=r.container)||void 0===e?void 0:e.clientWidth)||0)/(10*i),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize))+"px"};if(o(),"ResizeObserver"in window==0)var n=import("./p-97e2763b.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 T=class{constructor(e){t(this,e),this.skip=r(this,"skip",7),this.rewatch=r(this,"rewatch",7)}componentDidLoad(){j(this.textInput,3,{maxFontSize:20,minFontSize:8})}handleCTAClick(t){var e;(null===(e=this.buttonLink)||void 0===e?void 0:e.url)&&(t.preventDefault(),t.stopPropagation(),this.handleLink())}handleLink(){var t,e,i;(null===(t=this.buttonLink)||void 0===t?void 0:t.opensInNewTab)?window.open(null===(e=this.buttonLink)||void 0===e?void 0:e.url,"_blank"):window.location.href=null===(i=this.buttonLink)||void 0===i?void 0:i.url}render(){var t,i,r,o,n;return e("div",{class:"wrapper",ref:t=>this.textInput=t},e("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":""}`},e("div",{class:"content"},e("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&e("p",{part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&e("presto-player-button",{full:!0,onClick:t=>this.handleCTAClick(t),part:"cta-button",href:null===(i=null==this?void 0:this.buttonLink)||void 0===i?void 0:i.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&&e("div",{class:"rewatch",onClick:t=>{t.preventDefault(),t.stopImmediatePropagation(),this.rewatch.emit()}},e("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"},e("polyline",{points:"9 14 4 9 9 4"}),e("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&&e("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," →"))}};T.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}';let S=class{constructor(e){t(this,e),this.position="top-right"}closestElement(t,e){return e&&e!=document&&e!=window&&e.closest(t)||e&&this.closestElement(t,e.getRootNode().host)}componentDidLoad(){let t=this.closestElement("presto-player",this.el);j(this.text,3,{maxFontSize:16,minFontSize:10,container:t})}render(){return e(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},e("slot",null))}get el(){return i(this)}};S.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 P=class{constructor(e){t(this,e),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,e,i,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===(i=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===i?void 0:i.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:e,component:i}=this.refs[t];this.checkComponent(i,e.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,e,i){if(!(null==t?void 0:t.offsetParent))return i();if(!t.shadowRoot.querySelector("slot"))return i();if(this.player&&this.player.playing){const r=t.shadowRoot.querySelector("slot").assignedNodes()[0];if(r){if(r.parentElement.innerHTML!=e)return i();const t=getComputedStyle(r.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(t.fontSize,10)<10)return i();const o=function(t){var e=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return e?[e[1],e[2],e[3],"1"]:(e=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[e[1],e[2],e[3],e[4]]:void 0}(t.color);if("1"!==(null==o?void 0:o[3]))return i()}}}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 i,r;return e("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(t)},ref:e=>this.refs[t.id]={overlay:t,component:e},key:t.id,position:t.position,href:null===(i=null==t?void 0:t.link)||void 0===i?void 0:i.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 e,i,r;if(!(null===(i=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===i?void 0:i.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,i,r,o,n,a,s,l,p,u,c;if(this.enabled&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(r=null===(i=this.preset)||void 0===i?void 0:i.watermark)||void 0===r?void 0:r.enabled)))return e("div",{class:"overlays",ref:t=>this.container=t},e("div",{class:"top-left",ref:t=>this.topLeft=t},!!this.shouldShowWatermark("top-left")&&e("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)))),e("div",{class:"top-right",ref:t=>this.topRight=t},!!this.shouldShowWatermark("top-right")&&e("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===(c=null==this?void 0:this.overlays)||void 0===c?void 0:c.length)&&this.overlays.map((t=>"top-right"!==t.position?"":this.renderOverlay(t)))))}get el(){return i(this)}};P.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 C=class{constructor(e){t(this,e)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var e,i;this.currentTime=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.currentTime,this.duration=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t,i;return e("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===(i=this.preset)||void 0===i?void 0:i.email_collection,i18n:this.i18n})}};C.style=":host{display:block}";let O=class{constructor(e){t(this,e),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",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 e;this.loading=!0,this.error="";const i=await this.getNonce(),{data:r}=await i.json();try{let i=await fetch(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.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 i.json();if(!o)throw n;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(t){const e=null==t?void 0:t[0];e&&"string"==typeof e&&(this.error=e)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}render(){var t,i,r,o;if(this.show)return e("presto-email-overlay-ui",{direction:this.direction,class:"email-overlay",headline:null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.headline,bottomText:null===(i=null==this?void 0:this.emailCollection)||void 0===i?void 0:i.bottom_text,allowSkip:null===(r=null==this?void 0:this.emailCollection)||void 0===r?void 0:r.allow_skip,buttonText:null===(o=null==this?void 0:this.emailCollection)||void 0===o?void 0:o.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:t=>this.submit(t),onSkip:()=>this.skip(),i18n:this.i18n})}static get watchers(){return{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"]}}};O.style=":host{display:block}";let I=class{constructor(e){t(this,e),this.submitForm=r(this,"submitForm",7),this.skip=r(this,"skip",7)}handleSubmit(t){this.submitForm.emit({email:this.email}),t.preventDefault()}componentDidLoad(){j(this.textInput,3,{maxFontSize:20,minFontSize:8})}handleChange(t){this.email=t.target.value}render(){var t,i,r,o;return e("div",{class:"overlay "+("rtl"===this.direction?"rtl":""),ref:t=>this.textInput=t},e("div",{class:"content"},e("h1",null,this.headline||(null===(t=null==this?void 0:this.i18n)||void 0===t?void 0:t.emailDefaultHeadline)),this.isLoading?e("presto-player-spinner",null):e("form",{onSubmit:t=>this.handleSubmit(t)},e("input",{type:"email",placeholder:null===(i=null==this?void 0:this.i18n)||void 0===i?void 0:i.emailPlaceholder,value:this.email,onInput:t=>this.handleChange(t),required:!0}),e("button",{type:"submit"},this.buttonText||(null===(r=null==this?void 0:this.i18n)||void 0===r?void 0:r.play))),this.errorMessage&&e("p",{class:"error"},this.errorMessage),this.bottomText&&e("p",{innerHTML:this.bottomText}),!!this.allowSkip&&e("div",{class:"skip",onClick:()=>{this.skip.emit()}},null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.skip," →")))}};I.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}.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: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-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}.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}';let A=class{constructor(e){t(this,e),this.playVideo=r(this,"playVideo",7)}render(){var t,i,r,o,n,a,s,l,p;return e("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"])&&e("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},e("svg",{id:"plyr-play",viewBox:"0 0 18 18"},e("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"})),e("span",{class:"plyr__sr-only"},"Play")),(null===(i=this.mutedOverlay)||void 0===i?void 0:i.enabled)&&(null===(r=this.mutedOverlay)||void 0===r?void 0:r.src)?e("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)+"%"}},e("img",{src:null===(p=this.mutedOverlay)||void 0===p?void 0:p.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};A.style=":host{display:block}";var M=["premium","referrerPolicy"];function E(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function F(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function L(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function N(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function R(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?N(Object(i),!0).forEach((function(e){L(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var B={addCSS:!0,thumbWidth:15,watch:!0};function D(t,e){return function(){return Array.from(document.querySelectorAll(e)).includes(this)}.call(t,e)}var q=function(t){return null!=t?t.constructor:null},H=function(t,e){return!!(t&&e&&t instanceof e)},$=function(t){return q(t)===String},V=function(t){return Array.isArray(t)},U=function(t){return H(t,NodeList)},Q=$,W=V,Y=U,J=function(t){return H(t,Element)},G=function(t){return H(t,Event)},K=function(t){return function(t){return null==t}(t)||($(t)||V(t)||U(t))&&!t.length||function(t){return q(t)===Object}(t)&&!Object.keys(t).length};var X,Z,tt,et=function(){function t(e,i){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),J(e)?this.element=e:Q(e)&&(this.element=document.querySelector(e)),J(this.element)&&K(this.element.rangeTouch)&&(this.config=R({},B,{},i),this.init())}return function(t,e,i){e&&F(t.prototype,e),i&&F(t,i)}(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 e=this,i=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){e.element[i](t,(function(t){return e.set(t)}),!1)}))}},{key:"get",value:function(e){if(!t.enabled||!G(e))return null;var i,r=e.target,o=e.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>(i=100/l.width*(o.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*p:50<i&&(i+=2*(i-50)*p),n+function(t,e){if(1>e){var i=function(t){var e="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}(e);return parseFloat(t.toFixed(i))}return Math.round(t/e)*e}(i/100*(a-n),s)}},{key:"set",value:function(e){t.enabled&&G(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(t,e){if(t&&e){var i=new Event(e,{bubbles:!0});t.dispatchEvent(i)}}(e.target,"touchend"===e.type?"change":"input"))}}],[{key:"setup",value:function(e){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null;if(K(e)||Q(e)?r=Array.from(document.querySelectorAll(Q(e)?e:'input[type="range"]')):J(e)?r=[e]:Y(e)?r=Array.from(e):W(e)&&(r=e.filter(J)),K(r))return null;var o=R({},B,{},i);if(Q(e)&&o.watch){var n=new MutationObserver((function(i){Array.from(i).forEach((function(i){Array.from(i.addedNodes).forEach((function(i){J(i)&&D(i,e)&&new t(i,o)}))}))}));n.observe(document.body,{childList:!0,subtree:!0})}return r.map((function(e){return new t(e,i)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),it=function(t){return null!=t?t.constructor:null},rt=function(t,e){return Boolean(t&&e&&t instanceof e)},ot=function(t){return null==t},nt=function(t){return it(t)===Object},at=function(t){return it(t)===String},st=function(t){return it(t)===Function},lt=function(t){return Array.isArray(t)},pt=function(t){return rt(t,NodeList)},ut=function(t){return ot(t)||(at(t)||lt(t)||pt(t))&&!t.length||nt(t)&&!Object.keys(t).length},ct=ot,dt=nt,ht=function(t){return it(t)===Number&&!Number.isNaN(t)},vt=at,yt=function(t){return it(t)===Boolean},ft=st,gt=lt,mt=pt,bt=function(t){return null!==t&&"object"==l(t)&&1===t.nodeType&&"object"==l(t.style)&&"object"==l(t.ownerDocument)},_t=function(t){return rt(t,Event)},wt=function(t){return rt(t,KeyboardEvent)},kt=function(t){return rt(t,TextTrack)||!ot(t)&&at(t.kind)},xt=function(t){if(rt(t,window.URL))return!0;if(!at(t))return!1;var e=t;t.startsWith("http://")&&t.startsWith("https://")||(e="http://".concat(t));try{return!ut(new URL(e).hostname)}catch(t){return!1}},zt=ut,jt=(X=document.createElement("span"),Z={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},tt=Object.keys(Z).find((function(t){return void 0!==X.style[t]})),!!vt(tt)&&Z[tt]);function Tt(t,e){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),e)}var St={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 Pt(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)}function Ct(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];if(!i.length)return t;var o=i.shift();return dt(o)?(Object.keys(o).forEach((function(e){dt(o[e])?(Object.keys(t).includes(e)||Object.assign(t,a({},e,{})),Ct(t[e],o[e])):Object.assign(t,a({},e,o[e]))})),Ct.apply(void 0,[t].concat(i))):t}function Ot(t,e){Array.from(t.length?t:[t]).reverse().forEach((function(t,i){var r=i>0?e.cloneNode(!0):e,o=t.parentNode,n=t.nextSibling;r.appendChild(t),n?o.insertBefore(r,n):o.appendChild(r)}))}function It(t,e){bt(t)&&!zt(e)&&Object.entries(e).filter((function(t){var e=o(t,2);return!ct(e[1])})).forEach((function(e){var i=o(e,2);return t.setAttribute(i[0],i[1])}))}function At(t,e,i){var r=document.createElement(t);return dt(e)&&It(r,e),vt(i)&&(r.innerText=i),r}function Mt(t,e,i,r){bt(e)&&e.appendChild(At(t,i,r))}function Et(t){mt(t)||gt(t)?Array.from(t).forEach(Et):bt(t)&&bt(t.parentNode)&&t.parentNode.removeChild(t)}function Ft(t){if(bt(t))for(var e=t.childNodes.length;e>0;)t.removeChild(t.lastChild),e-=1}function Lt(t,e){return bt(e)&&bt(e.parentNode)&&bt(t)?(e.parentNode.replaceChild(t,e),t):null}function Nt(t,e){if(!vt(t)||zt(t))return{};var i={},r=Ct({},e);return t.split(",").forEach((function(t){var e=t.trim(),n=e.replace(".",""),a=e.replace(/[[\]]/g,"").split("="),s=o(a,1)[0],l=a.length>1?a[1].replace(/["']/g,""):"";switch(e.charAt(0)){case".":i.class=vt(r.class)?"".concat(r.class," ").concat(n):n;break;case"#":i.id=e.replace("#","");break;case"[":i[s]=l}})),Ct(r,i)}function Rt(t,e){if(bt(t)){var i=e;yt(i)||(i=!t.hidden),t.hidden=i}}function Bt(t,e,i){if(mt(t))return Array.from(t).map((function(t){return Bt(t,e,i)}));if(bt(t)){var r="toggle";return void 0!==i&&(r=i?"add":"remove"),t.classList[r](e),t.classList.contains(e)}return!1}function Dt(t,e){return bt(t)&&t.classList.contains(e)}function qt(t,e){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(t,e)}function Ht(t){return this.elements.container.querySelectorAll(t)}function $t(t){return this.elements.container.querySelector(t)}function Vt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];bt(t)&&(t.focus({preventScroll:!0}),e&&Bt(t,this.config.classNames.tabFocus))}var Ut={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Qt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,e,i){var r=Qt[t]||"html5"!==e;return{api:r,ui:r&&Qt.rangeInput&&("video"!==t||!St.isIPhone||St.isIPhone&&i&&Qt.playsinline)}},pip:!(St.isIPhone||!ft(At("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||At("video").disablePictureInPicture)),airplay:ft(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(zt(t))return!1;var e=t.split("/"),i=o(e,1),r=t;if(!this.isHTML5||i[0]!==this.type)return!1;Object.keys(Ut).includes(r)&&(r+='; codecs="'.concat(Ut[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!==jt,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Wt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Yt(t,e,i){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&&!zt(e)&&ft(i)){var s=e.split(" "),l=a;Wt&&(l={passive:n,capture:a}),s.forEach((function(e){r&&r.eventListeners&&o&&r.eventListeners.push({element:t,type:e,callback:i,options:l}),t[o?"addEventListener":"removeEventListener"](e,i,l)}))}}function Jt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=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];Yt.call(this,t,e,i,!0,r,o)}function Gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=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];Yt.call(this,t,e,i,!1,r,o)}function Kt(t){var e=this,i=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];Gt(t,i,a,o,n),r.apply(e,l)};Yt.call(this,t,i,a,!0,o,n)}function Xt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(bt(t)&&!zt(e)){var o=new CustomEvent(e,{bubbles:i,detail:n(n({},r),{},{plyr:this})});t.dispatchEvent(o)}}function Zt(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function te(){var t=this;return new Promise((function(e){return t.ready?setTimeout(e,0):Jt.call(t,t.elements.container,"ready",e)})).then((function(){}))}function ee(t){(function(t){return rt(t,Promise)&&st(t.then)})(t)&&t.then(null,(function(){}))}function ie(t){return gt(t)?t.filter((function(e,i){return t.indexOf(e)===i})):t}function re(t,e){return gt(t)&&t.length?t.reduce((function(t,i){return Math.abs(i-e)<Math.abs(t-e)?i:t})):null}function oe(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var ne=[[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,e){var i=o(e,2),r=i[0],s=i[1];return n(n({},t),{},a({},r/s,[r,s]))}),{});function ae(t){return!!(gt(t)||vt(t)&&t.includes(":"))&&(gt(t)?t:t.split(":")).map(Number).every(ht)}function se(t){if(!gt(t)||!t.every(ht))return null;var e=o(t,2),i=e[0],r=e[1],n=function t(e,i){return 0===i?e:t(i,e%i)}(i,r);return[i/n,r/n]}function le(t){var e=function(t){return ae(t)?t.split(":").map(Number):null},i=e(t);if(null===i&&(i=e(this.config.ratio)),null===i&&!zt(this.embed)&&gt(this.embed.ratio)&&(i=this.embed.ratio),null===i&&this.isHTML5){var r=this.media;i=[r.videoWidth,r.videoHeight]}return se(i)}function pe(t){if(!this.isVideo)return{};var e=this.elements.wrapper,i=le.call(this,t);if(!gt(i))return{};var r=se(i),n=o(r,2),a=n[0],s=n[1],l=100/a*s;if(oe("aspect-ratio: ".concat(a,"/").concat(s))?e.style.aspectRatio="".concat(a,"/").concat(s):e.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?e.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:l,ratio:i}}function ue(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,r=t/e,o=re(Object.keys(ne),r);return Math.abs(o-r)<=i?ne[o]:[t,e]}var ce={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(e){var i=e.getAttribute("type");return!!zt(i)||Qt.mime.call(t,i)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:ce.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,zt(this.config.ratio)||pe.call(t),Object.defineProperty(t.media,"quality",{get:function(){var e=ce.getSources.call(t).find((function(e){return e.getAttribute("src")===t.source}));return e&&Number(e.getAttribute("size"))},set:function(e){if(t.quality!==e){if(t.config.quality.forced&&ft(t.config.quality.onChange))t.config.quality.onChange(e);else{var i=ce.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===e}));if(!i)return;var r=t.media,o=r.currentTime,n=r.paused,a=r.preload,s=r.readyState,l=r.playbackRate;t.media.src=i.getAttribute("src"),("none"!==a||s)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=o,n||ee(t.play())})),t.media.load())}Xt.call(t,t.media,"qualitychange",!1,{quality:e})}}})}},cancelRequests:function(){this.isHTML5&&(Et(ce.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function de(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function he(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return zt(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,e){return i[e].toString()}))}var ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())},ye=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 fe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.toString();return e=ve(e,"-"," "),e=ve(e,"_"," "),e=ye(e),ve(e," ","")}function ge(t){var e=document.createElement("div");return e.appendChild(t),e.innerHTML}var me={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},be=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(zt(t)||zt(e))return"";var i=Pt(e.i18n,t);if(zt(i))return Object.keys(me).includes(t)?me[t]:"";var r={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(r).forEach((function(t){var e=o(t,2);i=ve(i,e[0],e[1])})),i},_e=function(){function t(e){var i=this;p(this,t),E(this,"get",(function(e){if(!t.supported||!i.enabled)return null;var r=window.localStorage.getItem(i.key);if(zt(r))return null;var o=JSON.parse(r);return vt(e)&&e.length?o[e]:o})),E(this,"set",(function(e){if(t.supported&&i.enabled&&dt(e)){var r=i.get();zt(r)&&(r={}),Ct(r,e);try{window.localStorage.setItem(i.key,JSON.stringify(r))}catch(e){}}})),this.enabled=e.config.storage.enabled,this.key=e.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 we(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(i,r){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===e)try{i(JSON.parse(o.responseText))}catch(t){i(o.responseText)}else i(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",t,!0),o.responseType=e,o.send()}catch(t){r(t)}}))}function ke(t,e){if(vt(t)){var i=vt(e),r=function(){return null!==document.getElementById(e)},o=function(t,e){t.innerHTML=e,i&&r()||document.body.insertAdjacentElement("afterbegin",t)};if(!i||!r()){var n=_e.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),i&&a.setAttribute("id",e),n){var s=window.localStorage.getItem("cache-".concat(e));if(null!==s){var l=JSON.parse(s);o(a,l.content)}}we(t).then((function(t){if(!zt(t)){if(n)try{window.localStorage.setItem("cache-".concat(e),JSON.stringify({content:t}))}catch(t){}o(a,t)}})).catch((function(){}))}}}var xe=function(t){return Math.trunc(t/60/60%60,10)},ze=function(t){return Math.trunc(t%60,10)};function je(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!ht(t))return je(void 0,e,i);var r,o=function(t){return"0".concat(t).slice(-2)},n=xe(t),a=(r=t,Math.trunc(r/60%60,10)),s=ze(t);return n=e||n>0?"".concat(n,":"):"","".concat(i&&t>0?"-":"").concat(n).concat(o(a),":").concat(o(s))}var Te={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,i=t.host!==e||St.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements:function(){try{return this.elements.controls=$t.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Ht.call(this,this.config.selectors.buttons.play),pause:$t.call(this,this.config.selectors.buttons.pause),restart:$t.call(this,this.config.selectors.buttons.restart),rewind:$t.call(this,this.config.selectors.buttons.rewind),fastForward:$t.call(this,this.config.selectors.buttons.fastForward),mute:$t.call(this,this.config.selectors.buttons.mute),pip:$t.call(this,this.config.selectors.buttons.pip),airplay:$t.call(this,this.config.selectors.buttons.airplay),settings:$t.call(this,this.config.selectors.buttons.settings),captions:$t.call(this,this.config.selectors.buttons.captions),fullscreen:$t.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=$t.call(this,this.config.selectors.progress),this.elements.inputs={seek:$t.call(this,this.config.selectors.inputs.seek),volume:$t.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:$t.call(this,this.config.selectors.display.buffer),currentTime:$t.call(this,this.config.selectors.display.currentTime),duration:$t.call(this,this.config.selectors.display.duration)},bt(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,e){var i="http://www.w3.org/2000/svg",r=Te.getIconUrl.call(this),o="".concat(r.cors?"":r.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(i,"svg");It(n,Ct(e,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(i,"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 e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=be(t,this.config);return At("span",n(n({},e),{},{class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),i)},createBadge:function(t){if(zt(t))return null;var e=At("span",{class:this.config.classNames.menu.value});return e.appendChild(At("span",{class:this.config.classNames.menu.badge},t)),e},createButton:function(t,e){var i=this,r=Ct({},e),o=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=fe(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===i.config.classNames.control}))||Ct(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:zt(n.label)&&(n.label=o),zt(n.icon)&&(n.icon=t)}var a=At(n.element);return n.toggle?(a.appendChild(Te.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(Te.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(Te.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(Te.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(Te.createIcon.call(this,n.icon)),a.appendChild(Te.createLabel.call(this,n.label))),Ct(r,Nt(this.config.selectors.buttons[o],r)),It(a,r),"play"===o?(gt(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange:function(t,e){var i=At("input",Ct(Nt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":be(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[t]=i,Te.updateRangeFill.call(this,i),et.setup(i),i},createProgress:function(t,e){var i=At("progress",Ct(Nt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if("volume"!==t){i.appendChild(At("span",null,"0"));var r={played:"played",buffer:"buffered"}[t],o=r?be(r,this.config):"";i.innerText="% ".concat(o.toLowerCase())}return this.elements.display[t]=i,i},createTime:function(t,e){var i=Nt(this.config.selectors.display[t],e),r=At("div",Ct(i,{class:"".concat(i.class?i.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":be(t,this.config)}),"00:00");return this.elements.display[t]=r,r},bindMenuItemShortcuts:function(t,e){var i=this;Jt.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=qt(t,'[role="menuitemradio"]');!n&&[32,39].includes(r.which)?Te.showMenuPanel.call(i,e,!0):32!==r.which&&(40===r.which||n&&39===r.which?bt(o=t.nextElementSibling)||(o=t.parentNode.firstElementChild):bt(o=t.previousElementSibling)||(o=t.parentNode.lastElementChild),Vt.call(i,o,!0))}}),!1),Jt.call(this,t,"keyup",(function(t){13===t.which&&Te.focusFirstMenuItem.call(i,null,!0)}))},createMenuItem:function(t){var e=this,i=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=Nt(this.config.selectors.inputs[o]),c=At("button",Ct(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:i})),d=At("span");d.innerHTML=n,bt(s)&&d.appendChild(s),c.appendChild(d),Object.defineProperty(c,"checked",{enumerable:!0,get:function(){return"true"===c.getAttribute("aria-checked")},set:function(t){t&&Array.from(c.parentNode.children).filter((function(t){return qt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),c.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(c,"click keyup",(function(t){if(!wt(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),c.checked=!0,o){case"language":e.currentTrack=Number(i);break;case"quality":e.quality=i;break;case"speed":e.speed=parseFloat(i)}Te.showMenuPanel.call(e,"home",wt(t))}}),o,!1),Te.bindMenuItemShortcuts.call(this,c,o),r.appendChild(c)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ht(t)?je(t,xe(this.duration)>0,e):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];bt(t)&&ht(e)&&(t.innerText=Te.formatTime(e,i))},updateVolume:function(){this.supported.ui&&(bt(this.elements.inputs.volume)&&Te.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),bt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;bt(t)&&(t.value=e,Te.updateRangeFill.call(this,t))},updateProgress:function(t){var e=this;if(this.supported.ui&&_t(t)){var i=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":i=function(t,e){return 0===t||0===e||Number.isNaN(t)||Number.isNaN(e)?0:(t/e*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&Te.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":!function(t,i){var r=ht(i)?i:0,o=bt(t)?t:e.elements.display.buffer;if(bt(o)){o.value=r;var n=o.getElementsByTagName("span")[0];bt(n)&&(n.childNodes[0].nodeValue=r)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var e=_t(t)?t.target:t;if(bt(e)&&"range"===e.getAttribute("type")){if(qt(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);var i=Te.formatTime(this.currentTime),r=Te.formatTime(this.duration),o=be("seekLabel",this.config);e.setAttribute("aria-valuetext",o.replace("{currentTime}",i).replace("{duration}",r))}else if(qt(e,this.config.selectors.inputs.volume)){var n=100*e.value;e.setAttribute("aria-valuenow",n),e.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else e.setAttribute("aria-valuenow",e.value);St.isWebkit&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip:function(t){var e=this;if(this.config.tooltips.seek&&bt(this.elements.inputs.seek)&&bt(this.elements.display.seekTooltip)&&0!==this.duration){var i="".concat(this.config.classNames.tooltip,"--visible"),r=function(t){return Bt(e.elements.display.seekTooltip,i,t)};if(this.touch)r(!1);else{var o=0,n=this.elements.progress.getBoundingClientRect();if(_t(t))o=100/n.width*(t.pageX-n.left);else{if(!Dt(this.elements.display.seekTooltip,i))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Te.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),_t(t)&&["mouseenter","mouseleave"].includes(t.type)&&r("mouseenter"===t.type)}}},timeUpdate:function(t){var e=!bt(this.elements.display.duration)&&this.config.invertTime;Te.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),t&&"timeupdate"===t.type&&this.media.seeking||Te.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Rt(this.elements.display.currentTime,!0),void Rt(this.elements.progress,!0);bt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=bt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Te.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Te.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Te.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,e){Rt(this.elements.settings.buttons[t],!e)},updateSetting:function(t,e,i){var r=this.elements.settings.panels[t],o=null,n=e;if("captions"===t)o=this.currentTrack;else{if(o=zt(i)?this[t]:i,zt(o)&&(o=this.config[t].default),!zt(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(bt(n)||(n=r&&r.querySelector('[role="menu"]')),bt(n)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Te.getLabel.call(this,t,o);var a=n&&n.querySelector('[value="'.concat(o,'"]'));bt(a)&&(a.checked=!0)}},getLabel:function(t,e){switch(t){case"speed":return 1===e?be("normal",this.config):"".concat(e,"&times;");case"quality":if(ht(e)){if(0===e)return be("auto",this.config);var i=be("qualityLabel.".concat(e),this.config);return i.length?i:"".concat(e,"p")}return ye(e);case"captions":return Ce.getLabel.call(this);default:return null}},setQualityMenu:function(t){var e=this;if(bt(this.elements.settings.panels.quality)){var i="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');gt(t)&&(this.options.quality=ie(t).filter((function(t){return e.config.quality.options.includes(t)})));var o=!zt(this.options.quality)&&this.options.quality.length>1;if(Te.toggleMenuButton.call(this,i,o),Ft(r),Te.checkMenu.call(this),o){var n=function(t){var i=be("qualityBadge.".concat(t),e.config);return i.length?Te.createBadge.call(e,i):null};this.options.quality.sort((function(t,i){var r=e.config.quality.options;return r.indexOf(t)>r.indexOf(i)?1:-1})).forEach((function(t){Te.createMenuItem.call(e,{value:t,list:r,type:i,title:Te.getLabel.call(e,"quality",t),badge:n(t)})})),Te.updateSetting.call(this,i,r)}}},setCaptionsMenu:function(){var t=this;if(bt(this.elements.settings.panels.captions)){var e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=Ce.getTracks.call(this),o=Boolean(r.length);if(Te.toggleMenuButton.call(this,e,o),Ft(i),Te.checkMenu.call(this),o){var n=r.map((function(e,r){return{value:r,checked:t.captions.toggled&&t.currentTrack===r,title:Ce.getLabel.call(t,e),badge:e.language&&Te.createBadge.call(t,e.language.toUpperCase()),list:i,type:"language"}}));n.unshift({value:-1,checked:!this.captions.toggled,title:be("disabled",this.config),list:i,type:"language"}),n.forEach(Te.createMenuItem.bind(this)),Te.updateSetting.call(this,e,i)}}},setSpeedMenu:function(){var t=this;if(bt(this.elements.settings.panels.speed)){var e="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(e){return e>=t.minimumSpeed&&e<=t.maximumSpeed}));var r=!zt(this.options.speed)&&this.options.speed.length>1;Te.toggleMenuButton.call(this,e,r),Ft(i),Te.checkMenu.call(this),r&&(this.options.speed.forEach((function(r){Te.createMenuItem.call(t,{value:r,list:i,type:e,title:Te.getLabel.call(t,"speed",r)})})),Te.updateSetting.call(this,e,i))}},checkMenu:function(){var t=this.elements.settings.buttons,e=!zt(t)&&Object.values(t).some((function(t){return!t.hidden}));Rt(this.elements.settings.menu,!e)},focusFirstMenuItem:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var i=t;bt(i)||(i=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var r=i.querySelector('[role^="menuitem"]');Vt.call(this,r,e)}},toggleMenu:function(t){var e=this.elements.settings.popup,i=this.elements.buttons.settings;if(bt(e)&&bt(i)){var r=e.hidden,o=r;if(yt(t))o=t;else if(wt(t)&&27===t.which)o=!1;else if(_t(t)){var n=ft(t.composedPath)?t.composedPath()[0]:t.target,a=e.contains(n);if(a||!a&&t.target!==i&&o)return}i.setAttribute("aria-expanded",o),Rt(e,!o),Bt(this.elements.container,this.config.classNames.menu.open,o),o&&wt(t)?Te.focusFirstMenuItem.call(this,null,!0):o||r||Vt.call(this,i,wt(t))}},getMenuSize:function(t){var e=t.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),t.parentNode.appendChild(e);var i=e.scrollWidth,r=e.scrollHeight;return Et(e),{width:i,height:r}},showMenuPanel:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(e));if(bt(r)){var o=r.parentNode,n=Array.from(o.children).find((function(t){return!t.hidden}));if(Qt.transitions&&!Qt.reducedMotion){o.style.width="".concat(n.scrollWidth,"px"),o.style.height="".concat(n.scrollHeight,"px");var a=Te.getMenuSize.call(this,r),s=function e(i){i.target===o&&["width","height"].includes(i.propertyName)&&(o.style.width="",o.style.height="",Gt.call(t,o,jt,e))};Jt.call(this,o,jt,s),o.style.width="".concat(a.width,"px"),o.style.height="".concat(a.height,"px")}Rt(n,!0),Rt(r,!1),Te.focusFirstMenuItem.call(this,r,i)}},setDownloadUrl:function(){var t=this.elements.buttons.download;bt(t)&&t.setAttribute("href",this.download)},create:function(t){var e=this,i=Te.bindMenuItemShortcuts,r=Te.createButton,o=Te.createProgress,n=Te.createRange,a=Te.createTime,s=Te.setQualityMenu,l=Te.setSpeedMenu,p=Te.showMenuPanel;this.elements.controls=null,gt(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));var u=At("div",Nt(this.config.selectors.controls.wrapper));this.elements.controls=u;var c={class:"plyr__controls__item"};return ie(gt(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&u.appendChild(r.call(e,"restart",c)),"rewind"===s&&u.appendChild(r.call(e,"rewind",c)),"play"===s&&u.appendChild(r.call(e,"play",c)),"fast-forward"===s&&u.appendChild(r.call(e,"fast-forward",c)),"progress"===s){var l=At("div",{class:"".concat(c.class," plyr__progress__container")}),d=At("div",Nt(e.config.selectors.progress));if(d.appendChild(n.call(e,"seek",{id:"plyr-seek-".concat(t.id)})),d.appendChild(o.call(e,"buffer")),e.config.tooltips.seek){var h=At("span",{class:e.config.classNames.tooltip},"00:00");d.appendChild(h),e.elements.display.seekTooltip=h}e.elements.progress=d,l.appendChild(e.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(a.call(e,"currentTime",c)),"duration"===s&&u.appendChild(a.call(e,"duration",c)),"mute"===s||"volume"===s){var v=e.elements.volume;bt(v)&&u.contains(v)||(v=At("div",Ct({},c,{class:"".concat(c.class," plyr__volume").trim()})),e.elements.volume=v,u.appendChild(v)),"mute"===s&&v.appendChild(r.call(e,"mute")),"volume"!==s||St.isIos||v.appendChild(n.call(e,"volume",Ct({max:1,step:.05,value:e.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===s&&u.appendChild(r.call(e,"captions",c)),"settings"===s&&!zt(e.config.settings)){var y=At("div",Ct({},c,{class:"".concat(c.class," plyr__menu").trim(),hidden:""}));y.appendChild(r.call(e,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var f=At("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),g=At("div"),m=At("div",{id:"plyr-settings-".concat(t.id,"-home")}),b=At("div",{role:"menu"});m.appendChild(b),g.appendChild(m),e.elements.settings.panels.home=m,e.config.settings.forEach((function(r){var o=At("button",Ct(Nt(e.config.selectors.buttons.settings),{type:"button",class:"".concat(e.config.classNames.control," ").concat(e.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(e,o,r),Jt.call(e,o,"click",(function(){p.call(e,r,!1)}));var n=At("span",null,be(r,e.config)),a=At("span",{class:e.config.classNames.menu.value});a.innerHTML=t[r],n.appendChild(a),o.appendChild(n),b.appendChild(o);var s=At("div",{id:"plyr-settings-".concat(t.id,"-").concat(r),hidden:""}),l=At("button",{type:"button",class:"".concat(e.config.classNames.control," ").concat(e.config.classNames.control,"--back")});l.appendChild(At("span",{"aria-hidden":!0},be(r,e.config))),l.appendChild(At("span",{class:e.config.classNames.hidden},be("menuBack",e.config))),Jt.call(e,s,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(e,"home",!0))}),!1),Jt.call(e,l,"click",(function(){p.call(e,"home",!1)})),s.appendChild(l),s.appendChild(At("div",{role:"menu"})),g.appendChild(s),e.elements.settings.buttons[r]=o,e.elements.settings.panels[r]=s})),f.appendChild(g),y.appendChild(f),u.appendChild(y),e.elements.settings.popup=f,e.elements.settings.menu=y}if("pip"===s&&Qt.pip&&u.appendChild(r.call(e,"pip",c)),"airplay"===s&&Qt.airplay&&u.appendChild(r.call(e,"airplay",c)),"download"===s){var _=Ct({},c,{element:"a",href:e.download,target:"_blank"});e.isHTML5&&(_.download=""),!xt(e.config.urls.download)&&e.isEmbed&&Ct(_,{icon:"logo-".concat(e.provider),label:e.provider}),u.appendChild(r.call(e,"download",_))}"fullscreen"===s&&u.appendChild(r.call(e,"fullscreen",c))})),this.isHTML5&&s.call(this,ce.getQualityOptions.call(this)),l.call(this),u},inject:function(){var t=this;if(this.config.loadSprite){var e=Te.getIconUrl.call(this);e.cors&&ke(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var r,n={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(ft(this.config.controls)&&(this.config.controls=this.config.controls.call(this,n)),this.config.controls||(this.config.controls=[]),bt(this.config.controls)||vt(this.config.controls)?i=this.config.controls:(i=Te.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ce.getLabel.call(this)}),a=!1),a&&vt(this.config.controls)&&(i=function(t){var e=t;return Object.entries(n).forEach((function(t){var i=o(t,2),r=i[1];e=ve(e,"{".concat(i[0],"}"),r)})),e}(i)),vt(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),bt(r)||(r=this.elements.container),r[bt(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),bt(this.elements.controls)||Te.findElements.call(this),!zt(this.elements.buttons)){var s=function(e){var i=t.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:function(){return Dt(e,i)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Bt(e,i,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){gt(t)||mt(t)?Array.from(t).filter(Boolean).forEach(s):s(t)}))}if(St.isEdge&&Tt(r),this.config.tooltips.controls){var l=this.config,p=l.classNames,u=l.selectors,c="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),d=Ht.call(this,c);Array.from(d).forEach((function(e){Bt(e,t.config.classNames.hidden,!1),Bt(e,t.config.classNames.tooltip,!0)}))}}};function Se(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t;if(e){var r=document.createElement("a");r.href=i,i=r.href}try{return new URL(i)}catch(t){return null}}function Pe(t){var e=new URLSearchParams;return dt(t)&&Object.entries(t).forEach((function(t){var i=o(t,2);e.set(i[0],i[1])})),e}var Ce={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Qt.textTracks)gt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Te.setCaptionsMenu.call(this);else{if(bt(this.elements.captions)||(this.elements.captions=At("div",Nt(this.config.selectors.captions)),function(t,e){bt(t)&&bt(e)&&e.parentNode.insertBefore(t,e.nextSibling)}(this.elements.captions,this.elements.wrapper)),St.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var e=t.getAttribute("src"),i=Se(e);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&we(e,"blob").then((function(e){t.setAttribute("src",window.URL.createObjectURL(e))})).catch((function(){Et(t)}))}))}var e=ie((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&(i=o(e,1)[0]);var r=this.storage.get("captions");yt(r)||(r=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:r,language:i,languages:e}),this.isHTML5&&Jt.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",Ce.update.bind(this)),setTimeout(Ce.update.bind(this),0)}},update:function(){var t=this,e=Ce.getTracks.call(this,!0),i=this.captions,r=i.active,o=i.language,n=i.meta,a=i.currentTrackNode,s=Boolean(e.find((function(t){return t.language===o})));this.isHTML5&&this.isVideo&&e.filter((function(t){return!n.get(t)})).forEach((function(e){t.debug.log("Track added",e),n.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),Jt.call(t,e,"cuechange",(function(){return Ce.updateCues.call(t)}))})),(s&&this.language!==o||!e.includes(a))&&(Ce.setLanguage.call(this,o),Ce.toggle.call(this,r&&s)),this.elements&&Bt(this.elements.container,this.config.classNames.captions.enabled,!zt(e)),gt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Te.setCaptionsMenu.call(this)},toggle:function(t){var e=this,i=!(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=ct(t)?!r:t;if(n!==r){if(i||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!i){var a=Ce.getTracks.call(this),s=Ce.findTrack.call(this,[this.captions.language].concat(u(this.captions.languages)),!0);return this.captions.language=s.language,void Ce.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),Bt(this.elements.container,o,n),this.captions.toggled=n,Te.updateSetting.call(this,"captions"),Xt.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout((function(){n&&e.captions.toggled&&e.captions.currentTrackNode&&(e.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=Ce.getTracks.call(this);if(-1!==t)if(ht(t))if(t in i){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var r=i[t],o=r||{},n=o.language;this.captions.currentTrackNode=r,Te.updateSetting.call(this,"captions"),e||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),Xt.call(this,this.media,"languagechange")}Ce.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Ce.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Ce.toggle.call(this,!1,e)},setLanguage:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(vt(t)){var i=t.toLowerCase();this.captions.language=i;var r=Ce.getTracks.call(this),o=Ce.findTrack.call(this,[i]);Ce.set.call(this,r.indexOf(o),e)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(i){return!t.isHTML5||e||t.captions.meta.has(i)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var e,i=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Ce.getTracks.call(this),n=function(t){return Number((i.captions.meta.get(t)||{}).default)},a=Array.from(o).sort((function(t,e){return n(e)-n(t)}));return t.every((function(t){return!(e=a.find((function(e){return e.language===t})))})),e||(r?a[0]:void 0)},getCurrentTrack:function(){return Ce.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var e=t;return!kt(e)&&Qt.textTracks&&this.captions.toggled&&(e=Ce.getCurrentTrack.call(this)),kt(e)?zt(e.label)?zt(e.language)?be("enabled",this.config):t.language.toUpperCase():e.label:be("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(bt(this.elements.captions))if(ct(t)||Array.isArray(t)){var e=t;if(!e){var i=Ce.getCurrentTrack.call(this);e=Array.from((i||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(ge)}var r=e.map((function(t){return t.trim()})).join("\n");if(r!==this.elements.captions.innerHTML){Ft(this.elements.captions);var o=At("span",Nt(this.config.selectors.caption));o.innerHTML=r,this.elements.captions.appendChild(o),Xt.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},Oe={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}},Ie={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ae=function(){},Me=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];p(this,t),this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}return s(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Ae}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ae}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Ae}}]),t}(),Ee=function(){function t(e){var i=this;p(this,t),E(this,"onChange",(function(){if(i.enabled){var t=i.player.elements.buttons.fullscreen;bt(t)&&(t.pressed=i.active),Xt.call(i.player,i.target===i.player.media?i.target:i.player.elements.container,i.active?"enterfullscreen":"exitfullscreen",!0)}})),E(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?i.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(i.scrollPosition.x,i.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Bt(i.target,i.player.config.classNames.fullscreen.fallback,t),St.isIos){var e=document.head.querySelector('meta[name="viewport"]'),r="viewport-fit=cover";e||(e=document.createElement("meta")).setAttribute("name","viewport");var o=vt(e.content)&&e.content.includes(r);t?(i.cleanupViewport=!o,o||(e.content+=",".concat(r))):i.cleanupViewport&&(e.content=e.content.split(",").filter((function(t){return t.trim()!==r})).join(","))}i.onChange()})),E(this,"trapFocus",(function(t){if(!St.isIos&&i.active&&"Tab"===t.key&&9===t.keyCode){var e=document.activeElement,r=Ht.call(i.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),n=o(r,1)[0],a=r[r.length-1];e!==a||t.shiftKey?e===n&&t.shiftKey&&(a.focus(),t.preventDefault()):(n.focus(),t.preventDefault())}})),E(this,"update",(function(){i.player.debug.log(i.enabled?"".concat(i.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),Bt(i.player.elements.container,i.player.config.classNames.fullscreen.enabled,i.enabled)})),E(this,"enter",(function(){i.enabled&&(St.isIos&&i.player.config.fullscreen.iosNative?i.player.isVimeo?i.player.embed.requestFullscreen():i.target.webkitEnterFullscreen():!t.native||i.forceFallback?i.toggleFallback(!0):i.prefix?zt(i.prefix)||i.target["".concat(i.prefix,"Request").concat(i.property)]():i.target.requestFullscreen({navigationUI:"hide"}))})),E(this,"exit",(function(){if(i.enabled)if(St.isIos&&i.player.config.fullscreen.iosNative)i.target.webkitExitFullscreen(),ee(i.player.play());else if(!t.native||i.forceFallback)i.toggleFallback(!1);else if(i.prefix){if(!zt(i.prefix)){var e="moz"===i.prefix?"Cancel":"Exit";document["".concat(i.prefix).concat(e).concat(i.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),E(this,"toggle",(function(){i.active?i.exit():i.enter()})),this.player=e,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(t,e){return(Element.prototype.closest||function(){var t=this;do{if(qt.matches(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,e)}(this.player.elements.container,e.config.fullscreen.container),Jt.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){i.onChange()})),Jt.call(this.player,this.player.elements.container,"dblclick",(function(t){bt(i.player.elements.controls)&&i.player.elements.controls.contains(t.target)||i.player.listeners.proxy(t,i.toggle,"fullscreen")})),Jt.call(this,this.player.elements.container,"keydown",(function(t){return i.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 Dt(this.target,this.player.config.classNames.fullscreen.fallback);var e=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}},{key:"target",get:function(){return St.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(ft(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(e){return!(!ft(document["".concat(e,"ExitFullscreen")])&&!ft(document["".concat(e,"CancelFullScreen")])||(t=e,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),t}();function Fe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(i,r){var o=new Image,n=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=e?i:r)(o)};Object.assign(o,{onload:n,onerror:n,src:t})}))}var Le={addStyleHook:function(){Bt(this.elements.container,this.config.selectors.container.replace(".",""),!0),Bt(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 Le.toggleNativeControls.call(this,!0);bt(this.elements.controls)||(Te.inject.call(this),this.listeners.controls()),Le.toggleNativeControls.call(this),this.isHTML5&&Ce.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Te.updateVolume.call(this),Te.timeUpdate.call(this),Te.durationUpdate.call(this),Le.checkPlaying.call(this),Bt(this.elements.container,this.config.classNames.pip.supported,Qt.pip&&this.isHTML5&&this.isVideo),Bt(this.elements.container,this.config.classNames.airplay.supported,Qt.airplay&&this.isHTML5),Bt(this.elements.container,this.config.classNames.isIos,St.isIos),Bt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){Xt.call(t,t.media,"ready")}),0),Le.setTitle.call(this),this.poster&&Le.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Te.durationUpdate.call(this)},setTitle:function(){var t=be("play",this.config);if(vt(this.config.title)&&!zt(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(e){e.setAttribute("aria-label",t)})),this.isEmbed){var e=$t.call(this,"iframe");if(!bt(e))return;var i=zt(this.config.title)?"video":this.config.title,r=be("frameTitle",this.config);e.setAttribute("title",r.replace("{title}",i))}},togglePoster:function(t){Bt(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),te.call(this).then((function(){return Fe(t)})).catch((function(i){throw t===e.poster&&Le.togglePoster.call(e,!1),i})).then((function(){if(t!==e.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(e.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),Le.togglePoster.call(e,!0),t})))},checkPlaying:function(t){var e=this;Bt(this.elements.container,this.config.classNames.playing,this.playing),Bt(this.elements.container,this.config.classNames.paused,this.paused),Bt(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:e.playing}),t.setAttribute("aria-label",be(e.playing?"pause":"play",e.config))})),_t(t)&&"timeupdate"===t.type||Le.toggleControls.call(this)},checkLoading:function(t){var e=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){Bt(e.elements.container,e.config.classNames.loading,e.loading),Le.toggleControls.call(e)}),this.loading?250:0)},toggleControls:function(t){var e=this.elements.controls;if(e&&this.config.hideControls){var i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||e.pressed||e.hover||i))}},migrateStyles:function(){var t=this;Object.values(n({},this.media.style)).filter((function(t){return!zt(t)&&vt(t)&&t.startsWith("--plyr")})).forEach((function(e){t.elements.container.style.setProperty(e,t.media.style.getPropertyValue(e)),t.media.style.removeProperty(e)})),zt(this.media.style)&&this.media.removeAttribute("style")}},Ne=function(){function t(e){var i=this;p(this,t),E(this,"firstTouch",(function(){var t=i.player,e=t.elements;t.touch=!0,Bt(e.container,t.config.classNames.isTouch,!0)})),E(this,"setTabFocus",(function(t){var e=i.player,r=e.elements;clearTimeout(i.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(i.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-i.lastKeyDown<=20)&&(function(){var t=e.config.classNames.tabFocus;Bt(Ht.call(e,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(i.focusTimer=setTimeout((function(){var t=document.activeElement;r.container.contains(t)&&Bt(document.activeElement,e.config.classNames.tabFocus,!0)}),10))))})),E(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=i.player;e.config.keyboard.global&&Yt.call(e,window,"keydown keyup",i.handleKey,t,!1),Yt.call(e,document.body,"click",i.toggleMenu,t),Kt.call(e,document.body,"touchstart",i.firstTouch),Yt.call(e,document.body,"keydown focus blur focusout",i.setTabFocus,t,!1,!0)})),E(this,"container",(function(){var t=i.player,e=t.config,r=t.elements,n=t.timers;!e.keyboard.global&&e.keyboard.focused&&Jt.call(t,r.container,"keydown keyup",i.handleKey,!1),Jt.call(t,r.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(e){var i=r.controls;i&&"enterfullscreen"===e.type&&(i.pressed=!1,i.hover=!1);var o=0;["touchstart","touchmove","mousemove"].includes(e.type)&&(Le.toggleControls.call(t,!0),o=t.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((function(){return Le.toggleControls.call(t,!1)}),o)}));var a=function(){if(t.isVimeo&&!t.config.vimeo.premium){var e=r.wrapper,i=t.fullscreen.active,n=le.call(t),a=o(n,2),s=a[0],l=a[1],p=oe("aspect-ratio: ".concat(s," / ").concat(l));if(i){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=o(u,2),d=c[1],h=c[0]/d>s/l;p?(e.style.width=h?"auto":"100%",e.style.height=h?"100%":"auto"):(e.style.maxWidth=h?d/l*s+"px":null,e.style.margin=h?"0 auto":null)}else p?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null)}},s=function(){clearTimeout(n.resized),n.resized=setTimeout(a,50)};Jt.call(t,r.container,"enterfullscreen exitfullscreen",(function(e){t.fullscreen.target===r.container&&(!t.isEmbed&&zt(t.config.ratio)||(a(),("enterfullscreen"===e.type?Jt:Gt).call(t,window,"resize",s)))}))})),E(this,"media",(function(){var t=i.player,e=t.elements;if(Jt.call(t,t.media,"timeupdate seeking seeked",(function(e){return Te.timeUpdate.call(t,e)})),Jt.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(e){return Te.durationUpdate.call(t,e)})),Jt.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),Jt.call(t,t.media,"progress playing seeking seeked",(function(e){return Te.updateProgress.call(t,e)})),Jt.call(t,t.media,"volumechange",(function(e){return Te.updateVolume.call(t,e)})),Jt.call(t,t.media,"playing play pause ended emptied timeupdate",(function(e){return Le.checkPlaying.call(t,e)})),Jt.call(t,t.media,"waiting canplay seeked playing",(function(e){return Le.checkLoading.call(t,e)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var r=$t.call(t,".".concat(t.config.classNames.video));if(!bt(r))return;Jt.call(t,e.container,"click",(function(o){([e.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(i.proxy(o,t.restart,"restart"),i.proxy(o,(function(){ee(t.play())}),"play")):i.proxy(o,(function(){ee(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&Jt.call(t,e.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),Jt.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),Jt.call(t,t.media,"ratechange",(function(){Te.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),Jt.call(t,t.media,"qualitychange",(function(e){Te.updateSetting.call(t,"quality",null,e.detail.quality)})),Jt.call(t,t.media,"ready qualitychange",(function(){Te.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");Jt.call(t,t.media,o,(function(i){var r=i.detail,o=void 0===r?{}:r;"error"===i.type&&(o=t.media.error),Xt.call(t,e.container,i.type,!0,o)}))})),E(this,"proxy",(function(t,e,r){var o=i.player,n=o.config.listeners[r],a=!0;ft(n)&&(a=n.call(o,t)),!1!==a&&ft(e)&&e.call(o,t)})),E(this,"bind",(function(t,e,r,o){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=i.player,s=a.config.listeners[o],l=ft(s);Jt.call(a,t,e,(function(t){return i.proxy(t,r,o)}),n&&!l)})),E(this,"controls",(function(){var t=i.player,e=t.elements,r=St.isIE?"change":"input";if(e.buttons.play&&Array.from(e.buttons.play).forEach((function(e){i.bind(e,"click",(function(){ee(t.togglePlay())}),"play")})),i.bind(e.buttons.restart,"click",t.restart,"restart"),i.bind(e.buttons.rewind,"click",(function(){t.lastSeekTime=Date.now(),t.rewind()}),"rewind"),i.bind(e.buttons.fastForward,"click",(function(){t.lastSeekTime=Date.now(),t.forward()}),"fastForward"),i.bind(e.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),i.bind(e.buttons.captions,"click",(function(){return t.toggleCaptions()})),i.bind(e.buttons.download,"click",(function(){Xt.call(t,t.media,"download")}),"download"),i.bind(e.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),i.bind(e.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),i.bind(e.buttons.airplay,"click",t.airplay,"airplay"),i.bind(e.buttons.settings,"click",(function(e){e.stopPropagation(),e.preventDefault(),Te.toggleMenu.call(t,e)}),null,!1),i.bind(e.buttons.settings,"keyup",(function(e){var i=e.which;[13,32].includes(i)&&(13!==i?(e.preventDefault(),e.stopPropagation(),Te.toggleMenu.call(t,e)):Te.focusFirstMenuItem.call(t,null,!0))}),null,!1),i.bind(e.settings.menu,"keydown",(function(e){27===e.which&&Te.toggleMenu.call(t,e)})),i.bind(e.inputs.seek,"mousedown mousemove",(function(t){var i=e.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/i.width*(t.pageX-i.left))})),i.bind(e.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(e){var i=e.currentTarget,r=e.keyCode?e.keyCode:e.which,o="play-on-seeked";if(!wt(e)||39===r||37===r){t.lastSeekTime=Date.now();var n=i.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(e.type);n&&a?(i.removeAttribute(o),ee(t.play())):!a&&t.playing&&(i.setAttribute(o,""),t.pause())}})),St.isIos){var n=Ht.call(t,'input[type="range"]');Array.from(n).forEach((function(t){return i.bind(t,r,(function(t){return Tt(t.target)}))}))}i.bind(e.inputs.seek,r,(function(e){var i=e.currentTarget,r=i.getAttribute("seek-value");zt(r)&&(r=i.value),i.removeAttribute("seek-value"),t.currentTime=r/i.max*t.duration}),"seek"),i.bind(e.progress,"mouseenter mouseleave mousemove",(function(e){return Te.updateSeekTooltip.call(t,e)})),i.bind(e.progress,"mousemove touchmove",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.startMove(e)})),i.bind(e.progress,"mouseleave touchend click",(function(){var e=t.previewThumbnails;e&&e.loaded&&e.endMove(!1,!0)})),i.bind(e.progress,"mousedown touchstart",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.startScrubbing(e)})),i.bind(e.progress,"mouseup touchend",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.endScrubbing(e)})),St.isWebkit&&Array.from(Ht.call(t,'input[type="range"]')).forEach((function(e){i.bind(e,"input",(function(e){return Te.updateRangeFill.call(t,e.target)}))})),t.config.toggleInvert&&!bt(e.display.duration)&&i.bind(e.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Te.timeUpdate.call(t))})),i.bind(e.inputs.volume,r,(function(e){t.volume=e.target.value}),"volume"),i.bind(e.controls,"mouseenter mouseleave",(function(i){e.controls.hover=!t.touch&&"mouseenter"===i.type})),e.fullscreen&&Array.from(e.fullscreen.children).filter((function(t){return!t.contains(e.container)})).forEach((function(r){i.bind(r,"mouseenter mouseleave",(function(i){e.controls&&(e.controls.hover=!t.touch&&"mouseenter"===i.type)}))})),i.bind(e.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){e.controls.pressed=["mousedown","touchstart"].includes(t.type)})),i.bind(e.controls,"focusin",(function(){var r=t.config,o=t.timers;Bt(e.controls,r.classNames.noTransition,!0),Le.toggleControls.call(t,!0),setTimeout((function(){Bt(e.controls,r.classNames.noTransition,!1)}),0);var n=i.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return Le.toggleControls.call(t,!1)}),n)})),i.bind(e.inputs.volume,"wheel",(function(e){var i=e.webkitDirectionInvertedFromDevice,r=[e.deltaX,-e.deltaY].map((function(t){return i?-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)&&e.preventDefault()}),"volume",!1)})),this.player=e,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 e=this.player,i=e.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)&&ht(r))if(o){var a=document.activeElement;if(bt(a)){if(a!==i.inputs.seek&&qt(a,e.config.selectors.editable))return;if(32===t.which&&qt(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||(e.currentTime=e.duration/10*(r-48));break;case 32:case 75:n||ee(e.togglePlay());break;case 38:e.increaseVolume(.1);break;case 40:e.decreaseVolume(.1);break;case 77:n||(e.muted=!e.muted);break;case 39:e.forward();break;case 37:e.rewind();break;case 70:e.fullscreen.toggle();break;case 67:n||e.toggleCaptions();break;case 76:e.loop=!e.loop}27===r&&!e.fullscreen.usingNative&&e.fullscreen.active&&e.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Te.toggleMenu.call(this.player,t)}}]),t}(),Re=function(t,e){return function(t){t.exports=function(){var t=function(){},e={},i={},r={};function o(t,e){if(t){var o=r[t];if(i[t]=e,o)for(;o.length;)o[0](t,e),o.splice(0,1)}}function n(e,i){e.call&&(e={success:e}),i.length?(e.error||t)(i):(e.success||t)(e)}function a(e,i,r,o){var n,s,l=document,p=r.async,u=(r.numRetries||0)+1,c=r.before||t,d=e.replace(/[\?|#].*$/,""),h=e.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(d)?((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(d)?(s=l.createElement("img")).src=h:((s=l.createElement("script")).src=e,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(e,i,r,o)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";i(e,l,t.defaultPrevented)},!1!==c(e,s)&&l.head.appendChild(s)}function s(t,e,i){var r,o,n=(t=t.push?t:[t]).length,s=n,l=[];for(r=function(t,i,r){if("e"==i&&l.push(t),"b"==i){if(!r)return;l.push(t)}--n||e(l)},o=0;o<s;o++)a(t[o],r,i)}function l(t,i,r){var a,l;if(i&&i.trim&&(a=i),l=(a?r:i)||{},a){if(a in e)throw"LoadJS";e[a]=!0}function p(e,i){s(t,(function(t){n(l,t),e&&n({success:e,error:i},t),o(a,t)}),l)}if(l.returnPromise)return new Promise(p);p()}return l.ready=function(t,e){return function(t,e){var o,n,a,s=[],l=(t=t.push?t:[t]).length,p=l;for(o=function(t,i){i.length&&s.push(t),--p||e(s)};l--;)(a=i[n=t[l]])?o(n,a):(r[n]=r[n]||[]).push(o)}(t,(function(t){n(e,t)})),l},l.done=function(t){o(t,[])},l.reset=function(){e={},i={},r={}},l.isDefined=function(t){return t in e},l}()}(e={exports:{}}),e.exports}();function Be(t){return new Promise((function(e,i){Re(t,{success:e,error:i})}))}function De(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Xt.call(this,this.media,t?"play":"pause"))}var qe={setup:function(){var t=this;Bt(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,pe.call(t),dt(window.Vimeo)?qe.ready.call(t):Be(t.config.urls.vimeo.sdk).then((function(){qe.ready.call(t)})).catch((function(e){t.debug.warn("Vimeo SDK (player.js) failed to load",e)}))},ready:function(){var t=this,e=this,i=e.config.vimeo,r=i.premium,a=i.referrerPolicy,s=c(i,M),l=e.media.getAttribute("src"),p="";zt(l)?(l=e.media.getAttribute(e.config.attributes.embed.id),p=e.media.getAttribute(e.config.attributes.embed.hash)):p=function(t){var e=t.match(d(/^.*(?:vimeo.com\/|video\/)(?:[0-9]+)(?:\?.*&*h=|\/)+([,0-9a-f]+)/,{hash:1}));return e?e.groups.hash:null}(l);var u=p?{h:p}:{};r&&Object.assign(s,{controls:!1,sidedock:!1});var h=Pe(n(n({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},u),s)),v=function(t){return zt(t)?null:ht(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(l),y=At("iframe"),f=he(e.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("; ")),zt(a)||y.setAttribute("referrerPolicy",a),r||!i.customControls)y.setAttribute("data-poster",e.poster),e.media=Lt(y,e.media);else{var g=At("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});g.appendChild(y),e.media=Lt(g,e.media)}i.customControls||we(he(e.config.urls.vimeo.api,f)).then((function(t){!zt(t)&&t.thumbnail_url&&Le.setPoster.call(e,t.thumbnail_url).catch((function(){}))})),e.embed=new window.Vimeo.Player(y,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=function(){return De.call(e,!0),e.embed.play()},e.media.pause=function(){return De.call(e,!1),e.embed.pause()},e.media.stop=function(){e.pause(),e.currentTime=0};var m=e.media.currentTime;Object.defineProperty(e.media,"currentTime",{get:function(){return m},set:function(t){var i=e.embed,r=e.media,o=e.volume,n=e.paused&&!i.hasPlayed;r.seeking=!0,Xt.call(e,r,"seeking"),Promise.resolve(n&&i.setVolume(0)).then((function(){return i.setCurrentTime(t)})).then((function(){return n&&i.pause()})).then((function(){return n&&i.setVolume(o)})).catch((function(){}))}});var b=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:function(){return b},set:function(t){e.embed.setPlaybackRate(t).then((function(){b=t,Xt.call(e,e.media,"ratechange")})).catch((function(){e.options.speed=[1]}))}});var _=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return _},set:function(t){e.embed.setVolume(t).then((function(){_=t,Xt.call(e,e.media,"volumechange")}))}});var w=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return w},set:function(t){var i=!!yt(t)&&t;e.embed.setVolume(i?0:e.config.volume).then((function(){w=i,Xt.call(e,e.media,"volumechange")}))}});var k,x=e.config.loop;Object.defineProperty(e.media,"loop",{get:function(){return x},set:function(t){var i=yt(t)?t:e.config.loop.active;e.embed.setLoop(i).then((function(){x=i}))}}),e.embed.getVideoUrl().then((function(t){k=t,Te.setDownloadUrl.call(e)})).catch((function(e){t.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:function(){return k}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((function(i){var r=o(i,2);e.embed.ratio=ue(r[0],r[1]),pe.call(t)})),e.embed.setAutopause(e.config.autopause).then((function(t){e.config.autopause=t})),e.embed.getVideoTitle().then((function(i){e.config.title=i,Le.setTitle.call(t)})),e.embed.getCurrentTime().then((function(t){m=t,Xt.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((function(t){e.media.duration=t,Xt.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((function(t){e.media.textTracks=t,Ce.setup.call(e)})),e.embed.on("cuechange",(function(t){var i=t.cues,r=(void 0===i?[]:i).map((function(t){return function(t){var e=document.createDocumentFragment(),i=document.createElement("div");return e.appendChild(i),i.innerHTML=t,e.firstChild.innerText}(t.text)}));Ce.updateCues.call(e,r)})),e.embed.on("loaded",(function(){e.embed.getPaused().then((function(t){De.call(e,!t),t||Xt.call(e,e.media,"playing")})),bt(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(function(){Xt.call(e,e.media,"waiting")})),e.embed.on("bufferend",(function(){Xt.call(e,e.media,"playing")})),e.embed.on("play",(function(){De.call(e,!0),Xt.call(e,e.media,"playing")})),e.embed.on("pause",(function(){De.call(e,!1)})),e.embed.on("timeupdate",(function(t){e.media.seeking=!1,m=t.seconds,Xt.call(e,e.media,"timeupdate")})),e.embed.on("progress",(function(t){e.media.buffered=t.percent,Xt.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&Xt.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((function(t){t!==e.media.duration&&(e.media.duration=t,Xt.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(function(){e.media.seeking=!1,Xt.call(e,e.media,"seeked")})),e.embed.on("ended",(function(){e.media.paused=!0,Xt.call(e,e.media,"ended")})),e.embed.on("error",(function(t){e.media.error=t,Xt.call(e,e.media,"error")})),i.customControls&&setTimeout((function(){return Le.build.call(e)}),0)}};function He(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Xt.call(this,this.media,t?"play":"pause"))}function $e(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Ve,Ue,Qe,We,Ye,Je,Ge={setup:function(){var t=this;if(Bt(this.elements.wrapper,this.config.classNames.embed,!0),dt(window.YT)&&ft(window.YT.Player))Ge.ready.call(this);else{var e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){ft(e)&&e(),Ge.ready.call(t)},Be(this.config.urls.youtube.sdk).catch((function(e){t.debug.warn("YouTube API failed to load",e)}))}},getTitle:function(t){var e=this;we(he(this.config.urls.youtube.api,t)).then((function(t){if(dt(t)){var i=t.height,r=t.width;e.config.title=t.title,Le.setTitle.call(e),e.embed.ratio=ue(r,i)}pe.call(e)})).catch((function(){pe.call(e)}))},ready:function(){var t=this,e=t.config.youtube,i=t.media&&t.media.getAttribute("id");if(zt(i)||!i.startsWith("youtube-")){var r=t.media.getAttribute("src");zt(r)&&(r=t.media.getAttribute(this.config.attributes.embed.id));var o=function(t){return zt(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(r),n=At("div",{id:de(t.provider),"data-poster":e.customControls?t.poster:void 0});if(t.media=Lt(n,t.media),e.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};Fe(a("maxres"),121).catch((function(){return Fe(a("sd"),121)})).catch((function(){return Fe(a("hq"))})).then((function(e){return Le.setPoster.call(t,e.src)})).then((function(e){e.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:$e(e),playerVars:Ct({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&e.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},e),events:{onError:function(e){if(!t.media.error){var i=e.data;t.media.error={code:i,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."}[i]||"An unknown error occured"},Xt.call(t,t.media,"error")}},onPlaybackRateChange:function(e){t.media.playbackRate=e.target.getPlaybackRate(),Xt.call(t,t.media,"ratechange")},onReady:function(i){if(!ft(t.media.play)){var r=i.target;Ge.getTitle.call(t,o),t.media.play=function(){He.call(t,!0),r.playVideo()},t.media.pause=function(){He.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(e){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,Xt.call(t,t.media,"seeking"),r.seekTo(e)}}),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(e){r.setVolume(100*(n=e)),Xt.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(e){var i=yt(e)?e:a;a=i,r[i?"mute":"unMute"](),r.setVolume(100*n),Xt.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(e){return t.config.speed.options.includes(e)})),t.supported.ui&&e.customControls&&t.media.setAttribute("tabindex",-1),Xt.call(t,t.media,"timeupdate"),Xt.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)&&Xt.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),Xt.call(t,t.media,"canplaythrough"))}),200),e.customControls&&setTimeout((function(){return Le.build.call(t)}),50)}},onStateChange:function(i){var r=i.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(i.data)&&(t.media.seeking=!1,Xt.call(t,t.media,"seeked")),i.data){case-1:Xt.call(t,t.media,"timeupdate"),t.media.buffered=r.getVideoLoadedFraction(),Xt.call(t,t.media,"progress");break;case 0:He.call(t,!1),t.media.loop?(r.stopVideo(),r.playVideo()):Xt.call(t,t.media,"ended");break;case 1:e.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(He.call(t,!0),Xt.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){Xt.call(t,t.media,"timeupdate")}),50),t.media.duration!==r.getDuration()&&(t.media.duration=r.getDuration(),Xt.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),He.call(t,!1);break;case 3:Xt.call(t,t.media,"waiting")}Xt.call(t,t.elements.container,"statechange",!1,{code:i.data})}}})}}},Ke={setup:function(){this.media?(Bt(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Bt(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Bt(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=At("div",{class:this.config.classNames.video}),Ot(this.media,this.elements.wrapper),this.elements.poster=At("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ce.setup.call(this):this.isYouTube?Ge.setup.call(this):this.isVimeo&&qe.setup.call(this)):this.debug.warn("No media element found!")}},Xe=function(){function t(e){var i=this;p(this,t),E(this,"load",(function(){i.enabled&&(dt(window.google)&&dt(window.google.ima)?i.ready():Be(i.player.config.urls.googleIMA.sdk).then((function(){i.ready()})).catch((function(){i.trigger("error",new Error("Google IMA SDK failed to load"))})))})),E(this,"ready",(function(){var t;i.enabled||((t=i).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),i.startSafetyTimer(12e3,"ready()"),i.managerPromise.then((function(){i.clearSafetyTimer("onAdsManagerLoaded()")})),i.listeners(),i.setupIMA()})),E(this,"setupIMA",(function(){i.elements.container=At("div",{class:i.player.config.classNames.ads}),i.player.elements.container.appendChild(i.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(i.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(i.player.config.playsinline),i.elements.displayContainer=new google.ima.AdDisplayContainer(i.elements.container,i.player.media),i.loader=new google.ima.AdsLoader(i.elements.displayContainer),i.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return i.onAdsManagerLoaded(t)}),!1),i.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return i.onAdError(t)}),!1),i.requestAds()})),E(this,"requestAds",(function(){var t=i.player.elements.container;try{var e=new google.ima.AdsRequest;e.adTagUrl=i.tagUrl,e.linearAdSlotWidth=t.offsetWidth,e.linearAdSlotHeight=t.offsetHeight,e.nonLinearAdSlotWidth=t.offsetWidth,e.nonLinearAdSlotHeight=t.offsetHeight,e.forceNonLinearFullSlot=!1,e.setAdWillPlayMuted(!i.player.muted),i.loader.requestAds(e)}catch(t){i.onAdError(t)}})),E(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(i.countdownTimer),void i.elements.container.removeAttribute("data-badge-text");i.countdownTimer=setInterval((function(){var t=je(Math.max(i.manager.getRemainingTime(),0)),e="".concat(be("advertisement",i.player.config)," - ").concat(t);i.elements.container.setAttribute("data-badge-text",e)}),100)})),E(this,"onAdsManagerLoaded",(function(t){if(i.enabled){var e=new google.ima.AdsRenderingSettings;e.restoreCustomPlaybackStateOnAdBreakComplete=!0,e.enablePreloading=!0,i.manager=t.getAdsManager(i.player,e),i.cuePoints=i.manager.getCuePoints(),i.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return i.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){i.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return i.onAdEvent(t)}))})),i.trigger("loaded")}})),E(this,"addCuePoints",(function(){zt(i.cuePoints)||i.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<i.player.duration){var e=i.player.elements.progress;if(bt(e)){var r=100/i.player.duration*t,o=At("span",{class:i.player.config.classNames.cues});o.style.left="".concat(r.toString(),"%"),e.appendChild(o)}}}))})),E(this,"onAdEvent",(function(t){var e=i.player.elements.container,r=t.getAd(),o=t.getAdData();switch(function(t){Xt.call(i.player,i.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:i.trigger("loaded"),i.pollCountdown(!0),r.isLinear()||(r.width=e.offsetWidth,r.height=e.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:i.manager.setVolume(i.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:i.player.ended?i.loadAds():i.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:i.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:i.pollCountdown(),i.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&i.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}})),E(this,"onAdError",(function(t){i.cancel(),i.player.debug.warn("Ads error",t)})),E(this,"listeners",(function(){var t,e=i.player.elements.container;i.player.on("canplay",(function(){i.addCuePoints()})),i.player.on("ended",(function(){i.loader.contentComplete()})),i.player.on("timeupdate",(function(){t=i.player.currentTime})),i.player.on("seeked",(function(){var e=i.player.currentTime;zt(i.cuePoints)||i.cuePoints.forEach((function(r,o){t<r&&r<e&&(i.manager.discardAdBreak(),i.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){i.manager&&i.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),E(this,"play",(function(){var t=i.player.elements.container;i.managerPromise||i.resumeContent(),i.managerPromise.then((function(){i.manager.setVolume(i.player.volume),i.elements.displayContainer.initialize();try{i.initialized||(i.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),i.manager.start()),i.initialized=!0}catch(t){i.onAdError(t)}})).catch((function(){}))})),E(this,"resumeContent",(function(){i.elements.container.style.zIndex="",i.playing=!1,ee(i.player.media.play())})),E(this,"pauseContent",(function(){i.elements.container.style.zIndex=3,i.playing=!0,i.player.media.pause()})),E(this,"cancel",(function(){i.initialized&&i.resumeContent(),i.trigger("error"),i.loadAds()})),E(this,"loadAds",(function(){i.managerPromise.then((function(){i.manager&&i.manager.destroy(),i.managerPromise=new Promise((function(t){i.on("loaded",t),i.player.debug.log(i.manager)})),i.initialized=!1,i.requestAds()})).catch((function(){}))})),E(this,"trigger",(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];var n=i.events[t];gt(n)&&n.forEach((function(t){ft(t)&&t.apply(i,r)}))})),E(this,"on",(function(t,e){return gt(i.events[t])||(i.events[t]=[]),i.events[t].push(e),i})),E(this,"startSafetyTimer",(function(t,e){i.player.debug.log("Safety timer invoked from: ".concat(e)),i.safetyTimer=setTimeout((function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")}),t)})),E(this,"clearSafetyTimer",(function(t){ct(i.safetyTimer)||(i.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(i.safetyTimer),i.safetyTimer=null)})),this.player=e,this.config=e.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,e){i.on("loaded",t),i.on("error",e)})),this.load()}return s(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!zt(t.publisherId)||xt(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return xt(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Pe({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}(),Ze=function(t){var e=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var i={};t.split(/\r\n|\n|\r/).forEach((function(t){if(ht(i.startTime)){if(!zt(t.trim())&&zt(i.text)){var e,r,n,a=t.trim().split("#xywh=");e=o(a,1),i.text=e[0],a[1]&&(r=a[1].split(","),n=o(r,4),i.x=n[0],i.y=n[1],i.w=n[2],i.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&&(i.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),i.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),i.text&&e.push(i)})),e},ti=function(t,e){var i={};return t>e.width/e.height?(i.width=e.width,i.height=1/t*e.width):(i.height=e.height,i.width=t*e.height),i},ei=function(){function t(e){var i=this;p(this,t),E(this,"load",(function(){i.player.elements.display.seekTooltip&&(i.player.elements.display.seekTooltip.hidden=i.enabled),i.enabled&&i.getThumbnails().then((function(){i.enabled&&(i.render(),i.determineContainerAutoSizing(),i.loaded=!0)}))})),E(this,"getThumbnails",(function(){return new Promise((function(t){var e=i.player.config.previewThumbnails.src;if(zt(e))throw new Error("Missing previewThumbnails.src config attribute");var r=function(){i.thumbnails.sort((function(t,e){return t.height-e.height})),i.player.debug.log("Preview thumbnails",i.thumbnails),t()};if(ft(e))e((function(t){i.thumbnails=t,r()}));else{var o=(vt(e)?[e]:e).map((function(t){return i.getThumbnail(t)}));Promise.all(o).then(r)}}))})),E(this,"getThumbnail",(function(t){return new Promise((function(e){we(t).then((function(r){var o={frames:Ze(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,i.thumbnails.push(o),e()},n.src=o.urlPrefix+o.frames[0].text}))}))})),E(this,"startMove",(function(t){if(i.loaded&&_t(t)&&["touchmove","mousemove"].includes(t.type)&&i.player.media.duration){if("touchmove"===t.type)i.seekTime=i.player.media.duration*(i.player.elements.inputs.seek.value/100);else{var e=i.player.elements.progress.getBoundingClientRect();i.seekTime=i.player.media.duration*(100/e.width*(t.pageX-e.left)/100),i.seekTime<0&&(i.seekTime=0),i.seekTime>i.player.media.duration-1&&(i.seekTime=i.player.media.duration-1),i.mousePosX=t.pageX,i.elements.thumb.time.innerText=je(i.seekTime)}i.showImageAtCurrentTime()}})),E(this,"endMove",(function(){i.toggleThumbContainer(!1,!0)})),E(this,"startScrubbing",(function(t){(ct(t.button)||!1===t.button||0===t.button)&&(i.mouseDown=!0,i.player.media.duration&&(i.toggleScrubbingContainer(!0),i.toggleThumbContainer(!1,!0),i.showImageAtCurrentTime()))})),E(this,"endScrubbing",(function(){i.mouseDown=!1,Math.ceil(i.lastTime)===Math.ceil(i.player.media.currentTime)?i.toggleScrubbingContainer(!1):Kt.call(i.player,i.player.media,"timeupdate",(function(){i.mouseDown||i.toggleScrubbingContainer(!1)}))})),E(this,"listeners",(function(){i.player.on("play",(function(){i.toggleThumbContainer(!1,!0)})),i.player.on("seeked",(function(){i.toggleThumbContainer(!1)})),i.player.on("timeupdate",(function(){i.lastTime=i.player.media.currentTime}))})),E(this,"render",(function(){i.elements.thumb.container=At("div",{class:i.player.config.classNames.previewThumbnails.thumbContainer}),i.elements.thumb.imageContainer=At("div",{class:i.player.config.classNames.previewThumbnails.imageContainer}),i.elements.thumb.container.appendChild(i.elements.thumb.imageContainer);var t=At("div",{class:i.player.config.classNames.previewThumbnails.timeContainer});i.elements.thumb.time=At("span",{},"00:00"),t.appendChild(i.elements.thumb.time),i.elements.thumb.container.appendChild(t),bt(i.player.elements.progress)&&i.player.elements.progress.appendChild(i.elements.thumb.container),i.elements.scrubbing.container=At("div",{class:i.player.config.classNames.previewThumbnails.scrubbingContainer}),i.player.elements.wrapper.appendChild(i.elements.scrubbing.container)})),E(this,"destroy",(function(){i.elements.thumb.container&&i.elements.thumb.container.remove(),i.elements.scrubbing.container&&i.elements.scrubbing.container.remove()})),E(this,"showImageAtCurrentTime",(function(){i.mouseDown?i.setScrubbingContainerSize():i.setThumbContainerSizeAndPos();var t=i.thumbnails[0].frames.findIndex((function(t){return i.seekTime>=t.startTime&&i.seekTime<=t.endTime})),e=t>=0,r=0;i.mouseDown||i.toggleThumbContainer(e),e&&(i.thumbnails.forEach((function(e,o){i.loadedImages.includes(e.frames[t].text)&&(r=o)})),t!==i.showingThumb&&(i.showingThumb=t,i.loadImage(r)))})),E(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=i.showingThumb,r=i.thumbnails[t],o=r.urlPrefix,n=r.frames[e],a=r.frames[e].text,s=o+a;if(i.currentImageElement&&i.currentImageElement.dataset.filename===a)i.showImage(i.currentImageElement,n,t,e,a,!1),i.currentImageElement.dataset.index=e,i.removeOldImages(i.currentImageElement);else{i.loadingImage&&i.usingSprites&&(i.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=e,l.dataset.filename=a,i.showingThumbFilename=a,i.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return i.showImage(l,n,t,e,a,!0)},i.loadingImage=l,i.removeOldImages(l)}})),E(this,"showImage",(function(t,e,r,o,n){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];i.player.debug.log("Showing thumb: ".concat(n,". num: ").concat(o,". qual: ").concat(r,". newimg: ").concat(a)),i.setImageSizeAndOffset(t,e),a&&(i.currentImageContainer.appendChild(t),i.currentImageElement=t,i.loadedImages.includes(n)||i.loadedImages.push(n)),i.preloadNearby(o,!0).then(i.preloadNearby(o,!1)).then(i.getHigherQuality(r,t,e,n))})),E(this,"removeOldImages",(function(t){Array.from(i.currentImageContainer.children).forEach((function(e){if("img"===e.tagName.toLowerCase()){var r=i.usingSprites?500:1e3;if(e.dataset.index!==t.dataset.index&&!e.dataset.deleting){e.dataset.deleting=!0;var o=i.currentImageContainer;setTimeout((function(){o.removeChild(e),i.player.debug.log("Removing thumb: ".concat(e.dataset.filename))}),r)}}}))})),E(this,"preloadNearby",(function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(r){setTimeout((function(){var o=i.thumbnails[0].frames[t].text;if(i.showingThumbFilename===o){var n;n=e?i.thumbnails[0].frames.slice(t):i.thumbnails[0].frames.slice(0,t).reverse();var a=!1;n.forEach((function(t){var e=t.text;if(e!==o&&!i.loadedImages.includes(e)){a=!0,i.player.debug.log("Preloading thumb filename: ".concat(e));var n=i.thumbnails[0].urlPrefix+e,s=new Image;s.src=n,s.onload=function(){i.player.debug.log("Preloaded thumb filename: ".concat(e)),i.loadedImages.includes(e)||i.loadedImages.push(e),r()}}})),a||r()}}),300)}))})),E(this,"getHigherQuality",(function(t,e,r,o){if(t<i.thumbnails.length-1){var n=e.naturalHeight;i.usingSprites&&(n=r.h),n<i.thumbContainerHeight&&setTimeout((function(){i.showingThumbFilename===o&&(i.player.debug.log("Showing higher quality thumb for: ".concat(o)),i.loadImage(t+1))}),300)}})),E(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i.player.config.classNames.previewThumbnails.thumbContainerShown;i.elements.thumb.container.classList.toggle(r,t),!t&&e&&(i.showingThumb=null,i.showingThumbFilename=null)})),E(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=i.player.config.classNames.previewThumbnails.scrubbingContainerShown;i.elements.scrubbing.container.classList.toggle(e,t),t||(i.showingThumb=null,i.showingThumbFilename=null)})),E(this,"determineContainerAutoSizing",(function(){(i.elements.thumb.imageContainer.clientHeight>20||i.elements.thumb.imageContainer.clientWidth>20)&&(i.sizeSpecifiedInCSS=!0)})),E(this,"setThumbContainerSizeAndPos",(function(){if(i.sizeSpecifiedInCSS){if(i.elements.thumb.imageContainer.clientHeight>20&&i.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(i.elements.thumb.imageContainer.clientHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(i.elements.thumb.imageContainer.clientHeight<20&&i.elements.thumb.imageContainer.clientWidth>20){var e=Math.floor(i.elements.thumb.imageContainer.clientWidth/i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(e,"px")}}else{var r=Math.floor(i.thumbContainerHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(i.thumbContainerHeight,"px"),i.elements.thumb.imageContainer.style.width="".concat(r,"px")}i.setThumbContainerPos()})),E(this,"setThumbContainerPos",(function(){var t=i.player.elements.progress.getBoundingClientRect(),e=i.player.elements.container.getBoundingClientRect(),r=i.elements.thumb.container,o=e.left-t.left+10,n=e.right-t.left-r.clientWidth-10,a=i.mousePosX-t.left-r.clientWidth/2;a<o&&(a=o),a>n&&(a=n),r.style.left="".concat(a,"px")})),E(this,"setScrubbingContainerSize",(function(){var t=ti(i.thumbAspectRatio,{width:i.player.media.clientWidth,height:i.player.media.clientHeight}),e=t.height;i.elements.scrubbing.container.style.width="".concat(t.width,"px"),i.elements.scrubbing.container.style.height="".concat(e,"px")})),E(this,"setImageSizeAndOffset",(function(t,e){if(i.usingSprites){var r=i.thumbContainerHeight/e.h;t.style.height=t.naturalHeight*r+"px",t.style.width=t.naturalWidth*r+"px",t.style.left="-".concat(e.x*r,"px"),t.style.top="-".concat(e.y*r,"px")}})),this.player=e,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?ti(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}(),ii={insertElements:function(t,e){var i=this;vt(e)?Mt(t,this.media,{src:e}):gt(e)&&e.forEach((function(e){Mt(t,i.media,e)}))},change:function(t){var e=this;Pt(t,"sources.length")?(ce.cancelRequests.call(this),this.destroy.call(this,(function(){e.options.quality=[],Et(e.media),e.media=null,bt(e.elements.container)&&e.elements.container.removeAttribute("class");var i=t.sources,r=t.type,n=o(i,1)[0],a=n.provider,s=void 0===a?Ie.html5:a,l="html5"===s?r:"div",p="html5"===s?{}:{src:n.src};Object.assign(e,{provider:s,type:r,supported:Qt.check(r,s,e.config.playsinline),media:At(l,p)}),e.elements.container.appendChild(e.media),yt(t.autoplay)&&(e.config.autoplay=t.autoplay),e.isHTML5&&(e.config.crossorigin&&e.media.setAttribute("crossorigin",""),e.config.autoplay&&e.media.setAttribute("autoplay",""),zt(t.poster)||(e.poster=t.poster),e.config.loop.active&&e.media.setAttribute("loop",""),e.config.muted&&e.media.setAttribute("muted",""),e.config.playsinline&&e.media.setAttribute("playsinline","")),Le.addStyleHook.call(e),e.isHTML5&&ii.insertElements.call(e,"source",i),e.config.title=t.title,Ke.setup.call(e),e.isHTML5&&Object.keys(t).includes("tracks")&&ii.insertElements.call(e,"track",t.tracks),(e.isHTML5||e.isEmbed&&!e.supported.ui)&&Le.build.call(e),e.isHTML5&&e.media.load(),zt(t.previewThumbnails)||(Object.assign(e.config.previewThumbnails,t.previewThumbnails),e.previewThumbnails&&e.previewThumbnails.loaded&&(e.previewThumbnails.destroy(),e.previewThumbnails=null),e.config.previewThumbnails.enabled&&(e.previewThumbnails=new ei(e))),e.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},ri=function(){function t(e,i){var r=this;if(p(this,t),E(this,"play",(function(){return ft(r.media.play)?(r.ads&&r.ads.enabled&&r.ads.managerPromise.then((function(){return r.ads.play()})).catch((function(){return ee(r.media.play())})),r.media.play()):null})),E(this,"pause",(function(){return r.playing&&ft(r.media.pause)?r.media.pause():null})),E(this,"togglePlay",(function(t){return(yt(t)?t:!r.playing)?r.play():r.pause()})),E(this,"stop",(function(){r.isHTML5?(r.pause(),r.restart()):ft(r.media.stop)&&r.media.stop()})),E(this,"restart",(function(){r.currentTime=0})),E(this,"rewind",(function(t){r.currentTime-=ht(t)?t:r.config.seekTime})),E(this,"forward",(function(t){r.currentTime+=ht(t)?t:r.config.seekTime})),E(this,"increaseVolume",(function(t){r.volume=(r.media.muted?0:r.volume)+(ht(t)?t:0)})),E(this,"decreaseVolume",(function(t){r.increaseVolume(-t)})),E(this,"airplay",(function(){Qt.airplay&&r.media.webkitShowPlaybackTargetPicker()})),E(this,"toggleControls",(function(t){if(r.supported.ui&&!r.isAudio){var e=Dt(r.elements.container,r.config.classNames.hideControls),i=Bt(r.elements.container,r.config.classNames.hideControls,void 0===t?void 0:!t);return i&&gt(r.config.controls)&&r.config.controls.includes("settings")&&!zt(r.config.settings)&&Te.toggleMenu.call(r,!1),i!==e&&Xt.call(r,r.media,i?"controlshidden":"controlsshown"),!i}return!1})),E(this,"on",(function(t,e){Jt.call(r,r.elements.container,t,e)})),E(this,"once",(function(t,e){Kt.call(r,r.elements.container,t,e)})),E(this,"off",(function(t,e){Gt(r.elements.container,t,e)})),E(this,"destroy",(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r.ready){var i=function(){document.body.style.overflow="",r.embed=null,e?(Object.keys(r.elements).length&&(Et(r.elements.buttons.play),Et(r.elements.captions),Et(r.elements.controls),Et(r.elements.wrapper),r.elements.buttons.play=null,r.elements.captions=null,r.elements.controls=null,r.elements.wrapper=null),ft(t)&&t()):(Zt.call(r),ce.cancelRequests.call(r),Lt(r.elements.original,r.elements.container),Xt.call(r,r.elements.original,"destroyed",!0),ft(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?(Le.toggleNativeControls.call(r,!0),i()):r.isYouTube?(clearInterval(r.timers.buffering),clearInterval(r.timers.playing),null!==r.embed&&ft(r.embed.destroy)&&r.embed.destroy(),i()):r.isVimeo&&(null!==r.embed&&r.embed.unload().then(i),setTimeout(i,200))}})),E(this,"supports",(function(t){return Qt.mime.call(r,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Qt.touch,this.media=e,vt(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||mt(this.media)||gt(this.media))&&(this.media=this.media[0]),this.config=Ct({},Oe,t.defaults,i||{},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 Me(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Qt),!ct(this.media)&&bt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Qt.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"),bt(a)){if(s=Se(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Ie.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Ie.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(zt(this.provider)||!Object.values(Ie).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=Ie.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=Qt.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Ne(this),this.storage=new _e(this),this.media.plyr=this,bt(this.elements.container)||(this.elements.container=At("div",{tabindex:0}),Ot(this.media,this.elements.container)),Le.migrateStyles.call(this),Le.addStyleHook.call(this),Ke.setup.call(this),this.config.debug&&Jt.call(this,this.elements.container,this.config.events.join(" "),(function(t){r.debug.log("event: ".concat(t.type))})),this.fullscreen=new Ee(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Le.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Xe(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return ee(r.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ei(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===Ie.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Ie.youtube}},{key:"isVimeo",get:function(){return this.provider===Ie.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 e=ht(t)&&t>0;this.media.currentTime=e?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 ht(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),e=(this.media||{}).duration,i=ht(e)&&e!==1/0?e:0;return t||i}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var e=t;vt(e)&&(e=Number(e)),ht(e)||(e=this.storage.get("volume")),ht(e)||(e=this.config.volume),e>1&&(e=1),e<0&&(e=0),this.config.volume=e,this.media.volume=e,!zt(t)&&this.muted&&e>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var e=t;yt(e)||(e=this.storage.get("muted")),yt(e)||(e=this.config.muted),this.config.muted=e,this.media.muted=e}},{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 e=this,i=null;ht(t)&&(i=t),ht(i)||(i=this.storage.get("speed")),ht(i)||(i=this.config.speed.selected),i=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)}(i,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=i,setTimeout((function(){e.media&&(e.media.playbackRate=i)}),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 e=this.config.quality,i=this.options.quality;if(i.length){var r=[!zt(t)&&Number(t),this.storage.get("quality"),e.selected,e.default].find(ht),o=!0;if(!i.includes(r)){var n=re(i,r);this.debug.warn("Unsupported quality option: ".concat(r,", using ").concat(n," instead")),r=n,o=!1}e.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 e=yt(t)?t:this.config.loop.active;this.config.loop.active=e,this.media.loop=e}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){ii.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return xt(t)?t:this.source},set:function(t){xt(t)&&(this.config.urls.download=t,Te.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?Le.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=se(le.call(this));return gt(t)?t.join(":"):t},set:function(t){this.isVideo?vt(t)&&ae(t)?(this.config.ratio=se(t),pe.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 e=yt(t)?t:this.config.autoplay;this.config.autoplay=e}},{key:"toggleCaptions",value:function(t){Ce.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){Ce.set.call(this,t,!1),Ce.setup()}},{key:"language",get:function(){return(Ce.getCurrentTrack.call(this)||{}).language},set:function(t){Ce.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Qt.pip?zt(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Qt.pip){var e=yt(t)?t:!this.pip;ft(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(e?"picture-in-picture":"inline"),ft(this.media.requestPictureInPicture)&&(!this.pip&&e?this.media.requestPictureInPicture():this.pip&&!e&&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 ei(this))}}],[{key:"supported",value:function(t,e,i){return Qt.check(t,e,i)}},{key:"loadSprite",value:function(t,e){return ke(t,e)}},{key:"setup",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;return vt(e)?r=Array.from(document.querySelectorAll(e)):mt(e)?r=Array.from(e):gt(e)&&(r=e.filter(bt)),zt(r)?null:r.map((function(e){return new t(e,i)}))}}]),t}();function oi(t){t.on("timeupdate",(function(){return function(t){var e,i;null!=t&&null!==(e=t.config)&&void 0!==e&&null!==(i=e.mutedPreview)&&void 0!==i&&i.enabled||function(t){var e;0!==t.currentTime&&null!=t&&null!==(e=t.config)&&void 0!==e&&e.save_player_position&&localStorage.setItem("player-progress-".concat(ni(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return ai(t)})),t.on("loadeddata",(function(){return ai(t)}))}function ni(t){var e,i;return null==t||null===(e=t.config)||void 0===e||null===(i=e.blockAttributes)||void 0===i?void 0:i.id}function ai(t){var e,i,r;if(null!=t&&null!==(e=t.config)&&void 0!==e&&e.save_player_position&&(null==t||null===(i=t.config)||void 0===i||null===(r=i.mutedPreview)||void 0===r||!r.enabled)){var o=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(ni(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)}}ri.defaults=JSON.parse(JSON.stringify(Oe));var si=(null===(Ve=window)||void 0===Ve||null===(Ue=Ve.prestoPlayer)||void 0===Ue||null===(Qe=Ue.i18n)||void 0===Qe?void 0:Qe.hide_chapters)||"Hide Chapters",li=(null===(We=window)||void 0===We||null===(Ye=We.prestoPlayer)||void 0===Ye||null===(Je=Ye.i18n)||void 0===Je?void 0:Je.show_chapters)||"Show Chapters";const pi='<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(si,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(li,"</span>\n</button>\n");var ui,ci,di;const hi='\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===(ui=window)||void 0===ui||null===(ci=ui.prestoPlayer)||void 0===ci||null===(di=ci.i18n)||void 0===di?void 0:di.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function vi(t){var e,i,r,o,n,a,s,p,c,d,h,v,y,f=0,g={},m=null,b=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 e={};return t.forEach((function(t){var i,r=t.time.split(":");r.length>1&&(i=60*parseInt(r[0])),e[parseInt(r[1])+parseInt(i)]=t})),e}((null===(e=o=t.detail.plyr)||void 0===e||null===(i=e.config)||void 0===i?void 0:i.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"),(c=n.find('[data-plyr="chapters"]')).length||(c=jQuery(pi).insertAfter(_)),(s=n.find(".presto-player-toc__wrapper")).length||(s=jQuery(hi).appendTo(n)),d=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 e=jQuery(function(t){var e=t.name,i=void 0===e?"Untitled":e,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(i,"\n </div>\n</div>")}({name:r[t].title,order:w})).appendTo(p);e.data("presto-player-timestamp",t),g[t]=e,e.on("click",(function(){o.currentTime=parseFloat(t),o.play(),j(!1)}))})),v=s.find("[data-chapter-item]")),z(),c.off("click"),c.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),m=window.setInterval((function(){b++,o.duration&&(z(),window.clearInterval(m)),b>50&&window.clearInterval(m)}),100),d.off("click"),d.on("click",(function(){return j(!1)})),p.off("mouseleave"),p.on("mouseleave",(function t(){if(o.playing){var e=setTimeout((function(){j(!1),p.off("mouseleave",t)}),2e3);p.on("mouseenter",(function(){clearTimeout(e)}))}}))}}else o.on("loadedmetadata",vi);function x(){f=o.currentTime;var t=Object.keys(r).filter((function(t){return t<=f})).map((function(t){return parseInt(t,10)})),e=Math.max.apply(Math,u(t));v&&v.removeClass("is-highlighted"),jQuery(g[e||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 e,i,n,a,s=r[t],l=parseInt(t)/o.duration*100,p=jQuery((e={position:l,name:"".concat(s.title)},i=e.position,n=e.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===i?0:i,'%" 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 yi;function fi(t){"undefined"!=typeof jQuery&&(yi=t,jQuery(yi.elements.container).closest(".presto-player__wrapper"),yi.on("ready",vi),yi.on("controlshidden",gi),yi.on("controlsshown",mi))}function gi(t){var e,i,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(e=t.detail)||void 0===e||null===(i=e.plyr)||void 0===i||null===(r=i.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function mi(t){var e,i,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(e=t.detail)||void 0===e||null===(i=e.plyr)||void 0===i||null===(r=i.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function bi(t){var e,i;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!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}function _i(t){var e,i;null!=t&&null!==(e=t.config)&&void 0!==e&&e.hasPlayed||(t.config.hasPlayed=!0,null===(i=window)||void 0===i||i.gtag("event","Play",bi(t)))}function wi(t){var e;null===(e=window)||void 0===e||e.gtag("event","Pause",bi(t))}function ki(t){var e,i;null!=t&&null!==(e=t.config)&&void 0!==e&&e.hasLoaded||(t.config.hasLoaded=!0,null===(i=window)||void 0===i||i.gtag("event","Player Load",bi(t)))}var xi,zi={25:!1,50:!1,75:!1,100:!1};function ji(t){if(t.currentTime){var e=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(zi).forEach((function(i){var r;!zi[i]&&e>=parseInt(i)&&(zi[i]=!0,null===(r=window)||void 0===r||r.gtag("event","".concat(i," Percent Played"),bi(t)))}))}}var Ti="presto-player.analytics",Si="",Pi=0;function Ci(t){var e,i;(xi=t).config.analytics&&null!==(e=window)&&void 0!==e&&null!==(i=e.wp)&&void 0!==i&&i.hooks&&(wp.hooks.hasAction("presto.nonceRefreshed",Ti)||wp.hooks.addAction("presto.nonceRefreshed",Ti,(function(t){Si=t})),wp.hooks.hasAction("presto.playerPlay",Ti)||wp.hooks.addAction("presto.playerPlay",Ti,Oi),wp.hooks.hasAction("presto.playerEnded",Ti)||wp.hooks.addAction("presto.playerEnded",Ti,Oi),wp.hooks.hasAction("presto.playerHidden",Ti)||wp.hooks.addAction("presto.playerHidden",Ti,Oi),wp.hooks.hasAction("presto.playerPause",Ti)||wp.hooks.addAction("presto.playerPause",Ti,Oi),wp.hooks.hasAction("presto.playerSeeked",Ti)||wp.hooks.addAction("presto.playerSeeked",Ti,Oi))}function Oi(t){isNaN(null==t?void 0:t.currentTime)||Ii(function(t){var e,i;return t.currentTime>Pi&&(Pi=t.currentTime),t.currentTime>=t.duration&&(Pi=t.duration),n(n(n({video_current_time:parseInt(Pi),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!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}(t))}function Ii(t){var e,i,r,o,n,a,s,l;if(Si){var p,u,c=new FormData;c.append("action","presto_player_progress"),c.append("duration",null==t?void 0:t.video_current_time),c.append("video_id",null===(e=xi)||void 0===e||null===(i=e.config)||void 0===i?void 0:i.id),c.append("nonce",Si),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=xi)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:Si}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,c)}}function Ai(t){var e,i;null!==(e=window)&&void 0!==e&&null!==(i=e.prestoPlayer)&&void 0!==i&&i.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",_i),wp.hooks.addAction("presto.playerPause","presto-player",wi),wp.hooks.addAction("presto.playerReady","presto-player",ki),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",ji))}(),Ci(t))}const Mi=function(t){t.on("ready",(function(){var e,i,r,o;null==t||null===(e=t.config)||void 0===e||!e.logo||null!=t&&null!==(i=t.config)&&void 0!==i&&i.logo_added||"undefined"!=typeof jQuery&&(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 Ei(t){var e;null!=t&&null!==(e=t.config)&&void 0!==e&&e.poster&&(t.poster=t.config.poster)}const Fi=function(t){var e,i;null!==(e=window)&&void 0!==e&&null!==(i=e.wp)&&void 0!==i&&i.hooks&&(t.on("ready",(function(){Li("Ready",t)})),t.on("play",(function(){Li("Play",t)})),t.on("playing",(function(){Li("Playing",t)})),t.on("pause",(function(){Li("Pause",t)})),t.on("ended",(function(){Li("Ended",t)})),t.on("seeked",(function(){Li("Seeked",t)})),t.on("timeupdate",(function(){Li("TimeUpdate",t)})),t.on("enterfullscreen",(function(){Li("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){Li("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){Li("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(e){var i;switch(null==e||null===(i=e.detail)||void 0===i?void 0:i.code){case 0:Li("Ended",t);break;case 1:Li("Play",t);break;case 2:Li("Pause",t)}})))};function Li(t,e){window.wp.hooks.doAction("presto.player".concat(t),e)}let Ni,Ri=Date.now();const Bi=t=>{var e,i;if(!t.automations)return;(null===(i=null===(e=null===window||void 0===window?void 0:window.wp)||void 0===e?void 0:e.hooks)||void 0===i?void 0:i.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{Ni=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,e=null){var i;Ni&&(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.ajaxProgress)&&(e||(e=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(r).forEach((i=>{var r,o,n,a,s,l,p,u,c;const d=parseInt(i);if(!t.watched[d]&&e>=d){t.watched[d]=!0;let e=new FormData;if(e.append("action","presto_player_progress_percent"),e.append("id",null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.id),e.append("percent",d.toString()),e.append("visit_time",Ri.toString()),e.append("nonce",Ni),(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug)&&console.log(`${d} 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===(c=null==t?void 0:t.config)||void 0===c?void 0:c.id,visit_time:Ri,percent:d,nonce:Ni}});else{let i=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,e);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(i?console.log("Successfully queued progress:",{id:null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.id,percent:d,visit_time:Ri,nonce:Ni}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:d,visit_time:Ri,nonce:Ni}))}}})))}};let Di=!1,qi=!1;function Hi(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const $i=t=>{var e,i;(t.config.analytics||t.config.automations)&&(null===(i=null===(e=null===window||void 0===window?void 0:window.wp)||void 0===e?void 0:e.hooks)||void 0===i||i.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;Di||qi||(qi=!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(Hi).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),Di=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{qi=!1})))})))},Vi=function(t){var e=window.navigator.userAgent;if(e.match(/iPad/i)||e.match(/iPhone/i)){var i=function(t,e){for(var i,r,o,n=null==t||null===(i=t.elements)||void 0===i||null===(r=i.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;)e?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 e;null!=t&&null!==(e=t.fullscreen)&&void 0!==e&&e.active&&i(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var e;null!=t&&null!==(e=t.fullscreen)&&void 0!==e&&e.active||i(t,!1)}))}},Ui=function(){var t=h(regeneratorRuntime.mark((function t(e){var i,r,o;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-97e2763b.js");case 5:window.ResizeObserver=t.sent.ResizeObserver;case 7:if(o=new ResizeObserver((function(t){var e,i=v(t);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.contentRect;jQuery(r.target).find(".plyr__menu__container").css({maxHeight:"".concat(o.height-48,"px")})}}catch(t){i.e(t)}finally{i.f()}})),null!=e&&null!==(i=e.elements)&&void 0!==i&&i.container){t.next=10;break}return t.abrupt("return");case 10:if(o.observe(null==e||null===(r=e.elements)||void 0===r?void 0:r.container),e){t.next=13;break}return t.abrupt("return");case 13:e.on("playing",(function(){var t,i,r=null==e||null===(t=e.elements)||void 0===t?void 0:t.container.getBoundingClientRect();jQuery(null==e||null===(i=e.elements)||void 0===i?void 0:i.container).find(".plyr__menu__container").css({maxHeight:"".concat(r.height-48,"px")})}));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function Qi(t){var e,i,r,o,a,s,l,p,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n(n(n({},u),null!==(e=window)&&void 0!==e&&null!==(i=e.prestoPlayer)&&void 0!==i&&i.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:{}}),d=new ri(t,c);return"undefined"!=typeof learndash_video_data&&import("./p-461063ec.js").then((function(t){(0,t.default)(d)})),"undefined"!=typeof _tutorobject&&import("./p-0e1cd603.js").then((function(t){(0,t.default)(d)})),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)(d)})),Fi(d),Vi(d),Ui(d),Mi(d),Ei(d),fi(d),null!==(a=window)&&void 0!==a&&null!==(s=a.prestoPlayer)&&void 0!==s&&s.isAdmin||($i(d),Bi(c),oi(d),Ai(d)),d}function Wi(t){return"string"==typeof t&&t.includes(".m3u8")}let Yi=class{constructor(e){t(this,e),this.loaded=r(this,"loaded",7),this.isAdmin=!1,this.previouslyPlaying=!1,this.components={cta:null,email:null,overlays:null}}async play(t=!1){return this.shouldLazyLoad=!1,t&&(this.mutedPreview=!1),this.player.play()}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,e){return this.player.on(t,e)}async off(t,e){return this.player.off(t,e)}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 e=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)e.push(t=t.parentNode);return e})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:e,branding:i,src:r,analytics:o,automations:n,autoplay:a,blockAttributes:s={},provider:l="",provider_video_id:p="",youtube:u,type:c,isAdmin:d,i18n:h,storage:v={enabled:!d,key:`presto-player-${t.id}`}}){var y,f,g,m;const b=["settings"],_=[...["youtube","vimeo"].includes(l)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((e=>((null==t?void 0:t[e])||b.includes(e))&&!_.includes(e)));(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:c}),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:e,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==i?void 0:i.logo,logo_width:null==i?void 0:i.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===(m=null===window||void 0===window?void 0:window.wp)||void 0===m?void 0:m.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(),e=t.config,i=t.selector,r=t.src,o=t.preload,r&&Wi(r)?import("./p-bfec07bf.js").then((function(t){return(0,t.default)({config:e,selector:i,src:r,preload:o})})):new Promise((function(t){return t(new Qi(i,n({},e)))})));var t,e,i,r,o}handlePlayerElementChange(){var t;(({src:t,el:e,preload:i,currentTime:r})=>{if(!e.getAttribute("hls_loaded")&&["metadata","none"].includes(i)&&Wi(t)){if(r>0)return e.style.height=null,e.style.paddingBottom=null,void e.setAttribute("hls_loaded","1");e.style.height="0px",e.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,e){var i,r,o,n,a,s,l;this.player&&!this.isAdmin&&(!t&&e&&this.player.once("timeupdate",(()=>{var t,e;this.player.loop="loop"===(null===(t=this.preset)||void 0===t?void 0:t.on_video_end),this.player.toggleCaptions(null===(e=null==this?void 0:this.preset)||void 0===e?void 0:e.captions_enabled)})),(null===(o=null===(r=null===(i=this.originalConfig)||void 0===i?void 0:i.blockAttributes)||void 0===r?void 0:r.mutedPreview)||void 0===o?void 0:o.enabled)&&(({player:t,mutedPreview:e,captions:i,progress:r,savePosition:o,onPlay:n})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=e,t.muted=e,t.loop=e,t.config.ajaxProgress=!e&&r,t.config.save_player_position=!e&&o;try{t.toggleCaptions(!!e&&!!i)}catch(t){}return setTimeout((()=>{ai(t)||t.restart(),setTimeout((()=>{t.muted=e,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,e,i;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(e=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===e?void 0:e.enabled,this.renderDynamicOverlays(),this.renderCTA(),this.renderEmailOverlay(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Wi(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")),"go-to-start"===(null===(i=this.preset)||void 0===i?void 0:i.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,e,i;return"youtube"===this.provider&&!this.autoplay&&!(null===(e=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===e?void 0:e.enabled)&&!!(null===(i=this.preset)||void 0===i?void 0:i.lazy_load_youtube)}componentWillLoad(){var t,e,i;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===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.i18n)||(null===(i=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===i?void 0:i.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,e)=>{if(!e)return;const i=document.createElement("style");t.shadowRoot.append(i),i.appendChild(document.createTextNode(e))})(this.el,this.css),t}async onReload(t){const e=await this.initialize();"play"==t&&e.on("ready",(()=>{this.play(),e.muted=!0,e.muted=!1,e.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-97e2763b.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 e,i,r,o,n;if("unknown"!==b()&&!(null===(i=null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.blockAttributes)||void 0===i?void 0:i.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 e=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=e}))}}(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 e,i;if(!(null===(e=this.preset)||void 0===e?void 0:e.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(i=null==this?void 0:this.player)||void 0===i?void 0:i.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 e,i,r;if(!this.isAdmin&&(null===(e=this.preset)||void 0===e?void 0:e.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===(i=this.blockAttributes)||void 0===i?void 0:i.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 e("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 e("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return e("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 e("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});default:return e("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})}}renderCTA(){var t,e,i,r;(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&(this.isAdmin||(null===(i=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===i?void 0:i.enabled)&&((null===(r=this.components.cta)||void 0===r?void 0:r.offsetParent)||(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))))}renderEmailOverlay(){var t,e,i;!(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)||(null===(i=this.components.email)||void 0===i?void 0:i.offsetParent)||(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))}renderActionBar(){var t,i;if((null===(i=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===i?void 0:i.enabled)&&this.player)return e("presto-action-bar",{config:this.preset.action_bar,player:null==this?void 0:this.player,youtube:this.youtube})}stickyPositionClass(){var t,e;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(e=this.preset)||void 0===e?void 0:e.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,e,i,r,o;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===(i=null===(e=this.player)||void 0===e?void 0:e.config)||void 0===i?void 0:i.mutedPreview)||void 0===r?void 0:r.enabled),(null===(o=null==this?void 0:this.overlaysComponent)||void 0===o?void 0:o.offsetParent)||this.player.elements.wrapper.append(this.overlaysComponent))}render(){var t,i,r,o,n;return e(y,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},e("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"presto-sticky":""}\n ${this.stickyPositionClass()}\n ${"rtl"===this.direction?"rtl":""}\n ${!!(null===(t=this.preset)||void 0===t?void 0:t.skin)&&`skin-${null===(i=this.preset)||void 0===i?void 0:i.skin}`}\n ${(null===(r=this.preset)||void 0===r?void 0:r.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(o=this.preset)||void 0===o?void 0:o.caption_style)?`caption-style-${null===(n=this.preset)||void 0===n?void 0:n.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}`},e("div",null,e("slot",{name:"player-start"}),e("slot",{name:"player-before-video"}),this.renderVideo(),e("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),e("slot",{name:"player-end"}))))}get el(){return i(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};Yi.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.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 .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.skin-stacked .plyr__controls{flex-wrap:wrap}.presto-player__wrapper.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.presto-player__wrapper.skin-stacked .plyr__controls{justify-content:flex-start}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.presto-player__wrapper.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.presto-player__wrapper.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.presto-player__wrapper.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:50%}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}@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;display:flex;align-items:center;justify-content:center}.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 .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}}';const Ji=function(t,e){return u(e)};let Gi=class{constructor(e){t(this,e),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,i=e(Ji,null,e("span",{part:"prefix",class:"button__prefix"},e("slot",{onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),e("span",{part:"label",class:"button__label"},e("slot",{onSlotchange:()=>this.handleSlotChange()})),e("span",{part:"suffix",class:"button__suffix"},e("slot",{onSlotchange:()=>this.handleSlotChange(),name:"suffix"}))),r=e("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},i),o=e("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},i);return t?o:r}get button(){return i(this)}};Gi.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 Ki=class{constructor(e){t(this,e)}render(){return e("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}};Ki.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 Xi=class{constructor(e){t(this,e)}render(){return e("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},e("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>e("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"}))))}};Xi.style=":host{display:block}";let Zi=class{constructor(e){t(this,e)}getId(t){const e=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(t||"");return(null==e?void 0:e[5])||""}parseHash(t){const e=t.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*\&*h=|\/)+(?<hash>[\d,a-f]+)/);return e?e.groups.hash:null}render(){if(this.src)return"Android"!==b()||(t=window.navigator.standalone,i=window.navigator.userAgent.toLowerCase(),r=/safari/.test(i),/iphone|ipod|ipad/.test(i)?!t&&r||t||r:!i.includes("wv"))?e("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)}):e("div",{class:"presto-iframe-fallback-container"},e("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,i,r}};Zi.style=":host{display:block}";let tr=class{constructor(e){t(this,e),this.reload=r(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.once("statechange",(t=>{var e,i,r,o,n;1===t.detail.code&&((null===(n=null===(o=null===(r=null===(i=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr)||void 0===i?void 0:i.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 e;const i=(t||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return i&&11===(null===(e=null==i?void 0:i[2])||void 0===e?void 0:e.length)?i[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var t;let e=null===(t=window.navigator)||void 0===t?void 0:t.standalone,i=window.navigator.userAgent.toLowerCase(),r=/safari/.test(i),o=/iphone|ipod|ipad/.test(i);this.isWebView=o?!e&&!r:i.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&"iOS"===b()&&(this.lazyLoad=!1)}render(){return this.isWebView?e("div",{class:"fallback-container"},e("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?e("div",null,e("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),e("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):e("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"]}}};tr.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 er=class{constructor(e){t(this,e),this.layout="default"}waitForApi(t){var e=setInterval((function(){var i;(null===(i=null===window||void 0===window?void 0:window.gapi)||void 0===i?void 0:i.ytsubscribe)&&(clearInterval(e),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 e=document.getElementsByTagName("script")[0];e&&e.parentNode.insertBefore(t,e),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return e("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};er.style=":host{display:block}";export{T as C,I as E,Qi as P,f as a,_ as b,w as c,k as d,x as e,z as f,S as g,P as h,C as i,O as j,A as k,Yi as l,Gi as m,Ki as n,Xi as o,Zi as p,tr as q,ai as r,er as s}
1
+ import{r as t,h as e,g as i,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 c,l as d,m as h,n as v,H as y}from"./p-99303c1a.js";let f=class{constructor(e){t(this,e)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var e,i;this.currentTime=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.currentTime,this.duration=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return e("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 i(this)}};function g({current:t,duration:e,showAfter:i=null}){if(0===i)return!0;if(null===i||!e)return!1;if(t===i)return!0;let r=t/e*100;return 99.9<r&&(r=100),console.log(r,i),r>=i}function m(t){let e,i=t.split(":");return i.length>1&&(e=60*parseInt(i[0])),parseInt(i[1])+parseInt(e)}function b(){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 _=class{constructor(e){t(this,e),this.show=!1,this.youtubeRenderKey=1,this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleDuration(){this.handleTime()}handleEnded(t){var e;if(t){if(100!==(null===(e=null==this?void 0:this.config)||void 0===e?void 0:e.percentage_start))return;this.show=!0}}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleTime(){this.checkTime()}checkTime(){var t,e;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===(e=this.config)||void 0===e?void 0:e.percentage_start})}handleButtonCountChange(t,e){(null==t?void 0:t.button_count)!==(null==e?void 0:e.button_count)&&this.youtubeRenderKey++,(null==t?void 0:t.enabled)&&this.handleDuration()}youtubeButton(){var t,i,r,o;if("youtube"===(null===(t=this.config)||void 0===t?void 0:t.button_type)&&(null===(i=this.youtube)||void 0===i?void 0:i.channelId))return e("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,i,r,o,n,a,s,l,p,u,c;if("custom"===(null===(t=this.config)||void 0===t?void 0:t.button_type))return e("presto-player-button",{type:"primary",size:"small",href:null===(r=null===(i=this.config)||void 0===i?void 0:i.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===(c=this.config)||void 0===c?void 0:c.button_text)}render(){var t,i;return e("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===(i=this.config)||void 0===i?void 0:i.text,e("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return i(this)}static get watchers(){return{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"]}}};_.style=":host{display:block}";let w=class{constructor(e){t(this,e)}render(){return e("div",{class:{bar:!0,"bar--open":this.open}},e("span",{part:"content",class:"bar__content"},e("slot",null)),e("span",{part:"button",class:"bar__button"},e("slot",{name:"button"})))}};w.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)}.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 k=class{constructor(e){t(this,e)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return e("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})}},x=class{constructor(e){t(this,e)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var e,i;this.currentTime=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.currentTime,this.duration=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t;return e("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})}};x.style=":host{display:block}";let z=class{constructor(e){t(this,e),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleEnded(t){var e;if(t){if(100!==(null===(e=null==this?void 0:this.cta)||void 0===e?void 0:e.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()}render(){var t,i,r,o,n,a,s,l,p,u,c,d,h,v;if(this.show)return e("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===(i=null==this?void 0:this.cta)||void 0===i?void 0:i.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===(c=null==this?void 0:this.cta)||void 0===c?void 0:c.button_link,allowSkip:!this.ended&&(null===(d=null==this?void 0:this.cta)||void 0===d?void 0:d.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()})}static get watchers(){return{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"]}}};z.style=":host{display:block}";const j=function(t,e,i){var r=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}({minFontSize:-1/0,maxFontSize:1/0,container:t},i),o=function(t){var i=e||1,o=function(){var e;t.style.fontSize=Math.max(Math.min(((null==r||null===(e=r.container)||void 0===e?void 0:e.clientWidth)||0)/(10*i),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize))+"px"};if(o(),"ResizeObserver"in window==0)var n=import("./p-97e2763b.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 T=class{constructor(e){t(this,e),this.skip=r(this,"skip",7),this.rewatch=r(this,"rewatch",7)}componentDidLoad(){j(this.textInput,3,{maxFontSize:20,minFontSize:8})}handleCTAClick(t){var e;(null===(e=this.buttonLink)||void 0===e?void 0:e.url)&&(t.preventDefault(),t.stopPropagation(),this.handleLink())}handleLink(){var t,e,i;(null===(t=this.buttonLink)||void 0===t?void 0:t.opensInNewTab)?window.open(null===(e=this.buttonLink)||void 0===e?void 0:e.url,"_blank"):window.location.href=null===(i=this.buttonLink)||void 0===i?void 0:i.url}render(){var t,i,r,o,n;return e("div",{class:"wrapper",ref:t=>this.textInput=t},e("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":""}`},e("div",{class:"content"},e("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&e("p",{part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&e("presto-player-button",{full:!0,onClick:t=>this.handleCTAClick(t),part:"cta-button",href:null===(i=null==this?void 0:this.buttonLink)||void 0===i?void 0:i.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&&e("div",{class:"rewatch",onClick:t=>{t.preventDefault(),t.stopImmediatePropagation(),this.rewatch.emit()}},e("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"},e("polyline",{points:"9 14 4 9 9 4"}),e("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&&e("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," →"))}};T.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}';let S=class{constructor(e){t(this,e),this.position="top-right"}closestElement(t,e){return e&&e!=document&&e!=window&&e.closest(t)||e&&this.closestElement(t,e.getRootNode().host)}componentDidLoad(){let t=this.closestElement("presto-player",this.el);j(this.text,3,{maxFontSize:16,minFontSize:10,container:t})}render(){return e(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},e("slot",null))}get el(){return i(this)}};S.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 P=class{constructor(e){t(this,e),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,e,i,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===(i=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===i?void 0:i.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:e,component:i}=this.refs[t];this.checkComponent(i,e.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,e,i){if(!(null==t?void 0:t.offsetParent))return i();if(!t.shadowRoot.querySelector("slot"))return i();if(this.player&&this.player.playing){const r=t.shadowRoot.querySelector("slot").assignedNodes()[0];if(r){if(r.parentElement.innerHTML!=e)return i();const t=getComputedStyle(r.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(t.fontSize,10)<10)return i();const o=function(t){var e=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return e?[e[1],e[2],e[3],"1"]:(e=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[e[1],e[2],e[3],e[4]]:void 0}(t.color);if("1"!==(null==o?void 0:o[3]))return i()}}}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 i,r;return e("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(t)},ref:e=>this.refs[t.id]={overlay:t,component:e},key:t.id,position:t.position,href:null===(i=null==t?void 0:t.link)||void 0===i?void 0:i.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 e,i,r;if(!(null===(i=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===i?void 0:i.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,i,r,o,n,a,s,l,p,u,c;if(this.enabled&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(r=null===(i=this.preset)||void 0===i?void 0:i.watermark)||void 0===r?void 0:r.enabled)))return e("div",{class:"overlays",ref:t=>this.container=t},e("div",{class:"top-left",ref:t=>this.topLeft=t},!!this.shouldShowWatermark("top-left")&&e("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)))),e("div",{class:"top-right",ref:t=>this.topRight=t},!!this.shouldShowWatermark("top-right")&&e("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===(c=null==this?void 0:this.overlays)||void 0===c?void 0:c.length)&&this.overlays.map((t=>"top-right"!==t.position?"":this.renderOverlay(t)))))}get el(){return i(this)}};P.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 C=class{constructor(e){t(this,e)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var e,i;this.currentTime=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.currentTime,this.duration=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t,i;return e("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===(i=this.preset)||void 0===i?void 0:i.email_collection,i18n:this.i18n})}};C.style=":host{display:block}";let O=class{constructor(e){t(this,e),this.playVideo=r(this,"playVideo",7),this.pauseVideo=r(this,"pauseVideo",7),this.restartVideo=r(this,"restartVideo",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 e;this.loading=!0,this.error="";const i=await this.getNonce(),{data:r}=await i.json();try{let i=await fetch(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.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 i.json();if(!o)throw n;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(t){const e=null==t?void 0:t[0];e&&"string"==typeof e&&(this.error=e)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}render(){var t,i,r,o;if(this.show)return e("presto-email-overlay-ui",{direction:this.direction,class:"email-overlay",headline:null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.headline,bottomText:null===(i=null==this?void 0:this.emailCollection)||void 0===i?void 0:i.bottom_text,allowSkip:null===(r=null==this?void 0:this.emailCollection)||void 0===r?void 0:r.allow_skip,buttonText:null===(o=null==this?void 0:this.emailCollection)||void 0===o?void 0:o.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:t=>this.submit(t),onSkip:()=>this.skip(),i18n:this.i18n})}static get watchers(){return{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"]}}};O.style=":host{display:block}";let I=class{constructor(e){t(this,e),this.submitForm=r(this,"submitForm",7),this.skip=r(this,"skip",7)}handleSubmit(t){this.submitForm.emit({email:this.email}),t.preventDefault()}componentDidLoad(){j(this.textInput,3,{maxFontSize:20,minFontSize:8})}handleChange(t){this.email=t.target.value}render(){var t,i,r,o;return e("div",{class:"overlay "+("rtl"===this.direction?"rtl":""),ref:t=>this.textInput=t},e("div",{class:"content"},e("h1",null,this.headline||(null===(t=null==this?void 0:this.i18n)||void 0===t?void 0:t.emailDefaultHeadline)),this.isLoading?e("presto-player-spinner",null):e("form",{onSubmit:t=>this.handleSubmit(t)},e("input",{type:"email",placeholder:null===(i=null==this?void 0:this.i18n)||void 0===i?void 0:i.emailPlaceholder,value:this.email,onInput:t=>this.handleChange(t),required:!0}),e("button",{type:"submit"},this.buttonText||(null===(r=null==this?void 0:this.i18n)||void 0===r?void 0:r.play))),this.errorMessage&&e("p",{class:"error"},this.errorMessage),this.bottomText&&e("p",{innerHTML:this.bottomText}),!!this.allowSkip&&e("div",{class:"skip",onClick:()=>{this.skip.emit()}},null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.skip," →")))}};I.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}.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: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-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}.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}';let A=class{constructor(e){t(this,e),this.playVideo=r(this,"playVideo",7)}render(){var t,i,r,o,n,a,s,l,p;return e("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"])&&e("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},e("svg",{id:"plyr-play",viewBox:"0 0 18 18"},e("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"})),e("span",{class:"plyr__sr-only"},"Play")),(null===(i=this.mutedOverlay)||void 0===i?void 0:i.enabled)&&(null===(r=this.mutedOverlay)||void 0===r?void 0:r.src)?e("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)+"%"}},e("img",{src:null===(p=this.mutedOverlay)||void 0===p?void 0:p.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};A.style=":host{display:block}";var M=["premium","referrerPolicy"];function E(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function F(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function L(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function N(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function R(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?N(Object(i),!0).forEach((function(e){L(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var B={addCSS:!0,thumbWidth:15,watch:!0};function D(t,e){return function(){return Array.from(document.querySelectorAll(e)).includes(this)}.call(t,e)}var q=function(t){return null!=t?t.constructor:null},H=function(t,e){return!!(t&&e&&t instanceof e)},$=function(t){return q(t)===String},V=function(t){return Array.isArray(t)},U=function(t){return H(t,NodeList)},Q=$,W=V,Y=U,J=function(t){return H(t,Element)},G=function(t){return H(t,Event)},K=function(t){return function(t){return null==t}(t)||($(t)||V(t)||U(t))&&!t.length||function(t){return q(t)===Object}(t)&&!Object.keys(t).length};var X,Z,tt,et=function(){function t(e,i){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),J(e)?this.element=e:Q(e)&&(this.element=document.querySelector(e)),J(this.element)&&K(this.element.rangeTouch)&&(this.config=R({},B,{},i),this.init())}return function(t,e,i){e&&F(t.prototype,e),i&&F(t,i)}(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 e=this,i=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){e.element[i](t,(function(t){return e.set(t)}),!1)}))}},{key:"get",value:function(e){if(!t.enabled||!G(e))return null;var i,r=e.target,o=e.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>(i=100/l.width*(o.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*p:50<i&&(i+=2*(i-50)*p),n+function(t,e){if(1>e){var i=function(t){var e="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}(e);return parseFloat(t.toFixed(i))}return Math.round(t/e)*e}(i/100*(a-n),s)}},{key:"set",value:function(e){t.enabled&&G(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(t,e){if(t&&e){var i=new Event(e,{bubbles:!0});t.dispatchEvent(i)}}(e.target,"touchend"===e.type?"change":"input"))}}],[{key:"setup",value:function(e){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null;if(K(e)||Q(e)?r=Array.from(document.querySelectorAll(Q(e)?e:'input[type="range"]')):J(e)?r=[e]:Y(e)?r=Array.from(e):W(e)&&(r=e.filter(J)),K(r))return null;var o=R({},B,{},i);if(Q(e)&&o.watch){var n=new MutationObserver((function(i){Array.from(i).forEach((function(i){Array.from(i.addedNodes).forEach((function(i){J(i)&&D(i,e)&&new t(i,o)}))}))}));n.observe(document.body,{childList:!0,subtree:!0})}return r.map((function(e){return new t(e,i)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),it=function(t){return null!=t?t.constructor:null},rt=function(t,e){return Boolean(t&&e&&t instanceof e)},ot=function(t){return null==t},nt=function(t){return it(t)===Object},at=function(t){return it(t)===String},st=function(t){return it(t)===Function},lt=function(t){return Array.isArray(t)},pt=function(t){return rt(t,NodeList)},ut=function(t){return ot(t)||(at(t)||lt(t)||pt(t))&&!t.length||nt(t)&&!Object.keys(t).length},ct=ot,dt=nt,ht=function(t){return it(t)===Number&&!Number.isNaN(t)},vt=at,yt=function(t){return it(t)===Boolean},ft=st,gt=lt,mt=pt,bt=function(t){return null!==t&&"object"==l(t)&&1===t.nodeType&&"object"==l(t.style)&&"object"==l(t.ownerDocument)},_t=function(t){return rt(t,Event)},wt=function(t){return rt(t,KeyboardEvent)},kt=function(t){return rt(t,TextTrack)||!ot(t)&&at(t.kind)},xt=function(t){if(rt(t,window.URL))return!0;if(!at(t))return!1;var e=t;t.startsWith("http://")&&t.startsWith("https://")||(e="http://".concat(t));try{return!ut(new URL(e).hostname)}catch(t){return!1}},zt=ut,jt=(X=document.createElement("span"),Z={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},tt=Object.keys(Z).find((function(t){return void 0!==X.style[t]})),!!vt(tt)&&Z[tt]);function Tt(t,e){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),e)}var St={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 Pt(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)}function Ct(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];if(!i.length)return t;var o=i.shift();return dt(o)?(Object.keys(o).forEach((function(e){dt(o[e])?(Object.keys(t).includes(e)||Object.assign(t,a({},e,{})),Ct(t[e],o[e])):Object.assign(t,a({},e,o[e]))})),Ct.apply(void 0,[t].concat(i))):t}function Ot(t,e){Array.from(t.length?t:[t]).reverse().forEach((function(t,i){var r=i>0?e.cloneNode(!0):e,o=t.parentNode,n=t.nextSibling;r.appendChild(t),n?o.insertBefore(r,n):o.appendChild(r)}))}function It(t,e){bt(t)&&!zt(e)&&Object.entries(e).filter((function(t){var e=o(t,2);return!ct(e[1])})).forEach((function(e){var i=o(e,2);return t.setAttribute(i[0],i[1])}))}function At(t,e,i){var r=document.createElement(t);return dt(e)&&It(r,e),vt(i)&&(r.innerText=i),r}function Mt(t,e,i,r){bt(e)&&e.appendChild(At(t,i,r))}function Et(t){mt(t)||gt(t)?Array.from(t).forEach(Et):bt(t)&&bt(t.parentNode)&&t.parentNode.removeChild(t)}function Ft(t){if(bt(t))for(var e=t.childNodes.length;e>0;)t.removeChild(t.lastChild),e-=1}function Lt(t,e){return bt(e)&&bt(e.parentNode)&&bt(t)?(e.parentNode.replaceChild(t,e),t):null}function Nt(t,e){if(!vt(t)||zt(t))return{};var i={},r=Ct({},e);return t.split(",").forEach((function(t){var e=t.trim(),n=e.replace(".",""),a=e.replace(/[[\]]/g,"").split("="),s=o(a,1)[0],l=a.length>1?a[1].replace(/["']/g,""):"";switch(e.charAt(0)){case".":i.class=vt(r.class)?"".concat(r.class," ").concat(n):n;break;case"#":i.id=e.replace("#","");break;case"[":i[s]=l}})),Ct(r,i)}function Rt(t,e){if(bt(t)){var i=e;yt(i)||(i=!t.hidden),t.hidden=i}}function Bt(t,e,i){if(mt(t))return Array.from(t).map((function(t){return Bt(t,e,i)}));if(bt(t)){var r="toggle";return void 0!==i&&(r=i?"add":"remove"),t.classList[r](e),t.classList.contains(e)}return!1}function Dt(t,e){return bt(t)&&t.classList.contains(e)}function qt(t,e){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(t,e)}function Ht(t){return this.elements.container.querySelectorAll(t)}function $t(t){return this.elements.container.querySelector(t)}function Vt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];bt(t)&&(t.focus({preventScroll:!0}),e&&Bt(t,this.config.classNames.tabFocus))}var Ut={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Qt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,e,i){var r=Qt[t]||"html5"!==e;return{api:r,ui:r&&Qt.rangeInput&&("video"!==t||!St.isIPhone||St.isIPhone&&i&&Qt.playsinline)}},pip:!(St.isIPhone||!ft(At("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||At("video").disablePictureInPicture)),airplay:ft(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(zt(t))return!1;var e=t.split("/"),i=o(e,1),r=t;if(!this.isHTML5||i[0]!==this.type)return!1;Object.keys(Ut).includes(r)&&(r+='; codecs="'.concat(Ut[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!==jt,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Wt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Yt(t,e,i){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&&!zt(e)&&ft(i)){var s=e.split(" "),l=a;Wt&&(l={passive:n,capture:a}),s.forEach((function(e){r&&r.eventListeners&&o&&r.eventListeners.push({element:t,type:e,callback:i,options:l}),t[o?"addEventListener":"removeEventListener"](e,i,l)}))}}function Jt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=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];Yt.call(this,t,e,i,!0,r,o)}function Gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=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];Yt.call(this,t,e,i,!1,r,o)}function Kt(t){var e=this,i=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];Gt(t,i,a,o,n),r.apply(e,l)};Yt.call(this,t,i,a,!0,o,n)}function Xt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(bt(t)&&!zt(e)){var o=new CustomEvent(e,{bubbles:i,detail:n(n({},r),{},{plyr:this})});t.dispatchEvent(o)}}function Zt(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function te(){var t=this;return new Promise((function(e){return t.ready?setTimeout(e,0):Jt.call(t,t.elements.container,"ready",e)})).then((function(){}))}function ee(t){(function(t){return rt(t,Promise)&&st(t.then)})(t)&&t.then(null,(function(){}))}function ie(t){return gt(t)?t.filter((function(e,i){return t.indexOf(e)===i})):t}function re(t,e){return gt(t)&&t.length?t.reduce((function(t,i){return Math.abs(i-e)<Math.abs(t-e)?i:t})):null}function oe(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var ne=[[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,e){var i=o(e,2),r=i[0],s=i[1];return n(n({},t),{},a({},r/s,[r,s]))}),{});function ae(t){return!!(gt(t)||vt(t)&&t.includes(":"))&&(gt(t)?t:t.split(":")).map(Number).every(ht)}function se(t){if(!gt(t)||!t.every(ht))return null;var e=o(t,2),i=e[0],r=e[1],n=function t(e,i){return 0===i?e:t(i,e%i)}(i,r);return[i/n,r/n]}function le(t){var e=function(t){return ae(t)?t.split(":").map(Number):null},i=e(t);if(null===i&&(i=e(this.config.ratio)),null===i&&!zt(this.embed)&&gt(this.embed.ratio)&&(i=this.embed.ratio),null===i&&this.isHTML5){var r=this.media;i=[r.videoWidth,r.videoHeight]}return se(i)}function pe(t){if(!this.isVideo)return{};var e=this.elements.wrapper,i=le.call(this,t);if(!gt(i))return{};var r=se(i),n=o(r,2),a=n[0],s=n[1],l=100/a*s;if(oe("aspect-ratio: ".concat(a,"/").concat(s))?e.style.aspectRatio="".concat(a,"/").concat(s):e.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?e.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:l,ratio:i}}function ue(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,r=t/e,o=re(Object.keys(ne),r);return Math.abs(o-r)<=i?ne[o]:[t,e]}var ce={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(e){var i=e.getAttribute("type");return!!zt(i)||Qt.mime.call(t,i)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:ce.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,zt(this.config.ratio)||pe.call(t),Object.defineProperty(t.media,"quality",{get:function(){var e=ce.getSources.call(t).find((function(e){return e.getAttribute("src")===t.source}));return e&&Number(e.getAttribute("size"))},set:function(e){if(t.quality!==e){if(t.config.quality.forced&&ft(t.config.quality.onChange))t.config.quality.onChange(e);else{var i=ce.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===e}));if(!i)return;var r=t.media,o=r.currentTime,n=r.paused,a=r.preload,s=r.readyState,l=r.playbackRate;t.media.src=i.getAttribute("src"),("none"!==a||s)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=o,n||ee(t.play())})),t.media.load())}Xt.call(t,t.media,"qualitychange",!1,{quality:e})}}})}},cancelRequests:function(){this.isHTML5&&(Et(ce.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function de(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function he(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return zt(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,e){return i[e].toString()}))}var ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())},ye=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 fe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.toString();return e=ve(e,"-"," "),e=ve(e,"_"," "),e=ye(e),ve(e," ","")}function ge(t){var e=document.createElement("div");return e.appendChild(t),e.innerHTML}var me={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},be=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(zt(t)||zt(e))return"";var i=Pt(e.i18n,t);if(zt(i))return Object.keys(me).includes(t)?me[t]:"";var r={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(r).forEach((function(t){var e=o(t,2);i=ve(i,e[0],e[1])})),i},_e=function(){function t(e){var i=this;p(this,t),E(this,"get",(function(e){if(!t.supported||!i.enabled)return null;var r=window.localStorage.getItem(i.key);if(zt(r))return null;var o=JSON.parse(r);return vt(e)&&e.length?o[e]:o})),E(this,"set",(function(e){if(t.supported&&i.enabled&&dt(e)){var r=i.get();zt(r)&&(r={}),Ct(r,e);try{window.localStorage.setItem(i.key,JSON.stringify(r))}catch(e){}}})),this.enabled=e.config.storage.enabled,this.key=e.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 we(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(i,r){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===e)try{i(JSON.parse(o.responseText))}catch(t){i(o.responseText)}else i(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",t,!0),o.responseType=e,o.send()}catch(t){r(t)}}))}function ke(t,e){if(vt(t)){var i=vt(e),r=function(){return null!==document.getElementById(e)},o=function(t,e){t.innerHTML=e,i&&r()||document.body.insertAdjacentElement("afterbegin",t)};if(!i||!r()){var n=_e.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),i&&a.setAttribute("id",e),n){var s=window.localStorage.getItem("cache-".concat(e));if(null!==s){var l=JSON.parse(s);o(a,l.content)}}we(t).then((function(t){if(!zt(t)){if(n)try{window.localStorage.setItem("cache-".concat(e),JSON.stringify({content:t}))}catch(t){}o(a,t)}})).catch((function(){}))}}}var xe=function(t){return Math.trunc(t/60/60%60,10)},ze=function(t){return Math.trunc(t%60,10)};function je(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!ht(t))return je(void 0,e,i);var r,o=function(t){return"0".concat(t).slice(-2)},n=xe(t),a=(r=t,Math.trunc(r/60%60,10)),s=ze(t);return n=e||n>0?"".concat(n,":"):"","".concat(i&&t>0?"-":"").concat(n).concat(o(a),":").concat(o(s))}var Te={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,i=t.host!==e||St.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements:function(){try{return this.elements.controls=$t.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Ht.call(this,this.config.selectors.buttons.play),pause:$t.call(this,this.config.selectors.buttons.pause),restart:$t.call(this,this.config.selectors.buttons.restart),rewind:$t.call(this,this.config.selectors.buttons.rewind),fastForward:$t.call(this,this.config.selectors.buttons.fastForward),mute:$t.call(this,this.config.selectors.buttons.mute),pip:$t.call(this,this.config.selectors.buttons.pip),airplay:$t.call(this,this.config.selectors.buttons.airplay),settings:$t.call(this,this.config.selectors.buttons.settings),captions:$t.call(this,this.config.selectors.buttons.captions),fullscreen:$t.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=$t.call(this,this.config.selectors.progress),this.elements.inputs={seek:$t.call(this,this.config.selectors.inputs.seek),volume:$t.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:$t.call(this,this.config.selectors.display.buffer),currentTime:$t.call(this,this.config.selectors.display.currentTime),duration:$t.call(this,this.config.selectors.display.duration)},bt(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,e){var i="http://www.w3.org/2000/svg",r=Te.getIconUrl.call(this),o="".concat(r.cors?"":r.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(i,"svg");It(n,Ct(e,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(i,"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 e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=be(t,this.config);return At("span",n(n({},e),{},{class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),i)},createBadge:function(t){if(zt(t))return null;var e=At("span",{class:this.config.classNames.menu.value});return e.appendChild(At("span",{class:this.config.classNames.menu.badge},t)),e},createButton:function(t,e){var i=this,r=Ct({},e),o=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=fe(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===i.config.classNames.control}))||Ct(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:zt(n.label)&&(n.label=o),zt(n.icon)&&(n.icon=t)}var a=At(n.element);return n.toggle?(a.appendChild(Te.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(Te.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(Te.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(Te.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(Te.createIcon.call(this,n.icon)),a.appendChild(Te.createLabel.call(this,n.label))),Ct(r,Nt(this.config.selectors.buttons[o],r)),It(a,r),"play"===o?(gt(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange:function(t,e){var i=At("input",Ct(Nt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":be(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[t]=i,Te.updateRangeFill.call(this,i),et.setup(i),i},createProgress:function(t,e){var i=At("progress",Ct(Nt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if("volume"!==t){i.appendChild(At("span",null,"0"));var r={played:"played",buffer:"buffered"}[t],o=r?be(r,this.config):"";i.innerText="% ".concat(o.toLowerCase())}return this.elements.display[t]=i,i},createTime:function(t,e){var i=Nt(this.config.selectors.display[t],e),r=At("div",Ct(i,{class:"".concat(i.class?i.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":be(t,this.config)}),"00:00");return this.elements.display[t]=r,r},bindMenuItemShortcuts:function(t,e){var i=this;Jt.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=qt(t,'[role="menuitemradio"]');!n&&[32,39].includes(r.which)?Te.showMenuPanel.call(i,e,!0):32!==r.which&&(40===r.which||n&&39===r.which?bt(o=t.nextElementSibling)||(o=t.parentNode.firstElementChild):bt(o=t.previousElementSibling)||(o=t.parentNode.lastElementChild),Vt.call(i,o,!0))}}),!1),Jt.call(this,t,"keyup",(function(t){13===t.which&&Te.focusFirstMenuItem.call(i,null,!0)}))},createMenuItem:function(t){var e=this,i=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=Nt(this.config.selectors.inputs[o]),c=At("button",Ct(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:i})),d=At("span");d.innerHTML=n,bt(s)&&d.appendChild(s),c.appendChild(d),Object.defineProperty(c,"checked",{enumerable:!0,get:function(){return"true"===c.getAttribute("aria-checked")},set:function(t){t&&Array.from(c.parentNode.children).filter((function(t){return qt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),c.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(c,"click keyup",(function(t){if(!wt(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),c.checked=!0,o){case"language":e.currentTrack=Number(i);break;case"quality":e.quality=i;break;case"speed":e.speed=parseFloat(i)}Te.showMenuPanel.call(e,"home",wt(t))}}),o,!1),Te.bindMenuItemShortcuts.call(this,c,o),r.appendChild(c)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ht(t)?je(t,xe(this.duration)>0,e):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];bt(t)&&ht(e)&&(t.innerText=Te.formatTime(e,i))},updateVolume:function(){this.supported.ui&&(bt(this.elements.inputs.volume)&&Te.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),bt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;bt(t)&&(t.value=e,Te.updateRangeFill.call(this,t))},updateProgress:function(t){var e=this;if(this.supported.ui&&_t(t)){var i=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":i=function(t,e){return 0===t||0===e||Number.isNaN(t)||Number.isNaN(e)?0:(t/e*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&Te.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":!function(t,i){var r=ht(i)?i:0,o=bt(t)?t:e.elements.display.buffer;if(bt(o)){o.value=r;var n=o.getElementsByTagName("span")[0];bt(n)&&(n.childNodes[0].nodeValue=r)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var e=_t(t)?t.target:t;if(bt(e)&&"range"===e.getAttribute("type")){if(qt(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);var i=Te.formatTime(this.currentTime),r=Te.formatTime(this.duration),o=be("seekLabel",this.config);e.setAttribute("aria-valuetext",o.replace("{currentTime}",i).replace("{duration}",r))}else if(qt(e,this.config.selectors.inputs.volume)){var n=100*e.value;e.setAttribute("aria-valuenow",n),e.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else e.setAttribute("aria-valuenow",e.value);St.isWebkit&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip:function(t){var e=this;if(this.config.tooltips.seek&&bt(this.elements.inputs.seek)&&bt(this.elements.display.seekTooltip)&&0!==this.duration){var i="".concat(this.config.classNames.tooltip,"--visible"),r=function(t){return Bt(e.elements.display.seekTooltip,i,t)};if(this.touch)r(!1);else{var o=0,n=this.elements.progress.getBoundingClientRect();if(_t(t))o=100/n.width*(t.pageX-n.left);else{if(!Dt(this.elements.display.seekTooltip,i))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Te.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),_t(t)&&["mouseenter","mouseleave"].includes(t.type)&&r("mouseenter"===t.type)}}},timeUpdate:function(t){var e=!bt(this.elements.display.duration)&&this.config.invertTime;Te.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),t&&"timeupdate"===t.type&&this.media.seeking||Te.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Rt(this.elements.display.currentTime,!0),void Rt(this.elements.progress,!0);bt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=bt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Te.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Te.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Te.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,e){Rt(this.elements.settings.buttons[t],!e)},updateSetting:function(t,e,i){var r=this.elements.settings.panels[t],o=null,n=e;if("captions"===t)o=this.currentTrack;else{if(o=zt(i)?this[t]:i,zt(o)&&(o=this.config[t].default),!zt(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(bt(n)||(n=r&&r.querySelector('[role="menu"]')),bt(n)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Te.getLabel.call(this,t,o);var a=n&&n.querySelector('[value="'.concat(o,'"]'));bt(a)&&(a.checked=!0)}},getLabel:function(t,e){switch(t){case"speed":return 1===e?be("normal",this.config):"".concat(e,"&times;");case"quality":if(ht(e)){if(0===e)return be("auto",this.config);var i=be("qualityLabel.".concat(e),this.config);return i.length?i:"".concat(e,"p")}return ye(e);case"captions":return Ce.getLabel.call(this);default:return null}},setQualityMenu:function(t){var e=this;if(bt(this.elements.settings.panels.quality)){var i="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');gt(t)&&(this.options.quality=ie(t).filter((function(t){return e.config.quality.options.includes(t)})));var o=!zt(this.options.quality)&&this.options.quality.length>1;if(Te.toggleMenuButton.call(this,i,o),Ft(r),Te.checkMenu.call(this),o){var n=function(t){var i=be("qualityBadge.".concat(t),e.config);return i.length?Te.createBadge.call(e,i):null};this.options.quality.sort((function(t,i){var r=e.config.quality.options;return r.indexOf(t)>r.indexOf(i)?1:-1})).forEach((function(t){Te.createMenuItem.call(e,{value:t,list:r,type:i,title:Te.getLabel.call(e,"quality",t),badge:n(t)})})),Te.updateSetting.call(this,i,r)}}},setCaptionsMenu:function(){var t=this;if(bt(this.elements.settings.panels.captions)){var e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=Ce.getTracks.call(this),o=Boolean(r.length);if(Te.toggleMenuButton.call(this,e,o),Ft(i),Te.checkMenu.call(this),o){var n=r.map((function(e,r){return{value:r,checked:t.captions.toggled&&t.currentTrack===r,title:Ce.getLabel.call(t,e),badge:e.language&&Te.createBadge.call(t,e.language.toUpperCase()),list:i,type:"language"}}));n.unshift({value:-1,checked:!this.captions.toggled,title:be("disabled",this.config),list:i,type:"language"}),n.forEach(Te.createMenuItem.bind(this)),Te.updateSetting.call(this,e,i)}}},setSpeedMenu:function(){var t=this;if(bt(this.elements.settings.panels.speed)){var e="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(e){return e>=t.minimumSpeed&&e<=t.maximumSpeed}));var r=!zt(this.options.speed)&&this.options.speed.length>1;Te.toggleMenuButton.call(this,e,r),Ft(i),Te.checkMenu.call(this),r&&(this.options.speed.forEach((function(r){Te.createMenuItem.call(t,{value:r,list:i,type:e,title:Te.getLabel.call(t,"speed",r)})})),Te.updateSetting.call(this,e,i))}},checkMenu:function(){var t=this.elements.settings.buttons,e=!zt(t)&&Object.values(t).some((function(t){return!t.hidden}));Rt(this.elements.settings.menu,!e)},focusFirstMenuItem:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var i=t;bt(i)||(i=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var r=i.querySelector('[role^="menuitem"]');Vt.call(this,r,e)}},toggleMenu:function(t){var e=this.elements.settings.popup,i=this.elements.buttons.settings;if(bt(e)&&bt(i)){var r=e.hidden,o=r;if(yt(t))o=t;else if(wt(t)&&27===t.which)o=!1;else if(_t(t)){var n=ft(t.composedPath)?t.composedPath()[0]:t.target,a=e.contains(n);if(a||!a&&t.target!==i&&o)return}i.setAttribute("aria-expanded",o),Rt(e,!o),Bt(this.elements.container,this.config.classNames.menu.open,o),o&&wt(t)?Te.focusFirstMenuItem.call(this,null,!0):o||r||Vt.call(this,i,wt(t))}},getMenuSize:function(t){var e=t.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),t.parentNode.appendChild(e);var i=e.scrollWidth,r=e.scrollHeight;return Et(e),{width:i,height:r}},showMenuPanel:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(e));if(bt(r)){var o=r.parentNode,n=Array.from(o.children).find((function(t){return!t.hidden}));if(Qt.transitions&&!Qt.reducedMotion){o.style.width="".concat(n.scrollWidth,"px"),o.style.height="".concat(n.scrollHeight,"px");var a=Te.getMenuSize.call(this,r),s=function e(i){i.target===o&&["width","height"].includes(i.propertyName)&&(o.style.width="",o.style.height="",Gt.call(t,o,jt,e))};Jt.call(this,o,jt,s),o.style.width="".concat(a.width,"px"),o.style.height="".concat(a.height,"px")}Rt(n,!0),Rt(r,!1),Te.focusFirstMenuItem.call(this,r,i)}},setDownloadUrl:function(){var t=this.elements.buttons.download;bt(t)&&t.setAttribute("href",this.download)},create:function(t){var e=this,i=Te.bindMenuItemShortcuts,r=Te.createButton,o=Te.createProgress,n=Te.createRange,a=Te.createTime,s=Te.setQualityMenu,l=Te.setSpeedMenu,p=Te.showMenuPanel;this.elements.controls=null,gt(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));var u=At("div",Nt(this.config.selectors.controls.wrapper));this.elements.controls=u;var c={class:"plyr__controls__item"};return ie(gt(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&u.appendChild(r.call(e,"restart",c)),"rewind"===s&&u.appendChild(r.call(e,"rewind",c)),"play"===s&&u.appendChild(r.call(e,"play",c)),"fast-forward"===s&&u.appendChild(r.call(e,"fast-forward",c)),"progress"===s){var l=At("div",{class:"".concat(c.class," plyr__progress__container")}),d=At("div",Nt(e.config.selectors.progress));if(d.appendChild(n.call(e,"seek",{id:"plyr-seek-".concat(t.id)})),d.appendChild(o.call(e,"buffer")),e.config.tooltips.seek){var h=At("span",{class:e.config.classNames.tooltip},"00:00");d.appendChild(h),e.elements.display.seekTooltip=h}e.elements.progress=d,l.appendChild(e.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(a.call(e,"currentTime",c)),"duration"===s&&u.appendChild(a.call(e,"duration",c)),"mute"===s||"volume"===s){var v=e.elements.volume;bt(v)&&u.contains(v)||(v=At("div",Ct({},c,{class:"".concat(c.class," plyr__volume").trim()})),e.elements.volume=v,u.appendChild(v)),"mute"===s&&v.appendChild(r.call(e,"mute")),"volume"!==s||St.isIos||v.appendChild(n.call(e,"volume",Ct({max:1,step:.05,value:e.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===s&&u.appendChild(r.call(e,"captions",c)),"settings"===s&&!zt(e.config.settings)){var y=At("div",Ct({},c,{class:"".concat(c.class," plyr__menu").trim(),hidden:""}));y.appendChild(r.call(e,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var f=At("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),g=At("div"),m=At("div",{id:"plyr-settings-".concat(t.id,"-home")}),b=At("div",{role:"menu"});m.appendChild(b),g.appendChild(m),e.elements.settings.panels.home=m,e.config.settings.forEach((function(r){var o=At("button",Ct(Nt(e.config.selectors.buttons.settings),{type:"button",class:"".concat(e.config.classNames.control," ").concat(e.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(e,o,r),Jt.call(e,o,"click",(function(){p.call(e,r,!1)}));var n=At("span",null,be(r,e.config)),a=At("span",{class:e.config.classNames.menu.value});a.innerHTML=t[r],n.appendChild(a),o.appendChild(n),b.appendChild(o);var s=At("div",{id:"plyr-settings-".concat(t.id,"-").concat(r),hidden:""}),l=At("button",{type:"button",class:"".concat(e.config.classNames.control," ").concat(e.config.classNames.control,"--back")});l.appendChild(At("span",{"aria-hidden":!0},be(r,e.config))),l.appendChild(At("span",{class:e.config.classNames.hidden},be("menuBack",e.config))),Jt.call(e,s,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(e,"home",!0))}),!1),Jt.call(e,l,"click",(function(){p.call(e,"home",!1)})),s.appendChild(l),s.appendChild(At("div",{role:"menu"})),g.appendChild(s),e.elements.settings.buttons[r]=o,e.elements.settings.panels[r]=s})),f.appendChild(g),y.appendChild(f),u.appendChild(y),e.elements.settings.popup=f,e.elements.settings.menu=y}if("pip"===s&&Qt.pip&&u.appendChild(r.call(e,"pip",c)),"airplay"===s&&Qt.airplay&&u.appendChild(r.call(e,"airplay",c)),"download"===s){var _=Ct({},c,{element:"a",href:e.download,target:"_blank"});e.isHTML5&&(_.download=""),!xt(e.config.urls.download)&&e.isEmbed&&Ct(_,{icon:"logo-".concat(e.provider),label:e.provider}),u.appendChild(r.call(e,"download",_))}"fullscreen"===s&&u.appendChild(r.call(e,"fullscreen",c))})),this.isHTML5&&s.call(this,ce.getQualityOptions.call(this)),l.call(this),u},inject:function(){var t=this;if(this.config.loadSprite){var e=Te.getIconUrl.call(this);e.cors&&ke(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var r,n={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(ft(this.config.controls)&&(this.config.controls=this.config.controls.call(this,n)),this.config.controls||(this.config.controls=[]),bt(this.config.controls)||vt(this.config.controls)?i=this.config.controls:(i=Te.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ce.getLabel.call(this)}),a=!1),a&&vt(this.config.controls)&&(i=function(t){var e=t;return Object.entries(n).forEach((function(t){var i=o(t,2),r=i[1];e=ve(e,"{".concat(i[0],"}"),r)})),e}(i)),vt(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),bt(r)||(r=this.elements.container),r[bt(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),bt(this.elements.controls)||Te.findElements.call(this),!zt(this.elements.buttons)){var s=function(e){var i=t.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:function(){return Dt(e,i)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Bt(e,i,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){gt(t)||mt(t)?Array.from(t).filter(Boolean).forEach(s):s(t)}))}if(St.isEdge&&Tt(r),this.config.tooltips.controls){var l=this.config,p=l.classNames,u=l.selectors,c="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),d=Ht.call(this,c);Array.from(d).forEach((function(e){Bt(e,t.config.classNames.hidden,!1),Bt(e,t.config.classNames.tooltip,!0)}))}}};function Se(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t;if(e){var r=document.createElement("a");r.href=i,i=r.href}try{return new URL(i)}catch(t){return null}}function Pe(t){var e=new URLSearchParams;return dt(t)&&Object.entries(t).forEach((function(t){var i=o(t,2);e.set(i[0],i[1])})),e}var Ce={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Qt.textTracks)gt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Te.setCaptionsMenu.call(this);else{if(bt(this.elements.captions)||(this.elements.captions=At("div",Nt(this.config.selectors.captions)),function(t,e){bt(t)&&bt(e)&&e.parentNode.insertBefore(t,e.nextSibling)}(this.elements.captions,this.elements.wrapper)),St.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var e=t.getAttribute("src"),i=Se(e);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&we(e,"blob").then((function(e){t.setAttribute("src",window.URL.createObjectURL(e))})).catch((function(){Et(t)}))}))}var e=ie((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&(i=o(e,1)[0]);var r=this.storage.get("captions");yt(r)||(r=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:r,language:i,languages:e}),this.isHTML5&&Jt.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",Ce.update.bind(this)),setTimeout(Ce.update.bind(this),0)}},update:function(){var t=this,e=Ce.getTracks.call(this,!0),i=this.captions,r=i.active,o=i.language,n=i.meta,a=i.currentTrackNode,s=Boolean(e.find((function(t){return t.language===o})));this.isHTML5&&this.isVideo&&e.filter((function(t){return!n.get(t)})).forEach((function(e){t.debug.log("Track added",e),n.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),Jt.call(t,e,"cuechange",(function(){return Ce.updateCues.call(t)}))})),(s&&this.language!==o||!e.includes(a))&&(Ce.setLanguage.call(this,o),Ce.toggle.call(this,r&&s)),this.elements&&Bt(this.elements.container,this.config.classNames.captions.enabled,!zt(e)),gt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Te.setCaptionsMenu.call(this)},toggle:function(t){var e=this,i=!(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=ct(t)?!r:t;if(n!==r){if(i||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!i){var a=Ce.getTracks.call(this),s=Ce.findTrack.call(this,[this.captions.language].concat(u(this.captions.languages)),!0);return this.captions.language=s.language,void Ce.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),Bt(this.elements.container,o,n),this.captions.toggled=n,Te.updateSetting.call(this,"captions"),Xt.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout((function(){n&&e.captions.toggled&&e.captions.currentTrackNode&&(e.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=Ce.getTracks.call(this);if(-1!==t)if(ht(t))if(t in i){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var r=i[t],o=r||{},n=o.language;this.captions.currentTrackNode=r,Te.updateSetting.call(this,"captions"),e||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),Xt.call(this,this.media,"languagechange")}Ce.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Ce.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Ce.toggle.call(this,!1,e)},setLanguage:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(vt(t)){var i=t.toLowerCase();this.captions.language=i;var r=Ce.getTracks.call(this),o=Ce.findTrack.call(this,[i]);Ce.set.call(this,r.indexOf(o),e)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(i){return!t.isHTML5||e||t.captions.meta.has(i)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var e,i=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Ce.getTracks.call(this),n=function(t){return Number((i.captions.meta.get(t)||{}).default)},a=Array.from(o).sort((function(t,e){return n(e)-n(t)}));return t.every((function(t){return!(e=a.find((function(e){return e.language===t})))})),e||(r?a[0]:void 0)},getCurrentTrack:function(){return Ce.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var e=t;return!kt(e)&&Qt.textTracks&&this.captions.toggled&&(e=Ce.getCurrentTrack.call(this)),kt(e)?zt(e.label)?zt(e.language)?be("enabled",this.config):t.language.toUpperCase():e.label:be("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(bt(this.elements.captions))if(ct(t)||Array.isArray(t)){var e=t;if(!e){var i=Ce.getCurrentTrack.call(this);e=Array.from((i||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(ge)}var r=e.map((function(t){return t.trim()})).join("\n");if(r!==this.elements.captions.innerHTML){Ft(this.elements.captions);var o=At("span",Nt(this.config.selectors.caption));o.innerHTML=r,this.elements.captions.appendChild(o),Xt.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},Oe={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}},Ie={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ae=function(){},Me=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];p(this,t),this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}return s(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Ae}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ae}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Ae}}]),t}(),Ee=function(){function t(e){var i=this;p(this,t),E(this,"onChange",(function(){if(i.enabled){var t=i.player.elements.buttons.fullscreen;bt(t)&&(t.pressed=i.active),Xt.call(i.player,i.target===i.player.media?i.target:i.player.elements.container,i.active?"enterfullscreen":"exitfullscreen",!0)}})),E(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?i.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(i.scrollPosition.x,i.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Bt(i.target,i.player.config.classNames.fullscreen.fallback,t),St.isIos){var e=document.head.querySelector('meta[name="viewport"]'),r="viewport-fit=cover";e||(e=document.createElement("meta")).setAttribute("name","viewport");var o=vt(e.content)&&e.content.includes(r);t?(i.cleanupViewport=!o,o||(e.content+=",".concat(r))):i.cleanupViewport&&(e.content=e.content.split(",").filter((function(t){return t.trim()!==r})).join(","))}i.onChange()})),E(this,"trapFocus",(function(t){if(!St.isIos&&i.active&&"Tab"===t.key&&9===t.keyCode){var e=document.activeElement,r=Ht.call(i.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),n=o(r,1)[0],a=r[r.length-1];e!==a||t.shiftKey?e===n&&t.shiftKey&&(a.focus(),t.preventDefault()):(n.focus(),t.preventDefault())}})),E(this,"update",(function(){i.player.debug.log(i.enabled?"".concat(i.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),Bt(i.player.elements.container,i.player.config.classNames.fullscreen.enabled,i.enabled)})),E(this,"enter",(function(){i.enabled&&(St.isIos&&i.player.config.fullscreen.iosNative?i.player.isVimeo?i.player.embed.requestFullscreen():i.target.webkitEnterFullscreen():!t.native||i.forceFallback?i.toggleFallback(!0):i.prefix?zt(i.prefix)||i.target["".concat(i.prefix,"Request").concat(i.property)]():i.target.requestFullscreen({navigationUI:"hide"}))})),E(this,"exit",(function(){if(i.enabled)if(St.isIos&&i.player.config.fullscreen.iosNative)i.target.webkitExitFullscreen(),ee(i.player.play());else if(!t.native||i.forceFallback)i.toggleFallback(!1);else if(i.prefix){if(!zt(i.prefix)){var e="moz"===i.prefix?"Cancel":"Exit";document["".concat(i.prefix).concat(e).concat(i.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),E(this,"toggle",(function(){i.active?i.exit():i.enter()})),this.player=e,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(t,e){return(Element.prototype.closest||function(){var t=this;do{if(qt.matches(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,e)}(this.player.elements.container,e.config.fullscreen.container),Jt.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){i.onChange()})),Jt.call(this.player,this.player.elements.container,"dblclick",(function(t){bt(i.player.elements.controls)&&i.player.elements.controls.contains(t.target)||i.player.listeners.proxy(t,i.toggle,"fullscreen")})),Jt.call(this,this.player.elements.container,"keydown",(function(t){return i.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 Dt(this.target,this.player.config.classNames.fullscreen.fallback);var e=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}},{key:"target",get:function(){return St.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(ft(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(e){return!(!ft(document["".concat(e,"ExitFullscreen")])&&!ft(document["".concat(e,"CancelFullScreen")])||(t=e,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),t}();function Fe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(i,r){var o=new Image,n=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=e?i:r)(o)};Object.assign(o,{onload:n,onerror:n,src:t})}))}var Le={addStyleHook:function(){Bt(this.elements.container,this.config.selectors.container.replace(".",""),!0),Bt(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 Le.toggleNativeControls.call(this,!0);bt(this.elements.controls)||(Te.inject.call(this),this.listeners.controls()),Le.toggleNativeControls.call(this),this.isHTML5&&Ce.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Te.updateVolume.call(this),Te.timeUpdate.call(this),Te.durationUpdate.call(this),Le.checkPlaying.call(this),Bt(this.elements.container,this.config.classNames.pip.supported,Qt.pip&&this.isHTML5&&this.isVideo),Bt(this.elements.container,this.config.classNames.airplay.supported,Qt.airplay&&this.isHTML5),Bt(this.elements.container,this.config.classNames.isIos,St.isIos),Bt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){Xt.call(t,t.media,"ready")}),0),Le.setTitle.call(this),this.poster&&Le.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Te.durationUpdate.call(this)},setTitle:function(){var t=be("play",this.config);if(vt(this.config.title)&&!zt(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(e){e.setAttribute("aria-label",t)})),this.isEmbed){var e=$t.call(this,"iframe");if(!bt(e))return;var i=zt(this.config.title)?"video":this.config.title,r=be("frameTitle",this.config);e.setAttribute("title",r.replace("{title}",i))}},togglePoster:function(t){Bt(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),te.call(this).then((function(){return Fe(t)})).catch((function(i){throw t===e.poster&&Le.togglePoster.call(e,!1),i})).then((function(){if(t!==e.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(e.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),Le.togglePoster.call(e,!0),t})))},checkPlaying:function(t){var e=this;Bt(this.elements.container,this.config.classNames.playing,this.playing),Bt(this.elements.container,this.config.classNames.paused,this.paused),Bt(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:e.playing}),t.setAttribute("aria-label",be(e.playing?"pause":"play",e.config))})),_t(t)&&"timeupdate"===t.type||Le.toggleControls.call(this)},checkLoading:function(t){var e=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){Bt(e.elements.container,e.config.classNames.loading,e.loading),Le.toggleControls.call(e)}),this.loading?250:0)},toggleControls:function(t){var e=this.elements.controls;if(e&&this.config.hideControls){var i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||e.pressed||e.hover||i))}},migrateStyles:function(){var t=this;Object.values(n({},this.media.style)).filter((function(t){return!zt(t)&&vt(t)&&t.startsWith("--plyr")})).forEach((function(e){t.elements.container.style.setProperty(e,t.media.style.getPropertyValue(e)),t.media.style.removeProperty(e)})),zt(this.media.style)&&this.media.removeAttribute("style")}},Ne=function(){function t(e){var i=this;p(this,t),E(this,"firstTouch",(function(){var t=i.player,e=t.elements;t.touch=!0,Bt(e.container,t.config.classNames.isTouch,!0)})),E(this,"setTabFocus",(function(t){var e=i.player,r=e.elements;clearTimeout(i.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(i.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-i.lastKeyDown<=20)&&(function(){var t=e.config.classNames.tabFocus;Bt(Ht.call(e,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(i.focusTimer=setTimeout((function(){var t=document.activeElement;r.container.contains(t)&&Bt(document.activeElement,e.config.classNames.tabFocus,!0)}),10))))})),E(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=i.player;e.config.keyboard.global&&Yt.call(e,window,"keydown keyup",i.handleKey,t,!1),Yt.call(e,document.body,"click",i.toggleMenu,t),Kt.call(e,document.body,"touchstart",i.firstTouch),Yt.call(e,document.body,"keydown focus blur focusout",i.setTabFocus,t,!1,!0)})),E(this,"container",(function(){var t=i.player,e=t.config,r=t.elements,n=t.timers;!e.keyboard.global&&e.keyboard.focused&&Jt.call(t,r.container,"keydown keyup",i.handleKey,!1),Jt.call(t,r.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(e){var i=r.controls;i&&"enterfullscreen"===e.type&&(i.pressed=!1,i.hover=!1);var o=0;["touchstart","touchmove","mousemove"].includes(e.type)&&(Le.toggleControls.call(t,!0),o=t.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((function(){return Le.toggleControls.call(t,!1)}),o)}));var a=function(){if(t.isVimeo&&!t.config.vimeo.premium){var e=r.wrapper,i=t.fullscreen.active,n=le.call(t),a=o(n,2),s=a[0],l=a[1],p=oe("aspect-ratio: ".concat(s," / ").concat(l));if(i){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=o(u,2),d=c[1],h=c[0]/d>s/l;p?(e.style.width=h?"auto":"100%",e.style.height=h?"100%":"auto"):(e.style.maxWidth=h?d/l*s+"px":null,e.style.margin=h?"0 auto":null)}else p?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null)}},s=function(){clearTimeout(n.resized),n.resized=setTimeout(a,50)};Jt.call(t,r.container,"enterfullscreen exitfullscreen",(function(e){t.fullscreen.target===r.container&&(!t.isEmbed&&zt(t.config.ratio)||(a(),("enterfullscreen"===e.type?Jt:Gt).call(t,window,"resize",s)))}))})),E(this,"media",(function(){var t=i.player,e=t.elements;if(Jt.call(t,t.media,"timeupdate seeking seeked",(function(e){return Te.timeUpdate.call(t,e)})),Jt.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(e){return Te.durationUpdate.call(t,e)})),Jt.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),Jt.call(t,t.media,"progress playing seeking seeked",(function(e){return Te.updateProgress.call(t,e)})),Jt.call(t,t.media,"volumechange",(function(e){return Te.updateVolume.call(t,e)})),Jt.call(t,t.media,"playing play pause ended emptied timeupdate",(function(e){return Le.checkPlaying.call(t,e)})),Jt.call(t,t.media,"waiting canplay seeked playing",(function(e){return Le.checkLoading.call(t,e)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var r=$t.call(t,".".concat(t.config.classNames.video));if(!bt(r))return;Jt.call(t,e.container,"click",(function(o){([e.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(i.proxy(o,t.restart,"restart"),i.proxy(o,(function(){ee(t.play())}),"play")):i.proxy(o,(function(){ee(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&Jt.call(t,e.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),Jt.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),Jt.call(t,t.media,"ratechange",(function(){Te.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),Jt.call(t,t.media,"qualitychange",(function(e){Te.updateSetting.call(t,"quality",null,e.detail.quality)})),Jt.call(t,t.media,"ready qualitychange",(function(){Te.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");Jt.call(t,t.media,o,(function(i){var r=i.detail,o=void 0===r?{}:r;"error"===i.type&&(o=t.media.error),Xt.call(t,e.container,i.type,!0,o)}))})),E(this,"proxy",(function(t,e,r){var o=i.player,n=o.config.listeners[r],a=!0;ft(n)&&(a=n.call(o,t)),!1!==a&&ft(e)&&e.call(o,t)})),E(this,"bind",(function(t,e,r,o){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=i.player,s=a.config.listeners[o],l=ft(s);Jt.call(a,t,e,(function(t){return i.proxy(t,r,o)}),n&&!l)})),E(this,"controls",(function(){var t=i.player,e=t.elements,r=St.isIE?"change":"input";if(e.buttons.play&&Array.from(e.buttons.play).forEach((function(e){i.bind(e,"click",(function(){ee(t.togglePlay())}),"play")})),i.bind(e.buttons.restart,"click",t.restart,"restart"),i.bind(e.buttons.rewind,"click",(function(){t.lastSeekTime=Date.now(),t.rewind()}),"rewind"),i.bind(e.buttons.fastForward,"click",(function(){t.lastSeekTime=Date.now(),t.forward()}),"fastForward"),i.bind(e.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),i.bind(e.buttons.captions,"click",(function(){return t.toggleCaptions()})),i.bind(e.buttons.download,"click",(function(){Xt.call(t,t.media,"download")}),"download"),i.bind(e.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),i.bind(e.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),i.bind(e.buttons.airplay,"click",t.airplay,"airplay"),i.bind(e.buttons.settings,"click",(function(e){e.stopPropagation(),e.preventDefault(),Te.toggleMenu.call(t,e)}),null,!1),i.bind(e.buttons.settings,"keyup",(function(e){var i=e.which;[13,32].includes(i)&&(13!==i?(e.preventDefault(),e.stopPropagation(),Te.toggleMenu.call(t,e)):Te.focusFirstMenuItem.call(t,null,!0))}),null,!1),i.bind(e.settings.menu,"keydown",(function(e){27===e.which&&Te.toggleMenu.call(t,e)})),i.bind(e.inputs.seek,"mousedown mousemove",(function(t){var i=e.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/i.width*(t.pageX-i.left))})),i.bind(e.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(e){var i=e.currentTarget,r=e.keyCode?e.keyCode:e.which,o="play-on-seeked";if(!wt(e)||39===r||37===r){t.lastSeekTime=Date.now();var n=i.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(e.type);n&&a?(i.removeAttribute(o),ee(t.play())):!a&&t.playing&&(i.setAttribute(o,""),t.pause())}})),St.isIos){var n=Ht.call(t,'input[type="range"]');Array.from(n).forEach((function(t){return i.bind(t,r,(function(t){return Tt(t.target)}))}))}i.bind(e.inputs.seek,r,(function(e){var i=e.currentTarget,r=i.getAttribute("seek-value");zt(r)&&(r=i.value),i.removeAttribute("seek-value"),t.currentTime=r/i.max*t.duration}),"seek"),i.bind(e.progress,"mouseenter mouseleave mousemove",(function(e){return Te.updateSeekTooltip.call(t,e)})),i.bind(e.progress,"mousemove touchmove",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.startMove(e)})),i.bind(e.progress,"mouseleave touchend click",(function(){var e=t.previewThumbnails;e&&e.loaded&&e.endMove(!1,!0)})),i.bind(e.progress,"mousedown touchstart",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.startScrubbing(e)})),i.bind(e.progress,"mouseup touchend",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.endScrubbing(e)})),St.isWebkit&&Array.from(Ht.call(t,'input[type="range"]')).forEach((function(e){i.bind(e,"input",(function(e){return Te.updateRangeFill.call(t,e.target)}))})),t.config.toggleInvert&&!bt(e.display.duration)&&i.bind(e.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Te.timeUpdate.call(t))})),i.bind(e.inputs.volume,r,(function(e){t.volume=e.target.value}),"volume"),i.bind(e.controls,"mouseenter mouseleave",(function(i){e.controls.hover=!t.touch&&"mouseenter"===i.type})),e.fullscreen&&Array.from(e.fullscreen.children).filter((function(t){return!t.contains(e.container)})).forEach((function(r){i.bind(r,"mouseenter mouseleave",(function(i){e.controls&&(e.controls.hover=!t.touch&&"mouseenter"===i.type)}))})),i.bind(e.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){e.controls.pressed=["mousedown","touchstart"].includes(t.type)})),i.bind(e.controls,"focusin",(function(){var r=t.config,o=t.timers;Bt(e.controls,r.classNames.noTransition,!0),Le.toggleControls.call(t,!0),setTimeout((function(){Bt(e.controls,r.classNames.noTransition,!1)}),0);var n=i.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return Le.toggleControls.call(t,!1)}),n)})),i.bind(e.inputs.volume,"wheel",(function(e){var i=e.webkitDirectionInvertedFromDevice,r=[e.deltaX,-e.deltaY].map((function(t){return i?-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)&&e.preventDefault()}),"volume",!1)})),this.player=e,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 e=this.player,i=e.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)&&ht(r))if(o){var a=document.activeElement;if(bt(a)){if(a!==i.inputs.seek&&qt(a,e.config.selectors.editable))return;if(32===t.which&&qt(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||(e.currentTime=e.duration/10*(r-48));break;case 32:case 75:n||ee(e.togglePlay());break;case 38:e.increaseVolume(.1);break;case 40:e.decreaseVolume(.1);break;case 77:n||(e.muted=!e.muted);break;case 39:e.forward();break;case 37:e.rewind();break;case 70:e.fullscreen.toggle();break;case 67:n||e.toggleCaptions();break;case 76:e.loop=!e.loop}27===r&&!e.fullscreen.usingNative&&e.fullscreen.active&&e.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Te.toggleMenu.call(this.player,t)}}]),t}(),Re=function(t,e){return function(t){t.exports=function(){var t=function(){},e={},i={},r={};function o(t,e){if(t){var o=r[t];if(i[t]=e,o)for(;o.length;)o[0](t,e),o.splice(0,1)}}function n(e,i){e.call&&(e={success:e}),i.length?(e.error||t)(i):(e.success||t)(e)}function a(e,i,r,o){var n,s,l=document,p=r.async,u=(r.numRetries||0)+1,c=r.before||t,d=e.replace(/[\?|#].*$/,""),h=e.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(d)?((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(d)?(s=l.createElement("img")).src=h:((s=l.createElement("script")).src=e,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(e,i,r,o)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";i(e,l,t.defaultPrevented)},!1!==c(e,s)&&l.head.appendChild(s)}function s(t,e,i){var r,o,n=(t=t.push?t:[t]).length,s=n,l=[];for(r=function(t,i,r){if("e"==i&&l.push(t),"b"==i){if(!r)return;l.push(t)}--n||e(l)},o=0;o<s;o++)a(t[o],r,i)}function l(t,i,r){var a,l;if(i&&i.trim&&(a=i),l=(a?r:i)||{},a){if(a in e)throw"LoadJS";e[a]=!0}function p(e,i){s(t,(function(t){n(l,t),e&&n({success:e,error:i},t),o(a,t)}),l)}if(l.returnPromise)return new Promise(p);p()}return l.ready=function(t,e){return function(t,e){var o,n,a,s=[],l=(t=t.push?t:[t]).length,p=l;for(o=function(t,i){i.length&&s.push(t),--p||e(s)};l--;)(a=i[n=t[l]])?o(n,a):(r[n]=r[n]||[]).push(o)}(t,(function(t){n(e,t)})),l},l.done=function(t){o(t,[])},l.reset=function(){e={},i={},r={}},l.isDefined=function(t){return t in e},l}()}(e={exports:{}}),e.exports}();function Be(t){return new Promise((function(e,i){Re(t,{success:e,error:i})}))}function De(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Xt.call(this,this.media,t?"play":"pause"))}var qe={setup:function(){var t=this;Bt(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,pe.call(t),dt(window.Vimeo)?qe.ready.call(t):Be(t.config.urls.vimeo.sdk).then((function(){qe.ready.call(t)})).catch((function(e){t.debug.warn("Vimeo SDK (player.js) failed to load",e)}))},ready:function(){var t=this,e=this,i=e.config.vimeo,r=i.premium,a=i.referrerPolicy,s=c(i,M),l=e.media.getAttribute("src"),p="";zt(l)?(l=e.media.getAttribute(e.config.attributes.embed.id),p=e.media.getAttribute(e.config.attributes.embed.hash)):p=function(t){var e=t.match(d(/^.*(?:vimeo.com\/|video\/)(?:[0-9]+)(?:\?.*&*h=|\/)+([,0-9a-f]+)/,{hash:1}));return e?e.groups.hash:null}(l);var u=p?{h:p}:{};r&&Object.assign(s,{controls:!1,sidedock:!1});var h=Pe(n(n({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},u),s)),v=function(t){return zt(t)?null:ht(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(l),y=At("iframe"),f=he(e.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("; ")),zt(a)||y.setAttribute("referrerPolicy",a),r||!i.customControls)y.setAttribute("data-poster",e.poster),e.media=Lt(y,e.media);else{var g=At("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});g.appendChild(y),e.media=Lt(g,e.media)}i.customControls||we(he(e.config.urls.vimeo.api,f)).then((function(t){!zt(t)&&t.thumbnail_url&&Le.setPoster.call(e,t.thumbnail_url).catch((function(){}))})),e.embed=new window.Vimeo.Player(y,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=function(){return De.call(e,!0),e.embed.play()},e.media.pause=function(){return De.call(e,!1),e.embed.pause()},e.media.stop=function(){e.pause(),e.currentTime=0};var m=e.media.currentTime;Object.defineProperty(e.media,"currentTime",{get:function(){return m},set:function(t){var i=e.embed,r=e.media,o=e.volume,n=e.paused&&!i.hasPlayed;r.seeking=!0,Xt.call(e,r,"seeking"),Promise.resolve(n&&i.setVolume(0)).then((function(){return i.setCurrentTime(t)})).then((function(){return n&&i.pause()})).then((function(){return n&&i.setVolume(o)})).catch((function(){}))}});var b=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:function(){return b},set:function(t){e.embed.setPlaybackRate(t).then((function(){b=t,Xt.call(e,e.media,"ratechange")})).catch((function(){e.options.speed=[1]}))}});var _=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return _},set:function(t){e.embed.setVolume(t).then((function(){_=t,Xt.call(e,e.media,"volumechange")}))}});var w=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return w},set:function(t){var i=!!yt(t)&&t;e.embed.setVolume(i?0:e.config.volume).then((function(){w=i,Xt.call(e,e.media,"volumechange")}))}});var k,x=e.config.loop;Object.defineProperty(e.media,"loop",{get:function(){return x},set:function(t){var i=yt(t)?t:e.config.loop.active;e.embed.setLoop(i).then((function(){x=i}))}}),e.embed.getVideoUrl().then((function(t){k=t,Te.setDownloadUrl.call(e)})).catch((function(e){t.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:function(){return k}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((function(i){var r=o(i,2);e.embed.ratio=ue(r[0],r[1]),pe.call(t)})),e.embed.setAutopause(e.config.autopause).then((function(t){e.config.autopause=t})),e.embed.getVideoTitle().then((function(i){e.config.title=i,Le.setTitle.call(t)})),e.embed.getCurrentTime().then((function(t){m=t,Xt.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((function(t){e.media.duration=t,Xt.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((function(t){e.media.textTracks=t,Ce.setup.call(e)})),e.embed.on("cuechange",(function(t){var i=t.cues,r=(void 0===i?[]:i).map((function(t){return function(t){var e=document.createDocumentFragment(),i=document.createElement("div");return e.appendChild(i),i.innerHTML=t,e.firstChild.innerText}(t.text)}));Ce.updateCues.call(e,r)})),e.embed.on("loaded",(function(){e.embed.getPaused().then((function(t){De.call(e,!t),t||Xt.call(e,e.media,"playing")})),bt(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(function(){Xt.call(e,e.media,"waiting")})),e.embed.on("bufferend",(function(){Xt.call(e,e.media,"playing")})),e.embed.on("play",(function(){De.call(e,!0),Xt.call(e,e.media,"playing")})),e.embed.on("pause",(function(){De.call(e,!1)})),e.embed.on("timeupdate",(function(t){e.media.seeking=!1,m=t.seconds,Xt.call(e,e.media,"timeupdate")})),e.embed.on("progress",(function(t){e.media.buffered=t.percent,Xt.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&Xt.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((function(t){t!==e.media.duration&&(e.media.duration=t,Xt.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(function(){e.media.seeking=!1,Xt.call(e,e.media,"seeked")})),e.embed.on("ended",(function(){e.media.paused=!0,Xt.call(e,e.media,"ended")})),e.embed.on("error",(function(t){e.media.error=t,Xt.call(e,e.media,"error")})),i.customControls&&setTimeout((function(){return Le.build.call(e)}),0)}};function He(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Xt.call(this,this.media,t?"play":"pause"))}function $e(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Ve,Ue,Qe,We,Ye,Je,Ge={setup:function(){var t=this;if(Bt(this.elements.wrapper,this.config.classNames.embed,!0),dt(window.YT)&&ft(window.YT.Player))Ge.ready.call(this);else{var e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){ft(e)&&e(),Ge.ready.call(t)},Be(this.config.urls.youtube.sdk).catch((function(e){t.debug.warn("YouTube API failed to load",e)}))}},getTitle:function(t){var e=this;we(he(this.config.urls.youtube.api,t)).then((function(t){if(dt(t)){var i=t.height,r=t.width;e.config.title=t.title,Le.setTitle.call(e),e.embed.ratio=ue(r,i)}pe.call(e)})).catch((function(){pe.call(e)}))},ready:function(){var t=this,e=t.config.youtube,i=t.media&&t.media.getAttribute("id");if(zt(i)||!i.startsWith("youtube-")){var r=t.media.getAttribute("src");zt(r)&&(r=t.media.getAttribute(this.config.attributes.embed.id));var o=function(t){return zt(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(r),n=At("div",{id:de(t.provider),"data-poster":e.customControls?t.poster:void 0});if(t.media=Lt(n,t.media),e.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};Fe(a("maxres"),121).catch((function(){return Fe(a("sd"),121)})).catch((function(){return Fe(a("hq"))})).then((function(e){return Le.setPoster.call(t,e.src)})).then((function(e){e.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:$e(e),playerVars:Ct({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&e.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},e),events:{onError:function(e){if(!t.media.error){var i=e.data;t.media.error={code:i,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."}[i]||"An unknown error occured"},Xt.call(t,t.media,"error")}},onPlaybackRateChange:function(e){t.media.playbackRate=e.target.getPlaybackRate(),Xt.call(t,t.media,"ratechange")},onReady:function(i){if(!ft(t.media.play)){var r=i.target;Ge.getTitle.call(t,o),t.media.play=function(){He.call(t,!0),r.playVideo()},t.media.pause=function(){He.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(e){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,Xt.call(t,t.media,"seeking"),r.seekTo(e)}}),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(e){r.setVolume(100*(n=e)),Xt.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(e){var i=yt(e)?e:a;a=i,r[i?"mute":"unMute"](),r.setVolume(100*n),Xt.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(e){return t.config.speed.options.includes(e)})),t.supported.ui&&e.customControls&&t.media.setAttribute("tabindex",-1),Xt.call(t,t.media,"timeupdate"),Xt.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)&&Xt.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),Xt.call(t,t.media,"canplaythrough"))}),200),e.customControls&&setTimeout((function(){return Le.build.call(t)}),50)}},onStateChange:function(i){var r=i.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(i.data)&&(t.media.seeking=!1,Xt.call(t,t.media,"seeked")),i.data){case-1:Xt.call(t,t.media,"timeupdate"),t.media.buffered=r.getVideoLoadedFraction(),Xt.call(t,t.media,"progress");break;case 0:He.call(t,!1),t.media.loop?(r.stopVideo(),r.playVideo()):Xt.call(t,t.media,"ended");break;case 1:e.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(He.call(t,!0),Xt.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){Xt.call(t,t.media,"timeupdate")}),50),t.media.duration!==r.getDuration()&&(t.media.duration=r.getDuration(),Xt.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),He.call(t,!1);break;case 3:Xt.call(t,t.media,"waiting")}Xt.call(t,t.elements.container,"statechange",!1,{code:i.data})}}})}}},Ke={setup:function(){this.media?(Bt(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Bt(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Bt(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=At("div",{class:this.config.classNames.video}),Ot(this.media,this.elements.wrapper),this.elements.poster=At("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ce.setup.call(this):this.isYouTube?Ge.setup.call(this):this.isVimeo&&qe.setup.call(this)):this.debug.warn("No media element found!")}},Xe=function(){function t(e){var i=this;p(this,t),E(this,"load",(function(){i.enabled&&(dt(window.google)&&dt(window.google.ima)?i.ready():Be(i.player.config.urls.googleIMA.sdk).then((function(){i.ready()})).catch((function(){i.trigger("error",new Error("Google IMA SDK failed to load"))})))})),E(this,"ready",(function(){var t;i.enabled||((t=i).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),i.startSafetyTimer(12e3,"ready()"),i.managerPromise.then((function(){i.clearSafetyTimer("onAdsManagerLoaded()")})),i.listeners(),i.setupIMA()})),E(this,"setupIMA",(function(){i.elements.container=At("div",{class:i.player.config.classNames.ads}),i.player.elements.container.appendChild(i.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(i.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(i.player.config.playsinline),i.elements.displayContainer=new google.ima.AdDisplayContainer(i.elements.container,i.player.media),i.loader=new google.ima.AdsLoader(i.elements.displayContainer),i.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return i.onAdsManagerLoaded(t)}),!1),i.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return i.onAdError(t)}),!1),i.requestAds()})),E(this,"requestAds",(function(){var t=i.player.elements.container;try{var e=new google.ima.AdsRequest;e.adTagUrl=i.tagUrl,e.linearAdSlotWidth=t.offsetWidth,e.linearAdSlotHeight=t.offsetHeight,e.nonLinearAdSlotWidth=t.offsetWidth,e.nonLinearAdSlotHeight=t.offsetHeight,e.forceNonLinearFullSlot=!1,e.setAdWillPlayMuted(!i.player.muted),i.loader.requestAds(e)}catch(t){i.onAdError(t)}})),E(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(i.countdownTimer),void i.elements.container.removeAttribute("data-badge-text");i.countdownTimer=setInterval((function(){var t=je(Math.max(i.manager.getRemainingTime(),0)),e="".concat(be("advertisement",i.player.config)," - ").concat(t);i.elements.container.setAttribute("data-badge-text",e)}),100)})),E(this,"onAdsManagerLoaded",(function(t){if(i.enabled){var e=new google.ima.AdsRenderingSettings;e.restoreCustomPlaybackStateOnAdBreakComplete=!0,e.enablePreloading=!0,i.manager=t.getAdsManager(i.player,e),i.cuePoints=i.manager.getCuePoints(),i.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return i.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){i.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return i.onAdEvent(t)}))})),i.trigger("loaded")}})),E(this,"addCuePoints",(function(){zt(i.cuePoints)||i.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<i.player.duration){var e=i.player.elements.progress;if(bt(e)){var r=100/i.player.duration*t,o=At("span",{class:i.player.config.classNames.cues});o.style.left="".concat(r.toString(),"%"),e.appendChild(o)}}}))})),E(this,"onAdEvent",(function(t){var e=i.player.elements.container,r=t.getAd(),o=t.getAdData();switch(function(t){Xt.call(i.player,i.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:i.trigger("loaded"),i.pollCountdown(!0),r.isLinear()||(r.width=e.offsetWidth,r.height=e.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:i.manager.setVolume(i.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:i.player.ended?i.loadAds():i.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:i.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:i.pollCountdown(),i.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&i.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}})),E(this,"onAdError",(function(t){i.cancel(),i.player.debug.warn("Ads error",t)})),E(this,"listeners",(function(){var t,e=i.player.elements.container;i.player.on("canplay",(function(){i.addCuePoints()})),i.player.on("ended",(function(){i.loader.contentComplete()})),i.player.on("timeupdate",(function(){t=i.player.currentTime})),i.player.on("seeked",(function(){var e=i.player.currentTime;zt(i.cuePoints)||i.cuePoints.forEach((function(r,o){t<r&&r<e&&(i.manager.discardAdBreak(),i.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){i.manager&&i.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),E(this,"play",(function(){var t=i.player.elements.container;i.managerPromise||i.resumeContent(),i.managerPromise.then((function(){i.manager.setVolume(i.player.volume),i.elements.displayContainer.initialize();try{i.initialized||(i.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),i.manager.start()),i.initialized=!0}catch(t){i.onAdError(t)}})).catch((function(){}))})),E(this,"resumeContent",(function(){i.elements.container.style.zIndex="",i.playing=!1,ee(i.player.media.play())})),E(this,"pauseContent",(function(){i.elements.container.style.zIndex=3,i.playing=!0,i.player.media.pause()})),E(this,"cancel",(function(){i.initialized&&i.resumeContent(),i.trigger("error"),i.loadAds()})),E(this,"loadAds",(function(){i.managerPromise.then((function(){i.manager&&i.manager.destroy(),i.managerPromise=new Promise((function(t){i.on("loaded",t),i.player.debug.log(i.manager)})),i.initialized=!1,i.requestAds()})).catch((function(){}))})),E(this,"trigger",(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];var n=i.events[t];gt(n)&&n.forEach((function(t){ft(t)&&t.apply(i,r)}))})),E(this,"on",(function(t,e){return gt(i.events[t])||(i.events[t]=[]),i.events[t].push(e),i})),E(this,"startSafetyTimer",(function(t,e){i.player.debug.log("Safety timer invoked from: ".concat(e)),i.safetyTimer=setTimeout((function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")}),t)})),E(this,"clearSafetyTimer",(function(t){ct(i.safetyTimer)||(i.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(i.safetyTimer),i.safetyTimer=null)})),this.player=e,this.config=e.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,e){i.on("loaded",t),i.on("error",e)})),this.load()}return s(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!zt(t.publisherId)||xt(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return xt(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Pe({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}(),Ze=function(t){var e=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var i={};t.split(/\r\n|\n|\r/).forEach((function(t){if(ht(i.startTime)){if(!zt(t.trim())&&zt(i.text)){var e,r,n,a=t.trim().split("#xywh=");e=o(a,1),i.text=e[0],a[1]&&(r=a[1].split(","),n=o(r,4),i.x=n[0],i.y=n[1],i.w=n[2],i.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&&(i.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),i.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),i.text&&e.push(i)})),e},ti=function(t,e){var i={};return t>e.width/e.height?(i.width=e.width,i.height=1/t*e.width):(i.height=e.height,i.width=t*e.height),i},ei=function(){function t(e){var i=this;p(this,t),E(this,"load",(function(){i.player.elements.display.seekTooltip&&(i.player.elements.display.seekTooltip.hidden=i.enabled),i.enabled&&i.getThumbnails().then((function(){i.enabled&&(i.render(),i.determineContainerAutoSizing(),i.loaded=!0)}))})),E(this,"getThumbnails",(function(){return new Promise((function(t){var e=i.player.config.previewThumbnails.src;if(zt(e))throw new Error("Missing previewThumbnails.src config attribute");var r=function(){i.thumbnails.sort((function(t,e){return t.height-e.height})),i.player.debug.log("Preview thumbnails",i.thumbnails),t()};if(ft(e))e((function(t){i.thumbnails=t,r()}));else{var o=(vt(e)?[e]:e).map((function(t){return i.getThumbnail(t)}));Promise.all(o).then(r)}}))})),E(this,"getThumbnail",(function(t){return new Promise((function(e){we(t).then((function(r){var o={frames:Ze(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,i.thumbnails.push(o),e()},n.src=o.urlPrefix+o.frames[0].text}))}))})),E(this,"startMove",(function(t){if(i.loaded&&_t(t)&&["touchmove","mousemove"].includes(t.type)&&i.player.media.duration){if("touchmove"===t.type)i.seekTime=i.player.media.duration*(i.player.elements.inputs.seek.value/100);else{var e=i.player.elements.progress.getBoundingClientRect();i.seekTime=i.player.media.duration*(100/e.width*(t.pageX-e.left)/100),i.seekTime<0&&(i.seekTime=0),i.seekTime>i.player.media.duration-1&&(i.seekTime=i.player.media.duration-1),i.mousePosX=t.pageX,i.elements.thumb.time.innerText=je(i.seekTime)}i.showImageAtCurrentTime()}})),E(this,"endMove",(function(){i.toggleThumbContainer(!1,!0)})),E(this,"startScrubbing",(function(t){(ct(t.button)||!1===t.button||0===t.button)&&(i.mouseDown=!0,i.player.media.duration&&(i.toggleScrubbingContainer(!0),i.toggleThumbContainer(!1,!0),i.showImageAtCurrentTime()))})),E(this,"endScrubbing",(function(){i.mouseDown=!1,Math.ceil(i.lastTime)===Math.ceil(i.player.media.currentTime)?i.toggleScrubbingContainer(!1):Kt.call(i.player,i.player.media,"timeupdate",(function(){i.mouseDown||i.toggleScrubbingContainer(!1)}))})),E(this,"listeners",(function(){i.player.on("play",(function(){i.toggleThumbContainer(!1,!0)})),i.player.on("seeked",(function(){i.toggleThumbContainer(!1)})),i.player.on("timeupdate",(function(){i.lastTime=i.player.media.currentTime}))})),E(this,"render",(function(){i.elements.thumb.container=At("div",{class:i.player.config.classNames.previewThumbnails.thumbContainer}),i.elements.thumb.imageContainer=At("div",{class:i.player.config.classNames.previewThumbnails.imageContainer}),i.elements.thumb.container.appendChild(i.elements.thumb.imageContainer);var t=At("div",{class:i.player.config.classNames.previewThumbnails.timeContainer});i.elements.thumb.time=At("span",{},"00:00"),t.appendChild(i.elements.thumb.time),i.elements.thumb.container.appendChild(t),bt(i.player.elements.progress)&&i.player.elements.progress.appendChild(i.elements.thumb.container),i.elements.scrubbing.container=At("div",{class:i.player.config.classNames.previewThumbnails.scrubbingContainer}),i.player.elements.wrapper.appendChild(i.elements.scrubbing.container)})),E(this,"destroy",(function(){i.elements.thumb.container&&i.elements.thumb.container.remove(),i.elements.scrubbing.container&&i.elements.scrubbing.container.remove()})),E(this,"showImageAtCurrentTime",(function(){i.mouseDown?i.setScrubbingContainerSize():i.setThumbContainerSizeAndPos();var t=i.thumbnails[0].frames.findIndex((function(t){return i.seekTime>=t.startTime&&i.seekTime<=t.endTime})),e=t>=0,r=0;i.mouseDown||i.toggleThumbContainer(e),e&&(i.thumbnails.forEach((function(e,o){i.loadedImages.includes(e.frames[t].text)&&(r=o)})),t!==i.showingThumb&&(i.showingThumb=t,i.loadImage(r)))})),E(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=i.showingThumb,r=i.thumbnails[t],o=r.urlPrefix,n=r.frames[e],a=r.frames[e].text,s=o+a;if(i.currentImageElement&&i.currentImageElement.dataset.filename===a)i.showImage(i.currentImageElement,n,t,e,a,!1),i.currentImageElement.dataset.index=e,i.removeOldImages(i.currentImageElement);else{i.loadingImage&&i.usingSprites&&(i.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=e,l.dataset.filename=a,i.showingThumbFilename=a,i.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return i.showImage(l,n,t,e,a,!0)},i.loadingImage=l,i.removeOldImages(l)}})),E(this,"showImage",(function(t,e,r,o,n){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];i.player.debug.log("Showing thumb: ".concat(n,". num: ").concat(o,". qual: ").concat(r,". newimg: ").concat(a)),i.setImageSizeAndOffset(t,e),a&&(i.currentImageContainer.appendChild(t),i.currentImageElement=t,i.loadedImages.includes(n)||i.loadedImages.push(n)),i.preloadNearby(o,!0).then(i.preloadNearby(o,!1)).then(i.getHigherQuality(r,t,e,n))})),E(this,"removeOldImages",(function(t){Array.from(i.currentImageContainer.children).forEach((function(e){if("img"===e.tagName.toLowerCase()){var r=i.usingSprites?500:1e3;if(e.dataset.index!==t.dataset.index&&!e.dataset.deleting){e.dataset.deleting=!0;var o=i.currentImageContainer;setTimeout((function(){o.removeChild(e),i.player.debug.log("Removing thumb: ".concat(e.dataset.filename))}),r)}}}))})),E(this,"preloadNearby",(function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(r){setTimeout((function(){var o=i.thumbnails[0].frames[t].text;if(i.showingThumbFilename===o){var n;n=e?i.thumbnails[0].frames.slice(t):i.thumbnails[0].frames.slice(0,t).reverse();var a=!1;n.forEach((function(t){var e=t.text;if(e!==o&&!i.loadedImages.includes(e)){a=!0,i.player.debug.log("Preloading thumb filename: ".concat(e));var n=i.thumbnails[0].urlPrefix+e,s=new Image;s.src=n,s.onload=function(){i.player.debug.log("Preloaded thumb filename: ".concat(e)),i.loadedImages.includes(e)||i.loadedImages.push(e),r()}}})),a||r()}}),300)}))})),E(this,"getHigherQuality",(function(t,e,r,o){if(t<i.thumbnails.length-1){var n=e.naturalHeight;i.usingSprites&&(n=r.h),n<i.thumbContainerHeight&&setTimeout((function(){i.showingThumbFilename===o&&(i.player.debug.log("Showing higher quality thumb for: ".concat(o)),i.loadImage(t+1))}),300)}})),E(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i.player.config.classNames.previewThumbnails.thumbContainerShown;i.elements.thumb.container.classList.toggle(r,t),!t&&e&&(i.showingThumb=null,i.showingThumbFilename=null)})),E(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=i.player.config.classNames.previewThumbnails.scrubbingContainerShown;i.elements.scrubbing.container.classList.toggle(e,t),t||(i.showingThumb=null,i.showingThumbFilename=null)})),E(this,"determineContainerAutoSizing",(function(){(i.elements.thumb.imageContainer.clientHeight>20||i.elements.thumb.imageContainer.clientWidth>20)&&(i.sizeSpecifiedInCSS=!0)})),E(this,"setThumbContainerSizeAndPos",(function(){if(i.sizeSpecifiedInCSS){if(i.elements.thumb.imageContainer.clientHeight>20&&i.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(i.elements.thumb.imageContainer.clientHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(i.elements.thumb.imageContainer.clientHeight<20&&i.elements.thumb.imageContainer.clientWidth>20){var e=Math.floor(i.elements.thumb.imageContainer.clientWidth/i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(e,"px")}}else{var r=Math.floor(i.thumbContainerHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(i.thumbContainerHeight,"px"),i.elements.thumb.imageContainer.style.width="".concat(r,"px")}i.setThumbContainerPos()})),E(this,"setThumbContainerPos",(function(){var t=i.player.elements.progress.getBoundingClientRect(),e=i.player.elements.container.getBoundingClientRect(),r=i.elements.thumb.container,o=e.left-t.left+10,n=e.right-t.left-r.clientWidth-10,a=i.mousePosX-t.left-r.clientWidth/2;a<o&&(a=o),a>n&&(a=n),r.style.left="".concat(a,"px")})),E(this,"setScrubbingContainerSize",(function(){var t=ti(i.thumbAspectRatio,{width:i.player.media.clientWidth,height:i.player.media.clientHeight}),e=t.height;i.elements.scrubbing.container.style.width="".concat(t.width,"px"),i.elements.scrubbing.container.style.height="".concat(e,"px")})),E(this,"setImageSizeAndOffset",(function(t,e){if(i.usingSprites){var r=i.thumbContainerHeight/e.h;t.style.height=t.naturalHeight*r+"px",t.style.width=t.naturalWidth*r+"px",t.style.left="-".concat(e.x*r,"px"),t.style.top="-".concat(e.y*r,"px")}})),this.player=e,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?ti(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}(),ii={insertElements:function(t,e){var i=this;vt(e)?Mt(t,this.media,{src:e}):gt(e)&&e.forEach((function(e){Mt(t,i.media,e)}))},change:function(t){var e=this;Pt(t,"sources.length")?(ce.cancelRequests.call(this),this.destroy.call(this,(function(){e.options.quality=[],Et(e.media),e.media=null,bt(e.elements.container)&&e.elements.container.removeAttribute("class");var i=t.sources,r=t.type,n=o(i,1)[0],a=n.provider,s=void 0===a?Ie.html5:a,l="html5"===s?r:"div",p="html5"===s?{}:{src:n.src};Object.assign(e,{provider:s,type:r,supported:Qt.check(r,s,e.config.playsinline),media:At(l,p)}),e.elements.container.appendChild(e.media),yt(t.autoplay)&&(e.config.autoplay=t.autoplay),e.isHTML5&&(e.config.crossorigin&&e.media.setAttribute("crossorigin",""),e.config.autoplay&&e.media.setAttribute("autoplay",""),zt(t.poster)||(e.poster=t.poster),e.config.loop.active&&e.media.setAttribute("loop",""),e.config.muted&&e.media.setAttribute("muted",""),e.config.playsinline&&e.media.setAttribute("playsinline","")),Le.addStyleHook.call(e),e.isHTML5&&ii.insertElements.call(e,"source",i),e.config.title=t.title,Ke.setup.call(e),e.isHTML5&&Object.keys(t).includes("tracks")&&ii.insertElements.call(e,"track",t.tracks),(e.isHTML5||e.isEmbed&&!e.supported.ui)&&Le.build.call(e),e.isHTML5&&e.media.load(),zt(t.previewThumbnails)||(Object.assign(e.config.previewThumbnails,t.previewThumbnails),e.previewThumbnails&&e.previewThumbnails.loaded&&(e.previewThumbnails.destroy(),e.previewThumbnails=null),e.config.previewThumbnails.enabled&&(e.previewThumbnails=new ei(e))),e.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},ri=function(){function t(e,i){var r=this;if(p(this,t),E(this,"play",(function(){return ft(r.media.play)?(r.ads&&r.ads.enabled&&r.ads.managerPromise.then((function(){return r.ads.play()})).catch((function(){return ee(r.media.play())})),r.media.play()):null})),E(this,"pause",(function(){return r.playing&&ft(r.media.pause)?r.media.pause():null})),E(this,"togglePlay",(function(t){return(yt(t)?t:!r.playing)?r.play():r.pause()})),E(this,"stop",(function(){r.isHTML5?(r.pause(),r.restart()):ft(r.media.stop)&&r.media.stop()})),E(this,"restart",(function(){r.currentTime=0})),E(this,"rewind",(function(t){r.currentTime-=ht(t)?t:r.config.seekTime})),E(this,"forward",(function(t){r.currentTime+=ht(t)?t:r.config.seekTime})),E(this,"increaseVolume",(function(t){r.volume=(r.media.muted?0:r.volume)+(ht(t)?t:0)})),E(this,"decreaseVolume",(function(t){r.increaseVolume(-t)})),E(this,"airplay",(function(){Qt.airplay&&r.media.webkitShowPlaybackTargetPicker()})),E(this,"toggleControls",(function(t){if(r.supported.ui&&!r.isAudio){var e=Dt(r.elements.container,r.config.classNames.hideControls),i=Bt(r.elements.container,r.config.classNames.hideControls,void 0===t?void 0:!t);return i&&gt(r.config.controls)&&r.config.controls.includes("settings")&&!zt(r.config.settings)&&Te.toggleMenu.call(r,!1),i!==e&&Xt.call(r,r.media,i?"controlshidden":"controlsshown"),!i}return!1})),E(this,"on",(function(t,e){Jt.call(r,r.elements.container,t,e)})),E(this,"once",(function(t,e){Kt.call(r,r.elements.container,t,e)})),E(this,"off",(function(t,e){Gt(r.elements.container,t,e)})),E(this,"destroy",(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r.ready){var i=function(){document.body.style.overflow="",r.embed=null,e?(Object.keys(r.elements).length&&(Et(r.elements.buttons.play),Et(r.elements.captions),Et(r.elements.controls),Et(r.elements.wrapper),r.elements.buttons.play=null,r.elements.captions=null,r.elements.controls=null,r.elements.wrapper=null),ft(t)&&t()):(Zt.call(r),ce.cancelRequests.call(r),Lt(r.elements.original,r.elements.container),Xt.call(r,r.elements.original,"destroyed",!0),ft(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?(Le.toggleNativeControls.call(r,!0),i()):r.isYouTube?(clearInterval(r.timers.buffering),clearInterval(r.timers.playing),null!==r.embed&&ft(r.embed.destroy)&&r.embed.destroy(),i()):r.isVimeo&&(null!==r.embed&&r.embed.unload().then(i),setTimeout(i,200))}})),E(this,"supports",(function(t){return Qt.mime.call(r,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Qt.touch,this.media=e,vt(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||mt(this.media)||gt(this.media))&&(this.media=this.media[0]),this.config=Ct({},Oe,t.defaults,i||{},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 Me(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Qt),!ct(this.media)&&bt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Qt.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"),bt(a)){if(s=Se(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Ie.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Ie.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(zt(this.provider)||!Object.values(Ie).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=Ie.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=Qt.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Ne(this),this.storage=new _e(this),this.media.plyr=this,bt(this.elements.container)||(this.elements.container=At("div",{tabindex:0}),Ot(this.media,this.elements.container)),Le.migrateStyles.call(this),Le.addStyleHook.call(this),Ke.setup.call(this),this.config.debug&&Jt.call(this,this.elements.container,this.config.events.join(" "),(function(t){r.debug.log("event: ".concat(t.type))})),this.fullscreen=new Ee(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Le.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Xe(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return ee(r.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ei(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===Ie.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Ie.youtube}},{key:"isVimeo",get:function(){return this.provider===Ie.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 e=ht(t)&&t>0;this.media.currentTime=e?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 ht(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),e=(this.media||{}).duration,i=ht(e)&&e!==1/0?e:0;return t||i}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var e=t;vt(e)&&(e=Number(e)),ht(e)||(e=this.storage.get("volume")),ht(e)||(e=this.config.volume),e>1&&(e=1),e<0&&(e=0),this.config.volume=e,this.media.volume=e,!zt(t)&&this.muted&&e>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var e=t;yt(e)||(e=this.storage.get("muted")),yt(e)||(e=this.config.muted),this.config.muted=e,this.media.muted=e}},{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 e=this,i=null;ht(t)&&(i=t),ht(i)||(i=this.storage.get("speed")),ht(i)||(i=this.config.speed.selected),i=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)}(i,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=i,setTimeout((function(){e.media&&(e.media.playbackRate=i)}),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 e=this.config.quality,i=this.options.quality;if(i.length){var r=[!zt(t)&&Number(t),this.storage.get("quality"),e.selected,e.default].find(ht),o=!0;if(!i.includes(r)){var n=re(i,r);this.debug.warn("Unsupported quality option: ".concat(r,", using ").concat(n," instead")),r=n,o=!1}e.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 e=yt(t)?t:this.config.loop.active;this.config.loop.active=e,this.media.loop=e}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){ii.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return xt(t)?t:this.source},set:function(t){xt(t)&&(this.config.urls.download=t,Te.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?Le.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=se(le.call(this));return gt(t)?t.join(":"):t},set:function(t){this.isVideo?vt(t)&&ae(t)?(this.config.ratio=se(t),pe.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 e=yt(t)?t:this.config.autoplay;this.config.autoplay=e}},{key:"toggleCaptions",value:function(t){Ce.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){Ce.set.call(this,t,!1),Ce.setup()}},{key:"language",get:function(){return(Ce.getCurrentTrack.call(this)||{}).language},set:function(t){Ce.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Qt.pip?zt(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Qt.pip){var e=yt(t)?t:!this.pip;ft(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(e?"picture-in-picture":"inline"),ft(this.media.requestPictureInPicture)&&(!this.pip&&e?this.media.requestPictureInPicture():this.pip&&!e&&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 ei(this))}}],[{key:"supported",value:function(t,e,i){return Qt.check(t,e,i)}},{key:"loadSprite",value:function(t,e){return ke(t,e)}},{key:"setup",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;return vt(e)?r=Array.from(document.querySelectorAll(e)):mt(e)?r=Array.from(e):gt(e)&&(r=e.filter(bt)),zt(r)?null:r.map((function(e){return new t(e,i)}))}}]),t}();function oi(t){t.on("timeupdate",(function(){return function(t){var e,i;null!=t&&null!==(e=t.config)&&void 0!==e&&null!==(i=e.mutedPreview)&&void 0!==i&&i.enabled||function(t){var e;0!==t.currentTime&&null!=t&&null!==(e=t.config)&&void 0!==e&&e.save_player_position&&localStorage.setItem("player-progress-".concat(ni(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return ai(t)})),t.on("loadeddata",(function(){return ai(t)}))}function ni(t){var e,i;return null==t||null===(e=t.config)||void 0===e||null===(i=e.blockAttributes)||void 0===i?void 0:i.id}function ai(t){var e,i,r;if(null!=t&&null!==(e=t.config)&&void 0!==e&&e.save_player_position&&(null==t||null===(i=t.config)||void 0===i||null===(r=i.mutedPreview)||void 0===r||!r.enabled)){var o=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(ni(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)}}ri.defaults=JSON.parse(JSON.stringify(Oe));var si=(null===(Ve=window)||void 0===Ve||null===(Ue=Ve.prestoPlayer)||void 0===Ue||null===(Qe=Ue.i18n)||void 0===Qe?void 0:Qe.hide_chapters)||"Hide Chapters",li=(null===(We=window)||void 0===We||null===(Ye=We.prestoPlayer)||void 0===Ye||null===(Je=Ye.i18n)||void 0===Je?void 0:Je.show_chapters)||"Show Chapters";const pi='<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(si,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(li,"</span>\n</button>\n");var ui,ci,di;const hi='\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===(ui=window)||void 0===ui||null===(ci=ui.prestoPlayer)||void 0===ci||null===(di=ci.i18n)||void 0===di?void 0:di.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function vi(t){var e,i,r,o,n,a,s,p,c,d,h,v,y,f=0,g={},m=null,b=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 e={};return t.forEach((function(t){var i,r=t.time.split(":");r.length>1&&(i=60*parseInt(r[0])),e[parseInt(r[1])+parseInt(i)]=t})),e}((null===(e=o=t.detail.plyr)||void 0===e||null===(i=e.config)||void 0===i?void 0:i.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"),(c=n.find('[data-plyr="chapters"]')).length||(c=jQuery(pi).insertAfter(_)),(s=n.find(".presto-player-toc__wrapper")).length||(s=jQuery(hi).appendTo(n)),d=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 e=jQuery(function(t){var e=t.name,i=void 0===e?"Untitled":e,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(i,"\n </div>\n</div>")}({name:r[t].title,order:w})).appendTo(p);e.data("presto-player-timestamp",t),g[t]=e,e.on("click",(function(){o.currentTime=parseFloat(t),o.play(),j(!1)}))})),v=s.find("[data-chapter-item]")),z(),c.off("click"),c.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),m=window.setInterval((function(){b++,o.duration&&(z(),window.clearInterval(m)),b>50&&window.clearInterval(m)}),100),d.off("click"),d.on("click",(function(){return j(!1)})),p.off("mouseleave"),p.on("mouseleave",(function t(){if(o.playing){var e=setTimeout((function(){j(!1),p.off("mouseleave",t)}),2e3);p.on("mouseenter",(function(){clearTimeout(e)}))}}))}}else o.on("loadedmetadata",vi);function x(){f=o.currentTime;var t=Object.keys(r).filter((function(t){return t<=f})).map((function(t){return parseInt(t,10)})),e=Math.max.apply(Math,u(t));v&&v.removeClass("is-highlighted"),jQuery(g[e||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 e,i,n,a,s=r[t],l=parseInt(t)/o.duration*100,p=jQuery((e={position:l,name:"".concat(s.title)},i=e.position,n=e.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===i?0:i,'%" 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 yi;function fi(t){"undefined"!=typeof jQuery&&(yi=t,jQuery(yi.elements.container).closest(".presto-player__wrapper"),yi.on("ready",vi),yi.on("controlshidden",gi),yi.on("controlsshown",mi))}function gi(t){var e,i,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(e=t.detail)||void 0===e||null===(i=e.plyr)||void 0===i||null===(r=i.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function mi(t){var e,i,r;"undefined"!=typeof jQuery&&jQuery(null==t||null===(e=t.detail)||void 0===e||null===(i=e.plyr)||void 0===i||null===(r=i.elements)||void 0===r?void 0:r.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function bi(t){var e,i;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!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}function _i(t){var e,i;null!=t&&null!==(e=t.config)&&void 0!==e&&e.hasPlayed||(t.config.hasPlayed=!0,null===(i=window)||void 0===i||i.gtag("event","Play",bi(t)))}function wi(t){var e;null===(e=window)||void 0===e||e.gtag("event","Pause",bi(t))}function ki(t){var e,i;null!=t&&null!==(e=t.config)&&void 0!==e&&e.hasLoaded||(t.config.hasLoaded=!0,null===(i=window)||void 0===i||i.gtag("event","Player Load",bi(t)))}var xi,zi={25:!1,50:!1,75:!1,100:!1};function ji(t){if(t.currentTime){var e=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(zi).forEach((function(i){var r;!zi[i]&&e>=parseInt(i)&&(zi[i]=!0,null===(r=window)||void 0===r||r.gtag("event","".concat(i," Percent Played"),bi(t)))}))}}var Ti="presto-player.analytics",Si="",Pi=0;function Ci(t){var e,i;(xi=t).config.analytics&&null!==(e=window)&&void 0!==e&&null!==(i=e.wp)&&void 0!==i&&i.hooks&&(wp.hooks.hasAction("presto.nonceRefreshed",Ti)||wp.hooks.addAction("presto.nonceRefreshed",Ti,(function(t){Si=t})),wp.hooks.hasAction("presto.playerPlay",Ti)||wp.hooks.addAction("presto.playerPlay",Ti,Oi),wp.hooks.hasAction("presto.playerEnded",Ti)||wp.hooks.addAction("presto.playerEnded",Ti,Oi),wp.hooks.hasAction("presto.playerHidden",Ti)||wp.hooks.addAction("presto.playerHidden",Ti,Oi),wp.hooks.hasAction("presto.playerPause",Ti)||wp.hooks.addAction("presto.playerPause",Ti,Oi),wp.hooks.hasAction("presto.playerSeeked",Ti)||wp.hooks.addAction("presto.playerSeeked",Ti,Oi))}function Oi(t){isNaN(null==t?void 0:t.currentTime)||Ii(function(t){var e,i;return t.currentTime>Pi&&(Pi=t.currentTime),t.currentTime>=t.duration&&(Pi=t.duration),n(n(n({video_current_time:parseInt(Pi),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!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}(t))}function Ii(t){var e,i,r,o,n,a,s,l;if(Si){var p,u,c=new FormData;c.append("action","presto_player_progress"),c.append("duration",null==t?void 0:t.video_current_time),c.append("video_id",null===(e=xi)||void 0===e||null===(i=e.config)||void 0===i?void 0:i.id),c.append("nonce",Si),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=xi)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:Si}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,c)}}function Ai(t){var e,i;null!==(e=window)&&void 0!==e&&null!==(i=e.prestoPlayer)&&void 0!==i&&i.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",_i),wp.hooks.addAction("presto.playerPause","presto-player",wi),wp.hooks.addAction("presto.playerReady","presto-player",ki),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",ji))}(),Ci(t))}const Mi=function(t){t.on("ready",(function(){var e,i,r,o;null==t||null===(e=t.config)||void 0===e||!e.logo||null!=t&&null!==(i=t.config)&&void 0!==i&&i.logo_added||"undefined"!=typeof jQuery&&(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 Ei(t){var e;null!=t&&null!==(e=t.config)&&void 0!==e&&e.poster&&(t.poster=t.config.poster)}const Fi=function(t){var e,i;null!==(e=window)&&void 0!==e&&null!==(i=e.wp)&&void 0!==i&&i.hooks&&(t.on("ready",(function(){Li("Ready",t)})),t.on("play",(function(){Li("Play",t)})),t.on("playing",(function(){Li("Playing",t)})),t.on("pause",(function(){Li("Pause",t)})),t.on("ended",(function(){Li("Ended",t)})),t.on("seeked",(function(){Li("Seeked",t)})),t.on("timeupdate",(function(){Li("TimeUpdate",t)})),t.on("enterfullscreen",(function(){Li("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){Li("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){Li("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(e){var i;switch(null==e||null===(i=e.detail)||void 0===i?void 0:i.code){case 0:Li("Ended",t);break;case 1:Li("Play",t);break;case 2:Li("Pause",t)}})))};function Li(t,e){window.wp.hooks.doAction("presto.player".concat(t),e)}let Ni,Ri=Date.now();const Bi=t=>{var e,i;if(!t.automations)return;(null===(i=null===(e=null===window||void 0===window?void 0:window.wp)||void 0===e?void 0:e.hooks)||void 0===i?void 0:i.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{Ni=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,e=null){var i;Ni&&(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.ajaxProgress)&&(e||(e=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(r).forEach((i=>{var r,o,n,a,s,l,p,u,c;const d=parseInt(i);if(!t.watched[d]&&e>=d){t.watched[d]=!0;let e=new FormData;if(e.append("action","presto_player_progress_percent"),e.append("id",null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.id),e.append("percent",d.toString()),e.append("visit_time",Ri.toString()),e.append("nonce",Ni),(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug)&&console.log(`${d} 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===(c=null==t?void 0:t.config)||void 0===c?void 0:c.id,visit_time:Ri,percent:d,nonce:Ni}});else{let i=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,e);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(i?console.log("Successfully queued progress:",{id:null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.id,percent:d,visit_time:Ri,nonce:Ni}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:d,visit_time:Ri,nonce:Ni}))}}})))}};let Di=!1,qi=!1;function Hi(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const $i=t=>{var e,i;(t.config.analytics||t.config.automations)&&(null===(i=null===(e=null===window||void 0===window?void 0:window.wp)||void 0===e?void 0:e.hooks)||void 0===i||i.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;Di||qi||(qi=!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(Hi).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),Di=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{qi=!1})))})))},Vi=function(t){var e=window.navigator.userAgent;if(e.match(/iPad/i)||e.match(/iPhone/i)){var i=function(t,e){for(var i,r,o,n=null==t||null===(i=t.elements)||void 0===i||null===(r=i.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;)e?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 e;null!=t&&null!==(e=t.fullscreen)&&void 0!==e&&e.active&&i(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var e;null!=t&&null!==(e=t.fullscreen)&&void 0!==e&&e.active||i(t,!1)}))}},Ui=function(){var t=h(regeneratorRuntime.mark((function t(e){var i,r,o;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-97e2763b.js");case 5:window.ResizeObserver=t.sent.ResizeObserver;case 7:if(o=new ResizeObserver((function(t){var e,i=v(t);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.contentRect;jQuery(r.target).find(".plyr__menu__container").css({maxHeight:"".concat(o.height-48,"px")})}}catch(t){i.e(t)}finally{i.f()}})),null!=e&&null!==(i=e.elements)&&void 0!==i&&i.container){t.next=10;break}return t.abrupt("return");case 10:if(o.observe(null==e||null===(r=e.elements)||void 0===r?void 0:r.container),e){t.next=13;break}return t.abrupt("return");case 13:e.on("playing",(function(){var t,i,r=null==e||null===(t=e.elements)||void 0===t?void 0:t.container.getBoundingClientRect();jQuery(null==e||null===(i=e.elements)||void 0===i?void 0:i.container).find(".plyr__menu__container").css({maxHeight:"".concat(r.height-48,"px")})}));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function Qi(t){var e,i,r,o,a,s,l,p,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n(n(n({},u),null!==(e=window)&&void 0!==e&&null!==(i=e.prestoPlayer)&&void 0!==i&&i.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:{}}),d=new ri(t,c);return"undefined"!=typeof learndash_video_data&&import("./p-4b2c013c.js").then((function(t){(0,t.default)(d)})),"undefined"!=typeof _tutorobject&&import("./p-0e1cd603.js").then((function(t){(0,t.default)(d)})),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)(d)})),Fi(d),Vi(d),Ui(d),Mi(d),Ei(d),fi(d),null!==(a=window)&&void 0!==a&&null!==(s=a.prestoPlayer)&&void 0!==s&&s.isAdmin||($i(d),Bi(c),oi(d),Ai(d)),d}function Wi(t){return"string"==typeof t&&t.includes(".m3u8")}let Yi=class{constructor(e){t(this,e),this.loaded=r(this,"loaded",7),this.isAdmin=!1,this.previouslyPlaying=!1,this.components={cta:null,email:null,overlays:null}}async play(t=!1){return this.shouldLazyLoad=!1,t&&(this.mutedPreview=!1),this.player.play()}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,e){return this.player.on(t,e)}async off(t,e){return this.player.off(t,e)}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 e=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)e.push(t=t.parentNode);return e})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:e,branding:i,src:r,analytics:o,automations:n,autoplay:a,blockAttributes:s={},provider:l="",provider_video_id:p="",youtube:u,type:c,isAdmin:d,i18n:h,storage:v={enabled:!d,key:`presto-player-${t.id}`}}){var y,f,g,m;const b=["settings"],_=[...["youtube","vimeo"].includes(l)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((e=>((null==t?void 0:t[e])||b.includes(e))&&!_.includes(e)));(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:c}),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:e,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==i?void 0:i.logo,logo_width:null==i?void 0:i.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===(m=null===window||void 0===window?void 0:window.wp)||void 0===m?void 0:m.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(),e=t.config,i=t.selector,r=t.src,o=t.preload,r&&Wi(r)?import("./p-619153e5.js").then((function(t){return(0,t.default)({config:e,selector:i,src:r,preload:o})})):new Promise((function(t){return t(new Qi(i,n({},e)))})));var t,e,i,r,o}handlePlayerElementChange(){var t;(({src:t,el:e,preload:i,currentTime:r})=>{if(!e.getAttribute("hls_loaded")&&["metadata","none"].includes(i)&&Wi(t)){if(r>0)return e.style.height=null,e.style.paddingBottom=null,void e.setAttribute("hls_loaded","1");e.style.height="0px",e.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,e){var i,r,o,n,a,s,l;this.player&&!this.isAdmin&&(!t&&e&&this.player.once("timeupdate",(()=>{var t,e;this.player.loop="loop"===(null===(t=this.preset)||void 0===t?void 0:t.on_video_end),this.player.toggleCaptions(null===(e=null==this?void 0:this.preset)||void 0===e?void 0:e.captions_enabled)})),(null===(o=null===(r=null===(i=this.originalConfig)||void 0===i?void 0:i.blockAttributes)||void 0===r?void 0:r.mutedPreview)||void 0===o?void 0:o.enabled)&&(({player:t,mutedPreview:e,captions:i,progress:r,savePosition:o,onPlay:n})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=e,t.muted=e,t.loop=e,t.config.ajaxProgress=!e&&r,t.config.save_player_position=!e&&o;try{t.toggleCaptions(!!e&&!!i)}catch(t){}return setTimeout((()=>{ai(t)||t.restart(),setTimeout((()=>{t.muted=e,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,e,i;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(e=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===e?void 0:e.enabled,this.renderDynamicOverlays(),this.renderCTA(),this.renderEmailOverlay(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Wi(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")),"go-to-start"===(null===(i=this.preset)||void 0===i?void 0:i.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,e,i;return"youtube"===this.provider&&!this.autoplay&&!(null===(e=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===e?void 0:e.enabled)&&!!(null===(i=this.preset)||void 0===i?void 0:i.lazy_load_youtube)}componentWillLoad(){var t,e,i;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===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.i18n)||(null===(i=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===i?void 0:i.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,e)=>{if(!e)return;const i=document.createElement("style");t.shadowRoot.append(i),i.appendChild(document.createTextNode(e))})(this.el,this.css),t}async onReload(t){const e=await this.initialize();"play"==t&&e.on("ready",(()=>{this.play(),e.muted=!0,e.muted=!1,e.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-97e2763b.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 e,i,r,o,n;if("unknown"!==b()&&!(null===(i=null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.blockAttributes)||void 0===i?void 0:i.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 e=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=e}))}}(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 e,i;if(!(null===(e=this.preset)||void 0===e?void 0:e.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(i=null==this?void 0:this.player)||void 0===i?void 0:i.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 e,i,r;if(!this.isAdmin&&(null===(e=this.preset)||void 0===e?void 0:e.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===(i=this.blockAttributes)||void 0===i?void 0:i.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 e("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 e("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return e("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 e("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});default:return e("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})}}renderCTA(){var t,e,i,r;(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&(this.isAdmin||(null===(i=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===i?void 0:i.enabled)&&((null===(r=this.components.cta)||void 0===r?void 0:r.offsetParent)||(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))))}renderEmailOverlay(){var t,e,i;!(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)||(null===(i=this.components.email)||void 0===i?void 0:i.offsetParent)||(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))}renderActionBar(){var t,i;if((null===(i=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===i?void 0:i.enabled)&&this.player)return e("presto-action-bar",{config:this.preset.action_bar,player:null==this?void 0:this.player,youtube:this.youtube})}stickyPositionClass(){var t,e;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(e=this.preset)||void 0===e?void 0:e.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,e,i,r,o;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===(i=null===(e=this.player)||void 0===e?void 0:e.config)||void 0===i?void 0:i.mutedPreview)||void 0===r?void 0:r.enabled),(null===(o=null==this?void 0:this.overlaysComponent)||void 0===o?void 0:o.offsetParent)||this.player.elements.wrapper.append(this.overlaysComponent))}render(){var t,i,r,o,n;return e(y,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},e("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"presto-sticky":""}\n ${this.stickyPositionClass()}\n ${"rtl"===this.direction?"rtl":""}\n ${!!(null===(t=this.preset)||void 0===t?void 0:t.skin)&&`skin-${null===(i=this.preset)||void 0===i?void 0:i.skin}`}\n ${(null===(r=this.preset)||void 0===r?void 0:r.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(o=this.preset)||void 0===o?void 0:o.caption_style)?`caption-style-${null===(n=this.preset)||void 0===n?void 0:n.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}`},e("div",null,e("slot",{name:"player-start"}),e("slot",{name:"player-before-video"}),this.renderVideo(),e("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),e("slot",{name:"player-end"}))))}get el(){return i(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};Yi.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.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 .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-action-bar{position:relative;z-index:1}.presto-player__wrapper.skin-stacked .plyr__controls{flex-wrap:wrap}.presto-player__wrapper.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.presto-player__wrapper.skin-stacked .plyr__controls{justify-content:flex-start}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.presto-player__wrapper.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.presto-player__wrapper.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.presto-player__wrapper.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:50%}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}@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;display:none;align-items:center;justify-content:center}.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{display:flex}.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}}';const Ji=function(t,e){return u(e)};let Gi=class{constructor(e){t(this,e),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,i=e(Ji,null,e("span",{part:"prefix",class:"button__prefix"},e("slot",{onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),e("span",{part:"label",class:"button__label"},e("slot",{onSlotchange:()=>this.handleSlotChange()})),e("span",{part:"suffix",class:"button__suffix"},e("slot",{onSlotchange:()=>this.handleSlotChange(),name:"suffix"}))),r=e("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},i),o=e("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},i);return t?o:r}get button(){return i(this)}};Gi.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 Ki=class{constructor(e){t(this,e)}render(){return e("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}};Ki.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 Xi=class{constructor(e){t(this,e)}render(){return e("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},e("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>e("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"}))))}};Xi.style=":host{display:block}";let Zi=class{constructor(e){t(this,e)}getId(t){const e=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(t||"");return(null==e?void 0:e[5])||""}parseHash(t){const e=t.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*\&*h=|\/)+(?<hash>[\d,a-f]+)/);return e?e.groups.hash:null}render(){if(this.src)return"Android"!==b()||(t=window.navigator.standalone,i=window.navigator.userAgent.toLowerCase(),r=/safari/.test(i),/iphone|ipod|ipad/.test(i)?!t&&r||t||r:!i.includes("wv"))?e("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)}):e("div",{class:"presto-iframe-fallback-container"},e("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,i,r}};Zi.style=":host{display:block}";let tr=class{constructor(e){t(this,e),this.reload=r(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.once("statechange",(t=>{var e,i,r,o,n;1===t.detail.code&&((null===(n=null===(o=null===(r=null===(i=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr)||void 0===i?void 0:i.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 e;const i=(t||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return i&&11===(null===(e=null==i?void 0:i[2])||void 0===e?void 0:e.length)?i[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var t;let e=null===(t=window.navigator)||void 0===t?void 0:t.standalone,i=window.navigator.userAgent.toLowerCase(),r=/safari/.test(i),o=/iphone|ipod|ipad/.test(i);this.isWebView=o?!e&&!r:i.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&"iOS"===b()&&(this.lazyLoad=!1)}render(){return this.isWebView?e("div",{class:"fallback-container"},e("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?e("div",null,e("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),e("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):e("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"]}}};tr.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 er=class{constructor(e){t(this,e),this.layout="default"}waitForApi(t){var e=setInterval((function(){var i;(null===(i=null===window||void 0===window?void 0:window.gapi)||void 0===i?void 0:i.ytsubscribe)&&(clearInterval(e),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 e=document.getElementsByTagName("script")[0];e&&e.parentNode.insertBefore(t,e),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return e("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};er.style=":host{display:block}";export{T as C,I as E,Qi as P,f as a,_ as b,w as c,k as d,x as e,z as f,S as g,P as h,C as i,O as j,A as k,Yi as l,Gi as m,Ki as n,Xi as o,Zi as p,tr as q,ai as r,er as s}
dist/components/web-components/{p-f4bcb4f4.entry.js → p-cf27fd9a.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_bunny,e as presto_cta_overlay,f as presto_cta_overlay_controller,C as presto_cta_overlay_ui,g as presto_dynamic_overlay_ui,h as presto_dynamic_overlays,i as presto_email_overlay,j as presto_email_overlay_controller,E as presto_email_overlay_ui,k as presto_muted_overlay,l as presto_player,m as presto_player_button,n as presto_player_spinner,o as presto_video,p as presto_vimeo,q as presto_youtube,s as presto_youtube_subscribe_button}from"./p-fdc16b88.js";import"./p-99303c1a.js";
1
+ export{a as presto_action_bar,b as presto_action_bar_controller,c as presto_action_bar_ui,d as presto_bunny,e as presto_cta_overlay,f as presto_cta_overlay_controller,C as presto_cta_overlay_ui,g as presto_dynamic_overlay_ui,h as presto_dynamic_overlays,i as presto_email_overlay,j as presto_email_overlay_controller,E as presto_email_overlay_ui,k as presto_muted_overlay,l as presto_player,m as presto_player_button,n as presto_player_spinner,o as presto_video,p as presto_vimeo,q as presto_youtube,s as presto_youtube_subscribe_button}from"./p-915822ef.js";import"./p-99303c1a.js";
dist/components/web-components/web-components.esm.js CHANGED
@@ -1 +1 @@
1
- import{p as e,b as r}from"./p-99303c1a.js";var t,o;(t=import.meta.url,o={},""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)).then((e=>r([["p-696e376c",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-b4ba4308",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["p-f4bcb4f4",[[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"],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],play:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],off:[64]},[[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"]]],[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],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],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-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],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"],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]}],[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],email:[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 r}from"./p-99303c1a.js";var t,o;(t=import.meta.url,o={},""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)).then((e=>r([["p-696e376c",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-b4ba4308",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["p-cf27fd9a",[[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"],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],play:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],off:[64]},[[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"]]],[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],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],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-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],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"],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]}],[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],email:[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/Requirements.php CHANGED
@@ -7,7 +7,7 @@ use \PrestoPlayer\Mundschenk\WP_Requirements;
7
  class Requirements extends WP_Requirements
8
  {
9
  const REQUIREMENTS = [
10
- 'php' => '7.1',
11
  'multibyte' => false,
12
  'utf-8' => false,
13
  'wp' => '5.6',
7
  class Requirements extends WP_Requirements
8
  {
9
  const REQUIREMENTS = [
10
+ 'php' => '7.3',
11
  'multibyte' => false,
12
  'utf-8' => false,
13
  'wp' => '5.6',
inc/Services/Compatibility.php CHANGED
@@ -14,6 +14,34 @@ class Compatibility
14
 
15
  // godaddy's shitty feedback modal
16
  add_action('admin_enqueue_scripts', [$this, 'goDaddyModal'], 99);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
19
  public function goDaddyModal()
14
 
15
  // godaddy's shitty feedback modal
16
  add_action('admin_enqueue_scripts', [$this, 'goDaddyModal'], 99);
17
+
18
+ // allow our player html
19
+ add_filter('wp_kses_allowed_html', [$this, 'allowHtml'], 11);
20
+ }
21
+
22
+ /**
23
+ * Lets us use our player tag in content.
24
+ *
25
+ * @param array $tags Allowed tags.
26
+ * @return array
27
+ */
28
+ public function allowHtml($tags)
29
+ {
30
+ $tags['presto-player'] = [
31
+ 'direction' => true,
32
+ 'css' => true,
33
+ 'skin' => true,
34
+ 'icon-url' => true,
35
+ 'id' => true,
36
+ 'src' => true,
37
+ 'css' => true,
38
+ 'class' => true,
39
+ 'preload' => true,
40
+ 'poster' => true,
41
+ 'playsinline' => true,
42
+ 'autoplay' => true,
43
+ ];
44
+ return $tags;
45
  }
46
 
47
  public function goDaddyModal()
inc/Services/VideoPostType.php CHANGED
@@ -33,6 +33,8 @@ class VideoPostType
33
 
34
  // limit media hub posts
35
  add_filter('pre_get_posts', [$this, 'limitMediaHubPosts']);
 
 
36
  }
37
 
38
  /**
@@ -276,4 +278,25 @@ class VideoPostType
276
  $q_vars[$taxonomy] = $term->slug;
277
  }
278
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  }
33
 
34
  // limit media hub posts
35
  add_filter('pre_get_posts', [$this, 'limitMediaHubPosts']);
36
+
37
+ add_action( 'transition_post_status', [$this, 'set_title_on_publish_only'], 10, 3 );
38
  }
39
 
40
  /**
278
  $q_vars[$taxonomy] = $term->slug;
279
  }
280
  }
281
+
282
+ /**
283
+ * Set media hub video title when kept empty before publish.
284
+ */
285
+ public function set_title_on_publish_only( $new_status, $old_status, $post ) {
286
+ if ( ( 'publish' === $new_status && 'publish' !== $old_status )
287
+ && 'pp_video_block' === $post->post_type
288
+ ) {
289
+
290
+ if( empty( $post->post_title ) ) {
291
+ $new_title = "Presto Player #" . $post->ID;
292
+
293
+ $post_update = array(
294
+ 'ID' => $post->ID,
295
+ 'post_title' => $new_title
296
+ );
297
+
298
+ wp_update_post( $post_update );
299
+ }
300
+ }
301
+ }
302
  }
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: 2021-11-10T14:12:38+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.5.0\n"
13
 
@@ -1394,7 +1394,7 @@ msgid "Choose an audience"
1394
  msgstr ""
1395
 
1396
  #: admin/blocks/shared/presets/parts/MailchimpConfig.js:75
1397
- #: Services/VideoPostType.php:176
1398
  msgid "Tag"
1399
  msgstr ""
1400
 
@@ -1682,13 +1682,13 @@ msgstr ""
1682
  #: admin/integrations/divi/fields/VideoSelector/VideoSelector.jsx:207
1683
  #: Integrations/BeaverBuilder/ReusableVideoModule/Module.php:109
1684
  #: Integrations/Elementor/ReusableVideoWidget.php:135
1685
- #: Services/VideoPostType.php:194
1686
  msgid "Edit Video"
1687
  msgstr ""
1688
 
1689
  #: admin/integrations/divi/fields/VideoSelector/VideoSelector.jsx:211
1690
  #: Integrations/Elementor/ReusableVideoWidget.php:146
1691
- #: Services/VideoPostType.php:193
1692
  msgid "New Video"
1693
  msgstr ""
1694
 
@@ -2641,120 +2641,120 @@ msgstr ""
2641
  msgid "AUTO"
2642
  msgstr ""
2643
 
2644
- #: Services/VideoPostType.php:81
2645
  msgid "Shortcode"
2646
  msgstr ""
2647
 
2648
- #: Services/VideoPostType.php:82
2649
  msgid "PHP Function"
2650
  msgstr ""
2651
 
2652
- #: Services/VideoPostType.php:118
2653
  msgid "Enter a title..."
2654
  msgstr ""
2655
 
2656
- #: Services/VideoPostType.php:171
2657
  msgctxt "post type general name"
2658
  msgid "Media Tags"
2659
  msgstr ""
2660
 
2661
- #: Services/VideoPostType.php:172
2662
  msgctxt "post type singular name"
2663
  msgid "Media Tag"
2664
  msgstr ""
2665
 
2666
- #: Services/VideoPostType.php:173
2667
  msgctxt "admin menu"
2668
  msgid "Search Media Tags"
2669
  msgstr ""
2670
 
2671
- #: Services/VideoPostType.php:174
2672
  msgctxt "add new on admin bar"
2673
  msgid "Popular Media Tags"
2674
  msgstr ""
2675
 
2676
- #: Services/VideoPostType.php:187
2677
  msgctxt "post type general name"
2678
  msgid "Media Hub"
2679
  msgstr ""
2680
 
2681
- #: Services/VideoPostType.php:188
2682
  msgctxt "post type singular name"
2683
  msgid "Media"
2684
  msgstr ""
2685
 
2686
- #: Services/VideoPostType.php:189
2687
  msgctxt "admin menu"
2688
  msgid "Media"
2689
  msgstr ""
2690
 
2691
- #: Services/VideoPostType.php:190
2692
  msgctxt "add new on admin bar"
2693
  msgid "Video"
2694
  msgstr ""
2695
 
2696
- #: Services/VideoPostType.php:191
2697
  msgctxt "Video"
2698
  msgid "Add New"
2699
  msgstr ""
2700
 
2701
- #: Services/VideoPostType.php:192
2702
  msgid "Add New Video"
2703
  msgstr ""
2704
 
2705
- #: Services/VideoPostType.php:195
2706
  msgid "View Video"
2707
  msgstr ""
2708
 
2709
- #: Services/VideoPostType.php:196
2710
  msgid "All Videos"
2711
  msgstr ""
2712
 
2713
- #: Services/VideoPostType.php:197
2714
  msgid "Search Videos"
2715
  msgstr ""
2716
 
2717
- #: Services/VideoPostType.php:198
2718
  msgid "No Videos found."
2719
  msgstr ""
2720
 
2721
- #: Services/VideoPostType.php:199
2722
  msgid "No Videos found in Trash."
2723
  msgstr ""
2724
 
2725
- #: Services/VideoPostType.php:200
2726
  msgid "Filter Videos list"
2727
  msgstr ""
2728
 
2729
- #: Services/VideoPostType.php:201
2730
  msgid "Videos list navigation"
2731
  msgstr ""
2732
 
2733
- #: Services/VideoPostType.php:202
2734
  msgid "Videos list"
2735
  msgstr ""
2736
 
2737
- #: Services/VideoPostType.php:203
2738
  msgid "Video published."
2739
  msgstr ""
2740
 
2741
- #: Services/VideoPostType.php:204
2742
  msgid "Video published privately."
2743
  msgstr ""
2744
 
2745
- #: Services/VideoPostType.php:205
2746
  msgid "Video reverted to draft."
2747
  msgstr ""
2748
 
2749
- #: Services/VideoPostType.php:206
2750
  msgid "Video scheduled."
2751
  msgstr ""
2752
 
2753
- #: Services/VideoPostType.php:207
2754
  msgid "Video updated."
2755
  msgstr ""
2756
 
2757
- #: Services/VideoPostType.php:250
2758
  msgid "Show all %s"
2759
  msgstr ""
2760
 
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: 2021-11-17T15:58:37+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.5.0\n"
13
 
1394
  msgstr ""
1395
 
1396
  #: admin/blocks/shared/presets/parts/MailchimpConfig.js:75
1397
+ #: Services/VideoPostType.php:178
1398
  msgid "Tag"
1399
  msgstr ""
1400
 
1682
  #: admin/integrations/divi/fields/VideoSelector/VideoSelector.jsx:207
1683
  #: Integrations/BeaverBuilder/ReusableVideoModule/Module.php:109
1684
  #: Integrations/Elementor/ReusableVideoWidget.php:135
1685
+ #: Services/VideoPostType.php:196
1686
  msgid "Edit Video"
1687
  msgstr ""
1688
 
1689
  #: admin/integrations/divi/fields/VideoSelector/VideoSelector.jsx:211
1690
  #: Integrations/Elementor/ReusableVideoWidget.php:146
1691
+ #: Services/VideoPostType.php:195
1692
  msgid "New Video"
1693
  msgstr ""
1694
 
2641
  msgid "AUTO"
2642
  msgstr ""
2643
 
2644
+ #: Services/VideoPostType.php:83
2645
  msgid "Shortcode"
2646
  msgstr ""
2647
 
2648
+ #: Services/VideoPostType.php:84
2649
  msgid "PHP Function"
2650
  msgstr ""
2651
 
2652
+ #: Services/VideoPostType.php:120
2653
  msgid "Enter a title..."
2654
  msgstr ""
2655
 
2656
+ #: Services/VideoPostType.php:173
2657
  msgctxt "post type general name"
2658
  msgid "Media Tags"
2659
  msgstr ""
2660
 
2661
+ #: Services/VideoPostType.php:174
2662
  msgctxt "post type singular name"
2663
  msgid "Media Tag"
2664
  msgstr ""
2665
 
2666
+ #: Services/VideoPostType.php:175
2667
  msgctxt "admin menu"
2668
  msgid "Search Media Tags"
2669
  msgstr ""
2670
 
2671
+ #: Services/VideoPostType.php:176
2672
  msgctxt "add new on admin bar"
2673
  msgid "Popular Media Tags"
2674
  msgstr ""
2675
 
2676
+ #: Services/VideoPostType.php:189
2677
  msgctxt "post type general name"
2678
  msgid "Media Hub"
2679
  msgstr ""
2680
 
2681
+ #: Services/VideoPostType.php:190
2682
  msgctxt "post type singular name"
2683
  msgid "Media"
2684
  msgstr ""
2685
 
2686
+ #: Services/VideoPostType.php:191
2687
  msgctxt "admin menu"
2688
  msgid "Media"
2689
  msgstr ""
2690
 
2691
+ #: Services/VideoPostType.php:192
2692
  msgctxt "add new on admin bar"
2693
  msgid "Video"
2694
  msgstr ""
2695
 
2696
+ #: Services/VideoPostType.php:193
2697
  msgctxt "Video"
2698
  msgid "Add New"
2699
  msgstr ""
2700
 
2701
+ #: Services/VideoPostType.php:194
2702
  msgid "Add New Video"
2703
  msgstr ""
2704
 
2705
+ #: Services/VideoPostType.php:197
2706
  msgid "View Video"
2707
  msgstr ""
2708
 
2709
+ #: Services/VideoPostType.php:198
2710
  msgid "All Videos"
2711
  msgstr ""
2712
 
2713
+ #: Services/VideoPostType.php:199
2714
  msgid "Search Videos"
2715
  msgstr ""
2716
 
2717
+ #: Services/VideoPostType.php:200
2718
  msgid "No Videos found."
2719
  msgstr ""
2720
 
2721
+ #: Services/VideoPostType.php:201
2722
  msgid "No Videos found in Trash."
2723
  msgstr ""
2724
 
2725
+ #: Services/VideoPostType.php:202
2726
  msgid "Filter Videos list"
2727
  msgstr ""
2728
 
2729
+ #: Services/VideoPostType.php:203
2730
  msgid "Videos list navigation"
2731
  msgstr ""
2732
 
2733
+ #: Services/VideoPostType.php:204
2734
  msgid "Videos list"
2735
  msgstr ""
2736
 
2737
+ #: Services/VideoPostType.php:205
2738
  msgid "Video published."
2739
  msgstr ""
2740
 
2741
+ #: Services/VideoPostType.php:206
2742
  msgid "Video published privately."
2743
  msgstr ""
2744
 
2745
+ #: Services/VideoPostType.php:207
2746
  msgid "Video reverted to draft."
2747
  msgstr ""
2748
 
2749
+ #: Services/VideoPostType.php:208
2750
  msgid "Video scheduled."
2751
  msgstr ""
2752
 
2753
+ #: Services/VideoPostType.php:209
2754
  msgid "Video updated."
2755
  msgstr ""
2756
 
2757
+ #: Services/VideoPostType.php:252
2758
  msgid "Show all %s"
2759
  msgstr ""
2760
 
presto-player.php CHANGED
@@ -3,8 +3,9 @@
3
  /**
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
 
6
  * Description: A beautiful, fast media player for WordPress.
7
- * Version: 1.7.0
8
  * Author: Presto Made, Inc
9
  * Text Domain: presto-player
10
  * Tags: private, video, lms, hls
3
  /**
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
+ * Author URI: http://prestoplayer.com
7
  * Description: A beautiful, fast media player for WordPress.
8
+ * Version: 1.7.1
9
  * Author: Presto Made, Inc
10
  * Text Domain: presto-player
11
  * Tags: private, video, lms, hls
readme.txt CHANGED
@@ -4,8 +4,8 @@ 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.8
7
- Stable tag: 1.0.0
8
- Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -153,8 +153,15 @@ It is also important to point out that BunnyNet has a $1 per month minimum.
153
 
154
  == Changelog ==
155
 
 
 
 
 
 
 
 
156
  = 1.7.0 - November 10, 2021 =
157
- * LifterLMS video progression and analytics integration.
158
  * Video end options (go to start, loop)
159
  * WP Rocket compatibility with "Delay Javascript Execution" option.
160
  * Shortcode enhancements - ability to add both id and src attributes.
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 5.8
7
+ Stable tag: 1.7.0
8
+ Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
153
 
154
  == Changelog ==
155
 
156
+ = 1.7.1 - November 17, 2021 =
157
+ * Compatibility update with WordPress.com hosting stripping out player tag.
158
+ * Fix z-index issue where action bar is below muted preview.
159
+ * Fix double-play button issue on iOS devices when muted preview and large play button are enabled.
160
+ * Automatically set media hub title when left blank.
161
+ * Update php requirements in readme.txt.
162
+
163
  = 1.7.0 - November 10, 2021 =
164
+ * LifterLMS video progression and analytics integration. [Learn More](https://prestoplayer.com/docs/lifterlms-advanced-videos-presto-player/)
165
  * Video end options (go to start, loop)
166
  * WP Rocket compatibility with "Delay Javascript Execution" option.
167
  * Shortcode enhancements - ability to add both id and src attributes.
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'project',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '944321ce1ae23ddb9ad26c03fbfed1772885df4e',
9
  'name' => 'course/player',
10
  'dev' => false,
11
  ),
@@ -16,7 +16,7 @@
16
  'type' => 'project',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '944321ce1ae23ddb9ad26c03fbfed1772885df4e',
20
  'dev_requirement' => false,
21
  ),
22
  'level-2/dice' => array(
5
  'type' => 'project',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'f7c103267fe0e38e2024b8f773d1df4c1c23a32d',
9
  'name' => 'course/player',
10
  'dev' => false,
11
  ),
16
  'type' => 'project',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => 'f7c103267fe0e38e2024b8f773d1df4c1c23a32d',
20
  'dev_requirement' => false,
21
  ),
22
  'level-2/dice' => array(