Plugin Directory

Changeset 3336706


Ignore:
Timestamp:
07/30/2025 02:35:31 PM (5 months ago)
Author:
FolioVision
Message:

8.0.22: Site Editor fixes, upload security improvements

Location:
fv-player/trunk
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • fv-player/trunk/controller/frontend.php

    r3326358 r3336706  
    813813    // script handle must not be one of
    814814    ) && !in_array( $handle, array(
    815       'fv_player_lightbox' // without this it would be impossible to open the lightbox without hovering the page before it, so it's really a problem on mobile
     815      'fv_player_lightbox', // without this it would be impossible to open the lightbox without hovering the page before it, so it's really a problem on mobile
     816      'fv-player-s3-uploader',
     817      'fv-player-s3-uploader-base',
    816818    ), true )
    817819  ) {
  • fv-player/trunk/controller/s3-ajax.php

    r3314575 r3336706  
    132132
    133133  wp_send_json($json_final);
    134 } else if( strpos($action, 'multiupload') !== false ) { // S3 Multiupload
     134} else if( strpos($action, 'multiupload') !== false || strcmp($action, 'validate_file_upload') == 0 ) { // S3 Multiupload
    135135  require_once(dirname( __FILE__ ) . '/../models/media-browser.php');
    136136  require_once(dirname( __FILE__ ). '/../models/cdn.class.php');
     
    143143  global $FV_Player_S3_Upload;
    144144
    145   if(strcmp($action,'create_multiupload') == 0 ) {
     145  if(strcmp($action,'validate_file_upload') == 0 ) {
     146    $FV_Player_S3_Upload->validate_file_upload();
     147
     148  } else if(strcmp($action,'create_multiupload') == 0 ) {
    146149    $FV_Player_S3_Upload->create_multiupload();
    147150  } else if(strcmp($action, 'multiupload_send_part') == 0) {
  • fv-player/trunk/controller/s3-upload.php

    r3314575 r3336706  
    207207  }
    208208
     209  function validate_file_upload() {
     210    if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'fv_flowplayer_validate_file' ) ) {
     211      wp_send_json( array( 'error' => 'Access denied, please reload the page and try again.' ) );
     212    }
     213
     214    // Check if file chunk was uploaded
     215    if (! isset( $_FILES['file_chunk']) || $_FILES['file_chunk']['error'] !== UPLOAD_ERR_OK ) {
     216      $error_msg = 'File upload failed or no file received.';
     217      if ( isset( $_FILES['file_chunk'] ) ) {
     218        $error_msg .= ' Upload error code: ' . $_FILES['file_chunk']['error'];
     219      }
     220      wp_send_json(array('error' => $error_msg));
     221    }
     222
     223    // Get file info
     224    $file_info = json_decode( stripslashes( $_POST['file_info'] ), true );
     225    if ( ! $file_info ) {
     226      wp_send_json(array('error' => 'Invalid file information.'));
     227    }
     228
     229    // Basic file validation
     230    $uploaded_file = $_FILES['file_chunk'];
     231    $file_size = $uploaded_file['size'];
     232    $file_name = $uploaded_file['name'];
     233
     234    // Check file size (5MB chunk should be reasonable)
     235    if ( $file_size > 5 * 1024 * 1024 ) {
     236      wp_send_json(array('error' => 'File chunk too large: ' . $file_size . ' bytes (max: ' . ( 5 * 1024 * 1024 ) . ' bytes)'));
     237    }
     238
     239    // Check if file is empty
     240    if ( $file_size === 0 ) {
     241      wp_send_json( array( 'error' => 'File appears to be empty.' ) );
     242    }
     243
     244    // Check for malicious file extensions
     245    $dangerous_extensions = array('php', 'php3', 'php4', 'php5', 'phtml', 'pl', 'py', 'cgi', 'asp', 'aspx', 'jsp', 'so', 'dll', 'exe', 'bat', 'cmd', 'sh', 'com');
     246    $file_extension = strtolower(pathinfo($file_name, PATHINFO_EXTENSION));
     247    if ( in_array( $file_extension, $dangerous_extensions ) ) {
     248      wp_send_json( array( 'error' => 'File type not allowed for security reasons: ' . $file_extension ) );
     249    }
     250
     251    // Check for ELF headers (Linux executables)
     252    if ( substr( $file_content, 0, 4 ) === "\x7fELF" ) {
     253      wp_send_json(array('error' => 'File appears to be a Linux executable and is not allowed.'));
     254    }
     255
     256    // Check for PE headers (Windows executables)
     257    if ( substr( $file_content, 0, 2 ) === "MZ" ) {
     258      wp_send_json(array('error' => 'File appears to be a Windows executable and is not allowed.'));
     259    }
     260
     261    // Use getID3 to analyze the actual file content
     262    if ( ! class_exists( 'getID3' ) ) {
     263      require( ABSPATH . WPINC . '/ID3/getid3.php' );
     264    }
     265    $getID3 = new getID3;
     266   
     267    // Analyze the uploaded file
     268    $ThisFileInfo = $getID3->analyze($uploaded_file['tmp_name']);
     269   
     270    error_log('validate_file_upload: getID3 analysis: ' . print_r($ThisFileInfo, true));
     271   
     272    // Check if getID3 detected a valid file type
     273    $detected_mime_type = '';
     274    if ( isset( $ThisFileInfo['mime_type'] ) ) {
     275      $detected_mime_type = $ThisFileInfo['mime_type'];
     276
     277    } elseif ( isset( $ThisFileInfo['fileformat'] ) ) {
     278      // Map file formats to MIME types
     279      $format_mime_map = array(
     280        'mp4' => 'video/mp4',
     281        'webm' => 'video/webm',
     282        'ogg' => 'video/ogg',
     283        'avi' => 'video/avi',
     284        'mov' => 'video/mov',
     285        'wmv' => 'video/wmv',
     286        'flv' => 'video/flv',
     287        'mkv' => 'video/mkv',
     288        'mp3' => 'audio/mp3',
     289        'wav' => 'audio/wav',
     290        'm4a' => 'audio/m4a',
     291      );
     292
     293      $detected_mime_type = false;
     294      if ( isset( $format_mime_map[ $ThisFileInfo['fileformat'] ] ) ) {
     295        $detected_mime_type = $format_mime_map[ $ThisFileInfo['fileformat'] ];
     296      }
     297    }
     298
     299    // If getID3 couldn't detect the type, fall back to browser MIME type
     300    if ( empty( $detected_mime_type ) ) {
     301      wp_send_json( array( 'error' => 'File type not supported.' ) );
     302    }
     303
     304    // Define allowed MIME types
     305    $allowed_types = array(
     306      'video/mp4',
     307      'video/webm',
     308      'video/ogg',
     309      'video/avi',
     310      'video/mov',
     311      'video/wmv',
     312      'video/flv',
     313      'video/mkv',
     314      'video/quicktime',
     315      'audio/mp3',
     316      'audio/wav',
     317      'audio/ogg',
     318      'audio/m4a',
     319    );
     320
     321    if ( ! in_array( $detected_mime_type, $allowed_types ) ) {
     322      wp_send_json( array( 'error' => 'File type not allowed: ' . $detected_mime_type ) );
     323    }
     324
     325    // Clean up the uploaded file
     326    unlink( $uploaded_file['tmp_name'] );
     327
     328    // Generate a new nonce for the create_multiupload action
     329    $create_multiupload_nonce = wp_create_nonce( 'fv_flowplayer_create_multiupload' );
     330
     331    wp_send_json(array(
     332      'success' => true,
     333      'message' => 'File validation passed.',
     334      'create_multiupload_nonce'    => $create_multiupload_nonce,
     335      'multiupload_send_part_nonce' => wp_create_nonce( 'fv_flowplayer_multiupload_send_part' ),
     336      'multiupload_abort_nonce'     => wp_create_nonce( 'fv_flowplayer_multiupload_abort' ),
     337      'multiupload_complete_nonce'  => wp_create_nonce( 'fv_flowplayer_multiupload_complete' ),
     338      'validated_file_info'         => $file_info,
     339      'detected_mime_type'          => $detected_mime_type,
     340      'file_analysis'               => array(
     341        'fileformat'  => isset( $ThisFileInfo['fileformat'] ) ? $ThisFileInfo['fileformat'] : 'unknown',
     342        'mime_type'   => $detected_mime_type,
     343        'filesize'    => $file_size
     344      )
     345    ));
     346  }
     347
    209348  function multiupload_send_part() {
    210349    if( !isset($_POST['nonce']) || !wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'fv_flowplayer_multiupload_send_part' ) ) {
  • fv-player/trunk/css/s3-uploader.css

    r3131463 r3336706  
    1 .upload_buttons {
     1.fv-player-upload_buttons {
    22    padding-top: 20px;
    33}
    4 
    5 .upload_buttons .fv-player-s3-upload-cancel-btn, .upload_buttons .fv-player-s3-upload-file-input, .upload_buttons input[type="file"] {
     4.fv-player-upload_buttons:after {
     5    content: '';
     6    clear: both;
     7    display: block;
     8}
     9.fv-player-upload_buttons .fv-player-s3-upload-cancel-btn, .fv-player-upload_buttons .fv-player-s3-upload-file-input, .fv-player-upload_buttons input[type="file"] {
    610    display: none;
    711}
  • fv-player/trunk/freedom-video-player/fv-player.min.js

    r3326358 r3336706  
    1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}if("undefined"!=typeof fv_flowplayer_conf){var FVAbrController,parseIOSVersion=function(e){e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return e&&1<e.length?parseFloat(e[e.length-1].replace("_","."),10):0};try{"object"==_typeof(window.localStorage)&&void 0!==window.localStorage.volume&&delete fv_flowplayer_conf.volume}catch(e){}flowplayer.conf=fv_flowplayer_conf,flowplayer.conf.embed=!1,flowplayer.conf.share=!1,flowplayer.conf.analytics=!1,void 0!==fv_flowplayer_conf.disable_localstorage&&(flowplayer.conf.storage={});try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs&&((FVAbrController=function(e){this.hls=e,this.nextAutoLevel=3}).prototype.nextAutoLevel=function(e){this.nextAutoLevel=e},FVAbrController.prototype.destroy=function(){},flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}),flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&0==flowplayer.support.iOS.version&&(flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)),flowplayer.conf.hlsjs.use_for_safari&&(flowplayer.support.iOS&&13<=parseInt(flowplayer.support.iOS.version)||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&8<=parseInt(flowplayer.support.browser.version))&&(flowplayer.conf.hlsjs.safari=!0),flowplayer.support.fvmobile=!(flowplayer.support.firstframe&&!flowplayer.support.iOS&&!flowplayer.support.android);var fls=flowplayer.support;flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile&&(flowplayer.conf.native_fullscreen=!0),"ontouchstart"in window&&(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&54<fls.browser.version)&&(flowplayer.conf.native_fullscreen=!0),fls.iOS)&&(fv_player_in_iframe()||fls.iOS.version<7)&&(flowplayer.conf.native_fullscreen=!0)}"undefined"!=typeof fv_flowplayer_translations&&(flowplayer.defaults.errors=fv_flowplayer_translations);var fv_player_did_autoplay=!1;function fv_player_videos_parse(e,t){try{var a=JSON.parse(e)}catch(e){return!1}var n;jQuery(a.sources).each(function(e,o){a.sources[e].src=o.src.replace(/(\?[a-z]+=){random}/,"$1"+Math.random())}),flowplayer.support.browser.safari&&(n=[],jQuery(a.sources).each(function(e,o){"video/webm"!=o.type&&n.push(o)}),0<n.length)&&(a.sources=n);var r,e=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)").exec(location.search);return!(null!=e&&"yes"==e[1]||jQuery(window).width()<=480||jQuery(window).height()<=480)||null!=e&&"no"==e[1]||(r=!1,jQuery(a.sources).each(function(e,o){if(!o)return!1;o.mobile&&(a.sources[e]=a.sources[0],a.sources[0]=o,r=!0),r&&jQuery(t).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")})),t.trigger("fv_player_videos_parse",a),a}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return!0}}function fv_escape_attr(e){var o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,function(e){return o[e]})}function fv_player_preload(){function e(){jQuery(".flowplayer.fp-is-embed").each(function(){var e=jQuery(this);e.hasClass("has-chapters")||e.hasClass("has-transcript")||0!=jQuery(".fp-playlist-external[rel="+e.attr("id")+"]").length||e.height(jQuery(window).height())})}if(flowplayer.support.touch&&(jQuery(".fp-playlist-external.fp-playlist-horizontal.fv-playlist-design-2017").addClass("visible-captions"),jQuery(".fp-playlist-external.fp-playlist-vertical.fv-playlist-design-2017").addClass("visible-captions")),flowplayer(function(n,r){localStorage.flowplayerTestStorage&&delete localStorage.flowplayerTestStorage;var e,o,t,i=(r=jQuery(r)).find(".fp-player"),l=!1,a=n.conf.splash,s=(r.hasClass("fixed-controls")&&r.find(".fp-controls").on("click",function(e){n.loading||n.ready||(e.preventDefault(),e.stopPropagation(),n.load())}),0==r.data("volume")&&r.hasClass("no-controlbar")&&r.find(".fp-volume").remove(),jQuery(".fp-playlist-external[rel="+r.attr("id")+"]")),f=((!n.conf.playlist||0==n.conf.playlist.length)&&s.length&&0<s.find("a[data-item]").length?(o=[],s.find("a[data-item]").each(function(){(e=fv_player_videos_parse(jQuery(this).attr("data-item"),r))?o.push(e):jQuery(this).remove()}),n.conf.playlist=o,n.conf.clip=o[0]):n.conf.clip||(n.conf.clip=fv_player_videos_parse(jQuery(r).attr("data-item"),r)),jQuery("a",s).on("click",function(e){e.preventDefault(),l=!0;var e=jQuery(this),o=jQuery(".fp-playlist-external[rel="+r.attr("id")+"]"),o=jQuery("a",o).index(this),t=e.prev("a"),a=e.data("item");if(e.closest(".fv-playlist-draggable.is-dragging").length)return!1;if(location.href.match(/wp-admin/)&&0<e.parents(".fv-player-editor-preview").length)return fv_flowplayer_conf.current_video_to_edit=o,e.parents(".fv-player-custom-video").find(".edit-video .fv-player-editor-button").trigger("click"),!1;if(t.length&&e.is(":visible")&&!t.is(":visible"))return t.trigger("click"),!1;if(!jQuery("#"+e.parent().attr("rel")).hasClass("dynamic-playlist")){if(fv_player_playlist_active(jQuery(".fp-playlist-external[rel="+r.attr("id")+"]"),this),n){if(n.error&&(n.pause(),n.error=n.loading=!1,r.removeClass("is-error"),r.find(".fp-message.fp-shown").remove()),!n.video||n.video.index==o)return;n.play(o)}t=(t=a.splash)||e.find("img").attr("src");u(r,i,a,t),r[0].getBoundingClientRect().bottom-100<0&&jQuery("html, body").animate({scrollTop:jQuery(r).offset().top-100},300)}}),jQuery("[rel="+r.attr("id")+"]")),p=!1,c=r.find(".fp-splash"),d=r.find(".fv-fp-splash-text");function u(e,o,t,a){e=e.find("img.fp-splash");a?(0==e.length&&(e=jQuery('<img class="fp-splash" />'),o.prepend(e)),e.attr("alt",t.fv_title?fv_escape_attr(t.fv_title):"video"),e.removeAttr("srcset"),e.attr("src",a)):e.length&&e.remove()}n.bind("load",function(e,o,t){var a;o.conf.playlist.length&&(t.type.match(/^audio/)&&!l&&(a=(a=(t=(o=f.find("a").eq(t.index)).data("item")).splash)||o.find("img").attr("src"),u(r,i,t,a)),l=!1)}),n.bind("ready",function(e,o,t){setTimeout(function(){var e;-1<t.index&&0<f.length&&(e=jQuery("a",f).eq(t.index),fv_player_playlist_active(f,e),p=e.find(".fvp-progress"))},100),c=r.find(".fp-splash"),t.is_audio_stream||t.type.match(/^audio/)||(window.fv_player_pro&&window.fv_player_pro.autoplay_scroll||r.data("fvautoplay")||!a||"application/x-mpegurl"==o.video.type?o.one("progress",function(){c.remove(),d.remove()}):(c.remove(),d.remove()))}),n.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove(),jQuery(".fp-playlist-external a").removeClass("is-active");var e=i.find("iframe.fp-engine");e.length?(e.after(d),e.after(c)):(i.prepend(d),i.prepend(c)),p=!1}),n.bind("progress",function(e,o,t){p.length&&o.playlist_thumbnail_progress&&o.playlist_thumbnail_progress(p,o.video,t)}),n.bind("error-subtitles",function(){console.log("error-subtitles"),fv_player_notice(r,fv_flowplayer_translations[8],2e3)}),(s=jQuery(r).parent().find("div.fp-playlist-vertical[rel="+jQuery(r).attr("id")+"]")).length&&((t=function(){var e=s.hasClass("fp-playlist-only-captions")?"height":"max-height";s.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")&&(e="max-height"),s.css(e,(()=>{var e=r.height();return e=0==e?r.css("max-height"):e})()),"max-height"==e&&s.css("height","auto")})(),jQuery(window).on("resize tabsactivate",function(){setTimeout(t,0)})),n.show_status=function(e){var t="";["loading","ready","playing","paused","seeking"].every(function(e,o){return n[e]&&(t+=" "+e),!0}),console.log("FV Player Status ("+e+")",t)},window.fv_player_loaded||(window.fv_player_loaded=!0,setTimeout(function(){jQuery(document).trigger("fv_player_loaded");var e=new CustomEvent("fv_player_loaded",[]);document.dispatchEvent(e)},100)),setTimeout(function(){r.trigger("fv_player_loaded")},10),r.data("error")&&(n.message(r.data("error")),r.find(".fp-controls").remove(),r.find(".fp-header").css("opacity",1).show(),n.conf.clip={sources:[{src:!1,type:"video/mp4"}]},n.on("load",function(e){e.preventDefault(),e.stopPropagation()}))}),window.self==window.top||location.href.match(/fv_player_preview/)||(e(),jQuery(window.self).resize(e)),"undefined"!=typeof fv_flowplayer_playlists)for(var o in fv_flowplayer_playlists)fv_flowplayer_playlists.hasOwnProperty(o)&&jQuery("#"+o).flowplayer({playlist:fv_flowplayer_playlists[o]});fv_player_load(),fv_video_link_autoplay(),jQuery(document).ajaxComplete(function(){fv_player_load()}),jQuery(window).on("hashchange",fv_video_link_autoplay)}function fv_player_load(i){i&&1<i.lenght&&console.log("FV Player: Can't use fv_player_load with more than a single forced element!");var l=!1;if((i||jQuery(".flowplayer")).each(function(e,o){var t=jQuery(o),o=t.data("flowplayer");if(o)i&&(l=o);else{i&&(t.find(".fp-preload, .fvfp_admin_error").remove(),t.attr("data-item-lazy")?(t.attr("data-item",t.attr("data-item-lazy")),t.removeAttr("item-lazy")):(a=jQuery("[rel="+t.attr("id")+"]"))&&a.find("a[data-item-lazy]").each(function(e,o){(o=jQuery(o)).attr("data-item",o.attr("data-item-lazy")),o.removeAttr("data-item-lazy")}));var a,n,o=!1;if(t.attr("data-item"))o={clip:fv_player_videos_parse(t.attr("data-item"),t)};else if(a=jQuery("[rel="+t.attr("id")+"]")){if(0==a.find("a[data-item]").length)return;var r=[];a.find("a[data-item]").each(function(){(n=fv_player_videos_parse(jQuery(this).attr("data-item"),t))?r.push(n):jQuery(this).remove()}),o={playlist:r}}o&&(o=flowplayer.extend(o,t.data()),l=flowplayer(t[0],o),t.data("freedomplayer",l),t.data("flowplayer",l))}}),jQuery(".fv-playlist-slider-wrapper").each(function(){var e=jQuery(this).find("a:visible");(e=0===e.length?jQuery(this).find("a"):e).length&&(e=e.outerWidth()*e.length,jQuery(this).find(".fp-playlist-external").attr("style","width: "+e+"px; max-width: "+e+"px !important"))}),void 0!==jQuery().tabs&&(jQuery("body").removeClass("fv_flowplayer_tabs_hide"),jQuery(".fv_flowplayer_tabs_content").tabs()),i&&l)return l}function fv_player_playlist_active(e,o){e&&(jQuery("a",e).removeClass("is-active"),jQuery(".now-playing").remove());var t,e=jQuery(e),o=jQuery(o),a=!1,n=(o.addClass("is-active"),e.hasClass("fv-playlist-design-2014"));(n&&0==o.find("h4").length||!n)&&0==o.find(".now-playing").length&&o.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>"),e.parent().find(".flowplayer").length||(a=!0),(e.hasClass("fp-playlist-vertical")||e.hasClass("fp-playlist-horizontal")&&e.hasClass("is-audio"))&&!(e=>{var o=e.getBoundingClientRect(),t=o.top,a=t+o.height,e=e.parentNode;do{if(o=e.getBoundingClientRect(),a<=o.bottom==!1)return;if(t<=o.top)return;e=e.parentNode}while(e!=document.body);return a<=document.documentElement.clientHeight})(o.get(0))?(t=a?e.parent():e).animate({scrollTop:t.scrollTop()+(o.position().top-t.position().top)},750):e.hasClass("fp-playlist-horizontal")&&!(e=>{var o=e.getBoundingClientRect(),t=o.left,a=t+o.width,e=e.parentNode;do{if(o=e.getBoundingClientRect(),a<=o.right==!1)return;if(t<=o.left)return;e=e.parentNode}while(e!=document.body);return a<=document.documentElement.clientWidth})(o.get(0))&&(t=a?e.parent():e).animate({scrollLeft:t.scrollLeft()+(o.position().left-t.position().left)},750)}function fv_parse_sharelink(e){var o,t="fvp_";return(e=e.replace("https?://[^./].","")).match(/(youtube.com)/)?t+e.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]:e.match(/(vimeo.com)|(youtu.be)/)?t+e.match(/(?:\/)([^/]*$)/)[1]:(o=e.match(/(?:\/)([^/]*$)/))?t+o[1].match(/^[^.]*/)[0]:t+e}function fv_player_get_video_link_hash(e){var o=fv_parse_sharelink((void 0!==e.video.sources_original&&void 0!==e.video.sources_original[0]?e.video.sources_original:e.video.sources)[0].src);return o=void 0!==e.video.id?fv_parse_sharelink(e.video.id.toString()):o}function fv_player_time_hms(e){var o,t,a;return isNaN(e)?NaN:(o=parseInt(e,10),t=Math.floor(o/3600),a=Math.floor(o/60)%60,e=o%60,t?t+="h":t="",t&&a<10?a="0"+a+"m":a?a+="m":a="",(t||a)&&e<10&&(e="0"+e),t+a+(e+="s"))}function fv_player_time_hms_ms(e){var o;return isNaN(e)?NaN:(o=void 0!==(o=((e=parseFloat(e).toFixed(3))+"").split("."))[1]&&0<o[1]?o[1]+"ms":"",fv_player_time_hms(e)+o)}function fv_player_time_seconds(e,o){var t;return e?(t=0,e.match(/(\d+[a-z]{1,2})/g).forEach(function(e){e.endsWith("h")?t+=3600*parseInt(e):e.endsWith("m")?t+=60*parseInt(e):e.endsWith("s")&&!e.endsWith("ms")?t+=parseInt(e):e.endsWith("ms")&&parseInt(e)&&(t+=parseInt(e)/1e3)}),o?Math.min(t,o):t):-1}function fv_autoplay_init(e,t,o,a,n){var r,i,l;!fv_autoplay_exec_in_progress&&(fv_autoplay_exec_in_progress=!0,r=e.data("flowplayer"))&&(i=fv_player_time_seconds(o),n=fv_player_time_seconds(n),a=fv_player_time_seconds(a),e.parent().hasClass("ui-tabs-panel")&&(o=e.parent().attr("id"),jQuery("[aria-controls="+o+"] a").trigger("click")),e.find(".fp-player").attr("class").match(/\bis-sticky/)||(l=jQuery(e).offset().top-(jQuery(window).height()-jQuery(e).height())/2,window.scrollTo(0,l),r.one("ready",function(){window.scrollTo(0,l)})),e.hasClass("lightboxed")&&setTimeout(function(){jQuery("[href=\\#"+e.attr("id")+"]").trigger("click")},0),t?fv_player_video_link_autoplay_can(r,parseInt(t))?r.ready?fv_player_video_link_seek(r,i,n,a):(r.play(parseInt(t)),r.one("ready",function(){fv_player_video_link_seek(r,i,n,a)})):flowplayer.support.inlineVideo&&(r.one(r.playing?"progress":"ready",function(e,o){o.play(parseInt(t)),o.one("ready",function(){fv_player_video_link_seek(o,i,n,a)})}),e.find(".fp-splash").attr("src",jQuery("[rel="+e.attr("id")+"] div").eq(t).find("img").attr("src")).removeAttr("srcset"),fv_player_in_iframe()||fv_player_notice(e,fv_flowplayer_translations[11],"progress")):r.ready?fv_player_video_link_seek(r,i,n,a):(fv_player_video_link_autoplay_can(r)?r.load():fv_player_in_iframe()||fv_player_notice(e,fv_flowplayer_translations[11],"progress"),r.one("ready",function(){fv_player_video_link_seek(r,i,n,a)})))}function fv_player_video_link_seek(e,o,t,a){fv_autoplay_exec_in_progress=!1;var n=setInterval(function(){e.loading||((0<o||0<e.video.time)&&(e.custom_seek?e.custom_seek(o):e.seek(o)),t&&a&&e.trigger("link-ab",[e,a,t]),clearInterval(n))},10)}jQuery(document).ready(function(){var e=0,o=setInterval(function(){++e<1e3&&(window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&!window.FV_Player_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro||window.fv_player_user_playlists&&!window.fv_player_user_playlists.is_loaded||window.FV_Player_JS_Loader_scripts_total&&window.FV_Player_JS_Loader_scripts_loaded<window.FV_Player_JS_Loader_scripts_total)||(clearInterval(o),fv_player_preload())},10)});var fv_autoplay_exec_in_progress=!1;function fv_video_link_autoplay(){var e,i,l,s,f,p=!0;"undefined"!=typeof flowplayer&&"undefined"!=typeof fv_flowplayer_conf&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length&&(e=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(","),i=e[0],l=void 0!==e[1]&&e[1],s=void 0!==e[2]&&e[2],f=void 0!==e[3]&&e[3],jQuery(".flowplayer").each(function(){var e=jQuery(this),o=(e=e.hasClass("lightbox-starter")?jQuery(e.attr("href")):e).data("flowplayer");if(o){var t,a=void 0!==o.conf.playlist&&1<o.conf.playlist.length?o.conf.playlist:[o.conf.clip];for(t in a)if(a.hasOwnProperty(t)){var n=void 0!==a[t].id&&fv_parse_sharelink(a[t].id.toString());if(i===n&&p)return 0<o.conf.playlist.length?o.conf.playlist[t].prevent_position_restore=!0:o.conf.clip.prevent_position_restore=!0,console.log("fv_autoplay_exec for "+n,t),fv_autoplay_init(e,parseInt(t),l,s,f),p=!1}for(t in a)if(a.hasOwnProperty(t)){var r=fv_parse_sharelink(a[t].sources[0].src);if(i===r&&p)return 0<o.conf.playlist.length?o.conf.playlist[t].prevent_position_restore=!0:o.conf.clip.prevent_position_restore=!0,console.log("fv_autoplay_exec for "+r,t),fv_autoplay_init(e,parseInt(t),l,s,f),p=!1}}}))}function fv_player_video_link_autoplay_can(e,o){return!("video/youtube"==(o?e.conf.playlist[o]:e.conf.clip).sources[0].type&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())&&flowplayer.support.firstframe}function fv_player_notice(e,o,t){var a=jQuery(".fvfp-notices",e),n=(a.length||(a=jQuery('<div class="fvfp-notices">'),jQuery(".fp-player",e).append(a)),jQuery('<div class="fvfp-notice-content">'+o+"</div></div>"));return a.append(n),"string"==typeof t&&jQuery(e).data("flowplayer").on(t,function(){n.fadeOut(100,function(){jQuery(this).remove()})}),0<t&&setTimeout(function(){n.fadeOut(2e3,function(){jQuery(this).remove()})},t),n}var fv_player_clipboard=function(e,o,t){if(navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)navigator.clipboard.writeText(e).then(function(){o()},function(){void 0!==t&&t()});else try{fv_player_doCopy(e)?o():void 0!==t&&t()}catch(e){void 0!==t&&t(e)}};function fv_player_doCopy(e){var o,t,a,n=document.createElement("textarea"),e=(n.value=e,n.style.opacity=0,n.style.position="absolute",n.setAttribute("readonly",!0),document.body.appendChild(n),0<document.getSelection().rangeCount&&document.getSelection().getRangeAt(0));navigator.userAgent.match(/ipad|ipod|iphone/i)?(o=n.contentEditable,n.contentEditable=!0,(t=document.createRange()).selectNodeContents(n),(a=window.getSelection()).removeAllRanges(),a.addRange(t),n.setSelectionRange(0,999999),n.contentEditable=o):n.select();try{var r=document.execCommand("copy");return e&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(e)),document.body.removeChild(n),r}catch(e){throw new Error("Unsuccessfull")}}function fv_player_log(e,o){fv_flowplayer_conf.debug&&"undefined"!=typeof console&&"function"==typeof console.log&&(o?console.log(e,o):console.log(e)),fv_flowplayer_conf.debug&&void 0!==window.location.search&&window.location.search.match(/fvfp/)&&jQuery("body").prepend(e+"<br />")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function is_ga_4(e){return!(void 0===e.conf.fvanalytics||!e.conf.fvanalytics||!e.conf.fvanalytics.startsWith("G-"))}function fv_player_track(e,o,t,a,n,r){if("object"!=_typeof(e)&&(r=n,n=a,a=t,t=o,o=e,e=!1),o=o||flowplayer.conf.fvanalytics,void 0===a&&(a="Unknown engine"),/fv_player_track_debug/.test(window.location.href)&&console.log("FV Player Track: "+t+" - "+a+" '"+n+"'",r),"undefined"!=typeof gtag)is_ga_4(e)&&"Heartbeat"!==n?gtag("event",t,{video_title:n,video_current_time:e.video.time,video_provider:a,video_duration:e.video.duration,value:r||1}):gtag("event",t,{event_category:a,event_label:n,value:r||1});else if(o&&"undefined"!=typeof ga)ga("create",o,"auto",n,{allowLinker:!0}),ga("require","linker"),r?ga("send","event",t,a,n,r):ga("send","event",t,a,n);else if(o&&"undefined"!=typeof _gat){e=_gat._getTracker(o);if(void 0===e._setAllowLinker)return;e._setAllowLinker(!0),r?e._trackEvent(t,a,n,r):e._trackEvent(t,a,n)}flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&"undefined"!=typeof _paq&&(r?_paq.push(["trackEvent",t,a,n,r]):_paq.push(["trackEvent",t,a,n]))}function fv_player_track_name(e,o){e=e.attr("title");return(e=(e=e||void 0===o.fv_title?e:o.fv_title)||void 0===o.title?e:o.title)||void 0===o.src||(e=o.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,""),o.type.match(/mpegurl/)&&(e=o.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+e)),e}function freedomplayer_playlist_size_check(){jQuery(".fp-playlist-external").each(function(){var e=jQuery(this),o=e.parent().width(),t=e.css("max-width").match(/%/)?e.width():parseInt(e.css("max-width")),t=0<t&&t<o?t:o;900<=e.parent().width()?e.addClass("is-wide"):e.removeClass("is-wide"),(e.hasClass("fp-playlist-polaroid")||e.hasClass("fp-playlist-version-one")||e.hasClass("fp-playlist-version-two"))&&(o=e.hasClass("fp-playlist-version-one")||e.hasClass("fp-playlist-version-two")?200:150,8<(t=Math.floor(t/o))?t=8:t<2&&(t=2),e.css("--fp-playlist-items-per-row",String(t)))})}flowplayer(function(t,r){var n,i,o,l,a,s;function e(){var e;"dash"==t.engine.engineName?((e=l[t.engine.dash.getQualityFor("video")]).qualityIndex!=a&&(a=e.qualityIndex,f(e.qualityIndex,l)),o.match(/dash_debug/)&&p(e.width,e.height,e.bitrate)):"hlsjs-lite"==t.engine.engineName&&(n.currentLevel!=a&&(a=n.currentLevel,f(n.currentLevel,n.levels)),o.match(/hls_debug/))&&(e=n.levels[n.currentLevel])&&p(e.width,e.height,e.bitrate)}function f(e,o){var t,a,n;o[e]&&(t=o[e].height,a=541,n=1e5,jQuery(o).each(function(e,o){720<=o.height&&o.height<1400&&(a=720),o.height<n&&(n=o.height),localStorage.FVPlayerHLSQuality==o.height&&(r.find("a[data-quality]").removeClass("fp-selected fp-color"),r.find("a[data-quality="+e+"]").addClass("fp-selected fp-color"))}),r.find("a[data-quality]").removeClass("is-current"),r.find("a[data-quality="+e+"]").addClass("is-current"),o=1400<=t?"4K":a<=t?"HD":360<=t&&n<t?"SD":"SD",r.find(".fp-qsel").html(o))}function p(e,o,t){s.html("Using "+e+"x"+o+" at "+Math.round(t/1024)+" kbps")}function c(){var t=r.find(".fp-qsel-menu");t.children().each(function(e,o){t.prepend(o)}),t.children().each(function(e,o){var t;/^NaNp/.test(jQuery(o).html())?(t=jQuery(o).html().match(/\((.*?)\)/))&&void 0!==t[1]&&jQuery(o).html(t[1]):jQuery(o).html(jQuery(o).html().replace(/\(.*?\)/,""))}),t.prepend(t.find("a[data-quality=-1]")),t.prepend(t.find("strong"))}r=jQuery(r),void 0===t.conf.disable_localstorage&&(i=t.conf.splash,flowplayer.engine("hlsjs-lite").plugin(function(e){(n=e.hls).on(Hls.Events.ERROR,function(e,o){"mediaError"==o.type&&"fragParsingError"==o.details&&1==o.fatal&&(n.destroy(),t.trigger("error",[t,{code:3}]),setTimeout(function(){r.removeClass("is-seeking"),r.addClass("is-paused")},0))}),flowplayer.support.browser.safari&&n.on(Hls.Events.KEY_LOADED,function(e){"hlsKeyLoaded"==e&&setTimeout(function(){t.loading&&(console.log("FV Player: Safari stuck loading HLS, resuming playback..."),t.resume())},0)});var a=!(!flowplayer.conf.hd_streaming||flowplayer.support.fvmobile)&&720;localStorage.FVPlayerHLSQuality&&(a=localStorage.FVPlayerHLSQuality),(a=0==jQuery(e.root).data("hd_streaming")?!1:a)&&n.on(Hls.Events.MANIFEST_PARSED,function(e,o){var t=!1;jQuery.each(o.levels,function(e,o){o.height==a&&(t=e)}),localStorage.FVPlayerHLSQuality||t||jQuery.each(o.levels,function(e,o){o.height>t&&(t=e)}),t&&(console.log("FV Player: Picked "+o.levels[t].height+"p quality"),n.startLevel=t,n.currentLevel=t)})}),r=jQuery(r),o=document.location.search,localStorage.FVPlayerDashQuality&&(t.conf.dash||(t.conf.dash={}),t.conf.dash.initialVideoQuality="restore"),r.on("click",".fp-qsel-menu a",function(){var e;"hlsjs-lite"==t.engine.engineName&&(-1==(e=jQuery(this).data("quality"))?localStorage.removeItem("FVPlayerHLSQuality"):(e=n.levels[e],localStorage.FVPlayerHLSQuality=e.height))}),0!=r.data("hd_streaming")&&(localStorage.FVPlayerHLSQuality?(t.conf.hlsjs.startLevel=parseInt(localStorage.FVPlayerHLSQuality),t.conf.hlsjs.testBandwidth=!1,t.conf.hlsjs.autoLevelEnabled=!1):flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile&&(t.conf.hlsjs.startLevel=3,t.conf.hlsjs.testBandwidth=!1,t.conf.hlsjs.autoLevelEnabled=!1)),t.bind("quality",function(e,o,t){"dash"==o.engine.engineName&&(-1==t?localStorage.removeItem("FVPlayerDashQuality"):l[t]&&(localStorage.FVPlayerDashQuality=l[t].height))}),l=[],a=-1,t.bind("ready",function(e,o){var a;r.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality),"dash"==o.engine.engineName?(l=o.engine.dash.getBitrateInfoListFor("video"),localStorage.FVPlayerDashQuality&&o.conf.dash.initialVideoQuality&&o.quality(o.conf.dash.initialVideoQuality),c()):"hlsjs-lite"==o.engine.engineName?(i&&(r.addClass("is-loading"),o.loading=!0,o.one("progress",function(){o.loading&&(r.removeClass("is-loading"),o.loading=!1)})),o.video.qualities&&2<o.video.qualities.length&&(a=-1,0!=r.data("hd_streaming")&&(localStorage.FVPlayerHLSQuality?jQuery(o.video.qualities).each(function(e,o){if(o.value==localStorage.FVPlayerHLSQuality)return a=localStorage.FVPlayerHLSQuality,!1}):flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile&&jQuery(o.video.qualities).each(function(e,o){var t=parseInt(o.label);0<t&&-1==a&&720<=t&&t<=720&&(a=o.value)}),-1<(a=parseInt(a)))&&r.one("progress",function(){setTimeout(function(){o.quality(a)})}),c())):o.video.sources_fvqs&&0<o.video.sources_fvqs.length&&o.video.src.match(/vimeo.*?\.mp4/)&&setTimeout(c,0),r.find("a[data-quality]").removeClass("is-current")}),(o.match(/dash_debug/)||o.match(/hls_debug/))&&(s=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(r.find(".fp-player"))),t.bind("ready progress",e),t.bind("quality",function(){setTimeout(e,0)}))}),flowplayer(function(a,s){var n,r,e,o,t,s=jQuery(s),i=flowplayer.bean,l=0,f=0,p=("undefined"==typeof ga&&a.conf.fvanalytics&&"undefined"==typeof _gat&&"undefined"==typeof gtag&&(is_ga_4(a)?jQuery.getScript({url:"https://www.googletagmanager.com/gtag/js?id="+a.conf.fvanalytics,cache:!0},function(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config",a.conf.fvanalytics)}):jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:!0},function(){ga("create",a.conf.fvanalytics,"auto")})),!window._paq&&a.conf.matomo_domain&&a.conf.matomo_site_id&&(e="//"+a.conf.matomo_domain+"/",(t=window._paq=window._paq||[]).push(["setTrackerUrl",e+"matomo.php"]),t.push(["setSiteId",a.conf.matomo_site_id]),o=(t=document).createElement("script"),t=t.getElementsByTagName("script")[0],o.type="text/javascript",o.async=!0,o.src=e+"matomo.js",t.parentNode.insertBefore(o,t)),a.bind("progress",function(e,o,t){if(1<t){var a=o.video,n=a.duration,r=0,i=fv_player_track_name(s,a);if(4<n&&(19*n/20<t?r=4:3*n/4<t?r=3:n/2<t?r=2:n/4<t&&(r=1)),o.live&&(r=0),!s.data("fv_track_"+p[r])){for(var l in p)if(p.hasOwnProperty(l)){if(l==r)break;if(!s.data("fv_track_"+p[l]))return}s.trigger("fv_track_"+p[r].replace(/ /,"_"),[o,i]),s.data("fv_track_"+p[r],!0),fv_player_track(o,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+p[r],o.engine.engineName+"/"+a.type,i)}}}).bind("finish ready ",function(e,o){for(var t in p)p.hasOwnProperty(t)&&s.removeData("fv_track_"+p[t])}).bind("error",function(e,o,t){setTimeout(function(){var e;o.error&&((e=void 0!==o.video&&void 0!==o.video.src&&o.video)||void 0===o.conf.clip||void 0===o.conf.clip.sources||void 0===o.conf.clip.sources[0]||void 0===o.conf.clip.sources[0].src||(e=o.conf.clip.sources[0]),!(e=fv_player_track_name(s,e))||e.match(/\/\/vimeo.com\/\d/)||is_ga_4(o)||fv_player_track(o,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+"error",t.message,e))},100)}),a.bind("load unload",c).bind("progress",function(e,o){o.seeking||(l+=f?+new Date-f:0,f=+new Date),n=n||setTimeout(function(){n=null,c({type:"heartbeat"})},6e5)}).bind("pause",function(){f=0}),a.bind("shutdown",function(){i.off(window,"visibilitychange pagehide",c)}),i.on(window,"visibilitychange pagehide",c),is_ga_4(a)?["Play","25 Percent Played","50  Percent Played","75 Percent Played","100 Percent Played"]:["start","first quartile","second quartile","third quartile","complete"]);function c(e,o,t){"visible"===document.visibilityState&&"load"!==e.type&&"heartbeat"!==e.type||(t=t||a.video,"load"===e.type&&(r=fv_player_track_name(s,t)),l&&(fv_player_track(a,!1,"Video / Seconds played",a.engine.engineName+"/"+a.video.type,r,Math.round(l/1e3)),l=0,n)&&(clearTimeout(n),n=null))}a.get_time_played=function(){return l/1e3}}),flowplayer(function(n,r){var i=(r=jQuery(r)).find(".fp-player"),l=r.hasClass("fp-full"),s=0;function o(){var e=i.width()||r.width(),o=n.video.index||0,t=(900<e?jQuery(".fp-subtitle",r).addClass("is-wide"):jQuery(".fp-subtitle",r).removeClass("is-wide"),e<480+35*s),o=(void 0!==n.fv_timeline_chapters_data&&void 0!==n.fv_timeline_chapters_data[o]&&(t=!0),l||r.toggleClass("fp-full",r.hasClass("has-abloop")||t),""),t=(e<400?o="is-tiny":e<600&&400<=e&&(o="is-small"),r.trigger("fv-player-size",[o]),i),e=((t=r.parent().hasClass("fp-playlist-vertical-wrapper")||r.parent().hasClass("fp-playlist-text-wrapper")?r.parent():t).width()<=560?t.addClass("is-fv-narrow"):t.removeClass("is-fv-narrow"),r.find(".fp-controls")),o=e.parent().width(),t=e.find(".fp-duration, .fp-playbtn"),a=0;t.removeClass("wont-fit"),r.find(".fp-controls").children(":visible:not(.fp-timeline)").each(function(){a+=jQuery(this).outerWidth(!0)}),o<a&&t.addClass("wont-fit")}o();function e(){clearTimeout(f),f=setTimeout(t,a)}var t,a,f;t=o,a=250;window.addEventListener("resize",e),"fonts"in document&&n.one("load",function(){document.fonts.load("1em flowplayer")}),n.on("ready fullscreen fullscreen-exit sticky sticky-exit",function(e){setTimeout(function(){s=r.find(".fp-controls > strong:visible").length+r.find(".fp-controls > .fp-icon:visible").length,o()},0)}),n.on("unload pause finish error",function(){"undefined"!=typeof checker&&clearInterval(checker)})}),jQuery(window).on("resize tabsactivate",freedomplayer_playlist_size_check),jQuery(document).ready(freedomplayer_playlist_size_check),flowplayer(function(o,a){a=jQuery(a),o.setLogoPosition=function(){var e=freedomplayer.support.browser.safari&&parseFloat(freedomplayer.support.browser.version)<14.1||freedomplayer.support.iOS&&parseFloat(freedomplayer.support.iOS.version)<15;o.conf.logo_over_video&&o.video&&o.video.width&&o.video.height&&!e?a.find(".fp-logo").css("--fp-aspect-ratio",(o.video.width/o.video.height).toFixed(2)):a.find(".fp-logo").css("width","100%").css("height","100%")},o.bind("ready",function(e,o,t){o.setLogoPosition(),t.remove_black_bars?a.addClass("remove-black-bars"):a.removeClass("remove-black-bars"),/Chrome/.test(navigator.userAgent)&&54<parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)&&(o.video.subtitles?jQuery(a).addClass("chrome55fix-subtitles"):jQuery(a).addClass("chrome55fix"))});var e=a.css("background-image");if(e){if(!(e=e.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(","))||!e[0].match(/^(https?:)?\/\//))return;var t=new Image,e=(t.src=e[0],t.height/t.width),t=a.height()/a.width();Math.abs(t-e)<.05&&a.css("background-size","cover")}var n=!1;jQuery(o.conf.playlist).each(function(e,o){o.sources[0].type.match(/youtube/)&&(n=!0)}),n&&a.addClass("is-youtube"),o.bind("ready",function(e,o,t){"video/youtube"==t.type?a.addClass("is-youtube"):a.removeClass("is-youtube")})}),(e=>{e(window).on("resize",function(){e("iframe[id][src][height][width]").each(function(){e(this).attr("id").match(/fv_vimeo_/)&&e(this).width()<=e(this).attr("width")&&e(this).height(e(this).width()*e(this).attr("height")/e(this).attr("width"))}),jQuery(".wistia_embed").each(function(){e(this).height(e(this).width()*e(this).data("ratio"))})}).trigger("resize")})(jQuery),jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(e,o){var t=jQuery(o.oldPanel).find(".flowplayer").data("flowplayer");void 0!==t&&t.pause(),jQuery(".flowplayer",o.newPanel).data("flowplayer").load()}),flowplayer(function(o,a){a=jQuery(a);var e=flowplayer.bean;a.hasClass("is-audio")&&(e.off(a[0],"mouseenter"),e.off(a[0],"mouseleave"),a.removeClass("is-mouseout"),a.addClass("fixed-controls").addClass("is-mouseover"),o.on("error",function(e,o,t){jQuery(".fp-message",a).html(jQuery(".fp-message",a).html().replace(/video/,"audio"))}),a.on("click",function(e){o.ready||(e.preventDefault(),e.stopPropagation(),o.load())}))}),jQuery(document).on("mfpClose",function(){void 0!==jQuery(".flowplayer").data("flowplayer")&&jQuery(".flowplayer").data("flowplayer").unload()}),jQuery(document).on("click",".vc_tta-tab a",function(){var e=jQuery(".flowplayer.is-playing").data("flowplayer");e&&e.pause()}),flowplayer(function(e,o){o=jQuery(o),e.bind("ready",function(){setTimeout(function(){var e=jQuery("video",o);0<e.length&&e.prop("autoplay",!1)},100),o.find("video.fp-engine").addClass("intrinsic-ignore")})}),jQuery(".flowplayer").on("ready",function(e,o){/BB10/.test(navigator.userAgent)&&o.fullscreen()});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var o=!1;jQuery(".flowplayer").each(function(){if(jQuery(this).is(":visible")&&!jQuery(this).hasClass("lightboxed")&&!jQuery(this).hasClass("lightbox-starter")&&!jQuery(this).hasClass("is-audio")&&(jQuery(this).width()<30||jQuery(this).height()<20)){o=!0;var e=jQuery(this);while(jQuery(e).width()<30||jQuery(e).width()==jQuery(this).width()){if(0==jQuery(e).parent().length)break;(e=jQuery(e).parent()).hasClass("ld-video")&&(""==e[0].style.height&&e.css("height","auto"),0<parseInt(e.css("padding-bottom")))&&e.css("padding-bottom","0")}jQuery(this).width(jQuery(e).width()),jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio"))),fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=e}}),o&&jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]&&(jQuery(this).width(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")].width()),jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio"))))})})}void 0!==flowplayer.conf.safety_resize&&flowplayer.conf.safety_resize&&jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)});var fv_autoplay_type,fv_player_scroll_autoplay,fv_player_scroll_autoplay_last_winner,fv_player_scroll_int,fv_player_warning,isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fv_player_lightbox_bind(){jQuery(".freedomplayer.lightbox-starter").each(function(){var e,o=jQuery(this);(parseInt(o.css("width"))<10||parseInt(o.css("height"))<10)&&((e=o.find(".fp-ratio")).length<1&&(o.append('<div class="fp-ratio"></div>'),e=o.find(".fp-ratio")),e.css("paddingTop",100*o.data("ratio")+"%")),o.find(".fp-preload").remove()})}function fv_flowplayer_mobile_switch(e){var o,t=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)").exec(location.search);!(null!=t&&"yes"==t[1]||jQuery(window).width()<=480||jQuery(window).height()<=480)||null!=t&&"no"==t[1]||(o=!1,jQuery("#wpfp_"+e+" video source").each(function(){jQuery(this).attr("id")!="wpfp_"+e+"_mobile"&&(o=!0,jQuery(this).remove())}),o&&jQuery("#wpfp_"+e).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>"))}if(isIE11&&(jQuery(document).ready(function(){jQuery(".fp-waiting").hide()}),flowplayer(function(e,o){e.bind("load",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("beforeseek",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("progress",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("seek",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("fullscreen",function(e){jQuery("#wpadminbar").hide()}).bind("fullscreen-exit",function(e){jQuery("#wpadminbar").show()})})),flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)<9&&jQuery(".flowplayer").each(function(){jQuery(this).css("width",jQuery(this).css("max-width")),jQuery(this).css("height",jQuery(this).css("max-height"))}),location.href.match(/elementor-preview=/)?(console.log("FV Player: Elementor editor is active"),setInterval(fv_player_load,1e3)):location.href.match(/brizy-edit-iframe/)?(console.log("FV Player: Brizy editor is active"),setInterval(fv_player_load,1e3)):"blob:"===location.protocol&&setTimeout(function(){jQuery("body.block-editor-iframe__body").length&&(console.log("FV Player: Site Editor is active"),setInterval(fv_player_load,1e3))},0),window.DELEGATE_NAMES&&flowplayer(function(e,o){fv_player_notice(o,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)}),flowplayer(function(e,o){flowplayer.bean.off(o,"contextmenu")}),location.href.match(/elementor-preview=/)&&(console.log("FV Player: Elementor editor is active"),setInterval(fv_player_load,1e3)),flowplayer(function(t,a){void 0!==(a=jQuery(a)).data("fv-embed")&&a.data("fv-embed")&&"false"!=a.data("fv-embed")&&(t.embedCode=function(){t.video;var e=a.width(),o=a.height();return o+=2,(a.hasClass("has-chapters")||a.hasClass("has-transcript"))&&(o+=300),0<jQuery(".fp-playlist-external[rel="+a.attr("id")+"]").length&&(o+=170),'<iframe src="'+(a.data("fv-embed")+"#"+fv_player_get_video_link_hash(t))+'" allowfullscreen allow="autoplay" width="'+parseInt(e)+'" height="'+parseInt(o)+'" frameborder="0" style="max-width:100%"></iframe>'})}),jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var e,o,t=jQuery(this).closest(".flowplayer");return"undefined"!=typeof fv_player_editor_conf?fv_player_notice(t,fv_player_editor_translations.embed_notice,2e3):(e=jQuery(this),"function"==typeof(t=(o=e.parents(".flowplayer")).data("flowplayer")).embedCode&&o.find(".embed-code textarea").val(t.embedCode()),fv_player_clipboard(o.find(".embed-code textarea").val(),function(){fv_player_notice(o,fv_flowplayer_translations.embed_copied,2e3)},function(){e.parents(".fvp-share-bar").find(".embed-code").toggle(),e.parents(".fvp-share-bar").toggleClass("visible")})),!1}),flowplayer(function(a,n){var r,i,l="fullscreen",s="fullscreen-exit",f=flowplayer.support.fullscreen,p=window,c=flowplayer.bean;a.fullscreen=function(e){if(!a.disabled&&0!=jQuery(n).data("fullscreen")){(e=void 0===e?!a.isFullscreen:e)&&(i=p.scrollY,r=p.scrollX,console.log("scrollY",i));var o,t=d.find("video.fp-engine",n)[0];if(!(flowplayer.conf.native_fullscreen&&t&&flowplayer.support.iOS))return o=jQuery(n).find(".fp-player")[0],flowplayer.support.browser.safari&&flowplayer.support.fullscreen&&e&&document.fullscreenElement&&(f=!1,document.addEventListener("fullscreenchange",function(e){flowplayer(".is-fullscreen").trigger(s)})),f?e?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof o[e]&&(o[e]({navigationUI:"hide"}),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||o[e]())}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):a.trigger(e?l:s,[a]),a;a.trigger(l,[a]),c.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement===t&&(c.off(document,".nativefullscreen"),c.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement||(c.off(document,".nativefullscreen"),a.trigger(s,[a]))}))});try{t.webkitEnterFullScreen()}catch(e){a.pause(),d.find(".fp-play",n)[0].style.opacity=1,jQuery(n).on("touchstart",function(e){return d.find(".fp-play",n)[0].style.opacity="",a.resume(),t.webkitEnterFullScreen(),!1})}c.one(t,"webkitendfullscreen",function(){c.off(document,"fullscreenchange.nativefullscreen"),a.trigger(s,[a]),d.prop(t,"controls",!0),d.prop(t,"controls",!1)})}};var e,d=flowplayer.common;function t(e){var o=n;while(o){try{var t=getComputedStyle(o);t.transform&&(o.style.transform=e?"none":""),t.zIndex&&(o.style.zIndex=e?"auto":"")}catch(e){}o=o.parentNode}}a.on("mousedown.fs",function(){+new Date-e<150&&a.ready&&a.fullscreen(),e=+new Date}),a.on(l,function(){d.addClass(n,"is-fullscreen"),d.toggleClass(n,"fp-minimal-fullscreen",d.hasClass(n,"fp-minimal")),d.removeClass(n,"fp-minimal"),d.addClass(document.body,"has-fv-player-fullscreen"),f&&!document.fullscreenElement||(d.css(n,"position","fixed"),t(!0)),a.isFullscreen=!0}).on(s,function(){d.toggleClass(n,"fp-minimal",d.hasClass(n,"fp-minimal-fullscreen")),d.removeClass(n,"fp-minimal-fullscreen");var e,o=f&&jQuery(n).find(".fp-player")[0]==document.fullscreenElement;o||"html5"!==a.engine||(e=n.css("opacity")||"",d.css(n,"opacity",0)),o||(d.css(n,"position",""),t(!1)),d.removeClass(n,"is-fullscreen"),d.removeClass(document.body,"has-fv-player-fullscreen"),o||"html5"!==a.engine||setTimeout(function(){n.css("opacity",e)}),a.isFullscreen=!1,"fvyoutube"!=a.engine.engineName&&p.scrollTo(r,i)}).on("unload",function(){a.isFullscreen&&a.fullscreen()}),a.on("shutdown",function(){FULL_PLAYER=null,d.removeNode(wrapper)}),flowplayer.support.iOS&&n.querySelector(".fp-player").addEventListener("touchstart",function(e){a.isFullscreen&&e.pageX&&(16<e.pageX&&e.pageX<window.innerWidth-16||e.preventDefault())})}),flowplayer(function(o,t){t=jQuery(t);var e,a=jQuery(".fp-playlist-external[rel="+t.attr("id")+"]"),a=a.hasClass("fp-playlist-season")||a.hasClass("fp-playlist-polaroid"),n=1==t.data("fsforce");function r(){return!!(window.innerWidth>window.innerHeight&&window.screen&&window.screen.width&&26<window.screen.width-window.innerHeight)}function i(){o.isFullscreen&&window.innerWidth>window.innerHeight&&r()&&!e&&(fv_player_notice(t,fv_flowplayer_translations.iphone_swipe_up_location_bar,"resize-good"),e=setTimeout(function(){e=!1,o.trigger("resize-good")},5e3))}flowplayer.conf.wpadmin&&!a||jQuery(t).hasClass("is-audio")||0==t.data("fullscreen")||0==t.data("fsforce")||((flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||n||a)&&(flowplayer.support.fullscreen?t.on("click",function(){o.ready&&!o.paused||o.fullscreen(!0)}):o.bind("ready",function(){o.video.vr||o.one("progress",function(){o.fullscreen(!0)})}),jQuery("[rel="+t.attr("id")+"] a").on("click",function(e){o.isFullscreen||(o.fullscreen(),o.resume())}),o.on("resume",function(){o.video.vr||o.isFullscreen||(flowplayer.support.fullscreen?o.fullscreen():o.one("progress",function(){o.fullscreen(!0)}))}),o.on("finish",function(){0!=o.conf.playlist.length&&o.conf.playlist.length-1!=o.video.index||o.fullscreen(!1)}).on("fullscreen",function(e,o){t.addClass("forced-fullscreen")}).on("fullscreen-exit",function(e,o){o.pause(),t.removeClass("forced-fullscreen")})),flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen&&window.screen&&window.screen.orientation&&o.on("fullscreen",function(e,o){void 0!==(o=o).video.width&&void 0!==o.video.height&&0!=o.video.width&&0!=o.video.height&&o.video.width<o.video.height?screen.orientation.lock("portrait-primary"):screen.orientation.lock("landscape-primary")}),e=!1,!flowplayer.support.iOS)||flowplayer.support.fullscreen||flowplayer.conf.native_fullscreen||(o.on("fullscreen",i),window.addEventListener("resize",i),window.addEventListener("resize",function(){r()||(clearTimeout(e),e=!1,o.trigger("resize-good"))}))}),flowplayer(function(e,o){o=jQuery(o);(document.body.classList.contains("block-editor-page")&&!o.closest("#fv-player-shortcode-editor-preview-target").length||jQuery("body.block-editor-iframe__body").length)&&jQuery('<div title="Click to edit" style="width: 40%; height: calc( 100% - 3em ); z-index: 19; position: absolute; top: 0; left: 0; cursor: context-menu" onclick="return false" title="Click to edit"></div><div style="width: 40%; height: calc( 100% - 3em ); z-index: 19; position: absolute; top: 0; right: 0; cursor: context-menu" onclick="return false" title="Click to edit"></div><div style="width: 20%; height: 40%; z-index: 19; position: absolute; top: 0; right: 40%; cursor: context-menu" onclick="return false" title="Click to edit"></div><div style="width: 20%; height: calc( 40% - 3em ); z-index: 19; position: absolute; top: 60%; right: 40%; cursor: context-menu" onclick="return false"></div>').insertAfter(o.find(".fp-ratio"))}),flowplayer(function(t,a){a=jQuery(a);var r,n,i,l,s;window.MediaSource||window.WebKitMediaSource;function f(){var e=a.find("video");return e.length&&e[0].audioTracks?e[0].audioTracks:[]}function p(t){t.name||(t.name=t.label),a.find(".fv-fp-hls-menu a").each(function(e,o){jQuery(o).toggleClass("fp-selected",jQuery(o).attr("data-audio")===t.name)})}function c(){if(n&&!(n.length<2))if(l=jQuery('<strong class="fv-fp-hls">'+fv_flowplayer_translations.audio_button+"</strong>"),(s=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(a.find(".fp-controls"))).append("<strong>"+fv_flowplayer_translations.audio_menu+"</strong>"),n.forEach(function(e){s.append('<a data-audio="'+e.name+'" data-lang="'+e.lang+'">'+e.name+"</a>")}),l.insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),s.hasClass("fp-active")?t.hideMenu(s[0]):(a.click(),t.showMenu(s[0]))}),jQuery("a",s).on("click",function(e){var o=e.target.getAttribute("data-audio");if(r){var t=r.audioTracks[r.audioTrack].groupId,e=r.audioTracks.filter(function(e){return e.groupId===t&&(e.name===o||e.lang===o)})[0];r.audioTrack=e.id,p(e)}else{var a,n=f();for(a in n)n.hasOwnProperty(a)&&n[a].label==o&&(n[a].enabled=!0,p(n[a]))}}),r)p(r.audioTracks[r.audioTrack]);else{var e,o=f();for(e in o)o.hasOwnProperty(e)&&o[e].enabled&&p(o[e])}}flowplayer.engine("hlsjs-lite").plugin(function(e){r=e.hls}),t.bind("ready",function(e,o){var t;jQuery(s).remove(),jQuery(l).remove(),r&&"application/x-mpegurl"==o.video.type&&(i=[],n=[],(t=r).levels.forEach(function(e){e=e.attrs.AUDIO;e&&i.indexOf(e)<0&&i.push(e),i.length&&(n=t.audioTracks.filter(function(e){return e.groupId===i[0]}))}),c())}),t.one("progress",function(){if("html5"==t.engine.engineName&&"application/x-mpegurl"==t.video.type){i=[],n=[];var e,o=f();for(e in o)o.hasOwnProperty(e)&&n.push({id:o[e].id,name:o[e].label});c()}})}),flowplayer(function(e,n){var r=-1,i=!1;e.on("error",function(e,o,t){var a;4==t.code&&"hlsjs"==o.engine.engineName&&(console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS"),o.error=o.loading=!1,jQuery(n).removeClass("is-error"),jQuery(flowplayer.engines).each(function(e,o){"hlsjs"==flowplayer.engines[e].engineName&&(r=e,i=flowplayer.engines[e],delete flowplayer.engines[e])}),(a=(0<(t=void 0!==o.video.index?o.video.index:0)?o.conf.playlist[t]:o.conf.clip).sources).index=t,o.load({sources:a}),o.bind("unload error",function(){flowplayer.engines[r]=i}))})}),flowplayer(function(e,l){var s,o=e.conf.live_stream_reload||30,f=o,p=fv_flowplayer_translations.live_stream_retry;function c(e){e=Number(e);var o=Math.floor(e/86400),t=Math.floor(e%86400/3600),a=Math.floor(e%3600/60),e=Math.floor(e%60),n=fv_flowplayer_translations,o=0<o?(1==o?n.duration_1_day:n.duration_n_days).replace(/%s/,o):"";return o&&0<t&&(o+=", "),(o+=0<t?(1==t?n.duration_1_hour:n.duration_n_hours).replace(/%s/,t):"")&&0<a&&(o+=", "),(o+=0<a?(1==a?n.duration_1_minute:n.duration_n_minutes).replace(/%s/,a):"")&&0<e&&(o+=n.and),o+=0<e?(1==e?n.duration_1_second:n.duration_n_seconds).replace(/%s/,e):""}e.clearLiveStreamCountdown=function(){s&&(clearInterval(s),e.error=e.loading=!1,jQuery(l).removeClass("is-error"),jQuery(l).find(".fp-message.fp-shown").remove(),e.unload())},e.conf.flashls={manifestloadmaxretry:2},e.on("ready",function(){f=o,p=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){f=10,p=fv_flowplayer_translations.live_stream_continue,clearInterval(s)}),e.on("error",function(e,r,i){setTimeout(function(){var e,o,t,a,n;(r.conf.clip.live||r.conf.live||i.video&&i.video.src&&i.video.src.match(/\/\/vimeo.com\/event\//))&&(e=f,r.conf.clip.streaming_time?e=r.conf.clip.streaming_time-Math.floor(Date.now()/1e3):r.conf.clip.live_starts_in&&(e=r.conf.clip.live_starts_in),o=fv_flowplayer_translations.live_stream_starting.replace(/%d/,c(e)),p=p.replace(/%d/,c(e)),t=r.conf.clip.live_starts_in?o:p,clearInterval(s),1!==i.code&&2!==i.code&&4!==i.code||(l.className+=" is-offline",flowplayer.support.flashVideo&&r.one("flashdisabled",function(){l.querySelector(".fp-flash-disabled").style.display="none"}),(a=l.querySelector(".fp-ui .fp-message")).innerHTML=t,n=300<e?300:e,s=setInterval(function(){--n,--e,a.innerHTML=t,0<n&&a?a.querySelector("span").innerHTML=c(e):(clearInterval(s),r.error&&(r.error=r.loading=!1,(a=l.querySelector(".fp-ui .fp-message"))&&l.querySelector(".fp-ui").removeChild(a),l.className=l.className.replace(/\bis-(error|offline)\b/g,""),r.load()))},1e3)))},1)})}),flowplayer(function(e,o){var t;o=jQuery(o),flowplayer.engine("hlsjs-lite").plugin(function(e){t=e.hls}),e.on("ready",function(e,o){t&&o.conf.playlist.length&&"hlsjs-lite"!=o.engine.engineName&&t.destroy()})}),flowplayer(function(t,a){var n,r,i,l,s;function f(){r&&n&&"html5"==t.engine.engineName&&(1<++l?3<l&&(console.log("FV Player: iOS video element needs a push, triggering 'stalled'"),n.trigger("stalled")):(console.log("FV Player: iOS video element will trigger error after 'stalled' arrives"),n.one("stalled",function(){var e,o=t.video.time;t.video.type.match(/video\//)?(console.log("FV Player: Running check of video file..."),(e=document.createElement("video")).src=t.video.src,e.onloadedmetadata=function(){l=0,console.log("FV Player: Video link works")},e.onerror=function(){console.log("FV Player: Video link issue!"),0<l&&t.trigger("error",[t,{code:4,video:t.video}])}):setTimeout(function(){console.log(t.video.time,o),t.video.time!=o?(l=0,console.log("FV Player: iOS video element continues playing, no need for error")):t.paused?(l=0,console.log("FV Player: iOS video element paused, no need for error")):t.trigger("error",[t,{code:4,video:t.video}])},5e3)})))}(flowplayer.support.browser.safari||flowplayer.support.iOS)&&(a=jQuery(a),i=r=n=!1,l=0,t.on("ready",function(e,o,t){l=0,r=!1,"html5"==o.engine.engineName&&t.src.match(/\?/)&&((n=a.find("video")).data("fv-ios-recovery")||(n.on("waiting",f),n.data("fv-ios-recovery",!0)),o.live&&t.src.match(/m3u8|stream_loader/)&&(console.log("FV Player: iOS video element is a live stream..."),clearInterval(i),i=setTimeout(function(){jQuery.get(t.src,function(e){e.match(/#EXT/)||(console.log("FV Player: iOS video element live stream does not look like a HLS file, triggering error..."),o.trigger("error",[o,{code:1,video:o.video}]))})},5e3)),o.one("progress",function(){r=!0,clearInterval(i)}))}),t.bind("beforeseek",f),s=0,t.on("ready",function(e,o){o.one("progress",function(e,o){s=o.video.duration,console.log("recorded_duration",s)})}),t.on("pause",function(e,o){var t=a.find("video");t.length&&parseInt(o.video.time)===parseInt(t[0].duration)&&s>o.video.time&&(console.log("suddenly the video is much shorter, why?",s,t[0].duration),o.video.duration=s,o.trigger("error",[o,{code:4,video:o.video}]))}))}),(e=>{var o,t,a=!1;"function"==typeof define&&define.amd&&(define(e),a=!0),"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&(module.exports=e(),a=!0),a||(o=window.Cookies,(t=window.Cookies=e()).noConflict=function(){return window.Cookies=o,t})})(function(){function v(){for(var e=0,o={};e<arguments.length;e++){var t,a=arguments[e];for(t in a)o[t]=a[t]}return o}return function e(u){function y(e,o,t){var a,n;if("undefined"!=typeof document){if(1<arguments.length){"number"==typeof(t=v({path:"/"},y.defaults,t)).expires&&((n=new Date).setMilliseconds(n.getMilliseconds()+864e5*t.expires),t.expires=n),t.expires=t.expires?t.expires.toUTCString():"";try{a=JSON.stringify(o),/^[\{\[]/.test(a)&&(o=a)}catch(e){}o=u.write?u.write(o,e):encodeURIComponent(o+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(e+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var r,i="";for(r in t)t[r]&&(i+="; "+r,!0!==t[r])&&(i+="="+t[r]);return document.cookie=e+"="+o+i}e||(a={});for(var l=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,f=0;f<l.length;f++){var p=l[f].split("="),c=p.slice(1).join("=");this.json||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var d=p[0].replace(s,decodeURIComponent),c=u.read?u.read(c,d):u(c,d)||c.replace(s,decodeURIComponent);if(this.json)try{c=JSON.parse(c)}catch(e){}if(e===d){a=c;break}e||(a[d]=c)}catch(e){}}return a}}return(y.set=y).get=function(e){return y.call(y,e)},y.getJSON=function(){return y.apply({json:!0},[].slice.call(arguments))},y.defaults={},y.remove=function(e,o){y(e,"",v(o,{expires:-1}))},y.withConverter=e,y}(function(){})}),flowplayer(function(e,o){o=jQuery(o),window.learndash_video_data&&"local"==learndash_video_data.videos_found_provider&&o.closest("[data-video-progression=true]").length&&(LearnDash_disable_assets(!0),LearnDash_watchPlayers(),e.on("finish",function(e,o,t){"string"!=typeof o.video.click&&((o=jQuery(".ld-video").data("video-cookie-key"))&&jQuery.cookie(o,JSON.stringify({video_state:"complete"})),window.LearnDash_disable_assets(!1))}))}),jQuery(fv_player_lightbox_bind),jQuery(document).ajaxComplete(fv_player_lightbox_bind),jQuery(function(){"undefined"!=typeof freedomplayer&&freedomplayer(function(e,o){var t,a,n=(o=jQuery(o)).closest(".fv_player_lightbox_hidden");e.is_in_lightbox=function(){return n.length},e.lightbox_visible=function(){return o.closest(".fancybox-slide--current").length},e.is_in_lightbox()&&(n.on("click",function(e){e.target==e.currentTarget&&jQuery.fancybox.close()}),freedomplayer.support.fullscreen?e.fullscreen=function(){jQuery.fancybox.getInstance().FullScreen.toggle()}:(a=!(t=".fancybox-caption, .fancybox-toolbar, .fancybox-infobar, .fancybox-navigation"),e.on("fullscreen",function(){jQuery(t).hide(),a=jQuery(".fancybox-container").hasClass("fancybox-show-thumbs"),jQuery(".fancybox-container").removeClass("fancybox-show-thumbs")}).on("fullscreen-exit",function(){jQuery(t).show(),a&&jQuery(".fancybox-container").addClass("fancybox-show-thumbs")})))})}),flowplayer(function(e,o){e.bind("load",function(e,o,t){var a,n=jQuery(e.currentTarget);n.data("live")&&(a=setTimeout(function(){n.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>"),n.addClass("is-error")},1e4),jQuery(e.currentTarget).data("live_check",a))}).bind("ready",function(e,o,t){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,o,t){e=jQuery(e.currentTarget);e.data("live")&&e.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)})}),"undefined"!=typeof flowplayer&&flowplayer(function(e,a){var n,r,i,l,s,o=(a=jQuery(a)).closest(".ld-video");o.length&&"boolean"==typeof o.data("video-progression")&&0==o.data("video-progression")||a.data("lms_teaching")&&(s=[],e.on("ready",function(e,o,t){n=void 0===o.video.saw,l=o.video.index||0,r=o.video.position||0,i=o.video.top_position||0,void 0===s[l]&&(i?s[l]=i:r?s[l]=r:o.video.fv_start?s[l]=o.video.fv_start:s[l]=0)}),e.on("progress",function(e,o,t){s[l]<t&&(s[l]=t)}),e.on("beforeseek",function(e,o,t){n&&(t<=r||t<=s[l]?console.log("FV Player lms: allow seek to",t):(o.trigger("fv-lms-teaching-be-gone"),e.preventDefault(),e.stopPropagation(),fv_player_notice(a,"<p>"+fv_flowplayer_translations.msg_no_skipping+"<br />"+fv_flowplayer_translations.msg_watch_video+"</p>","fv-lms-teaching-be-gone").addClass("fv-player-lms-teaching"),setTimeout(function(){o.trigger("fv-lms-teaching-be-gone")},2e3),o.seek(s[l])))}))}),(a=>{flowplayer(function(e,t){jQuery(t).hasClass("is-cva")||a(document).on("submit","#"+jQuery(t).attr("id")+" .mailchimp-form",function(e){e.preventDefault(),a(".mailchimp-response",t).remove(),a("input[type=submit]",t).attr("disabled","disabled").addClass("fv-form-loading");var o={action:"fv_wp_flowplayer_email_signup",nonce:fv_player.email_signup_nonce};a("[name]",this).each(function(){o[this.name]=a(this).val()}),a.post(fv_player.ajaxurl,o,function(e){e=JSON.parse(e),a('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",t),e.text.match(/already subscribed/)&&(e.status="ERROR"),"OK"===e.status?(a(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",t).val(""),a(".mailchimp-response",t).removeClass("is-fv-error").html(e.text),setTimeout(function(){a(".wpfp_custom_popup",t).fadeOut()},2e3)):a(".mailchimp-response",t).addClass("is-fv-error").html(e.text),a("input[type=submit]",t).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery),"undefined"!=typeof fv_flowplayer_mobile_switch_array)for(var fv_flowplayer_mobile_switch_i in fv_flowplayer_mobile_switch_array)fv_flowplayer_mobile_switch_array.hasOwnProperty(fv_flowplayer_mobile_switch_i)&&fv_flowplayer_mobile_switch(fv_flowplayer_mobile_switch_i);function fv_flowplayer_browser_chrome_fail(a,n,r,i){jQuery("#wpfp_"+a).bind("error",function(e,o,t){!/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())||null==t||3!=t.code&&4!=t.code&&5!=t.code||(o.unload(),jQuery("#wpfp_"+a).attr("id","bad_wpfp_"+a),jQuery("#bad_wpfp_"+a).after('<div id="wpfp_'+a+'" '+n+' data-engine="flash"></div>'),jQuery("#wpfp_"+a).flowplayer({playlist:[[{mp4:r}]]}),i?jQuery("#wpfp_"+a).bind("ready",function(e,o){o.play()}):jQuery("#wpfp_"+a).flowplayer().play(0),jQuery("#bad_wpfp_"+a).remove())})}if(freedomplayer(function(a,e){var n=(e=jQuery(e)).data("freedomplayer-instance-id");flowplayer.audible_instance=-1,a.one("load",function(){setTimeout(function(){a.conf.splash=!1},0)}),a.on("ready",function(){var t=0==e.data("volume");t||(flowplayer.audible_instance=n),jQuery(".freedomplayer[data-freedomplayer-instance-id]").each(function(){var e=jQuery(this).data("flowplayer"),o=jQuery(this).data("freedomplayer-instance-id");-1!=flowplayer.audible_instance&&o!=flowplayer.audible_instance&&o!=n&&e&&(e.ready?a.conf.multiple_playback?t||e.mute(!0,!0):e.playing&&(e.pause(),e.sticky(!1)):(e.clearLiveStreamCountdown(),e.unload()))})}).on("mute",function(e,o,t){t||flowplayer.audible_instance==n||(flowplayer(flowplayer.audible_instance).mute(!0,!0),flowplayer.audible_instance=n)}).on("resume",function(){a.muted||(flowplayer.audible_instance=n),a.conf.multiple_playback||jQuery(".flowplayer[data-freedomplayer-instance-id]").each(function(){var e;n!=jQuery(this).data("freedomplayer-instance-id")&&(e=jQuery(this).data("flowplayer"))&&e.playing&&(e.pause(),e.sticky(!1))})})}),"undefined"!=typeof fv_flowplayer_browser_chrome_fail_array)for(var fv_flowplayer_browser_chrome_fail_i in fv_flowplayer_browser_chrome_fail_array)fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(fv_flowplayer_browser_chrome_fail_i)&&fv_flowplayer_browser_chrome_fail(fv_flowplayer_browser_chrome_fail_i,fv_flowplayer_browser_chrome_fail_array[fv_flowplayer_browser_chrome_fail_i].attrs,fv_flowplayer_browser_chrome_fail_array[fv_flowplayer_browser_chrome_fail_i].mp4,fv_flowplayer_browser_chrome_fail_array[fv_flowplayer_browser_chrome_fail_i].auto_buffer);function fv_flowplayer_browser_ie(e){(flowplayer.support.browser&&flowplayer.support.browser.msie&&9<=parseInt(flowplayer.support.browser.version,10)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))&&jQuery("#wpfp_"+e).attr("data-engine","flash")}if("undefined"!=typeof fv_flowplayer_browser_ie_array)for(var fv_flowplayer_browser_ie_i in fv_flowplayer_browser_ie_array)fv_flowplayer_browser_ie_array.hasOwnProperty(fv_flowplayer_browser_ie_i)&&fv_flowplayer_browser_ie(fv_flowplayer_browser_ie_i);function fv_flowplayer_browser_chrome_mp4(e){var o=window.navigator.appVersion.match(/Chrome\/(\d+)\./);null!=o&&(o=parseInt(o[1],10),/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&o<28&&-1!=navigator.appVersion.indexOf("Win")||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&o<27&&-1!=navigator.appVersion.indexOf("Linux")&&-1==navigator.userAgent.toLowerCase().indexOf("android"))&&jQuery("#wpfp_"+e).attr("data-engine","flash")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}-1==navigator.platform.indexOf("iPhone")&&-1==navigator.platform.indexOf("iPod")&&-1==navigator.platform.indexOf("iPad")&&-1==navigator.userAgent.toLowerCase().indexOf("android")||flowplayer(function(e,o){e.bind("error",function(e,o,t){10==t.code&&jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)})}),jQuery(document).ready(function(){-1==navigator.platform.indexOf("iPhone")&&-1==navigator.platform.indexOf("iPod")&&-1==navigator.platform.indexOf("iPad")||jQuery(window).trigger("load"),jQuery(".flowplayer").on("mouseleave",function(){jQuery(this).find(".fvp-share-bar").removeClass("visible"),jQuery(this).find(".embed-code").hide()})}),flowplayer(function(a,n){var r=(n=jQuery(n)).attr("id"),i=!1;function l(){var o,t,e=n.attr("data-overlay");if(void 0!==e&&e.length){try{e=JSON.parse(e)}catch(e){return}!i&&!n.hasClass("is-cva")&&n.width()>=parseInt(e.width)&&(e=(e=e.html).replace("%random%",Math.random()),i=jQuery('<div id="'+r+'_ad" class="wpfp_custom_ad">'+e+"</div>"),n.find(".fp-player").append(i),i.find(".fv_fp_close").on("click touchend",function(){i.fadeOut();var e=i.find("video");return e.length&&e[0].pause(),!1}),o=0,t=setInterval(function(){var e=i&&i.find(".adsbygoogle").height();(200<++o||0<e)&&clearInterval(t),e>n.height()&&i.addClass("tall-overlay")},50),setTimeout(function(){n.find(".wpfp_custom_ad video").length&&a.pause()},500))}}function t(e){var o=a.get_popup();o&&("finish"==e||o.pause&&a.ready&&a.paused||o.html.match(/fv-player-ppv-purchase-btn-wrapper/))&&0==n.find(".wpfp_custom_popup").length&&(n.addClass("is-popup-showing"),n.addClass("is-mouseover"),n.find(".fp-player").append('<div id="'+r+'_custom_popup" class="wpfp_custom_popup">'+o.html+"</div>"))}n.data("end_popup_preview")&&jQuery(document).ready(function(){a.trigger("finish",[a])}),a.get_popup=function(){var e=n.attr("data-popup");if(void 0!==e&&e.length){try{e=JSON.parse(e)}catch(e){return!1}return e}},a.bind("ready",function(){1==i.length&&(i.remove(),i=!1),n.data("overlay_show_after")||l()}).bind("progress",function(e,o,t){t>n.data("overlay_show_after")&&l()}).bind("finish",function(e,o){void 0!==o.video.index&&o.video.index+1!=o.conf.playlist.length||t(e.type)}).bind("pause",function(e){if(void 0!==a.video.click)return!1;setTimeout(function(){t(e.type)},5)}).bind("resume unload seek",function(){n.hasClass("is-popup-showing")&&(n.find(".wpfp_custom_popup").remove(),n.removeClass("is-popup-showing"))})}),jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var e=jQuery(this).parents(".flowplayer").data("flowplayer");e&&e.disable(!0)}),jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var e=jQuery(this).parents(".flowplayer").data("flowplayer");e&&e.disable(!1)}),"undefined"!=typeof flowplayer&&flowplayer(function(e,a){a=jQuery(a);var n,r=!1,o=(flowplayer.engine("hlsjs-lite").plugin(function(e){n=e.hls}),e.conf.playlist.length?e.conf.playlist:[e.conf.clip]);function i(e){l();var o="Video is being processed",t="Please return later to see the actual video in this player.";e.pending_encoding_error?(o="Video unavailable",t="There was an error in the video encoding."):e.pending_encoding_progress&&(t+="<br /><br />("+e.pending_encoding_progress+" done)"),r=jQuery('<div class="fv-player-encoder-video-processing-modal"><div><h2>'+o+"</h2><p>"+t+"</p></div></div"),a.append(r)}function l(){r&&r.remove()}o[0]&&o[0].pending_encoding&&i(o[0]),e.on("load",function(e,o,t){if(t.pending_encoding)return i(t),n&&n.destroy(),!1;l()})}),Date.now||(Date.now=function(){return(new Date).getTime()}),(()=>{if("undefined"!=typeof fv_player_editor_conf)fv_player_log('FV Player: Editor detected, disabling "Remember video position"');else{var j=null,b=2500,t=null,Q="video_positions",k="player_playlist_item",x="video_positions_tmp",C="video_top_positions_tmp",S="player_playlist_item_tmp",P="video_saw_tmp",I="video_ab_loop_tmp",F=[],O=[],T=[],L=[],A=[],E=function(e){var o=JSON.stringify(e),t=N(o);if(b<t)while(b<t)for(var a in e)if(e.hasOwnProperty(a)){delete e[a],o=JSON.stringify(e),t=N(o);break}return o},V=function(e){var o;return e.id||(o=(void 0!==e.sources_original&&void 0!==e.sources_original[0]?e.sources_original:e.sources)[0].src,void 0!==e.sources_original&&void 0!==e.sources_original[0]?o:a(o))},N=function(e){return encodeURIComponent(e).length},z=function(e){return t?localStorage.getItem(e):Cookies.get(e)},q=function(e,o){return t?localStorage.setItem(e,o):Cookies.set(e,o)},B=function(e){t?localStorage.removeItem(e):Cookies.remove(e)},D=function(e,o){o.video.sources&&(o=V(o.video),O[o]=0,T[o]=0,A[o]=1)},a=function(e){return e.replace(/(X-Amz-Algorithm=[^&]+&?)/gm,"").replace(/(X-Amz-Credential=[^&]+&?)/gm,"").replace(/(X-Amz-Date=[^&]+&?)/gm,"").replace(/(X-Amz-Expires=[^&]+&?)/gm,"").replace(/(X-Amz-SignedHeaders=[^&]+&?)/gm,"").replace(/(X-Amz-Signature=[^&]+&?)/gm,"")},R=function(e,o){var t,a,n,r="sendBeacon"in navigator,i=(!0!==e&&(e=!1),o&&void 0!==o||(o=function(){}),[]),l=[];for(t in O)O.hasOwnProperty(t)&&(a={name:t,position:O[t],top_position:T[t],saw:void 0!==A[t]&&A[t]},F.hasOwnProperty(t)&&(a.ab_start=F[t][0],a.ab_end=F[t][1]),i.push(a));for(n in L)L.hasOwnProperty(n)&&l.push({player:n,item:L[n]});if(l.length||B(S),i.length){if("1"==flowplayer.conf.is_logged_in){if(r){try{var s,f={},p={},c={},d={},u={};for(w in i)i.hasOwnProperty(w)&&(f[s=i[w].name]=i[w].position,p[s]=i[w].top_position,c[s]=i[w].saw,void 0!==i[w].ab_start)&&void 0!==i[w].ab_end&&(u[s]=[i[w].ab_start,i[w].ab_end]);for(w in l)l.hasOwnProperty(w)&&(d[l[w].player]=l[w].item);q(x,E(f)),q(C,E(p)),q(P,E(c)),q(S,E(d)),q(I,E(u))}catch(e){return}r=new FormData;return r.append("action","fv_wp_flowplayer_video_position_save"),r.append("nonce",fv_player.video_position_save_nonce),r.append("videoTimes",encodeURIComponent(JSON.stringify(i))),r.append("playlistItems",encodeURIComponent(JSON.stringify(l))),navigator.sendBeacon(fv_player.ajaxurl,r),!1}return jQuery.ajax({type:"POST",async:e,url:fv_player.ajaxurl,complete:o,data:{action:"fv_wp_flowplayer_video_position_save",nonce:fv_player.video_position_save_nonce,videoTimes:i,playlistItems:l}})}try{var y=z(Q),v=z(k),y=y&&void 0!==y?JSON.parse(y):{},v=v&&void 0!==v?JSON.parse(v):{};for(w in i)i.hasOwnProperty(w)&&(y[i[w].name]=i[w].position);for(w in l)l.hasOwnProperty(w)&&(v[l[w].player]=l[w].item);var _=JSON.stringify(y),h=JSON.stringify(v),g=N(_),m=N(h);if(b<g)while(b<g)for(var w in y)if(y.hasOwnProperty(w)){delete y[w],_=JSON.stringify(y),g=N(_);break}if(b<m)while(b<m)for(var w in y)if(v.hasOwnProperty(w)){delete v[w],h=JSON.stringify(v),m=N(_);break}q(Q,_),q(k,h)}catch(e){return}return!1}B(I),B(x),B(C),B(P)};if(flowplayer(function(a,e){if(void 0===a.conf.disable_localstorage||"1"==flowplayer.conf.is_logged_in){var r=jQuery(e),o=flowplayer.conf.video_position_save_enable&&0!=r.data("save-position")||r.data("save-position")||r.data("lms_teaching"),i=0,l=!!r.data("player-id")&&r.data("player-id"),n=!1,s=function(){return!(a.live||a.video&&"string"==typeof a.video.click)},t=function(e,o){s()&&!o.video.prevent_position_restore&&(o=(e=>{var o=V(e.video),t=e.video.position;if("1"!=flowplayer.conf.is_logged_in){var a=z(Q);if(a&&void 0!==a)try{(a=JSON.parse(a))[o]&&(t=a[o])}catch(e){return}}return e.get_custom_end&&e.get_custom_end()<t&&(t=!1),t=e.get_custom_start&&0<e.get_custom_start()&&t<e.get_custom_start()?!1:t})(o))&&p(o)},f=function(e,o){var t,a,n;s()&&o.video.sources&&(t=V(o.video),a=Math.round(o.video.time),O[t]=a,void 0!==o.fv_noUiSlider&&r.find(".fv-player-ab.is-active").length&&(F[t]=o.fv_noUiSlider.get()),void 0===T[t]?(n=0,n=o.conf.playlist?o.conf.playlist[o.video.index]&&o.conf.playlist[o.video.index].sources[0]&&o.conf.playlist[o.video.index].sources[0].top_position?o.conf.playlist[o.video.index].sources[0].top_position:0:o.conf.clip.sources[0]&&o.conf.clip.sources[0].top_position?o.conf.clip.sources[0].top_position:0,T[t]=n):T[t]<a&&(T[t]=a),0<o.conf.playlist.length&&l&&(L[l]=o.video.index),60<=i++)&&flowplayer.conf.closingPage&&(j&&j.abort(),j=R(!0,function(){j=null}),i=0)},p=function(e){var o,t;a.custom_seek?a.custom_seek(e):(o=0,t=setInterval(function(){20<++o&&clearInterval(t),a.loading||(a.seek(parseInt(e)),clearInterval(t))},10))},c=function(e,o){var t=z(e),a=!1;if(t&&void 0!==t)try{if(void 0!==(t=JSON.parse(t))[o]){a=t[o],delete t[o];var n,r=!1;for(n in t)if(t.hasOwnProperty(n)){r=!0;break}r?q(e,JSON.stringify(t)):B(e)}return a}catch(e){}},d=function(e,o){if(void 0!==o&&0!=o.conf.playlist.length&&!o.conf.prevent_position_restore){var t=-1;if(l)if("1"!=flowplayer.conf.is_logged_in){var a=z(k);if(a&&void 0!==a)try{(a=JSON.parse(a))[l]&&(t=a[l])}catch(e){return}}else"1"==flowplayer.conf.is_logged_in&&(t=0<o.conf.playlist.length&&c(S,l));0<=t&&!n&&(o.video&&"video/youtube"!=o.video.type&&o.play(t),n=!0,r.data("position_changed",1))}};if(o){if(z(S)&&r.removeData("playlist_start"),a.bind("finish",D),a.on("ready",function(){a.conf.poster?a.one("resume",function(){a.one("progress",t)}):a.one("progress",t)}),a.bind("progress",f),a.bind("unload",function(){n=!1,a.one(a.conf.poster?"resume":"ready",d)}),a.one(a.conf.poster?"resume":"ready",d),jQuery(".fp-ui",e).on("click",function(){d()}),a.playlist_thumbnail_progress=function(e,o,t){a.get_custom_start&&0<a.get_custom_start(o)&&(t-=a.get_custom_start(o))<0&&(t=0);o=o.duration;(o=(o=a.get_custom_duration&&0<a.get_custom_duration()?a.get_custom_duration():o)||e.data("duration"))&&e.css("width",100*t/o+"%")},"1"==flowplayer.conf.is_logged_in){var u,y,v,_,h,g,m=0<a.conf.playlist.length,w=m?a.conf.playlist:[a.conf.clip],b=jQuery("[rel="+jQuery(e).attr("id")+"]");for(u in w)w.hasOwnProperty(u)&&(h=V(w[u]),y=c(x,h),v=c(C,h),_=c(P,h),h=c(I,h),y&&(m?(a.conf.playlist[u].sources[0].position=y,(g=jQuery("a",b).eq(u).find(".fvp-progress")).length&&a.playlist_thumbnail_progress(g,a.conf.playlist[u],y)):a.conf.clip.sources[0].position=y),v&&(!w[u].sources[0].top_position||w[u].sources[0].top_position<v)&&(m?a.conf.playlist[u].sources[0].top_position=v:a.conf.clip.sources[0].top_position=v),_&&(m?a.conf.playlist[u].sources[0].saw=!0:a.conf.clip.sources[0].saw=!0),h)&&(m?(a.conf.playlist[u].sources[0].ab_start=h[0],a.conf.playlist[u].sources[0].ab_end=h[1]):(a.conf.clip.sources[0].ab_start=h[0],a.conf.clip.sources[0].ab_end=h[1]))}a.bind("finish",function(e,o){o.conf.playlist.length?o.conf.playlist[o.video.index].sources[0].saw=!0:o.conf.clip.sources[0].saw=!0})}}}),jQuery(window).on("beforeunload pagehide",function(){flowplayer.conf.closingPage||(flowplayer.conf.closingPage=!0,R())}),null===(t=void 0!==fv_flowplayer_conf.disable_localstorage?!1:t)){t=!0;try{localStorage.setItem("t","t"),"t"!==localStorage.getItem("t")&&(t=!1),localStorage.removeItem("t")}catch(e){t=!1}}}})(jQuery),flowplayer(function(t,o){var a,r,i,l,n,s,f;function e(e){e.preventDefault(),e.stopPropagation(),l.hasClass("fp-active")?t.hideMenu(l[0]):(o.trigger("click"),t.showMenu(l[0]))}function p(e){e=e.clone();return e.find("i.dur").remove(),e.text()}o=jQuery(o),(t.have_visible_playlist||0!=t.conf.playlist.length)&&t.have_visible_playlist()&&(a=jQuery(".fp-playlist-external[rel="+o.attr("id")+"]"),r=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),i=jQuery('<strong class="fv-fp-list-name">Item 1.</strong>'),l=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(o.find(".fp-controls")),n=0,s=[],f=[],jQuery(t.conf.playlist).each(function(e,o){void 0===o.click&&(o=p(a.find("h4").eq(n)),l.append('<a data-index="'+e+'">'+(n+1)+". "+o+"</a>"),f[e]=o,s.push(e),n++)}),r.insertAfter(o.find(".fp-controls .fp-volume")).on("click",e),i.insertAfter(r).on("click",e),jQuery("a",l).on("click",function(){var e=jQuery(this).data("index"),o=e-1;void 0!==t.conf.playlist[o]&&void 0!==t.conf.playlist[o].click?t.play(o):t.play(e)}),t.on("ready",function(e,o,t){l.find("a").removeClass("fp-selected");var a=l.find("a[data-index="+t.index+"]"),n=(a.addClass("fp-selected"),fv_flowplayer_translations.playlist_item_no);n=(n=n.replace(/%d/,s.indexOf(t.index)+1)).replace(/%s/,p(a.find("h4"))),r.html(n),i.html(s.indexOf(t.index)+1+". "+f[t.index])}))}),flowplayer(function(e,a){a=jQuery(a);var n,r=e.conf.playlist,i=[];e.bind("load",function(e,o,t){n=t.index}),e.bind("error",function(e,o,t){setTimeout(function(){if(0<r.length&&1==o.error)return-1<i.indexOf(n)?(console.log("FV Player: Playlist item failure, already tried to play this item, not auto-advancing"),!1):(n=o.video.index,i.push(n),"1"==o.conf.video_checker&&r[n].video_checker&&0<r[n].video_checker.length?(console.log("FV Player: Video checker message present, stopping auto-advance to next playlist item"),!1):(o.error=o.loading=!1,a.removeClass("is-error"),a.find(".fp-message.fp-shown").remove(),++n>r.length-1&&(n=0),console.log("FV Player: Playlist item failure, auto-advancing to "+(n+1)+". item"),void o.play(n)))},1e3)})}),flowplayer(function(o,a){a=jQuery(a);var n,r,t,i,l,s=!1,f=!1,p=!1;function c(t){return t=[],jQuery(o.conf.playlist).each(function(e,o){t.push(e)}),t=(e=>{for(var o,t,a=e.length;a;a--)o=Math.floor(Math.random()*a),t=e[a-1],e[a-1]=e[o],e[o]=t;return e})(t),console.log("FV Player Randomizer random seed:",t),t}(a.data("button-no_picture")||a.data("button-repeat")||a.data("button-rewind")||o.conf.skin_preview)&&(l=!o.have_visible_playlist&&0<o.conf.playlist.length||o.have_visible_playlist(),o.bind("ready",function(e,o){var t;void 0===r&&void 0===n&&(r=o.next,n=o.prev),o.video&&o.video.type&&!o.video.type.match(/^audio/)&&a.data("button-no_picture")&&!f&&(f=!0,o.createNoPictureButton()),a.data("button-repeat")&&(l&&!p?(p=!0,o.createRepeatButton(),o.conf.playlist_shuffle=o.conf.track_repeat=!1,s=c(),o.conf.loop&&jQuery("a[data-action=repeat_playlist]",i).trigger("click")):0!=a.find(".fv-fp-track-repeat").length||l||((t=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>')).insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),o.video.loop?o.video.loop=!1:o.video.loop=!0,jQuery(this).toggleClass("is-active fp-color-fill",o.video.loop)}),o.conf.loop&&t.addClass("is-active fp-color-fill"),o.on("finish",function(e,o){o.video.loop&&(console.log("playlist-repeat.module",o.video.loop),o.resume())}))),a.data("button-rewind")&&!freedomplayer.support.touch&&o.createRewindForwardButtons()}).bind("progress",function(){a.data("button-repeat")&&(o.video.loop=o.conf.track_repeat)}).bind("finish.pl",function(e,o){a.data("button-repeat")&&l&&(console.log("playlist_repeat",o.conf.loop,"advance",o.conf.advance,"video.loop",o.video.loop),o.conf.playlist_shuffle)&&(o.play(s.pop()),0==s.length)&&(s=c())}).bind("unload",function(){a.find(".fv-fp-no-picture").remove(),a.find(".fv-fp-playlist").remove(),a.find(".fv-fp-track-repeat").remove()}),o.createNoPictureButton=function(){0<a.find(".fv-fp-no-picture").length||jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="18px" height="18px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>').insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),jQuery(".fp-engine",a).slideToggle(20),jQuery(this).toggleClass("is-active fp-color-fill"),a.toggleClass("is-no-picture")})},o.createRepeatButton=function(){var e;0<a.find(".fv-fp-playlist").length||(e=fv_flowplayer_translations,(t=jQuery('<strong class="fv-fp-playlist mode-normal">      <svg viewBox="0 0 80.333 80" width="18px" height="18px" class="fvp-icon fvp-replay-list"><title>'+e.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg>      <svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-shuffle"><title>'+e.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg>      <svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-replay-track"><title>'+e.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg>      <span id="fvp-playlist-play" title="'+e.playlist_play_all+'">'+e.playlist_play_all_button+"</span>      </strong>")).insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),"auto"!==i.css("right")&&i.css({right:"auto",left:t.position().left+"px"}),i.hasClass("fp-active")?o.hideMenu(i[0]):(a.trigger("click"),o.showMenu(i[0]))}),i=jQuery('<div class="fp-menu fv-fp-playlist-menu">        <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="18px" height="18px" class="fvp-icon fvp-replay-list"><title>'+e.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+e.playlist_replay_all+'</span></a>        <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-shuffle"><title>'+e.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+e.playlist_shuffle+'</span></a>        <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-replay-track"><title>'+e.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+e.playlist_replay_video+'</span></a>        <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+e.playlist_play_all+'">'+e.playlist_play_all_button+"</span></a>        </div>").insertAfter(a.find(".fp-controls")),jQuery("a",i).on("click",function(){jQuery(this).siblings("a").removeClass("fp-selected"),jQuery(this).addClass("fp-selected"),t.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var e=jQuery(this).data("action");"repeat_playlist"==e?(t.addClass("mode-repeat-playlist"),o.conf.loop=!0,o.conf.advance=!0,o.video.loop=o.conf.track_repeat=!1,o.conf.playlist_shuffle=!1):"shuffle_playlist"==e?(s=s||c(),t.addClass("mode-shuffle-playlist"),o.conf.loop=!0,o.conf.advance=!0,o.conf.playlist_shuffle=!0):"repeat_track"==e?(t.addClass("mode-repeat-track"),o.conf.track_repeat=o.video.loop=!0,o.conf.loop=o.conf.playlist_shuffle=!1):"normal"==e&&(t.addClass("mode-normal"),o.conf.track_repeat=o.video.loop=!1,o.conf.loop=o.conf.playlist_shuffle=!1),o.conf.playlist_shuffle?(o.next=function(){o.play(s.pop()),0==s.length&&(s=c())},o.prev=function(){o.play(s.shift()),0==s.length&&(s=c())}):(o.next=r,o.prev=n)}))},o.createRewindForwardButtons=function(){var e;0==a.find(".fv-fp-rewind").length&&((e=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="21px" height="21px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>')).insertBefore(a.find(".fp-controls .fp-playbtn")).on("click",function(e){e.preventDefault(),e.stopPropagation(),o.seek(o.video.time-10)}),e.toggle(!o.video.live||o.video.dvr)),0==a.find(".fv-fp-forward").length&&((e=jQuery('<span class="fv-fp-forward"><svg viewBox="0 0 24 24" width="21px" height="21px" class="fvp-icon fvp-forward"><use xlink:href="#fvp-forward"></use></svg></span>')).insertAfter(a.find(".fp-controls .fp-playbtn")).on("click",function(e){e.preventDefault(),e.stopPropagation(),o.seek(o.video.time+10)}),e.toggle(!o.video.live||o.video.dvr))},o.conf.skin_preview)&&(a.data("button-no_picture")&&setTimeout(function(){o.createNoPictureButton()},0),a.data("button-repeat")&&setTimeout(function(){o.createRepeatButton()},0),a.data("button-rewind"))&&setTimeout(function(){o.createRewindForwardButtons()},0)}),freedomplayer(function(e,o){var t,a,n,r,i=freedomplayer.bean,l=freedomplayer.common,o=o.getAttribute("id"),o=l.find('[rel="'+o+'"]'),s=!1,f=!1;function p(){s=!1,r.classList.remove("active"),setTimeout(function(){r.classList.remove("is-dragging")}),d()}function c(t){var e=Math.floor(r.clientWidth/r.children[0].clientWidth),o=r.children[0].clientWidth+20;n=t?r.scrollLeft+e*o:r.scrollLeft-e*o,t&&n>r.scrollWidth-r.clientWidth?n=r.scrollWidth-r.clientWidth:!t&&n<0&&(n=0),window.requestAnimationFrame(function e(){var o=t?30:-30;Math.abs(n-r.scrollLeft)<20&&(o=n-r.scrollLeft);r.scrollTo({top:0,left:r.scrollLeft+o});n==r.scrollLeft?d():window.requestAnimationFrame(e)})}function d(){r.classList.remove("leftmost","rightmost"),0===r.scrollLeft?r.classList.add("leftmost"):r.scrollLeft===r.scrollWidth-r.clientWidth&&r.classList.add("rightmost")}o[0]&&(r=l.find(".fv-playlist-draggable",o),l=l.find(".fv-playlist-left-arrow, .fv-playlist-right-arrow",o),r[0])&&l[0]&&l[1]&&(r=r[0],d(),i.on(r,"scroll",d),i.on(r,"mousedown",function(e){e.preventDefault(),s=!0,r.classList.add("active"),a=r.scrollLeft,t=e.pageX-r.offsetLeft}),i.on(r,"mouseup",p),r.onmouseleave=function(){f=!1,p()},i.on(r,"mousemove",function(e){f=!0,s&&(e.preventDefault(),e=e.pageX-r.offsetLeft-t,5<Math.abs(e)&&r.classList.add("is-dragging"),r.scrollLeft=a-e)}),l[0].onclick=function(){c(!1)},l[1].onclick=function(){c(!0)},i.on(document,"keydown",function(e){f&&(39===(e=e.keyCode)&&c(!0),37===e)&&c(!1)}))}),flowplayer(function(e,o){var t=jQuery(o),a=t.data("playlist_start");function n(){1!==t.data("position_changed")&&e.conf.playlist.length&&(a--,void 0===e.conf.playlist[a].click&&(e.engine&&"hlsjs-lite"==e.engine.engineName&&(e.loading=!1),e.play(a)),t.data("position_changed",1))}void 0!==a&&(e.bind("unload",function(){a=t.data("playlist_start"),t.removeData("position_changed"),e.one(e.conf.poster?"resume":"ready",n)}),e.one(e.conf.poster?"resume":"ready",n),jQuery(".fp-ui",o).on("click",function(){n(),t.data("position_changed",1)}))}),document.addEventListener("custombox:overlay:close",function(e){console.log("FV Player: Custombox/Popup anything ligtbox closed");var o=jQuery(this).find(".flowplayer");0!=o.length&&(console.log("FV Player: Custombox/Popup anything ligtbox contains a player"),o.each(function(e,o){var t=jQuery(o).data("flowplayer");void 0!==t&&(t.playing?(console.log("FV Player: Custombox/Popup anything ligtbox video pause"),t.pause()):t.loading&&t.one("ready",function(){console.log("FV Player: Custombox/Popup anything ligtbox video unload"),t.unload()}))}))}),"undefined"!=typeof flowplayer&&(freedomplayer.preload_count=0,freedomplayer.preload_limit=3,freedomplayer(function(e,o){o=jQuery(o);var t,a=!1,n=jQuery(o).data("playlist_start"),n=n?n-1:0;for(t in e.conf.clip&&(a=e.conf.clip.sources),a=e.conf.playlist[n]&&e.conf.playlist[n].sources?e.conf.playlist[n].sources:a){if("video/youtube"==a[t].type||a[t].src.match(/\/\/vimeo.com/))return r(),void e.debug("Preload not allowed beause of the video type");"application/x-mpegurl"==a[t].type&&(freedomplayer.preload_limit=1)}function r(){e.conf.splash=!0,e.preload=!1,o.removeClass("is-poster").addClass("is-splash")}e.conf.splash||freedomplayer.preload_count++,freedomplayer.preload_count>freedomplayer.preload_limit&&r()})),flowplayer(function(o,e){o.bind("finish",function(){var e=o.video.time;o.video.loop&&o.one("pause",function(){e<=o.video.time&&o.resume()})})}),"undefined"!=typeof flowplayer&&(fv_autoplay_type=fv_flowplayer_conf.autoplay_preload,fv_player_scroll_autoplay=!1,fv_player_scroll_autoplay_last_winner=-1,freedomplayer(function(e,t){fv_player_scroll_autoplay=!0,e.on("pause",function(e,o){o.manual_pause&&(console.log("Scroll autoplay: Manual pause for "+jQuery(t).attr("id")),o.non_viewport_pause=!0)})}),jQuery(window).on("scroll",function(){fv_player_scroll_autoplay=!0}),fv_player_scroll_int=setInterval(function(){var r,e,i,o,t;fv_player_scroll_autoplay&&(r=window.innerHeight||document.documentElement.clientHeight,e=jQuery(".flowplayer:not(.is-disabled)"),i=-1,e.each(function(e,o){var t,a,n=jQuery(this);void 0!==n.data("fvautoplay")&&-1==n.data("fvautoplay")||jQuery("body").hasClass("wp-admin")||(t=n.data("flowplayer"),a=n.find(".fp-player"),n=void 0!==n.data("fvautoplay"),a.length&&!t.non_viewport_pause&&("viewport"==fv_autoplay_type||"sticky"==fv_autoplay_type||n)&&(n=a[0].getBoundingClientRect(),r-n.top>a.height()/4)&&n.bottom>a.height()/4&&(flowplayer.support.iOS&&"video/youtube"==t.conf.clip.sources[0].type||(i=e)))}),fv_player_scroll_autoplay_last_winner!=i&&(t=(o=e.eq(fv_player_scroll_autoplay_last_winner)).data("flowplayer"))&&t.playing&&(console.log("Scroll autoplay: Player not in viewport, pausing "+o.attr("id")),t.pause()),-1<i&&fv_player_scroll_autoplay_last_winner!=i&&((t=(o=e.eq(i)).data("flowplayer"))?t.ready?(console.log("Scroll autoplay: Resume "+o.attr("id")),t.resume()):t.loading||t.playing||t.error||(console.log("Scroll autoplay: Load "+o.attr("id")),t.load(),t.autoplayed=!0):(console.log("Scroll autoplay: Play "+o.attr("id")),fv_player_load(o),t.autoplayed=!0),fv_player_scroll_autoplay_last_winner=i),fv_player_scroll_autoplay=!1)},200)),flowplayer(function(t,a){(a=jQuery(a)).find(".fp-logo").removeAttr("href"),a.hasClass("no-controlbar")&&((e=t.sliders.timeline).disable(!0),t.bind("ready",function(){e.disable(!0)})),jQuery(".fvfp_admin_error",a).remove(),a.find(".fp-logo, .fp-header").on("click",function(e){e.target===this&&a.find(".fp-ui").trigger("click")}),jQuery(".fvp-share-bar .sharing-facebook",a).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>'),jQuery(".fvp-share-bar .sharing-twitter",a).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>'),jQuery(".fvp-share-bar .sharing-email",a).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>'),jQuery(".fp-header",a).prepend(jQuery(".fvp-share-bar",a)),(!t.have_visible_playlist&&0<t.conf.playlist.length||t.have_visible_playlist())&&!freedomplayer.support.touch&&(o=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>'),n=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>'),a.find(".fp-controls .fp-playbtn").before(o).after(n),o.on("click",function(){t.trigger("prev",[t]),t.prev()}),n.on("click",function(){t.trigger("next",[t]),t.next()})),"undefined"!=typeof fv_player_editor_conf&&a.on("click",".fvp-sharing > li",function(e){return e.preventDefault(),fv_player_notice(a,fv_player_editor_translations.link_notice,2e3),!1}),t.bind("pause resume finish unload ready",function(e,o){a.addClass("no-brand")}),t.on("ready",function(e,o,t){setTimeout(function(){a.hasClass("is-youtube-standard")||a.hasClass("is-youtube-reduced")||jQuery(".fvp-share-bar",a).show(),jQuery(".fv-player-buttons-wrap",a).appendTo(jQuery(".fv-player-buttons-wrap",a).parent().find(".fp-ui"))},100)}),t.bind("finish",function(){var e,o=a.data("fv_redirect");!o||void 0!==t.video.is_last&&!t.video.is_last||(freedomplayer.conf.wpadmin||flowplayer.conf.is_logged_in_editor)&&(e=(e=fv_flowplayer_translations.redirection).replace(/%url%/,o),!confirm(e))||(location.href=o)}),flowplayer.support.iOS&&11==flowplayer.support.iOS.version&&t.bind("error",function(e,o,t){4==t.code&&a.find(".fp-engine").hide()}),jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()}),t.one("ready",function(e,o,t){a.find(".fp-chromecast").insertAfter(a.find(".fp-header .fp-fullscreen"))});var e,o,n,r=a.attr("id"),i=!flowplayer.support.fullscreen&&!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen;t.bind("fullscreen",function(e,o){jQuery("#wpadminbar, .nc_wrapper").hide(),i&&"video/youtube"!=o.video.type&&(a.before('<span data-fv-placeholder="'+r+'"></span>'),a.appendTo("body"))}),t.bind("fullscreen-exit",function(e,o,t){jQuery("#wpadminbar, .nc_wrapper").show(),i&&jQuery("span[data-fv-placeholder="+r+"]").replaceWith(a)})}),(()=>{function e(p){p(function(t,a){var n,e,r,i,l;function s(e){return Math.round(100*e)/100}function f(o){n.find(".fp-speed",a)[0].innerHTML=o+"x",n.find(".fp-speed-menu a",a).forEach(function(e){n.toggleClass(e,"fp-selected",e.getAttribute("data-speed")==o),n.toggleClass(e,"fp-color",e.getAttribute("data-speed")==o)})}(jQuery(a).data("speedb")||t.conf.skin_preview)&&(e=p.support).video&&e.inlineVideo&&(n=p.common,e=p.bean,r=n.find(".fp-ui",a)[0],i=n.find(".fp-controls",r)[0],l=t.conf.speeds,e.on(a,"click",".fp-speed",function(){var e=n.find(".fp-speed-menu",a)[0];n.hasClass(e,"fp-active")?t.hideMenu():t.showMenu(e)}),e.on(a,"click",".fp-speed-menu a",function(e){e=e.target.getAttribute("data-speed");t.speed(e)}),t.on("speed",function(e,o,t){1<l.length&&f(t)}).on("ready",function(e,o){o.removeSpeedButton(),p.support.android&&"html5"==o.engine.engineName&&"application/x-mpegurl"==o.video.type||1<(l=o.conf.speeds).length&&o.createSpeedButton()}),t.removeSpeedButton=function(){n.find(".fp-speed-menu",a).forEach(n.removeNode),n.find(".fp-speed",a).forEach(n.removeNode)},t.createSpeedButton=function(){var o;jQuery(a).data("speedb")&&(t.removeSpeedButton(),i.appendChild(n.createElement("strong",{className:"fp-speed"},t.currentSpeed+"x")),o=n.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>"),l.forEach(function(e){e=n.createElement("a",{"data-speed":s(e)},s(e)+"x");o.appendChild(e)}),r.appendChild(o),f(t.currentSpeed),jQuery(a).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed))},t.conf.skin_preview)&&t.createSpeedButton()})}"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e:"function"==typeof window.flowplayer&&e(window.flowplayer)})(),flowplayer(function(e,o){void 0===fv_flowplayer_conf.disable_localstorage&&(e.on("speed",function(e,o,t){try{window.localStorage.fv_player_speed=t}catch(e){}}),e.on("ready",function(){window.localStorage.fv_player_speed&&jQuery(o).find("strong.fp-speed").is(":visible")&&e.speed(parseFloat(window.localStorage.fv_player_speed)),0==jQuery(o).data("volume")&&e.mute(!0,!0)}))}),(s=>{var f={},p=!1;function o(){for(var e in f)for(var o in f[e])for(var t in f[e][o])f[e][o][t]=Math.round(f[e][o][t]);var a=(window.freedomplayer?freedomplayer:flowplayer).conf,n=(a.debug&&fv_player_stats_watched(),new FormData);n.append("tag","seconds"),n.append("blog_id",a.fv_stats.blog_id),n.append("user_id",a.fv_stats.user_id),n.append("_wpnonce",a.fv_stats.nonce),n.append("watched",encodeURIComponent(JSON.stringify(f))),navigator.sendBeacon(a.fv_stats.url,n)}flowplayer(function(e,o){o=s(o);var a,n=-1,r=0;if(e.conf.fv_stats&&(e.conf.fv_stats.enabled||o.data("fv_stats")&&"no"!=o.data("fv_stats"))){try{var i=o.data("fv_stats_data");if(!i)return}catch(e){return!1}e.on("ready finish",function(e,o){o.on("progress",function(e,o,t){t<1||n==l()||(n=l(),s.post(o.conf.fv_stats.url,{blog_id:o.conf.fv_stats.blog_id,video_id:o.video.id||0,player_id:i.player_id,post_id:i.post_id,user_id:o.conf.fv_stats.user_id,tag:"play",_wpnonce:o.conf.fv_stats.nonce}))}),a=!(r=0)}).on("finish",function(){n=-1}).on("progress",function(e,o,t){0!=t&&(o.seeking?r=t:a?a=!1:r=(0==r||t<=r||(f[i.player_id]||(f[i.player_id]={}),f[i.player_id][i.post_id]||(f[i.player_id][i.post_id]={}),f[i.player_id][i.post_id][o.video.id]||(f[i.player_id][i.post_id][o.video.id]=0),f[i.player_id][i.post_id][o.video.id]+=t-r,p=!0),t))}),e.on("cva",function(e,o){s.post(o.conf.fv_stats.url,{blog_id:o.conf.fv_stats.blog_id,video_id:o.video.id||0,player_id:i.player_id,post_id:i.post_id,user_id:o.conf.fv_stats.user_id,tag:"click",_wpnonce:o.conf.fv_stats.nonce})})}function l(){return e.video.index||0}}),s(window).on("beforeunload pagehide",function(){var e="sendBeacon"in navigator;!flowplayer.conf.stats_sent&&e&&(flowplayer.conf.stats_sent=!0,p)&&o()}),setInterval(function(){p&&(o(),p=!(f={}))},3e5),window.fv_player_stats_watched=function(){s.each(f,function(e,o){console.log("player id: "+e),s.each(o,function(e,o){console.log("post id: "+e),s.each(o,function(e,o){console.log("video id: "+e+" seconds: "+o)})})})}})(jQuery),flowplayer(function(t,a){var n,r=jQuery(a),e=r.find(".fp-player"),o=r.data("fvsticky"),i=!1,l=r.find(".fp-ratio");if(t.is_sticky=!1,(i=flowplayer.conf.sticky_video&&"off"!=flowplayer.conf.sticky_video&&void 0===o?!0:i)||o){if(!flowplayer.support.firstframe)return;var s=flowplayer.conf.sticky_place;i=jQuery(window),n=r,t.on("unload",function(){p(),r.removeClass("is-unSticky")}),i.on("resize",function(){c()||"all"==flowplayer.conf.sticky_video||t.is_sticky&&p()}).on("scroll",function(){var e,o;if(c()||"all"==flowplayer.conf.sticky_video)if(e=n[0],(o=e.getBoundingClientRect()).top>=0-jQuery(e).outerHeight()/2&&0<=o.left&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)+jQuery(e).outerHeight()/2&&o.right<=(window.innerWidth||document.documentElement.clientWidth)||!(t.playing||t.loading||flowplayer.audible_instance==r.data("freedomplayer-instance-id")||"object"==_typeof(a.fv_player_vast)&&"object"==_typeof(a.fv_player_vast.adsManager_)&&"function"==typeof a.fv_player_vast.adsManager_.getRemainingTime&&0<a.fv_player_vast.adsManager_.getRemainingTime()))p();else{if(0<jQuery("div.flowplayer.is-unSticky").length)return!1;f()}else t.is_sticky&&p()})}function f(){e.hasClass("is-sticky-"+s)||(e.addClass("is-sticky"),e.addClass("is-sticky-"+s),0==r.find("a.fp-sticky").length&&r.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>'),e.prepend(l.clone()),d(!0),t.is_sticky=!0,t.trigger("sticky",[t]),e.parent(".flowplayer").addClass("is-stickable"))}function p(){e.removeClass("is-sticky"),e.removeClass("is-sticky-"+s),e.css("max-width",""),e.find(".fp-ratio").remove(),e.parent(".flowplayer").removeClass("is-stickable"),t.is_sticky&&(d(),t.is_sticky=!1,t.trigger("sticky-exit",[t]))}function c(){return t.autoplayed||jQuery(window).innerWidth()>=fv_flowplayer_conf.sticky_min_width}function d(e){var o=a;while(o){try{var t=getComputedStyle(o);t.transform&&(o.style.transform=e?"none":""),t.zIndex&&(o.style.zIndex=e?"auto":"")}catch(e){}o=o.parentNode}}t.sticky=function(e,o){void 0===e&&(e=!t.is_sticky),o&&r.toggleClass("is-unSticky",!e),(e?f:p)()}}),jQuery(function(t){t(document).on("click","a.fp-sticky",function(){var e=t("div.flowplayer.is-stickable"),o=e.data("flowplayer");e.addClass("is-unSticky"),e.find(".fp-player").removeClass(["is-sticky","is-sticky-right-bottom","is-sticky-left-bottom","is-sticky-right-top","is-sticky-left-top"]).css({width:"",height:"",maxHeight:""}),o.is_sticky&&(o.is_sticky=!1,o.trigger("sticky-exit",[o])),o.autoplayed&&o.pause()}),t(document).on("click","div.flowplayer.is-unSticky",function(){t("div.flowplayer").removeClass("is-unSticky")})}),flowplayer(function(e,n){n=jQuery(n);var r=window.localStorage;e.on("ready",function(e,t,o){var a;o.subtitles&&o.subtitles.length&&(r.fv_player_subtitle&&t.video.subtitles&&t.video.subtitles.length?"none"===r.fv_player_subtitle?t.disableSubtitles():t.video.subtitles.forEach(function(e,o){e.srclang===r.fv_player_subtitle&&t.loadSubtitles(o)}):(a=o.subtitles.filter(function(e){return e.fv_default})[0])&&t.loadSubtitles(o.subtitles.indexOf(a))),void 0===fv_flowplayer_conf.disable_localstorage&&n.find(".fp-subtitle-menu").on("click",function(e){var o=e.target.getAttribute("data-subtitle-index");if("string"==typeof o)try{r.fv_player_subtitle=-1<o?t.video.subtitles[o].srclang:"none"}catch(e){}})})}),flowplayer(function(e,t){t=jQuery(t),e.on("ready",function(e,o){t.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions),t.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)})}),"undefined"!=typeof flowplayer&&"undefined"!=typeof fv_flowplayer_conf&&fv_flowplayer_conf.video_hash_links&&(flowplayer(function(t,a){var n,r,i,l,s,f,p="";0<jQuery(a).find(".sharing-link").length&&(n=function(e,o){l=fv_player_get_video_link_hash(t),s=","+fv_player_time_hms(t.video.time),e&&o?(i=","+fv_player_time_hms_ms(e+t.get_custom_start()),r=","+fv_player_time_hms_ms(o+t.get_custom_start())):(r=f&&void 0!==t.get_ab_end()&&t.get_ab_end()?","+fv_player_time_hms_ms(t.get_ab_end()):"",i=f&&void 0!==t.get_ab_start()&&t.get_ab_start()?","+fv_player_time_hms_ms(t.get_ab_start()):""),p=jQuery(".sharing-link",a).attr("href").replace(/#.*/,"")+"#"+l+s+i+r,jQuery(".sharing-link",a).attr("href",p)},t.on("ready",function(e,o,t){o.fv_noUiSlider&&o.fv_noUiSlider.on("set",function(e){n(e[0],e[1])})}),t.on("progress",function(e,o){o.video.sources&&o.video.sources[0]&&n()}),t.on("abloop",function(e,o,t){f=t,o.playing||n()}),jQuery(".sharing-link",a).on("click",function(e){e.preventDefault(),fv_player_clipboard(jQuery(this).attr("href"),function(){fv_player_notice(a,fv_flowplayer_translations.link_copied,2e3)},function(){fv_player_notice(a,fv_flowplayer_translations.error_copy_clipboard,2e3)})})),t.get_video_link=function(){return p}}),jQuery(document).on("click",'a[href*="fvp_"]',function(){var e=jQuery(this);setTimeout(function(){0==e.parents(".fvp-share-bar").length&&fv_video_link_autoplay()})})),flowplayer(function(e,a){a=jQuery(a);var n=!1;function r(){a.removeClass("has-fp-message-muted"),a.find(".fp-message-muted").remove()}e.one("ready",function(e,o){a.hasClass("is-audio")||(n=!0)}),e.on("progress",function(e,o,t){n&&1<t&&(n=!1,(t=jQuery("root").find("video")).length&&!(t=t[0]).mozHasAudio&&!Boolean(t.webkitAudioDecodedByteCount)&&!Boolean(t.audioTracks&&t.audioTracks.length)||!o.muted&&0!=o.volumeLevel||"true"==localStorage.muted||"0"==localStorage.volume||(t=jQuery('<div class="fp-message fp-message-muted"><span class="fp-icon fp-volumebtn-notice"></span> '+fv_flowplayer_translations.click_to_unmute+"</div>"),freedomplayer.bean.on(t[0],"click touchstart",function(){o.mute(!1),o.volume(1)}),a.find(".fp-ui").append(t),a.addClass("has-fp-message-muted"),setTimeout(r,1e4)))}),e.on("mute volume",function(){(!e.muted||0<e.volumeLevel)&&r()})}),"undefined"!=typeof flowplayer&&(fv_player_warning=function(e,o,t){var a=jQuery(e).prev(".fv-player-warning-wrapper");0==a.length&&(jQuery(e).before('<div class="fv-player-warning-wrapper">'),a=jQuery(e).prev(".fv-player-warning-wrapper")),0==a.find(".fv-player-warning-"+t).length&&(e=jQuery("<p style='display: none' "+(t?" class='fv-player-warning-"+t+"'":"")+">"+o+"</p>"),a.append(e),e.slideDown())},flowplayer(function(o,a){a=jQuery(a),navigator.userAgent.match(/iPhone.* OS [0-6]_/i)&&o.one("progress",function(e){void 0!==o.video.subtitles&&o.video.subtitles.length&&fv_player_warning(a,fv_flowplayer_translations.warning_iphone_subs)}),flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)&&fv_player_warning(a,fv_flowplayer_translations.warning_unstable_android,"firefox"),/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)&&(o.on("ready",function(e,o,t){setTimeout(function(){t.src&&t.src.match(/fpdl.vimeocdn.com/)&&(0==t.time||1==t.time)&&(fv_player_warning(a,fv_flowplayer_translations.warning_unstable_android,"firefox"),o.on("progress",function(e,o){a.prev().find(".fv-player-warning-firefox").remove()}))},1500)}),o.on("error",function(e,o,t){2==t.MEDIA_ERR_NETWORK&&t.video.src.match(/fpdl.vimeocdn.com/)&&fv_player_warning(a,fv_flowplayer_translations.warning_unstable_android,"firefox")})),/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)&&o.on("error",function(e,o,t){t.video.src.match(/fpdl.vimeocdn.com/)&&fv_player_warning(a,fv_flowplayer_translations.warning_old_safari)});var e=flowplayer.support;e.android&&(e.android.samsung&&parseInt(e.browser.version)<66||e.browser.safari)&&o.on("error",function(e,o,t){fv_player_warning(a,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})})),flowplayer(function(t,a){a=jQuery(a);var n=!1;jQuery(t.conf.playlist).each(function(e,o){o.sources[0].type.match(/youtube/)&&(n=!0)}),n&&(a.addClass("is-youtube"),void 0!==fv_flowplayer_conf.youtube_browser_chrome)&&"none"==fv_flowplayer_conf.youtube_browser_chrome&&a.addClass("is-youtube-nl"),t.on("ready",function(e,o,t){a.find(".fp-youtube-wrap").remove(),a.find(".fp-youtube-logo").remove(),"video/youtube"==t.type?(a.addClass("is-youtube"),void 0!==fv_flowplayer_conf.youtube_browser_chrome&&("none"==fv_flowplayer_conf.youtube_browser_chrome&&a.addClass("is-youtube-nl"),"standard"==fv_flowplayer_conf.youtube_browser_chrome&&a.addClass("is-youtube-standard"),"reduced"==fv_flowplayer_conf.youtube_browser_chrome)&&(a.addClass("is-youtube-reduced"),a.addClass("is-youtube-nl"),a.find(".fp-ui").append('<div class="fp-youtube-wrap"><a class="fp-youtube-title" target="_blank" href="'+o.video.src+'">'+t.fv_title_clean+"</a></div>"),a.find(".fp-ui").append('<a class="fp-youtube-logo" target="_blank" href="'+o.video.src+'"><svg height="100%" version="1.1" viewBox="0 0 110 26" width="100%"><path class="ytp-svg-fill" d="M 16.68,.99 C 13.55,1.03 7.02,1.16 4.99,1.68 c -1.49,.4 -2.59,1.6 -2.99,3 -0.69,2.7 -0.68,8.31 -0.68,8.31 0,0 -0.01,5.61 .68,8.31 .39,1.5 1.59,2.6 2.99,3 2.69,.7 13.40,.68 13.40,.68 0,0 10.70,.01 13.40,-0.68 1.5,-0.4 2.59,-1.6 2.99,-3 .69,-2.7 .68,-8.31 .68,-8.31 0,0 .11,-5.61 -0.68,-8.31 -0.4,-1.5 -1.59,-2.6 -2.99,-3 C 29.11,.98 18.40,.99 18.40,.99 c 0,0 -0.67,-0.01 -1.71,0 z m 72.21,.90 0,21.28 2.78,0 .31,-1.37 .09,0 c .3,.5 .71,.88 1.21,1.18 .5,.3 1.08,.40 1.68,.40 1.1,0 1.99,-0.49 2.49,-1.59 .5,-1.1 .81,-2.70 .81,-4.90 l 0,-2.40 c 0,-1.6 -0.11,-2.90 -0.31,-3.90 -0.2,-0.89 -0.5,-1.59 -1,-2.09 -0.5,-0.4 -1.10,-0.59 -1.90,-0.59 -0.59,0 -1.18,.19 -1.68,.49 -0.49,.3 -1.01,.80 -1.21,1.40 l 0,-7.90 -3.28,0 z m -49.99,.78 3.90,13.90 .18,6.71 3.31,0 0,-6.71 3.87,-13.90 -3.37,0 -1.40,6.31 c -0.4,1.89 -0.71,3.19 -0.81,3.99 l -0.09,0 c -0.2,-1.1 -0.51,-2.4 -0.81,-3.99 l -1.37,-6.31 -3.40,0 z m 29.59,0 0,2.71 3.40,0 0,17.90 3.28,0 0,-17.90 3.40,0 c 0,0 .00,-2.71 -0.09,-2.71 l -9.99,0 z m -53.49,5.12 8.90,5.18 -8.90,5.09 0,-10.28 z m 89.40,.09 c -1.7,0 -2.89,.59 -3.59,1.59 -0.69,.99 -0.99,2.60 -0.99,4.90 l 0,2.59 c 0,2.2 .30,3.90 .99,4.90 .7,1.1 1.8,1.59 3.5,1.59 1.4,0 2.38,-0.3 3.18,-1 .7,-0.7 1.09,-1.69 1.09,-3.09 l 0,-0.5 -2.90,-0.21 c 0,1 -0.08,1.6 -0.28,2 -0.1,.4 -0.5,.62 -1,.62 -0.3,0 -0.61,-0.11 -0.81,-0.31 -0.2,-0.3 -0.30,-0.59 -0.40,-1.09 -0.1,-0.5 -0.09,-1.21 -0.09,-2.21 l 0,-0.78 5.71,-0.09 0,-2.62 c 0,-1.6 -0.10,-2.78 -0.40,-3.68 -0.2,-0.89 -0.71,-1.59 -1.31,-1.99 -0.7,-0.4 -1.48,-0.59 -2.68,-0.59 z m -50.49,.09 c -1.09,0 -2.01,.18 -2.71,.68 -0.7,.4 -1.2,1.12 -1.49,2.12 -0.3,1 -0.5,2.27 -0.5,3.87 l 0,2.21 c 0,1.5 .10,2.78 .40,3.78 .2,.9 .70,1.62 1.40,2.12 .69,.5 1.71,.68 2.81,.78 1.19,0 2.08,-0.28 2.78,-0.68 .69,-0.4 1.09,-1.09 1.49,-2.09 .39,-1 .49,-2.30 .49,-3.90 l 0,-2.21 c 0,-1.6 -0.2,-2.87 -0.49,-3.87 -0.3,-0.89 -0.8,-1.62 -1.49,-2.12 -0.7,-0.5 -1.58,-0.68 -2.68,-0.68 z m 12.18,.09 0,11.90 c -0.1,.3 -0.29,.48 -0.59,.68 -0.2,.2 -0.51,.31 -0.81,.31 -0.3,0 -0.58,-0.10 -0.68,-0.40 -0.1,-0.3 -0.18,-0.70 -0.18,-1.40 l 0,-10.99 -3.40,0 0,11.21 c 0,1.4 .18,2.39 .68,3.09 .49,.7 1.21,1 2.21,1 1.4,0 2.48,-0.69 3.18,-2.09 l .09,0 .31,1.78 2.59,0 0,-14.99 c 0,0 -3.40,.00 -3.40,-0.09 z m 17.31,0 0,11.90 c -0.1,.3 -0.29,.48 -0.59,.68 -0.2,.2 -0.51,.31 -0.81,.31 -0.3,0 -0.58,-0.10 -0.68,-0.40 -0.1,-0.3 -0.21,-0.70 -0.21,-1.40 l 0,-10.99 -3.40,0 0,11.21 c 0,1.4 .21,2.39 .71,3.09 .5,.7 1.18,1 2.18,1 1.39,0 2.51,-0.69 3.21,-2.09 l .09,0 .28,1.78 2.62,0 0,-14.99 c 0,0 -3.40,.00 -3.40,-0.09 z m 20.90,2.09 c .4,0 .58,.11 .78,.31 .2,.3 .30,.59 .40,1.09 .1,.5 .09,1.21 .09,2.21 l 0,1.09 -2.5,0 0,-1.09 c 0,-1 -0.00,-1.71 .09,-2.21 0,-0.4 .11,-0.8 .31,-1 .2,-0.3 .51,-0.40 .81,-0.40 z m -50.49,.12 c .5,0 .8,.18 1,.68 .19,.5 .28,1.30 .28,2.40 l 0,4.68 c 0,1.1 -0.08,1.90 -0.28,2.40 -0.2,.5 -0.5,.68 -1,.68 -0.5,0 -0.79,-0.18 -0.99,-0.68 -0.2,-0.5 -0.31,-1.30 -0.31,-2.40 l 0,-4.68 c 0,-1.1 .11,-1.90 .31,-2.40 .2,-0.5 .49,-0.68 .99,-0.68 z m 39.68,.09 c .3,0 .61,.10 .81,.40 .2,.3 .27,.67 .37,1.37 .1,.6 .12,1.51 .12,2.71 l .09,1.90 c 0,1.1 .00,1.99 -0.09,2.59 -0.1,.6 -0.19,1.08 -0.49,1.28 -0.2,.3 -0.50,.40 -0.90,.40 -0.3,0 -0.51,-0.08 -0.81,-0.18 -0.2,-0.1 -0.39,-0.29 -0.59,-0.59 l 0,-8.5 c .1,-0.4 .29,-0.7 .59,-1 .3,-0.3 .60,-0.40 .90,-0.40 z" id="ytp-id-14"></path></svg></a>'),void 0!==t.author_thumbnail)&&void 0!==t.author_url&&a.find(".fp-youtube-wrap").prepend('<a class="fp-youtube-channel-thumbnail" target="_blank" href="'+t.author_url+'" title="'+t.author_name+'"><img src="'+t.author_thumbnail+'" /></a>')):(a.removeClass("is-youtube"),a.removeClass("is-youtube-nl"),a.removeClass("is-youtube-standard"),a.removeClass("is-youtube-reduced"),a.find(".fp-youtube-wrap").remove(),a.find(".fp-youtube-logo").remove())}),a.on("click",".fp-youtube-title, .fp-youtube-logo",function(e){var o=t.video.time;0<o&&(o=flowplayer(0).video.sources[0].src+"&t="+parseInt(o)+"s",jQuery(this).attr("href",o))})});
     1function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}if("undefined"!=typeof fv_flowplayer_conf){var FVAbrController,parseIOSVersion=function(e){e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return e&&1<e.length?parseFloat(e[e.length-1].replace("_","."),10):0};try{"object"==_typeof(window.localStorage)&&void 0!==window.localStorage.volume&&delete fv_flowplayer_conf.volume}catch(e){}flowplayer.conf=fv_flowplayer_conf,flowplayer.conf.embed=!1,flowplayer.conf.share=!1,flowplayer.conf.analytics=!1,void 0!==fv_flowplayer_conf.disable_localstorage&&(flowplayer.conf.storage={});try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs&&((FVAbrController=function(e){this.hls=e,this.nextAutoLevel=3}).prototype.nextAutoLevel=function(e){this.nextAutoLevel=e},FVAbrController.prototype.destroy=function(){},flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}),flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&0==flowplayer.support.iOS.version&&(flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)),flowplayer.conf.hlsjs.use_for_safari&&(flowplayer.support.iOS&&13<=parseInt(flowplayer.support.iOS.version)||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&8<=parseInt(flowplayer.support.browser.version))&&(flowplayer.conf.hlsjs.safari=!0),flowplayer.support.fvmobile=!(flowplayer.support.firstframe&&!flowplayer.support.iOS&&!flowplayer.support.android);var fls=flowplayer.support;flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile&&(flowplayer.conf.native_fullscreen=!0),"ontouchstart"in window&&(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&54<fls.browser.version)&&(flowplayer.conf.native_fullscreen=!0),fls.iOS)&&(fv_player_in_iframe()||fls.iOS.version<7)&&(flowplayer.conf.native_fullscreen=!0)}"undefined"!=typeof fv_flowplayer_translations&&(flowplayer.defaults.errors=fv_flowplayer_translations);var fv_player_did_autoplay=!1;function fv_player_videos_parse(e,t){try{var a=JSON.parse(e)}catch(e){return!1}var n;jQuery(a.sources).each(function(e,o){a.sources[e].src=o.src.replace(/(\?[a-z]+=){random}/,"$1"+Math.random())}),flowplayer.support.browser.safari&&(n=[],jQuery(a.sources).each(function(e,o){"video/webm"!=o.type&&n.push(o)}),0<n.length)&&(a.sources=n);var r,e=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)").exec(location.search);return!(null!=e&&"yes"==e[1]||jQuery(window).width()<=480||jQuery(window).height()<=480)||null!=e&&"no"==e[1]||(r=!1,jQuery(a.sources).each(function(e,o){if(!o)return!1;o.mobile&&(a.sources[e]=a.sources[0],a.sources[0]=o,r=!0),r&&jQuery(t).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")})),t.trigger("fv_player_videos_parse",a),a}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return!0}}function fv_escape_attr(e){var o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,function(e){return o[e]})}function fv_player_preload(){function e(){jQuery(".flowplayer.fp-is-embed").each(function(){var e=jQuery(this);e.hasClass("has-chapters")||e.hasClass("has-transcript")||0!=jQuery(".fp-playlist-external[rel="+e.attr("id")+"]").length||e.height(jQuery(window).height())})}if(flowplayer.support.touch&&(jQuery(".fp-playlist-external.fp-playlist-horizontal.fv-playlist-design-2017").addClass("visible-captions"),jQuery(".fp-playlist-external.fp-playlist-vertical.fv-playlist-design-2017").addClass("visible-captions")),flowplayer(function(n,r){localStorage.flowplayerTestStorage&&delete localStorage.flowplayerTestStorage;var e,o,t,i=(r=jQuery(r)).find(".fp-player"),l=!1,a=n.conf.splash,s=(r.hasClass("fixed-controls")&&r.find(".fp-controls").on("click",function(e){n.loading||n.ready||(e.preventDefault(),e.stopPropagation(),n.load())}),0==r.data("volume")&&r.hasClass("no-controlbar")&&r.find(".fp-volume").remove(),jQuery(".fp-playlist-external[rel="+r.attr("id")+"]")),f=((!n.conf.playlist||0==n.conf.playlist.length)&&s.length&&0<s.find("a[data-item]").length?(o=[],s.find("a[data-item]").each(function(){(e=fv_player_videos_parse(jQuery(this).attr("data-item"),r))?o.push(e):jQuery(this).remove()}),n.conf.playlist=o,n.conf.clip=o[0]):n.conf.clip||(n.conf.clip=fv_player_videos_parse(jQuery(r).attr("data-item"),r)),jQuery("a",s).on("click",function(e){e.preventDefault(),l=!0;var e=jQuery(this),o=jQuery(".fp-playlist-external[rel="+r.attr("id")+"]"),o=jQuery("a",o).index(this),t=e.prev("a"),a=e.data("item");if(e.closest(".fv-playlist-draggable.is-dragging").length)return!1;if(location.href.match(/wp-admin/)&&0<e.parents(".fv-player-editor-preview").length)return fv_flowplayer_conf.current_video_to_edit=o,e.parents(".fv-player-custom-video").find(".edit-video .fv-player-editor-button").trigger("click"),!1;if(t.length&&e.is(":visible")&&!t.is(":visible"))return t.trigger("click"),!1;if(!jQuery("#"+e.parent().attr("rel")).hasClass("dynamic-playlist")){if(fv_player_playlist_active(jQuery(".fp-playlist-external[rel="+r.attr("id")+"]"),this),n){if(n.error&&(n.pause(),n.error=n.loading=!1,r.removeClass("is-error"),r.find(".fp-message.fp-shown").remove()),!n.video||n.video.index==o)return;n.play(o)}t=(t=a.splash)||e.find("img").attr("src");u(r,i,a,t),r[0].getBoundingClientRect().bottom-100<0&&jQuery("html, body").animate({scrollTop:jQuery(r).offset().top-100},300)}}),jQuery("[rel="+r.attr("id")+"]")),p=!1,c=r.find(".fp-splash"),d=r.find(".fv-fp-splash-text");function u(e,o,t,a){e=e.find("img.fp-splash");a?(0==e.length&&(e=jQuery('<img class="fp-splash" />'),o.prepend(e)),e.attr("alt",t.fv_title?fv_escape_attr(t.fv_title):"video"),e.removeAttr("srcset"),e.attr("src",a)):e.length&&e.remove()}n.bind("load",function(e,o,t){var a;o.conf.playlist.length&&(t.type.match(/^audio/)&&!l&&(a=(a=(t=(o=f.find("a").eq(t.index)).data("item")).splash)||o.find("img").attr("src"),u(r,i,t,a)),l=!1)}),n.bind("ready",function(e,o,t){setTimeout(function(){var e;-1<t.index&&0<f.length&&(e=jQuery("a",f).eq(t.index),fv_player_playlist_active(f,e),p=e.find(".fvp-progress"))},100),c=r.find(".fp-splash"),t.is_audio_stream||t.type.match(/^audio/)||(window.fv_player_pro&&window.fv_player_pro.autoplay_scroll||r.data("fvautoplay")||!a||"application/x-mpegurl"==o.video.type?o.one("progress",function(){c.remove(),d.remove()}):(c.remove(),d.remove()))}),n.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove(),jQuery(".fp-playlist-external a").removeClass("is-active");var e=i.find("iframe.fp-engine");e.length?(e.after(d),e.after(c)):(i.prepend(d),i.prepend(c)),p=!1}),n.bind("progress",function(e,o,t){p.length&&o.playlist_thumbnail_progress&&o.playlist_thumbnail_progress(p,o.video,t)}),n.bind("error-subtitles",function(){console.log("error-subtitles"),fv_player_notice(r,fv_flowplayer_translations[8],2e3)}),(s=jQuery(r).parent().find("div.fp-playlist-vertical[rel="+jQuery(r).attr("id")+"]")).length&&((t=function(){var e=s.hasClass("fp-playlist-only-captions")?"height":"max-height";s.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")&&(e="max-height"),s.css(e,(()=>{var e=r.height();return e=0==e?r.css("max-height"):e})()),"max-height"==e&&s.css("height","auto")})(),jQuery(window).on("resize tabsactivate",function(){setTimeout(t,0)})),n.show_status=function(e){var t="";["loading","ready","playing","paused","seeking"].every(function(e,o){return n[e]&&(t+=" "+e),!0}),console.log("FV Player Status ("+e+")",t)},window.fv_player_loaded||(window.fv_player_loaded=!0,setTimeout(function(){jQuery(document).trigger("fv_player_loaded");var e=new CustomEvent("fv_player_loaded",[]);document.dispatchEvent(e)},100)),setTimeout(function(){r.trigger("fv_player_loaded")},10),r.data("error")&&(n.message(r.data("error")),r.find(".fp-controls").remove(),r.find(".fp-header").css("opacity",1).show(),n.conf.clip={sources:[{src:!1,type:"video/mp4"}]},n.on("load",function(e){e.preventDefault(),e.stopPropagation()}))}),window.self==window.top||location.href.match(/fv_player_preview/)||(e(),jQuery(window.self).on("resize",e)),"undefined"!=typeof fv_flowplayer_playlists)for(var o in fv_flowplayer_playlists)fv_flowplayer_playlists.hasOwnProperty(o)&&jQuery("#"+o).flowplayer({playlist:fv_flowplayer_playlists[o]});fv_player_load(),fv_video_link_autoplay(),jQuery(document).ajaxComplete(function(){fv_player_load()}),jQuery(window).on("hashchange",fv_video_link_autoplay)}function fv_player_load(i){i&&1<i.lenght&&console.log("FV Player: Can't use fv_player_load with more than a single forced element!");var l=!1;if((i||jQuery(".flowplayer")).each(function(e,o){var t=jQuery(o),o=t.data("flowplayer");if(o)i&&(l=o);else{i&&(t.find(".fp-preload, .fvfp_admin_error").remove(),t.attr("data-item-lazy")?(t.attr("data-item",t.attr("data-item-lazy")),t.removeAttr("item-lazy")):(a=jQuery("[rel="+t.attr("id")+"]"))&&a.find("a[data-item-lazy]").each(function(e,o){(o=jQuery(o)).attr("data-item",o.attr("data-item-lazy")),o.removeAttr("data-item-lazy")}));var a,n,o=!1;if(t.attr("data-item"))o={clip:fv_player_videos_parse(t.attr("data-item"),t)};else if(a=jQuery("[rel="+t.attr("id")+"]")){if(0==a.find("a[data-item]").length)return;var r=[];a.find("a[data-item]").each(function(){(n=fv_player_videos_parse(jQuery(this).attr("data-item"),t))?r.push(n):jQuery(this).remove()}),o={playlist:r}}o&&(o=flowplayer.extend(o,t.data()),l=flowplayer(t[0],o),t.data("freedomplayer",l),t.data("flowplayer",l))}}),jQuery(".fv-playlist-slider-wrapper").each(function(){var e=jQuery(this).find("a:visible");(e=0===e.length?jQuery(this).find("a"):e).length&&(e=e.outerWidth()*e.length,jQuery(this).find(".fp-playlist-external").attr("style","width: "+e+"px; max-width: "+e+"px !important"))}),void 0!==jQuery().tabs&&(jQuery("body").removeClass("fv_flowplayer_tabs_hide"),jQuery(".fv_flowplayer_tabs_content").tabs()),i&&l)return l}function fv_player_playlist_active(e,o){e&&(jQuery("a",e).removeClass("is-active"),jQuery(".now-playing").remove());var t,e=jQuery(e),o=jQuery(o),a=!1,n=(o.addClass("is-active"),e.hasClass("fv-playlist-design-2014"));(n&&0==o.find("h4").length||!n)&&0==o.find(".now-playing").length&&o.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>"),e.parent().find(".flowplayer").length||(a=!0),(e.hasClass("fp-playlist-vertical")||e.hasClass("fp-playlist-horizontal")&&e.hasClass("is-audio"))&&!(e=>{var o=e.getBoundingClientRect(),t=o.top,a=t+o.height,e=e.parentNode;do{if(o=e.getBoundingClientRect(),a<=o.bottom==!1)return;if(t<=o.top)return;e=e.parentNode}while(e!=document.body);return a<=document.documentElement.clientHeight})(o.get(0))?(t=a?e.parent():e).animate({scrollTop:t.scrollTop()+(o.position().top-t.position().top)},750):e.hasClass("fp-playlist-horizontal")&&!(e=>{var o=e.getBoundingClientRect(),t=o.left,a=t+o.width,e=e.parentNode;do{if(o=e.getBoundingClientRect(),a<=o.right==!1)return;if(t<=o.left)return;e=e.parentNode}while(e!=document.body);return a<=document.documentElement.clientWidth})(o.get(0))&&(t=a?e.parent():e).animate({scrollLeft:t.scrollLeft()+(o.position().left-t.position().left)},750)}function fv_parse_sharelink(e){var o,t="fvp_";return(e=e.replace("https?://[^./].","")).match(/(youtube.com)/)?t+e.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]:e.match(/(vimeo.com)|(youtu.be)/)?t+e.match(/(?:\/)([^/]*$)/)[1]:(o=e.match(/(?:\/)([^/]*$)/))?t+o[1].match(/^[^.]*/)[0]:t+e}function fv_player_get_video_link_hash(e){var o=fv_parse_sharelink((void 0!==e.video.sources_original&&void 0!==e.video.sources_original[0]?e.video.sources_original:e.video.sources)[0].src);return o=void 0!==e.video.id?fv_parse_sharelink(e.video.id.toString()):o}function fv_player_time_hms(e){var o,t,a;return isNaN(e)?NaN:(o=parseInt(e,10),t=Math.floor(o/3600),a=Math.floor(o/60)%60,e=o%60,t?t+="h":t="",t&&a<10?a="0"+a+"m":a?a+="m":a="",(t||a)&&e<10&&(e="0"+e),t+a+(e+="s"))}function fv_player_time_hms_ms(e){var o;return isNaN(e)?NaN:(o=void 0!==(o=((e=parseFloat(e).toFixed(3))+"").split("."))[1]&&0<o[1]?o[1]+"ms":"",fv_player_time_hms(e)+o)}function fv_player_time_seconds(e,o){var t;return e?(t=0,e.match(/(\d+[a-z]{1,2})/g).forEach(function(e){e.endsWith("h")?t+=3600*parseInt(e):e.endsWith("m")?t+=60*parseInt(e):e.endsWith("s")&&!e.endsWith("ms")?t+=parseInt(e):e.endsWith("ms")&&parseInt(e)&&(t+=parseInt(e)/1e3)}),o?Math.min(t,o):t):-1}function fv_autoplay_init(e,t,o,a,n){var r,i,l;!fv_autoplay_exec_in_progress&&(fv_autoplay_exec_in_progress=!0,r=e.data("flowplayer"))&&(i=fv_player_time_seconds(o),n=fv_player_time_seconds(n),a=fv_player_time_seconds(a),e.parent().hasClass("ui-tabs-panel")&&(o=e.parent().attr("id"),jQuery("[aria-controls="+o+"] a").trigger("click")),e.find(".fp-player").attr("class").match(/\bis-sticky/)||(l=jQuery(e).offset().top-(jQuery(window).height()-jQuery(e).height())/2,window.scrollTo(0,l),r.one("ready",function(){window.scrollTo(0,l)})),e.hasClass("lightboxed")&&setTimeout(function(){jQuery("[href=\\#"+e.attr("id")+"]").trigger("click")},0),t?fv_player_video_link_autoplay_can(r,parseInt(t))?r.ready?fv_player_video_link_seek(r,i,n,a):(r.play(parseInt(t)),r.one("ready",function(){fv_player_video_link_seek(r,i,n,a)})):flowplayer.support.inlineVideo&&(r.one(r.playing?"progress":"ready",function(e,o){o.play(parseInt(t)),o.one("ready",function(){fv_player_video_link_seek(o,i,n,a)})}),e.find(".fp-splash").attr("src",jQuery("[rel="+e.attr("id")+"] div").eq(t).find("img").attr("src")).removeAttr("srcset"),fv_player_in_iframe()||fv_player_notice(e,fv_flowplayer_translations[11],"progress")):r.ready?fv_player_video_link_seek(r,i,n,a):(fv_player_video_link_autoplay_can(r)?r.load():fv_player_in_iframe()||fv_player_notice(e,fv_flowplayer_translations[11],"progress"),r.one("ready",function(){fv_player_video_link_seek(r,i,n,a)})))}function fv_player_video_link_seek(e,o,t,a){fv_autoplay_exec_in_progress=!1;var n=setInterval(function(){e.loading||((0<o||0<e.video.time)&&(e.custom_seek?e.custom_seek(o):e.seek(o)),t&&a&&e.trigger("link-ab",[e,a,t]),clearInterval(n))},10)}jQuery(document).ready(function(){var e=0,o=setInterval(function(){++e<1e3&&(window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&!window.FV_Player_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro||window.fv_player_user_playlists&&!window.fv_player_user_playlists.is_loaded||window.FV_Player_JS_Loader_scripts_total&&window.FV_Player_JS_Loader_scripts_loaded<window.FV_Player_JS_Loader_scripts_total)||(clearInterval(o),fv_player_preload())},10)});var fv_autoplay_exec_in_progress=!1;function fv_video_link_autoplay(){var e,i,l,s,f,p=!0;"undefined"!=typeof flowplayer&&"undefined"!=typeof fv_flowplayer_conf&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length&&(e=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(","),i=e[0],l=void 0!==e[1]&&e[1],s=void 0!==e[2]&&e[2],f=void 0!==e[3]&&e[3],jQuery(".flowplayer").each(function(){var e=jQuery(this),o=(e=e.hasClass("lightbox-starter")?jQuery(e.attr("href")):e).data("flowplayer");if(o){var t,a=void 0!==o.conf.playlist&&1<o.conf.playlist.length?o.conf.playlist:[o.conf.clip];for(t in a)if(a.hasOwnProperty(t)){var n=void 0!==a[t].id&&fv_parse_sharelink(a[t].id.toString());if(i===n&&p)return 0<o.conf.playlist.length?o.conf.playlist[t].prevent_position_restore=!0:o.conf.clip.prevent_position_restore=!0,console.log("fv_autoplay_exec for "+n,t),fv_autoplay_init(e,parseInt(t),l,s,f),p=!1}for(t in a)if(a.hasOwnProperty(t)){var r=fv_parse_sharelink(a[t].sources[0].src);if(i===r&&p)return 0<o.conf.playlist.length?o.conf.playlist[t].prevent_position_restore=!0:o.conf.clip.prevent_position_restore=!0,console.log("fv_autoplay_exec for "+r,t),fv_autoplay_init(e,parseInt(t),l,s,f),p=!1}}}))}function fv_player_video_link_autoplay_can(e,o){return!("video/youtube"==(o?e.conf.playlist[o]:e.conf.clip).sources[0].type&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())&&flowplayer.support.firstframe}function fv_player_notice(e,o,t){var a=jQuery(".fvfp-notices",e),n=(a.length||(a=jQuery('<div class="fvfp-notices">'),jQuery(".fp-player",e).append(a)),jQuery('<div class="fvfp-notice-content">'+o+"</div></div>"));return a.append(n),"string"==typeof t&&jQuery(e).data("flowplayer").on(t,function(){n.fadeOut(100,function(){jQuery(this).remove()})}),0<t&&setTimeout(function(){n.fadeOut(2e3,function(){jQuery(this).remove()})},t),n}var fv_player_clipboard=function(e,o,t){if(navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)navigator.clipboard.writeText(e).then(function(){o()},function(){void 0!==t&&t()});else try{fv_player_doCopy(e)?o():void 0!==t&&t()}catch(e){void 0!==t&&t(e)}};function fv_player_doCopy(e){var o,t,a,n=document.createElement("textarea"),e=(n.value=e,n.style.opacity=0,n.style.position="absolute",n.setAttribute("readonly",!0),document.body.appendChild(n),0<document.getSelection().rangeCount&&document.getSelection().getRangeAt(0));navigator.userAgent.match(/ipad|ipod|iphone/i)?(o=n.contentEditable,n.contentEditable=!0,(t=document.createRange()).selectNodeContents(n),(a=window.getSelection()).removeAllRanges(),a.addRange(t),n.setSelectionRange(0,999999),n.contentEditable=o):n.select();try{var r=document.execCommand("copy");return e&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(e)),document.body.removeChild(n),r}catch(e){throw new Error("Unsuccessfull")}}function fv_player_log(e,o){fv_flowplayer_conf.debug&&"undefined"!=typeof console&&"function"==typeof console.log&&(o?console.log(e,o):console.log(e)),fv_flowplayer_conf.debug&&void 0!==window.location.search&&window.location.search.match(/fvfp/)&&jQuery("body").prepend(e+"<br />")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function is_ga_4(e){return!(void 0===e.conf.fvanalytics||!e.conf.fvanalytics||!e.conf.fvanalytics.startsWith("G-"))}function fv_player_track(e,o,t,a,n,r){if("object"!=_typeof(e)&&(r=n,n=a,a=t,t=o,o=e,e=!1),o=o||flowplayer.conf.fvanalytics,void 0===a&&(a="Unknown engine"),/fv_player_track_debug/.test(window.location.href)&&console.log("FV Player Track: "+t+" - "+a+" '"+n+"'",r),"undefined"!=typeof gtag)is_ga_4(e)&&"Heartbeat"!==n?gtag("event",t,{video_title:n,video_current_time:e.video.time,video_provider:a,video_duration:e.video.duration,value:r||1}):gtag("event",t,{event_category:a,event_label:n,value:r||1});else if(o&&"undefined"!=typeof ga)ga("create",o,"auto",n,{allowLinker:!0}),ga("require","linker"),r?ga("send","event",t,a,n,r):ga("send","event",t,a,n);else if(o&&"undefined"!=typeof _gat){e=_gat._getTracker(o);if(void 0===e._setAllowLinker)return;e._setAllowLinker(!0),r?e._trackEvent(t,a,n,r):e._trackEvent(t,a,n)}flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&"undefined"!=typeof _paq&&(r?_paq.push(["trackEvent",t,a,n,r]):_paq.push(["trackEvent",t,a,n]))}function fv_player_track_name(e,o){e=e.attr("title");return(e=(e=e||void 0===o.fv_title?e:o.fv_title)||void 0===o.title?e:o.title)||void 0===o.src||(e=o.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,""),o.type.match(/mpegurl/)&&(e=o.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+e)),e}function freedomplayer_playlist_size_check(){jQuery(".fp-playlist-external").each(function(){var e=jQuery(this),o=e.parent().width(),t=e.css("max-width").match(/%/)?e.width():parseInt(e.css("max-width")),t=0<t&&t<o?t:o;900<=e.parent().width()?e.addClass("is-wide"):e.removeClass("is-wide"),(e.hasClass("fp-playlist-polaroid")||e.hasClass("fp-playlist-version-one")||e.hasClass("fp-playlist-version-two"))&&(o=e.hasClass("fp-playlist-version-one")||e.hasClass("fp-playlist-version-two")?200:150,8<(t=Math.floor(t/o))?t=8:t<2&&(t=2),e.css("--fp-playlist-items-per-row",String(t)))})}flowplayer(function(t,r){var n,i,o,l,a,s;function e(){var e;"dash"==t.engine.engineName?((e=l[t.engine.dash.getQualityFor("video")]).qualityIndex!=a&&(a=e.qualityIndex,f(e.qualityIndex,l)),o.match(/dash_debug/)&&p(e.width,e.height,e.bitrate)):"hlsjs-lite"==t.engine.engineName&&(n.currentLevel!=a&&(a=n.currentLevel,f(n.currentLevel,n.levels)),o.match(/hls_debug/))&&(e=n.levels[n.currentLevel])&&p(e.width,e.height,e.bitrate)}function f(e,o){var t,a,n;o[e]&&(t=o[e].height,a=541,n=1e5,jQuery(o).each(function(e,o){720<=o.height&&o.height<1400&&(a=720),o.height<n&&(n=o.height),localStorage.FVPlayerHLSQuality==o.height&&(r.find("a[data-quality]").removeClass("fp-selected fp-color"),r.find("a[data-quality="+e+"]").addClass("fp-selected fp-color"))}),r.find("a[data-quality]").removeClass("is-current"),r.find("a[data-quality="+e+"]").addClass("is-current"),o=1400<=t?"4K":a<=t?"HD":360<=t&&n<t?"SD":"SD",r.find(".fp-qsel").html(o))}function p(e,o,t){s.html("Using "+e+"x"+o+" at "+Math.round(t/1024)+" kbps")}function c(){var t=r.find(".fp-qsel-menu");t.children().each(function(e,o){t.prepend(o)}),t.children().each(function(e,o){var t;/^NaNp/.test(jQuery(o).html())?(t=jQuery(o).html().match(/\((.*?)\)/))&&void 0!==t[1]&&jQuery(o).html(t[1]):jQuery(o).html(jQuery(o).html().replace(/\(.*?\)/,""))}),t.prepend(t.find("a[data-quality=-1]")),t.prepend(t.find("strong"))}r=jQuery(r),void 0===t.conf.disable_localstorage&&(i=t.conf.splash,flowplayer.engine("hlsjs-lite").plugin(function(e){(n=e.hls).on(Hls.Events.ERROR,function(e,o){"mediaError"==o.type&&"fragParsingError"==o.details&&1==o.fatal&&(n.destroy(),t.trigger("error",[t,{code:3}]),setTimeout(function(){r.removeClass("is-seeking"),r.addClass("is-paused")},0))}),flowplayer.support.browser.safari&&n.on(Hls.Events.KEY_LOADED,function(e){"hlsKeyLoaded"==e&&setTimeout(function(){t.loading&&(console.log("FV Player: Safari stuck loading HLS, resuming playback..."),t.resume())},0)});var a=!(!flowplayer.conf.hd_streaming||flowplayer.support.fvmobile)&&720;localStorage.FVPlayerHLSQuality&&(a=localStorage.FVPlayerHLSQuality),(a=0==jQuery(e.root).data("hd_streaming")?!1:a)&&n.on(Hls.Events.MANIFEST_PARSED,function(e,o){var t=!1;jQuery.each(o.levels,function(e,o){o.height==a&&(t=e)}),localStorage.FVPlayerHLSQuality||t||jQuery.each(o.levels,function(e,o){o.height>t&&(t=e)}),t&&(console.log("FV Player: Picked "+o.levels[t].height+"p quality"),n.startLevel=t,n.currentLevel=t)})}),r=jQuery(r),o=document.location.search,localStorage.FVPlayerDashQuality&&(t.conf.dash||(t.conf.dash={}),t.conf.dash.initialVideoQuality="restore"),r.on("click",".fp-qsel-menu a",function(){var e;"hlsjs-lite"==t.engine.engineName&&(-1==(e=jQuery(this).data("quality"))?localStorage.removeItem("FVPlayerHLSQuality"):(e=n.levels[e],localStorage.FVPlayerHLSQuality=e.height))}),0!=r.data("hd_streaming")&&(localStorage.FVPlayerHLSQuality?(t.conf.hlsjs.startLevel=parseInt(localStorage.FVPlayerHLSQuality),t.conf.hlsjs.testBandwidth=!1,t.conf.hlsjs.autoLevelEnabled=!1):flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile&&(t.conf.hlsjs.startLevel=3,t.conf.hlsjs.testBandwidth=!1,t.conf.hlsjs.autoLevelEnabled=!1)),t.bind("quality",function(e,o,t){"dash"==o.engine.engineName&&(-1==t?localStorage.removeItem("FVPlayerDashQuality"):l[t]&&(localStorage.FVPlayerDashQuality=l[t].height))}),l=[],a=-1,t.bind("ready",function(e,o){var a;r.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality),"dash"==o.engine.engineName?(l=o.engine.dash.getBitrateInfoListFor("video"),localStorage.FVPlayerDashQuality&&o.conf.dash.initialVideoQuality&&o.quality(o.conf.dash.initialVideoQuality),c()):"hlsjs-lite"==o.engine.engineName?(i&&(r.addClass("is-loading"),o.loading=!0,o.one("progress",function(){o.loading&&(r.removeClass("is-loading"),o.loading=!1)})),o.video.qualities&&2<o.video.qualities.length&&(a=-1,0!=r.data("hd_streaming")&&(localStorage.FVPlayerHLSQuality?jQuery(o.video.qualities).each(function(e,o){if(o.value==localStorage.FVPlayerHLSQuality)return a=localStorage.FVPlayerHLSQuality,!1}):flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile&&jQuery(o.video.qualities).each(function(e,o){var t=parseInt(o.label);0<t&&-1==a&&720<=t&&t<=720&&(a=o.value)}),-1<(a=parseInt(a)))&&r.one("progress",function(){setTimeout(function(){o.quality(a)})}),c())):o.video.sources_fvqs&&0<o.video.sources_fvqs.length&&o.video.src.match(/vimeo.*?\.mp4/)&&setTimeout(c,0),r.find("a[data-quality]").removeClass("is-current")}),(o.match(/dash_debug/)||o.match(/hls_debug/))&&(s=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(r.find(".fp-player"))),t.bind("ready progress",e),t.bind("quality",function(){setTimeout(e,0)}))}),flowplayer(function(a,s){var n,r,e,o,t,s=jQuery(s),i=flowplayer.bean,l=0,f=0,p=("undefined"==typeof ga&&a.conf.fvanalytics&&"undefined"==typeof _gat&&"undefined"==typeof gtag&&(is_ga_4(a)?jQuery.getScript({url:"https://www.googletagmanager.com/gtag/js?id="+a.conf.fvanalytics,cache:!0},function(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config",a.conf.fvanalytics)}):jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:!0},function(){ga("create",a.conf.fvanalytics,"auto")})),!window._paq&&a.conf.matomo_domain&&a.conf.matomo_site_id&&(e="//"+a.conf.matomo_domain+"/",(t=window._paq=window._paq||[]).push(["setTrackerUrl",e+"matomo.php"]),t.push(["setSiteId",a.conf.matomo_site_id]),o=(t=document).createElement("script"),t=t.getElementsByTagName("script")[0],o.type="text/javascript",o.async=!0,o.src=e+"matomo.js",t.parentNode.insertBefore(o,t)),a.bind("progress",function(e,o,t){if(1<t){var a=o.video,n=a.duration,r=0,i=fv_player_track_name(s,a);if(4<n&&(19*n/20<t?r=4:3*n/4<t?r=3:n/2<t?r=2:n/4<t&&(r=1)),o.live&&(r=0),!s.data("fv_track_"+p[r])){for(var l in p)if(p.hasOwnProperty(l)){if(l==r)break;if(!s.data("fv_track_"+p[l]))return}s.trigger("fv_track_"+p[r].replace(/ /,"_"),[o,i]),s.data("fv_track_"+p[r],!0),fv_player_track(o,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+p[r],o.engine.engineName+"/"+a.type,i)}}}).bind("finish ready ",function(e,o){for(var t in p)p.hasOwnProperty(t)&&s.removeData("fv_track_"+p[t])}).bind("error",function(e,o,t){setTimeout(function(){var e;o.error&&((e=void 0!==o.video&&void 0!==o.video.src&&o.video)||void 0===o.conf.clip||void 0===o.conf.clip.sources||void 0===o.conf.clip.sources[0]||void 0===o.conf.clip.sources[0].src||(e=o.conf.clip.sources[0]),!(e=fv_player_track_name(s,e))||e.match(/\/\/vimeo.com\/\d/)||is_ga_4(o)||fv_player_track(o,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+"error",t.message,e))},100)}),a.bind("load unload",c).bind("progress",function(e,o){o.seeking||(l+=f?+new Date-f:0,f=+new Date),n=n||setTimeout(function(){n=null,c({type:"heartbeat"})},6e5)}).bind("pause",function(){f=0}),a.bind("shutdown",function(){i.off(window,"visibilitychange pagehide",c)}),i.on(window,"visibilitychange pagehide",c),is_ga_4(a)?["Play","25 Percent Played","50  Percent Played","75 Percent Played","100 Percent Played"]:["start","first quartile","second quartile","third quartile","complete"]);function c(e,o,t){"visible"===document.visibilityState&&"load"!==e.type&&"heartbeat"!==e.type||(t=t||a.video,"load"===e.type&&(r=fv_player_track_name(s,t)),l&&(fv_player_track(a,!1,"Video / Seconds played",a.engine.engineName+"/"+a.video.type,r,Math.round(l/1e3)),l=0,n)&&(clearTimeout(n),n=null))}a.get_time_played=function(){return l/1e3}}),flowplayer(function(n,r){var i=(r=jQuery(r)).find(".fp-player"),l=r.hasClass("fp-full"),s=0;function o(){var e=i.width()||r.width(),o=n.video.index||0,t=(900<e?jQuery(".fp-subtitle",r).addClass("is-wide"):jQuery(".fp-subtitle",r).removeClass("is-wide"),e<480+35*s),o=(void 0!==n.fv_timeline_chapters_data&&void 0!==n.fv_timeline_chapters_data[o]&&(t=!0),l||r.toggleClass("fp-full",r.hasClass("has-abloop")||t),""),t=(e<400?o="is-tiny":e<600&&400<=e&&(o="is-small"),r.trigger("fv-player-size",[o]),i),e=((t=r.parent().hasClass("fp-playlist-vertical-wrapper")||r.parent().hasClass("fp-playlist-text-wrapper")?r.parent():t).width()<=560?t.addClass("is-fv-narrow"):t.removeClass("is-fv-narrow"),r.find(".fp-controls")),o=e.parent().width(),t=e.find(".fp-duration, .fp-playbtn"),a=0;t.removeClass("wont-fit"),r.find(".fp-controls").children(":visible:not(.fp-timeline)").each(function(){a+=jQuery(this).outerWidth(!0)}),o<a&&t.addClass("wont-fit")}o();function e(){clearTimeout(f),f=setTimeout(t,a)}var t,a,f;t=o,a=250;window.addEventListener("resize",e),"fonts"in document&&n.one("load",function(){document.fonts.load("1em flowplayer")}),n.on("ready fullscreen fullscreen-exit sticky sticky-exit",function(e){setTimeout(function(){s=r.find(".fp-controls > strong:visible").length+r.find(".fp-controls > .fp-icon:visible").length,o()},0)}),n.on("unload pause finish error",function(){"undefined"!=typeof checker&&clearInterval(checker)})}),jQuery(window).on("resize tabsactivate",freedomplayer_playlist_size_check),jQuery(document).ready(freedomplayer_playlist_size_check),flowplayer(function(o,a){a=jQuery(a),o.setLogoPosition=function(){var e=freedomplayer.support.browser.safari&&parseFloat(freedomplayer.support.browser.version)<14.1||freedomplayer.support.iOS&&parseFloat(freedomplayer.support.iOS.version)<15;o.conf.logo_over_video&&o.video&&o.video.width&&o.video.height&&!e?a.find(".fp-logo").css("--fp-aspect-ratio",(o.video.width/o.video.height).toFixed(2)):a.find(".fp-logo").css("width","100%").css("height","100%")},o.bind("ready",function(e,o,t){o.setLogoPosition(),t.remove_black_bars?a.addClass("remove-black-bars"):a.removeClass("remove-black-bars"),/Chrome/.test(navigator.userAgent)&&54<parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)&&(o.video.subtitles?jQuery(a).addClass("chrome55fix-subtitles"):jQuery(a).addClass("chrome55fix"))});var e=a.css("background-image");if(e){if(!(e=e.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(","))||!e[0].match(/^(https?:)?\/\//))return;var t=new Image,e=(t.src=e[0],t.height/t.width),t=a.height()/a.width();Math.abs(t-e)<.05&&a.css("background-size","cover")}var n=!1;jQuery(o.conf.playlist).each(function(e,o){o.sources[0].type.match(/youtube/)&&(n=!0)}),n&&a.addClass("is-youtube"),o.bind("ready",function(e,o,t){"video/youtube"==t.type?a.addClass("is-youtube"):a.removeClass("is-youtube")})}),(e=>{e(window).on("resize",function(){e("iframe[id][src][height][width]").each(function(){e(this).attr("id").match(/fv_vimeo_/)&&e(this).width()<=e(this).attr("width")&&e(this).height(e(this).width()*e(this).attr("height")/e(this).attr("width"))}),jQuery(".wistia_embed").each(function(){e(this).height(e(this).width()*e(this).data("ratio"))})}).trigger("resize")})(jQuery),jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(e,o){var t=jQuery(o.oldPanel).find(".flowplayer").data("flowplayer");void 0!==t&&t.pause(),jQuery(".flowplayer",o.newPanel).data("flowplayer").load()}),flowplayer(function(o,a){a=jQuery(a);var e=flowplayer.bean;a.hasClass("is-audio")&&(e.off(a[0],"mouseenter"),e.off(a[0],"mouseleave"),a.removeClass("is-mouseout"),a.addClass("fixed-controls").addClass("is-mouseover"),o.on("error",function(e,o,t){jQuery(".fp-message",a).html(jQuery(".fp-message",a).html().replace(/video/,"audio"))}),a.on("click",function(e){o.ready||(e.preventDefault(),e.stopPropagation(),o.load())}))}),jQuery(document).on("mfpClose",function(){void 0!==jQuery(".flowplayer").data("flowplayer")&&jQuery(".flowplayer").data("flowplayer").unload()}),jQuery(document).on("click",".vc_tta-tab a",function(){var e=jQuery(".flowplayer.is-playing").data("flowplayer");e&&e.pause()}),flowplayer(function(e,o){o=jQuery(o),e.bind("ready",function(){setTimeout(function(){var e=jQuery("video",o);0<e.length&&e.prop("autoplay",!1)},100),o.find("video.fp-engine").addClass("intrinsic-ignore")})}),jQuery(".flowplayer").on("ready",function(e,o){/BB10/.test(navigator.userAgent)&&o.fullscreen()});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var o=!1;jQuery(".flowplayer").each(function(){if(jQuery(this).is(":visible")&&!jQuery(this).hasClass("lightboxed")&&!jQuery(this).hasClass("lightbox-starter")&&!jQuery(this).hasClass("is-audio")&&(jQuery(this).width()<30||jQuery(this).height()<20)){o=!0;var e=jQuery(this);while(jQuery(e).width()<30||jQuery(e).width()==jQuery(this).width()){if(0==jQuery(e).parent().length)break;(e=jQuery(e).parent()).hasClass("ld-video")&&(""==e[0].style.height&&e.css("height","auto"),0<parseInt(e.css("padding-bottom")))&&e.css("padding-bottom","0")}jQuery(this).width(jQuery(e).width()),jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio"))),fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=e}}),o&&jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]&&(jQuery(this).width(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")].width()),jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio"))))})})}void 0!==flowplayer.conf.safety_resize&&flowplayer.conf.safety_resize&&jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)});var fv_autoplay_type,fv_player_scroll_autoplay,fv_player_scroll_autoplay_last_winner,fv_player_scroll_int,fv_player_warning,isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fv_player_lightbox_bind(){jQuery(".freedomplayer.lightbox-starter").each(function(){var e,o=jQuery(this);(parseInt(o.css("width"))<10||parseInt(o.css("height"))<10)&&((e=o.find(".fp-ratio")).length<1&&(o.append('<div class="fp-ratio"></div>'),e=o.find(".fp-ratio")),e.css("paddingTop",100*o.data("ratio")+"%")),o.find(".fp-preload").remove()})}function fv_flowplayer_mobile_switch(e){var o,t=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)").exec(location.search);!(null!=t&&"yes"==t[1]||jQuery(window).width()<=480||jQuery(window).height()<=480)||null!=t&&"no"==t[1]||(o=!1,jQuery("#wpfp_"+e+" video source").each(function(){jQuery(this).attr("id")!="wpfp_"+e+"_mobile"&&(o=!0,jQuery(this).remove())}),o&&jQuery("#wpfp_"+e).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>"))}if(isIE11&&(jQuery(document).ready(function(){jQuery(".fp-waiting").hide()}),flowplayer(function(e,o){e.bind("load",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("beforeseek",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("progress",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("seek",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("fullscreen",function(e){jQuery("#wpadminbar").hide()}).bind("fullscreen-exit",function(e){jQuery("#wpadminbar").show()})})),flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)<9&&jQuery(".flowplayer").each(function(){jQuery(this).css("width",jQuery(this).css("max-width")),jQuery(this).css("height",jQuery(this).css("max-height"))}),location.href.match(/elementor-preview=/)?(console.log("FV Player: Elementor editor is active"),setInterval(fv_player_load,1e3)):location.href.match(/brizy-edit-iframe/)?(console.log("FV Player: Brizy editor is active"),setInterval(fv_player_load,1e3)):"blob:"===location.protocol&&setTimeout(function(){jQuery("body.block-editor-iframe__body").length&&(console.log("FV Player: Site Editor is active"),setInterval(fv_player_load,1e3))},0),window.DELEGATE_NAMES&&flowplayer(function(e,o){fv_player_notice(o,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)}),flowplayer(function(e,o){flowplayer.bean.off(o,"contextmenu")}),location.href.match(/elementor-preview=/)&&(console.log("FV Player: Elementor editor is active"),setInterval(fv_player_load,1e3)),flowplayer(function(t,a){void 0!==(a=jQuery(a)).data("fv-embed")&&a.data("fv-embed")&&"false"!=a.data("fv-embed")&&(t.embedCode=function(){t.video;var e=a.width(),o=a.height();return o+=2,(a.hasClass("has-chapters")||a.hasClass("has-transcript"))&&(o+=300),0<jQuery(".fp-playlist-external[rel="+a.attr("id")+"]").length&&(o+=170),'<iframe src="'+(a.data("fv-embed")+"#"+fv_player_get_video_link_hash(t))+'" allowfullscreen allow="autoplay" width="'+parseInt(e)+'" height="'+parseInt(o)+'" frameborder="0" style="max-width:100%"></iframe>'})}),jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var e,o,t=jQuery(this).closest(".flowplayer");return"undefined"!=typeof fv_player_editor_conf?fv_player_notice(t,fv_player_editor_translations.embed_notice,2e3):(e=jQuery(this),"function"==typeof(t=(o=e.parents(".flowplayer")).data("flowplayer")).embedCode&&o.find(".embed-code textarea").val(t.embedCode()),fv_player_clipboard(o.find(".embed-code textarea").val(),function(){fv_player_notice(o,fv_flowplayer_translations.embed_copied,2e3)},function(){e.parents(".fvp-share-bar").find(".embed-code").toggle(),e.parents(".fvp-share-bar").toggleClass("visible")})),!1}),flowplayer(function(a,n){var r,i,l="fullscreen",s="fullscreen-exit",f=flowplayer.support.fullscreen,p=window,c=flowplayer.bean;a.fullscreen=function(e){if(!a.disabled&&0!=jQuery(n).data("fullscreen")){(e=void 0===e?!a.isFullscreen:e)&&(i=p.scrollY,r=p.scrollX,console.log("scrollY",i));var o,t=d.find("video.fp-engine",n)[0];if(!(flowplayer.conf.native_fullscreen&&t&&flowplayer.support.iOS))return o=jQuery(n).find(".fp-player")[0],flowplayer.support.browser.safari&&flowplayer.support.fullscreen&&e&&document.fullscreenElement&&(f=!1,document.addEventListener("fullscreenchange",function(e){flowplayer(".is-fullscreen").trigger(s)})),f?e?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof o[e]&&(o[e]({navigationUI:"hide"}),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||o[e]())}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):a.trigger(e?l:s,[a]),a;a.trigger(l,[a]),c.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement===t&&(c.off(document,".nativefullscreen"),c.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement||(c.off(document,".nativefullscreen"),a.trigger(s,[a]))}))});try{t.webkitEnterFullScreen()}catch(e){a.pause(),d.find(".fp-play",n)[0].style.opacity=1,jQuery(n).on("touchstart",function(e){return d.find(".fp-play",n)[0].style.opacity="",a.resume(),t.webkitEnterFullScreen(),!1})}c.one(t,"webkitendfullscreen",function(){c.off(document,"fullscreenchange.nativefullscreen"),a.trigger(s,[a]),d.prop(t,"controls",!0),d.prop(t,"controls",!1)})}};var e,d=flowplayer.common;function t(e){var o=n;while(o){try{var t=getComputedStyle(o);t.transform&&(o.style.transform=e?"none":""),t.zIndex&&(o.style.zIndex=e?"auto":"")}catch(e){}o=o.parentNode}}a.on("mousedown.fs",function(){+new Date-e<150&&a.ready&&a.fullscreen(),e=+new Date}),a.on(l,function(){d.addClass(n,"is-fullscreen"),d.toggleClass(n,"fp-minimal-fullscreen",d.hasClass(n,"fp-minimal")),d.removeClass(n,"fp-minimal"),d.addClass(document.body,"has-fv-player-fullscreen"),f&&!document.fullscreenElement||(d.css(n,"position","fixed"),t(!0)),a.isFullscreen=!0}).on(s,function(){d.toggleClass(n,"fp-minimal",d.hasClass(n,"fp-minimal-fullscreen")),d.removeClass(n,"fp-minimal-fullscreen");var e,o=f&&jQuery(n).find(".fp-player")[0]==document.fullscreenElement;o||"html5"!==a.engine||(e=n.css("opacity")||"",d.css(n,"opacity",0)),o||(d.css(n,"position",""),t(!1)),d.removeClass(n,"is-fullscreen"),d.removeClass(document.body,"has-fv-player-fullscreen"),o||"html5"!==a.engine||setTimeout(function(){n.css("opacity",e)}),a.isFullscreen=!1,"fvyoutube"!=a.engine.engineName&&p.scrollTo(r,i)}).on("unload",function(){a.isFullscreen&&a.fullscreen()}),a.on("shutdown",function(){FULL_PLAYER=null,d.removeNode(wrapper)}),flowplayer.support.iOS&&n.querySelector(".fp-player").addEventListener("touchstart",function(e){a.isFullscreen&&e.pageX&&(16<e.pageX&&e.pageX<window.innerWidth-16||e.preventDefault())})}),flowplayer(function(o,t){t=jQuery(t);var e,a=jQuery(".fp-playlist-external[rel="+t.attr("id")+"]"),a=a.hasClass("fp-playlist-season")||a.hasClass("fp-playlist-polaroid"),n=1==t.data("fsforce");function r(){return!!(window.innerWidth>window.innerHeight&&window.screen&&window.screen.width&&26<window.screen.width-window.innerHeight)}function i(){o.isFullscreen&&window.innerWidth>window.innerHeight&&r()&&!e&&(fv_player_notice(t,fv_flowplayer_translations.iphone_swipe_up_location_bar,"resize-good"),e=setTimeout(function(){e=!1,o.trigger("resize-good")},5e3))}flowplayer.conf.wpadmin&&!a||jQuery(t).hasClass("is-audio")||0==t.data("fullscreen")||0==t.data("fsforce")||((flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||n||a)&&(flowplayer.support.fullscreen?t.on("click",function(){o.ready&&!o.paused||o.fullscreen(!0)}):o.bind("ready",function(){o.video.vr||o.one("progress",function(){o.fullscreen(!0)})}),jQuery("[rel="+t.attr("id")+"] a").on("click",function(e){o.isFullscreen||(o.fullscreen(),o.resume())}),o.on("resume",function(){o.video.vr||o.isFullscreen||(flowplayer.support.fullscreen?o.fullscreen():o.one("progress",function(){o.fullscreen(!0)}))}),o.on("finish",function(){0!=o.conf.playlist.length&&o.conf.playlist.length-1!=o.video.index||o.fullscreen(!1)}).on("fullscreen",function(e,o){t.addClass("forced-fullscreen")}).on("fullscreen-exit",function(e,o){o.pause(),t.removeClass("forced-fullscreen")})),flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen&&window.screen&&window.screen.orientation&&o.on("fullscreen",function(e,o){void 0!==(o=o).video.width&&void 0!==o.video.height&&0!=o.video.width&&0!=o.video.height&&o.video.width<o.video.height?screen.orientation.lock("portrait-primary"):screen.orientation.lock("landscape-primary")}),e=!1,!flowplayer.support.iOS)||flowplayer.support.fullscreen||flowplayer.conf.native_fullscreen||(o.on("fullscreen",i),window.addEventListener("resize",i),window.addEventListener("resize",function(){r()||(clearTimeout(e),e=!1,o.trigger("resize-good"))}))}),flowplayer(function(e,o){o=jQuery(o);(document.body.classList.contains("block-editor-page")&&!o.closest("#fv-player-shortcode-editor-preview-target").length||jQuery("body.block-editor-iframe__body").length)&&jQuery('<div title="Click to edit" style="width: 40%; height: calc( 100% - 3em ); z-index: 19; position: absolute; top: 0; left: 0; cursor: context-menu" onclick="return false" title="Click to edit"></div><div style="width: 40%; height: calc( 100% - 3em ); z-index: 19; position: absolute; top: 0; right: 0; cursor: context-menu" onclick="return false" title="Click to edit"></div><div style="width: 20%; height: 40%; z-index: 19; position: absolute; top: 0; right: 40%; cursor: context-menu" onclick="return false" title="Click to edit"></div><div style="width: 20%; height: calc( 40% - 3em ); z-index: 19; position: absolute; top: 60%; right: 40%; cursor: context-menu" onclick="return false"></div>').insertAfter(o.find(".fp-ratio"))}),flowplayer(function(t,a){a=jQuery(a);var r,n,i,l,s;window.MediaSource||window.WebKitMediaSource;function f(){var e=a.find("video");return e.length&&e[0].audioTracks?e[0].audioTracks:[]}function p(t){t.name||(t.name=t.label),a.find(".fv-fp-hls-menu a").each(function(e,o){jQuery(o).toggleClass("fp-selected",jQuery(o).attr("data-audio")===t.name)})}function c(){if(n&&!(n.length<2))if(l=jQuery('<strong class="fv-fp-hls">'+fv_flowplayer_translations.audio_button+"</strong>"),(s=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(a.find(".fp-controls"))).append("<strong>"+fv_flowplayer_translations.audio_menu+"</strong>"),n.forEach(function(e){s.append('<a data-audio="'+e.name+'" data-lang="'+e.lang+'">'+e.name+"</a>")}),l.insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),s.hasClass("fp-active")?t.hideMenu(s[0]):(a.click(),t.showMenu(s[0]))}),jQuery("a",s).on("click",function(e){var o=e.target.getAttribute("data-audio");if(r){var t=r.audioTracks[r.audioTrack].groupId,e=r.audioTracks.filter(function(e){return e.groupId===t&&(e.name===o||e.lang===o)})[0];r.audioTrack=e.id,p(e)}else{var a,n=f();for(a in n)n.hasOwnProperty(a)&&n[a].label==o&&(n[a].enabled=!0,p(n[a]))}}),r)p(r.audioTracks[r.audioTrack]);else{var e,o=f();for(e in o)o.hasOwnProperty(e)&&o[e].enabled&&p(o[e])}}flowplayer.engine("hlsjs-lite").plugin(function(e){r=e.hls}),t.bind("ready",function(e,o){var t;jQuery(s).remove(),jQuery(l).remove(),r&&"application/x-mpegurl"==o.video.type&&(i=[],n=[],(t=r).levels.forEach(function(e){e=e.attrs.AUDIO;e&&i.indexOf(e)<0&&i.push(e),i.length&&(n=t.audioTracks.filter(function(e){return e.groupId===i[0]}))}),c())}),t.one("progress",function(){if("html5"==t.engine.engineName&&"application/x-mpegurl"==t.video.type){i=[],n=[];var e,o=f();for(e in o)o.hasOwnProperty(e)&&n.push({id:o[e].id,name:o[e].label});c()}})}),flowplayer(function(e,n){var r=-1,i=!1;e.on("error",function(e,o,t){var a;4==t.code&&"hlsjs"==o.engine.engineName&&(console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS"),o.error=o.loading=!1,jQuery(n).removeClass("is-error"),jQuery(flowplayer.engines).each(function(e,o){"hlsjs"==flowplayer.engines[e].engineName&&(r=e,i=flowplayer.engines[e],delete flowplayer.engines[e])}),(a=(0<(t=void 0!==o.video.index?o.video.index:0)?o.conf.playlist[t]:o.conf.clip).sources).index=t,o.load({sources:a}),o.bind("unload error",function(){flowplayer.engines[r]=i}))})}),flowplayer(function(e,l){var s,o=e.conf.live_stream_reload||30,f=o,p=fv_flowplayer_translations.live_stream_retry;function c(e){e=Number(e);var o=Math.floor(e/86400),t=Math.floor(e%86400/3600),a=Math.floor(e%3600/60),e=Math.floor(e%60),n=fv_flowplayer_translations,o=0<o?(1==o?n.duration_1_day:n.duration_n_days).replace(/%s/,o):"";return o&&0<t&&(o+=", "),(o+=0<t?(1==t?n.duration_1_hour:n.duration_n_hours).replace(/%s/,t):"")&&0<a&&(o+=", "),(o+=0<a?(1==a?n.duration_1_minute:n.duration_n_minutes).replace(/%s/,a):"")&&0<e&&(o+=n.and),o+=0<e?(1==e?n.duration_1_second:n.duration_n_seconds).replace(/%s/,e):""}e.clearLiveStreamCountdown=function(){s&&(clearInterval(s),e.error=e.loading=!1,jQuery(l).removeClass("is-error"),jQuery(l).find(".fp-message.fp-shown").remove(),e.unload())},e.conf.flashls={manifestloadmaxretry:2},e.on("ready",function(){f=o,p=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){f=10,p=fv_flowplayer_translations.live_stream_continue,clearInterval(s)}),e.on("error",function(e,r,i){setTimeout(function(){var e,o,t,a,n;(r.conf.clip.live||r.conf.live||i.video&&i.video.src&&i.video.src.match(/\/\/vimeo.com\/event\//))&&(e=f,r.conf.clip.streaming_time?e=r.conf.clip.streaming_time-Math.floor(Date.now()/1e3):r.conf.clip.live_starts_in&&(e=r.conf.clip.live_starts_in),o=fv_flowplayer_translations.live_stream_starting.replace(/%d/,c(e)),p=p.replace(/%d/,c(e)),t=r.conf.clip.live_starts_in?o:p,clearInterval(s),1!==i.code&&2!==i.code&&4!==i.code||(l.className+=" is-offline",flowplayer.support.flashVideo&&r.one("flashdisabled",function(){l.querySelector(".fp-flash-disabled").style.display="none"}),(a=l.querySelector(".fp-ui .fp-message")).innerHTML=t,n=300<e?300:e,s=setInterval(function(){--n,--e,a.innerHTML=t,0<n&&a?a.querySelector("span").innerHTML=c(e):(clearInterval(s),r.error&&(r.error=r.loading=!1,(a=l.querySelector(".fp-ui .fp-message"))&&l.querySelector(".fp-ui").removeChild(a),l.className=l.className.replace(/\bis-(error|offline)\b/g,""),r.load()))},1e3)))},1)})}),flowplayer(function(e,o){var t;o=jQuery(o),flowplayer.engine("hlsjs-lite").plugin(function(e){t=e.hls}),e.on("ready",function(e,o){t&&o.conf.playlist.length&&"hlsjs-lite"!=o.engine.engineName&&t.destroy()})}),flowplayer(function(t,a){var n,r,i,l,s;function f(){r&&n&&"html5"==t.engine.engineName&&(1<++l?3<l&&(console.log("FV Player: iOS video element needs a push, triggering 'stalled'"),n.trigger("stalled")):(console.log("FV Player: iOS video element will trigger error after 'stalled' arrives"),n.one("stalled",function(){var e,o=t.video.time;t.video.type.match(/video\//)?(console.log("FV Player: Running check of video file..."),(e=document.createElement("video")).src=t.video.src,e.onloadedmetadata=function(){l=0,console.log("FV Player: Video link works")},e.onerror=function(){console.log("FV Player: Video link issue!"),0<l&&t.trigger("error",[t,{code:4,video:t.video}])}):setTimeout(function(){console.log(t.video.time,o),t.video.time!=o?(l=0,console.log("FV Player: iOS video element continues playing, no need for error")):t.paused?(l=0,console.log("FV Player: iOS video element paused, no need for error")):t.trigger("error",[t,{code:4,video:t.video}])},5e3)})))}(flowplayer.support.browser.safari||flowplayer.support.iOS)&&(a=jQuery(a),i=r=n=!1,l=0,t.on("ready",function(e,o,t){l=0,r=!1,"html5"==o.engine.engineName&&t.src.match(/\?/)&&((n=a.find("video")).data("fv-ios-recovery")||(n.on("waiting",f),n.data("fv-ios-recovery",!0)),o.live&&t.src.match(/m3u8|stream_loader/)&&(console.log("FV Player: iOS video element is a live stream..."),clearInterval(i),i=setTimeout(function(){jQuery.get(t.src,function(e){e.match(/#EXT/)||(console.log("FV Player: iOS video element live stream does not look like a HLS file, triggering error..."),o.trigger("error",[o,{code:1,video:o.video}]))})},5e3)),o.one("progress",function(){r=!0,clearInterval(i)}))}),t.bind("beforeseek",f),s=0,t.on("ready",function(e,o){o.one("progress",function(e,o){s=o.video.duration,console.log("recorded_duration",s)})}),t.on("pause",function(e,o){var t=a.find("video");t.length&&parseInt(o.video.time)===parseInt(t[0].duration)&&s>o.video.time&&(console.log("suddenly the video is much shorter, why?",s,t[0].duration),o.video.duration=s,o.trigger("error",[o,{code:4,video:o.video}]))}))}),(e=>{var o,t,a=!1;"function"==typeof define&&define.amd&&(define(e),a=!0),"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&(module.exports=e(),a=!0),a||(o=window.Cookies,(t=window.Cookies=e()).noConflict=function(){return window.Cookies=o,t})})(function(){function v(){for(var e=0,o={};e<arguments.length;e++){var t,a=arguments[e];for(t in a)o[t]=a[t]}return o}return function e(u){function y(e,o,t){var a,n;if("undefined"!=typeof document){if(1<arguments.length){"number"==typeof(t=v({path:"/"},y.defaults,t)).expires&&((n=new Date).setMilliseconds(n.getMilliseconds()+864e5*t.expires),t.expires=n),t.expires=t.expires?t.expires.toUTCString():"";try{a=JSON.stringify(o),/^[\{\[]/.test(a)&&(o=a)}catch(e){}o=u.write?u.write(o,e):encodeURIComponent(o+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(e+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var r,i="";for(r in t)t[r]&&(i+="; "+r,!0!==t[r])&&(i+="="+t[r]);return document.cookie=e+"="+o+i}e||(a={});for(var l=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,f=0;f<l.length;f++){var p=l[f].split("="),c=p.slice(1).join("=");this.json||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var d=p[0].replace(s,decodeURIComponent),c=u.read?u.read(c,d):u(c,d)||c.replace(s,decodeURIComponent);if(this.json)try{c=JSON.parse(c)}catch(e){}if(e===d){a=c;break}e||(a[d]=c)}catch(e){}}return a}}return(y.set=y).get=function(e){return y.call(y,e)},y.getJSON=function(){return y.apply({json:!0},[].slice.call(arguments))},y.defaults={},y.remove=function(e,o){y(e,"",v(o,{expires:-1}))},y.withConverter=e,y}(function(){})}),flowplayer(function(e,o){o=jQuery(o),window.learndash_video_data&&"local"==learndash_video_data.videos_found_provider&&o.closest("[data-video-progression=true]").length&&(LearnDash_disable_assets(!0),LearnDash_watchPlayers(),e.on("finish",function(e,o,t){"string"!=typeof o.video.click&&((o=jQuery(".ld-video").data("video-cookie-key"))&&jQuery.cookie(o,JSON.stringify({video_state:"complete"})),window.LearnDash_disable_assets(!1))}))}),jQuery(fv_player_lightbox_bind),jQuery(document).ajaxComplete(fv_player_lightbox_bind),jQuery(function(){"undefined"!=typeof freedomplayer&&freedomplayer(function(e,o){var t,a,n=(o=jQuery(o)).closest(".fv_player_lightbox_hidden");e.is_in_lightbox=function(){return n.length},e.lightbox_visible=function(){return o.closest(".fancybox-slide--current").length},e.is_in_lightbox()&&(n.on("click",function(e){e.target==e.currentTarget&&jQuery.fancybox.close()}),freedomplayer.support.fullscreen?e.fullscreen=function(){jQuery.fancybox.getInstance().FullScreen.toggle()}:(a=!(t=".fancybox-caption, .fancybox-toolbar, .fancybox-infobar, .fancybox-navigation"),e.on("fullscreen",function(){jQuery(t).hide(),a=jQuery(".fancybox-container").hasClass("fancybox-show-thumbs"),jQuery(".fancybox-container").removeClass("fancybox-show-thumbs")}).on("fullscreen-exit",function(){jQuery(t).show(),a&&jQuery(".fancybox-container").addClass("fancybox-show-thumbs")})))})}),flowplayer(function(e,o){e.bind("load",function(e,o,t){var a,n=jQuery(e.currentTarget);n.data("live")&&(a=setTimeout(function(){n.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>"),n.addClass("is-error")},1e4),jQuery(e.currentTarget).data("live_check",a))}).bind("ready",function(e,o,t){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,o,t){e=jQuery(e.currentTarget);e.data("live")&&e.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)})}),"undefined"!=typeof flowplayer&&flowplayer(function(e,a){var n,r,i,l,s,o=(a=jQuery(a)).closest(".ld-video");o.length&&"boolean"==typeof o.data("video-progression")&&0==o.data("video-progression")||a.data("lms_teaching")&&(s=[],e.on("ready",function(e,o,t){n=void 0===o.video.saw,l=o.video.index||0,r=o.video.position||0,i=o.video.top_position||0,void 0===s[l]&&(i?s[l]=i:r?s[l]=r:o.video.fv_start?s[l]=o.video.fv_start:s[l]=0)}),e.on("progress",function(e,o,t){s[l]<t&&(s[l]=t)}),e.on("beforeseek",function(e,o,t){n&&(t<=r||t<=s[l]?console.log("FV Player lms: allow seek to",t):(o.trigger("fv-lms-teaching-be-gone"),e.preventDefault(),e.stopPropagation(),fv_player_notice(a,"<p>"+fv_flowplayer_translations.msg_no_skipping+"<br />"+fv_flowplayer_translations.msg_watch_video+"</p>","fv-lms-teaching-be-gone").addClass("fv-player-lms-teaching"),setTimeout(function(){o.trigger("fv-lms-teaching-be-gone")},2e3),o.seek(s[l])))}))}),(a=>{flowplayer(function(e,t){jQuery(t).hasClass("is-cva")||a(document).on("submit","#"+jQuery(t).attr("id")+" .mailchimp-form",function(e){e.preventDefault(),a(".mailchimp-response",t).remove(),a("input[type=submit]",t).attr("disabled","disabled").addClass("fv-form-loading");var o={action:"fv_wp_flowplayer_email_signup",nonce:fv_player.email_signup_nonce};a("[name]",this).each(function(){o[this.name]=a(this).val()}),a.post(fv_player.ajaxurl,o,function(e){e=JSON.parse(e),a('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",t),e.text.match(/already subscribed/)&&(e.status="ERROR"),"OK"===e.status?(a(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",t).val(""),a(".mailchimp-response",t).removeClass("is-fv-error").html(e.text),setTimeout(function(){a(".wpfp_custom_popup",t).fadeOut()},2e3)):a(".mailchimp-response",t).addClass("is-fv-error").html(e.text),a("input[type=submit]",t).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery),"undefined"!=typeof fv_flowplayer_mobile_switch_array)for(var fv_flowplayer_mobile_switch_i in fv_flowplayer_mobile_switch_array)fv_flowplayer_mobile_switch_array.hasOwnProperty(fv_flowplayer_mobile_switch_i)&&fv_flowplayer_mobile_switch(fv_flowplayer_mobile_switch_i);function fv_flowplayer_browser_chrome_fail(a,n,r,i){jQuery("#wpfp_"+a).bind("error",function(e,o,t){!/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())||null==t||3!=t.code&&4!=t.code&&5!=t.code||(o.unload(),jQuery("#wpfp_"+a).attr("id","bad_wpfp_"+a),jQuery("#bad_wpfp_"+a).after('<div id="wpfp_'+a+'" '+n+' data-engine="flash"></div>'),jQuery("#wpfp_"+a).flowplayer({playlist:[[{mp4:r}]]}),i?jQuery("#wpfp_"+a).bind("ready",function(e,o){o.play()}):jQuery("#wpfp_"+a).flowplayer().play(0),jQuery("#bad_wpfp_"+a).remove())})}if(freedomplayer(function(a,e){var n=(e=jQuery(e)).data("freedomplayer-instance-id");flowplayer.audible_instance=-1,a.one("load",function(){setTimeout(function(){a.conf.splash=!1},0)}),a.on("ready",function(){var t=0==e.data("volume");t||(flowplayer.audible_instance=n),jQuery(".freedomplayer[data-freedomplayer-instance-id]").each(function(){var e=jQuery(this).data("flowplayer"),o=jQuery(this).data("freedomplayer-instance-id");-1!=flowplayer.audible_instance&&o!=flowplayer.audible_instance&&o!=n&&e&&(e.ready?a.conf.multiple_playback?t||e.mute(!0,!0):e.playing&&(e.pause(),e.sticky(!1)):(e.clearLiveStreamCountdown(),e.unload()))})}).on("mute",function(e,o,t){t||flowplayer.audible_instance==n||(flowplayer(flowplayer.audible_instance).mute(!0,!0),flowplayer.audible_instance=n)}).on("resume",function(){a.muted||(flowplayer.audible_instance=n),a.conf.multiple_playback||jQuery(".flowplayer[data-freedomplayer-instance-id]").each(function(){var e;n!=jQuery(this).data("freedomplayer-instance-id")&&(e=jQuery(this).data("flowplayer"))&&e.playing&&(e.pause(),e.sticky(!1))})})}),"undefined"!=typeof fv_flowplayer_browser_chrome_fail_array)for(var fv_flowplayer_browser_chrome_fail_i in fv_flowplayer_browser_chrome_fail_array)fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(fv_flowplayer_browser_chrome_fail_i)&&fv_flowplayer_browser_chrome_fail(fv_flowplayer_browser_chrome_fail_i,fv_flowplayer_browser_chrome_fail_array[fv_flowplayer_browser_chrome_fail_i].attrs,fv_flowplayer_browser_chrome_fail_array[fv_flowplayer_browser_chrome_fail_i].mp4,fv_flowplayer_browser_chrome_fail_array[fv_flowplayer_browser_chrome_fail_i].auto_buffer);function fv_flowplayer_browser_ie(e){(flowplayer.support.browser&&flowplayer.support.browser.msie&&9<=parseInt(flowplayer.support.browser.version,10)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))&&jQuery("#wpfp_"+e).attr("data-engine","flash")}if("undefined"!=typeof fv_flowplayer_browser_ie_array)for(var fv_flowplayer_browser_ie_i in fv_flowplayer_browser_ie_array)fv_flowplayer_browser_ie_array.hasOwnProperty(fv_flowplayer_browser_ie_i)&&fv_flowplayer_browser_ie(fv_flowplayer_browser_ie_i);function fv_flowplayer_browser_chrome_mp4(e){var o=window.navigator.appVersion.match(/Chrome\/(\d+)\./);null!=o&&(o=parseInt(o[1],10),/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&o<28&&-1!=navigator.appVersion.indexOf("Win")||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&o<27&&-1!=navigator.appVersion.indexOf("Linux")&&-1==navigator.userAgent.toLowerCase().indexOf("android"))&&jQuery("#wpfp_"+e).attr("data-engine","flash")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}-1==navigator.platform.indexOf("iPhone")&&-1==navigator.platform.indexOf("iPod")&&-1==navigator.platform.indexOf("iPad")&&-1==navigator.userAgent.toLowerCase().indexOf("android")||flowplayer(function(e,o){e.bind("error",function(e,o,t){10==t.code&&jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)})}),jQuery(document).ready(function(){-1==navigator.platform.indexOf("iPhone")&&-1==navigator.platform.indexOf("iPod")&&-1==navigator.platform.indexOf("iPad")||jQuery(window).trigger("load"),jQuery(".flowplayer").on("mouseleave",function(){jQuery(this).find(".fvp-share-bar").removeClass("visible"),jQuery(this).find(".embed-code").hide()})}),flowplayer(function(a,n){var r=(n=jQuery(n)).attr("id"),i=!1;function l(){var o,t,e=n.attr("data-overlay");if(void 0!==e&&e.length){try{e=JSON.parse(e)}catch(e){return}!i&&!n.hasClass("is-cva")&&n.width()>=parseInt(e.width)&&(e=(e=e.html).replace("%random%",Math.random()),i=jQuery('<div id="'+r+'_ad" class="wpfp_custom_ad">'+e+"</div>"),n.find(".fp-player").append(i),i.find(".fv_fp_close").on("click touchend",function(){i.fadeOut();var e=i.find("video");return e.length&&e[0].pause(),!1}),o=0,t=setInterval(function(){var e=i&&i.find(".adsbygoogle").height();(200<++o||0<e)&&clearInterval(t),e>n.height()&&i.addClass("tall-overlay")},50),setTimeout(function(){n.find(".wpfp_custom_ad video").length&&a.pause()},500))}}function t(e){var o=a.get_popup();o&&("finish"==e||o.pause&&a.ready&&a.paused||o.html.match(/fv-player-ppv-purchase-btn-wrapper/))&&0==n.find(".wpfp_custom_popup").length&&(n.addClass("is-popup-showing"),n.addClass("is-mouseover"),n.find(".fp-player").append('<div id="'+r+'_custom_popup" class="wpfp_custom_popup">'+o.html+"</div>"))}n.data("end_popup_preview")&&jQuery(document).ready(function(){a.trigger("finish",[a])}),a.get_popup=function(){var e=n.attr("data-popup");if(void 0!==e&&e.length){try{e=JSON.parse(e)}catch(e){return!1}return e}},a.bind("ready",function(){1==i.length&&(i.remove(),i=!1),n.data("overlay_show_after")||l()}).bind("progress",function(e,o,t){t>n.data("overlay_show_after")&&l()}).bind("finish",function(e,o){void 0!==o.video.index&&o.video.index+1!=o.conf.playlist.length||t(e.type)}).bind("pause",function(e){if(void 0!==a.video.click)return!1;setTimeout(function(){t(e.type)},5)}).bind("resume unload seek",function(){n.hasClass("is-popup-showing")&&(n.find(".wpfp_custom_popup").remove(),n.removeClass("is-popup-showing"))})}),jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var e=jQuery(this).parents(".flowplayer").data("flowplayer");e&&e.disable(!0)}),jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var e=jQuery(this).parents(".flowplayer").data("flowplayer");e&&e.disable(!1)}),"undefined"!=typeof flowplayer&&flowplayer(function(e,a){a=jQuery(a);var n,r=!1,o=(flowplayer.engine("hlsjs-lite").plugin(function(e){n=e.hls}),e.conf.playlist.length?e.conf.playlist:[e.conf.clip]);function i(e){l();var o="Video is being processed",t="Please return later to see the actual video in this player.";e.pending_encoding_error?(o="Video unavailable",t="There was an error in the video encoding."):e.pending_encoding_progress&&(t+="<br /><br />("+e.pending_encoding_progress+" done)"),r=jQuery('<div class="fv-player-encoder-video-processing-modal"><div><h2>'+o+"</h2><p>"+t+"</p></div></div"),a.append(r)}function l(){r&&r.remove()}o[0]&&o[0].pending_encoding&&i(o[0]),e.on("load",function(e,o,t){if(t.pending_encoding)return i(t),n&&n.destroy(),!1;l()})}),Date.now||(Date.now=function(){return(new Date).getTime()}),(()=>{if("undefined"!=typeof fv_player_editor_conf)fv_player_log('FV Player: Editor detected, disabling "Remember video position"');else{var j=null,b=2500,t=null,Q="video_positions",k="player_playlist_item",x="video_positions_tmp",C="video_top_positions_tmp",S="player_playlist_item_tmp",P="video_saw_tmp",I="video_ab_loop_tmp",F=[],O=[],T=[],L=[],A=[],E=function(e){var o=JSON.stringify(e),t=N(o);if(b<t)while(b<t)for(var a in e)if(e.hasOwnProperty(a)){delete e[a],o=JSON.stringify(e),t=N(o);break}return o},V=function(e){var o;return e.id||(o=(void 0!==e.sources_original&&void 0!==e.sources_original[0]?e.sources_original:e.sources)[0].src,void 0!==e.sources_original&&void 0!==e.sources_original[0]?o:a(o))},N=function(e){return encodeURIComponent(e).length},z=function(e){return t?localStorage.getItem(e):Cookies.get(e)},q=function(e,o){return t?localStorage.setItem(e,o):Cookies.set(e,o)},B=function(e){t?localStorage.removeItem(e):Cookies.remove(e)},D=function(e,o){o.video.sources&&(o=V(o.video),O[o]=0,T[o]=0,A[o]=1)},a=function(e){return e.replace(/(X-Amz-Algorithm=[^&]+&?)/gm,"").replace(/(X-Amz-Credential=[^&]+&?)/gm,"").replace(/(X-Amz-Date=[^&]+&?)/gm,"").replace(/(X-Amz-Expires=[^&]+&?)/gm,"").replace(/(X-Amz-SignedHeaders=[^&]+&?)/gm,"").replace(/(X-Amz-Signature=[^&]+&?)/gm,"")},R=function(e,o){var t,a,n,r="sendBeacon"in navigator,i=(!0!==e&&(e=!1),o&&void 0!==o||(o=function(){}),[]),l=[];for(t in O)O.hasOwnProperty(t)&&(a={name:t,position:O[t],top_position:T[t],saw:void 0!==A[t]&&A[t]},F.hasOwnProperty(t)&&(a.ab_start=F[t][0],a.ab_end=F[t][1]),i.push(a));for(n in L)L.hasOwnProperty(n)&&l.push({player:n,item:L[n]});if(l.length||B(S),i.length){if("1"==flowplayer.conf.is_logged_in){if(r){try{var s,f={},p={},c={},d={},u={};for(w in i)i.hasOwnProperty(w)&&(f[s=i[w].name]=i[w].position,p[s]=i[w].top_position,c[s]=i[w].saw,void 0!==i[w].ab_start)&&void 0!==i[w].ab_end&&(u[s]=[i[w].ab_start,i[w].ab_end]);for(w in l)l.hasOwnProperty(w)&&(d[l[w].player]=l[w].item);q(x,E(f)),q(C,E(p)),q(P,E(c)),q(S,E(d)),q(I,E(u))}catch(e){return}r=new FormData;return r.append("action","fv_wp_flowplayer_video_position_save"),r.append("nonce",fv_player.video_position_save_nonce),r.append("videoTimes",encodeURIComponent(JSON.stringify(i))),r.append("playlistItems",encodeURIComponent(JSON.stringify(l))),navigator.sendBeacon(fv_player.ajaxurl,r),!1}return jQuery.ajax({type:"POST",async:e,url:fv_player.ajaxurl,complete:o,data:{action:"fv_wp_flowplayer_video_position_save",nonce:fv_player.video_position_save_nonce,videoTimes:i,playlistItems:l}})}try{var y=z(Q),v=z(k),y=y&&void 0!==y?JSON.parse(y):{},v=v&&void 0!==v?JSON.parse(v):{};for(w in i)i.hasOwnProperty(w)&&(y[i[w].name]=i[w].position);for(w in l)l.hasOwnProperty(w)&&(v[l[w].player]=l[w].item);var _=JSON.stringify(y),h=JSON.stringify(v),g=N(_),m=N(h);if(b<g)while(b<g)for(var w in y)if(y.hasOwnProperty(w)){delete y[w],_=JSON.stringify(y),g=N(_);break}if(b<m)while(b<m)for(var w in y)if(v.hasOwnProperty(w)){delete v[w],h=JSON.stringify(v),m=N(_);break}q(Q,_),q(k,h)}catch(e){return}return!1}B(I),B(x),B(C),B(P)};if(flowplayer(function(a,e){if(void 0===a.conf.disable_localstorage||"1"==flowplayer.conf.is_logged_in){var r=jQuery(e),o=flowplayer.conf.video_position_save_enable&&0!=r.data("save-position")||r.data("save-position")||r.data("lms_teaching"),i=0,l=!!r.data("player-id")&&r.data("player-id"),n=!1,s=function(){return!(a.live||a.video&&"string"==typeof a.video.click)},t=function(e,o){s()&&!o.video.prevent_position_restore&&(o=(e=>{var o=V(e.video),t=e.video.position;if("1"!=flowplayer.conf.is_logged_in){var a=z(Q);if(a&&void 0!==a)try{(a=JSON.parse(a))[o]&&(t=a[o])}catch(e){return}}return e.get_custom_end&&e.get_custom_end()<t&&(t=!1),t=e.get_custom_start&&0<e.get_custom_start()&&t<e.get_custom_start()?!1:t})(o))&&p(o)},f=function(e,o){var t,a,n;s()&&o.video.sources&&(t=V(o.video),a=Math.round(o.video.time),O[t]=a,void 0!==o.fv_noUiSlider&&r.find(".fv-player-ab.is-active").length&&(F[t]=o.fv_noUiSlider.get()),void 0===T[t]?(n=0,n=o.conf.playlist?o.conf.playlist[o.video.index]&&o.conf.playlist[o.video.index].sources[0]&&o.conf.playlist[o.video.index].sources[0].top_position?o.conf.playlist[o.video.index].sources[0].top_position:0:o.conf.clip.sources[0]&&o.conf.clip.sources[0].top_position?o.conf.clip.sources[0].top_position:0,T[t]=n):T[t]<a&&(T[t]=a),0<o.conf.playlist.length&&l&&(L[l]=o.video.index),60<=i++)&&flowplayer.conf.closingPage&&(j&&j.abort(),j=R(!0,function(){j=null}),i=0)},p=function(e){var o,t;a.custom_seek?a.custom_seek(e):(o=0,t=setInterval(function(){20<++o&&clearInterval(t),a.loading||(a.seek(parseInt(e)),clearInterval(t))},10))},c=function(e,o){var t=z(e),a=!1;if(t&&void 0!==t)try{if(void 0!==(t=JSON.parse(t))[o]){a=t[o],delete t[o];var n,r=!1;for(n in t)if(t.hasOwnProperty(n)){r=!0;break}r?q(e,JSON.stringify(t)):B(e)}return a}catch(e){}},d=function(e,o){if(void 0!==o&&0!=o.conf.playlist.length&&!o.conf.prevent_position_restore){var t=-1;if(l)if("1"!=flowplayer.conf.is_logged_in){var a=z(k);if(a&&void 0!==a)try{(a=JSON.parse(a))[l]&&(t=a[l])}catch(e){return}}else"1"==flowplayer.conf.is_logged_in&&(t=0<o.conf.playlist.length&&c(S,l));0<=t&&!n&&(o.video&&"video/youtube"!=o.video.type&&o.play(t),n=!0,r.data("position_changed",1))}};if(o){if(z(S)&&r.removeData("playlist_start"),a.bind("finish",D),a.on("ready",function(){a.conf.poster?a.one("resume",function(){a.one("progress",t)}):a.one("progress",t)}),a.bind("progress",f),a.bind("unload",function(){n=!1,a.one(a.conf.poster?"resume":"ready",d)}),a.one(a.conf.poster?"resume":"ready",d),jQuery(".fp-ui",e).on("click",function(){d()}),a.playlist_thumbnail_progress=function(e,o,t){a.get_custom_start&&0<a.get_custom_start(o)&&(t-=a.get_custom_start(o))<0&&(t=0);o=o.duration;(o=(o=a.get_custom_duration&&0<a.get_custom_duration()?a.get_custom_duration():o)||e.data("duration"))&&e.css("width",100*t/o+"%")},"1"==flowplayer.conf.is_logged_in){var u,y,v,_,h,g,m=0<a.conf.playlist.length,w=m?a.conf.playlist:[a.conf.clip],b=jQuery("[rel="+jQuery(e).attr("id")+"]");for(u in w)w.hasOwnProperty(u)&&(h=V(w[u]),y=c(x,h),v=c(C,h),_=c(P,h),h=c(I,h),y&&(m?(a.conf.playlist[u].sources[0].position=y,(g=jQuery("a",b).eq(u).find(".fvp-progress")).length&&a.playlist_thumbnail_progress(g,a.conf.playlist[u],y)):a.conf.clip.sources[0].position=y),v&&(!w[u].sources[0].top_position||w[u].sources[0].top_position<v)&&(m?a.conf.playlist[u].sources[0].top_position=v:a.conf.clip.sources[0].top_position=v),_&&(m?a.conf.playlist[u].sources[0].saw=!0:a.conf.clip.sources[0].saw=!0),h)&&(m?(a.conf.playlist[u].sources[0].ab_start=h[0],a.conf.playlist[u].sources[0].ab_end=h[1]):(a.conf.clip.sources[0].ab_start=h[0],a.conf.clip.sources[0].ab_end=h[1]))}a.bind("finish",function(e,o){o.conf.playlist.length?o.conf.playlist[o.video.index].sources[0].saw=!0:o.conf.clip.sources[0].saw=!0})}}}),jQuery(window).on("beforeunload pagehide",function(){flowplayer.conf.closingPage||(flowplayer.conf.closingPage=!0,R())}),null===(t=void 0!==fv_flowplayer_conf.disable_localstorage?!1:t)){t=!0;try{localStorage.setItem("t","t"),"t"!==localStorage.getItem("t")&&(t=!1),localStorage.removeItem("t")}catch(e){t=!1}}}})(jQuery),flowplayer(function(t,o){var a,r,i,l,n,s,f;function e(e){e.preventDefault(),e.stopPropagation(),l.hasClass("fp-active")?t.hideMenu(l[0]):(o.trigger("click"),t.showMenu(l[0]))}function p(e){e=e.clone();return e.find("i.dur").remove(),e.text()}o=jQuery(o),(t.have_visible_playlist||0!=t.conf.playlist.length)&&t.have_visible_playlist()&&(a=jQuery(".fp-playlist-external[rel="+o.attr("id")+"]"),r=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),i=jQuery('<strong class="fv-fp-list-name">Item 1.</strong>'),l=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(o.find(".fp-controls")),n=0,s=[],f=[],jQuery(t.conf.playlist).each(function(e,o){void 0===o.click&&(o=p(a.find("h4").eq(n)),l.append('<a data-index="'+e+'">'+(n+1)+". "+o+"</a>"),f[e]=o,s.push(e),n++)}),r.insertAfter(o.find(".fp-controls .fp-volume")).on("click",e),i.insertAfter(r).on("click",e),jQuery("a",l).on("click",function(){var e=jQuery(this).data("index"),o=e-1;void 0!==t.conf.playlist[o]&&void 0!==t.conf.playlist[o].click?t.play(o):t.play(e)}),t.on("ready",function(e,o,t){l.find("a").removeClass("fp-selected");var a=l.find("a[data-index="+t.index+"]"),n=(a.addClass("fp-selected"),fv_flowplayer_translations.playlist_item_no);n=(n=n.replace(/%d/,s.indexOf(t.index)+1)).replace(/%s/,p(a.find("h4"))),r.html(n),i.html(s.indexOf(t.index)+1+". "+f[t.index])}))}),flowplayer(function(e,a){a=jQuery(a);var n,r=e.conf.playlist,i=[];e.bind("load",function(e,o,t){n=t.index}),e.bind("error",function(e,o,t){setTimeout(function(){if(0<r.length&&1==o.error)return-1<i.indexOf(n)?(console.log("FV Player: Playlist item failure, already tried to play this item, not auto-advancing"),!1):(n=o.video.index,i.push(n),"1"==o.conf.video_checker&&r[n].video_checker&&0<r[n].video_checker.length?(console.log("FV Player: Video checker message present, stopping auto-advance to next playlist item"),!1):(o.error=o.loading=!1,a.removeClass("is-error"),a.find(".fp-message.fp-shown").remove(),++n>r.length-1&&(n=0),console.log("FV Player: Playlist item failure, auto-advancing to "+(n+1)+". item"),void o.play(n)))},1e3)})}),flowplayer(function(o,a){a=jQuery(a);var n,r,t,i,l,s=!1,f=!1,p=!1;function c(t){return t=[],jQuery(o.conf.playlist).each(function(e,o){t.push(e)}),t=(e=>{for(var o,t,a=e.length;a;a--)o=Math.floor(Math.random()*a),t=e[a-1],e[a-1]=e[o],e[o]=t;return e})(t),console.log("FV Player Randomizer random seed:",t),t}(a.data("button-no_picture")||a.data("button-repeat")||a.data("button-rewind")||o.conf.skin_preview)&&(l=!o.have_visible_playlist&&0<o.conf.playlist.length||o.have_visible_playlist(),o.bind("ready",function(e,o){var t;void 0===r&&void 0===n&&(r=o.next,n=o.prev),o.video&&o.video.type&&!o.video.type.match(/^audio/)&&a.data("button-no_picture")&&!f&&(f=!0,o.createNoPictureButton()),a.data("button-repeat")&&(l&&!p?(p=!0,o.createRepeatButton(),o.conf.playlist_shuffle=o.conf.track_repeat=!1,s=c(),o.conf.loop&&jQuery("a[data-action=repeat_playlist]",i).trigger("click")):0!=a.find(".fv-fp-track-repeat").length||l||((t=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>')).insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),o.video.loop?o.video.loop=!1:o.video.loop=!0,jQuery(this).toggleClass("is-active fp-color-fill",o.video.loop)}),o.conf.loop&&t.addClass("is-active fp-color-fill"),o.on("finish",function(e,o){o.video.loop&&(console.log("playlist-repeat.module",o.video.loop),o.resume())}))),a.data("button-rewind")&&!freedomplayer.support.touch&&o.createRewindForwardButtons()}).bind("progress",function(){a.data("button-repeat")&&(o.video.loop=o.conf.track_repeat)}).bind("finish.pl",function(e,o){a.data("button-repeat")&&l&&(console.log("playlist_repeat",o.conf.loop,"advance",o.conf.advance,"video.loop",o.video.loop),o.conf.playlist_shuffle)&&(o.play(s.pop()),0==s.length)&&(s=c())}).bind("unload",function(){a.find(".fv-fp-no-picture").remove(),a.find(".fv-fp-playlist").remove(),a.find(".fv-fp-track-repeat").remove()}),o.createNoPictureButton=function(){0<a.find(".fv-fp-no-picture").length||jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="18px" height="18px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>').insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),jQuery(".fp-engine",a).slideToggle(20),jQuery(this).toggleClass("is-active fp-color-fill"),a.toggleClass("is-no-picture")})},o.createRepeatButton=function(){var e;0<a.find(".fv-fp-playlist").length||(e=fv_flowplayer_translations,(t=jQuery('<strong class="fv-fp-playlist mode-normal">      <svg viewBox="0 0 80.333 80" width="18px" height="18px" class="fvp-icon fvp-replay-list"><title>'+e.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg>      <svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-shuffle"><title>'+e.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg>      <svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-replay-track"><title>'+e.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg>      <span id="fvp-playlist-play" title="'+e.playlist_play_all+'">'+e.playlist_play_all_button+"</span>      </strong>")).insertAfter(a.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault(),e.stopPropagation(),"auto"!==i.css("right")&&i.css({right:"auto",left:t.position().left+"px"}),i.hasClass("fp-active")?o.hideMenu(i[0]):(a.trigger("click"),o.showMenu(i[0]))}),i=jQuery('<div class="fp-menu fv-fp-playlist-menu">        <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="18px" height="18px" class="fvp-icon fvp-replay-list"><title>'+e.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+e.playlist_replay_all+'</span></a>        <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-shuffle"><title>'+e.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+e.playlist_shuffle+'</span></a>        <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="18px" height="18px" class="fvp-icon fvp-replay-track"><title>'+e.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+e.playlist_replay_video+'</span></a>        <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+e.playlist_play_all+'">'+e.playlist_play_all_button+"</span></a>        </div>").insertAfter(a.find(".fp-controls")),jQuery("a",i).on("click",function(){jQuery(this).siblings("a").removeClass("fp-selected"),jQuery(this).addClass("fp-selected"),t.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var e=jQuery(this).data("action");"repeat_playlist"==e?(t.addClass("mode-repeat-playlist"),o.conf.loop=!0,o.conf.advance=!0,o.video.loop=o.conf.track_repeat=!1,o.conf.playlist_shuffle=!1):"shuffle_playlist"==e?(s=s||c(),t.addClass("mode-shuffle-playlist"),o.conf.loop=!0,o.conf.advance=!0,o.conf.playlist_shuffle=!0):"repeat_track"==e?(t.addClass("mode-repeat-track"),o.conf.track_repeat=o.video.loop=!0,o.conf.loop=o.conf.playlist_shuffle=!1):"normal"==e&&(t.addClass("mode-normal"),o.conf.track_repeat=o.video.loop=!1,o.conf.loop=o.conf.playlist_shuffle=!1),o.conf.playlist_shuffle?(o.next=function(){o.play(s.pop()),0==s.length&&(s=c())},o.prev=function(){o.play(s.shift()),0==s.length&&(s=c())}):(o.next=r,o.prev=n)}))},o.createRewindForwardButtons=function(){var e;0==a.find(".fv-fp-rewind").length&&((e=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="21px" height="21px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>')).insertBefore(a.find(".fp-controls .fp-playbtn")).on("click",function(e){e.preventDefault(),e.stopPropagation(),o.seek(o.video.time-10)}),e.toggle(!o.video.live||o.video.dvr)),0==a.find(".fv-fp-forward").length&&((e=jQuery('<span class="fv-fp-forward"><svg viewBox="0 0 24 24" width="21px" height="21px" class="fvp-icon fvp-forward"><use xlink:href="#fvp-forward"></use></svg></span>')).insertAfter(a.find(".fp-controls .fp-playbtn")).on("click",function(e){e.preventDefault(),e.stopPropagation(),o.seek(o.video.time+10)}),e.toggle(!o.video.live||o.video.dvr))},o.conf.skin_preview)&&(a.data("button-no_picture")&&setTimeout(function(){o.createNoPictureButton()},0),a.data("button-repeat")&&setTimeout(function(){o.createRepeatButton()},0),a.data("button-rewind"))&&setTimeout(function(){o.createRewindForwardButtons()},0)}),freedomplayer(function(e,o){var t,a,n,r,i=freedomplayer.bean,l=freedomplayer.common,o=o.getAttribute("id"),o=l.find('[rel="'+o+'"]'),s=!1,f=!1;function p(){s=!1,r.classList.remove("active"),setTimeout(function(){r.classList.remove("is-dragging")}),d()}function c(t){var e=Math.floor(r.clientWidth/r.children[0].clientWidth),o=r.children[0].clientWidth+20;n=t?r.scrollLeft+e*o:r.scrollLeft-e*o,t&&n>r.scrollWidth-r.clientWidth?n=r.scrollWidth-r.clientWidth:!t&&n<0&&(n=0),window.requestAnimationFrame(function e(){var o=t?30:-30;Math.abs(n-r.scrollLeft)<20&&(o=n-r.scrollLeft);r.scrollTo({top:0,left:r.scrollLeft+o});n==r.scrollLeft?d():window.requestAnimationFrame(e)})}function d(){r.classList.remove("leftmost","rightmost"),0===r.scrollLeft?r.classList.add("leftmost"):r.scrollLeft===r.scrollWidth-r.clientWidth&&r.classList.add("rightmost")}o[0]&&(r=l.find(".fv-playlist-draggable",o),l=l.find(".fv-playlist-left-arrow, .fv-playlist-right-arrow",o),r[0])&&l[0]&&l[1]&&(r=r[0],d(),i.on(r,"scroll",d),i.on(r,"mousedown",function(e){e.preventDefault(),s=!0,r.classList.add("active"),a=r.scrollLeft,t=e.pageX-r.offsetLeft}),i.on(r,"mouseup",p),r.onmouseleave=function(){f=!1,p()},i.on(r,"mousemove",function(e){f=!0,s&&(e.preventDefault(),e=e.pageX-r.offsetLeft-t,5<Math.abs(e)&&r.classList.add("is-dragging"),r.scrollLeft=a-e)}),l[0].onclick=function(){c(!1)},l[1].onclick=function(){c(!0)},i.on(document,"keydown",function(e){f&&(39===(e=e.keyCode)&&c(!0),37===e)&&c(!1)}))}),flowplayer(function(e,o){var t=jQuery(o),a=t.data("playlist_start");function n(){1!==t.data("position_changed")&&e.conf.playlist.length&&(a--,void 0===e.conf.playlist[a].click&&(e.engine&&"hlsjs-lite"==e.engine.engineName&&(e.loading=!1),e.play(a)),t.data("position_changed",1))}void 0!==a&&(e.bind("unload",function(){a=t.data("playlist_start"),t.removeData("position_changed"),e.one(e.conf.poster?"resume":"ready",n)}),e.one(e.conf.poster?"resume":"ready",n),jQuery(".fp-ui",o).on("click",function(){n(),t.data("position_changed",1)}))}),document.addEventListener("custombox:overlay:close",function(e){console.log("FV Player: Custombox/Popup anything ligtbox closed");var o=jQuery(this).find(".flowplayer");0!=o.length&&(console.log("FV Player: Custombox/Popup anything ligtbox contains a player"),o.each(function(e,o){var t=jQuery(o).data("flowplayer");void 0!==t&&(t.playing?(console.log("FV Player: Custombox/Popup anything ligtbox video pause"),t.pause()):t.loading&&t.one("ready",function(){console.log("FV Player: Custombox/Popup anything ligtbox video unload"),t.unload()}))}))}),"undefined"!=typeof flowplayer&&(freedomplayer.preload_count=0,freedomplayer.preload_limit=3,freedomplayer(function(e,o){o=jQuery(o);var t,a=!1,n=jQuery(o).data("playlist_start"),n=n?n-1:0;for(t in e.conf.clip&&(a=e.conf.clip.sources),a=e.conf.playlist[n]&&e.conf.playlist[n].sources?e.conf.playlist[n].sources:a){if("video/youtube"==a[t].type||a[t].src.match(/\/\/vimeo.com/))return r(),void e.debug("Preload not allowed beause of the video type");"application/x-mpegurl"==a[t].type&&(freedomplayer.preload_limit=1)}function r(){e.conf.splash=!0,e.preload=!1,o.removeClass("is-poster").addClass("is-splash")}e.conf.splash||freedomplayer.preload_count++,freedomplayer.preload_count>freedomplayer.preload_limit&&r()})),flowplayer(function(o,e){o.bind("finish",function(){var e=o.video.time;o.video.loop&&o.one("pause",function(){e<=o.video.time&&o.resume()})})}),"undefined"!=typeof flowplayer&&(fv_autoplay_type=fv_flowplayer_conf.autoplay_preload,fv_player_scroll_autoplay=!1,fv_player_scroll_autoplay_last_winner=-1,freedomplayer(function(e,t){fv_player_scroll_autoplay=!0,e.on("pause",function(e,o){o.manual_pause&&(console.log("Scroll autoplay: Manual pause for "+jQuery(t).attr("id")),o.non_viewport_pause=!0)})}),jQuery(window).on("scroll",function(){fv_player_scroll_autoplay=!0}),fv_player_scroll_int=setInterval(function(){var r,e,i,o,t;fv_player_scroll_autoplay&&(r=window.innerHeight||document.documentElement.clientHeight,e=jQuery(".flowplayer:not(.is-disabled)"),i=-1,e.each(function(e,o){var t,a,n=jQuery(this);void 0!==n.data("fvautoplay")&&-1==n.data("fvautoplay")||jQuery("body").hasClass("wp-admin")||(t=n.data("flowplayer"),a=n.find(".fp-player"),n=void 0!==n.data("fvautoplay"),a.length&&!t.non_viewport_pause&&("viewport"==fv_autoplay_type||"sticky"==fv_autoplay_type||n)&&(n=a[0].getBoundingClientRect(),r-n.top>a.height()/4)&&n.bottom>a.height()/4&&(flowplayer.support.iOS&&"video/youtube"==t.conf.clip.sources[0].type||(i=e)))}),fv_player_scroll_autoplay_last_winner!=i&&(t=(o=e.eq(fv_player_scroll_autoplay_last_winner)).data("flowplayer"))&&t.playing&&(console.log("Scroll autoplay: Player not in viewport, pausing "+o.attr("id")),t.pause()),-1<i&&fv_player_scroll_autoplay_last_winner!=i&&((t=(o=e.eq(i)).data("flowplayer"))?t.ready?(console.log("Scroll autoplay: Resume "+o.attr("id")),t.resume()):t.loading||t.playing||t.error||(console.log("Scroll autoplay: Load "+o.attr("id")),t.load(),t.autoplayed=!0):(console.log("Scroll autoplay: Play "+o.attr("id")),fv_player_load(o),t.autoplayed=!0),fv_player_scroll_autoplay_last_winner=i),fv_player_scroll_autoplay=!1)},200)),flowplayer(function(t,a){(a=jQuery(a)).find(".fp-logo").removeAttr("href"),a.hasClass("no-controlbar")&&((e=t.sliders.timeline).disable(!0),t.bind("ready",function(){e.disable(!0)})),jQuery(".fvfp_admin_error",a).remove(),a.find(".fp-logo, .fp-header").on("click",function(e){e.target===this&&a.find(".fp-ui").trigger("click")}),jQuery(".fvp-share-bar .sharing-facebook",a).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>'),jQuery(".fvp-share-bar .sharing-twitter",a).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>'),jQuery(".fvp-share-bar .sharing-email",a).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>'),jQuery(".fp-header",a).prepend(jQuery(".fvp-share-bar",a)),(!t.have_visible_playlist&&0<t.conf.playlist.length||t.have_visible_playlist())&&!freedomplayer.support.touch&&(o=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>'),n=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>'),a.find(".fp-controls .fp-playbtn").before(o).after(n),o.on("click",function(){t.trigger("prev",[t]),t.prev()}),n.on("click",function(){t.trigger("next",[t]),t.next()})),"undefined"!=typeof fv_player_editor_conf&&a.on("click",".fvp-sharing > li",function(e){return e.preventDefault(),fv_player_notice(a,fv_player_editor_translations.link_notice,2e3),!1}),t.bind("pause resume finish unload ready",function(e,o){a.addClass("no-brand")}),t.on("ready",function(e,o,t){setTimeout(function(){a.hasClass("is-youtube-standard")||a.hasClass("is-youtube-reduced")||jQuery(".fvp-share-bar",a).show(),jQuery(".fv-player-buttons-wrap",a).appendTo(jQuery(".fv-player-buttons-wrap",a).parent().find(".fp-ui"))},100)}),t.bind("finish",function(){var e,o=a.data("fv_redirect");!o||void 0!==t.video.is_last&&!t.video.is_last||(freedomplayer.conf.wpadmin||flowplayer.conf.is_logged_in_editor)&&(e=(e=fv_flowplayer_translations.redirection).replace(/%url%/,o),!confirm(e))||(location.href=o)}),flowplayer.support.iOS&&11==flowplayer.support.iOS.version&&t.bind("error",function(e,o,t){4==t.code&&a.find(".fp-engine").hide()}),jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()}),t.one("ready",function(e,o,t){a.find(".fp-chromecast").insertAfter(a.find(".fp-header .fp-fullscreen"))});var e,o,n,r=a.attr("id"),i=!flowplayer.support.fullscreen&&!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen;t.bind("fullscreen",function(e,o){jQuery("#wpadminbar, .nc_wrapper").hide(),i&&"video/youtube"!=o.video.type&&(a.before('<span data-fv-placeholder="'+r+'"></span>'),a.appendTo("body"))}),t.bind("fullscreen-exit",function(e,o,t){jQuery("#wpadminbar, .nc_wrapper").show(),i&&jQuery("span[data-fv-placeholder="+r+"]").replaceWith(a)})}),(()=>{function e(p){p(function(t,a){var n,e,r,i,l;function s(e){return Math.round(100*e)/100}function f(o){n.find(".fp-speed",a)[0].innerHTML=o+"x",n.find(".fp-speed-menu a",a).forEach(function(e){n.toggleClass(e,"fp-selected",e.getAttribute("data-speed")==o),n.toggleClass(e,"fp-color",e.getAttribute("data-speed")==o)})}(jQuery(a).data("speedb")||t.conf.skin_preview)&&(e=p.support).video&&e.inlineVideo&&(n=p.common,e=p.bean,r=n.find(".fp-ui",a)[0],i=n.find(".fp-controls",r)[0],l=t.conf.speeds,e.on(a,"click",".fp-speed",function(){var e=n.find(".fp-speed-menu",a)[0];n.hasClass(e,"fp-active")?t.hideMenu():t.showMenu(e)}),e.on(a,"click",".fp-speed-menu a",function(e){e=e.target.getAttribute("data-speed");t.speed(e)}),t.on("speed",function(e,o,t){1<l.length&&f(t)}).on("ready",function(e,o){o.removeSpeedButton(),p.support.android&&"html5"==o.engine.engineName&&"application/x-mpegurl"==o.video.type||1<(l=o.conf.speeds).length&&o.createSpeedButton()}),t.removeSpeedButton=function(){n.find(".fp-speed-menu",a).forEach(n.removeNode),n.find(".fp-speed",a).forEach(n.removeNode)},t.createSpeedButton=function(){var o;jQuery(a).data("speedb")&&(t.removeSpeedButton(),i.appendChild(n.createElement("strong",{className:"fp-speed"},t.currentSpeed+"x")),o=n.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>"),l.forEach(function(e){e=n.createElement("a",{"data-speed":s(e)},s(e)+"x");o.appendChild(e)}),r.appendChild(o),f(t.currentSpeed),jQuery(a).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed))},t.conf.skin_preview)&&t.createSpeedButton()})}"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e:"function"==typeof window.flowplayer&&e(window.flowplayer)})(),flowplayer(function(e,o){void 0===fv_flowplayer_conf.disable_localstorage&&(e.on("speed",function(e,o,t){try{window.localStorage.fv_player_speed=t}catch(e){}}),e.on("ready",function(){window.localStorage.fv_player_speed&&jQuery(o).find("strong.fp-speed").is(":visible")&&e.speed(parseFloat(window.localStorage.fv_player_speed)),0==jQuery(o).data("volume")&&e.mute(!0,!0)}))}),(s=>{var f={},p=!1;function o(){for(var e in f)for(var o in f[e])for(var t in f[e][o])f[e][o][t]=Math.round(f[e][o][t]);var a=(window.freedomplayer?freedomplayer:flowplayer).conf,n=(a.debug&&fv_player_stats_watched(),new FormData);n.append("tag","seconds"),n.append("blog_id",a.fv_stats.blog_id),n.append("user_id",a.fv_stats.user_id),n.append("_wpnonce",a.fv_stats.nonce),n.append("watched",encodeURIComponent(JSON.stringify(f))),navigator.sendBeacon(a.fv_stats.url,n)}flowplayer(function(e,o){o=s(o);var a,n=-1,r=0;if(e.conf.fv_stats&&(e.conf.fv_stats.enabled||o.data("fv_stats")&&"no"!=o.data("fv_stats"))){try{var i=o.data("fv_stats_data");if(!i)return}catch(e){return!1}e.on("ready finish",function(e,o){o.on("progress",function(e,o,t){t<1||n==l()||(n=l(),s.post(o.conf.fv_stats.url,{blog_id:o.conf.fv_stats.blog_id,video_id:o.video.id||0,player_id:i.player_id,post_id:i.post_id,user_id:o.conf.fv_stats.user_id,tag:"play",_wpnonce:o.conf.fv_stats.nonce}))}),a=!(r=0)}).on("finish",function(){n=-1}).on("progress",function(e,o,t){0!=t&&(o.seeking?r=t:a?a=!1:r=(0==r||t<=r||(f[i.player_id]||(f[i.player_id]={}),f[i.player_id][i.post_id]||(f[i.player_id][i.post_id]={}),f[i.player_id][i.post_id][o.video.id]||(f[i.player_id][i.post_id][o.video.id]=0),f[i.player_id][i.post_id][o.video.id]+=t-r,p=!0),t))}),e.on("cva",function(e,o){s.post(o.conf.fv_stats.url,{blog_id:o.conf.fv_stats.blog_id,video_id:o.video.id||0,player_id:i.player_id,post_id:i.post_id,user_id:o.conf.fv_stats.user_id,tag:"click",_wpnonce:o.conf.fv_stats.nonce})})}function l(){return e.video.index||0}}),s(window).on("beforeunload pagehide",function(){var e="sendBeacon"in navigator;!flowplayer.conf.stats_sent&&e&&(flowplayer.conf.stats_sent=!0,p)&&o()}),setInterval(function(){p&&(o(),p=!(f={}))},3e5),window.fv_player_stats_watched=function(){s.each(f,function(e,o){console.log("player id: "+e),s.each(o,function(e,o){console.log("post id: "+e),s.each(o,function(e,o){console.log("video id: "+e+" seconds: "+o)})})})}})(jQuery),flowplayer(function(t,a){var n,r=jQuery(a),e=r.find(".fp-player"),o=r.data("fvsticky"),i=!1,l=r.find(".fp-ratio");if(t.is_sticky=!1,(i=flowplayer.conf.sticky_video&&"off"!=flowplayer.conf.sticky_video&&void 0===o?!0:i)||o){if(!flowplayer.support.firstframe)return;var s=flowplayer.conf.sticky_place;i=jQuery(window),n=r,t.on("unload",function(){p(),r.removeClass("is-unSticky")}),i.on("resize",function(){c()||"all"==flowplayer.conf.sticky_video||t.is_sticky&&p()}).on("scroll",function(){var e,o;if(c()||"all"==flowplayer.conf.sticky_video)if(e=n[0],(o=e.getBoundingClientRect()).top>=0-jQuery(e).outerHeight()/2&&0<=o.left&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)+jQuery(e).outerHeight()/2&&o.right<=(window.innerWidth||document.documentElement.clientWidth)||!(t.playing||t.loading||flowplayer.audible_instance==r.data("freedomplayer-instance-id")||"object"==_typeof(a.fv_player_vast)&&"object"==_typeof(a.fv_player_vast.adsManager_)&&"function"==typeof a.fv_player_vast.adsManager_.getRemainingTime&&0<a.fv_player_vast.adsManager_.getRemainingTime()))p();else{if(0<jQuery("div.flowplayer.is-unSticky").length)return!1;f()}else t.is_sticky&&p()})}function f(){e.hasClass("is-sticky-"+s)||(e.addClass("is-sticky"),e.addClass("is-sticky-"+s),0==r.find("a.fp-sticky").length&&r.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>'),e.prepend(l.clone()),d(!0),t.is_sticky=!0,t.trigger("sticky",[t]),e.parent(".flowplayer").addClass("is-stickable"))}function p(){e.removeClass("is-sticky"),e.removeClass("is-sticky-"+s),e.css("max-width",""),e.find(".fp-ratio").remove(),e.parent(".flowplayer").removeClass("is-stickable"),t.is_sticky&&(d(),t.is_sticky=!1,t.trigger("sticky-exit",[t]))}function c(){return t.autoplayed||jQuery(window).innerWidth()>=fv_flowplayer_conf.sticky_min_width}function d(e){var o=a;while(o){try{var t=getComputedStyle(o);t.transform&&(o.style.transform=e?"none":""),t.zIndex&&(o.style.zIndex=e?"auto":"")}catch(e){}o=o.parentNode}}t.sticky=function(e,o){void 0===e&&(e=!t.is_sticky),o&&r.toggleClass("is-unSticky",!e),(e?f:p)()}}),jQuery(function(t){t(document).on("click","a.fp-sticky",function(){var e=t("div.flowplayer.is-stickable"),o=e.data("flowplayer");e.addClass("is-unSticky"),e.find(".fp-player").removeClass(["is-sticky","is-sticky-right-bottom","is-sticky-left-bottom","is-sticky-right-top","is-sticky-left-top"]).css({width:"",height:"",maxHeight:""}),o.is_sticky&&(o.is_sticky=!1,o.trigger("sticky-exit",[o])),o.autoplayed&&o.pause()}),t(document).on("click","div.flowplayer.is-unSticky",function(){t("div.flowplayer").removeClass("is-unSticky")})}),flowplayer(function(e,n){n=jQuery(n);var r=window.localStorage;e.on("ready",function(e,t,o){var a;o.subtitles&&o.subtitles.length&&(r.fv_player_subtitle&&t.video.subtitles&&t.video.subtitles.length?"none"===r.fv_player_subtitle?t.disableSubtitles():t.video.subtitles.forEach(function(e,o){e.srclang===r.fv_player_subtitle&&t.loadSubtitles(o)}):(a=o.subtitles.filter(function(e){return e.fv_default})[0])&&t.loadSubtitles(o.subtitles.indexOf(a))),void 0===fv_flowplayer_conf.disable_localstorage&&n.find(".fp-subtitle-menu").on("click",function(e){var o=e.target.getAttribute("data-subtitle-index");if("string"==typeof o)try{r.fv_player_subtitle=-1<o?t.video.subtitles[o].srclang:"none"}catch(e){}})})}),flowplayer(function(e,t){t=jQuery(t),e.on("ready",function(e,o){t.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions),t.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)})}),"undefined"!=typeof flowplayer&&"undefined"!=typeof fv_flowplayer_conf&&fv_flowplayer_conf.video_hash_links&&(flowplayer(function(t,a){var n,r,i,l,s,f,p="";0<jQuery(a).find(".sharing-link").length&&(n=function(e,o){l=fv_player_get_video_link_hash(t),s=","+fv_player_time_hms(t.video.time),e&&o?(i=","+fv_player_time_hms_ms(e+t.get_custom_start()),r=","+fv_player_time_hms_ms(o+t.get_custom_start())):(r=f&&void 0!==t.get_ab_end()&&t.get_ab_end()?","+fv_player_time_hms_ms(t.get_ab_end()):"",i=f&&void 0!==t.get_ab_start()&&t.get_ab_start()?","+fv_player_time_hms_ms(t.get_ab_start()):""),p=jQuery(".sharing-link",a).attr("href").replace(/#.*/,"")+"#"+l+s+i+r,jQuery(".sharing-link",a).attr("href",p)},t.on("ready",function(e,o,t){o.fv_noUiSlider&&o.fv_noUiSlider.on("set",function(e){n(e[0],e[1])})}),t.on("progress",function(e,o){o.video.sources&&o.video.sources[0]&&n()}),t.on("abloop",function(e,o,t){f=t,o.playing||n()}),jQuery(".sharing-link",a).on("click",function(e){e.preventDefault(),fv_player_clipboard(jQuery(this).attr("href"),function(){fv_player_notice(a,fv_flowplayer_translations.link_copied,2e3)},function(){fv_player_notice(a,fv_flowplayer_translations.error_copy_clipboard,2e3)})})),t.get_video_link=function(){return p}}),jQuery(document).on("click",'a[href*="fvp_"]',function(){var e=jQuery(this);setTimeout(function(){0==e.parents(".fvp-share-bar").length&&fv_video_link_autoplay()})})),flowplayer(function(e,a){a=jQuery(a);var n=!1;function r(){a.removeClass("has-fp-message-muted"),a.find(".fp-message-muted").remove()}e.one("ready",function(e,o){a.hasClass("is-audio")||(n=!0)}),e.on("progress",function(e,o,t){n&&1<t&&(n=!1,(t=jQuery("root").find("video")).length&&!(t=t[0]).mozHasAudio&&!Boolean(t.webkitAudioDecodedByteCount)&&!Boolean(t.audioTracks&&t.audioTracks.length)||!o.muted&&0!=o.volumeLevel||"true"==localStorage.muted||"0"==localStorage.volume||(t=jQuery('<div class="fp-message fp-message-muted"><span class="fp-icon fp-volumebtn-notice"></span> '+fv_flowplayer_translations.click_to_unmute+"</div>"),freedomplayer.bean.on(t[0],"click touchstart",function(){o.mute(!1),o.volume(1)}),a.find(".fp-ui").append(t),a.addClass("has-fp-message-muted"),setTimeout(r,1e4)))}),e.on("mute volume",function(){(!e.muted||0<e.volumeLevel)&&r()})}),"undefined"!=typeof flowplayer&&(fv_player_warning=function(e,o,t){var a=jQuery(e).prev(".fv-player-warning-wrapper");0==a.length&&(jQuery(e).before('<div class="fv-player-warning-wrapper">'),a=jQuery(e).prev(".fv-player-warning-wrapper")),0==a.find(".fv-player-warning-"+t).length&&(e=jQuery("<p style='display: none' "+(t?" class='fv-player-warning-"+t+"'":"")+">"+o+"</p>"),a.append(e),e.slideDown())},flowplayer(function(o,a){a=jQuery(a),navigator.userAgent.match(/iPhone.* OS [0-6]_/i)&&o.one("progress",function(e){void 0!==o.video.subtitles&&o.video.subtitles.length&&fv_player_warning(a,fv_flowplayer_translations.warning_iphone_subs)}),flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)&&fv_player_warning(a,fv_flowplayer_translations.warning_unstable_android,"firefox"),/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)&&(o.on("ready",function(e,o,t){setTimeout(function(){t.src&&t.src.match(/fpdl.vimeocdn.com/)&&(0==t.time||1==t.time)&&(fv_player_warning(a,fv_flowplayer_translations.warning_unstable_android,"firefox"),o.on("progress",function(e,o){a.prev().find(".fv-player-warning-firefox").remove()}))},1500)}),o.on("error",function(e,o,t){2==t.MEDIA_ERR_NETWORK&&t.video.src.match(/fpdl.vimeocdn.com/)&&fv_player_warning(a,fv_flowplayer_translations.warning_unstable_android,"firefox")})),/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)&&o.on("error",function(e,o,t){t.video.src.match(/fpdl.vimeocdn.com/)&&fv_player_warning(a,fv_flowplayer_translations.warning_old_safari)});var e=flowplayer.support;e.android&&(e.android.samsung&&parseInt(e.browser.version)<66||e.browser.safari)&&o.on("error",function(e,o,t){fv_player_warning(a,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})})),flowplayer(function(t,a){a=jQuery(a);var n=!1;jQuery(t.conf.playlist).each(function(e,o){o.sources[0].type.match(/youtube/)&&(n=!0)}),n&&(a.addClass("is-youtube"),void 0!==fv_flowplayer_conf.youtube_browser_chrome)&&"none"==fv_flowplayer_conf.youtube_browser_chrome&&a.addClass("is-youtube-nl"),t.on("ready",function(e,o,t){a.find(".fp-youtube-wrap").remove(),a.find(".fp-youtube-logo").remove(),"video/youtube"==t.type?(a.addClass("is-youtube"),void 0!==fv_flowplayer_conf.youtube_browser_chrome&&("none"==fv_flowplayer_conf.youtube_browser_chrome&&a.addClass("is-youtube-nl"),"standard"==fv_flowplayer_conf.youtube_browser_chrome&&a.addClass("is-youtube-standard"),"reduced"==fv_flowplayer_conf.youtube_browser_chrome)&&(a.addClass("is-youtube-reduced"),a.addClass("is-youtube-nl"),a.find(".fp-ui").append('<div class="fp-youtube-wrap"><a class="fp-youtube-title" target="_blank" href="'+o.video.src+'">'+t.fv_title_clean+"</a></div>"),a.find(".fp-ui").append('<a class="fp-youtube-logo" target="_blank" href="'+o.video.src+'"><svg height="100%" version="1.1" viewBox="0 0 110 26" width="100%"><path class="ytp-svg-fill" d="M 16.68,.99 C 13.55,1.03 7.02,1.16 4.99,1.68 c -1.49,.4 -2.59,1.6 -2.99,3 -0.69,2.7 -0.68,8.31 -0.68,8.31 0,0 -0.01,5.61 .68,8.31 .39,1.5 1.59,2.6 2.99,3 2.69,.7 13.40,.68 13.40,.68 0,0 10.70,.01 13.40,-0.68 1.5,-0.4 2.59,-1.6 2.99,-3 .69,-2.7 .68,-8.31 .68,-8.31 0,0 .11,-5.61 -0.68,-8.31 -0.4,-1.5 -1.59,-2.6 -2.99,-3 C 29.11,.98 18.40,.99 18.40,.99 c 0,0 -0.67,-0.01 -1.71,0 z m 72.21,.90 0,21.28 2.78,0 .31,-1.37 .09,0 c .3,.5 .71,.88 1.21,1.18 .5,.3 1.08,.40 1.68,.40 1.1,0 1.99,-0.49 2.49,-1.59 .5,-1.1 .81,-2.70 .81,-4.90 l 0,-2.40 c 0,-1.6 -0.11,-2.90 -0.31,-3.90 -0.2,-0.89 -0.5,-1.59 -1,-2.09 -0.5,-0.4 -1.10,-0.59 -1.90,-0.59 -0.59,0 -1.18,.19 -1.68,.49 -0.49,.3 -1.01,.80 -1.21,1.40 l 0,-7.90 -3.28,0 z m -49.99,.78 3.90,13.90 .18,6.71 3.31,0 0,-6.71 3.87,-13.90 -3.37,0 -1.40,6.31 c -0.4,1.89 -0.71,3.19 -0.81,3.99 l -0.09,0 c -0.2,-1.1 -0.51,-2.4 -0.81,-3.99 l -1.37,-6.31 -3.40,0 z m 29.59,0 0,2.71 3.40,0 0,17.90 3.28,0 0,-17.90 3.40,0 c 0,0 .00,-2.71 -0.09,-2.71 l -9.99,0 z m -53.49,5.12 8.90,5.18 -8.90,5.09 0,-10.28 z m 89.40,.09 c -1.7,0 -2.89,.59 -3.59,1.59 -0.69,.99 -0.99,2.60 -0.99,4.90 l 0,2.59 c 0,2.2 .30,3.90 .99,4.90 .7,1.1 1.8,1.59 3.5,1.59 1.4,0 2.38,-0.3 3.18,-1 .7,-0.7 1.09,-1.69 1.09,-3.09 l 0,-0.5 -2.90,-0.21 c 0,1 -0.08,1.6 -0.28,2 -0.1,.4 -0.5,.62 -1,.62 -0.3,0 -0.61,-0.11 -0.81,-0.31 -0.2,-0.3 -0.30,-0.59 -0.40,-1.09 -0.1,-0.5 -0.09,-1.21 -0.09,-2.21 l 0,-0.78 5.71,-0.09 0,-2.62 c 0,-1.6 -0.10,-2.78 -0.40,-3.68 -0.2,-0.89 -0.71,-1.59 -1.31,-1.99 -0.7,-0.4 -1.48,-0.59 -2.68,-0.59 z m -50.49,.09 c -1.09,0 -2.01,.18 -2.71,.68 -0.7,.4 -1.2,1.12 -1.49,2.12 -0.3,1 -0.5,2.27 -0.5,3.87 l 0,2.21 c 0,1.5 .10,2.78 .40,3.78 .2,.9 .70,1.62 1.40,2.12 .69,.5 1.71,.68 2.81,.78 1.19,0 2.08,-0.28 2.78,-0.68 .69,-0.4 1.09,-1.09 1.49,-2.09 .39,-1 .49,-2.30 .49,-3.90 l 0,-2.21 c 0,-1.6 -0.2,-2.87 -0.49,-3.87 -0.3,-0.89 -0.8,-1.62 -1.49,-2.12 -0.7,-0.5 -1.58,-0.68 -2.68,-0.68 z m 12.18,.09 0,11.90 c -0.1,.3 -0.29,.48 -0.59,.68 -0.2,.2 -0.51,.31 -0.81,.31 -0.3,0 -0.58,-0.10 -0.68,-0.40 -0.1,-0.3 -0.18,-0.70 -0.18,-1.40 l 0,-10.99 -3.40,0 0,11.21 c 0,1.4 .18,2.39 .68,3.09 .49,.7 1.21,1 2.21,1 1.4,0 2.48,-0.69 3.18,-2.09 l .09,0 .31,1.78 2.59,0 0,-14.99 c 0,0 -3.40,.00 -3.40,-0.09 z m 17.31,0 0,11.90 c -0.1,.3 -0.29,.48 -0.59,.68 -0.2,.2 -0.51,.31 -0.81,.31 -0.3,0 -0.58,-0.10 -0.68,-0.40 -0.1,-0.3 -0.21,-0.70 -0.21,-1.40 l 0,-10.99 -3.40,0 0,11.21 c 0,1.4 .21,2.39 .71,3.09 .5,.7 1.18,1 2.18,1 1.39,0 2.51,-0.69 3.21,-2.09 l .09,0 .28,1.78 2.62,0 0,-14.99 c 0,0 -3.40,.00 -3.40,-0.09 z m 20.90,2.09 c .4,0 .58,.11 .78,.31 .2,.3 .30,.59 .40,1.09 .1,.5 .09,1.21 .09,2.21 l 0,1.09 -2.5,0 0,-1.09 c 0,-1 -0.00,-1.71 .09,-2.21 0,-0.4 .11,-0.8 .31,-1 .2,-0.3 .51,-0.40 .81,-0.40 z m -50.49,.12 c .5,0 .8,.18 1,.68 .19,.5 .28,1.30 .28,2.40 l 0,4.68 c 0,1.1 -0.08,1.90 -0.28,2.40 -0.2,.5 -0.5,.68 -1,.68 -0.5,0 -0.79,-0.18 -0.99,-0.68 -0.2,-0.5 -0.31,-1.30 -0.31,-2.40 l 0,-4.68 c 0,-1.1 .11,-1.90 .31,-2.40 .2,-0.5 .49,-0.68 .99,-0.68 z m 39.68,.09 c .3,0 .61,.10 .81,.40 .2,.3 .27,.67 .37,1.37 .1,.6 .12,1.51 .12,2.71 l .09,1.90 c 0,1.1 .00,1.99 -0.09,2.59 -0.1,.6 -0.19,1.08 -0.49,1.28 -0.2,.3 -0.50,.40 -0.90,.40 -0.3,0 -0.51,-0.08 -0.81,-0.18 -0.2,-0.1 -0.39,-0.29 -0.59,-0.59 l 0,-8.5 c .1,-0.4 .29,-0.7 .59,-1 .3,-0.3 .60,-0.40 .90,-0.40 z" id="ytp-id-14"></path></svg></a>'),void 0!==t.author_thumbnail)&&void 0!==t.author_url&&a.find(".fp-youtube-wrap").prepend('<a class="fp-youtube-channel-thumbnail" target="_blank" href="'+t.author_url+'" title="'+t.author_name+'"><img src="'+t.author_thumbnail+'" /></a>')):(a.removeClass("is-youtube"),a.removeClass("is-youtube-nl"),a.removeClass("is-youtube-standard"),a.removeClass("is-youtube-reduced"),a.find(".fp-youtube-wrap").remove(),a.find(".fp-youtube-logo").remove())}),a.on("click",".fp-youtube-title, .fp-youtube-logo",function(e){var o=t.video.time;0<o&&(o=flowplayer(0).video.sources[0].src+"&t="+parseInt(o)+"s",jQuery(this).attr("href",o))})});
  • fv-player/trunk/freedom-video-player/modules/fv-player.js

    r3314575 r3336706  
    480480  if( window.self != window.top && !location.href.match(/fv_player_preview/) ){
    481481    embed_size();
    482     jQuery(window.self).resize(embed_size);
     482    jQuery(window.self).on( 'resize', embed_size );
    483483  }
    484484
  • fv-player/trunk/fv-player.php

    r3326358 r3336706  
    44Plugin URI: http://foliovision.com/player
    55Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups.
    6 Version: 8.0.21
     6Version: 8.0.22
    77Author URI: http://foliovision.com/
    88Requires PHP: 5.6
     
    3636global $fv_wp_flowplayer_ver;
    3737
    38 $fv_wp_flowplayer_ver = '8.0.21';
     38$fv_wp_flowplayer_ver = '8.0.22';
    3939$fv_wp_flowplayer_core_ver = '8.0.20.1';
    4040
     
    228228include_once(dirname( __FILE__ ) . '/models/lms-teaching.class.php');
    229229
     230include_once(dirname( __FILE__ ) . '/models/tutor-lms.class.php');
     231
    230232add_action('plugins_loaded', 'fv_player_bunny_stream_include' );
    231233
  • fv-player/trunk/includes/class.fv-player-wizard-base.php

    r3314575 r3336706  
    1212  private $steps = array();
    1313
    14   private $version = '7.4.32.727';
     14  private $version = '8.0.20';
    1515
    1616  private $title = false;
  • fv-player/trunk/includes/fv-player-wizard-base.js

    r3131463 r3336706  
    1616      get_step_fields().each( function() {
    1717        var input = $(this);
    18         if( !input.val() && !input.data('optional') ) {
     18        if(
     19          ! input.val() &&
     20          ! input.data('optional') &&
     21          // It must not be in the Chosen dropdown UI
     22          ! input.closest('.chosen-drop').length
     23        ) {
    1924          add_field_error('This field is required',input);
    2025          has_required_fields = false;
     
    134139
    135140    function get_step_fields() {
    136       return current_step_wrap.find('select, input')
     141      return current_step_wrap.find('select, input');
    137142    }
    138143
  • fv-player/trunk/js/bunny_stream-upload.js

    r3314575 r3336706  
    164164    if ( !$('.' + upload_button_class).length ) {
    165165      if ( !$('.media-toolbar-secondary > #' + upload_button_class + '-wrap').length ) {
    166         $('.media-toolbar-secondary').append('<div id="' + upload_button_class + '-wrap" class="upload_buttons" style="display: none" data-tab-id="fv_player_bunny_stream_browser_media_tab"></div>');
     166        $('.media-toolbar-secondary').append('<div id="' + upload_button_class + '-wrap" class="fv-player-upload_buttons" style="display: none" data-tab-id="fv_player_bunny_stream_browser_media_tab"></div>');
    167167      }
    168168
  • fv-player/trunk/js/fancybox.js

    r3314575 r3336706  
    240240  }
    241241 
    242   var api = jQuery(ref).find('.freedomplayer').data('freedomplayer');
     242  var player = jQuery(ref).find('.freedomplayer'),
     243      api    = player.data('freedomplayer');
     244
     245  // Used if FV Player scripts are not loaded yet or player did not initialize yet
     246  if ( ! api ) {
     247    jQuery( document ).on( 'fv_player_loaded', function() {
     248      fv_player_fancybox_load( player, index, player );
     249    });
     250    return;
     251  }
     252
     253  return fv_player_fancybox_load( player, index, playlist );
     254});
     255
     256function fv_player_fancybox_load( player, index, playlist ) {
     257  var api = player.data('freedomplayer');
     258
    243259  if( !freedomplayer.support.firstframe || freedomplayer.support.iOS || freedomplayer.support.android ) {
    244260    if( api.conf.clip && api.conf.clip.sources[0].type.match(/youtube/) ) return;
    245261  }
     262
    246263  if( index == 0 && api.splash ) {
    247264    api.load();
     
    249266    api.play(index);
    250267  }
     268
    251269  fv_fancybox_check_size();
    252  
     270
    253271  if( playlist.length && !jQuery(this).data('fancybox') ) {
    254     playlist.find('a[data-fancybox]').eq(0).click();
     272    playlist.find( 'a[data-fancybox]' ).eq(0).trigger( 'click' );
    255273    return false;
    256   } 
    257 })
     274  }
     275}
    258276
    259277jQuery(document).on('click', '.fp-playlist-external[rel$=_lightbox_starter] a', function() {
  • fv-player/trunk/js/media-library-browser-base.js

    r3326358 r3336706  
    418418  // Bail if it's a tab which provides video files only (Bunny Stream, Cloudflare Stream etc.) and it's not the video src field
    419419  if (
     420    // input_name must be set, it's not set when clicking on the "Select Media" button in the block and we don't want to remove the tab in that case
     421    input_name && input_name.length &&
    420422    [
    421423      'fv_player_bunny_stream_browser_media_tab',
     
    613615
    614616function fv_flowplayer_media_browser_show_upload( id ) {
    615   jQuery('.media-toolbar-secondary > .upload_buttons').hide();
    616   jQuery('.media-toolbar-secondary > .upload_buttons[data-tab-id='+id+']').show();
     617  jQuery('.media-toolbar-secondary > .fv-player-upload_buttons').hide();
     618  jQuery('.media-toolbar-secondary > .fv-player-upload_buttons[data-tab-id='+id+']').show();
    617619}
    618620
  • fv-player/trunk/js/s3-upload-base.js

    r3314575 r3336706  
    44  var
    55    $ = jQuery,
     6    $uploadDiv,
    67    $uploadButton,
    78    $uploadInput,
     
    2122    upload_error_callback = ( typeof( options.upload_error_callback ) == 'function' ? options.upload_error_callback : function() {} );
    2223
     24  function debug_log( ...args ) {
     25    console.log( 'FV Player S3 Uploader', ...args );
     26  }
     27
    2328  function recreate_file_input( input_name, input_class_name ) {
    2429    if ( $uploadInput.length ) {
     
    2833    $uploadButton.after('<input type="file" accept=".mp4,.mov,.web,.flv,.avi,.vmw,.avchd,.swf,.mkv,.webm.,mpeg,.mpg" class="fv-player-s3-upload-file-input ' + input_class_name + '" name="' + input_name + '" />');
    2934
    30     $uploadInput = $('.media-modal .media-frame-toolbar .media-toolbar-secondary > #' + upload_button_class + '-wrap .' + input_class_name);
    31     $uploadInput.change(function() {
     35    $uploadInput = $uploadDiv.find( '.' + input_class_name);
     36    $uploadInput.on( 'change', function() {
    3237      if( wizard_callback ) {
    3338        wizard_callback($uploadInput[0].files[0]);
     
    3843  }
    3944
     45  function set_upload_status( status ) {
     46    if ( window.fv_player_media_browser ) {
     47      window.fv_player_media_browser.set_upload_status( status );
     48    }
     49  }
     50
    4051  function upload( file ) {
    4152    if (!(window.File && window.FileReader && window.FileList && window.Blob && window.Blob.prototype.slice)) {
     
    5364    }
    5465
    55     fv_player_media_browser.set_upload_status(true);
     66    set_upload_status(true);
    5667
    5768    window.addEventListener('beforeunload', closeWarning);
     
    6273    s3upload = new S3MultiUpload( file );
    6374    s3upload.onServerError = function(command, jqXHR, textStatus, errorThrown) {
    64       fv_player_media_browser.set_upload_status(false);
     75      set_upload_status(false);
    6576      window.removeEventListener('beforeunload', closeWarning);
    6677      $progressDiv.text("Upload failed. " + textStatus );
     
    7384      $progressDiv.text("Upload failed.");
    7485      window.removeEventListener('beforeunload', closeWarning);
    75       fv_player_media_browser.set_upload_status(false);
     86      set_upload_status(false);
    7687      $progressBarDiv.hide();
    7788      upload_error_callback();
     
    101112    s3upload.onUploadCompleted = function( data ) {
    102113      window.removeEventListener('beforeunload', closeWarning);
    103       fv_player_media_browser.set_upload_status(false);
     114      set_upload_status(false);
    104115      $progressDiv.text(upload_success_message);
    105116      $uploadButton.add( $cancelButton ).toggle();
     
    133144  }
    134145
    135   $(document).on("mediaBrowserOpen", function (event) {
     146  // Are we loading into a custom element?
     147  if ( options.container ) {
     148    debug_log( 'Loading into custom element', options.container );
     149
     150    // Add wrapper on the button for styling
     151    if ( ! $uploadDiv || ! $uploadDiv.length ) {
     152      $uploadDiv = $('<div class="fv-player-upload_buttons"></div>');
     153      options.container.append( $uploadDiv );
     154    }
     155
     156    initUploaderElements( $uploadDiv );
     157
     158  // Otherwise load for WordPress Media Library modal.
     159  } else {
     160    debug_log( 'Loading into WordPress Media Library modal' );
     161
     162    $(document).on("mediaBrowserOpen", function (event) {
     163      debug_log( 'Media Browser Open' );
     164
     165      var container = $('.media-modal .media-frame-toolbar .media-toolbar-secondary');
     166
     167      // add Upload to Coconut button to the media library modal, use style and data-tab-id for show/hide based on active tab in media-library-browser-base.js
     168      if ( ! $uploadDiv || ! $uploadDiv.length ) {
     169        $uploadDiv = $('<div class="fv-player-upload_buttons" style="display: none" data-tab-id="'+options.tab_id+'"></div>');
     170        container.append( $uploadDiv );
     171      }
     172
     173      initUploaderElements( $uploadDiv );
     174    });
     175  }
     176
     177  function initUploaderElements( $uploadDiv ) {
     178
    136179    var
    137180      upload_button_text = options.upload_button_text, //'Upload to Coconut',
     
    143186
    144187    // add Upload to Coconut button to the media library modal
    145     if ( !$('.' + upload_button_class).length ) {
    146       if ( !$('.media-modal .media-frame-toolbar .media-toolbar-secondary > #'+upload_button_class+'-wrap').length ) {
    147         $('.media-modal .media-frame-toolbar .media-toolbar-secondary').append('<div id="' + upload_button_class + '-wrap" class="upload_buttons" style="display: none" data-tab-id="'+options.tab_id+'"></div>');
    148       }
    149 
    150       // check if we have the correct player version
    151       if ( !fv_player_coconut_dos_upload_settings.can_use_get_space ) {
    152         $('.media-modal .media-frame-toolbar .media-toolbar-secondary > #' + upload_button_class + '-wrap').append('<button type="button" class="button media-button button-primary button-large ' + upload_button_class + '">' + upload_button_text + '</button>');
    153 
    154         $('.' + upload_button_class).click(function() {
    155           alert('This functionality requires the latest version of FV Flowplayer. Please update your WordPress plugins.');
    156         });
    157         return;
    158       }
    159 
    160       var $uploadDiv = $('.media-modal .media-frame-toolbar .media-toolbar-secondary > #' + upload_button_class + '-wrap');
    161 
    162       var upload_interface = '<div class="fv-player-s3-upload-buttons">'
    163       upload_interface += '<button type="button" class="button media-button button-primary button-large ' + upload_button_class + '">' + upload_button_text + '</button>';
    164       upload_interface += '<button type="button" class="button media-button button-primary button-large fv-player-s3-upload-cancel-btn ' + cancel_button_class + '">Cancel Upload</button>';
     188    if ( ! $uploadButton || ! $uploadButton.length ) {
     189      $uploadButton = $( '<button type="button" class="button media-button button-primary button-large ' + upload_button_class + '">' + upload_button_text + '</button>' );
     190      $cancelButton = $( '<button type="button" class="button media-button button-primary button-large fv-player-s3-upload-cancel-btn ' + cancel_button_class + '">Cancel Upload</button>' );
     191
     192      var buttons = $( '<div class="fv-player-s3-upload-buttons"></div>' );
     193
     194      buttons.append( $uploadButton );
     195      buttons.append( $cancelButton );
     196     
    165197      if( options.upload_button_extra_html ) {
    166         upload_interface += options.upload_button_extra_html;
    167       }
    168       upload_interface += '</div>';
    169 
    170       upload_interface += '<div class="fv-player-s3-upload-wrap">';
     198        buttons.append( options.upload_button_extra_html );
     199      }
     200
     201      $uploadDiv.append( buttons );
     202
     203      var upload_interface = '<div class="fv-player-s3-upload-wrap">';
    171204      upload_interface += '<div class="fv-player-s3-upload-progress ' + upload_progress_class +'"></div>';
    172205      upload_interface += '<div class="fv-player-s3-upload-progress-enclosure ' + upload_progress_bar_enclosure_class + '"><div class="fv-player-s3-upload-progress-bar ' + upload_progress_bar_class + '"></div><div class="fv-player-s3-upload-progress-number ' + upload_progress_bar_number_class + '"></div></div>';
    173206      upload_interface += '</div>';
    174207
    175       $('.media-modal .media-frame-toolbar .media-toolbar-secondary > #' + upload_button_class + '-wrap').append( upload_interface);
    176 
    177       $uploadButton = $uploadDiv.find('.' + upload_button_class);
     208      $uploadDiv.append( upload_interface);
     209
    178210      $uploadInput = $uploadDiv.find('.' + file_select_input_class);
    179       $cancelButton = $uploadDiv.find('.' + cancel_button_class);
    180211      $progressDiv = $uploadDiv.find('.' + upload_progress_class);
    181212      $progressBarDiv = $uploadDiv.find('.' + upload_progress_bar_enclosure_class);
     
    189220      recreate_file_input( file_select_input_name, file_select_input_class );
    190221
    191       $uploadButton.click(function() {
    192         $uploadInput.click();
     222      $uploadButton.on( 'click', function() {
     223        $uploadInput.trigger( 'click' );
    193224      });
    194225
    195       $cancelButton.click(function() {
     226      $cancelButton.on( 'click', function() {
    196227        s3upload.cancel();
    197228        $uploadButton.add( $cancelButton ).toggle();
     
    202233      });
    203234    }
    204   });
     235  }
    205236
    206237  return {
  • fv-player/trunk/js/s3upload.js

    r3314575 r3336706  
    11function S3MultiUpload(file) {
     2    let ajaxurl = false;
     3    if ( window.fv_flowplayer_browser ) {
     4      ajaxurl = window.fv_flowplayer_browser.ajaxurl;
     5    } else if ( window.fv_player_s3_uploader ) {
     6      ajaxurl = window.fv_player_s3_uploader.ajaxurl;
     7    }
     8
     9    if ( ! ajaxurl ) {
     10      console.error( 'S3MultiUpload: ajaxurl not found' );
     11      return;
     12    }
     13
    214    this.PART_SIZE = 100 * 1024 * 1024; // 100 MB per chunk
    315//    this.PART_SIZE = 5 * 1024 * 1024 * 1024; // Minimum part size defined by aws s3 is 5 MB, maximum 5 GB
    4     this.SERVER_LOC = window.fv_flowplayer_browser.ajaxurl + '?'; // Location of our server where we'll send all AWS commands and multipart instructions
     16    this.SERVER_LOC = ajaxurl + '?'; // Location of our server where we'll send all AWS commands and multipart instructions
    517    this.completed = false;
    618    this.file = file;
     19   
     20    // Sanitize the filename to only allow letters, numbers, and hyphens
     21    var sanitizedFilename = this.sanitizeFilename(this.file.name);
     22   
    723    this.fileInfo = {
    8         name: this.file.name,
     24        name: sanitizedFilename,
    925        type: this.file.type,
    1026        size: this.file.size,
     
    2339    this.retryBackoffTimeout = 15000; // ms
    2440    this.completeErrors = 1;
     41    this.validationChunkSize = 5 * 1024 * 1024;
     42   
     43    // Nonces - will be set after validation
     44    this.create_multiupload_nonce = null;
     45    this.multiupload_send_part_nonce = null;
     46    this.multiupload_abort_nonce = null;
     47    this.multiupload_complete_nonce = null;
    2548}
     49
     50/**
     51 * Sanitizes filename to only allow letters, numbers, and hyphens
     52 * @param {string} filename The original filename
     53 * @returns {string} The sanitized filename
     54 */
     55S3MultiUpload.prototype.sanitizeFilename = function(filename) {
     56    // Remove file extension first
     57    var lastDotIndex = filename.lastIndexOf('.');
     58    var name = filename.substring(0, lastDotIndex);
     59    var extension = filename.substring(lastDotIndex);
     60   
     61    // Sanitize the name part: keep only letters, numbers, and hyphens
     62    // Replace any characters that are not letters, numbers, or hyphens with hyphens
     63    // Also replace multiple consecutive hyphens with a single hyphen
     64    var sanitizedName = name.replace(/[^a-zA-Z0-9-]/g, '-').replace(/-+/g, '-');
     65   
     66    // Remove leading and trailing hyphens
     67    sanitizedName = sanitizedName.replace(/^-+|-+$/g, '');
     68   
     69    // If the sanitized name is empty, use 'file'
     70    if (!sanitizedName) {
     71        sanitizedName = 'file';
     72    }
     73   
     74    // Return the sanitized name with the original extension
     75    return sanitizedName + extension;
     76};
     77
     78/**
     79 * Uploads the first 5MB of the file for validation
     80 */
     81S3MultiUpload.prototype.validateFile = function() {
     82    var self = this;
     83   
     84    // Create a blob with the first 1MB of the file
     85    var validationBlob = this.file.slice(0, this.validationChunkSize);
     86   
     87    // Create FormData to send the file chunk
     88    var formData = new FormData();
     89    formData.append('action', 'validate_file_upload');
     90    formData.append('file_chunk', validationBlob, this.fileInfo.name);
     91    formData.append('file_info', JSON.stringify(this.fileInfo));
     92    formData.append('nonce', window.fv_player_s3_uploader.validate_file_nonce || '');
     93
     94    jQuery.ajax({
     95        url: self.SERVER_LOC,
     96        type: 'POST',
     97        data: formData,
     98        processData: false,
     99        contentType: false,
     100        xhr: function() {
     101            var xhr = new window.XMLHttpRequest();
     102            xhr.upload.addEventListener('progress', function(e) {
     103                if (e.lengthComputable) {
     104                    var percentComplete = (e.loaded / e.total) * 100;
     105                    self.onValidationProgress(percentComplete);
     106                }
     107            }, false);
     108            return xhr;
     109        }
     110    }).done(function(data) {
     111
     112        if (data.error) {
     113            self.onValidationError(data.error);
     114        } else {
     115
     116            // Store the nonces from validation response
     117            self.create_multiupload_nonce = data.create_multiupload_nonce;
     118            self.multiupload_send_part_nonce = data.multiupload_send_part_nonce;
     119            self.multiupload_abort_nonce = data.multiupload_abort_nonce;
     120            self.multiupload_complete_nonce = data.multiupload_complete_nonce;
     121           
     122            self.onValidationSuccess(data);
     123            self.createMultipartUpload();
     124        }
     125    }).fail(function(jqXHR, textStatus, errorThrown) {
     126        self.onValidationError('Validation request failed: ' + textStatus);
     127    });
     128};
    26129
    27130/**
     
    31134    var self = this;
    32135
    33     if( fv_player_media_browser.get_current_folder() === 'Home/' ) { // root folder
     136    if( window.fv_player_media_browser && fv_player_media_browser.get_current_folder() === 'Home/' ) { // root folder
    34137      self.fileInfo.name =  fv_player_media_browser.get_current_folder() + self.fileInfo.name
    35     } else { // nested folder
     138    } else if ( window.fv_player_media_browser && fv_player_media_browser.get_current_folder() ) { // nested folder
    36139      self.fileInfo.name =  fv_player_media_browser.get_current_folder() + '/' + self.fileInfo.name
    37     }
     140    } else {
     141      // TODO: Make sure this cannot be changed by the user.
     142      self.fileInfo.name =  'frontend/' + self.fileInfo.name
     143    }
     144
     145    // TODO: Force some folder for user uploads
    38146
    39147    jQuery.post(self.SERVER_LOC, {
    40148        action: 'create_multiupload',
    41149        fileInfo: self.fileInfo,
    42         nonce: window.fv_player_s3_uploader.create_multiupload_nonce
     150        nonce: this.create_multiupload_nonce
    43151    }).done(function(data) {
    44152        if( data.error ) {
     
    57165 */
    58166S3MultiUpload.prototype.start = function() {
    59     this.createMultipartUpload();
     167    this.validateFile();
    60168};
    61169
     
    83191            partNumber: i+1,
    84192            contentLength: blob.size,
    85             nonce: window.fv_player_s3_uploader.multiupload_send_part_nonce
     193            nonce: this.multiupload_send_part_nonce
    86194        }));
    87195    }
     
    189297        action: 'multiupload_abort',
    190298        sendBackData: self.sendBackData,
    191         nonce: window.fv_player_s3_uploader.multiupload_abort_nonce
     299        nonce: this.multiupload_abort_nonce
    192300    }).done(function(data) {
    193301
     
    208316        action: 'multiupload_complete',
    209317        sendBackData: self.sendBackData,
    210         nonce: window.fv_player_s3_uploader.multiupload_complete_nonce
     318        nonce: this.multiupload_complete_nonce
    211319    }).done(function(data) {
    212320        self.onUploadCompleted(data);
     
    290398 */
    291399S3MultiUpload.prototype.onPrepareCompleted = function() {};
     400
     401/**
     402 * Override this method to handle validation progress updates
     403 *
     404 * @param {number} percentComplete Percentage of validation upload completed (0-100)
     405 */
     406S3MultiUpload.prototype.onValidationProgress = function(percentComplete) {};
     407
     408/**
     409 * Override this method to handle successful file validation
     410 *
     411 * @param {object} data Response data from validation server
     412 */
     413S3MultiUpload.prototype.onValidationSuccess = function(data) {};
     414
     415/**
     416 * Override this method to handle file validation errors
     417 *
     418 * @param {string} error Error message from validation
     419 */
     420S3MultiUpload.prototype.onValidationError = function(error) { alert(error); };
  • fv-player/trunk/js/shortcode-editor.js

    r3326358 r3336706  
    615615        });
    616616
     617        /**
     618         * Look for buttons in Site Editor iframe
     619         */
    617620        function setupSiteEditorHandlers() {
    618621          var site_editor_iframe = jQuery('.edit-site-visual-editor__editor-canvas').contents();
    619622          if( site_editor_iframe.length ) {
    620             debug_log( 'Site editor found!');
    621 
     623            debug_log( 'Site editor found!' );
     624
     625            // FV Player Editor
    622626            site_editor_iframe.off( 'click', '.fv-wordpress-flowplayer-button, .fv-player-editor-button, .fv-player-edit' );
    623627
     
    641645              widget_id = $(this).data().number;
    642646            });
     647
     648            // FV Player Block "Select Media" button
     649            site_editor_iframe.off( 'click', '.fv-player-gutenberg-media' );
     650
     651            site_editor_iframe.on( 'click', '.fv-player-gutenberg-media', fv_flowplayer_uploader_open );
    643652          }
    644653        }
     
    10631072      var fv_flowplayer_uploader_button;
    10641073
    1065       $doc.on( 'click', '#fv-player-shortcode-editor .components-button.add_media, .fv-player-gutenberg-media', function(e) {
    1066         console.log('Fv player uploader loaded.')
     1074      $doc.on( 'click', '#fv-player-shortcode-editor .components-button.add_media, .fv-player-gutenberg-media', fv_flowplayer_uploader_open );
     1075
     1076      function fv_flowplayer_uploader_open(e) {
     1077        debug_log( 'Opening Media Library...' );
    10671078
    10681079        e.preventDefault();
     
    11531164          // Did we open the media library from within the block?
    11541165          if ( fv_flowplayer_uploader_button.hasClass( 'fv-player-gutenberg-media' ) ) {
    1155             // Update the block attribute
     1166            // Look for block ID in the current document
    11561167            var clientId = jQuery('.is-selected[data-type="fv-player-gutenberg/basic"]').data('block');
     1168
     1169            // Look for block ID in the Site Editor iframe
     1170            var site_editor_iframe = jQuery('.edit-site-visual-editor__editor-canvas').contents();
     1171            if( site_editor_iframe.length ) {
     1172              clientId = site_editor_iframe.find('.is-selected[data-type="fv-player-gutenberg/basic"]').data('block');
     1173            }
    11571174
    11581175            if ( clientId ) {
     
    12001217        fv_flowplayer_uploader.open();
    12011218
    1202       });
     1219      }
    12031220
    12041221      template_playlist_item = jQuery('.fv-player-tab-playlist #fv-player-editor-playlist .fv-player-editor-playlist-item').parent().html();
  • fv-player/trunk/languages/fv-player.pot

    r3326358 r3336706  
    88"Content-Transfer-Encoding: 8bit\n"
    99"Language-Team: foliovision\n"
    10 "POT-Creation-Date: 2025-07-11 13:09+0000\n"
     10"POT-Creation-Date: 2025-07-30 14:23+0000\n"
    1111"Report-Msgid-Bugs-To: https://foliovision.com/support\n"
    1212"Plural-Forms: nplurals=2; plural=(n != 1);\n"
  • fv-player/trunk/models/checker.php

    r3280872 r3336706  
    105105  public function check_mimetype( $URLs = false, $meta = array(), $force_is_cron = false ) {
    106106
     107    // If we create new player in FV Player Coconut in coconut-ajax.php, there will be no wp_remote_get function or WP_Http class, so we cannot check the video.
     108    if ( ! function_exists( 'wp_remote_get' ) || ! class_exists( 'WP_Http' ) ) {
     109      return false;
     110    }
     111
    107112    $error = false;
    108113    $tStart = microtime(true);
  • fv-player/trunk/models/digitalocean-spaces.class.php

    r3314575 r3336706  
    194194    $url_components['path'] = str_replace('%2527', '%27', $url_components['path']);
    195195
    196     $sXAMZDate = gmdate('Ymd\THis\Z');
    197     $sDate = gmdate('Ymd');
     196    // Round the current time to the nearest $time interval to ensure consistent signatures
     197    // Use ceil() to ensure URLs are valid for the full $time duration
     198    $currentTime = time();
     199    $roundedTime = ceil($currentTime / $time) * $time;
     200
     201    $sXAMZDate = gmdate('Ymd\THis\Z', $roundedTime);
     202    $sDate = gmdate('Ymd', $roundedTime);
    198203    $sCredentialScope = $sDate."/".$endpoint."/s3/aws4_request"; //  todo: variable
    199204    $sSignedHeaders = "host";
  • fv-player/trunk/models/fv-player-frontend.php

    r3326358 r3336706  
    16271627
    16281628    // Does the legacy shortcode start with an audio track with no splash?
    1629     } else if(preg_match( '~\.(mp3|wav|ogg)([?#].*?)?$~', $this->aCurArgs['src'] ) && empty( $this->aCurArgs['splash'] ) ) {
     1629    } else if( ! empty( $this->aCurArgs['src'] ) && preg_match( '~\.(mp3|wav|ogg)([?#].*?)?$~', $this->aCurArgs['src'] ) && empty( $this->aCurArgs['splash'] ) ) {
    16301630      return true;
    16311631    }
  • fv-player/trunk/models/gutenberg.php

    r3326358 r3336706  
    207207}
    208208
    209 add_action(
    210   'enqueue_block_assets',
    211   function() {
    212     // Load all of CSS
    213     global $fv_fp;
    214     $fv_fp->css_enqueue( true );
    215 
    216     // Load scripts
    217     do_action( 'fv_player_force_load_assets' );
    218 
    219     flowplayer_prepare_scripts();
    220   }
    221 );
     209// Force load FV Player CSS and JS for Site Editor
     210add_action( 'enqueue_block_assets', 'fv_player_enqueue_block_assets_for_site_editor' );
     211
     212function fv_player_enqueue_block_assets_for_site_editor() {
     213
     214  // Do not force load if it's not the Site Editor
     215  if ( ! did_action( 'load-site-editor.php' ) ) {
     216    return;
     217  }
     218
     219  // Load all of CSS
     220  global $fv_fp;
     221  $fv_fp->css_enqueue( true );
     222
     223  // Load scripts
     224  do_action( 'fv_player_force_load_assets' );
     225
     226  flowplayer_prepare_scripts();
     227}
  • fv-player/trunk/models/list-table.php

    r3314575 r3336706  
    5353      <label class="screen-reader-text" for="fv_player_search">Search players:</label>
    5454      <input type="search" id="fv_player_search" name="s" value="<?php _admin_search_query(); ?>" />
    55       <?php submit_button( "Search players", 'button', false, false, array('ID' => 'search-submit') ); ?><br/>
     55      <?php submit_button( "Search players", 'button', false, false, array('ID' => 'search-submit') ); ?>
    5656    </p>
    5757    <?php
     
    164164        $value .= "<span class='trash'><a href='#' class='fv-player-remove' data-player_id='{$id}' data-nonce='".wp_create_nonce('fv-player-db-remove-'.$id)."'>Delete</a></span>";
    165165
    166         $value .= '<input type="text" class="fv-player-shortcode-input" readonly value="'.esc_attr('[fvplayer id="'. $id .'"]').'" style="display: none" /><a href="#" class="button fv-player-shortcode-copy">Copy Shortcode</a>';
     166        $value .= '<br /><input type="text" class="fv-player-shortcode-input" readonly value="'.esc_attr('[fvplayer id="'. $id .'"]').'" style="display: none" /><a href="#" class="button fv-player-shortcode-copy">Copy Shortcode</a>';
    167167
    168168        $value .= apply_filters( 'fv_player_list_table_extra_row_actions', '', $id, $player );
  • fv-player/trunk/models/media-browser.php

    r3314575 r3336706  
    101101    wp_enqueue_script( 'fv-player-s3-uploader-base', flowplayer::get_plugin_url().'/js/s3-upload-base.js', array( 'flowplayer-browser-base' ), $fv_wp_flowplayer_ver );
    102102    wp_localize_script( 'fv-player-s3-uploader', 'fv_player_s3_uploader', array(
    103         'create_multiupload_nonce' => wp_create_nonce( 'fv_flowplayer_create_multiupload' ),
    104         'multiupload_send_part_nonce' => wp_create_nonce( 'fv_flowplayer_multiupload_send_part' ),
    105         'multiupload_abort_nonce' => wp_create_nonce( 'fv_flowplayer_multiupload_abort' ),
    106         'multiupload_complete_nonce' => wp_create_nonce( 'fv_flowplayer_multiupload_complete' ),
     103        'validate_file_nonce' => wp_create_nonce( 'fv_flowplayer_validate_file' ),
    107104      )
    108105    );
  • fv-player/trunk/models/video-encoder/video-encoder.php

    r3326358 r3336706  
    411411    do_action( 'fv_player_encoder_job_submit', $id, $job, $result );
    412412
    413     if( defined('DOING_AJAX') && $this->use_wp_list_table ) {
    414       $this->include_listing_lib();
    415 
    416       ob_start();
    417       $jobs_table = new FV_Player_Encoder_List_Table( array( 'encoder_id' => $this->encoder_id, 'table_name' => $this->table_name ) );
    418       $jobs_table->prepare_items($show);
    419       $jobs_table->display();
    420       $html = ob_get_clean();
    421 
    422       wp_send_json( array( 'html' => $html, 'id' => $id, 'result' => $result ) );
     413    $response = array( 'id' => $id, 'result' => $result );
     414
     415    if ( ! empty( $_POST['create_player'] ) ) {
     416      global $FV_Player_Db;
     417      $player_id = $FV_Player_Db->import_player_data( false, false, array(
     418        'videos' => array(
     419          array(
     420            'src' => 'coconut_processing_' . $id,
     421            'meta' => array(
     422              array(
     423                'meta_key'   => 'encoding_job_id',
     424                'meta_value' => $id,
     425              ),
     426            )
     427          )
     428        )
     429      ) );
     430      $response['player_id'] = $player_id;
     431    }
     432
     433    if( defined('DOING_AJAX') ) {
     434      if  ( $this->use_wp_list_table && function_exists( 'convert_to_screen' ) ) {
     435        $this->include_listing_lib();
     436
     437        ob_start();
     438        $jobs_table = new FV_Player_Encoder_List_Table( array( 'encoder_id' => $this->encoder_id, 'table_name' => $this->table_name ) );
     439        $jobs_table->prepare_items($show);
     440        $jobs_table->display();
     441        $html = ob_get_clean();
     442
     443        $response['html'] = $html;
     444      }
     445
     446      wp_send_json( $response );
    423447
    424448    } else {
     
    523547    } else if ( $fv_fp->current_video() ) {
    524548      if ( !$job_id ) {
    525       $check = $this->job_check( (int) substr( $fv_fp->current_video()->getSrc(), strlen( $this->encoder_id . '_processing_' ) ) );
    526     } else {
     549        $check = $this->job_check( (int) substr( $fv_fp->current_video()->getSrc(), strlen( $this->encoder_id . '_processing_' ) ) );
     550      } else {
    527551        $check = $this->job_check( (int) $job_id );
    528552      }
     553
     554    } else if ( $job_id ) {
     555      $check = $this->job_check( absint( $job_id ) );
     556
    529557    } else {
    530558      user_error('Could not retrieve JOB check for encoder ' . $this->encoder_name . ', job ID: ' . $job_id . ', defaulted back to input value: ' . print_r( $check_result, true ), E_USER_WARNING );
     
    601629
    602630    // also replace its thumbnail / splash
    603     if ( ! empty( $job_output->thumbnail ) ) {
     631    if ( ! empty( $job_output->thumbnail_large ) ) {
     632      $video->set( 'splash', $job_output->thumbnail_large );
     633
     634    } else if ( ! empty( $job_output->thumbnail ) ) {
    604635      $video->set( 'splash', $job_output->thumbnail );
    605636    } else if ( ! empty( $job_output->splash ) ) {
  • fv-player/trunk/readme.txt

    r3326358 r3336706  
    257257
    258258== Changelog ==
     259
     260= 8.0.22 - 2025-07-30 =
     261
     262* DigitalOcean Spaces: Use expiration cycle for signature expiration time to get consistent signatures
     263* Security: Validate uploads for FV Player Coconut before uploading full file
     264* Tutor LMS: Avoid forced 16:9 apsect ratio
     265* Bugfix: Gutenberg: Fix for Site Editor
     266* Bugfix: Gutenberg: Fix "Select Media" button to show all video hostig tabs
     267* Bugfix: Lightbox not working when using blocks
    259268
    260269= 8.0.21 - 2025-07-11 =
Note: See TracChangeset for help on using the changeset viewer.