FV Flowplayer Video Player - Version 7.4.47.727

Version Description

  • 2021/05/18 =

  • Custom video fields - setting default hook priority to ensure boxes are placed higher up

  • Deprecated jQuery calls fix

  • HLS.js - upgrade to 1.0.4 to fix autoplay issues with some streams

  • Bugfix - Editor - Video Screenshot - fix for new crossOrigin requirement for MP4

  • Bugfix - Playlist - fixes when the playlist item fails to play and it auto-advances to next

  • Bugfix - Sticky player - subtitles sizing

Download this release

Release Info

Developer FolioVision
Plugin Icon 128x128 FV Flowplayer Video Player
Version 7.4.47.727
Comparing to
See all releases

Code changes from version 7.4.46.727 to 7.4.47.727

controller/backend.php CHANGED
@@ -793,7 +793,7 @@ function fv_player_rollback_message( $val ) {
793
  add_action( 'admin_notices', 'fv_player_pro_version_check' );
794
 
795
  function fv_player_pro_version_check() {
796
- $version = '7.4.44.727';
797
 
798
  global $FV_Player_Pro;
799
 
@@ -805,35 +805,3 @@ function fv_player_pro_version_check() {
805
  <?php
806
  endif;
807
  }
808
-
809
- /*
810
- * @param string $min The minimal version to check - like 7.4.44.727
811
- *
812
- * @return bool True if the version is at least $min
813
- */
814
- function fv_player_extension_version_is_min( $min, $extension = 'pro' ) {
815
- $version = false;
816
- if( $extension == 'pro' ) {
817
- global $FV_Player_Pro;
818
- if( isset($FV_Player_Pro) && !empty($FV_Player_Pro->version) ) {
819
- $version = $FV_Player_Pro->version;
820
- }
821
-
822
- } else if( $extension == 'vast' ) {
823
- global $FV_Player_VAST;
824
- if( isset($FV_Player_VAST) && !empty($FV_Player_VAST->version) ) {
825
- $version = $FV_Player_VAST->version;
826
- }
827
-
828
- } else if( $extension == 'alternative-sources' ) {
829
- global $FV_Player_Alternative_Sources;
830
- if( isset($FV_Player_Alternative_Sources) && !empty($FV_Player_Alternative_Sources->version) ) {
831
- $version = $FV_Player_Alternative_Sources->version;
832
- }
833
-
834
- }
835
-
836
- $version = str_replace('.beta','',$version);
837
-
838
- return version_compare($version,$min ) != -1;
839
- }
793
  add_action( 'admin_notices', 'fv_player_pro_version_check' );
794
 
795
  function fv_player_pro_version_check() {
796
+ $version = '7.4.47.727';
797
 
798
  global $FV_Player_Pro;
799
 
805
  <?php
806
  endif;
807
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
controller/editor.php CHANGED
File without changes
controller/frontend.php CHANGED
@@ -426,9 +426,9 @@ function flowplayer_prepare_scripts() {
426
  }
427
 
428
  if( ( $fv_fp->should_force_load_js() || $fv_fp->load_hlsjs ) && $fv_fp->_get_option('hlsjs') ) {
429
- wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/flowplayer/hls.min.js', array('flowplayer'), '0.14.17', true );
430
  }
431
- $aConf['script_hls_js'] = flowplayer::get_plugin_url().'/flowplayer/hls.min.js?ver=0.11.0';
432
 
433
  if( $fv_fp->should_force_load_js() || $fv_fp->load_dash ) {
434
  wp_enqueue_script( 'flowplayer-dash', flowplayer::get_plugin_url().'/flowplayer/flowplayer.dashjs.min.js', array('flowplayer'), $fv_wp_flowplayer_ver, true );
@@ -661,4 +661,37 @@ function fv_player_footer_svg_rewind() {
661
  </g>
662
  </svg>
663
  <?php
664
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  }
427
 
428
  if( ( $fv_fp->should_force_load_js() || $fv_fp->load_hlsjs ) && $fv_fp->_get_option('hlsjs') ) {
429
+ wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/flowplayer/hls.min.js', array('flowplayer'), '1.0.4', true );
430
  }
431
+ $aConf['script_hls_js'] = flowplayer::get_plugin_url().'/flowplayer/hls.min.js?ver=1.0.4';
432
 
433
  if( $fv_fp->should_force_load_js() || $fv_fp->load_dash ) {
434
  wp_enqueue_script( 'flowplayer-dash', flowplayer::get_plugin_url().'/flowplayer/flowplayer.dashjs.min.js', array('flowplayer'), $fv_wp_flowplayer_ver, true );
661
  </g>
662
  </svg>
663
  <?php
664
+ }
665
+
666
+
667
+ /*
668
+ * @param string $min The minimal version to check - like 7.4.44.727
669
+ *
670
+ * @return bool True if the version is at least $min
671
+ */
672
+ function fv_player_extension_version_is_min( $min, $extension = 'pro' ) {
673
+ $version = false;
674
+ if( $extension == 'pro' ) {
675
+ global $FV_Player_Pro;
676
+ if( isset($FV_Player_Pro) && !empty($FV_Player_Pro->version) ) {
677
+ $version = $FV_Player_Pro->version;
678
+ }
679
+
680
+ } else if( $extension == 'vast' ) {
681
+ global $FV_Player_VAST;
682
+ if( isset($FV_Player_VAST) && !empty($FV_Player_VAST->version) ) {
683
+ $version = $FV_Player_VAST->version;
684
+ }
685
+
686
+ } else if( $extension == 'alternative-sources' ) {
687
+ global $FV_Player_Alternative_Sources;
688
+ if( isset($FV_Player_Alternative_Sources) && !empty($FV_Player_Alternative_Sources->version) ) {
689
+ $version = $FV_Player_Alternative_Sources->version;
690
+ }
691
+
692
+ }
693
+
694
+ $version = str_replace('.beta','',$version);
695
+
696
+ return version_compare($version,$min ) != -1;
697
+ }
controller/shortcodes.php CHANGED
File without changes
css/admin.css CHANGED
File without changes
css/colorbox.css CHANGED
File without changes
css/flowplayer.css CHANGED
@@ -998,10 +998,10 @@
998
  .flowplayer { margin: 0 auto 2.8em auto; display: block; max-width: 100%; }
999
  .flowplayer.has-caption { margin: 0 auto; }
1000
  .flowplayer.fixed-controls.has-caption, flowplayer.fixed-controls.has-caption * { margin-bottom: 2.8em; }
1001
- .flowplayer.fixed-controls { margin-bottom: 5.2em }
1002
  .flowplayer.fixed-controls.skin-custom {border: none}
1003
- .flowplayer.has-abloop { margin-bottom: 2.8em; }
1004
- .flowplayer.fixed-controls.has-abloop { margin-bottom: 5.2em; }
1005
 
1006
  /* using fp-full and fp-slim at once should only make the timeline full width and nothings else should change */
1007
  .flowplayer.fp-slim.fp-full .fp-controls {
@@ -1727,7 +1727,6 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
1727
  .flowplayer.fixed-controls.is-audio .fp-time em { bottom:13px }
1728
  .flowplayer.is-audio .fp-waiting em { margin:.8em .3em 0 }
1729
  .flowplayer.is-audio .fp-time { font-size:14px;text-shadow:none }
1730
- .flowplayer.is-audio .fp-mute { width:2.8em;height:2.8em }
1731
  .flowplayer.is-audio .fp-volumebtn { display: block }
1732
  .flowplayer.is-audio .fp-play.fp-visible svg, .flowplayer.is-audio + .fp-playlist-external a .now-playing, .flowplayer.is-audio .fp-speed-flash { display:none; }
1733
  .is-audio + .fp-playlist-external { counter-reset: 'fv-playlist-counter';background-color:#f0f0f0;border-radius:0 0 10px 10px;border-top:1px solid #fff }
@@ -1772,7 +1771,7 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
1772
  .flowplayer.is-audio .fp-time em {width:44px}
1773
  .flowplayer.is-audio .fp-message p {font-size:75%}
1774
 
1775
- .flowplayer.is-audio .fp-duration, .flowplayer.is-audio .fp-elapsed, .flowplayer.is-audio a.fp-play, .flowplayer.is-audio a.fp-mute {color:#eee !important}
1776
  .flowplayer.is-audio .fp-volumelevel, .flowplayer.is-audio .fp-progress {background-color:#bb0000 !important;border-radius:0}
1777
  .flowplayer.is-audio .fp-volumeslider, .flowplayer.is-audio .fp-buffer {background-color:#eeeeee !important;border-radius:0}
1778
 
998
  .flowplayer { margin: 0 auto 2.8em auto; display: block; max-width: 100%; }
999
  .flowplayer.has-caption { margin: 0 auto; }
1000
  .flowplayer.fixed-controls.has-caption, flowplayer.fixed-controls.has-caption * { margin-bottom: 2.8em; }
1001
+ .flowplayer.fixed-controls, .entry-content .flowplayer.fixed-controls { margin-bottom: 5.2em }
1002
  .flowplayer.fixed-controls.skin-custom {border: none}
1003
+ .flowplayer.has-abloop, .entry-content .flowplayer.has-abloop { margin-bottom: 2.8em; }
1004
+ .flowplayer.fixed-controls.has-abloop, .entry-content .flowplayer.fixed-controls.has-abloop { margin-bottom: 5.2em; }
1005
 
1006
  /* using fp-full and fp-slim at once should only make the timeline full width and nothings else should change */
1007
  .flowplayer.fp-slim.fp-full .fp-controls {
1727
  .flowplayer.fixed-controls.is-audio .fp-time em { bottom:13px }
1728
  .flowplayer.is-audio .fp-waiting em { margin:.8em .3em 0 }
1729
  .flowplayer.is-audio .fp-time { font-size:14px;text-shadow:none }
 
1730
  .flowplayer.is-audio .fp-volumebtn { display: block }
1731
  .flowplayer.is-audio .fp-play.fp-visible svg, .flowplayer.is-audio + .fp-playlist-external a .now-playing, .flowplayer.is-audio .fp-speed-flash { display:none; }
1732
  .is-audio + .fp-playlist-external { counter-reset: 'fv-playlist-counter';background-color:#f0f0f0;border-radius:0 0 10px 10px;border-top:1px solid #fff }
1771
  .flowplayer.is-audio .fp-time em {width:44px}
1772
  .flowplayer.is-audio .fp-message p {font-size:75%}
1773
 
1774
+ .flowplayer.is-audio .fp-duration, .flowplayer.is-audio .fp-elapsed, .flowplayer.is-audio a.fp-play, .flowplayer.is-audio a.fp-volumebtn {color:#eee !important}
1775
  .flowplayer.is-audio .fp-volumelevel, .flowplayer.is-audio .fp-progress {background-color:#bb0000 !important;border-radius:0}
1776
  .flowplayer.is-audio .fp-volumeslider, .flowplayer.is-audio .fp-buffer {background-color:#eeeeee !important;border-radius:0}
1777
 
css/fonts/fpicons.eot CHANGED
File without changes
css/fonts/fpicons.svg CHANGED
File without changes
css/fonts/fpicons.ttf CHANGED
File without changes
css/fonts/fpicons.woff CHANGED
File without changes
css/img/exit_btn.png CHANGED
File without changes
css/img/techinfo.png CHANGED
File without changes
flowplayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
- Version: 7.4.46.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -27,7 +27,7 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
- $fv_wp_flowplayer_ver = '7.4.46.727';
31
  $fv_wp_flowplayer_core_ver = '7.2.7';
32
 
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
+ Version: 7.4.47.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
+ $fv_wp_flowplayer_ver = '7.4.47.727.2';
31
  $fv_wp_flowplayer_core_ver = '7.2.7';
32
 
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
flowplayer/embed.min.js CHANGED
File without changes
flowplayer/flowplayer.swf CHANGED
File without changes
flowplayer/flowplayerhls.swf CHANGED
File without changes
flowplayer/fv-flowplayer.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(e,t,n,r){for(var o,a=n.slice(),s=i(t,e),l=0,u=a.length;u>l&&(handler=a[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(s):handler.call(e,s),!s.stoppedImmediatePropagation);l++);return o=!s.stoppedPropagation,r&&o&&e.parentNode?e.parentNode.dispatchEvent(s):!s.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function r(e,t,r){var i=y(t||e,r);m(e,"textContent",n(function(){return i.get.call(this)},function(e){i.set.call(this,e)}))}function i(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function o(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function a(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function s(e){!f&&C.test(document.readyState)&&(f=!f,document.detachEvent(d,s),e=document.createEvent("Event"),e.initEvent(p,!0,!0),document.dispatchEvent(e))}function l(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var c=!0,f=!1,d="onreadystatechange",p="DOMContentLoaded",h="__IE8__"+Math.random(),g=e.Object,m=g.defineProperty||function(e,t,n){e[t]=n.value},v=g.defineProperties||function(t,n){for(var r in n)if(w.call(n,r))try{m(t,r,n[r])}catch(i){e.console&&console.log(r+" failed on object:",t,i.message)}},y=g.getOwnPropertyDescriptor,w=g.prototype.hasOwnProperty,b=e.Element.prototype,I=e.Text.prototype,M=/^[a-z]+$/,C=/loaded|complete/,A={},S=document.createElement("div");r(e.HTMLCommentElement.prototype,b,"nodeValue"),r(e.HTMLScriptElement.prototype,null,"text"),r(I,null,"nodeValue"),r(e.HTMLTitleElement.prototype,null,"text"),m(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(y(e.CSSStyleSheet.prototype,"cssText"))),v(b,{textContent:{get:a,set:l},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,r){var i,a=this,s="on"+e,l=a[h]||m(a,h,{value:{}})[h],c=l[s]||(l[s]={}),f=c.h||(c.h=[]);if(!w.call(c,"w")){if(c.w=function(e){return e[h]||t(a,u(a,e),f,!1)},!w.call(A,s))if(M.test(e))try{i=document.createEventObject(),i[h]=!0,9!=a.nodeType&&null==a.parentNode&&S.appendChild(a),a.fireEvent(s,i),A[s]=!0}catch(i){for(A[s]=!1;S.hasChildNodes();)S.removeChild(S.firstChild)}else A[s]=!1;(c.n=A[s])&&a.attachEvent(s,c.w)}o(f,n)<0&&f[r?"unshift":"push"](n)}},dispatchEvent:{value:function(e){var n,r=this,i="on"+e.type,o=r[h],a=o&&o[i],s=!!a;return e.target||(e.target=r),s?a.n?r.fireEvent(i,e):t(r,e,a.h,!0):(n=r.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h],s=a&&a[i],l=s&&s.h,u=l?o(l,t):-1;u>-1&&l.splice(u,1)}}}),v(I,{addEventListener:{value:b.addEventListener},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener}}),v(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h]||m(r,h,{value:{}})[h],s=a[i]||(a[i]={}),l=s.h||(s.h=[]);o(l,t)<0&&(r[i]||(r[i]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),r.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,r="on"+e.type,i=n[h],o=i&&i[r],a=!!o;return a&&(o.n?n.fireEvent(r,e):t(n,e,o.h,!0))}},removeEventListener:{value:b.removeEventListener}}),v(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),v(e.HTMLDocument.prototype,{textContent:{get:function(){return 11===this.nodeType?a.call(this):null},set:function(e){11===this.nodeType&&l.call(this,e)}},addEventListener:{value:function(t,n,r){var i=this;b.addEventListener.call(i,t,n,r),c&&t===p&&!C.test(i.readyState)&&(c=!1,i.attachEvent(d,s),e==top&&function o(e){try{i.documentElement.doScroll("left"),s()}catch(t){setTimeout(o,50)}}())}},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),v(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,r=/^(top|right|bottom|left)$/,i=/\-([a-z])/g,o=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,a,s,l=this._,u=l.style,c=l.currentStyle,f=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(i,o),t=c?c[e]:u[e],n.test(t)&&!r.test(e)&&(a=u.left,s=f&&f.left,s&&(f.left=c.left),u.left="fontSize"===e?"1em":t,t=u.pixelLeft+"px",u.left=a,s&&(f.left=s)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,r){return r?new t(n):new e(n)}}()},addEventListener:{value:function(n,r,i){var a,s=e,l="on"+n;s[l]||(s[l]=function(e){return t(s,u(s,e),a,!1)}),a=s[l][h]||(s[l][h]=[]),o(a,r)<0&&a[i?"unshift":"push"](r)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,r){var i="on"+t,a=(e[i]||g)[h],s=a?o(a,n):-1;s>-1&&a.splice(s,1)}}})}}(this),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.flowplayer=e()}}(function(){var e;return function(){function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}return e}()({1:[function(e,t,n){"use strict";var r=t.exports={},i=e("class-list"),o=window.jQuery,a=e("punycode"),s=e("computed-style");r.noop=function(){},r.identity=function(e){return e},r.removeNode=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},r.find=function(e,t){return o?o(e,t).toArray():(t=t||document,Array.prototype.map.call(t.querySelectorAll(e),function(e){return e}))},r.text=function(e,t){e["innerText"in e?"innerText":"textContent"]=t},r.findDirect=function(e,t){return r.find(e,t).filter(function(e){return e.parentNode===t})},r.hasClass=function(e,t){return"string"!=typeof e.className?!1:i(e).contains(t)},r.isSameDomain=function(e){var t=window.location,n=r.createElement("a",{href:e});return t.hostname===n.hostname&&t.protocol===n.protocol&&t.port===n.port},r.css=function(e,t,n){return"object"==typeof t?Object.keys(t).forEach(function(n){r.css(e,n,t[n])}):"undefined"!=typeof n?""===n?e?e.style.removeProperty(t):void 0:e?e.style.setProperty(t,n):void 0:e?s(e,t):void 0},r.createElement=function(e,t,n){try{var i=document.createElement(e);for(var a in t)t.hasOwnProperty(a)&&("css"===a?r.css(i,t[a]):r.attr(i,a,t[a]));return n&&(i.innerHTML=n),i}catch(s){if(!o)throw s;return o("<"+e+">"+n+"</"+e+">").attr(t)[0]}},r.toggleClass=function(e,t,n){if(e){var r=i(e);"undefined"==typeof n?r.toggle(t):n?r.add(t):n||r.remove(t)}},r.addClass=function(e,t){return r.toggleClass(e,t,!0)},r.removeClass=function(e,t){return r.toggleClass(e,t,!1)},r.append=function(e,t){return e.appendChild(t),e},r.appendTo=function(e,t){return r.append(t,e),e},r.prepend=function(e,t){e.insertBefore(t,e.firstChild)},r.insertAfter=function(e,t,n){t==r.lastChild(e)&&e.appendChild(n);var i=Array.prototype.indexOf.call(e.children,t);e.insertBefore(n,e.children[i+1])},r.html=function(e,t){e=e.length?e:[e],e.forEach(function(e){e.innerHTML=t})},r.attr=function(e,t,n){if("class"===t&&(t="className"),r.hasOwnOrPrototypeProperty(e,t))try{e[t]=n}catch(i){if(!o)throw i;o(e).attr(t,n)}else n===!1?e.removeAttribute(t):e.setAttribute(t,n);return e},r.prop=function(e,t,n){return"undefined"==typeof n?e&&e[t]:void(e[t]=n)},r.offset=function(e){var t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight&&(t={left:100*t.left,right:100*t.right,top:100*t.top,bottom:100*t.bottom,width:100*t.width,height:100*t.height}),t},r.width=function(e,t){if(t)return e.style.width=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).width;return"undefined"==typeof n?e.offsetWidth:n},r.height=function(e,t){if(t)return e.style.height=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).height;return"undefined"==typeof n?e.offsetHeight:n},r.lastChild=function(e){return e.children[e.children.length-1]},r.hasParent=function(e,t){for(var n=e.parentElement;n;){if("string"!=typeof t){if(n===t)return!0}else if(r.matches(n,t))return!0;n=n.parentElement}return!1},r.createAbsoluteUrl=function(e){return r.createElement("a",{href:e}).href},r.xhrGet=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===this.readyState?this.status>=400?n():void t(this.responseText):void 0},r.open("get",e,!0),r.send()},r.pick=function(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},r.hostname=function(e){return a.toUnicode(e||window.location.hostname)},r.browser={webkit:"WebkitAppearance"in document.documentElement.style},r.getPrototype=function(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__},r.hasOwnOrPrototypeProperty=function(e,t){for(var n=e;n;){if(Object.prototype.hasOwnProperty.call(n,t))return!0;n=r.getPrototype(n)}return!1},r.matches=function(e,t){var n=Element.prototype,r=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),r=0;n[r]&&n[r]!==t;)r++;return n[r]?!0:!1};return r.call(e,t)},function(e){function t(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})}"undefined"!=typeof e.setAttribute&&(e.setProperty=function(e,n){return this.setAttribute(t(e),String(n))},e.getPropertyValue=function(e){return this.getAttribute(t(e))||null},e.removeProperty=function(e){var n=this.getPropertyValue(e);return this.removeAttribute(t(e)),n})}(window.CSSStyleDeclaration.prototype)},{"class-list":36,"computed-style":37,punycode:44}],2:[function(e,t,n){"use strict";var r=e("../common");t.exports=function(e,t,n,i){n=n||"opaque";var o="obj"+(""+Math.random()).slice(2,15),a='<object class="fp-engine" id="'+o+'" name="'+o+'" ',s=navigator.userAgent.indexOf("MSIE")>-1;a+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+e+'" type="application/x-shockwave-flash">';var l={width:"100%",height:"100%",allowscriptaccess:"always",wmode:n,quality:"high",flashvars:"",movie:e+(s?"?"+o:""),name:o};"transparent"!==n&&(l.bgcolor=i||"#333333"),Object.keys(t).forEach(function(e){l.flashvars+=e+"="+t[e]+"&"}),Object.keys(l).forEach(function(e){a+='<param name="'+e+'" value="'+l[e]+'"/>'}),a+="</object>";var u=r.createElement("div",{},a);return r.find("object",u)},window.attachEvent&&window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})},{"../common":1}],3:[function(e,t,n){"use strict";function r(e){return/^https?:/.test(e)}var i,o=e("../flowplayer"),a=e("../common"),s=e("./embed"),l=e("extend-object"),u=e("bean");i=function(e,t){function n(e){function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))?"#"+t(e[1])+t(e[2])+t(e[3]):void 0}function c(e){if(7===e.length)return e;var t=e.split("").slice(1);return"#"+t.map(function(e){return e+e}).join("")}function f(e){return/application\/x-mpegurl/i.test(e.type)}var d,p,h,g,m=e.conf,v=[],y={engineName:i.engineName,pick:function(t){var n=l({},function(){if(o.support.flashVideo){for(var n,r,i=0;i<t.length;i++)if(r=t[i],/mp4|flv|flash/i.test(r.type)&&(n=r),e.conf.swfHls&&/mpegurl/i.test(r.type)&&(n=r),n&&!/mp4/i.test(n.type))return n;return n}}());if(n)return!n.src||r(n.src)||e.conf.rtmp||n.rtmp||(n.src=a.createAbsoluteUrl(n.src)),n},suspendEngine:function(){g=!0},resumeEngine:function(){g=!1},load:function(i){function w(e){return e.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}d=i,v.forEach(function(e){clearTimeout(e)});var b=a.findDirect("video",t)[0]||a.find(".fp-player > video",t)[0],I=i.src,M=r(I),C=function(){a.removeNode(b)},A=function(e){return e.some(function(e){return!!b.canPlayType(e.type)})};o.support.video&&a.prop(b,"autoplay")&&A(i.sources)?u.one(b,"timeupdate",C):C();var S=i.rtmp||m.rtmp;if(M||S||(I=a.createAbsoluteUrl(I)),h&&f(i)&&h.data!==a.createAbsoluteUrl(m.swfHls)&&y.unload(),h){["live","preload","loop"].forEach(function(e){i.hasOwnProperty(e)&&h.__set(e,i[e])}),Object.keys(i.flashls||{}).forEach(function(e){h.__set("hls_"+e,i.flashls[e])});var E=!1;if(!M&&S)h.__set("rtmp",S.url||S);else{var j=h.__get("rtmp");E=!!j,h.__set("rtmp",null)}h.__play(I,E||i.rtmp&&i.rtmp!==m.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15),I=w(I);var D={hostname:m.embedded?a.hostname(m.hostname):a.hostname(location.hostname),url:I,callback:p};t.getAttribute("data-origin")&&(D.origin=t.getAttribute("data-origin")),["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(e){m.hasOwnProperty(e)&&(D[e]=m[e]),i.hasOwnProperty(e)&&(D[e]=i[e]),(m.rtmp||{}).hasOwnProperty(e)&&(D[e]=(m.rtmp||{})[e]),(i.rtmp||{}).hasOwnProperty(e)&&(D[e]=(i.rtmp||{})[e])}),m.splash&&(D.autoplay=!0),m.rtmp&&(D.rtmp=m.rtmp.url||m.rtmp),i.rtmp&&(D.rtmp=i.rtmp.url||i.rtmp),Object.keys(i.flashls||{}).forEach(function(e){var t=i.flashls[e];D["hls_"+e]=t});var N="undefined"!=typeof i.hlsQualities?i.hlsQualities:m.hlsQualities;"undefined"!=typeof N&&(D.hlsQualities=N?encodeURIComponent(JSON.stringify(N)):N),void 0!==m.bufferTime&&(D.bufferTime=m.bufferTime),void 0!==m.bufferTimeMax&&(D.bufferTimeMax=m.bufferTimeMax),M&&delete D.rtmp,D.rtmp&&(D.rtmp=w(D.rtmp));var x,L=m.bgcolor||a.css(t,"background-color")||"";0===L.indexOf("rgb")?x=n(L):0===L.indexOf("#")&&(x=c(L)),D.initialVolume=e.volumeLevel;var T=f(i)?m.swfHls:m.swf;h=s(T,D,m.wmode,x)[0];var Z=a.find(".fp-player",t)[0];a.prepend(Z,h),e.off("quality.flashengine").on("quality.flashengine",function(t,n,r){var i="undefined"!=typeof e.video.hlsQualities?e.video.hlsQualities:e.conf.hlsQualities;if(i)try{h.__quality(r)}catch(o){e.debug("Error changing quality in flash engine",o)}}),setTimeout(function(){try{if(!h.PercentLoaded())return e.trigger("error",[e,{code:7,url:m.swf}])}catch(t){}},5e3),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e])},15e3)),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e,!1])},500)),e.off("resume.flashhack").on("resume.flashhack",function(){var t=setTimeout(function(){var t=h.__status().time,n=setTimeout(function(){e.playing&&!e.loading&&h.__status().time===t&&e.trigger("flashdisabled",[e])},400);v.push(n),e.one("seek.flashhack pause.flashhack load.flashack",function(){clearTimeout(n)})},800);v.push(t),e.one("progress",function(){clearTimeout(t)})}),h.pollInterval=setInterval(function(){if(h&&!g){var t=h.__status?h.__status():null;t&&((e.conf.live||e.live||i.live)&&(i.seekOffset=t.seekOffset,i.duration=t.duration+t.seekOffset),e.playing&&t.time&&t.time!==e.video.time&&e.trigger("progress",[e,t.time]),i.buffer=t.buffer/i.bytes*i.duration,e.trigger("buffer",[e,i.buffer]),!i.buffered&&t.time>0&&(i.buffered=!0,e.trigger("buffered",[e])))}},250),window[p]=function(n,r){var i=d;m.debug&&(0===n.indexOf("debug")&&r&&r.length?console.log.apply(console,["-- "+n].concat(r)):console.log("--",n,r));var o={type:n};switch(n){case"ready":r=l(i,r);break;case"click":o.flash=!0;break;case"keydown":o.which=r;break;case"seek":i.time=r;break;case"status":e.trigger("progress",[e,r.time]),r.buffer<i.bytes&&!i.buffered?(i.buffer=r.buffer/i.bytes*i.duration,e.trigger("buffer",i.buffer)):i.buffered||(i.buffered=!0,e.trigger("buffered"));break;case"metadata":var a=atob(r);r={key:a.substr(10,4),data:a.substr(21)}}"click"===n||"keydown"===n?(o.target=t,u.fire(t,n,[o])):"buffered"!=n&&"unload"!==n?setTimeout(function(){e.trigger(o,[e,r])},1):"unload"===n&&e.trigger(o,[e,r])}}},speed:a.noop,unload:function(){h&&h.__unload&&h.__unload();try{p&&window[p]&&delete window[p]}catch(n){}a.find("object",t).forEach(a.removeNode),h=0,e.off(".flashengine"),e.off(".flashhack"),clearInterval(h.pollInterval),v.forEach(function(e){clearTimeout(e)})}};return["pause","resume","seek","volume"].forEach(function(t){y[t]=function(n){try{e.ready&&(void 0===n?h["__"+t]():h["__"+t](n))}catch(r){if("undefined"==typeof h["__"+t])return e.trigger("flashdisabled",[e]);throw r}}}),y},i.engineName="flash",i.canPlay=function(e,t){return o.support.flashVideo&&/video\/(mp4|flash|flv)/i.test(e)||o.support.flashVideo&&t.swfHls&&/mpegurl/i.test(e)},o.engines.push(i)},{"../common":1,"../flowplayer":31,"./embed":2,bean:34,"extend-object":39}],4:[function(e,t,n){"use strict";function r(e){return"undefined"==typeof window.Hls?!1:/mpegurl/.test(e)&&window.Hls.isSupported()}var i,o=e("../flowplayer"),a=o.support,s=o.common,l=o.bean,u=e("./html5-factory");i=function(e,t){function n(n,r,u){var d=o.extend({recoverMediaError:!0},e.conf.hlsjs,n.hlsjs);e.engine.hls&&e.engine.hls.destroy();var p=e.engine.hls=new f(d);i.extensions.forEach(function(n){n({hls:p,player:e,root:t,videoTag:r})}),p.loadSource(n.src),u.resume=function(){e.live&&!e.dvr&&(r.currentTime=p.liveSyncPosition||0),r.play()},u.seek=function(t){try{e.live||e.dvr?r.currentTime=Math.min(t,p.liveSyncPosition||r.duration-d.livePositionOffset):r.currentTime=t}catch(n){e.debug("Failed to seek to ",t,n)}},d.bufferWhilePaused===!1&&e.on("pause",function(){p.stopLoad(),e.one("resume",function(){p.startLoad()})}),e.on("quality",function(e,t,n){p.nextLevel=a=n});var h,g,m=function(n){if(e.debug("hlsjs - recovery"),s.removeClass(t,"is-paused"),s.addClass(t,"is-seeking"),l.one(r,"seeked",function(){r.paused&&(s.removeClass(t,"is-poster"),e.poster=!1,r.play()),s.removeClass(t,"is-seeking")}),n)return p.startLoad();var i=performance.now();!h||i-h>3e3?(h=performance.now(),p.recoverMediaError()):(!g||i-g>3e3)&&(g=performance.now(),p.swapAudioCodec(),p.recoverMediaError())};return p.on(f.Events.MANIFEST_PARSED,function(t,i){var o,l=n.hlsQualities||e.conf.hlsQualities,u={},f=i.levels;if(l===!1)return p.attachMedia(r);if("drive"===l)switch(f.length){case 4:o=[1,2,3];break;case 5:o=[1,2,3,4];break;case 6:o=[1,3,4,5];break;case 7:o=[1,3,5,6];break;case 8:o=[1,3,6,7];break;default:o=f.length<3||f[0].height&&f[2].height&&f[0].height===f[2].height?[]:[1,2]}if(n.qualities=[{value:-1,label:"Auto"}],Array.isArray(l)){var d=l.find(function(e){return-1===e||e.level&&-1===e.level});d?n.qualities[0].label="number"!=typeof d?d.label:n.qualities[0].label:n.qualities=[],o=l.map(function(e){return"undefined"!=typeof e.level&&(u[e.level]=e.label),"undefined"!=typeof e.level?e.level:e})}var h=-2;n.qualities=n.qualities.concat(f.map(function(e,t){if(o&&-1===o.indexOf(t))return!1;var n=u[t]||Math.min(e.width,e.height)+"p";return u[t]||"drive"===l||(n+=" ("+Math.round(e.bitrate/1e3)+"k)"),t===a&&(h=t),{value:t,label:n}})).filter(s.identity);var g=n.quality=-2===h?n.qualities[0].value||-1:h;g!==p.currentLevel&&(p.currentLevel=g),p.attachMedia(r),c&&n.src!==c&&r.play(),c=n.src}),p.on(f.Events.ERROR,function(t,n){if(n.fatal)if(d.recoverNetworkError&&n.type===f.ErrorTypes.NETWORK_ERROR)m(!0);else if(d.recoverMediaError&&n.type===f.ErrorTypes.MEDIA_ERROR)m(!1);else{var r=5;n.type===f.ErrorTypes.NETWORK_ERROR&&(r=2),n.type===f.ErrorTypes.MEDIA_ERROR&&(r=3),p.destroy(),e.trigger("error",[e,{code:r}])}}),e.one("unload",function(){p.destroy()}),{handlers:{error:function(e,t){var n=t.error&&t.error.code;return d.recoverMediaError&&3===n||!n?(e.preventDefault(),m(!1),!0):d.recoverNetworkError&&2===n?(e.preventDefault(),m(!0),!0):void 0}}}}var a,c,f=window.Hls;return u("hlsjs-lite",e,t,r,n)},i.canPlay=function(e,t){return t.hlsjs===!1||t.clip&&t.clip.hlsjs===!1?!1:a.browser.safari&&!(t.clip&&t.clip.hlsjs||t.hlsjs||{}).safari?!1:o.support.video&&r(e)},i.engineName="hlsjs-lite",i.plugin=function(e){i.extensions.push(e)},i.extensions=[],o.engines.push(i)},{"../flowplayer":31,"./html5-factory":5}],5:[function(e,t,n){function r(e,t,n,r,a){function f(e,o,a,f){var p=n.getAttribute("data-flowplayer-instance-id");if(e.listeners&&e.listeners.hasOwnProperty(p))return void(e.listeners[p]=a);(e.listeners||(e.listeners={}))[p]=a,u.on(o,"error",function(n){try{r(n.target.getAttribute("type"))&&t.trigger("error",[t,{code:4,video:c(a,{src:e.src,url:e.src})}])}catch(i){}}),t.on("shutdown",function(){u.off(o),u.off(e,".dvrhack"),t.off(".loophack")});var h={},g=function(e){"metadata"===e.kind&&(e.mode="hidden",e.addEventListener("cuechange",function(){e.activeCues.length&&t.trigger("metadata",[t,e.activeCues[0].value])},!1))};return e&&e.textTracks&&e.textTracks.length&&Array.prototype.forEach.call(e.textTracks,g),e&&e.textTracks&&"function"==typeof e.textTracks.addEventListener&&e.textTracks.addEventListener("addtrack",function(e){g(e.track)},!1),(t.conf.dvr||t.dvr||a.dvr)&&u.on(e,"progress.dvrhack",function(){e.seekable.length&&(t.video.duration=e.seekable.end(null),t.video.seekOffset=e.seekable.start(null),t.trigger("dvrwindow",[t,{start:e.seekable.start(null),end:e.seekable.end(null)}]),e.currentTime>=e.seekable.start(null)||(e.currentTime=e.seekable.start(null)))}),Object.keys(d).forEach(function(r){var o=d[r];if("webkitendfullscreen"===r&&t.conf.disableInline&&(o="unload"),o){var u=function(u){if(a=e.listeners[p],u.target&&s.hasClass(u.target,"fp-engine")){/progress/.test(o)||t.debug(r,"->",o,u);var d=function(e){t.trigger(e||o,[t,h])};if(!t.ready&&!/ready|error/.test(o)||!o||!s.find("video",n).length)return void("resume"===o&&t.one("ready",function(){setTimeout(function(){d()})}));var h;if("unload"===o)return void t.unload();switch(o){case"ready":if(t.ready)return t.debug("Player already ready, not sending duplicate ready event");if(!(e.duration&&e.duration!==1/0||t.live))return t.debug("No duration and VOD setup, not sending ready event");if(h=c(a,{duration:e.duration<Number.MAX_VALUE?e.duration:0,width:e.videoWidth,height:e.videoHeight,url:e.currentSrc}),h.seekable=h.duration,t.debug("Ready: ",h),!t.live&&!h.duration&&!l.hlsDuration&&"loadeddata"===r){var g=function(){h.duration=e.duration;try{h.seekable=e.seekable&&e.seekable.end(null)}catch(t){}d(),e.removeEventListener("durationchange",g),s.toggleClass(n,"is-live",!1)};e.addEventListener("durationchange",g);var m=function(){t.ready||e.duration||(h.duration=0,s.addClass(n,"is-live"),d()),e.removeEventListener("timeupdate",m)};return void e.addEventListener("timeupdate",m)}break;case"progress":case"seek":if(e.currentTime>0||t.live)h=Math.max(e.currentTime,0);else if("seek"===o&&0===e.currentTime)h=0;else if("progress"==o)return;break;case"buffer":h=[];for(var v=0;v<e.buffered.length;v++)h.push({start:e.buffered.start(v),end:e.buffered.end(v)});e.buffered.length&&e.buffered.end(null)===e.duration&&d("buffered");break;case"speed":h=i(e.playbackRate);break;case"volume":h=i(e.muted?0:e.volume);break;case"error":try{if(f&&f.handlers&&f.handlers.error){var y=f.handlers.error(u,e);if(y)return}h=(u.srcElement||u.originalTarget).error,h.video=c(a,{src:e.src,url:e.src})}catch(w){return}}d()}};n.addEventListener(r,u,!0),h[r]||(h[r]=[]),h[r].push(u)}}),h}var p,h,g,m=s.findDirect("video",n)[0]||s.find(".fp-player > video",n)[0],v=t.conf;return g={engineName:e,pick:function(e){var t=l.video&&e.filter(function(e){return r(e.type)})[0];if(t)return"string"==typeof t.src&&(t.src=s.createAbsoluteUrl(t.src)),t},load:function(e){var r=s.find(".fp-player",n)[0],i=!1;if(m||(m=document.createElement("video"),s.prepend(r,m),m.autoplay=!!v.splash,i=!0),s.addClass(m,"fp-engine"),s.find("track",m).forEach(s.removeNode),m.preload="none",v.nativesubtitles||s.attr(m,"crossorigin",!1),v.disableInline||(m.setAttribute("webkit-playsinline","true"),m.setAttribute("playsinline","true")),l.inlineVideo||s.css(m,{position:"absolute",top:"-9999em"}),l.subtitles&&v.nativesubtitles&&e.subtitles&&e.subtitles.length){s.addClass(m,"native-subtitles");var c=e.subtitles,d=function(e){var t=m.textTracks;t.length&&(t[0].mode=e)};c.some(function(e){return!s.isSameDomain(e.src)})&&s.attr(m,"crossorigin","anonymous"),"function"==typeof m.textTracks.addEventListener&&m.textTracks.addEventListener("addtrack",function(){d("disabled"),d("showing")}),c.forEach(function(e){m.appendChild(s.createElement("track",{kind:"subtitles",srclang:e.srclang||"en",label:e.label||"en",src:e.src,default:e["default"]}))})}u.off(m,"timeupdate",s.noop),u.on(m,"timeupdate",s.noop),s.prop(m,"loop",!1),t.off(".loophack"),(e.loop||v.loop)&&t.on("finish.loophack",function(){t.resume()}),"undefined"!=typeof h&&(m.volume=h);var p=a(e,m,g);if(v.autoplay||v.splash||e.autoplay){t.debug("Autoplay / Splash setup, try to start video"),m.load();var y=function(){try{var e=m.play();if(e&&e["catch"]){var n=function(e){if("AbortError"===e.name&&20===e.code)return i?void 0:m.play()["catch"](n);if(!v.mutedAutoplay)throw new Error("Unable to autoplay");return t.debug("Play errored, trying muted",e),t.mute(!0,!0),m.play()};e["catch"](n)["catch"](function(){v.autoplay=!1,t.mute(!1,!0),t.trigger("stop",[t])})}}catch(r){t.debug("play() error thrown",r)}};m.readyState>0?y():u.one(m,"canplay",y)}if(g._listeners=f(m,s.find("source",m).concat(m),e,p)||g._listeners,!(v.autoplay||v.splash||e.autoplay)){var w=function(){o(n)&&(t.debug("player is in viewport, preload"),l.preloadMetadata?m.preload="metadata":m.load(),u.off(document,"scroll.preloadviewport"))};u.off(document,"scroll.preloadviewport"),u.on(document,"scroll.preloadviewport",function(){window.requestAnimationFrame(w)}),w()}},mute:function(e){m.muted=!!e,t.trigger("mute",[t,e]),t.trigger("volume",[t,e?0:m.volume])},pause:function(){m.pause()},resume:function(){m.play()},speed:function(e){m.playbackRate=e},seek:function(e){var n=m.paused||t.finished;try{m.currentTime=e,n&&u.one(m,"seeked",function(){m.pause()})}catch(r){}},volume:function(e){h=e,m&&(m.volume=e,e&&g.mute(!1))},unload:function(){u.off(document,"scroll.preloadviewport"),s.find("video.fp-engine",n).forEach(function(e){"MediaSource"in window?e.src=URL.createObjectURL(new MediaSource):e.src="",s.removeNode(e)}),p=clearInterval(p);var e=n.getAttribute("data-flowplayer-instance-id");delete m.listeners[e],m=0,g._listeners&&Object.keys(g._listeners).forEach(function(e){g._listeners[e].forEach(function(t){n.removeEventListener(e,t,!0)})})}}}function i(e,t){return t=t||100,Math.round(e*t)/t}function o(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t.height&&t.right<=(window.innerWidth||document.documentElement.clientWidth)+t.width}var a=e("../flowplayer"),s=a.common,l=a.support,u=a.bean,c=a.extend,f=l.browser.safari&&!l.iOS,d={ended:"finish",pause:"pause",play:"resume",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadedmetadata:f?0:"ready",canplaythrough:f?"ready":0,durationchange:"ready",error:"error",dataunavailable:"error",webkitendfullscreen:!a.support.inlineVideo&&"unload",progress:"buffer"};t.exports=r},{"../flowplayer":31}],6:[function(e,t,n){"use strict";function r(e){return/mpegurl/i.test(e)?"application/x-mpegurl":e}function i(e){return/^(video|application)/i.test(e)||(e=r(e)),!!u.canPlayType(e).replace("no","")}var o,a=e("../flowplayer"),s=a.common,l=e("./html5-factory"),u=document.createElement("video");o=function(e,t){return l("html5",e,t,i,function(e,t){t.currentSrc!==e.src?(s.find("source",t).forEach(s.removeNode),t.src=e.src,t.type=e.type):e.autoplay&&t.load()})},o.canPlay=function(e){return a.support.video&&i(e)},o.engineName="html5",a.engines.push(o)},{"../flowplayer":31,"./html5-factory":5}],7:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.on("ready",function(){var e=i.find("video.fp-engine",t)[0];e&&(e.setAttribute("x-webkit-airplay","allow"),window.WebKitPlaybackTargetAvailabilityEvent&&(e.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){if("available"===e.availability){var n=i.find(".fp-header",t)[0];i.find(".fp-airplay",n).forEach(i.removeNode);var r=i.createElement("a",{class:"fp-airplay fp-icon",title:"Play on AirPlay device"});n.appendChild(r)}}),e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var n=i.find(".fp-airplay",t)[0];n&&i.toggleClass(n,"fp-active",e.webkitCurrentPlaybackTargetIsWireless)})))}),o.on(t,"click",".fp-airplay",function(e){e.preventDefault();var n=i.find("video.fp-engine",t)[0];n.webkitShowPlaybackTargetPicker()})})},{"../common":1,"../flowplayer":31,bean:34}],8:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("./resolve").TYPE_RE,o=e("scriptjs"),a=e("bean");r(function(e,t){var n,r=e.conf.analytics,s=0,l=0;if(r){"undefined"==typeof _gat&&o("//google-analytics.com/ga.js");var u=function(){var e=_gat._getTracker(r);return e._setAllowLinker(!0),e},c=function(r,o,a){if(a=a||e.video,s&&"undefined"!=typeof _gat){var l=u();l._trackEvent("Video / Seconds played",e.engine.engineName+"/"+a.type,a.title||t.getAttribute("title")||a.src.split("/").slice(-1)[0].replace(i,""),Math.round(s/1e3)),s=0,n&&(clearTimeout(n),n=null)}};e.bind("load unload",c).bind("progress",function(){e.seeking||(s+=l?+new Date-l:0,l=+new Date),n||(n=setTimeout(function(){n=null;var e=u();e._trackEvent("Flowplayer heartbeat","Heartbeat","",0,!0)},6e5))}).bind("pause",function(){l=0}),e.bind("shutdown",function(){a.off(window,"unload",c)}),a.on(window,"unload",c)}})},{"../flowplayer":31,"./resolve":21,bean:34,scriptjs:45}],9:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("scriptjs");r(function(e,t){function n(){var e,t,n;e=g.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,r,s),chrome.cast.initialize(n,l,u)}function r(){console.log("sessionListener")}function s(e){e===chrome.cast.ReceiverAvailability.AVAILABLE&&c()}function l(){}function u(){console.log("onError")}function c(){var e=i.find(".fp-header",t)[0];if(e){i.find(".fp-chromecast",e).forEach(i.removeNode),i.find(".fp-chromecast-engine",t).forEach(i.removeNode),h=i.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"}),e.insertBefore(h,i.find(".fp-fullscreen",e)[0]);var n=i.createElement("div",{class:"fp-chromecast-engine"}),r=i.createElement("p",{class:"fp-chromecast-engine-status"}),o=i.createElement("p",{class:"fp-chromecast-engine-icon"});n.appendChild(o),n.appendChild(r);var a=i.find(".fp-engine",t)[0];a?a.parentNode.insertBefore(n,a):i.prepend(i.find(".fp-player",t)[0]||t,n)}}function f(){clearInterval(p),p=null,e.release(),i.toggleClass(t,"is-chromecast",!1),i.toggleClass(h,"fp-active",!1)}if(e.conf.chromecast!==!1){a("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"),window.__onGCastApiAvailable=function(e){e&&n()};var d,p,h,g=e.conf.chromecast||{};o.on(t,"click",".fp-chromecast",function(n){return n.preventDefault(),d?(e.trigger("pause",[e]),d.stop(),d=null,void f()):(e.playing&&e.pause(),void chrome.cast.requestSession(function(n){function r(n){n.addUpdateListener(function(r){if(d){p=p||setInterval(function(){e.trigger("progress",[e,n.getEstimatedTime()])},500),r?(i.toggleClass(t,"is-chromecast",!0),i.toggleClass(h,"fp-active",!0),e.hijack({pause:function(){n.pause()},resume:function(){n.play()},seek:function(e){var t=new chrome.cast.media.SeekRequest;t.currentTime=e,n.seek(t)}})):(f(),e.trigger("finish",[e]));var o=n.playerState;e.paused&&o===chrome.cast.media.PlayerState.PLAYING&&e.trigger("resume",[e]),e.playing&&o===chrome.cast.media.PlayerState.PAUSED&&e.trigger("pause",[e]),i.toggleClass(t,"is-loading",o===chrome.cast.media.PlayerState.BUFFERING)}})}d=n;var o=d.receiver.friendlyName;i.html(i.find(".fp-chromecast-engine-status")[0],"Playing on device "+o);var a=new chrome.cast.media.MediaInfo(e.video.src),s=new chrome.cast.media.LoadRequest(a);d.loadMedia(s,r,function(){})},function(e){console.error("requestSession error",e)}))})}})},{"../common":1,"../flowplayer":31,bean:34,scriptjs:45}],10:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){t.className=t.className.replace(a," "),e>=0&&i.addClass(t,"cue"+e)}function r(t){var n=t&&!isNaN(t.time)?t.time:t;return 0>n&&(n=e.video.duration+n),.125*Math.round(n/.125)}var a=/ ?cue\d+ ?/,s=!1,l={},u=-.125,c=function(t){n(t.index),e.trigger("cuepoint",[e,t])};e.on("progress",function(e,t,n){if(!s)for(var i=r(n);i>u;)u+=.125,l[u]&&l[u].forEach(c)}).on("unload",n).on("beforeseek",function(e){setTimeout(function(){e.defaultPrevented||(s=!0)})}).on("seek",function(e,t,i){n(),u=r(i||0)-.125,s=!1,!i&&l[0]&&l[0].forEach(c)}).on("ready",function(t,n,r){u=-.125;var i=r.cuepoints||e.conf.cuepoints||[];e.setCuepoints(i)}).on("finish",function(){for(var t=r(e.video.duration);t>u;)u+=.125,l[u]&&l[u].forEach(c);u=-.125}),e.conf.generate_cuepoints&&e.bind("load",function(){i.find(".fp-cuepoint",t).forEach(i.removeNode)}),e.setCuepoints=function(t){return e.cuepoints=[],l={},t.forEach(e.addCuepoint),e},e.addCuepoint=function(n){e.cuepoints||(e.cuepoints=[]),"number"==typeof n&&(n={time:n}),n.index=0;var a=r(n);if(l[a]||(l[a]=[]),l[a].push(n),e.cuepoints.length&&(n.index=Math.max.apply(null,e.cuepoints.map(function(e){return e.index}))+1),e.cuepoints.push(n),e.conf.generate_cuepoints&&n.visible!==!1){var s=e.video.duration,u=i.find(".fp-timeline",t)[0];i.css(u,"overflow","visible");var c=n.time||n;0>c&&(c=s+c);var f=i.createElement("a",{className:"fp-cuepoint fp-cuepoint"+n.index});i.css(f,"left",c/s*100+"%"),u.appendChild(f),o.on(f,"mousedown",function(t){t.preventDefault(),t.stopPropagation(),e.seek(c)})}return e},e.removeCuepoint=function(n){"number"==typeof n&&(n=e.cuepoints.filter(function(e){return e.index===n})[0]);var o=e.cuepoints.indexOf(n),a=r(n);if(-1!==o){e.cuepoints=e.cuepoints.slice(0,o).concat(e.cuepoints.slice(o+1));var s=i.find(".fp-timeline",t)[0];i.find(".fp-cuepoint"+n.index,s).forEach(i.removeNode);var u=l[a].indexOf(n);if(-1!==u)return l[a]=l[a].slice(0,u).concat(l[a].slice(u+1)),e}}})},{"../common":1,"../flowplayer":31,bean:34}],11:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("bean"),o=e("../common"),a=e("./util/clipboard");r(function(e,t){if(e.conf.embed!==!1&&e.conf.share!==!1){var n=o.find(".fp-share-menu",t)[0],r=o.createElement("a",{class:"fp-icon fp-embed",title:"Copy to your site"},"Embed");o.append(n,r),e.embedCode=function(){var n=e.conf.embed||{},r=e.video,i=n.width||r.width||o.width(t),a=n.height||r.height||o.height(t),s=e.conf.ratio,l='<iframe src="'+e.shareUrl(!0)+'" allowfullscreen style="border:none;';return n.width||n.height?(isNaN(i)||(i+="px"),isNaN(a)||(a+="px"),l+"width:"+i+";height:"+a+';"></iframe>'):((!s||e.conf.adaptiveRatio)&&(s=a/i),'<div style="position:relative;width:100%;display:inline-block;">'+l+'position:absolute;top:0;left:0;width:100%;height:100%;"></iframe><div style="padding-top:'+100*s+'%;"></div></div>')},i.on(t,"click",".fp-embed",function(){a(e.embedCode(),function(){e.message("The embed code is now on your clipboard",2e3)},function(){e.textarea(e.embedCode(),"Copy the code below to embed your video")})})}})},{"../common":1,"../flowplayer":31,"./util/clipboard":30,bean:34}],12:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=document.createElement("div"));var n={},r={},i=function(e,i,o){var a=e.split(".")[0],s=function(l){o&&(t.removeEventListener(a,s),n[e].splice(n[e].indexOf(s),1));var u=[l].concat(r[l.timeStamp+l.type]||[]);i&&i.apply(void 0,u)};t.addEventListener(a,s),n[e]||(n[e]=[]),n[e].push(s)};e.on=e.bind=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n)}),e},e.one=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n,!0)}),e};var o=function(e,t){return 0===t.filter(function(t){return-1===e.indexOf(t)}).length};e.off=e.unbind=function(r){var i=r.split(" ");return i.forEach(function(e){var r=e.split(".").slice(1),i=e.split(".")[0];Object.keys(n).filter(function(e){var t=e.split(".").slice(1);return(!i||0===e.indexOf(i))&&o(t,r)}).forEach(function(e){var r=n[e],i=e.split(".")[0];n[e]=r.filter(function(e){return t.removeEventListener(i,e),!1})})}),e},e.trigger=function(n,i,o){if(n){i=(i||[]).length?i||[]:[i];var a,s=document.createEvent("Event");return a=n.type||n,s.initEvent(a,!1,!0),Object.defineProperty&&(s.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}),r[s.timeStamp+s.type]=i,t.dispatchEvent(s),o?s:e}}},t.exports.EVENTS=["beforeseek","disable","error","finish","fullscreen","fullscreen-exit","load","mute","pause","progress","ready","resume","seek","speed","stop","unload","volume","boot","shutdown"]},{}],13:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.facebook){e.facebook=function(){var e,t,r=550,i=420,o=screen.height,a=screen.width,s="scrollbars=yes,resizable=yes,toolbar=no,location=yes",l="string"==typeof n.facebook?n.facebook:window.location.toString();e=Math.round(a/2-r/2),t=0,o>i&&(t=Math.round(o/2-i/2)),window.open("https://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(l),"sharer",s+",width="+r+",height="+i+",left="+e+",top="+t)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-facebook"},"Facebook");i.append(r,a),o.on(t,"click",".fp-facebook",function(){e.facebook()})}})},{"../common":1,"../flowplayer":31,bean:34}],14:[function(e,t,n){"use strict";var r,i=e("../flowplayer"),o=e("bean"),a=e("../common"),s="fullscreen",l="fullscreen-exit",u=i.support.fullscreen;o.on(document,"fullscreenchange.ffscr webkitfullscreenchange.ffscr mozfullscreenchange.ffscr MSFullscreenChange.ffscr",function(e){var t=document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement;if(r||t.parentNode&&t.parentNode.getAttribute("data-flowplayer-instance-id")){var n=r||i(t.parentNode);t?r=n.trigger(s,[n]):(r.trigger(l,[r]),r=null)}}),i(function(e,t){var n=a.createElement("div",{className:"fp-player"});if(Array.prototype.map.call(t.children,a.identity).forEach(function(e){a.matches(e,".fp-ratio,script")||n.appendChild(e)}),t.appendChild(n),e.conf.fullscreen){var i,o,c=window;e.isFullscreen=!1,e.fullscreen=function(t){return e.disabled?void 0:(void 0===t&&(t=!e.isFullscreen),t&&(i=c.scrollY,o=c.scrollX),u?t?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof n[e]&&(n[e](Element.ALLOW_KEYBOARD_INPUT),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||n[e]())}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):e.trigger(t?s:l,[e]),e)};var f;e.on("mousedown.fs",function(){+new Date-f<150&&e.ready&&e.fullscreen(),f=+new Date}),e.on(s,function(){a.addClass(t,"is-fullscreen"),a.toggleClass(t,"fp-minimal-fullscreen",a.hasClass(t,"fp-minimal")),a.removeClass(t,"fp-minimal"),u||a.css(t,"position","fixed"),e.isFullscreen=!0}).on(l,function(){var n;a.toggleClass(t,"fp-minimal",a.hasClass(t,"fp-minimal-fullscreen")),a.removeClass(t,"fp-minimal-fullscreen"),u||"html5"!==e.engine||(n=t.css("opacity")||"",a.css(t,"opacity",0)),u||a.css(t,"position",""),a.removeClass(t,"is-fullscreen"),u||"html5"!==e.engine||setTimeout(function(){t.css("opacity",n)}),e.isFullscreen=!1,c.scrollTo(o,i)}).on("unload",function(){e.isFullscreen&&e.fullscreen()}),e.on("shutdown",function(){r=null,a.removeNode(n)})}})},{"../common":1,"../flowplayer":31,bean:34}],15:[function(e,t,n){"use strict";var r,i,o=e("../flowplayer"),a=e("bean"),s=e("../common");a.on(document,"keydown.fp",function(e){var t=r,n=e.ctrlKey||e.metaKey||e.altKey,i=e.which,o=t&&t.conf;if(t&&o.keyboard&&!t.disabled&&!n&&t.ready){if(e.shiftKey)return 39==i?t.speed(!0):37==i&&t.speed(!1),e.preventDefault();if(58>i&&i>47)return e.preventDefault(),t.seekTo(i-48);var a=function(){switch(i){case 38:case 75:return t.volume(t.volumeLevel+.15),!0;case 40:case 74:return t.volume(t.volumeLevel-.15),!0;case 39:case 76:return t.seeking=!0,t.seek(!0),!0;case 37:case 72:return t.seeking=!0,t.seek(!1),!0;case 190:return t.seekTo(),!0;case 32:return t.toggle(),!0;case 70:return o.fullscreen&&t.fullscreen(),!0;case 77:return t.mute(),!0;case 81:return t.unload(),!0}}();a&&e.preventDefault()}}),o(function(e,t){e.conf.keyboard&&(a.on(document,"click",function(n){if(s.hasParent(n.target,t))r=e.disabled?0:e;else{if(r!==e)return;r=0}r&&(i=t)}),e.bind("shutdown",function(){i==t&&(i=null)}))})},{"../common":1,"../flowplayer":31,bean:34}],16:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.showMenu=function(n,r){var a=i.find(".fp-ui",t)[0];i.toggleClass(n,"fp-active",!0),setTimeout(function(){o.one(document,"click",function(){e.hideMenu(n)})});var s=r;if(r&&r.tagName&&(s={left:i.offset(r).left,rightFallbackOffset:i.width(r),top:i.offset(r).top+i.height(r)}),!s)return i.css(n,"top","auto");s.rightFallbackOffset=s.rightFallbackOffset||0;var l=s.top-i.offset(a).top,u=s.left-i.offset(a).left;i.width(n)+u>i.width(a)&&(u=u-i.width(n)+s.rightFallbackOffset),i.height(n)+l>i.height(a)&&(l-=i.height(n)),i.css(n,{top:l+"px",left:u+"px",right:"auto"})},e.hideMenu=function(e){i.toggleClass(e,"fp-active",!1),i.css(e,{top:"-9999em"})}})},{"../common":1,"../flowplayer":31,bean:34}],17:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){var t=i.createElement("div",{className:"fp-message"},e);return s.insertBefore(t,a),setTimeout(function(){i.toggleClass(t,"fp-shown")}),t}function r(e){i.removeNode(e)}var a=i.find(".fp-header",t)[0],s=i.find(".fp-ui",t)[0];e.message=function(e,t){var o=n(e),a=function(){i.toggleClass(o,"fp-shown"),setTimeout(function(){r(o)},500)};return t&&setTimeout(a,t),a},e.textarea=function(e){var t=document.createElement("textarea");t.value=e,t.className="fp-textarea",s.appendChild(t),o.on(document,"click.fptextarea",function(e){return e.target===t?t.select():(e.stopPropagation(),e.preventDefault(),i.removeNode(t),void o.off(document,"click.fptextarea"))})}})},{"../common":1,"../flowplayer":31,bean:34}],18:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=/IEMobile/.test(window.navigator.userAgent),o=e("../common"),a=e("bean"),s=e("./ui").format,l=r.support,u=window.navigator.userAgent;(l.touch||i)&&r(function(e,t){var n=l.android,r=n&&!n.firefox,c=/Silk/.test(u),f=n.version||0;if(r&&!i){if(!/Chrome/.test(u)&&4>f||n.samsung&&5>f){var d=e.load;e.load=function(){var n=d.apply(e,arguments);return o.find("video.fp-engine",t)[0].load(),e.trigger("ready",[e,e.video]),n}}var p,h=0,g=function(e){p=setInterval(function(){e.video.time=++h,e.trigger("progress",[e,h])},1e3)};e.on("ready pause unload",function(){p&&(clearInterval(p),p=null)}),e.on("ready",function(){h=0}),e.on("resume",function(t,n){return n.live?h?g(n):void e.one("progress",function(e,t,n){0===n&&g(t)}):void 0})}l.volume||(o.removeClass(t,"fp-mute"),o.addClass(t,"no-volume")),l.iOS&&o.addClass(t,"fp-mute"),o.addClass(t,"is-touch"),e.sliders&&e.sliders.timeline&&e.sliders.timeline.disableAnimation();var m=!1;a.on(t,"touchmove",function(){m=!0});var v=!0;if(a.on(t,"touchend click",function(n){if(m)return void(m=!1);var r=o.find("video.fp-engine",t)[0];return v&&e.conf.clickToUnMute&&r&&r.muted&&e.conf.autoplay&&(r.muted=!1),v=!1,e.playing&&!o.hasClass(t,"is-mouseover")?(o.addClass(t,"is-mouseover"),o.removeClass(t,"is-mouseout"),n.preventDefault(),void n.stopPropagation()):void(e.playing||e.splash||!o.hasClass(t,"is-mouseout")||o.hasClass(t,"is-mouseover")||setTimeout(function(){e.disabled||e.playing||e.splash||o.find("video.fp-engine",t)[0].play()},400))}),!l.fullscreen&&e.conf.native_fullscreen&&"function"==typeof o.createElement("video").webkitEnterFullScreen){var y=e.fullscreen;e.fullscreen=function(){var n=o.find("video.fp-engine",t)[0];return n?(e.trigger("fullscreen",[e]),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement===n&&(a.off(document,".nativefullscreen"),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement||(a.off(document,".nativefullscreen"),e.trigger("fullscreen-exit",[e]))}))}),n.webkitEnterFullScreen(),void a.one(n,"webkitendfullscreen",function(){a.off(document,"fullscreenchange.nativefullscreen"),e.trigger("fullscreen-exit",[e]),o.prop(n,"controls",!0),o.prop(n,"controls",!1)})):y.apply(e)}}(r||c)&&e.bind("ready",function(){var n=o.find("video.fp-engine",t)[0];e.conf.splash&&n&&n.paused&&"hlsjs-lite"!==e.engine.engineName&&(a.one(n,"canplay",function(){n.play()}),n.load()),e.bind("progress.dur",function(){if(!e.live&&!e.conf.live&&n){var r=n.duration;1!==r&&(e.video.duration=r,o.find(".fp-duration",t)[0].innerHTML=s(r),e.unbind("progress.dur"))}})})})},{"../common":1,"../flowplayer":31,"./ui":27,bean:34}],19:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object"),o=e("bean"),a=e("../common"),s=e("./resolve"),l=new s,u=window.jQuery,c=/^#/;r(function(e,t){function n(){return a.find(h.query,r())}function r(){return c.test(h.query)?void 0:t}function f(){return a.find(h.query+"."+g,r())}function d(){var n=a.find(".fp-playlist",t)[0];if(!n){n=a.createElement("div",{className:"fp-playlist"});var r=a.find(".fp-next,.fp-prev",t);r.length?r[0].parentElement.insertBefore(n,r[0]):a.insertAfter(t,a.find("video",t)[0],n)}n.innerHTML="",e.conf.playlist[0].length&&(e.conf.playlist=e.conf.playlist.map(function(e){if("string"==typeof e){var t=e.split(s.TYPE_RE)[1];return{sources:[{type:"m3u8"===t.toLowerCase()?"application/x-mpegurl":"video/"+t,src:e}]}}return{sources:e.map(function(e){var t={};return Object.keys(e).forEach(function(n){t.type=/mpegurl/i.test(n)?"application/x-mpegurl":"video/"+n,t.src=e[n]}),t})}})),e.conf.playlist.forEach(function(t,r){var i=t.sources[0].src;n.appendChild(a.createElement("a",{href:i,className:e.video.index===r?g:void 0,"data-index":r}))})}function p(t){return"undefined"!=typeof t.index?t.index:"undefined"!=typeof e.video.index?e.video.index:e.conf.startIndex||0}var h=i({active:"is-active",advance:!0,query:".fp-playlist a"},e.conf),g=h.active,m=a.find(".fp-ui",t)[0],v=a.hasClass(t,"fp-custom-playlist")||!!h.customPlaylist;a.toggleClass(t,"fp-custom-playlist",v),a.toggleClass(t,"fp-default-playlist",!v),e.play=function(t){if(void 0===t)return e.resume();if("number"==typeof t&&!e.conf.playlist[t])return e;if("number"!=typeof t)return e.load.apply(null,arguments);var n=i({index:t},e.conf.playlist[t]);return e.off("beforeresume.fromfirst"),"number"==typeof t&&t===e.video.index?e.seek(0,function(){e.resume()}):(e.load(n,function(){e.video.index=t}),e)},e.next=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=n===e.conf.playlist.length-1?0:n+1,e.play(n)),e},e.prev=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=0===n?e.conf.playlist.length-1:n-1,e.play(n)),e},e.setPlaylist=function(t,n){return e.conf.playlist=t,n||delete e.video.index,d(),e},e.addPlaylistItem=function(t){return delete e.video.is_last,e.setPlaylist(e.conf.playlist.concat([t]),!0)},e.removePlaylistItem=function(t){var n=e.conf.playlist;return e.setPlaylist(n.slice(0,t).concat(n.slice(t+1)))},o.on(t,"click",".fp-next",e.next),o.on(t,"click",".fp-prev",e.prev),e.off("finish.pl").on("finish.pl",function(e,n){var r="undefined"==typeof n.conf.advance?!0:n.conf.advance;if(r){if(n.video.loop)return n.seek(0,function(){n.resume()});var i=n.video.index>=0?n.video.index+1:void 0;i<n.conf.playlist.length||h.loop?(i=i===n.conf.playlist.length?0:i,a.removeClass(t,"is-finished"),setTimeout(function(){n.play(i)})):n.conf.playlist.length>1&&(n.one("beforeresume.fromfirst",function(e){e.preventDefault(),n.play(0)}),n.one("seek",function(){n.off("beforeresume.fromfirst")}))}});var y=!1;e.conf.playlist.length&&(y=!0,d(),e.conf.clip&&e.conf.clip.sources.length||(e.conf.clip=e.conf.playlist[e.conf.startIndex||0])),n().length&&!y&&(e.conf.playlist=[],delete e.conf.startIndex,n().forEach(function(t){var n=t.href;t.setAttribute("data-index",e.conf.playlist.length);var r=l.resolve(n,e.conf.clip.sources);u&&i(r,u(t).data()),e.conf.playlist.push(r)})),a.find(".fp-prev,.fp-next,.fp-playlist",t).forEach(function(e){m.appendChild(e)}),o.on(c.test(h.query)?document:t,"click",h.query,function(t){t.preventDefault();var n=t.currentTarget,r=Number(n.getAttribute("data-index"));-1!=r&&e.play(r)}),e.on("load",function(n,i,o){if(e.conf.playlist.length){var s=f()[0],l=s&&s.getAttribute("data-index"),u=o.index=p(o),c=a.find(h.query+'[data-index="'+u+'"]',r())[0],d=u==e.conf.playlist.length-1;s&&a.removeClass(s,g),c&&a.addClass(c,g),a.removeClass(t,"video"+l),a.addClass(t,"video"+u),a.toggleClass(t,"last-video",d),o.index=i.video.index=u,o.is_last=i.video.is_last=d}}).on("unload.pl",function(){e.conf.playlist.length&&(f().forEach(function(e){a.toggleClass(e,g)}),e.conf.playlist.forEach(function(e,n){a.removeClass(t,"video"+n)}),delete e.video.index)}),e.conf.playlist.length&&(e.conf.loop=!1)})},{"../common":1,"../flowplayer":31,"./resolve":21,bean:34,"extend-object":39}],20:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(){i.find(".fp-qsel-menu",t).forEach(i.removeNode),i.find(".fp-qsel",t).forEach(i.removeNode)}function r(e){l.appendChild(i.createElement("strong",{className:"fp-qsel"},"HD"));var t=i.createElement("div",{className:"fp-menu fp-qsel-menu"},"<strong>Quality</strong>");e.forEach(function(e){var n=document.createElement("a"),r="undefined"!=typeof e.value?e.value:e;n.setAttribute("data-quality",r),n.innerHTML=e.label||e,t.appendChild(n)}),s.appendChild(t)}function a(e){i.find(".fp-qsel-menu a",t).forEach(function(t){i.toggleClass(t,"fp-selected",t.getAttribute("data-quality")==e),i.toggleClass(t,"fp-color",t.getAttribute("data-quality")==e)})}var s=i.find(".fp-ui",t)[0],l=i.find(".fp-controls",s)[0];o.on(t,"click",".fp-qsel",function(){var n=i.find(".fp-qsel-menu",t)[0];i.hasClass(n,"fp-active")?e.hideMenu():e.showMenu(n)}),o.on(t,"click",".fp-qsel-menu a",function(t){var n=t.target.getAttribute("data-quality");e.quality(n)}),e.quality=function(t){t=isNaN(Number(t))?t:Number(t),e.trigger("quality",[e,t])},e.on("quality",function(e,t,n){a(n,t.video.qualities)}),e.on("ready",function(e,t,i){n(),!i.qualities||i.qualities.filter(function(e){return"undefined"!=typeof e.value?e.value>-1:!0}).length<2||(r(i.qualities,i.quality),a(i.quality,i.qualities))})})},{"../common":1,"../flowplayer":31,bean:34}],21:[function(e,t,n){"use strict";function r(e){var t=e.attr("src"),n=e.attr("type")||"",r=t.split(o)[1];return n=n.toLowerCase(),a(e.data(),{src:t,suffix:r||n,type:n||r})}function i(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}var o=/\.(\w{3,4})(\?.*)?$/i,a=e("extend-object");t.exports=function(){var e=this;e.sourcesFromVideoTag=function(e,t){var n=[];return t("source",e).each(function(){n.push(r(t(this)))}),!n.length&&e.length&&n.push(r(e)),n},e.resolve=function(e,t){return e?("string"==typeof e&&(e={src:e,sources:[]},e.sources=(t||[]).map(function(t){var n=t.src.split(o)[1];return{type:t.type,src:e.src.replace(o,"."+n+"$2")}})),e instanceof Array&&(e={sources:e.map(function(e){return e.type&&e.src?e:Object.keys(e).reduce(function(t,n){return a(t,{type:i(n),src:e[n]})},{})})}),e):{sources:t}}},t.exports.TYPE_RE=o},{"extend-object":39}],22:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("extend-object"),a=e("bean");r(function(e,t){var n=e.conf;if(n.share===!1)return void i.find(".fp-share",t).forEach(i.removeNode);e.shareUrl=function(t){if(t&&n.embed&&n.embed.iframe)return n.embed.iframe;if("string"==typeof e.conf.share)return e.conf.share;var r=encodeURIComponent(e.video.title||(i.find("title")[0]||{}).innerHTML||"Flowplayer Unlimited video"),a=encodeURIComponent(btoa(JSON.stringify(o({},e.conf,e.extensions)).replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).substr(-4)}))),s=encodeURIComponent(window.location.toString()),l=t?"https://flowplayer.com/e/":"https://flowplayer.com/s/";return l+"?t="+r+"&c="+a+"&r="+s};var r=i.createElement("div",{className:"fp-menu fp-share-menu"},"<strong>Share</strong>"),s=i.find(".fp-ui",t)[0];s.appendChild(r);var l=i.find(".fp-share",t)[0];a.on(t,"click",".fp-share",function(t){t.preventDefault(),i.hasClass(r,"fp-active")?e.hideMenu():e.showMenu(r,l)})})},{"../common":1,"../flowplayer":31,bean:34,"extend-object":39}],23:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("./subtitles/parser");r.defaults.subtitleParser=a,r(function(e,t){var n,a,s,l,u;(!r.support.inlineVideo||!r.support.fullscreen&&e.conf.native_fullscreen)&&(e.conf.nativesubtitles=!0),e.ui||(e.ui={}),e.ui.createSubtitleControl=function(e,n){return u=n,s=s||i.createElement("strong",{className:"fp-cc"},"CC"),l=l||i.createElement("div",{className:"fp-menu fp-subtitle-menu"},"<strong>Closed Captions</strong>"),i.find("a",l).forEach(i.removeNode),l.appendChild(i.createElement("a",{"data-subtitle-index":-1},"No subtitles")),(e||[]).forEach(function(e,t){var n=e.srclang||"en",r=e.label||"Default ("+n+")",o=i.createElement("a",{"data-subtitle-index":t},r);l.appendChild(o)}),i.find(".fp-ui",t)[0].appendChild(l),i.find(".fp-controls",t)[0].appendChild(s),i.toggleClass(s,"fp-hidden",!e||!e.length),s},e.ui.setActiveSubtitleItem=function(e){f(e)},o.on(t,"click",".fp-cc",function(){i.hasClass(l,"fp-active")?e.hideMenu():e.showMenu(l)}),o.on(t,"click",".fp-subtitle-menu [data-subtitle-index]",function(t){t.preventDefault();var n=t.target.getAttribute("data-subtitle-index");return u?u(n):"-1"===n?e.disableSubtitles():void e.loadSubtitles(n)});var c=function(){a=i.find(".fp-captions",t)[0],a=a||i.appendTo(i.createElement("div",{class:"fp-captions"}),i.find(".fp-player",t)[0]),Array.prototype.forEach.call(a.children,i.removeNode),e.ui.createSubtitleControl(e.video.subtitles)};e.on("ready",function(n,r,o){if(r.subtitles=[],c(),i.removeClass(t,"has-menu"),e.disableSubtitles(),o.subtitles&&o.subtitles.length){var a=o.subtitles.filter(function(e){return e["default"]})[0];a&&r.loadSubtitles(o.subtitles.indexOf(a))}}),e.showSubtitle=function(e){i.html(a,e),i.addClass(a,"fp-shown")},e.hideSubtitle=function(){i.removeClass(a,"fp-shown")},e.bind("cuepoint",function(t,r,i){i.subtitle?(n=i.index,e.showSubtitle(i.subtitle.text)):i.subtitleEnd&&(e.hideSubtitle(),n=i.index)}),e.bind("seek",function(t,r,o){n&&e.cuepoints[n]&&e.cuepoints[n].time>o&&(i.removeClass(a,"fp-shown"),n=null),(e.cuepoints||[]).forEach(function(t,r){var i=t.subtitle;i&&n!=r?o>=t.time&&(!i.endTime||o<=i.endTime)&&e.trigger("cuepoint",[e,t]):t.subtitleEnd&&o>=t.time&&r==n+1&&e.trigger("cuepoint",[e,t])})}),e.on("unload",function(){i.find(".fp-captions",t).forEach(i.removeNode)});var f=function(e){i.toggleClass(i.find("a.fp-selected",l)[0],"fp-selected"),i.toggleClass(i.find('a[data-subtitle-index="'+e+'"]',l)[0],"fp-selected")},d=function(e,n){var r=i.find("video.fp-engine",t)[0].textTracks;r.length&&(null===e?[].forEach.call(r,function(e){e.mode=n}):r[e].mode=n)};e.disableSubtitles=function(){return e.subtitles=[],(e.cuepoints||[]).forEach(function(t){(t.subtitle||t.subtitleEnd)&&e.removeCuepoint(t)}),a&&Array.prototype.forEach.call(a.children,i.removeNode),f(-1),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName&&d(null,"disabled"),e},e.loadSubtitles=function(t){e.disableSubtitles();var n=e.video.subtitles[t],o=n.src;return o?(f(t),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName?void d(t,"showing"):(i.xhrGet(o,function(t){var n=e.conf.subtitleParser(t);n.forEach(function(t,n){t.title||(t.title="subtitle"+n);var i={time:t.startTime,subtitle:t,visible:!1};e.subtitles.push(t),e.addCuepoint(i),e.addCuepoint({time:t.endTime,subtitleEnd:t.title,visible:!1}),0!==t.startTime||e.video.time||e.splash||e.trigger("cuepoint",[e,r.extend({},i,{index:0})]),e.splash&&e.one("ready",function(){e.trigger("cuepoint",[e,i])})})},function(){return e.trigger("error-subtitles",{code:8,url:o}),!1}),e)):void 0}})},{"../common":1,"../flowplayer":31,"./subtitles/parser":24,bean:34}],24:[function(e,t,n){t.exports=function(e){function t(e){var t=e.split(":");return 2==t.length&&t.unshift(0),60*t[0]*60+60*t[1]+parseFloat(t[2].replace(",","."))}for(var n,r,i,o=/^(([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/,a=[],s=0,l=e.split("\n"),u=l.length,c={};u>s;s++)if(r=o.exec(l[s])){for(n=l[s-1],i="<p>"+l[++s]+"</p><br/>";"string"==typeof l[++s]&&l[s].trim()&&s<l.length;)i+="<p>"+l[s]+"</p><br/>";c={title:n,startTime:t(r[1]),endTime:t(r[3]),text:i},a.push(c)}return a}},{}],25:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object");!function(){var e=function(e){var t=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return t&&t.length>1?parseFloat(t[t.length-1].replace("_","."),10):0},t=function(){var e=document.createElement("video");return e.loop=!0,e.autoplay=!0,e.preload=!0,e},n={},o=document.documentElement.style,a=navigator.userAgent.toLowerCase(),s=/(chrome)[ \/]([\w.]+)/.exec(a)||/(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];s[1]&&(n[s[1]]=!0,n.version=s[2]||"0"),n.safari&&(n.version=(/version\/([\w.]+)/.exec(a)||[])[1]);var l=t(),u=navigator.userAgent,c=n.msie||/Trident\/7/.test(u),f=/iPad|MeeGo/.test(u)&&!/CriOS/.test(u),d=/iPad/.test(u)&&/CriOS/.test(u),p=/iP(hone|od)/i.test(u)&&!/iPad/.test(u)&&!/IEMobile/i.test(u),h=/Android/.test(u),g=h&&/Firefox/.test(u),m=h&&/SAMSUNG/.test(u),v=/Silk/.test(u),y=/IEMobile/.test(u),w=y?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(u)[1],10):0,b=y?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(u)[1],10):0,I=f||p?e(u):0,M=h?parseFloat(/Android\ (\d+(\.\d+)?)/.exec(u)[1],10):0,C=(p||f||d)&&{iPhone:p,iPad:f||d,version:I,chrome:d},A=i(r.support,{browser:n,iOS:C,android:h?{firefox:g,opera:/Opera/.test(u),samsung:m,version:M}:!1,subtitles:!!l.addTextTrack,fullscreen:"boolean"==typeof document.webkitFullscreenEnabled?document.webkitFullscreenEnabled:"function"==typeof document.webkitCancelFullScreen&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(u)||document.mozFullScreenEnabled||"function"==typeof document.exitFullscreen||"function"==typeof document.msExitFullscreen,inlineBlock:!(c&&n.version<8),touch:"ontouchstart"in window,dataload:!f&&!p&&!y,flex:"flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,zeropreload:!c&&!h,volume:!(f||p||v||d),cachedVideoTag:!(f||p||d||y),firstframe:!(v||y||g||m||I&&10>I||h&&4.4>M),inlineVideo:(!p||I>=10)&&(!y||w>=8.1&&b>=11)&&(!h||M>=3),hlsDuration:!h&&(!n.safari||f||p||d),seekable:!f&&!d,preloadMetadata:!C&&!n.safari});A.autoplay=A.firstframe,y&&(A.browser.safari=!1);try{var S=navigator.plugins["Shockwave Flash"],E=c?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):S.description;c||S[0].enabledPlugin?(E=E.split(/\D+/),E.length&&!E[0]&&(E=E.slice(1)),A.flashVideo=E[0]>9||9==E[0]&&E[3]>=115):A.flashVideo=!1}catch(j){}try{A.video=!!l.canPlayType,A.video&&l.canPlayType("video/mp4")}catch(D){A.video=!1}A.animation=function(){for(var e=["","Webkit","Moz","O","ms","Khtml"],t=document.createElement("p"),n=0;n<e.length;n++)if("undefined"!=typeof t.style[e[n]+"AnimationName"])return!0}()}()},{"../flowplayer":31,"extend-object":39}],26:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.twitter!==!1){e.tweet=function(){var t,r,i=550,o=420,a=screen.height,s=screen.width,l="scrollbars=yes,resizable=yes,toolbar=no,location=yes",u="string"==typeof n.twitter?n.twitter:e.shareUrl();t=Math.round(s/2-i/2),r=0,a>o&&(r=Math.round(a/2-o/2)),window.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(u),"intent",l+",width="+i+",height="+o+",left="+t+",top="+r)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-twitter"},"Twitter");i.append(r,a),o.on(t,"click",".fp-twitter",function(){e.tweet()})}})},{"../common":1,"../flowplayer":31,bean:34}],27:[function(e,t,n){(function(n){"use strict";function r(e){return e=parseInt(e,10),e>=10?e:"0"+e}function i(e,t){e=Math.max(e||0,0),e=t?Math.ceil(e):Math.floor(e);var n=Math.floor(e/3600),i=Math.floor(e/60);return e-=60*i,n>=1?(i-=60*n,n+":"+r(i)+":"+r(e)):r(i)+":"+r(e)}var o=e("../flowplayer"),a=e("../common"),s=e("bean"),l=e("./ui/slider"),u=e("./ui/bar-slider"),c=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLW91dGxpbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDk5Ljg0NCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz4KPHRpdGxlPnBsYXktcm91bmRlZC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNNDEuMDM1OSw3MS4xOWE1LjA0OTIsNS4wNDkyLDAsMCwxLTIuNTU3NS0uNjY3M2MtMS44MDMxLTEuMDQxLTIuNzk1OC0zLjEyNDgtMi43OTU4LTUuODY2NFYzNS4xODg3YzAtMi43NDI5Ljk5MzMtNC44MjcyLDIuNzk3LTUuODY3NiwxLjgwMjUtMS4wNDIyLDQuMTAzNC0uODYsNi40OC41MTQzTDcwLjQ3ODIsNDQuNTY3MmMyLjM3NTEsMS4zNzExLDMuNjgyNiwzLjI3MjUsMy42ODMyLDUuMzU0NXMtMS4zMDc2LDMuOTg0NS0zLjY4MzIsNS4zNTYyTDQ0Ljk1OTIsNzAuMDExNEE3LjkzODQsNy45Mzg0LDAsMCwxLDQxLjAzNTksNzEuMTlabS4wMDY1LTQwLjEyM2EyLjY3OTQsMi42Nzk0LDAsMCwwLTEuMzU4Mi4zNDEzYy0xLjAyNjMuNTkyNi0xLjU5MTIsMS45MzQ5LTEuNTkxMiwzLjc4VjY0LjY1NjNjMCwxLjg0NDkuNTY0OSwzLjE4NjYsMS41OTA2LDMuNzc5MSwxLjAyODEuNTkzMiwyLjQ3MzMuNDEwOCw0LjA3LS41MTJMNjkuMjczLDUzLjE5MDZjMS41OTgzLS45MjI3LDIuNDc4LTIuMDgzOCwyLjQ3OC0zLjI2ODlzLS44OC0yLjM0NDUtMi40NzgtMy4yNjY2TDQzLjc1NCwzMS45MjI3QTUuNTY4NSw1LjU2ODUsMCwwLDAsNDEuMDQyMywzMS4wNjcxWiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),f=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLWZpbGwiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgogIDxkZWZzPjxzdHlsZT4uYXtmaWxsOiMwMDA7b3BhY2l0eTowLjY1O30uYntmaWxsOiNmZmY7b3BhY2l0eToxLjA7fTwvc3R5bGU+CiAgPC9kZWZzPjx0aXRsZT5wbGF5LXJvdW5kZWQtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cGF0aCBjbGFzcz0iYiIgZD0iTTM1Ljk0MiwzNS4yMzIzYzAtNC43Mjg5LDMuMzUwNi02LjY2MzcsNy40NDYtNC4yOTcxTDY4LjgzLDQ1LjYyMzVjNC4wOTU2LDIuMzY0LDQuMDk1Niw2LjIzMTksMCw4LjU5NzdMNDMuMzg4LDY4LjkxYy00LjA5NTQsMi4zNjQtNy40NDYuNDMtNy40NDYtNC4yOTc5WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPgogIDwvc3ZnPgogIAo=","base64"),d=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICA8ZGVmcz4KICAgIDxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5jb250cm9sYnV0dG9ue2ZpbGw6I2ZmZjt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnBsYXktc2hhcnAtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cG9seWdvbiBjbGFzcz0iY29udHJvbGJ1dHRvbiIgcG9pbnRzPSI3My42MDEgNTAgMzcuOTY4IDcwLjU3MyAzNy45NjggMjkuNDI3IDczLjYwMSA1MCIgZmlsdGVyPSJ1cmwoI2YxKSIvPgo8L3N2Zz4K","base64"),p=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDQgOTkuODQzNCI+PGRlZnM+PHN0eWxlPi5jb250cm9sYnV0dG9uYmd7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGxheS1zaGFycC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNMzYuOTQ0Myw3Mi4yNDczVjI3LjI5MTZMNzUuODc3Niw0OS43N1ptMi4yLTQxLjE0NTVWNjguNDM3MUw3MS40Nzc2LDQ5Ljc3WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),h=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDM0IDk5Ljg0MzQiPjxkZWZzPjxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5yZWN0e2ZpbGw6I2ZmZjt9PC9zdHlsZT4KPC9kZWZzPjx0aXRsZT5wYXVzZS1yb3VuZGVkLW91dGxpbmU8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxMi0uMDc4M2E1MCw1MCwwLDEsMCw1MC4wMDA2LDUwQTUwLjA1NjIsNTAuMDU2MiwwLDAsMCw0OS45MjEyLS4wNzgzWiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIj48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTM5LjAwMzYsNzEuOTcyNmE3LjU2NSw3LjU2NSwwLDAsMS03LjU1Ny03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NDgsNy41NjQ4LDAsMCwxLDM5LjAwMzYsNzEuOTcyNlptMC00MS45MDRhNS4zNjQ3LDUuMzY0NywwLDAsMC01LjM1OTMsNS4zNTgydjI4Ljk5YTUuMzU4Nyw1LjM1ODcsMCwwLDAsMTAuNzE3NCwwdi0yOC45OUE1LjM2NDUsNS4zNjQ1LDAsMCwwLDM5LjAwMzYsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTYwLjg0LDcxLjk3MjZhNy41NjQ4LDcuNTY0OCwwLDAsMS03LjU1Ni03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NSw3LjU2NSwwLDAsMSw2MC44NCw3MS45NzI2Wm0wLTQxLjkwNGE1LjM2NDUsNS4zNjQ1LDAsMCwwLTUuMzU4Miw1LjM1ODJ2MjguOTlhNS4zNTg3LDUuMzU4NywwLDAsMCwxMC43MTc0LDB2LTI4Ljk5QTUuMzY0Nyw1LjM2NDcsMCwwLDAsNjAuODQsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48L2c+PC9zdmc+Cg==","base64"),g=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utcm91bmRlZC1maWxsPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIiBmaWx0ZXI9InVybCgjZjEpIj48cmVjdCBjbGFzcz0icmVjdCIgeD0iMzEuODQ0IiB5PSIyOC4xMjMxIiB3aWR0aD0iMTMuNDM2MiIgaGVpZ2h0PSI0My41OTczIiByeD0iNi43MTgxIiByeT0iNi43MTgxIi8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjU2MzgiIHk9IjI4LjEyMzEiIHdpZHRoPSIxMy40MzYyIiBoZWlnaHQ9IjQzLjU5NzMiIHJ4PSI2LjcxODEiIHJ5PSI2LjcxODEiLz48L2c+PC9zdmc+Cg==","base64"),m=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtZmlsbCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PGRlZnM+PHN0eWxlPi5mcC1jb2xvci1wbGF5e29wYWNpdHk6MC42NTt9LnJlY3R7ZmlsbDojZmZmO308L3N0eWxlPgo8L2RlZnM+PHRpdGxlPnBhdXNlLXNoYXJwLWZpbGw8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxNy0uMDc4YTUwLDUwLDAsMSwwLDUwLDUwQTUwLjA1NjQsNTAuMDU2NCwwLDAsMCw0OS45MjE3LS4wNzhaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxyZWN0IGNsYXNzPSJyZWN0IiB4PSIzMy41IiB5PSIzMC4xMDQyIiB3aWR0aD0iMTIuMjYzNCIgaGVpZ2h0PSIzOS43OTE3Ii8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjIzNjYiIHk9IjMwLjEwNDIiIHdpZHRoPSIxMi4yNjM0IiBoZWlnaHQ9IjM5Ljc5MTciLz48L2c+PC9zdmc+Cg==","base64"),v=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtb3V0bGluZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgOTkuODQzNCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utc2hhcnAtb3V0bGluZTwvdGl0bGU+PHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjEyLS4wNzgzYTUwLDUwLDAsMSwwLDUwLjAwMDYsNTBBNTAuMDU2Miw1MC4wNTYyLDAsMCwwLDQ5LjkyMTItLjA3ODNaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNDYuODcwOSw2OS45NTMxSDMzLjEzODVWMjkuODlINDYuODcwOVpNMzUuMTQxNiw2Ny45NWg5LjcyNjJWMzEuODkzNUgzNS4xNDE2WiIvPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNjYuNzA0Nyw2OS45NTMxSDUyLjk3MjJWMjkuODlINjYuNzA0N1pNNTQuOTc1NCw2Ny45NWg5LjcyNjJWMzEuODkzNUg1NC45NzU0WiIvPjwvZz48L3N2Zz4K","base64"),y=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLW91dGxpbmUiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDUwKSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgo8L3N2Zz4K","base64"),w=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLWZpbGwiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC4wcyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuNHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCA1MCkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMS4ycyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+Cjwvc3ZnPgo=","base64"),b=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1maWxsIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjBzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItMTAiIHk9Ii0xMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTEwIiB5PSItMTAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuOHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDUwKSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIxLjJzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KPC9zdmc+Cg==","base64"),I=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1vdXRsaW5lIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTkiIHk9Ii05IiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItOSIgeT0iLTkiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSA1MCkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+Cjwvc3ZnPgo=","base64");o(function(e,t){function r(e){return a.find(".fp-"+e,t)[0]}function M(e){a.css(T,"padding-top",100*e+"%"),D.inlineBlock||a.height(a.find("object",t)[0],a.height(t))}function C(e){e?(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout")):(a.addClass(t,"is-mouseout"),a.removeClass(t,"is-mouseover"))}a.find(".fp-filters").forEach(a.removeNode);try{var A;document.body.appendChild(A=a.createElement("div",{},n("PHN2ZyBjbGFzcz0iZnAtZmlsdGVycyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMCAwIj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImYxIiB4PSItMjAlIiB5PSItMjAlIiB3aWR0aD0iMjAwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlT2Zmc2V0IHJlc3VsdD0ib2ZmT3V0IiBpbj0iU291cmNlQWxwaGEiIGR4PSIwIiBkeT0iMCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggcmVzdWx0PSJtYXRyaXhPdXQiIGluPSJvZmZPdXQiIHR5cGU9Im1hdHJpeCIKICAgICAgdmFsdWVzPSIwLjMgMCAwIDAgMCAwIDAuMyAwIDAgMCAwIDAgMC4zIDAgMCAwIDAgMCAwLjQgMCIgLz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHJlc3VsdD0iYmx1ck91dCIgaW49Im1hdHJpeE91dCIgc3RkRGV2aWF0aW9uPSI0IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJibHVyT3V0IiBtb2RlPSJub3JtYWwiIC8+CiAgICA8L2ZpbHRlcj4KICA8L2RlZnM+Cjwvc3ZnPgo=","base64"))),a.css(A,{width:0,height:0,overflow:"hidden",position:"absolute",margin:0,padding:0})}catch(S){}var E,j=e.conf,D=o.support;a.find(".fp-ratio,.fp-ui",t).forEach(a.removeNode),a.addClass(t,"flowplayer"),t.appendChild(a.createElement("div",{className:"fp-ratio"}));var N=a.createElement("div",{className:"fp-ui"},' <div class="fp-waiting"> {{ LOADING_SHARP_OUTLINE }} {{ LOADING_SHARP_FILL }} {{ LOADING_ROUNDED_FILL }} {{ LOADING_ROUNDED_OUTLINE }} </div> <div class="fp-header"> <a class="fp-share fp-icon"></a> <a class="fp-fullscreen fp-icon"></a> <a class="fp-unload fp-icon"></a> </div> <p class="fp-speed-flash"></p> <div class="fp-play fp-visible"> <a class="fp-icon fp-playbtn"></a> {{ PLAY_ROUNDED_FILL }} {{ PLAY_ROUNDED_OUTLINE }} {{ PLAY_SHARP_FILL }} {{ PLAY_SHARP_OUTLINE }} </div> <div class="fp-pause"> <a class="fp-icon fp-playbtn"></a> {{ PAUSE_SHARP_OUTLINE }} {{ PAUSE_SHARP_FILL }} {{ PAUSE_ROUNDED_OUTLINE }} {{ PAUSE_ROUNDED_FILL }} </div> <div class="fp-controls"> <a class="fp-icon fp-playbtn"></a> <span class="fp-elapsed">00:00</span> <div class="fp-timeline fp-bar"> <span class="fp-timestamp"></span> <div class="fp-progress fp-color"></div> </div> <span class="fp-duration"></span> <span class="fp-remaining"></span> <div class="fp-volume"> <a class="fp-icon fp-volumebtn"></a> <div class="fp-volumebar fp-bar-slider"> <em></em><em></em><em></em><em></em><em></em><em></em><em></em> </div> </div> <strong class="fp-speed fp-hidden"></strong> </div>'.replace("{{ PAUSE_ROUNDED_FILL }}",g).replace("{{ PAUSE_ROUNDED_OUTLINE }}",h).replace("{{ PAUSE_SHARP_FILL }}",m).replace("{{ PAUSE_SHARP_OUTLINE }}",v).replace("{{ PLAY_SHARP_OUTLINE }}",p).replace("{{ PLAY_SHARP_FILL }}",d).replace("{{ PLAY_ROUNDED_OUTLINE }}",c).replace("{{ PLAY_ROUNDED_FILL }}",f).replace("{{ LOADING_ROUNDED_OUTLINE }}",y).replace("{{ LOADING_ROUNDED_FILL }}",w).replace("{{ LOADING_SHARP_FILL }}",b).replace("{{ LOADING_SHARP_OUTLINE }}",I).replace(/url\(#/g,"url("+window.location.href.replace(window.location.hash,"").replace(/\#$/g,"")+"#"));t.appendChild(N);var x=r("waiting"),L=r("elapsed"),T=r("ratio"),Z=r("speed-flash"),P=r("duration"),k=r("remaining"),Y=r("timestamp"),z=a.css(T,"padding-top"),O=r("play"),G=r("pause"),R=r("timeline"),W=l(R,e.rtl),U=r("fullscreen"),J=r("volumebar"),B=u(J,{rtl:e.rtl}),F=a.hasClass(t,"no-toggle");W.disableAnimation(a.hasClass(t,"is-touch")),e.sliders=e.sliders||{},e.sliders.timeline=W,e.sliders.volume=B;var H=[];D.svg||a.html(x,"<p>loading &hellip;</p>"),j.ratio&&M(j.ratio);try{j.fullscreen||a.removeNode(U)}catch(S){a.removeNode(U)}e.on("dvrwindow",function(){W.disable(!1)}),e.on("ready",function(e,n,r){var o=n.video.duration;W.disable(n.disabled||!o),j.adaptiveRatio&&!isNaN(r.height/r.width)&&M(r.height/r.width,!0),a.html([P,k],n.live?"Live":i(o)),a.toggleClass(t,"is-long",o>=3600),B.slide(n.volumeLevel),"flash"===n.engine.engineName?W.disableAnimation(!0,!0):W.disableAnimation(!1),a.find(".fp-title",N).forEach(a.removeNode),r.title&&a.prepend(N,a.createElement("div",{className:"fp-message fp-title"},r.title)),a.toggleClass(t,"has-title",!!r.title)}).on("unload",function(){z||j.splash||a.css(T,"paddingTop",""),W.slide(0),a.addClass(O,"fp-visible")}).on("buffer",function(e,t,n){var r=t.video,i=r.buffer/r.duration;!r.seekable&&D.seekable&&W.max(t.conf.live?1/0:i),n&&"number"!=typeof n||(n=[{start:0,end:r.buffer}]);var o=a.find(".fp-buffer",R);o.length!==n.length&&(o.forEach(a.removeNode),o=[]),n.forEach(function(e,t){var n=o[t]||a.createElement("div",{className:"fp-buffer"});a.css(n,{left:100*e.start/r.duration+"%",width:100*(e.end-e.start)/r.duration+"%"}),a.prepend(R,n)})}).on("speed",function(e,t,n){t.video.time&&(a.text(Z,n+"x"),a.addClass(Z,"fp-shown"),H=H.filter(function(e){return clearTimeout(e),!1}),H.push(setTimeout(function(){a.addClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-shown")},300))},1e3))})))}).on("buffered",function(){W.max(1)}).on("progress seek",function(n,r,o){var s=e.video.duration,l=e.video.seekOffset||0;o=o||e.video.time;var u=(o-l)/(s-l);W.dragging||W.slide(u,e.seeking?0:250),a.toggleClass(t,"is-live-position",s-o<j.livePositionOffset),a.html(L,i(o)),a.html(k,i(s-o,!0))}).on("finish resume seek",function(e){a.toggleClass(t,"is-finished","finish"==e.type)}).on("resume",function(){a.addClass(O,"fp-visible"),setTimeout(function(){a.removeClass(O,"fp-visible")},300)}).on("pause",function(){a.addClass(G,"fp-visible"),setTimeout(function(){a.removeClass(G,"fp-visible")},300)}).on("stop",function(){a.html(L,i(0)),W.slide(0,100)}).on("finish",function(){a.html(L,i(e.video.duration)),W.slide(1,100),a.removeClass(t,"is-seeking")}).on("beforeseek",function(){}).on("volume",function(){B.slide(e.volumeLevel)}).on("disable",function(){var n=e.disabled;W.disable(n),B.disable(n),a.toggleClass(t,"is-disabled",e.disabled)}).on("mute",function(e,n,r){a.toggleClass(t,"is-muted",r)}).on("error",function(e,n,r){if(a.removeClass(t,"is-loading"),a.removeClass(t,"is-seeking"),a.addClass(t,"is-error"),r){n.error=!0;var i=r.code;(r.message||"").match(/DECODER_ERROR_NOT_SUPPORTED/)&&(i=3);var o=n.message((n.engine&&n.engine.engineName||"html5")+": "+j.errors[i]);a.removeClass(t,"is-mouseover"),n.one("load progress",function(e){if(e.type=="progress"&&!n.error)o()})}}).one("resume ready",function(){var e=a.find("video.fp-engine",t)[0];if(e&&(!a.width(e)||!a.height(e))){var n=t.style.overflow;t.style.overflow="visible",setTimeout(function(){n?t.style.overflow=n:t.style.removeProperty("overflow")})}}),s.on(t,"mouseenter mouseleave",function(n){if(!F){var r,i="mouseover"==n.type;if(C(i),i){var o=function(){C(!0),r=new Date};e.on("pause.x volume.x",o),s.on(t,"mousemove.x",o),E=setInterval(function(){new Date-r>j.mouseoutTimeout&&(C(!1),r=new Date)},100)}else s.off(t,"mousemove.x"),e.off("pause.x volume.x"),clearInterval(E)}}),s.on(t,"mouseleave",function(){(W.dragging||B.dragging)&&(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout"))}),s.on(t,"click.player",function(t){return e.disabled?void 0:a.hasClass(t.target,"fp-ui")||a.hasClass(t.target,"fp-engine")||t.flash||a.hasParent(t.target,".fp-play,.fp-pause")?(t.preventDefault&&t.preventDefault(),e.toggle()):void 0}),s.on(t,"mousemove",".fp-timeline",function(t){var n=t.pageX||t.clientX,r=n-a.offset(R).left,o=r/a.width(R),s=e.video,l=s.duration-(void 0===s.seekOffset?0:s.seekOffset),u=(e.rtl?1-o:o)*l;if(!(0>o)){a.html(Y,i(u));var c=r-a.width(Y)/2;0>c&&(c=0),c>a.width(R)-a.width(Y)&&(c=!1),c!==!1?a.css(Y,{left:c+"px",right:"auto"}):a.css(Y,{left:"auto",right:"0px"})}}),s.on(t,"contextmenu",function(n){var r=window;if(!a.hasClass(t,"is-flash-disabled")){var i=a.find(".fp-context-menu",t)[0];i&&(n.preventDefault(),e.showMenu(i,{left:n.clientX-r.scrollX,top:n.clientY-r.scrollY}),s.on(t,"click",".fp-context-menu",function(e){e.stopPropagation()}))}}),e.on("flashdisabled",function(n,r,i){a.addClass(t,"is-flash-disabled");var o;i!==!1&&(o=e.message("Seems something is blocking Adobe Flash from running")),e.one("ready progress",function(){a.removeClass(t,"is-flash-disabled"),o&&o()})}),j.poster&&a.css(t,"background-image","url("+j.poster+")");var V=a.css(t,"background-color"),X="none"!=a.css(t,"background-image")||V&&"rgba(0, 0, 0, 0)"!=V&&"transparent"!=V;if(X&&!j.splash){j.poster||(j.poster=!0);var _=function(){a.addClass(t,"is-poster"),a.addClass(O,"fp-visible"),e.poster=!0,e.on("resume.poster progress.poster beforeseek.poster",function(n){("beforeseek"===n.type||e.playing)&&(a.removeClass(t,"is-poster"),a.removeClass(O,"fp-visible"),e.poster=!1,e.off(".poster"))})};e.on("stop",function(){_()}),e.on("ready",function(e,t,n){n.index||n.autoplay||_()})}"string"==typeof j.splash&&a.css(t,"background-image","url('"+j.splash+"')"),!X&&e.forcedSplash&&a.css(t,"background-color","#555"),s.on(t,"click",".fp-toggle, .fp-play, .fp-playbtn",function(){e.disabled||e.toggle()}),s.on(t,"click",".fp-volumebtn",function(){e.mute()}),s.on(t,"click",".fp-fullscreen",function(){e.fullscreen()}),s.on(t,"click",".fp-unload",function(){e.unload()}),s.on(R,"slide",function(t){e.seeking=!0,e.seekTo(10*t)}),s.on(J,"slide",function(t){e.volume(t)}),s.on(t,"click",".fp-duration,.fp-remaining",function(){return e.dvr?e.seekTo(10):void a.toggleClass(t,"is-inverted")}),C(F);var K;if(e.on("shutdown",function(){s.off(R),s.off(J),K&&window.cancelAnimationFrame(K),a.removeNode(N),a.find(".fp-ratio",t).forEach(a.removeNode)}),"functionDISABLED-FOR-PERFORMANCE-REASONS"==typeof window.requestAnimationFrame){var Q=a.find(".fp-player",t)[0]||t,q=function(){a.toggleClass(t,"is-tiny",Q.clientWidth<400),a.toggleClass(t,"is-small",Q.clientWidth<600&&Q.clientWidth>=400),K=window.requestAnimationFrame(q)};K=window.requestAnimationFrame(q)}}),t.exports.format=i}).call(this,e("buffer").Buffer)},{"../common":1,"../flowplayer":31,"./ui/bar-slider":28,"./ui/slider":29,bean:34,buffer:35}],28:[function(e,t,n){function r(e,t){function n(t){var n=t.pageX||t.clientX,r=o.offset(e),i=o.width(e);!n&&t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches.length&&(n=t.originalEvent.touches[0].pageX);var a=n-r.left;a=Math.max(0,Math.min(i,a));var s=a/i;return l&&(s=1-s),s}t=t||{};var r=t.activeClass||"fp-color",a=t.inactiveClass||"fp-grey",s=t.childSelector||"em",l=!!t.rtl,u=!1,c=o.find(s,e).length,f={unload:function(){i.off(e,".barslider")},slide:function(t,n){o.find(s,e).forEach(function(e,n){var i=t>n/c;o.toggleClass(e,r,i),o.toggleClass(e,a,!i)}),n&&i.fire(e,"slide",[t])},disable:function(e){u=e}};return i.on(e,"mousedown.sld touchstart.sld",function(t){t.preventDefault(),u||(f.slide(n(t),!0),i.on(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),f.slide(n(e),!0)}),i.one(document,"mouseup.sld touchup.sld",function(){i.off(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld")}))}),f}var i=e("bean"),o=e("../../common");t.exports=r},{"../../common":1,bean:34}],29:[function(e,t,n){"use strict";var r=e("bean"),i=e("../../common"),o=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},a=function(e,t){var n,a,s,l,u,c,f,d,p=i.lastChild(e),h=!1,g=function(){a=i.offset(e),s=i.width(e),l=i.height(e),c=u?l:s,d=w(f)},m=function(t){n||t==b.value||f&&!(f>t)||(r.fire(e,"slide",[t]),b.value=t)},v=function(e){var n=e.pageX||e.clientX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var r=u?e.pageY-a.top:n-a.left;r=Math.max(0,Math.min(d||c,r));var i=r/c;return u&&(i=1-i),t&&(i=1-i),y(i,0,!0)},y=function(e,t){void 0===t&&(t=0),e>1&&(e=1);var n=Math.round(1e3*e)/10+"%";return(!f||f>=e)&&(h?i.removeClass(p,"animated"):(i.addClass(p,"animated"),i.css(p,"transition-duration",(t||0)+"ms")),i.css(p,"width",n)),e},w=function(e){return Math.max(0,Math.min(c,u?(1-e)*l:e*s))},b={max:function(e){f=e},disable:function(e){n=e},slide:function(e,t,n){g(),n&&m(e),y(e,t)},disableAnimation:function(t,n){h=t!==!1,i.toggleClass(e,"no-animation",!!n)}};return g(),r.on(e,"mousedown.sld touchstart",function(t){if(t.preventDefault(),!n){var a=o(m,100);g(),b.dragging=!0,i.addClass(e,"is-dragging"),m(v(t)),r.on(document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),a(v(e))}),r.one(document,"mouseup touchend",function(){b.dragging=!1,i.removeClass(e,"is-dragging"),r.off(document,"mousemove.sld touchmove.sld")})}}),b};t.exports=a},{"../../common":1,bean:34}],30:[function(e,t,n){function r(e){var t=document.createElement("textarea");t.value=e,t.style.opacity=0,t.style.position="absolute",document.body.appendChild(t),t.select();var n=document.execCommand("copy");if(document.body.removeChild(t),!n)throw new Error("Unsuccessfull")}t.exports=function(e,t,n){try{r(e),t()}catch(i){n(i)}}},{}],31:[function(e,t,n){"use strict";function r(e,t,n){t&&t.embed&&(t.embed=i({},v.defaults.embed,t.embed));var r=!1;try{"undefined"==typeof v.conf.storage&&"object"==typeof window.localStorage&&(window.localStorage.flowplayerTestStorage="test",r=!0)}catch(s){}var l,p,h=e,g=i({},v.defaults,v.conf,t),m={},b=h.className,I=new w;u.addClass(h,"is-loading"),u.toggleClass(h,"no-flex",!v.support.flex),u.toggleClass(h,"no-svg",!v.support.svg);try{m=v.conf.storage||(r?window.localStorage:m)}catch(M){}if(g.volume="true"===m.muted?0:g.volume!==v.defaults.volume?g.volume:isNaN(m.volume)?g.volume:m.volume,g.debug=!!m.flowplayerDebug||g.debug,g.aspectRatio&&"string"==typeof g.aspectRatio){var C=g.aspectRatio.split(/[:\/]/);g.ratio=C[1]/C[0]}var A=h.currentStyle&&"rtl"===h.currentStyle.direction||window.getComputedStyle&&null!==window.getComputedStyle(h,null)&&"rtl"===window.getComputedStyle(h,null).getPropertyValue("direction");A&&u.addClass(h,"is-rtl");var S={conf:g,currentSpeed:1,volumeLevel:g.muted?0:"undefined"==typeof g.volume?1*m.volume:g.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:"true"==m.muted||g.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:A,hijack:function(e){try{S.engine.suspendEngine()}catch(t){}S.hijacked=e},release:function(){try{S.engine.resumeEngine()}catch(e){}S.hijacked=!1},debug:function(){g.debug&&console.log.apply(console,["DEBUG"].concat([].slice.call(arguments)))},load:function(e,t){if(!S.error&&!S.loading){S.video={},S.finished=!1,e=e||g.clip,e=i({},I.resolve(e,g.clip.sources)),(S.playing||S.engine)&&(e.autoplay=!0);var n=E(e);if(!n)return setTimeout(function(){S.trigger("error",[S,{code:v.support.flashVideo?5:10}])})&&S;if(!n.engineName)throw new Error("engineName property of factory should be exposed");if(S.engine&&n.engineName===S.engine.engineName||(S.ready=!1,S.engine&&(S.engine.unload(),S.conf.autoplay=!0),p=S.engine=n(S,h),S.one("ready",function(){setTimeout(function(){S.muted?S.mute(!0,!0):p.volume(S.volumeLevel)})})),i(e,p.pick(e.sources.filter(function(e){return e.engine?e.engine===p.engineName:!0}))),e.src){var r=S.trigger("load",[S,e,p],!0);r.defaultPrevented?S.loading=!1:(S.ready=!1,p.load(e),o(e)&&(t=e),t&&S.one("ready",t))}return S}},pause:function(e){return S.hijacked?S.hijacked.pause(e)|S:(!S.ready||S.seeking||S.loading||(p.pause(),S.one("pause",e)),S)},resume:function(){var e=S.trigger("beforeresume",[S],!0);if(!e.defaultPrevented)return S.hijacked?S.hijacked.resume()|S:(S.ready&&S.paused&&(p.resume(),S.finished&&(S.trigger("resume",[S]),S.finished=!1)),S)},toggle:function(){return S.ready?S.paused?S.resume():S.pause():S.load()},seek:function(e,t){if("boolean"==typeof e){var n=S.conf.seekStep||.1*S.video.duration;e=S.video.time+(e?n:-n),e=Math.min(Math.max(e,0),S.video.duration-.1)}if("undefined"==typeof e)return S;if(S.hijacked)return S.hijacked.seek(e,t)|S;if(S.ready){l=e;var r=S.trigger("beforeseek",[S,e],!0);r.defaultPrevented?(S.seeking=!1,u.toggleClass(h,"is-seeking",S.seeking)):(p.seek(e),o(t)&&S.one("seek",t))}return S},seekTo:function(e,t){return void 0===e?S.seek(l,t):void 0!==S.video.seekOffset?S.seek(S.video.seekOffset+.1*(S.video.duration-S.video.seekOffset)*e,t):S.seek(.1*S.video.duration*e,t)},mute:function(e,t){return void 0===e&&(e=!S.muted),S.muted=e,t||(m.muted=e,m.volume=isNaN(m.volume)?g.volume:m.volume),"undefined"!=typeof p.mute?p.mute(e):(S.volume(e?0:m.volume,!0),S.trigger("mute",[S,e])),S},volume:function(e,t){return S.ready&&(e=Math.min(Math.max(e,0),1),t||(m.volume=e),p.volume(e)),S},speed:function(e,t){return S.ready&&("boolean"==typeof e&&(e=g.speeds[g.speeds.indexOf(S.currentSpeed)+(e?1:-1)]||S.currentSpeed),p.speed(e),t&&h.one("speed",t)),S},stop:function(){return S.ready&&(S.pause(),!S.live||S.dvr?S.seek(0,function(){S.trigger("stop",[S])}):S.trigger("stop",[S])),S},unload:function(){return g.splash?(S.trigger("unload",[S]),p&&(p.unload(),S.engine=p=0)):S.stop(),S},shutdown:function(){S.unload(),S.trigger("shutdown",[S]),a.off(h),delete f[h.getAttribute("data-flowplayer-instance-id")],h.removeAttribute("data-flowplayer-instance-id")},disable:function(e){return void 0===e&&(e=!S.disabled),e!=S.disabled&&(S.disabled=e,S.trigger("disable",e)),S},registerExtension:function(e,t){e=e||[],t=t||[],"string"==typeof e&&(e=[e]),"string"==typeof t&&(t=[t]),e.forEach(function(e){S.extensions.js.push(e)}),t.forEach(function(e){S.extensions.css.push(e)})}};S.conf=i(S.conf,g),S.extensions={js:[],css:[]},v.extensions.forEach(function(e){S.registerExtension(e[0],e[1])}),c(S);var E=function(e){var t,n=v.engines;if(g.engine){var r=n.filter(function(e){return e.engineName===g.engine})[0];if(r&&e.sources.some(function(e){return e.engine&&e.engine!==r.engineName?!1:r.canPlay(e.type,S.conf)}))return r}return g.enginePreference&&(n=v.engines.filter(function(e){return g.enginePreference.indexOf(e.engineName)>-1}).sort(function(e,t){return g.enginePreference.indexOf(e.engineName)-g.enginePreference.indexOf(t.engineName)})),e.sources.some(function(e){var r=n.filter(function(t){return e.engine&&e.engine!==t.engineName?!1:t.canPlay(e.type,S.conf)}).shift();return r&&(t=r),!!r}),t};return h.getAttribute("data-flowplayer-instance-id")||(h.setAttribute("data-flowplayer-instance-id",y++),S.on("boot",function(){var e=v.support;(g.splash||u.hasClass(h,"is-splash")||!e.firstframe)&&(S.forcedSplash=!g.splash&&!u.hasClass(h,"is-splash"),S.splash=!0,g.splash||(g.splash=!0),u.addClass(h,"is-splash")),g.splash&&u.find("video",h).forEach(u.removeNode),(g.dvr||g.live||u.hasClass(h,"is-live"))&&(S.live=g.live=!0,S.dvr=g.dvr=!!g.dvr||u.hasClass(h,"is-dvr"),u.addClass(h,"is-live"),u.toggleClass(h,"is-dvr",S.dvr)),d.forEach(function(e){e(S,h)}),f.push(S),g.splash?S.unload():S.load(),g.disabled&&S.disable(),S.one("ready",n),S.one("shutdown",function(){h.className=b})}).on("load",function(e,t,n){g.splash&&u.find(".flowplayer.is-ready,.flowplayer.is-loading").forEach(function(e){var t=e.getAttribute("data-flowplayer-instance-id");if(t!==h.getAttribute("data-flowplayer-instance-id")){var n=f[Number(t)];n&&n.conf.splash&&n.unload()}}),u.addClass(h,"is-loading"),t.loading=!0,("undefined"!=typeof n.live||"undefined"!=typeof n.dvr)&&(u.toggleClass(h,"is-live",n.dvr||n.live),u.toggleClass(h,"is-dvr",!!n.dvr),t.live=n.dvr||n.live,t.dvr=!!n.dvr)}).on("ready",function(e,t,n){n.time=0,t.video=n,u.removeClass(h,"is-loading"),t.loading=!1,t.muted?t.mute(!0,!0):t.volume(t.volumeLevel);var r=t.conf.hlsFix&&/mpegurl/i.exec(n.type);u.toggleClass(h,"hls-fix",!!r)}).on("unload",function(){u.removeClass(h,"is-loading"),S.loading=!1}).on("ready unload",function(e){var t="ready"==e.type;u.toggleClass(h,"is-splash",!t),u.toggleClass(h,"is-ready",t),S.ready=t,S.splash=!t}).on("progress",function(e,t,n){t.video.time=n}).on("buffer",function(e,t,n){t.video.buffer="number"==typeof n?n:n.length?n[n.length-1].end:0}).on("speed",function(e,t,n){t.currentSpeed=n}).on("volume",function(e,t,n){t.volumeLevel=Math.round(100*n)/100,t.muted&&n&&t.mute(!1)}).on("beforeseek seek",function(e){S.seeking="beforeseek"==e.type,u.toggleClass(h,"is-seeking",S.seeking)}).on("ready pause resume unload finish stop",function(e){S.paused=/pause|finish|unload|stop/.test(e.type),S.paused=S.paused||"ready"===e.type&&!g.autoplay&&!S.playing,S.playing=!S.paused,u.toggleClass(h,"is-paused",S.paused),u.toggleClass(h,"is-playing",S.playing),S.load.ed||S.pause()}).on("finish",function(){S.finished=!0}).on("error",function(){})),S.trigger("boot",[S,h]),S}var i=e("extend-object"),o=e("is-function"),a=e("bean"),s=e("./ext/ui/slider"),l=e("./ext/ui/bar-slider"),u=e("./common"),c=e("./ext/events"),f=[],d=[],p=window.onbeforeunload;window.onbeforeunload=function(e){return f.forEach(function(e){e.conf.splash?e.unload():e.bind("error",function(){u.find(".flowplayer.is-error .fp-message").forEach(u.removeNode)})}),p?p(e):void 0};var h=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent),g=/(\d+\.\d+) Safari/.exec(navigator.userAgent),m=g?Number(g[1]):100,v=t.exports=function(e,t,n){if(o(e))return d.push(e);if("number"==typeof e||"undefined"==typeof e)return f[e||0];if(e.nodeType){if(null!==e.getAttribute("data-flowplayer-instance-id"))return f[e.getAttribute("data-flowplayer-instance-id")];if(!t)return;return r(e,t,n)}if(e.jquery)return v(e[0],t,n);if("string"==typeof e){var i=u.find(e)[0];return i&&v(i,t,n)}};i(v,{version:"7.2.7",engines:[],engine:function(e){return v.engines.filter(function(t){return t.engineName===e})[0]},extensions:[],conf:{},set:function(e,t){"string"==typeof e?v.conf[e]=t:i(v.conf,e)},registerExtension:function(e,t){v.extensions.push([e,t])},support:{},defaults:{debug:!1,disabled:!1,fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,rtmp:0,proxy:"best",hlsQualities:!0,seekStep:!1,splash:!1,live:!1,livePositionOffset:120,swf:"//releases.flowplayer.org/7.2.7/commercial/flowplayer.swf",swfHls:"//releases.flowplayer.org/7.2.7/commercial/flowplayerhls.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,mouseoutTimeout:5e3,mutedAutoplay:!0,clickToUnMute:!0,volume:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:h&&8>m,disableInline:!1},bean:a,common:u,slider:s,barSlider:l,extend:i});var y=0,w=e("./ext/resolve");if("undefined"!=typeof window.jQuery){var b=window.jQuery;b(function(){"function"==typeof b.fn.flowplayer&&b('.flowplayer:has(video:not(.fp-engine),script[type="application/json"])').flowplayer()});var I=function(e){if(!e.length)return{};var t=e.data()||{},n={};return b.each(["autoplay","loop","preload","poster"],function(r,i){var o=e.attr(i);void 0!==o&&-1!==["autoplay","poster"].indexOf(i)?n[i]=o?o:!0:void 0!==o&&(t[i]=o?o:!0)}),e[0].autoplay=e[0].preload=!1,t.subtitles=e.find("track").map(function(){var e=b(this);return{src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label"),srclang:e.attr("srclang"),default:e.prop("default")}}).get(),t.sources=(new w).sourcesFromVideoTag(e,b),i(n,{clip:t})};b.fn.flowplayer=function(e,t){return this.each(function(){"string"==typeof e&&(e={swf:e}),o(e)&&(t=e,e={});var n=b(this),i=n.find('script[type="application/json"]'),a=i.length?JSON.parse(i.text()):I(n.find("video")),s=b.extend({},e||{},a,n.data()),l=r(this,s,t);c.EVENTS.forEach(function(e){l.on(e+".jquery",function(e){n.trigger.call(n,e.type,e.detail&&e.detail.args)})}),n.data("flowplayer",l)})}}},{"./common":1,"./ext/events":12,"./ext/resolve":21,"./ext/ui/bar-slider":28,"./ext/ui/slider":29,bean:34,"extend-object":39,"is-function":42}],32:[function(e,t,n){e("es5-shim");var r=t.exports=e("./flowplayer");e("./ext/support"),e("./engine/embed"),e("./engine/hlsjs"),e("./engine/html5"),e("./engine/flash"),e("./ext/ui"),e("./ext/message"),e("./ext/keyboard"),e("./ext/playlist"),e("./ext/cuepoint"),e("./ext/subtitle"),e("./ext/analytics"),e("./ext/share"),e("./ext/facebook"),e("./ext/twitter"),e("./ext/embed"),e("./ext/airplay"),e("./ext/chromecast"),e("./ext/qsel"),e("./ext/menu"),e("./ext/fullscreen"),e("./ext/mobile"),r(function(e,t){function n(e){var t=document.createElement("a");return t.href=e,u.hostname(t.hostname)}function i(e){var t="ab.ca,ac.ac,ac.ae,ac.at,ac.be,ac.cn,ac.il,ac.in,ac.jp,ac.kr,ac.sg,ac.th,ac.uk,ad.jp,adm.br,adv.br,ah.cn,am.br,arq.br,art.br,arts.ro,asn.au,asso.fr,asso.mc,bc.ca,bel.tr,bio.br,biz.pl,biz.tr,bj.cn,br.com,cn.com,cng.br,cnt.br,co.ac,co.at,co.de,co.gl,co.hk,co.id,co.il,co.in,co.jp,co.kr,co.mg,co.ms,co.nz,co.th,co.uk,co.ve,co.vi,co.za,com.ag,com.ai,com.ar,com.au,com.br,com.cn,com.co,com.cy,com.de,com.do,com.ec,com.es,com.fj,com.fr,com.gl,com.gt,com.hk,com.hr,com.hu,com.kg,com.ki,com.lc,com.mg,com.mm,com.ms,com.mt,com.mu,com.mx,com.my,com.na,com.nf,com.ng,com.ni,com.pa,com.ph,com.pl,com.pt,com.qa,com.ro,com.ru,com.sb,com.sc,com.sg,com.sv,com.tr,com.tw,com.ua,com.uy,com.ve,com.vn,cp.tz,cq.cn,de.com,de.org,ecn.br,ed.jp,edu.au,edu.cn,edu.hk,edu.mm,edu.my,edu.pl,edu.pt,edu.qa,edu.sg,edu.tr,edu.tw,eng.br,ernet.in,esp.br,etc.br,eti.br,eu.com,eu.int,eu.lv,firm.in,firm.ro,fm.br,fot.br,fst.br,g12.br,gb.com,gb.net,gd.cn,gen.in,go.jp,go.kr,go.th,gov.au,gov.az,gov.br,gov.cn,gov.il,gov.in,gov.mm,gov.my,gov.qa,gov.sg,gov.tr,gov.tw,gov.uk,govt.nz,gr.jp,gs.cn,gv.ac,gv.at,gx.cn,gz.cn,he.cn,hi.cn,hk.cn,hl.cn,hu.com,id.au,idv.tw,in.th,in.ua,ind.br,ind.in,inf.br,info.pl,info.ro,info.tr,info.ve,iwi.nz,jl.cn,jor.br,js.cn,jus.br,k12.il,k12.tr,kr.com,lel.br,lg.jp,ln.cn,ltd.uk,maori.nz,mb.ca,me.uk,med.br,mi.th,mil.br,mil.uk,mo.cn,mod.uk,muni.il,nb.ca,ne.jp,ne.kr,net.ag,net.ai,net.au,net.br,net.cn,net.do,net.gl,net.hk,net.il,net.in,net.kg,net.ki,net.lc,net.mg,net.mm,net.mu,net.ni,net.nz,net.pl,net.ru,net.sb,net.sc,net.sg,net.th,net.tr,net.tw,net.uk,net.ve,nf.ca,nhs.uk,nm.cn,nm.kr,no.com,nom.br,nom.ni,nom.ro,ns.ca,nt.ca,nt.ro,ntr.br,nx.cn,odo.br,off.ai,on.ca,or.ac,or.at,or.jp,or.kr,or.th,org.ag,org.ai,org.au,org.br,org.cn,org.do,org.es,org.gl,org.hk,org.in,org.kg,org.ki,org.lc,org.mg,org.mm,org.ms,org.nf,org.ng,org.ni,org.nz,org.pl,org.ro,org.ru,org.sb,org.sc,org.sg,org.tr,org.tw,org.uk,org.ve,pe.ca,plc.uk,police.uk,ppg.br,presse.fr,pro.br,psc.br,psi.br,qc.ca,qc.com,qh.cn,rec.br,rec.ro,res.in,sa.com,sc.cn,sch.uk,se.com,se.net,sh.cn,sk.ca,slg.br,sn.cn,store.ro,tj.cn,tm.fr,tm.mc,tm.ro,tmp.br,tur.br,tv.br,tv.tr,tw.cn,uk.com,uk.net,us.com,uy.com,vet.br,waw.pl,web.ve,www.ro,xj.cn,xz.cn,yk.ca,yn.cn,zj.cn,zlg.br".split(",");e=e.toLowerCase();var n=e.split("."),r=n.length;if(2>r||/^\d+$/.test(n[r-1]))return e;var i=n.slice(-2).join(".");return r>=3&&t.indexOf(i)>=0?n.slice(-3).join("."):i}function o(e,t){t=i(t);for(var n=0,r=t.length-1;r>=0;r--)n+=0x65cb98ae4ad1ec*t.charCodeAt(r);for(n=(""+n).substring(0,7),r=0;r<e.length;r++)if(n===e[r].substring(1,8))return 1}var a=function(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(e.className+=" "+t)},s=function(e){return"none"!==window.getComputedStyle(e).display},l=e.conf,u=r.common,c=u.createElement,f=l.swf.indexOf("flowplayer.org")&&l.e&&t.getAttribute("data-origin"),d=f?n(f):u.hostname(),p=(document,l.key);if("file:"==location.protocol&&(d="localhost"),e.load.ed=1,l.hostname=d,l.origin=f||location.href,f&&a(t,"is-embedded"),"string"==typeof p&&(p=p.split(/,\s*/)),p&&"function"==typeof o&&o(p,d)){if(l.logo){var h=u.find(".fp-player",t)[0],g=l.logo.href||"",m=l.logo.src||l.logo,v=c("a",{className:"fp-logo",href:g});f&&(v.href=v.href||f),l.embed&&l.embed.popup&&(v.target="_blank");var y=c("img",{src:m});v.appendChild(y),(h||t).appendChild(v)}}else{var v=c("a",{onclick:""}),h=u.find(".fp-player",t)[0];(h||t).appendChild(v);var w=c("div",{className:"fp-context-menu fp-menu"},'<strong>&copy; 2018 Flowplayer AB</strong><a href="https://flowplayer.com/hello/?from=player">About Flowplayer</a><a href="https://flowplayer.com/license">GPL based license</a>'),b=window.location.href.indexOf("localhost");7!==b&&(h||t).appendChild(w),e.on("pause resume finish unload ready",function(e,n){var r=-1;if(n.video.src)for(var i=[["org","flowplayer","drive"],["org","flowplayer","my"],["org","flowplayer","cdn"],["com","flowplayer","cdn"]],o=0;o<i.length&&(r=n.video.src.indexOf("://"+i[o].reverse().join(".")),-1===r);o++);if(/pause|resume/.test(e.type)&&"flash"!=n.engine.engineName&&4!=r&&5!=r){var a={display:"block",position:"absolute",left:"16px",bottom:"56px",zIndex:99999,width:"120px",height:"27px",backgroundImage:"url("+[".png","fplogo","/",".com","foliovision","//"].reverse().join("")+")"};for(var l in a)a.hasOwnProperty(l)&&(v.style[l]=a[l]);n.load.ed=s(v)&&(7===b||w.parentNode==t||w.parentNode==h),n.load.ed||n.pause()}else v.style.display="none"})}})},{"./engine/embed":2,"./engine/flash":3,"./engine/hlsjs":4,"./engine/html5":6,"./ext/airplay":7,"./ext/analytics":8,"./ext/chromecast":9,"./ext/cuepoint":10,"./ext/embed":11,"./ext/facebook":13,"./ext/fullscreen":14,"./ext/keyboard":15,"./ext/menu":16,"./ext/message":17,"./ext/mobile":18,"./ext/playlist":19,"./ext/qsel":20,"./ext/share":22,"./ext/subtitle":23,"./ext/support":25,"./ext/twitter":26,"./ext/ui":27,"./flowplayer":31,"es5-shim":38}],33:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new d(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;u>c;c+=4)t=f[e.charCodeAt(c)]<<18|f[e.charCodeAt(c+1)]<<12|f[e.charCodeAt(c+2)]<<6|f[e.charCodeAt(c+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;n>o;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(s(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;s>a;a+=o)i.push(l(e,a,a+o>s?s:a+o));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}n.byteLength=i,n.toByteArray=a,n.fromByteArray=u;for(var c=[],f=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,g=p.length;g>h;++h)c[h]=p[h],f[p.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],34:[function(t,n,r){!function(t,r,i){"undefined"!=typeof n&&n.exports?n.exports=i():"function"==typeof e&&e.amd?e(i):r[t]=i()}("bean",this,function(e,t){e=e||"bean",t=t||this;var n,r=window,i=t[e],o=/[^\.]*(?=\..*)\.|.*/,a=/\..*/,s="addEventListener",l="removeEventListener",u=document||{},c=u.documentElement||{},f=c[s],d=f?s:"attachEvent",p={},h=Array.prototype.slice,g=function(e,t){return e.split(t||" ")},m=function(e){return"string"==typeof e},v=function(e){return"function"==typeof e},y="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",w="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",b=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},g(y+(f?w:""))),I=function(){var e="compareDocumentPosition"in c?function(e,t){return t.compareDocumentPosition&&16===(16&t.compareDocumentPosition(e))}:"contains"in c?function(e,t){return t=9===t.nodeType||t===window?c:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),M=function(){var e=g("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),t=e.concat(g("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),n=t.concat(g("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),i=e.concat(g("char charCode key keyCode keyIdentifier keyLocation location")),o=e.concat(g("data")),a=e.concat(g("touches targetTouches changedTouches scale rotation")),s=e.concat(g("data origin source")),l=e.concat(g("state")),f=/over|out/,d=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,i}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+u.body.scrollLeft+c.scrollLeft,n.clientY=e.clientY+u.body.scrollTop+c.scrollTop),f.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return o}},{reg:/^touch|^gesture/i,fix:function(){return a}},{reg:/^message$/i,fix:function(){return s}},{reg:/^popstate$/i,fix:function(){return l}},{reg:/.*/,fix:function(){return e}}],p={},h=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var i,o,a,s,l,u=e.type,c=e.target||e.srcElement;if(this.target=c&&3===c.nodeType?c.parentNode:c,n){if(l=p[u],!l)for(i=0,o=d.length;o>i;i++)if(d[i].reg.test(u)){p[u]=l=d[i].fix;break}for(s=l(e,this,u),i=s.length;i--;)!((a=s[i])in this)&&a in e&&(this[a]=e[a])}}};return h.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},h.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},h.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},h.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},h.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},h.prototype.clone=function(e){var t=new h(this,this.element,this.isNative);return t.currentTarget=e,t},h}(),C=function(e,t){return f||t||e!==u&&e!==r?e:c},A=function(){var e=function(e,t,n,r){var i=function(n,i){return t.apply(e,r?h.call(i,n?0:1).concat(r):i)},o=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=o(e,this);return n.apply(t,arguments)?(e&&(e.currentTarget=t),i(e,arguments)):void 0}:function(e){return t.__beanDel&&(e=e.clone(o(e))),i(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,i,o,a,s){var l,u=I[n];"unload"==n&&(r=N(x,t,n,r,i)),u&&(u.condition&&(r=e(t,r,u.condition,a)),n=u.base||n),this.isNative=l=b[n]&&!!t[d],this.customType=!f&&!l&&n,this.element=t,this.type=n,this.original=i,this.namespaces=o,this.eventType=f||l?n:"propertychange",this.target=C(t,l),this[d]=!!this.target[d],this.root=s,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),S=function(){var e={},t=function(n,r,i,o,a,s){var l=a?"r":"$";if(r&&"*"!=r){var u,c=0,f=e[l+r],d="*"==n;if(!f)return;for(u=f.length;u>c;c++)if((d||f[c].matches(n,i,o))&&!s(f[c],f,c,r))return}else for(var p in e)p.charAt(0)==l&&t(n,p.substr(1),i,o,a,s)},n=function(t,n,r,i){var o,a=e[(i?"r":"$")+n];if(a)for(o=a.length;o--;)if(!a[o].root&&a[o].matches(t,r,null))return!0;return!1},r=function(e,n,r,i){var o=[];return t(e,n,r,null,i,function(e){return o.push(e)}),o},i=function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},o=function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},a=function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n};return{has:n,get:r,put:i,del:o,entries:a}}(),E=function(e){n=arguments.length?e:u.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},j=function(e,t){if(f||!t||!e||e.propertyName=="_on"+t){var n=S.get(this,t||e.type,null,!1),r=n.length,i=0;for(e=new M(e,this,!0),t&&(e.type=t);r>i&&!e.isImmediatePropagationStopped();i++)n[i].removed||n[i].handler.call(this,e)}},D=f?function(e,t,n){e[n?s:l](t,j,!1)}:function(e,t,n,r){var i;n?(S.put(i=new A(e,r||t,function(t){j.call(e,t,r)},j,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),i.target.attachEvent("on"+i.eventType,i.handler)):(i=S.get(e,r||t,j,!0)[0],i&&(i.target.detachEvent("on"+i.eventType,i.handler),S.del(i)))},N=function(e,t,n,r,i){return function(){r.apply(this,arguments),e(t,n,i)}},x=function(e,t,n,r){var i,o,s=t&&t.replace(a,""),l=S.get(e,s,null,!1),u={};for(i=0,o=l.length;o>i;i++)n&&l[i].original!==n||!l[i].inNamespaces(r)||(S.del(l[i]),!u[l[i].eventType]&&l[i][d]&&(u[l[i].eventType]={t:l[i].eventType,c:l[i].type}));for(i in u)S.has(e,u[i].t,null,!1)||D(e,u[i].t,!1,u[i].c)},L=function(e,t){var r=function(t,r){for(var i,o=m(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(i=o.length;i--;)if(o[i]===t)return t},i=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return i.__beanDel={ft:r,selector:e},i},T=f?function(e,t,n){var i=u.createEvent(e?"HTMLEvents":"UIEvents");i[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(i)}:function(e,t,n){n=C(n,e),e?n.fireEvent("on"+t,u.createEventObject()):n["_on"+t]++},Z=function(e,t,n){var r,i,s,l,u=m(t);if(u&&t.indexOf(" ")>0){for(t=g(t),l=t.length;l--;)Z(e,t[l],n);return e}if(i=u&&t.replace(a,""),i&&I[i]&&(i=I[i].base),!t||u)(s=u&&t.replace(o,""))&&(s=g(s,".")),x(e,i,n,s);else if(v(t))x(e,null,t);else for(r in t)t.hasOwnProperty(r)&&Z(e,r,t[r]);return e},P=function(e,t,r,i){var s,l,u,c,f,m,y;{if(void 0!==r||"object"!=typeof t){for(v(r)?(f=h.call(arguments,3),i=s=r):(s=i,f=h.call(arguments,4),i=L(r,s,n)),u=g(t),this===p&&(i=N(Z,e,t,i,s)),c=u.length;c--;)y=S.put(m=new A(e,u[c].replace(a,""),i,s,g(u[c].replace(o,""),"."),f,!1)),m[d]&&y&&D(e,m.eventType,!0,m.customType);return e}for(l in t)t.hasOwnProperty(l)&&P.call(this,e,l,t[l])}},k=function(e,t,n,r){return P.apply(null,m(n)?[e,n,t,r].concat(arguments.length>3?h.call(arguments,5):[]):h.call(arguments))},Y=function(){return P.apply(p,arguments)},z=function(e,t,n){var r,i,s,l,u,c=g(t);for(r=c.length;r--;)if(t=c[r].replace(a,""),(l=c[r].replace(o,""))&&(l=g(l,".")),l||n||!e[d])for(u=S.get(e,t,null,!1),n=[!1].concat(n),i=0,s=u.length;s>i;i++)u[i].inNamespaces(l)&&u[i].handler.apply(e,n);else T(b[t],t,e);return e},O=function(e,t,n){for(var r,i,o=S.get(t,n,null,!1),a=o.length,s=0;a>s;s++)o[s].original&&(r=[e,o[s].type],(i=o[s].handler.__beanDel)&&r.push(i.selector),r.push(o[s].original),P.apply(null,r));return e},G={on:P,add:k,one:Y,off:Z,remove:Z,clone:O,fire:z,Event:M,setSelectorEngine:E,noConflict:function(){return t[e]=i,this}};if(r.attachEvent){var R=function(){var e,t=S.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&Z(t[e].element,t[e].type);r.detachEvent("onunload",R),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",R)}return E(),G})},{}],35:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,n,r):"string"==typeof t?f(e,t,n):h(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),0>=t?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function c(e,t){if(l(t),e=o(e,0>t?0:0|g(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;++n)e[n]=0;return e}function f(e,t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);e=o(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function d(e,t){var n=t.length<0?0:0|g(t.length);e=o(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t,n,r){if(t.byteLength,0>n||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=d(e,t),e}function h(e,t){if(a.isBuffer(t)){var n=0|g(t.length);return e=o(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||K(t.length)?o(e,0):d(e,t);if("Buffer"===t.type&&$(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return Z(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return D(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),0>n&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(0>n){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:I(e,t,n,r,i);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):I(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;s>u;u++)if(o(e,u)===o(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*a}else-1!==c&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,d=0;l>d;d++)if(o(e,u+d)!==o(t,d)){f=!1;break}if(f)return u}return-1}function M(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function C(e,t,n,r){return _(F(t,e.length-n),e,n,r)}function A(e,t,n,r){return _(H(t),e,n,r)}function S(e,t,n,r){return A(e,t,n,r)}function E(e,t,n,r){return _(X(t),e,n,r)}function j(e,t,n,r){return _(V(t,e.length-n),e,n,r)}function D(e,t,n){return 0===t&&n===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var l,u,c,f;switch(s){case 1:128>o&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l,f>127&&(a=f));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return x(r)}function x(e){var t=e.length;if(ee>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(e[i]);return r}function Z(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;++o)i+=B(e[o]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function k(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Y(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||o>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function z(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function G(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||G(e,t,n,4,34028234663852886e22,-34028234663852886e22),q.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return i||G(e,t,n,8,17976931348623157e292,-17976931348623157e292),q.write(e,t,n,r,52,8),n+8}function U(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function B(e){return 16>e?"0"+e.toString(16):e.toString(16)}function F(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;++a){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function V(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function X(e){return Q.toByteArray(U(e))}function _(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var Q=e("base64-js"),q=e("ieee754"),$=e("isarray");n.Buffer=a,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);o>i;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return r>n?-1:n>r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;e>t;t+=2)w(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;e>t;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;l>f;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return s>o?-1:o>s?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;i>o;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)0>e&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&t>n&&r>t)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);256>i&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(0>t||this.length<t||this.length<n)throw new RangeError("Out of range index");if(t>=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;++o)this[o]=e;else{var s=a.isBuffer(e)?e:F(new a(e,r).toString()),l=s.length;for(o=0;n-t>o;++o)this[o+t]=s[o%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":33,ieee754:40,isarray:43}],36:[function(e,t,n){function r(e){function t(e){var t=c();a(t,e)>-1||(t.push(e),f(t))}function n(e){var t=c(),n=a(t,e);-1!==n&&(t.splice(n,1),f(t))}function r(e){return a(c(),e)>-1}function s(e){return r(e)?(n(e),!1):(t(e),!0)}function l(){return e.className}function u(e){var t=c();return t[e]||null}function c(){var t=e.className;return i(t.split(" "),o)}function f(t){var n=t.length;e.className=t.join(" "),p.length=n;for(var r=0;r<t.length;r++)p[r]=t[r];delete t[n]}var d=e.classList;if(d)return d;var p={add:t,remove:n,contains:r,toggle:s,toString:l,length:0,item:u};return p}function i(e,t){for(var n=[],r=0;r<e.length;r++)t(e[r])&&n.push(e[r]);return n}function o(e){return!!e}var a=e("indexof");t.exports=r},{indexof:41}],37:[function(e,t,n){function r(e,t,n,r){return n=window.getComputedStyle,r=n?n(e):e.currentStyle,r?r[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]:void 0}t.exports=r},{}],38:[function(t,n,r){!function(t,i){"use strict";"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.returnExports=i()}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,o=i.prototype,a=Function,s=a.prototype,l=String,u=l.prototype,c=Number,f=c.prototype,d=r.slice,p=r.splice,h=r.push,g=r.unshift,m=r.concat,v=r.join,y=s.call,w=s.apply,b=Math.max,I=Math.min,M=o.toString,C="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,A=Function.prototype.toString,S=/^\s*class /,E=function(e){try{var t=A.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return S.test(i)}catch(o){return!1}},j=function(e){try{return E(e)?!1:(A.call(e),!0)}catch(t){return!1}},D="[object Function]",N="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(C)return j(e);if(E(e))return!1;var t=M.call(e);return t===D||t===N},x=RegExp.prototype.exec,L=function(e){try{return x.call(e),!0}catch(t){return!1}},T="[object RegExp]";t=function(e){return"object"!=typeof e?!1:C?L(e):M.call(e)===T};var Z,P=String.prototype.valueOf,k=function(e){try{return P.call(e),!0}catch(t){return!1}},Y="[object String]";Z=function(e){return"string"==typeof e?!0:"object"!=typeof e?!1:C?k(e):M.call(e)===Y};var z=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),O=function(e){var t;return t=z?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var o in r)e.call(r,o)&&t(n,o,r[o],i)}}(o.hasOwnProperty),G=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},R=c.isNaN||function(e){return e!==e},W={ToInteger:function(e){var t=+e;return R(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(G(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),G(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),G(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},U=function(){};O(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=d.call(arguments,1),s=function(){if(this instanceof r){var e=w.call(n,this,m.call(o,d.call(arguments)));return i(e)===e?e:this}return w.call(n,t,m.call(o,d.call(arguments)))},l=b(0,n.length-o.length),u=[],c=0;l>c;c++)h.call(u,"$"+c);return r=a("binder","return function ("+v.call(u,",")+"){ return binder.apply(this, arguments); }")(s),n.prototype&&(U.prototype=n.prototype,r.prototype=new U,U.prototype=null),r}});var J=y.bind(o.hasOwnProperty),B=y.bind(o.toString),F=y.bind(d),H=w.bind(d);if("object"==typeof document&&document&&document.documentElement)try{F(document.documentElement.childNodes)}catch(V){var X=F,_=H;F=function(e){for(var t=[],n=e.length;n-- >0;)t[n]=e[n];return _(t,X(arguments,1))},H=function(e,t){return _(F(e),t)}}var K=y.bind(u.slice),Q=y.bind(u.split),q=y.bind(u.indexOf),$=y.bind(h),ee=y.bind(o.propertyIsEnumerable),te=y.bind(r.sort),ne=n.isArray||function(e){return"[object Array]"===B(e)},re=1!==[].unshift(0);O(r,{unshift:function(){return g.apply(this,arguments),this.length}},re),O(n,{isArray:ne});var ie=i("a"),oe="a"!==ie[0]||!(0 in ie),ae=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(i){r=!0}return!!e&&!r&&t&&n};O(r,{forEach:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=-1,a=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++o<a;)o in i&&("undefined"==typeof n?t(i[o],o,r):t.call(n,i[o],o,r))}},!ae(r.forEach)),O(r,{map:function(t){var r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=n(a);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;a>l;l++)l in o&&("undefined"==typeof r?s[l]=t(o[l],l,i):s[l]=t.call(r,o[l],l,i));return s}},!ae(r.map)),O(r,{filter:function(t){var n,r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;a>l;l++)l in o&&(n=o[l],("undefined"==typeof r?t(n,l,i):t.call(r,n,l,i))&&$(s,n));return s}},!ae(r.filter)),O(r,{every:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;o>a;a++)if(a in i&&!("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!1;return!0}},!ae(r.every)),O(r,{some:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;o>a;a++)if(a in i&&("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!0;return!1}},!ae(r.some));var se=!1;r.reduce&&(se="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),O(r,{reduce:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,a=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a++];break}if(++a>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>a;a++)a in r&&(o=t(o,r[a],a,n));return o}},!se);var le=!1;r.reduceRight&&(le="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),O(r,{reduceRight:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,a=i-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return o;do{a in r&&(o=t(o,r[a],a,n))}while(a--);return o}},!le);var ue=r.indexOf&&-1!==[0,1].indexOf(1,2);O(r,{indexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=W.ToInteger(arguments[1])),r=r>=0?r:b(0,n+r);n>r;r++)if(r in t&&t[r]===e)return r;return-1}},ue);var ce=r.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);O(r,{lastIndexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=I(r,W.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},ce);var fe=function(){var e=[1,2],t=e.splice();return 2===e.length&&ne(t)&&0===t.length}();O(r,{splice:function(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!fe);var de=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();O(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(W.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=F(arguments),n.length<2?$(n,this.length-e):n[1]=W.ToInteger(t)),p.apply(this,n)}},!de);var pe=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),he=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();O(r,{splice:function(e,t){for(var n,r=W.ToObject(this),i=[],o=W.ToUint32(r.length),a=W.ToInteger(e),s=0>a?b(o+a,0):I(a,o),u=I(b(W.ToInteger(t),0),o-s),c=0;u>c;)n=l(s+c),J(r,n)&&(i[c]=r[n]),c+=1;var f,d=F(arguments,2),p=d.length;if(u>p){c=s;for(var h=o-u;h>c;)n=l(c+u),f=l(c+p),J(r,n)?r[f]=r[n]:delete r[f],c+=1;c=o;for(var g=o-u+p;c>g;)delete r[c-1],c-=1}else if(p>u)for(c=o-u;c>s;)n=l(c+u-1),f=l(c+p-1),J(r,n)?r[f]=r[n]:delete r[f],c-=1;c=s;for(var m=0;m<d.length;++m)r[c]=d[m],c+=1;return r.length=o-u+p,i}},!pe||!he);var ge,me=r.join;try{ge="1,2,3"!==Array.prototype.join.call("123",",")}catch(V){ge=!0}ge&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(Z(this)?Q(this,""):this,t)}},ge);var ve="1,2"!==[1,2].join(void 0);ve&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(this,t)}},ve);var ye=function(e){for(var t=W.ToObject(this),n=W.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},we=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:function(e){return ne(this)?h.apply(this,arguments):ye.apply(this,arguments)}},we);var be=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:ye},be),O(r,{slice:function(e,t){var n=Z(this)?Q(this,""):this;return H(n,arguments)}},oe);var Ie=function(){try{[1,2].sort(null)}catch(e){try{[1,2].sort({})}catch(t){return!1}}return!0}(),Me=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),Ce=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();O(r,{sort:function(t){if("undefined"==typeof t)return te(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return te(this,t)}},Ie||!Ce||!Me);var Ae=!ee({toString:null},"toString"),Se=ee(function(){},"prototype"),Ee=!J("x","0"),je=function(e){var t=e.constructor;return t&&t.prototype===e},De={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ne=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!De["$"+e]&&J(window,e)&&null!==window[e]&&"object"==typeof window[e]&&je(window[e])}catch(t){return!0}return!1}(),xe=function(e){if("undefined"==typeof window||!Ne)return je(e);try{return je(e)}catch(t){return!1}},Le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Te=Le.length,Ze=function(e){return"[object Arguments]"===B(e)},Pe=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!ne(t)&&e(t.callee)},ke=Ze(arguments)?Ze:Pe;O(i,{keys:function(t){var n=e(t),r=ke(t),i=null!==t&&"object"==typeof t,o=i&&Z(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=Se&&n;if(o&&Ee||r)for(var u=0;u<t.length;++u)$(a,l(u));if(!r)for(var c in t)s&&"prototype"===c||!J(t,c)||$(a,l(c));if(Ae)for(var f=xe(t),d=0;Te>d;d++){var p=Le[d];f&&"constructor"===p||!J(t,p)||$(a,p)}return a}});var Ye=i.keys&&function(){return 2===i.keys(arguments).length}(1,2),ze=i.keys&&function(){var e=i.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Oe=i.keys;O(i,{keys:function(e){return Oe(ke(e)?F(e):e)}},!Ye||ze);var Ge,Re,We=0!==new Date(-0xc782b5b342b24).getUTCMonth(),Ue=new Date(-0x55d318d56a724),Je=new Date(14496624e5),Be="Mon, 01 Jan -45875 11:59:59 GMT"!==Ue.toUTCString(),Fe=Ue.getTimezoneOffset();-720>Fe?(Ge="Tue Jan 02 -45875"!==Ue.toDateString(),Re=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je))):(Ge="Mon Jan 01 -45875"!==Ue.toDateString(),Re=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je)));var He=y.bind(Date.prototype.getFullYear),Ve=y.bind(Date.prototype.getMonth),Xe=y.bind(Date.prototype.getDate),_e=y.bind(Date.prototype.getUTCFullYear),Ke=y.bind(Date.prototype.getUTCMonth),Qe=y.bind(Date.prototype.getUTCDate),qe=y.bind(Date.prototype.getUTCDay),$e=y.bind(Date.prototype.getUTCHours),et=y.bind(Date.prototype.getUTCMinutes),tt=y.bind(Date.prototype.getUTCSeconds),nt=y.bind(Date.prototype.getUTCMilliseconds),rt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ot=function(e,t){return Xe(new Date(t,e,0))};O(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this);return 0>e&&Ve(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this);return 0>e&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this),n=Xe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this);return 0>e&&Ke(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this);return 0>e&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this),n=Qe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n}},We),O(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this),t=Qe(this),n=Ke(this),r=_e(this),i=$e(this),o=et(this),a=tt(this);return rt[e]+", "+(10>t?"0"+t:t)+" "+it[n]+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"}},We||Be),O(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r}},We||Ge),(We||Re)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),o=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),l=Math.floor(Math.abs(s)/60),u=Math.floor(Math.abs(s)%60);return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"+(s>0?"-":"+")+(10>l?"0"+l:l)+(10>u?"0"+u:u)},z&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var at=-621987552e5,st="-000001",lt=Date.prototype.toISOString&&-1===new Date(at).toISOString().indexOf(st),ut=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),ct=y.bind(Date.prototype.getTime);O(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ct(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=_e(this),t=Ke(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Qe(this),$e(this),et(this),tt(this)];e=(0>e?"-":e>9999?"+":"")+K("00000"+Math.abs(e),e>=0&&9999>=e?-4:-6);for(var r=0;r<n.length;++r)n[r]=K("00"+n[r],-2);return e+"-"+F(n,0,2).join("-")+"T"+F(n,2).join(":")+"."+K("000"+nt(this),-3)+"Z"}},lt||ut);var ft=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(at).toJSON().indexOf(st)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ft||(Date.prototype.toJSON=function(t){var n=i(this),r=W.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var o=n.toISOString;if(!e(o))throw new TypeError("toISOString property is not callable");return o.call(n)});var dt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),pt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ht=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ht||pt||!dt){var gt=Math.pow(2,31)-1,mt=R(new Date(1970,0,1,0,0,0,gt+1).getTime());Date=function(e){var t=function(n,r,i,o,a,s,u){var c,f=arguments.length;if(this instanceof e){var d=s,p=u;if(mt&&f>=7&&u>gt){var h=Math.floor(u/gt)*gt,g=Math.floor(h/1e3);d+=g,p-=1e3*g}c=1===f&&l(n)===n?new e(t.parse(n)):f>=7?new e(n,r,i,o,a,d,p):f>=6?new e(n,r,i,o,a,d):f>=5?new e(n,r,i,o,a):f>=4?new e(n,r,i,o):f>=3?new e(n,r,i):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else c=e.apply(this,arguments);return G(c)||O(c,{constructor:t},!0),c},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},o=function(t){var n=0,r=t;if(mt&&r>gt){var i=Math.floor(r/gt)*gt,o=Math.floor(i/1e3);n+=o,r-=1e3*o}return c(new e(1970,0,1,0,0,n,r))};for(var a in e)J(e,a)&&(t[a]=e[a]);O(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,O(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=c(r[1]),l=c(r[2]||1)-1,u=c(r[3]||1)-1,f=c(r[4]||0),d=c(r[5]||0),p=c(r[6]||0),h=Math.floor(1e3*c(r[7]||0)),g=Boolean(r[4]&&!r[8]),m="-"===r[9]?1:-1,v=c(r[10]||0),y=c(r[11]||0),w=d>0||p>0||h>0;return(w?24:25)>f&&60>d&&60>p&&1e3>h&&l>-1&&12>l&&24>v&&60>y&&u>-1&&u<i(s,l+1)-i(s,l)&&(a=60*(24*(i(s,l)+u)+f+v*m),a=1e3*(60*(a+d+y*m)+p)+h,g&&(a=o(a)),a>=-864e13&&864e13>=a)?a:NaN}return e.parse.apply(this,arguments)};return O(t,{parse:s}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var vt=f.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),yt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<yt.size;)r+=e*yt.data[n],yt.data[n]=r%yt.base,r=Math.floor(r/yt.base)},divide:function(e){for(var t=yt.size,n=0;--t>=0;)n+=yt.data[t],yt.data[t]=Math.floor(n/e),n=n%e*yt.base},numToString:function(){for(var e=yt.size,t="";--e>=0;)if(""!==t||0===e||0!==yt.data[e]){var n=l(yt.data[e]);""===t?t=n:t+=K("0000000",0,7-n.length)+n}return t},pow:function Ot(e,t,n){return 0===t?n:t%2===1?Ot(e,t-1,n*e):Ot(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},wt=function(e){var t,n,r,i,o,a,s,u;if(t=c(e),t=R(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=c(this),R(n))return"NaN";if(-1e21>=n||n>=1e21)return l(n);if(r="",0>n&&(r="-",n=-n),i="0",n>1e-21)if(o=yt.log(n*yt.pow(2,69,1))-69,a=0>o?n*yt.pow(2,-o,1):n/yt.pow(2,o,1),a*=4503599627370496,o=52-o,o>0){for(yt.multiply(0,a),s=t;s>=7;)yt.multiply(1e7,0),s-=7;for(yt.multiply(yt.pow(10,s,1),0),s=o-1;s>=23;)yt.divide(1<<23),s-=23;yt.divide(1<<s),yt.multiply(1,1),yt.divide(2),i=yt.numToString()}else yt.multiply(0,a),yt.multiply(1<<-o,0),i=yt.numToString()+K("0.00000000000000000000",2,2+t);return t>0?(u=i.length,i=t>=u?r+K("0.0000000000000000000",0,t-u+2)+i:r+K(i,0,u-t)+"."+K(i,u-t)):i=r+i,i};O(f,{toFixed:wt},vt);var bt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),It=f.toPrecision;O(f,{toPrecision:function(e){return"undefined"==typeof e?It.call(this):It.call(this,e)}},bt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,i){var o=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return Q(this,r,i);var a,s,l,u,c=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),d=0,p=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+p.source+"$(?!\\s)",f));var g="undefined"==typeof i?n:W.ToUint32(i);for(s=p.exec(o);s&&(l=s.index+s[0].length,!(l>d&&($(c,K(o,d,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(s[e]=void 0)}),s.length>1&&s.index<o.length&&h.apply(c,F(s,1)),u=s[0].length,d=l,c.length>=g)));)p.lastIndex===s.index&&p.lastIndex++,s=p.exec(o);return d===o.length?(u||!p.test(""))&&$(c,""):$(c,K(o,d)),c.length>g?F(c,0,g):c}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:Q(this,e,t)});var Mt=u.replace,Ct=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){$(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ct||(u.replace=function(n,r){var i=e(r),o=t(n)&&/\)[*?]/.test(n.source);if(i&&o){var a=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var o=n.exec(e)||[];return n.lastIndex=i,$(o,arguments[t-2],arguments[t-1]),r.apply(this,o)};return Mt.call(this,n,a)}return Mt.call(this,n,r)});var At=u.substr,St="".substr&&"b"!=="0b".substr(-1);O(u,{substr:function(e,t){var n=e;return 0>e&&(n=b(this.length+e,0)),At.call(this,n,t)}},St);var Et="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",jt="​",Dt="["+Et+"]",Nt=new RegExp("^"+Dt+Dt+"*"),xt=new RegExp(Dt+Dt+"*$"),Lt=u.trim&&(Et.trim()||!jt.trim());O(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return l(this).replace(Nt,"").replace(xt,"")}},Lt);var Tt=y.bind(String.prototype.trim),Zt=u.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);O(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=l(this),n=l(e),r=arguments.length>1?c(arguments[1]):NaN,i=R(r)?1/0:W.ToInteger(r),o=I(b(i,0),t.length),a=n.length,s=o+a;s>0;){s=b(0,s-a);var u=q(K(t,s,o+a),n);if(-1!==u)return s+u}return-1}},Zt);var Pt=u.lastIndexOf;if(O(u,{lastIndexOf:function(e){return Pt.apply(this,arguments)}},1!==u.lastIndexOf.length),(8!==parseInt(Et+"08")||22!==parseInt(Et+"0x16"))&&(parseInt=function(e){var t=/^[-+]?0[xX]/;return function(n,r){var i=Tt(String(n)),o=c(r)||(t.test(i)?16:10);return e(i,o)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Tt(String(t)),r=e(n);return 0===r&&"-"===K(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var kt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=l(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=l(t)),e?t?e+": "+t:e:t};Error.prototype.toString=kt}if(z){var Yt=function(e,t){if(ee(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Yt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Yt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var zt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=zt}})},{}],39:[function(e,t,n){var r=[],i=r.forEach,o=r.slice;t.exports=function(e){return i.call(o.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e}},{}],40:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,p=e[t+f];for(f+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?d/l:d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*g}},{}],41:[function(e,t,n){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],42:[function(e,t,n){function r(e){var t=i.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=r;var i=Object.prototype.toString},{}],43:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],44:[function(t,n,r){(function(t){!function(i){function o(e){throw new RangeError(P[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Z,".");var i=e.split("."),o=a(i,t).join(".");return r+o}function l(e){for(var t,n,r=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=z(e>>>10&1023|55296),e=56320|1023&e),t+=z(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?Y(e/j):e>>1,e+=Y(e/t);e>k*S>>1;r+=C)e=Y(e/k);return Y(r+(k+1)*e/(e+E))}function p(e){var t,n,r,i,a,s,l,f,p,h,g=[],m=e.length,v=0,y=N,w=D;for(n=e.lastIndexOf(x),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;m>i;){for(a=v,s=1,l=C;i>=m&&o("invalid-input"),f=c(e.charCodeAt(i++)),(f>=C||f>Y((M-v)/s))&&o("overflow"),v+=f*s,p=w>=l?A:l>=w+S?S:l-w,!(p>f);l+=C)h=C-p,s>Y(M/h)&&o("overflow"),s*=h;t=g.length+1,w=d(v-a,t,0==a),Y(v/t)>M-y&&o("overflow"),y+=Y(v/t),v%=t,g.splice(v++,0,y)}return u(g)}function h(e){var t,n,r,i,a,s,u,c,p,h,g,m,v,y,w,b=[];for(e=l(e),m=e.length,t=N,n=0,a=D,s=0;m>s;++s)g=e[s],128>g&&b.push(z(g));for(r=i=b.length,i&&b.push(x);m>r;){for(u=M,s=0;m>s;++s)g=e[s],g>=t&&u>g&&(u=g);for(v=r+1,u-t>Y((M-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;m>s;++s)if(g=e[s],t>g&&++n>M&&o("overflow"),g==t){for(c=n,p=C;h=a>=p?A:p>=a+S?S:p-a,!(h>c);p+=C)w=c-h,y=C-h,b.push(z(f(h+w%y,0))),c=Y(w/y);b.push(z(f(c,0))),a=d(n,v,r==i),n=0,++r}++n,++t}return b.join("")}function g(e){return s(e,function(e){return L.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return T.test(e)?"xn--"+h(e):e})}var v="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof n&&n&&!n.nodeType&&n,w="object"==typeof t&&t;(w.global===w||w.window===w||w.self===w)&&(i=w);var b,I,M=2147483647,C=36,A=1,S=26,E=38,j=700,D=72,N=128,x="-",L=/^xn--/,T=/[^\x20-\x7E]/,Z=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=C-A,Y=Math.floor,z=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:l,encode:u},decode:p,encode:h,toASCII:m,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return b});else if(v&&y)if(n.exports==v)y.exports=b;else for(I in b)b.hasOwnProperty(I)&&(v[I]=b[I]);else i.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(t,n,r){!function(t,r){"undefined"!=typeof n&&n.exports?n.exports=r():"function"==typeof e&&e.amd?e(r):this[t]=r()}("$script",function(){function e(e,t){for(var n=0,r=e.length;r>n;++n)if(!t(e[n]))return l;return 1}function t(t,n){e(t,function(e){return!n(e)})}function n(o,a,s){function l(e){return e.call?e():d[e]}function c(){if(!--y){d[v]=1,m&&m();for(var n in h)e(n.split("|"),l)&&!t(h[n],l)&&(h[n]=[])}}o=o[u]?o:[o];var f=a&&a.call,m=f?a:s,v=f?o.join(""):a,y=o.length;return setTimeout(function(){t(o,function e(t,n){return null===t?c():(n||/^https?:\/\//.test(t)||!i||(t=-1===t.indexOf(".js")?i+t+".js":i+t),g[t]?(v&&(p[v]=1),2==g[t]?c():setTimeout(function(){e(t,!0)},0)):(g[t]=1,v&&(p[v]=1),void r(t,c)))})},0),n}function r(e,t){var n,r=a.createElement("script");r.onload=r.onerror=r[f]=function(){r[c]&&!/^c|loade/.test(r[c])||n||(r.onload=r[f]=null,n=1,g[e]=2,t())},r.async=1,r.src=o?e+(-1===e.indexOf("?")?"?":"&")+o:e,s.insertBefore(r,s.lastChild)}var i,o,a=document,s=a.getElementsByTagName("head")[0],l=!1,u="push",c="readyState",f="onreadystatechange",d={},p={},h={},g={};return n.get=r,n.order=function(e,t,r){!function i(o){o=e.shift(),e.length?n(o,i):n(o,t,r)}()},n.path=function(e){i=e},n.urlArgs=function(e){o=e},n.ready=function(r,i,o){r=r[u]?r:[r];var a=[];return!t(r,function(e){d[e]||a[u](e)})&&e(r,function(e){return d[e]})?i():!function(e){h[e]=h[e]||[],h[e][u](i),o&&o(a)}(r.join("|")),n},n.done=function(e){n([null],e)},n})},{}]},{},[32])(32)});if(typeof fv_flowplayer_conf!="undefined"){try{if(typeof window.localStorage=="object"&&typeof window.localStorage.volume!="undefined"){delete fv_flowplayer_conf.volume}}catch(e){}flowplayer.conf=fv_flowplayer_conf;flowplayer.conf.chromecast=false;flowplayer.conf.embed=false;flowplayer.conf.share=false;flowplayer.conf.analytics=false;try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}if(!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs){function FVAbrController(hls){this.hls=hls;this.nextAutoLevel=3}FVAbrController.prototype.nextAutoLevel=function(nextLevel){this.nextAutoLevel=nextLevel};FVAbrController.prototype.destroy=function(){};flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}}function parseIOSVersion(UA){var e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(UA);if(e&&e.length>1){return parseFloat(e[e.length-1].replace("_","."),10)}return 0}if(flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&flowplayer.support.iOS.version==0){flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)}if(flowplayer.support.iOS&&parseInt(flowplayer.support.iOS.version)>=13||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&parseInt(flowplayer.support.browser.version)>=8){flowplayer.conf.hlsjs.safari=true}flowplayer.support.fvmobile=!!(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.android);var fls=flowplayer.support;if(flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile){flowplayer.conf.native_fullscreen=true}if("ontouchstart"in window){if(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&fls.browser.version>54)){flowplayer.conf.native_fullscreen=true}if(fls.iOS&&(fv_player_in_iframe()||fls.iOS.version<7)){flowplayer.conf.native_fullscreen=true}}}if(typeof fv_flowplayer_translations!="undefined"){flowplayer.defaults.errors=fv_flowplayer_translations}var fv_player_did_autoplay=false;function fv_player_videos_parse(args,root){try{var videos=JSON.parse(args)}catch(e){return false}var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery(videos.sources).each(function(k,v){if(v.mobile){videos.sources[k]=videos.sources[0];videos.sources[0]=v;fv_fp_mobile=true}if(fv_fp_mobile){jQuery(root).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>")}})}return videos}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return true}}jQuery(document).ready(function(){var loading_count=0;var loading=setInterval(function(){loading_count++;if(loading_count<1e3&&(window.fv_video_intelligence_conf&&!window.FV_Player_IMA||window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro)){return}clearInterval(loading);fv_player_preload()},10)});function fv_escape_attr(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.replace(/[&<>"']/g,function(m){return map[m]})}function fv_player_preload(){if(flowplayer.support.touch){jQuery(".fp-playlist-external.fv-playlist-design-2017").addClass("visible-captions")}flowplayer(function(api,root){root=jQuery(root);var fp_player=root.find(".fp-player");var splash_click=false;if(root.hasClass("fixed-controls")){root.find(".fp-controls").click(function(e){if(!api.loading&&!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}if(!flowplayer.support.volume&&!flowplayer.support.autoplay){root.find(".fp-volume").hide()}if(root.data("fullscreen")==false){root.find(".fp-fullscreen").remove()}if(root.data("volume")==0&&root.hasClass("no-controlbar")){root.find(".fp-volume").remove()}var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");if((!api.conf.playlist||api.conf.playlist.length==0)&&playlist.length&&playlist.find("a[data-item]").length>0){var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});api.conf.playlist=items;api.conf.clip=items[0]}else if(!api.conf.clip){api.conf.clip=fv_player_videos_parse(jQuery(root).attr("data-item"),root)}jQuery("a",playlist).click(function(e){e.preventDefault();splash_click=true;var $this=jQuery(this),playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),index=jQuery("a",playlist).index(this);$prev=$this.prev("a"),item=$this.data("item");if($prev.length&&$this.is(":visible")&&!$prev.is(":visible")){$prev.click();return false}if(jQuery("#"+$this.parent().attr("rel")).hasClass("dynamic-playlist"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");fv_player_playlist_active(playlist,this);if(api){if(api.error){api.pause();api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove()}if(!api.video||api.video.index==index)return;api.play(index)}var new_splash=item.splash;if(!new_splash){new_splash=$this.find("img").attr("src")}player_splash(root,fp_player,item,new_splash);var rect=root[0].getBoundingClientRect();if(rect.bottom-100<0){jQuery("html, body").animate({scrollTop:jQuery(root).offset().top-100},300)}});var playlist_external=jQuery("[rel="+root.attr("id")+"]");var playlist_progress=false;var splash_img=root.find(".fp-splash");var splash_text=root.find(".fv-fp-splash-text");function player_splash(root,fp_player,item,new_splash){var splash_img=root.find("img.fp-splash");if(new_splash){if(splash_img.length==0){splash_img=jQuery('<img class="fp-splash" />');fp_player.prepend(splash_img)}splash_img.attr("alt",item.fv_title?fv_escape_attr(item.fv_title):"video");splash_img.attr("src",new_splash)}else if(splash_img.length){splash_img.remove()}}api.bind("load",function(e,api,video){if(!api.conf.playlist.length){return}if(video.type.match(/^audio/)&&!splash_click){var anchor=playlist_external.find("a").eq(video.index);var item=anchor.data("item");var new_splash=item.splash;if(!new_splash){new_splash=anchor.find("img").attr("src")}player_splash(root,fp_player,item,new_splash)}splash_click=false});api.bind("ready",function(e,api,video){setTimeout(function(){if(video.index>-1){if(playlist_external.length>0){var playlist_item=jQuery("a",playlist_external).eq(video.index);fv_player_playlist_active(playlist_external,playlist_item);playlist_progress=playlist_item.find(".fvp-progress")}}},100);splash_img=root.find(".fp-splash");if(!video.is_audio_stream&&!video.type.match(/^audio/)){splash_img.remove();splash_text.remove()}});api.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove();jQuery(".fp-playlist-external a").removeClass("is-active");fp_player.prepend(splash_text);fp_player.prepend(splash_img);playlist_progress=false});api.bind("progress",function(e,api,time){if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.video,time)}});api.bind("error-subtitles",function(){console.log("error-subtitles");fv_player_notice(root,fv_flowplayer_translations[8],2e3)});var playlist=jQuery(root).parent().find("div.fp-playlist-vertical[rel="+jQuery(root).attr("id")+"]");if(playlist.length){function check_size_and_all(args){var property=playlist.hasClass("fp-playlist-only-captions")?"height":"max-height";if(playlist.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")){property="max-height"}playlist.css(property,vertical_playlist_height());if(property=="max-height")playlist.css("height","auto")}check_size_and_all();jQuery(window).on("resize tabsactivate",function(){setTimeout(check_size_and_all,0)})}function vertical_playlist_height(args){var height=root.height();if(height==0)height=root.css("max-height");return height}api.show_status=function(type){var status="";["loading","ready","playing","paused","seeking"].every(function(v,k){if(api[v])status+=" "+v;return true});console.log("FV Player Status ("+type+")",status)}});if(window.self!=window.top&&!location.href.match(/fv_player_preview/)){embed_size();jQuery(window.self).resize(embed_size)}function embed_size(){jQuery(".flowplayer.fp-is-embed").each(function(){var root=jQuery(this);if(!root.hasClass("has-chapters")&&!root.hasClass("has-transcript")&&jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length==0){root.height(jQuery(window).height())}})}if(typeof fv_flowplayer_playlists!="undefined"){for(var i in fv_flowplayer_playlists){if(!fv_flowplayer_playlists.hasOwnProperty(i))continue;jQuery("#"+i).flowplayer({playlist:fv_flowplayer_playlists[i]})}}fv_player_load();fv_autoplay_exec();jQuery(document).ajaxComplete(function(){fv_player_load()});jQuery(window).on("hashchange",fv_autoplay_exec)}function fv_player_load(){jQuery(".flowplayer").each(function(i,el){var root=jQuery(el);var api=root.data("flowplayer");if(api)return;if(root.attr("data-item")){root.flowplayer({clip:fv_player_videos_parse(root.attr("data-item"),root)})}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){if(playlist.find("a[data-item]").length==0)return;var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});root.flowplayer({playlist:items})}});jQuery(".fv-playlist-slider-wrapper").each(function(i,el){var items=jQuery(this).find("a");jQuery(this).find(".fp-playlist-external").css("width",items.outerWidth()*items.length)});if(typeof jQuery().tabs!="undefined"){jQuery("body").removeClass("fv_flowplayer_tabs_hide");jQuery(".fv_flowplayer_tabs_content").tabs()}}function fv_player_playlist_active(playlist,item){if(playlist){jQuery("a",playlist).removeClass("is-active");jQuery(".now-playing").remove()}$playlist=jQuery(playlist);$item=jQuery(item);var scroll_parent=false;$item.addClass("is-active");var is_design_2014=$playlist.hasClass("fv-playlist-design-2014");if((is_design_2014&&$item.find("h4").length==0||!is_design_2014)&&$item.find(".now-playing").length==0)$item.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>");if(!$playlist.parent().find(".flowplayer").length){scroll_parent=true}if(($playlist.hasClass("fp-playlist-vertical")||$playlist.hasClass("fp-playlist-horizontal")&&$playlist.hasClass("is-audio"))&&!fullyVisibleY($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollTop:$el.scrollTop()+($item.position().top-$el.position().top)},750)}else if($playlist.hasClass("fp-playlist-horizontal")&&!fullyVisibleX($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollLeft:$el.scrollLeft()+($item.position().left-$el.position().left)},750)}function fullyVisibleY(el){var rect=el.getBoundingClientRect(),top=rect.top,height=rect.height,bottom=top+height,el=el.parentNode;do{rect=el.getBoundingClientRect();if(bottom<=rect.bottom===false)return false;if(top<=rect.top)return false;el=el.parentNode}while(el!=document.body);return bottom<=document.documentElement.clientHeight}function fullyVisibleX(el){var rect=el.getBoundingClientRect(),left=rect.left,width=rect.width,right=left+width,el=el.parentNode;do{rect=el.getBoundingClientRect();if(right<=rect.right===false)return false;if(left<=rect.left)return false;el=el.parentNode}while(el!=document.body);return right<=document.documentElement.clientWidth}}jQuery(function(){jQuery(".flowplayer").each(function(){flowplayer.bean.off(jQuery(this)[0],"contextmenu")})});var fv_fp_date=new Date;var fv_fp_utime=fv_fp_date.getTime();function fv_parse_sharelink(src){src=src.replace("https?://[^./].","");var prefix="fvp_";if(src.match(/(youtube.com)/)){return prefix+src.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]}else if(src.match(/(vimeo.com)|(youtu.be)/)){return prefix+src.match(/(?:\/)([^/]*$)/)[1]}else{var match=src.match(/(?:\/)([^/]*$)/);if(match){return prefix+match[1].match(/^[^.]*/)[0]}}return prefix+src}function fv_player_get_video_link_hash(api){var hash=fv_parse_sharelink(typeof api.video.sources_original!="undefined"&&typeof api.video.sources_original[0]!="undefined"?api.video.sources_original[0].src:api.video.sources[0].src);if(typeof api.video.id!="undefined"){hash=fv_parse_sharelink(api.video.id.toString())}return hash}function fv_player_time_hms(seconds){if(isNaN(seconds)){return NaN}var sec_num=parseInt(seconds,10);var hours=Math.floor(sec_num/3600);var minutes=Math.floor(sec_num/60)%60;var seconds=sec_num%60;if(hours){hours+="h"}else{hours=""}if(hours&&minutes<10){minutes="0"+minutes+"m"}else if(!hours&&minutes){minutes+="m"}else{minutes=""}if((hours||minutes)&&seconds<10){seconds="0"+seconds}seconds+="s";var timeString=hours+minutes+seconds;return timeString}function fv_player_time_hms_ms(seconds){if(isNaN(seconds)){return NaN}seconds=parseFloat(seconds).toFixed(3);var miliseconds=(seconds+"").split(".");if(typeof miliseconds[1]!="undefined"&&miliseconds[1]>0){miliseconds=miliseconds[1]+"ms"}else{miliseconds=""}var timeString=fv_player_time_hms(seconds)+miliseconds;return timeString}function fv_player_time_seconds(time,duration){if(!time)return-1;var seconds=0;var match=time.match(/(\d+[a-z]{1,2})/g);match.forEach(function(item){if(item.endsWith("h")){seconds+=3600*parseInt(item)}else if(item.endsWith("m")){seconds+=60*parseInt(item)}else if(item.endsWith("s")&&!item.endsWith("ms")){seconds+=parseInt(item)}else if(item.endsWith("ms")){if(parseInt(item)){seconds+=parseInt(item)/1e3}}});return duration?Math.min(seconds,duration):seconds}function fv_autoplay_init(root,index,time,abStart,abEnd){if(fv_autoplay_exec_in_progress)return;fv_autoplay_exec_in_progress=true;var api=root.data("flowplayer");if(!api)return;var fTime=fv_player_time_seconds(time);abEnd=fv_player_time_seconds(abEnd);abStart=fv_player_time_seconds(abStart);if(root.parent().hasClass("ui-tabs-panel")){var tabId=root.parent().attr("id");jQuery("[aria-controls="+tabId+"] a").click()}if(!root.find(".fp-player").attr("class").match(/\bis-sticky/)){var offset=jQuery(root).offset().top-(jQuery(window).height()-jQuery(root).height())/2;window.scrollTo(0,offset);api.one("ready",function(){window.scrollTo(0,offset)})}if(root.hasClass("lightboxed")){setTimeout(function(){jQuery("[href=\\#"+root.attr("id")+"]").click()},0)}if(index){if(fv_player_video_link_autoplay_can(api,parseInt(index))){if(api.ready){if(fTime>-1)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{api.play(parseInt(index));api.one("ready",function(){fv_autoplay_exec_in_progress=false;if(fTime>-1){api.seek(fTime);if(abEnd&&abStart)api.trigger("link-ab",[api,abStart,abEnd])}})}}else if(flowplayer.support.inlineVideo){api.one(api.playing?"progress":"ready",function(e,api){api.play(parseInt(index));api.one("ready",function(){fv_autoplay_exec_in_progress=false;if(fTime>-1){api.seek(fTime);if(abEnd&&abStart)api.trigger("link-ab",[api,abStart,abEnd])}})});root.find(".fp-splash").attr("src",jQuery("[rel="+root.attr("id")+"] div").eq(index).find("img").attr("src"));if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}}}else{if(api.ready){if(fTime>-1)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{if(fv_player_video_link_autoplay_can(api)){api.load()}else if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}api.one("ready",function(){fv_autoplay_exec_in_progress=false;if(fTime>-1){var do_seek=setInterval(function(){if(api.loading)return;api.seek(fTime);if(abEnd&&abStart)api.trigger("link-ab",[api,abStart,abEnd]);clearInterval(do_seek)},10)}})}}}var fv_autoplay_exec_in_progress=false;function fv_autoplay_exec(){var autoplay=true;if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length){var aHash=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(",");var hash=aHash[0];var time=aHash[1]===undefined?false:aHash[1];var abStart=aHash[2]===undefined?false:aHash[2];var abEnd=aHash[3]===undefined?false:aHash[3];jQuery(".flowplayer").each(function(){var root=jQuery(this);if(root.hasClass("lightbox-starter")){root=jQuery(root.attr("href"))}var api=root.data("flowplayer");if(!api)return;var playlist=typeof api.conf.playlist!=="undefined"&&api.conf.playlist.length>1?api.conf.playlist:[api.conf.clip];for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var id=typeof playlist[item].id!=="undefined"?fv_parse_sharelink(playlist[item].id.toString()):false;if(hash===id&&autoplay){console.log("fv_autoplay_exec for "+id,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var src=fv_parse_sharelink(playlist[item].sources[0].src);if(hash===src&&autoplay){console.log("fv_autoplay_exec for "+src,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}})}if(autoplay&&flowplayer.support.firstframe){jQuery(".flowplayer[data-fvautoplay]").each(function(){var root=jQuery(this),api=root.data("flowplayer"),autoplay=root.attr("data-fvautoplay");if(!fv_player_did_autoplay&&autoplay){if(!((flowplayer.support.android||flowplayer.support.iOS)&&api&&api.conf.clip.sources[0].type=="video/youtube")){fv_player_did_autoplay=true;api.load();var play_icon=root.find(".fp-play").addClass("invisible"),control_bar=root.find(".fp-controls").addClass("invisible");api.one("progress",function(){play_icon.removeClass("invisible");control_bar.removeClass("invisible")});if(autoplay=="muted"){api.mute(true,true)}}}})}}function fv_player_video_link_autoplay_can(api,item){var video=item?api.conf.playlist[item]:api.conf.clip;if(video.sources[0].type=="video/youtube"&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())return false;return flowplayer.support.firstframe}function fv_player_notice(root,message,timeout){var notices=jQuery(".fvfp-notices",root);if(!notices.length){notices=jQuery('<div class="fvfp-notices">');jQuery(".fp-player",root).append(notices)}var notice=jQuery('<div class="fvfp-notice-content">'+message+"</div></div>");notices.append(notice);if(typeof timeout=="string"){var player=jQuery(root).data("flowplayer");player.on(timeout,function(){notice.fadeOut(100,function(){jQuery(this).remove()})})}if(timeout>0){setTimeout(function(){notice.fadeOut(2e3,function(){jQuery(this).remove()})},timeout)}return notice}var fv_player_clipboard=function(text,successCallback,errorCallback){try{fv_player_doCopy(text);successCallback()}catch(e){if(typeof errorCallback!="undefined")errorCallback(e)}};function fv_player_doCopy(text){var textarea=document.createElement("textarea");textarea.value=text;textarea.style.opacity=0;textarea.style.position="absolute";textarea.setAttribute("readonly",true);document.body.appendChild(textarea);var selected=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):false;if(navigator.userAgent.match(/ipad|ipod|iphone/i)){var editable=textarea.contentEditable;textarea.contentEditable=true;var range=document.createRange();range.selectNodeContents(textarea);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range);textarea.setSelectionRange(0,999999);textarea.contentEditable=editable}else{textarea.select()}try{var result=document.execCommand("copy");if(selected){document.getSelection().removeAllRanges();document.getSelection().addRange(selected)}document.body.removeChild(textarea);return result}catch(err){throw new Error("Unsuccessfull")}}if(localStorage.FVPlayerHLSQuality&&typeof flowplayer.conf.hlsjs.autoLevelEnabled=="undefined"){flowplayer.conf.hlsjs.startLevel=localStorage.FVPlayerHLSQuality}flowplayer(function(api,root){var hlsjs;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});root=jQuery(root);var search=document.location.search;if(localStorage.FVPlayerDashQuality){if(!api.conf.dash)api.conf.dash={};api.conf.dash.initialVideoQuality="restore"}if(localStorage.FVPlayerHLSQuality&&typeof flowplayer.conf.hlsjs.autoLevelEnabled=="undefined"){flowplayer.conf.hlsjs.startLevel=localStorage.FVPlayerHLSQuality}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){flowplayer.conf.hlsjs.startLevel=3}api.bind("quality",function(e,api,quality){if(api.engine.engineName=="dash"){if(quality==-1){localStorage.removeItem("FVPlayerDashQuality")}else if(bitrates[quality]){localStorage.FVPlayerDashQuality=bitrates[quality].height}}else if(api.engine.engineName=="hlsjs-lite"){if(quality==-1){localStorage.removeItem("FVPlayerHLSQuality")}else{localStorage.FVPlayerHLSQuality=quality}}});var bitrates=[];var last_quality=-1;api.bind("ready",function(e,api){root.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality);if(api.engine.engineName=="dash"){bitrates=api.engine.dash.getBitrateInfoListFor("video");if(localStorage.FVPlayerDashQuality&&api.conf.dash.initialVideoQuality){api.quality(api.conf.dash.initialVideoQuality)}quality_sort()}else if(api.engine.engineName=="hlsjs-lite"){if(api.video.qualities&&api.video.qualities.length>2){var qswitch=-1;if(localStorage.FVPlayerHLSQuality){jQuery(api.video.qualities).each(function(k,v){if(v.value==localStorage.FVPlayerHLSQuality){qswitch=localStorage.FVPlayerHLSQuality;return false}})}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){jQuery(api.video.qualities).each(function(k,v){var height=parseInt(v.label);if(height>0&&hd_quality==-1&&height>=720&&height<=720){qswitch=k}})}if(qswitch>-1){api.quality(qswitch);root.one("progress",function(){setTimeout(function(){api.quality(qswitch)})})}quality_sort()}}else if(api.video.sources_fvqs&&api.video.sources_fvqs.length>0&&api.video.src.match(/vimeo.*?\.mp4/)){setTimeout(quality_sort,0)}root.find("a[data-quality]").removeClass("is-current")});if(search.match(/dash_debug/)||search.match(/hls_debug/))var debug_log=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find(".fp-player"));api.bind("ready progress",quality_process);api.bind("quality",function(){setTimeout(quality_process,0)});function quality_process(){if(api.engine.engineName=="dash"){var stream_info=bitrates[api.engine.dash.getQualityFor("video")];if(stream_info.qualityIndex!=last_quality){last_quality=stream_info.qualityIndex;quality_label(stream_info.qualityIndex,bitrates)}if(search.match(/dash_debug/))quality_debug(stream_info.width,stream_info.height,stream_info.bitrate)}else if(api.engine.engineName=="hlsjs-lite"){if(hlsjs.currentLevel!=last_quality){last_quality=hlsjs.currentLevel;quality_label(hlsjs.currentLevel,hlsjs.levels)}if(search.match(/hls_debug/)){var level=hlsjs.levels[hlsjs.currentLevel];quality_debug(level.width,level.height,level.bitrate)}}}function quality_label(index,qualities){if(!qualities[index])return;var height=qualities[index].height,hd_limit=541,lowest=1e5;jQuery(qualities).each(function(k,v){if(v.height>=720&&v.height<1400)hd_limit=720;if(v.height<lowest)lowest=v.height});root.find("a[data-quality]").removeClass("is-current");root.find("a[data-quality="+index+"]").addClass("is-current");var label="SD";if(height>=360&&lowest<height)label="SD";if(height>=hd_limit)label="HD";if(height>=1400)label="4K";root.find(".fp-qsel").html(label)}function quality_debug(w,h,br){debug_log.html("Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps")}function quality_sort(){var menu=root.find(".fp-qsel-menu");menu.children().each(function(i,a){menu.prepend(a)});menu.children().each(function(i,a){if(/^NaNp/.test(jQuery(a).html())){var bitrate=jQuery(a).html().match(/\((.*?)\)/);if(bitrate&&typeof bitrate[1]!=="undefined"){jQuery(a).html(bitrate[1])}}else{jQuery(a).html(jQuery(a).html().replace(/\(.*?\)/,""))}});menu.prepend(menu.find("a[data-quality=-1]"));menu.prepend(menu.find("strong"))}});flowplayer(function(api,root){root=jQuery(root);var player_id=root.attr("id"),ad=false;if(root.data("end_popup_preview")){jQuery(document).ready(function(){api.trigger("finish",[api])})}function ad_height_check(){var count=0;var ad_height_check=setInterval(function(){var height=ad&&ad.find(".adsbygoogle").height();count++;if(count>20*10||height>0)clearInterval(ad_height_check);if(height>root.height()){ad.addClass("tall-ad")}},50)}function show_ad(){var ad_data=root.attr("data-ad");if(typeof ad_data!="undefined"&&ad_data.length){try{ad_data=JSON.parse(ad_data)}catch(e){return false}if(!ad&&!root.hasClass("is-cva")&&root.width()>=parseInt(ad_data.width)){var html=ad_data.html;html=html.replace("%random%",Math.random());ad=jQuery('<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+"</div>");root.find(".fp-player").append(ad);ad_height_check();setTimeout(function(){if(root.find(".wpfp_custom_ad video").length){api.pause()}},500)}}}function show_popup(event){var popup_data=root.attr("data-popup");if(typeof popup_data!="undefined"&&popup_data.length){try{popup_data=JSON.parse(popup_data)}catch(e){return false}if(event=="finish"||popup_data.pause||popup_data.html.match(/fv-player-ppv-purchase-btn-wrapper/)){root.addClass("is-popup-showing");root.find(".fp-player").append('<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+popup_data.html+"</div>")}}}api.bind("ready",function(e,api){if(ad.length==1){ad.remove();ad=false}if(!root.data("ad_show_after")){show_ad()}}).bind("progress",function(e,api,current){if(current>root.data("ad_show_after")){show_ad()}}).bind("finish",function(e,api){if(typeof api.video.index=="undefined"||api.video.index+1==api.conf.playlist.length){show_popup(e.type)}}).bind("pause",function(e,api){show_popup(e.type)}).bind("resume unload seek",function(e,api){if(root.hasClass("is-popup-showing")){root.find(".wpfp_custom_popup").remove();root.removeClass("is-popup-showing")}})});jQuery(document).on("click",".fv_fp_close",function(){var ad=jQuery(this).parents(".wpfp_custom_ad_content"),video=ad.find("video");ad.fadeOut();if(video.length)video[0].pause();return false});jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(true)});jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(false)});flowplayer(function(api,root){var root=jQuery(root);var bean=flowplayer.bean;var time=0,last=0,timer,event_name;if(typeof ga=="undefined"&&api.conf.fvanalytics&&typeof _gat=="undefined"&&typeof gtag=="undefined"){jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:true},function(){ga("create",api.conf.fvanalytics,"auto")})}if(!window._paq&&api.conf.matomo_domain&&api.conf.matomo_site_id){var u="//"+api.conf.matomo_domain+"/";var _paq=window._paq=window._paq||[];_paq.push(["setTrackerUrl",u+"matomo.php"]);_paq.push(["setSiteId",api.conf.matomo_site_id]);var d=document,g=d.createElement("script"),s=d.getElementsByTagName("script")[0];g.type="text/javascript";g.async=true;g.src=u+"matomo.js";s.parentNode.insertBefore(g,s)}api.bind("progress",function(e,api,current){fv_track(e,api,current)}).bind("finish ready ",function(e,api){for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;root.removeData("fv_track_"+fv_ga_events[j])}}).bind("error",function(e,api,error){setTimeout(function(){if(!api.error)return;var video=typeof api.video!="undefined"&&typeof api.video.src!="undefined"?api.video:false;if(!video&&typeof api.conf.clip!="undefined"&&typeof api.conf.clip.sources!="undefined"&&typeof api.conf.clip.sources[0]!="undefined"&&typeof api.conf.clip.sources[0].src!="undefined")video=api.conf.clip.sources[0];var name=fv_player_track_name(root,video);if(name&&!name.match(/\/\/vimeo.com\/\d/)){fv_player_track(false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+"error",error.message,name)}},100)});api.bind("load unload",fv_track_seconds_played).bind("progress",function(){if(!api.seeking){time+=last?+new Date-last:0;last=+new Date}if(!timer){timer=setTimeout(function(){timer=null;fv_player_track(false,"Flowplayer heartbeat",api.engine.engineName+"/"+api.video.type,"Heartbeat",0)},10*60*1e3)}}).bind("pause",function(){last=0});api.bind("shutdown",function(){bean.off(window,"unload",fv_track_seconds_played)});bean.on(window,"unload",fv_track_seconds_played);var fv_ga_events=["start","first quartile","second quartile","third quartile","complete"];function fv_track_seconds_played(e,api_not_needed,video){video=video||api.video;if(e.type==="load"){event_name=fv_player_track_name(root,video)}if(time){fv_player_track(false,"Video / Seconds played",api.engine.engineName+"/"+api.video.type,event_name,Math.round(time/1e3));time=0;if(timer){clearTimeout(timer);timer=null}}}function fv_track(e,api,data){var video=api.video,dur=video.duration,i=0;var name=fv_player_track_name(root,video);if(dur){if(data>19*dur/20)i=4;else if(data>3*dur/4)i=3;else if(data>dur/2)i=2;else if(data>dur/4)i=1}if(api.live)i=0;if(root.data("fv_track_"+fv_ga_events[i]))return;for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;if(j==i)break;if(!root.data("fv_track_"+fv_ga_events[j]))return}root.trigger("fv_track_"+fv_ga_events[i].replace(/ /,"_"),[api,name]);root.data("fv_track_"+fv_ga_events[i],true);fv_player_track(false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+fv_ga_events[i],api.engine.engineName+"/"+video.type,name)}api.get_time_played=function(){return time/1e3}});function fv_player_track(ga_id,event,engineType,name,value){if(!ga_id)ga_id=flowplayer.conf.fvanalytics;if(typeof engineType=="undefined")engineType="Unknown engine";if(/fv_player_track_debug/.test(window.location.href))console.log("FV Player Track: "+event+" - "+engineType+" '"+name+"'",value);if(typeof gtag!="undefined"){gtag("event",event,{event_category:engineType,event_label:name,value:value?value:1})}else if(ga_id&&typeof ga!="undefined"){ga("create",ga_id,"auto",name,{allowLinker:true});ga("require","linker");if(value){ga("send","event",event,engineType,name,value)}else{ga("send","event",event,engineType,name)}}else if(ga_id&&typeof _gat!="undefined"){var tracker=_gat._getTracker(ga_id);if(typeof tracker._setAllowLinker=="undefined"){return}tracker._setAllowLinker(true);if(value){tracker._trackEvent(event,engineType,name,value)}else{tracker._trackEvent(event,engineType,name)}}if(flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&typeof _paq!="undefined"){if(value){_paq.push(["trackEvent",event,engineType,name,value])}else{_paq.push(["trackEvent",event,engineType,name])}}}function fv_player_track_name(root,video){var name=root.attr("title");if(!name&&typeof video.fv_title!="undefined")name=video.fv_title;if(!name&&typeof video.src!="undefined"){name=video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"");if(video.type.match(/mpegurl/))name=video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+name}return name}flowplayer(function(api,root){root=jQuery(root);var player=root.find(".fp-player"),had_no_volume=root.hasClass("no-volume"),had_fp_mute=root.hasClass("fp-mute"),had_fp_full=root.hasClass("fp-full"),had_fp_slim=root.hasClass("fp-slim"),timeline=root.find(".fp-timeline"),buttons_count=0;function check_size(){var width=player.width()||root.width();if(width>900){jQuery(".fp-subtitle",root).addClass("is-wide")}else{jQuery(".fp-subtitle",root).removeClass("is-wide")}root.toggleClass("is-tiny",width<400);root.toggleClass("is-small",width<600&&width>=400);var too_narrow=width<480+buttons_count*35;if(!had_fp_full){root.toggleClass("fp-full",root.hasClass("has-abloop")||too_narrow)}if(had_fp_slim){root.toggleClass("fp-slim",!too_narrow||root.hasClass("has-abloop"))}var size="";if(width<400)size="is-tiny";else if(width<600&&width>=400)size="is-small";root.trigger("fv-player-size",[size]);var el=player;if(root.parent().hasClass("fp-playlist-vertical-wrapper")||root.parent().hasClass("fp-playlist-text-wrapper"))el=root.parent();if(el.width()<=560){el.addClass("is-fv-narrow")}else{el.removeClass("is-fv-narrow")}if(width<=320){root.addClass("no-volume fp-mute")}else{if(!had_no_volume)root.removeClass("no-volume");if(!had_fp_mute)root.removeClass("fp-mute")}}check_size();jQuery(window).on("resize",check_size);api.on("ready fullscreen fullscreen-exit",check_size);api.on("ready fullscreen fullscreen-exit",function(){setTimeout(function(){buttons_count=root.find(".fp-controls > strong:visible").length+root.find(".fp-controls > .fp-icon:visible").length;check_size()},0)});api.on("unload pause finish error",function(){if(typeof checker!=="undefined")clearInterval(checker)})});jQuery(window).on("resize tabsactivate",function(){jQuery(".fp-playlist-external").each(function(){var playlist=jQuery(this);if(playlist.parent().width()>=900)playlist.addClass("is-wide");else playlist.removeClass("is-wide")})}).trigger("resize");flowplayer(function(api,root){api.bind("ready",function(){if(/Chrome/.test(navigator.userAgent)&&parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)>54){if(api.video.subtitles){jQuery(root).addClass("chrome55fix-subtitles")}else{jQuery(root).addClass("chrome55fix")}}});root=jQuery(root);var image_src=root.css("background-image");if(image_src){image_src=image_src.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",");if(!image_src||!image_src[0].match(/^(https?:)?\/\//))return;var image=new Image;image.src=image_src[0];var image_ratio=image.height/image.width;var player_ratio=root.height()/root.width();var ratio_diff=Math.abs(player_ratio-image_ratio);if(ratio_diff<.05){root.css("background-size","cover")}}});(function($){$(window).on("resize",function(){var iframe=$("iframe[id][src][height][width]");iframe.each(function(){if($(this).attr("id").match(/(fv_vimeo_)|(fv_ytplayer_)/)&&$(this).width()<=$(this).attr("width"))$(this).height($(this).width()*$(this).attr("height")/$(this).attr("width"))});var wistia=jQuery(".wistia_embed");wistia.each(function(){$(this).height($(this).width()*$(this).data("ratio"))})}).trigger("resize")})(jQuery);jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(event,ui){var oldPlayer=jQuery(".flowplayer.is-playing").data("flowplayer");if(typeof oldPlayer!="undefined"){oldPlayer.pause()}var objPlayer=jQuery(".flowplayer",ui.newPanel);var api=objPlayer.data("flowplayer");api.load()});flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;if(root.hasClass("is-audio")){bean.off(root[0],"mouseenter");bean.off(root[0],"mouseleave");root.removeClass("is-mouseout");root.addClass("fixed-controls").addClass("is-mouseover");api.on("error",function(e,api,error){jQuery(".fp-message",root).html(jQuery(".fp-message",root).html().replace(/video/,"audio"))});root.click(function(e){if(!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}});flowplayer(function(api,root){if(!api.conf.fv_chromecast)return;if(!window["__onGCastApiAvailable"]){jQuery.getScript({url:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",cache:true});window["__onGCastApiAvailable"]=function(loaded){if(!loaded)return;initialize()}}var conf=api.conf.chromecast||{},session,timer,trigger,bean=flowplayer.bean,common=flowplayer.common,waiting_for_seek=false;function initialize(){var applicationId,sessionRequest,apiConfig;applicationId=conf.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID;sessionRequest=new chrome.cast.SessionRequest(applicationId);apiConfig=new chrome.cast.ApiConfig(sessionRequest,sessionListener,receiverListener);chrome.cast.initialize(apiConfig,onInitSuccess,onError)}function sessionListener(){}function receiverListener(ev){console.log("FV Player: Chromecast listener",ev);if(ev!==chrome.cast.ReceiverAvailability.AVAILABLE)return;flowplayer.conf.chromecast_available=true}function onInitSuccess(){}function onError(){console.log("chromecast onError")}function createUIElements(){var btnContainer=common.find(".fp-header",root)[0];if(!btnContainer)return;common.find(".fp-chromecast",btnContainer).forEach(common.removeNode);common.find(".fp-chromecast-engine",root).forEach(common.removeNode);trigger=common.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"});btnContainer.appendChild(trigger);var chromeCastEngine=common.createElement("div",{class:"fp-chromecast-engine"}),chromeCastStatus=common.createElement("p",{class:"fp-chromecast-engine-status"}),chromeCastIcon=common.createElement("p",{class:"fp-chromecast-engine-icon"});chromeCastEngine.appendChild(chromeCastIcon);chromeCastEngine.appendChild(chromeCastStatus);var engine=common.find(".fp-engine",root)[0];if(!engine)common.prepend(common.find(".fp-player",root)[0]||root,chromeCastEngine);else engine.parentNode.insertBefore(chromeCastEngine,engine)}function destroy(){clearInterval(timer);timer=null;api.release();common.toggleClass(root,"is-chromecast",false);common.toggleClass(trigger,"fp-active",false)}function get_media(){var media=false;var sources=api.video.sources_fvqs||api.video.sources;for(var i in sources){if(sources[i].type=="application/x-mpegurl"||sources[i].type=="video/mp4"||sources[i].type=="video/fv-mp4"){media=sources[i].src;break}}if(api.video.fvhkey)return false;if(media){var top_quality=false,mp4_qualities=["fullhd","hd","md","sd"];for(var quality in mp4_qualities){var re=new RegExp("-"+mp4_qualities[quality]);for(var i in api.video.sources_fvqs){var source=api.video.sources_fvqs[i];if(source.src.match(re)&&source.type=="video/mp4"){top_quality=source.src;break}}if(top_quality){media=top_quality;break}}}return media}function load_media(){var src=get_media();if(!src){return false}var cast_subtitles=[];if(api.video.subtitles){api.video.subtitles.forEach(function(v,k){var subtitles=new chrome.cast.media.Track(k,chrome.cast.media.TrackType.TEXT);subtitles.trackContentId=v.src;subtitles.trackContentType="text/vtt";subtitles.subtype=chrome.cast.media.TextTrackType.SUBTITLES;subtitles.name=v.label;subtitles.language=v.srclang+"-"+k,subtitles.customData=null;cast_subtitles.push(subtitles)})}var mediaInfo=new chrome.cast.media.MediaInfo(src);mediaInfo.tracks=cast_subtitles;var request=new chrome.cast.media.LoadRequest(mediaInfo);if(!api.live){request.currentTime=api.video.time}clearInterval(timer);timer=false;session.loadMedia(request,onMediaDiscovered,function onMediaError(e){console.log("onMediaError",e)})}function onMediaDiscovered(chromecast){switch_tracks(chromecast);chromecast.addUpdateListener(function(alive){if(!session)return;timer=timer||setInterval(function(){api.trigger("progress",[api,chromecast.getEstimatedTime()]);chromecast.activeTrackIds.forEach(function(track_id){jQuery.each(chromecast.media.tracks,function(k,v){if(v.trackId==track_id&&v.type=="AUDIO"){var found=hilight_audio_track("data-audio",v.language);if(!found){hilight_audio_track("data-lang",v.language)}return false}})})},500);if(alive){common.toggleClass(root,"is-chromecast",true);common.toggleClass(trigger,"fp-active",true);api.hijack({pause:function(){console.log("hijacked pause!");chromecast.pause()},resume:function(){if(api.finished){clearInterval(timer);timer=null;api.release();load_media();return}chromecast.play()},seek:function(time){var req=new chrome.cast.media.SeekRequest;req.currentTime=time;chromecast.seek(req)}})}var playerState=chromecast.playerState;if(api.paused&&playerState===chrome.cast.media.PlayerState.PLAYING)api.trigger("resume",[api]);if(api.playing&&playerState===chrome.cast.media.PlayerState.PAUSED)api.trigger("pause",[api]);if(api.seeking&&playerState===chrome.cast.media.PlayerState.BUFFERING){waiting_for_seek=true}if(api.seeking&&playerState===chrome.cast.media.PlayerState.PLAYING&&waiting_for_seek){waiting_for_seek=false;api.trigger("seek",[api])}if(playerState==chrome.cast.media.PlayerState.IDLE&&chromecast.idleReason==chrome.cast.media.IdleReason.FINISHED){api.trigger("finish",[api])}common.toggleClass(root,"is-loading",playerState===chrome.cast.media.PlayerState.BUFFERING)})}api.bind("ready",function(e,api,video){if(session){if(get_media()){api.one("progress",function(e,api){api.release();api.pause();api.mute(false,true);load_media()});api.mute(true,true)}else{session.stop();session=null;destroy();jQuery(trigger).hide()}return}if(!flowplayer.conf.chromecast_available)return;if(get_media()){createUIElements();jQuery(trigger).show()}else{FV_Flowplayer_Pro.log("FV Player Pro: Can't find media source suitable for Chromecast!");jQuery(trigger).hide()}});bean.on(root,"click",".fp-chromecast",function(ev){ev.preventDefault();if(session){api.trigger("pause",[api]);if(session.media[0].media){var seek=session.media[0].getEstimatedTime();setTimeout(function(){api.seek(seek)},0)}session.stop();session=null;destroy();return}if(api.playing)api.pause();chrome.cast.requestSession(function(s){jQuery(root).addClass("is-loading");session=s;var receiverName=session.receiver.friendlyName;common.html(common.find(".fp-chromecast-engine-status",root)[0],"Playing on device "+receiverName);load_media()},function(err){console.error("requestSession error",err)})});bean.on(root,"click",".fv-fp-hls-menu [data-audio], .fp-subtitle-menu [data-subtitle-index]",function(){if(session&&session.media[0].media){switch_tracks(session.media[0]);return false}});jQuery(window).on("unload",function(){if(session){session.stop()}});function hilight_audio_track(attr,chromecast_language){var audio_tracks_menu=jQuery(root).find(".fv-fp-hls-menu a"),found=false;audio_tracks_menu.each(function(k,el){if(jQuery(el).attr(attr)===chromecast_language){jQuery(el).addClass("fp-selected");found=true}else{jQuery(el).removeClass("fp-selected")}});return found}function switch_tracks(chromecast){console.log(chromecast.media.tracks);var audio=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("audio"),audio_lang=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("lang"),subtitle_index=jQuery(root).find(".fp-subtitle-menu [data-subtitle-index].fp-selected").data("subtitle-index"),subtitles=subtitle_index>-1?api.video.subtitles[subtitle_index].srclang:false;var audio_found=false,subtitles_found=false,tracks_selected=[];jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio&&v.type=="AUDIO"){audio_found=v}if(v.language==subtitles+"-"+subtitle_index&&v.type=="TEXT"){subtitles_found=v}});if(!audio_found){jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio_lang&&v.type=="AUDIO"){audio_found=v;return false}})}var debug_log="";if(audio_found){tracks_selected.push(audio_found.trackId);debug_log+=audio_found.language+" audio"}if(subtitles_found){tracks_selected.push(subtitles_found.trackId);if(debug_log)debug_log+=" ";debug_log+=subtitles_found.language+" subtitles"}if(tracks_selected){var request=new chrome.cast.media.EditTracksInfoRequest(tracks_selected);chromecast.editTracksInfo(request,function(){console.log("FV Player: Chromecast "+debug_log+" loaded")},function(){console.log("FV Player: Chromecast "+debug_log+" failed")})}}});jQuery(document).on("mfpClose",function(){if(typeof jQuery(".flowplayer").data("flowplayer")!="undefined")jQuery(".flowplayer").data("flowplayer").unload()});jQuery(document).on("click",".vc_tta-tab a",function(){var api=jQuery(".flowplayer.is-playing").data("flowplayer");if(api)api.pause()});flowplayer(function(api,root){root=jQuery(root);api.bind("ready",function(){setTimeout(function(){var video=jQuery("video",root);if(video.length>0){video.removeAttr("autoplay")}},100);root.find("video.fp-engine").addClass("intrinsic-ignore")})});jQuery(".flowplayer").on("ready",function(e,api){if(/BB10/.test(navigator.userAgent)){api.fullscreen()}});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var fv_flowplayer_safety_resize_init=false;jQuery(".flowplayer").each(function(){if(!jQuery(this).is(":visible")||jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||jQuery(this).hasClass("is-audio"))return;if(jQuery(this).width()<30||jQuery(this).height()<20){fv_flowplayer_safety_resize_init=true;var el=jQuery(this);while(jQuery(el).width()<30||jQuery(el).width()==jQuery(this).width()){if(jQuery(el).parent().length==0)break;el=jQuery(el).parent()}jQuery(this).width(jQuery(el).width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")));fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=el}});if(fv_flowplayer_safety_resize_init){jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){if(jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter"))return;if(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")))}})})}}if(typeof flowplayer.conf.safety_resize!="undefined"&&flowplayer.conf.safety_resize){jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)})}var isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);if(isIE11){jQuery(document).ready(function(){jQuery(".fp-waiting").hide()});flowplayer(function(api,root){api.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()})})}if(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"))})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}else if(location.href.match(/brizy-edit-iframe/)){console.log("FV Player: Brizy editor is active");setInterval(fv_player_load,1e3)}if(window.DELEGATE_NAMES){flowplayer(function(api,root){fv_player_notice(root,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}flowplayer(function(player,root){root=jQuery(root);if(typeof root.data("fv-embed")=="undefined"||!root.data("fv-embed")||root.data("fv-embed")=="false")return;player.embedCode=function(){var video=player.video;var width=root.width();var height=root.height();height+=2;if(root.hasClass("has-chapters")||root.hasClass("has-transcript")){height+=300}if(jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length>0){height+=150+20}var link=root.data("fv-embed")+"#"+fv_player_get_video_link_hash(player);return'<iframe src="'+link+'" allowfullscreen width="'+width+'" height="'+height+'" frameborder="0" style="max-width:100%"></iframe>'}});jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var button=jQuery(this);var player=button.parents(".flowplayer");var api=player.data("flowplayer");if(typeof api.embedCode=="function"){player.find(".embed-code textarea").val(api.embedCode())}fv_player_clipboard(player.find(".embed-code textarea").val(),function(){fv_player_notice(player,fv_flowplayer_translations.embed_copied,2e3)},function(){button.parents(".fvp-share-bar").find(".embed-code").toggle();button.parents(".fvp-share-bar").toggleClass("visible")});return false});flowplayer(function(player,root){if(!flowplayer.support.fullscreen&&player.conf.native_fullscreen&&typeof flowplayer.common.createElement("video").webkitEnterFullScreen==="function"){return}var FS_ENTER="fullscreen",FS_EXIT="fullscreen-exit",FS_SUPPORT=flowplayer.support.fullscreen,win=window,scrollX,scrollY;player.fullscreen=function(flag){var wrapper=jQuery(root).find(".fp-player")[0];if(player.disabled)return;if(flag===undefined)flag=!player.isFullscreen;if(flag){scrollY=win.scrollY;scrollX=win.scrollX}if(FS_SUPPORT){if(flag){["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(fName){if(typeof wrapper[fName]==="function"){wrapper[fName]({navigationUI:"hide"});if(fName==="webkitRequestFullScreen"&&!document.webkitFullscreenElement){wrapper[fName]()}}})}else{["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(fName){if(typeof document[fName]==="function"){document[fName]()}})}}else{player.trigger(flag?FS_ENTER:FS_EXIT,[player])}return player};player.on("fullscreen-exit",function(){if(player.engine.engineName=="fvyoutube")return;win.scrollTo(scrollX,scrollY);jQuery(window).one("scroll",function(){window.scrollTo(scrollX,scrollY)})})});flowplayer(function(api,root){root=jQuery(root);if(flowplayer.conf.wpadmin||jQuery(root).hasClass("is-audio"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),playlist_with_fullscreen=playlist.hasClass("fp-playlist-season")||playlist.hasClass("fp-playlist-polaroid");fsforce=root.data("fsforce")==true;if(flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||!flowplayer.support.fullscreen&&fsforce||playlist_with_fullscreen){if(!flowplayer.support.fullscreen){api.bind("ready",function(){api.fullscreen(true)})}root.on("click",function(){if(!api.ready||api.paused)api.fullscreen(true)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFullscreen){api.fullscreen();api.resume()}});api.on("resume",function(){if(!api.isFullscreen)api.fullscreen()});api.on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fullscreen(false)}).on("fullscreen",function(a,api){root.addClass("forced-fullscreen")}).on("fullscreen-exit",function(a,api){api.pause();root.removeClass("forced-fullscreen")})}else if(fsforce){var position,unload=root.find(".fp-unload"),is_closing=false;api.isFakeFullscreen=false;unload.show();root.on("click",function(e){if(!api.ready&&e.target!=unload[0])api.fakeFullscreen(true)});unload.on("click",function(e){if(api.ready){api.fullscreen(false)}else if(api.loading){is_closing=true;api.one("ready",function(e){api.unload()})}api.fakeFullscreen(false)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFakeFullscreen){api.fakeFullscreen();api.resume()}});api.on("resume",function(){if(!is_closing&&!api.isFakeFullscreen)api.fakeFullscreen()}).on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fakeFullscreen(false)}).on("fullscreen",function(a,api){root.removeClass("fake-fullscreen")}).on("fullscreen-exit",function(a,api){if(api.isFakeFullscreen)api.fakeFullscreen(true,true)}).on("unload",function(a,api){});api.fakeFullscreen=function(flag,force){if(!force&&(api.isFakeFullscreen==flag||api.disabled))return;if(position===undefined)position=root.css("position");if(flag===undefined)flag=!api.isFakeFullscreen;api.isFakeFullscreen=flag;api.trigger(flag?"fakefullscreen":"fakefullscreen-exit",[api]);root.toggleClass("is-fullscreen fake-fullscreen forced-fullscreen",flag);if(flag){root.css("position","fixed")}else{root.css("position",position)}}}if(flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen&&window.screen&&window.screen.orientation){api.on("fullscreen",function(a,api){if(api.video.width>api.video.height){screen.orientation.lock("landscape-primary")}else{screen.orientation.lock("portrait-primary")}})}});flowplayer(function(api,root){root=jQuery(root);var hlsjs,player,audioUXGroup,audioGroups,hls_audio_button,hls_audio_menu,mse=window.MediaSource||window.WebKitMediaSource;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});api.bind("ready",function(e,api){removeAudioMenu();if(hlsjs&&api.video.type=="application/x-mpegurl"){parseAudioTracksHlsJs(hlsjs);createAudioMenu()}});api.one("progress",function(){if(api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl"){parseAudioTracksSafari();createAudioMenu()}});function getVideoTagAudioTracks(){var video=root.find("video");if(video.length&&video[0].audioTracks){return video[0].audioTracks}return[]}function hilightAudioTrack(audioTrack){if(!audioTrack.name)audioTrack.name=audioTrack.label;root.find(".fv-fp-hls-menu a").each(function(k,el){jQuery(el).toggleClass("fp-selected",jQuery(el).attr("data-audio")===audioTrack.name)})}function createAudioMenu(){if(!audioUXGroup||audioUXGroup.length<2){return}hls_audio_button=jQuery('<strong class="fv-fp-hls">AUD</strong>');hls_audio_menu=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(root.find(".fp-controls"));hls_audio_menu.append("<strong>Audio</strong>");audioUXGroup.forEach(function(audioTrack){hls_audio_menu.append('<a data-audio="'+audioTrack.name+'" data-lang="'+audioTrack.lang+'">'+audioTrack.name+"</a>")});hls_audio_button.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();if(hls_audio_menu.hasClass("fp-active")){api.hideMenu(hls_audio_menu[0])}else{root.click();api.showMenu(hls_audio_menu[0])}});jQuery("a",hls_audio_menu).click(function(e){var adata=e.target.getAttribute("data-audio");if(hlsjs){var gid=hlsjs.audioTracks[hlsjs.audioTrack].groupId;var atrack=hlsjs.audioTracks.filter(function(at){return at.groupId===gid&&(at.name===adata||at.lang===adata)})[0];hlsjs.audioTrack=atrack.id;hilightAudioTrack(atrack)}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].label==adata){tracks[i].enabled=true;hilightAudioTrack(tracks[i])}}}});if(hlsjs){hilightAudioTrack(hlsjs.audioTracks[hlsjs.audioTrack])}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].enabled){hilightAudioTrack(tracks[i])}}}}function removeAudioMenu(){jQuery(hls_audio_menu).remove();jQuery(hls_audio_button).remove()}function parseAudioTracksHlsJs(data){audioGroups=[];audioUXGroup=[];data.levels.forEach(function(level){var agroup=level.attrs.AUDIO;if(agroup&&audioGroups.indexOf(agroup)<0){audioGroups.push(agroup)}if(audioGroups.length){audioUXGroup=data.audioTracks.filter(function(audioTrack){return audioTrack.groupId===audioGroups[0]})}})}function parseAudioTracksSafari(){audioGroups=[];audioUXGroup=[];var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;audioUXGroup.push({id:tracks[i].id,name:tracks[i].label})}}});flowplayer(function(api,root){var store_engine_pos=-1;var store_engine=false;api.on("error",function(e,api,err){if(err.code!=4||api.engine.engineName!="hlsjs")return;console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS");api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(flowplayer.engines).each(function(k,v){if(flowplayer.engines[k].engineName=="hlsjs"){store_engine_pos=k;store_engine=flowplayer.engines[k];delete flowplayer.engines[k]}});var index=typeof api.video.index!="undefined"?api.video.index:0;var video=index>0?api.conf.playlist[index].sources:api.conf.clip.sources;video.index=index;api.load({sources:video});api.bind("unload error",function(){flowplayer.engines[store_engine_pos]=store_engine})})});flowplayer(function(api,root){var initialDelay=30,continueDelay=10,useDelay=initialDelay,retryLabel=fv_flowplayer_translations.live_stream_retry,timer;api.clearLiveStreamCountdown=function(){if(timer){clearInterval(timer);api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(root).find(".fp-message.fp-shown").remove();api.unload()}};api.conf.flashls={manifestloadmaxretry:2};api.on("ready",function(){useDelay=initialDelay;retryLabel=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){useDelay=continueDelay;retryLabel=fv_flowplayer_translations.live_stream_continue});api.on("error",function(e,api,err){setTimeout(function(){if(!api.conf.clip.live&&!api.conf.live&&!(err.video&&err.video.src.match(/\/\/vimeo.com\/event\//)))return;var delay=useDelay;if(api.conf.clip.streaming_time){delay=api.conf.clip.streaming_time-Math.floor(Date.now()/1e3)}else if(api.conf.clip.live_starts_in){delay=api.conf.clip.live_starts_in}var startLabel=fv_flowplayer_translations.live_stream_starting.replace(/%d/,secondsToDhms(delay));retryLabel=retryLabel.replace(/%d/,secondsToDhms(delay));var message=api.conf.clip.live_starts_in?startLabel:retryLabel;clearInterval(timer);if(err.code===1||err.code===2||err.code===4){root.className+=" is-offline";if(flowplayer.support.flashVideo){api.one("flashdisabled",function(){root.querySelector(".fp-flash-disabled").style.display="none"})}var messageElement=root.querySelector(".fp-ui .fp-message");messageElement.innerHTML=message;var reload_delay=delay>300?300:delay;timer=setInterval(function(){reload_delay-=1;delay-=1;if(reload_delay>0&&messageElement){messageElement.querySelector("span").innerHTML=secondsToDhms(delay)}else{clearInterval(timer);api.error=api.loading=false;if(messageElement){root.querySelector(".fp-ui").removeChild(messageElement)}root.className=root.className.replace(/\bis-(error|offline)\b/g,"");api.load()}},1e3)}},1)});function secondsToDhms(seconds){seconds=Number(seconds);var d=Math.floor(seconds/(3600*24));var h=Math.floor(seconds%(3600*24)/3600);var m=Math.floor(seconds%3600/60);var s=Math.floor(seconds%60);var t=fv_flowplayer_translations;var output=d>0?d==1?t.duration_1_day.replace(/%s/,d):t.duration_n_days.replace(/%s/,d):"";if(output&&h>0)output+=", ";output+=h>0?h==1?t.duration_1_hour.replace(/%s/,h):t.duration_n_hours.replace(/%s/,h):"";if(output&&m>0)output+=", ";output+=m>0?m==1?t.duration_1_minute.replace(/%s/,m):t.duration_n_minutes.replace(/%s/,m):"";if(output&&s>0)output+=t.and;output+=s>0?s==1?t.duration_1_second.replace(/%s/,s):t.duration_n_seconds.replace(/%s/,s):"";return output}});flowplayer(function(api,root){if(!flowplayer.support.browser.safari&&!flowplayer.support.iOS)return;root=jQuery(root);var video_tag=false,did_start_playing=false,are_waiting_already=0;api.on("ready",function(e,api,video){are_waiting_already=0;did_start_playing=false;if(api.engine.engineName=="html5"&&video.src.match(/\?/)){video_tag=root.find("video");if(!video_tag.data("fv-ios-recovery")){video_tag.on("waiting",wait_for_stalled);video_tag.data("fv-ios-recovery",true)}api.one("progress",function(){did_start_playing=true})}});api.bind("beforeseek",wait_for_stalled);function debug(e){console.log("FV PLayer: iOS video element: "+e.type)}function wait_for_stalled(){if(!did_start_playing){return}if(video_tag&&api.engine.engineName=="html5"){are_waiting_already++;if(are_waiting_already>1){if(are_waiting_already>3){console.log("FV PLayer: iOS video element needs a push, triggering 'stalled'");video_tag.trigger("stalled")}return}console.log("FV PLayer: iOS video element will trigger error after 'stalled' arrives");video_tag.one("stalled",function(){var time=api.video.time;if(api.video.type.match(/video\//)){console.log("FV PLayer: Running check of video file...");var test_video=document.createElement("video");test_video.src=api.video.src;test_video.onloadedmetadata=function(){are_waiting_already=0;console.log("FV Player: Video link works")};test_video.onerror=function(){console.log("FV Player: Video link issue!");if(are_waiting_already>0){api.trigger("error",[api,{code:4,video:api.video}])}};return}setTimeout(function(){console.log(api.video.time,time);if(api.video.time!=time){console.log("FV PLayer: iOS video element continues playing, no need for error");return}if(api.paused){console.log("FV PLayer: iOS video element paused, no need for error");return}api.trigger("error",[api,{code:4,video:api.video}])},5e3)})}}});!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(r+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var m=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,m):o(C,m)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===m){c=C;break}n||(c[m]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});flowplayer.bean.off(document,"keydown.fp");flowplayer(function(api,root){var bean=flowplayer.bean;if(!api.conf.keyboard)return;bean.on(root,"mouseenter mouseleave",function(e){fv_player_focused=!api.disabled&&e.type=="mouseover"?api:0;if(fv_player_focused)fv_player_focusedRoot=root});api.bind("ready",function(e,api,video){if(video.subtitles&&video.subtitles.length>0){var help=jQuery(root).find(".fp-help").html();help+='<div class="fp-help-section fp-help-subtitles"><p><em>c</em>cycle through subtitles</p></div>';jQuery(root).find(".fp-help").html(help)}else{jQuery(root).find(".fp-help-subtitles").remove()}})});flowplayer.bean.on(document,"keydown.fp",function(e){if(typeof fv_player_focused=="undefined")return;var api=fv_player_focused,focusedRoot=api?fv_player_focusedRoot:false,common=flowplayer.common;var el=api&&!api.disabled?api:0,metaKeyPressed=e.ctrlKey||e.metaKey||e.altKey,key=e.which,conf=el&&el.conf;if(common.hasClass(focusedRoot,"no-controlbar")||common.hasClass(focusedRoot,"is-cva"))return;if(!el||!conf.keyboard||el.disabled)return;if([63,187,191].indexOf(key)!=-1){common.toggleClass(focusedRoot,"is-help");return false}if(key==27&&common.hasClass(focusedRoot,"is-help")){common.toggleClass(focusedRoot,"is-help");return false}if(!metaKeyPressed&&el.ready){e.preventDefault();if(e.shiftKey){if(key==39)el.speed(true);else if(key==37)el.speed(false);else if(key==78)el.next();else if(key==80)el.prev();return}if(key<58&&key>47)return el.seekTo(key-48);switch(key){case 38:case 75:el.volume(el.volumeLevel+.15);break;case 40:case 74:el.volume(el.volumeLevel-.15);break;case 39:case 76:el.seeking=true;el.seek(api.video.time+5);break;case 37:case 72:el.seeking=true;el.seek(api.video.time-5);break;case 190:el.seekTo();break;case 32:el.toggle();break;case 70:if(conf.fullscreen)el.fullscreen();break;case 77:el.mute();break;case 81:el.unload();break;case 67:if(!api.video.subtitles||api.video.subtitles.length==0)break;var current_subtitles=jQuery(focusedRoot).find(".fp-dropdown li.active[data-subtitle-index]").data("subtitle-index");if(typeof current_subtitles=="undefined")current_subtitles=-1;current_subtitles++;if(current_subtitles>api.video.subtitles.length-1){current_subtitles=-1}api.trigger("fv-subtitles-switched");if(current_subtitles>-1){el.loadSubtitles(current_subtitles);fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_switched+" "+api.video.subtitles[current_subtitles].label,"fv-subtitles-switched")}else{el.disableSubtitles();fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_disabled,"fv-subtitles-switched")}break}}});flowplayer(function(api,root){api.bind("load",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){var live_check=setTimeout(function(){player.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>");player.addClass("is-error")},1e4);jQuery(e.currentTarget).data("live_check",live_check)}}).bind("ready",function(e,api,data){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){player.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)}})});(function($){flowplayer(function(api,root){if(jQuery(root).hasClass("is-cva"))return;$(document).on("submit","#"+jQuery(root).attr("id")+" .mailchimp-form",function(e){e.preventDefault();$(".mailchimp-response",root).remove();$("input[type=submit]",root).attr("disabled","disabled").addClass("fv-form-loading");var data={action:"fv_wp_flowplayer_email_signup"};$("[name]",this).each(function(){data[this.name]=$(this).val()});$.post(fv_player.ajaxurl,data,function(response){response=JSON.parse(response);$('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",root);if(response.text.match(/already subscribed/)){response.status="ERROR"}if(response.status==="OK"){$(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",root).val("");$(".mailchimp-response",root).removeClass("is-fv-error").html(response.text);setTimeout(function(){$(".wpfp_custom_popup",root).fadeOut()},2e3)}else{$(".mailchimp-response",root).addClass("is-fv-error").html(response.text)}$("input[type=submit]",root).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery);function fv_flowplayer_mobile_switch(id){var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery("#wpfp_"+id+" video source").each(function(){if(jQuery(this).attr("id")!="wpfp_"+id+"_mobile"){fv_fp_mobile=true;jQuery(this).remove()}});if(fv_fp_mobile){jQuery("#wpfp_"+id).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(typeof fv_flowplayer_mobile_switch_array!="undefined"){for(var i in fv_flowplayer_mobile_switch_array){if(!fv_flowplayer_mobile_switch_array.hasOwnProperty(i))continue;fv_flowplayer_mobile_switch(i)}}flowplayer(function(api,root){if(!api.conf.multiple_playback)return;root=jQuery(root);var instance_id=root.data("flowplayer-instance-id");flowplayer.audible_instance=-1;api.one("load",function(){setTimeout(function(){api.conf.splash=false},0)});api.on("ready",function(){var is_muted=root.data("volume")==0;if(!is_muted){jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){if(instance_id==jQuery(this).data("flowplayer-instance-id")||instance_id==flowplayer.audible_instance)return;var player=jQuery(this).data("flowplayer");if(player){if(player.playing){player.mute(true,true)}else{player.clearLiveStreamCountdown()}}});flowplayer.audible_instance=instance_id}}).on("mute",function(e,api,muted){if(!muted&&flowplayer.audible_instance!=instance_id){flowplayer(flowplayer.audible_instance).mute(true,true);flowplayer.audible_instance=instance_id}})});function fv_flowplayer_browser_ff_m4v(hash){if(flowplayer.support.browser&&flowplayer.support.browser.mozilla&&navigator.appVersion.indexOf("Win")!=-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ff_m4v_array!="undefined"){for(var i in fv_flowplayer_browser_ff_m4v_array){if(!fv_flowplayer_browser_ff_m4v_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ff_m4v(i)}}function fv_flowplayer_browser_chrome_fail(hash,sAttributes,sVideo,bAutobuffer){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&error!=null&&(error.code==3||error.code==4||error.code==5)){api.unload();jQuery("#wpfp_"+hash).attr("id","bad_wpfp_"+hash);jQuery("#bad_wpfp_"+hash).after('<div id="wpfp_'+hash+'" '+sAttributes+' data-engine="flash"></div>');jQuery("#wpfp_"+hash).flowplayer({playlist:[[{mp4:sVideo}]]});if(bAutobuffer){jQuery("#wpfp_"+hash).bind("ready",function(e,api){api.play()})}else{jQuery("#wpfp_"+hash).flowplayer().play(0)}jQuery("#bad_wpfp_"+hash).remove()}})}if(typeof fv_flowplayer_browser_chrome_fail_array!="undefined"){for(var i in fv_flowplayer_browser_chrome_fail_array){if(!fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(i))continue;fv_flowplayer_browser_chrome_fail(i,fv_flowplayer_browser_chrome_fail_array[i]["attrs"],fv_flowplayer_browser_chrome_fail_array[i]["mp4"],fv_flowplayer_browser_chrome_fail_array[i]["auto_buffer"])}}function fv_flowplayer_browser_ie(hash){if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)>=9||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ie_array!="undefined"){for(var i in fv_flowplayer_browser_ie_array){if(!fv_flowplayer_browser_ie_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ie(i)}}function fv_flowplayer_browser_chrome_mp4(hash){var match=window.navigator.appVersion.match(/Chrome\/(\d+)\./);if(match!=null){var chrome_ver=parseInt(match[1],10);if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<28&&navigator.appVersion.indexOf("Win")!=-1||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<27&&navigator.appVersion.indexOf("Linux")!=-1&&navigator.userAgent.toLowerCase().indexOf("android")==-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}}if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1||navigator.userAgent.toLowerCase().indexOf("android")!=-1){flowplayer(function(api,root){api.bind("error",function(e,api,error){if(error.code==10){jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)}})})}jQuery(document).ready(function(){if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1){jQuery(window).trigger("load")}jQuery(".flowplayer").mouseleave(function(){jQuery(this).find(".fvp-share-bar").removeClass("visible");jQuery(this).find(".embed-code").hide()})});if(!Date.now){Date.now=function(){return(new Date).getTime()}}(function($){var sendPositionsEvery=60,ajaxCall=null,maxCookieSize=2500,localStorageEnabled=null,cookieKeyName="video_positions",tempPositionCookieKeyName="video_positions_tmp",tempSawCookieKeyName="video_saw_tmp",playPositions=[],sawVideo=[],getSerialized=function(data){var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}return serialized},getVideoId=function(video){if(video.id){return video.id}var out=typeof video.sources_original!="undefined"&&typeof video.sources_original[0]!="undefined"?video.sources_original[0].src:video.sources[0].src;if(typeof video.sources_original=="undefined"||typeof video.sources_original[0]=="undefined"){out=removeAWSSignatures(out)}return out},getTextByteSize=function(txt){return encodeURIComponent(txt).length},getCookieKey=function(key){return localStorageEnabled?localStorage.getItem(key):Cookies.get(key)},setCookieKey=function(key,value){return localStorageEnabled?localStorage.setItem(key,value):Cookies.set(key,value)},removeCookieKey=function(key){if(localStorageEnabled){localStorage.removeItem(key)}{Cookies.remove(key)}},removeVideoPosition=function(e,api){if(api.video.sources){var video_id=getVideoId(api.video);playPositions[video_id]=0;sawVideo[video_id]=1}},removeAWSSignatures=function(videoURL){return videoURL.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,"")},sendVideoPositions=function(async,callback){var beaconSupported="sendBeacon"in navigator;if(async!==true){async=false}if(!callback||typeof callback=="undefined"){callback=function(){}}postData=[];for(var video_name in playPositions){if(!playPositions.hasOwnProperty(video_name))continue;postData.push({name:video_name,position:playPositions[video_name],saw:typeof sawVideo[video_name]!="undefined"?sawVideo[video_name]:false})}if(!postData.length){removeCookieKey(tempPositionCookieKeyName);removeCookieKey(tempSawCookieKeyName);return}if(flowplayer.conf.is_logged_in=="1"){if(beaconSupported){try{var temp_position_data={},temp_saw_data={};for(var i in postData){if(!postData.hasOwnProperty(i))continue;temp_position_data[postData[i].name]=postData[i].position;temp_saw_data[postData[i].name]=postData[i].saw}setCookieKey(tempPositionCookieKeyName,getSerialized(temp_position_data));setCookieKey(tempSawCookieKeyName,getSerialized(temp_saw_data))}catch(e){return}var fd=new FormData;fd.append("action","fv_wp_flowplayer_video_position_save");fd.append("videoTimes",encodeURIComponent(JSON.stringify(postData)));navigator.sendBeacon(fv_player.ajaxurl,fd);return false}else{return jQuery.ajax({type:"POST",async:async,url:fv_player.ajaxurl,complete:callback,data:{action:"fv_wp_flowplayer_video_position_save",videoTimes:postData}})}}else{try{var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){data=JSON.parse(data)}else{data={}}for(var i in postData){if(!postData.hasOwnProperty(i))continue;data[postData[i].name]=postData[i].position}var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}setCookieKey(cookieKeyName,serialized)}catch(e){return}}return false};flowplayer(function(api,root){var $root=jQuery(root),enabled=flowplayer.conf.video_position_save_enable&&$root.data("save-position")!="false"||$root.data("save-position"),progressEventsCount=0,seekIntoPosition=function(e,api){if(api.video&&api.video.live)return;var video_id=getVideoId(api.video),position=api.video.position;if(flowplayer.conf.is_logged_in!="1"){var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(data[video_id]){position=data[video_id]}}catch(e){return}}}if(!!api.get_custom_end&&api.get_custom_end()<position){position=false}if(!!api.get_custom_start&&api.get_custom_start()>0){if(position<api.get_custom_start()){position=false}}api.bind("progress",storeVideoPosition);if(position){seek(position)}},storeVideoPosition=function(e,api){if(api.live){return}if(api.video.sources){var video_id=getVideoId(api.video),position=Math.round(api.video.time);playPositions[video_id]=position;if(progressEventsCount++>=sendPositionsEvery&&flowplayer.conf.closingPage){if(ajaxCall){ajaxCall.abort()}ajaxCall=sendVideoPositions(true,function(){ajaxCall=null});progressEventsCount=0}}},forceSavePosition=function(e,api){var inPlaylist=false;for(var i in api.conf.playlist){if(!api.conf.playlist.hasOwnProperty(i))continue;inPlaylist=true;break}if(inPlaylist&&!flowplayer.conf.closingPage){progressEventsCount=sendPositionsEvery+1;storeVideoPosition(e,api);sendVideoPositions()}},seek=function(position){if(!!api.custom_seek){api.custom_seek(position);return}var seek_count=0;var do_seek=setInterval(function(){if(++seek_count>20)clearInterval(do_seek);if(api.loading)return;api.seek(parseInt(position));clearInterval(do_seek)},10)},processTempData=function(temp_data_name,video_id){var data=getCookieKey(temp_data_name),output=false;if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(typeof data[video_id]!="undefined"){output=data[video_id];delete data[video_id];var stillHasData=false;for(var i in data){if(!data.hasOwnProperty(i))continue;stillHasData=true;break}if(stillHasData){setCookieKey(temp_data_name,JSON.stringify(data))}else{removeCookieKey(temp_data_name)}}return output}catch(e){}}};if(!enabled)return;api.bind("finish",removeVideoPosition);api.one("progress",seekIntoPosition);api.playlist_thumbnail_progress=function(el,video,position){if(!!api.get_custom_start&&api.get_custom_start(video)>0){position-=api.get_custom_start(video);if(position<0)position=0}var duration=video.duration;if(!!api.get_custom_duration&&api.get_custom_duration()>0){duration=api.get_custom_duration()}if(!duration){duration=el.data("duration")}if(!duration)return;var progress=100*position/duration;el.css("width",progress+"%")};if(flowplayer.conf.is_logged_in=="1"){var playlist=api.conf.playlist.length>0?api.conf.playlist:[api.conf.clip],playlist_external=jQuery("[rel="+jQuery(root).attr("id")+"]");for(var i in playlist){if(!playlist.hasOwnProperty(i))continue;var video_id=getVideoId(playlist[i]),position=processTempData(tempPositionCookieKeyName,video_id),saw=processTempData(tempSawCookieKeyName,video_id);if(position){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].position=position;var playlist_progress=jQuery("a",playlist_external).eq(i).find(".fvp-progress");if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.conf.playlist[i],position)}}else{api.conf.clip.sources[0].position=position}}if(saw){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}}}}api.bind("finish",function(e,api){if(api.conf.playlist.length){api.conf.playlist[api.video.index].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}})});jQuery(window).on("beforeunload pagehide",function(){if(!flowplayer.conf.closingPage){flowplayer.conf.closingPage=true;sendVideoPositions()}});if(localStorageEnabled!==null){return localStorageEnabled}localStorageEnabled=true;try{localStorage.setItem("t","t");if(localStorage.getItem("t")!=="t"){localStorageEnabled=false}localStorage.removeItem("t")}catch(e){localStorageEnabled=false}})(jQuery);flowplayer(function(api,root){root=jQuery(root);if(api.conf.playlist.length==0)return;var real_videos=0;jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){real_videos++}});if(real_videos<2)return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");var playlist_button=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),playlist_menu=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(root.find(".fp-controls"));var i=0,item_index=[];jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){playlist_menu.append('<a data-index="'+k+'">'+(i+1)+". "+parse_title(playlist.find("h4").eq(i))+"</a>");item_index.push(k);i++}});playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).click(function(){if(typeof api.conf.playlist[jQuery(this).data("index")-1]!="undefined"&&typeof api.conf.playlist[jQuery(this).data("index")-1].click!="undefined"){api.play(jQuery(this).data("index")-1)}else{api.play(jQuery(this).data("index"))}});api.on("ready",function(e,api,video){playlist_menu.find("a").removeClass("fp-selected");var thumb=playlist_menu.find("a[data-index="+video.index+"]");thumb.addClass("fp-selected");var label=fv_flowplayer_translations.playlist_item_no;label=label.replace(/%d/,item_index.indexOf(api.video.index)+1);label=label.replace(/%s/,parse_title(thumb.find("h4")));playlist_button.html(label)});function parse_title(el){var tmp=el.clone();tmp.find("i.dur").remove();return tmp.text()}});flowplayer(function(api,root){root=jQuery(root);var playlist=api.conf.playlist;var videoIndex;api.bind("ready",function(e,api,video){videoIndex=video.index});api.bind("error",function(e,api,error){setTimeout(function(){if(playlist.length>0&&api.error==true){api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove();if(api.conf.video_checker=="1"&&playlist[videoIndex].video_checker&&playlist[videoIndex].video_checker.length>0){return false}if(videoIndex>=playlist.length-1){api.play(playlist.length-1)}else{api.play(videoIndex+2);videoIndex+=1}}},1e3)})});flowplayer(function(api,root){root=jQuery(root);var original_prev,original_next,random_seed;if(!root.data("button-no-picture")&&!root.data("button-repeat")&&!root.data("button-rewind"))return;api.bind("ready",function(e,api){if(typeof original_next=="undefined"&&typeof original_prev=="undefined"){original_next=api.next;original_prev=api.prev}if(!api.video.type.match(/^audio/)&&root.data("button-no-picture")&&root.find(".fv-fp-no-picture").length==0){var button_no_picture=jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>');button_no_picture.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();jQuery(".fp-engine",root).slideToggle(20);jQuery(this).toggleClass("is-active fp-color-fill")})}if(root.data("button-repeat")){if(api.conf.playlist.length>0&&root.find(".fv-fp-playlist").length==0){var t=fv_flowplayer_translations,playlist_button=jQuery('<strong class="fv-fp-playlist mode-normal"> <svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span> </strong>"),playlist_menu=jQuery('<div class="fp-menu fv-fp-playlist-menu"> <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_all+'</span></a> <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+t.playlist_shuffle+'</span></a> <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_video+'</span></a> <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span></a> </div>").insertAfter(root.find(".fp-controls"));api.conf.playlist_shuffle=api.conf.track_repeat=false;random_seed=randomize();var should_advance=api.conf.advance;playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.css("right")!=="auto"){playlist_menu.css({right:"auto",left:playlist_button.position().left+"px"})}if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).click(function(){jQuery(this).siblings("a").removeClass("fp-selected");jQuery(this).addClass("fp-selected");playlist_button.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var action=jQuery(this).data("action");if(action=="repeat_playlist"){playlist_button.addClass("mode-repeat-playlist");api.conf.loop=true;api.conf.advance=true;api.video.loop=api.conf.track_repeat=false;api.conf.playlist_shuffle=false}else if(action=="shuffle_playlist"){playlist_button.addClass("mode-shuffle-playlist");api.conf.loop=true;api.conf.advance=true;api.conf.playlist_shuffle=true}else if(action=="repeat_track"){playlist_button.addClass("mode-repeat-track");api.conf.track_repeat=api.video.loop=true;api.conf.loop=api.conf.playlist_shuffle=false}else if(action=="normal"){playlist_button.addClass("mode-normal");api.conf.track_repeat=api.video.loop=false;api.conf.loop=api.conf.playlist_shuffle=false}if(api.conf.playlist_shuffle){api.next=function(){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()};api.prev=function(){api.play(random_seed.shift());if(random_seed.length==0)random_seed=randomize()}}else{api.next=original_next;api.prev=original_prev}});if(api.conf.loop){jQuery("a[data-action=repeat_playlist]",playlist_menu).click()}api.on("progress",function(){api.video.loop=api.conf.track_repeat});api.on("finish.pl",function(e,api){console.log("playlist_repeat",api.conf.loop,"advance",api.conf.advance,"video.loop",api.video.loop);if(api.conf.playlist_shuffle){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()}})}else if(root.find(".fv-fp-track-repeat").length==0&&api.conf.playlist.length==0){var button_track_repeat=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>');button_track_repeat.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();jQuery(this).toggleClass("is-active fp-color-fill",api.video.loop);if(api.video.loop){api.video.loop=false}else{api.video.loop=true}});if(api.conf.loop){button_track_repeat.addClass("is-active fp-color-fill")}}}if(root.data("button-rewind")&&root.find(".fv-fp-rewind").length==0){var button_rewind=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');button_rewind.insertBefore(root.find(".fp-controls .fp-elapsed")).click(function(e){e.preventDefault();e.stopPropagation();api.seek(api.video.time-10)});button_rewind.toggle(!api.video.live)}}).bind("unload",function(){root.find(".fv-fp-no-picture").remove();root.find(".fv-fp-playlist").remove();root.find(".fv-fp-track-repeat").remove()});function array_shuffle(a){var j,x,i;for(i=a.length;i;i--){j=Math.floor(Math.random()*i);x=a[i-1];a[i-1]=a[j];a[j]=x}return a}function randomize(random_seed){random_seed=[];jQuery(api.conf.playlist).each(function(k,v){random_seed.push(k)});random_seed=array_shuffle(random_seed);console.log("FV Player Randomizer random seed:",random_seed);return random_seed}});flowplayer(function(api,root){var $root=jQuery(root),start_index=$root.data("playlist_start");if(typeof start_index=="undefined")return;function start_position_changer(){if($root.data("position_changed")!==1&&api.conf.playlist.length){start_index--;api.play(start_index);$root.data("position_changed",1)}}api.bind("unload",function(){start_index=$root.data("playlist_start");$root.removeData("position_changed");api.one("ready",start_position_changer);api.video.index=0});api.one("ready",start_position_changer);jQuery(".fp-ui",root).on("click",function(){start_position_changer();$root.data("position_changed",1)})});flowplayer(function(api,root){api.bind("finish",function(){var finished_at=api.video.time;if(api.video.loop){api.one("pause",function(){if(finished_at<=api.video.time){api.resume()}})}})});function fv_flowplayer_amazon_s3(hash,time){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){var fv_fp_date=new Date;if(error.code==4&&fv_fp_date.getTime()>fv_fp_utime+parseInt(time)){jQuery(e.target).find(".fp-message").delay(500).queue(function(n){jQuery(this).html(fv_flowplayer_translations.video_expired);n()})}})}flowplayer(function(api,root){root=jQuery(root);root.find(".fp-logo").removeAttr("href");if(root.hasClass("no-controlbar")){var timelineApi=api.sliders.timeline;timelineApi.disable(true);api.bind("ready",function(){timelineApi.disable(true)})}jQuery(".fvfp_admin_error",root).remove();root.find(".fp-logo, .fp-header").click(function(e){if(e.target!==this)return;root.find(".fp-ui").click()});jQuery(".fvp-share-bar .sharing-facebook",root).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",root).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",root).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",root).prepend(jQuery(".fvp-share-bar",root));if(api.conf.playlist.length){var show=true;var playlist=api.conf.playlist;if(playlist.length==2){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"){show=false}if(typeof playlist[0].click=="undefined"&&typeof playlist[1].click!="undefined"){show=false}}else if(playlist.length==3){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"&&typeof playlist[2].click!="undefined"){show=false}}if(show){var prev=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>');var next=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>');root.find(".fp-controls .fp-playbtn").before(prev).after(next);prev.click(function(){api.trigger("prev",[api]);api.prev()});next.click(function(){api.trigger("next",[api]);api.next()})}}api.bind("pause resume finish unload ready",function(e,api){root.addClass("no-brand")});api.one("ready",function(){root.find(".fp-fullscreen").clone().appendTo(root.find(".fp-controls"))});api.bind("ready",function(e,api,video){setTimeout(function(){jQuery(".fvp-share-bar",root).show();jQuery(".fv-player-buttons-wrap",root).appendTo(jQuery(".fv-player-buttons-wrap",root).parent().find(".fp-ui"))},100)});api.bind("finish",function(){var url=root.data("fv_redirect");if(url&&(typeof api.video.is_last=="undefined"||api.video.is_last)){location.href=url}});if(flowplayer.support.iOS&&flowplayer.support.iOS.version==11){api.bind("error",function(e,api,error){if(error.code==4)root.find(".fp-engine").hide()})}jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()});api.one("ready",function(e,api,video){root.find(".fp-chromecast").insertAfter(root.find(".fp-header .fp-fullscreen"))});root.find(".fp-waiting").html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');if(!flowplayer.support.fullscreen){var id=root.attr("id"),alternative=!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen;api.bind("fullscreen",function(e,api){jQuery("#wpadminbar, .nc_wrapper").hide();if(alternative){if(api.video.type=="video/youtube")return;root.before('<span data-fv-placeholder="'+id+'"></span>');root.appendTo("body")}});api.bind("fullscreen-exit",function(e,api,video){jQuery("#wpadminbar, .nc_wrapper").show();if(alternative)jQuery("span[data-fv-placeholder="+id+"]").replaceWith(root)})}});(function(){var extension=function(flowplayer){flowplayer(function(api,root){if(!jQuery(root).data("speedb"))return;var support=flowplayer.support;if(!support.video||!support.inlineVideo)return;var common=flowplayer.common,bean=flowplayer.bean,ui=common.find(".fp-ui",root)[0],controlbar=common.find(".fp-controls",ui)[0],speeds=api.conf.speeds;bean.on(root,"click",".fp-speed",function(){var menu=common.find(".fp-speed-menu",root)[0];if(common.hasClass(menu,"fp-active"))api.hideMenu();else api.showMenu(menu)});bean.on(root,"click",".fp-speed-menu a",function(ev){var s=ev.target.getAttribute("data-speed");api.speed(s)});api.on("speed",function(ev,_a,rate){if(speeds.length>1){selectSpeed(rate)}}).on("ready",function(ev,api){removeMenu();if(flowplayer.support.android&&api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl")return;speeds=api.conf.speeds;if(speeds.length>1){createMenu()}});function removeMenu(){common.find(".fp-speed-menu",root).forEach(common.removeNode);common.find(".fp-speed",root).forEach(common.removeNode)}function round(val){return Math.round(val*100)/100}function createMenu(){controlbar.appendChild(common.createElement("strong",{className:"fp-speed"},api.currentSpeed+"x"));var menu=common.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>");speeds.forEach(function(s){var a=common.createElement("a",{"data-speed":round(s)},round(s)+"x");menu.appendChild(a)});ui.appendChild(menu);selectSpeed(api.currentSpeed);jQuery(root).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed)}function selectSpeed(rate){common.find(".fp-speed",root)[0].innerHTML=rate+"x";common.find(".fp-speed-menu a",root).forEach(function(el){common.toggleClass(el,"fp-selected",el.getAttribute("data-speed")==rate);common.toggleClass(el,"fp-color",el.getAttribute("data-speed")==rate)})}})};if(typeof module==="object"&&module.exports)module.exports=extension;else if(typeof window.flowplayer==="function")extension(window.flowplayer)})();flowplayer(function(api,root){api.on("speed",function(ev,_a,rate){try{window.localStorage.fv_player_speed=rate}catch(e){}});api.on("ready",function(){if(window.localStorage.fv_player_speed&&jQuery(root).find("strong.fp-speed").is(":visible")){api.speed(parseFloat(window.localStorage.fv_player_speed))}if(jQuery(root).data("volume")==0){api.mute(true,true)}})});flowplayer(function(api,root){root=jQuery(root);if(!api.conf.fv_stats||!api.conf.fv_stats.enabled&&(!root.data("fv_stats")||root.data("fv_stats")=="no"))return;api.on("ready",function(e,api){api.one("progress",function(e,api){if(api.video.id){jQuery.post(api.conf.fv_stats.url,{blog_id:api.conf.fv_stats.blog_id,tag:"play",video_id:api.video.id})}})})});flowplayer(function(api,root){var $root=jQuery(root);var $playerDiv=$root.find(".fp-player");var sticky=$root.data("fvsticky");var globalSticky=false;var videoRatio=$root.data("ratio");if(typeof videoRatio=="undefined"){videoRatio=.5625}if(flowplayer.conf.sticky_video==1&&typeof sticky=="undefined"){globalSticky=true}if(globalSticky||sticky){if(flowplayer.support.firstframe){var stickyPlace=flowplayer.conf.sticky_place;var stickyWidth=flowplayer.conf.sticky_width;if(stickyWidth==""){stickyWidth=380}var stickyHeight=stickyWidth*videoRatio;fv_player_sticky_video()}else{return}}function fv_player_sticky_video(){var change=false;var $window=jQuery(window),$flowplayerDiv=$root,top=$flowplayerDiv.offset().top,offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);api.on("ready",function(){change=true});api.on("progress",function(){change=true});api.on("unload",function(){change=false;fv_player_sticky_class_remove();$root.removeClass("is-unSticky")});$window.on("resize",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2)}).on("scroll",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);if($window.scrollTop()>offset&&change){if(jQuery("div.flowplayer.is-unSticky").length>0){console.log("unSticky",jQuery("div.flowplayer.is-unSticky").length);return false}else{fv_player_sticky_class_add()}}else{fv_player_sticky_class_remove();change=false}})}function fv_player_sticky_class_add(){if($playerDiv.hasClass("is-sticky-"+stickyPlace)){return}else{$playerDiv.addClass("is-sticky-"+stickyPlace);if($root.find("a.fp-sticky").length==0){$root.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>')}$playerDiv.css("width",stickyWidth);$playerDiv.css("height",stickyHeight);$playerDiv.css("max-height",stickyHeight)}$playerDiv.parent(".flowplayer").addClass("is-stickable")}function fv_player_sticky_class_remove(){$playerDiv.removeClass("is-sticky-"+stickyPlace);$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");$playerDiv.parent(".flowplayer").removeClass("is-stickable")}});jQuery(function($){$(document).on("click","a.fp-sticky",function(){$("div.flowplayer.is-stickable").addClass("is-unSticky");var $playerDiv=$("div.flowplayer.is-stickable").find(".fp-player");$playerDiv.removeClass("is-sticky-right-bottom");$playerDiv.removeClass("is-sticky-left-bottom");$playerDiv.removeClass("is-sticky-right-top");$playerDiv.removeClass("is-sticky-left-top");$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","")});$(document).on("click","div.flowplayer.is-unSticky",function(){$("div.flowplayer").removeClass("is-unSticky")})});flowplayer(function(api,root){root=jQuery(root);api.on("ready",function(e,api,video){if(window.localStorage.fv_player_subtitle&&root.find("strong.fp-cc").is(":visible")){if(api.video.subtitles.length){api.video.subtitles.forEach(function(item,index){if(item.srclang===window.localStorage.fv_player_subtitle){api.loadSubtitles(index)}})}}root.find(".fp-subtitle-menu").click(function(e){if(typeof e.target.getAttribute("data-subtitle-index")=="string"&&e.target.getAttribute("data-subtitle-index").length){try{window.localStorage.fv_player_subtitle=api.video.subtitles[e.target.getAttribute("data-subtitle-index")].srclang}catch(e){}}})})});flowplayer(function(api,root){root=jQuery(root);var currentPoint,check=false;api.bind("cuepoint",function(e,api,cue){check=false;if(cue.subtitle){currentPoint=cue.index}});api.on("ready",function(e,api){root.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions);root.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)});root.on("click",".fp-subtitle-menu a[data-subtitle-index]",function(e){if(jQuery(this).data("subtitle-index")>-1){check=true;api.on("progress",time_check)}});function time_check(e,api,time){if(check){(api.cuepoints||[]).forEach(function(cue,index){var entry=cue.subtitle;if(entry&&currentPoint!=index){if(time>=cue.time&&(!entry.endTime||time<=entry.endTime)){api.trigger("cuepoint",[api,cue])}}})}}});if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links){flowplayer(function(api,root){if(jQuery(root).find(".sharing-link").length>0){var abEnd,abStart,hash,sTime;function update_link(abStartNew,abEndNew){hash=fv_player_get_video_link_hash(api);sTime=","+fv_player_time_hms(api.video.time);if(abStartNew&&abEndNew){abStart=","+fv_player_time_hms_ms(abStartNew+api.get_custom_start());abEnd=","+fv_player_time_hms_ms(abEndNew+api.get_custom_start())}else{var abEnabled=jQuery(root).find(".fv-player-ab.is-active").length;abEnd=abEnabled&&typeof api.get_ab_end()!="undefined"&&api.get_ab_end()?","+fv_player_time_hms_ms(api.get_ab_end()):"";abStart=abEnabled&&typeof api.get_ab_start()!="undefined"&&api.get_ab_start()?","+fv_player_time_hms_ms(api.get_ab_start()):""}jQuery(".sharing-link",root).attr("href",jQuery(".sharing-link",root).attr("href").replace(/#.*/,"")+"#"+hash+sTime+abStart+abEnd)}api.on("ready",function(e,api,video){if(!api.fv_noUiSlider)return;api.fv_noUiSlider.on("set",function(values){update_link(values[0],values[1])})});api.on("progress",function(e,api){if(!api.video.sources||!api.video.sources[0]){return}update_link()});jQuery(".sharing-link",root).click(function(e){fv_player_clipboard(jQuery(this).attr("href"),function(){e.preventDefault();fv_player_notice(root,fv_flowplayer_translations.link_copied,2e3)})})}});jQuery(document).on("click",'a[href*="fvp_"]',function(){var link=jQuery(this);setTimeout(function(){if(link.parents(".fvp-share-bar").length==0)fv_autoplay_exec()})})}flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;var restore=-1;root.on("click",".fp-volumebtn",function(e){if(api.volumeLevel==0&&restore!=-1){api.volume(restore);return false}});root.on("mousedown touchstart mouseup touchend",".fp-volumebar",function(e){if(api.volumeLevel!=0){restore=api.volumeLevel}});root.on("mousedown touchstart",".fp-volumebtn",function(e){if(api.volumeLevel>0){restore=-1}});api.on("volume",function(e,api){if(root.hasClass("is-mouseover")&&!api.muted){if(api.volumeLevel==0){bean.off(flowplayer.support.touch?root:document,"mousemove.sld touchmove.sld");api.mute(true)}}})});if(typeof flowplayer!="undefined"){flowplayer(function(api,root){root=jQuery(root);if(navigator.userAgent.match(/iPhone.* OS [0-6]_/i)){api.one("progress",function(e){if(typeof api.video.subtitles!=="undefined"&&api.video.subtitles.length){fv_player_warning(root,fv_flowplayer_translations.warning_iphone_subs)}})}if(flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}if(/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)){api.on("ready",function(e,api,video){setTimeout(function(){if(video.src&&video.src.match(/fpdl.vimeocdn.com/)&&(video.time==0||video.time==1)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox");api.on("progress",function(e,api){root.prev().find(".fv-player-warning-firefox").remove()})}},1500)});api.on("error",function(e,api,error){if(error.MEDIA_ERR_NETWORK==2&&error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}})}if(/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)){api.on("error",function(e,api,error){if(error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_old_safari)}})}var sup=flowplayer.support;if(sup.android&&(sup.android.samsung&&parseInt(sup.browser.version)<66||sup.browser.safari)){api.on("error",function(e,api,error){fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})}});function fv_player_warning(root,warning,classname){var wrapper=jQuery(root).prev(".fv-player-warning-wrapper");if(wrapper.length==0){jQuery(root).before('<div class="fv-player-warning-wrapper">');wrapper=jQuery(root).prev(".fv-player-warning-wrapper")}if(wrapper.find(".fv-player-warning-"+classname).length==0){var latest=jQuery("<p style='display: none' "+(classname?" class='fv-player-warning-"+classname+"'":"")+">"+warning+"</p>");wrapper.append(latest);latest.slideDown()}}}
1
+ !function(e){function t(e,t,n,r){for(var o,a=n.slice(),s=i(t,e),l=0,u=a.length;u>l&&(handler=a[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(s):handler.call(e,s),!s.stoppedImmediatePropagation);l++);return o=!s.stoppedPropagation,r&&o&&e.parentNode?e.parentNode.dispatchEvent(s):!s.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function r(e,t,r){var i=y(t||e,r);m(e,"textContent",n(function(){return i.get.call(this)},function(e){i.set.call(this,e)}))}function i(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function o(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function a(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function s(e){!f&&C.test(document.readyState)&&(f=!f,document.detachEvent(d,s),e=document.createEvent("Event"),e.initEvent(p,!0,!0),document.dispatchEvent(e))}function l(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var c=!0,f=!1,d="onreadystatechange",p="DOMContentLoaded",h="__IE8__"+Math.random(),g=e.Object,m=g.defineProperty||function(e,t,n){e[t]=n.value},v=g.defineProperties||function(t,n){for(var r in n)if(w.call(n,r))try{m(t,r,n[r])}catch(i){e.console&&console.log(r+" failed on object:",t,i.message)}},y=g.getOwnPropertyDescriptor,w=g.prototype.hasOwnProperty,b=e.Element.prototype,I=e.Text.prototype,M=/^[a-z]+$/,C=/loaded|complete/,A={},S=document.createElement("div");r(e.HTMLCommentElement.prototype,b,"nodeValue"),r(e.HTMLScriptElement.prototype,null,"text"),r(I,null,"nodeValue"),r(e.HTMLTitleElement.prototype,null,"text"),m(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(y(e.CSSStyleSheet.prototype,"cssText"))),v(b,{textContent:{get:a,set:l},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,r){var i,a=this,s="on"+e,l=a[h]||m(a,h,{value:{}})[h],c=l[s]||(l[s]={}),f=c.h||(c.h=[]);if(!w.call(c,"w")){if(c.w=function(e){return e[h]||t(a,u(a,e),f,!1)},!w.call(A,s))if(M.test(e))try{i=document.createEventObject(),i[h]=!0,9!=a.nodeType&&null==a.parentNode&&S.appendChild(a),a.fireEvent(s,i),A[s]=!0}catch(i){for(A[s]=!1;S.hasChildNodes();)S.removeChild(S.firstChild)}else A[s]=!1;(c.n=A[s])&&a.attachEvent(s,c.w)}o(f,n)<0&&f[r?"unshift":"push"](n)}},dispatchEvent:{value:function(e){var n,r=this,i="on"+e.type,o=r[h],a=o&&o[i],s=!!a;return e.target||(e.target=r),s?a.n?r.fireEvent(i,e):t(r,e,a.h,!0):(n=r.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h],s=a&&a[i],l=s&&s.h,u=l?o(l,t):-1;u>-1&&l.splice(u,1)}}}),v(I,{addEventListener:{value:b.addEventListener},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener}}),v(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h]||m(r,h,{value:{}})[h],s=a[i]||(a[i]={}),l=s.h||(s.h=[]);o(l,t)<0&&(r[i]||(r[i]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),r.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,r="on"+e.type,i=n[h],o=i&&i[r],a=!!o;return a&&(o.n?n.fireEvent(r,e):t(n,e,o.h,!0))}},removeEventListener:{value:b.removeEventListener}}),v(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),v(e.HTMLDocument.prototype,{textContent:{get:function(){return 11===this.nodeType?a.call(this):null},set:function(e){11===this.nodeType&&l.call(this,e)}},addEventListener:{value:function(t,n,r){var i=this;b.addEventListener.call(i,t,n,r),c&&t===p&&!C.test(i.readyState)&&(c=!1,i.attachEvent(d,s),e==top&&function o(e){try{i.documentElement.doScroll("left"),s()}catch(t){setTimeout(o,50)}}())}},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),v(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,r=/^(top|right|bottom|left)$/,i=/\-([a-z])/g,o=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,a,s,l=this._,u=l.style,c=l.currentStyle,f=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(i,o),t=c?c[e]:u[e],n.test(t)&&!r.test(e)&&(a=u.left,s=f&&f.left,s&&(f.left=c.left),u.left="fontSize"===e?"1em":t,t=u.pixelLeft+"px",u.left=a,s&&(f.left=s)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,r){return r?new t(n):new e(n)}}()},addEventListener:{value:function(n,r,i){var a,s=e,l="on"+n;s[l]||(s[l]=function(e){return t(s,u(s,e),a,!1)}),a=s[l][h]||(s[l][h]=[]),o(a,r)<0&&a[i?"unshift":"push"](r)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,r){var i="on"+t,a=(e[i]||g)[h],s=a?o(a,n):-1;s>-1&&a.splice(s,1)}}})}}(this),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.flowplayer=e()}}(function(){var e;return function(){function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}return e}()({1:[function(e,t,n){"use strict";var r=t.exports={},i=e("class-list"),o=window.jQuery,a=e("punycode"),s=e("computed-style");r.noop=function(){},r.identity=function(e){return e},r.removeNode=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},r.find=function(e,t){return o?o(e,t).toArray():(t=t||document,Array.prototype.map.call(t.querySelectorAll(e),function(e){return e}))},r.text=function(e,t){e["innerText"in e?"innerText":"textContent"]=t},r.findDirect=function(e,t){return r.find(e,t).filter(function(e){return e.parentNode===t})},r.hasClass=function(e,t){return"string"!=typeof e.className?!1:i(e).contains(t)},r.isSameDomain=function(e){var t=window.location,n=r.createElement("a",{href:e});return t.hostname===n.hostname&&t.protocol===n.protocol&&t.port===n.port},r.css=function(e,t,n){return"object"==typeof t?Object.keys(t).forEach(function(n){r.css(e,n,t[n])}):"undefined"!=typeof n?""===n?e?e.style.removeProperty(t):void 0:e?e.style.setProperty(t,n):void 0:e?s(e,t):void 0},r.createElement=function(e,t,n){try{var i=document.createElement(e);for(var a in t)t.hasOwnProperty(a)&&("css"===a?r.css(i,t[a]):r.attr(i,a,t[a]));return n&&(i.innerHTML=n),i}catch(s){if(!o)throw s;return o("<"+e+">"+n+"</"+e+">").attr(t)[0]}},r.toggleClass=function(e,t,n){if(e){var r=i(e);"undefined"==typeof n?r.toggle(t):n?r.add(t):n||r.remove(t)}},r.addClass=function(e,t){return r.toggleClass(e,t,!0)},r.removeClass=function(e,t){return r.toggleClass(e,t,!1)},r.append=function(e,t){return e.appendChild(t),e},r.appendTo=function(e,t){return r.append(t,e),e},r.prepend=function(e,t){e.insertBefore(t,e.firstChild)},r.insertAfter=function(e,t,n){t==r.lastChild(e)&&e.appendChild(n);var i=Array.prototype.indexOf.call(e.children,t);e.insertBefore(n,e.children[i+1])},r.html=function(e,t){e=e.length?e:[e],e.forEach(function(e){e.innerHTML=t})},r.attr=function(e,t,n){if("class"===t&&(t="className"),r.hasOwnOrPrototypeProperty(e,t))try{e[t]=n}catch(i){if(!o)throw i;o(e).attr(t,n)}else n===!1?e.removeAttribute(t):e.setAttribute(t,n);return e},r.prop=function(e,t,n){return"undefined"==typeof n?e&&e[t]:void(e[t]=n)},r.offset=function(e){var t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight&&(t={left:100*t.left,right:100*t.right,top:100*t.top,bottom:100*t.bottom,width:100*t.width,height:100*t.height}),t},r.width=function(e,t){if(t)return e.style.width=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).width;return"undefined"==typeof n?e.offsetWidth:n},r.height=function(e,t){if(t)return e.style.height=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).height;return"undefined"==typeof n?e.offsetHeight:n},r.lastChild=function(e){return e.children[e.children.length-1]},r.hasParent=function(e,t){for(var n=e.parentElement;n;){if("string"!=typeof t){if(n===t)return!0}else if(r.matches(n,t))return!0;n=n.parentElement}return!1},r.createAbsoluteUrl=function(e){return r.createElement("a",{href:e}).href},r.xhrGet=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===this.readyState?this.status>=400?n():void t(this.responseText):void 0},r.open("get",e,!0),r.send()},r.pick=function(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},r.hostname=function(e){return a.toUnicode(e||window.location.hostname)},r.browser={webkit:"WebkitAppearance"in document.documentElement.style},r.getPrototype=function(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__},r.hasOwnOrPrototypeProperty=function(e,t){for(var n=e;n;){if(Object.prototype.hasOwnProperty.call(n,t))return!0;n=r.getPrototype(n)}return!1},r.matches=function(e,t){var n=Element.prototype,r=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),r=0;n[r]&&n[r]!==t;)r++;return n[r]?!0:!1};return r.call(e,t)},function(e){function t(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})}"undefined"!=typeof e.setAttribute&&(e.setProperty=function(e,n){return this.setAttribute(t(e),String(n))},e.getPropertyValue=function(e){return this.getAttribute(t(e))||null},e.removeProperty=function(e){var n=this.getPropertyValue(e);return this.removeAttribute(t(e)),n})}(window.CSSStyleDeclaration.prototype)},{"class-list":36,"computed-style":37,punycode:44}],2:[function(e,t,n){"use strict";var r=e("../common");t.exports=function(e,t,n,i){n=n||"opaque";var o="obj"+(""+Math.random()).slice(2,15),a='<object class="fp-engine" id="'+o+'" name="'+o+'" ',s=navigator.userAgent.indexOf("MSIE")>-1;a+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+e+'" type="application/x-shockwave-flash">';var l={width:"100%",height:"100%",allowscriptaccess:"always",wmode:n,quality:"high",flashvars:"",movie:e+(s?"?"+o:""),name:o};"transparent"!==n&&(l.bgcolor=i||"#333333"),Object.keys(t).forEach(function(e){l.flashvars+=e+"="+t[e]+"&"}),Object.keys(l).forEach(function(e){a+='<param name="'+e+'" value="'+l[e]+'"/>'}),a+="</object>";var u=r.createElement("div",{},a);return r.find("object",u)},window.attachEvent&&window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})},{"../common":1}],3:[function(e,t,n){"use strict";function r(e){return/^https?:/.test(e)}var i,o=e("../flowplayer"),a=e("../common"),s=e("./embed"),l=e("extend-object"),u=e("bean");i=function(e,t){function n(e){function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))?"#"+t(e[1])+t(e[2])+t(e[3]):void 0}function c(e){if(7===e.length)return e;var t=e.split("").slice(1);return"#"+t.map(function(e){return e+e}).join("")}function f(e){return/application\/x-mpegurl/i.test(e.type)}var d,p,h,g,m=e.conf,v=[],y={engineName:i.engineName,pick:function(t){var n=l({},function(){if(o.support.flashVideo){for(var n,r,i=0;i<t.length;i++)if(r=t[i],/mp4|flv|flash/i.test(r.type)&&(n=r),e.conf.swfHls&&/mpegurl/i.test(r.type)&&(n=r),n&&!/mp4/i.test(n.type))return n;return n}}());if(n)return!n.src||r(n.src)||e.conf.rtmp||n.rtmp||(n.src=a.createAbsoluteUrl(n.src)),n},suspendEngine:function(){g=!0},resumeEngine:function(){g=!1},load:function(i){function w(e){return e.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}d=i,v.forEach(function(e){clearTimeout(e)});var b=a.findDirect("video",t)[0]||a.find(".fp-player > video",t)[0],I=i.src,M=r(I),C=function(){a.removeNode(b)},A=function(e){return e.some(function(e){return!!b.canPlayType(e.type)})};o.support.video&&a.prop(b,"autoplay")&&A(i.sources)?u.one(b,"timeupdate",C):C();var S=i.rtmp||m.rtmp;if(M||S||(I=a.createAbsoluteUrl(I)),h&&f(i)&&h.data!==a.createAbsoluteUrl(m.swfHls)&&y.unload(),h){["live","preload","loop"].forEach(function(e){i.hasOwnProperty(e)&&h.__set(e,i[e])}),Object.keys(i.flashls||{}).forEach(function(e){h.__set("hls_"+e,i.flashls[e])});var E=!1;if(!M&&S)h.__set("rtmp",S.url||S);else{var j=h.__get("rtmp");E=!!j,h.__set("rtmp",null)}h.__play(I,E||i.rtmp&&i.rtmp!==m.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15),I=w(I);var D={hostname:m.embedded?a.hostname(m.hostname):a.hostname(location.hostname),url:I,callback:p};t.getAttribute("data-origin")&&(D.origin=t.getAttribute("data-origin")),["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(e){m.hasOwnProperty(e)&&(D[e]=m[e]),i.hasOwnProperty(e)&&(D[e]=i[e]),(m.rtmp||{}).hasOwnProperty(e)&&(D[e]=(m.rtmp||{})[e]),(i.rtmp||{}).hasOwnProperty(e)&&(D[e]=(i.rtmp||{})[e])}),m.splash&&(D.autoplay=!0),m.rtmp&&(D.rtmp=m.rtmp.url||m.rtmp),i.rtmp&&(D.rtmp=i.rtmp.url||i.rtmp),Object.keys(i.flashls||{}).forEach(function(e){var t=i.flashls[e];D["hls_"+e]=t});var N="undefined"!=typeof i.hlsQualities?i.hlsQualities:m.hlsQualities;"undefined"!=typeof N&&(D.hlsQualities=N?encodeURIComponent(JSON.stringify(N)):N),void 0!==m.bufferTime&&(D.bufferTime=m.bufferTime),void 0!==m.bufferTimeMax&&(D.bufferTimeMax=m.bufferTimeMax),M&&delete D.rtmp,D.rtmp&&(D.rtmp=w(D.rtmp));var x,L=m.bgcolor||a.css(t,"background-color")||"";0===L.indexOf("rgb")?x=n(L):0===L.indexOf("#")&&(x=c(L)),D.initialVolume=e.volumeLevel;var T=f(i)?m.swfHls:m.swf;h=s(T,D,m.wmode,x)[0];var Z=a.find(".fp-player",t)[0];a.prepend(Z,h),e.off("quality.flashengine").on("quality.flashengine",function(t,n,r){var i="undefined"!=typeof e.video.hlsQualities?e.video.hlsQualities:e.conf.hlsQualities;if(i)try{h.__quality(r)}catch(o){e.debug("Error changing quality in flash engine",o)}}),setTimeout(function(){try{if(!h.PercentLoaded())return e.trigger("error",[e,{code:7,url:m.swf}])}catch(t){}},5e3),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e])},15e3)),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e,!1])},500)),e.off("resume.flashhack").on("resume.flashhack",function(){var t=setTimeout(function(){var t=h.__status().time,n=setTimeout(function(){e.playing&&!e.loading&&h.__status().time===t&&e.trigger("flashdisabled",[e])},400);v.push(n),e.one("seek.flashhack pause.flashhack load.flashack",function(){clearTimeout(n)})},800);v.push(t),e.one("progress",function(){clearTimeout(t)})}),h.pollInterval=setInterval(function(){if(h&&!g){var t=h.__status?h.__status():null;t&&((e.conf.live||e.live||i.live)&&(i.seekOffset=t.seekOffset,i.duration=t.duration+t.seekOffset),e.playing&&t.time&&t.time!==e.video.time&&e.trigger("progress",[e,t.time]),i.buffer=t.buffer/i.bytes*i.duration,e.trigger("buffer",[e,i.buffer]),!i.buffered&&t.time>0&&(i.buffered=!0,e.trigger("buffered",[e])))}},250),window[p]=function(n,r){var i=d;m.debug&&(0===n.indexOf("debug")&&r&&r.length?console.log.apply(console,["-- "+n].concat(r)):console.log("--",n,r));var o={type:n};switch(n){case"ready":r=l(i,r);break;case"click":o.flash=!0;break;case"keydown":o.which=r;break;case"seek":i.time=r;break;case"status":e.trigger("progress",[e,r.time]),r.buffer<i.bytes&&!i.buffered?(i.buffer=r.buffer/i.bytes*i.duration,e.trigger("buffer",i.buffer)):i.buffered||(i.buffered=!0,e.trigger("buffered"));break;case"metadata":var a=atob(r);r={key:a.substr(10,4),data:a.substr(21)}}"click"===n||"keydown"===n?(o.target=t,u.fire(t,n,[o])):"buffered"!=n&&"unload"!==n?setTimeout(function(){e.trigger(o,[e,r])},1):"unload"===n&&e.trigger(o,[e,r])}}},speed:a.noop,unload:function(){h&&h.__unload&&h.__unload();try{p&&window[p]&&delete window[p]}catch(n){}a.find("object",t).forEach(a.removeNode),h=0,e.off(".flashengine"),e.off(".flashhack"),clearInterval(h.pollInterval),v.forEach(function(e){clearTimeout(e)})}};return["pause","resume","seek","volume"].forEach(function(t){y[t]=function(n){try{e.ready&&(void 0===n?h["__"+t]():h["__"+t](n))}catch(r){if("undefined"==typeof h["__"+t])return e.trigger("flashdisabled",[e]);throw r}}}),y},i.engineName="flash",i.canPlay=function(e,t){return o.support.flashVideo&&/video\/(mp4|flash|flv)/i.test(e)||o.support.flashVideo&&t.swfHls&&/mpegurl/i.test(e)},o.engines.push(i)},{"../common":1,"../flowplayer":31,"./embed":2,bean:34,"extend-object":39}],4:[function(e,t,n){"use strict";function r(e){return"undefined"==typeof window.Hls?!1:/mpegurl/.test(e)&&window.Hls.isSupported()}var i,o=e("../flowplayer"),a=o.support,s=o.common,l=o.bean,u=e("./html5-factory");i=function(e,t){function n(n,r,u){var d=o.extend({recoverMediaError:!0},e.conf.hlsjs,n.hlsjs);e.engine.hls&&e.engine.hls.destroy();var p=e.engine.hls=new f(d);i.extensions.forEach(function(n){n({hls:p,player:e,root:t,videoTag:r})}),p.loadSource(n.src),u.resume=function(){e.live&&!e.dvr&&(r.currentTime=p.liveSyncPosition||0),r.play()},u.seek=function(t){try{e.live||e.dvr?r.currentTime=Math.min(t,p.liveSyncPosition||r.duration-d.livePositionOffset):r.currentTime=t}catch(n){e.debug("Failed to seek to ",t,n)}},d.bufferWhilePaused===!1&&e.on("pause",function(){p.stopLoad(),e.one("resume",function(){p.startLoad()})}),e.on("quality",function(e,t,n){p.nextLevel=a=n});var h,g,m=function(n){if(e.debug("hlsjs - recovery"),s.removeClass(t,"is-paused"),s.addClass(t,"is-seeking"),l.one(r,"seeked",function(){r.paused&&(s.removeClass(t,"is-poster"),e.poster=!1,r.play()),s.removeClass(t,"is-seeking")}),n)return p.startLoad();var i=performance.now();!h||i-h>3e3?(h=performance.now(),p.recoverMediaError()):(!g||i-g>3e3)&&(g=performance.now(),p.swapAudioCodec(),p.recoverMediaError())};return p.on(f.Events.MANIFEST_PARSED,function(t,i){var o,l=n.hlsQualities||e.conf.hlsQualities,u={},f=i.levels;if(l===!1)return p.attachMedia(r);if("drive"===l)switch(f.length){case 4:o=[1,2,3];break;case 5:o=[1,2,3,4];break;case 6:o=[1,3,4,5];break;case 7:o=[1,3,5,6];break;case 8:o=[1,3,6,7];break;default:o=f.length<3||f[0].height&&f[2].height&&f[0].height===f[2].height?[]:[1,2]}if(n.qualities=[{value:-1,label:"Auto"}],Array.isArray(l)){var d=l.find(function(e){return-1===e||e.level&&-1===e.level});d?n.qualities[0].label="number"!=typeof d?d.label:n.qualities[0].label:n.qualities=[],o=l.map(function(e){return"undefined"!=typeof e.level&&(u[e.level]=e.label),"undefined"!=typeof e.level?e.level:e})}var h=-2;n.qualities=n.qualities.concat(f.map(function(e,t){if(o&&-1===o.indexOf(t))return!1;var n=u[t]||Math.min(e.width,e.height)+"p";return u[t]||"drive"===l||(n+=" ("+Math.round(e.bitrate/1e3)+"k)"),t===a&&(h=t),{value:t,label:n}})).filter(s.identity);var g=n.quality=-2===h?n.qualities[0].value||-1:h;g!==p.currentLevel&&(p.currentLevel=g),p.attachMedia(r),c&&n.src!==c&&r.play(),c=n.src}),p.on(f.Events.ERROR,function(t,n){if(n.fatal)if(d.recoverNetworkError&&n.type===f.ErrorTypes.NETWORK_ERROR)m(!0);else if(d.recoverMediaError&&n.type===f.ErrorTypes.MEDIA_ERROR)m(!1);else{var r=5;n.type===f.ErrorTypes.NETWORK_ERROR&&(r=2),n.type===f.ErrorTypes.MEDIA_ERROR&&(r=3),p.destroy(),e.trigger("error",[e,{code:r}])}}),e.one("unload",function(){p.destroy()}),{handlers:{error:function(e,t){var n=t.error&&t.error.code;return d.recoverMediaError&&3===n||!n?(e.preventDefault(),m(!1),!0):d.recoverNetworkError&&2===n?(e.preventDefault(),m(!0),!0):void 0}}}}var a,c,f=window.Hls;return u("hlsjs-lite",e,t,r,n)},i.canPlay=function(e,t){return t.hlsjs===!1||t.clip&&t.clip.hlsjs===!1?!1:a.browser.safari&&!(t.clip&&t.clip.hlsjs||t.hlsjs||{}).safari?!1:o.support.video&&r(e)},i.engineName="hlsjs-lite",i.plugin=function(e){i.extensions.push(e)},i.extensions=[],o.engines.push(i)},{"../flowplayer":31,"./html5-factory":5}],5:[function(e,t,n){function r(e,t,n,r,a){function f(e,o,a,f){var p=n.getAttribute("data-flowplayer-instance-id");if(e.listeners&&e.listeners.hasOwnProperty(p))return void(e.listeners[p]=a);(e.listeners||(e.listeners={}))[p]=a,u.on(o,"error",function(n){try{r(n.target.getAttribute("type"))&&t.trigger("error",[t,{code:4,video:c(a,{src:e.src,url:e.src})}])}catch(i){}}),t.on("shutdown",function(){u.off(o),u.off(e,".dvrhack"),t.off(".loophack")});var h={},g=function(e){"metadata"===e.kind&&(e.mode="hidden",e.addEventListener("cuechange",function(){e.activeCues.length&&t.trigger("metadata",[t,e.activeCues[0].value])},!1))};return e&&e.textTracks&&e.textTracks.length&&Array.prototype.forEach.call(e.textTracks,g),e&&e.textTracks&&"function"==typeof e.textTracks.addEventListener&&e.textTracks.addEventListener("addtrack",function(e){g(e.track)},!1),(t.conf.dvr||t.dvr||a.dvr)&&u.on(e,"progress.dvrhack",function(){e.seekable.length&&(t.video.duration=e.seekable.end(null),t.video.seekOffset=e.seekable.start(null),t.trigger("dvrwindow",[t,{start:e.seekable.start(null),end:e.seekable.end(null)}]),e.currentTime>=e.seekable.start(null)||(e.currentTime=e.seekable.start(null)))}),Object.keys(d).forEach(function(r){var o=d[r];if("webkitendfullscreen"===r&&t.conf.disableInline&&(o="unload"),o){var u=function(u){if(a=e.listeners[p],u.target&&s.hasClass(u.target,"fp-engine")){/progress/.test(o)||t.debug(r,"->",o,u);var d=function(e){t.trigger(e||o,[t,h])};if(!t.ready&&!/ready|error/.test(o)||!o||!s.find("video",n).length)return void("resume"===o&&t.one("ready",function(){setTimeout(function(){d()})}));var h;if("unload"===o)return void t.unload();switch(o){case"ready":if(t.ready)return t.debug("Player already ready, not sending duplicate ready event");if(!(e.duration&&e.duration!==1/0||t.live))return t.debug("No duration and VOD setup, not sending ready event");if(h=c(a,{duration:e.duration<Number.MAX_VALUE?e.duration:0,width:e.videoWidth,height:e.videoHeight,url:e.currentSrc}),h.seekable=h.duration,t.debug("Ready: ",h),!t.live&&!h.duration&&!l.hlsDuration&&"loadeddata"===r){var g=function(){h.duration=e.duration;try{h.seekable=e.seekable&&e.seekable.end(null)}catch(t){}d(),e.removeEventListener("durationchange",g),s.toggleClass(n,"is-live",!1)};e.addEventListener("durationchange",g);var m=function(){t.ready||e.duration||(h.duration=0,s.addClass(n,"is-live"),d()),e.removeEventListener("timeupdate",m)};return void e.addEventListener("timeupdate",m)}break;case"progress":case"seek":if(e.currentTime>0||t.live)h=Math.max(e.currentTime,0);else if("seek"===o&&0===e.currentTime)h=0;else if("progress"==o)return;break;case"buffer":h=[];for(var v=0;v<e.buffered.length;v++)h.push({start:e.buffered.start(v),end:e.buffered.end(v)});e.buffered.length&&e.buffered.end(null)===e.duration&&d("buffered");break;case"speed":h=i(e.playbackRate);break;case"volume":h=i(e.muted?0:e.volume);break;case"error":try{if(f&&f.handlers&&f.handlers.error){var y=f.handlers.error(u,e);if(y)return}h=(u.srcElement||u.originalTarget).error,h.video=c(a,{src:e.src,url:e.src})}catch(w){return}}d()}};n.addEventListener(r,u,!0),h[r]||(h[r]=[]),h[r].push(u)}}),h}var p,h,g,m=s.findDirect("video",n)[0]||s.find(".fp-player > video",n)[0],v=t.conf;return g={engineName:e,pick:function(e){var t=l.video&&e.filter(function(e){return r(e.type)})[0];if(t)return"string"==typeof t.src&&(t.src=s.createAbsoluteUrl(t.src)),t},load:function(e){var r=s.find(".fp-player",n)[0],i=!1;if(m||(m=document.createElement("video"),s.prepend(r,m),m.autoplay=!!v.splash,i=!0),s.addClass(m,"fp-engine"),s.find("track",m).forEach(s.removeNode),m.preload="none",v.nativesubtitles||s.attr(m,"crossorigin",!1),v.disableInline||(m.setAttribute("webkit-playsinline","true"),m.setAttribute("playsinline","true")),l.inlineVideo||s.css(m,{position:"absolute",top:"-9999em"}),l.subtitles&&v.nativesubtitles&&e.subtitles&&e.subtitles.length){s.addClass(m,"native-subtitles");var c=e.subtitles,d=function(e){var t=m.textTracks;t.length&&(t[0].mode=e)};c.some(function(e){return!s.isSameDomain(e.src)})&&s.attr(m,"crossorigin","anonymous"),"function"==typeof m.textTracks.addEventListener&&m.textTracks.addEventListener("addtrack",function(){d("disabled"),d("showing")}),c.forEach(function(e){m.appendChild(s.createElement("track",{kind:"subtitles",srclang:e.srclang||"en",label:e.label||"en",src:e.src,default:e["default"]}))})}u.off(m,"timeupdate",s.noop),u.on(m,"timeupdate",s.noop),s.prop(m,"loop",!1),t.off(".loophack"),(e.loop||v.loop)&&t.on("finish.loophack",function(){t.resume()}),"undefined"!=typeof h&&(m.volume=h);var p=a(e,m,g);if(v.autoplay||v.splash||e.autoplay){t.debug("Autoplay / Splash setup, try to start video"),m.load();var y=function(){try{var e=m.play();if(e&&e["catch"]){var n=function(e){if("AbortError"===e.name&&20===e.code)return i?void 0:m.play()["catch"](n);if(!v.mutedAutoplay)throw new Error("Unable to autoplay");return t.debug("Play errored, trying muted",e),t.mute(!0,!0),m.play()};e["catch"](n)["catch"](function(){v.autoplay=!1,t.mute(!1,!0),t.trigger("stop",[t])})}}catch(r){t.debug("play() error thrown",r)}};m.readyState>0?y():u.one(m,"canplay",y)}if(g._listeners=f(m,s.find("source",m).concat(m),e,p)||g._listeners,!(v.autoplay||v.splash||e.autoplay)){var w=function(){o(n)&&(t.debug("player is in viewport, preload"),l.preloadMetadata?m.preload="metadata":m.load(),u.off(document,"scroll.preloadviewport"))};u.off(document,"scroll.preloadviewport"),u.on(document,"scroll.preloadviewport",function(){window.requestAnimationFrame(w)}),w()}},mute:function(e){m.muted=!!e,t.trigger("mute",[t,e]),t.trigger("volume",[t,e?0:m.volume])},pause:function(){m.pause()},resume:function(){m.play()},speed:function(e){m.playbackRate=e},seek:function(e){var n=m.paused||t.finished;try{m.currentTime=e,n&&u.one(m,"seeked",function(){m.pause()})}catch(r){}},volume:function(e){h=e,m&&(m.volume=e,e&&g.mute(!1))},unload:function(){u.off(document,"scroll.preloadviewport"),s.find("video.fp-engine",n).forEach(function(e){"MediaSource"in window?e.src=URL.createObjectURL(new MediaSource):e.src="",s.removeNode(e)}),p=clearInterval(p);var e=n.getAttribute("data-flowplayer-instance-id");delete m.listeners[e],m=0,g._listeners&&Object.keys(g._listeners).forEach(function(e){g._listeners[e].forEach(function(t){n.removeEventListener(e,t,!0)})})}}}function i(e,t){return t=t||100,Math.round(e*t)/t}function o(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t.height&&t.right<=(window.innerWidth||document.documentElement.clientWidth)+t.width}var a=e("../flowplayer"),s=a.common,l=a.support,u=a.bean,c=a.extend,f=l.browser.safari&&!l.iOS,d={ended:"finish",pause:"pause",play:"resume",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadedmetadata:f?0:"ready",canplaythrough:f?"ready":0,durationchange:"ready",error:"error",dataunavailable:"error",webkitendfullscreen:!a.support.inlineVideo&&"unload",progress:"buffer"};t.exports=r},{"../flowplayer":31}],6:[function(e,t,n){"use strict";function r(e){return/mpegurl/i.test(e)?"application/x-mpegurl":e}function i(e){return/^(video|application)/i.test(e)||(e=r(e)),!!u.canPlayType(e).replace("no","")}var o,a=e("../flowplayer"),s=a.common,l=e("./html5-factory"),u=document.createElement("video");o=function(e,t){return l("html5",e,t,i,function(e,t){t.currentSrc!==e.src?(s.find("source",t).forEach(s.removeNode),t.src=e.src,t.type=e.type):e.autoplay&&t.load()})},o.canPlay=function(e){return a.support.video&&i(e)},o.engineName="html5",a.engines.push(o)},{"../flowplayer":31,"./html5-factory":5}],7:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.on("ready",function(){var e=i.find("video.fp-engine",t)[0];e&&(e.setAttribute("x-webkit-airplay","allow"),window.WebKitPlaybackTargetAvailabilityEvent&&(e.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){if("available"===e.availability){var n=i.find(".fp-header",t)[0];i.find(".fp-airplay",n).forEach(i.removeNode);var r=i.createElement("a",{class:"fp-airplay fp-icon",title:"Play on AirPlay device"});n.appendChild(r)}}),e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var n=i.find(".fp-airplay",t)[0];n&&i.toggleClass(n,"fp-active",e.webkitCurrentPlaybackTargetIsWireless)})))}),o.on(t,"click",".fp-airplay",function(e){e.preventDefault();var n=i.find("video.fp-engine",t)[0];n.webkitShowPlaybackTargetPicker()})})},{"../common":1,"../flowplayer":31,bean:34}],8:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("./resolve").TYPE_RE,o=e("scriptjs"),a=e("bean");r(function(e,t){var n,r=e.conf.analytics,s=0,l=0;if(r){"undefined"==typeof _gat&&o("//google-analytics.com/ga.js");var u=function(){var e=_gat._getTracker(r);return e._setAllowLinker(!0),e},c=function(r,o,a){if(a=a||e.video,s&&"undefined"!=typeof _gat){var l=u();l._trackEvent("Video / Seconds played",e.engine.engineName+"/"+a.type,a.title||t.getAttribute("title")||a.src.split("/").slice(-1)[0].replace(i,""),Math.round(s/1e3)),s=0,n&&(clearTimeout(n),n=null)}};e.bind("load unload",c).bind("progress",function(){e.seeking||(s+=l?+new Date-l:0,l=+new Date),n||(n=setTimeout(function(){n=null;var e=u();e._trackEvent("Flowplayer heartbeat","Heartbeat","",0,!0)},6e5))}).bind("pause",function(){l=0}),e.bind("shutdown",function(){a.off(window,"unload",c)}),a.on(window,"unload",c)}})},{"../flowplayer":31,"./resolve":21,bean:34,scriptjs:45}],9:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("scriptjs");r(function(e,t){function n(){var e,t,n;e=g.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,r,s),chrome.cast.initialize(n,l,u)}function r(){console.log("sessionListener")}function s(e){e===chrome.cast.ReceiverAvailability.AVAILABLE&&c()}function l(){}function u(){console.log("onError")}function c(){var e=i.find(".fp-header",t)[0];if(e){i.find(".fp-chromecast",e).forEach(i.removeNode),i.find(".fp-chromecast-engine",t).forEach(i.removeNode),h=i.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"}),e.insertBefore(h,i.find(".fp-fullscreen",e)[0]);var n=i.createElement("div",{class:"fp-chromecast-engine"}),r=i.createElement("p",{class:"fp-chromecast-engine-status"}),o=i.createElement("p",{class:"fp-chromecast-engine-icon"});n.appendChild(o),n.appendChild(r);var a=i.find(".fp-engine",t)[0];a?a.parentNode.insertBefore(n,a):i.prepend(i.find(".fp-player",t)[0]||t,n)}}function f(){clearInterval(p),p=null,e.release(),i.toggleClass(t,"is-chromecast",!1),i.toggleClass(h,"fp-active",!1)}if(e.conf.chromecast!==!1){a("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"),window.__onGCastApiAvailable=function(e){e&&n()};var d,p,h,g=e.conf.chromecast||{};o.on(t,"click",".fp-chromecast",function(n){return n.preventDefault(),d?(e.trigger("pause",[e]),d.stop(),d=null,void f()):(e.playing&&e.pause(),void chrome.cast.requestSession(function(n){function r(n){n.addUpdateListener(function(r){if(d){p=p||setInterval(function(){e.trigger("progress",[e,n.getEstimatedTime()])},500),r?(i.toggleClass(t,"is-chromecast",!0),i.toggleClass(h,"fp-active",!0),e.hijack({pause:function(){n.pause()},resume:function(){n.play()},seek:function(e){var t=new chrome.cast.media.SeekRequest;t.currentTime=e,n.seek(t)}})):(f(),e.trigger("finish",[e]));var o=n.playerState;e.paused&&o===chrome.cast.media.PlayerState.PLAYING&&e.trigger("resume",[e]),e.playing&&o===chrome.cast.media.PlayerState.PAUSED&&e.trigger("pause",[e]),i.toggleClass(t,"is-loading",o===chrome.cast.media.PlayerState.BUFFERING)}})}d=n;var o=d.receiver.friendlyName;i.html(i.find(".fp-chromecast-engine-status")[0],"Playing on device "+o);var a=new chrome.cast.media.MediaInfo(e.video.src),s=new chrome.cast.media.LoadRequest(a);d.loadMedia(s,r,function(){})},function(e){console.error("requestSession error",e)}))})}})},{"../common":1,"../flowplayer":31,bean:34,scriptjs:45}],10:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){t.className=t.className.replace(a," "),e>=0&&i.addClass(t,"cue"+e)}function r(t){var n=t&&!isNaN(t.time)?t.time:t;return 0>n&&(n=e.video.duration+n),.125*Math.round(n/.125)}var a=/ ?cue\d+ ?/,s=!1,l={},u=-.125,c=function(t){n(t.index),e.trigger("cuepoint",[e,t])};e.on("progress",function(e,t,n){if(!s)for(var i=r(n);i>u;)u+=.125,l[u]&&l[u].forEach(c)}).on("unload",n).on("beforeseek",function(e){setTimeout(function(){e.defaultPrevented||(s=!0)})}).on("seek",function(e,t,i){n(),u=r(i||0)-.125,s=!1,!i&&l[0]&&l[0].forEach(c)}).on("ready",function(t,n,r){u=-.125;var i=r.cuepoints||e.conf.cuepoints||[];e.setCuepoints(i)}).on("finish",function(){for(var t=r(e.video.duration);t>u;)u+=.125,l[u]&&l[u].forEach(c);u=-.125}),e.conf.generate_cuepoints&&e.bind("load",function(){i.find(".fp-cuepoint",t).forEach(i.removeNode)}),e.setCuepoints=function(t){return e.cuepoints=[],l={},t.forEach(e.addCuepoint),e},e.addCuepoint=function(n){e.cuepoints||(e.cuepoints=[]),"number"==typeof n&&(n={time:n}),n.index=0;var a=r(n);if(l[a]||(l[a]=[]),l[a].push(n),e.cuepoints.length&&(n.index=Math.max.apply(null,e.cuepoints.map(function(e){return e.index}))+1),e.cuepoints.push(n),e.conf.generate_cuepoints&&n.visible!==!1){var s=e.video.duration,u=i.find(".fp-timeline",t)[0];i.css(u,"overflow","visible");var c=n.time||n;0>c&&(c=s+c);var f=i.createElement("a",{className:"fp-cuepoint fp-cuepoint"+n.index});i.css(f,"left",c/s*100+"%"),u.appendChild(f),o.on(f,"mousedown",function(t){t.preventDefault(),t.stopPropagation(),e.seek(c)})}return e},e.removeCuepoint=function(n){"number"==typeof n&&(n=e.cuepoints.filter(function(e){return e.index===n})[0]);var o=e.cuepoints.indexOf(n),a=r(n);if(-1!==o){e.cuepoints=e.cuepoints.slice(0,o).concat(e.cuepoints.slice(o+1));var s=i.find(".fp-timeline",t)[0];i.find(".fp-cuepoint"+n.index,s).forEach(i.removeNode);var u=l[a].indexOf(n);if(-1!==u)return l[a]=l[a].slice(0,u).concat(l[a].slice(u+1)),e}}})},{"../common":1,"../flowplayer":31,bean:34}],11:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("bean"),o=e("../common"),a=e("./util/clipboard");r(function(e,t){if(e.conf.embed!==!1&&e.conf.share!==!1){var n=o.find(".fp-share-menu",t)[0],r=o.createElement("a",{class:"fp-icon fp-embed",title:"Copy to your site"},"Embed");o.append(n,r),e.embedCode=function(){var n=e.conf.embed||{},r=e.video,i=n.width||r.width||o.width(t),a=n.height||r.height||o.height(t),s=e.conf.ratio,l='<iframe src="'+e.shareUrl(!0)+'" allowfullscreen style="border:none;';return n.width||n.height?(isNaN(i)||(i+="px"),isNaN(a)||(a+="px"),l+"width:"+i+";height:"+a+';"></iframe>'):((!s||e.conf.adaptiveRatio)&&(s=a/i),'<div style="position:relative;width:100%;display:inline-block;">'+l+'position:absolute;top:0;left:0;width:100%;height:100%;"></iframe><div style="padding-top:'+100*s+'%;"></div></div>')},i.on(t,"click",".fp-embed",function(){a(e.embedCode(),function(){e.message("The embed code is now on your clipboard",2e3)},function(){e.textarea(e.embedCode(),"Copy the code below to embed your video")})})}})},{"../common":1,"../flowplayer":31,"./util/clipboard":30,bean:34}],12:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=document.createElement("div"));var n={},r={},i=function(e,i,o){var a=e.split(".")[0],s=function(l){o&&(t.removeEventListener(a,s),n[e].splice(n[e].indexOf(s),1));var u=[l].concat(r[l.timeStamp+l.type]||[]);i&&i.apply(void 0,u)};t.addEventListener(a,s),n[e]||(n[e]=[]),n[e].push(s)};e.on=e.bind=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n)}),e},e.one=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n,!0)}),e};var o=function(e,t){return 0===t.filter(function(t){return-1===e.indexOf(t)}).length};e.off=e.unbind=function(r){var i=r.split(" ");return i.forEach(function(e){var r=e.split(".").slice(1),i=e.split(".")[0];Object.keys(n).filter(function(e){var t=e.split(".").slice(1);return(!i||0===e.indexOf(i))&&o(t,r)}).forEach(function(e){var r=n[e],i=e.split(".")[0];n[e]=r.filter(function(e){return t.removeEventListener(i,e),!1})})}),e},e.trigger=function(n,i,o){if(n){i=(i||[]).length?i||[]:[i];var a,s=document.createEvent("Event");return a=n.type||n,s.initEvent(a,!1,!0),Object.defineProperty&&(s.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}),r[s.timeStamp+s.type]=i,t.dispatchEvent(s),o?s:e}}},t.exports.EVENTS=["beforeseek","disable","error","finish","fullscreen","fullscreen-exit","load","mute","pause","progress","ready","resume","seek","speed","stop","unload","volume","boot","shutdown"]},{}],13:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.facebook){e.facebook=function(){var e,t,r=550,i=420,o=screen.height,a=screen.width,s="scrollbars=yes,resizable=yes,toolbar=no,location=yes",l="string"==typeof n.facebook?n.facebook:window.location.toString();e=Math.round(a/2-r/2),t=0,o>i&&(t=Math.round(o/2-i/2)),window.open("https://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(l),"sharer",s+",width="+r+",height="+i+",left="+e+",top="+t)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-facebook"},"Facebook");i.append(r,a),o.on(t,"click",".fp-facebook",function(){e.facebook()})}})},{"../common":1,"../flowplayer":31,bean:34}],14:[function(e,t,n){"use strict";var r,i=e("../flowplayer"),o=e("bean"),a=e("../common"),s="fullscreen",l="fullscreen-exit",u=i.support.fullscreen;o.on(document,"fullscreenchange.ffscr webkitfullscreenchange.ffscr mozfullscreenchange.ffscr MSFullscreenChange.ffscr",function(e){var t=document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement;if(r||t.parentNode&&t.parentNode.getAttribute("data-flowplayer-instance-id")){var n=r||i(t.parentNode);t?r=n.trigger(s,[n]):(r.trigger(l,[r]),r=null)}}),i(function(e,t){var n=a.createElement("div",{className:"fp-player"});if(Array.prototype.map.call(t.children,a.identity).forEach(function(e){a.matches(e,".fp-ratio,script")||n.appendChild(e)}),t.appendChild(n),e.conf.fullscreen){var i,o,c=window;e.isFullscreen=!1,e.fullscreen=function(t){return e.disabled?void 0:(void 0===t&&(t=!e.isFullscreen),t&&(i=c.scrollY,o=c.scrollX),u?t?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof n[e]&&(n[e](Element.ALLOW_KEYBOARD_INPUT),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||n[e]())}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):e.trigger(t?s:l,[e]),e)};var f;e.on("mousedown.fs",function(){+new Date-f<150&&e.ready&&e.fullscreen(),f=+new Date}),e.on(s,function(){a.addClass(t,"is-fullscreen"),a.toggleClass(t,"fp-minimal-fullscreen",a.hasClass(t,"fp-minimal")),a.removeClass(t,"fp-minimal"),u||a.css(t,"position","fixed"),e.isFullscreen=!0}).on(l,function(){var n;a.toggleClass(t,"fp-minimal",a.hasClass(t,"fp-minimal-fullscreen")),a.removeClass(t,"fp-minimal-fullscreen"),u||"html5"!==e.engine||(n=t.css("opacity")||"",a.css(t,"opacity",0)),u||a.css(t,"position",""),a.removeClass(t,"is-fullscreen"),u||"html5"!==e.engine||setTimeout(function(){t.css("opacity",n)}),e.isFullscreen=!1,c.scrollTo(o,i)}).on("unload",function(){e.isFullscreen&&e.fullscreen()}),e.on("shutdown",function(){r=null,a.removeNode(n)})}})},{"../common":1,"../flowplayer":31,bean:34}],15:[function(e,t,n){"use strict";var r,i,o=e("../flowplayer"),a=e("bean"),s=e("../common");a.on(document,"keydown.fp",function(e){var t=r,n=e.ctrlKey||e.metaKey||e.altKey,i=e.which,o=t&&t.conf;if(t&&o.keyboard&&!t.disabled&&!n&&t.ready){if(e.shiftKey)return 39==i?t.speed(!0):37==i&&t.speed(!1),e.preventDefault();if(58>i&&i>47)return e.preventDefault(),t.seekTo(i-48);var a=function(){switch(i){case 38:case 75:return t.volume(t.volumeLevel+.15),!0;case 40:case 74:return t.volume(t.volumeLevel-.15),!0;case 39:case 76:return t.seeking=!0,t.seek(!0),!0;case 37:case 72:return t.seeking=!0,t.seek(!1),!0;case 190:return t.seekTo(),!0;case 32:return t.toggle(),!0;case 70:return o.fullscreen&&t.fullscreen(),!0;case 77:return t.mute(),!0;case 81:return t.unload(),!0}}();a&&e.preventDefault()}}),o(function(e,t){e.conf.keyboard&&(a.on(document,"click",function(n){if(s.hasParent(n.target,t))r=e.disabled?0:e;else{if(r!==e)return;r=0}r&&(i=t)}),e.bind("shutdown",function(){i==t&&(i=null)}))})},{"../common":1,"../flowplayer":31,bean:34}],16:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.showMenu=function(n,r){var a=i.find(".fp-ui",t)[0];i.toggleClass(n,"fp-active",!0),setTimeout(function(){o.one(document,"click",function(){e.hideMenu(n)})});var s=r;if(r&&r.tagName&&(s={left:i.offset(r).left,rightFallbackOffset:i.width(r),top:i.offset(r).top+i.height(r)}),!s)return i.css(n,"top","auto");s.rightFallbackOffset=s.rightFallbackOffset||0;var l=s.top-i.offset(a).top,u=s.left-i.offset(a).left;i.width(n)+u>i.width(a)&&(u=u-i.width(n)+s.rightFallbackOffset),i.height(n)+l>i.height(a)&&(l-=i.height(n)),i.css(n,{top:l+"px",left:u+"px",right:"auto"})},e.hideMenu=function(e){i.toggleClass(e,"fp-active",!1),i.css(e,{top:"-9999em"})}})},{"../common":1,"../flowplayer":31,bean:34}],17:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){var t=i.createElement("div",{className:"fp-message"},e);return s.insertBefore(t,a),setTimeout(function(){i.toggleClass(t,"fp-shown")}),t}function r(e){i.removeNode(e)}var a=i.find(".fp-header",t)[0],s=i.find(".fp-ui",t)[0];e.message=function(e,t){var o=n(e),a=function(){i.toggleClass(o,"fp-shown"),setTimeout(function(){r(o)},500)};return t&&setTimeout(a,t),a},e.textarea=function(e){var t=document.createElement("textarea");t.value=e,t.className="fp-textarea",s.appendChild(t),o.on(document,"click.fptextarea",function(e){return e.target===t?t.select():(e.stopPropagation(),e.preventDefault(),i.removeNode(t),void o.off(document,"click.fptextarea"))})}})},{"../common":1,"../flowplayer":31,bean:34}],18:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=/IEMobile/.test(window.navigator.userAgent),o=e("../common"),a=e("bean"),s=e("./ui").format,l=r.support,u=window.navigator.userAgent;(l.touch||i)&&r(function(e,t){var n=l.android,r=n&&!n.firefox,c=/Silk/.test(u),f=n.version||0;if(r&&!i){if(!/Chrome/.test(u)&&4>f||n.samsung&&5>f){var d=e.load;e.load=function(){var n=d.apply(e,arguments);return o.find("video.fp-engine",t)[0].load(),e.trigger("ready",[e,e.video]),n}}var p,h=0,g=function(e){p=setInterval(function(){e.video.time=++h,e.trigger("progress",[e,h])},1e3)};e.on("ready pause unload",function(){p&&(clearInterval(p),p=null)}),e.on("ready",function(){h=0}),e.on("resume",function(t,n){return n.live?h?g(n):void e.one("progress",function(e,t,n){0===n&&g(t)}):void 0})}l.volume||(o.removeClass(t,"fp-mute"),o.addClass(t,"no-volume")),l.iOS&&o.addClass(t,"fp-mute"),o.addClass(t,"is-touch"),e.sliders&&e.sliders.timeline&&e.sliders.timeline.disableAnimation();var m=!1;a.on(t,"touchmove",function(){m=!0});var v=!0;if(a.on(t,"touchend click",function(n){if(m)return void(m=!1);var r=o.find("video.fp-engine",t)[0];return v&&e.conf.clickToUnMute&&r&&r.muted&&e.conf.autoplay&&(r.muted=!1),v=!1,e.playing&&!o.hasClass(t,"is-mouseover")?(o.addClass(t,"is-mouseover"),o.removeClass(t,"is-mouseout"),n.preventDefault(),void n.stopPropagation()):void(e.playing||e.splash||!o.hasClass(t,"is-mouseout")||o.hasClass(t,"is-mouseover")||setTimeout(function(){e.disabled||e.playing||e.splash||o.find("video.fp-engine",t)[0].play()},400))}),!l.fullscreen&&e.conf.native_fullscreen&&"function"==typeof o.createElement("video").webkitEnterFullScreen){var y=e.fullscreen;e.fullscreen=function(){var n=o.find("video.fp-engine",t)[0];return n?(e.trigger("fullscreen",[e]),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement===n&&(a.off(document,".nativefullscreen"),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement||(a.off(document,".nativefullscreen"),e.trigger("fullscreen-exit",[e]))}))}),n.webkitEnterFullScreen(),void a.one(n,"webkitendfullscreen",function(){a.off(document,"fullscreenchange.nativefullscreen"),e.trigger("fullscreen-exit",[e]),o.prop(n,"controls",!0),o.prop(n,"controls",!1)})):y.apply(e)}}(r||c)&&e.bind("ready",function(){var n=o.find("video.fp-engine",t)[0];e.conf.splash&&n&&n.paused&&"hlsjs-lite"!==e.engine.engineName&&(a.one(n,"canplay",function(){n.play()}),n.load()),e.bind("progress.dur",function(){if(!e.live&&!e.conf.live&&n){var r=n.duration;1!==r&&(e.video.duration=r,o.find(".fp-duration",t)[0].innerHTML=s(r),e.unbind("progress.dur"))}})})})},{"../common":1,"../flowplayer":31,"./ui":27,bean:34}],19:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object"),o=e("bean"),a=e("../common"),s=e("./resolve"),l=new s,u=window.jQuery,c=/^#/;r(function(e,t){function n(){return a.find(h.query,r())}function r(){return c.test(h.query)?void 0:t}function f(){return a.find(h.query+"."+g,r())}function d(){var n=a.find(".fp-playlist",t)[0];if(!n){n=a.createElement("div",{className:"fp-playlist"});var r=a.find(".fp-next,.fp-prev",t);r.length?r[0].parentElement.insertBefore(n,r[0]):a.insertAfter(t,a.find("video",t)[0],n)}n.innerHTML="",e.conf.playlist[0].length&&(e.conf.playlist=e.conf.playlist.map(function(e){if("string"==typeof e){var t=e.split(s.TYPE_RE)[1];return{sources:[{type:"m3u8"===t.toLowerCase()?"application/x-mpegurl":"video/"+t,src:e}]}}return{sources:e.map(function(e){var t={};return Object.keys(e).forEach(function(n){t.type=/mpegurl/i.test(n)?"application/x-mpegurl":"video/"+n,t.src=e[n]}),t})}})),e.conf.playlist.forEach(function(t,r){var i=t.sources[0].src;n.appendChild(a.createElement("a",{href:i,className:e.video.index===r?g:void 0,"data-index":r}))})}function p(t){return"undefined"!=typeof t.index?t.index:"undefined"!=typeof e.video.index?e.video.index:e.conf.startIndex||0}var h=i({active:"is-active",advance:!0,query:".fp-playlist a"},e.conf),g=h.active,m=a.find(".fp-ui",t)[0],v=a.hasClass(t,"fp-custom-playlist")||!!h.customPlaylist;a.toggleClass(t,"fp-custom-playlist",v),a.toggleClass(t,"fp-default-playlist",!v),e.play=function(t){if(void 0===t)return e.resume();if("number"==typeof t&&!e.conf.playlist[t])return e;if("number"!=typeof t)return e.load.apply(null,arguments);var n=i({index:t},e.conf.playlist[t]);return e.off("beforeresume.fromfirst"),"number"==typeof t&&t===e.video.index?e.seek(0,function(){e.resume()}):(e.load(n,function(){e.video.index=t}),e)},e.next=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=n===e.conf.playlist.length-1?0:n+1,e.play(n)),e},e.prev=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=0===n?e.conf.playlist.length-1:n-1,e.play(n)),e},e.setPlaylist=function(t,n){return e.conf.playlist=t,n||delete e.video.index,d(),e},e.addPlaylistItem=function(t){return delete e.video.is_last,e.setPlaylist(e.conf.playlist.concat([t]),!0)},e.removePlaylistItem=function(t){var n=e.conf.playlist;return e.setPlaylist(n.slice(0,t).concat(n.slice(t+1)))},o.on(t,"click",".fp-next",e.next),o.on(t,"click",".fp-prev",e.prev),e.off("finish.pl").on("finish.pl",function(e,n){var r="undefined"==typeof n.conf.advance?!0:n.conf.advance;if(r){if(n.video.loop)return n.seek(0,function(){n.resume()});var i=n.video.index>=0?n.video.index+1:void 0;i<n.conf.playlist.length||h.loop?(i=i===n.conf.playlist.length?0:i,a.removeClass(t,"is-finished"),setTimeout(function(){n.play(i)})):n.conf.playlist.length>1&&(n.one("beforeresume.fromfirst",function(e){e.preventDefault(),n.play(0)}),n.one("seek",function(){n.off("beforeresume.fromfirst")}))}});var y=!1;e.conf.playlist.length&&(y=!0,d(),e.conf.clip&&e.conf.clip.sources.length||(e.conf.clip=e.conf.playlist[e.conf.startIndex||0])),n().length&&!y&&(e.conf.playlist=[],delete e.conf.startIndex,n().forEach(function(t){var n=t.href;t.setAttribute("data-index",e.conf.playlist.length);var r=l.resolve(n,e.conf.clip.sources);u&&i(r,u(t).data()),e.conf.playlist.push(r)})),a.find(".fp-prev,.fp-next,.fp-playlist",t).forEach(function(e){m.appendChild(e)}),o.on(c.test(h.query)?document:t,"click",h.query,function(t){t.preventDefault();var n=t.currentTarget,r=Number(n.getAttribute("data-index"));-1!=r&&e.play(r)}),e.on("load",function(n,i,o){if(e.conf.playlist.length){var s=f()[0],l=s&&s.getAttribute("data-index"),u=o.index=p(o),c=a.find(h.query+'[data-index="'+u+'"]',r())[0],d=u==e.conf.playlist.length-1;s&&a.removeClass(s,g),c&&a.addClass(c,g),a.removeClass(t,"video"+l),a.addClass(t,"video"+u),a.toggleClass(t,"last-video",d),o.index=i.video.index=u,o.is_last=i.video.is_last=d}}).on("unload.pl",function(){e.conf.playlist.length&&(f().forEach(function(e){a.toggleClass(e,g)}),e.conf.playlist.forEach(function(e,n){a.removeClass(t,"video"+n)}),delete e.video.index)}),e.conf.playlist.length&&(e.conf.loop=!1)})},{"../common":1,"../flowplayer":31,"./resolve":21,bean:34,"extend-object":39}],20:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(){i.find(".fp-qsel-menu",t).forEach(i.removeNode),i.find(".fp-qsel",t).forEach(i.removeNode)}function r(e){l.appendChild(i.createElement("strong",{className:"fp-qsel"},"HD"));var t=i.createElement("div",{className:"fp-menu fp-qsel-menu"},"<strong>Quality</strong>");e.forEach(function(e){var n=document.createElement("a"),r="undefined"!=typeof e.value?e.value:e;n.setAttribute("data-quality",r),n.innerHTML=e.label||e,t.appendChild(n)}),s.appendChild(t)}function a(e){i.find(".fp-qsel-menu a",t).forEach(function(t){i.toggleClass(t,"fp-selected",t.getAttribute("data-quality")==e),i.toggleClass(t,"fp-color",t.getAttribute("data-quality")==e)})}var s=i.find(".fp-ui",t)[0],l=i.find(".fp-controls",s)[0];o.on(t,"click",".fp-qsel",function(){var n=i.find(".fp-qsel-menu",t)[0];i.hasClass(n,"fp-active")?e.hideMenu():e.showMenu(n)}),o.on(t,"click",".fp-qsel-menu a",function(t){var n=t.target.getAttribute("data-quality");e.quality(n)}),e.quality=function(t){t=isNaN(Number(t))?t:Number(t),e.trigger("quality",[e,t])},e.on("quality",function(e,t,n){a(n,t.video.qualities)}),e.on("ready",function(e,t,i){n(),!i.qualities||i.qualities.filter(function(e){return"undefined"!=typeof e.value?e.value>-1:!0}).length<2||(r(i.qualities,i.quality),a(i.quality,i.qualities))})})},{"../common":1,"../flowplayer":31,bean:34}],21:[function(e,t,n){"use strict";function r(e){var t=e.attr("src"),n=e.attr("type")||"",r=t.split(o)[1];return n=n.toLowerCase(),a(e.data(),{src:t,suffix:r||n,type:n||r})}function i(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}var o=/\.(\w{3,4})(\?.*)?$/i,a=e("extend-object");t.exports=function(){var e=this;e.sourcesFromVideoTag=function(e,t){var n=[];return t("source",e).each(function(){n.push(r(t(this)))}),!n.length&&e.length&&n.push(r(e)),n},e.resolve=function(e,t){return e?("string"==typeof e&&(e={src:e,sources:[]},e.sources=(t||[]).map(function(t){var n=t.src.split(o)[1];return{type:t.type,src:e.src.replace(o,"."+n+"$2")}})),e instanceof Array&&(e={sources:e.map(function(e){return e.type&&e.src?e:Object.keys(e).reduce(function(t,n){return a(t,{type:i(n),src:e[n]})},{})})}),e):{sources:t}}},t.exports.TYPE_RE=o},{"extend-object":39}],22:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("extend-object"),a=e("bean");r(function(e,t){var n=e.conf;if(n.share===!1)return void i.find(".fp-share",t).forEach(i.removeNode);e.shareUrl=function(t){if(t&&n.embed&&n.embed.iframe)return n.embed.iframe;if("string"==typeof e.conf.share)return e.conf.share;var r=encodeURIComponent(e.video.title||(i.find("title")[0]||{}).innerHTML||"Flowplayer Unlimited video"),a=encodeURIComponent(btoa(JSON.stringify(o({},e.conf,e.extensions)).replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).substr(-4)}))),s=encodeURIComponent(window.location.toString()),l=t?"https://flowplayer.com/e/":"https://flowplayer.com/s/";return l+"?t="+r+"&c="+a+"&r="+s};var r=i.createElement("div",{className:"fp-menu fp-share-menu"},"<strong>Share</strong>"),s=i.find(".fp-ui",t)[0];s.appendChild(r);var l=i.find(".fp-share",t)[0];a.on(t,"click",".fp-share",function(t){t.preventDefault(),i.hasClass(r,"fp-active")?e.hideMenu():e.showMenu(r,l)})})},{"../common":1,"../flowplayer":31,bean:34,"extend-object":39}],23:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("./subtitles/parser");r.defaults.subtitleParser=a,r(function(e,t){var n,a,s,l,u;(!r.support.inlineVideo||!r.support.fullscreen&&e.conf.native_fullscreen)&&(e.conf.nativesubtitles=!0),e.ui||(e.ui={}),e.ui.createSubtitleControl=function(e,n){return u=n,s=s||i.createElement("strong",{className:"fp-cc"},"CC"),l=l||i.createElement("div",{className:"fp-menu fp-subtitle-menu"},"<strong>Closed Captions</strong>"),i.find("a",l).forEach(i.removeNode),l.appendChild(i.createElement("a",{"data-subtitle-index":-1},"No subtitles")),(e||[]).forEach(function(e,t){var n=e.srclang||"en",r=e.label||"Default ("+n+")",o=i.createElement("a",{"data-subtitle-index":t},r);l.appendChild(o)}),i.find(".fp-ui",t)[0].appendChild(l),i.find(".fp-controls",t)[0].appendChild(s),i.toggleClass(s,"fp-hidden",!e||!e.length),s},e.ui.setActiveSubtitleItem=function(e){f(e)},o.on(t,"click",".fp-cc",function(){i.hasClass(l,"fp-active")?e.hideMenu():e.showMenu(l)}),o.on(t,"click",".fp-subtitle-menu [data-subtitle-index]",function(t){t.preventDefault();var n=t.target.getAttribute("data-subtitle-index");return u?u(n):"-1"===n?e.disableSubtitles():void e.loadSubtitles(n)});var c=function(){a=i.find(".fp-captions",t)[0],a=a||i.appendTo(i.createElement("div",{class:"fp-captions"}),i.find(".fp-player",t)[0]),Array.prototype.forEach.call(a.children,i.removeNode),e.ui.createSubtitleControl(e.video.subtitles)};e.on("ready",function(n,r,o){if(r.subtitles=[],c(),i.removeClass(t,"has-menu"),e.disableSubtitles(),o.subtitles&&o.subtitles.length){var a=o.subtitles.filter(function(e){return e["default"]})[0];a&&r.loadSubtitles(o.subtitles.indexOf(a))}}),e.showSubtitle=function(e){i.html(a,e),i.addClass(a,"fp-shown")},e.hideSubtitle=function(){i.removeClass(a,"fp-shown")},e.bind("cuepoint",function(t,r,i){i.subtitle?(n=i.index,e.showSubtitle(i.subtitle.text)):i.subtitleEnd&&(e.hideSubtitle(),n=i.index)}),e.bind("seek",function(t,r,o){n&&e.cuepoints[n]&&e.cuepoints[n].time>o&&(i.removeClass(a,"fp-shown"),n=null),(e.cuepoints||[]).forEach(function(t,r){var i=t.subtitle;i&&n!=r?o>=t.time&&(!i.endTime||o<=i.endTime)&&e.trigger("cuepoint",[e,t]):t.subtitleEnd&&o>=t.time&&r==n+1&&e.trigger("cuepoint",[e,t])})}),e.on("unload",function(){i.find(".fp-captions",t).forEach(i.removeNode)});var f=function(e){i.toggleClass(i.find("a.fp-selected",l)[0],"fp-selected"),i.toggleClass(i.find('a[data-subtitle-index="'+e+'"]',l)[0],"fp-selected")},d=function(e,n){var r=i.find("video.fp-engine",t)[0].textTracks;r.length&&(null===e?[].forEach.call(r,function(e){e.mode=n}):r[e].mode=n)};e.disableSubtitles=function(){return e.subtitles=[],(e.cuepoints||[]).forEach(function(t){(t.subtitle||t.subtitleEnd)&&e.removeCuepoint(t)}),a&&Array.prototype.forEach.call(a.children,i.removeNode),f(-1),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName&&d(null,"disabled"),e},e.loadSubtitles=function(t){e.disableSubtitles();var n=e.video.subtitles[t],o=n.src;return o?(f(t),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName?void d(t,"showing"):(i.xhrGet(o,function(t){var n=e.conf.subtitleParser(t);n.forEach(function(t,n){t.title||(t.title="subtitle"+n);var i={time:t.startTime,subtitle:t,visible:!1};e.subtitles.push(t),e.addCuepoint(i),e.addCuepoint({time:t.endTime,subtitleEnd:t.title,visible:!1}),0!==t.startTime||e.video.time||e.splash||e.trigger("cuepoint",[e,r.extend({},i,{index:0})]),e.splash&&e.one("ready",function(){e.trigger("cuepoint",[e,i])})})},function(){return e.trigger("error-subtitles",{code:8,url:o}),!1}),e)):void 0}})},{"../common":1,"../flowplayer":31,"./subtitles/parser":24,bean:34}],24:[function(e,t,n){t.exports=function(e){function t(e){var t=e.split(":");return 2==t.length&&t.unshift(0),60*t[0]*60+60*t[1]+parseFloat(t[2].replace(",","."))}for(var n,r,i,o=/^(([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/,a=[],s=0,l=e.split("\n"),u=l.length,c={};u>s;s++)if(r=o.exec(l[s])){for(n=l[s-1],i="<p>"+l[++s]+"</p><br/>";"string"==typeof l[++s]&&l[s].trim()&&s<l.length;)i+="<p>"+l[s]+"</p><br/>";c={title:n,startTime:t(r[1]),endTime:t(r[3]),text:i},a.push(c)}return a}},{}],25:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object");!function(){var e=function(e){var t=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return t&&t.length>1?parseFloat(t[t.length-1].replace("_","."),10):0},t=function(){var e=document.createElement("video");return e.loop=!0,e.autoplay=!0,e.preload=!0,e},n={},o=document.documentElement.style,a=navigator.userAgent.toLowerCase(),s=/(chrome)[ \/]([\w.]+)/.exec(a)||/(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];s[1]&&(n[s[1]]=!0,n.version=s[2]||"0"),n.safari&&(n.version=(/version\/([\w.]+)/.exec(a)||[])[1]);var l=t(),u=navigator.userAgent,c=n.msie||/Trident\/7/.test(u),f=/iPad|MeeGo/.test(u)&&!/CriOS/.test(u),d=/iPad/.test(u)&&/CriOS/.test(u),p=/iP(hone|od)/i.test(u)&&!/iPad/.test(u)&&!/IEMobile/i.test(u),h=/Android/.test(u),g=h&&/Firefox/.test(u),m=h&&/SAMSUNG/.test(u),v=/Silk/.test(u),y=/IEMobile/.test(u),w=y?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(u)[1],10):0,b=y?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(u)[1],10):0,I=f||p?e(u):0,M=h?parseFloat(/Android\ (\d+(\.\d+)?)/.exec(u)[1],10):0,C=(p||f||d)&&{iPhone:p,iPad:f||d,version:I,chrome:d},A=i(r.support,{browser:n,iOS:C,android:h?{firefox:g,opera:/Opera/.test(u),samsung:m,version:M}:!1,subtitles:!!l.addTextTrack,fullscreen:"boolean"==typeof document.webkitFullscreenEnabled?document.webkitFullscreenEnabled:"function"==typeof document.webkitCancelFullScreen&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(u)||document.mozFullScreenEnabled||"function"==typeof document.exitFullscreen||"function"==typeof document.msExitFullscreen,inlineBlock:!(c&&n.version<8),touch:"ontouchstart"in window,dataload:!f&&!p&&!y,flex:"flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,zeropreload:!c&&!h,volume:!(f||p||v||d),cachedVideoTag:!(f||p||d||y),firstframe:!(v||y||g||m||I&&10>I||h&&4.4>M),inlineVideo:(!p||I>=10)&&(!y||w>=8.1&&b>=11)&&(!h||M>=3),hlsDuration:!h&&(!n.safari||f||p||d),seekable:!f&&!d,preloadMetadata:!C&&!n.safari});A.autoplay=A.firstframe,y&&(A.browser.safari=!1);try{var S=navigator.plugins["Shockwave Flash"],E=c?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):S.description;c||S[0].enabledPlugin?(E=E.split(/\D+/),E.length&&!E[0]&&(E=E.slice(1)),A.flashVideo=E[0]>9||9==E[0]&&E[3]>=115):A.flashVideo=!1}catch(j){}try{A.video=!!l.canPlayType,A.video&&l.canPlayType("video/mp4")}catch(D){A.video=!1}A.animation=function(){for(var e=["","Webkit","Moz","O","ms","Khtml"],t=document.createElement("p"),n=0;n<e.length;n++)if("undefined"!=typeof t.style[e[n]+"AnimationName"])return!0}()}()},{"../flowplayer":31,"extend-object":39}],26:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.twitter!==!1){e.tweet=function(){var t,r,i=550,o=420,a=screen.height,s=screen.width,l="scrollbars=yes,resizable=yes,toolbar=no,location=yes",u="string"==typeof n.twitter?n.twitter:e.shareUrl();t=Math.round(s/2-i/2),r=0,a>o&&(r=Math.round(a/2-o/2)),window.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(u),"intent",l+",width="+i+",height="+o+",left="+t+",top="+r)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-twitter"},"Twitter");i.append(r,a),o.on(t,"click",".fp-twitter",function(){e.tweet()})}})},{"../common":1,"../flowplayer":31,bean:34}],27:[function(e,t,n){(function(n){"use strict";function r(e){return e=parseInt(e,10),e>=10?e:"0"+e}function i(e,t){e=Math.max(e||0,0),e=t?Math.ceil(e):Math.floor(e);var n=Math.floor(e/3600),i=Math.floor(e/60);return e-=60*i,n>=1?(i-=60*n,n+":"+r(i)+":"+r(e)):r(i)+":"+r(e)}var o=e("../flowplayer"),a=e("../common"),s=e("bean"),l=e("./ui/slider"),u=e("./ui/bar-slider"),c=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLW91dGxpbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDk5Ljg0NCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz4KPHRpdGxlPnBsYXktcm91bmRlZC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNNDEuMDM1OSw3MS4xOWE1LjA0OTIsNS4wNDkyLDAsMCwxLTIuNTU3NS0uNjY3M2MtMS44MDMxLTEuMDQxLTIuNzk1OC0zLjEyNDgtMi43OTU4LTUuODY2NFYzNS4xODg3YzAtMi43NDI5Ljk5MzMtNC44MjcyLDIuNzk3LTUuODY3NiwxLjgwMjUtMS4wNDIyLDQuMTAzNC0uODYsNi40OC41MTQzTDcwLjQ3ODIsNDQuNTY3MmMyLjM3NTEsMS4zNzExLDMuNjgyNiwzLjI3MjUsMy42ODMyLDUuMzU0NXMtMS4zMDc2LDMuOTg0NS0zLjY4MzIsNS4zNTYyTDQ0Ljk1OTIsNzAuMDExNEE3LjkzODQsNy45Mzg0LDAsMCwxLDQxLjAzNTksNzEuMTlabS4wMDY1LTQwLjEyM2EyLjY3OTQsMi42Nzk0LDAsMCwwLTEuMzU4Mi4zNDEzYy0xLjAyNjMuNTkyNi0xLjU5MTIsMS45MzQ5LTEuNTkxMiwzLjc4VjY0LjY1NjNjMCwxLjg0NDkuNTY0OSwzLjE4NjYsMS41OTA2LDMuNzc5MSwxLjAyODEuNTkzMiwyLjQ3MzMuNDEwOCw0LjA3LS41MTJMNjkuMjczLDUzLjE5MDZjMS41OTgzLS45MjI3LDIuNDc4LTIuMDgzOCwyLjQ3OC0zLjI2ODlzLS44OC0yLjM0NDUtMi40NzgtMy4yNjY2TDQzLjc1NCwzMS45MjI3QTUuNTY4NSw1LjU2ODUsMCwwLDAsNDEuMDQyMywzMS4wNjcxWiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),f=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLWZpbGwiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgogIDxkZWZzPjxzdHlsZT4uYXtmaWxsOiMwMDA7b3BhY2l0eTowLjY1O30uYntmaWxsOiNmZmY7b3BhY2l0eToxLjA7fTwvc3R5bGU+CiAgPC9kZWZzPjx0aXRsZT5wbGF5LXJvdW5kZWQtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cGF0aCBjbGFzcz0iYiIgZD0iTTM1Ljk0MiwzNS4yMzIzYzAtNC43Mjg5LDMuMzUwNi02LjY2MzcsNy40NDYtNC4yOTcxTDY4LjgzLDQ1LjYyMzVjNC4wOTU2LDIuMzY0LDQuMDk1Niw2LjIzMTksMCw4LjU5NzdMNDMuMzg4LDY4LjkxYy00LjA5NTQsMi4zNjQtNy40NDYuNDMtNy40NDYtNC4yOTc5WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPgogIDwvc3ZnPgogIAo=","base64"),d=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICA8ZGVmcz4KICAgIDxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5jb250cm9sYnV0dG9ue2ZpbGw6I2ZmZjt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnBsYXktc2hhcnAtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cG9seWdvbiBjbGFzcz0iY29udHJvbGJ1dHRvbiIgcG9pbnRzPSI3My42MDEgNTAgMzcuOTY4IDcwLjU3MyAzNy45NjggMjkuNDI3IDczLjYwMSA1MCIgZmlsdGVyPSJ1cmwoI2YxKSIvPgo8L3N2Zz4K","base64"),p=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDQgOTkuODQzNCI+PGRlZnM+PHN0eWxlPi5jb250cm9sYnV0dG9uYmd7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGxheS1zaGFycC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNMzYuOTQ0Myw3Mi4yNDczVjI3LjI5MTZMNzUuODc3Niw0OS43N1ptMi4yLTQxLjE0NTVWNjguNDM3MUw3MS40Nzc2LDQ5Ljc3WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),h=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDM0IDk5Ljg0MzQiPjxkZWZzPjxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5yZWN0e2ZpbGw6I2ZmZjt9PC9zdHlsZT4KPC9kZWZzPjx0aXRsZT5wYXVzZS1yb3VuZGVkLW91dGxpbmU8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxMi0uMDc4M2E1MCw1MCwwLDEsMCw1MC4wMDA2LDUwQTUwLjA1NjIsNTAuMDU2MiwwLDAsMCw0OS45MjEyLS4wNzgzWiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIj48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTM5LjAwMzYsNzEuOTcyNmE3LjU2NSw3LjU2NSwwLDAsMS03LjU1Ny03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NDgsNy41NjQ4LDAsMCwxLDM5LjAwMzYsNzEuOTcyNlptMC00MS45MDRhNS4zNjQ3LDUuMzY0NywwLDAsMC01LjM1OTMsNS4zNTgydjI4Ljk5YTUuMzU4Nyw1LjM1ODcsMCwwLDAsMTAuNzE3NCwwdi0yOC45OUE1LjM2NDUsNS4zNjQ1LDAsMCwwLDM5LjAwMzYsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTYwLjg0LDcxLjk3MjZhNy41NjQ4LDcuNTY0OCwwLDAsMS03LjU1Ni03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NSw3LjU2NSwwLDAsMSw2MC44NCw3MS45NzI2Wm0wLTQxLjkwNGE1LjM2NDUsNS4zNjQ1LDAsMCwwLTUuMzU4Miw1LjM1ODJ2MjguOTlhNS4zNTg3LDUuMzU4NywwLDAsMCwxMC43MTc0LDB2LTI4Ljk5QTUuMzY0Nyw1LjM2NDcsMCwwLDAsNjAuODQsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48L2c+PC9zdmc+Cg==","base64"),g=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utcm91bmRlZC1maWxsPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIiBmaWx0ZXI9InVybCgjZjEpIj48cmVjdCBjbGFzcz0icmVjdCIgeD0iMzEuODQ0IiB5PSIyOC4xMjMxIiB3aWR0aD0iMTMuNDM2MiIgaGVpZ2h0PSI0My41OTczIiByeD0iNi43MTgxIiByeT0iNi43MTgxIi8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjU2MzgiIHk9IjI4LjEyMzEiIHdpZHRoPSIxMy40MzYyIiBoZWlnaHQ9IjQzLjU5NzMiIHJ4PSI2LjcxODEiIHJ5PSI2LjcxODEiLz48L2c+PC9zdmc+Cg==","base64"),m=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtZmlsbCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PGRlZnM+PHN0eWxlPi5mcC1jb2xvci1wbGF5e29wYWNpdHk6MC42NTt9LnJlY3R7ZmlsbDojZmZmO308L3N0eWxlPgo8L2RlZnM+PHRpdGxlPnBhdXNlLXNoYXJwLWZpbGw8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxNy0uMDc4YTUwLDUwLDAsMSwwLDUwLDUwQTUwLjA1NjQsNTAuMDU2NCwwLDAsMCw0OS45MjE3LS4wNzhaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxyZWN0IGNsYXNzPSJyZWN0IiB4PSIzMy41IiB5PSIzMC4xMDQyIiB3aWR0aD0iMTIuMjYzNCIgaGVpZ2h0PSIzOS43OTE3Ii8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjIzNjYiIHk9IjMwLjEwNDIiIHdpZHRoPSIxMi4yNjM0IiBoZWlnaHQ9IjM5Ljc5MTciLz48L2c+PC9zdmc+Cg==","base64"),v=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtb3V0bGluZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgOTkuODQzNCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utc2hhcnAtb3V0bGluZTwvdGl0bGU+PHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjEyLS4wNzgzYTUwLDUwLDAsMSwwLDUwLjAwMDYsNTBBNTAuMDU2Miw1MC4wNTYyLDAsMCwwLDQ5LjkyMTItLjA3ODNaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNDYuODcwOSw2OS45NTMxSDMzLjEzODVWMjkuODlINDYuODcwOVpNMzUuMTQxNiw2Ny45NWg5LjcyNjJWMzEuODkzNUgzNS4xNDE2WiIvPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNjYuNzA0Nyw2OS45NTMxSDUyLjk3MjJWMjkuODlINjYuNzA0N1pNNTQuOTc1NCw2Ny45NWg5LjcyNjJWMzEuODkzNUg1NC45NzU0WiIvPjwvZz48L3N2Zz4K","base64"),y=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLW91dGxpbmUiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDUwKSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgo8L3N2Zz4K","base64"),w=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLWZpbGwiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC4wcyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuNHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCA1MCkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMS4ycyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+Cjwvc3ZnPgo=","base64"),b=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1maWxsIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjBzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItMTAiIHk9Ii0xMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTEwIiB5PSItMTAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuOHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDUwKSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIxLjJzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KPC9zdmc+Cg==","base64"),I=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1vdXRsaW5lIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTkiIHk9Ii05IiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItOSIgeT0iLTkiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSA1MCkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+Cjwvc3ZnPgo=","base64");o(function(e,t){function r(e){return a.find(".fp-"+e,t)[0]}function M(e){a.css(T,"padding-top",100*e+"%"),D.inlineBlock||a.height(a.find("object",t)[0],a.height(t))}function C(e){e?(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout")):(a.addClass(t,"is-mouseout"),a.removeClass(t,"is-mouseover"))}a.find(".fp-filters").forEach(a.removeNode);try{var A;document.body.appendChild(A=a.createElement("div",{},n("PHN2ZyBjbGFzcz0iZnAtZmlsdGVycyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMCAwIj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImYxIiB4PSItMjAlIiB5PSItMjAlIiB3aWR0aD0iMjAwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlT2Zmc2V0IHJlc3VsdD0ib2ZmT3V0IiBpbj0iU291cmNlQWxwaGEiIGR4PSIwIiBkeT0iMCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggcmVzdWx0PSJtYXRyaXhPdXQiIGluPSJvZmZPdXQiIHR5cGU9Im1hdHJpeCIKICAgICAgdmFsdWVzPSIwLjMgMCAwIDAgMCAwIDAuMyAwIDAgMCAwIDAgMC4zIDAgMCAwIDAgMCAwLjQgMCIgLz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHJlc3VsdD0iYmx1ck91dCIgaW49Im1hdHJpeE91dCIgc3RkRGV2aWF0aW9uPSI0IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJibHVyT3V0IiBtb2RlPSJub3JtYWwiIC8+CiAgICA8L2ZpbHRlcj4KICA8L2RlZnM+Cjwvc3ZnPgo=","base64"))),a.css(A,{width:0,height:0,overflow:"hidden",position:"absolute",margin:0,padding:0})}catch(S){}var E,j=e.conf,D=o.support;a.find(".fp-ratio,.fp-ui",t).forEach(a.removeNode),a.addClass(t,"flowplayer"),t.appendChild(a.createElement("div",{className:"fp-ratio"}));var N=a.createElement("div",{className:"fp-ui"},' <div class="fp-waiting"> {{ LOADING_SHARP_OUTLINE }} {{ LOADING_SHARP_FILL }} {{ LOADING_ROUNDED_FILL }} {{ LOADING_ROUNDED_OUTLINE }} </div> <div class="fp-header"> <a class="fp-share fp-icon"></a> <a class="fp-fullscreen fp-icon"></a> <a class="fp-unload fp-icon"></a> </div> <p class="fp-speed-flash"></p> <div class="fp-play fp-visible"> <a class="fp-icon fp-playbtn"></a> {{ PLAY_ROUNDED_FILL }} {{ PLAY_ROUNDED_OUTLINE }} {{ PLAY_SHARP_FILL }} {{ PLAY_SHARP_OUTLINE }} </div> <div class="fp-pause"> <a class="fp-icon fp-playbtn"></a> {{ PAUSE_SHARP_OUTLINE }} {{ PAUSE_SHARP_FILL }} {{ PAUSE_ROUNDED_OUTLINE }} {{ PAUSE_ROUNDED_FILL }} </div> <div class="fp-controls"> <a class="fp-icon fp-playbtn"></a> <span class="fp-elapsed">00:00</span> <div class="fp-timeline fp-bar"> <span class="fp-timestamp"></span> <div class="fp-progress fp-color"></div> </div> <span class="fp-duration"></span> <span class="fp-remaining"></span> <div class="fp-volume"> <a class="fp-icon fp-volumebtn"></a> <div class="fp-volumebar fp-bar-slider"> <em></em><em></em><em></em><em></em><em></em><em></em><em></em> </div> </div> <strong class="fp-speed fp-hidden"></strong> </div>'.replace("{{ PAUSE_ROUNDED_FILL }}",g).replace("{{ PAUSE_ROUNDED_OUTLINE }}",h).replace("{{ PAUSE_SHARP_FILL }}",m).replace("{{ PAUSE_SHARP_OUTLINE }}",v).replace("{{ PLAY_SHARP_OUTLINE }}",p).replace("{{ PLAY_SHARP_FILL }}",d).replace("{{ PLAY_ROUNDED_OUTLINE }}",c).replace("{{ PLAY_ROUNDED_FILL }}",f).replace("{{ LOADING_ROUNDED_OUTLINE }}",y).replace("{{ LOADING_ROUNDED_FILL }}",w).replace("{{ LOADING_SHARP_FILL }}",b).replace("{{ LOADING_SHARP_OUTLINE }}",I).replace(/url\(#/g,"url("+window.location.href.replace(window.location.hash,"").replace(/\#$/g,"")+"#"));t.appendChild(N);var x=r("waiting"),L=r("elapsed"),T=r("ratio"),Z=r("speed-flash"),P=r("duration"),k=r("remaining"),Y=r("timestamp"),z=a.css(T,"padding-top"),O=r("play"),G=r("pause"),R=r("timeline"),W=l(R,e.rtl),U=r("fullscreen"),J=r("volumebar"),B=u(J,{rtl:e.rtl}),F=a.hasClass(t,"no-toggle");W.disableAnimation(a.hasClass(t,"is-touch")),e.sliders=e.sliders||{},e.sliders.timeline=W,e.sliders.volume=B;var H=[];D.svg||a.html(x,"<p>loading &hellip;</p>"),j.ratio&&M(j.ratio);try{j.fullscreen||a.removeNode(U)}catch(S){a.removeNode(U)}e.on("dvrwindow",function(){W.disable(!1)}),e.on("ready",function(e,n,r){var o=n.video.duration;W.disable(n.disabled||!o),j.adaptiveRatio&&!isNaN(r.height/r.width)&&M(r.height/r.width,!0),a.html([P,k],n.live?"Live":i(o)),a.toggleClass(t,"is-long",o>=3600),B.slide(n.volumeLevel),"flash"===n.engine.engineName?W.disableAnimation(!0,!0):W.disableAnimation(!1),a.find(".fp-title",N).forEach(a.removeNode),r.title&&a.prepend(N,a.createElement("div",{className:"fp-message fp-title"},r.title)),a.toggleClass(t,"has-title",!!r.title)}).on("unload",function(){z||j.splash||a.css(T,"paddingTop",""),W.slide(0),a.addClass(O,"fp-visible")}).on("buffer",function(e,t,n){var r=t.video,i=r.buffer/r.duration;!r.seekable&&D.seekable&&W.max(t.conf.live?1/0:i),n&&"number"!=typeof n||(n=[{start:0,end:r.buffer}]);var o=a.find(".fp-buffer",R);o.length!==n.length&&(o.forEach(a.removeNode),o=[]),n.forEach(function(e,t){var n=o[t]||a.createElement("div",{className:"fp-buffer"});a.css(n,{left:100*e.start/r.duration+"%",width:100*(e.end-e.start)/r.duration+"%"}),a.prepend(R,n)})}).on("speed",function(e,t,n){t.video.time&&(a.text(Z,n+"x"),a.addClass(Z,"fp-shown"),H=H.filter(function(e){return clearTimeout(e),!1}),H.push(setTimeout(function(){a.addClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-shown")},300))},1e3))})))}).on("buffered",function(){W.max(1)}).on("progress seek",function(n,r,o){var s=e.video.duration,l=e.video.seekOffset||0;o=o||e.video.time;var u=(o-l)/(s-l);W.dragging||W.slide(u,e.seeking?0:250),a.toggleClass(t,"is-live-position",s-o<j.livePositionOffset),a.html(L,i(o)),a.html(k,i(s-o,!0))}).on("finish resume seek",function(e){a.toggleClass(t,"is-finished","finish"==e.type)}).on("resume",function(){a.addClass(O,"fp-visible"),setTimeout(function(){a.removeClass(O,"fp-visible")},300)}).on("pause",function(){a.addClass(G,"fp-visible"),setTimeout(function(){a.removeClass(G,"fp-visible")},300)}).on("stop",function(){a.html(L,i(0)),W.slide(0,100)}).on("finish",function(){a.html(L,i(e.video.duration)),W.slide(1,100),a.removeClass(t,"is-seeking")}).on("beforeseek",function(){}).on("volume",function(){B.slide(e.volumeLevel)}).on("disable",function(){var n=e.disabled;W.disable(n),B.disable(n),a.toggleClass(t,"is-disabled",e.disabled)}).on("mute",function(e,n,r){a.toggleClass(t,"is-muted",r)}).on("error",function(e,n,r){if(a.removeClass(t,"is-loading"),a.removeClass(t,"is-seeking"),a.addClass(t,"is-error"),r){n.error=!0;var i=r.code;(r.message||"").match(/DECODER_ERROR_NOT_SUPPORTED/)&&(i=3);var o=n.message((n.engine&&n.engine.engineName||"html5")+": "+j.errors[i]);a.removeClass(t,"is-mouseover"),n.one("load progress",function(e){if(e.type=="progress"&&!n.error)o()})}}).one("resume ready",function(){var e=a.find("video.fp-engine",t)[0];if(e&&(!a.width(e)||!a.height(e))){var n=t.style.overflow;t.style.overflow="visible",setTimeout(function(){n?t.style.overflow=n:t.style.removeProperty("overflow")})}}),s.on(t,"mouseenter mouseleave",function(n){if(!F){var r,i="mouseover"==n.type;if(C(i),i){var o=function(){C(!0),r=new Date};e.on("pause.x volume.x",o),s.on(t,"mousemove.x",o),E=setInterval(function(){new Date-r>j.mouseoutTimeout&&(C(!1),r=new Date)},100)}else s.off(t,"mousemove.x"),e.off("pause.x volume.x"),clearInterval(E)}}),s.on(t,"mouseleave",function(){(W.dragging||B.dragging)&&(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout"))}),s.on(t,"click.player",function(t){return e.disabled?void 0:a.hasClass(t.target,"fp-ui")||a.hasClass(t.target,"fp-engine")||t.flash||a.hasParent(t.target,".fp-play,.fp-pause")?(t.preventDefault&&t.preventDefault(),e.toggle()):void 0}),s.on(t,"mousemove",".fp-timeline",function(t){var n=t.pageX||t.clientX,r=n-a.offset(R).left,o=r/a.width(R),s=e.video,l=s.duration-(void 0===s.seekOffset?0:s.seekOffset),u=(e.rtl?1-o:o)*l;if(!(0>o)){a.html(Y,i(u));var c=r-a.width(Y)/2;0>c&&(c=0),c>a.width(R)-a.width(Y)&&(c=!1),c!==!1?a.css(Y,{left:c+"px",right:"auto"}):a.css(Y,{left:"auto",right:"0px"})}}),s.on(t,"contextmenu",function(n){var r=window;if(!a.hasClass(t,"is-flash-disabled")){var i=a.find(".fp-context-menu",t)[0];i&&(n.preventDefault(),e.showMenu(i,{left:n.clientX-r.scrollX,top:n.clientY-r.scrollY}),s.on(t,"click",".fp-context-menu",function(e){e.stopPropagation()}))}}),e.on("flashdisabled",function(n,r,i){a.addClass(t,"is-flash-disabled");var o;i!==!1&&(o=e.message("Seems something is blocking Adobe Flash from running")),e.one("ready progress",function(){a.removeClass(t,"is-flash-disabled"),o&&o()})}),j.poster&&a.css(t,"background-image","url("+j.poster+")");var V=a.css(t,"background-color"),X="none"!=a.css(t,"background-image")||V&&"rgba(0, 0, 0, 0)"!=V&&"transparent"!=V;if(X&&!j.splash){j.poster||(j.poster=!0);var _=function(){a.addClass(t,"is-poster"),a.addClass(O,"fp-visible"),e.poster=!0,e.on("resume.poster progress.poster beforeseek.poster",function(n){("beforeseek"===n.type||e.playing)&&(a.removeClass(t,"is-poster"),a.removeClass(O,"fp-visible"),e.poster=!1,e.off(".poster"))})};e.on("stop",function(){_()}),e.on("ready",function(e,t,n){n.index||n.autoplay||_()})}"string"==typeof j.splash&&a.css(t,"background-image","url('"+j.splash+"')"),!X&&e.forcedSplash&&a.css(t,"background-color","#555"),s.on(t,"click",".fp-toggle, .fp-play, .fp-playbtn",function(){e.disabled||e.toggle()}),s.on(t,"click",".fp-volumebtn",function(){e.mute()}),s.on(t,"click",".fp-fullscreen",function(){e.fullscreen()}),s.on(t,"click",".fp-unload",function(){e.unload()}),s.on(R,"slide",function(t){e.seeking=!0,e.seekTo(10*t)}),s.on(J,"slide",function(t){e.volume(t)}),s.on(t,"click",".fp-duration,.fp-remaining",function(){return e.dvr?e.seekTo(10):void a.toggleClass(t,"is-inverted")}),C(F);var K;if(e.on("shutdown",function(){s.off(R),s.off(J),K&&window.cancelAnimationFrame(K),a.removeNode(N),a.find(".fp-ratio",t).forEach(a.removeNode)}),"functionDISABLED-FOR-PERFORMANCE-REASONS"==typeof window.requestAnimationFrame){var Q=a.find(".fp-player",t)[0]||t,q=function(){a.toggleClass(t,"is-tiny",Q.clientWidth<400),a.toggleClass(t,"is-small",Q.clientWidth<600&&Q.clientWidth>=400),K=window.requestAnimationFrame(q)};K=window.requestAnimationFrame(q)}}),t.exports.format=i}).call(this,e("buffer").Buffer)},{"../common":1,"../flowplayer":31,"./ui/bar-slider":28,"./ui/slider":29,bean:34,buffer:35}],28:[function(e,t,n){function r(e,t){function n(t){var n=t.pageX||t.clientX,r=o.offset(e),i=o.width(e);!n&&t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches.length&&(n=t.originalEvent.touches[0].pageX);var a=n-r.left;a=Math.max(0,Math.min(i,a));var s=a/i;return l&&(s=1-s),s}t=t||{};var r=t.activeClass||"fp-color",a=t.inactiveClass||"fp-grey",s=t.childSelector||"em",l=!!t.rtl,u=!1,c=o.find(s,e).length,f={unload:function(){i.off(e,".barslider")},slide:function(t,n){o.find(s,e).forEach(function(e,n){var i=t>n/c;o.toggleClass(e,r,i),o.toggleClass(e,a,!i)}),n&&i.fire(e,"slide",[t])},disable:function(e){u=e}};return i.on(e,"mousedown.sld touchstart.sld",function(t){t.preventDefault(),u||(f.slide(n(t),!0),i.on(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),f.slide(n(e),!0)}),i.one(document,"mouseup.sld touchup.sld",function(){i.off(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld")}))}),f}var i=e("bean"),o=e("../../common");t.exports=r},{"../../common":1,bean:34}],29:[function(e,t,n){"use strict";var r=e("bean"),i=e("../../common"),o=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},a=function(e,t){var n,a,s,l,u,c,f,d,p=i.lastChild(e),h=!1,g=function(){a=i.offset(e),s=i.width(e),l=i.height(e),c=u?l:s,d=w(f)},m=function(t){n||t==b.value||f&&!(f>t)||(r.fire(e,"slide",[t]),b.value=t)},v=function(e){var n=e.pageX||e.clientX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var r=u?e.pageY-a.top:n-a.left;r=Math.max(0,Math.min(d||c,r));var i=r/c;return u&&(i=1-i),t&&(i=1-i),y(i,0,!0)},y=function(e,t){void 0===t&&(t=0),e>1&&(e=1);var n=Math.round(1e3*e)/10+"%";return(!f||f>=e)&&(h?i.removeClass(p,"animated"):(i.addClass(p,"animated"),i.css(p,"transition-duration",(t||0)+"ms")),i.css(p,"width",n)),e},w=function(e){return Math.max(0,Math.min(c,u?(1-e)*l:e*s))},b={max:function(e){f=e},disable:function(e){n=e},slide:function(e,t,n){g(),n&&m(e),y(e,t)},disableAnimation:function(t,n){h=t!==!1,i.toggleClass(e,"no-animation",!!n)}};return g(),r.on(e,"mousedown.sld touchstart",function(t){if(t.preventDefault(),!n){var a=o(m,100);g(),b.dragging=!0,i.addClass(e,"is-dragging"),m(v(t)),r.on(document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),a(v(e))}),r.one(document,"mouseup touchend",function(){b.dragging=!1,i.removeClass(e,"is-dragging"),r.off(document,"mousemove.sld touchmove.sld")})}}),b};t.exports=a},{"../../common":1,bean:34}],30:[function(e,t,n){function r(e){var t=document.createElement("textarea");t.value=e,t.style.opacity=0,t.style.position="absolute",document.body.appendChild(t),t.select();var n=document.execCommand("copy");if(document.body.removeChild(t),!n)throw new Error("Unsuccessfull")}t.exports=function(e,t,n){try{r(e),t()}catch(i){n(i)}}},{}],31:[function(e,t,n){"use strict";function r(e,t,n){t&&t.embed&&(t.embed=i({},v.defaults.embed,t.embed));var r=!1;try{"undefined"==typeof v.conf.storage&&"object"==typeof window.localStorage&&(window.localStorage.flowplayerTestStorage="test",r=!0)}catch(s){}var l,p,h=e,g=i({},v.defaults,v.conf,t),m={},b=h.className,I=new w;u.addClass(h,"is-loading"),u.toggleClass(h,"no-flex",!v.support.flex),u.toggleClass(h,"no-svg",!v.support.svg);try{m=v.conf.storage||(r?window.localStorage:m)}catch(M){}if(g.volume="true"===m.muted?0:g.volume!==v.defaults.volume?g.volume:isNaN(m.volume)?g.volume:m.volume,g.debug=!!m.flowplayerDebug||g.debug,g.aspectRatio&&"string"==typeof g.aspectRatio){var C=g.aspectRatio.split(/[:\/]/);g.ratio=C[1]/C[0]}var A=h.currentStyle&&"rtl"===h.currentStyle.direction||window.getComputedStyle&&null!==window.getComputedStyle(h,null)&&"rtl"===window.getComputedStyle(h,null).getPropertyValue("direction");A&&u.addClass(h,"is-rtl");var S={conf:g,currentSpeed:1,volumeLevel:g.muted?0:"undefined"==typeof g.volume?1*m.volume:g.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:"true"==m.muted||g.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:A,hijack:function(e){try{S.engine.suspendEngine()}catch(t){}S.hijacked=e},release:function(){try{S.engine.resumeEngine()}catch(e){}S.hijacked=!1},debug:function(){g.debug&&console.log.apply(console,["DEBUG"].concat([].slice.call(arguments)))},load:function(e,t){if(!S.error&&!S.loading){S.video={},S.finished=!1,e=e||g.clip,e=i({},I.resolve(e,g.clip.sources)),(S.playing||S.engine)&&(e.autoplay=!0);var n=E(e);if(!n)return setTimeout(function(){S.trigger("error",[S,{code:v.support.flashVideo?5:10}])})&&S;if(!n.engineName)throw new Error("engineName property of factory should be exposed");if(S.engine&&n.engineName===S.engine.engineName||(S.ready=!1,S.engine&&(S.engine.unload(),S.conf.autoplay=!0),p=S.engine=n(S,h),S.one("ready",function(){setTimeout(function(){S.muted?S.mute(!0,!0):p.volume(S.volumeLevel)})})),i(e,p.pick(e.sources.filter(function(e){return e.engine?e.engine===p.engineName:!0}))),e.src){var r=S.trigger("load",[S,e,p],!0);r.defaultPrevented?S.loading=!1:(S.ready=!1,p.load(e),o(e)&&(t=e),t&&S.one("ready",t))}return S}},pause:function(e){return S.hijacked?S.hijacked.pause(e)|S:(!S.ready||S.seeking||S.loading||(p.pause(),S.one("pause",e)),S)},resume:function(){var e=S.trigger("beforeresume",[S],!0);if(!e.defaultPrevented)return S.hijacked?S.hijacked.resume()|S:(S.ready&&S.paused&&(p.resume(),S.finished&&(S.trigger("resume",[S]),S.finished=!1)),S)},toggle:function(){return S.ready?S.paused?S.resume():S.pause():S.load()},seek:function(e,t){if("boolean"==typeof e){var n=S.conf.seekStep||.1*S.video.duration;e=S.video.time+(e?n:-n),e=Math.min(Math.max(e,0),S.video.duration-.1)}if("undefined"==typeof e)return S;if(S.hijacked)return S.hijacked.seek(e,t)|S;if(S.ready){l=e;var r=S.trigger("beforeseek",[S,e],!0);r.defaultPrevented?(S.seeking=!1,u.toggleClass(h,"is-seeking",S.seeking)):(p.seek(e),o(t)&&S.one("seek",t))}return S},seekTo:function(e,t){return void 0===e?S.seek(l,t):void 0!==S.video.seekOffset?S.seek(S.video.seekOffset+.1*(S.video.duration-S.video.seekOffset)*e,t):S.seek(.1*S.video.duration*e,t)},mute:function(e,t){return void 0===e&&(e=!S.muted),S.muted=e,t||(m.muted=e,m.volume=isNaN(m.volume)?g.volume:m.volume),"undefined"!=typeof p.mute?p.mute(e):(S.volume(e?0:m.volume,!0),S.trigger("mute",[S,e])),S},volume:function(e,t){return S.ready&&(e=Math.min(Math.max(e,0),1),t||(m.volume=e),p.volume(e)),S},speed:function(e,t){return S.ready&&("boolean"==typeof e&&(e=g.speeds[g.speeds.indexOf(S.currentSpeed)+(e?1:-1)]||S.currentSpeed),p.speed(e),t&&h.one("speed",t)),S},stop:function(){return S.ready&&(S.pause(),!S.live||S.dvr?S.seek(0,function(){S.trigger("stop",[S])}):S.trigger("stop",[S])),S},unload:function(){return g.splash?(S.trigger("unload",[S]),p&&(p.unload(),S.engine=p=0)):S.stop(),S},shutdown:function(){S.unload(),S.trigger("shutdown",[S]),a.off(h),delete f[h.getAttribute("data-flowplayer-instance-id")],h.removeAttribute("data-flowplayer-instance-id")},disable:function(e){return void 0===e&&(e=!S.disabled),e!=S.disabled&&(S.disabled=e,S.trigger("disable",e)),S},registerExtension:function(e,t){e=e||[],t=t||[],"string"==typeof e&&(e=[e]),"string"==typeof t&&(t=[t]),e.forEach(function(e){S.extensions.js.push(e)}),t.forEach(function(e){S.extensions.css.push(e)})}};S.conf=i(S.conf,g),S.extensions={js:[],css:[]},v.extensions.forEach(function(e){S.registerExtension(e[0],e[1])}),c(S);var E=function(e){var t,n=v.engines;if(g.engine){var r=n.filter(function(e){return e.engineName===g.engine})[0];if(r&&e.sources.some(function(e){return e.engine&&e.engine!==r.engineName?!1:r.canPlay(e.type,S.conf)}))return r}return g.enginePreference&&(n=v.engines.filter(function(e){return g.enginePreference.indexOf(e.engineName)>-1}).sort(function(e,t){return g.enginePreference.indexOf(e.engineName)-g.enginePreference.indexOf(t.engineName)})),e.sources.some(function(e){var r=n.filter(function(t){return e.engine&&e.engine!==t.engineName?!1:t.canPlay(e.type,S.conf)}).shift();return r&&(t=r),!!r}),t};return h.getAttribute("data-flowplayer-instance-id")||(h.setAttribute("data-flowplayer-instance-id",y++),S.on("boot",function(){var e=v.support;(g.splash||u.hasClass(h,"is-splash")||!e.firstframe)&&(S.forcedSplash=!g.splash&&!u.hasClass(h,"is-splash"),S.splash=!0,g.splash||(g.splash=!0),u.addClass(h,"is-splash")),g.splash&&u.find("video",h).forEach(u.removeNode),(g.dvr||g.live||u.hasClass(h,"is-live"))&&(S.live=g.live=!0,S.dvr=g.dvr=!!g.dvr||u.hasClass(h,"is-dvr"),u.addClass(h,"is-live"),u.toggleClass(h,"is-dvr",S.dvr)),d.forEach(function(e){e(S,h)}),f.push(S),g.splash?S.unload():S.load(),g.disabled&&S.disable(),S.one("ready",n),S.one("shutdown",function(){h.className=b})}).on("load",function(e,t,n){g.splash&&u.find(".flowplayer.is-ready,.flowplayer.is-loading").forEach(function(e){var t=e.getAttribute("data-flowplayer-instance-id");if(t!==h.getAttribute("data-flowplayer-instance-id")){var n=f[Number(t)];n&&n.conf.splash&&n.unload()}}),u.addClass(h,"is-loading"),t.loading=!0,("undefined"!=typeof n.live||"undefined"!=typeof n.dvr)&&(u.toggleClass(h,"is-live",n.dvr||n.live),u.toggleClass(h,"is-dvr",!!n.dvr),t.live=n.dvr||n.live,t.dvr=!!n.dvr)}).on("ready",function(e,t,n){n.time=0,t.video=n,u.removeClass(h,"is-loading"),t.loading=!1,t.muted?t.mute(!0,!0):t.volume(t.volumeLevel);var r=t.conf.hlsFix&&/mpegurl/i.exec(n.type);u.toggleClass(h,"hls-fix",!!r)}).on("unload",function(){u.removeClass(h,"is-loading"),S.loading=!1}).on("ready unload",function(e){var t="ready"==e.type;u.toggleClass(h,"is-splash",!t),u.toggleClass(h,"is-ready",t),S.ready=t,S.splash=!t}).on("progress",function(e,t,n){t.video.time=n}).on("buffer",function(e,t,n){t.video.buffer="number"==typeof n?n:n.length?n[n.length-1].end:0}).on("speed",function(e,t,n){t.currentSpeed=n}).on("volume",function(e,t,n){t.volumeLevel=Math.round(100*n)/100,t.muted&&n&&t.mute(!1)}).on("beforeseek seek",function(e){S.seeking="beforeseek"==e.type,u.toggleClass(h,"is-seeking",S.seeking)}).on("ready pause resume unload finish stop",function(e){S.paused=/pause|finish|unload|stop/.test(e.type),S.paused=S.paused||"ready"===e.type&&!g.autoplay&&!S.playing,S.playing=!S.paused,u.toggleClass(h,"is-paused",S.paused),u.toggleClass(h,"is-playing",S.playing),S.load.ed||S.pause()}).on("finish",function(){S.finished=!0}).on("error",function(){})),S.trigger("boot",[S,h]),S}var i=e("extend-object"),o=e("is-function"),a=e("bean"),s=e("./ext/ui/slider"),l=e("./ext/ui/bar-slider"),u=e("./common"),c=e("./ext/events"),f=[],d=[],p=window.onbeforeunload;window.onbeforeunload=function(e){return f.forEach(function(e){e.conf.splash?e.unload():e.bind("error",function(){u.find(".flowplayer.is-error .fp-message").forEach(u.removeNode)})}),p?p(e):void 0};var h=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent),g=/(\d+\.\d+) Safari/.exec(navigator.userAgent),m=g?Number(g[1]):100,v=t.exports=function(e,t,n){if(o(e))return d.push(e);if("number"==typeof e||"undefined"==typeof e)return f[e||0];if(e.nodeType){if(null!==e.getAttribute("data-flowplayer-instance-id"))return f[e.getAttribute("data-flowplayer-instance-id")];if(!t)return;return r(e,t,n)}if(e.jquery)return v(e[0],t,n);if("string"==typeof e){var i=u.find(e)[0];return i&&v(i,t,n)}};i(v,{version:"7.2.7",engines:[],engine:function(e){return v.engines.filter(function(t){return t.engineName===e})[0]},extensions:[],conf:{},set:function(e,t){"string"==typeof e?v.conf[e]=t:i(v.conf,e)},registerExtension:function(e,t){v.extensions.push([e,t])},support:{},defaults:{debug:!1,disabled:!1,fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,rtmp:0,proxy:"best",hlsQualities:!0,seekStep:!1,splash:!1,live:!1,livePositionOffset:120,swf:"//releases.flowplayer.org/7.2.7/commercial/flowplayer.swf",swfHls:"//releases.flowplayer.org/7.2.7/commercial/flowplayerhls.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,mouseoutTimeout:5e3,mutedAutoplay:!0,clickToUnMute:!0,volume:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:h&&8>m,disableInline:!1},bean:a,common:u,slider:s,barSlider:l,extend:i});var y=0,w=e("./ext/resolve");if("undefined"!=typeof window.jQuery){var b=window.jQuery;b(function(){"function"==typeof b.fn.flowplayer&&b('.flowplayer:has(video:not(.fp-engine),script[type="application/json"])').flowplayer()});var I=function(e){if(!e.length)return{};var t=e.data()||{},n={};return b.each(["autoplay","loop","preload","poster"],function(r,i){var o=e.attr(i);void 0!==o&&-1!==["autoplay","poster"].indexOf(i)?n[i]=o?o:!0:void 0!==o&&(t[i]=o?o:!0)}),e[0].autoplay=e[0].preload=!1,t.subtitles=e.find("track").map(function(){var e=b(this);return{src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label"),srclang:e.attr("srclang"),default:e.prop("default")}}).get(),t.sources=(new w).sourcesFromVideoTag(e,b),i(n,{clip:t})};b.fn.flowplayer=function(e,t){return this.each(function(){"string"==typeof e&&(e={swf:e}),o(e)&&(t=e,e={});var n=b(this),i=n.find('script[type="application/json"]'),a=i.length?JSON.parse(i.text()):I(n.find("video")),s=b.extend({},e||{},a,n.data()),l=r(this,s,t);c.EVENTS.forEach(function(e){l.on(e+".jquery",function(e){n.trigger.call(n,e.type,e.detail&&e.detail.args)})}),n.data("flowplayer",l)})}}},{"./common":1,"./ext/events":12,"./ext/resolve":21,"./ext/ui/bar-slider":28,"./ext/ui/slider":29,bean:34,"extend-object":39,"is-function":42}],32:[function(e,t,n){e("es5-shim");var r=t.exports=e("./flowplayer");e("./ext/support"),e("./engine/embed"),e("./engine/hlsjs"),e("./engine/html5"),e("./engine/flash"),e("./ext/ui"),e("./ext/message"),e("./ext/keyboard"),e("./ext/playlist"),e("./ext/cuepoint"),e("./ext/subtitle"),e("./ext/analytics"),e("./ext/share"),e("./ext/facebook"),e("./ext/twitter"),e("./ext/embed"),e("./ext/airplay"),e("./ext/chromecast"),e("./ext/qsel"),e("./ext/menu"),e("./ext/fullscreen"),e("./ext/mobile"),r(function(e,t){function n(e){var t=document.createElement("a");return t.href=e,u.hostname(t.hostname)}function i(e){var t="ab.ca,ac.ac,ac.ae,ac.at,ac.be,ac.cn,ac.il,ac.in,ac.jp,ac.kr,ac.sg,ac.th,ac.uk,ad.jp,adm.br,adv.br,ah.cn,am.br,arq.br,art.br,arts.ro,asn.au,asso.fr,asso.mc,bc.ca,bel.tr,bio.br,biz.pl,biz.tr,bj.cn,br.com,cn.com,cng.br,cnt.br,co.ac,co.at,co.de,co.gl,co.hk,co.id,co.il,co.in,co.jp,co.kr,co.mg,co.ms,co.nz,co.th,co.uk,co.ve,co.vi,co.za,com.ag,com.ai,com.ar,com.au,com.br,com.cn,com.co,com.cy,com.de,com.do,com.ec,com.es,com.fj,com.fr,com.gl,com.gt,com.hk,com.hr,com.hu,com.kg,com.ki,com.lc,com.mg,com.mm,com.ms,com.mt,com.mu,com.mx,com.my,com.na,com.nf,com.ng,com.ni,com.pa,com.ph,com.pl,com.pt,com.qa,com.ro,com.ru,com.sb,com.sc,com.sg,com.sv,com.tr,com.tw,com.ua,com.uy,com.ve,com.vn,cp.tz,cq.cn,de.com,de.org,ecn.br,ed.jp,edu.au,edu.cn,edu.hk,edu.mm,edu.my,edu.pl,edu.pt,edu.qa,edu.sg,edu.tr,edu.tw,eng.br,ernet.in,esp.br,etc.br,eti.br,eu.com,eu.int,eu.lv,firm.in,firm.ro,fm.br,fot.br,fst.br,g12.br,gb.com,gb.net,gd.cn,gen.in,go.jp,go.kr,go.th,gov.au,gov.az,gov.br,gov.cn,gov.il,gov.in,gov.mm,gov.my,gov.qa,gov.sg,gov.tr,gov.tw,gov.uk,govt.nz,gr.jp,gs.cn,gv.ac,gv.at,gx.cn,gz.cn,he.cn,hi.cn,hk.cn,hl.cn,hu.com,id.au,idv.tw,in.th,in.ua,ind.br,ind.in,inf.br,info.pl,info.ro,info.tr,info.ve,iwi.nz,jl.cn,jor.br,js.cn,jus.br,k12.il,k12.tr,kr.com,lel.br,lg.jp,ln.cn,ltd.uk,maori.nz,mb.ca,me.uk,med.br,mi.th,mil.br,mil.uk,mo.cn,mod.uk,muni.il,nb.ca,ne.jp,ne.kr,net.ag,net.ai,net.au,net.br,net.cn,net.do,net.gl,net.hk,net.il,net.in,net.kg,net.ki,net.lc,net.mg,net.mm,net.mu,net.ni,net.nz,net.pl,net.ru,net.sb,net.sc,net.sg,net.th,net.tr,net.tw,net.uk,net.ve,nf.ca,nhs.uk,nm.cn,nm.kr,no.com,nom.br,nom.ni,nom.ro,ns.ca,nt.ca,nt.ro,ntr.br,nx.cn,odo.br,off.ai,on.ca,or.ac,or.at,or.jp,or.kr,or.th,org.ag,org.ai,org.au,org.br,org.cn,org.do,org.es,org.gl,org.hk,org.in,org.kg,org.ki,org.lc,org.mg,org.mm,org.ms,org.nf,org.ng,org.ni,org.nz,org.pl,org.ro,org.ru,org.sb,org.sc,org.sg,org.tr,org.tw,org.uk,org.ve,pe.ca,plc.uk,police.uk,ppg.br,presse.fr,pro.br,psc.br,psi.br,qc.ca,qc.com,qh.cn,rec.br,rec.ro,res.in,sa.com,sc.cn,sch.uk,se.com,se.net,sh.cn,sk.ca,slg.br,sn.cn,store.ro,tj.cn,tm.fr,tm.mc,tm.ro,tmp.br,tur.br,tv.br,tv.tr,tw.cn,uk.com,uk.net,us.com,uy.com,vet.br,waw.pl,web.ve,www.ro,xj.cn,xz.cn,yk.ca,yn.cn,zj.cn,zlg.br".split(",");e=e.toLowerCase();var n=e.split("."),r=n.length;if(2>r||/^\d+$/.test(n[r-1]))return e;var i=n.slice(-2).join(".");return r>=3&&t.indexOf(i)>=0?n.slice(-3).join("."):i}function o(e,t){t=i(t);for(var n=0,r=t.length-1;r>=0;r--)n+=0x65cb98ae4ad1ec*t.charCodeAt(r);for(n=(""+n).substring(0,7),r=0;r<e.length;r++)if(n===e[r].substring(1,8))return 1}var a=function(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(e.className+=" "+t)},s=function(e){return"none"!==window.getComputedStyle(e).display},l=e.conf,u=r.common,c=u.createElement,f=l.swf.indexOf("flowplayer.org")&&l.e&&t.getAttribute("data-origin"),d=f?n(f):u.hostname(),p=(document,l.key);if("file:"==location.protocol&&(d="localhost"),e.load.ed=1,l.hostname=d,l.origin=f||location.href,f&&a(t,"is-embedded"),"string"==typeof p&&(p=p.split(/,\s*/)),p&&"function"==typeof o&&o(p,d)){if(l.logo){var h=u.find(".fp-player",t)[0],g=l.logo.href||"",m=l.logo.src||l.logo,v=c("a",{className:"fp-logo",href:g});f&&(v.href=v.href||f),l.embed&&l.embed.popup&&(v.target="_blank");var y=c("img",{src:m});v.appendChild(y),(h||t).appendChild(v)}}else{var v=c("a",{onclick:""}),h=u.find(".fp-player",t)[0];(h||t).appendChild(v);var w=c("div",{className:"fp-context-menu fp-menu"},'<strong>&copy; 2018 Flowplayer AB</strong><a href="https://flowplayer.com/hello/?from=player">About Flowplayer</a><a href="https://flowplayer.com/license">GPL based license</a>'),b=window.location.href.indexOf("localhost");7!==b&&(h||t).appendChild(w),e.on("pause resume finish unload ready",function(e,n){var r=-1;if(n.video.src)for(var i=[["org","flowplayer","drive"],["org","flowplayer","my"],["org","flowplayer","cdn"],["com","flowplayer","cdn"]],o=0;o<i.length&&(r=n.video.src.indexOf("://"+i[o].reverse().join(".")),-1===r);o++);if(/pause|resume/.test(e.type)&&"flash"!=n.engine.engineName&&4!=r&&5!=r){var a={display:"block",position:"absolute",left:"16px",bottom:"56px",zIndex:99999,width:"120px",height:"27px",backgroundImage:"url("+[".png","fplogo","/",".com","foliovision","//"].reverse().join("")+")"};for(var l in a)a.hasOwnProperty(l)&&(v.style[l]=a[l]);n.load.ed=s(v)&&(7===b||w.parentNode==t||w.parentNode==h),n.load.ed||n.pause()}else v.style.display="none"})}})},{"./engine/embed":2,"./engine/flash":3,"./engine/hlsjs":4,"./engine/html5":6,"./ext/airplay":7,"./ext/analytics":8,"./ext/chromecast":9,"./ext/cuepoint":10,"./ext/embed":11,"./ext/facebook":13,"./ext/fullscreen":14,"./ext/keyboard":15,"./ext/menu":16,"./ext/message":17,"./ext/mobile":18,"./ext/playlist":19,"./ext/qsel":20,"./ext/share":22,"./ext/subtitle":23,"./ext/support":25,"./ext/twitter":26,"./ext/ui":27,"./flowplayer":31,"es5-shim":38}],33:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new d(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;u>c;c+=4)t=f[e.charCodeAt(c)]<<18|f[e.charCodeAt(c+1)]<<12|f[e.charCodeAt(c+2)]<<6|f[e.charCodeAt(c+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;n>o;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(s(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;s>a;a+=o)i.push(l(e,a,a+o>s?s:a+o));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}n.byteLength=i,n.toByteArray=a,n.fromByteArray=u;for(var c=[],f=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,g=p.length;g>h;++h)c[h]=p[h],f[p.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],34:[function(t,n,r){!function(t,r,i){"undefined"!=typeof n&&n.exports?n.exports=i():"function"==typeof e&&e.amd?e(i):r[t]=i()}("bean",this,function(e,t){e=e||"bean",t=t||this;var n,r=window,i=t[e],o=/[^\.]*(?=\..*)\.|.*/,a=/\..*/,s="addEventListener",l="removeEventListener",u=document||{},c=u.documentElement||{},f=c[s],d=f?s:"attachEvent",p={},h=Array.prototype.slice,g=function(e,t){return e.split(t||" ")},m=function(e){return"string"==typeof e},v=function(e){return"function"==typeof e},y="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",w="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",b=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},g(y+(f?w:""))),I=function(){var e="compareDocumentPosition"in c?function(e,t){return t.compareDocumentPosition&&16===(16&t.compareDocumentPosition(e))}:"contains"in c?function(e,t){return t=9===t.nodeType||t===window?c:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),M=function(){var e=g("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),t=e.concat(g("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),n=t.concat(g("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),i=e.concat(g("char charCode key keyCode keyIdentifier keyLocation location")),o=e.concat(g("data")),a=e.concat(g("touches targetTouches changedTouches scale rotation")),s=e.concat(g("data origin source")),l=e.concat(g("state")),f=/over|out/,d=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,i}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+u.body.scrollLeft+c.scrollLeft,n.clientY=e.clientY+u.body.scrollTop+c.scrollTop),f.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return o}},{reg:/^touch|^gesture/i,fix:function(){return a}},{reg:/^message$/i,fix:function(){return s}},{reg:/^popstate$/i,fix:function(){return l}},{reg:/.*/,fix:function(){return e}}],p={},h=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var i,o,a,s,l,u=e.type,c=e.target||e.srcElement;if(this.target=c&&3===c.nodeType?c.parentNode:c,n){if(l=p[u],!l)for(i=0,o=d.length;o>i;i++)if(d[i].reg.test(u)){p[u]=l=d[i].fix;break}for(s=l(e,this,u),i=s.length;i--;)!((a=s[i])in this)&&a in e&&(this[a]=e[a])}}};return h.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},h.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},h.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},h.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},h.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},h.prototype.clone=function(e){var t=new h(this,this.element,this.isNative);return t.currentTarget=e,t},h}(),C=function(e,t){return f||t||e!==u&&e!==r?e:c},A=function(){var e=function(e,t,n,r){var i=function(n,i){return t.apply(e,r?h.call(i,n?0:1).concat(r):i)},o=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=o(e,this);return n.apply(t,arguments)?(e&&(e.currentTarget=t),i(e,arguments)):void 0}:function(e){return t.__beanDel&&(e=e.clone(o(e))),i(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,i,o,a,s){var l,u=I[n];"unload"==n&&(r=N(x,t,n,r,i)),u&&(u.condition&&(r=e(t,r,u.condition,a)),n=u.base||n),this.isNative=l=b[n]&&!!t[d],this.customType=!f&&!l&&n,this.element=t,this.type=n,this.original=i,this.namespaces=o,this.eventType=f||l?n:"propertychange",this.target=C(t,l),this[d]=!!this.target[d],this.root=s,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),S=function(){var e={},t=function(n,r,i,o,a,s){var l=a?"r":"$";if(r&&"*"!=r){var u,c=0,f=e[l+r],d="*"==n;if(!f)return;for(u=f.length;u>c;c++)if((d||f[c].matches(n,i,o))&&!s(f[c],f,c,r))return}else for(var p in e)p.charAt(0)==l&&t(n,p.substr(1),i,o,a,s)},n=function(t,n,r,i){var o,a=e[(i?"r":"$")+n];if(a)for(o=a.length;o--;)if(!a[o].root&&a[o].matches(t,r,null))return!0;return!1},r=function(e,n,r,i){var o=[];return t(e,n,r,null,i,function(e){return o.push(e)}),o},i=function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},o=function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},a=function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n};return{has:n,get:r,put:i,del:o,entries:a}}(),E=function(e){n=arguments.length?e:u.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},j=function(e,t){if(f||!t||!e||e.propertyName=="_on"+t){var n=S.get(this,t||e.type,null,!1),r=n.length,i=0;for(e=new M(e,this,!0),t&&(e.type=t);r>i&&!e.isImmediatePropagationStopped();i++)n[i].removed||n[i].handler.call(this,e)}},D=f?function(e,t,n){e[n?s:l](t,j,!1)}:function(e,t,n,r){var i;n?(S.put(i=new A(e,r||t,function(t){j.call(e,t,r)},j,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),i.target.attachEvent("on"+i.eventType,i.handler)):(i=S.get(e,r||t,j,!0)[0],i&&(i.target.detachEvent("on"+i.eventType,i.handler),S.del(i)))},N=function(e,t,n,r,i){return function(){r.apply(this,arguments),e(t,n,i)}},x=function(e,t,n,r){var i,o,s=t&&t.replace(a,""),l=S.get(e,s,null,!1),u={};for(i=0,o=l.length;o>i;i++)n&&l[i].original!==n||!l[i].inNamespaces(r)||(S.del(l[i]),!u[l[i].eventType]&&l[i][d]&&(u[l[i].eventType]={t:l[i].eventType,c:l[i].type}));for(i in u)S.has(e,u[i].t,null,!1)||D(e,u[i].t,!1,u[i].c)},L=function(e,t){var r=function(t,r){for(var i,o=m(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(i=o.length;i--;)if(o[i]===t)return t},i=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return i.__beanDel={ft:r,selector:e},i},T=f?function(e,t,n){var i=u.createEvent(e?"HTMLEvents":"UIEvents");i[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(i)}:function(e,t,n){n=C(n,e),e?n.fireEvent("on"+t,u.createEventObject()):n["_on"+t]++},Z=function(e,t,n){var r,i,s,l,u=m(t);if(u&&t.indexOf(" ")>0){for(t=g(t),l=t.length;l--;)Z(e,t[l],n);return e}if(i=u&&t.replace(a,""),i&&I[i]&&(i=I[i].base),!t||u)(s=u&&t.replace(o,""))&&(s=g(s,".")),x(e,i,n,s);else if(v(t))x(e,null,t);else for(r in t)t.hasOwnProperty(r)&&Z(e,r,t[r]);return e},P=function(e,t,r,i){var s,l,u,c,f,m,y;{if(void 0!==r||"object"!=typeof t){for(v(r)?(f=h.call(arguments,3),i=s=r):(s=i,f=h.call(arguments,4),i=L(r,s,n)),u=g(t),this===p&&(i=N(Z,e,t,i,s)),c=u.length;c--;)y=S.put(m=new A(e,u[c].replace(a,""),i,s,g(u[c].replace(o,""),"."),f,!1)),m[d]&&y&&D(e,m.eventType,!0,m.customType);return e}for(l in t)t.hasOwnProperty(l)&&P.call(this,e,l,t[l])}},k=function(e,t,n,r){return P.apply(null,m(n)?[e,n,t,r].concat(arguments.length>3?h.call(arguments,5):[]):h.call(arguments))},Y=function(){return P.apply(p,arguments)},z=function(e,t,n){var r,i,s,l,u,c=g(t);for(r=c.length;r--;)if(t=c[r].replace(a,""),(l=c[r].replace(o,""))&&(l=g(l,".")),l||n||!e[d])for(u=S.get(e,t,null,!1),n=[!1].concat(n),i=0,s=u.length;s>i;i++)u[i].inNamespaces(l)&&u[i].handler.apply(e,n);else T(b[t],t,e);return e},O=function(e,t,n){for(var r,i,o=S.get(t,n,null,!1),a=o.length,s=0;a>s;s++)o[s].original&&(r=[e,o[s].type],(i=o[s].handler.__beanDel)&&r.push(i.selector),r.push(o[s].original),P.apply(null,r));return e},G={on:P,add:k,one:Y,off:Z,remove:Z,clone:O,fire:z,Event:M,setSelectorEngine:E,noConflict:function(){return t[e]=i,this}};if(r.attachEvent){var R=function(){var e,t=S.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&Z(t[e].element,t[e].type);r.detachEvent("onunload",R),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",R)}return E(),G})},{}],35:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,n,r):"string"==typeof t?f(e,t,n):h(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),0>=t?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function c(e,t){if(l(t),e=o(e,0>t?0:0|g(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;++n)e[n]=0;return e}function f(e,t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);e=o(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function d(e,t){var n=t.length<0?0:0|g(t.length);e=o(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t,n,r){if(t.byteLength,0>n||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=d(e,t),e}function h(e,t){if(a.isBuffer(t)){var n=0|g(t.length);return e=o(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||K(t.length)?o(e,0):d(e,t);if("Buffer"===t.type&&$(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return Z(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return D(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),0>n&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(0>n){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:I(e,t,n,r,i);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):I(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;s>u;u++)if(o(e,u)===o(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*a}else-1!==c&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,d=0;l>d;d++)if(o(e,u+d)!==o(t,d)){f=!1;break}if(f)return u}return-1}function M(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function C(e,t,n,r){return _(F(t,e.length-n),e,n,r)}function A(e,t,n,r){return _(H(t),e,n,r)}function S(e,t,n,r){return A(e,t,n,r)}function E(e,t,n,r){return _(X(t),e,n,r)}function j(e,t,n,r){return _(V(t,e.length-n),e,n,r)}function D(e,t,n){return 0===t&&n===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var l,u,c,f;switch(s){case 1:128>o&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l,f>127&&(a=f));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return x(r)}function x(e){var t=e.length;if(ee>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(e[i]);return r}function Z(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;++o)i+=B(e[o]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function k(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Y(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||o>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function z(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function G(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||G(e,t,n,4,34028234663852886e22,-34028234663852886e22),q.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return i||G(e,t,n,8,17976931348623157e292,-17976931348623157e292),q.write(e,t,n,r,52,8),n+8}function U(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function B(e){return 16>e?"0"+e.toString(16):e.toString(16)}function F(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;++a){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function V(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function X(e){return Q.toByteArray(U(e))}function _(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var Q=e("base64-js"),q=e("ieee754"),$=e("isarray");n.Buffer=a,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);o>i;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return r>n?-1:n>r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;e>t;t+=2)w(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;e>t;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;l>f;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return s>o?-1:o>s?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;i>o;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)0>e&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&t>n&&r>t)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);256>i&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(0>t||this.length<t||this.length<n)throw new RangeError("Out of range index");if(t>=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;++o)this[o]=e;else{var s=a.isBuffer(e)?e:F(new a(e,r).toString()),l=s.length;for(o=0;n-t>o;++o)this[o+t]=s[o%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":33,ieee754:40,isarray:43}],36:[function(e,t,n){function r(e){function t(e){var t=c();a(t,e)>-1||(t.push(e),f(t))}function n(e){var t=c(),n=a(t,e);-1!==n&&(t.splice(n,1),f(t))}function r(e){return a(c(),e)>-1}function s(e){return r(e)?(n(e),!1):(t(e),!0)}function l(){return e.className}function u(e){var t=c();return t[e]||null}function c(){var t=e.className;return i(t.split(" "),o)}function f(t){var n=t.length;e.className=t.join(" "),p.length=n;for(var r=0;r<t.length;r++)p[r]=t[r];delete t[n]}var d=e.classList;if(d)return d;var p={add:t,remove:n,contains:r,toggle:s,toString:l,length:0,item:u};return p}function i(e,t){for(var n=[],r=0;r<e.length;r++)t(e[r])&&n.push(e[r]);return n}function o(e){return!!e}var a=e("indexof");t.exports=r},{indexof:41}],37:[function(e,t,n){function r(e,t,n,r){return n=window.getComputedStyle,r=n?n(e):e.currentStyle,r?r[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]:void 0}t.exports=r},{}],38:[function(t,n,r){!function(t,i){"use strict";"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.returnExports=i()}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,o=i.prototype,a=Function,s=a.prototype,l=String,u=l.prototype,c=Number,f=c.prototype,d=r.slice,p=r.splice,h=r.push,g=r.unshift,m=r.concat,v=r.join,y=s.call,w=s.apply,b=Math.max,I=Math.min,M=o.toString,C="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,A=Function.prototype.toString,S=/^\s*class /,E=function(e){try{var t=A.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return S.test(i)}catch(o){return!1}},j=function(e){try{return E(e)?!1:(A.call(e),!0)}catch(t){return!1}},D="[object Function]",N="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(C)return j(e);if(E(e))return!1;var t=M.call(e);return t===D||t===N},x=RegExp.prototype.exec,L=function(e){try{return x.call(e),!0}catch(t){return!1}},T="[object RegExp]";t=function(e){return"object"!=typeof e?!1:C?L(e):M.call(e)===T};var Z,P=String.prototype.valueOf,k=function(e){try{return P.call(e),!0}catch(t){return!1}},Y="[object String]";Z=function(e){return"string"==typeof e?!0:"object"!=typeof e?!1:C?k(e):M.call(e)===Y};var z=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),O=function(e){var t;return t=z?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var o in r)e.call(r,o)&&t(n,o,r[o],i)}}(o.hasOwnProperty),G=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},R=c.isNaN||function(e){return e!==e},W={ToInteger:function(e){var t=+e;return R(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(G(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),G(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),G(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},U=function(){};O(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=d.call(arguments,1),s=function(){if(this instanceof r){var e=w.call(n,this,m.call(o,d.call(arguments)));return i(e)===e?e:this}return w.call(n,t,m.call(o,d.call(arguments)))},l=b(0,n.length-o.length),u=[],c=0;l>c;c++)h.call(u,"$"+c);return r=a("binder","return function ("+v.call(u,",")+"){ return binder.apply(this, arguments); }")(s),n.prototype&&(U.prototype=n.prototype,r.prototype=new U,U.prototype=null),r}});var J=y.bind(o.hasOwnProperty),B=y.bind(o.toString),F=y.bind(d),H=w.bind(d);if("object"==typeof document&&document&&document.documentElement)try{F(document.documentElement.childNodes)}catch(V){var X=F,_=H;F=function(e){for(var t=[],n=e.length;n-- >0;)t[n]=e[n];return _(t,X(arguments,1))},H=function(e,t){return _(F(e),t)}}var K=y.bind(u.slice),Q=y.bind(u.split),q=y.bind(u.indexOf),$=y.bind(h),ee=y.bind(o.propertyIsEnumerable),te=y.bind(r.sort),ne=n.isArray||function(e){return"[object Array]"===B(e)},re=1!==[].unshift(0);O(r,{unshift:function(){return g.apply(this,arguments),this.length}},re),O(n,{isArray:ne});var ie=i("a"),oe="a"!==ie[0]||!(0 in ie),ae=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(i){r=!0}return!!e&&!r&&t&&n};O(r,{forEach:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=-1,a=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++o<a;)o in i&&("undefined"==typeof n?t(i[o],o,r):t.call(n,i[o],o,r))}},!ae(r.forEach)),O(r,{map:function(t){var r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=n(a);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;a>l;l++)l in o&&("undefined"==typeof r?s[l]=t(o[l],l,i):s[l]=t.call(r,o[l],l,i));return s}},!ae(r.map)),O(r,{filter:function(t){var n,r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;a>l;l++)l in o&&(n=o[l],("undefined"==typeof r?t(n,l,i):t.call(r,n,l,i))&&$(s,n));return s}},!ae(r.filter)),O(r,{every:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;o>a;a++)if(a in i&&!("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!1;return!0}},!ae(r.every)),O(r,{some:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;o>a;a++)if(a in i&&("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!0;return!1}},!ae(r.some));var se=!1;r.reduce&&(se="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),O(r,{reduce:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,a=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a++];break}if(++a>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>a;a++)a in r&&(o=t(o,r[a],a,n));return o}},!se);var le=!1;r.reduceRight&&(le="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),O(r,{reduceRight:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,a=i-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return o;do{a in r&&(o=t(o,r[a],a,n))}while(a--);return o}},!le);var ue=r.indexOf&&-1!==[0,1].indexOf(1,2);O(r,{indexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=W.ToInteger(arguments[1])),r=r>=0?r:b(0,n+r);n>r;r++)if(r in t&&t[r]===e)return r;return-1}},ue);var ce=r.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);O(r,{lastIndexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=I(r,W.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},ce);var fe=function(){var e=[1,2],t=e.splice();return 2===e.length&&ne(t)&&0===t.length}();O(r,{splice:function(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!fe);var de=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();O(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(W.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=F(arguments),n.length<2?$(n,this.length-e):n[1]=W.ToInteger(t)),p.apply(this,n)}},!de);var pe=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),he=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();O(r,{splice:function(e,t){for(var n,r=W.ToObject(this),i=[],o=W.ToUint32(r.length),a=W.ToInteger(e),s=0>a?b(o+a,0):I(a,o),u=I(b(W.ToInteger(t),0),o-s),c=0;u>c;)n=l(s+c),J(r,n)&&(i[c]=r[n]),c+=1;var f,d=F(arguments,2),p=d.length;if(u>p){c=s;for(var h=o-u;h>c;)n=l(c+u),f=l(c+p),J(r,n)?r[f]=r[n]:delete r[f],c+=1;c=o;for(var g=o-u+p;c>g;)delete r[c-1],c-=1}else if(p>u)for(c=o-u;c>s;)n=l(c+u-1),f=l(c+p-1),J(r,n)?r[f]=r[n]:delete r[f],c-=1;c=s;for(var m=0;m<d.length;++m)r[c]=d[m],c+=1;return r.length=o-u+p,i}},!pe||!he);var ge,me=r.join;try{ge="1,2,3"!==Array.prototype.join.call("123",",")}catch(V){ge=!0}ge&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(Z(this)?Q(this,""):this,t)}},ge);var ve="1,2"!==[1,2].join(void 0);ve&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(this,t)}},ve);var ye=function(e){for(var t=W.ToObject(this),n=W.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},we=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:function(e){return ne(this)?h.apply(this,arguments):ye.apply(this,arguments)}},we);var be=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:ye},be),O(r,{slice:function(e,t){var n=Z(this)?Q(this,""):this;return H(n,arguments)}},oe);var Ie=function(){try{[1,2].sort(null)}catch(e){try{[1,2].sort({})}catch(t){return!1}}return!0}(),Me=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),Ce=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();O(r,{sort:function(t){if("undefined"==typeof t)return te(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return te(this,t)}},Ie||!Ce||!Me);var Ae=!ee({toString:null},"toString"),Se=ee(function(){},"prototype"),Ee=!J("x","0"),je=function(e){var t=e.constructor;return t&&t.prototype===e},De={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ne=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!De["$"+e]&&J(window,e)&&null!==window[e]&&"object"==typeof window[e]&&je(window[e])}catch(t){return!0}return!1}(),xe=function(e){if("undefined"==typeof window||!Ne)return je(e);try{return je(e)}catch(t){return!1}},Le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Te=Le.length,Ze=function(e){return"[object Arguments]"===B(e)},Pe=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!ne(t)&&e(t.callee)},ke=Ze(arguments)?Ze:Pe;O(i,{keys:function(t){var n=e(t),r=ke(t),i=null!==t&&"object"==typeof t,o=i&&Z(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=Se&&n;if(o&&Ee||r)for(var u=0;u<t.length;++u)$(a,l(u));if(!r)for(var c in t)s&&"prototype"===c||!J(t,c)||$(a,l(c));if(Ae)for(var f=xe(t),d=0;Te>d;d++){var p=Le[d];f&&"constructor"===p||!J(t,p)||$(a,p)}return a}});var Ye=i.keys&&function(){return 2===i.keys(arguments).length}(1,2),ze=i.keys&&function(){var e=i.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Oe=i.keys;O(i,{keys:function(e){return Oe(ke(e)?F(e):e)}},!Ye||ze);var Ge,Re,We=0!==new Date(-0xc782b5b342b24).getUTCMonth(),Ue=new Date(-0x55d318d56a724),Je=new Date(14496624e5),Be="Mon, 01 Jan -45875 11:59:59 GMT"!==Ue.toUTCString(),Fe=Ue.getTimezoneOffset();-720>Fe?(Ge="Tue Jan 02 -45875"!==Ue.toDateString(),Re=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je))):(Ge="Mon Jan 01 -45875"!==Ue.toDateString(),Re=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je)));var He=y.bind(Date.prototype.getFullYear),Ve=y.bind(Date.prototype.getMonth),Xe=y.bind(Date.prototype.getDate),_e=y.bind(Date.prototype.getUTCFullYear),Ke=y.bind(Date.prototype.getUTCMonth),Qe=y.bind(Date.prototype.getUTCDate),qe=y.bind(Date.prototype.getUTCDay),$e=y.bind(Date.prototype.getUTCHours),et=y.bind(Date.prototype.getUTCMinutes),tt=y.bind(Date.prototype.getUTCSeconds),nt=y.bind(Date.prototype.getUTCMilliseconds),rt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ot=function(e,t){return Xe(new Date(t,e,0))};O(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this);return 0>e&&Ve(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this);return 0>e&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this),n=Xe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this);return 0>e&&Ke(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this);return 0>e&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this),n=Qe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n}},We),O(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this),t=Qe(this),n=Ke(this),r=_e(this),i=$e(this),o=et(this),a=tt(this);return rt[e]+", "+(10>t?"0"+t:t)+" "+it[n]+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"}},We||Be),O(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r}},We||Ge),(We||Re)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),o=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),l=Math.floor(Math.abs(s)/60),u=Math.floor(Math.abs(s)%60);return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"+(s>0?"-":"+")+(10>l?"0"+l:l)+(10>u?"0"+u:u)},z&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var at=-621987552e5,st="-000001",lt=Date.prototype.toISOString&&-1===new Date(at).toISOString().indexOf(st),ut=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),ct=y.bind(Date.prototype.getTime);O(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ct(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=_e(this),t=Ke(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Qe(this),$e(this),et(this),tt(this)];e=(0>e?"-":e>9999?"+":"")+K("00000"+Math.abs(e),e>=0&&9999>=e?-4:-6);for(var r=0;r<n.length;++r)n[r]=K("00"+n[r],-2);return e+"-"+F(n,0,2).join("-")+"T"+F(n,2).join(":")+"."+K("000"+nt(this),-3)+"Z"}},lt||ut);var ft=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(at).toJSON().indexOf(st)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ft||(Date.prototype.toJSON=function(t){var n=i(this),r=W.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var o=n.toISOString;if(!e(o))throw new TypeError("toISOString property is not callable");return o.call(n)});var dt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),pt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ht=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ht||pt||!dt){var gt=Math.pow(2,31)-1,mt=R(new Date(1970,0,1,0,0,0,gt+1).getTime());Date=function(e){var t=function(n,r,i,o,a,s,u){var c,f=arguments.length;if(this instanceof e){var d=s,p=u;if(mt&&f>=7&&u>gt){var h=Math.floor(u/gt)*gt,g=Math.floor(h/1e3);d+=g,p-=1e3*g}c=1===f&&l(n)===n?new e(t.parse(n)):f>=7?new e(n,r,i,o,a,d,p):f>=6?new e(n,r,i,o,a,d):f>=5?new e(n,r,i,o,a):f>=4?new e(n,r,i,o):f>=3?new e(n,r,i):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else c=e.apply(this,arguments);return G(c)||O(c,{constructor:t},!0),c},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},o=function(t){var n=0,r=t;if(mt&&r>gt){var i=Math.floor(r/gt)*gt,o=Math.floor(i/1e3);n+=o,r-=1e3*o}return c(new e(1970,0,1,0,0,n,r))};for(var a in e)J(e,a)&&(t[a]=e[a]);O(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,O(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=c(r[1]),l=c(r[2]||1)-1,u=c(r[3]||1)-1,f=c(r[4]||0),d=c(r[5]||0),p=c(r[6]||0),h=Math.floor(1e3*c(r[7]||0)),g=Boolean(r[4]&&!r[8]),m="-"===r[9]?1:-1,v=c(r[10]||0),y=c(r[11]||0),w=d>0||p>0||h>0;return(w?24:25)>f&&60>d&&60>p&&1e3>h&&l>-1&&12>l&&24>v&&60>y&&u>-1&&u<i(s,l+1)-i(s,l)&&(a=60*(24*(i(s,l)+u)+f+v*m),a=1e3*(60*(a+d+y*m)+p)+h,g&&(a=o(a)),a>=-864e13&&864e13>=a)?a:NaN}return e.parse.apply(this,arguments)};return O(t,{parse:s}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var vt=f.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),yt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<yt.size;)r+=e*yt.data[n],yt.data[n]=r%yt.base,r=Math.floor(r/yt.base)},divide:function(e){for(var t=yt.size,n=0;--t>=0;)n+=yt.data[t],yt.data[t]=Math.floor(n/e),n=n%e*yt.base},numToString:function(){for(var e=yt.size,t="";--e>=0;)if(""!==t||0===e||0!==yt.data[e]){var n=l(yt.data[e]);""===t?t=n:t+=K("0000000",0,7-n.length)+n}return t},pow:function Ot(e,t,n){return 0===t?n:t%2===1?Ot(e,t-1,n*e):Ot(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},wt=function(e){var t,n,r,i,o,a,s,u;if(t=c(e),t=R(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=c(this),R(n))return"NaN";if(-1e21>=n||n>=1e21)return l(n);if(r="",0>n&&(r="-",n=-n),i="0",n>1e-21)if(o=yt.log(n*yt.pow(2,69,1))-69,a=0>o?n*yt.pow(2,-o,1):n/yt.pow(2,o,1),a*=4503599627370496,o=52-o,o>0){for(yt.multiply(0,a),s=t;s>=7;)yt.multiply(1e7,0),s-=7;for(yt.multiply(yt.pow(10,s,1),0),s=o-1;s>=23;)yt.divide(1<<23),s-=23;yt.divide(1<<s),yt.multiply(1,1),yt.divide(2),i=yt.numToString()}else yt.multiply(0,a),yt.multiply(1<<-o,0),i=yt.numToString()+K("0.00000000000000000000",2,2+t);return t>0?(u=i.length,i=t>=u?r+K("0.0000000000000000000",0,t-u+2)+i:r+K(i,0,u-t)+"."+K(i,u-t)):i=r+i,i};O(f,{toFixed:wt},vt);var bt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),It=f.toPrecision;O(f,{toPrecision:function(e){return"undefined"==typeof e?It.call(this):It.call(this,e)}},bt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,i){var o=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return Q(this,r,i);var a,s,l,u,c=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),d=0,p=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+p.source+"$(?!\\s)",f));var g="undefined"==typeof i?n:W.ToUint32(i);for(s=p.exec(o);s&&(l=s.index+s[0].length,!(l>d&&($(c,K(o,d,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(s[e]=void 0)}),s.length>1&&s.index<o.length&&h.apply(c,F(s,1)),u=s[0].length,d=l,c.length>=g)));)p.lastIndex===s.index&&p.lastIndex++,s=p.exec(o);return d===o.length?(u||!p.test(""))&&$(c,""):$(c,K(o,d)),c.length>g?F(c,0,g):c}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:Q(this,e,t)});var Mt=u.replace,Ct=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){$(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ct||(u.replace=function(n,r){var i=e(r),o=t(n)&&/\)[*?]/.test(n.source);if(i&&o){var a=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var o=n.exec(e)||[];return n.lastIndex=i,$(o,arguments[t-2],arguments[t-1]),r.apply(this,o)};return Mt.call(this,n,a)}return Mt.call(this,n,r)});var At=u.substr,St="".substr&&"b"!=="0b".substr(-1);O(u,{substr:function(e,t){var n=e;return 0>e&&(n=b(this.length+e,0)),At.call(this,n,t)}},St);var Et="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",jt="​",Dt="["+Et+"]",Nt=new RegExp("^"+Dt+Dt+"*"),xt=new RegExp(Dt+Dt+"*$"),Lt=u.trim&&(Et.trim()||!jt.trim());O(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return l(this).replace(Nt,"").replace(xt,"")}},Lt);var Tt=y.bind(String.prototype.trim),Zt=u.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);O(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=l(this),n=l(e),r=arguments.length>1?c(arguments[1]):NaN,i=R(r)?1/0:W.ToInteger(r),o=I(b(i,0),t.length),a=n.length,s=o+a;s>0;){s=b(0,s-a);var u=q(K(t,s,o+a),n);if(-1!==u)return s+u}return-1}},Zt);var Pt=u.lastIndexOf;if(O(u,{lastIndexOf:function(e){return Pt.apply(this,arguments)}},1!==u.lastIndexOf.length),(8!==parseInt(Et+"08")||22!==parseInt(Et+"0x16"))&&(parseInt=function(e){var t=/^[-+]?0[xX]/;return function(n,r){var i=Tt(String(n)),o=c(r)||(t.test(i)?16:10);return e(i,o)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Tt(String(t)),r=e(n);return 0===r&&"-"===K(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var kt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=l(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=l(t)),e?t?e+": "+t:e:t};Error.prototype.toString=kt}if(z){var Yt=function(e,t){if(ee(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Yt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Yt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var zt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=zt}})},{}],39:[function(e,t,n){var r=[],i=r.forEach,o=r.slice;t.exports=function(e){return i.call(o.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e}},{}],40:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,p=e[t+f];for(f+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?d/l:d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*g}},{}],41:[function(e,t,n){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],42:[function(e,t,n){function r(e){var t=i.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=r;var i=Object.prototype.toString},{}],43:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],44:[function(t,n,r){(function(t){!function(i){function o(e){throw new RangeError(P[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Z,".");var i=e.split("."),o=a(i,t).join(".");return r+o}function l(e){for(var t,n,r=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=z(e>>>10&1023|55296),e=56320|1023&e),t+=z(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?Y(e/j):e>>1,e+=Y(e/t);e>k*S>>1;r+=C)e=Y(e/k);return Y(r+(k+1)*e/(e+E))}function p(e){var t,n,r,i,a,s,l,f,p,h,g=[],m=e.length,v=0,y=N,w=D;for(n=e.lastIndexOf(x),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;m>i;){for(a=v,s=1,l=C;i>=m&&o("invalid-input"),f=c(e.charCodeAt(i++)),(f>=C||f>Y((M-v)/s))&&o("overflow"),v+=f*s,p=w>=l?A:l>=w+S?S:l-w,!(p>f);l+=C)h=C-p,s>Y(M/h)&&o("overflow"),s*=h;t=g.length+1,w=d(v-a,t,0==a),Y(v/t)>M-y&&o("overflow"),y+=Y(v/t),v%=t,g.splice(v++,0,y)}return u(g)}function h(e){var t,n,r,i,a,s,u,c,p,h,g,m,v,y,w,b=[];for(e=l(e),m=e.length,t=N,n=0,a=D,s=0;m>s;++s)g=e[s],128>g&&b.push(z(g));for(r=i=b.length,i&&b.push(x);m>r;){for(u=M,s=0;m>s;++s)g=e[s],g>=t&&u>g&&(u=g);for(v=r+1,u-t>Y((M-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;m>s;++s)if(g=e[s],t>g&&++n>M&&o("overflow"),g==t){for(c=n,p=C;h=a>=p?A:p>=a+S?S:p-a,!(h>c);p+=C)w=c-h,y=C-h,b.push(z(f(h+w%y,0))),c=Y(w/y);b.push(z(f(c,0))),a=d(n,v,r==i),n=0,++r}++n,++t}return b.join("")}function g(e){return s(e,function(e){return L.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return T.test(e)?"xn--"+h(e):e})}var v="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof n&&n&&!n.nodeType&&n,w="object"==typeof t&&t;(w.global===w||w.window===w||w.self===w)&&(i=w);var b,I,M=2147483647,C=36,A=1,S=26,E=38,j=700,D=72,N=128,x="-",L=/^xn--/,T=/[^\x20-\x7E]/,Z=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=C-A,Y=Math.floor,z=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:l,encode:u},decode:p,encode:h,toASCII:m,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return b});else if(v&&y)if(n.exports==v)y.exports=b;else for(I in b)b.hasOwnProperty(I)&&(v[I]=b[I]);else i.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(t,n,r){!function(t,r){"undefined"!=typeof n&&n.exports?n.exports=r():"function"==typeof e&&e.amd?e(r):this[t]=r()}("$script",function(){function e(e,t){for(var n=0,r=e.length;r>n;++n)if(!t(e[n]))return l;return 1}function t(t,n){e(t,function(e){return!n(e)})}function n(o,a,s){function l(e){return e.call?e():d[e]}function c(){if(!--y){d[v]=1,m&&m();for(var n in h)e(n.split("|"),l)&&!t(h[n],l)&&(h[n]=[])}}o=o[u]?o:[o];var f=a&&a.call,m=f?a:s,v=f?o.join(""):a,y=o.length;return setTimeout(function(){t(o,function e(t,n){return null===t?c():(n||/^https?:\/\//.test(t)||!i||(t=-1===t.indexOf(".js")?i+t+".js":i+t),g[t]?(v&&(p[v]=1),2==g[t]?c():setTimeout(function(){e(t,!0)},0)):(g[t]=1,v&&(p[v]=1),void r(t,c)))})},0),n}function r(e,t){var n,r=a.createElement("script");r.onload=r.onerror=r[f]=function(){r[c]&&!/^c|loade/.test(r[c])||n||(r.onload=r[f]=null,n=1,g[e]=2,t())},r.async=1,r.src=o?e+(-1===e.indexOf("?")?"?":"&")+o:e,s.insertBefore(r,s.lastChild)}var i,o,a=document,s=a.getElementsByTagName("head")[0],l=!1,u="push",c="readyState",f="onreadystatechange",d={},p={},h={},g={};return n.get=r,n.order=function(e,t,r){!function i(o){o=e.shift(),e.length?n(o,i):n(o,t,r)}()},n.path=function(e){i=e},n.urlArgs=function(e){o=e},n.ready=function(r,i,o){r=r[u]?r:[r];var a=[];return!t(r,function(e){d[e]||a[u](e)})&&e(r,function(e){return d[e]})?i():!function(e){h[e]=h[e]||[],h[e][u](i),o&&o(a)}(r.join("|")),n},n.done=function(e){n([null],e)},n})},{}]},{},[32])(32)});if(typeof fv_flowplayer_conf!="undefined"){try{if(typeof window.localStorage=="object"&&typeof window.localStorage.volume!="undefined"){delete fv_flowplayer_conf.volume}}catch(e){}flowplayer.conf=fv_flowplayer_conf;flowplayer.conf.chromecast=false;flowplayer.conf.embed=false;flowplayer.conf.share=false;flowplayer.conf.analytics=false;try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}if(!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs){function FVAbrController(hls){this.hls=hls;this.nextAutoLevel=3}FVAbrController.prototype.nextAutoLevel=function(nextLevel){this.nextAutoLevel=nextLevel};FVAbrController.prototype.destroy=function(){};flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}}function parseIOSVersion(UA){var e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(UA);if(e&&e.length>1){return parseFloat(e[e.length-1].replace("_","."),10)}return 0}if(flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&flowplayer.support.iOS.version==0){flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)}if(flowplayer.support.iOS&&parseInt(flowplayer.support.iOS.version)>=13||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&parseInt(flowplayer.support.browser.version)>=8){flowplayer.conf.hlsjs.safari=true}flowplayer.support.fvmobile=!!(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.android);var fls=flowplayer.support;if(flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile){flowplayer.conf.native_fullscreen=true}if("ontouchstart"in window){if(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&fls.browser.version>54)){flowplayer.conf.native_fullscreen=true}if(fls.iOS&&(fv_player_in_iframe()||fls.iOS.version<7)){flowplayer.conf.native_fullscreen=true}}}if(typeof fv_flowplayer_translations!="undefined"){flowplayer.defaults.errors=fv_flowplayer_translations}var fv_player_did_autoplay=false;function fv_player_videos_parse(args,root){try{var videos=JSON.parse(args)}catch(e){return false}var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery(videos.sources).each(function(k,v){if(v.mobile){videos.sources[k]=videos.sources[0];videos.sources[0]=v;fv_fp_mobile=true}if(fv_fp_mobile){jQuery(root).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>")}})}return videos}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return true}}jQuery(document).ready(function(){var loading_count=0;var loading=setInterval(function(){loading_count++;if(loading_count<1e3&&(window.fv_video_intelligence_conf&&!window.FV_Player_IMA||window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro)){return}clearInterval(loading);fv_player_preload()},10)});function fv_escape_attr(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.replace(/[&<>"']/g,function(m){return map[m]})}function fv_player_preload(){if(flowplayer.support.touch){jQuery(".fp-playlist-external.fv-playlist-design-2017").addClass("visible-captions")}flowplayer(function(api,root){root=jQuery(root);var fp_player=root.find(".fp-player");var splash_click=false;if(root.hasClass("fixed-controls")){root.find(".fp-controls").on("click",function(e){if(!api.loading&&!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}if(!flowplayer.support.volume&&!flowplayer.support.autoplay){root.find(".fp-volume").hide()}if(root.data("fullscreen")==false){root.find(".fp-fullscreen").remove()}if(root.data("volume")==0&&root.hasClass("no-controlbar")){root.find(".fp-volume").remove()}var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");if((!api.conf.playlist||api.conf.playlist.length==0)&&playlist.length&&playlist.find("a[data-item]").length>0){var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});api.conf.playlist=items;api.conf.clip=items[0]}else if(!api.conf.clip){api.conf.clip=fv_player_videos_parse(jQuery(root).attr("data-item"),root)}jQuery("a",playlist).on("click",function(e){e.preventDefault();splash_click=true;var $this=jQuery(this),playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),index=jQuery("a",playlist).index(this);$prev=$this.prev("a"),item=$this.data("item");if($prev.length&&$this.is(":visible")&&!$prev.is(":visible")){$prev.click();return false}if(jQuery("#"+$this.parent().attr("rel")).hasClass("dynamic-playlist"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");fv_player_playlist_active(playlist,this);if(api){if(api.error){api.pause();api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove()}if(!api.video||api.video.index==index)return;api.play(index)}var new_splash=item.splash;if(!new_splash){new_splash=$this.find("img").attr("src")}player_splash(root,fp_player,item,new_splash);var rect=root[0].getBoundingClientRect();if(rect.bottom-100<0){jQuery("html, body").animate({scrollTop:jQuery(root).offset().top-100},300)}});var playlist_external=jQuery("[rel="+root.attr("id")+"]");var playlist_progress=false;var splash_img=root.find(".fp-splash");var splash_text=root.find(".fv-fp-splash-text");function player_splash(root,fp_player,item,new_splash){var splash_img=root.find("img.fp-splash");if(new_splash){if(splash_img.length==0){splash_img=jQuery('<img class="fp-splash" />');fp_player.prepend(splash_img)}splash_img.attr("alt",item.fv_title?fv_escape_attr(item.fv_title):"video");splash_img.attr("src",new_splash)}else if(splash_img.length){splash_img.remove()}}api.bind("load",function(e,api,video){if(!api.conf.playlist.length){return}if(video.type.match(/^audio/)&&!splash_click){var anchor=playlist_external.find("a").eq(video.index);var item=anchor.data("item");var new_splash=item.splash;if(!new_splash){new_splash=anchor.find("img").attr("src")}player_splash(root,fp_player,item,new_splash)}splash_click=false});api.bind("ready",function(e,api,video){setTimeout(function(){if(video.index>-1){if(playlist_external.length>0){var playlist_item=jQuery("a",playlist_external).eq(video.index);fv_player_playlist_active(playlist_external,playlist_item);playlist_progress=playlist_item.find(".fvp-progress")}}},100);splash_img=root.find(".fp-splash");if(!video.is_audio_stream&&!video.type.match(/^audio/)){splash_img.remove();splash_text.remove()}});api.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove();jQuery(".fp-playlist-external a").removeClass("is-active");fp_player.prepend(splash_text);fp_player.prepend(splash_img);playlist_progress=false});api.bind("progress",function(e,api,time){if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.video,time)}});api.bind("error-subtitles",function(){console.log("error-subtitles");fv_player_notice(root,fv_flowplayer_translations[8],2e3)});var playlist=jQuery(root).parent().find("div.fp-playlist-vertical[rel="+jQuery(root).attr("id")+"]");if(playlist.length){function check_size_and_all(args){var property=playlist.hasClass("fp-playlist-only-captions")?"height":"max-height";if(playlist.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")){property="max-height"}playlist.css(property,vertical_playlist_height());if(property=="max-height")playlist.css("height","auto")}check_size_and_all();jQuery(window).on("resize tabsactivate",function(){setTimeout(check_size_and_all,0)})}function vertical_playlist_height(args){var height=root.height();if(height==0)height=root.css("max-height");return height}api.show_status=function(type){var status="";["loading","ready","playing","paused","seeking"].every(function(v,k){if(api[v])status+=" "+v;return true});console.log("FV Player Status ("+type+")",status)}});if(window.self!=window.top&&!location.href.match(/fv_player_preview/)){embed_size();jQuery(window.self).resize(embed_size)}function embed_size(){jQuery(".flowplayer.fp-is-embed").each(function(){var root=jQuery(this);if(!root.hasClass("has-chapters")&&!root.hasClass("has-transcript")&&jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length==0){root.height(jQuery(window).height())}})}if(typeof fv_flowplayer_playlists!="undefined"){for(var i in fv_flowplayer_playlists){if(!fv_flowplayer_playlists.hasOwnProperty(i))continue;jQuery("#"+i).flowplayer({playlist:fv_flowplayer_playlists[i]})}}fv_player_load();fv_autoplay_exec();jQuery(document).ajaxComplete(function(){fv_player_load()});jQuery(window).on("hashchange",fv_autoplay_exec)}function fv_player_load(){jQuery(".flowplayer").each(function(i,el){var root=jQuery(el);var api=root.data("flowplayer");if(api)return;if(root.attr("data-item")){root.flowplayer({clip:fv_player_videos_parse(root.attr("data-item"),root)})}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){if(playlist.find("a[data-item]").length==0)return;var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});root.flowplayer({playlist:items})}});jQuery(".fv-playlist-slider-wrapper").each(function(i,el){var items=jQuery(this).find("a");jQuery(this).find(".fp-playlist-external").css("width",items.outerWidth()*items.length)});if(typeof jQuery().tabs!="undefined"){jQuery("body").removeClass("fv_flowplayer_tabs_hide");jQuery(".fv_flowplayer_tabs_content").tabs()}}function fv_player_playlist_active(playlist,item){if(playlist){jQuery("a",playlist).removeClass("is-active");jQuery(".now-playing").remove()}$playlist=jQuery(playlist);$item=jQuery(item);var scroll_parent=false;$item.addClass("is-active");var is_design_2014=$playlist.hasClass("fv-playlist-design-2014");if((is_design_2014&&$item.find("h4").length==0||!is_design_2014)&&$item.find(".now-playing").length==0)$item.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>");if(!$playlist.parent().find(".flowplayer").length){scroll_parent=true}if(($playlist.hasClass("fp-playlist-vertical")||$playlist.hasClass("fp-playlist-horizontal")&&$playlist.hasClass("is-audio"))&&!fullyVisibleY($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollTop:$el.scrollTop()+($item.position().top-$el.position().top)},750)}else if($playlist.hasClass("fp-playlist-horizontal")&&!fullyVisibleX($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollLeft:$el.scrollLeft()+($item.position().left-$el.position().left)},750)}function fullyVisibleY(el){var rect=el.getBoundingClientRect(),top=rect.top,height=rect.height,bottom=top+height,el=el.parentNode;do{rect=el.getBoundingClientRect();if(bottom<=rect.bottom===false)return false;if(top<=rect.top)return false;el=el.parentNode}while(el!=document.body);return bottom<=document.documentElement.clientHeight}function fullyVisibleX(el){var rect=el.getBoundingClientRect(),left=rect.left,width=rect.width,right=left+width,el=el.parentNode;do{rect=el.getBoundingClientRect();if(right<=rect.right===false)return false;if(left<=rect.left)return false;el=el.parentNode}while(el!=document.body);return right<=document.documentElement.clientWidth}}jQuery(function(){jQuery(".flowplayer").each(function(){flowplayer.bean.off(jQuery(this)[0],"contextmenu")})});var fv_fp_date=new Date;var fv_fp_utime=fv_fp_date.getTime();function fv_parse_sharelink(src){src=src.replace("https?://[^./].","");var prefix="fvp_";if(src.match(/(youtube.com)/)){return prefix+src.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]}else if(src.match(/(vimeo.com)|(youtu.be)/)){return prefix+src.match(/(?:\/)([^/]*$)/)[1]}else{var match=src.match(/(?:\/)([^/]*$)/);if(match){return prefix+match[1].match(/^[^.]*/)[0]}}return prefix+src}function fv_player_get_video_link_hash(api){var hash=fv_parse_sharelink(typeof api.video.sources_original!="undefined"&&typeof api.video.sources_original[0]!="undefined"?api.video.sources_original[0].src:api.video.sources[0].src);if(typeof api.video.id!="undefined"){hash=fv_parse_sharelink(api.video.id.toString())}return hash}function fv_player_time_hms(seconds){if(isNaN(seconds)){return NaN}var sec_num=parseInt(seconds,10);var hours=Math.floor(sec_num/3600);var minutes=Math.floor(sec_num/60)%60;var seconds=sec_num%60;if(hours){hours+="h"}else{hours=""}if(hours&&minutes<10){minutes="0"+minutes+"m"}else if(!hours&&minutes){minutes+="m"}else{minutes=""}if((hours||minutes)&&seconds<10){seconds="0"+seconds}seconds+="s";var timeString=hours+minutes+seconds;return timeString}function fv_player_time_hms_ms(seconds){if(isNaN(seconds)){return NaN}seconds=parseFloat(seconds).toFixed(3);var miliseconds=(seconds+"").split(".");if(typeof miliseconds[1]!="undefined"&&miliseconds[1]>0){miliseconds=miliseconds[1]+"ms"}else{miliseconds=""}var timeString=fv_player_time_hms(seconds)+miliseconds;return timeString}function fv_player_time_seconds(time,duration){if(!time)return-1;var seconds=0;var match=time.match(/(\d+[a-z]{1,2})/g);match.forEach(function(item){if(item.endsWith("h")){seconds+=3600*parseInt(item)}else if(item.endsWith("m")){seconds+=60*parseInt(item)}else if(item.endsWith("s")&&!item.endsWith("ms")){seconds+=parseInt(item)}else if(item.endsWith("ms")){if(parseInt(item)){seconds+=parseInt(item)/1e3}}});return duration?Math.min(seconds,duration):seconds}function fv_autoplay_init(root,index,time,abStart,abEnd){if(fv_autoplay_exec_in_progress)return;fv_autoplay_exec_in_progress=true;var api=root.data("flowplayer");if(!api)return;var fTime=fv_player_time_seconds(time);abEnd=fv_player_time_seconds(abEnd);abStart=fv_player_time_seconds(abStart);if(root.parent().hasClass("ui-tabs-panel")){var tabId=root.parent().attr("id");jQuery("[aria-controls="+tabId+"] a").click()}if(!root.find(".fp-player").attr("class").match(/\bis-sticky/)){var offset=jQuery(root).offset().top-(jQuery(window).height()-jQuery(root).height())/2;window.scrollTo(0,offset);api.one("ready",function(){window.scrollTo(0,offset)})}if(root.hasClass("lightboxed")){setTimeout(function(){jQuery("[href=\\#"+root.attr("id")+"]").click()},0)}if(index){if(fv_player_video_link_autoplay_can(api,parseInt(index))){if(api.ready){if(fTime>0)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{api.play(parseInt(index));api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})}}else if(flowplayer.support.inlineVideo){api.one(api.playing?"progress":"ready",function(e,api){api.play(parseInt(index));api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})});root.find(".fp-splash").attr("src",jQuery("[rel="+root.attr("id")+"] div").eq(index).find("img").attr("src"));if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}}}else{if(api.ready){if(fTime>0)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{if(fv_player_video_link_autoplay_can(api)){api.load()}else if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})}}}function fv_player_video_link_seek(api,fTime,abEnd,abStart){fv_autoplay_exec_in_progress=false;var do_seek=setInterval(function(){if(api.loading)return;if(fTime>0)api.seek(fTime);if(abEnd&&abStart)api.trigger("link-ab",[api,abStart,abEnd]);clearInterval(do_seek)},10)}var fv_autoplay_exec_in_progress=false;function fv_autoplay_exec(){var autoplay=true;if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length){var aHash=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(",");var hash=aHash[0];var time=aHash[1]===undefined?false:aHash[1];var abStart=aHash[2]===undefined?false:aHash[2];var abEnd=aHash[3]===undefined?false:aHash[3];jQuery(".flowplayer").each(function(){var root=jQuery(this);if(root.hasClass("lightbox-starter")){root=jQuery(root.attr("href"))}var api=root.data("flowplayer");if(!api)return;var playlist=typeof api.conf.playlist!=="undefined"&&api.conf.playlist.length>1?api.conf.playlist:[api.conf.clip];for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var id=typeof playlist[item].id!=="undefined"?fv_parse_sharelink(playlist[item].id.toString()):false;if(hash===id&&autoplay){console.log("fv_autoplay_exec for "+id,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var src=fv_parse_sharelink(playlist[item].sources[0].src);if(hash===src&&autoplay){console.log("fv_autoplay_exec for "+src,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}})}if(autoplay&&flowplayer.support.firstframe){jQuery(".flowplayer[data-fvautoplay]").each(function(){var root=jQuery(this),api=root.data("flowplayer"),autoplay=root.attr("data-fvautoplay");if(!fv_player_did_autoplay&&autoplay){if(!((flowplayer.support.android||flowplayer.support.iOS)&&api&&api.conf.clip.sources[0].type=="video/youtube")){fv_player_did_autoplay=true;api.load();var play_icon=root.find(".fp-play").addClass("invisible"),control_bar=root.find(".fp-controls").addClass("invisible");api.one("progress",function(){play_icon.removeClass("invisible");control_bar.removeClass("invisible")});if(autoplay=="muted"){api.mute(true,true)}}}})}}function fv_player_video_link_autoplay_can(api,item){var video=item?api.conf.playlist[item]:api.conf.clip;if(video.sources[0].type=="video/youtube"&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())return false;return flowplayer.support.firstframe}function fv_player_notice(root,message,timeout){var notices=jQuery(".fvfp-notices",root);if(!notices.length){notices=jQuery('<div class="fvfp-notices">');jQuery(".fp-player",root).append(notices)}var notice=jQuery('<div class="fvfp-notice-content">'+message+"</div></div>");notices.append(notice);if(typeof timeout=="string"){var player=jQuery(root).data("flowplayer");player.on(timeout,function(){notice.fadeOut(100,function(){jQuery(this).remove()})})}if(timeout>0){setTimeout(function(){notice.fadeOut(2e3,function(){jQuery(this).remove()})},timeout)}return notice}var fv_player_clipboard=function(text,successCallback,errorCallback){try{fv_player_doCopy(text);successCallback()}catch(e){if(typeof errorCallback!="undefined")errorCallback(e)}};function fv_player_doCopy(text){var textarea=document.createElement("textarea");textarea.value=text;textarea.style.opacity=0;textarea.style.position="absolute";textarea.setAttribute("readonly",true);document.body.appendChild(textarea);var selected=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):false;if(navigator.userAgent.match(/ipad|ipod|iphone/i)){var editable=textarea.contentEditable;textarea.contentEditable=true;var range=document.createRange();range.selectNodeContents(textarea);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range);textarea.setSelectionRange(0,999999);textarea.contentEditable=editable}else{textarea.select()}try{var result=document.execCommand("copy");if(selected){document.getSelection().removeAllRanges();document.getSelection().addRange(selected)}document.body.removeChild(textarea);return result}catch(err){throw new Error("Unsuccessfull")}}flowplayer(function(api,root){var hlsjs;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});root=jQuery(root);var search=document.location.search;if(localStorage.FVPlayerDashQuality){if(!api.conf.dash)api.conf.dash={};api.conf.dash.initialVideoQuality="restore"}if(localStorage.FVPlayerHLSQuality){api.conf.hlsjs.startLevel=parseInt(localStorage.FVPlayerHLSQuality);api.conf.hlsjs.testBandwidth=false;api.conf.hlsjs.autoLevelEnabled=false}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){api.conf.hlsjs.startLevel=3;api.conf.hlsjs.testBandwidth=false;api.conf.hlsjs.autoLevelEnabled=false}api.bind("quality",function(e,api,quality){if(api.engine.engineName=="dash"){if(quality==-1){localStorage.removeItem("FVPlayerDashQuality")}else if(bitrates[quality]){localStorage.FVPlayerDashQuality=bitrates[quality].height}}else if(api.engine.engineName=="hlsjs-lite"){if(quality==-1){localStorage.removeItem("FVPlayerHLSQuality")}else{localStorage.FVPlayerHLSQuality=quality}}});var bitrates=[];var last_quality=-1;api.bind("ready",function(e,api){root.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality);if(api.engine.engineName=="dash"){bitrates=api.engine.dash.getBitrateInfoListFor("video");if(localStorage.FVPlayerDashQuality&&api.conf.dash.initialVideoQuality){api.quality(api.conf.dash.initialVideoQuality)}quality_sort()}else if(api.engine.engineName=="hlsjs-lite"){root.addClass("is-loading");api.loading=true;api.one("progress",function(){if(api.loading){root.removeClass("is-loading");api.loading=false}});if(api.video.qualities&&api.video.qualities.length>2){var qswitch=-1;if(localStorage.FVPlayerHLSQuality){jQuery(api.video.qualities).each(function(k,v){if(v.value==localStorage.FVPlayerHLSQuality){qswitch=localStorage.FVPlayerHLSQuality;return false}})}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){jQuery(api.video.qualities).each(function(k,v){var height=parseInt(v.label);if(height>0&&qswitch==-1&&height>=720&&height<=720){qswitch=v.value}})}qswitch=parseInt(qswitch);if(qswitch>-1){root.one("progress",function(){setTimeout(function(){api.quality(qswitch)})})}quality_sort()}}else if(api.video.sources_fvqs&&api.video.sources_fvqs.length>0&&api.video.src.match(/vimeo.*?\.mp4/)){setTimeout(quality_sort,0)}root.find("a[data-quality]").removeClass("is-current")});if(search.match(/dash_debug/)||search.match(/hls_debug/))var debug_log=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find(".fp-player"));api.bind("ready progress",quality_process);api.bind("quality",function(){setTimeout(quality_process,0)});function quality_process(){if(api.engine.engineName=="dash"){var stream_info=bitrates[api.engine.dash.getQualityFor("video")];if(stream_info.qualityIndex!=last_quality){last_quality=stream_info.qualityIndex;quality_label(stream_info.qualityIndex,bitrates)}if(search.match(/dash_debug/))quality_debug(stream_info.width,stream_info.height,stream_info.bitrate)}else if(api.engine.engineName=="hlsjs-lite"){if(hlsjs.currentLevel!=last_quality){last_quality=hlsjs.currentLevel;quality_label(hlsjs.currentLevel,hlsjs.levels)}if(search.match(/hls_debug/)){var level=hlsjs.levels[hlsjs.currentLevel];quality_debug(level.width,level.height,level.bitrate)}}}function quality_label(index,qualities){if(!qualities[index])return;var height=qualities[index].height,hd_limit=541,lowest=1e5;jQuery(qualities).each(function(k,v){if(v.height>=720&&v.height<1400)hd_limit=720;if(v.height<lowest)lowest=v.height});root.find("a[data-quality]").removeClass("is-current");root.find("a[data-quality="+index+"]").addClass("is-current");var label="SD";if(height>=360&&lowest<height)label="SD";if(height>=hd_limit)label="HD";if(height>=1400)label="4K";root.find(".fp-qsel").html(label)}function quality_debug(w,h,br){debug_log.html("Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps")}function quality_sort(){var menu=root.find(".fp-qsel-menu");menu.children().each(function(i,a){menu.prepend(a)});menu.children().each(function(i,a){if(/^NaNp/.test(jQuery(a).html())){var bitrate=jQuery(a).html().match(/\((.*?)\)/);if(bitrate&&typeof bitrate[1]!=="undefined"){jQuery(a).html(bitrate[1])}}else{jQuery(a).html(jQuery(a).html().replace(/\(.*?\)/,""))}});menu.prepend(menu.find("a[data-quality=-1]"));menu.prepend(menu.find("strong"))}});flowplayer(function(api,root){root=jQuery(root);var player_id=root.attr("id"),ad=false;if(root.data("end_popup_preview")){jQuery(document).ready(function(){api.trigger("finish",[api])})}function ad_height_check(){var count=0;var ad_height_check=setInterval(function(){var height=ad&&ad.find(".adsbygoogle").height();count++;if(count>20*10||height>0)clearInterval(ad_height_check);if(height>root.height()){ad.addClass("tall-ad")}},50)}function show_ad(){var ad_data=root.attr("data-ad");if(typeof ad_data!="undefined"&&ad_data.length){try{ad_data=JSON.parse(ad_data)}catch(e){return false}if(!ad&&!root.hasClass("is-cva")&&root.width()>=parseInt(ad_data.width)){var html=ad_data.html;html=html.replace("%random%",Math.random());ad=jQuery('<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+"</div>");root.find(".fp-player").append(ad);ad_height_check();setTimeout(function(){if(root.find(".wpfp_custom_ad video").length){api.pause()}},500)}}}function show_popup(event){var popup_data=root.attr("data-popup");if(typeof popup_data!="undefined"&&popup_data.length){try{popup_data=JSON.parse(popup_data)}catch(e){return false}if(event=="finish"||popup_data.pause||popup_data.html.match(/fv-player-ppv-purchase-btn-wrapper/)){root.addClass("is-popup-showing");root.find(".fp-player").append('<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+popup_data.html+"</div>")}}}api.bind("ready",function(e,api){if(ad.length==1){ad.remove();ad=false}if(!root.data("ad_show_after")){show_ad()}}).bind("progress",function(e,api,current){if(current>root.data("ad_show_after")){show_ad()}}).bind("finish",function(e,api){if(typeof api.video.index=="undefined"||api.video.index+1==api.conf.playlist.length){show_popup(e.type)}}).bind("pause",function(e,api){show_popup(e.type)}).bind("resume unload seek",function(e,api){if(root.hasClass("is-popup-showing")){root.find(".wpfp_custom_popup").remove();root.removeClass("is-popup-showing")}})});jQuery(document).on("click",".fv_fp_close",function(){var ad=jQuery(this).parents(".wpfp_custom_ad_content"),video=ad.find("video");ad.fadeOut();if(video.length)video[0].pause();return false});jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(true)});jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(false)});flowplayer(function(api,root){var root=jQuery(root);var bean=flowplayer.bean;var time=0,last=0,timer,event_name;if(typeof ga=="undefined"&&api.conf.fvanalytics&&typeof _gat=="undefined"&&typeof gtag=="undefined"){jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:true},function(){ga("create",api.conf.fvanalytics,"auto")})}if(!window._paq&&api.conf.matomo_domain&&api.conf.matomo_site_id){var u="//"+api.conf.matomo_domain+"/";var _paq=window._paq=window._paq||[];_paq.push(["setTrackerUrl",u+"matomo.php"]);_paq.push(["setSiteId",api.conf.matomo_site_id]);var d=document,g=d.createElement("script"),s=d.getElementsByTagName("script")[0];g.type="text/javascript";g.async=true;g.src=u+"matomo.js";s.parentNode.insertBefore(g,s)}api.bind("progress",function(e,api,current){fv_track(e,api,current)}).bind("finish ready ",function(e,api){for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;root.removeData("fv_track_"+fv_ga_events[j])}}).bind("error",function(e,api,error){setTimeout(function(){if(!api.error)return;var video=typeof api.video!="undefined"&&typeof api.video.src!="undefined"?api.video:false;if(!video&&typeof api.conf.clip!="undefined"&&typeof api.conf.clip.sources!="undefined"&&typeof api.conf.clip.sources[0]!="undefined"&&typeof api.conf.clip.sources[0].src!="undefined")video=api.conf.clip.sources[0];var name=fv_player_track_name(root,video);if(name&&!name.match(/\/\/vimeo.com\/\d/)){fv_player_track(false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+"error",error.message,name)}},100)});api.bind("load unload",fv_track_seconds_played).bind("progress",function(){if(!api.seeking){time+=last?+new Date-last:0;last=+new Date}if(!timer){timer=setTimeout(function(){timer=null;fv_player_track(false,"Flowplayer heartbeat",api.engine.engineName+"/"+api.video.type,"Heartbeat",0)},10*60*1e3)}}).bind("pause",function(){last=0});api.bind("shutdown",function(){bean.off(window,"unload",fv_track_seconds_played)});bean.on(window,"unload",fv_track_seconds_played);var fv_ga_events=["start","first quartile","second quartile","third quartile","complete"];function fv_track_seconds_played(e,api_not_needed,video){video=video||api.video;if(e.type==="load"){event_name=fv_player_track_name(root,video)}if(time){fv_player_track(false,"Video / Seconds played",api.engine.engineName+"/"+api.video.type,event_name,Math.round(time/1e3));time=0;if(timer){clearTimeout(timer);timer=null}}}function fv_track(e,api,data){var video=api.video,dur=video.duration,i=0;var name=fv_player_track_name(root,video);if(dur){if(data>19*dur/20)i=4;else if(data>3*dur/4)i=3;else if(data>dur/2)i=2;else if(data>dur/4)i=1}if(api.live)i=0;if(root.data("fv_track_"+fv_ga_events[i]))return;for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;if(j==i)break;if(!root.data("fv_track_"+fv_ga_events[j]))return}root.trigger("fv_track_"+fv_ga_events[i].replace(/ /,"_"),[api,name]);root.data("fv_track_"+fv_ga_events[i],true);fv_player_track(false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+fv_ga_events[i],api.engine.engineName+"/"+video.type,name)}api.get_time_played=function(){return time/1e3}});function fv_player_track(ga_id,event,engineType,name,value){if(!ga_id)ga_id=flowplayer.conf.fvanalytics;if(typeof engineType=="undefined")engineType="Unknown engine";if(/fv_player_track_debug/.test(window.location.href))console.log("FV Player Track: "+event+" - "+engineType+" '"+name+"'",value);if(typeof gtag!="undefined"){gtag("event",event,{event_category:engineType,event_label:name,value:value?value:1})}else if(ga_id&&typeof ga!="undefined"){ga("create",ga_id,"auto",name,{allowLinker:true});ga("require","linker");if(value){ga("send","event",event,engineType,name,value)}else{ga("send","event",event,engineType,name)}}else if(ga_id&&typeof _gat!="undefined"){var tracker=_gat._getTracker(ga_id);if(typeof tracker._setAllowLinker=="undefined"){return}tracker._setAllowLinker(true);if(value){tracker._trackEvent(event,engineType,name,value)}else{tracker._trackEvent(event,engineType,name)}}if(flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&typeof _paq!="undefined"){if(value){_paq.push(["trackEvent",event,engineType,name,value])}else{_paq.push(["trackEvent",event,engineType,name])}}}function fv_player_track_name(root,video){var name=root.attr("title");if(!name&&typeof video.fv_title!="undefined")name=video.fv_title;if(!name&&typeof video.src!="undefined"){name=video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"");if(video.type.match(/mpegurl/))name=video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+name}return name}flowplayer(function(api,root){root=jQuery(root);var player=root.find(".fp-player"),had_no_volume=root.hasClass("no-volume"),had_fp_mute=root.hasClass("fp-mute"),had_fp_full=root.hasClass("fp-full"),had_fp_slim=root.hasClass("fp-slim"),timeline=root.find(".fp-timeline"),buttons_count=0;function check_size(){var width=player.width()||root.width();if(width>900){jQuery(".fp-subtitle",root).addClass("is-wide")}else{jQuery(".fp-subtitle",root).removeClass("is-wide")}root.toggleClass("is-tiny",width<400);root.toggleClass("is-small",width<600&&width>=400);var too_narrow=width<480+buttons_count*35;if(!had_fp_full){root.toggleClass("fp-full",root.hasClass("has-abloop")||too_narrow)}if(had_fp_slim){root.toggleClass("fp-slim",!too_narrow||root.hasClass("has-abloop"))}var size="";if(width<400)size="is-tiny";else if(width<600&&width>=400)size="is-small";root.trigger("fv-player-size",[size]);var el=player;if(root.parent().hasClass("fp-playlist-vertical-wrapper")||root.parent().hasClass("fp-playlist-text-wrapper"))el=root.parent();if(el.width()<=560){el.addClass("is-fv-narrow")}else{el.removeClass("is-fv-narrow")}if(width<=320){root.addClass("no-volume fp-mute")}else{if(!had_no_volume)root.removeClass("no-volume");if(!had_fp_mute)root.removeClass("fp-mute")}}check_size();jQuery(window).on("resize",check_size);api.on("ready fullscreen fullscreen-exit sticky sticky-exit",function(e){setTimeout(function(){buttons_count=root.find(".fp-controls > strong:visible").length+root.find(".fp-controls > .fp-icon:visible").length;check_size()},0)});api.on("unload pause finish error",function(){if(typeof checker!=="undefined")clearInterval(checker)})});jQuery(window).on("resize tabsactivate",function(){jQuery(".fp-playlist-external").each(function(){var playlist=jQuery(this);if(playlist.parent().width()>=900)playlist.addClass("is-wide");else playlist.removeClass("is-wide")})}).trigger("resize");flowplayer(function(api,root){api.bind("ready",function(){if(/Chrome/.test(navigator.userAgent)&&parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)>54){if(api.video.subtitles){jQuery(root).addClass("chrome55fix-subtitles")}else{jQuery(root).addClass("chrome55fix")}}});root=jQuery(root);var image_src=root.css("background-image");if(image_src){image_src=image_src.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",");if(!image_src||!image_src[0].match(/^(https?:)?\/\//))return;var image=new Image;image.src=image_src[0];var image_ratio=image.height/image.width;var player_ratio=root.height()/root.width();var ratio_diff=Math.abs(player_ratio-image_ratio);if(ratio_diff<.05){root.css("background-size","cover")}}});(function($){$(window).on("resize",function(){var iframe=$("iframe[id][src][height][width]");iframe.each(function(){if($(this).attr("id").match(/(fv_vimeo_)|(fv_ytplayer_)/)&&$(this).width()<=$(this).attr("width"))$(this).height($(this).width()*$(this).attr("height")/$(this).attr("width"))});var wistia=jQuery(".wistia_embed");wistia.each(function(){$(this).height($(this).width()*$(this).data("ratio"))})}).trigger("resize")})(jQuery);jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(event,ui){var oldPlayer=jQuery(".flowplayer.is-playing").data("flowplayer");if(typeof oldPlayer!="undefined"){oldPlayer.pause()}var objPlayer=jQuery(".flowplayer",ui.newPanel);var api=objPlayer.data("flowplayer");api.load()});flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;if(root.hasClass("is-audio")){bean.off(root[0],"mouseenter");bean.off(root[0],"mouseleave");root.removeClass("is-mouseout");root.addClass("fixed-controls").addClass("is-mouseover");api.on("error",function(e,api,error){jQuery(".fp-message",root).html(jQuery(".fp-message",root).html().replace(/video/,"audio"))});root.on("click",function(e){if(!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}});flowplayer(function(api,root){if(!api.conf.fv_chromecast)return;if(!window["__onGCastApiAvailable"]){jQuery.getScript({url:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",cache:true});window["__onGCastApiAvailable"]=function(loaded){if(!loaded)return;initialize()}}var conf=api.conf.chromecast||{},session,timer,trigger,bean=flowplayer.bean,common=flowplayer.common,waiting_for_seek=false;function initialize(){var applicationId,sessionRequest,apiConfig;applicationId=conf.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID;sessionRequest=new chrome.cast.SessionRequest(applicationId);apiConfig=new chrome.cast.ApiConfig(sessionRequest,sessionListener,receiverListener);chrome.cast.initialize(apiConfig,onInitSuccess,onError)}function sessionListener(){}function receiverListener(ev){console.log("FV Player: Chromecast listener",ev);if(ev!==chrome.cast.ReceiverAvailability.AVAILABLE)return;flowplayer.conf.chromecast_available=true}function onInitSuccess(){}function onError(){console.log("chromecast onError")}function createUIElements(){var btnContainer=common.find(".fp-header",root)[0];if(!btnContainer)return;common.find(".fp-chromecast",btnContainer).forEach(common.removeNode);common.find(".fp-chromecast-engine",root).forEach(common.removeNode);trigger=common.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"});btnContainer.appendChild(trigger);var chromeCastEngine=common.createElement("div",{class:"fp-chromecast-engine"}),chromeCastStatus=common.createElement("p",{class:"fp-chromecast-engine-status"}),chromeCastIcon=common.createElement("p",{class:"fp-chromecast-engine-icon"});chromeCastEngine.appendChild(chromeCastIcon);chromeCastEngine.appendChild(chromeCastStatus);var engine=common.find(".fp-engine",root)[0];if(!engine)common.prepend(common.find(".fp-player",root)[0]||root,chromeCastEngine);else engine.parentNode.insertBefore(chromeCastEngine,engine)}function destroy(){clearInterval(timer);timer=null;api.release();common.toggleClass(root,"is-chromecast",false);common.toggleClass(trigger,"fp-active",false)}function get_media(){var media=false;var sources=api.video.sources_fvqs||api.video.sources;for(var i in sources){var type=sources[i].type;if(type=="video/mp4"||type=="video/fv-mp4"||type=="application/dash+xml"){media=sources[i];break}}if(!media){for(var i in sources){if(sources[i].type=="application/x-mpegurl"){media=sources[i];break}}}if(api.video.fvhkey&&!api.conf.hls_cast)return false;if(media){var top_quality=false,mp4_qualities=["fullhd","hd","md","sd"];for(var quality in mp4_qualities){var re=new RegExp("-"+mp4_qualities[quality]);for(var i in api.video.sources_fvqs){var source=api.video.sources_fvqs[i];if(source.src.match(re)&&source.type=="video/mp4"){top_quality=source;break}}if(top_quality){media=top_quality;break}}}return media}function load_media(){var media=get_media();if(!media){return false}var cast_subtitles=[];if(api.video.subtitles){api.video.subtitles.forEach(function(v,k){if(v.src.match(/\.srt/)){console.log("FV Player: Chromecast doesn't support SRT subtitles")}var subtitles=new chrome.cast.media.Track(k,chrome.cast.media.TrackType.TEXT);subtitles.trackContentId=v.src;subtitles.trackContentType="text/vtt";subtitles.subtype=chrome.cast.media.TextTrackType.SUBTITLES;subtitles.name=v.label;subtitles.language=v.srclang+"-"+k,subtitles.customData=null;cast_subtitles.push(subtitles)})}var mediaInfo=new chrome.cast.media.MediaInfo(media.src,media.type);mediaInfo.tracks=cast_subtitles;var request=new chrome.cast.media.LoadRequest(mediaInfo);if(!api.live){request.currentTime=api.video.time}clearInterval(timer);timer=false;session.loadMedia(request,onMediaDiscovered,function onMediaError(e){console.log("onMediaError",e)})}function onMediaDiscovered(chromecast){switch_tracks(chromecast);chromecast.addUpdateListener(function(alive){if(!session)return;timer=timer||setInterval(function(){api.trigger("progress",[api,chromecast.getEstimatedTime()]);chromecast.activeTrackIds.forEach(function(track_id){jQuery.each(chromecast.media.tracks,function(k,v){if(v.trackId==track_id&&v.type=="AUDIO"){var found=hilight_audio_track("data-audio",v.language);if(!found){hilight_audio_track("data-lang",v.language)}return false}})})},500);if(alive){common.toggleClass(root,"is-chromecast",true);common.toggleClass(trigger,"fp-active",true);api.hijack({pause:function(){console.log("hijacked pause!");chromecast.pause()},resume:function(){if(api.finished){clearInterval(timer);timer=null;api.release();load_media();return}chromecast.play()},seek:function(time){var req=new chrome.cast.media.SeekRequest;req.currentTime=time;chromecast.seek(req)}})}var playerState=chromecast.playerState;if(api.paused&&playerState===chrome.cast.media.PlayerState.PLAYING)api.trigger("resume",[api]);if(api.playing&&playerState===chrome.cast.media.PlayerState.PAUSED)api.trigger("pause",[api]);if(api.seeking&&playerState===chrome.cast.media.PlayerState.BUFFERING){waiting_for_seek=true}if(api.seeking&&playerState===chrome.cast.media.PlayerState.PLAYING&&waiting_for_seek){waiting_for_seek=false;api.trigger("seek",[api])}if(playerState==chrome.cast.media.PlayerState.IDLE&&chromecast.idleReason==chrome.cast.media.IdleReason.FINISHED){api.trigger("finish",[api])}common.toggleClass(root,"is-loading",playerState===chrome.cast.media.PlayerState.BUFFERING)})}api.bind("ready",function(e,api,video){if(session){if(get_media()){api.one("progress",function(e,api){api.release();api.pause();api.mute(false,true);load_media()});api.mute(true,true)}else{session.stop();session=null;destroy();jQuery(trigger).hide()}return}if(!flowplayer.conf.chromecast_available)return;if(get_media()){createUIElements();jQuery(trigger).show()}else{FV_Flowplayer_Pro.log("FV Player: Can't find media source suitable for Chromecast!");jQuery(trigger).hide()}});bean.on(root,"click",".fp-chromecast",function(ev){ev.preventDefault();if(session){api.trigger("pause",[api]);if(session.media[0].media){var seek=session.media[0].getEstimatedTime();setTimeout(function(){api.seek(seek)},0)}session.stop();session=null;destroy();return}if(api.playing)api.pause();chrome.cast.requestSession(function(s){jQuery(root).addClass("is-loading");session=s;var receiverName=session.receiver.friendlyName;common.html(common.find(".fp-chromecast-engine-status",root)[0],"Playing on device "+receiverName);load_media()},function(err){console.error("requestSession error",err)})});bean.on(root,"click",".fv-fp-hls-menu [data-audio], .fp-subtitle-menu [data-subtitle-index]",function(){if(session&&session.media[0].media){switch_tracks(session.media[0]);return false}});jQuery(window).on("unload",function(){if(session){session.stop()}});function hilight_audio_track(attr,chromecast_language){var audio_tracks_menu=jQuery(root).find(".fv-fp-hls-menu a"),found=false;audio_tracks_menu.each(function(k,el){if(jQuery(el).attr(attr)===chromecast_language){jQuery(el).addClass("fp-selected");found=true}else{jQuery(el).removeClass("fp-selected")}});return found}function switch_tracks(chromecast){console.log(chromecast.media.tracks);var audio=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("audio"),audio_lang=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("lang"),subtitle_index=jQuery(root).find(".fp-subtitle-menu [data-subtitle-index].fp-selected").data("subtitle-index"),subtitles=subtitle_index>-1?api.video.subtitles[subtitle_index].srclang:false;var audio_found=false,subtitles_found=false,tracks_selected=[];jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio&&v.type=="AUDIO"){audio_found=v}if(v.language==subtitles+"-"+subtitle_index&&v.type=="TEXT"){subtitles_found=v}});if(!audio_found){jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio_lang&&v.type=="AUDIO"){audio_found=v;return false}})}var debug_log="";if(audio_found){tracks_selected.push(audio_found.trackId);debug_log+=audio_found.language+" audio"}if(subtitles_found){tracks_selected.push(subtitles_found.trackId);if(debug_log)debug_log+=" ";debug_log+=subtitles_found.language+" subtitles"}if(tracks_selected){var request=new chrome.cast.media.EditTracksInfoRequest(tracks_selected);chromecast.editTracksInfo(request,function(){console.log("FV Player: Chromecast "+debug_log+" loaded")},function(){console.log("FV Player: Chromecast "+debug_log+" failed")})}}});jQuery(document).on("mfpClose",function(){if(typeof jQuery(".flowplayer").data("flowplayer")!="undefined")jQuery(".flowplayer").data("flowplayer").unload()});jQuery(document).on("click",".vc_tta-tab a",function(){var api=jQuery(".flowplayer.is-playing").data("flowplayer");if(api)api.pause()});flowplayer(function(api,root){root=jQuery(root);api.bind("ready",function(){setTimeout(function(){var video=jQuery("video",root);if(video.length>0){video.prop("autoplay",false)}},100);root.find("video.fp-engine").addClass("intrinsic-ignore")})});jQuery(".flowplayer").on("ready",function(e,api){if(/BB10/.test(navigator.userAgent)){api.fullscreen()}});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var fv_flowplayer_safety_resize_init=false;jQuery(".flowplayer").each(function(){if(!jQuery(this).is(":visible")||jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||jQuery(this).hasClass("is-audio"))return;if(jQuery(this).width()<30||jQuery(this).height()<20){fv_flowplayer_safety_resize_init=true;var el=jQuery(this);while(jQuery(el).width()<30||jQuery(el).width()==jQuery(this).width()){if(jQuery(el).parent().length==0)break;el=jQuery(el).parent()}jQuery(this).width(jQuery(el).width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")));fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=el}});if(fv_flowplayer_safety_resize_init){jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){if(jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter"))return;if(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")))}})})}}if(typeof flowplayer.conf.safety_resize!="undefined"&&flowplayer.conf.safety_resize){jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)})}var isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);if(isIE11){jQuery(document).ready(function(){jQuery(".fp-waiting").hide()});flowplayer(function(api,root){api.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()})})}if(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"))})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}else if(location.href.match(/brizy-edit-iframe/)){console.log("FV Player: Brizy editor is active");setInterval(fv_player_load,1e3)}if(window.DELEGATE_NAMES){flowplayer(function(api,root){fv_player_notice(root,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}flowplayer(function(player,root){root=jQuery(root);if(typeof root.data("fv-embed")=="undefined"||!root.data("fv-embed")||root.data("fv-embed")=="false")return;player.embedCode=function(){var video=player.video;var width=root.width();var height=root.height();height+=2;if(root.hasClass("has-chapters")||root.hasClass("has-transcript")){height+=300}if(jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length>0){height+=150+20}var link=root.data("fv-embed")+"#"+fv_player_get_video_link_hash(player);return'<iframe src="'+link+'" allowfullscreen width="'+width+'" height="'+height+'" frameborder="0" style="max-width:100%"></iframe>'}});jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var button=jQuery(this);var player=button.parents(".flowplayer");var api=player.data("flowplayer");if(typeof api.embedCode=="function"){player.find(".embed-code textarea").val(api.embedCode())}fv_player_clipboard(player.find(".embed-code textarea").val(),function(){fv_player_notice(player,fv_flowplayer_translations.embed_copied,2e3)},function(){button.parents(".fvp-share-bar").find(".embed-code").toggle();button.parents(".fvp-share-bar").toggleClass("visible")});return false});flowplayer(function(player,root){if(!flowplayer.support.fullscreen&&player.conf.native_fullscreen&&typeof flowplayer.common.createElement("video").webkitEnterFullScreen==="function"){return}var FS_ENTER="fullscreen",FS_EXIT="fullscreen-exit",FS_SUPPORT=flowplayer.support.fullscreen,win=window,scrollX,scrollY;player.fullscreen=function(flag){var wrapper=jQuery(root).find(".fp-player")[0];if(player.disabled)return;if(flag===undefined)flag=!player.isFullscreen;if(flag){scrollY=win.scrollY;scrollX=win.scrollX}if(FS_SUPPORT){if(flag){["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(fName){if(typeof wrapper[fName]==="function"){wrapper[fName]({navigationUI:"hide"});if(fName==="webkitRequestFullScreen"&&!document.webkitFullscreenElement){wrapper[fName]()}}})}else{["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(fName){if(typeof document[fName]==="function"){document[fName]()}})}}else{player.trigger(flag?FS_ENTER:FS_EXIT,[player])}return player};player.on("fullscreen-exit",function(){if(player.engine.engineName=="fvyoutube")return;win.scrollTo(scrollX,scrollY);jQuery(window).one("scroll",function(){window.scrollTo(scrollX,scrollY)})})});flowplayer(function(api,root){root=jQuery(root);if(flowplayer.conf.wpadmin||jQuery(root).hasClass("is-audio"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),playlist_with_fullscreen=playlist.hasClass("fp-playlist-season")||playlist.hasClass("fp-playlist-polaroid");fsforce=root.data("fsforce")==true;if(flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||!flowplayer.support.fullscreen&&fsforce||playlist_with_fullscreen){if(!flowplayer.support.fullscreen){api.bind("ready",function(){api.fullscreen(true)})}root.on("click",function(){if(!api.ready||api.paused)api.fullscreen(true)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFullscreen){api.fullscreen();api.resume()}});api.on("resume",function(){if(!api.isFullscreen)api.fullscreen()});api.on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fullscreen(false)}).on("fullscreen",function(a,api){root.addClass("forced-fullscreen")}).on("fullscreen-exit",function(a,api){api.pause();root.removeClass("forced-fullscreen")})}else if(fsforce){var position,unload=root.find(".fp-unload"),is_closing=false;api.isFakeFullscreen=false;unload.show();root.on("click",function(e){if(!api.ready&&e.target!=unload[0])api.fakeFullscreen(true)});unload.on("click",function(e){if(api.ready){api.fullscreen(false)}else if(api.loading){is_closing=true;api.one("ready",function(e){api.unload()})}api.fakeFullscreen(false)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFakeFullscreen){api.fakeFullscreen();api.resume()}});api.on("resume",function(){if(!is_closing&&!api.isFakeFullscreen)api.fakeFullscreen()}).on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fakeFullscreen(false)}).on("fullscreen",function(a,api){root.removeClass("fake-fullscreen")}).on("fullscreen-exit",function(a,api){if(api.isFakeFullscreen)api.fakeFullscreen(true,true)}).on("unload",function(a,api){});api.fakeFullscreen=function(flag,force){if(!force&&(api.isFakeFullscreen==flag||api.disabled))return;if(position===undefined)position=root.css("position");if(flag===undefined)flag=!api.isFakeFullscreen;api.isFakeFullscreen=flag;api.trigger(flag?"fakefullscreen":"fakefullscreen-exit",[api]);root.toggleClass("is-fullscreen fake-fullscreen forced-fullscreen",flag);if(flag){root.css("position","fixed")}else{root.css("position",position)}}}if(flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen&&window.screen&&window.screen.orientation){api.on("fullscreen",function(a,api){if(api.video.width>api.video.height){screen.orientation.lock("landscape-primary")}else{screen.orientation.lock("portrait-primary")}})}});flowplayer(function(api,root){root=jQuery(root);var hlsjs,player,audioUXGroup,audioGroups,hls_audio_button,hls_audio_menu,mse=window.MediaSource||window.WebKitMediaSource;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});api.bind("ready",function(e,api){removeAudioMenu();if(hlsjs&&api.video.type=="application/x-mpegurl"){parseAudioTracksHlsJs(hlsjs);createAudioMenu()}});api.one("progress",function(){if(api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl"){parseAudioTracksSafari();createAudioMenu()}});function getVideoTagAudioTracks(){var video=root.find("video");if(video.length&&video[0].audioTracks){return video[0].audioTracks}return[]}function hilightAudioTrack(audioTrack){if(!audioTrack.name)audioTrack.name=audioTrack.label;root.find(".fv-fp-hls-menu a").each(function(k,el){jQuery(el).toggleClass("fp-selected",jQuery(el).attr("data-audio")===audioTrack.name)})}function createAudioMenu(){if(!audioUXGroup||audioUXGroup.length<2){return}hls_audio_button=jQuery('<strong class="fv-fp-hls">AUD</strong>');hls_audio_menu=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(root.find(".fp-controls"));hls_audio_menu.append("<strong>Audio</strong>");audioUXGroup.forEach(function(audioTrack){hls_audio_menu.append('<a data-audio="'+audioTrack.name+'" data-lang="'+audioTrack.lang+'">'+audioTrack.name+"</a>")});hls_audio_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(hls_audio_menu.hasClass("fp-active")){api.hideMenu(hls_audio_menu[0])}else{root.click();api.showMenu(hls_audio_menu[0])}});jQuery("a",hls_audio_menu).on("click",function(e){var adata=e.target.getAttribute("data-audio");if(hlsjs){var gid=hlsjs.audioTracks[hlsjs.audioTrack].groupId;var atrack=hlsjs.audioTracks.filter(function(at){return at.groupId===gid&&(at.name===adata||at.lang===adata)})[0];hlsjs.audioTrack=atrack.id;hilightAudioTrack(atrack)}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].label==adata){tracks[i].enabled=true;hilightAudioTrack(tracks[i])}}}});if(hlsjs){hilightAudioTrack(hlsjs.audioTracks[hlsjs.audioTrack])}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].enabled){hilightAudioTrack(tracks[i])}}}}function removeAudioMenu(){jQuery(hls_audio_menu).remove();jQuery(hls_audio_button).remove()}function parseAudioTracksHlsJs(data){audioGroups=[];audioUXGroup=[];data.levels.forEach(function(level){var agroup=level.attrs.AUDIO;if(agroup&&audioGroups.indexOf(agroup)<0){audioGroups.push(agroup)}if(audioGroups.length){audioUXGroup=data.audioTracks.filter(function(audioTrack){return audioTrack.groupId===audioGroups[0]})}})}function parseAudioTracksSafari(){audioGroups=[];audioUXGroup=[];var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;audioUXGroup.push({id:tracks[i].id,name:tracks[i].label})}}});flowplayer(function(api,root){var store_engine_pos=-1;var store_engine=false;api.on("error",function(e,api,err){if(err.code!=4||api.engine.engineName!="hlsjs")return;console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS");api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(flowplayer.engines).each(function(k,v){if(flowplayer.engines[k].engineName=="hlsjs"){store_engine_pos=k;store_engine=flowplayer.engines[k];delete flowplayer.engines[k]}});var index=typeof api.video.index!="undefined"?api.video.index:0;var video=index>0?api.conf.playlist[index].sources:api.conf.clip.sources;video.index=index;api.load({sources:video});api.bind("unload error",function(){flowplayer.engines[store_engine_pos]=store_engine})})});flowplayer(function(api,root){var initialDelay=30,continueDelay=10,useDelay=initialDelay,retryLabel=fv_flowplayer_translations.live_stream_retry,timer;api.clearLiveStreamCountdown=function(){if(timer){clearInterval(timer);api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(root).find(".fp-message.fp-shown").remove();api.unload()}};api.conf.flashls={manifestloadmaxretry:2};api.on("ready",function(){useDelay=initialDelay;retryLabel=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){useDelay=continueDelay;retryLabel=fv_flowplayer_translations.live_stream_continue});api.on("error",function(e,api,err){setTimeout(function(){if(!api.conf.clip.live&&!api.conf.live&&!(err.video&&err.video.src.match(/\/\/vimeo.com\/event\//)))return;var delay=useDelay;if(api.conf.clip.streaming_time){delay=api.conf.clip.streaming_time-Math.floor(Date.now()/1e3)}else if(api.conf.clip.live_starts_in){delay=api.conf.clip.live_starts_in}var startLabel=fv_flowplayer_translations.live_stream_starting.replace(/%d/,secondsToDhms(delay));retryLabel=retryLabel.replace(/%d/,secondsToDhms(delay));var message=api.conf.clip.live_starts_in?startLabel:retryLabel;clearInterval(timer);if(err.code===1||err.code===2||err.code===4){root.className+=" is-offline";if(flowplayer.support.flashVideo){api.one("flashdisabled",function(){root.querySelector(".fp-flash-disabled").style.display="none"})}var messageElement=root.querySelector(".fp-ui .fp-message");messageElement.innerHTML=message;var reload_delay=delay>300?300:delay;timer=setInterval(function(){reload_delay-=1;delay-=1;if(reload_delay>0&&messageElement){messageElement.querySelector("span").innerHTML=secondsToDhms(delay)}else{clearInterval(timer);api.error=api.loading=false;messageElement=root.querySelector(".fp-ui .fp-message");if(messageElement){root.querySelector(".fp-ui").removeChild(messageElement)}root.className=root.className.replace(/\bis-(error|offline)\b/g,"");api.load()}},1e3)}},1)});function secondsToDhms(seconds){seconds=Number(seconds);var d=Math.floor(seconds/(3600*24));var h=Math.floor(seconds%(3600*24)/3600);var m=Math.floor(seconds%3600/60);var s=Math.floor(seconds%60);var t=fv_flowplayer_translations;var output=d>0?d==1?t.duration_1_day.replace(/%s/,d):t.duration_n_days.replace(/%s/,d):"";if(output&&h>0)output+=", ";output+=h>0?h==1?t.duration_1_hour.replace(/%s/,h):t.duration_n_hours.replace(/%s/,h):"";if(output&&m>0)output+=", ";output+=m>0?m==1?t.duration_1_minute.replace(/%s/,m):t.duration_n_minutes.replace(/%s/,m):"";if(output&&s>0)output+=t.and;output+=s>0?s==1?t.duration_1_second.replace(/%s/,s):t.duration_n_seconds.replace(/%s/,s):"";return output}});flowplayer(function(api,root){if(!flowplayer.support.browser.safari&&!flowplayer.support.iOS)return;root=jQuery(root);var video_tag=false,did_start_playing=false,are_waiting_already=0;api.on("ready",function(e,api,video){are_waiting_already=0;did_start_playing=false;if(api.engine.engineName=="html5"&&video.src.match(/\?/)){video_tag=root.find("video");if(!video_tag.data("fv-ios-recovery")){video_tag.on("waiting",wait_for_stalled);video_tag.data("fv-ios-recovery",true)}api.one("progress",function(){did_start_playing=true})}});api.bind("beforeseek",wait_for_stalled);function debug(e){console.log("FV PLayer: iOS video element: "+e.type)}function wait_for_stalled(){if(!did_start_playing){return}if(video_tag&&api.engine.engineName=="html5"){are_waiting_already++;if(are_waiting_already>1){if(are_waiting_already>3){console.log("FV PLayer: iOS video element needs a push, triggering 'stalled'");video_tag.trigger("stalled")}return}console.log("FV PLayer: iOS video element will trigger error after 'stalled' arrives");video_tag.one("stalled",function(){var time=api.video.time;if(api.video.type.match(/video\//)){console.log("FV PLayer: Running check of video file...");var test_video=document.createElement("video");test_video.src=api.video.src;test_video.onloadedmetadata=function(){are_waiting_already=0;console.log("FV Player: Video link works")};test_video.onerror=function(){console.log("FV Player: Video link issue!");if(are_waiting_already>0){api.trigger("error",[api,{code:4,video:api.video}])}};return}setTimeout(function(){console.log(api.video.time,time);if(api.video.time!=time){console.log("FV PLayer: iOS video element continues playing, no need for error");return}if(api.paused){console.log("FV PLayer: iOS video element paused, no need for error");return}api.trigger("error",[api,{code:4,video:api.video}])},5e3)})}}});!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(r+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var m=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,m):o(C,m)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===m){c=C;break}n||(c[m]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});flowplayer.bean.off(document,"keydown.fp");flowplayer(function(api,root){var bean=flowplayer.bean;if(!api.conf.keyboard)return;bean.on(root,"mouseenter mouseleave",function(e){fv_player_focused=!api.disabled&&e.type=="mouseover"?api:0;if(fv_player_focused)fv_player_focusedRoot=root});api.bind("ready",function(e,api,video){if(video.subtitles&&video.subtitles.length>0){var help=jQuery(root).find(".fp-help").html();help+='<div class="fp-help-section fp-help-subtitles"><p><em>c</em>cycle through subtitles</p></div>';jQuery(root).find(".fp-help").html(help)}else{jQuery(root).find(".fp-help-subtitles").remove()}})});flowplayer.bean.on(document,"keydown.fp",function(e){if(typeof fv_player_focused=="undefined")return;var api=fv_player_focused,focusedRoot=api?fv_player_focusedRoot:false,common=flowplayer.common;var el=api&&!api.disabled?api:0,metaKeyPressed=e.ctrlKey||e.metaKey||e.altKey,key=e.which,conf=el&&el.conf;if(common.hasClass(focusedRoot,"no-controlbar")||common.hasClass(focusedRoot,"is-cva"))return;if(!el||!conf.keyboard||el.disabled)return;if([63,187,191].indexOf(key)!=-1){common.toggleClass(focusedRoot,"is-help");return false}if(key==27&&common.hasClass(focusedRoot,"is-help")){common.toggleClass(focusedRoot,"is-help");return false}if(!metaKeyPressed&&el.ready){e.preventDefault();if(e.shiftKey){if(key==39)el.speed(true);else if(key==37)el.speed(false);else if(key==78)el.next();else if(key==80)el.prev();return}if(key<58&&key>47)return el.seekTo(key-48);switch(key){case 38:case 75:el.volume(el.volumeLevel+.15);break;case 40:case 74:el.volume(el.volumeLevel-.15);break;case 39:case 76:el.seeking=true;el.seek(api.video.time+5);break;case 37:case 72:el.seeking=true;el.seek(api.video.time-5);break;case 190:el.seekTo();break;case 32:el.toggle();break;case 70:if(conf.fullscreen)el.fullscreen();break;case 77:el.mute();break;case 81:el.unload();break;case 67:if(!api.video.subtitles||api.video.subtitles.length==0)break;var current_subtitles=jQuery(focusedRoot).find(".fp-dropdown li.active[data-subtitle-index]").data("subtitle-index");if(typeof current_subtitles=="undefined")current_subtitles=-1;current_subtitles++;if(current_subtitles>api.video.subtitles.length-1){current_subtitles=-1}api.trigger("fv-subtitles-switched");if(current_subtitles>-1){el.loadSubtitles(current_subtitles);fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_switched+" "+api.video.subtitles[current_subtitles].label,"fv-subtitles-switched")}else{el.disableSubtitles();fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_disabled,"fv-subtitles-switched")}break}}});flowplayer(function(api,root){api.bind("load",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){var live_check=setTimeout(function(){player.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>");player.addClass("is-error")},1e4);jQuery(e.currentTarget).data("live_check",live_check)}}).bind("ready",function(e,api,data){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){player.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)}})});(function($){flowplayer(function(api,root){if(jQuery(root).hasClass("is-cva"))return;$(document).on("submit","#"+jQuery(root).attr("id")+" .mailchimp-form",function(e){e.preventDefault();$(".mailchimp-response",root).remove();$("input[type=submit]",root).attr("disabled","disabled").addClass("fv-form-loading");var data={action:"fv_wp_flowplayer_email_signup"};$("[name]",this).each(function(){data[this.name]=$(this).val()});$.post(fv_player.ajaxurl,data,function(response){response=JSON.parse(response);$('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",root);if(response.text.match(/already subscribed/)){response.status="ERROR"}if(response.status==="OK"){$(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",root).val("");$(".mailchimp-response",root).removeClass("is-fv-error").html(response.text);setTimeout(function(){$(".wpfp_custom_popup",root).fadeOut()},2e3)}else{$(".mailchimp-response",root).addClass("is-fv-error").html(response.text)}$("input[type=submit]",root).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery);function fv_flowplayer_mobile_switch(id){var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery("#wpfp_"+id+" video source").each(function(){if(jQuery(this).attr("id")!="wpfp_"+id+"_mobile"){fv_fp_mobile=true;jQuery(this).remove()}});if(fv_fp_mobile){jQuery("#wpfp_"+id).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(typeof fv_flowplayer_mobile_switch_array!="undefined"){for(var i in fv_flowplayer_mobile_switch_array){if(!fv_flowplayer_mobile_switch_array.hasOwnProperty(i))continue;fv_flowplayer_mobile_switch(i)}}flowplayer(function(api,root){if(!api.conf.multiple_playback)return;root=jQuery(root);var instance_id=root.data("flowplayer-instance-id");flowplayer.audible_instance=-1;api.one("load",function(){setTimeout(function(){api.conf.splash=false},0)});api.on("ready",function(){var is_muted=root.data("volume")==0;if(!is_muted){jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){if(instance_id==jQuery(this).data("flowplayer-instance-id")||instance_id==flowplayer.audible_instance)return;var player=jQuery(this).data("flowplayer");if(player){if(player.playing){player.mute(true,true)}else{player.clearLiveStreamCountdown()}}});flowplayer.audible_instance=instance_id}}).on("mute",function(e,api,muted){if(!muted&&flowplayer.audible_instance!=instance_id){flowplayer(flowplayer.audible_instance).mute(true,true);flowplayer.audible_instance=instance_id}})});function fv_flowplayer_browser_ff_m4v(hash){if(flowplayer.support.browser&&flowplayer.support.browser.mozilla&&navigator.appVersion.indexOf("Win")!=-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ff_m4v_array!="undefined"){for(var i in fv_flowplayer_browser_ff_m4v_array){if(!fv_flowplayer_browser_ff_m4v_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ff_m4v(i)}}function fv_flowplayer_browser_chrome_fail(hash,sAttributes,sVideo,bAutobuffer){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&error!=null&&(error.code==3||error.code==4||error.code==5)){api.unload();jQuery("#wpfp_"+hash).attr("id","bad_wpfp_"+hash);jQuery("#bad_wpfp_"+hash).after('<div id="wpfp_'+hash+'" '+sAttributes+' data-engine="flash"></div>');jQuery("#wpfp_"+hash).flowplayer({playlist:[[{mp4:sVideo}]]});if(bAutobuffer){jQuery("#wpfp_"+hash).bind("ready",function(e,api){api.play()})}else{jQuery("#wpfp_"+hash).flowplayer().play(0)}jQuery("#bad_wpfp_"+hash).remove()}})}if(typeof fv_flowplayer_browser_chrome_fail_array!="undefined"){for(var i in fv_flowplayer_browser_chrome_fail_array){if(!fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(i))continue;fv_flowplayer_browser_chrome_fail(i,fv_flowplayer_browser_chrome_fail_array[i]["attrs"],fv_flowplayer_browser_chrome_fail_array[i]["mp4"],fv_flowplayer_browser_chrome_fail_array[i]["auto_buffer"])}}function fv_flowplayer_browser_ie(hash){if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)>=9||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ie_array!="undefined"){for(var i in fv_flowplayer_browser_ie_array){if(!fv_flowplayer_browser_ie_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ie(i)}}function fv_flowplayer_browser_chrome_mp4(hash){var match=window.navigator.appVersion.match(/Chrome\/(\d+)\./);if(match!=null){var chrome_ver=parseInt(match[1],10);if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<28&&navigator.appVersion.indexOf("Win")!=-1||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<27&&navigator.appVersion.indexOf("Linux")!=-1&&navigator.userAgent.toLowerCase().indexOf("android")==-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}}if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1||navigator.userAgent.toLowerCase().indexOf("android")!=-1){flowplayer(function(api,root){api.bind("error",function(e,api,error){if(error.code==10){jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)}})})}jQuery(document).ready(function(){if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1){jQuery(window).trigger("load")}jQuery(".flowplayer").on("mouseleave",function(){jQuery(this).find(".fvp-share-bar").removeClass("visible");jQuery(this).find(".embed-code").hide()})});if(!Date.now){Date.now=function(){return(new Date).getTime()}}(function($){var sendPositionsEvery=60,ajaxCall=null,maxCookieSize=2500,localStorageEnabled=null,cookieKeyName="video_positions",tempPositionCookieKeyName="video_positions_tmp",tempSawCookieKeyName="video_saw_tmp",playPositions=[],sawVideo=[],getSerialized=function(data){var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}return serialized},getVideoId=function(video){if(video.id){return video.id}var out=typeof video.sources_original!="undefined"&&typeof video.sources_original[0]!="undefined"?video.sources_original[0].src:video.sources[0].src;if(typeof video.sources_original=="undefined"||typeof video.sources_original[0]=="undefined"){out=removeAWSSignatures(out)}return out},getTextByteSize=function(txt){return encodeURIComponent(txt).length},getCookieKey=function(key){return localStorageEnabled?localStorage.getItem(key):Cookies.get(key)},setCookieKey=function(key,value){return localStorageEnabled?localStorage.setItem(key,value):Cookies.set(key,value)},removeCookieKey=function(key){if(localStorageEnabled){localStorage.removeItem(key)}{Cookies.remove(key)}},removeVideoPosition=function(e,api){if(api.video.sources){var video_id=getVideoId(api.video);playPositions[video_id]=0;sawVideo[video_id]=1}},removeAWSSignatures=function(videoURL){return videoURL.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,"")},sendVideoPositions=function(async,callback){var beaconSupported="sendBeacon"in navigator;if(async!==true){async=false}if(!callback||typeof callback=="undefined"){callback=function(){}}postData=[];for(var video_name in playPositions){if(!playPositions.hasOwnProperty(video_name))continue;postData.push({name:video_name,position:playPositions[video_name],saw:typeof sawVideo[video_name]!="undefined"?sawVideo[video_name]:false})}if(!postData.length){removeCookieKey(tempPositionCookieKeyName);removeCookieKey(tempSawCookieKeyName);return}if(flowplayer.conf.is_logged_in=="1"){if(beaconSupported){try{var temp_position_data={},temp_saw_data={};for(var i in postData){if(!postData.hasOwnProperty(i))continue;temp_position_data[postData[i].name]=postData[i].position;temp_saw_data[postData[i].name]=postData[i].saw}setCookieKey(tempPositionCookieKeyName,getSerialized(temp_position_data));setCookieKey(tempSawCookieKeyName,getSerialized(temp_saw_data))}catch(e){return}var fd=new FormData;fd.append("action","fv_wp_flowplayer_video_position_save");fd.append("videoTimes",encodeURIComponent(JSON.stringify(postData)));navigator.sendBeacon(fv_player.ajaxurl,fd);return false}else{return jQuery.ajax({type:"POST",async:async,url:fv_player.ajaxurl,complete:callback,data:{action:"fv_wp_flowplayer_video_position_save",videoTimes:postData}})}}else{try{var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){data=JSON.parse(data)}else{data={}}for(var i in postData){if(!postData.hasOwnProperty(i))continue;data[postData[i].name]=postData[i].position}var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}setCookieKey(cookieKeyName,serialized)}catch(e){return}}return false};flowplayer(function(api,root){var $root=jQuery(root),enabled=flowplayer.conf.video_position_save_enable&&$root.data("save-position")!="false"||$root.data("save-position"),progressEventsCount=0,seekIntoPosition=function(e,api){if(api.video&&api.video.live)return;var video_id=getVideoId(api.video),position=api.video.position;if(flowplayer.conf.is_logged_in!="1"){var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(data[video_id]){position=data[video_id]}}catch(e){return}}}if(!!api.get_custom_end&&api.get_custom_end()<position){position=false}if(!!api.get_custom_start&&api.get_custom_start()>0){if(position<api.get_custom_start()){position=false}}api.bind("progress",storeVideoPosition);if(position){seek(position)}},storeVideoPosition=function(e,api){if(api.live){return}if(api.video.sources){var video_id=getVideoId(api.video),position=Math.round(api.video.time);playPositions[video_id]=position;if(progressEventsCount++>=sendPositionsEvery&&flowplayer.conf.closingPage){if(ajaxCall){ajaxCall.abort()}ajaxCall=sendVideoPositions(true,function(){ajaxCall=null});progressEventsCount=0}}},forceSavePosition=function(e,api){var inPlaylist=false;for(var i in api.conf.playlist){if(!api.conf.playlist.hasOwnProperty(i))continue;inPlaylist=true;break}if(inPlaylist&&!flowplayer.conf.closingPage){progressEventsCount=sendPositionsEvery+1;storeVideoPosition(e,api);sendVideoPositions()}},seek=function(position){if(!!api.custom_seek){api.custom_seek(position);return}var seek_count=0;var do_seek=setInterval(function(){if(++seek_count>20)clearInterval(do_seek);if(api.loading)return;api.seek(parseInt(position));clearInterval(do_seek)},10)},processTempData=function(temp_data_name,video_id){var data=getCookieKey(temp_data_name),output=false;if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(typeof data[video_id]!="undefined"){output=data[video_id];delete data[video_id];var stillHasData=false;for(var i in data){if(!data.hasOwnProperty(i))continue;stillHasData=true;break}if(stillHasData){setCookieKey(temp_data_name,JSON.stringify(data))}else{removeCookieKey(temp_data_name)}}return output}catch(e){}}};if(!enabled)return;api.bind("finish",removeVideoPosition);api.one("progress",seekIntoPosition);api.playlist_thumbnail_progress=function(el,video,position){if(!!api.get_custom_start&&api.get_custom_start(video)>0){position-=api.get_custom_start(video);if(position<0)position=0}var duration=video.duration;if(!!api.get_custom_duration&&api.get_custom_duration()>0){duration=api.get_custom_duration()}if(!duration){duration=el.data("duration")}if(!duration)return;var progress=100*position/duration;el.css("width",progress+"%")};if(flowplayer.conf.is_logged_in=="1"){var playlist=api.conf.playlist.length>0?api.conf.playlist:[api.conf.clip],playlist_external=jQuery("[rel="+jQuery(root).attr("id")+"]");for(var i in playlist){if(!playlist.hasOwnProperty(i))continue;var video_id=getVideoId(playlist[i]),position=processTempData(tempPositionCookieKeyName,video_id),saw=processTempData(tempSawCookieKeyName,video_id);if(position){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].position=position;var playlist_progress=jQuery("a",playlist_external).eq(i).find(".fvp-progress");if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.conf.playlist[i],position)}}else{api.conf.clip.sources[0].position=position}}if(saw){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}}}}api.bind("finish",function(e,api){if(api.conf.playlist.length){api.conf.playlist[api.video.index].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}})});jQuery(window).on("beforeunload pagehide",function(){if(!flowplayer.conf.closingPage){flowplayer.conf.closingPage=true;sendVideoPositions()}});if(localStorageEnabled!==null){return localStorageEnabled}localStorageEnabled=true;try{localStorage.setItem("t","t");if(localStorage.getItem("t")!=="t"){localStorageEnabled=false}localStorage.removeItem("t")}catch(e){localStorageEnabled=false}})(jQuery);flowplayer(function(api,root){root=jQuery(root);if(api.conf.playlist.length==0)return;var real_videos=0;jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){real_videos++}});if(real_videos<2)return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");var playlist_button=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),playlist_menu=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(root.find(".fp-controls"));var i=0,item_index=[];jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){playlist_menu.append('<a data-index="'+k+'">'+(i+1)+". "+parse_title(playlist.find("h4").eq(i))+"</a>");item_index.push(k);i++}});playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).on("click",function(){if(typeof api.conf.playlist[jQuery(this).data("index")-1]!="undefined"&&typeof api.conf.playlist[jQuery(this).data("index")-1].click!="undefined"){api.play(jQuery(this).data("index")-1)}else{api.play(jQuery(this).data("index"))}});api.on("ready",function(e,api,video){playlist_menu.find("a").removeClass("fp-selected");var thumb=playlist_menu.find("a[data-index="+video.index+"]");thumb.addClass("fp-selected");var label=fv_flowplayer_translations.playlist_item_no;label=label.replace(/%d/,item_index.indexOf(api.video.index)+1);label=label.replace(/%s/,parse_title(thumb.find("h4")));playlist_button.html(label)});function parse_title(el){var tmp=el.clone();tmp.find("i.dur").remove();return tmp.text()}});flowplayer(function(api,root){root=jQuery(root);var playlist=api.conf.playlist;var videoIndex;api.bind("ready",function(e,api,video){videoIndex=video.index});api.bind("error",function(e,api,error){setTimeout(function(){if(playlist.length>0&&api.error==true){videoIndex=api.video.index;if(api.conf.video_checker=="1"&&playlist[videoIndex].video_checker&&playlist[videoIndex].video_checker.length>0){console.log("FV Player: Video checker message present, stopping auto-advance to next playlist item");return false}api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove();videoIndex++;if(videoIndex>playlist.length-1){videoIndex=0}console.log("FV Player: Playlist item failure, auto-advancing to "+(videoIndex+1)+". item");api.play(videoIndex)}},1e3)})});flowplayer(function(api,root){root=jQuery(root);var original_prev,original_next,random_seed;if(!root.data("button-no-picture")&&!root.data("button-repeat")&&!root.data("button-rewind"))return;api.bind("ready",function(e,api){if(typeof original_next=="undefined"&&typeof original_prev=="undefined"){original_next=api.next;original_prev=api.prev}if(!api.video.type.match(/^audio/)&&root.data("button-no-picture")&&root.find(".fv-fp-no-picture").length==0){var button_no_picture=jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>');button_no_picture.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();jQuery(".fp-engine",root).slideToggle(20);jQuery(this).toggleClass("is-active fp-color-fill")})}if(root.data("button-repeat")){if(api.conf.playlist.length>0&&root.find(".fv-fp-playlist").length==0){var t=fv_flowplayer_translations,playlist_button=jQuery('<strong class="fv-fp-playlist mode-normal"> <svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span> </strong>"),playlist_menu=jQuery('<div class="fp-menu fv-fp-playlist-menu"> <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_all+'</span></a> <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+t.playlist_shuffle+'</span></a> <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_video+'</span></a> <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span></a> </div>").insertAfter(root.find(".fp-controls"));api.conf.playlist_shuffle=api.conf.track_repeat=false;random_seed=randomize();var should_advance=api.conf.advance;playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.css("right")!=="auto"){playlist_menu.css({right:"auto",left:playlist_button.position().left+"px"})}if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).on("click",function(){jQuery(this).siblings("a").removeClass("fp-selected");jQuery(this).addClass("fp-selected");playlist_button.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var action=jQuery(this).data("action");if(action=="repeat_playlist"){playlist_button.addClass("mode-repeat-playlist");api.conf.loop=true;api.conf.advance=true;api.video.loop=api.conf.track_repeat=false;api.conf.playlist_shuffle=false}else if(action=="shuffle_playlist"){playlist_button.addClass("mode-shuffle-playlist");api.conf.loop=true;api.conf.advance=true;api.conf.playlist_shuffle=true}else if(action=="repeat_track"){playlist_button.addClass("mode-repeat-track");api.conf.track_repeat=api.video.loop=true;api.conf.loop=api.conf.playlist_shuffle=false}else if(action=="normal"){playlist_button.addClass("mode-normal");api.conf.track_repeat=api.video.loop=false;api.conf.loop=api.conf.playlist_shuffle=false}if(api.conf.playlist_shuffle){api.next=function(){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()};api.prev=function(){api.play(random_seed.shift());if(random_seed.length==0)random_seed=randomize()}}else{api.next=original_next;api.prev=original_prev}});if(api.conf.loop){jQuery("a[data-action=repeat_playlist]",playlist_menu).click()}api.on("progress",function(){api.video.loop=api.conf.track_repeat});api.on("finish.pl",function(e,api){console.log("playlist_repeat",api.conf.loop,"advance",api.conf.advance,"video.loop",api.video.loop);if(api.conf.playlist_shuffle){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()}})}else if(root.find(".fv-fp-track-repeat").length==0&&api.conf.playlist.length==0){var button_track_repeat=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>');button_track_repeat.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();jQuery(this).toggleClass("is-active fp-color-fill",api.video.loop);if(api.video.loop){api.video.loop=false}else{api.video.loop=true}});if(api.conf.loop){button_track_repeat.addClass("is-active fp-color-fill")}}}if(root.data("button-rewind")&&root.find(".fv-fp-rewind").length==0){var button_rewind=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');button_rewind.insertBefore(root.find(".fp-controls .fp-elapsed")).on("click",function(e){e.preventDefault();e.stopPropagation();api.seek(api.video.time-10)});button_rewind.toggle(!api.video.live)}}).bind("unload",function(){root.find(".fv-fp-no-picture").remove();root.find(".fv-fp-playlist").remove();root.find(".fv-fp-track-repeat").remove()});function array_shuffle(a){var j,x,i;for(i=a.length;i;i--){j=Math.floor(Math.random()*i);x=a[i-1];a[i-1]=a[j];a[j]=x}return a}function randomize(random_seed){random_seed=[];jQuery(api.conf.playlist).each(function(k,v){random_seed.push(k)});random_seed=array_shuffle(random_seed);console.log("FV Player Randomizer random seed:",random_seed);return random_seed}});flowplayer(function(api,root){var $root=jQuery(root),start_index=$root.data("playlist_start");if(typeof start_index=="undefined")return;function start_position_changer(){if($root.data("position_changed")!==1&&api.conf.playlist.length){start_index--;api.play(start_index);$root.data("position_changed",1)}}api.bind("unload",function(){start_index=$root.data("playlist_start");$root.removeData("position_changed");api.one("ready",start_position_changer);api.video.index=0});api.one("ready",start_position_changer);jQuery(".fp-ui",root).on("click",function(){start_position_changer();$root.data("position_changed",1)})});flowplayer(function(api,root){api.bind("finish",function(){var finished_at=api.video.time;if(api.video.loop){api.one("pause",function(){if(finished_at<=api.video.time){api.resume()}})}})});function fv_flowplayer_amazon_s3(hash,time){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){var fv_fp_date=new Date;if(error.code==4&&fv_fp_date.getTime()>fv_fp_utime+parseInt(time)){jQuery(e.target).find(".fp-message").delay(500).queue(function(n){jQuery(this).html(fv_flowplayer_translations.video_expired);n()})}})}flowplayer(function(api,root){root=jQuery(root);root.find(".fp-logo").removeAttr("href");if(root.hasClass("no-controlbar")){var timelineApi=api.sliders.timeline;timelineApi.disable(true);api.bind("ready",function(){timelineApi.disable(true)})}jQuery(".fvfp_admin_error",root).remove();root.find(".fp-logo, .fp-header").on("click",function(e){if(e.target!==this)return;root.find(".fp-ui").click()});jQuery(".fvp-share-bar .sharing-facebook",root).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",root).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",root).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",root).prepend(jQuery(".fvp-share-bar",root));if(api.conf.playlist.length){var show=true;var playlist=api.conf.playlist;if(playlist.length==2){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"){show=false}if(typeof playlist[0].click=="undefined"&&typeof playlist[1].click!="undefined"){show=false}}else if(playlist.length==3){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"&&typeof playlist[2].click!="undefined"){show=false}}if(show){var prev=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>');var next=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>');root.find(".fp-controls .fp-playbtn").before(prev).after(next);prev.on("click",function(){api.trigger("prev",[api]);api.prev()});next.on("click",function(){api.trigger("next",[api]);api.next()})}}api.bind("pause resume finish unload ready",function(e,api){root.addClass("no-brand")});api.one("ready",function(){root.find(".fp-fullscreen").clone().appendTo(root.find(".fp-controls"))});api.bind("ready",function(e,api,video){setTimeout(function(){jQuery(".fvp-share-bar",root).show();jQuery(".fv-player-buttons-wrap",root).appendTo(jQuery(".fv-player-buttons-wrap",root).parent().find(".fp-ui"))},100)});api.bind("finish",function(){var url=root.data("fv_redirect");if(url&&(typeof api.video.is_last=="undefined"||api.video.is_last)){location.href=url}});if(flowplayer.support.iOS&&flowplayer.support.iOS.version==11){api.bind("error",function(e,api,error){if(error.code==4)root.find(".fp-engine").hide()})}jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()});api.one("ready",function(e,api,video){root.find(".fp-chromecast").insertAfter(root.find(".fp-header .fp-fullscreen"))});root.find(".fp-waiting").html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');if(!flowplayer.support.fullscreen){var id=root.attr("id"),alternative=!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen;api.bind("fullscreen",function(e,api){jQuery("#wpadminbar, .nc_wrapper").hide();if(alternative){if(api.video.type=="video/youtube")return;root.before('<span data-fv-placeholder="'+id+'"></span>');root.appendTo("body")}});api.bind("fullscreen-exit",function(e,api,video){jQuery("#wpadminbar, .nc_wrapper").show();if(alternative)jQuery("span[data-fv-placeholder="+id+"]").replaceWith(root)})}});(function(){var extension=function(flowplayer){flowplayer(function(api,root){if(!jQuery(root).data("speedb"))return;var support=flowplayer.support;if(!support.video||!support.inlineVideo)return;var common=flowplayer.common,bean=flowplayer.bean,ui=common.find(".fp-ui",root)[0],controlbar=common.find(".fp-controls",ui)[0],speeds=api.conf.speeds;bean.on(root,"click",".fp-speed",function(){var menu=common.find(".fp-speed-menu",root)[0];if(common.hasClass(menu,"fp-active"))api.hideMenu();else api.showMenu(menu)});bean.on(root,"click",".fp-speed-menu a",function(ev){var s=ev.target.getAttribute("data-speed");api.speed(s)});api.on("speed",function(ev,_a,rate){if(speeds.length>1){selectSpeed(rate)}}).on("ready",function(ev,api){removeMenu();if(flowplayer.support.android&&api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl")return;speeds=api.conf.speeds;if(speeds.length>1){createMenu()}});function removeMenu(){common.find(".fp-speed-menu",root).forEach(common.removeNode);common.find(".fp-speed",root).forEach(common.removeNode)}function round(val){return Math.round(val*100)/100}function createMenu(){controlbar.appendChild(common.createElement("strong",{className:"fp-speed"},api.currentSpeed+"x"));var menu=common.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>");speeds.forEach(function(s){var a=common.createElement("a",{"data-speed":round(s)},round(s)+"x");menu.appendChild(a)});ui.appendChild(menu);selectSpeed(api.currentSpeed);jQuery(root).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed)}function selectSpeed(rate){common.find(".fp-speed",root)[0].innerHTML=rate+"x";common.find(".fp-speed-menu a",root).forEach(function(el){common.toggleClass(el,"fp-selected",el.getAttribute("data-speed")==rate);common.toggleClass(el,"fp-color",el.getAttribute("data-speed")==rate)})}})};if(typeof module==="object"&&module.exports)module.exports=extension;else if(typeof window.flowplayer==="function")extension(window.flowplayer)})();flowplayer(function(api,root){api.on("speed",function(ev,_a,rate){try{window.localStorage.fv_player_speed=rate}catch(e){}});api.on("ready",function(){if(window.localStorage.fv_player_speed&&jQuery(root).find("strong.fp-speed").is(":visible")){api.speed(parseFloat(window.localStorage.fv_player_speed))}if(jQuery(root).data("volume")==0){api.mute(true,true)}})});flowplayer(function(api,root){root=jQuery(root);if(!api.conf.fv_stats||!api.conf.fv_stats.enabled&&(!root.data("fv_stats")||root.data("fv_stats")=="no"))return;api.on("ready",function(e,api){api.one("progress",function(e,api){if(api.video.id){jQuery.post(api.conf.fv_stats.url,{blog_id:api.conf.fv_stats.blog_id,tag:"play",video_id:api.video.id})}})})});flowplayer(function(api,root){var $root=jQuery(root);var $playerDiv=$root.find(".fp-player");var sticky=$root.data("fvsticky");var globalSticky=false;var videoRatio=$root.data("ratio"),is_sticky=false;if(typeof videoRatio=="undefined"){videoRatio=.5625}if(flowplayer.conf.sticky_video==1&&typeof sticky=="undefined"){globalSticky=true}if(globalSticky||sticky){if(flowplayer.support.firstframe){var stickyPlace=flowplayer.conf.sticky_place;var stickyWidth=flowplayer.conf.sticky_width;if(stickyWidth==""){stickyWidth=380}var stickyHeight=stickyWidth*videoRatio;fv_player_sticky_video()}else{return}}function fv_player_sticky_video(){var change=false;var $window=jQuery(window),$flowplayerDiv=$root,top=$flowplayerDiv.offset().top,offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);api.on("ready",function(){change=true});api.on("progress",function(){change=true});api.on("unload",function(){change=false;fv_player_sticky_class_remove();$root.removeClass("is-unSticky")});$window.on("resize",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2)}).on("scroll",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);if($window.scrollTop()>offset&&change){if(jQuery("div.flowplayer.is-unSticky").length>0){console.log("unSticky",jQuery("div.flowplayer.is-unSticky").length);return false}else{fv_player_sticky_class_add()}}else{fv_player_sticky_class_remove();change=false}})}function fv_player_sticky_class_add(){if($playerDiv.hasClass("is-sticky-"+stickyPlace)){return}else{$playerDiv.addClass("is-sticky-"+stickyPlace);if($root.find("a.fp-sticky").length==0){$root.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>')}$playerDiv.css("width",stickyWidth);$playerDiv.css("height",stickyHeight);$playerDiv.css("max-height",stickyHeight);is_sticky=true;api.trigger("sticky",[api])}$playerDiv.parent(".flowplayer").addClass("is-stickable")}function fv_player_sticky_class_remove(){$playerDiv.removeClass("is-sticky-"+stickyPlace);$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");$playerDiv.parent(".flowplayer").removeClass("is-stickable");if(is_sticky){is_sticky=false;api.trigger("sticky-exit",[api])}}});jQuery(function($){$(document).on("click","a.fp-sticky",function(){$("div.flowplayer.is-stickable").addClass("is-unSticky");var $playerDiv=$("div.flowplayer.is-stickable").find(".fp-player");$playerDiv.removeClass("is-sticky-right-bottom");$playerDiv.removeClass("is-sticky-left-bottom");$playerDiv.removeClass("is-sticky-right-top");$playerDiv.removeClass("is-sticky-left-top");$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");if(is_sticky){is_sticky=false;api.trigger("sticky-exit",[api])}});$(document).on("click","div.flowplayer.is-unSticky",function(){$("div.flowplayer").removeClass("is-unSticky")})});flowplayer(function(api,root){root=jQuery(root);api.on("ready",function(e,api,video){if(window.localStorage.fv_player_subtitle&&root.find("strong.fp-cc").is(":visible")){if(api.video.subtitles.length){api.video.subtitles.forEach(function(item,index){if(item.srclang===window.localStorage.fv_player_subtitle){api.loadSubtitles(index)}})}}root.find(".fp-subtitle-menu").on("click",function(e){if(typeof e.target.getAttribute("data-subtitle-index")=="string"&&e.target.getAttribute("data-subtitle-index").length){try{window.localStorage.fv_player_subtitle=api.video.subtitles[e.target.getAttribute("data-subtitle-index")].srclang}catch(e){}}})})});flowplayer(function(api,root){root=jQuery(root);var currentPoint,check=false;api.bind("cuepoint",function(e,api,cue){check=false;if(cue.subtitle){currentPoint=cue.index}});api.on("ready",function(e,api){root.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions);root.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)});root.on("click",".fp-subtitle-menu a[data-subtitle-index]",function(e){if(jQuery(this).data("subtitle-index")>-1){check=true;api.on("progress",time_check)}});function time_check(e,api,time){if(check){(api.cuepoints||[]).forEach(function(cue,index){var entry=cue.subtitle;if(entry&&currentPoint!=index){if(time>=cue.time&&(!entry.endTime||time<=entry.endTime)){api.trigger("cuepoint",[api,cue])}}})}}});if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links){flowplayer(function(api,root){if(jQuery(root).find(".sharing-link").length>0){var abEnd,abStart,hash,sTime,abloop;function update_link(abStartNew,abEndNew){hash=fv_player_get_video_link_hash(api);sTime=","+fv_player_time_hms(api.video.time);if(abStartNew&&abEndNew){abStart=","+fv_player_time_hms_ms(abStartNew+api.get_custom_start());abEnd=","+fv_player_time_hms_ms(abEndNew+api.get_custom_start())}else{abEnd=abloop&&typeof api.get_ab_end()!="undefined"&&api.get_ab_end()?","+fv_player_time_hms_ms(api.get_ab_end()):"";abStart=abloop&&typeof api.get_ab_start()!="undefined"&&api.get_ab_start()?","+fv_player_time_hms_ms(api.get_ab_start()):""}jQuery(".sharing-link",root).attr("href",jQuery(".sharing-link",root).attr("href").replace(/#.*/,"")+"#"+hash+sTime+abStart+abEnd)}api.on("ready",function(e,api,video){if(!api.fv_noUiSlider)return;api.fv_noUiSlider.on("set",function(values){update_link(values[0],values[1])})});api.on("progress",function(e,api){if(!api.video.sources||!api.video.sources[0]){return}update_link()});api.on("abloop",function(e,api,active){abloop=active;if(!api.playing){update_link()}});jQuery(".sharing-link",root).on("click",function(e){fv_player_clipboard(jQuery(this).attr("href"),function(){e.preventDefault();fv_player_notice(root,fv_flowplayer_translations.link_copied,2e3)})})}});jQuery(document).on("click",'a[href*="fvp_"]',function(){var link=jQuery(this);setTimeout(function(){if(link.parents(".fvp-share-bar").length==0)fv_autoplay_exec()})})}flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;var restore=-1;root.on("click",".fp-volumebtn",function(e){if(api.volumeLevel==0&&restore!=-1){api.volume(restore);return false}});root.on("mousedown touchstart mouseup touchend",".fp-volumebar",function(e){if(api.volumeLevel!=0){restore=api.volumeLevel}});root.on("mousedown touchstart",".fp-volumebtn",function(e){if(api.volumeLevel>0){restore=-1}});api.on("volume",function(e,api){if(root.hasClass("is-mouseover")&&!api.muted){if(api.volumeLevel==0){bean.off(flowplayer.support.touch?root:document,"mousemove.sld touchmove.sld");api.mute(true)}}})});if(typeof flowplayer!="undefined"){flowplayer(function(api,root){root=jQuery(root);if(navigator.userAgent.match(/iPhone.* OS [0-6]_/i)){api.one("progress",function(e){if(typeof api.video.subtitles!=="undefined"&&api.video.subtitles.length){fv_player_warning(root,fv_flowplayer_translations.warning_iphone_subs)}})}if(flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}if(/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)){api.on("ready",function(e,api,video){setTimeout(function(){if(video.src&&video.src.match(/fpdl.vimeocdn.com/)&&(video.time==0||video.time==1)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox");api.on("progress",function(e,api){root.prev().find(".fv-player-warning-firefox").remove()})}},1500)});api.on("error",function(e,api,error){if(error.MEDIA_ERR_NETWORK==2&&error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}})}if(/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)){api.on("error",function(e,api,error){if(error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_old_safari)}})}var sup=flowplayer.support;if(sup.android&&(sup.android.samsung&&parseInt(sup.browser.version)<66||sup.browser.safari)){api.on("error",function(e,api,error){fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})}});function fv_player_warning(root,warning,classname){var wrapper=jQuery(root).prev(".fv-player-warning-wrapper");if(wrapper.length==0){jQuery(root).before('<div class="fv-player-warning-wrapper">');wrapper=jQuery(root).prev(".fv-player-warning-wrapper")}if(wrapper.find(".fv-player-warning-"+classname).length==0){var latest=jQuery("<p style='display: none' "+(classname?" class='fv-player-warning-"+classname+"'":"")+">"+warning+"</p>");wrapper.append(latest);latest.slideDown()}}}
flowplayer/hls.min.js CHANGED
@@ -1 +1 @@
1
- "undefined"!=typeof window&&function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Hls=t():e.Hls=t()}(this,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(i,a,function(t){return e[t]}.bind(null,a));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s=13)}([function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c}));var i=r(5);function a(){}var n={trace:a,debug:a,log:a,warn:a,info:a,error:a},s=n;function o(e,t){return t="["+e+"] > "+t}var l=Object(i.a)();function d(e){var t=l.console[e];return t?function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=o(e,i[0])),t.apply(l.console,i)}:a}var u=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){s[t]=e[t]?e[t].bind(e):d(t)}))}(e,"debug","log","info","warn","error");try{s.log()}catch(e){s=n}}else s=n},c=s},function(e,t,r){"use strict";t.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVELS_UPDATED:"hlsLevelsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",CUES_PARSED:"hlsCuesParsed",NON_NATIVE_TEXT_TRACKS_FOUND:"hlsNonNativeTextTracksFound",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},function(e,t,r){"use strict";var i,a;r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return a})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(i||(i={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException"}(a||(a={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var i=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)};Number.MAX_SAFE_INTEGER},function(e,t,r){"use strict";r.d(t,"b",(function(){return o}));var i,a=r(5),n=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,r){for(var i=r,a=0;e.isHeader(t,r);){a+=10,a+=e._readSize(t,r+6),e.isFooter(t,r+10)&&(a+=10),r+=a}if(a>0)return t.subarray(i,i+a)},e._readSize=function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3]},e.getTimeStamp=function(t){for(var r=e.getID3Frames(t),i=0;i<r.length;i++){var a=r[i];if(e.isTimeStampFrame(a))return e._readTimeStamp(a)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var r=String.fromCharCode(t[0],t[1],t[2],t[3]),i=e._readSize(t,4);return{type:r,size:i,data:t.subarray(10,10+i)}},e.getID3Frames=function(t){for(var r=0,i=[];e.isHeader(t,r);){for(var a=e._readSize(t,r+6),n=(r+=10)+a;r+8<n;){var s=e._getFrameData(t.subarray(r)),o=e._decodeFrame(s);o&&i.push(o),r+=s.size+10}e.isFooter(t,r)&&(r+=10)}return i},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):e._decodeTextFrame(t)},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var r=e._utf8ArrayToStr(t.data,!0),i=new Uint8Array(t.data.subarray(r.length+1));return{key:t.type,info:r,data:i.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var r=1,i=e._utf8ArrayToStr(t.data.subarray(r),!0);r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:n}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var r=1,i=e._utf8ArrayToStr(t.data.subarray(r),!0);r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data);return{key:t.type,data:n}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var r=s();if(r){var i=r.decode(e);if(t){var a=i.indexOf("\0");return-1!==a?i.substring(0,a):i}return i.replace(/\0/g,"")}for(var n,o,l,d=e.length,u="",c=0;c<d;){if(0===(n=e[c++])&&t)return u;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(n);break;case 12:case 13:o=e[c++],u+=String.fromCharCode((31&n)<<6|63&o);break;case 14:o=e[c++],l=e[c++],u+=String.fromCharCode((15&n)<<12|(63&o)<<6|(63&l)<<0)}}return u},e}();function s(){var e=Object(a.a)();return i||void 0===e.TextDecoder||(i=new e.TextDecoder("utf-8")),i}var o=n._utf8ArrayToStr;t.a=n},function(e,t,r){"use strict";function i(){return"undefined"==typeof window?self:window}r.d(t,"a",(function(){return i}))},function(e,t,r){var i,a,n,s,o;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,a=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var n=o.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=a.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var d={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var u=s.path,c=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=o.normalizePath(c)}else d.path=s.path,n.params||(d.params=s.params,n.query||(d.query=s.query));return null===d.path&&(d.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o},function(e,t,r){"use strict";var i=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),a=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}();var n=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),r=new Uint32Array(4),i=0;i<4;i++)r[i]=t.getUint32(4*i);return r},t.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],s=r[3],o=this.invSubMix,l=o[0],d=o[1],u=o[2],c=o[3],h=new Uint32Array(256),f=0,g=0,p=0;for(p=0;p<256;p++)h[p]=p<128?p<<1:p<<1^283;for(p=0;p<256;p++){var v=g^g<<1^g<<2^g<<3^g<<4;v=v>>>8^255&v^99,e[f]=v,t[v]=f;var m=h[f],y=h[m],b=h[y],T=257*h[v]^16843008*v;i[f]=T<<24|T>>>8,a[f]=T<<16|T>>>16,n[f]=T<<8|T>>>24,s[f]=T,T=16843009*b^65537*y^257*m^16843008*f,l[v]=T<<24|T>>>8,d[v]=T<<16|T>>>16,u[v]=T<<8|T>>>24,c[v]=T,f?(f=m^h[h[h[b^m]]],g^=h[h[g]]):f=g=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,i=0;i<t.length&&r;)r=t[i]===this.key[i],i++;if(!r){this.key=t;var a=this.keySize=t.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n,s,o,l,d=this.ksRows=4*(a+6+1),u=this.keySchedule=new Uint32Array(d),c=this.invKeySchedule=new Uint32Array(d),h=this.sBox,f=this.rcon,g=this.invSubMix,p=g[0],v=g[1],m=g[2],y=g[3];for(n=0;n<d;n++)n<a?o=u[n]=t[n]:(l=o,n%a==0?(l=h[(l=l<<8|l>>>24)>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[255&l],l^=f[n/a|0]<<24):a>6&&n%a==4&&(l=h[l>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[255&l]),u[n]=o=(u[n-a]^l)>>>0);for(s=0;s<d;s++)n=d-s,l=3&s?u[n]:u[n-4],c[s]=s<4||n<=4?l:p[h[l>>>24]]^v[h[l>>>16&255]]^m[h[l>>>8&255]]^y[h[255&l]],c[s]=c[s]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,r,i){for(var a,n,s,o,l,d,u,c,h,f,g,p,v,m,y,b,T,E=this.keySize+6,S=this.invKeySchedule,_=this.invSBox,R=this.invSubMix,A=R[0],k=R[1],w=R[2],L=R[3],D=this.uint8ArrayToUint32Array_(r),O=D[0],C=D[1],I=D[2],P=D[3],x=new Int32Array(e),M=new Int32Array(x.length),F=this.networkToHostOrderSwap;t<x.length;){for(h=F(x[t]),f=F(x[t+1]),g=F(x[t+2]),p=F(x[t+3]),l=h^S[0],d=p^S[1],u=g^S[2],c=f^S[3],v=4,m=1;m<E;m++)a=A[l>>>24]^k[d>>16&255]^w[u>>8&255]^L[255&c]^S[v],n=A[d>>>24]^k[u>>16&255]^w[c>>8&255]^L[255&l]^S[v+1],s=A[u>>>24]^k[c>>16&255]^w[l>>8&255]^L[255&d]^S[v+2],o=A[c>>>24]^k[l>>16&255]^w[d>>8&255]^L[255&u]^S[v+3],l=a,d=n,u=s,c=o,v+=4;a=_[l>>>24]<<24^_[d>>16&255]<<16^_[u>>8&255]<<8^_[255&c]^S[v],n=_[d>>>24]<<24^_[u>>16&255]<<16^_[c>>8&255]<<8^_[255&l]^S[v+1],s=_[u>>>24]<<24^_[c>>16&255]<<16^_[l>>8&255]<<8^_[255&d]^S[v+2],o=_[c>>>24]<<24^_[l>>16&255]<<16^_[d>>8&255]<<8^_[255&u]^S[v+3],v+=3,M[t]=F(a^O),M[t+1]=F(o^C),M[t+2]=F(s^I),M[t+3]=F(n^P),O=h,C=f,I=g,P=p,t+=4}return i?(y=M.buffer,b=y.byteLength,(T=b&&new DataView(y).getUint8(b-1))?y.slice(0,b-T):y):M.buffer},t.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),s=r(2),o=r(0),l=r(1),d=r(5),u=Object(d.a)(),c=function(){function e(e,t,r){var i=(void 0===r?{}:r).removePKCS7Padding,a=void 0===i||i;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=a,a)try{var n=u.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}var t=e.prototype;return t.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.decrypt=function(e,t,r,s){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(o.b.log("JS AES decrypt"),this.logEnabled=!1);var d=this.decryptor;d||(this.decryptor=d=new n),d.expandKey(t),s(d.decrypt(e,0,r,this.removePKCS7Padding))}else{this.logEnabled&&(o.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var u=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new a(u,t)),this.fastAesKey.expandKey().then((function(a){new i(u,r).decrypt(e,a).catch((function(i){l.onWebCryptoError(i,e,t,r,s)})).then((function(e){s(e)}))})).catch((function(i){l.onWebCryptoError(i,e,t,r,s)}))}},t.onWebCryptoError=function(e,t,r,i,a){this.config.enableSoftwareAES?(o.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,r,i,a)):(o.b.error("decrypting error : "+e.message),this.observer.trigger(l.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},t.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.a=c},function(e,t,r){"use strict";var i=Object.prototype.hasOwnProperty,a="~";function n(){}function s(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,r,i,n){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new s(r,i||e,n),l=a?a+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function d(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),d.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)i.call(e,t)&&r.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},d.prototype.listeners=function(e){var t=a?a+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,s=new Array(n);i<n;i++)s[i]=r[i].fn;return s},d.prototype.listenerCount=function(e){var t=a?a+e:e,r=this._events[t];return r?r.fn?1:r.length:0},d.prototype.emit=function(e,t,r,i,n,s){var o=a?a+e:e;if(!this._events[o])return!1;var l,d,u=this._events[o],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,n),!0;case 6:return u.fn.call(u.context,t,r,i,n,s),!0}for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];u.fn.apply(u.context,l)}else{var h,f=u.length;for(d=0;d<f;d++)switch(u[d].once&&this.removeListener(e,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,t);break;case 3:u[d].fn.call(u[d].context,t,r);break;case 4:u[d].fn.call(u[d].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(c-1);h<c;h++)l[h-1]=arguments[h];u[d].fn.apply(u[d].context,l)}}return!0},d.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},d.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},d.prototype.removeListener=function(e,t,r,i){var n=a?a+e:e;if(!this._events[n])return this;if(!t)return l(this,n),this;var s=this._events[n];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||l(this,n);else{for(var o=0,d=[],u=s.length;o<u;o++)(s[o].fn!==t||i&&!s[o].once||r&&s[o].context!==r)&&d.push(s[o]);d.length?this._events[n]=1===d.length?d[0]:d:l(this,n)}return this},d.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&l(this,t)):(this._events=new n,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=a,d.EventEmitter=d,e.exports=d},function(e,t,r){"use strict";var i=r(1),a=r(2),n=r(7),s=r(3),o=r(0),l=r(5);function d(e,t){return 255===e[t]&&240==(246&e[t+1])}function u(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function h(e,t){return!!(t+1<e.length&&d(e,t))}function f(e,t){if(h(e,t)){var r=u(e,t);if(t+r>=e.length)return!1;var i=c(e,t);if(i<=r)return!1;var a=t+i;if(a===e.length||a+1<e.length&&d(e,a))return!0}return!1}function g(e,t,r,n,s){if(!e.samplerate){var l=function(e,t,r,n){var s,l,d,u,c,h=navigator.userAgent.toLowerCase(),f=n,g=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(s=1+((192&t[r+2])>>>6),!((l=(60&t[r+2])>>>2)>g.length-1))return u=(1&t[r+2])<<2,u|=(192&t[r+3])>>>6,o.b.log("manifest codec:"+n+",ADTS data:type:"+s+",sampleingIndex:"+l+"["+g[l]+"Hz],channelConfig:"+u),/firefox/i.test(h)?l>=6?(s=5,c=new Array(4),d=l-3):(s=2,c=new Array(2),d=l):-1!==h.indexOf("android")?(s=2,c=new Array(2),d=l):(s=5,c=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&l>=6?d=l-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(l>=6&&1===u||/vivaldi/i.test(h))||!n&&1===u)&&(s=2,c=new Array(2)),d=l)),c[0]=s<<3,c[0]|=(14&l)>>1,c[1]|=(1&l)<<7,c[1]|=u<<3,5===s&&(c[1]|=(14&d)>>1,c[2]=(1&d)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:g[l],channelCount:u,codec:"mp4a.40."+s,manifestCodec:f};e.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(t,r,n,s);e.config=l.config,e.samplerate=l.samplerate,e.channelCount=l.channelCount,e.codec=l.codec,e.manifestCodec=l.manifestCodec,o.b.log("parsed codec:"+e.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function p(e){return 9216e4/e}function v(e,t,r,i,a){var n=function(e,t,r,i,a){var n,s,o=e.length;if(n=u(e,t),s=c(e,t),(s-=n)>0&&t+n+s<=o)return{headerLength:n,frameLength:s,stamp:r+i*a}}(t,r,i,a,p(e.samplerate));if(n){var s=n.stamp,o=n.headerLength,l=n.frameLength,d={unit:t.subarray(r+o,r+o+l),pts:s,dts:s};return e.samples.push(d),{sample:d,length:l+o}}}var m=r(4),y=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(m.a.getID3Data(e,0)||[]).length,r=e.length;t<r;t++)if(f(e,t))return o.b.log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,r,i){for(var a=this._audioTrack,n=m.a.getID3Data(e,0)||[],l=m.a.getTimeStamp(n),d=Object(s.a)(l)?90*l:9e4*t,u=0,c=d,f=e.length,p=n.length,y=[{pts:c,dts:c,data:n}];p<f-1;)if(h(e,p)&&p+5<f){g(a,this.observer,e,p,a.manifestCodec);var b=v(a,e,p,d,u);if(!b){o.b.log("Unable to parse AAC frame");break}p+=b.length,c=b.sample.pts,u++}else m.a.isHeader(e,p)?(n=m.a.getID3Data(e,p),y.push({pts:c,dts:c,data:n}),p+=n.length):p++;this.remuxer.remux(a,{samples:[]},{samples:y,inputTimeScale:9e4},{samples:[]},t,r,i)},t.destroy=function(){},e}(),b=r(10),T={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,r,i,a){if(!(r+24>t.length)){var n=this.parseHeader(t,r);if(n&&r+n.frameLength<=t.length){var s=i+a*(9e4*n.samplesPerFrame/n.sampleRate),o={unit:t.subarray(r,r+n.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=n.channelCount,e.samplerate=n.sampleRate,e.samples.push(o),{sample:o,length:n.frameLength}}}},parseHeader:function(e,t){var r=e[t+1]>>3&3,i=e[t+1]>>1&3,a=e[t+2]>>4&15,n=e[t+2]>>2&3,s=e[t+2]>>1&1;if(1!==r&&0!==a&&15!==a&&3!==n){var o=3===r?3-i:3===i?3:4,l=1e3*T.BitratesMap[14*o+a-1],d=3===r?0:2===r?1:2,u=T.SamplingRateMap[3*d+n],c=e[t+3]>>6==3?1:2,h=T.SamplesCoefficients[r][i],f=T.BytesInSlot[i],g=8*h*f;return{sampleRate:u,channelCount:c,frameLength:parseInt(h*l/u+s,10)*f,samplesPerFrame:g}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var r=this.parseHeader(e,t),i=4;r&&r.frameLength&&(i=r.frameLength);var a=t+i;if(a===e.length||a+1<e.length&&this.isHeaderPattern(e,a))return!0}return!1}},E=T,S=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,r=e.byteLength-t,i=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");i.set(e.subarray(r,r+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&o.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?r<<t|this.readBits(t):r},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){var t,r=8,i=8;for(t=0;t<e;t++)0!==i&&(i=(r+this.readEG()+256)%256),r=0===i?r:i},t.readSPS=function(){var e,t,r,i,a,n,s,o=0,l=0,d=0,u=0,c=this.readUByte.bind(this),h=this.readBits.bind(this),f=this.readUEG.bind(this),g=this.readBoolean.bind(this),p=this.skipBits.bind(this),v=this.skipEG.bind(this),m=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(c(),e=c(),h(5),p(3),c(),m(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var b=f();if(3===b&&p(1),m(),m(),p(1),g())for(n=3!==b?8:12,s=0;s<n;s++)g()&&y(s<6?16:64)}m();var T=f();if(0===T)f();else if(1===T)for(p(1),v(),v(),t=f(),s=0;s<t;s++)v();m(),p(1),r=f(),i=f(),0===(a=h(1))&&p(1),p(1),g()&&(o=f(),l=f(),d=f(),u=f());var E=[1,1];if(g()&&g())switch(c()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[c()<<8|c(),c()<<8|c()]}return{width:Math.ceil(16*(r+1)-2*o-2*l),height:(2-a)*(i+1)*16-(a?2:4)*(d+u),pixelRatio:E}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),_=function(){function e(e,t,r,i){this.decryptdata=r,this.discardEPB=i,this.decrypter=new n.a(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},t.decryptAacSample=function(e,t,r,i){var a=e[t].unit,n=a.subarray(16,a.length-a.length%16),s=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),o=this;this.decryptBuffer(s,(function(n){n=new Uint8Array(n),a.set(n,16),i||o.decryptAacSamples(e,t+1,r)}))},t.decryptAacSamples=function(e,t,r){for(;;t++){if(t>=e.length)return void r();if(!(e[t].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,i),!i)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),i=0,a=32;a<=e.length-16;a+=160,i+=16)r.set(e.subarray(a,a+16),i);return r},t.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(t.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,r,i,a,n){var s=this.discardEPB(a.data),o=this.getAvcEncryptedData(s),l=this;this.decryptBuffer(o.buffer,(function(o){a.data=l.getAvcDecryptedUnit(s,o),n||l.decryptAvcSamples(e,t,r+1,i)}))},t.decryptAvcSamples=function(e,t,r,i){for(;;t++,r=0){if(t>=e.length)return void i();for(var a=e[t].units;!(r>=a.length);r++){var n=a[r];if(!(n.data.length<=48||1!==n.type&&5!==n.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,i,n,s),!s)return}}}},e}(),R={video:1,audio:2,id3:3,text:4},A=function(){function e(e,t,r,i){this.observer=e,this.config=r,this.typeSupported=i,this.remuxer=t,this.sampleAes=null,this.pmtUnknownTypes={}}var t=e.prototype;return t.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new _(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var r=e._syncOffset(t);return!(r<0)&&(r&&o.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),r=0;r<t;){if(71===e[r]&&71===e[r+188]&&71===e[r+376])return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:R[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},t.resetInitSegment=function(t,r,i,a){this.pmtParsed=!1,this._pmtId=-1,this.pmtUnknownTypes={},this._avcTrack=e.createTrack("video",a),this._audioTrack=e.createTrack("audio",a),this._id3Track=e.createTrack("id3",a),this._txtTrack=e.createTrack("text",a),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=r,this.videoCodec=i,this._duration=a},t.resetTimeStamp=function(){},t.append=function(t,r,n,s){var l,d,u,c,h,f=t.length,g=!1;this.pmtUnknownTypes={},this.contiguous=n;var p=this.pmtParsed,v=this._avcTrack,m=this._audioTrack,y=this._id3Track,b=v.pid,T=m.pid,E=y.pid,S=this._pmtId,_=v.pesData,R=m.pesData,A=y.pesData,k=this._parsePAT,w=this._parsePMT.bind(this),L=this._parsePES,D=this._parseAVCPES.bind(this),O=this._parseAACPES.bind(this),C=this._parseMPEGPES.bind(this),I=this._parseID3PES.bind(this),P=e._syncOffset(t);for(f-=(f+P)%188,l=P;l<f;l+=188)if(71===t[l]){if(d=!!(64&t[l+1]),u=((31&t[l+1])<<8)+t[l+2],(48&t[l+3])>>4>1){if((c=l+5+t[l+4])===l+188)continue}else c=l+4;switch(u){case b:d&&(_&&(h=L(_))&&D(h,!1),_={data:[],size:0}),_&&(_.data.push(t.subarray(c,l+188)),_.size+=l+188-c);break;case T:d&&(R&&(h=L(R))&&(m.isAAC?O(h):C(h)),R={data:[],size:0}),R&&(R.data.push(t.subarray(c,l+188)),R.size+=l+188-c);break;case E:d&&(A&&(h=L(A))&&I(h),A={data:[],size:0}),A&&(A.data.push(t.subarray(c,l+188)),A.size+=l+188-c);break;case 0:d&&(c+=t[c]+1),S=this._pmtId=k(t,c);break;case S:d&&(c+=t[c]+1);var x=w(t,c,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=x.avc)>0&&(v.pid=b),(T=x.audio)>0&&(m.pid=T,m.isAAC=x.isAAC),(E=x.id3)>0&&(y.pid=E),g&&!p&&(o.b.log("reparse from beginning"),g=!1,l=P-188),p=this.pmtParsed=!0;break;case 17:case 8191:break;default:g=!0}}else this.observer.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_&&(h=L(_))?(D(h,!0),v.pesData=null):v.pesData=_,R&&(h=L(R))?(m.isAAC?O(h):C(h),m.pesData=null):(R&&R.size&&o.b.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=R),A&&(h=L(A))?(I(h),y.pesData=null):y.pesData=A,null==this.sampleAes?this.remuxer.remux(m,v,y,this._txtTrack,r,n,s):this.decryptAndRemux(m,v,y,this._txtTrack,r,n,s)},t.decryptAndRemux=function(e,t,r,i,a,n,s){if(e.samples&&e.isAAC){var o=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){o.decryptAndRemuxAvc(e,t,r,i,a,n,s)}))}else this.decryptAndRemuxAvc(e,t,r,i,a,n,s)},t.decryptAndRemuxAvc=function(e,t,r,i,a,n,s){if(t.samples){var o=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){o.remuxer.remux(e,t,r,i,a,n,s)}))}else this.remuxer.remux(e,t,r,i,a,n,s)},t.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},t._trackUnknownPmt=function(e,t,r){var i=this.pmtUnknownTypes[e]||0;return 0===i&&(this.pmtUnknownTypes[e]=0,t.call(o.b,r)),this.pmtUnknownTypes[e]++,i},t._parsePMT=function(e,t,r,i){var a,n,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){switch(n=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!i){this._trackUnknownPmt(e[t],o.b.warn,"ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===s.audio&&(s.audio=n);break;case 21:-1===s.id3&&(s.id3=n);break;case 219:if(!i){this._trackUnknownPmt(e[t],o.b.warn,"H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===s.avc&&(s.avc=n);break;case 3:case 4:r?-1===s.audio&&(s.audio=n,s.isAAC=!1):this._trackUnknownPmt(e[t],o.b.warn,"MPEG audio found, not supported in this browser");break;case 36:this._trackUnknownPmt(e[t],o.b.warn,"Unsupported HEVC stream type found");break;default:this._trackUnknownPmt(e[t],o.b.log,"Unknown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return s},t._parsePES=function(e){var t,r,i,a,n,s,l,d,u=0,c=e.data;if(!e||0===e.size)return null;for(;c[0].length<19&&c.length>1;){var h=new Uint8Array(c[0].length+c[1].length);h.set(c[0]),h.set(c[1],c[0].length),c[0]=h,c.splice(1,1)}if(1===((t=c[0])[0]<<16)+(t[1]<<8)+t[2]){if((i=(t[4]<<8)+t[5])&&i>e.size-6)return null;if(192&(r=t[7])&&(s=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&r?s-(l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(o.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l):l=s),d=(a=t[8])+9,e.size<=d)return null;e.size-=d,n=new Uint8Array(e.size);for(var f=0,g=c.length;f<g;f++){var p=(t=c[f]).byteLength;if(d){if(d>p){d-=p;continue}t=t.subarray(d),p-=d,d=0}n.set(t,u),u+=p}return i&&(i-=a+3),{data:n,pts:s,dts:l,len:i}}return null},t.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var r=t.samples,i=r.length;if(isNaN(e.pts)){if(!i)return void t.dropped++;var a=r[i-1];e.pts=a.pts,e.dts=a.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(i||this.contiguous)?(e.id=i,r.push(e)):t.dropped++}e.debug.length&&o.b.log(e.pts+"/"+e.dts+":"+e.debug)},t._parseAVCPES=function(e,t){var r,i,a,n=this,s=this._avcTrack,o=this._parseAVCNALu(e.data),l=this.avcSample,d=!1,u=this.pushAccesUnit.bind(this),c=function(e,t,r,i){return{key:e,pts:t,dts:r,units:[],debug:i}};e.data=null,l&&o.length&&!s.audFound&&(u(l,s),l=this.avcSample=c(!1,e.pts,e.dts,"")),o.forEach((function(t){switch(t.type){case 1:i=!0,l||(l=n.avcSample=c(!0,e.pts,e.dts,"")),l.frame=!0;var o=t.data;if(d&&o.length>4){var h=new S(o).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(l.key=!0)}break;case 5:i=!0,l||(l=n.avcSample=c(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0,(r=new S(n.discardEPB(t.data))).readUByte();for(var f=0,g=0,p=!1,v=0;!p&&r.bytesAvailable>1;){f=0;do{f+=v=r.readUByte()}while(255===v);g=0;do{g+=v=r.readUByte()}while(255===v);if(4===f&&0!==r.bytesAvailable){if(p=!0,181===r.readUByte())if(49===r.readUShort())if(1195456820===r.readUInt())if(3===r.readUByte()){var y=r.readUByte(),b=31&y,T=[y,r.readUByte()];for(a=0;a<b;a++)T.push(r.readUByte()),T.push(r.readUByte()),T.push(r.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:e.pts,bytes:T})}}else if(5===f&&0!==r.bytesAvailable){if(p=!0,g>16){var E=[];for(a=0;a<16;a++)E.push(r.readUByte().toString(16)),3!==a&&5!==a&&7!==a&&9!==a||E.push("-");var _=g-16,R=new Uint8Array(_);for(a=0;a<_;a++)R[a]=r.readUByte();n._insertSampleInOrder(n._txtTrack.samples,{pts:e.pts,payloadType:f,uuid:E.join(""),userDataBytes:R,userData:Object(m.b)(R.buffer)})}}else if(g<r.bytesAvailable)for(a=0;a<g;a++)r.readUByte()}break;case 7:if(i=!0,d=!0,!s.sps){var A=(r=new S(t.data)).readSPS();s.width=A.width,s.height=A.height,s.pixelRatio=A.pixelRatio,s.sps=[t.data],s.duration=n._duration;var k=t.data.subarray(1,4),w="avc1.";for(a=0;a<3;a++){var L=k[a].toString(16);L.length<2&&(L="0"+L),w+=L}s.codec=w}break;case 8:i=!0,s.pps||(s.pps=[t.data]);break;case 9:i=!1,s.audFound=!0,l&&u(l,s),l=n.avcSample=c(!1,e.pts,e.dts,"");break;case 12:i=!1;break;default:i=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&i&&l.units.push(t)})),t&&l&&(u(l,s),this.avcSample=null)},t._insertSampleInOrder=function(e,t){var r=e.length;if(r>0){if(t.pts>=e[r-1].pts)e.push(t);else for(var i=r-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)},t._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var r=this._avcTrack.samples;t=r[r.length-1]}if(t){var i=t.units;e=i[i.length-1]}return e},t._parseAVCNALu=function(e){var t,r,i,a,n=0,s=e.byteLength,o=this._avcTrack,l=o.naluState||0,d=l,u=[],c=-1;for(-1===l&&(c=0,a=31&e[0],l=0,n=1);n<s;)if(t=e[n++],l)if(1!==l)if(t)if(1===t){if(c>=0)i={data:e.subarray(c,n-l-1),type:a},u.push(i);else{var h=this._getLastNalUnit();if(h&&(d&&n<=4-d&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-d)),(r=n-l-1)>0)){var f=new Uint8Array(h.data.byteLength+r);f.set(h.data,0),f.set(e.subarray(0,r),h.data.byteLength),h.data=f}}n<s?(c=n,a=31&e[n],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;if(c>=0&&l>=0&&(i={data:e.subarray(c,s),type:a,state:l},u.push(i)),0===u.length){var g=this._getLastNalUnit();if(g){var p=new Uint8Array(g.data.byteLength+e.byteLength);p.set(g.data,0),p.set(e,g.data.byteLength),g.data=p}}return o.naluState=l,u},t.discardEPB=function(e){for(var t,r,i=e.byteLength,a=[],n=1;n<i-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(a.push(n+2),n+=2):n++;if(0===a.length)return e;t=i-a.length,r=new Uint8Array(t);var s=0;for(n=0;n<t;s++,n++)s===a[0]&&(s++,a.shift()),r[n]=e[s];return r},t._parseAACPES=function(e){var t,r,n,s,l,d,u,c=this._audioTrack,f=e.data,m=e.pts,y=this.aacOverFlow,b=this.aacLastPTS;if(y){var T=new Uint8Array(y.byteLength+f.byteLength);T.set(y,0),T.set(f,y.byteLength),f=T}for(n=0,l=f.length;n<l-1&&!h(f,n);n++);if(n&&(n<l-1?(d="AAC PES did not start with ADTS header,offset:"+n,u=!1):(d="no ADTS header found in AAC PES",u=!0),o.b.warn("parsing error:"+d),this.observer.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:u,reason:d}),u))return;if(g(c,this.observer,f,n,this.audioCodec),r=0,t=p(c.samplerate),y&&b){var E=b+t;Math.abs(E-m)>1&&(o.b.log("AAC: align PTS for overlapping frames by "+Math.round((E-m)/90)),m=E)}for(;n<l;){if(h(f,n)){if(n+5<l){var S=v(c,f,n,m,r);if(S){n+=S.length,s=S.sample.pts,r++;continue}}break}n++}y=n<l?f.subarray(n,l):null,this.aacOverFlow=y,this.aacLastPTS=s},t._parseMPEGPES=function(e){for(var t=e.data,r=t.length,i=0,a=0,n=e.pts;a<r;)if(E.isHeader(t,a)){var s=E.appendFrame(this._audioTrack,t,a,n,i);if(!s)break;a+=s.length,i++}else a++},t._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),k=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){var t,r,i=m.a.getID3Data(e,0);if(i&&void 0!==m.a.getTimeStamp(i))for(t=i.length,r=Math.min(e.length-1,t+100);t<r;t++)if(E.probe(e,t))return o.b.log("MPEG Audio sync word found !"),!0;return!1},t.append=function(e,t,r,i){for(var a=m.a.getID3Data(e,0)||[],n=m.a.getTimeStamp(a),s=void 0!==n?90*n:9e4*t,o=a.length,l=e.length,d=0,u=0,c=this._audioTrack,h=[{pts:s,dts:s,data:a}];o<l;)if(E.isHeader(e,o)){var f=E.appendFrame(c,e,o,s,d);if(!f)break;o+=f.length,u=f.sample.pts,d++}else m.a.isHeader(e,o)?(a=m.a.getID3Data(e,o),h.push({pts:u,dts:u,data:a}),o+=a.length):o++;this.remuxer.remux(c,{samples:[]},{samples:h,inputTimeScale:9e4},{samples:[]},t,r,i)},t.destroy=function(){},e}(),w=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),L=Math.pow(2,32)-1,D=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=n,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,s,l,s,o),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,a))},e.box=function(e){for(var t,r=Array.prototype.slice.call(arguments,1),i=8,a=r.length,n=a;a--;)i+=r[a].byteLength;for((t=new Uint8Array(i))[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),a=0,i=8;a<n;a++)t.set(r[a],i),i+=r[a].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,r){r*=t;var i=Math.floor(r/(L+1)),a=Math.floor(r%(L+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))},e.moov=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))},e.mvex=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(i))},e.mvhd=function(t,r){r*=t;var i=Math.floor(r/(L+1)),a=Math.floor(r%(L+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,n)},e.sdtp=function(t){var r,i,a=t.samples||[],n=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)r=a[i].flags,n[i+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,n)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var r,i,a,n=[],s=[];for(r=0;r<t.sps.length;r++)a=(i=t.sps[r]).byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<t.pps.length;r++)a=(i=t.pps[r]).byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|t.sps.length].concat(n).concat([t.pps.length]).concat(s))),l=t.width,d=t.height,u=t.pixelRatio[0],c=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,d>>8&255,255&d,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,c>>24,c>>16&255,c>>8&255,255&c])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var r=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var r=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var r=t.id,i=t.duration*t.timescale,a=t.width,n=t.height,s=Math.floor(i/(L+1)),o=Math.floor(i%(L+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},e.traf=function(t,r){var i=e.sdtp(t),a=t.id,n=Math.floor(r/(L+1)),s=Math.floor(r%(L+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,r){var i,a,n,s,o,l,d=t.samples||[],u=d.length,c=12+16*u,h=new Uint8Array(c);for(r+=8+c,h.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<u;i++)n=(a=d[i]).duration,s=a.size,o=a.flags,l=a.cts,h.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,h)},e.initSegment=function(t){e.types||e.init();var r,i=e.moov(t);return(r=new Uint8Array(e.FTYP.byteLength+i.byteLength)).set(e.FTYP),r.set(i,e.FTYP.byteLength),r},e}();function O(e,t,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var a=e*t*r;return i?Math.round(a):a}function C(e,t){return void 0===t&&(t=!1),O(e,1e3,1/9e4,t)}function I(e,t){return void 0===t&&(t=1),O(e,9e4,1/t)}var P=I(10),x=I(.2),M=null;function F(e,t){var r;if(void 0===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}var U,N=function(){function e(e,t,r,i){if(this.observer=e,this.config=t,this.typeSupported=r,this.ISGenerated=!1,null===M){var a=navigator.userAgent.match(/Chrome\/(\d+)/i);M=a?parseInt(a[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},t.resetInitSegment=function(){this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,r=e.reduce((function(e,r){var i=r.pts-e;return i<-4294967296?(t=!0,F(e,r.pts)):i>0?e:r.pts}),e[0].pts);return t&&o.b.debug("PTS rollover detected"),r},t.remux=function(e,t,r,a,n,s,l){if(this.ISGenerated||this.generateIS(e,t,n),this.ISGenerated){var d=e.samples.length,u=t.samples.length,c=n,h=n;if(d&&u){var f=this.getVideoStartPts(t.samples),g=(F(e.samples[0].pts,f)-f)/t.inputTimeScale;c+=Math.max(0,g),h+=Math.max(0,-g)}if(d){e.timescale||(o.b.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,n));var p,v=this.remuxAudio(e,c,s,l);if(u)v&&(p=v.endPTS-v.startPTS),t.timescale||(o.b.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,n)),this.remuxVideo(t,h,s,p)}else if(u){var m=this.remuxVideo(t,h,s,0,l);m&&e.codec&&this.remuxEmptyAudio(e,c,s,m)}}r.samples.length&&this.remuxID3(r,n),a.samples.length&&this.remuxText(a,n),this.observer.trigger(i.a.FRAG_PARSED)},t.generateIS=function(e,t,r){var n,s,l=this.observer,d=e.samples,u=t.samples,c=this.typeSupported,h="audio/mp4",f={},g={tracks:f},p=void 0===this._initPTS;if(p&&(n=s=1/0),e.config&&d.length&&(e.timescale=e.samplerate,o.b.log("audio sampling rate : "+e.samplerate),e.isAAC||(c.mpeg?(h="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3")),f.audio={container:h,codec:e.codec,initSegment:!e.isAAC&&c.mpeg?new Uint8Array:D.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(n=s=d[0].pts-Math.round(e.inputTimeScale*r))),t.sps&&t.pps&&u.length){var v=t.inputTimeScale;if(t.timescale=v,f.video={container:"video/mp4",codec:t.codec,initSegment:D.initSegment([t]),metadata:{width:t.width,height:t.height}},p){var m=this.getVideoStartPts(u),y=Math.round(v*r);s=Math.min(s,F(u[0].dts,m)-y),n=Math.min(n,m-y),this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:n})}}else p&&f.audio&&this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:n});Object.keys(f).length?(l.trigger(i.a.FRAG_PARSING_INIT_SEGMENT,g),this.ISGenerated=!0,p&&(this._initPTS=n,this._initDTS=s)):l.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.remuxVideo=function(e,t,r,n){var s,l,d,u,c,h=e.timescale,f=e.samples,g=[],p=f.length,v=this._initPTS,m=8,y=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,T=0,E=!1,S=this.nextAvcDts;if(0!==p){if(!r)S=t*h-(f[0].pts-F(f[0].dts,f[0].pts));for(var _=0;_<p;_++){var R=f[_];R.pts=F(R.pts-v,S),R.dts=F(R.dts-v,S),R.dts>R.pts&&(T=Math.max(Math.min(T,R.pts-R.dts),-1*x)),R.dts<f[_>0?_-1:_].dts&&(E=!0)}E&&f.sort((function(e,t){var r=e.dts-t.dts,i=e.pts-t.pts;return r||i||e.id-t.id})),u=f[0].dts,c=f[p-1].dts;var A=Math.round((c-u)/(p-1));if(T<0){if(T<-2*A){o.b.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+C(-A,!0)+" ms");for(var k=T,w=0;w<p;w++)f[w].dts=k=Math.max(k,f[w].pts-A),f[w].pts=Math.max(k,f[w].pts)}else{o.b.warn("PTS < DTS detected in video samples, shifting DTS by "+C(T,!0)+" ms to overcome this issue");for(var L=0;L<p;L++)f[L].dts=f[L].dts+T}u=f[0].dts,c=f[p-1].dts}if(r){var O=u-S,I=O>A;if(I||O<-1){I?o.b.warn("AVC: "+C(O,!0)+" ms ("+O+"dts) hole between fragments detected, filling it"):o.b.warn("AVC: "+C(-O,!0)+" ms ("+O+"dts) overlapping between fragments detected"),u=S;var P=f[0].pts-O;f[0].dts=u,f[0].pts=P,o.b.log("Video: First PTS/DTS adjusted: "+C(P,!0)+"/"+C(u,!0)+", delta: "+C(O,!0)+" ms")}}M&&M<75&&(u=Math.max(0,u));for(var U=0,N=0,B=0;B<p;B++){for(var G=f[B],K=G.units,j=K.length,H=0,V=0;V<j;V++)H+=K[V].data.length;N+=H,U+=j,G.length=H,G.dts=Math.max(G.dts,u),G.pts=Math.max(G.pts,G.dts,0),y=Math.min(G.pts,y),b=Math.max(G.pts,b)}c=f[p-1].dts;var Y=N+4*U+8;try{l=new Uint8Array(Y)}catch(e){return void this.observer.trigger(i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:Y,reason:"fail allocating video mdat "+Y})}var W=new DataView(l.buffer);W.setUint32(0,Y),l.set(D.types.mdat,4);for(var q=0;q<p;q++){for(var X,z=f[q],Q=z.units,$=0,J=0,Z=Q.length;J<Z;J++){var ee=Q[J],te=ee.data,re=ee.data.byteLength;W.setUint32(m,re),m+=4,l.set(te,m),m+=re,$+=4+re}if(q<p-1)s=f[q+1].dts-z.dts;else{var ie=this.config,ae=z.dts-f[q>0?q-1:q].dts;if(ie.stretchShortVideoTrack){var ne=ie.maxBufferHole,se=Math.floor(ne*h),oe=(n?y+n*h:this.nextAudioPts)-z.pts;oe>se?((s=oe-ae)<0&&(s=ae),o.b.log("It is approximately "+C(oe,!1)+" ms to the next segment; using duration "+C(s,!1)+" ms for the last video frame.")):s=ae}else s=ae}X=Math.round(z.pts-z.dts),g.push({size:$,duration:s,cts:X,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:z.key?2:1,isNonSync:z.key?0:1}})}this.nextAvcDts=c+s;var le=e.dropped;if(e.nbNalu=0,e.dropped=0,g.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var de=g[0].flags;de.dependsOn=2,de.isNonSync=0}e.samples=g,d=D.moof(e.sequenceNumber++,u,e),e.samples=[];var ue={data1:d,data2:l,startPTS:y/h,endPTS:(b+s)/h,startDTS:u/h,endDTS:this.nextAvcDts/h,type:"video",hasAudio:!1,hasVideo:!0,nb:g.length,dropped:le};return this.observer.trigger(i.a.FRAG_PARSING_DATA,ue),ue}},t.remuxAudio=function(e,t,r,n){var s,l,d,u,c,h,f=e.inputTimeScale,g=e.timescale,p=f/g,v=(e.isAAC?1024:1152)*p,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,b=y?0:8,T=e.samples,E=[],S=this.nextAudioPts;if(r|=T.length&&S&&(n&&Math.abs(t-S/f)<.1||Math.abs(T[0].pts-S-m)<20*v),T.forEach((function(e){e.pts=e.dts=F(e.pts-m,t*f)})),0!==(T=T.filter((function(e){return e.pts>=0}))).length){if(r||(S=n?Math.max(0,t*f):T[0].pts),e.isAAC)for(var _=this.config.maxAudioFramesDrift,R=0,A=S;R<T.length;){var k=T[R],L=k.pts,O=L-A;if(O<=-_*v)r||R>0?(o.b.warn("Dropping 1 audio frame @ "+C(A,!0)/1e3+"s due to "+C(O,!0)+" ms overlap."),T.splice(R,1)):(o.b.warn("Audio frame @ "+C(L,!0)/1e3+"s overlaps nextAudioPts by "+C(O,!0)+" ms."),A=L+v,R++);else if(O>=_*v&&O<P&&A){var I=Math.round(O/v);o.b.warn("Injecting "+I+" audio frames @ "+C(A,!0)/1e3+"s due to "+C(O,!0)+" ms gap.");for(var x=0;x<I;x++){var M=Math.max(A,0);(l=w.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(o.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=k.unit.subarray()),T.splice(R,0,{unit:l,pts:M,dts:M}),A+=v,R++}k.pts=k.dts=A,A+=v,R++}else Math.abs(O),k.pts=k.dts=A,A+=v,R++}for(var U=T.length,N=0;U--;)N+=T[U].unit.byteLength;for(var B=0,G=T.length;B<G;B++){var K=T[B],j=K.unit,H=K.pts;if(void 0!==h&&s)s.duration=Math.round((H-h)/p);else{var V=H-S,Y=0;if(r&&e.isAAC&&V){if(V>0&&V<P)Y=Math.round((H-S)/v),o.b.log(C(V,!0)+" ms hole between AAC samples detected,filling it"),Y>0&&((l=w.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(l=j.subarray()),N+=Y*l.length);else if(V<-12){o.b.log("drop overlapping AAC sample, expected/parsed/delta: "+C(S,!0)+" ms / "+C(H,!0)+" ms / "+C(-V,!0)+" ms"),N-=j.byteLength;continue}H=S}if(c=H,!(N>0))return;N+=b;try{d=new Uint8Array(N)}catch(e){return void this.observer.trigger(i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating audio mdat "+N})}y||(new DataView(d.buffer).setUint32(0,N),d.set(D.types.mdat,4));for(var W=0;W<Y;W++)(l=w.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(o.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=j.subarray()),d.set(l,b),b+=l.byteLength,s={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(s)}d.set(j,b);var q=j.byteLength;b+=q,s={size:q,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(s),h=H}var X=0;if((U=E.length)>=2&&(X=E[U-2].duration,s.duration=X),U){this.nextAudioPts=S=h+p*X,e.samples=E,u=y?new Uint8Array:D.moof(e.sequenceNumber++,c/p,e),e.samples=[];var z=c/f,Q=S/f,$={data1:u,data2:d,startPTS:z,endPTS:Q,startDTS:z,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:U};return this.observer.trigger(i.a.FRAG_PARSING_DATA,$),$}return null}},t.remuxEmptyAudio=function(e,t,r,i){var a=e.inputTimeScale,n=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,l=(void 0!==s?s:i.startDTS*a)+this._initDTS,d=i.endDTS*a+this._initDTS,u=1024*n,c=Math.ceil((d-l)/u),h=w.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(o.b.warn("remux empty Audio"),h){for(var f=[],g=0;g<c;g++){var p=l+g*u;f.push({unit:h,pts:p,dts:p})}e.samples=f,this.remuxAudio(e,t,r)}else o.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.remuxID3=function(e,t){var r=e.samples.length;if(r){for(var a=e.inputTimeScale,n=this._initPTS,s=this._initDTS,o=0;o<r;o++){var l=e.samples[o];l.pts=F(l.pts-n,t*a)/a,l.dts=F(l.dts-s,t*a)/a}this.observer.trigger(i.a.FRAG_PARSING_METADATA,{samples:e.samples}),e.samples=[]}},t.remuxText=function(e,t){var r=e.samples.length,a=e.inputTimeScale,n=this._initPTS;if(r){for(var s=0;s<r;s++){var o=e.samples[s];o.pts=F(o.pts-n,t*a)/a}e.samples.sort((function(e,t){return e.pts-t.pts})),this.observer.trigger(i.a.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},e}(),B=function(){function e(e){this.observer=e}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.remux=function(e,t,r,a,n,s,o,l){var d=this.observer,u="";e&&(u+="audio"),t&&(u+="video"),d.trigger(i.a.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:u,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),d.trigger(i.a.FRAG_PARSED)},e}(),G=Object(l.a)();try{U=G.performance.now.bind(G.performance)}catch(e){o.b.debug("Unable to use Performance API on this environment"),U=G.Date.now}var K=function(){function e(e,t,r,i){this.observer=e,this.typeSupported=t,this.config=r,this.vendor=i}var t=e.prototype;return t.destroy=function(){var e=this.demuxer;e&&e.destroy()},t.push=function(e,t,r,a,s,o,l,d,u,c,h,f){var g=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var p=this.decrypter;null==p&&(p=this.decrypter=new n.a(this.observer,this.config));var v=U();p.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var n=U();g.observer.trigger(i.a.FRAG_DECRYPTED,{stats:{tstart:v,tdecrypt:n}}),g.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),a,s,o,l,d,u,c,h,f)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),a,s,o,l,d,u,c,h,f)},t.pushDecrypted=function(e,t,r,n,s,o,l,d,u,c,h,f){var g=this.demuxer,p=this.remuxer;if(!g||l||d){for(var v,m=this.observer,T=this.typeSupported,E=this.config,S=[{demux:A,remux:N},{demux:b.a,remux:B},{demux:y,remux:N},{demux:k,remux:N}],_=0,R=S.length;_<R&&!(v=S[_]).demux.probe(e);_++);if(!v)return void m.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});p&&p instanceof v.remux||(p=new v.remux(m,E,T,this.vendor)),g&&g instanceof v.demux||(g=new v.demux(m,p,E,T),this.probe=v.demux.probe),this.demuxer=g,this.remuxer=p}(l||d)&&(g.resetInitSegment(r,n,s,c),p.resetInitSegment()),l&&(g.resetTimeStamp(f),p.resetTimeStamp(f)),"function"==typeof g.setDecryptData&&g.setDecryptData(t),g.append(e,o,u,h)},e}();t.a=K},function(e,t,r){"use strict";var i=r(0),a=r(1),n=Math.pow(2,32)-1,s=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,r,i,n){if(t&&t.byteLength){var s=this.initData=e.parseInitSegment(t);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var o={};s.audio&&s.video?o.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:n?t:null}:(s.audio&&(o.audio={container:"audio/mp4",codec:r,initSegment:n?t:null}),s.video&&(o.video={container:"video/mp4",codec:i,initSegment:n?t:null})),this.observer.trigger(a.a.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<8|e[t+1];return r<0?65536+r:r},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return r<0?4294967296+r:r},e.writeUint32=function(e,t,r){e.data&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},e.findBox=function(t,r){var i,a,n,s,o,l,d=[];if(t.data?(o=t.start,n=t.end,t=t.data):(o=0,n=t.byteLength),!r.length)return null;for(i=o;i<n;)l=(a=e.readUint32(t,i))>1?i+a:n,e.bin2str(t.subarray(i+4,i+8))===r[0]&&(1===r.length?d.push({data:t,start:i+8,end:l}):(s=e.findBox({data:t,start:i+8,end:l},r.slice(1))).length&&(d=d.concat(s))),i=l;return d},e.parseSegmentIndex=function(t){var r,i=e.findBox(t,["moov"])[0],a=i?i.end:null,n=0,s=e.findBox(t,["sidx"]);if(!s||!s[0])return null;r=[];var o=(s=s[0]).data[0];n=0===o?8:16;var l=e.readUint32(s,n);n+=4;n+=0===o?8:16,n+=2;var d=s.end+0,u=e.readUint16(s,n);n+=2;for(var c=0;c<u;c++){var h=n,f=e.readUint32(s,h);h+=4;var g=2147483647&f;if(1===(2147483648&f)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var p=e.readUint32(s,h);h+=4,r.push({referenceSize:g,subsegmentDuration:p,info:{duration:p/l,start:d,end:d+g-1}}),d+=g,n=h+=4}return{earliestPresentationTime:0,timescale:l,version:o,referencesCount:u,references:r,moovEndOffset:a}},e.parseInitSegment=function(t){var r=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var a=e.findBox(t,["tkhd"])[0];if(a){var n=a.data[a.start],s=0===n?12:20,o=e.readUint32(a,s),l=e.findBox(t,["mdia","mdhd"])[0];if(l){s=0===(n=l.data[l.start])?12:20;var d=e.readUint32(l,s),u=e.findBox(t,["mdia","hdlr"])[0];if(u){var c={soun:"audio",vide:"video"}[e.bin2str(u.data.subarray(u.start+8,u.start+12))];if(c){var h=e.findBox(t,["mdia","minf","stbl","stsd"]);if(h.length){h=h[0];var f=e.bin2str(h.data.subarray(h.start+12,h.start+16));i.b.log("MP4Demuxer:"+c+":"+f+" found")}r[o]={timescale:d,type:c},r[c]={timescale:d,id:o}}}}}})),r},e.getStartDTS=function(t,r){var i,a,n;return i=e.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map((function(r){return e.findBox(r,["tfhd"]).map((function(i){var a,n;return a=e.readUint32(i,4),n=t[a].timescale||9e4,e.findBox(r,["tfdt"]).map((function(t){var r,i;return r=t.data[t.start],i=e.readUint32(t,4),1===r&&(i*=Math.pow(2,32),i+=e.readUint32(t,8)),i}))[0]/n}))}))),n=Math.min.apply(null,a),isFinite(n)?n:0},e.offsetStartDTS=function(t,r,i){e.findBox(r,["moof","traf"]).map((function(r){return e.findBox(r,["tfhd"]).map((function(a){var s=e.readUint32(a,4),o=t[s].timescale||9e4;e.findBox(r,["tfdt"]).map((function(t){var r=t.data[t.start],a=e.readUint32(t,4);if(0===r)e.writeUint32(t,4,a-i*o);else{a*=Math.pow(2,32),a+=e.readUint32(t,8),a-=i*o,a=Math.max(a,0);var s=Math.floor(a/(n+1)),l=Math.floor(a%(n+1));e.writeUint32(t,4,s),e.writeUint32(t,8,l)}}))}))}))},t.append=function(t,r,i,n){var s=this.initData;s||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),s=this.initData);var o,l=this.initPTS;if(void 0===l){var d=e.getStartDTS(s,t);this.initPTS=l=d-r,this.observer.trigger(a.a.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(s,t,l),o=e.getStartDTS(s,t),this.remuxer.remux(s.audio,s.video,null,null,o,i,n,t)},t.destroy=function(){},e}();t.a=s},function(e,t,r){function i(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var i=r(r.s=ENTRY_MODULE);return i.default||i}function a(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function n(e,t,i){var n={};n[i]=[];var s=t.toString(),o=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return n;for(var l,d=o[1],u=new RegExp("(\\\\n|\\W)"+a(d)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=u.exec(s);)"dll-reference"!==l[3]&&n[i].push(l[3]);for(u=new RegExp("\\("+a(d)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=u.exec(s);)e[l[2]]||(n[i].push(l[1]),e[l[2]]=r(l[1]).m),n[l[2]]=n[l[2]]||[],n[l[2]].push(l[4]);for(var c,h=Object.keys(n),f=0;f<h.length;f++)for(var g=0;g<n[h[f]].length;g++)c=n[h[f]][g],isNaN(1*c)||(n[h[f]][g]=1*n[h[f]][g]);return n}function s(e){return Object.keys(e).reduce((function(t,r){return t||e[r].length>0}),!1)}e.exports=function(e,t){t=t||{};var a={main:r.m},o=t.all?{main:Object.keys(a.main)}:function(e,t){for(var r={main:[t]},i={main:[]},a={main:{}};s(r);)for(var o=Object.keys(r),l=0;l<o.length;l++){var d=o[l],u=r[d].pop();if(a[d]=a[d]||{},!a[d][u]&&e[d][u]){a[d][u]=!0,i[d]=i[d]||[],i[d].push(u);for(var c=n(e,e[d][u],d),h=Object.keys(c),f=0;f<h.length;f++)r[h[f]]=r[h[f]]||[],r[h[f]]=r[h[f]].concat(c[h[f]])}}return i}(a,e),l="";Object.keys(o).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;o[e][t];)t++;o[e].push(t),a[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o[e].map((function(t){return JSON.stringify(t)+": "+a[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o.main.map((function(e){return JSON.stringify(e)+": "+a.main[e].toString()})).join(",")+"}))(self);";var d=new window.Blob([l],{type:"text/javascript"});if(t.bare)return d;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(d),c=new window.Worker(u);return c.objectURL=u,c}},function(e,t,r){"use strict";r.r(t);var i=r(9),a=r(1),n=r(0),s=r(8);t.default=function(e){var t=new s.EventEmitter;t.trigger=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.removeListener.apply(t,[e].concat(i))};var r=function(t,r){e.postMessage({event:t,data:r})};e.addEventListener("message",(function(a){var s=a.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);e.demuxer=new i.a(t,s.typeSupported,o,s.vendor),Object(n.a)(o.debug),r("init",null);break;case"demux":e.demuxer.push(s.data,s.decryptdata,s.initSegment,s.audioCodec,s.videoCodec,s.timeOffset,s.discontinuity,s.trackSwitch,s.contiguous,s.duration,s.accurateTimeOffset,s.defaultInitPTS)}})),t.on(a.a.FRAG_DECRYPTED,r),t.on(a.a.FRAG_PARSING_INIT_SEGMENT,r),t.on(a.a.FRAG_PARSED,r),t.on(a.a.ERROR,r),t.on(a.a.FRAG_PARSING_METADATA,r),t.on(a.a.FRAG_PARSING_USERDATA,r),t.on(a.a.INIT_PTS_FOUND,r),t.on(a.a.FRAG_PARSING_DATA,(function(t,r){var i=[],a={event:t,data:r};r.data1&&(a.data1=r.data1.buffer,i.push(r.data1.buffer),delete r.data1),r.data2&&(a.data2=r.data2.buffer,i.push(r.data2.buffer),delete r.data2),e.postMessage(a,i)}))}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return nr}));var i={};r.r(i),r.d(i,"newCue",(function(){return ft}));var a,n,s=r(6),o=r(2),l=r(3),d=r(1),u=r(0),c={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},h=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(c[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){try{(function(e,t){var r="on"+e.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,t)}).call(this,e,t).call()}catch(t){u.b.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(d.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();!function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(a||(a={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(n||(n={}));var f=r(10);function g(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var p,v=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}var t,r,i;return t=e,(r=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(s.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&g(t.prototype,r),i&&g(t,i),e}();function m(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}!function(e){e.AUDIO="audio",e.VIDEO="video"}(p||(p={}));var y=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((e={})[p.AUDIO]=!1,e[p.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t,r,i,a=e.prototype;return a.setByteRange=function(e,t){var r=e.split("@",2),i=[];1===r.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(r[1]),i[1]=parseInt(r[0])+i[0],this._byteRange=i},a.addElementaryStream=function(e){this._elementaryStreams[e]=!0},a.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},a.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t},a.setDecryptDataFromLevelKey=function(e,t){var r=e;return(null==e?void 0:e.method)&&e.uri&&!e.iv&&((r=new v(e.baseuri,e.reluri)).method=e.method,r.iv=this.createInitializationVector(t)),r},t=e,(r=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(s.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&u.b.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.a)(this.programDateTime))return null;var e=Object(l.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&m(t.prototype,r),i&&m(t,i),e}();function b(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var T=function(){function e(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}var t,r,i;return t=e,(r=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.a)(this.fragments[0].programDateTime))}}])&&b(t.prototype,r),i&&b(t,i),e}(),E=/^(\d+)x(\d+)$/,S=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,_=function(){function e(t){for(var r in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(r)&&(this[r]=t[r])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)r[i]=parseInt(t.slice(2*i,2*i+2),16);return r}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.enumeratedString=function(e){return this[e]},t.decimalResolution=function(e){var t=E.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,r={};for(S.lastIndex=0;null!==(t=S.exec(e));){var i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[t[1]]=i}return r},e}(),R={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function A(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}var k=/(?:#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)|#EXT-X-SESSION-DATA:([^\n\r]*)[\r\n]+)/g,w=/#EXT-X-MEDIA:(.*)/g,L=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),D=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,O=/\.(mp4|m4s|m4v|m4a)$/i,C=function(){function e(){}return e.findGroup=function(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(i.id===t)return i}},e.convertAVC1ToAVCOTI=function(e){var t,r=e.split(".");return r.length>2?(t=r.shift()+".",t+=parseInt(r.shift()).toString(16),t+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):t=e,t},e.resolve=function(e,t){return s.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,r){var i,a=[],n={},s=!1;function o(e,t){["video","audio"].forEach((function(r){var i=e.filter((function(e){return function(e,t){var r=R[t];return!!r&&!0===r[e.slice(0,4)]}(e,r)}));if(i.length){var a=i.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[r+"Codec"]=a.length>0?a[0]:i[0],e=e.filter((function(e){return-1===i.indexOf(e)}))}})),t.unknownCodecs=e}for(k.lastIndex=0;null!=(i=k.exec(t));)if(i[1]){var l={},d=l.attrs=new _(i[1]);l.url=e.resolve(i[2],r);var u=d.decimalResolution("RESOLUTION");u&&(l.width=u.width,l.height=u.height),l.bitrate=d.decimalInteger("AVERAGE-BANDWIDTH")||d.decimalInteger("BANDWIDTH"),l.name=d.NAME,o([].concat((d.CODECS||"").split(/[ ,]+/)),l),l.videoCodec&&-1!==l.videoCodec.indexOf("avc1")&&(l.videoCodec=e.convertAVC1ToAVCOTI(l.videoCodec)),a.push(l)}else if(i[3]){var c=new _(i[3]);c["DATA-ID"]&&(s=!0,n[c["DATA-ID"]]=c)}return{levels:a,sessionData:s?n:null}},e.parseMasterPlaylistMedia=function(t,r,i,a){var n;void 0===a&&(a=[]);var s=[],o=0;for(w.lastIndex=0;null!==(n=w.exec(t));){var l=new _(n[1]);if(l.TYPE===i){var d={attrs:l,id:o++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE,type:i,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(d.url=e.resolve(l.URI,r)),a.length){var u=e.findGroup(a,d.groupId);d.audioCodec=u?u.codec:a[0].codec}s.push(d)}}return s},e.parseLevelPlaylist=function(e,t,r,i,a){var n,s,o,d=0,c=0,h=new T(t),f=0,g=null,p=new y,m=null;for(L.lastIndex=0;null!==(n=L.exec(e));){var b=n[1];if(b){p.duration=parseFloat(b);var E=(" "+n[2]).slice(1);p.title=E||null,p.tagList.push(E?["INF",b,E]:["INF",b])}else if(n[3]){if(Object(l.a)(p.duration)){var S=d++;p.type=i,p.start=c,o&&(p.levelkey=o),p.sn=S,p.level=r,p.cc=f,p.urlId=a,p.baseurl=t,p.relurl=(" "+n[3]).slice(1),I(p,g),h.fragments.push(p),g=p,c+=p.duration,p=new y}}else if(n[4]){var R=(" "+n[4]).slice(1);g?p.setByteRange(R,g):p.setByteRange(R)}else if(n[5])p.rawProgramDateTime=(" "+n[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),null===m&&(m=h.fragments.length);else{if(!(n=n[0].match(D))){u.b.warn("No matches on slow regex match for level playlist!");continue}for(s=1;s<n.length&&void 0===n[s];s++);var A=(" "+n[s+1]).slice(1),k=(" "+n[s+2]).slice(1);switch(n[s]){case"#":p.tagList.push(k?[A,k]:[A]);break;case"PLAYLIST-TYPE":h.type=A.toUpperCase();break;case"MEDIA-SEQUENCE":d=h.startSN=parseInt(A);break;case"TARGETDURATION":h.targetduration=parseFloat(A);break;case"VERSION":h.version=parseInt(A);break;case"EXTM3U":break;case"ENDLIST":h.live=!1;break;case"DIS":f++,p.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":f=parseInt(A);break;case"KEY":var w=new _(A),C=w.enumeratedString("METHOD"),P=w.URI,x=w.hexadecimalInteger("IV");if("com.apple.streamingkeydelivery"===(w.KEYFORMAT||"identity")){u.b.warn("Keyformat com.apple.streamingkeydelivery is not supported");continue}C&&(o=new v(t,P),P&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(C)>=0&&(o.method=C,o.key=null,o.iv=x));break;case"START":var M=new _(A).decimalFloatingPoint("TIME-OFFSET");Object(l.a)(M)&&(h.startTimeOffset=M);break;case"MAP":var F=new _(A);p.relurl=F.URI,F.BYTERANGE&&p.setByteRange(F.BYTERANGE),p.baseurl=t,p.level=r,p.type=i,p.sn="initSegment",h.initSegment=p,(p=new y).rawProgramDateTime=h.initSegment.rawProgramDateTime;break;default:u.b.warn("line parsed but not handled: "+n)}}}return(p=g)&&!p.relurl&&(h.fragments.pop(),c-=p.duration),h.totalduration=c,h.averagetargetduration=c/h.fragments.length,h.endSN=d-1,h.startCC=h.fragments[0]?h.fragments[0].cc:0,h.endCC=f,!h.initSegment&&h.fragments.length&&h.fragments.every((function(e){return O.test(e.relurl)}))&&(u.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(p=new y).relurl=h.fragments[0].relurl,p.baseurl=t,p.level=r,p.type=i,p.sn="initSegment",h.initSegment=p,h.needSidxRanges=!0),m&&function(e,t){for(var r=e[t],i=t-1;i>=0;i--){var a=e[i];a.programDateTime=r.programDateTime-1e3*a.duration,r=a}}(h.fragments,m),h},e}();function I(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):(null==t?void 0:t.programDateTime)&&(e.programDateTime=t.endProgramDateTime),Object(l.a)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}var P=window.performance,x=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MANIFEST_LOADING,d.a.LEVEL_LOADING,d.a.AUDIO_TRACK_LOADING,d.a.SUBTITLE_TRACK_LOADING)||this).loaders={},r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i.canHaveQualityLevels=function(e){return e!==a.AUDIO_TRACK&&e!==a.SUBTITLE_TRACK},i.mapContextToLevelType=function(e){switch(e.type){case a.AUDIO_TRACK:return n.AUDIO;case a.SUBTITLE_TRACK:return n.SUBTITLE;default:return n.MAIN}},i.getResponseUrl=function(e,t){var r=e.url;return void 0!==r&&0!==r.indexOf("data:")||(r=t.url),r};var s=i.prototype;return s.createInternalLoader=function(e){var t=this.hls.config,r=t.pLoader,i=t.loader,a=new(r||i)(t);return e.loader=a,this.loaders[e.type]=a,a},s.getInternalLoader=function(e){return this.loaders[e.type]},s.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},s.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},s.destroy=function(){this.destroyInternalLoaders(),e.prototype.destroy.call(this)},s.onManifestLoading=function(e){this.load({url:e.url,type:a.MANIFEST,level:0,id:null,responseType:"text"})},s.onLevelLoading=function(e){this.load({url:e.url,type:a.LEVEL,level:e.level,id:e.id,responseType:"text"})},s.onAudioTrackLoading=function(e){this.load({url:e.url,type:a.AUDIO_TRACK,level:null,id:e.id,responseType:"text"})},s.onSubtitleTrackLoading=function(e){this.load({url:e.url,type:a.SUBTITLE_TRACK,level:null,id:e.id,responseType:"text"})},s.load=function(e){var t=this.hls.config;u.b.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var r,i,n,s,o=this.getInternalLoader(e);if(o){var l=o.context;if(l&&l.url===e.url)return u.b.trace("playlist request ongoing"),!1;u.b.warn("aborting previous loader for type: "+e.type),o.abort()}switch(e.type){case a.MANIFEST:r=t.manifestLoadingMaxRetry,i=t.manifestLoadingTimeOut,n=t.manifestLoadingRetryDelay,s=t.manifestLoadingMaxRetryTimeout;break;case a.LEVEL:r=0,s=0,n=0,i=t.levelLoadingTimeOut;break;default:r=t.levelLoadingMaxRetry,i=t.levelLoadingTimeOut,n=t.levelLoadingRetryDelay,s=t.levelLoadingMaxRetryTimeout}o=this.createInternalLoader(e);var d={timeout:i,maxRetry:r,retryDelay:n,maxRetryDelay:s},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return u.b.debug("Calling internal loader delegate for URL: "+e.url),o.load(e,d,c),!0},s.loadsuccess=function(e,t,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this._handleSidxRequest(e,r),void this._handlePlaylistLoaded(e,t,r,i);if(this.resetInternalLoader(r.type),"string"!=typeof e.data)throw new Error('expected responseType of "text" for PlaylistLoader');var a=e.data;t.tload=P.now(),0===a.indexOf("#EXTM3U")?a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,r,i):this._handleMasterPlaylist(e,t,r,i):this._handleManifestParsingError(e,r,"no EXTM3U delimiter",i)},s.loaderror=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!1,e)},s.loadtimeout=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!0)},s._handleMasterPlaylist=function(e,t,r,a){var n=this.hls,s=e.data,o=i.getResponseUrl(e,r),l=C.parseMasterPlaylist(s,o),c=l.levels,h=l.sessionData;if(c.length){var f=c.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),g=C.parseMasterPlaylistMedia(s,o,"AUDIO",f),p=C.parseMasterPlaylistMedia(s,o,"SUBTITLES"),v=C.parseMasterPlaylistMedia(s,o,"CLOSED-CAPTIONS");if(g.length){var m=!1;g.forEach((function(e){e.url||(m=!0)})),!1===m&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(u.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:{},url:""}))}n.trigger(d.a.MANIFEST_LOADED,{levels:c,audioTracks:g,subtitles:p,captions:v,url:o,stats:t,networkDetails:a,sessionData:h})}else this._handleManifestParsingError(e,r,"no level found in manifest",a)},s._handleTrackOrLevelPlaylist=function(e,t,r,n){var s=this.hls,u=r.id,c=r.level,h=r.type,f=i.getResponseUrl(e,r),g=Object(l.a)(u)?u:0,p=Object(l.a)(c)?c:g,v=i.mapContextToLevelType(r),m=C.parseLevelPlaylist(e.data,f,p,v,g);if(m.tload=t.tload,m.fragments.length){if(h===a.MANIFEST){var y={url:f,details:m};s.trigger(d.a.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:f,stats:t,networkDetails:n,sessionData:null})}if(t.tparsed=P.now(),m.needSidxRanges){var b=m.initSegment.url;this.load({url:b,isSidxRequest:!0,type:h,level:c,levelDetails:m,id:u,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else r.levelDetails=m,this._handlePlaylistLoaded(e,t,r,n)}else s.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.LEVEL_EMPTY_ERROR,fatal:!1,url:f,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},s._handleSidxRequest=function(e,t){if("string"==typeof e.data)throw new Error("sidx request must be made with responseType of array buffer");var r=f.a.parseSegmentIndex(new Uint8Array(e.data));if(r){var i=r.references,a=t.levelDetails;i.forEach((function(e,t){var r=e.info;if(a){var i=a.fragments[t];0===i.byteRange.length&&i.setByteRange(String(1+r.end-r.start)+"@"+String(r.start))}})),a&&a.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}},s._handleManifestParsingError=function(e,t,r,i){this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:r,networkDetails:i})},s._handleNetworkError=function(e,t,r,i){var n,s;void 0===r&&(r=!1),void 0===i&&(i=null),u.b.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case a.MANIFEST:n=r?o.a.MANIFEST_LOAD_TIMEOUT:o.a.MANIFEST_LOAD_ERROR,s=!0;break;case a.LEVEL:n=r?o.a.LEVEL_LOAD_TIMEOUT:o.a.LEVEL_LOAD_ERROR,s=!1;break;case a.AUDIO_TRACK:n=r?o.a.AUDIO_TRACK_LOAD_TIMEOUT:o.a.AUDIO_TRACK_LOAD_ERROR,s=!1;break;default:s=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var c={type:o.b.NETWORK_ERROR,details:n,fatal:s,url:e.url,loader:l,context:e,networkDetails:t};i&&(c.response=i),this.hls.trigger(d.a.ERROR,c)},s._handlePlaylistLoaded=function(e,t,r,n){var s=r.type,o=r.level,l=r.id,u=r.levelDetails;if(u&&u.targetduration)if(i.canHaveQualityLevels(r.type))this.hls.trigger(d.a.LEVEL_LOADED,{details:u,level:o||0,id:l||0,stats:t,networkDetails:n});else switch(s){case a.AUDIO_TRACK:this.hls.trigger(d.a.AUDIO_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:n});break;case a.SUBTITLE_TRACK:this.hls.trigger(d.a.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:n})}else this._handleManifestParsingError(e,r,"invalid target duration",n)},i}(h);var M=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.FRAG_LOADING)||this).loaders={},r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){var t=this.loaders;for(var r in t){var i=t[r];i&&i.destroy()}this.loaders={},e.prototype.destroy.call(this)},a.onFragLoading=function(e){var t=e.frag,r=t.type,i=this.loaders,a=this.hls.config,n=a.fLoader,s=a.loader;t.loaded=0;var o,d,c,h=i[r];h&&(u.b.warn("abort previous fragment loader for type: "+r),h.abort()),h=i[r]=t.loader=a.fLoader?new n(a):new s(a),o={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var f=t.byteRangeStartOffset,g=t.byteRangeEndOffset;Object(l.a)(f)&&Object(l.a)(g)&&(o.rangeStart=f,o.rangeEnd=g),d={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},h.load(o,d,c)},a.loadsuccess=function(e,t,r,i){void 0===i&&(i=null);var a=e.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(d.a.FRAG_LOADED,{payload:a,frag:n,stats:t,networkDetails:i})},a.loaderror=function(e,t,r){void 0===r&&(r=null);var i=t.frag,a=i.loader;a&&a.abort(),this.loaders[i.type]=void 0,this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:r})},a.loadtimeout=function(e,t,r){void 0===r&&(r=null);var i=t.frag,a=i.loader;a&&a.abort(),this.loaders[i.type]=void 0,this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:r})},a.loadprogress=function(e,t,r,i){void 0===i&&(i=null);var a=t.frag;a.loaded=e.loaded,this.hls.trigger(d.a.FRAG_LOAD_PROGRESS,{frag:a,stats:e,networkDetails:i})},i}(h);var F=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.KEY_LOADING)||this).loaders={},r.decryptkey=null,r.decrypturl=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){for(var t in this.loaders){var r=this.loaders[t];r&&r.destroy()}this.loaders={},e.prototype.destroy.call(this)},a.onKeyLoading=function(e){var t=e.frag,r=t.type,i=this.loaders[r];if(t.decryptdata){var a=t.decryptdata.uri;if(a!==this.decrypturl||null===this.decryptkey){var n=this.hls.config;if(i&&(u.b.warn("abort previous key loader for type:"+r),i.abort()),!a)return void u.b.warn("key uri is falsy");t.loader=this.loaders[r]=new n.loader(n),this.decrypturl=a,this.decryptkey=null;var s={url:a,frag:t,responseType:"arraybuffer"},o={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:n.fragLoadingRetryDelay,maxRetryDelay:n.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.loader.load(s,o,l)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(d.a.KEY_LOADED,{frag:t}))}else u.b.warn("Missing decryption data on fragment in onKeyLoading")},a.loadsuccess=function(e,t,r){var i=r.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,delete this.loaders[i.type],this.hls.trigger(d.a.KEY_LOADED,{frag:i})):u.b.error("after key load, decryptdata unset")},a.loaderror=function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})},a.loadtimeout=function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},i}(h);var U="NOT_LOADED",N="APPENDING",B="PARTIAL",G="OK",K=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.BUFFER_APPENDED,d.a.FRAG_BUFFERED,d.a.FRAG_LOADED)||this).bufferPadding=.2,r.fragments=Object.create(null),r.timeRanges=Object.create(null),r.config=t.config,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,h.prototype.destroy.call(this),e.prototype.destroy.call(this)},a.getBufferedFrag=function(e,t){var r=this.fragments,i=Object.keys(r).filter((function(i){var a=r[i];if(a.body.type!==t)return!1;if(!a.buffered)return!1;var n=a.body;return n.startPTS<=e&&e<=n.endPTS}));if(0===i.length)return null;var a=i.pop();return r[a].body},a.detectEvictedFragments=function(e,t){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a&&a.buffered){var n=a.range[e];if(n)for(var s=n.time,o=0;o<s.length;o++){var l=s[o];if(!r.isTimeBuffered(l.startPTS,l.endPTS,t)){r.removeFragment(a.body);break}}}}))},a.detectPartialFragments=function(e){var t=this,r=this.getFragmentKey(e),i=this.fragments[r];i&&(i.buffered=!0,Object.keys(this.timeRanges).forEach((function(r){if(e.hasElementaryStream(r)){var a=t.timeRanges[r];i.range[r]=t.getBufferedTimes(e.startPTS,e.endPTS,a)}})))},a.getBufferedTimes=function(e,t,r){for(var i,a,n=[],s=!1,o=0;o<r.length;o++){if(i=r.start(o)-this.bufferPadding,a=r.end(o)+this.bufferPadding,e>=i&&t<=a){n.push({startPTS:Math.max(e,r.start(o)),endPTS:Math.min(t,r.end(o))});break}if(e<a&&t>i)n.push({startPTS:Math.max(e,r.start(o)),endPTS:Math.min(t,r.end(o))}),s=!0;else if(t<=i)break}return{time:n,partial:s}},a.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},a.getPartialFragment=function(e){var t,r,i,a=this,n=null,s=0;return Object.keys(this.fragments).forEach((function(o){var l=a.fragments[o];a.isPartial(l)&&(r=l.body.startPTS-a.bufferPadding,i=l.body.endPTS+a.bufferPadding,e>=r&&e<=i&&(t=Math.min(e-r,i-e),s<=t&&(n=l.body,s=t)))})),n},a.getState=function(e){var t=this.getFragmentKey(e),r=this.fragments[t],i=U;return void 0!==r&&(i=r.buffered?!0===this.isPartial(r)?B:G:N),i},a.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},a.isTimeBuffered=function(e,t,r){for(var i,a,n=0;n<r.length;n++){if(i=r.start(n)-this.bufferPadding,a=r.end(n)+this.bufferPadding,e>=i&&t<=a)return!0;if(t<=i)return!1}return!1},a.onFragLoaded=function(e){var t=e.frag;Object(l.a)(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})},a.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var r=t.timeRanges[e];t.detectEvictedFragments(e,r)}))},a.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},a.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},a.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},a.removeAllFragments=function(){this.fragments=Object.create(null)},i}(h),j={search:function(e,t){for(var r=0,i=e.length-1,a=null,n=null;r<=i;){var s=t(n=e[a=(r+i)/2|0]);if(s>0)r=a+1;else{if(!(s<0))return n;i=a-1}}return null}},H=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var r=e.buffered,i=0;i<r.length;i++)if(t>=r.start(i)&&t<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,r){try{if(e){var i,a=e.buffered,n=[];for(i=0;i<a.length;i++)n.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(n,t,r)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,r){e.sort((function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(r)for(var a=0;a<e.length;a++){var n=i.length;if(n){var s=i[n-1].end;e[a].start-s<r?e[a].end>s&&(i[n-1].end=e[a].end):i.push(e[a])}else i.push(e[a])}else i=e;for(var o,l=0,d=t,u=t,c=0;c<i.length;c++){var h=i[c].start,f=i[c].end;if(t+r>=h&&t<f)d=h,l=(u=f)-t;else if(t+r<h){o=h;break}}return{len:l,start:d,end:u,nextStart:o}},e}(),V=r(8),Y=r(11),W=r(9);function q(){return window.MediaSource||window.WebKitMediaSource}var X=r(5);var z=function(e){var t,r;function i(){return e.apply(this,arguments)||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i.prototype.trigger=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.emit.apply(this,[e,e].concat(r))},i}(V.EventEmitter),Q=Object(X.a)(),$=q()||{isTypeSupported:function(){return!1}},J=function(){function e(e,t){var r=this;this.hls=e,this.id=t;var i=this.observer=new z,a=e.config,n=function(t,i){(i=i||{}).frag=r.frag,i.id=r.id,e.trigger(t,i)};i.on(d.a.FRAG_DECRYPTED,n),i.on(d.a.FRAG_PARSING_INIT_SEGMENT,n),i.on(d.a.FRAG_PARSING_DATA,n),i.on(d.a.FRAG_PARSED,n),i.on(d.a.ERROR,n),i.on(d.a.FRAG_PARSING_METADATA,n),i.on(d.a.FRAG_PARSING_USERDATA,n),i.on(d.a.INIT_PTS_FOUND,n);var s={mp4:$.isTypeSupported("video/mp4"),mpeg:$.isTypeSupported("audio/mpeg"),mp3:$.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(a.enableWorker&&"undefined"!=typeof Worker){var c;u.b.log("demuxing in webworker");try{c=this.w=Y(12),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(t){e.trigger(d.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},c.postMessage({cmd:"init",typeSupported:s,vendor:l,id:t,config:JSON.stringify(a)})}catch(e){u.b.warn("Error in worker:",e),u.b.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),c&&Q.URL.revokeObjectURL(c.objectURL),this.demuxer=new W.a(i,s,a,l),this.w=void 0}}else this.demuxer=new W.a(i,s,a,l)}var t=e.prototype;return t.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var r=this.observer;r&&(r.removeAllListeners(),this.observer=null)},t.push=function(e,t,r,i,a,n,s,o){var d=this.w,c=Object(l.a)(a.startPTS)?a.startPTS:a.start,h=a.decryptdata,f=this.frag,g=!(f&&a.cc===f.cc),p=!(f&&a.level===f.level),v=f&&a.sn===f.sn+1,m=!p&&v;if(g&&u.b.log(this.id+":discontinuity detected"),p&&u.b.log(this.id+":switch detected"),this.frag=a,d)d.postMessage({cmd:"demux",data:e,decryptdata:h,initSegment:t,audioCodec:r,videoCodec:i,timeOffset:c,discontinuity:g,trackSwitch:p,contiguous:m,duration:n,accurateTimeOffset:s,defaultInitPTS:o},e instanceof ArrayBuffer?[e]:[]);else{var y=this.demuxer;y&&y.push(e,h,t,r,i,c,g,p,m,n,s,o)}},t.onWorkerMessage=function(e){var t=e.data,r=this.hls;switch(t.event){case"init":Q.URL.revokeObjectURL(this.w.objectURL);break;case d.a.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,r.trigger(t.event,t.data)}},e}();function Z(e,t,r){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(r);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(r)}}function ee(e,t,r){var i=e[t],a=e[r],n=a.startPTS;if(Object(l.a)(n))r>t?(i.duration=n-i.start,i.duration<0&&u.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&u.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"));else if(r>t){var s=i.cc===a.cc;a.start=i.start+(s&&i.minEndPTS?i.minEndPTS-i.start:i.duration)}else a.start=Math.max(i.start-a.duration,0)}function te(e,t,r,i,a,n){var s=r,o=i;if(Object(l.a)(t.startPTS)){var d=Math.abs(t.startPTS-r);Object(l.a)(t.deltaPTS)?t.deltaPTS=Math.max(d,t.deltaPTS):t.deltaPTS=d,s=Math.max(r,t.startPTS),r=Math.min(r,t.startPTS),o=Math.min(i,t.endPTS),i=Math.max(i,t.endPTS),a=Math.min(a,t.startDTS),n=Math.max(n,t.endDTS)}var u=r-t.start;t.start=t.startPTS=r,t.maxStartPTS=s,t.endPTS=i,t.minEndPTS=o,t.startDTS=a,t.endDTS=n,t.duration=i-r;var c,h,f,g=t.sn;if(!e||g<e.startSN||g>e.endSN)return 0;for(c=g-e.startSN,(h=e.fragments)[c]=t,f=c;f>0;f--)ee(h,f,f-1);for(f=c;f<h.length-1;f++)ee(h,f,f+1);return e.PTSKnown=!0,u}function re(e,t){t.initSegment&&e.initSegment&&(t.initSegment=e.initSegment);var r,i=0;if(ie(e,t,(function(e,a){i=e.cc-a.cc,Object(l.a)(e.startPTS)&&(a.start=a.startPTS=e.startPTS,a.endPTS=e.endPTS,a.duration=e.duration,a.backtracked=e.backtracked,a.dropped=e.dropped,r=a),t.PTSKnown=!0})),t.PTSKnown){if(i){u.b.log("discontinuity sliding from playlist, take drift into account");for(var a=t.fragments,n=0;n<a.length;n++)a[n].cc+=i}r?te(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):function(e,t){var r=t.startSN-e.startSN,i=e.fragments,a=t.fragments;if(r<0||r>i.length)return;for(var n=0;n<a.length;n++)a[n].start+=i[r].start}(e,t),t.PTSKnown=e.PTSKnown}}function ie(e,t,r){if(e&&t)for(var i=Math.max(e.startSN,t.startSN)-t.startSN,a=Math.min(e.endSN,t.endSN)-t.startSN,n=t.startSN-e.startSN,s=i;s<=a;s++){var o=e.fragments[n+s],l=t.fragments[s];if(!o||!l)break;r(o,l,s)}}function ae(e,t,r){var i=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),a=i/2;return e&&t.endSN===e.endSN&&(i=a),r&&(i=Math.max(a,i-(window.performance.now()-r))),Math.round(i)}var ne={toString:function(e){for(var t="",r=e.length,i=0;i<r;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}};function se(e,t){t.fragments.forEach((function(t){if(t){var r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}})),t.PTSKnown=!0}function oe(e,t,r){!function(e,t,r){if(function(e,t,r){var i=!1;return t&&t.details&&r&&(r.endCC>r.startCC||e&&e.cc<r.startCC)&&(i=!0),i}(e,r,t)){var i=function(e,t){var r=e.fragments,i=t.fragments;if(i.length&&r.length){var a=function(e,t){for(var r=null,i=0;i<e.length;i+=1){var a=e[i];if(a&&a.cc===t){r=a;break}}return r}(r,i[0].cc);if(a&&(!a||a.startPTS))return a;u.b.log("No frag in previous level to align on")}else u.b.log("No fragments to align")}(r.details,t);i&&(u.b.log("Adjusting PTS using last level due to CC increase within current level"),se(i.start,t))}}(e,r,t),!r.PTSKnown&&t&&function(e,t){if(t&&t.fragments.length){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;var r=t.fragments[0].programDateTime,i=(e.fragments[0].programDateTime-r)/1e3+t.fragments[0].start;Object(l.a)(i)&&(u.b.log("adjusting PTS using programDateTime delta, sliding:"+i.toFixed(3)),se(i,e))}}(r,t.details)}function le(e,t,r){if(null===t||!Array.isArray(e)||!e.length||!Object(l.a)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<e.length;++i){var a=e[i];if(ce(t,r,a))return a}return null}function de(e,t,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var a=null;if(e?a=t[e.sn-t[0].sn+1]:0===r&&0===t[0].start&&(a=t[0]),a&&0===ue(r,i,a))return a;var n=j.search(t,ue.bind(null,r,i));return n||a}function ue(e,t,r){void 0===e&&(e=0),void 0===t&&(t=0);var i=Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=e?1:r.start-i>e&&r.start?-1:0}function ce(e,t,r){var i=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>e}var he=function(){function e(e,t,r,i){this.config=e,this.media=t,this.fragmentTracker=r,this.hls=i,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var t=e.prototype;return t.poll=function(e){var t=this.config,r=this.media,i=this.stalled,a=r.currentTime,n=r.seeking,s=this.seeking&&!n,o=!this.seeking&&n;if(this.seeking=n,a===e){if((o||s)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&r.buffered.length){var l=H.bufferInfo(r,a,0),d=l.len>0,c=l.nextStart||0;if(d||c){if(n){var h=l.len>2,f=!c||c-a>2&&!this.fragmentTracker.getPartialFragment(a);if(h||f)return;this.moved=!1}if(!this.moved&&this.stalled){var g=Math.max(c,l.start||0)-a;if(g>0&&g<=2)return void this._trySkipBufferHole(null)}var p=self.performance.now();if(null!==i){var v=p-i;!n&&v>=250&&this._reportStall(l.len);var m=H.bufferInfo(r,a,t.maxBufferHole);this._tryFixBufferStall(m,v)}else this.stalled=p}}}else if(this.moved=!0,null!==i){if(this.stallReported){var y=self.performance.now()-i;u.b.warn("playback not stuck anymore @"+a+", after "+Math.round(y)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var r=this.config,i=this.fragmentTracker,a=this.media.currentTime,n=i.getPartialFragment(a);if(n&&this._trySkipBufferHole(n))return;e.len>r.maxBufferHole&&t>1e3*r.highBufferWatchdogPeriod&&(u.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,u.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,r=this.hls,i=this.media,a=i.currentTime,n=0,s=0;s<i.buffered.length;s++){var l=i.buffered.start(s);if(a+t.maxBufferHole>=n&&a<l){var c=Math.max(l+.05,i.currentTime+.1);return u.b.warn("skipping hole, adjusting currentTime from "+a+" to "+c),this.moved=!0,this.stalled=null,i.currentTime=c,e&&r.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+c,frag:e}),c}n=i.buffered.end(s)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,r=this.media,i=r.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<e.nudgeMaxRetry){var n=i+a*e.nudgeOffset;u.b.warn("Nudging 'currentTime' from "+i+" to "+n),r.currentTime=n,t.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else u.b.error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_STALLED_ERROR,fatal:!0})},e}();function fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ge=function(e){var t,r;function i(t){for(var r,i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return(r=e.call.apply(e,[this,t].concat(a))||this)._boundTick=void 0,r._tickTimer=null,r._tickInterval=null,r._tickCallCount=0,r._boundTick=r.tick.bind(fe(r)),r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},a.hasInterval=function(){return!!this._tickInterval},a.hasNextTick=function(){return!!this._tickTimer},a.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},a.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},a.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},a.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},a.doTick=function(){},i}(h);var pe="STOPPED",ve="STARTING",me="IDLE",ye="PAUSED",be="KEY_LOADING",Te="FRAG_LOADING",Ee="FRAG_LOADING_WAITING_RETRY",Se="WAITING_TRACK",_e="PARSING",Re="PARSED",Ae="BUFFER_FLUSHING",ke="ENDED",we="ERROR",Le="WAITING_INIT_PTS",De="WAITING_LEVEL",Oe=function(e){var t,r;function i(){return e.apply(this,arguments)||this}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.doTick=function(){},a.startLoad=function(){},a.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=pe},a._streamEnded=function(e,t){var r=this.fragCurrent,i=this.fragmentTracker;if(!t.live&&r&&!r.backtracked&&r.sn===t.endSN&&!e.nextStart){var a=i.getState(r);return a===B||a===G}return!1},a.onMediaSeeking=function(){var e=this.config,t=this.media,r=this.mediaBuffer,i=this.state,a=t?t.currentTime:null,n=H.bufferInfo(r||t,a,this.config.maxBufferHole);if(u.b.log("media seeking to "+(Object(l.a)(a)?a.toFixed(3):a)),i===Te){var s=this.fragCurrent;if(0===n.len&&s){var o=e.maxFragLookUpTolerance,d=s.start-o,c=s.start+s.duration+o;a<d||a>c?(s.loader&&(u.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),s.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=me):u.b.log("seeking outside of buffer but within currently loaded fragment range")}}else i===ke&&(0===n.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=me);t&&(this.lastCurrentTime=a),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=a),this.tick()},a.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},a.onHandlerDestroyed=function(){this.state=pe,this.fragmentTracker=null},a.computeLivePosition=function(e,t){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-r)},i}(ge);function Ce(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ie,Pe=function(e){var t,r;function i(t,r){var i;return(i=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.MANIFEST_LOADING,d.a.MANIFEST_PARSED,d.a.LEVEL_LOADED,d.a.LEVELS_UPDATED,d.a.KEY_LOADED,d.a.FRAG_LOADED,d.a.FRAG_LOAD_EMERGENCY_ABORTED,d.a.FRAG_PARSING_INIT_SEGMENT,d.a.FRAG_PARSING_DATA,d.a.FRAG_PARSED,d.a.ERROR,d.a.AUDIO_TRACK_SWITCHING,d.a.AUDIO_TRACK_SWITCHED,d.a.BUFFER_CREATED,d.a.BUFFER_APPENDED,d.a.BUFFER_FLUSHED)||this).fragmentTracker=r,i.config=t.config,i.audioCodecSwap=!1,i._state=pe,i.stallReported=!1,i.gapController=null,i.altAudio=!1,i.audioOnly=!1,i.bitrateTest=!1,i}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,s,c,h=i.prototype;return h.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=r.startLevel;-1===i&&(r.config.testBandwidth?(i=0,this.bitrateTest=!0):i=r.nextAutoLevel),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}t>0&&-1===e&&(u.b.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=me,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=pe},h.stopLoad=function(){this.forceStartLoad=!1,e.prototype.stopLoad.call(this)},h.doTick=function(){switch(this.state){case Ae:this.fragLoadError=0;break;case me:this._doTickIdle();break;case De:var e=this.levels[this.level];e&&e.details&&(this.state=me);break;case Ee:var t=window.performance.now(),r=this.retryDate;(!r||t>=r||this.media&&this.media.seeking)&&(u.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=me)}this._checkBuffer(),this._checkFragmentChanged()},h._doTickIdle=function(){var e=this.hls,t=e.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&t.startFragPrefetch))if(this.altAudio&&this.audioOnly)this.demuxer.frag=null;else{var i;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=e.nextLoadLevel,n=this.levels[a];if(n){var s,o=n.bitrate;s=o?Math.max(8*t.maxBufferSize/o,t.maxBufferLength):t.maxBufferLength,s=Math.min(s,t.maxMaxBufferLength);var l=i<t.maxBufferHole?Math.max(2,t.maxBufferHole):t.maxBufferHole,c=H.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,l),h=c.len;if(!(h>=s)){u.b.trace("buffer length of "+h.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=a;var f=n.details;if(!f||f.live&&this.levelLastLoaded!==a)this.state=De;else{if(this._streamEnded(c,f)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(d.a.BUFFER_EOS,g),void(this.state=ke)}this._fetchPayloadOrEos(i,c,f)}}}}},h._fetchPayloadOrEos=function(e,t,r){var i=this.fragPrevious,a=(this.level,r.fragments),n=a.length;if(0!==n){var s,o=a[0].start,l=a[n-1].start+a[n-1].duration,d=t.end;if(r.initSegment&&!r.initSegment.data)s=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(n<c)return void u.b.warn("Can not start playback of a level, reason: not enough fragments "+n+" < "+c);if(null===(s=this._ensureFragmentAtLivePoint(r,d,o,l,i,a)))return}else d<o&&(s=a[0]);s||(s=this._findFragment(o,i,n,a,d,l,r)),s&&(s.encrypted?this._loadKey(s,r):this._loadFragment(s,r,e,d))}},h._ensureFragmentAtLivePoint=function(e,t,r,i,a,n){var s,o=this.hls.config,d=this.media,c=1/0;if(void 0!==o.liveMaxLatencyDuration?c=o.liveMaxLatencyDuration:Object(l.a)(o.liveMaxLatencyDurationCount)&&(c=o.liveMaxLatencyDurationCount*e.targetduration),t<Math.max(r-o.maxFragLookUpTolerance,i-c)){var h=this.liveSyncPosition=this.computeLivePosition(r,e);t=h,d&&!d.paused&&d.readyState&&d.duration>h&&h>d.currentTime&&(u.b.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+h.toFixed(3)),d.currentTime=h),this.nextLoadPosition=h}if(e.PTSKnown&&t>i&&d&&d.readyState)return null;if(this.startFragRequested&&!e.PTSKnown&&a)if(e.hasProgramDateTime)u.b.log("live playlist, switching playlist, load frag with same PDT: "+a.programDateTime),s=le(n,a.endProgramDateTime,o.maxFragLookUpTolerance);else{var f=a.sn+1;if(f>=e.startSN&&f<=e.endSN){var g=n[f-e.startSN];a.cc===g.cc&&(s=g,u.b.log("live playlist, switching playlist, load frag with next SN: "+s.sn))}s||(s=j.search(n,(function(e){return a.cc-e.cc})))&&u.b.log("live playlist, switching playlist, load frag with same CC: "+s.sn)}return s},h._findFragment=function(e,t,r,i,a,n,s){var o,l=this.hls.config;a<n?o=de(t,i,a,a>n-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):o=i[r-1];if(o){var d=o.sn-s.startSN,c=t&&o.level===t.level,h=i[d-1],f=i[d+1];if(t&&o.sn===t.sn)if(c&&!o.backtracked)if(o.sn<s.endSN){var g=t.deltaPTS;g&&g>l.maxBufferHole&&t.dropped&&d?(o=h,u.b.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(o=f,this.fragmentTracker.getState(o)!==G&&u.b.log("Re-loading fragment with SN: "+o.sn))}else o=null;else o.backtracked&&(f&&f.backtracked?(u.b.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+f.sn),o=f):(u.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,h?(o=h).backtracked=!0:d&&(o=null)))}return o},h._loadKey=function(e,t){u.b.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], level "+this.level),this.state=be,this.hls.trigger(d.a.KEY_LOADING,{frag:e})},h._loadFragment=function(e,t,r,i){var a=this.fragmentTracker.getState(e);this.fragCurrent=e,"initSegment"!==e.sn&&(this.startFragRequested=!0),Object(l.a)(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||a===U||a===B?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,u.b.log("Loading "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], level "+this.level+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+parseFloat(r.toFixed(3))+", bufferEnd: "+parseFloat(i.toFixed(3))),this.hls.trigger(d.a.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new J(this.hls,"main")),this.state=Te):a===N&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)},h.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,n.MAIN)},h.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},h._checkFragmentChanged=function(){var e,t,r=this.media;if(r&&r.readyState&&!1===r.seeking&&((t=r.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),H.isBuffered(r,t)?e=this.getBufferedFrag(t):H.isBuffered(r,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var i=e;if(i!==this.fragPlaying){this.hls.trigger(d.a.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(d.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},h.immediateLevelSwitch=function(){if(u.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e,t=this.media;t?(e=t.paused)||t.pause():e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},h.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,e.currentTime>0&&H.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},h.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t,r=this.getBufferedFrag(e.currentTime);if(r&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,a=this.levels[i],n=this.fragLastKbps;t=n&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*n)+1:0}var s=this.getBufferedFrag(e.currentTime+t);if(s){var o=this.followingBufferedFrag(s);if(o){var l=this.fragCurrent;l&&l.loader&&l.loader.abort(),this.fragCurrent=null;var d=Math.max(s.endPTS,o.maxStartPTS+Math.min(this.config.maxFragLookUpTolerance,o.duration));this.flushMainBuffer(d,Number.POSITIVE_INFINITY)}}}},h.flushMainBuffer=function(e,t){this.state=Ae;var r={startOffset:e,endOffset:t};this.altAudio&&(r.type="video"),this.hls.trigger(d.a.BUFFER_FLUSHING,r)},h.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition),this.gapController=new he(r,t,this.fragmentTracker,this.hls)},h.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(u.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},h.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;Object(l.a)(t)&&u.b.log("media seeked to "+t.toFixed(3)),this.tick()},h.onManifestLoading=function(){u.b.log("trigger BUFFER_RESET"),this.hls.trigger(d.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},h.onManifestParsed=function(e){var t,r=!1,i=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(r=!0),-1!==t.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i,this.audioCodecSwitch&&u.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=e.altAudio,this.levels=e.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},h.onLevelLoaded=function(e){var t=e.details,r=e.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],n=t.totalduration,s=0;if(u.b.log("level "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+n),t.live||a.details&&a.details.live){var o=a.details;o&&t.fragments.length>0?(re(o,t),s=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(s,o),t.PTSKnown&&Object(l.a)(s)?u.b.log("live playlist sliding:"+s.toFixed(3)):(u.b.log("live playlist - outdated PTS, unknown sliding"),oe(this.fragPrevious,i,t))):(u.b.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,oe(this.fragPrevious,i,t))}else t.PTSKnown=!1;if(a.details=t,this.levelLastLoaded=r,this.hls.trigger(d.a.LEVEL_UPDATED,{details:t,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var c=t.startTimeOffset;Object(l.a)(c)?(c<0&&(u.b.log("negative start time offset "+c+", count from end of last fragment"),c=s+n+c),u.b.log("start time offset found in playlist, adjust startPosition to "+c),this.startPosition=c):t.live?(this.startPosition=this.computeLivePosition(s,t),u.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===De&&(this.state=me),this.tick()},h.onKeyLoaded=function(){this.state===be&&(this.state=me,this.tick())},h.onFragLoaded=function(e){var t=this.fragCurrent,r=this.hls,i=this.levels,a=this.media,n=e.frag;if(this.state===Te&&t&&"main"===n.type&&n.level===t.level&&n.sn===t.sn){var s=e.stats,o=i[t.level],l=o.details;if(this.bitrateTest=!1,this.stats=s,u.b.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),n.bitrateTest&&r.nextLoadLevel)this.state=me,this.startFragRequested=!1,s.tparsed=s.tbuffered=window.performance.now(),r.trigger(d.a.FRAG_BUFFERED,{stats:s,frag:t,id:"main"}),this.tick();else if("initSegment"===n.sn)this.state=me,s.tparsed=s.tbuffered=window.performance.now(),l.initSegment.data=e.payload,r.trigger(d.a.FRAG_BUFFERED,{stats:s,frag:t,id:"main"}),this.tick();else{u.b.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=_e,this.pendingBuffering=!0,this.appended=!1,n.bitrateTest&&(n.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:n}));var c=!(a&&a.seeking)&&(l.PTSKnown||!l.live),h=l.initSegment?l.initSegment.data:[],f=this._getAudioCodec(o);(this.demuxer=this.demuxer||new J(this.hls,"main")).push(e.payload,h,f,o.videoCodec,t,l.totalduration,c)}}this.fragLoadError=0},h.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e){var i,a,n=e.tracks;if(this.audioOnly=n.audio&&!n.video,this.altAudio&&!this.audioOnly&&delete n.audio,a=n.audio){var s=this.levels[this.level].audioCodec,o=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(u.b.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===o.indexOf("firefox")&&(s="mp4a.40.5"),-1!==o.indexOf("android")&&"audio/mpeg"!==a.container&&(s="mp4a.40.2",u.b.log("Android: force audio codec to "+s)),a.levelCodec=s,a.id=e.id}for(i in(a=n.video)&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=e.id),this.hls.trigger(d.a.BUFFER_CODECS,n),n){a=n[i],u.b.log("main track:"+i+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var l=a.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(d.a.BUFFER_APPENDING,{type:i,data:l,parent:"main",content:"initSegment"}))}this.tick()}},h.onFragParsingData=function(e){var t=this,r=this.fragCurrent,i=e.frag;if(r&&"main"===e.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==e.type||!this.altAudio)&&this.state===_e){var a=this.levels[this.level],n=r;if(Object(l.a)(e.endPTS)||(e.endPTS=e.startPTS+r.duration,e.endDTS=e.startDTS+r.duration),!0===e.hasAudio&&n.addElementaryStream(p.AUDIO),!0===e.hasVideo&&n.addElementaryStream(p.VIDEO),u.b.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(n.dropped=e.dropped,n.dropped)if(n.backtracked)u.b.warn("Already backtracked on this fragment, appending with the gap",n.sn);else{var s=a.details;if(!s||n.sn!==s.startSN)return u.b.warn("missing video frame(s), backtracking fragment",n.sn),this.fragmentTracker.removeFragment(n),n.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=me,this.fragPrevious=n,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),void this.tick();u.b.warn("missing video frame(s) on first frag, appending with gap",n.sn)}else n.backtracked=!1;var o=te(a.details,n,e.startPTS,e.endPTS,e.startDTS,e.endDTS),c=this.hls;c.trigger(d.a.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:o,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach((function(r){r&&r.length&&t.state===_e&&(t.appended=!0,t.pendingBuffering=!0,c.trigger(d.a.BUFFER_APPENDING,{type:e.type,data:r,parent:"main",content:"data"}))})),this.tick()}},h.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e&&(this.stats.tparsed=window.performance.now(),this.state=Re,this._checkAppendedParsed())},h.onAudioTrackSwitching=function(e){var t=this.altAudio,r=!!e.url,i=e.id;if(!r){if(this.mediaBuffer!==this.media){u.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a.loader&&(u.b.log("switching to main audio track, cancel main fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=me}var n=this.hls;t&&n.trigger(d.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),n.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:i})}},h.onAudioTrackSwitched=function(e){var t=e.id,r=!!this.hls.audioTracks[t].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(u.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},h.onBufferCreated=function(e){var t,r,i=e.tracks,a=!1;for(var n in i){var s=i[n];"main"===s.id?(r=n,t=s,"video"===n&&(this.videoBuffer=i[n].buffer)):a=!0}a&&t?(u.b.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},h.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==_e&&t!==Re||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},h._checkAppendedParsed=function(){if(!(this.state!==Re||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;u.b.log("main buffered : "+ne.toString(t.buffered)),this.fragPrevious=e;var r=this.stats;r.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(d.a.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.state=me}(this.loadedmetadata||this.startPosition<=0)&&this.tick()}},h.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var r=!!this.media&&H.isBuffered(this.media,this.media.currentTime)&&H.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);u.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Ee}else u.b.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=we;break;case o.a.LEVEL_LOAD_ERROR:case o.a.LEVEL_LOAD_TIMEOUT:this.state!==we&&(e.fatal?(this.state=we,u.b.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==De||(this.state=me));break;case o.a.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==_e&&this.state!==Re||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=me):(u.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},h._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,u.b.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},h._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},h.onFragLoadEmergencyAborted=function(){this.state=me,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},h.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;if(e){var t=this.audioOnly?p.AUDIO:p.VIDEO;this.fragmentTracker.detectEvictedFragments(t,e.buffered)}this.state=me,this.fragPrevious=null},h.onLevelsUpdated=function(e){this.levels=e.levels},h.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},h._seekToStartPos=function(){var e=this.media,t=e.currentTime,r=this.startPosition;if(t!==r&&r>=0){if(e.seeking)return void u.b.log("could not seek to "+r+", already seeking at "+t);var i=(e.buffered.length?e.buffered.start(0):0)-r;i>0&&i<this.config.maxBufferHole&&(u.b.log("adjusting start position by "+i+" to match buffer start"),r+=i,this.startPosition=r),u.b.log("seek to target start position "+r+" from current time "+t+". ready state "+e.readyState),e.currentTime=r}},h._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(u.b.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},a=i,(s=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,u.b.log("main stream-controller: "+t+"->"+e),this.hls.trigger(d.a.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}])&&Ce(a.prototype,s),c&&Ce(a,c),i}(Oe);function xe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Me=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MANIFEST_LOADED,d.a.LEVEL_LOADED,d.a.AUDIO_TRACK_SWITCHED,d.a.FRAG_LOADED,d.a.ERROR)||this).canload=!1,r.currentLevelIndex=null,r.manualLevelIndex=-1,r.timer=null,Ie=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,l=i.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach((function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)})),null!==this.timer&&this.loadLevel()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(e){var t,r=[],i=[],a={},n=null,s=!1,l=!1;if(e.levels.forEach((function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,s=s||!!e.videoCodec,l=l||!!e.audioCodec,Ie&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(n=a[e.bitrate])?n.url.push(e.url):(e.url=[e.url],e.urlId=0,a[e.bitrate]=e,r.push(e)),t&&(t.AUDIO&&Z(n||e,"audio",t.AUDIO),t.SUBTITLES&&Z(n||e,"text",t.SUBTITLES))})),s&&l&&(r=r.filter((function(e){return!!e.videoCodec}))),r=r.filter((function(e){var t=e.audioCodec,r=e.videoCodec;return(!t||A(t,"audio"))&&(!r||A(r,"video"))})),e.audioTracks&&(i=e.audioTracks.filter((function(e){return!e.audioCodec||A(e.audioCodec,"audio")}))).forEach((function(e,t){e.id=t})),r.length>0){t=r[0].bitrate,r.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=r;for(var c=0;c<r.length;c++)if(r[c].bitrate===t){this._firstLevel=c,u.b.log("manifest loaded,"+r.length+" level(s) found, first bitrate:"+t);break}var h=l&&!s;this.hls.trigger(d.a.MANIFEST_PARSED,{levels:r,audioTracks:i,firstLevel:this._firstLevel,stats:e.stats,audio:l,video:s,altAudio:!h&&i.some((function(e){return!!e.url}))})}else this.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(e){var t=this._levels,r=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){u.b.log("switching to level "+e),this.currentLevelIndex=e;var i=t[e];i.level=e,r.trigger(d.a.LEVEL_SWITCHING,i)}var a=t[e],n=a.details;if(!n||n.live){var s=a.urlId;r.trigger(d.a.LEVEL_LOADING,{url:a.url[s],level:e,id:s})}}else r.trigger(d.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},l.onError=function(e){if(e.fatal)e.type===o.b.NETWORK_ERROR&&this.clearTimer();else{var t,r=!1,i=!1;switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:t=e.frag.level,i=!0;break;case o.a.LEVEL_LOAD_ERROR:case o.a.LEVEL_LOAD_TIMEOUT:t=e.context.level,r=!0;break;case o.a.REMUX_ALLOC_ERROR:t=e.level,r=!0}void 0!==t&&this.recoverLevel(e,t,r,i)}},l.recoverLevel=function(e,t,r,i){var a,n,s,o=this,l=this.hls.config,d=e.details,c=this._levels[t];if(c.loadError++,c.fragmentError=i,r){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return u.b.error("level controller, cannot recover from "+d+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);n=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return o.loadLevel()}),n),e.levelRetry=!0,this.levelRetryCount++,u.b.warn("level controller, "+d+", retry in "+n+" ms, current retry count is "+this.levelRetryCount)}(r||i)&&((a=c.url.length)>1&&c.loadError<a?(c.urlId=(c.urlId+1)%a,c.details=void 0,u.b.warn("level controller, "+d+" for level "+t+": switching to redundant URL-id "+c.urlId)):-1===this.manualLevelIndex?(s=0===t?this._levels.length-1:t-1,u.b.warn("level controller, "+d+": switch to "+s),this.hls.nextAutoLevel=this.currentLevelIndex=s):i&&(u.b.warn("level controller, "+d+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var r=this._levels[t.level];void 0!==r&&(r.fragmentError=!1,r.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(e){var t=this,r=e.level,i=e.details;if(r===this.currentLevelIndex){var a=this._levels[r];if(a.fragmentError||(a.loadError=0,this.levelRetryCount=0),i.live){var n=ae(a.details,i,e.stats.trequest);u.b.log("live playlist, reload in "+Math.round(n)+" ms"),this.timer=setTimeout((function(){return t.loadLevel()}),n)}else this.clearTimer()}},l.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var i=-1,a=0;a<r.audioGroupIds.length;a++)if(r.audioGroupIds[a]===t){i=a;break}i!==r.urlId&&(r.urlId=i,this.startLoad())}},l.loadLevel=function(){if(u.b.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,r=e.urlId,i=e.url[r];u.b.log("Attempt loading level index "+t+" with URL-id "+r),this.hls.trigger(d.a.LEVEL_LOADING,{url:i,level:t,id:r})}}},l.removeLevel=function(e,t){var r=this.levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter((function(e,r){return r!==t})),r.urlId=0,!0)})).map((function(e,t){var r=e.details;return r&&r.fragments&&r.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(d.a.LEVELS_UPDATED,{levels:r})},a=i,(n=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&xe(a.prototype,n),s&&xe(a,s),i}(h),Fe=r(4);function Ue(e,t){var r;try{r=new Event("addtrack")}catch(e){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=e,t.dispatchEvent(r)}function Ne(e){if(null==e?void 0:e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}var Be=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.FRAG_PARSING_METADATA,d.a.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,r.media=void 0,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){h.prototype.destroy.call(this)},a.onMediaAttached=function(e){this.media=e.media,this.media},a.onMediaDetaching=function(){Ne(this.id3Track),this.id3Track=void 0,this.media=void 0},a.getID3Track=function(e){for(var t=0;t<e.length;t++){var r=e[t];if("metadata"===r.kind&&"id3"===r.label)return Ue(r,this.media),r}return this.media.addTextTrack("metadata","id3")},a.onFragParsingMetadata=function(e){var t=e.frag,r=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,a=0;a<r.length;a++){var n=Fe.a.getID3Frames(r[a].data);if(n){var s=Math.max(r[a].pts,0),o=a<r.length-1?r[a+1].pts:t.endPTS;o||(o=t.start+t.duration),o-s<=0&&(o=s+.25);for(var l=0;l<n.length;l++){var d=n[l];if(!Fe.a.isTimeStampFrame(d)){var u=new i(s,o,"");u.value=d,this.id3Track.addCue(u)}}}}},a.onLiveBackBufferReached=function(e){var t=e.bufferEnd,r=this.id3Track;if(r&&r.cues&&r.cues.length){var i=function(e,t){if(t<e[0].endTime)return e[0];if(t>e[e.length-1].endTime)return e[e.length-1];for(var r=0,i=e.length-1;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].endTime)i=a-1;else{if(!(t>e[a].endTime))return e[a];r=a+1}}return e[r].endTime-t<t-e[i].endTime?e[r]:e[i]}(r.cues,t);if(i)for(;r.cues[0]!==i;)r.removeCue(r.cues[0])}},i}(h);var Ge=function(){function e(e){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}var t=e.prototype;return t.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),Ke=function(){function e(e,t,r,i){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Ge(t),this.fast_=new Ge(r)}var t=e.prototype;return t.sample=function(e,t){var r=(e=Math.max(e,this.minDelayMs_))/1e3,i=8*t/r;this.fast_.sample(r,i),this.slow_.sample(r,i)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();function je(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var He=window.performance,Ve=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.FRAG_LOADING,d.a.FRAG_LOADED,d.a.FRAG_BUFFERED,d.a.ERROR)||this).lastLoadedFragLevel=0,r._nextAutoLevel=-1,r.hls=t,r.timer=null,r._bwEstimator=null,r.onCheck=r._abandonRulesCheck.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r)),r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,c=i.prototype;return c.destroy=function(){this.clearTimer(),h.prototype.destroy.call(this)},c.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var r,i,a=this.hls,n=a.config,s=t.level;a.levels[s].details.live?(r=n.abrEwmaFastLive,i=n.abrEwmaSlowLive):(r=n.abrEwmaFastVoD,i=n.abrEwmaSlowVoD),this._bwEstimator=new Ke(a,i,r,n.abrEwmaDefaultEstimate)}},c._abandonRulesCheck=function(){var e=this.hls,t=e.media,r=this.fragCurrent;if(r){var i=r.loader;if(!i||i.stats&&i.stats.aborted)return u.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=i.stats;if(t&&a&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&r.autoLevel&&r.level){var n=He.now()-a.trequest,s=Math.abs(t.playbackRate);if(n>500*r.duration/s){var o=e.levels,l=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/n),c=o[r.level];if(!c)return;var h=c.realBitrate?Math.max(c.realBitrate,c.bitrate):c.bitrate,f=a.total?a.total:Math.max(a.loaded,Math.round(r.duration*h/8)),g=t.currentTime,p=(f-a.loaded)/l,v=(H.bufferInfo(t,g,e.config.maxBufferHole).end-g)/s;if(v<2*r.duration/s&&p>v){var m,y=e.minAutoLevel;for(m=r.level-1;m>y;m--){var b=o[m].realBitrate?Math.max(o[m].realBitrate,o[m].bitrate):o[m].bitrate;if(r.duration*b/(6.4*l)<v)break}void 0<p&&(u.b.warn("loading too slow, abort fragment loading and switch to level "+m+":fragLoadedDelay["+m+"]<fragLoadedDelay["+(r.level-1)+"];bufferStarvationDelay:"+(void 0).toFixed(1)+"<"+p.toFixed(1)+":"+v.toFixed(1)),e.nextLoadLevel=m,this._bwEstimator.sample(n,a.loaded),i.abort(),this.clearTimer(),e.trigger(d.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,stats:a}))}}}}},c.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&Object(l.a)(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var r=this.hls.levels[t.level],i=(r.loaded?r.loaded.bytes:0)+e.stats.loaded,a=(r.loaded?r.loaded.duration:0)+e.frag.duration;r.loaded={bytes:i,duration:a},r.realBitrate=Math.round(8*i/a)}if(e.frag.bitrateTest){var n=e.stats;n.tparsed=n.tbuffered=n.tload,this.onFragBuffered(e)}}},c.onFragBuffered=function(e){var t=e.stats,r=e.frag;if(!0!==t.aborted&&"main"===r.type&&Object(l.a)(r.sn)&&(!r.bitrateTest||t.tload===t.tbuffered)){var i=t.tparsed-t.trequest;u.b.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(i,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},c.onError=function(e){switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},c.clearTimer=function(){clearInterval(this.timer),this.timer=null},c._findBestLevel=function(e,t,r,i,a,n,s,o,l){for(var d=a;d>=i;d--){var c=l[d];if(c){var h=c.details,f=h?h.totalduration/h.fragments.length:t,g=!!h&&h.live,p=void 0;p=d<=e?s*r:o*r;var v=l[d].realBitrate?Math.max(l[d].realBitrate,l[d].bitrate):l[d].bitrate,m=v*f/p;if(u.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+d+"/"+Math.round(p)+"/"+v+"/"+f+"/"+n+"/"+m),p>v&&(!m||g&&!this.bitrateTestDelay||m<n))return d}}return-1},a=i,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var r=this._nextABRAutoLevel;return-1!==e&&(r=Math.min(e,r)),r},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,r=e.levels,i=e.config,a=e.minAutoLevel,n=e.media,s=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,l=n?n.currentTime:0,d=n&&0!==n.playbackRate?Math.abs(n.playbackRate):1,c=this._bwEstimator?this._bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,h=(H.bufferInfo(n,l,i.maxBufferHole).end-l)/d,f=this._findBestLevel(s,o,c,a,t,h,i.abrBandWidthFactor,i.abrBandWidthUpFactor,r);if(f>=0)return f;u.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var g=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay,p=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===h){var m=this.bitrateTestDelay;m&&(g=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-m,u.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),p=v=1)}return f=this._findBestLevel(s,o,c,a,t,h+g,p,v,r),Math.max(f,0)}}])&&je(a.prototype,n),s&&je(a,s),i}(h);var Ye=q(),We=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHING,d.a.MEDIA_DETACHING,d.a.MANIFEST_PARSED,d.a.BUFFER_RESET,d.a.BUFFER_APPENDING,d.a.BUFFER_CODECS,d.a.BUFFER_EOS,d.a.BUFFER_FLUSHING,d.a.LEVEL_PTS_UPDATED,d.a.LEVEL_UPDATED)||this)._msDuration=null,r._levelDuration=null,r._levelTargetDuration=10,r._live=null,r._objectUrl=null,r._needsFlush=!1,r._needsEos=!1,r.config=void 0,r.audioTimestampOffset=void 0,r.bufferCodecEventsExpected=0,r._bufferCodecEventsTotal=0,r.media=null,r.mediaSource=null,r.segments=[],r.parent=void 0,r.appending=!1,r.appended=0,r.appendError=0,r.flushBufferCounter=0,r.tracks={},r.pendingTracks={},r.sourceBuffer={},r.flushRange=[],r._onMediaSourceOpen=function(){u.b.log("media source opened"),r.hls.trigger(d.a.MEDIA_ATTACHED,{media:r.media});var e=r.mediaSource;e&&e.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},r._onMediaSourceClose=function(){u.b.log("media source closed")},r._onMediaSourceEnded=function(){u.b.log("media source ended")},r._onSBUpdateEnd=function(){if(r.audioTimestampOffset&&r.sourceBuffer.audio){var e=r.sourceBuffer.audio;u.b.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+r.audioTimestampOffset),e.timestampOffset=r.audioTimestampOffset,delete r.audioTimestampOffset}r._needsFlush&&r.doFlush(),r._needsEos&&r.checkEos(),r.appending=!1;var t=r.parent,i=r.segments.reduce((function(e,r){return r.parent===t?e+1:e}),0),a={},n=r.sourceBuffer;for(var s in n){var o=n[s];if(!o)throw Error("handling source buffer update end error: source buffer for "+s+" uninitilized and unable to update buffered TimeRanges.");a[s]=o.buffered}r.hls.trigger(d.a.BUFFER_APPENDED,{parent:t,pending:i,timeRanges:a}),r._needsFlush||r.doAppending(),r.updateMediaElementDuration(),0===i&&r.flushLiveBackBuffer()},r._onSBUpdateError=function(e){u.b.error("sourceBuffer error:",e),r.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_APPENDING_ERROR,fatal:!1})},r.config=t.config,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){h.prototype.destroy.call(this)},a.onLevelPtsUpdated=function(e){var t=e.type,r=this.tracks.audio;if("audio"===t&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(!i)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(i.timestampOffset-e.start)>.1){var a=i.updating;try{i.abort()}catch(e){u.b.warn("can not abort audio buffer: "+e)}a?this.audioTimestampOffset=e.start:(u.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}},a.onManifestParsed=function(e){var t=2;(e.audio&&!e.video||!e.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,u.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},a.onMediaAttaching=function(e){var t=this.media=e.media;if(t&&Ye){var r=this.mediaSource=new Ye;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),t.src=window.URL.createObjectURL(r),this._objectUrl=t.src}},a.onMediaDetaching=function(){u.b.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){u.b.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):u.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(d.a.MEDIA_DETACHED)},a.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,r=Object.keys(t).length;(r&&!e||2===r)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},a.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var r=e[t];try{r&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this._onSBUpdateEnd),r.removeEventListener("error",this._onSBUpdateError))}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},a.onBufferCodecs=function(e){var t=this;Object.keys(this.sourceBuffer).length||(Object.keys(e).forEach((function(r){t.pendingTracks[r]=e[r]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},a.createSourceBuffers=function(e){var t=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");for(var i in e)if(!t[i]){var a=e[i];if(!a)throw Error("source buffer exists for track "+i+", however track does not");var n=a.levelCodec||a.codec,s=a.container+";codecs="+n;u.b.log("creating sourceBuffer("+s+")");try{var l=t[i]=r.addSourceBuffer(s);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[i]={buffer:l,codec:n,id:a.id,container:a.container,levelCodec:a.levelCodec}}catch(e){u.b.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:s})}}this.hls.trigger(d.a.BUFFER_CREATED,{tracks:this.tracks})},a.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},a.onBufferEos=function(e){for(var t in this.sourceBuffer)if(!e.type||e.type===t){var r=this.sourceBuffer[t];r&&!r.ended&&(r.ended=!0,u.b.log(t+" sourceBuffer now EOS"))}this.checkEos()},a.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var r in e){var i=e[r];if(i){if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}}u.b.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){u.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},a.onBufferFlushing=function(e){e.type?this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}):(this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"video"}),this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},a.flushLiveBackBuffer=function(){if(this._live){var e=this.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))if(this.media)for(var t=this.media.currentTime,r=this.sourceBuffer,i=Object.keys(r),a=t-Math.max(e,this._levelTargetDuration),n=i.length-1;n>=0;n--){var s=i[n],o=r[s];if(o){var l=o.buffered;l.length>0&&a>l.start(0)&&this.removeBufferRange(s,o,0,a)&&this.hls.trigger(d.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:a})}}else u.b.error("flushLiveBackBuffer called without attaching media")}},a.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},a.updateMediaElementDuration=function(){var e,t=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer){var i=this.sourceBuffer[r];if(i&&!0===i.updating)return}e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(u.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||!Object(l.a)(e))&&(u.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},a.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;try{for(var i in r){var a=r[i];a&&(t+=a.buffered.length)}}catch(e){u.b.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(d.a.BUFFER_FLUSHED)}},a.doAppending=function(){var e=this.config,t=this.hls,r=this.segments,i=this.sourceBuffer;if(Object.keys(i).length){if(!this.media||this.media.error)return this.segments=[],void u.b.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var a=r.shift();if(a)try{var n=i[a.type];if(!n)return void this._onSBUpdateEnd();if(n.updating)return void r.unshift(a);n.ended=!1,this.parent=a.parent,n.appendBuffer(a.data),this.appendError=0,this.appended++,this.appending=!0}catch(i){u.b.error("error while trying to append buffer:"+i.message),r.unshift(a);var s={type:o.b.MEDIA_ERROR,parent:a.parent,details:"",fatal:!1};22===i.code?(this.segments=[],s.details=o.a.BUFFER_FULL_ERROR):(this.appendError++,s.details=o.a.BUFFER_APPEND_ERROR,this.appendError>e.appendErrorMaxRetry&&(u.b.log("fail "+e.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],s.fatal=!0)),t.trigger(d.a.ERROR,s)}}}},a.flushBuffer=function(e,t,r){var i=this.sourceBuffer;if(!Object.keys(i).length)return!0;var a="null";if(this.media&&(a=this.media.currentTime.toFixed(3)),u.b.log("flushBuffer,pos/start/end: "+a+"/"+e+"/"+t),this.flushBufferCounter>=this.appended)return u.b.warn("abort flushing too many retries"),!0;var n=i[r];if(n){if(n.ended=!1,n.updating)return u.b.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(r,n,e,t))return this.flushBufferCounter++,!1}return u.b.log("buffer flushed"),!0},a.removeBufferRange=function(e,t,r,i){try{for(var a=0;a<t.buffered.length;a++){var n=t.buffered.start(a),s=t.buffered.end(a),o=Math.max(n,r),l=Math.min(s,i);if(Math.min(l,s)-o>.5){var d="null";return this.media&&(d=this.media.currentTime.toString()),u.b.log("sb remove "+e+" ["+o+","+l+"], of ["+n+","+s+"], pos:"+d),t.remove(o,l),!0}}}catch(e){u.b.warn("removeBufferRange failed",e)}return!1},i}(h);function qe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Xe=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.FPS_DROP_LEVEL_CAPPING,d.a.MEDIA_ATTACHING,d.a.MANIFEST_PARSED,d.a.LEVELS_UPDATED,d.a.BUFFER_CODECS,d.a.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,r.firstLevel=null,r.levels=[],r.media=null,r.restrictedLevels=[],r.timer=null,r.clientRect=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,o=i.prototype;return o.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.clientRect=null,this.stopCapping())},o.onFpsDropLevelCapping=function(e){i.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},o.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},o.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this.startCapping()},o.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},o.onLevelsUpdated=function(e){this.levels=e.levels},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var r=this.levels.filter((function(r,a){return i.isLevelAllowed(a,t.restrictedLevels)&&a<=e}));return this.clientRect=null,i.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,t.width||t.height||(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.top||e.height||0)}return this.clientRect=t,t},i.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},i.getMaxLevelByMediaSize=function(e,t,r){if(!e||e&&!e.length)return-1;for(var i,a,n=e.length-1,s=0;s<e.length;s+=1){var o=e[s];if((o.width>=t||o.height>=r)&&(i=o,!(a=e[s+1])||i.width!==a.width||i.height!==a.height)){n=s;break}}return n},a=i,s=[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*i.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*i.contentScaleFactor}}])&&qe(a.prototype,n),s&&qe(a,s),i}(h);var ze=window.performance,Qe=function(e){var t,r;function i(t){return e.call(this,t,d.a.MEDIA_ATTACHING)||this}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},a.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},a.checkFPS=function(e,t,r){var i=ze.now();if(t){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=t-this.lastDecodedFrames,o=1e3*n/a,l=this.hls;if(l.trigger(d.a.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),o>0&&n>l.config.fpsDroppedMonitoringThreshold*s){var c=l.currentLevel;u.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=c)&&(c-=1,l.trigger(d.a.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:l.currentLevel}),l.autoLevelCapping=c,l.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=t}},a.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},i}(h),$e=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}var t=e.prototype;return t.destroy=function(){this.abort(),this.loader=null},t.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.load=function(e,t,r){this.context=e,this.config=t,this.callbacks=r,this.stats={trequest:window.performance.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e,t=this.context;e=this.loader=new window.XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(e,t.url)}catch(r){e.open("GET",t.url,!0),i(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(r){return void this.callbacks.onError({code:e.status,text:r.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},t.readystatechange=function(e){var t=e.currentTarget,r=t.readyState,i=this.stats,a=this.context,n=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(window.performance.now(),i.trequest)),4===r){var s=t.status;if(s>=200&&s<300){var o,l;i.tload=Math.max(i.tfirst,window.performance.now()),l="arraybuffer"===a.responseType?(o=t.response).byteLength:(o=t.responseText).length,i.loaded=i.total=l;var d={url:t.responseURL,data:o};this.callbacks.onSuccess(d,i,a,t)}else i.retry>=n.maxRetry||s>=400&&s<499?(u.b.error(s+" while loading "+a.url),this.callbacks.onError({code:s,text:t.statusText},a,t)):(u.b.warn(s+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,n.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),n.timeout)},t.loadtimeout=function(){u.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.loadprogress=function(e){var t=e.currentTarget,r=this.stats;r.loaded=e.loaded,e.lengthComputable&&(r.total=e.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,t)},e}();function Je(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ze=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MANIFEST_LOADING,d.a.MANIFEST_PARSED,d.a.AUDIO_TRACK_LOADED,d.a.AUDIO_TRACK_SWITCHED,d.a.LEVEL_LOADED,d.a.ERROR)||this)._trackId=-1,r._selectDefaultTrack=!0,r.tracks=[],r.trackIdBlacklist=Object.create(null),r.audioGroupId=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,l=i.prototype;return l.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},l.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(d.a.AUDIO_TRACKS_UPDATED,{audioTracks:t}),this._selectAudioGroup(this.hls.nextLoadLevel)},l.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)u.b.warn("Invalid audio track id:",e.id);else{if(u.b.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},l.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},l.onLevelLoaded=function(e){this._selectAudioGroup(e.level)},l.onError=function(e){e.type===o.b.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===o.a.AUDIO_TRACK_LOAD_ERROR&&(u.b.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},l._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)u.b.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)u.b.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];u.b.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var r=t.url,i=t.type,a=t.id;this.hls.trigger(d.a.AUDIO_TRACK_SWITCHING,{id:a,type:i,url:r}),this._loadTrackDetailsIfNeeded(t)}},l.doTick=function(){this._updateTrack(this._trackId)},l._selectAudioGroup=function(e){var t=this.hls.levels[e];if(t&&t.audioGroupIds){var r=t.audioGroupIds[t.urlId];this.audioGroupId!==r&&(this.audioGroupId=r,this._selectInitialAudioTrack())}},l._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var r=this.tracks[this._trackId],i=null;if(r&&(i=r.name),this._selectDefaultTrack){var a=t.filter((function(e){return e.default}));a.length?t=a:u.b.warn("No default audio tracks defined")}var n=!1,s=function(){t.forEach((function(t){n||e.audioGroupId&&t.groupId!==e.audioGroupId||i&&i!==t.name||(e._setAudioTrack(t.id),n=!0)}))};s(),n||(i=null,s()),n||(u.b.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},l._needsTrackLoading=function(e){var t=e.details,r=e.url;return!(t&&!t.live)&&!!r},l._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,r=e.id;u.b.log("loading audio-track playlist for id: "+r),this.hls.trigger(d.a.AUDIO_TRACK_LOADING,{url:t,id:r})}},l._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,u.b.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},l._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],r=t.name,i=t.language,a=t.groupId;u.b.warn("Loading failed on audio track id: "+e+", group-id: "+a+', name/language: "'+r+'" / "'+i+'"');for(var n=e,s=0;s<this.tracks.length;s++){if(!this.trackIdBlacklist[s])if(this.tracks[s].name===r){n=s;break}}n!==e?(u.b.log("Attempting audio-track fallback id:",n,"group-id:",this.tracks[n].groupId),this._setAudioTrack(n)):u.b.warn('No fallback audio-track found for name/language: "'+r+'" / "'+i+'"')},a=i,(n=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1}}])&&Je(a.prototype,n),s&&Je(a,s),i}(ge);function et(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var tt=window.performance,rt=function(e){var t,r;function i(t,r){var i;return(i=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.AUDIO_TRACKS_UPDATED,d.a.AUDIO_TRACK_SWITCHING,d.a.AUDIO_TRACK_LOADED,d.a.KEY_LOADED,d.a.FRAG_LOADED,d.a.FRAG_PARSING_INIT_SEGMENT,d.a.FRAG_PARSING_DATA,d.a.FRAG_PARSED,d.a.ERROR,d.a.BUFFER_RESET,d.a.BUFFER_CREATED,d.a.BUFFER_APPENDED,d.a.BUFFER_FLUSHED,d.a.INIT_PTS_FOUND)||this).fragmentTracker=r,i.config=t.config,i.audioCodecSwap=!1,i._state=pe,i.initPTS=[],i.waitingFragment=null,i.videoTrackCC=null,i.waitingVideoCC=null,i}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,c=i.prototype;return c.onInitPtsFound=function(e){var t=e.id,r=e.frag.cc,i=e.initPTS;"main"===t&&(this.initPTS[r]=i,this.videoTrackCC=r,u.b.log("InitPTS for cc: "+r+" found from main: "+i),this.state===Le&&this.tick())},c.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(u.b.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=me):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=ve),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=pe},c.doTick=function(){var e,t,r,i=this.hls,a=i.config;switch(this.state){case we:case ye:case Ae:break;case ve:this.state=Se,this.loadedmetadata=!1;break;case me:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var s=this.mediaBuffer?this.mediaBuffer:this.media,o=this.videoBuffer?this.videoBuffer:this.media,c=e<a.maxBufferHole?Math.max(2,a.maxBufferHole):a.maxBufferHole,h=H.bufferInfo(s,e,c),f=H.bufferInfo(o,e,c),g=h.len,p=h.end,v=this.fragPrevious,m=Math.min(a.maxBufferLength,a.maxMaxBufferLength),y=Math.max(m,f.len),b=this.audioSwitch,T=this.trackId;if((g<y||b)&&T<n.length){if(void 0===(r=n[T].details)){this.state=Se;break}if(!b&&this._streamEnded(h,r))return this.hls.trigger(d.a.BUFFER_EOS,{type:"audio"}),void(this.state=ke);var E,S=r.fragments,_=S.length,R=S[0].start,A=S[_-1].start+S[_-1].duration;if(b)if(r.live&&!r.PTSKnown)u.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),p=0;else if(p=e,r.PTSKnown&&e<R){if(!(h.end>R||h.nextStart))return;u.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=R+.05}if(r.initSegment&&!r.initSegment.data)E=r.initSegment;else if(p<=R){if(E=S[0],null!==this.videoTrackCC&&E.cc!==this.videoTrackCC&&(E=function(e,t){return j.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(S,this.videoTrackCC)),r.live&&E.loadIdx&&E.loadIdx===this.fragLoadIdx){var k=h.nextStart?h.nextStart:R;return u.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(k+.05)),void(this.media.currentTime=k+.05)}}else{var w,L=a.maxFragLookUpTolerance,D=v?S[v.sn-S[0].sn+1]:void 0;p<A?(p>A-L&&(L=0),w=D&&!ue(p,L,D)?D:j.search(S,(function(e){return ue(p,L,e)}))):w=S[_-1],w&&(E=w,R=w.start,v&&E.level===v.level&&E.sn===v.sn&&(E.sn<r.endSN?(E=S[E.sn+1-r.startSN],this.fragmentTracker.getState(E)!==G&&u.b.log("SN just loaded, load next one: "+E.sn)):E=null))}E&&(E.encrypted?(u.b.log("Loading key for "+E.sn+" of ["+r.startSN+" ,"+r.endSN+"],track "+T),this.state=be,i.trigger(d.a.KEY_LOADING,{frag:E})):(this.fragCurrent=E,(b||this.fragmentTracker.getState(E)===U)&&(u.b.log("Loading "+E.sn+", cc: "+E.cc+" of ["+r.startSN+" ,"+r.endSN+"],track "+T+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+e+", bufferEnd: "+p.toFixed(3)),"initSegment"!==E.sn&&(this.startFragRequested=!0),Object(l.a)(E.sn)&&(this.nextLoadPosition=E.start+E.duration),i.trigger(d.a.FRAG_LOADING,{frag:E}),this.state=Te)))}break;case Se:(t=this.tracks[this.trackId])&&t.details&&(this.state=me);break;case Ee:var O=tt.now(),C=this.retryDate,I=(s=this.media)&&s.seeking;(!C||O>=C||I)&&(u.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=me);break;case Le:var P=this.waitingFragment;if(P){var x=P.frag.cc;if(void 0!==this.initPTS[x])this.waitingFragment=null,this.state=Te,this.onFragLoaded(P);else if(this.videoTrackCC!==this.waitingVideoCC)u.b.log("Waiting fragment cc ("+x+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var M=H.bufferInfo(this.mediaBuffer,this.media.currentTime,a.maxBufferHole);ue(M.end,a.maxFragLookUpTolerance,P.frag)<0&&(u.b.log("Waiting fragment cc ("+x+") @ "+P.frag.start+" cancelled because another fragment at "+M.end+" is needed"),this.clearWaitingFragment())}}else this.state=me}},c.clearWaitingFragment=function(){var e=this.waitingFragment;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingFragment=null,this.waitingVideoCC=null,this.state=me)},c.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},c.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(u.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onAudioTracksUpdated=function(e){u.b.log("audio tracks updated"),this.tracks=e.audioTracks},c.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.clearWaitingFragment(),this.state=ye,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=me),this.tick()},c.onAudioTrackLoaded=function(e){var t=e.details,r=e.id,i=this.tracks[r],a=i.details,n=t.totalduration,s=0;if(u.b.log("track "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+n),t.live||a&&a.live?a&&t.fragments.length>0?(re(a,t),s=t.fragments[0].start,t.PTSKnown?u.b.log("live audio playlist sliding:"+s.toFixed(3)):u.b.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,u.b.log("live audio playlist - first load, unknown sliding")):t.PTSKnown=!1,i.details=t,!this.startFragRequested){if(-1===this.startPosition){var o=t.startTimeOffset;Object(l.a)(o)?(u.b.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o):t.live?(this.startPosition=this.computeLivePosition(s,t),u.b.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===Se&&(this.state=me),this.tick()},c.onKeyLoaded=function(){this.state===be&&(this.state=me,this.tick())},c.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag;if(this.state===Te&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,s=t.level,o=t.sn,l=t.cc,c=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",h=this.stats=e.stats;if("initSegment"===o)this.state=me,h.tparsed=h.tbuffered=tt.now(),a.initSegment.data=e.payload,this.hls.trigger(d.a.FRAG_BUFFERED,{stats:h,frag:t,id:"audio"}),this.tick();else{this.state=_e,this.appended=!1,this.demuxer||(this.demuxer=new J(this.hls,"audio"));var f=this.initPTS[l],g=a.initSegment?a.initSegment.data:[];if(void 0!==f){this.pendingBuffering=!0,u.b.log("Demuxing "+o+" of ["+a.startSN+" ,"+a.endSN+"],track "+s);this.demuxer.push(e.payload,g,c,null,t,n,!1,f)}else u.b.log("Unknown video PTS for cc "+l+", waiting for video PTS before demuxing audio frag "+o+" of ["+a.startSN+" ,"+a.endSN+"],track "+s),this.waitingFragment=e,this.waitingVideoCC=this.videoTrackCC,this.state=Le}}this.fragLoadError=0},c.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e){var i,a=e.tracks;if(a.video&&delete a.video,i=a.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(d.a.BUFFER_CODECS,a),u.b.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var n=i.initSegment;if(n){var s={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(d.a.BUFFER_APPENDING,s))}this.tick()}}},c.onFragParsingData=function(e){var t=this,r=this.fragCurrent,i=e.frag;if(r&&"audio"===e.id&&"audio"===e.type&&i.sn===r.sn&&i.level===r.level&&this.state===_e){var a=this.trackId,n=this.tracks[a],s=this.hls;Object(l.a)(e.endPTS)||(e.endPTS=e.startPTS+r.duration,e.endDTS=e.startDTS+r.duration),r.addElementaryStream(p.AUDIO),u.b.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),te(n.details,r,e.startPTS,e.endPTS);var c=this.media,h=!1;if(this.audioSwitch)if(c&&c.readyState){var f=c.currentTime;u.b.log("switching audio track : currentTime:"+f),f>=e.startPTS&&(u.b.log("switching audio track : flushing all audio"),this.state=Ae,s.trigger(d.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,s.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,s.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:a});var g=this.pendingData;if(!g)return u.b.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void s.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach((function(t){t&&t.length&&g.push({type:e.type,data:t,parent:"audio",content:"data"})})),!h&&g.length&&(g.forEach((function(e){t.state===_e&&(t.pendingBuffering=!0,t.hls.trigger(d.a.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},c.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e&&(this.stats.tparsed=tt.now(),this.state=Re,this._checkAppendedParsed())},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},c.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==_e&&t!==Re||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},c._checkAppendedParsed=function(){if(!(this.state!==Re||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=tt.now(),r.trigger(d.a.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;i&&u.b.log("audio buffered : "+ne.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=me}this.tick()}},c.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:var r=e.frag;if(r&&"audio"!==r.type)break;if(!e.fatal){var i=this.fragLoadError;i?i++:i=1;var a=this.config;if(i<=a.fragLoadingMaxRetry){this.fragLoadError=i;var n=Math.min(Math.pow(2,i-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);u.b.warn("AudioStreamController: frag loading failed, retry in "+n+" ms"),this.retryDate=tt.now()+n,this.state=Ee}else u.b.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=we}break;case o.a.AUDIO_TRACK_LOAD_ERROR:case o.a.AUDIO_TRACK_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:this.state!==we&&(this.state=e.fatal?we:me,u.b.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case o.a.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===_e||this.state===Re)){var s=this.mediaBuffer,l=this.media.currentTime;if(s&&H.isBuffered(s,l)&&H.isBuffered(s,l+.5)){var c=this.config;c.maxMaxBufferLength>=c.maxBufferLength&&(c.maxMaxBufferLength/=2,u.b.warn("AudioStreamController: reduce max buffer length to "+c.maxMaxBufferLength+"s")),this.state=me}else u.b.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=Ae,this.hls.trigger(d.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},c.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(u.b.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(d.a.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=Re):(this.state=me,this.fragPrevious=null,this.tick())},a=i,(n=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,u.b.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}])&&et(a.prototype,n),s&&et(a,s),i}(Oe),it=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var e={"":!0,lr:!0,rl:!0},t={start:!0,middle:!0,end:!0,left:!0,right:!0};function r(e){return"string"==typeof e&&(!!t[e.toLowerCase()]&&e.toLowerCase())}function i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)e[i]=r[i]}return e}function a(t,a,n){var s=this,o={enumerable:!0};s.hasBeenReset=!1;var l="",d=!1,u=t,c=a,h=n,f=null,g="",p=!0,v="auto",m="start",y=50,b="middle",T=50,E="middle";Object.defineProperty(s,"id",i({},o,{get:function(){return l},set:function(e){l=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},o,{get:function(){return d},set:function(e){d=!!e}})),Object.defineProperty(s,"startTime",i({},o,{get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},o,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},o,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},o,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},o,{get:function(){return g},set:function(t){var r=function(t){return"string"==typeof t&&(!!e[t.toLowerCase()]&&t.toLowerCase())}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},o,{get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},o,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},o,{get:function(){return m},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},o,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},o,{get:function(){return b},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},o,{get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},o,{get:function(){return E},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},a}(),at=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function nt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new at,this.regionList=[]}function st(){this.values=Object.create(null)}function ot(e,t,r,i){var a=i?e.split(i):[e];for(var n in a)if("string"==typeof a[n]){var s=a[n].split(r);if(2===s.length)t(s[0],s[1])}}st.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,r){for(var i=0;i<r.length;++i)if(t===r[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var lt=new it(0,0,0),dt="middle"===lt.align?"middle":"center";function ut(e,t,r){var i=e;function a(){var t=function(e){function t(e,t,r,i){return 3600*(0|e)+60*(0|t)+(0|r)+(0|i)/1e3}var r=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?t(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function n(){e=e.replace(/^\s+/,"")}if(n(),t.startTime=a(),n(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),n(),t.endTime=a(),n(),function(e,t){var i=new st;ot(e,(function(e,t){switch(e){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===t){i.set(e,r[a].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),s=n[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",dt,"end"]);break;case"position":n=t.split(","),i.percent(e,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",dt,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",dt,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===lt.line&&(a=-1),t.line=a,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",dt);var n=i.get("position","auto");"auto"===n&&50===lt.position&&(n="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=n}(e,t)}function ct(e){return e.replace(/<br(?: \/)?>/gi,"\n")}nt.prototype={parse:function(e){var t=this;function r(){var e=t.buffer,r=0;for(e=ct(e);r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var i=e.substr(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.substr(r),i}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(i=r()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var n=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(n?n=!1:i=r(),t.state){case"HEADER":/:/.test(i)?ot(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new it(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{ut(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(n=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return this.onflush&&this.onflush(),this}};var ht=nt;function ft(e,t,r,i){for(var a,n,s,o,l,d=[],u=window.VTTCue||TextTrackCue,c=0;c<i.rows.length;c++)if(s=!0,o=0,l="",!(a=i.rows[c]).isEmpty()){for(var h=0;h<a.chars.length;h++)a.chars[h].uchar.match(/\s/)&&s?o++:(l+=a.chars[h].uchar,s=!1);a.cueStartTime=t,t===r&&(r+=1e-4),n=new u(t,r,ct(l.trim())),o>=16?o--:o++,navigator.userAgent.match(/Firefox\//)?n.line=c+1:n.line=c>7?c-2:c+1,n.align="left",n.position=Math.max(0,Math.min(100,o/32*100)),d.push(n),e&&e.addCue(n)}return d}var gt,pt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},vt=function(e){var t=e;return pt.hasOwnProperty(e)&&(t=pt[e]),String.fromCharCode(t)},mt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},yt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},bt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Tt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Et=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(gt||(gt={}));var St=function(){function e(){this.time=null,this.verboseLevel=gt.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&u.b.log(this.time+" ["+e+"] "+t)},e}(),_t=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},Rt=function(){function e(e,t,r,i,a){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=r||!1,this.background=i||"black",this.flash=a||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],r=0;r<t.length;r++){var i=t[r];e.hasOwnProperty(i)&&(this[i]=e[i])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),At=function(){function e(e,t,r,i,a,n){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Rt(t,r,i,a,n)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),kt=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<100;t++)this.chars.push(new At);this.logger=e,this.pos=0,this.currPenState=new Rt}var t=e.prototype;return t.equals=function(e){for(var t=!0,r=0;r<100;r++)if(!this.chars[r].equals(e.chars[r])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(gt.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(gt.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=vt(e);this.pos>=100?this.logger.log(gt.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,r=0;r<100;r++){var i=this.chars[r].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),wt=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new kt(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,r=0;r<15;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(gt.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(gt.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var r=0;r<15;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){var n=a.rows[i].cueStartTime,s=this.logger.time;if(n&&null!==s&&n<s)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(a.rows[i+o])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var d=e.indent,u=Math.max(d-1,0);l.setCursor(e.indent),e.color=l.chars[u].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)},t.setBkgData=function(e){this.logger.log(gt.INFO,"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(gt.TEXT,this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(gt.INFO,"Rolling up")}else this.logger.log(gt.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],r="",i=-1,a=0;a<15;a++){var n=this.rows[a].getTextString();n&&(i=a+1,e?t.push("Row "+i+": '"+n+"'"):t.push(n.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},t.getTextAndFormat=function(){return this.rows},e}(),Lt=function(){function e(e,t,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new wt(r),this.nonDisplayedMemory=new wt(r),this.lastOutputScreen=new wt(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(gt.INFO,"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(gt.INFO,r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(gt.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(gt.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(gt.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(gt.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(gt.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(gt.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(gt.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(gt.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(gt.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(gt.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(gt.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(gt.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(gt.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(gt.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(gt.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(gt.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}();function Dt(e,t,r){r.a=e,r.b=t}function Ot(e,t,r){return r.a===e&&r.b===t}var Ct=function(){function e(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var i=new St;this.channels=[null,new Lt(e,t,i),new Lt(e+1,r,i)],this.cmdHistory={a:null,b:null},this.logger=i}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var r,i,a,n=!1;this.logger.time=e;for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(this.logger.log(gt.DATA,"["+_t([t[s],t[s+1]])+"] -> ("+_t([i,a])+")"),(r=this.parseCmd(i,a))||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r&&(n=this.parseChars(i,a))){var o=this.currentChannel;if(o&&o>0)this.channels[o].insertChars(n);else this.logger.log(gt.WARNING,"No channel found yet. TEXT-MODE?")}r||n||this.logger.log(gt.WARNING,"Couldn't parse cleaned data "+_t([i,a])+" orig: "+_t([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var r=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(Ot(e,t,r))return Dt(null,null,r),this.logger.log(gt.DEBUG,"Repeated command ("+_t([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),Dt(e,t,r),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var r=0;if((17===e||25===e)&&t>=32&&t<=47){if((r=17===e?1:2)!==this.currentChannel)return this.logger.log(gt.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[r];return!!i&&(i.ccMIDROW(t),this.logger.log(gt.DEBUG,"MIDROW ("+_t([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var r,i=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(Ot(e,t,i))return Dt(null,null,i),!0;var a=e<=23?1:2;r=t>=64&&t<=95?1===a?mt[e]:bt[e]:1===a?yt[e]:Tt[e];var n=this.channels[a];return!!n&&(n.setPAC(this.interpretPAC(r,t)),Dt(e,t,i),this.currentChannel=a,!0)},t.interpretPAC=function(e,t){var r=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.parseChars=function(e,t){var r,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),a>=17&&a<=19){var n=t;n=17===a?t+80:18===a?t+112:t+144,this.logger.log(gt.INFO,"Special char '"+vt(n)+"' in channel "+r),i=[n]}else e>=32&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var s=_t(i);this.logger.log(gt.DEBUG,"Char codes = "+s.join(",")),Dt(e,t,this.cmdHistory)}return i},t.parseBackgroundAttributes=function(e,t){var r;if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;var i={};16===e||24===e?(r=Math.floor((t-32)/2),i.background=Et[r],t%2==1&&(i.background=i.background+"_semi")):45===t?i.background="transparent":(i.foreground="black",47===t&&(i.underline=!0));var a=e<=23?1:2;return this.channels[a].setBkgData(i),Dt(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var r=this.channels[t];r&&r.cueSplitAtTime(e)}},e}(),It=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,r){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}(),Pt=function(e,t,r){return e.substr(r||0,t.length)===t},xt=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()},Mt={parse:function(e,t,r,i,a,n){var s,o=Object(Fe.b)(new Uint8Array(e)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),d="00:00.000",u=0,c=0,h=0,f=[],g=!0,p=!1,v=new ht;v.oncue=function(e){var t=r[i],a=r.ccOffset;t&&t.new&&(void 0!==c?a=r.ccOffset=t.start:function(e,t,r){var i=e[t],a=e[i.prevCC];if(!a||!a.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)e.ccOffset+=i.start-a.start,i.new=!1,a=e[(i=a).prevCC];e.presentationOffset=r}(r,i,h)),h&&(a=h-r.presentationOffset),p&&(e.startTime+=a-c,e.endTime+=a-c),e.id=xt(e.startTime.toString())+xt(e.endTime.toString())+xt(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&f.push(e)},v.onparsingerror=function(e){s=e},v.onflush=function(){s&&n?n(s):a(f)},o.forEach((function(e){if(g){if(Pt(e,"X-TIMESTAMP-MAP=")){g=!1,p=!0,e.substr(16).split(",").forEach((function(e){Pt(e,"LOCAL:")?d=e.substr(6):Pt(e,"MPEGTS:")&&(u=parseInt(e.substr(7)))}));try{t+(9e4*r[i].start||0)<0&&(t+=8589934592),u-=t,c=function(e){var t=parseInt(e.substr(-3)),r=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(l.a)(t)&&Object(l.a)(r)&&Object(l.a)(i)&&Object(l.a)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,t+=6e4*i,t+=36e5*a}(d)/1e3,h=u/9e4}catch(e){p=!1,s=e}return}""===e&&(g=!1)}v.parse(e+"\n")})),v.flush()}};function Ft(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}var Nt=function(e){var t,r;function i(t){var r;if((r=e.call(this,t,d.a.MEDIA_ATTACHING,d.a.MEDIA_DETACHING,d.a.FRAG_PARSING_USERDATA,d.a.FRAG_DECRYPTED,d.a.MANIFEST_LOADING,d.a.MANIFEST_LOADED,d.a.FRAG_LOADED,d.a.INIT_PTS_FOUND)||this).media=null,r.config=void 0,r.enabled=!0,r.Cues=void 0,r.textTracks=[],r.tracks=[],r.initPTS=[],r.unparsedVttFrags=[],r.captionsTracks={},r.nonNativeCaptionsTracks={},r.captionsProperties=void 0,r.cea608Parser1=void 0,r.cea608Parser2=void 0,r.lastSn=-1,r.prevCC=-1,r.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},r.hls=t,r.config=t.config,r.Cues=t.config.cueHandler,r.captionsProperties={textTrack1:{label:r.config.captionsTextTrack1Label,languageCode:r.config.captionsTextTrack1LanguageCode},textTrack2:{label:r.config.captionsTextTrack2Label,languageCode:r.config.captionsTextTrack2LanguageCode},textTrack3:{label:r.config.captionsTextTrack3Label,languageCode:r.config.captionsTextTrack3LanguageCode},textTrack4:{label:r.config.captionsTextTrack4Label,languageCode:r.config.captionsTextTrack4LanguageCode}},r.config.enableCEA708Captions){var i=new It(Ft(r),"textTrack1"),a=new It(Ft(r),"textTrack2"),n=new It(Ft(r),"textTrack3"),s=new It(Ft(r),"textTrack4");r.cea608Parser1=new Ct(1,i,a),r.cea608Parser2=new Ct(3,n,s)}return r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.addCues=function(e,t,r,i,a){for(var n,s,o,l,u=!1,c=a.length;c--;){var h=a[c],f=(n=h[0],s=h[1],o=t,l=r,Math.min(s,l)-Math.max(n,o));if(f>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],r),u=!0,f/(r-t)>.5))return}if(u||a.push([t,r]),this.config.renderTextTracksNatively)this.Cues.newCue(this.captionsTracks[e],t,r,i);else{var g=this.Cues.newCue(null,t,r,i);this.hls.trigger(d.a.CUES_PARSED,{type:"captions",cues:g,track:e})}},a.onInitPtsFound=function(e){var t=this,r=e.frag,i=e.id,a=e.initPTS,n=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]=a),n.length&&(this.unparsedVttFrags=[],n.forEach((function(e){t.onFragLoaded(e)})))},a.getExistingTrack=function(e){var t=this.media;if(t)for(var r=0;r<t.textTracks.length;r++){var i=t.textTracks[r];if(i[e])return i}return null},a.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},a.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,r=this.captionsTracks,i=this.media,a=t[e],n=a.label,s=a.languageCode,o=this.getExistingTrack(e);if(o)r[e]=o,Ne(r[e]),Ue(r[e],i);else{var l=this.createTextTrack("captions",n,s);l&&(l[e]=!0,r[e]=l)}}},a.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var r={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(d.a.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}}},a.createTextTrack=function(e,t,r){var i=this.media;if(i)return i.addTextTrack(e,t,r)},a.destroy=function(){e.prototype.destroy.call(this)},a.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},a.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Ne(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={}},a._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var r=0;r<t.length;r++)Ne(t[r])}},a.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset()),this.config.enableWebVTT){var r=e.subtitles||[],i=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=e.subtitles||[],this.config.renderTextTracksNatively){var a=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,r){var i;if(r<a.length){for(var n=null,s=0;s<a.length;s++)if(Ut(a[s],e)){n=a[s];break}n&&(i=n)}i||(i=t.createTextTrack("subtitles",e.name,e.lang)),e.default?i.mode=t.hls.subtitleDisplay?"showing":"hidden":i.mode="disabled",t.textTracks.push(i)}))}else if(!i&&this.tracks&&this.tracks.length){var n=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(d.a.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}this.config.enableCEA708Captions&&e.captions&&e.captions.forEach((function(e){var r=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(r){var i="textTrack"+r[1],a=t.captionsProperties[i];a&&(a.label=e.name,e.lang&&(a.languageCode=e.lang),a.media=e)}}))},a.onFragLoaded=function(e){var t=e.frag,r=e.payload,i=this.cea608Parser1,a=this.cea608Parser2,n=this.initPTS,s=this.lastSn,o=this.unparsedVttFrags;if("main"===t.type){var u=t.sn;t.sn!==s+1&&i&&a&&(i.reset(),a.reset()),this.lastSn=u}else if("subtitle"===t.type)if(r.byteLength){if(!Object(l.a)(n[t.cc]))return o.push(e),void(n.length&&this.hls.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t}));var c=t.decryptdata;null!=c&&null!=c.key&&"AES-128"===c.method||this._parseVTTs(t,r)}else this.hls.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},a._parseVTTs=function(e,t){var r=this,i=this.hls,a=this.prevCC,n=this.textTracks,s=this.vttCCs;s[e.cc]||(s[e.cc]={start:e.start,prevCC:a,new:!0},this.prevCC=e.cc),Mt.parse(t,this.initPTS[e.cc],s,e.cc,(function(t){if(r.config.renderTextTracksNatively){var a=n[e.level];if("disabled"===a.mode)return void i.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e});t.forEach((function(e){if(!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(r){u.b.debug("Failed occurred on adding cues: "+r);var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,a.addCue(t)}}))}else{var s=r.tracks[e.level].default?"default":"subtitles"+e.level;i.trigger(d.a.CUES_PARSED,{type:"subtitles",cues:t,track:s})}i.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){u.b.log("Failed to parse VTT cue: "+t),i.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}))},a.onFragDecrypted=function(e){var t=e.frag,r=e.payload;if("subtitle"===t.type){if(!Object(l.a)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(e);this._parseVTTs(t,r)}},a.onFragParsingUserdata=function(e){var t=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&t&&r)for(var i=0;i<e.samples.length;i++){var a=e.samples[i].bytes;if(a){var n=this.extractCea608Data(a);t.addData(e.samples[i].pts,n[0]),r.addData(e.samples[i].pts,n[1])}}},a.extractCea608Data=function(e){for(var t=31&e[0],r=2,i=[[],[]],a=0;a<t;a++){var n=e[r++],s=127&e[r++],o=127&e[r++],l=3&n;0===s&&0===o||0!=(4&n)&&(0!==l&&1!==l||(i[l].push(s),i[l].push(o)))}return i},i}(h);function Bt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Gt(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];"subtitles"===i.kind&&i.label&&t.push(e[r])}return t}var Kt=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.MANIFEST_LOADED,d.a.SUBTITLE_TRACK_LOADED)||this).tracks=[],r.trackId=-1,r.media=null,r.stopped=!0,r.subtitleDisplay=!0,r.queuedDefaultTrack=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,o=i.prototype;return o.destroy=function(){h.prototype.destroy.call(this)},o.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(Object(l.a)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval((function(){t.trackChangeListener()}),500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},o.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.a)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),Gt(this.media.textTracks).forEach((function(e){Ne(e)})),this.subtitleTrack=-1,this.media=null)},o.onManifestLoaded=function(e){var t=this,r=e.subtitles||[];this.tracks=r,this.hls.trigger(d.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:r}),r.forEach((function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)}))},o.onSubtitleTrackLoaded=function(e){var t=this,r=e.id,i=e.details,a=this.trackId,n=this.tracks,s=n[a];if(r>=n.length||r!==a||!s||this.stopped)this._clearReloadTimer();else if(u.b.log("subtitle track "+r+" loaded"),i.live){var o=ae(s.details,i,e.stats.trequest);u.b.log("Reloading live subtitle playlist in "+o+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),o)}else this._clearReloadTimer()},o.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},o.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},o._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},o._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,r=this.hls,i=t[e];e<0||!i||i.details&&!i.details.live||(u.b.log("Loading subtitle track "+e),r.trigger(d.a.SUBTITLE_TRACK_LOADING,{url:i.url,id:e}))},o._toggleTrackModes=function(e){var t=this.media,r=this.subtitleDisplay,i=this.trackId;if(t){var a=Gt(t.textTracks);if(-1===e)[].slice.call(a).forEach((function(e){e.mode="disabled"}));else{var n=a[i];n&&(n.mode="disabled")}var s=a[e];s&&(s.mode=r?"showing":"hidden")}},o._setSubtitleTrackInternal=function(e){var t=this.hls,r=this.tracks;!Object(l.a)(e)||e<-1||e>=r.length||(this.trackId=e,u.b.log("Switching to subtitle track "+e),t.trigger(d.a.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())},o._onTextTracksChanged=function(){if(this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=Gt(this.media.textTracks),r=0;r<t.length;r++)if("hidden"===t[r].mode)e=r;else if("showing"===t[r].mode){e=r;break}this.subtitleTrack=e}},a=i,(n=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))}}])&&Bt(a.prototype,n),s&&Bt(a,s),i}(h),jt=r(7);var Ht,Vt=window.performance,Yt=function(e){var t,r;function i(t,r){var i;return(i=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.ERROR,d.a.KEY_LOADED,d.a.FRAG_LOADED,d.a.SUBTITLE_TRACKS_UPDATED,d.a.SUBTITLE_TRACK_SWITCH,d.a.SUBTITLE_TRACK_LOADED,d.a.SUBTITLE_FRAG_PROCESSED,d.a.LEVEL_UPDATED)||this).fragmentTracker=r,i.config=t.config,i.state=pe,i.tracks=[],i.tracksBuffered=[],i.currentTrackId=-1,i.decrypter=new jt.a(t,t.config),i.lastAVStart=0,i._onMediaSeeking=i.onMediaSeeking.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.startLoad=function(){this.stopLoad(),this.state=me;var e=this.tracks[this.currentTrackId];e&&e.details&&(this.setInterval(500),this.tick())},a.onSubtitleFragProcessed=function(e){var t=e.frag,r=e.success;if(this.fragPrevious=t,this.state=me,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,n=t.start,s=0;s<i.length;s++)if(n>=i[s].start&&n<=i[s].end){a=i[s];break}var o=t.start+t.duration;a?a.end=o:(a={start:n,end:o},i.push(a))}}},a.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=me},a.onMediaDetaching=function(){var e=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach((function(t){e.tracksBuffered[t.id]=[]})),this.media=null,this.state=pe)},a.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.fragCurrent&&this.fragCurrent.loader&&this.fragCurrent.loader.abort(),this.state=me)},a.onSubtitleTracksUpdated=function(e){var t=this;u.b.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},a.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},a.onSubtitleTrackLoaded=function(e){var t=e.id,r=e.details,i=this.currentTrackId,a=this.tracks,n=a[i];t>=a.length||t!==i||!n||(r.live&&function(e,t,r){void 0===r&&(r=0);var i=-1;ie(e,t,(function(e,t,r){t.start=e.start,i=r}));var a=t.fragments;if(i<0)a.forEach((function(e){e.start+=r}));else for(var n=i+1;n<a.length;n++)a[n].start=a[n-1].start+a[n-1].duration}(n.details,r,this.lastAVStart),n.details=r,this.setInterval(500))},a.onKeyLoaded=function(){this.state===be&&(this.state=me)},a.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag.decryptdata,i=e.frag,a=this.hls;if(this.state===Te&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&r&&r.key&&"AES-128"===r.method){var n=Vt.now();this.decrypter.decrypt(e.payload,r.key.buffer,r.iv.buffer,(function(e){var t=Vt.now();a.trigger(d.a.FRAG_DECRYPTED,{frag:i,payload:e,stats:{tstart:n,tdecrypt:t}})}))}},a.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},a.doTick=function(){if(this.media)switch(this.state){case me:var e=this.config,t=this.currentTrackId,r=this.fragmentTracker,i=this.media,a=this.tracks;if(!a||!a[t]||!a[t].details)break;var n,s=e.maxBufferHole,o=e.maxFragLookUpTolerance,l=Math.min(e.maxBufferLength,e.maxMaxBufferLength),c=H.bufferedInfo(this._getBuffered(),i.currentTime,s),h=c.end,f=c.len,g=a[t].details,p=g.fragments,v=p.length,m=p[v-1].start+p[v-1].duration;if(f>l)return;var y=this.fragPrevious;h<m?(y&&g.hasProgramDateTime&&(n=le(p,y.endProgramDateTime,o)),n||(n=de(y,p,h,o))):n=p[v-1],n&&n.encrypted?(u.b.log("Loading key for "+n.sn),this.state=be,this.hls.trigger(d.a.KEY_LOADING,{frag:n})):n&&r.getState(n)===U&&(this.fragCurrent=n,this.state=Te,this.hls.trigger(d.a.FRAG_LOADING,{frag:n}))}else this.state=me},a.stopLoad=function(){this.lastAVStart=0,this.fragPrevious=null,e.prototype.stopLoad.call(this)},a._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},a.onMediaSeeking=function(){if(this.fragCurrent){var e=this.media?this.media.currentTime:0,t=this.config.maxFragLookUpTolerance,r=this.fragCurrent.start-t,i=this.fragCurrent.start+this.fragCurrent.duration+t;(e<r||e>i)&&(this.fragCurrent.loader&&this.fragCurrent.loader.abort(),this.fragmentTracker.removeFragment(this.fragCurrent),this.fragCurrent=null,this.fragPrevious=null,this.state=me,this.tick())}},i}(Oe);!function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(Ht||(Ht={}));var Wt="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function qt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Xt=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHED,d.a.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,r._licenseXhrSetup=void 0,r._emeEnabled=void 0,r._requestMediaKeySystemAccess=void 0,r._drmSystemOptions=void 0,r._config=void 0,r._mediaKeysList=[],r._media=null,r._hasSetMediaKeys=!1,r._requestLicenseFailureCount=0,r.mediaKeysPromise=null,r._onMediaEncrypted=function(e){if(u.b.log('Media is encrypted using "'+e.initDataType+'" init data type'),!r.mediaKeysPromise)return u.b.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void r.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_KEYS,fatal:!0});var t=function(t){r._media&&(r._attemptSetMediaKeys(t),r._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};r.mediaKeysPromise.then(t).catch(t)},r._config=t.config,r._widevineLicenseUrl=r._config.widevineLicenseUrl,r._licenseXhrSetup=r._config.licenseXhrSetup,r._emeEnabled=r._config.emeEnabled,r._requestMediaKeySystemAccess=r._config.requestMediaKeySystemAccessFunc,r._drmSystemOptions=t.config.drmSystemOptions,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,l=i.prototype;return l.getLicenseServerUrl=function(e){switch(e){case Ht.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},l._attemptKeySystemAccess=function(e,t,r){var i=this,a=function(e,t,r,i){switch(e){case Ht.WIDEVINE:return function(e,t,r){var i={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||""})})),t.forEach((function(e){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||""})})),[i]}(t,r,i);default:throw new Error("Unknown key-system: "+e)}}(e,t,r,this._drmSystemOptions);u.b.log("Requesting encrypted media key-system access");var n=this.requestMediaKeySystemAccess(e,a);this.mediaKeysPromise=n.then((function(t){return i._onMediaKeySystemAccessObtained(e,t)})),n.catch((function(t){u.b.error('Failed to obtain key-system "'+e+'" access:',t)}))},l._onMediaKeySystemAccessObtained=function(e,t){var r=this;u.b.log('Access for key-system "'+e+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(i);var a=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return i.mediaKeys=t,u.b.log('Media-keys created for key-system "'+e+'"'),r._onMediaKeysCreated(),t}));return a.catch((function(e){u.b.error("Failed to create media-keys:",e)})),a},l._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},l._onNewMediaKeySession=function(e){var t=this;u.b.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(r){t._onKeySessionMessage(e,r.message)}),!1)},l._onKeySessionMessage=function(e,t){u.b.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){u.b.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},l._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return u.b.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_KEYS,fatal:!0});u.b.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(e,t){var r=this,i=this._mediaKeysList[0];if(!i)return u.b.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(i.mediaKeysSessionInitialized)u.b.warn("Key-Session already initialized but requested again");else{var a=i.mediaKeysSession;if(!a)return u.b.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return u.b.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});u.b.log('Generating key-session request for "'+e+'" init data type'),i.mediaKeysSessionInitialized=!0,a.generateRequest(e,t).then((function(){u.b.debug("Key-session generation succeeded")})).catch((function(e){u.b.error("Error generating key-session request:",e),r.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},l._createLicenseXhr=function(e,t,r){var i=new XMLHttpRequest,a=this._licenseXhrSetup;try{if(a)try{a(i,e)}catch(t){i.open("POST",e,!0),a(i,e)}i.readyState||i.open("POST",e,!0)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,e,t,r),i},l._onLicenseRequestReadyStageChange=function(e,t,r,i){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,u.b.log("License request succeeded"),"arraybuffer"!==e.responseType&&u.b.warn("xhr response type was not set to the expected arraybuffer for license request"),i(e.response);else{if(u.b.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var a=3-this._requestLicenseFailureCount+1;u.b.warn("Retrying license request, "+a+" attempts left"),this._requestLicense(r,i)}}},l._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case Ht.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},l._requestLicense=function(e,t){u.b.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return u.b.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var i=this.getLicenseServerUrl(r.mediaKeySystemDomain),a=this._createLicenseXhr(i,e,t);u.b.log("Sending license request to URL: "+i);var n=this._generateLicenseRequestChallenge(r,e);a.send(n)}catch(e){u.b.error("Failure requesting DRM license: "+e),this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(e){if(this._emeEnabled){var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},l.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},l.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),r=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(Ht.WIDEVINE,t,r)}},a=i,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&qt(a.prototype,n),s&&qt(a,s),i}(h);function zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(r),!0).forEach((function(t){$t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Jt=Qt(Qt({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:$e,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:Ve,bufferController:We,capLevelController:Xe,fpsController:Qe,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:Wt,testBandwidth:!0},{cueHandler:i,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Yt,subtitleTrackController:Kt,timelineController:Nt,audioStreamController:rt,audioTrackController:Ze,emeController:Xt});function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){tr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ir(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ar(e,t,r){return t&&ir(e.prototype,t),r&&ir(e,r),e}var nr=function(e){var t,r;function i(t){var r;void 0===t&&(t={}),(r=e.call(this)||this).config=void 0,r._autoLevelCapping=void 0,r.abrController=void 0,r.capLevelController=void 0,r.levelController=void 0,r.streamController=void 0,r.networkControllers=void 0,r.audioTrackController=void 0,r.subtitleTrackController=void 0,r.emeController=void 0,r.coreComponents=void 0,r.media=null,r.url=null;var a=i.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");r.config=er(er({},a),t);var n=rr(r).config;if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(void 0===n.liveSyncDuration||n.liveMaxLatencyDuration<=n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(u.a)(n.debug),r._autoLevelCapping=-1;var s=r.abrController=new n.abrController(rr(r)),o=new n.bufferController(rr(r)),l=r.capLevelController=new n.capLevelController(rr(r)),d=new n.fpsController(rr(r)),c=new x(rr(r)),h=new M(rr(r)),f=new F(rr(r)),g=new Be(rr(r)),p=r.levelController=new Me(rr(r)),v=new K(rr(r)),m=[p,r.streamController=new Pe(rr(r),v)],y=n.audioStreamController;y&&m.push(new y(rr(r),v)),r.networkControllers=m;var b=[c,h,f,s,o,l,d,g,v];if(y=n.audioTrackController){var T=new y(rr(r));r.audioTrackController=T,b.push(T)}if(y=n.subtitleTrackController){var E=new y(rr(r));r.subtitleTrackController=E,m.push(E)}if(y=n.emeController){var S=new y(rr(r));r.emeController=S,b.push(S)}return(y=n.subtitleStreamController)&&m.push(new y(rr(r),v)),(y=n.timelineController)&&b.push(new y(rr(r))),r.coreComponents=b,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i.isSupported=function(){return function(){var e=q();if(!e)return!1;var t=self.SourceBuffer||self.WebKitSourceBuffer,r=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!r&&!!i}()},ar(i,null,[{key:"version",get:function(){return"0.14.17"}},{key:"Events",get:function(){return d.a}},{key:"ErrorTypes",get:function(){return o.b}},{key:"ErrorDetails",get:function(){return o.a}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:Jt},set:function(e){i.defaultConfig=e}}]);var a=i.prototype;return a.destroy=function(){u.b.log("destroy"),this.trigger(d.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},a.attachMedia=function(e){u.b.log("attachMedia"),this.media=e,this.trigger(d.a.MEDIA_ATTACHING,{media:e})},a.detachMedia=function(){u.b.log("detachMedia"),this.trigger(d.a.MEDIA_DETACHING),this.media=null},a.loadSource=function(e){e=s.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),u.b.log("loadSource:"+e),this.url=e,this.trigger(d.a.MANIFEST_LOADING,{url:e})},a.startLoad=function(e){void 0===e&&(e=-1),u.b.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},a.stopLoad=function(){u.b.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},a.swapAudioCodec=function(){u.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},a.recoverMediaError=function(){u.b.log("recoverMediaError");var e=this.media;this.detachMedia(),e&&this.attachMedia(e)},a.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},ar(i,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){u.b.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){u.b.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){u.b.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){u.b.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){u.b.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){u.b.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"bandwidthEstimate",get:function(){var e=this.abrController._bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,r=e?e.length:0,i=0;i<r;i++){if((e[i].realBitrate?Math.max(e[i].realBitrate,e[i].bitrate):e[i].bitrate)>t)return i}return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),i}(z);nr.defaultConfig=void 0}]).default}));
1
+ "undefined"!=typeof window&&function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Hls=e():t.Hls=e()}(this,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(i,a,function(e){return t[e]}.bind(null,a));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/dist/",r(r.s=20)}([function(t,e,r){"use strict";var i;r.d(e,"a",(function(){return i})),function(t){t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached"}(i||(i={}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return l}));var i=function(){},a={trace:i,debug:i,log:i,warn:i,info:i,error:i},n=a;function s(t){var e=self.console[t];return e?e.bind(self.console,"["+t+"] >"):i}function o(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];r.forEach((function(e){n[e]=t[e]?t[e].bind(t):s(e)}))}(t,"debug","log","info","warn","error");try{n.log()}catch(t){n=a}}else n=a}var l=a},function(t,e,r){"use strict";var i,a;r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return a})),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(i||(i={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown"}(a||(a={}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var i=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)};Number.MAX_SAFE_INTEGER},function(t,e,r){"use strict";var i,a;r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a})),function(t){t.MANIFEST="manifest",t.LEVEL="level",t.AUDIO_TRACK="audioTrack",t.SUBTITLE_TRACK="subtitleTrack"}(i||(i={})),function(t){t.MAIN="main",t.AUDIO="audio",t.SUBTITLE="subtitle"}(a||(a={}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return g})),r.d(e,"c",(function(){return v}));var i,a=r(3),n=r(11),s=r(1),o=r(17),l=r(12);function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e,r){return e&&d(t.prototype,e),r&&d(t,r),t}!function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"}(i||(i={}));var f=function(){function t(t){var e;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((e={})[i.AUDIO]=null,e[i.VIDEO]=null,e[i.AUDIOVIDEO]=null,e),this.baseurl=t}return t.prototype.setByteRange=function(t,e){var r=t.split("@",2),i=[];1===r.length?i[0]=e?e.byteRangeEndOffset:0:i[0]=parseInt(r[1]),i[1]=parseInt(r[0])+i[0],this._byteRange=i},c(t,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(n.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(t){this._url=t}}]),t}(),g=function(t){function e(e,r){var i;return(i=t.call(this,r)||this)._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkey=void 0,i.type=void 0,i.loader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new l.a,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.type=e,i}u(e,t);var r=e.prototype;return r.createInitializationVector=function(t){for(var e=new Uint8Array(16),r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e},r.setDecryptDataFromLevelKey=function(t,e){var r=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((r=o.a.fromURI(t.uri)).method=t.method,r.iv=this.createInitializationVector(e),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(t,e,r,i,a,n){void 0===n&&(n=!1);var s=this.elementaryStreams,o=s[t];o?(o.startPTS=Math.min(o.startPTS,e),o.endPTS=Math.max(o.endPTS,r),o.startDTS=Math.min(o.startDTS,i),o.endDTS=Math.max(o.endDTS,a)):s[t]={startPTS:e,endPTS:r,startDTS:i,endDTS:a,partial:n}},r.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[i.AUDIO]=null,t[i.VIDEO]=null,t[i.AUDIOVIDEO]=null},c(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&s.b.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(a.a)(this.programDateTime))return null;var t=Object(a.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),v=function(t){function e(e,r,i,a,n){var s;(s=t.call(this,i)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new l.a,s.duration=e.decimalFloatingPoint("DURATION"),s.gap=e.bool("GAP"),s.independent=e.bool("INDEPENDENT"),s.relurl=e.enumeratedString("URI"),s.fragment=r,s.index=a;var o=e.enumeratedString("BYTERANGE");return o&&s.setByteRange(o,n),n&&(s.fragOffset=n.fragOffset+n.duration),s}return u(e,t),c(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},function(t,e,r){"use strict";r.d(e,"b",(function(){return h})),r.d(e,"g",(function(){return d})),r.d(e,"f",(function(){return c})),r.d(e,"d",(function(){return f})),r.d(e,"c",(function(){return g})),r.d(e,"e",(function(){return p})),r.d(e,"h",(function(){return m})),r.d(e,"a",(function(){return y}));var i=r(9),a=r(5),n=Math.pow(2,32)-1,s=[].push;function o(t){return String.fromCharCode.apply(null,t)}function l(t,e){"data"in t&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r}function u(t,e,r){"data"in t&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r}function h(t,e){var r,i,a,n=[];if(!e.length)return n;"data"in t?(r=t.data,i=t.start,a=t.end):(i=0,a=(r=t).byteLength);for(var u=i;u<a;){var d=l(r,u),c=d>1?u+d:a;if(o(r.subarray(u+4,u+8))===e[0])if(1===e.length)n.push({data:r,start:u+8,end:c});else{var f=h({data:r,start:u+8,end:c},e.slice(1));f.length&&s.apply(n,f)}u=c}return n}function d(t){var e=h(t,["moov"])[0],r=e?e.end:null,i=h(t,["sidx"]);if(!i||!i[0])return null;var a=[],n=i[0],s=n.data[0],o=0===s?8:16,u=l(n,o);o+=4;o+=0===s?8:16,o+=2;var d=n.end+0,c=function(t,e){"data"in t&&(e+=t.start,t=t.data);var r=t[e]<<8|t[e+1];return r<0?65536+r:r}(n,o);o+=2;for(var f=0;f<c;f++){var g=o,v=l(n,g);g+=4;var p=2147483647&v;if(1===(2147483648&v)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var m=l(n,g);g+=4,a.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/u,start:d,end:d+p-1}}),d+=p,o=g+=4}return{earliestPresentationTime:0,timescale:u,version:s,referencesCount:c,references:a,moovEndOffset:r}}function c(t){for(var e=[],r=h(t,["moov","trak"]),i=0;i<r.length;i++){var n=r[i],s=h(n,["tkhd"])[0];if(s){var u=s.data[s.start],d=0===u?12:20,c=l(s,d),f=h(n,["mdia","mdhd"])[0];if(f){var g=l(f,d=0===(u=f.data[f.start])?12:20),v=h(n,["mdia","hdlr"])[0];if(v){var p=o(v.data.subarray(v.start+8,v.start+12)),m={soun:a.a.AUDIO,vide:a.a.VIDEO}[p];if(m){var y=h(n,["mdia","minf","stbl","stsd"])[0],T=void 0;y&&(T=o(y.data.subarray(y.start+12,y.start+16))),e[c]={timescale:g,type:m},e[m]={timescale:g,id:c,codec:T}}}}}}return h(t,["moov","mvex","trex"]).forEach((function(t){var r=l(t,4),i=e[r];i&&(i.default={duration:l(t,12),flags:l(t,20)})})),e}function f(t,e){return h(e,["moof","traf"]).reduce((function(e,r){var i=h(r,["tfdt"])[0],a=i.data[i.start],n=h(r,["tfhd"]).reduce((function(e,r){var n=l(r,4),s=t[n];if(s){var o=l(i,4);1===a&&(o*=Math.pow(2,32),o+=l(i,8));var u=o/(s.timescale||9e4);if(isFinite(u)&&(null===e||u<e))return u}return e}),null);return null!==n&&isFinite(n)&&(null===e||n<e)?n:e}),null)||0}function g(t,e){for(var r=0,i=0,n=0,s=h(t,["moof","traf"]),o=0;o<s.length;o++){var u=s[o],c=h(u,["tfhd"])[0],f=e[l(c,4)];if(f){var g=f.default,p=l(c,0)|(null==g?void 0:g.flags),m=null==g?void 0:g.duration;8&p&&(m=l(c,2&p?12:8));for(var y=f.timescale||9e4,T=h(u,["trun"]),E=0;E<T.length;E++){if(m)r=m*l(T[E],4);else r=v(T[E]);f.type===a.a.VIDEO?i+=r/y:f.type===a.a.AUDIO&&(n+=r/y)}}}if(0===i&&0===n){var b=d(t);if(null!=b&&b.references)return b.references.reduce((function(t,e){return t+e.info.duration||0}),0)}return i||n}function v(t){var e=l(t,0),r=8;1&e&&(r+=4),4&e&&(r+=4);for(var i=0,a=l(t,4),n=0;n<a;n++){if(256&e)i+=l(t,r),r+=4;512&e&&(r+=4),1024&e&&(r+=4),2048&e&&(r+=4)}return i}function p(t,e,r){h(e,["moof","traf"]).forEach((function(e){h(e,["tfhd"]).forEach((function(i){var a=l(i,4),s=t[a];if(s){var o=s.timescale||9e4;h(e,["tfdt"]).forEach((function(t){var e=t.data[t.start],i=l(t,4);if(0===e)u(t,4,i-r*o);else{i*=Math.pow(2,32),i+=l(t,8),i-=r*o,i=Math.max(i,0);var a=Math.floor(i/(n+1)),s=Math.floor(i%(n+1));u(t,4,a),u(t,8,s)}}))}}))}))}function m(t){var e={valid:null,remainder:null},r=h(t,["moof"]);if(!r)return e;if(r.length<2)return e.remainder=t,e;var a=r[r.length-1];return e.valid=Object(i.a)(t,0,a.start-8),e.remainder=Object(i.a)(t,a.start-8),e}function y(t,e){var r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"a",(function(){return l})),r.d(e,"d",(function(){return u})),r.d(e,"e",(function(){return h})),r.d(e,"c",(function(){return c})),r.d(e,"f",(function(){return y}));var i,a=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},n=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},s=function(t,e){for(var r=e,i=0;a(t,e);){i+=10,i+=o(t,e+6),n(t,e+10)&&(i+=10),e+=i}if(i>0)return t.subarray(r,r+i)},o=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},l=function(t,e){return a(t,e)&&o(t,e+6)+10<=t.length-e},u=function(t){for(var e=c(t),r=0;r<e.length;r++){var i=e[r];if(h(i))return m(i)}},h=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},d=function(t){var e=String.fromCharCode(t[0],t[1],t[2],t[3]),r=o(t,4);return{type:e,size:r,data:t.subarray(10,10+r)}},c=function(t){for(var e=0,r=[];a(t,e);){for(var i=o(t,e+6),s=(e+=10)+i;e+8<s;){var l=d(t.subarray(e)),u=f(l);u&&r.push(u),e+=l.size+10}n(t,e)&&(e+=10)}return r},f=function(t){return"PRIV"===t.type?g(t):"W"===t.type[0]?p(t):v(t)},g=function(t){if(!(t.size<2)){var e=y(t.data,!0),r=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:r.buffer}}},v=function(t){if(!(t.size<2)){if("TXXX"===t.type){var e=1,r=y(t.data.subarray(e),!0);e+=r.length+1;var i=y(t.data.subarray(e));return{key:t.type,info:r,data:i}}var a=y(t.data.subarray(1));return{key:t.type,data:a}}},p=function(t){if("WXXX"===t.type){if(t.size<2)return;var e=1,r=y(t.data.subarray(e),!0);e+=r.length+1;var i=y(t.data.subarray(e));return{key:t.type,info:r,data:i}}var a=y(t.data);return{key:t.type,data:a}},m=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),r=1&e[3],i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},y=function(t,e){void 0===e&&(e=!1);var r=T();if(r){var i=r.decode(t);if(e){var a=i.indexOf("\0");return-1!==a?i.substring(0,a):i}return i.replace(/\0/g,"")}for(var n,s,o,l=t.length,u="",h=0;h<l;){if(0===(n=t[h++])&&e)return u;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(n);break;case 12:case 13:s=t[h++],u+=String.fromCharCode((31&n)<<6|63&s);break;case 14:s=t[h++],o=t[h++],u+=String.fromCharCode((15&n)<<12|(63&s)<<6|(63&o)<<0)}}return u};function T(){return i||void 0===self.TextDecoder||(i=new self.TextDecoder("utf-8")),i}},function(t,e,r){"use strict";r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s}));function i(t,e,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var a=t*e*r;return i?Math.round(a):a}function a(t,e,r,a){return void 0===r&&(r=1),void 0===a&&(a=!1),i(t,e,1/r,a)}function n(t,e){return void 0===e&&(e=!1),i(t,1e3,1/9e4,e)}function s(t,e){return void 0===e&&(e=1),i(t,9e4,1/e)}},function(t,e,r){"use strict";function i(t,e,r){return Uint8Array.prototype.slice?t.slice(e,r):new Uint8Array(Array.prototype.slice.call(t,e,r))}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";r.d(e,"c",(function(){return lt})),r.d(e,"d",(function(){return ht})),r.d(e,"a",(function(){return dt})),r.d(e,"b",(function(){return ct}));var i=r(0),a=r(2),n=r(15),s=r(3),o=r(7);var l=r(6),u=r(9),h=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,r){this._id3Track={type:"id3",id:0,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,r){},e.demux=function(t,e){this.cachedData&&(t=Object(l.a)(this.cachedData,t),this.cachedData=null);var r,i,a=o.b(t,0),n=a?a.length:0,s=this._audioTrack,h=this._id3Track,c=a?o.d(a):void 0,f=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=d(c,e)),a&&a.length>0&&h.samples.push({pts:this.initPTS,dts:this.initPTS,data:a}),i=this.initPTS;n<f;){if(this.canParse(t,n)){var g=this.appendFrame(s,t,n);g?(this.frameIndex++,i=g.sample.pts,r=n+=g.length):n=f}else o.a(t,n)?(a=o.b(t,n),h.samples.push({pts:i,dts:i,data:a}),r=n+=a.length):n++;if(n===f&&r!==f){var v=Object(u.a)(t,r);this.cachedData?this.cachedData=Object(l.a)(this.cachedData,v):this.cachedData=v}}return{audioTrack:s,avcTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},id3Track:h,textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},e.flush=function(t){var e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},id3Track:this._id3Track,textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.destroy=function(){},t}(),d=function(t,e){return Object(s.a)(t)?90*t:9e4*e},c=h,f=r(1);function g(t,e){return 255===t[e]&&240==(246&t[e+1])}function v(t,e){return 1&t[e+1]?7:9}function p(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function m(t,e){return e+1<t.length&&g(t,e)}function y(t,e){if(m(t,e)){var r=v(t,e);if(e+r>=t.length)return!1;var i=p(t,e);if(i<=r)return!1;var a=e+i;return a===t.length||m(t,a)}return!1}function T(t,e,r,n,s){if(!t.samplerate){var o=function(t,e,r,n){var s,o,l,u,h=navigator.userAgent.toLowerCase(),d=n,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&e[r+2])>>>6);var g=(60&e[r+2])>>>2;if(!(g>c.length-1))return l=(1&e[r+2])<<2,l|=(192&e[r+3])>>>6,f.b.log("manifest codec:"+n+", ADTS type:"+s+", samplingIndex:"+g),/firefox/i.test(h)?g>=6?(s=5,u=new Array(4),o=g-3):(s=2,u=new Array(2),o=g):-1!==h.indexOf("android")?(s=2,u=new Array(2),o=g):(s=5,u=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&g>=6?o=g-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(g>=6&&1===l||/vivaldi/i.test(h))||!n&&1===l)&&(s=2,u=new Array(2)),o=g)),u[0]=s<<3,u[0]|=(14&g)>>1,u[1]|=(1&g)<<7,u[1]|=l<<3,5===s&&(u[1]|=(14&o)>>1,u[2]=(1&o)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:c[g],channelCount:l,codec:"mp4a.40."+s,manifestCodec:d};t.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+g})}(e,r,n,s);if(!o)return;t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,f.b.log("parsed codec:"+t.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function E(t){return 9216e4/t}function b(t,e,r,i,a){var n=function(t,e,r,i,a){var n=t.length,s=v(t,e),o=p(t,e);if((o-=s)>0&&e+s+o<=n)return{headerLength:s,frameLength:o,stamp:r+i*a}}(e,r,i,a,E(t.samplerate));if(n){var s=n.stamp,o=n.headerLength,l=n.frameLength,u={unit:e.subarray(r+o,r+o+l),pts:s,dts:s};return t.samples.push(u),{sample:u,length:l+o}}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var L=function(t){var e,r;function i(e,r){var i;return(i=t.call(this)||this).observer=void 0,i.config=void 0,i.observer=e,i.config=r,i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,S(e,r);var a=i.prototype;return a.resetInitSegment=function(e,r,i){t.prototype.resetInitSegment.call(this,e,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:0,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}},i.probe=function(t){if(!t)return!1;for(var e=(o.b(t,0)||[]).length,r=t.length;e<r;e++)if(y(t,e))return f.b.log("ADTS sync word found !"),!0;return!1},a.canParse=function(t,e){return function(t,e){return function(t,e){return e+5<t.length}(t,e)&&g(t,e)&&p(t,e)<=t.length-e}(t,e)},a.appendFrame=function(t,e,r){return T(t,this.observer,e,r,t.manifestCodec),b(t,e,r,this.initPTS,this.frameIndex)},i}(c);L.minProbeByteLength=9;var A=L,R=function(){function t(t,e){this.remainderData=null,this.config=void 0,this.config=e}var e=t.prototype;return e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.resetContiguity=function(){},t.probe=function(t){return Object(l.b)({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.demux=function(t){var e=t,r={type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0};if(this.config.progressive){this.remainderData&&(e=Object(l.a)(this.remainderData,t));var i=Object(l.h)(e);this.remainderData=i.remainder,r.samples=i.valid||new Uint8Array}else r.samples=e;return{audioTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},avcTrack:r,id3Track:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.flush=function(){var t={type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0};return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},avcTrack:t,id3Track:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();R.minProbeByteLength=1024;var D=R,k=null,_=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],I=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],w=[0,1,1,4];function O(t,e,r,i,a){if(!(r+24>e.length)){var n=x(e,r);if(n&&r+n.frameLength<=e.length){var s=i+a*(9e4*n.samplesPerFrame/n.sampleRate),o={unit:e.subarray(r,r+n.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(o),{sample:o,length:n.frameLength}}}}function x(t,e){var r=t[e+1]>>3&3,i=t[e+1]>>1&3,a=t[e+2]>>4&15,n=t[e+2]>>2&3;if(1!==r&&0!==a&&15!==a&&3!==n){var s=t[e+2]>>1&1,o=t[e+3]>>6,l=1e3*_[14*(3===r?3-i:3===i?3:4)+a-1],u=I[3*(3===r?0:2===r?1:2)+n],h=3===o?1:2,d=C[r][i],c=w[i],f=8*d*c,g=Math.floor(d*l/u+s)*c;if(null===k){var v=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);k=v?parseInt(v[1]):0}return!!k&&k<=87&&2===i&&l>=224e3&&0===o&&(t[e+3]=128|t[e+3]),{sampleRate:u,channelCount:h,frameLength:g,samplesPerFrame:f}}}function P(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function M(t,e){return e+1<t.length&&P(t,e)}function F(t,e){if(e+1<t.length&&P(t,e)){var r=x(t,e),i=4;null!=r&&r.frameLength&&(i=r.frameLength);var a=e+i;return a===t.length||M(t,a)}return!1}var N=function(){function t(t){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var e=t.prototype;return e.loadWord=function(){var t=this.data,e=this.bytesAvailable,r=t.byteLength-e,i=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");i.set(t.subarray(r,r+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a},e.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&f.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<<e|this.readBits(e):r},e.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,r=8,i=0;i<t;i++)0!==r&&(r=(e+this.readEG()+256)%256),e=0===r?e:r},e.readSPS=function(){var t,e,r,i=0,a=0,n=0,s=0,o=this.readUByte.bind(this),l=this.readBits.bind(this),u=this.readUEG.bind(this),h=this.readBoolean.bind(this),d=this.skipBits.bind(this),c=this.skipEG.bind(this),f=this.skipUEG.bind(this),g=this.skipScalingList.bind(this);o();var v=o();if(l(5),d(3),o(),f(),100===v||110===v||122===v||244===v||44===v||83===v||86===v||118===v||128===v){var p=u();if(3===p&&d(1),f(),f(),d(1),h())for(e=3!==p?8:12,r=0;r<e;r++)h()&&g(r<6?16:64)}f();var m=u();if(0===m)u();else if(1===m)for(d(1),c(),c(),t=u(),r=0;r<t;r++)c();f(),d(1);var y=u(),T=u(),E=l(1);0===E&&d(1),d(1),h()&&(i=u(),a=u(),n=u(),s=u());var b=[1,1];if(h()&&h())switch(o()){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[o()<<8|o(),o()<<8|o()]}return{width:Math.ceil(16*(y+1)-2*i-2*a),height:(2-E)*(T+1)*16-(E?2:4)*(n+s),pixelRatio:b}},e.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),U=function(){function t(t,e,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new n.a(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer,e)},e.decryptAacSample=function(t,e,r,i){var a=t[e].unit,n=a.subarray(16,a.length-a.length%16),s=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),o=this;this.decryptBuffer(s,(function(n){var s=new Uint8Array(n);a.set(s,16),i||o.decryptAacSamples(t,e+1,r)}))},e.decryptAacSamples=function(t,e,r){for(;;e++){if(e>=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},e.getAvcDecryptedUnit=function(t,e){for(var r=new Uint8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)t.set(r.subarray(i,i+16),a);return t},e.decryptAvcSample=function(t,e,r,i,a,n){var s=q(a.data),o=this.getAvcEncryptedData(s),l=this;this.decryptBuffer(o.buffer,(function(o){a.data=l.getAvcDecryptedUnit(s,o),n||l.decryptAvcSamples(t,e,r+1,i)}))},e.decryptAvcSamples=function(t,e,r,i){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.data.length<=48||1!==n.type&&5!==n.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,s),!s)return}}}},t}(),B={video:1,audio:2,id3:3,text:4},G=function(){function t(t,e,r){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=t,this.config=e,this.typeSupported=r}t.probe=function(e){var r=t.syncOffset(e);return!(r<0)&&(r&&f.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},t.syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),r=0;r<e;){if(71===t[r]&&71===t[r+188]&&71===t[r+376])return r;r++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:B[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===t?e:void 0}};var e=t.prototype;return e.resetInitSegment=function(e,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",i),this._audioTrack=t.createTrack("audio",i),this._id3Track=t.createTrack("id3",i),this._txtTrack=t.createTrack("text",i),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=r,this._duration=i},e.resetTimeStamp=function(){},e.resetContiguity=function(){var t=this._audioTrack,e=this._avcTrack,r=this._id3Track;t&&(t.pesData=null),e&&(e.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},e.demux=function(e,r,n,s){var o;void 0===n&&(n=!1),void 0===s&&(s=!1),n||(this.sampleAes=null);var u=this._avcTrack,h=this._audioTrack,d=this._id3Track,c=u.pid,g=u.pesData,v=h.pid,p=d.pid,m=h.pesData,y=d.pesData,T=!1,E=this.pmtParsed,b=this._pmtId,S=e.length;if(this.remainderData&&(S=(e=Object(l.a)(this.remainderData,e)).length,this.remainderData=null),S<188&&!s)return this.remainderData=e,{audioTrack:h,avcTrack:u,id3Track:d,textTrack:this._txtTrack};var L=Math.max(0,t.syncOffset(e));(S-=(S+L)%188)<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,S,e.buffer.byteLength-S));for(var A=L;A<S;A+=188)if(71===e[A]){var R=!!(64&e[A+1]),D=((31&e[A+1])<<8)+e[A+2],k=void 0;if((48&e[A+3])>>4>1){if((k=A+5+e[A+4])===A+188)continue}else k=A+4;switch(D){case c:R&&(g&&(o=V(g))&&this.parseAVCPES(o,!1),g={data:[],size:0}),g&&(g.data.push(e.subarray(k,A+188)),g.size+=A+188-k);break;case v:R&&(m&&(o=V(m))&&(h.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),m={data:[],size:0}),m&&(m.data.push(e.subarray(k,A+188)),m.size+=A+188-k);break;case p:R&&(y&&(o=V(y))&&this.parseID3PES(o),y={data:[],size:0}),y&&(y.data.push(e.subarray(k,A+188)),y.size+=A+188-k);break;case 0:R&&(k+=e[k]+1),b=this._pmtId=j(e,k);break;case b:R&&(k+=e[k]+1);var _=H(e,k,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,n);(c=_.avc)>0&&(u.pid=c),(v=_.audio)>0&&(h.pid=v,h.isAAC=_.isAAC),(p=_.id3)>0&&(d.pid=p),T&&!E&&(f.b.log("reparse from beginning"),T=!1,A=L-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:T=!0}}else this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});u.pesData=g,h.pesData=m,d.pesData=y;var I={audioTrack:h,avcTrack:u,id3Track:d,textTrack:this._txtTrack};return s&&this.extractRemainingSamples(I),I},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,r=t.audioTrack,i=t.avcTrack,a=t.id3Track,n=i.pesData,s=r.pesData,o=a.pesData;n&&(e=V(n))?(this.parseAVCPES(e,!0),i.pesData=null):i.pesData=n,s&&(e=V(s))?(r.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),r.pesData=null):(null!=s&&s.size&&f.b.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=s),o&&(e=V(o))?(this.parseID3PES(e),a.pesData=null):a.pesData=o},e.demuxSampleAes=function(t,e,r){var i=this.demux(t,r,!0,!this.config.progressive),a=this.sampleAes=new U(this.observer,this.config,e);return this.decrypt(i,a)},e.decrypt=function(t,e){return new Promise((function(r){var i=t.audioTrack,a=t.avcTrack;i.samples&&i.isAAC?e.decryptAacSamples(i.samples,0,(function(){a.samples?e.decryptAvcSamples(a.samples,0,0,(function(){r(t)})):r(t)})):a.samples&&e.decryptAvcSamples(a.samples,0,0,(function(){r(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var r,i=this,a=this._avcTrack,n=this.parseAVCNALu(t.data),s=this.avcSample,l=!1;t.data=null,s&&n.length&&!a.audFound&&(W(s,a),s=this.avcSample=K(!1,t.pts,t.dts,"")),n.forEach((function(e){switch(e.type){case 1:r=!0,s||(s=i.avcSample=K(!0,t.pts,t.dts,"")),s.frame=!0;var n=e.data;if(l&&n.length>4){var u=new N(n).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(s.key=!0)}break;case 5:r=!0,s||(s=i.avcSample=K(!0,t.pts,t.dts,"")),s.key=!0,s.frame=!0;break;case 6:r=!0;var h=new N(q(e.data));h.readUByte();for(var d=0,c=0,f=!1,g=0;!f&&h.bytesAvailable>1;){d=0;do{d+=g=h.readUByte()}while(255===g);c=0;do{c+=g=h.readUByte()}while(255===g);if(4===d&&0!==h.bytesAvailable){if(f=!0,181===h.readUByte())if(49===h.readUShort())if(1195456820===h.readUInt())if(3===h.readUByte()){for(var v=h.readUByte(),p=31&v,m=[v,h.readUByte()],y=0;y<p;y++)m.push(h.readUByte()),m.push(h.readUByte()),m.push(h.readUByte());Y(i._txtTrack.samples,{type:3,pts:t.pts,bytes:m})}}else if(5===d&&0!==h.bytesAvailable){if(f=!0,c>16){for(var T=[],E=0;E<16;E++)T.push(h.readUByte().toString(16)),3!==E&&5!==E&&7!==E&&9!==E||T.push("-");for(var b=c-16,S=new Uint8Array(b),L=0;L<b;L++)S[L]=h.readUByte();Y(i._txtTrack.samples,{pts:t.pts,payloadType:d,uuid:T.join(""),userData:Object(o.f)(S),userDataBytes:S})}}else if(c<h.bytesAvailable)for(var A=0;A<c;A++)h.readUByte()}break;case 7:if(r=!0,l=!0,!a.sps){var R=new N(e.data).readSPS();a.width=R.width,a.height=R.height,a.pixelRatio=R.pixelRatio,a.sps=[e.data],a.duration=i._duration;for(var D=e.data.subarray(1,4),k="avc1.",_=0;_<3;_++){var I=D[_].toString(16);I.length<2&&(I="0"+I),k+=I}a.codec=k}break;case 8:r=!0,a.pps||(a.pps=[e.data]);break;case 9:r=!1,a.audFound=!0,s&&W(s,a),s=i.avcSample=K(!1,t.pts,t.dts,"");break;case 12:r=!1;break;default:r=!1,s&&(s.debug+="unknown NAL "+e.type+" ")}s&&r&&s.units.push(e)})),e&&s&&(W(s,a),this.avcSample=null)},e.getLastNalUnit=function(){var t,e,r=this.avcSample;if(!r||0===r.units.length){var i=this._avcTrack.samples;r=i[i.length-1]}if(null!==(t=r)&&void 0!==t&&t.units){var a=r.units;e=a[a.length-1]}return e},e.parseAVCNALu=function(t){var e,r,i=t.byteLength,a=this._avcTrack,n=a.naluState||0,s=n,o=[],l=0,u=-1,h=0;for(-1===n&&(u=0,h=31&t[0],n=0,l=1);l<i;)if(e=t[l++],n)if(1!==n)if(e)if(1===e){if(u>=0){var d={data:t.subarray(u,l-n-1),type:h};o.push(d)}else{var c=this.getLastNalUnit();if(c&&(s&&l<=4-s&&c.state&&(c.data=c.data.subarray(0,c.data.byteLength-s)),(r=l-n-1)>0)){var f=new Uint8Array(c.data.byteLength+r);f.set(c.data,0),f.set(t.subarray(0,r),c.data.byteLength),c.data=f}}l<i?(u=l,h=31&t[l],n=0):n=-1}else n=0;else n=3;else n=e?0:2;else n=e?0:1;if(u>=0&&n>=0){var g={data:t.subarray(u,i),type:h,state:n};o.push(g)}if(0===o.length){var v=this.getLastNalUnit();if(v){var p=new Uint8Array(v.data.byteLength+t.byteLength);p.set(v.data,0),p.set(t,v.data.byteLength),v.data=p}}return a.naluState=n,o},e.parseAACPES=function(t){var e,r,n,s,o=this._audioTrack,l=this.aacLastPTS,u=this.aacOverFlow,h=t.data;if(u){var d=new Uint8Array(u.byteLength+h.byteLength);d.set(u,0),d.set(h,u.byteLength),h=d}for(e=0,r=h.length;e<r-1&&!m(h,e);e++);if(e&&(e<r-1?(n="AAC PES did not start with ADTS header,offset:"+e,s=!1):(n="no ADTS header found in AAC PES",s=!0),f.b.warn("parsing error:"+n),this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:s,reason:n}),s))return;T(o,this.observer,h,e,this.audioCodec);var c,g=0,v=E(o.samplerate);if(void 0!==t.pts)c=t.pts;else{if(null===l)return void f.b.warn("[tsdemuxer]: AAC PES unknown PTS");c=l}if(u&&null!==l){var p=l+v;Math.abs(p-c)>1&&(f.b.log("[tsdemuxer]: AAC: align PTS for overlapping frames by "+Math.round((p-c)/90)),c=p)}for(var y=null;e<r;){if(m(h,e)){if(e+5<r){var S=b(o,h,e,c,g);if(S){e+=S.length,y=S.sample.pts,g++;continue}}break}e++}this.aacOverFlow=e<r?h.subarray(e,r):null,this.aacLastPTS=y},e.parseMPEGPES=function(t){var e=t.data,r=e.length,i=0,a=0,n=t.pts;if(void 0!==n)for(;a<r;)if(M(e,a)){var s=O(this._audioTrack,e,a,n,i);if(!s)break;a+=s.length,i++}else a++;else f.b.warn("[tsdemuxer]: MPEG PES unknown PTS")},e.parseID3PES=function(t){void 0!==t.pts?this._id3Track.samples.push(t):f.b.warn("[tsdemuxer]: ID3 PES unknown PTS")},t}();function K(t,e,r,i){return{key:t,frame:!1,pts:e,dts:r,units:[],debug:i,length:0}}function j(t,e){return(31&t[e+10])<<8|t[e+11]}function H(t,e,r,i){var a={audio:-1,avc:-1,id3:-1,isAAC:!0},n=e+3+((15&t[e+1])<<8|t[e+2])-4;for(e+=12+((15&t[e+10])<<8|t[e+11]);e<n;){var s=(31&t[e+1])<<8|t[e+2];switch(t[e]){case 207:if(!i){f.b.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===a.audio&&(a.audio=s);break;case 21:-1===a.id3&&(a.id3=s);break;case 219:if(!i){f.b.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===a.avc&&(a.avc=s);break;case 3:case 4:r?-1===a.audio&&(a.audio=s,a.isAAC=!1):f.b.log("MPEG audio found, not supported in this browser");break;case 36:f.b.warn("Unsupported HEVC stream type found")}e+=5+((15&t[e+3])<<8|t[e+4])}return a}function V(t){var e,r,i,a,n,s=0,o=t.data;if(!t||0===t.size)return null;for(;o[0].length<19&&o.length>1;){var l=new Uint8Array(o[0].length+o[1].length);l.set(o[0]),l.set(o[1],o[0].length),o[0]=l,o.splice(1,1)}if(1===((e=o[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;var u=e[7];192&u&&(a=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&u?a-(n=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(f.b.warn(Math.round((a-n)/9e4)+"s delta between PTS and DTS, align them"),a=n):n=a);var h=(i=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),c=0,g=o.length;c<g;c++){var v=(e=o[c]).byteLength;if(h){if(h>v){h-=v;continue}e=e.subarray(h),v-=h,h=0}d.set(e,s),s+=v}return r&&(r-=i+3),{data:d,pts:a,dts:n,len:r}}return null}function W(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var r=e.samples,i=r.length;if(!i)return void e.dropped++;var a=r[i-1];t.pts=a.pts,t.dts=a.dts}e.samples.push(t)}t.debug.length&&f.b.log(t.pts+"/"+t.dts+":"+t.debug)}function Y(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts<t[i].pts){t.splice(i,0,e);break}}else t.push(e)}function q(t){for(var e=t.byteLength,r=[],i=1;i<e-2;)0===t[i]&&0===t[i+1]&&3===t[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return t;var a=e-r.length,n=new Uint8Array(a),s=0;for(i=0;i<a;s++,i++)s===r[0]&&(s++,r.shift()),n[i]=t[s];return n}G.minProbeByteLength=188;var X=G;function z(t,e){return(z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Q=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,z(e,r);var a=i.prototype;return a.resetInitSegment=function(e,r,i){t.prototype.resetInitSegment.call(this,e,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:0,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}},i.probe=function(t){if(!t)return!1;for(var e=(o.b(t,0)||[]).length,r=t.length;e<r;e++)if(F(t,e))return f.b.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(t,e){return function(t,e){return P(t,e)&&4<=t.length-e}(t,e)},a.appendFrame=function(t,e,r){if(null!==this.initPTS)return O(t,e,r,this.initPTS,this.frameIndex)},i}(c);Q.minProbeByteLength=4;var $=Q,J=r(16),Z=r(5),tt=function(){function t(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,r){this.audioCodec=e,this.videoCodec=r,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,r=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var i=this.initData=Object(l.f)(t);e||(e=rt(i.audio,Z.a.AUDIO)),r||(r=rt(i.video,Z.a.VIDEO));var a={};i.audio&&i.video?a.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:t,id:"main"}:i.audio?a.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:i.video?a.video={container:"video/mp4",codec:r,initSegment:t,id:"main"}:f.b.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},e.remux=function(t,e,r,i,a){var n=this.initPTS,o=this.lastEndDTS,u={audio:void 0,video:void 0,text:i,id3:r,initSegment:void 0};Object(s.a)(o)||(o=this.lastEndDTS=a||0);var h=e.samples;if(!h||!h.length)return u;var d={initPTS:void 0,timescale:1},c=this.initData;if(c&&c.length||(this.generateInitSegment(h),c=this.initData),!c||!c.length)return f.b.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(d.tracks=this.initTracks,this.emitInitSegment=!1),Object(s.a)(n)||(this.initPTS=d.initPTS=n=et(c,h,o));var g=Object(l.c)(h,c),v=o,p=g+v;Object(l.e)(c,h,n),g>0?this.lastEndDTS=p:(f.b.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var m=!!c.audio,y=!!c.video,T="";m&&(T+="audio"),y&&(T+="video");var E={data1:h,startPTS:v,startDTS:v,endPTS:p,endDTS:p,type:T,hasAudio:m,hasVideo:y,nb:1,dropped:0};return u.audio="audio"===E.type?E:void 0,u.video="audio"!==E.type?E:void 0,u.text=i,u.id3=r,u.initSegment=d,u},t}(),et=function(t,e,r){return Object(l.d)(t,e)-r};function rt(t,e){var r=null==t?void 0:t.codec;return r&&r.length>4?r:"hvc1"===r?"hvc1.1.c.L120.90":"av01"===r?"av01.0.04M.08":"avc1"===r||e===Z.a.VIDEO?"avc1.42e01e":"mp4a.40.5"}var it,at=tt,nt=r(13);try{it=self.performance.now.bind(self.performance)}catch(t){f.b.debug("Unable to use Performance API on this environment"),it=self.Date.now}var st=[{demux:X,remux:J.a},{demux:D,remux:at},{demux:A,remux:J.a},{demux:$,remux:J.a}],ot=1024;st.forEach((function(t){var e=t.demux;ot=Math.max(ot,e.minProbeByteLength)}));var lt=function(){function t(t,e,r,i,a){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new nt.a,this.observer=t,this.typeSupported=e,this.config=r,this.vendor=i,this.id=a}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,r,i){var a=this,n=r.transmuxing;n.executeStart=it();var s=new Uint8Array(t),o=this.cache,u=this.config,h=this.currentTransmuxState,d=this.transmuxConfig;i&&(this.currentTransmuxState=i);var c=function(t,e){var r=null;t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(r=e);return r}(s,e);if(c&&"AES-128"===c.method){var f=this.getDecrypter();if(!u.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,c.key.buffer,c.iv.buffer).then((function(t){var e=a.push(t,null,r);return a.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(s,c.key.buffer,c.iv.buffer);if(!g)return n.executeEnd=it(),ut(r);s=new Uint8Array(g)}var v=i||h,p=v.contiguous,m=v.discontinuity,y=v.trackSwitch,T=v.accurateTimeOffset,E=v.timeOffset,b=d.audioCodec,S=d.videoCodec,L=d.defaultInitPts,A=d.duration,R=d.initSegmentData;if((m||y)&&this.resetInitSegment(R,b,S,A),m&&this.resetInitialTimestamp(L),p||this.resetContiguity(),this.needsProbing(s,m,y)){if(o.dataLength){var D=o.flush();s=Object(l.a)(D,s)}this.configureTransmuxer(s,d)}var k=this.transmux(s,c,E,T,r),_=this.currentTransmuxState;return _.contiguous=!0,_.discontinuity=!1,_.trackSwitch=!1,n.executeEnd=it(),k},e.flush=function(t){var e=this,r=t.transmuxing;r.executeStart=it();var n=this.decrypter,s=this.cache,o=this.currentTransmuxState,l=this.decryptionPromise;if(l)return l.then((function(){return e.flush(t)}));var u=[],h=o.timeOffset;if(n){var d=n.flush();d&&u.push(this.push(d,null,t))}var c=s.dataLength;s.reset();var f=this.demuxer,g=this.remuxer;if(!f||!g)return c>=ot&&this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),r.executeEnd=it(),[ut(t)];var v=f.flush(h);return ht(v)?v.then((function(r){return e.flushRemux(u,r,t),u})):(this.flushRemux(u,v,t),u)},e.flushRemux=function(t,e,r){var i=e.audioTrack,a=e.avcTrack,n=e.id3Track,s=e.textTrack,o=this.currentTransmuxState,l=o.accurateTimeOffset,u=o.timeOffset;f.b.log("[transmuxer.ts]: Flushed fragment "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var h=this.remuxer.remux(i,a,n,s,u,l,!0,this.id);t.push({remuxResult:h,chunkMeta:r}),r.transmuxing.executeEnd=it()},e.resetInitialTimestamp=function(t){var e=this.demuxer,r=this.remuxer;e&&r&&(e.resetTimeStamp(t),r.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,r,i){var a=this.demuxer,n=this.remuxer;a&&n&&(a.resetInitSegment(e,r,i),n.resetInitSegment(t,e,r))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,r,i,a){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,r,i,a):this.transmuxUnencrypted(t,r,i,a)},e.transmuxUnencrypted=function(t,e,r,i){var a=this.demuxer.demux(t,e,!1,!this.config.progressive),n=a.audioTrack,s=a.avcTrack,o=a.id3Track,l=a.textTrack;return{remuxResult:this.remuxer.remux(n,s,o,l,e,r,!1,this.id),chunkMeta:i}},e.transmuxSampleAes=function(t,e,r,i,a){var n=this;return this.demuxer.demuxSampleAes(t,e,r).then((function(t){return{remuxResult:n.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,r,i,!1,n.id),chunkMeta:a}}))},e.configureTransmuxer=function(t,e){for(var r,i=this.config,a=this.observer,n=this.typeSupported,s=this.vendor,o=e.audioCodec,l=e.defaultInitPts,u=e.duration,h=e.initSegmentData,d=e.videoCodec,c=0,g=st.length;c<g;c++)if(st[c].demux.probe(t)){r=st[c];break}r||(f.b.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),r={demux:D,remux:at});var v=this.demuxer,p=this.remuxer,m=r.remux,y=r.demux;p&&p instanceof m||(this.remuxer=new m(a,i,n,s)),v&&v instanceof y||(this.demuxer=new y(a,i,n),this.probe=y.probe),this.resetInitSegment(h,o,d,u),this.resetInitialTimestamp(l)},e.needsProbing=function(t,e,r){return!this.demuxer||!this.remuxer||e||r},e.getDecrypter=function(){var t=this.decrypter;return t||(t=this.decrypter=new n.a(this.observer,this.config)),t},t}();var ut=function(t){return{remuxResult:{},chunkMeta:t}};function ht(t){return"then"in t&&t.then instanceof Function}var dt=function(t,e,r,i,a){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=e,this.initSegmentData=r,this.duration=i,this.defaultInitPts=a},ct=function(t,e,r,i,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=t,this.contiguous=e,this.accurateTimeOffset=r,this.trackSwitch=i,this.timeOffset=a}},function(t,e,r){var i,a,n,s,o;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,a=/^([^\/?#]*)([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=o.parseURL(t);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):e;var s=o.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=a.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var h=s.path,d=h.substring(0,h.lastIndexOf("/")+1)+n.path;u.path=o.normalizePath(d)}else u.path=s.path,n.params||(u.params=s.params,n.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(u)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(s,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var i=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var i=function(){function t(){this.chunks=[],this.dataLength=0}var e=t.prototype;return e.push=function(t){this.chunks.push(t),this.dataLength+=t.length},e.flush=function(){var t,e=this.chunks,r=this.dataLength;return e.length?(t=1===e.length?e[0]:function(t,e){for(var r=new Uint8Array(e),i=0,a=0;a<t.length;a++){var n=t[a];r.set(n,i),i+=n.length}return r}(e,r),this.reset(),t):new Uint8Array(0)},e.reset=function(){this.chunks.length=0,this.dataLength=0},t}()},function(t,e,r){"use strict";var i=Object.prototype.hasOwnProperty,a="~";function n(){}function s(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,r,i,n){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new s(r,i||t,n),l=a?a+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),u.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)i.call(t,e)&&r.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},u.prototype.listeners=function(t){var e=a?a+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,s=new Array(n);i<n;i++)s[i]=r[i].fn;return s},u.prototype.listenerCount=function(t){var e=a?a+t:t,r=this._events[e];return r?r.fn?1:r.length:0},u.prototype.emit=function(t,e,r,i,n,s){var o=a?a+t:t;if(!this._events[o])return!1;var l,u,h=this._events[o],d=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),d){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,r),!0;case 4:return h.fn.call(h.context,e,r,i),!0;case 5:return h.fn.call(h.context,e,r,i,n),!0;case 6:return h.fn.call(h.context,e,r,i,n,s),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];h.fn.apply(h.context,l)}else{var c,f=h.length;for(u=0;u<f;u++)switch(h[u].once&&this.removeListener(t,h[u].fn,void 0,!0),d){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,e);break;case 3:h[u].fn.call(h[u].context,e,r);break;case 4:h[u].fn.call(h[u].context,e,r,i);break;default:if(!l)for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];h[u].fn.apply(h[u].context,l)}}return!0},u.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,r,i){var n=a?a+t:t;if(!this._events[n])return this;if(!e)return l(this,n),this;var s=this._events[n];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||l(this,n);else{for(var o=0,u=[],h=s.length;o<h;o++)(s[o].fn!==e||i&&!s[o].once||r&&s[o].context!==r)&&u.push(s[o]);u.length?this._events[n]=1===u.length?u[0]:u:l(this,n)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=a?a+t:t,this._events[e]&&l(this,e)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=a,u.EventEmitter=u,t.exports=u},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var i=function(){function t(t,e){this.subtle=void 0,this.aesIV=void 0,this.subtle=t,this.aesIV=e}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),a=function(){function t(t,e){this.subtle=void 0,this.key=void 0,this.subtle=t,this.key=e}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),n=r(9);var s=function(){function t(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var e=t.prototype;return e.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},e.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],s=r[3],o=this.invSubMix,l=o[0],u=o[1],h=o[2],d=o[3],c=new Uint32Array(256),f=0,g=0,v=0;for(v=0;v<256;v++)c[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var p=g^g<<1^g<<2^g<<3^g<<4;p=p>>>8^255&p^99,t[f]=p,e[p]=f;var m=c[f],y=c[m],T=c[y],E=257*c[p]^16843008*p;i[f]=E<<24|E>>>8,a[f]=E<<16|E>>>16,n[f]=E<<8|E>>>24,s[f]=E,E=16843009*T^65537*y^257*m^16843008*f,l[p]=E<<24|E>>>8,u[p]=E<<16|E>>>16,h[p]=E<<8|E>>>24,d[p]=E,f?(f=m^c[c[c[T^m]]],g^=c[c[g]]):f=g=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i<e.length&&r;)r=e[i]===this.key[i],i++;if(!r){this.key=e;var a=this.keySize=e.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n,s,o,l,u=this.ksRows=4*(a+6+1),h=this.keySchedule=new Uint32Array(u),d=this.invKeySchedule=new Uint32Array(u),c=this.sBox,f=this.rcon,g=this.invSubMix,v=g[0],p=g[1],m=g[2],y=g[3];for(n=0;n<u;n++)n<a?o=h[n]=e[n]:(l=o,n%a==0?(l=c[(l=l<<8|l>>>24)>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l],l^=f[n/a|0]<<24):a>6&&n%a==4&&(l=c[l>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l]),h[n]=o=(h[n-a]^l)>>>0);for(s=0;s<u;s++)n=u-s,l=3&s?h[n]:h[n-4],d[s]=s<4||n<=4?l:v[c[l>>>24]]^p[c[l>>>16&255]]^m[c[l>>>8&255]]^y[c[255&l]],d[s]=d[s]>>>0}},e.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},e.decrypt=function(t,e,r){for(var i,a,n,s,o,l,u,h,d,c,f,g,v,p,m=this.keySize+6,y=this.invKeySchedule,T=this.invSBox,E=this.invSubMix,b=E[0],S=E[1],L=E[2],A=E[3],R=this.uint8ArrayToUint32Array_(r),D=R[0],k=R[1],_=R[2],I=R[3],C=new Int32Array(t),w=new Int32Array(C.length),O=this.networkToHostOrderSwap;e<C.length;){for(d=O(C[e]),c=O(C[e+1]),f=O(C[e+2]),g=O(C[e+3]),o=d^y[0],l=g^y[1],u=f^y[2],h=c^y[3],v=4,p=1;p<m;p++)i=b[o>>>24]^S[l>>16&255]^L[u>>8&255]^A[255&h]^y[v],a=b[l>>>24]^S[u>>16&255]^L[h>>8&255]^A[255&o]^y[v+1],n=b[u>>>24]^S[h>>16&255]^L[o>>8&255]^A[255&l]^y[v+2],s=b[h>>>24]^S[o>>16&255]^L[l>>8&255]^A[255&u]^y[v+3],o=i,l=a,u=n,h=s,v+=4;i=T[o>>>24]<<24^T[l>>16&255]<<16^T[u>>8&255]<<8^T[255&h]^y[v],a=T[l>>>24]<<24^T[u>>16&255]<<16^T[h>>8&255]<<8^T[255&o]^y[v+1],n=T[u>>>24]<<24^T[h>>16&255]<<16^T[o>>8&255]<<8^T[255&l]^y[v+2],s=T[h>>>24]<<24^T[o>>16&255]<<16^T[l>>8&255]<<8^T[255&u]^y[v+3],w[e]=O(i^D),w[e+1]=O(s^k),w[e+2]=O(n^_),w[e+3]=O(a^I),D=d,k=c,_=f,I=g,e+=4}return w.buffer},t}(),o=r(1),l=r(6),u=function(){function t(t,e,r){var i=(void 0===r?{}:r).removePKCS7Padding,a=void 0===i||i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=t,this.config=e,this.removePKCS7Padding=a,a)try{var n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(t){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var e=t.prototype;return e.destroy=function(){this.observer=null},e.isSync=function(){return this.config.enableSoftwareAES},e.flush=function(){var t=this.currentResult;if(t){var e,r,i,a=new Uint8Array(t);return this.reset(),this.removePKCS7Padding?(r=(e=a).byteLength,(i=r&&new DataView(e.buffer).getUint8(r-1))?Object(n.a)(e,0,r-i):e):a}this.reset()},e.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},e.decrypt=function(t,e,r,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(t),e,r);var a=this.flush();a&&i(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(t),e,r).then(i)},e.softwareDecrypt=function(t,e,r){var i=this.currentIV,a=this.currentResult,o=this.remainderData;this.logOnce("JS AES decrypt"),o&&(t=Object(l.a)(o,t),this.remainderData=null);var u=this.getValidChunk(t);if(!u.length)return null;i&&(r=i);var h=this.softwareDecrypter;h||(h=this.softwareDecrypter=new s),h.expandKey(e);var d=a;return this.currentResult=h.decrypt(u.buffer,0,r),this.currentIV=Object(n.a)(u,-16).buffer,d||null},e.webCryptoDecrypt=function(t,e,r){var n=this,s=this.subtle;return this.key===e&&this.fastAesKey||(this.key=e,this.fastAesKey=new a(s,e)),this.fastAesKey.expandKey().then((function(e){return s?new i(s,r).decrypt(t.buffer,e):Promise.reject(new Error("web crypto not initialized"))})).catch((function(i){return n.onWebCryptoError(i,t,e,r)}))},e.onWebCryptoError=function(t,e,r,i){return o.b.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",t),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(e,r,i)},e.getValidChunk=function(t){var e=t,r=t.length-t.length%16;return r!==t.length&&(e=Object(n.a)(t,0,r),this.remainderData=Object(n.a)(t,r)),e},e.logOnce=function(t){this.logEnabled&&(o.b.log("[decrypter.ts]: "+t),this.logEnabled=!1)},t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return y}));var i=r(3),a=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},t}(),n=Math.pow(2,32)-1,s=function(){function t(){}return t.init=function(){var e;for(e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=n,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,s,l,s,o),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,a))},t.box=function(t){for(var e=8,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];for(var n=i.length,s=n;n--;)e+=i[n].byteLength;var o=new Uint8Array(e);for(o[0]=e>>24&255,o[1]=e>>16&255,o[2]=e>>8&255,o[3]=255&e,o.set(t,4),n=0,e=8;n<s;n++)o.set(i[n],e),e+=i[n].byteLength;return o},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),a=Math.floor(r%(n+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),a=Math.floor(r%(n+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,s)},t.sdtp=function(e){var r,i,a=e.samples||[],n=new Uint8Array(4+a.length);for(r=0;r<a.length;r++)i=a[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t.box(t.types.sdtp,n)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var r,i,a,n=[],s=[];for(r=0;r<e.sps.length;r++)a=(i=e.sps[r]).byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)a=(i=e.pps[r]).byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(s))),l=e.width,u=e.height,h=e.pixelRatio[0],d=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,255&h,d>>24,d>>16&255,d>>8&255,255&d])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,s=e.height,o=Math.floor(i/(n+1)),l=Math.floor(i%(n+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,s>>8&255,255&s,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,s=Math.floor(r/(n+1)),o=Math.floor(r%(n+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,a,n,s,o,l,u=e.samples||[],h=u.length,d=12+16*h,c=new Uint8Array(d);for(r+=8+d,c.set([0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,255&h,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<h;i++)n=(a=u[i]).duration,s=a.size,o=a.flags,l=a.cts,c.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return t.box(t.types.trun,c)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=new Uint8Array(t.FTYP.byteLength+r.byteLength);return i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();s.types=void 0,s.HDLR_TYPES=void 0,s.STTS=void 0,s.STSC=void 0,s.STCO=void 0,s.STSZ=void 0,s.VMHD=void 0,s.SMHD=void 0,s.STSD=void 0,s.FTYP=void 0,s.DINF=void 0;var o=s,l=r(0),u=r(2),h=r(1),d=r(4),c=r(8);function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}var g=null,v=null,p=!1,m=function(){function t(t,e,r,i){if(void 0===i&&(i=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=t,this.config=e,this.typeSupported=r,this.ISGenerated=!1,null===g){var a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);g=a?parseInt(a[1]):0}if(null===v){var n=navigator.userAgent.match(/Safari\/(\d+)/i);v=n?parseInt(n[1]):0}p=!!g&&g<75||!!v&&v<600}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){h.b.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=t},e.resetNextTimestamp=function(){h.b.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},e.resetInitSegment=function(){h.b.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},e.getVideoStartPts=function(t){var e=!1,r=t.reduce((function(t,r){var i=r.pts-t;return i<-4294967296?(e=!0,y(t,r.pts)):i>0?t:r.pts}),t[0].pts);return e&&h.b.debug("PTS rollover detected"),r},e.remux=function(t,e,r,i,a,n,s,o){var l,u,c,f,g,v,p=a,m=a,T=t.pid>-1,E=e.pid>-1,b=e.samples.length,S=t.samples.length>0,L=b>1;if((!T||S)&&(!E||L)||this.ISGenerated||s){this.ISGenerated||(c=this.generateIS(t,e,a));var A=this.isVideoContiguous,R=-1;if(L&&(R=function(t){for(var e=0;e<t.length;e++)if(t[e].key)return e;return-1}(e.samples),!A&&this.config.forceKeyFrameOnDiscontinuity))if(v=!0,R>0){h.b.warn("[mp4-remuxer]: Dropped "+R+" out of "+b+" video samples due to a missing keyframe");var D=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(R),e.dropped+=R,m+=(e.samples[0].pts-D)/(e.timescale||9e4)}else-1===R&&(h.b.warn("[mp4-remuxer]: No keyframe found out of "+b+" video samples"),v=!1);if(this.ISGenerated){if(S&&L){var k=this.getVideoStartPts(e.samples),_=(y(t.samples[0].pts,k)-k)/e.inputTimeScale;p+=Math.max(0,_),m+=Math.max(0,-_)}if(S){if(t.samplerate||(h.b.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),c=this.generateIS(t,e,a)),u=this.remuxAudio(t,p,this.isAudioContiguous,n,E||L||o===d.b.AUDIO?m:void 0),L){var I=u?u.endPTS-u.startPTS:0;e.inputTimeScale||(h.b.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),c=this.generateIS(t,e,a)),l=this.remuxVideo(e,m,A,I)}}else L&&(l=this.remuxVideo(e,m,A,0));l&&(l.firstKeyFrame=R,l.independent=-1!==R)}}return this.ISGenerated&&(r.samples.length&&(g=this.remuxID3(r,a)),i.samples.length&&(f=this.remuxText(i,a))),{audio:u,video:l,initSegment:c,independent:v,text:f,id3:g}},e.generateIS=function(t,e,r){var a,n,s,l=t.samples,u=e.samples,h=this.typeSupported,d={},c=!Object(i.a)(this._initPTS),f="audio/mp4";if(c&&(a=n=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(h.mpeg?(f="audio/mpeg",t.codec=""):h.mp3&&(t.codec="mp3")),d.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&h.mpeg?new Uint8Array(0):o.initSegment([t]),metadata:{channelCount:t.channelCount}},c&&(s=t.inputTimeScale,a=n=l[0].pts-Math.round(s*r))),e.sps&&e.pps&&u.length&&(e.timescale=e.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:o.initSegment([e]),metadata:{width:e.width,height:e.height}},c)){s=e.inputTimeScale;var g=this.getVideoStartPts(u),v=Math.round(s*r);n=Math.min(n,y(u[0].dts,g)-v),a=Math.min(a,g-v)}if(Object.keys(d).length)return this.ISGenerated=!0,c&&(this._initPTS=a,this._initDTS=n),{tracks:d,initPTS:a,timescale:s}},e.remuxVideo=function(t,e,r,i){var a,n,s,d=t.inputTimeScale,v=t.samples,m=[],E=v.length,b=this._initPTS,S=this.nextAvcDts,L=8,A=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY,D=0,k=!1;r&&null!==S||(S=e*d-(v[0].pts-y(v[0].dts,v[0].pts)));for(var _=0;_<E;_++){var I=v[_];if(I.pts=y(I.pts-b,S),I.dts=y(I.dts-b,S),I.dts>I.pts){D=Math.max(Math.min(D,I.pts-I.dts),-18e3)}I.dts<v[_>0?_-1:_].dts&&(k=!0)}k&&v.sort((function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r||i})),n=v[0].dts,s=v[v.length-1].dts;var C=Math.round((s-n)/(E-1));if(D<0){if(D<-2*C){h.b.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(c.b)(-C,!0)+" ms");for(var w=D,O=0;O<E;O++)v[O].dts=w=Math.max(w,v[O].pts-C),v[O].pts=Math.max(w,v[O].pts)}else{h.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(c.b)(D,!0)+" ms to overcome this issue");for(var x=0;x<E;x++)v[x].dts=v[x].dts+D}n=v[0].dts}if(r){var P=n-S,M=P>C;if(M||P<-1){M?h.b.warn("AVC: "+Object(c.b)(P,!0)+" ms ("+P+"dts) hole between fragments detected, filling it"):h.b.warn("AVC: "+Object(c.b)(-P,!0)+" ms ("+P+"dts) overlapping between fragments detected"),n=S;var F=v[0].pts-P;v[0].dts=n,v[0].pts=F,h.b.log("Video: First PTS/DTS adjusted: "+Object(c.b)(F,!0)+"/"+Object(c.b)(n,!0)+", delta: "+Object(c.b)(P,!0)+" ms")}}p&&(n=Math.max(0,n));for(var N=0,U=0,B=0;B<E;B++){for(var G=v[B],K=G.units,j=K.length,H=0,V=0;V<j;V++)H+=K[V].data.length;U+=H,N+=j,G.length=H,G.dts=Math.max(G.dts,n),G.pts=Math.max(G.pts,G.dts,0),A=Math.min(G.pts,A),R=Math.max(G.pts,R)}s=v[E-1].dts;var W,Y=U+4*N+8;try{W=new Uint8Array(Y)}catch(t){return void this.observer.emit(l.a.ERROR,l.a.ERROR,{type:u.b.MUX_ERROR,details:u.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:Y,reason:"fail allocating video mdat "+Y})}var q=new DataView(W.buffer);q.setUint32(0,Y),W.set(o.types.mdat,4);for(var X=0;X<E;X++){for(var z=v[X],Q=z.units,$=0,J=0,Z=Q.length;J<Z;J++){var tt=Q[J],et=tt.data,rt=tt.data.byteLength;q.setUint32(L,rt),L+=4,W.set(et,L),L+=rt,$+=4+rt}if(X<E-1)a=v[X+1].dts-z.dts;else{var it=this.config,at=z.dts-v[X>0?X-1:X].dts;if(it.stretchShortVideoTrack&&null!==this.nextAudioPts){var nt=Math.floor(it.maxBufferHole*d),st=(i?A+i*d:this.nextAudioPts)-z.pts;st>nt?((a=st-at)<0&&(a=at),h.b.log("[mp4-remuxer]: It is approximately "+st/90+" ms to the next segment; using duration "+a/90+" ms for the last video frame.")):a=at}else a=at}var ot=Math.round(z.pts-z.dts);m.push(new T(z.key,a,$,ot))}if(m.length&&g&&g<70){var lt=m[0].flags;lt.dependsOn=2,lt.isNonSync=0}this.nextAvcDts=S=s+a,this.isVideoContiguous=!0;var ut={data1:o.moof(t.sequenceNumber++,n,f({},t,{samples:m})),data2:W,startPTS:A/d,endPTS:(R+a)/d,startDTS:n/d,endDTS:S/d,type:"video",hasAudio:!1,hasVideo:!0,nb:m.length,dropped:t.dropped};return t.samples=[],t.dropped=0,ut},e.remuxAudio=function(t,e,r,i,n){var s,d=t.inputTimeScale,c=d/(t.samplerate?t.samplerate:d),g=t.isAAC?1024:1152,v=g*c,p=this._initPTS,m=!t.isAAC&&this.typeSupported.mpeg,E=[],b=t.samples,S=m?0:8,L=this.nextAudioPts||-1,A=e*d;if(this.isAudioContiguous=r=r||b.length&&L>0&&(i&&Math.abs(A-L)<9e3||Math.abs(y(b[0].pts-p,A)-L)<20*v),b.forEach((function(t){t.pts=t.dts=y(t.pts-p,A)})),!r||L<0){if(!(b=b.filter((function(t){return t.pts>=0}))).length)return;L=0===n?0:i?Math.max(0,A):b[0].pts}if(t.isAAC)for(var R=void 0!==n,D=this.config.maxAudioFramesDrift,k=0,_=L;k<b.length;k++){var I=b[k],C=I.pts,w=C-_,O=Math.abs(1e3*w/d);if(w<=-D*v&&R)0===k&&(h.b.warn("Audio frame @ "+(C/d).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*w/d)+" ms."),this.nextAudioPts=L=C),_=C;else if(w>=D*v&&O<1e4&&R){var x=Math.round(w/v);(_=C-x*v)<0&&(x--,_+=v),0===k&&(this.nextAudioPts=L=_),h.b.warn("[mp4-remuxer]: Injecting "+x+" audio frame @ "+(_/d).toFixed(3)+"s due to "+Math.round(1e3*w/d)+" ms gap.");for(var P=0;P<x;P++){var M=Math.max(_,0);(s=a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(h.b.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),s=I.unit.subarray()),b.splice(k,0,{unit:s,pts:M,dts:M}),_+=v,k++}}I.pts=I.dts=_,_+=v}for(var F,N=null,U=null,B=0,G=b.length;G--;)B+=b[G].unit.byteLength;for(var K=0,j=b.length;K<j;K++){var H=b[K],V=H.unit,W=H.pts;if(null!==U){E[K-1].duration=Math.round((W-U)/c)}else{if(r&&t.isAAC&&(W=L),N=W,!(B>0))return;B+=S;try{F=new Uint8Array(B)}catch(t){return void this.observer.emit(l.a.ERROR,l.a.ERROR,{type:u.b.MUX_ERROR,details:u.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating audio mdat "+B})}m||(new DataView(F.buffer).setUint32(0,B),F.set(o.types.mdat,4))}F.set(V,S);var Y=V.byteLength;S+=Y,E.push(new T(!0,g,Y,0)),U=W}var q=E.length;if(q){var X=E[E.length-1];this.nextAudioPts=L=U+c*X.duration;var z=m?new Uint8Array(0):o.moof(t.sequenceNumber++,N/c,f({},t,{samples:E}));t.samples=[];var Q=N/d,$=L/d,J={data1:z,data2:F,startPTS:Q,endPTS:$,startDTS:Q,endDTS:$,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,J}},e.remuxEmptyAudio=function(t,e,r,i){var n=t.inputTimeScale,s=n/(t.samplerate?t.samplerate:n),o=this.nextAudioPts,l=(null!==o?o:i.startDTS*n)+this._initDTS,u=i.endDTS*n+this._initDTS,d=1024*s,c=Math.ceil((u-l)/d),f=a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(h.b.warn("[mp4-remuxer]: remux empty Audio"),f){for(var g=[],v=0;v<c;v++){var p=l+v*d;g.push({unit:f,pts:p,dts:p})}return t.samples=g,this.remuxAudio(t,e,r,!1)}h.b.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e.remuxID3=function(t,e){var r=t.samples.length;if(r){for(var i=t.inputTimeScale,a=this._initPTS,n=this._initDTS,s=0;s<r;s++){var o=t.samples[s];o.pts=y(o.pts-a,e*i)/i,o.dts=y(o.dts-n,e*i)/i}var l=t.samples;return t.samples=[],{samples:l}}},e.remuxText=function(t,e){var r=t.samples.length;if(r){for(var i=t.inputTimeScale,a=this._initPTS,n=0;n<r;n++){var s=t.samples[n];s.pts=y(s.pts-a,e*i)/i}t.samples.sort((function(t,e){return t.pts-e.pts}));var o=t.samples;return t.samples=[],{samples:o}}},t}();function y(t,e){var r;if(null===e)return t;for(r=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=r;return t}var T=function(t,e,r,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=r,this.cts=i,this.flags=new E(t)},E=function(t){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=t?2:1,this.isNonSync=t?0:1}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(11);function a(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var n=function(){function t(t,e){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=e?Object(i.buildAbsoluteURL)(t,e,{alwaysNormalize:!0}):t}var e,r,n;return t.fromURL=function(e,r){return new t(e,r)},t.fromURI=function(e){return new t(e)},e=t,(r=[{key:"uri",get:function(){return this._uri}}])&&a(e.prototype,r),n&&a(e,n),t}()},function(t,e,r){function i(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r.oe=function(t){throw console.error(t),t};var i=r(r.s=ENTRY_MODULE);return i.default||i}function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function n(t,e,i){var n={};n[i]=[];var s=e.toString(),o=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return n;for(var l,u=o[1],h=new RegExp("(\\\\n|\\W)"+a(u)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=h.exec(s);)"dll-reference"!==l[3]&&n[i].push(l[3]);for(h=new RegExp("\\("+a(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=h.exec(s);)t[l[2]]||(n[i].push(l[1]),t[l[2]]=r(l[1]).m),n[l[2]]=n[l[2]]||[],n[l[2]].push(l[4]);for(var d,c=Object.keys(n),f=0;f<c.length;f++)for(var g=0;g<n[c[f]].length;g++)d=n[c[f]][g],isNaN(1*d)||(n[c[f]][g]=1*n[c[f]][g]);return n}function s(t){return Object.keys(t).reduce((function(e,r){return e||t[r].length>0}),!1)}t.exports=function(t,e){e=e||{};var a={main:r.m},o=e.all?{main:Object.keys(a.main)}:function(t,e){for(var r={main:[e]},i={main:[]},a={main:{}};s(r);)for(var o=Object.keys(r),l=0;l<o.length;l++){var u=o[l],h=r[u].pop();if(a[u]=a[u]||{},!a[u][h]&&t[u][h]){a[u][h]=!0,i[u]=i[u]||[],i[u].push(h);for(var d=n(t,t[u][h],u),c=Object.keys(d),f=0;f<c.length;f++)r[c[f]]=r[c[f]]||[],r[c[f]]=r[c[f]].concat(d[c[f]])}}return i}(a,t),l="";Object.keys(o).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;o[t][e];)e++;o[t].push(e),a[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+t+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o[t].map((function(e){return JSON.stringify(e)+": "+a[t][e].toString()})).join(",")+"});\n"})),l=l+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o.main.map((function(t){return JSON.stringify(t)+": "+a.main[t].toString()})).join(",")+"}))(self);";var u=new window.Blob([l],{type:"text/javascript"});if(e.bare)return u;var h=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),d=new window.Worker(h);return d.objectURL=h,d}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var i=r(10),a=r(0),n=r(1),s=r(14);function o(t){var e=new s.EventEmitter,r=function(e,r){t.postMessage({event:e,data:r})};e.on(a.a.FRAG_DECRYPTED,r),e.on(a.a.ERROR,r),t.addEventListener("message",(function(a){var s=a.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);t.transmuxer=new i.c(e,s.typeSupported,o,s.vendor,s.id),Object(n.a)(o.debug),r("init",null);break;case"configure":t.transmuxer.configure(s.config);break;case"demux":var u=t.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(i.d)(u)?u.then((function(e){l(t,e)})):l(t,u);break;case"flush":var d=s.chunkMeta,c=t.transmuxer.flush(d);Object(i.d)(c)?c.then((function(e){h(t,e,d)})):h(t,c,d)}}))}function l(t,e){if((r=e.remuxResult).audio||r.video||r.text||r.id3||r.initSegment){var r,i=[],a=e.remuxResult,n=a.audio,s=a.video;n&&u(i,n),s&&u(i,s),t.postMessage({event:"transmuxComplete",data:e},i)}}function u(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function h(t,e,r){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:r})}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return Wr}));var i=r(11),a=r(3),n=r(0),s=r(2),o=r(1),l=r(6),u=r(5);function h(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var d=function(){function t(t){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=t}var e,r,i;return t.prototype.reloaded=function(t){if(!t)return this.advanced=!0,void(this.updated=!0);var e=this.lastPartSn-t.lastPartSn,r=this.lastPartIndex-t.lastPartIndex;this.updated=this.endSN!==t.endSN||!!r||!!e,this.advanced=this.endSN>t.endSN||e>0||0===e&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(r=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(a.a)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&h(e.prototype,r),i&&h(e,i),t}(),c=r(17),f=/^(\d+)x(\d+)$/,g=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,v=function(){function t(e){for(var r in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(r)&&(this[r]=e[r])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;i<e.length/2;i++)r[i]=parseInt(e.slice(2*i,2*i+2),16);return r}return null},e.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var r=this[t];return r?parseFloat(r):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=f.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(g.lastIndex=0;null!==(e=g.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}(),p={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function m(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var y=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,T=/#EXT-X-MEDIA:(.*)/g,E=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),b=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),S=/\.(mp4|m4s|m4v|m4a)$/i;var L=function(){function t(){}return t.findGroup=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(i.id===e)return i}},t.convertAVC1ToAVCOTI=function(t){var e=t.split(".");if(e.length>2){var r=e.shift()+".";return r+=parseInt(e.shift()).toString(16),r+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return i.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i,a=[],n={},s=!1;for(y.lastIndex=0;null!=(i=y.exec(e));)if(i[1]){var o=new v(i[1]),l={attrs:o,bitrate:o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),name:o.NAME,url:t.resolve(i[2],r)},u=o.decimalResolution("RESOLUTION");u&&(l.width=u.width,l.height=u.height),A((o.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),l),l.videoCodec&&-1!==l.videoCodec.indexOf("avc1")&&(l.videoCodec=t.convertAVC1ToAVCOTI(l.videoCodec)),a.push(l)}else if(i[3]){var h=new v(i[3]);h["DATA-ID"]&&(s=!0,n[h["DATA-ID"]]=h)}return{levels:a,sessionData:s?n:null}},t.parseMasterPlaylistMedia=function(e,r,i,a){var n;void 0===a&&(a=[]);var s=[],o=0;for(T.lastIndex=0;null!==(n=T.exec(e));){var l=new v(n[1]);if(l.TYPE===i){var u={attrs:l,bitrate:0,id:o++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE||"",type:i,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:l.LANGUAGE,url:l.URI?t.resolve(l.URI,r):""};if(a.length){var h=t.findGroup(a,u.groupId)||a[0];R(u,h,"audioCodec"),R(u,h,"textCodec")}s.push(u)}}return s},t.parseLevelPlaylist=function(t,e,r,n,s){var l,h,f,g=new d(e),p=g.fragments,m=null,y=0,T=0,L=0,A=0,R=null,k=new u.b(n,e),_=-1,I=!1;for(E.lastIndex=0,g.m3u8=t;null!==(l=E.exec(t));){I&&(I=!1,(k=new u.b(n,e)).start=L,k.sn=y,k.cc=A,k.level=r,m&&(k.initSegment=m,k.rawProgramDateTime=m.rawProgramDateTime));var C=l[1];if(C){k.duration=parseFloat(C);var w=(" "+l[2]).slice(1);k.title=w||null,k.tagList.push(w?["INF",C,w]:["INF",C])}else if(l[3])Object(a.a)(k.duration)&&(k.start=L,f&&(k.levelkey=f),k.sn=y,k.level=r,k.cc=A,k.urlId=s,p.push(k),k.relurl=(" "+l[3]).slice(1),D(k,R),R=k,L+=k.duration,y++,T=0,I=!0);else if(l[4]){var O=(" "+l[4]).slice(1);R?k.setByteRange(O,R):k.setByteRange(O)}else if(l[5])k.rawProgramDateTime=(" "+l[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),-1===_&&(_=p.length);else{if(!(l=l[0].match(b))){o.b.warn("No matches on slow regex match for level playlist!");continue}for(h=1;h<l.length&&void 0===l[h];h++);var x=(" "+l[h]).slice(1),P=(" "+l[h+1]).slice(1),M=l[h+2]?(" "+l[h+2]).slice(1):"";switch(x){case"PLAYLIST-TYPE":g.type=P.toUpperCase();break;case"MEDIA-SEQUENCE":y=g.startSN=parseInt(P);break;case"SKIP":var F=new v(P),N=F.decimalInteger("SKIPPED-SEGMENTS");if(Object(a.a)(N)){g.skippedSegments=N;for(var U=N;U--;)p.unshift(null);y+=N}var B=F.enumeratedString("RECENTLY-REMOVED-DATERANGES");B&&(g.recentlyRemovedDateranges=B.split("\t"));break;case"TARGETDURATION":g.targetduration=parseFloat(P);break;case"VERSION":g.version=parseInt(P);break;case"EXTM3U":break;case"ENDLIST":g.live=!1;break;case"#":(P||M)&&k.tagList.push(M?[P,M]:[P]);break;case"DIS":A++;case"GAP":k.tagList.push([x]);break;case"BITRATE":k.tagList.push([x,P]);break;case"DISCONTINUITY-SEQ":A=parseInt(P);break;case"KEY":var G,K=new v(P),j=K.enumeratedString("METHOD"),H=K.URI,V=K.hexadecimalInteger("IV"),W=K.enumeratedString("KEYFORMATVERSIONS"),Y=K.enumeratedString("KEYID"),q=null!=(G=K.enumeratedString("KEYFORMAT"))?G:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(q)>-1){o.b.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;j&&(f=c.a.fromURL(e,H),H&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(j)>=0&&(f.method=j,f.keyFormat=q,Y&&(f.keyID=Y),W&&(f.keyFormatVersions=W),f.iv=V));break;case"START":var X=new v(P).decimalFloatingPoint("TIME-OFFSET");Object(a.a)(X)&&(g.startTimeOffset=X);break;case"MAP":var z=new v(P);k.relurl=z.URI,z.BYTERANGE&&k.setByteRange(z.BYTERANGE),k.level=r,k.sn="initSegment",f&&(k.levelkey=f),k.initSegment=null,m=k,I=!0;break;case"SERVER-CONTROL":var Q=new v(P);g.canBlockReload=Q.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=Q.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&Q.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=Q.optionalFloat("PART-HOLD-BACK",0),g.holdBack=Q.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var $=new v(P);g.partTarget=$.decimalFloatingPoint("PART-TARGET");break;case"PART":var J=g.partList;J||(J=g.partList=[]);var Z=T>0?J[J.length-1]:void 0,tt=T++,et=new u.c(new v(P),k,e,tt,Z);J.push(et),k.duration+=et.duration;break;case"PRELOAD-HINT":var rt=new v(P);g.preloadHint=rt;break;case"RENDITION-REPORT":var it=new v(P);g.renditionReports=g.renditionReports||[],g.renditionReports.push(it);break;default:o.b.warn("line parsed but not handled: "+l)}}}R&&!R.relurl?(p.pop(),L-=R.duration,g.partList&&(g.fragmentHint=R)):g.partList&&(D(k,R),k.cc=A,g.fragmentHint=k);var at=p.length,nt=p[0],st=p[at-1];if((L+=g.skippedSegments*g.targetduration)>0&&at&&st){g.averagetargetduration=L/at;var ot=st.sn;g.endSN="initSegment"!==ot?ot:0,nt&&(g.startCC=nt.cc,nt.initSegment||g.fragments.every((function(t){return t.relurl&&(e=t.relurl,S.test(null!=(r=null===(a=i.parseURL(e))||void 0===a?void 0:a.path)?r:""));var e,r,a}))&&(o.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(k=new u.b(n,e)).relurl=st.relurl,k.level=r,k.sn="initSegment",nt.initSegment=k,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(L+=g.fragmentHint.duration),g.totalduration=L,g.endCC=A,_>0&&function(t,e){for(var r=t[e],i=e;i--;){var a=t[i];if(!a)return;a.programDateTime=r.programDateTime-1e3*a.duration,r=a}}(p,_),g},t}();function A(t,e){["video","audio","text"].forEach((function(r){var i=t.filter((function(t){return function(t,e){var r=p[e];return!!r&&!0===r[t.slice(0,4)]}(t,r)}));if(i.length){var a=i.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[r+"Codec"]=a.length>0?a[0]:i[0],t=t.filter((function(t){return-1===i.indexOf(t)}))}})),e.unknownCodecs=t}function R(t,e,r){var i=e[r];i&&(t[r]=i)}function D(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(a.a)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}var k=r(4);function _(t,e){var r=t.url;return void 0!==r&&0!==r.indexOf("data:")||(r=e.url),r}var I=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.a.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(n.a.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.a.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(n.a.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,r=e.pLoader,i=e.loader,a=new(r||i)(e);return t.loader=a,this.loaders[t.type]=a,a},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var r=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:k.a.MANIFEST,url:r,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var r=e.id,i=e.level,a=e.url,n=e.deliveryDirectives;this.load({id:r,groupId:null,level:i,responseType:"text",type:k.a.LEVEL,url:a,deliveryDirectives:n})},e.onAudioTrackLoading=function(t,e){var r=e.id,i=e.groupId,a=e.url,n=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:k.a.AUDIO_TRACK,url:a,deliveryDirectives:n})},e.onSubtitleTrackLoading=function(t,e){var r=e.id,i=e.groupId,a=e.url,n=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:k.a.SUBTITLE_TRACK,url:a,deliveryDirectives:n})},e.load=function(t){var e,r,i,a,n,s,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void o.b.trace("[playlist-loader]: playlist request ongoing");o.b.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case k.a.MANIFEST:r=l.manifestLoadingMaxRetry,i=l.manifestLoadingTimeOut,a=l.manifestLoadingRetryDelay,n=l.manifestLoadingMaxRetryTimeout;break;case k.a.LEVEL:case k.a.AUDIO_TRACK:case k.a.SUBTITLE_TRACK:r=0,i=l.levelLoadingTimeOut;break;default:r=l.levelLoadingMaxRetry,i=l.levelLoadingTimeOut,a=l.levelLoadingRetryDelay,n=l.levelLoadingMaxRetryTimeout}if((u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part)&&(t.type===k.a.LEVEL&&null!==t.level?s=this.hls.levels[t.level].details:t.type===k.a.AUDIO_TRACK&&null!==t.id?s=this.hls.audioTracks[t.id].details:t.type===k.a.SUBTITLE_TRACK&&null!==t.id&&(s=this.hls.subtitleTracks[t.id].details),s)){var d=s.partTarget,c=s.targetduration;d&&c&&(i=Math.min(1e3*Math.max(3*d,.8*c),i))}var f={timeout:i,maxRetry:r,retryDelay:a,maxRetryDelay:n,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,f,g)},e.loadsuccess=function(t,e,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this.handleSidxRequest(t,r),void this.handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var a=t.data;0===a.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,r,i):this.handleMasterPlaylist(t,e,r,i)):this.handleManifestParsingError(t,r,"no EXTM3U delimiter",i)},e.loaderror=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!1,t)},e.loadtimeout=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!0)},e.handleMasterPlaylist=function(t,e,r,i){var a=this.hls,s=t.data,l=_(t,r),u=L.parseMasterPlaylist(s,l),h=u.levels,d=u.sessionData;if(h.length){var c=h.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),f=h.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),g=L.parseMasterPlaylistMedia(s,l,"AUDIO",c),p=L.parseMasterPlaylistMedia(s,l,"SUBTITLES",f),m=L.parseMasterPlaylistMedia(s,l,"CLOSED-CAPTIONS");if(g.length)g.some((function(t){return!t.url}))||!h[0].audioCodec||h[0].attrs.AUDIO||(o.b.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v({}),bitrate:0,url:""}));a.trigger(n.a.MANIFEST_LOADED,{levels:h,audioTracks:g,subtitles:p,captions:m,url:l,stats:e,networkDetails:i,sessionData:d})}else this.handleManifestParsingError(t,r,"no level found in manifest",i)},e.handleTrackOrLevelPlaylist=function(t,e,r,i){var o=this.hls,l=r.id,u=r.level,h=r.type,d=_(t,r),c=Object(a.a)(l)?l:0,f=Object(a.a)(u)?u:c,g=function(t){switch(t.type){case k.a.AUDIO_TRACK:return k.b.AUDIO;case k.a.SUBTITLE_TRACK:return k.b.SUBTITLE;default:return k.b.MAIN}}(r),p=L.parseLevelPlaylist(t.data,d,f,g,c);if(p.fragments.length){if(h===k.a.MANIFEST){var m={attrs:new v({}),bitrate:0,details:p,name:"",url:d};o.trigger(n.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:d,stats:e,networkDetails:i,sessionData:null})}if(e.parsing.end=performance.now(),p.needSidxRanges){var y,T=null===(y=p.fragments[0].initSegment)||void 0===y?void 0:y.url;this.load({url:T,isSidxRequest:!0,type:h,level:u,levelDetails:p,id:l,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=p,this.handlePlaylistLoaded(t,e,r,i)}else o.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},e.handleSidxRequest=function(t,e){var r=Object(l.g)(new Uint8Array(t.data));if(r){var i=r.references,a=e.levelDetails;i.forEach((function(t,e){var i=t.info,n=a.fragments[e];0===n.byteRange.length&&n.setByteRange(String(1+i.end-i.start)+"@"+String(i.start)),n.initSegment&&n.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,r,i){this.hls.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:e.type===k.a.MANIFEST,url:t.url,reason:r,response:t,context:e,networkDetails:i})},e.handleNetworkError=function(t,e,r,i){void 0===r&&(r=!1),o.b.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var a=s.a.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case k.a.MANIFEST:a=r?s.a.MANIFEST_LOAD_TIMEOUT:s.a.MANIFEST_LOAD_ERROR,l=!0;break;case k.a.LEVEL:a=r?s.a.LEVEL_LOAD_TIMEOUT:s.a.LEVEL_LOAD_ERROR,l=!1;break;case k.a.AUDIO_TRACK:a=r?s.a.AUDIO_TRACK_LOAD_TIMEOUT:s.a.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case k.a.SUBTITLE_TRACK:a=r?s.a.SUBTITLE_TRACK_LOAD_TIMEOUT:s.a.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:s.b.NETWORK_ERROR,details:a,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};i&&(h.response=i),this.hls.trigger(n.a.ERROR,h)},e.handlePlaylistLoaded=function(t,e,r,i){var a=r.type,s=r.level,o=r.id,l=r.groupId,u=r.loader,h=r.levelDetails,d=r.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),a){case k.a.MANIFEST:case k.a.LEVEL:this.hls.trigger(n.a.LEVEL_LOADED,{details:h,level:s||0,id:o||0,stats:e,networkDetails:i,deliveryDirectives:d});break;case k.a.AUDIO_TRACK:this.hls.trigger(n.a.AUDIO_TRACK_LOADED,{details:h,id:o||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:d});break;case k.a.SUBTITLE_TRACK:this.hls.trigger(n.a.SUBTITLE_TRACK_LOADED,{details:h,id:o||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:d})}}else this.handleManifestParsingError(t,r,"invalid target duration",i)},t}(),C=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(n.a.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(n.a.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var r=e.frag,i=r.type,a=this.loaders[i];if(r.decryptdata){var s=r.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(a&&(o.b.warn("abort previous key loader for type:"+i),a.abort()),!s)return void o.b.warn("key uri is falsy");var u=l.loader,h=r.loader=this.loaders[i]=new u(l);this.decrypturl=s,this.decryptkey=null;var d={url:s,frag:r,responseType:"arraybuffer"},c={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};h.load(d,c,f)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(n.a.KEY_LOADED,{frag:r}))}else o.b.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,r){var i=r.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(n.a.KEY_LOADED,{frag:i})):o.b.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}();function w(t,e){var r;try{r=new Event("addtrack")}catch(t){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function O(t,e){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(r){o.b.debug("[texttrack-utils]: "+r);var i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,t.addCue(i)}"disabled"===r&&(t.mode=r)}function x(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues){for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);"disabled"===e&&(t.mode=e)}}function P(t,e,r){var i=t.mode;if("disabled"===i&&(t.mode="hidden"),t.cues&&t.cues.length){for(var a=function(t,e,r){var i=[],a=function(t,e){if(e<t[0].startTime)return 0;var r=t.length-1;if(e>t[r].endTime)return-1;var i=0,a=r;for(;i<=a;){var n=Math.floor((a+i)/2);if(e<t[n].startTime)a=n-1;else{if(!(e>t[n].startTime&&i<r))return n;i=n+1}}return t[i].startTime-e<e-t[a].startTime?i:a}(t,e);if(a>-1)for(var n=a,s=t.length;n<s;n++){var o=t[n];if(o.startTime>=e&&o.endTime<=r)i.push(o);else if(o.startTime>r)return i}return i}(t.cues,e,r),n=0;n<a.length;n++)t.removeCue(a[n]);"disabled"===i&&(t.mode=i)}}var M=r(7),F=function(){function t(t){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e.destroy=function(){this._unregisterListeners()},e._registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this)},e.onMediaAttached=function(t,e){this.media=e.media},e.onMediaDetaching=function(){this.id3Track&&(x(this.id3Track),this.id3Track=null,this.media=null)},e.getID3Track=function(t){if(this.media){for(var e=0;e<t.length;e++){var r=t[e];if("metadata"===r.kind&&"id3"===r.label)return w(r,this.media),r}return this.media.addTextTrack("metadata","id3")}},e.onFragParsingMetadata=function(t,e){if(this.media){var r=e.frag,i=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var a=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,n=0;n<i.length;n++){var s=M.c(i[n].data);if(s){var o=i[n].pts,l=n<i.length-1?i[n+1].pts:r.end;l-o<=0&&(l=o+.25);for(var u=0;u<s.length;u++){var h=s[u];if(!M.e(h)){var d=new a(o,l,"");d.value=h,this.id3Track.addCue(d)}}}}}},e.onBufferFlushing=function(t,e){var r=e.startOffset,i=e.endOffset,a=e.type;if(!a||"audio"===a){var n=this.id3Track;n&&P(n,r,i)}},t}();function N(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var U,B=function(){function t(t){var e=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return e.timeupdate()},this.hls=t,this.config=t.config,this.registerListeners()}var e,r,i,a=t.prototype;return a.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},a.registerListeners=function(){this.hls.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(n.a.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(n.a.ERROR,this.onError,this)},a.unregisterListeners=function(){this.hls.off(n.a.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(n.a.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(n.a.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(n.a.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(n.a.ERROR,this.onError)},a.onMediaAttached=function(t,e){this.media=e.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},a.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},a.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},a.onLevelUpdated=function(t,e){var r=e.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(t,e){e.details===s.a.BUFFER_STALLED_ERROR&&(this.stallCount++,o.b.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},a.timeupdate=function(){var t=this.media,e=this.levelDetails;if(t&&e){this.currentTime=t.currentTime;var r=this.computeLatency();if(null!==r){this._latency=r;var i=this.config,a=i.lowLatencyMode,n=i.maxLiveSyncPlaybackRate;if(a&&1!==n){var s=this.targetLatency;if(null!==s){var o=r-s,l=o<Math.min(this.maxLatency,s+e.targetduration);if(e.live&&l&&o>.05&&this.forwardBufferLength>1){var u=Math.min(2,Math.max(1,n)),h=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;t.playbackRate=Math.min(u,Math.max(1,h))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},a.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},a.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(r=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,r=t.partHoldBack,i=t.targetduration,a=this.config,n=a.liveSyncDuration,s=a.liveSyncDurationCount,o=a.lowLatencyMode,l=this.hls.userConfig,u=o&&r||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==n?n:s*i);var h=i;return u+Math.min(1*this.stallCount,h)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,r=this.levelDetails;if(null===t||null===e||null===r)return null;var i=r.edge,a=t-e-this.edgeStalled,n=i-r.totalduration,s=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(n,a),s)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var r=t.buffered.length;return r?t.buffered.end(r-1):e.edge-this.currentTime}}])&&N(e.prototype,r),i&&N(e,i),t}();function G(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}!function(t){t.No="",t.Yes="YES",t.v2="v2"}(U||(U={}));var K=function(){function t(t,e,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=t,this.part=e,this.skip=r}return t.prototype.addDirectives=function(t){var e=new self.URL(t);return void 0!==this.msn&&e.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.toString()},t}(),j=function(){function t(t){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[t.url],this.attrs=t.attrs,this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.unknownCodecs=t.unknownCodecs,this.codecSet=[t.videoCodec,t.audioCodec].filter((function(t){return t})).join(",").replace(/\.[^.,]+/g,"")}var e,r,i;return e=t,(r=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(t){var e=t%this.url.length;this._urlId!==e&&(this.details=void 0,this._urlId=e)}}])&&G(e.prototype,r),i&&G(e,i),t}();function H(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function V(t){var e={};t.forEach((function(t){var r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++}))}function W(t,e){var r=e.startPTS;if(Object(a.a)(r)){var i,n=0;e.sn>t.sn?(n=r-t.start,i=t):(n=t.start-r,i=e),i.duration!==n&&(i.duration=n)}else if(e.sn>t.sn){t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration}else e.start=Math.max(t.start-e.duration,0)}function Y(t,e,r,i,n,s){i-r<=0&&(o.b.warn("Fragment should have a positive duration",e),i=r+e.duration,s=n+e.duration);var l=r,u=i,h=e.startPTS,d=e.endPTS;if(Object(a.a)(h)){var c=Math.abs(h-r);Object(a.a)(e.deltaPTS)?e.deltaPTS=Math.max(c,e.deltaPTS):e.deltaPTS=c,l=Math.max(r,h),r=Math.min(r,h),n=Math.min(n,e.startDTS),u=Math.min(i,d),i=Math.max(i,d),s=Math.max(s,e.endDTS)}e.duration=i-r;var f=r-e.start;e.appendedPTS=i,e.start=e.startPTS=r,e.maxStartPTS=l,e.startDTS=n,e.endPTS=i,e.minEndPTS=u,e.endDTS=s;var g,v=e.sn;if(!t||v<t.startSN||v>t.endSN)return 0;var p=v-t.startSN,m=t.fragments;for(m[p]=e,g=p;g>0;g--)W(m[g],m[g-1]);for(g=p;g<m.length-1;g++)W(m[g],m[g+1]);return t.fragmentHint&&W(m[m.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,f}function q(t,e){for(var r=null,i=t.fragments,n=i.length-1;n>=0;n--){var s=i[n].initSegment;if(s){r=s;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(function(t,e,r){for(var i=e.skippedSegments,a=Math.max(t.startSN,e.startSN)-e.startSN,n=(t.fragmentHint?1:0)+(i?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,s=e.startSN-t.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,u=a;u<=n;u++){var h=l[s+u],d=o[u];i&&!d&&u<i&&(d=e.fragments[u]=h),h&&d&&r(h,d)}}(t,e,(function(t,i){var n;t.relurl&&(u=t.cc-i.cc),Object(a.a)(t.startPTS)&&Object(a.a)(t.endPTS)&&(i.start=i.startPTS=t.startPTS,i.startDTS=t.startDTS,i.appendedPTS=t.appendedPTS,i.maxStartPTS=t.maxStartPTS,i.endPTS=t.endPTS,i.endDTS=t.endDTS,i.minEndPTS=t.minEndPTS,i.duration=t.endPTS-t.startPTS,i.duration&&(l=i),e.PTSKnown=e.alignedSliding=!0),i.elementaryStreams=t.elementaryStreams,i.loader=t.loader,i.stats=t.stats,i.urlId=t.urlId,t.initSegment?(i.initSegment=t.initSegment,r=t.initSegment):i.initSegment&&i.initSegment.relurl!=(null===(n=r)||void 0===n?void 0:n.relurl)||(i.initSegment=r)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){o.b.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var h=e.skippedSegments;h--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var d=e.fragments;if(u){o.b.warn("discontinuity sliding from playlist, take drift into account");for(var c=0;c<d.length;c++)d[c].cc+=u}e.skippedSegments&&(e.startCC=e.fragments[0].cc),function(t,e,r){if(t&&e)for(var i=0,a=0,n=t.length;a<=n;a++){var s=t[a],o=e[a+i];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?r(s,o):i--}}(t.partList,e.partList,(function(t,e){e.elementaryStreams=t.elementaryStreams,e.stats=t.stats})),l?Y(e,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS):X(t,e),d.length&&(e.totalduration=e.edge-d[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;var f=e.advancedDateTime;if(e.advanced&&f){var g=e.edge;e.driftStart||(e.driftStartTime=f,e.driftStart=g),e.driftEndTime=f,e.driftEnd=g}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function X(t,e){var r=e.startSN+e.skippedSegments-t.startSN,i=t.fragments,a=e.fragments;if(!(r<0||r>=i.length)){var n=i[r].start;if(n){for(var s=e.skippedSegments;s<a.length;s++)a[s].start+=n;e.fragmentHint&&(e.fragmentHint.start+=n)}}}var z=function(){function t(t,e){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=o.b.log.bind(o.b,e+":"),this.warn=o.b.warn.bind(o.b,e+":"),this.hls=t}var e=t.prototype;return e.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},e.onError=function(t,e){e.fatal&&e.type===s.b.NETWORK_ERROR&&this.clearTimer()},e.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},e.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},e.stopLoad=function(){this.canLoad=!1,this.clearTimer()},e.switchParams=function(t,e){var r=null==e?void 0:e.renditionReports;if(r)for(var i=0;i<r.length;i++){var n=r[i],s=""+n.URI;if(s===t.substr(-s.length)){var o=parseInt(n["LAST-MSN"]),l=parseInt(n["LAST-PART"]);if(e&&this.hls.config.lowLatencyMode){var u=Math.min(e.age-e.partTarget,e.targetduration);void 0!==l&&u>e.partTarget&&(l+=1)}if(Object(a.a)(o))return new K(o,Object(a.a)(l)?l:void 0,U.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,r){var i=this,a=e.details,n=e.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(a.advancedDateTime=Date.now()-s,a.live||null!=r&&r.live){if(a.reloaded(r),r&&this.log("live playlist "+t+" "+(a.advanced?"REFRESHED "+a.lastPartSn+"-"+a.lastPartIndex:"MISSED")),r&&a.fragments.length>0&&q(r,a),!this.canLoad||!a.live)return;var o,l=void 0,u=void 0;if(a.canBlockReload&&a.endSN&&a.advanced){var h=this.hls.config.lowLatencyMode,d=a.lastPartSn,c=a.endSN,f=a.lastPartIndex,g=d===c;-1!==f?(l=g?c+1:d,u=g?h?0:f:f+1):l=c+1;var v=a.age,p=v+a.ageHeader,m=Math.min(p-a.partTarget,1.5*a.targetduration);if(m>0){if(r&&m>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+m+" with playlist age: "+a.age),m=0;else{var y=Math.floor(m/a.targetduration);if(l+=y,void 0!==u)u+=Math.round(m%a.targetduration/a.partTarget);this.log("CDN Tune-in age: "+a.ageHeader+"s last advanced "+v.toFixed(2)+"s goal: "+m+" skip sn "+y+" to part "+u)}a.tuneInGoal=m}if(o=this.getDeliveryDirectives(a,e.deliveryDirectives,l,u),h||!g)return void this.loadPlaylist(o)}else o=this.getDeliveryDirectives(a,e.deliveryDirectives,l,u);var T=function(t,e){var r,i=1e3*t.levelTargetDuration,a=i/2,n=t.age,s=n>0&&n<3*i,o=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(s){var u=333*t.misses;r=Math.max(Math.min(a,2*o),u),t.availabilityDelay=(t.availabilityDelay||0)+r}else r=a;else s?(l=Math.min(l||i/2,n),t.availabilityDelay=l,r=l+i-n):r=i-o;return Math.round(r)}(a,n);void 0!==l&&a.canBlockReload&&(T-=a.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout((function(){return i.loadPlaylist(o)}),T)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,r,i){var a=function(t,e){var r=t.canSkipUntil,i=t.canSkipDateRanges,a=t.endSN;return r&&(void 0!==e?e-a:0)<r?i?U.v2:U.Yes:U.No}(t,r);return null!=e&&e.skip&&t.deltaUpdateFailed&&(r=e.msn,i=e.part,a=U.No),new K(r,i,a)},e.retryLoadingOrFail=function(t){var e,r=this,i=this.hls.config,a=this.retryCount<i.levelLoadingMaxRetry;if(a)if(this.retryCount++,t.details.indexOf("LoadTimeOut")>-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return a},t}();function Q(){return(Q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function $(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function J(t,e){return(J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Z,tt=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),et=function(t){var e,r;function i(e){var r;return(r=t.call(this,e,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.onParsedComplete=void 0,r._registerListeners(),r}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,J(e,r);var a,o,l,u=i.prototype;return u._registerListeners=function(){var t=this.hls;t.on(n.a.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this),t.on(n.a.ERROR,this.onError,this)},u._unregisterListeners=function(){var t=this.hls;t.off(n.a.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this),t.off(n.a.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},u.startLoad=function(){this._levels.forEach((function(t){t.loadError=0})),t.prototype.startLoad.call(this)},u.onManifestLoaded=function(t,e){var r,i,a=[],o=[],l=[],u={},h=!1,d=!1,c=!1;if(e.levels.forEach((function(t){var e=t.attrs;h=h||!(!t.width||!t.height),d=d||!!t.videoCodec,c=c||!!t.audioCodec,tt&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0);var r=t.bitrate+"-"+t.attrs.RESOLUTION+"-"+t.attrs.CODECS;(i=u[r])?i.url.push(t.url):(i=new j(t),u[r]=i,a.push(i)),e&&(e.AUDIO&&H(i,"audio",e.AUDIO),e.SUBTITLES&&H(i,"text",e.SUBTITLES))})),(h||d)&&c&&(a=a.filter((function(t){var e=t.videoCodec,r=t.width,i=t.height;return!!e||!(!r||!i)}))),a=a.filter((function(t){var e=t.audioCodec,r=t.videoCodec;return(!e||m(e,"audio"))&&(!r||m(r,"video"))})),e.audioTracks&&V(o=e.audioTracks.filter((function(t){return!t.audioCodec||m(t.audioCodec,"audio")}))),e.subtitles&&V(l=e.subtitles),a.length>0){r=a[0].bitrate,a.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=a;for(var f=0;f<a.length;f++)if(a[f].bitrate===r){this._firstLevel=f,this.log("manifest loaded, "+a.length+" level(s) found, first bitrate: "+r);break}var g=c&&!d,v={levels:a,audioTracks:o,subtitleTracks:l,firstLevel:this._firstLevel,stats:e.stats,audio:c,video:d,altAudio:!g&&o.some((function(t){return!!t.url}))};this.hls.trigger(n.a.MANIFEST_PARSED,v),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:e.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(e,r){if(t.prototype.onError.call(this,e,r),!r.fatal){var i=r.context,a=this._levels[this.currentLevelIndex];if(i&&(i.type===k.a.AUDIO_TRACK&&a.audioGroupIds&&i.groupId===a.audioGroupIds[a.urlId]||i.type===k.a.SUBTITLE_TRACK&&a.textGroupIds&&i.groupId===a.textGroupIds[a.urlId]))this.redundantFailover(this.currentLevelIndex);else{var n,o=!1,l=!0;switch(r.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:if(r.frag){var u=this._levels[r.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(n=r.frag.level)):n=r.frag.level}break;case s.a.LEVEL_LOAD_ERROR:case s.a.LEVEL_LOAD_TIMEOUT:i&&(i.deliveryDirectives&&(l=!1),n=i.level),o=!0;break;case s.a.REMUX_ALLOC_ERROR:n=r.level,o=!0}void 0!==n&&this.recoverLevel(r,n,o,l)}}},u.recoverLevel=function(t,e,r,i){var a=t.details,n=this._levels[e];if(n.loadError++,r){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(i){var s=n.url.length;if(s>1&&n.loadError<s)t.levelRetry=!0,this.redundantFailover(e);else if(-1===this.manualLevelIndex){var o=0===e?this._levels.length-1:e-1;this.currentLevelIndex!==o&&0===this._levels[o].loadError&&(this.warn(a+": switch to "+o),t.levelRetry=!0,this.hls.nextAutoLevel=o)}}},u.redundantFailover=function(t){var e=this._levels[t],r=e.url.length;if(r>1){var i=(e.urlId+1)%r;this.warn("Switching to redundant URL-id "+i),this._levels.forEach((function(t){t.urlId=i})),this.level=t}},u.onFragLoaded=function(t,e){var r=e.frag;if(void 0!==r&&r.type===k.b.MAIN){var i=this._levels[r.level];void 0!==i&&(i.fragmentError=0,i.loadError=0)}},u.onLevelLoaded=function(t,e){var r,i,a=e.level,n=e.details,s=this._levels[a];if(!s)return this.warn("Invalid level index "+a),void(null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(n.deltaUpdateFailed=!0));a===this.currentLevelIndex?(0===s.fragmentError&&(s.loadError=0,this.retryCount=0),this.playlistLoaded(a,e,s.details)):null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(n.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(t,e){var r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var i=-1,a=this.hls.audioTracks[e.id].groupId,n=0;n<r.audioGroupIds.length;n++)if(r.audioGroupIds[n]===a){i=n;break}i!==r.urlId&&(r.urlId=i,this.startLoad())}},u.loadPlaylist=function(t){var e=this.currentLevelIndex,r=this._levels[e];if(this.canLoad&&r&&r.url.length>0){var i=r.urlId,a=r.url[i];if(t)try{a=t.addDirectives(a)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+a),this.clearTimer(),this.hls.trigger(n.a.LEVEL_LOADING,{url:a,level:e,id:i,deliveryDirectives:t||null})}},u.removeLevel=function(t,e){var r=function(t,r){return r!==e},i=this._levels.filter((function(i,a){return a!==t||i.url.length>1&&void 0!==e&&(i.url=i.url.filter(r),i.audioGroupIds&&(i.audioGroupIds=i.audioGroupIds.filter(r)),i.textGroupIds&&(i.textGroupIds=i.textGroupIds.filter(r)),i.urlId=0,!0)})).map((function(t,e){var r=t.details;return null!=r&&r.fragments&&r.fragments.forEach((function(t){t.level=e})),t}));this._levels=i,this.hls.trigger(n.a.LEVELS_UPDATED,{levels:i})},a=i,(o=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==t||null===(e=r[t])||void 0===e||!e.details)){if(t<0||t>=r.length){var i=t<0;if(this.hls.trigger(n.a.ERROR,{type:s.b.OTHER_ERROR,details:s.a.LEVEL_SWITCH_ERROR,level:t,fatal:i,reason:"invalid level idx"}),i)return;t=Math.min(t,r.length-1)}this.clearTimer();var a=this.currentLevelIndex,o=r[a],l=r[t];this.log("switching to level "+t+" from "+a),this.currentLevelIndex=t;var u=Q({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete u._urlId,this.hls.trigger(n.a.LEVEL_SWITCHING,u);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==o?void 0:o.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&$(a.prototype,o),l&&$(a,l),i}(z);!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(Z||(Z={}));var rt=function(){function t(t){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(n.a.BUFFER_APPENDED,this.onBufferAppended,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.a.BUFFER_APPENDED,this.onBufferAppended,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===k.b.MAIN){var r=this.activeFragment,i=this.activeParts;if(!r)return null;if(i)for(var a=i.length;a--;){var n=i[a],s=n?n.end:r.appendedPTS;if(n.start<=t&&void 0!==s&&t<=s)return a>9&&(this.activeParts=i.slice(a-9)),n}else if(r.start<=t&&void 0!==r.appendedPTS&&t<=r.appendedPTS)return r}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var r=this.fragments,i=Object.keys(r),a=i.length;a--;){var n=r[i[a]];if((null==n?void 0:n.body.type)===e&&n.buffered){var s=n.body;if(s.start<=t&&t<=s.end)return s}}return null},e.detectEvictedFragments=function(t,e,r){var i=this;Object.keys(this.fragments).forEach((function(a){var n=i.fragments[a];if(n)if(n.buffered){var s=n.range[t];s&&s.time.some((function(t){var r=!i.isTimeBuffered(t.startPTS,t.endPTS,e);return r&&i.removeFragment(n.body),r}))}else n.body.type===r&&i.removeFragment(n.body)}))},e.detectPartialFragments=function(t){var e=this,r=this.timeRanges,i=t.frag,a=t.part;if(r&&"initSegment"!==i.sn){var n=at(i),s=this.fragments[n];s&&(Object.keys(r).forEach((function(t){var n=i.elementaryStreams[t];if(n){var o=r[t],l=null!==a||!0===n.partial;s.range[t]=e.getBufferedTimes(i,a,l,o)}})),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body))}},e.getBufferedTimes=function(t,e,r,i){for(var a={time:[],partial:r},n=e?e.start:t.start,s=e?e.end:t.end,o=t.minEndPTS||s,l=t.maxStartPTS||n,u=0;u<i.length;u++){var h=i.start(u)-this.bufferPadding,d=i.end(u)+this.bufferPadding;if(l>=h&&o<=d){a.time.push({startPTS:Math.max(n,i.start(u)),endPTS:Math.min(s,i.end(u))});break}if(n<d&&s>h)a.partial=!0,a.time.push({startPTS:Math.max(n,i.start(u)),endPTS:Math.min(s,i.end(u))});else if(s<=h)break}return a},e.getPartialFragment=function(t){var e,r,i,a=null,n=0,s=this.bufferPadding,o=this.fragments;return Object.keys(o).forEach((function(l){var u=o[l];u&&it(u)&&(r=u.body.start-s,i=u.body.end+s,t>=r&&t<=i&&(e=Math.min(t-r,i-t),n<=e&&(a=u.body,n=e)))})),a},e.getState=function(t){var e=at(t),r=this.fragments[e];return r?r.buffered?it(r)?Z.PARTIAL:Z.OK:r.backtrack?Z.BACKTRACKED:Z.APPENDING:Z.NOT_LOADED},e.backtrack=function(t,e){var r=at(t),i=this.fragments[r];if(!i||i.backtrack)return null;var a=i.backtrack=e||i.loaded;return i.loaded=null,a},e.getBacktrackData=function(t){var e=at(t),r=this.fragments[e];if(r){var i,a=r.backtrack;if(null!=a&&null!==(i=a.payload)&&void 0!==i&&i.byteLength)return a;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,r){for(var i,a,n=0;n<r.length;n++){if(i=r.start(n)-this.bufferPadding,a=r.end(n)+this.bufferPadding,t>=i&&e<=a)return!0;if(e<=i)return!1}return!1},e.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if("initSegment"!==r.sn&&!r.bitrateTest&&!i){var a=at(r);this.fragments[a]={body:r,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var r=this,i=e.frag,a=e.part,n=e.timeRanges;if(i.type===k.b.MAIN)if(this.activeFragment=i,a){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(a)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach((function(t){var e=n[t];if(r.detectEvictedFragments(t,e),!a)for(var s=0;s<e.length;s++)i.appendedPTS=Math.max(e.end(s),i.appendedPTS||0)}))},e.onFragBuffered=function(t,e){this.detectPartialFragments(e)},e.hasFragment=function(t){var e=at(t);return!!this.fragments[e]},e.removeFragment=function(t){var e=at(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function it(t){var e,r;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(r=t.range.audio)||void 0===r?void 0:r.partial))}function at(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}var nt=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}(),st={length:0,start:function(){return 0},end:function(){return 0}},ot=function(){function t(){}return t.isBuffered=function(e,r){try{if(e)for(var i=t.getBuffered(e),a=0;a<i.length;a++)if(r>=i.start(a)&&r<=i.end(a))return!0}catch(t){}return!1},t.bufferInfo=function(e,r,i){try{if(e){var a,n=t.getBuffered(e),s=[];for(a=0;a<n.length;a++)s.push({start:n.start(a),end:n.end(a)});return this.bufferedInfo(s,r,i)}}catch(t){}return{len:0,start:r,end:r,nextStart:void 0}},t.bufferedInfo=function(t,e,r){t.sort((function(t,e){var r=t.start-e.start;return r||e.end-t.end}));var i=[];if(r)for(var a=0;a<t.length;a++){var n=i.length;if(n){var s=i[n-1].end;t[a].start-s<r?t[a].end>s&&(i[n-1].end=t[a].end):i.push(t[a])}else i.push(t[a])}else i=t;for(var o,l=0,u=e,h=e,d=0;d<i.length;d++){var c=i[d].start,f=i[d].end;if(e+r>=c&&e<f)u=c,l=(h=f)-e;else if(e+r<c){o=c;break}}return{len:l,start:u||0,end:h||0,nextStart:o}},t.getBuffered=function(t){try{return t.buffered}catch(t){return o.b.log("failed to get media.buffered",t),st}},t}(),lt=function(t,e,r,i,a,n){void 0===i&&(i=0),void 0===a&&(a=-1),void 0===n&&(n=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=t,this.sn=e,this.id=r,this.size=i,this.part=a,this.partial=n};function ut(t,e){if(t){var r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}}function ht(t,e){for(var r=e.fragments,i=0,a=r.length;i<a;i++)ut(r[i],t);e.fragmentHint&&ut(e.fragmentHint,t),e.alignedSliding=!0}function dt(t,e,r){e&&(!function(t,e,r){if(function(t,e,r){return!(!e.details||!(r.endCC>r.startCC||t&&t.cc<r.startCC))}(t,r,e)){var i=function(t,e){var r=t.fragments,i=e.fragments;if(i.length&&r.length){var a=function(t,e){for(var r=null,i=0,a=t.length;i<a;i++){var n=t[i];if(n&&n.cc===e){r=n;break}}return r}(r,i[0].cc);if(a&&(!a||a.startPTS))return a;o.b.log("No frag in previous level to align on")}else o.b.log("No fragments to align")}(r.details,e);i&&Object(a.a)(i.start)&&(o.b.log("Adjusting PTS using last level due to CC increase within current level "+e.url),ht(i.start,e))}}(t,r,e),!r.alignedSliding&&e.details&&ct(r,e.details),r.alignedSliding||!e.details||r.skippedSegments||X(e.details,r))}function ct(t,e){if(e.fragments.length&&t.hasProgramDateTime&&e.hasProgramDateTime){var r=e.fragments[0].programDateTime,i=t.fragments[0].programDateTime,n=(i-r)/1e3+e.fragments[0].start;n&&Object(a.a)(n)&&(o.b.log("Adjusting PTS using programDateTime delta "+(i-r)+"ms, sliding:"+n.toFixed(3)+" "+t.url+" "),ht(n,t))}}var ft={search:function(t,e){for(var r=0,i=t.length-1,a=null,n=null;r<=i;){var s=e(n=t[a=(r+i)/2|0]);if(s>0)r=a+1;else{if(!(s<0))return n;i=a-1}}return null}};function gt(t,e,r){if(null===e||!Array.isArray(t)||!t.length||!Object(a.a)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<t.length;++i){var n=t[i];if(mt(e,r,n))return n}return null}function vt(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var a=null;if(t?a=e[t.sn-e[0].sn+1]:0===r&&0===e[0].start&&(a=e[0]),a&&0===pt(r,i,a))return a;var n=ft.search(e,pt.bind(null,r,i));return n||a}function pt(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0);var i=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=t?1:r.start-i>t&&r.start?-1:0}function mt(t,e,r){var i=1e3*Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>t}function yt(t){var e="function"==typeof Map?new Map:void 0;return(yt=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return Tt(t,arguments,St(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),bt(i,t)})(t)}function Tt(t,e,r){return(Tt=Et()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return r&&bt(a,r.prototype),a}).apply(null,arguments)}function Et(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function bt(t,e){return(bt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function St(t){return(St=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lt=Math.pow(2,17),At=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var r=this,i=t.url;if(!i)return Promise.reject(new Dt({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var a=this.config,n=a.fLoader,o=a.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var u=r.loader=t.loader=n?new n(a):new o(a),h=Rt(t),d={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:Lt};t.stats=u.stats,u.load(h,d,{onSuccess:function(e,a,n,s){r.resetLoader(t,u),i({frag:t,part:null,payload:e.data,networkDetails:s})},onError:function(e,i,a){r.resetLoader(t,u),l(new Dt({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:a}))},onAbort:function(e,i,a){r.resetLoader(t,u),l(new Dt({type:s.b.NETWORK_ERROR,details:s.a.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:a}))},onTimeout:function(e,i,a){r.resetLoader(t,u),l(new Dt({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:a}))},onProgress:function(r,i,a,n){e&&e({frag:t,part:null,payload:a,networkDetails:n})}})}))},e.loadPart=function(t,e,r){var i=this;this.abort();var a=this.config,n=a.fLoader,o=a.loader;return new Promise((function(l,u){i.loader&&i.loader.destroy();var h=i.loader=t.loader=n?new n(a):new o(a),d=Rt(t,e),c={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:Lt};e.stats=h.stats,h.load(d,c,{onSuccess:function(a,n,s,o){i.resetLoader(t,h),i.updateStatsFromPart(t,e);var u={frag:t,part:e,payload:a.data,networkDetails:o};r(u),l(u)},onError:function(r,a,n){i.resetLoader(t,h),u(new Dt({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:r,networkDetails:n}))},onAbort:function(r,a,n){t.stats.aborted=e.stats.aborted,i.resetLoader(t,h),u(new Dt({type:s.b.NETWORK_ERROR,details:s.a.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:n}))},onTimeout:function(r,a,n){i.resetLoader(t,h),u(new Dt({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:n}))}})}))},e.updateStatsFromPart=function(t,e){var r=t.stats,i=e.stats,a=i.total;if(r.loaded+=i.loaded,a){var n=Math.round(t.duration/e.duration),s=Math.min(Math.round(r.loaded/a),n),o=(n-s)*Math.round(r.loaded/s);r.total=r.loaded+o}else r.total=Math.max(r.loaded,r.total);var l=r.loading,u=i.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function Rt(t,e){void 0===e&&(e=null);var r=e||t,i={frag:t,part:e,responseType:"arraybuffer",url:r.url,rangeStart:0,rangeEnd:0},n=r.byteRangeStartOffset,s=r.byteRangeEndOffset;return Object(a.a)(n)&&Object(a.a)(s)&&(i.rangeStart=n,i.rangeEnd=s),i}var Dt=function(t){var e,r;function i(e){for(var r,i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return(r=t.call.apply(t,[this].concat(a))||this).data=void 0,r.data=e,r}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,bt(e,r),i}(yt(Error)),kt=r(15),_t={toString:function(t){for(var e="",r=t.length,i=0;i<r;i++)e+="["+t.start(i).toFixed(3)+","+t.end(i).toFixed(3)+"]";return e}};function It(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ct(t,e){return(Ct=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var wt="STOPPED",Ot="IDLE",xt="KEY_LOADING",Pt="FRAG_LOADING",Mt="FRAG_LOADING_WAITING_RETRY",Ft="WAITING_TRACK",Nt="PARSING",Ut="PARSED",Bt="BACKTRACKING",Gt="ENDED",Kt="ERROR",jt="WAITING_INIT_PTS",Ht="WAITING_LEVEL",Vt=function(t){var e,r;function i(e,r,i){var a;return(a=t.call(this)||this).hls=void 0,a.fragPrevious=null,a.fragCurrent=null,a.fragmentTracker=void 0,a.transmuxer=null,a._state=wt,a.media=void 0,a.mediaBuffer=void 0,a.config=void 0,a.bitrateTest=!1,a.lastCurrentTime=0,a.nextLoadPosition=0,a.startPosition=0,a.loadedmetadata=!1,a.fragLoadError=0,a.retryDate=0,a.levels=null,a.fragmentLoader=void 0,a.levelLastLoaded=null,a.startFragRequested=!1,a.decrypter=void 0,a.initPTS=[],a.onvseeking=null,a.onvended=null,a.logPrefix="",a.log=void 0,a.warn=void 0,a.logPrefix=i,a.log=o.b.log.bind(o.b,i+":"),a.warn=o.b.warn.bind(o.b,i+":"),a.hls=e,a.fragmentLoader=new At(e.config),a.fragmentTracker=r,a.config=e.config,a.decrypter=new kt.a(e,e.config),e.on(n.a.KEY_LOADED,a.onKeyLoaded,function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a)),a}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,Ct(e,r);var u,h,d,c=i.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(t){},c.stopLoad=function(){this.fragmentLoader.abort();var t=this.fragCurrent;t&&this.fragmentTracker.removeFragment(t),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=wt},c._streamEnded=function(t,e){var r=this.fragCurrent,i=this.fragmentTracker;if(!e.live&&r&&r.sn===e.endSN&&!t.nextStart){var a=i.getState(r);return a===Z.PARTIAL||a===Z.OK}return!1},c.onMediaAttached=function(t,e){var r=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),r.addEventListener("seeking",this.onvseeking),r.addEventListener("ended",this.onvended);var i=this.config;this.levels&&i.autoStartLoad&&this.state===wt&&this.startLoad(i.startPosition)},c.onMediaDetaching=function(){var t=this.media;null!=t&&t.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var t=this.config,e=this.fragCurrent,r=this.media,i=this.mediaBuffer,n=this.state,s=r?r.currentTime:0,o=ot.bufferInfo(i||r,s,t.maxBufferHole);if(this.log("media seeking to "+(Object(a.a)(s)?s.toFixed(3):s)+", state: "+n),n===Gt)this.resetLoadingState();else if(e&&!o.len){var l=t.maxFragLookUpTolerance,u=e.start-l,h=s>e.start+e.duration+l;(s<u||h)&&(h&&e.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),e.loader.abort()),this.resetLoadingState())}r&&(this.lastCurrentTime=s),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onKeyLoaded=function(t,e){if(this.state===xt&&e.frag===this.fragCurrent&&this.levels){this.state=Ot;var r=this.levels[e.frag.level].details;r&&this.loadFragment(e.frag,r,e.frag.start)}},c.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=wt,this.hls.off(n.a.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},c.loadKey=function(t,e){this.log("Loading key for "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level),this.state=xt,this.fragCurrent=t,this.hls.trigger(n.a.KEY_LOADING,{frag:t})},c.loadFragment=function(t,e,r){this._loadFragForPlayback(t,e,r)},c._loadFragForPlayback=function(t,e,r){var i=this;this._doFragLoad(t,e,r,(function(e){if(i.fragContextChanged(t))return i.warn("Fragment "+t.sn+(e.part?" p: "+e.part.index:"")+" of level "+t.level+" was dropped during download."),void i.fragmentTracker.removeFragment(t);t.stats.chunkCount++,i._handleFragmentLoadProgress(e)})).then((function(e){if(e){i.fragLoadError=0;var r=i.state;if(!i.fragContextChanged(t))return"payload"in e&&(i.log("Loaded fragment "+t.sn+" of level "+t.level),i.hls.trigger(n.a.FRAG_LOADED,e),i.state===Bt)?(i.fragmentTracker.backtrack(t,e),void i.resetFragmentLoading(t)):void i._handleFragmentLoadComplete(e);(r===Pt||r===Bt||!i.fragCurrent&&r===Nt)&&(i.fragmentTracker.removeFragment(t),i.state=Ot)}})).catch((function(e){i.warn(e),i.resetFragmentLoading(t)}))},c.flushMainBuffer=function(t,e,r){if(void 0===r&&(r=null),t-e){var i={startOffset:t,endOffset:e,type:r};this.fragLoadError=0,this.hls.trigger(n.a.BUFFER_FLUSHING,i)}},c._loadInitSegment=function(t){var e=this;this._doFragLoad(t).then((function(r){if(!r||e.fragContextChanged(t)||!e.levels)throw new Error("init load aborted");return r})).then((function(r){var i=e.hls,a=r.payload,s=t.decryptdata;if(a&&a.byteLength>0&&s&&s.key&&s.iv&&"AES-128"===s.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(a),s.key.buffer,s.iv.buffer).then((function(e){var a=self.performance.now();return i.trigger(n.a.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:a}}),r.payload=e,r}))}return r})).then((function(r){var i=e.fragCurrent,a=e.hls,s=e.levels;if(!s)throw new Error("init load aborted, missing levels");s[t.level].details;var o=t.stats;e.state=Ot,e.fragLoadError=0,t.data=new Uint8Array(r.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),r.frag===i&&a.trigger(n.a.FRAG_BUFFERED,{stats:o,frag:i,part:null,id:t.type}),e.tick()})).catch((function(r){e.warn(r),e.resetFragmentLoading(t)}))},c.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},c.fragBufferedComplete=function(t,e){var r=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+_t.toString(ot.getBuffered(r))),this.state=Ot,this.tick()},c._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var r=t.frag,i=t.part,a=t.partsLoaded,n=!a||0===a.length||a.some((function(t){return!t})),s=new lt(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!n);e.flush(s)}},c._handleFragmentLoadProgress=function(t){},c._doFragLoad=function(t,e,r,i){var s=this;if(void 0===r&&(r=null),!this.levels)throw new Error("frag load aborted, missing levels");if(r=Math.max(t.start,r||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&i){r>t.end&&e.fragmentHint&&(t=e.fragmentHint);var l=this.getNextPart(o,t,r);if(l>-1){var u=o[l];return this.log("Loading part sn: "+t.sn+" p: "+u.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+l+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),this.nextLoadPosition=u.start+u.duration,this.state=Pt,this.hls.trigger(n.a.FRAG_LOADING,{frag:t,part:o[l],targetBufferTime:r}),this.doFragPartsLoad(t,o,l,i).catch((function(t){return s.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,r))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),Object(a.a)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=Pt,this.hls.trigger(n.a.FRAG_LOADING,{frag:t,targetBufferTime:r}),this.fragmentLoader.load(t,i).catch((function(t){return s.handleFragLoadError(t)}))},c.doFragPartsLoad=function(t,e,r,i){var a=this;return new Promise((function(s,o){var l=[];!function r(u){var h=e[u];a.fragmentLoader.loadPart(t,h,i).then((function(i){l[h.index]=i;var o=i.part;a.hls.trigger(n.a.FRAG_LOADED,i);var d=e[u+1];if(!d||d.fragment!==t)return s({frag:t,part:o,partsLoaded:l});r(u+1)})).catch(o)}(r)}))},c.handleFragLoadError=function(t){var e=t.data;return e&&e.details===s.a.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(n.a.ERROR,e),null},c._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===Nt){var r=e.frag,i=e.part,a=e.level,n=self.performance.now();r.stats.parsing.end=n,i&&(i.stats.parsing.end=n),this.updateLevelTiming(r,i,a,t.partial)}else this.fragCurrent||(this.state=Ot)},c.getCurrentContext=function(t){var e=this.levels,r=t.level,i=t.sn,a=t.part;if(!e||!e[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var n=e[r],s=a>-1?function(t,e,r){if(!t||!t.details)return null;var i=t.details.partList;if(i)for(var a=i.length;a--;){var n=i[a];if(n.index===r&&n.fragment.sn===e)return n}return null}(n,i,a):null,o=s?s.fragment:function(t,e){if(!t||!t.details)return null;var r=t.details,i=r.fragments[e-r.startSN];return i||((i=r.fragmentHint)&&i.sn===e?i:null)}(n,i);return o?{frag:o,part:s,level:n}:null},c.bufferFragmentData=function(t,e,r,i){if(t&&this.state===Nt){var a=t.data1,s=t.data2,o=a;if(a&&s&&(o=Object(l.a)(a,s)),o&&o.length){var u={type:t.type,frag:e,part:r,chunkMeta:i,parent:e.type,data:o};this.hls.trigger(n.a.BUFFER_APPENDING,u),t.dropped&&t.independent&&!r&&this.flushBufferGap(e)}}},c.flushBufferGap=function(t){var e=this.media;if(e)if(ot.isBuffered(e,e.currentTime)){var r=e.currentTime,i=ot.bufferInfo(e,r,0),a=t.duration,n=Math.min(2*this.config.maxFragLookUpTolerance,.25*a),s=Math.max(Math.min(t.start-n,i.end-n),r+n);t.start-s>n&&this.flushMainBuffer(s,t.start)}else this.flushMainBuffer(0,t.start)},c.reduceMaxBufferLength=function(t){var e=this.config,r=t||e.maxBufferLength;return e.maxMaxBufferLength>=r&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},c.getNextFragment=function(t,e){var r,i,a=e.fragments,n=a.length;if(!n)return null;var s,o=this.config,l=a[0].start;if(e.live){var u=o.initialLiveManifestSize;if(n<u)return this.warn("Not enough fragments to start playback (have: "+n+", need: "+u+")"),null;e.PTSKnown||this.startFragRequested||-1!==this.startPosition||(s=this.getInitialLiveFragment(e,a),this.startPosition=s?this.hls.liveSyncPosition||s.start:t)}else t<=l&&(s=a[0]);if(!s){var h=o.lowLatencyMode?e.partEnd:e.fragmentEnd;s=this.getFragmentAtPosition(t,h,e)}return null===(r=s)||void 0===r||!r.initSegment||null!==(i=s)&&void 0!==i&&i.initSegment.data||this.bitrateTest||(s=s.initSegment),s},c.getNextPart=function(t,e,r){for(var i=-1,a=!1,n=!0,s=0,o=t.length;s<o;s++){var l=t[s];if(n=n&&!l.independent,i>-1&&r<l.start)break;var u=l.loaded;!u&&(a||l.independent||n)&&l.fragment===e&&(i=s),a=u}return i},c.loadedEndOfParts=function(t,e){var r=t[t.length-1];return r&&e>r.start&&r.loaded},c.getInitialLiveFragment=function(t,e){var r=this.fragPrevious,i=null;if(r){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),i=gt(e,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){var a=r.sn+1;if(a>=t.startSN&&a<=t.endSN){var n=e[a-t.startSN];r.cc===n.cc&&(i=n,this.log("Live playlist, switching playlist, load frag with next SN: "+i.sn))}i||(i=function(t,e){return ft.search(t,(function(t){return t.cc<e?1:t.cc>e?-1:0}))}(e,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+i.sn)}}else{var s=this.hls.liveSyncPosition;null!==s&&(i=this.getFragmentAtPosition(s,this.bitrateTest?t.fragmentEnd:t.edge,t))}return i},c.getFragmentAtPosition=function(t,e,r){var i,a=this.config,n=this.fragPrevious,s=r.fragments,o=r.endSN,l=r.fragmentHint,u=a.maxFragLookUpTolerance,h=!!(a.lowLatencyMode&&r.partList&&l);(h&&l&&!this.bitrateTest&&(s=s.concat(l),o=l.sn),t<e)?i=vt(n,s,t,t>e-u?0:u):i=s[s.length-1];if(i){var d=i.sn-r.startSN,c=n&&i.level===n.level,f=s[d+1];if(this.fragmentTracker.getState(i)===Z.BACKTRACKED){i=null;for(var g=d;s[g]&&this.fragmentTracker.getState(s[g])===Z.BACKTRACKED;)i=n?s[g--]:s[--g];i||(i=f)}else n&&i.sn===n.sn&&!h&&c&&(i.sn<o&&this.fragmentTracker.getState(f)!==Z.OK?(this.log("SN "+i.sn+" just loaded, load next one: "+f.sn),i=f):i=null)}return i},c.synchronizeToLiveEdge=function(t){var e=this.config,r=this.media;if(r){var i=this.hls.liveSyncPosition,a=r.currentTime,n=t.fragments[0].start,s=t.edge,o=a>=n-e.maxFragLookUpTolerance&&a<=s;if(null!==i&&r.duration>i&&(a<i||!o)){var l=void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:e.liveMaxLatencyDurationCount*t.targetduration;(!o&&r.readyState<4||a<s-l)&&(this.loadedmetadata||(this.nextLoadPosition=i),r.readyState&&(this.warn("Playback: "+a.toFixed(3)+" is located too far from the end of live sliding playlist: "+s+", reset currentTime to : "+i.toFixed(3)),r.currentTime=i))}}},c.alignPlaylists=function(t,e){var r=this.levels,i=this.levelLastLoaded,n=null!==i?r[i]:null,s=0;return e&&t.fragments.length>0?(s=t.fragments[0].start,t.alignedSliding&&Object(a.a)(s)?this.log("Live playlist sliding:"+s.toFixed(3)):s||(this.warn("["+this.constructor.name+"] Live playlist - outdated PTS, unknown sliding"),dt(this.fragPrevious,n,t))):(this.log("Live playlist - first load, unknown sliding"),dt(this.fragPrevious,n,t)),s},c.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},c.setStartPosition=function(t,e){var r=this.startPosition;if(-1===this.startPosition||-1===this.lastCurrentTime){var i=t.startTimeOffset;Object(a.a)(i)?(i<0&&(this.log("Negative start time offset "+i+", count from end of last fragment"),i=e+t.totalduration+i),this.log("Start time offset found in playlist, adjust startPosition to "+i),this.startPosition=r=i):t.live?r=this.hls.liveSyncPosition||e:this.startPosition=r=0,this.lastCurrentTime=r}this.nextLoadPosition=r},c.getLoadPosition=function(){var t=this.media,e=0;return this.loadedmetadata?e=t.currentTime:this.nextLoadPosition&&(e=this.nextLoadPosition),e},c.handleFragLoadAborted=function(t,e){this.transmuxer&&"initSegment"!==t.sn&&t.stats.aborted&&(this.warn("Fragment "+t.sn+(e?" part"+e.index:"")+" of level "+t.level+" was aborted"),this.resetFragmentLoading(t))},c.resetFragmentLoading=function(t){this.fragCurrent&&this.fragContextChanged(t)||(this.state=Ot)},c.onFragmentOrKeyLoadError=function(t,e){if(!e.fatal){var r=e.frag;if(r&&r.type===t){this.fragCurrent;var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(r.level))return;var a=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+r.sn+" of "+t+" "+r.level+" failed to load, retrying in "+a+"ms"),this.retryDate=self.performance.now()+a,this.fragLoadError++,this.state=Mt}else e.levelRetry?(t===k.b.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=Ot):(o.b.error(e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.stopLoad(),this.state=Kt)}}},c.afterBufferFlushed=function(t,e,r){if(t){var i=ot.getBuffered(t);this.fragmentTracker.detectEvictedFragments(e,i,r),this.state===Gt&&this.resetLoadingState()}},c.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=Ot},c.resetLiveStartWhenNotLoaded=function(t){if(!this.loadedmetadata){this.startFragRequested=!1;var e=this.levels?this.levels[t].details:null;if(null!=e&&e.live)return this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},c.updateLevelTiming=function(t,e,r,i){var a=this,s=r.details;Object.keys(t.elementaryStreams).reduce((function(e,o){var l=t.elementaryStreams[o];if(l){var u=l.endPTS-l.startPTS;if(u<=0)return a.warn("Could not parse fragment "+t.sn+" "+o+" duration reliably ("+u+") resetting transmuxer to fallback to playlist timing"),a.resetTransmuxer(),e||!1;var h=i?0:Y(s,t,l.startPTS,l.endPTS,l.startDTS,l.endDTS);return a.hls.trigger(n.a.LEVEL_PTS_UPDATED,{details:s,level:r,drift:h,type:o,frag:t,start:l.startPTS,end:l.endPTS}),!0}return e}),!1)?(this.state=Ut,this.hls.trigger(n.a.FRAG_PARSED,{frag:t,part:e})):this.resetLoadingState()},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},u=i,(h=[{key:"state",get:function(){return this._state},set:function(t){var e=this._state;e!==t&&(this._state=t,this.log(e+"->"+t))}}])&&It(u.prototype,h),d&&It(u,d),i}(nt);function Wt(){return self.MediaSource||self.WebKitMediaSource}function Yt(){return self.SourceBuffer||self.WebKitSourceBuffer}var qt=r(18),Xt=r(10),zt=r(14),Qt=Wt()||{isTypeSupported:function(){return!1}},$t=function(){function t(t,e,r,i){var a=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=t,this.id=e,this.onTransmuxComplete=r,this.onFlush=i;var l=t.config,u=function(e,r){(r=r||{}).frag=a.frag,r.id=a.id,t.trigger(e,r)};this.observer=new zt.EventEmitter,this.observer.on(n.a.FRAG_DECRYPTED,u),this.observer.on(n.a.ERROR,u);var h={mp4:Qt.isTypeSupported("video/mp4"),mpeg:Qt.isTypeSupported("audio/mpeg"),mp3:Qt.isTypeSupported('audio/mp4; codecs="mp3"')},d=navigator.vendor;if(l.enableWorker&&"undefined"!=typeof Worker){var c;o.b.log("demuxing in webworker");try{c=this.worker=qt(19),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(e){t.trigger(n.a.ERROR,{type:s.b.OTHER_ERROR,details:s.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},c.postMessage({cmd:"init",typeSupported:h,vendor:d,id:e,config:JSON.stringify(l)})}catch(t){o.b.warn("Error in worker:",t),o.b.error("Error while initializing DemuxerWorker, fallback to inline"),c&&self.URL.revokeObjectURL(c.objectURL),this.transmuxer=new Xt.c(this.observer,h,l,d,e),this.worker=null}}else this.transmuxer=new Xt.c(this.observer,h,l,d,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},e.push=function(t,e,r,i,a,n,s,l,u,h){var d=this;u.transmuxing.start=self.performance.now();var c=this.transmuxer,f=this.worker,g=n?n.start:a.start,v=a.decryptdata,p=this.frag,m=!(p&&a.cc===p.cc),y=!(p&&u.level===p.level),T=p?u.sn-p.sn:-1,E=this.part?u.part-this.part.index:1,b=!y&&(1===T||0===T&&1===E),S=self.performance.now();(y||T||0===a.stats.parsing.start)&&(a.stats.parsing.start=S),!n||!E&&b||(n.stats.parsing.start=S);var L=new Xt.b(m,b,l,y,g);if(!b||m){o.b.log("[transmuxer-interface, "+a.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+m+"\n trackSwitch: "+y+"\n contiguous: "+b+"\n accurateTimeOffset: "+l+"\n timeOffset: "+g);var A=new Xt.a(r,i,e,s,h);this.configureTransmuxer(A)}if(this.frag=a,this.part=n,f)f.postMessage({cmd:"demux",data:t,decryptdata:v,chunkMeta:u,state:L},t instanceof ArrayBuffer?[t]:[]);else if(c){var R=c.push(t,v,u,L);Object(Xt.d)(R)?R.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(R)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var r=this.transmuxer,i=this.worker;if(i)i.postMessage({cmd:"flush",chunkMeta:t});else if(r){var a=r.flush(t);Object(Xt.d)(a)?a.then((function(r){e.handleFlushResult(r,t)})):this.handleFlushResult(a,t)}},e.handleFlushResult=function(t,e){var r=this;t.forEach((function(t){r.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,r=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):r&&r.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}(),Jt=function(){function t(t,e,r,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=r,this.hls=i}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,r=this.media,i=this.stalled,a=r.currentTime,n=r.seeking,s=this.seeking&&!n,l=!this.seeking&&n;if(this.seeking=n,a===t){if((l||s)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&ot.getBuffered(r).length){var u=ot.bufferInfo(r,a,0),h=u.len>0,d=u.nextStart||0;if(h||d){if(n){var c=u.len>2,f=!d||d-a>2&&!this.fragmentTracker.getPartialFragment(a);if(c||f)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var g,v=Math.max(d,u.start||0)-a,p=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,m=(null==p||null===(g=p.details)||void 0===g?void 0:g.live)?2*p.details.targetduration:2;if(v>0&&v<=m)return void this._trySkipBufferHole(null)}var y=self.performance.now();if(null!==i){var T=y-i;!n&&T>=250&&this._reportStall(u.len);var E=ot.bufferInfo(r,a,e.maxBufferHole);this._tryFixBufferStall(E,T)}else this.stalled=y}}}else if(this.moved=!0,null!==i){if(this.stallReported){var b=self.performance.now()-i;o.b.warn("playback not stuck anymore @"+a+", after "+Math.round(b)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var r=this.config,i=this.fragmentTracker,a=this.media.currentTime,n=i.getPartialFragment(a);if(n&&this._trySkipBufferHole(n))return;t.len>r.maxBufferHole&&e>1e3*r.highBufferWatchdogPeriod&&(o.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,o.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,r=this.hls,i=this.media,a=i.currentTime,l=0,u=ot.getBuffered(i),h=0;h<u.length;h++){var d=u.start(h);if(a+e.maxBufferHole>=l&&a<d){var c=Math.max(d+.05,i.currentTime+.1);return o.b.warn("skipping hole, adjusting currentTime from "+a+" to "+c),this.moved=!0,this.stalled=null,i.currentTime=c,t&&r.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+c,frag:t}),c}l=u.end(h)}return 0},e._tryNudgeBuffer=function(){var t=this.config,e=this.hls,r=this.media,i=r.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<t.nudgeMaxRetry){var l=i+a*t.nudgeOffset;o.b.warn("Nudging 'currentTime' from "+i+" to "+l),r.currentTime=l,e.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else o.b.error("Playhead still not moving while enough data buffered @"+i+" after "+t.nudgeMaxRetry+" nudges"),e.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!0})},t}();function Zt(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function te(t,e){return(te=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ee=function(t){var e,r;function i(e,r){var i;return(i=t.call(this,e,r,"[stream-controller]")||this).audioCodecSwap=!1,i.gapController=null,i.level=-1,i._forceStartLoad=!1,i.altAudio=!1,i.audioOnly=!1,i.fragPlaying=null,i.onvplaying=null,i.onvseeked=null,i.fragLastKbps=0,i.stalled=!1,i.couldBacktrack=!1,i.audioCodecSwitch=!1,i.videoBuffer=null,i._registerListeners(),i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,te(e,r);var l,h,d,c=i.prototype;return c._registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.on(n.a.ERROR,this.onError,this),t.on(n.a.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(n.a.BUFFER_CREATED,this.onBufferCreated,this),t.on(n.a.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(n.a.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this)},c._unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.off(n.a.ERROR,this.onError,this),t.off(n.a.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(n.a.BUFFER_CREATED,this.onBufferCreated,this),t.off(n.a.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(n.a.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this)},c.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},c.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=r.startLevel;-1===i&&(r.config.testBandwidth?(i=0,this.bitrateTest=!0):i=r.nextAutoLevel),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}e>0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=Ot,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=wt},c.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},c.doTick=function(){switch(this.state){case Ot:this.doTickIdle();break;case Ht:var t,e=this.levels,r=this.level,i=null==e||null===(t=e[r])||void 0===t?void 0:t.details;if(i&&(!i.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(i))break;this.state=Ot;break}break;case Mt:var a,n=self.performance.now(),s=this.retryDate;(!s||n>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=Ot)}this.onTickEnd()},c.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},c.doTickIdle=function(){var t,e,r=this.hls,i=this.levelLastLoaded,s=this.levels,o=this.media,l=r.config,u=r.nextLoadLevel;if(null!==i&&(o||!this.startFragRequested&&l.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&s&&s[u]){var h=s[u];this.level=r.nextLoadLevel=u;var d=h.details;if(!d||this.state===Ht||d.live&&this.levelLastLoaded!==u)this.state=Ht;else{var c=this.getLoadPosition();if(Object(a.a)(c)){var f,g,v=h.maxBitrate;g=v?Math.max(8*l.maxBufferSize/v,l.maxBufferLength):l.maxBufferLength,g=Math.min(g,l.maxMaxBufferLength);var p=c<l.maxBufferHole?Math.max(2,l.maxBufferHole):l.maxBufferHole,m=ot.bufferInfo(this.mediaBuffer?this.mediaBuffer:o,c,p);if(!(m.len>=g)){if(this._streamEnded(m,d)){var y={};return this.altAudio&&(y.type="video"),this.hls.trigger(n.a.BUFFER_EOS,y),void(this.state=Gt)}f=m.end;var T=this.getNextFragment(f,d);if(this.couldBacktrack&&!this.fragPrevious&&T&&"initSegment"!==T.sn){var E=T.sn-d.startSN;E>1&&(T=d.fragments[E-1],this.fragmentTracker.removeFragment(T))}T&&this.fragmentTracker.getState(T)===Z.OK&&this.nextLoadPosition>f&&(T=this.getNextFragment(this.nextLoadPosition,d)),T&&(!T.initSegment||T.initSegment.data||this.bitrateTest||(T=T.initSegment),"identity"!==(null===(t=T.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=T.decryptdata)&&void 0!==e&&e.key?this.loadFragment(T,d,f):this.loadKey(T,d))}}}}},c.loadFragment=function(e,r,i){var a,n=this.fragmentTracker.getState(e);if(this.fragCurrent=e,n===Z.BACKTRACKED){var s=this.fragmentTracker.getBacktrackData(e);if(s)return this._handleFragmentLoadProgress(s),void this._handleFragmentLoadComplete(s);n=Z.NOT_LOADED}n===Z.NOT_LOADED||n===Z.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,i)):n===Z.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(a=this.media)||void 0===a?void 0:a.buffered.length)&&this.fragmentTracker.removeAllFragments()},c.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,k.b.MAIN);return e&&"fragment"in e?e.fragment:e},c.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,k.b.MAIN)},c.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},c.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},c.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var r,i=this.getAppendedFrag(e.currentTime);if(i&&i.start>1&&this.flushMainBuffer(0,i.start-1),!e.paused&&t){var a=t[this.hls.nextLoadLevel],n=this.fragLastKbps;r=n&&this.fragCurrent?this.fragCurrent.duration*a.maxBitrate/(1e3*n)+1:0}else r=0;var s=this.getBufferedFrag(e.currentTime+r);if(s){var o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();var l=o.maxStartPTS?o.maxStartPTS:o.start,u=o.duration,h=Math.max(s.end,l+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,.5*u),.75*u));this.flushMainBuffer(h,Number.POSITIVE_INFINITY)}}}},c.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===xt&&(this.state=Ot),this.nextLoadPosition=this.getLoadPosition()},c.flushMainBuffer=function(e,r){t.prototype.flushMainBuffer.call(this,e,r,this.altAudio?"video":null)},c.onMediaAttached=function(e,r){t.prototype.onMediaAttached.call(this,e,r);var i=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new Jt(this.config,i,this.fragmentTracker,this.hls)},c.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},c.onMediaPlaying=function(){this.tick()},c.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(a.a)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},c.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(n.a.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},c.onManifestParsed=function(t,e){var r,i,a,n=!1,s=!1;e.levels.forEach((function(t){(r=t.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(n=!0),-1!==r.indexOf("mp4a.40.5")&&(s=!0))})),this.audioCodecSwitch=n&&s&&!("function"==typeof(null==(a=Yt())||null===(i=a.prototype)||void 0===i?void 0:i.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},c.onLevelLoading=function(t,e){var r=this.levels;if(r&&this.state===Ot){var i=r[e.level];(!i.details||i.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(i.details))&&(this.state=Ht)}},c.onLevelLoaded=function(t,e){var r,i=this.levels,a=e.level,s=e.details,o=s.totalduration;if(i){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+o);var l=this.fragCurrent;!l||this.state!==Pt&&this.state!==Mt||l.level!==e.level&&l.loader&&(this.state=Ot,l.loader.abort());var u=i[a],h=0;if(s.live||null!==(r=u.details)&&void 0!==r&&r.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(n.a.LEVEL_UPDATED,{details:s,level:a}),this.state===Ht){if(this.waitForCdnTuneIn(s))return;this.state=Ot}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},c._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,a=t.payload,n=this.levels;if(n){var s=n[r.level],o=s.details;if(o){var l=s.videoCodec,u=o.PTSKnown||!o.live,h=null===(e=r.initSegment)||void 0===e?void 0:e.data,d=this._getAudioCodec(s),c=this.transmuxer=this.transmuxer||new $t(this.hls,k.b.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),f=i?i.index:-1,g=-1!==f,v=new lt(r.level,r.sn,r.stats.chunkCount,a.byteLength,f,g),p=this.initPTS[r.cc];c.push(a,h,d,l,r,i,o.totalduration,u,v,p)}else this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},c.onAudioTrackSwitching=function(t,e){var r=this.altAudio,i=!!e.url,a=e.id;if(!i){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;null!=s&&s.loader&&(this.log("Switching to main audio track, cancel main fragment load"),s.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var o=this.hls;r&&o.trigger(n.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),o.trigger(n.a.AUDIO_TRACK_SWITCHED,{id:a})}},c.onAudioTrackSwitched=function(t,e){var r=e.id,i=!!this.hls.audioTracks[r].url;if(i){var a=this.videoBuffer;a&&this.mediaBuffer!==a&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=a)}this.altAudio=i,this.tick()},c.onBufferCreated=function(t,e){var r,i,a=e.tracks,n=!1;for(var s in a){var o=a[s];if("main"===o.id){if(i=s,r=o,"video"===s){var l=a[s];l&&(this.videoBuffer=l.buffer)}}else n=!0}n&&r?(this.log("Alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},c.onFragBuffered=function(t,e){var r=e.frag,i=e.part;if(!r||r.type===k.b.MAIN){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Ut&&(this.state=Ot));var a=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==r.sn&&(this.fragPrevious=r),this.fragBufferedComplete(r,i)}},c.onError=function(t,e){switch(e.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(k.b.MAIN,e);break;case s.a.LEVEL_LOAD_ERROR:case s.a.LEVEL_LOAD_TIMEOUT:this.state!==Kt&&(e.fatal?(this.warn(""+e.details),this.state=Kt):e.levelRetry||this.state!==Ht||(this.state=Ot));break;case s.a.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===Nt||this.state===Ut))!!this.media&&ot.isBuffered(this.media,this.media.currentTime)&&ot.isBuffered(this.media,this.media.currentTime+.5)?(this.reduceMaxBufferLength(),this.state=Ot):(this.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.immediateLevelSwitch())}},c.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var r=ot.getBuffered(t);!this.loadedmetadata&&r.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},c.onFragLoadEmergencyAborted=function(){this.state=Ot,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},c.onBufferFlushed=function(t,e){var r=e.type;if(r!==u.a.AUDIO||this.audioOnly&&!this.altAudio){var i=(r===u.a.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(i,r,k.b.MAIN)}},c.onLevelsUpdated=function(t,e){this.levels=e.levels},c.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},c.seekToStartPos=function(){var t=this.media,e=t.currentTime,r=this.startPosition;if(r>=0&&e<r){if(t.seeking)return void o.b.log("could not seek to "+r+", already seeking at "+e);var i=ot.getBuffered(t),a=(i.length?i.start(0):0)-r;a>0&&a<this.config.maxBufferHole&&(o.b.log("adjusting start position by "+a+" to match buffer start"),r+=a,this.startPosition=r),this.log("seek to target start position "+r+" from current time "+e),t.currentTime=r}},c._getAudioCodec=function(t){var e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&e&&(this.log("Swapping audio codec"),e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),e},c._loadBitrateTestFrag=function(t){var e=this;this._doFragLoad(t).then((function(r){var i=e.hls;if(r&&!i.nextLoadLevel&&!e.fragContextChanged(t)){e.fragLoadError=0,e.state=Ot,e.startFragRequested=!1,e.bitrateTest=!1;var a=t.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(n.a.FRAG_LOADED,r)}}))},c._handleTransmuxComplete=function(t){var e,r="main",i=this.hls,s=t.remuxResult,o=t.chunkMeta,l=this.getCurrentContext(o);if(!l)return this.warn("The loading context changed while buffering fragment "+o.sn+" of level "+o.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(o.level);var h=l.frag,d=l.part,c=l.level,f=s.video,g=s.text,v=s.id3,p=s.initSegment,m=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(h)){if(this.state=Nt,p){p.tracks&&(this._bufferInitSegment(c,p.tracks,h,o),i.trigger(n.a.FRAG_PARSING_INIT_SEGMENT,{frag:h,id:r,tracks:p.tracks}));var y=p.initPTS,T=p.timescale;Object(a.a)(y)&&(this.initPTS[h.cc]=y,i.trigger(n.a.INIT_PTS_FOUND,{frag:h,id:r,initPTS:y,timescale:T}))}if(f&&!1!==s.independent){if(c.details){var E=f.startPTS,b=f.endPTS,S=f.startDTS,L=f.endDTS;if(d)d.elementaryStreams[f.type]={startPTS:E,endPTS:b,startDTS:S,endDTS:L};else if(f.firstKeyFrame&&f.independent&&(this.couldBacktrack=!0),f.dropped&&f.independent){if(this.getLoadPosition()+this.config.maxBufferHole<E)return void this.backtrack(h);h.setElementaryStreamInfo(f.type,h.start,b,h.start,L,!0)}h.setElementaryStreamInfo(f.type,E,b,S,L),this.bufferFragmentData(f,h,d,o)}}else if(!1===s.independent)return void this.backtrack(h);if(m){var A=m.startPTS,R=m.endPTS,D=m.startDTS,k=m.endDTS;d&&(d.elementaryStreams[u.a.AUDIO]={startPTS:A,endPTS:R,startDTS:D,endDTS:k}),h.setElementaryStreamInfo(u.a.AUDIO,A,R,D,k),this.bufferFragmentData(m,h,d,o)}if(null!=v&&null!==(e=v.samples)&&void 0!==e&&e.length){var _={frag:h,id:r,samples:v.samples};i.trigger(n.a.FRAG_PARSING_METADATA,_)}if(g){var I={frag:h,id:r,samples:g.samples};i.trigger(n.a.FRAG_PARSING_USERDATA,I)}}},c._bufferInitSegment=function(t,e,r,i){var a=this;if(this.state===Nt){this.audioOnly=!!e.audio&&!e.video,this.altAudio&&!this.audioOnly&&delete e.audio;var s=e.audio,o=e.video,l=e.audiovideo;if(s){var u=t.audioCodec,h=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===h.indexOf("firefox")&&(u="mp4a.40.5")),-1!==h.indexOf("android")&&"audio/mpeg"!==s.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),t.audioCodec&&t.audioCodec!==u&&this.log('Swapping manifest audio codec "'+t.audioCodec+'" for "'+u+'"'),s.levelCodec=u,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(t.audioCodec||"")+"/"+s.codec+"]")}o&&(o.levelCodec=t.videoCodec,o.id="main",this.log("Init video buffer, container:"+o.container+", codecs[level/parsed]=["+(t.videoCodec||"")+"/"+o.codec+"]")),l&&this.log("Init audiovideo buffer, container:"+l.container+", codecs[level/parsed]=["+(t.attrs.CODECS||"")+"/"+l.codec+"]"),this.hls.trigger(n.a.BUFFER_CODECS,e),Object.keys(e).forEach((function(t){var s=e[t].initSegment;null!=s&&s.byteLength&&a.hls.trigger(n.a.BUFFER_APPENDING,{type:t,data:s,frag:r,part:null,chunkMeta:i,parent:r.type})})),this.tick()}},c.backtrack=function(t){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(t);var e=this.fragmentTracker.backtrack(t);this.fragPrevious=null,this.nextLoadPosition=t.start,e?this.resetFragmentLoading(t):this.state=Bt},c.checkFragmentChanged=function(){var t=this.media,e=null;if(t&&t.readyState>1&&!1===t.seeking){var r=t.currentTime;if(ot.isBuffered(t,r)?e=this.getAppendedFrag(r):ot.isBuffered(t,r+.1)&&(e=this.getAppendedFrag(r+.1)),e){var i=this.fragPlaying,a=e.level;i&&e.sn===i.sn&&i.level===a&&e.urlId===i.urlId||(this.hls.trigger(n.a.FRAG_CHANGED,{frag:e}),i&&i.level===a||this.hls.trigger(n.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=e)}}},l=i,(h=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&Zt(l.prototype,h),d&&Zt(l,d),i}(Vt),re=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=r}var e=t.prototype;return e.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}(),ie=function(){function t(t,e,r){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new re(t),this.fast_=new re(e)}var e=t.prototype;return e.update=function(t,e){var r=this.slow_,i=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new re(t,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==e&&(this.fast_=new re(e,i.getEstimate(),i.getTotalWeight()))},e.sample=function(t,e){var r=(t=Math.max(t,this.minDelayMs_))/1e3,i=8*e/r;this.fast_.sample(r,i),this.slow_.sample(r,i)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();function ae(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ne=function(){function t(t){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=t;var e=t.config;this.bwEstimator=new ie(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate),this.registerListeners()}var e,r,i,l=t.prototype;return l.registerListeners=function(){var t=this.hls;t.on(n.a.FRAG_LOADING,this.onFragLoading,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.ERROR,this.onError,this)},l.unregisterListeners=function(){var t=this.hls;t.off(n.a.FRAG_LOADING,this.onFragLoading,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},l.onFragLoading=function(t,e){var r,i=e.frag;i.type===k.b.MAIN&&(this.timer||(this.fragCurrent=i,this.partCurrent=null!=(r=e.part)?r:null,this.timer=self.setInterval(this.onCheck,100)))},l.onLevelLoaded=function(t,e){var r=this.hls.config;e.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},l._abandonRulesCheck=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.autoLevelEnabled,s=r.config,l=r.media;if(t&&l){var u=e?e.stats:t.stats,h=e?e.duration:t.duration;if(u.aborted)return o.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!l.paused&&l.playbackRate&&l.readyState){var d=performance.now()-u.loading.start,c=Math.abs(l.playbackRate);if(!(d<=500*h/c)){var f=r.levels,g=r.minAutoLevel,v=f[t.level],p=u.total||Math.max(u.loaded,Math.round(h*v.maxBitrate/8)),m=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/d),y=(p-u.loaded)/m,T=l.currentTime,E=(ot.bufferInfo(l,T,s.maxBufferHole).end-T)/c;if(!(E>=2*h/c||y<=E)){var b,S=Number.POSITIVE_INFINITY;for(b=t.level-1;b>g;b--){if((S=h*f[b].maxBitrate/(6.4*m))<E)break}if(!(S>=y)){var L=this.bwEstimator.getEstimate();o.b.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+b+"\n Current BW estimate: "+(Object(a.a)(L)?(L/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+y.toFixed(3)+" s\n Estimated load time for the next fragment: "+S.toFixed(3)+" s\n Time to underbuffer: "+E.toFixed(3)+" s"),r.nextLoadLevel=b,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),r.trigger(n.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},l.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if(r.type===k.b.MAIN&&Object(a.a)(r.sn)){var s=i?i.stats:r.stats,o=i?i.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var l=this.hls.levels[r.level],u=(l.loaded?l.loaded.bytes:0)+s.loaded,h=(l.loaded?l.loaded.duration:0)+o;l.loaded={bytes:u,duration:h},l.realBitrate=Math.round(8*u/h)}if(r.bitrateTest){var d={stats:s,frag:r,part:i,id:r.type};this.onFragBuffered(n.a.FRAG_BUFFERED,d),r.bitrateTest=!1}}},l.onFragBuffered=function(t,e){var r=e.frag,i=e.part,a=i?i.stats:r.stats;if(!a.aborted&&r.type===k.b.MAIN&&"initSegment"!==r.sn){var n=a.parsing.end-a.loading.start;this.bwEstimator.sample(n,a.loaded),a.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=n/1e3:this.bitrateTestDelay=0}},l.onError=function(t,e){switch(e.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},l.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},l.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.maxAutoLevel,a=r.config,n=r.minAutoLevel,s=r.media,l=e?e.duration:t?t.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():a.abrEwmaDefaultEstimate,c=(ot.bufferInfo(s,u,a.maxBufferHole).end-u)/h,f=this.findBestLevel(d,n,i,c,a.abrBandWidthFactor,a.abrBandWidthUpFactor);if(f>=0)return f;o.b.trace((c?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=l?Math.min(l,a.maxStarvationDelay):a.maxStarvationDelay,v=a.abrBandWidthFactor,p=a.abrBandWidthUpFactor;if(!c){var m=this.bitrateTestDelay;if(m)g=(l?Math.min(l,a.maxLoadingDelay):a.maxLoadingDelay)-m,o.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),v=p=1}return f=this.findBestLevel(d,n,i,c+g,v,p),Math.max(f,0)},l.findBestLevel=function(t,e,r,i,a,n){for(var s,l=this.fragCurrent,u=this.partCurrent,h=this.lastLoadedFragLevel,d=this.hls.levels,c=d[h],f=!(null==c||null===(s=c.details)||void 0===s||!s.live),g=null==c?void 0:c.codecSet,v=u?u.duration:l?l.duration:0,p=r;p>=e;p--){var m=d[p];if(m&&(!g||m.codecSet===g)){var y=m.details,T=(u?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||v,E=void 0;E=p<=h?a*t:n*t;var b=d[p].maxBitrate,S=b*T/E;if(o.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+p+"/"+Math.round(E)+"/"+b+"/"+T+"/"+i+"/"+S),E>b&&(!S||f&&!this.bitrateTestDelay||S<i))return p}}return-1},e=t,(r=[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this.bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var r=this.getNextABRAutoLevel();return-1!==t&&(r=Math.min(t,r)),r},set:function(t){this._nextAutoLevel=t}}])&&ae(e.prototype,r),i&&ae(e,i),t}(),se=r(13);function oe(){return(oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function le(t,e){return(le=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ue=function(t){var e,r;function i(e,r){var i;return(i=t.call(this,e,r,"[audio-stream-controller]")||this).videoBuffer=null,i.videoTrackCC=-1,i.waitingVideoCC=-1,i.audioSwitch=!1,i.trackId=-1,i.waitingData=null,i.mainDetails=null,i._registerListeners(),i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,le(e,r);var l=i.prototype;return l.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},l._registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.on(n.a.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(n.a.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(n.a.ERROR,this.onError,this),t.on(n.a.BUFFER_RESET,this.onBufferReset,this),t.on(n.a.BUFFER_CREATED,this.onBufferCreated,this),t.on(n.a.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(n.a.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this)},l._unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.off(n.a.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(n.a.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(n.a.ERROR,this.onError,this),t.off(n.a.BUFFER_RESET,this.onBufferReset,this),t.off(n.a.BUFFER_CREATED,this.onBufferCreated,this),t.off(n.a.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(n.a.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this)},l.onInitPtsFound=function(t,e){var r=e.frag,i=e.id,a=e.initPTS;if("main"===i){var n=r.cc;this.initPTS[r.cc]=a,this.log("InitPTS for cc: "+n+" found from main: "+a),this.videoTrackCC=n,this.state===jt&&this.tick()}},l.startLoad=function(t){if(!this.levels)return this.startPosition=t,void(this.state=wt);var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=Ot):(this.loadedmetadata=!1,this.state=Ft),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},l.doTick=function(){switch(this.state){case Ot:this.doTickIdle();break;case Ft:var e,r=this.levels,i=this.trackId,a=null==r||null===(e=r[i])||void 0===e?void 0:e.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=jt}break;case Mt:var n,s=performance.now(),l=this.retryDate;(!l||s>=l||null!==(n=this.media)&&void 0!==n&&n.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=Ot);break;case jt:var u=this.waitingData;if(u){var h=u.frag,d=u.part,c=u.cache,f=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.state=Pt;var g={frag:h,part:d,payload:c.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),f&&t.prototype._handleFragmentLoadComplete.call(this,g)}else if(this.videoTrackCC!==this.waitingVideoCC)o.b.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var v=ot.bufferInfo(this.mediaBuffer,this.media.currentTime,this.config.maxBufferHole);pt(v.end,this.config.maxFragLookUpTolerance,h)<0&&(o.b.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+v.end+" is needed"),this.clearWaitingFragment())}}else this.state=Ot}this.onTickEnd()},l.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Ot)},l.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},l.doTickIdle=function(){var t,e,r=this.hls,i=this.levels,s=this.media,o=this.trackId,l=r.config;if(i&&i[o]&&(s||!this.startFragRequested&&l.startFragPrefetch)){var u=this.getLoadPosition();if(Object(a.a)(u)){var h=i[o].details;if(!h||h.live&&this.levelLastLoaded!==o||this.waitForCdnTuneIn(h))this.state=Ft;else{var d=0,c=this.mediaBuffer?this.mediaBuffer:this.media,f=this.videoBuffer?this.videoBuffer:this.media,g=u<l.maxBufferHole?Math.max(2,l.maxBufferHole):l.maxBufferHole,v=ot.bufferInfo(c,u,g),p=ot.bufferInfo(f,u,g),m=v.len,y=Math.min(l.maxBufferLength,l.maxMaxBufferLength),T=Math.max(y,p.len),E=this.audioSwitch;if(!(m>=T)||E){if(!E&&this._streamEnded(v,h))return r.trigger(n.a.BUFFER_EOS,{type:"audio"}),void(this.state=Gt);var b=h.fragments[0].start;d=v.end,E&&(d=u,h.PTSKnown&&u<b&&(v.end>b||v.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),s.currentTime=b+.05));var S=this.getNextFragment(d,h);S&&("identity"!==(null===(t=S.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=S.decryptdata)&&void 0!==e&&e.key?this.loadFragment(S,h,d):this.loadKey(S,h))}}}}},l.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},l.onAudioTracksUpdated=function(t,e){var r=e.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(t){return new j(t)}))},l.onAudioTrackSwitching=function(t,e){var r=!!e.url;this.trackId=e.id;var i=this.fragCurrent;null!=i&&i.loader&&i.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),r?this.setInterval(100):this.resetTransmuxer(),r?(this.audioSwitch=!0,this.state=Ot):this.state=wt,this.tick()},l.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0},l.onLevelLoaded=function(t,e){if(null===this.mainDetails){var r=this.mainDetails=e.details,i=this.levelLastLoaded;if(null!==i&&this.levels&&-1===this.startPosition&&r.live){var a=this.levels[i];if(!a.details||!a.details.fragments[0])return;ct(a.details,r),this.setStartPosition(a.details,a.details.fragments[0].start)}}},l.onAudioTrackLoaded=function(t,e){var r,i=this.levels,a=e.details,n=e.id;if(i){this.log("Track "+n+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=i[n],o=0;if(a.live||null!==(r=s.details)&&void 0!==r&&r.live){var l;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;!s.details&&null!==(l=this.mainDetails)&&void 0!==l&&l.hasProgramDateTime&&a.hasProgramDateTime?(ct(a,this.mainDetails),o=a.fragments[0].start):o=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=n,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,o),this.state!==Ft||this.waitForCdnTuneIn(a)||(this.state=Ot),this.tick()}else this.warn("Audio tracks were reset while loading level "+n)},l._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,a=t.payload,n=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s],h=u.details,d=n.defaultAudioCodec||u.audioCodec||"mp4a.40.2",c=this.transmuxer;c||(c=this.transmuxer=new $t(this.hls,k.b.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var f=this.initPTS[r.cc],g=null===(e=r.initSegment)||void 0===e?void 0:e.data;if(void 0!==f){var v=i?i.index:-1,p=-1!==v,m=new lt(r.level,r.sn,r.stats.chunkCount,a.byteLength,v,p);c.push(a,g,d,"",r,i,h.totalduration,!1,m,f)}else{o.b.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+h.startSN+" ,"+h.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:r,part:i,cache:new se.a,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=jt}}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},l._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},l.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},l.onBufferCreated=function(t,e){var r=e.tracks.audio;r&&(this.mediaBuffer=r.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},l.onFragBuffered=function(t,e){var r=e.frag,i=e.part;r.type===k.b.AUDIO&&(this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(n.a.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,i)))},l.onError=function(e,r){switch(r.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(k.b.AUDIO,r);break;case s.a.AUDIO_TRACK_LOAD_ERROR:case s.a.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==Kt&&this.state!==wt&&(this.state=r.fatal?Kt:Ot,this.warn(r.details+" while loading frag, switching to "+this.state+" state"));break;case s.a.BUFFER_FULL_ERROR:if("audio"===r.parent&&(this.state===Nt||this.state===Ut)){var i=this.mediaBuffer,a=this.media.currentTime;i&&ot.isBuffered(i,a)&&ot.isBuffered(i,a+.5)?(this.reduceMaxBufferLength(),this.state=Ot):(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"))}}},l.onBufferFlushed=function(t,e){var r=e.type;if(r===u.a.AUDIO){var i=this.mediaBuffer?this.mediaBuffer:this.media;this.afterBufferFlushed(i,r,k.b.AUDIO)}},l._handleTransmuxComplete=function(t){var e,r="audio",i=this.hls,a=t.remuxResult,s=t.chunkMeta,o=this.getCurrentContext(s);if(!o)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var l=o.frag,h=o.part,d=a.audio,c=a.text,f=a.id3,g=a.initSegment;if(!this.fragContextChanged(l)){if(this.state=Nt,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=g&&g.tracks&&(this._bufferInitSegment(g.tracks,l,s),i.trigger(n.a.FRAG_PARSING_INIT_SEGMENT,{frag:l,id:r,tracks:g.tracks})),d){var v=d.startPTS,p=d.endPTS,m=d.startDTS,y=d.endDTS;h&&(h.elementaryStreams[u.a.AUDIO]={startPTS:v,endPTS:p,startDTS:m,endDTS:y}),l.setElementaryStreamInfo(u.a.AUDIO,v,p,m,y),this.bufferFragmentData(d,l,h,s)}if(null!=f&&null!==(e=f.samples)&&void 0!==e&&e.length){var T=oe({frag:l,id:r},f);i.trigger(n.a.FRAG_PARSING_METADATA,T)}if(c){var E=oe({frag:l,id:r},c);i.trigger(n.a.FRAG_PARSING_USERDATA,E)}}},l._bufferInitSegment=function(t,e,r){if(this.state===Nt){t.video&&delete t.video;var i=t.audio;if(i){i.levelCodec=i.codec,i.id="audio",this.log("Init audio buffer, container:"+i.container+", codecs[parsed]=["+i.codec+"]"),this.hls.trigger(n.a.BUFFER_CODECS,t);var a=i.initSegment;if(null!=a&&a.byteLength){var s={type:"audio",frag:e,part:null,chunkMeta:r,parent:e.type,data:a};this.hls.trigger(n.a.BUFFER_APPENDING,s)}this.tick()}}},l.loadFragment=function(e,r,i){var n=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||n===Z.NOT_LOADED||n===Z.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):r.live&&!Object(a.a)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=jt):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,i)))},l.completeAudioSwitch=function(){var e=this.hls,r=this.media,i=this.trackId;r&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(n.a.AUDIO_TRACK_SWITCHED,{id:i})},i}(Vt);function he(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function de(t,e){return(de=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ce=function(t){var e,r;function i(e){var r;return(r=t.call(this,e,"[audio-track-controller]")||this).tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.trackName="",r.selectDefaultTrack=!0,r.registerListeners(),r}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,de(e,r);var a,o,l,u=i.prototype;return u.registerListeners=function(){var t=this.hls;t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.a.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(n.a.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(n.a.ERROR,this.onError,this)},u.unregisterListeners=function(){var t=this.hls;t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.a.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(n.a.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(n.a.ERROR,this.onError,this)},u.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,t.prototype.destroy.call(this)},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},u.onManifestParsed=function(t,e){this.tracks=e.audioTracks||[]},u.onAudioTrackLoaded=function(t,e){var r=e.id,i=e.details,a=this.tracksInGroup[r];if(a){var n=a.details;a.details=e.details,this.log("audioTrack "+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,n))}else this.warn("Invalid audio track id "+r)},u.onLevelLoading=function(t,e){this.switchLevel(e.level)},u.onLevelSwitching=function(t,e){this.switchLevel(e.level)},u.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.audioGroupIds){var r=e.audioGroupIds[e.urlId];if(this.groupId!==r){this.groupId=r;var i=this.tracks.filter((function(t){return!r||t.groupId===r}));this.selectDefaultTrack&&!i.some((function(t){return t.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var a={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.a.AUDIO_TRACKS_UPDATED,a),this.selectInitialTrack()}}},u.onError=function(e,r){t.prototype.onError.call(this,e,r),!r.fatal&&r.context&&r.context.type===k.a.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},u.setAudioTrack=function(t){var e=this.tracksInGroup;if(t<0||t>=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var r=e[this.trackId];this.log("Now switching to audio-track index "+t);var i=e[t],a=i.id,s=i.groupId,o=void 0===s?"":s,l=i.name,u=i.type,h=i.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(n.a.AUDIO_TRACK_SWITCHING,{id:a,groupId:o,name:l,type:u,url:h}),!i.details||i.details.live){var d=this.switchParams(i.url,null==r?void 0:r.details);this.loadPlaylist(d)}}},u.selectInitialTrack=function(){this.tracksInGroup;var t=this.trackName,e=this.findTrackId(t)||this.findTrackId();-1!==e?this.setAudioTrack(e):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},u.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r<e.length;r++){var i=e[r];if((!this.selectDefaultTrack||i.default)&&(!t||t===i.name))return i.id}return-1},u.loadPlaylist=function(t){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var r=e.id,i=e.groupId,a=e.url;if(t)try{a=t.addDirectives(a)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(n.a.AUDIO_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},a=i,(o=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1,this.setAudioTrack(t)}}])&&he(a.prototype,o),l&&he(a,l),i}(z);function fe(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ge(t,e){return(ge=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ve=function(t){var e,r;function i(e,r){var i;return(i=t.call(this,e,r,"[subtitle-stream-controller]")||this).levels=[],i.currentTrackId=-1,i.tracksBuffered=[],i._registerListeners(),i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,ge(e,r);var a,s,l,u=i.prototype;return u._registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.ERROR,this.onError,this),t.on(n.a.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(n.a.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.on(n.a.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(n.a.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this)},u._unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.ERROR,this.onError,this),t.off(n.a.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(n.a.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.off(n.a.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(n.a.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this)},u.startLoad=function(){this.stopLoad(),this.state=Ot;var t=this.levels[this.currentTrackId];null!=t&&t.details&&(this.setInterval(500),this.tick())},u.onHandlerDestroyed=function(){this._unregisterListeners(),t.prototype.onHandlerDestroyed.call(this)},u.onSubtitleFragProcessed=function(t,e){var r=e.frag,i=e.success;if(this.fragPrevious=r,this.state=Ot,i){var a=this.tracksBuffered[this.currentTrackId];if(a){for(var n,s=r.start,o=0;o<a.length;o++)if(s>=a[o].start&&s<=a[o].end){n=a[o];break}var l=r.start+r.duration;n?n.end=l:(n={start:s,end:l},a.push(n))}}},u.onError=function(t,e){var r,i=e.frag;i&&i.type===k.b.SUBTITLE&&(null!==(r=this.fragCurrent)&&void 0!==r&&r.loader&&this.fragCurrent.loader.abort(),this.state=Ot)},u.onSubtitleTracksUpdated=function(t,e){var r=this,i=e.subtitleTracks;this.tracksBuffered=[],this.levels=i.map((function(t){return new j(t)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(t){r.tracksBuffered[t.id]=[]})),this.mediaBuffer=null},u.onSubtitleTrackSwitch=function(t,e){if(this.currentTrackId=e.id,this.levels.length&&-1!==this.currentTrackId){var r=this.levels[this.currentTrackId];null!=r&&r.details?(this.mediaBuffer=this.mediaBufferTimeRanges,this.setInterval(500)):this.mediaBuffer=null}else this.clearInterval()},u.onSubtitleTrackLoaded=function(t,e){var r,i=e.id,a=e.details,n=this.currentTrackId,s=this.levels;if(s.length&&a){var o=s[n];if(!(i>=s.length||i!==n)&&o){if(this.mediaBuffer=this.mediaBufferTimeRanges,a.live||null!==(r=o.details)&&void 0!==r&&r.live){if(a.deltaUpdateFailed)return;this.alignPlaylists(a,o.details)}o.details=a,this.levelLastLoaded=i,this.setInterval(500)}}},u._handleFragmentLoadComplete=function(t){var e=t.frag,r=t.payload,i=e.decryptdata,a=this.hls;if(!this.fragContextChanged(e)&&r&&r.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var s=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).then((function(t){var r=performance.now();a.trigger(n.a.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:s,tdecrypt:r}})}))}},u.doTick=function(){if(this.media){if(this.state===Ot){var t,e=this.config,r=this.currentTrackId,i=this.fragmentTracker,a=this.media,s=this.levels;if(!s.length||!s[r]||!s[r].details)return;var l=e.maxBufferHole,u=e.maxFragLookUpTolerance,h=Math.min(e.maxBufferLength,e.maxMaxBufferLength),d=ot.bufferedInfo(this.mediaBufferTimeRanges,a.currentTime,l),c=d.end;if(d.len>h)return;var f,g=s[r].details,v=g.fragments,p=v.length,m=v[p-1].start+v[p-1].duration,y=this.fragPrevious;c<m?(y&&g.hasProgramDateTime&&(f=gt(v,y.endProgramDateTime,u)),f||(f=vt(y,v,c,u))):f=v[p-1],null!==(t=f)&&void 0!==t&&t.encrypted?(o.b.log("Loading key for "+f.sn),this.state=xt,this.hls.trigger(n.a.KEY_LOADING,{frag:f})):f&&i.getState(f)===Z.NOT_LOADED&&this.loadFragment(f,g,c)}}else this.state=Ot},u.loadFragment=function(e,r,i){this.fragCurrent=e,t.prototype.loadFragment.call(this,e,r,i)},a=i,(s=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&fe(a.prototype,s),l&&fe(a,l),i}(Vt);function pe(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function me(t,e){return(me=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ye(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];"subtitles"===i.kind&&i.label&&e.push(t[r])}return e}var Te,Ee=function(t){var e,r;function i(e){var r;return(r=t.call(this,e,"[subtitle-track-controller]")||this).media=null,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.trackChangeListener=function(){return r.onTextTracksChanged()},r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r.subtitleDisplay=!0,r.registerListeners(),r}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,me(e,r);var a,s,o,l=i.prototype;return l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=null,t.prototype.destroy.call(this)},l.registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.a.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(n.a.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(n.a.ERROR,this.onError,this)},l.unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.a.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(n.a.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(n.a.ERROR,this.onError,this)},l.onMediaAttached=function(t,e){var r=this;this.media=e.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?(self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval((function(){r.trackChangeListener()}),500)):this.media.textTracks.addEventListener("change",this.trackChangeListener))},l.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?self.clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),ye(this.media.textTracks).forEach((function(t){x(t)})),this.subtitleTrack=-1,this.media=null)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},l.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},l.onSubtitleTrackLoaded=function(t,e){var r=e.id,i=e.details,a=this.trackId,n=this.tracksInGroup[a];if(n){var s=n.details;n.details=e.details,this.log("subtitle track "+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,s))}else this.warn("Invalid subtitle track id "+r)},l.onLevelLoading=function(t,e){this.switchLevel(e.level)},l.onLevelSwitching=function(t,e){this.switchLevel(e.level)},l.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var r=e.textGroupIds[e.urlId];if(this.groupId!==r){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(t){return!r||t.groupId===r}));this.tracksInGroup=a;var s=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=r;var o={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.a.SUBTITLE_TRACKS_UPDATED,o),-1!==s&&this.setSubtitleTrack(s,i)}}},l.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r<e.length;r++){var i=e[r];if((!this.selectDefaultTrack||i.default)&&(!t||t===i.name))return i.id}return-1},l.onError=function(e,r){t.prototype.onError.call(this,e,r),!r.fatal&&r.context&&r.context.type===k.a.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},l.loadPlaylist=function(t){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var r=e.id,i=e.groupId,a=e.url;if(t)try{a=t.addDirectives(a)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(n.a.SUBTITLE_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},l.toggleTrackModes=function(t){var e=this,r=this.media,i=this.subtitleDisplay,a=this.trackId;if(r){var n=ye(r.textTracks),s=n.filter((function(t){return t.groupId===e.groupId}));if(-1===t)[].slice.call(n).forEach((function(t){t.mode="disabled"}));else{var o=s[a];o&&(o.mode="disabled")}var l=s[t];l&&(l.mode=i?"showing":"hidden")}},l.setSubtitleTrack=function(t,e){var r,i=this.tracksInGroup;if(this.media){if(this.trackId!==t&&this.toggleTrackModes(t),!(this.trackId===t&&(-1===t||null!==(r=i[t])&&void 0!==r&&r.details)||t<-1||t>=i.length)){this.clearTimer();var a=i[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,a){var s=a.id,o=a.groupId,l=void 0===o?"":o,u=a.name,h=a.type,d=a.url;this.hls.trigger(n.a.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:u,type:h,url:d});var c=this.switchParams(a.url,null==e?void 0:e.details);this.loadPlaylist(c)}else this.hls.trigger(n.a.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},l.onTextTracksChanged=function(){if(this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=ye(this.media.textTracks),r=0;r<e.length;r++)if("hidden"===e[r].mode)t=r;else if("showing"===e[r].mode){t=r;break}this.subtitleTrack=t}},a=i,(s=[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var e=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,e)}}])&&pe(a.prototype,s),o&&pe(a,o),i}(z),be=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var r=this.queues[e];r.push(t),1===r.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,r=new Promise((function(t){e=t})),i={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(i,t),r},e.executeNext=function(t){var e=this.buffers,r=this.queues,i=e[t],a=r[t];if(a.length){var n=a[0];try{n.execute()}catch(t){o.b.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(t),i&&i.updating||a.shift()}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}(),Se=Wt(),Le=/([ha]vc.)(?:\.[^.,]+)+/,Ae=function(){function t(t){var e=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=e.hls,r=e.media,i=e.mediaSource;o.b.log("[buffer-controller]: Media source opened"),r&&(e.updateMediaElementDuration(),t.trigger(n.a.MEDIA_ATTACHED,{media:r})),i&&i.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){o.b.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.b.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.BUFFER_RESET,this.onBufferReset,this),t.on(n.a.BUFFER_APPENDING,this.onBufferAppending,this),t.on(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.a.BUFFER_EOS,this.onBufferEos,this),t.on(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(n.a.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(n.a.FRAG_PARSED,this.onFragParsed,this),t.on(n.a.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.BUFFER_RESET,this.onBufferReset,this),t.off(n.a.BUFFER_APPENDING,this.onBufferAppending,this),t.off(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.a.BUFFER_EOS,this.onBufferEos,this),t.off(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(n.a.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(n.a.FRAG_PARSED,this.onFragParsed,this),t.off(n.a.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new be(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var r=2;(e.audio&&!e.video||!e.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,o.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var r=this.media=e.media;if(r&&Se){var i=this.mediaSource=new Se;i.addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(i),this._objectUrl=r.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,r=this._objectUrl;if(e){if(o.b.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){o.b.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(r&&self.URL.revokeObjectURL(r),t.src===r?(t.removeAttribute("src"),t.load()):o.b.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(n.a.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var r=t.sourceBuffer[e];try{r&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(r),t.sourceBuffer[e]=void 0)}catch(t){o.b.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var r=this,i=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(i){var a=r.tracks[t];if(a&&"function"==typeof a.buffer.changeType){var n=e[t],s=n.codec,o=n.levelCodec,l=n.container;if((a.levelCodec||a.codec).replace(Le,"$1")!==(o||s).replace(Le,"$1")){var u=l+";codecs="+(o||s);r.appendChangeType(t,u)}}}else r.pendingTracks[t]=e[t]})),i||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var r=this,i=this.operationQueue,a={execute:function(){var a=r.sourceBuffer[t];a&&(o.b.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),a.changeType(e)),i.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){o.b.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};i.append(a,t)},e.onBufferAppending=function(t,e){var r=this,i=this.hls,a=this.operationQueue,l=this.tracks,u=e.data,h=e.type,d=e.frag,c=e.part,f=e.chunkMeta,g=f.buffering[h],v=self.performance.now();g.start=v;var p=d.stats.buffering,m=c?c.stats.buffering:null;0===p.start&&(p.start=v),m&&0===m.start&&(m.start=v);var y=l.audio,T="audio"===h&&1===f.id&&"audio/mpeg"===(null==y?void 0:y.container),E={execute:function(){if(g.executeStart=self.performance.now(),T){var t=r.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(o.b.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}r.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();g.executeEnd=g.end=t,0===p.first&&(p.first=t),m&&0===m.first&&(m.first=t);var e=r.sourceBuffer,i={};for(var a in e)i[a]=ot.getBuffered(e[a]);r.appendError=0,r.hls.trigger(n.a.BUFFER_APPENDED,{type:h,frag:d,part:c,chunkMeta:f,parent:d.type,timeRanges:i})},onError:function(t){o.b.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:s.b.MEDIA_ERROR,parent:d.type,details:s.a.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=s.a.BUFFER_FULL_ERROR:(r.appendError++,e.details=s.a.BUFFER_APPEND_ERROR,r.appendError>i.config.appendErrorMaxRetry&&(o.b.error("[buffer-controller]: Failed "+i.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),i.trigger(n.a.ERROR,e)}};a.append(E,h)},e.onBufferFlushing=function(t,e){var r=this,i=this.operationQueue,a=function(t){return{execute:r.removeExecutor.bind(r,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(n.a.BUFFER_FLUSHED,{type:t})},onError:function(e){o.b.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?i.append(a(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){i.append(a(t),t)}))},e.onFragParsed=function(t,e){var r=this,i=e.frag,a=e.part,s=[],l=a?a.elementaryStreams:i.elementaryStreams;l[u.a.AUDIOVIDEO]?s.push("audiovideo"):(l[u.a.AUDIO]&&s.push("audio"),l[u.a.VIDEO]&&s.push("video"));0===s.length&&o.b.warn("Fragments must have at least one ElementaryStreamType set. type: "+i.type+" level: "+i.level+" sn: "+i.sn),this.blockBuffers((function(){var t=self.performance.now();i.stats.buffering.end=t,a&&(a.stats.buffering.end=t);var e=a?a.stats:i.stats;r.hls.trigger(n.a.FRAG_BUFFERED,{frag:i,part:a,stats:e,id:i.type})}),s)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var r=this;this.getSourceBufferTypes().reduce((function(t,i){var a=r.sourceBuffer[i];return e.type&&e.type!==i||a&&!a.ended&&(a.ended=!0,o.b.log("[buffer-controller]: "+i+" sourceBuffer now EOS")),t&&!(a&&!a.ended)}),!0)&&this.blockBuffers((function(){var t=r.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var r=e.details;r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,r=this.media,i=this.sourceBuffer;if(r&&null!==e){var s=this.getSourceBufferTypes();if(s.length){var o=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(a.a)(o)&&!(o<0)){var l=r.currentTime,u=e.levelTargetDuration,h=Math.max(o,u),d=Math.floor(l/u)*u-h;s.forEach((function(r){var a=i[r];if(a){var s=ot.getBuffered(a);s.length>0&&d>s.start(0)&&(t.trigger(n.a.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(n.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(n.a.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:r}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,r=this.media,i=this.mediaSource,n=t.fragments[0].start+t.totalduration,s=r.duration,l=Object(a.a)(i.duration)?i.duration:0;t.live&&e.config.liveDurationInfinity?(o.b.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(t)):(n>l&&n>s||!Object(a.a)(s))&&(o.b.log("[buffer-controller]: Updating Media Source duration to "+n.toFixed(3)),i.duration=n)}},e.updateSeekableRange=function(t){var e=this.mediaSource,r=t.fragments;if(r.length&&t.live&&null!=e&&e.setLiveSeekableRange){var i=Math.max(0,r[0].start),a=Math.max(i,i+t.totalduration);e.setLiveSeekableRange(i,a)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,r=this.pendingTracks,i=Object.keys(r).length;if(i&&!t||2===i){this.createSourceBuffers(r),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});a.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var i=0;for(var a in t)if(!e[a]){var l=t[a];if(!l)throw Error("source buffer exists for track "+a+", however track does not");var u=l.levelCodec||l.codec,h=l.container+";codecs="+u;o.b.log("[buffer-controller]: creating sourceBuffer("+h+")");try{var d=e[a]=r.addSourceBuffer(h),c=a;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[a]={buffer:d,codec:u,container:l.container,levelCodec:l.levelCodec,id:l.id},i++}catch(t){o.b.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:h})}}i&&this.hls.trigger(n.a.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){o.b.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(t);r&&r.onError(e)},e.removeExecutor=function(t,e,r){var i=this.media,n=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[t];if(!i||!n||!l)return o.b.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(t);var u=Object(a.a)(i.duration)?i.duration:1/0,h=Object(a.a)(n.duration)?n.duration:1/0,d=Math.max(0,e),c=Math.min(r,u,h);c>d?(o.b.log("[buffer-controller]: Removing ["+d+","+c+"] from the "+t+" SourceBuffer"),l.remove(d,c)):s.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var r=this.operationQueue,i=this.sourceBuffer[e];if(!i)return o.b.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void r.shiftAndExecuteNext(e);i.ended=!1,i.appendBuffer(t)},e.blockBuffers=function(t,e){var r=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return o.b.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var i=this.operationQueue,a=e.map((function(t){return i.appendBlocker(t)}));Promise.all(a).then((function(){t(),e.forEach((function(t){var e=r.sourceBuffer[t];e&&e.updating||i.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,r){var i=this.sourceBuffer[t];if(i){var a=r.bind(this,t);this.listeners[t].push({event:e,listener:a}),i.addEventListener(e,a)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}(),Re={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},De=function(t){var e=t;return Re.hasOwnProperty(t)&&(e=Re[t]),String.fromCharCode(e)},ke={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},_e={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ie={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ce={25:2,26:4,29:6,30:8,31:10,27:13,28:15},we=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(t){t[t.ERROR=0]="ERROR",t[t.TEXT=1]="TEXT",t[t.WARNING=2]="WARNING",t[t.INFO=2]="INFO",t[t.DEBUG=3]="DEBUG",t[t.DATA=3]="DATA"}(Te||(Te={}));var Oe=function(){function t(){this.time=null,this.verboseLevel=Te.ERROR}return t.prototype.log=function(t,e){this.verboseLevel>=t&&o.b.log(this.time+" ["+t+"] "+e)},t}(),xe=function(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].toString(16));return e},Pe=function(){function t(t,e,r,i,a){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=t||"white",this.underline=e||!1,this.italics=r||!1,this.background=i||"black",this.flash=a||!1}var e=t.prototype;return e.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],r=0;r<e.length;r++){var i=e[r];t.hasOwnProperty(i)&&(this[i]=t[i])}},e.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},e.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},e.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),Me=function(){function t(t,e,r,i,a,n){this.uchar=void 0,this.penState=void 0,this.uchar=t||" ",this.penState=new Pe(e,r,i,a,n)}var e=t.prototype;return e.reset=function(){this.uchar=" ",this.penState.reset()},e.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},e.setPenState=function(t){this.penState.copy(t)},e.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},e.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},e.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),Fe=function(){function t(t){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var e=0;e<100;e++)this.chars.push(new Me);this.logger=t,this.pos=0,this.currPenState=new Pe}var e=t.prototype;return e.equals=function(t){for(var e=!0,r=0;r<100;r++)if(!this.chars[r].equals(t.chars[r])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<100;e++)this.chars[e].copy(t.chars[e])},e.isEmpty=function(){for(var t=!0,e=0;e<100;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},e.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(this.logger.log(Te.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(Te.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r<e+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(e)},e.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.insertChar=function(t){t>=144&&this.backSpace();var e=De(t);this.pos>=100?this.logger.log(Te.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,r=0;r<100;r++){var i=this.chars[r].uchar;" "!==i&&(e=!1),t.push(i)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),Ne=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new Fe(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,r=0;r<15;r++)if(!this.rows[r].equals(t.rows[r])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(Te.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(Te.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var r=0;r<15;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){var n=a.rows[i].cueStartTime,s=this.logger.time;if(n&&null!==s&&n<s)for(var o=0;o<this.nrRollUpRows;o++)this.rows[e-this.nrRollUpRows+o+1].copy(a.rows[i+o])}}this.currRow=e;var l=this.rows[this.currRow];if(null!==t.indent){var u=t.indent,h=Math.max(u-1,0);l.setCursor(t.indent),t.color=l.chars[h].penState.foreground}var d={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(d)},e.setBkgData=function(t){this.logger.log(Te.INFO,"bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},e.setRollUpRows=function(t){this.nrRollUpRows=t},e.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(Te.TEXT,this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(Te.INFO,"Rolling up")}else this.logger.log(Te.DEBUG,"roll_up but nrRollUpRows not set yet")},e.getDisplayText=function(t){t=t||!1;for(var e=[],r="",i=-1,a=0;a<15;a++){var n=this.rows[a].getTextString();n&&(i=a+1,t?e.push("Row "+i+": '"+n+"'"):e.push(n.trim()))}return e.length>0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},e.getTextAndFormat=function(){return this.rows},t}(),Ue=function(){function t(t,e,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new Ne(r),this.nonDisplayedMemory=new Ne(r),this.lastOutputScreen=new Ne(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(Te.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(Te.INFO,r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(Te.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.ccRCL=function(){this.logger.log(Te.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.ccBS=function(){this.logger.log(Te.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.ccAOF=function(){},e.ccAON=function(){},e.ccDER=function(){this.logger.log(Te.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.ccRU=function(t){this.logger.log(Te.INFO,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},e.ccFON=function(){this.logger.log(Te.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.ccRDC=function(){this.logger.log(Te.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.ccTR=function(){this.logger.log(Te.INFO,"TR"),this.setMode("MODE_TEXT")},e.ccRTD=function(){this.logger.log(Te.INFO,"RTD"),this.setMode("MODE_TEXT")},e.ccEDM=function(){this.logger.log(Te.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.ccCR=function(){this.logger.log(Te.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.ccENM=function(){this.logger.log(Te.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.ccEOC=function(){if(this.logger.log(Te.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(Te.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.ccTO=function(t){this.logger.log(Te.INFO,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},e.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(Te.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}();function Be(t,e,r){r.a=t,r.b=e}function Ge(t,e,r){return r.a===t&&r.b===e}var Ke=function(){function t(t,e,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var i=new Oe;this.channels=[null,new Ue(t,e,i),new Ue(t+1,r,i)],this.cmdHistory={a:null,b:null},this.logger=i}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var r,i,a,n=!1;this.logger.time=t;for(var s=0;s<e.length;s+=2)if(i=127&e[s],a=127&e[s+1],0!==i||0!==a){if(this.logger.log(Te.DATA,"["+xe([e[s],e[s+1]])+"] -> ("+xe([i,a])+")"),(r=this.parseCmd(i,a))||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r&&(n=this.parseChars(i,a))){var o=this.currentChannel;if(o&&o>0)this.channels[o].insertChars(n);else this.logger.log(Te.WARNING,"No channel found yet. TEXT-MODE?")}r||n||this.logger.log(Te.WARNING,"Couldn't parse cleaned data "+xe([i,a])+" orig: "+xe([e[s],e[s+1]]))}},e.parseCmd=function(t,e){var r=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47)&&!((23===t||31===t)&&e>=33&&e<=35))return!1;if(Ge(t,e,r))return Be(null,null,r),this.logger.log(Te.DEBUG,"Repeated command ("+xe([t,e])+") is dropped"),!0;var i=20===t||21===t||23===t?1:2,a=this.channels[i];return 20===t||21===t||28===t||29===t?32===e?a.ccRCL():33===e?a.ccBS():34===e?a.ccAOF():35===e?a.ccAON():36===e?a.ccDER():37===e?a.ccRU(2):38===e?a.ccRU(3):39===e?a.ccRU(4):40===e?a.ccFON():41===e?a.ccRDC():42===e?a.ccTR():43===e?a.ccRTD():44===e?a.ccEDM():45===e?a.ccCR():46===e?a.ccENM():47===e&&a.ccEOC():a.ccTO(e-32),Be(t,e,r),this.currentChannel=i,!0},e.parseMidrow=function(t,e){var r=0;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currentChannel)return this.logger.log(Te.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[r];return!!i&&(i.ccMIDROW(e),this.logger.log(Te.DEBUG,"MIDROW ("+xe([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var r,i=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127)&&!((16===t||24===t)&&e>=64&&e<=95))return!1;if(Ge(t,e,i))return Be(null,null,i),!0;var a=t<=23?1:2;r=e>=64&&e<=95?1===a?ke[t]:Ie[t]:1===a?_e[t]:Ce[t];var n=this.channels[a];return!!n&&(n.setPAC(this.interpretPAC(r,e)),Be(t,e,i),this.currentChannel=a,!0)},e.interpretPAC=function(t,e){var r,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},e.parseChars=function(t,e){var r,i,a=null,n=null;(t>=25?(r=2,n=t-8):(r=1,n=t),n>=17&&n<=19)?(i=17===n?e+80:18===n?e+112:e+144,this.logger.log(Te.INFO,"Special char '"+De(i)+"' in channel "+r),a=[i]):t>=32&&t<=127&&(a=0===e?[t]:[t,e]);if(a){var s=xe(a);this.logger.log(Te.DEBUG,"Char codes = "+s.join(",")),Be(t,e,this.cmdHistory)}return a},e.parseBackgroundAttributes=function(t,e){var r;if(!((16===t||24===t)&&e>=32&&e<=47)&&!((23===t||31===t)&&e>=45&&e<=47))return!1;var i={};16===t||24===t?(r=Math.floor((e-32)/2),i.background=we[r],e%2==1&&(i.background=i.background+"_semi")):45===e?i.background="transparent":(i.foreground="black",47===e&&(i.underline=!0));var a=t<=23?1:2;return this.channels[a].setBkgData(i),Be(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t<Object.keys(this.channels).length;t++){var e=this.channels[t];e&&e.reset()}this.cmdHistory={a:null,b:null}},e.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++){var r=this.channels[e];r&&r.cueSplitAtTime(t)}},t}(),je=function(){function t(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}var e=t.prototype;return e.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},e.newCue=function(t,e,r){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}(),He=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var t=["","lr","rl"],e=["start","middle","end","left","right"];function r(t,e){if("string"!=typeof e)return!1;if(!Array.isArray(t))return!1;var r=e.toLowerCase();return!!~t.indexOf(r)&&r}function i(t){return r(e,t)}function a(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var s in n)t[s]=n[s]}return t}function n(e,n,s){var o=this,l={enumerable:!0};o.hasBeenReset=!1;var u="",h=!1,d=e,c=n,f=s,g=null,v="",p=!0,m="auto",y="start",T=50,E="middle",b=50,S="middle";Object.defineProperty(o,"id",a({},l,{get:function(){return u},set:function(t){u=""+t}})),Object.defineProperty(o,"pauseOnExit",a({},l,{get:function(){return h},set:function(t){h=!!t}})),Object.defineProperty(o,"startTime",a({},l,{get:function(){return d},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");d=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",a({},l,{get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");c=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",a({},l,{get:function(){return f},set:function(t){f=""+t,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",a({},l,{get:function(){return g},set:function(t){g=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",a({},l,{get:function(){return v},set:function(e){var i=function(e){return r(t,e)}(e);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");v=i,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",a({},l,{get:function(){return p},set:function(t){p=!!t,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",a({},l,{get:function(){return m},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",a({},l,{get:function(){return y},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",a({},l,{get:function(){return T},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",a({},l,{get:function(){return E},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",a({},l,{get:function(){return b},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",a({},l,{get:function(){return S},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");S=e,this.hasBeenReset=!0}})),o.displayState=void 0}return n.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},n}(),Ve=function(){function t(){}return t.prototype.decode=function(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))},t}();function We(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+parseFloat(i||0)}var r=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}var Ye=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,r){for(var i=0;i<r.length;++i)if(e===r[i]){this.set(t,e);break}},e.integer=function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},e.percent=function(t,e){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(e)){var r=parseFloat(e);if(r>=0&&r<=100)return this.set(t,r),!0}return!1},t}();function qe(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var s=a[n].split(r);if(2===s.length)e(s[0],s[1])}}var Xe=new He(0,0,""),ze="middle"===Xe.align?"middle":"center";function Qe(t,e,r){var i=t;function a(){var e=We(t);if(null===e)throw new Error("Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function n(){t=t.replace(/^\s+/,"")}if(n(),e.startTime=a(),n(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),n(),e.endTime=a(),n(),function(t,e){var i=new Ye;qe(t,(function(t,e){var a;switch(t){case"region":for(var n=r.length-1;n>=0;n--)if(r[n].id===e){i.set(t,r[n].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":a=e.split(","),i.integer(t,a[0]),i.percent(t,a[0])&&i.set("snapToLines",!1),i.alt(t,a[0],["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",ze,"end"]);break;case"position":a=e.split(","),i.percent(t,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",ze,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",ze,"end","left","right"])}}),/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===Xe.line&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",ze);var n=i.get("position","auto");"auto"===n&&50===Xe.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}(t,e)}function $e(t){return t.replace(/<br(?: \/)?>/gi,"\n")}var Je=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new Ve,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function r(){var t=e.buffer,r=0;for(t=$e(t);r<t.length&&"\r"!==t[r]&&"\n"!==t[r];)++r;var i=t.substr(0,r);return"\r"===t[r]&&++r,"\n"===t[r]&&++r,e.buffer=t.substr(r),i}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var i="";if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var a=(i=r()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var n=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(n?n=!1:i=r(),e.state){case"HEADER":/:/.test(i)?qe(i,(function(t,e){}),/:/):i||(e.state="ID");continue;case"NOTE":i||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){e.state="NOTE";break}if(!i)continue;if(e.cue=new He(0,0,""),e.state="CUE",-1===i.indexOf("--\x3e")){e.cue.id=i;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{Qe(i,e.cue,e.regionList)}catch(t){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(n=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(null===e.cue)continue;e.cue.text&&(e.cue.text+="\n"),e.cue.text+=i;continue;case"BADCUE":i||(e.state="ID")}}}catch(t){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},e.flush=function(){try{if((this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state||"BADWEBVTT"===this.state)throw new Error("Malformed WebVTT signature.")}catch(t){this.onparsingerror&&this.onparsingerror(t)}return this.onflush&&this.onflush(),this},t}(),Ze=r(8),tr=r(16),er=/\r\n|\n\r|\n|\r/g,rr=function(t,e,r){return void 0===r&&(r=0),t.substr(r,e.length)===e},ir=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()};function ar(t,e,r){return ir(t.toString())+ir(e.toString())+ir(r)}function nr(t,e,r,i,n,s,o,l){var u,h=new Je,d=Object(M.f)(new Uint8Array(t)).trim().replace(er,"\n").split("\n"),c=[],f=Object(Ze.a)(e,r),g="00:00.000",v=0,p=0,m=!0,y=!1;h.oncue=function(t){var e=i[n],r=i.ccOffset,a=(v-f)/9e4;if(null!=e&&e.new&&(void 0!==p?r=i.ccOffset=e.start:function(t,e,r){var i=t[e],a=t[i.prevCC];if(!a||!a.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;null!==(n=a)&&void 0!==n&&n.new;){var n;t.ccOffset+=i.start-a.start,i.new=!1,a=t[(i=a).prevCC]}t.presentationOffset=r}(i,n,a)),a&&(r=a-i.presentationOffset),y){var o=t.endTime-t.startTime,l=Object(tr.b)(9e4*(t.startTime+r-p),9e4*s)/9e4;t.startTime=l,t.endTime=l+o}var u=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(u)),t.id||(t.id=ar(t.startTime,t.endTime,u)),t.endTime>0&&c.push(t)},h.onparsingerror=function(t){u=t},h.onflush=function(){u?l(u):o(c)},d.forEach((function(t){if(m){if(rr(t,"X-TIMESTAMP-MAP=")){m=!1,y=!0,t.substr(16).split(",").forEach((function(t){rr(t,"LOCAL:")?g=t.substr(6):rr(t,"MPEGTS:")&&(v=parseInt(t.substr(7)))}));try{p=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),n=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(a.a)(e)&&Object(a.a)(r)&&Object(a.a)(i)&&Object(a.a)(n)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*r,e+=6e4*i,e+=36e5*n}(g)/1e3}catch(t){y=!1,u=t}return}""===t&&(m=!1)}h.parse(t+"\n")})),h.flush()}function sr(){return(sr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}var or=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,lr=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ur={left:"start",center:"center",right:"end",start:"start",end:"end"};function hr(t,e,r,i,a){var n=Object(l.b)(new Uint8Array(t),["mdat"]);if(0!==n.length){var s=n[0],o=Object(M.f)(new Uint8Array(t,s.start,s.end-s.start)),u=Object(Ze.c)(e,1,r);try{i(function(t,e){var r=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");var i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(i).reduce((function(t,e){return t[e]=r.getAttribute("ttp:"+e)||i[e],t}),{}),n="preserve"!==r.getAttribute("xml:space"),s=cr(dr(r,"styling","style")),o=cr(dr(r,"layout","region")),l=dr(r,"body","[begin]");return[].map.call(l,(function(t){var r=function t(e,r){return[].slice.call(e.childNodes).reduce((function(e,i,a){var n;return"br"===i.nodeName&&a?e+"\n":null!==(n=i.childNodes)&&void 0!==n&&n.length?t(i,r):r?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent}),"")}(t,n);if(!r||!t.hasAttribute("begin"))return null;var i=vr(t.getAttribute("begin"),a),l=vr(t.getAttribute("dur"),a),u=vr(t.getAttribute("end"),a);if(null===i)throw gr(t);if(null===u){if(null===l)throw gr(t);u=i+l}var h=new He(i-e,u-e,r);h.id=ar(h.startTime,h.endTime,h.text);var d=o[t.getAttribute("region")],c=s[t.getAttribute("style")];h.position=10,h.size=80;var f=function(t,e){var r="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(i,a){var n=fr(e,r,a)||fr(t,r,a);return n&&(i[a]=n),i}),{})}(d,c),g=f.textAlign;if(g){var v=ur[g];v&&(h.lineAlign=v),h.align=g}return sr(h,f),h})).filter((function(t){return null!==t}))}(o,u))}catch(t){a(t)}}else a(new Error("Could not parse IMSC1 mdat"))}function dr(t,e,r){var i=t.getElementsByTagName(e)[0];return i?[].slice.call(i.querySelectorAll(r)):[]}function cr(t){return t.reduce((function(t,e){var r=e.getAttribute("xml:id");return r&&(t[r]=e),t}),{})}function fr(t,e,r){return t.hasAttributeNS(e,r)?t.getAttributeNS(e,r):null}function gr(t){return new Error("Could not parse ttml timestamp "+t)}function vr(t,e){if(!t)return null;var r=We(t);return null===r&&(or.test(t)?r=function(t,e){var r=or.exec(t),i=(0|r[4])+(0|r[5])/e.subFrameRate;return 3600*(0|r[1])+60*(0|r[2])+(0|r[3])+i/e.frameRate}(t,e):lr.test(t)&&(r=function(t,e){var r=lr.exec(t),i=Number(r[1]);switch(r[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}(t,e))),r}var pr=function(){function t(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var e=new je(this,"textTrack1"),r=new je(this,"textTrack2"),i=new je(this,"textTrack3"),a=new je(this,"textTrack4");this.cea608Parser1=new Ke(1,e,r),this.cea608Parser2=new Ke(3,i,a)}t.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(n.a.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(n.a.FRAG_LOADING,this.onFragLoading,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this),t.on(n.a.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(n.a.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(n.a.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(n.a.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this)}var e=t.prototype;return e.destroy=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(n.a.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(n.a.FRAG_LOADING,this.onFragLoading,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this),t.off(n.a.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(n.a.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(n.a.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(n.a.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},e.addCues=function(t,e,r,i,a){for(var s,o,l,u,h=!1,d=a.length;d--;){var c=a[d],f=(s=c[0],o=c[1],l=e,u=r,Math.min(o,u)-Math.max(s,l));if(f>=0&&(c[0]=Math.min(c[0],e),c[1]=Math.max(c[1],r),h=!0,f/(r-e)>.5))return}if(h||a.push([e,r]),this.config.renderTextTracksNatively){var g=this.captionsTracks[t];this.Cues.newCue(g,e,r,i)}else{var v=this.Cues.newCue(null,e,r,i);this.hls.trigger(n.a.CUES_PARSED,{type:"captions",cues:v,track:t})}},e.onInitPtsFound=function(t,e){var r=this,i=e.frag,a=e.id,s=e.initPTS,o=e.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[i.cc]=s,this.timescale[i.cc]=o),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){r.onFragLoaded(n.a.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r<e.textTracks.length;r++){var i=e.textTracks[r];if(i[t])return i}return null},e.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},e.createNativeTrack=function(t){if(!this.captionsTracks[t]){var e=this.captionsProperties,r=this.captionsTracks,i=this.media,a=e[t],n=a.label,s=a.languageCode,o=this.getExistingTrack(t);if(o)r[t]=o,x(r[t]),w(r[t],i);else{var l=this.createTextTrack("captions",n,s);l&&(l[t]=!0,r[t]=l)}}},e.createNonNativeTrack=function(t){if(!this.nonNativeCaptionsTracks[t]){var e=this.captionsProperties[t];if(e){var r={_id:t,label:e.label,kind:"captions",default:!!e.media&&!!e.media.default,closedCaptions:e.media};this.nonNativeCaptionsTracks[t]=r,this.hls.trigger(n.a.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}}},e.createTextTrack=function(t,e,r){var i=this.media;if(i)return i.addTextTrack(t,e,r)},e.onMediaAttaching=function(t,e){this.media=e.media,this._cleanTracks()},e.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach((function(e){x(t[e]),delete t[e]})),this.nonNativeCaptionsTracks={}},e.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},e._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var r=0;r<e.length;r++)x(e[r])}},e.onSubtitleTracksUpdated=function(t,e){var r=this;this.textTracks=[];var i=e.subtitleTracks||[],a=i.some((function(t){return"stpp.ttml.im1t"===t.textCodec}));if(this.config.enableWebVTT||a&&this.config.enableIMSC1){var s=this.tracks&&i&&this.tracks.length===i.length;if(this.tracks=i||[],this.config.renderTextTracksNatively){var o=this.media?this.media.textTracks:[];this.tracks.forEach((function(t,e){var i;if(e<o.length){for(var a=null,n=0;n<o.length;n++)if(mr(o[n],t)){a=o[n];break}a&&(i=a)}i?x(i):(i=r.createTextTrack("subtitles",t.name,t.lang))&&(i.mode="disabled"),i&&(i.groupId=t.groupId,r.textTracks.push(i))}))}else if(!s&&this.tracks&&this.tracks.length){var l=this.tracks.map((function(t){return{label:t.name,kind:t.type.toLowerCase(),default:t.default,subtitleTrack:t}}));this.hls.trigger(n.a.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},e.onManifestLoaded=function(t,e){var r=this;this.config.enableCEA708Captions&&e.captions&&e.captions.forEach((function(t){var e=/(?:CC|SERVICE)([1-4])/.exec(t.instreamId);if(e){var i="textTrack"+e[1],a=r.captionsProperties[i];a&&(a.label=t.name,t.lang&&(a.languageCode=t.lang),a.media=t)}}))},e.onFragLoading=function(t,e){var r=this.cea608Parser1,i=this.cea608Parser2,a=this.lastSn;if(this.enabled&&r&&i&&e.frag.type===k.b.MAIN){var n=e.frag.sn;n!==a+1&&(r.reset(),i.reset()),this.lastSn=n}},e.onFragLoaded=function(t,e){var r=e.frag,i=e.payload,s=this.initPTS,o=this.unparsedVttFrags;if(r.type===k.b.SUBTITLE)if(i.byteLength){if(!Object(a.a)(s[r.cc]))return o.push(e),void(s.length&&this.hls.trigger(n.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Missing initial subtitle PTS")}));var l=r.decryptdata;if(null==l||null==l.key||"AES-128"!==l.method){var u=this.tracks[r.level],h=this.vttCCs;h[r.cc]||(h[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),u&&"stpp.ttml.im1t"===u.textCodec?this._parseIMSC1(r,i):this._parseVTTs(r,i,h)}}else this.hls.trigger(n.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})},e._parseIMSC1=function(t,e){var r=this,i=this.hls;hr(e,this.initPTS[t.cc],this.timescale[t.cc],(function(e){r._appendCues(e,t.level),i.trigger(n.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(e){o.b.log("Failed to parse IMSC1: "+e),i.trigger(n.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:e})}))},e._parseVTTs=function(t,e,r){var i=this,a=this.hls;nr(e,this.initPTS[t.cc],this.timescale[t.cc],r,t.cc,t.start,(function(e){i._appendCues(e,t.level),a.trigger(n.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(r){i._fallbackToIMSC1(t,e),o.b.log("Failed to parse VTT cue: "+r),a.trigger(n.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:r})}))},e._fallbackToIMSC1=function(t,e){var r=this,i=this.tracks[t.level];i.textCodec||hr(e,this.initPTS[t.cc],this.timescale[t.cc],(function(){i.textCodec="stpp.ttml.im1t",r._parseIMSC1(t,e)}),(function(){i.textCodec="wvtt"}))},e._appendCues=function(t,e){var r=this.hls;if(this.config.renderTextTracksNatively){var i=this.textTracks[e];if("disabled"===i.mode)return;t.forEach((function(t){return O(i,t)}))}else{var a=this.tracks[e].default?"default":"subtitles"+e;r.trigger(n.a.CUES_PARSED,{type:"subtitles",cues:t,track:a})}},e.onFragDecrypted=function(t,e){var r=e.frag;if(r.type===k.b.SUBTITLE){if(!Object(a.a)(this.initPTS[r.cc]))return void this.unparsedVttFrags.push(e);this.onFragLoaded(n.a.FRAG_LOADED,e)}},e.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},e.onFragParsingUserdata=function(t,e){var r=this.cea608Parser1,i=this.cea608Parser2;if(this.enabled&&r&&i)for(var a=0;a<e.samples.length;a++){var n=e.samples[a].bytes;if(n){var s=this.extractCea608Data(n);r.addData(e.samples[a].pts,s[0]),i.addData(e.samples[a].pts,s[1])}}},e.onBufferFlushing=function(t,e){var r=e.startOffset,i=e.endOffset,a=e.type;if(!a||"video"===a){var n=this.media;if(!n||n.currentTime<i)return;var s=this.captionsTracks;Object.keys(s).forEach((function(t){return P(s[t],r,i)}))}},e.extractCea608Data=function(t){for(var e=31&t[0],r=2,i=[[],[]],a=0;a<e;a++){var n=t[r++],s=127&t[r++],o=127&t[r++],l=3&n;0===s&&0===o||0!=(4&n)&&(0!==l&&1!==l||(i[l].push(s),i[l].push(o)))}return i},t}();function mr(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function yr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Tr,Er=function(){function t(t){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=t,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e,r,i,a=t.prototype;return a.setStreamController=function(t){this.streamController=t},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var t=this.hls;t.on(n.a.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var t=this.hls;t.off(n.a.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(e,r){t.isLevelAllowed(r.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(r.droppedLevel)},a.onMediaAttaching=function(t,e){this.media=e.media instanceof HTMLVideoElement?e.media:null},a.onManifestParsed=function(t,e){var r=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,r.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onBufferCodecs=function(t,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},a.getMaxLevel=function(e){var r=this,i=this.hls.levels;if(!i.length)return-1;var a=i.filter((function(i,a){return t.isLevelAllowed(a,r.restrictedLevels)&&a<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},a.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var r=t.getBoundingClientRect();e.width=r.width,e.height=r.height,e.width||e.height||(e.width=r.right-r.left||t.width||0,e.height=r.bottom-r.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,r){if(!t||!t.length)return-1;for(var i,a,n=t.length-1,s=0;s<t.length;s+=1){var o=t[s];if((o.width>=e||o.height>=r)&&(i=o,!(a=t[s+1])||i.width!==a.width||i.height!==a.height)){n=s;break}}return n},e=t,i=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&yr(e.prototype,r),i&&yr(e,i),t}(),br=function(){function t(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var r=this.hls.config;if(r.capLevelOnFPSDrop){var i=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=i,i&&"function"==typeof i.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,r){var i=performance.now();if(e){if(this.lastTime){var a=i-this.lastTime,s=r-this.lastDroppedFrames,l=e-this.lastDecodedFrames,u=1e3*s/a,h=this.hls;if(h.trigger(n.a.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:r}),u>0&&s>h.config.fpsDroppedMonitoringThreshold*l){var d=h.currentLevel;o.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===h.autoLevelCapping||h.autoLevelCapping>=d)&&(d-=1,h.trigger(n.a.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:h.currentLevel}),h.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();!function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(Tr||(Tr={}));var Sr="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function Lr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Ar=function(){function t(t){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=t,this._config=t.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var e,r,i,a=t.prototype;return a.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},a._registerListeners=function(){this.hls.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.a.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this)},a._unregisterListeners=function(){this.hls.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(n.a.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this)},a.getLicenseServerUrl=function(t){switch(t){case Tr.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+t+'"')},a._attemptKeySystemAccess=function(t,e,r){var i=this,a=function(t,e,r,i){switch(t){case Tr.WIDEVINE:return function(t,e,r){var i={audioCapabilities:[],videoCapabilities:[]};return t.forEach((function(t){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:r.audioRobustness||""})})),e.forEach((function(t){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:r.videoRobustness||""})})),[i]}(e,r,i);default:throw new Error("Unknown key-system: "+t)}}(t,e,r,this._drmSystemOptions);o.b.log("Requesting encrypted media key-system access");var n=this.requestMediaKeySystemAccess(t,a);this.mediaKeysPromise=n.then((function(e){return i._onMediaKeySystemAccessObtained(t,e)})),n.catch((function(e){o.b.error('Failed to obtain key-system "'+t+'" access:',e)}))},a._onMediaKeySystemAccessObtained=function(t,e){var r=this;o.b.log('Access for key-system "'+t+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(i);var a=Promise.resolve().then((function(){return e.createMediaKeys()})).then((function(e){return i.mediaKeys=e,o.b.log('Media-keys created for key-system "'+t+'"'),r._onMediaKeysCreated(),e}));return a.catch((function(t){o.b.error("Failed to create media-keys:",t)})),a},a._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach((function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))}))},a._onNewMediaKeySession=function(t){var e=this;o.b.log("New key-system session "+t.sessionId),t.addEventListener("message",(function(r){e._onKeySessionMessage(t,r.message)}),!1)},a._onKeySessionMessage=function(t,e){o.b.log("Got EME message event, creating license request"),this._requestLicense(e,(function(e){o.b.log("Received license data (length: "+(e?e.byteLength:e)+"), updating key-session"),t.update(e)}))},a.onMediaEncrypted=function(t){var e=this;if(o.b.log('Media is encrypted using "'+t.initDataType+'" init data type'),!this.mediaKeysPromise)return o.b.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_KEYS,fatal:!0});var r=function(r){e._media&&(e._attemptSetMediaKeys(r),e._generateRequestWithPreferredKeySession(t.initDataType,t.initData))};this.mediaKeysPromise.then(r).catch(r)},a._attemptSetMediaKeys=function(t){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return o.b.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_KEYS,fatal:!0});o.b.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},a._generateRequestWithPreferredKeySession=function(t,e){var r=this,i=this._mediaKeysList[0];if(!i)return o.b.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(i.mediaKeysSessionInitialized)o.b.warn("Key-Session already initialized but requested again");else{var a=i.mediaKeysSession;if(!a)return o.b.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!e)return o.b.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});o.b.log('Generating key-session request for "'+t+'" init data type'),i.mediaKeysSessionInitialized=!0,a.generateRequest(t,e).then((function(){o.b.debug("Key-session generation succeeded")})).catch((function(t){o.b.error("Error generating key-session request:",t),r.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},a._createLicenseXhr=function(t,e,r){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,t,e,r);var a=this._licenseXhrSetup;if(a)try{a.call(this.hls,i,t),a=void 0}catch(t){o.b.error(t)}try{i.readyState||i.open("POST",t,!0),a&&a.call(this.hls,i,t)}catch(t){throw new Error("issue setting up KeySystem license XHR "+t)}return i},a._onLicenseRequestReadyStageChange=function(t,e,r,i){switch(t.readyState){case 4:if(200===t.status){this._requestLicenseFailureCount=0,o.b.log("License request succeeded");var a=t.response,l=this._licenseResponseCallback;if(l)try{a=l.call(this.hls,t,e)}catch(t){o.b.error(t)}i(a)}else{if(o.b.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var u=3-this._requestLicenseFailureCount+1;o.b.warn("Retrying license request, "+u+" attempts left"),this._requestLicense(r,i)}}},a._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case Tr.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},a._requestLicense=function(t,e){o.b.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return o.b.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var i=this.getLicenseServerUrl(r.mediaKeySystemDomain),a=this._createLicenseXhr(i,t,e);o.b.log("Sending license request to URL: "+i);var l=this._generateLicenseRequestChallenge(r,t);a.send(l)}catch(t){o.b.error("Failure requesting DRM license: "+t),this.hls.trigger(n.a.ERROR,{type:s.b.KEY_SYSTEM_ERROR,details:s.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},a.onMediaAttached=function(t,e){if(this._emeEnabled){var r=e.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)}},a.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},a.onManifestParsed=function(t,e){if(this._emeEnabled){var r=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),i=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(Tr.WIDEVINE,r,i)}},e=t,(r=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&Lr(e.prototype,r),i&&Lr(e,i),t}(),Rr=r(12),Dr=/^age:\s*[\d.]+\s*$/m,kr=function(){function t(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=t?t.xhrSetup:null,this.stats=new Rr.a,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=r,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var a=this.xhrSetup;try{if(a)try{a(r,e.url)}catch(t){r.open("GET",e.url,!0),a(r,e.url)}r.readyState||r.open("GET",e.url,!0)}catch(t){return void this.callbacks.onError({code:r.status,text:t.message},e,r)}e.rangeEnd&&r.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,r=this.stats;if(t&&e){var i=e.readyState,a=this.config;if(!r.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===i){e.onreadystatechange=null,e.onprogress=null;var n=e.status;if(n>=200&&n<300){var s,l;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),l="arraybuffer"===t.responseType?(s=e.response).byteLength:(s=e.responseText).length,r.loaded=r.total=l,!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(r,t,s,e),!this.callbacks)return;var h={url:e.responseURL,data:s};this.callbacks.onSuccess(h,r,t,e)}else r.retry>=a.maxRetry||n>=400&&n<499?(o.b.error(n+" while loading "+t.url),this.callbacks.onError({code:n,text:e.statusText},t,e)):(o.b.warn(n+" while loading "+t.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},e.loadtimeout=function(){o.b.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&Dr.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();function _r(t){var e="function"==typeof Map?new Map:void 0;return(_r=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return Ir(t,arguments,Or(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),wr(i,t)})(t)}function Ir(t,e,r){return(Ir=Cr()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return r&&wr(a,r.prototype),a}).apply(null,arguments)}function Cr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function wr(t,e){return(wr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Or(t){return(Or=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xr=function(){function t(t){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||Pr,this.controller=new self.AbortController,this.stats=new Rr.a}var e=t.prototype;return e.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},e.abortInternal=function(){var t=this.response;t&&t.ok||(this.stats.aborted=!0,this.controller.abort())},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},e.load=function(t,e,r){var i=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var s=function(t,e){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:e};t.rangeEnd&&(r.headers=new self.Headers({Range:"bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)}));return r}(t,this.controller.signal),o=r.onProgress,l="arraybuffer"===t.responseType,u=l?"byteLength":"length";this.context=t,this.config=e,this.callbacks=r,this.request=this.fetchSetup(t,s),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),r.onTimeout(n,t,i.response)}),e.timeout),self.fetch(this.request).then((function(r){if(i.response=i.loader=r,!r.ok){var s=r.status,u=r.statusText;throw new Mr(u||"fetch, bad network response",s,r)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(r.headers.get("Content-Length")||"0"),o&&Object(a.a)(e.highWaterMark)?i.loadProgressively(r,n,t,e.highWaterMark,o):l?r.arrayBuffer():r.text()})).then((function(s){var l=i.response;self.clearTimeout(i.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=s[u];var h={url:l.url,data:s};o&&!Object(a.a)(e.highWaterMark)&&o(n,t,s,l),r.onSuccess(h,n,t,l)})).catch((function(e){if(self.clearTimeout(i.requestTimeout),!n.aborted){var a=e.code||0;r.onError({code:a,text:e.message},t,e.details)}}))},e.getCacheAge=function(){var t=null;if(this.response){var e=this.response.headers.get("age");t=e?parseFloat(e):null}return t},e.loadProgressively=function(t,e,r,i,a){void 0===i&&(i=0);var n=new se.a,s=t.body.getReader();return function o(){return s.read().then((function(s){if(s.done)return n.dataLength&&a(e,r,n.flush(),t),Promise.resolve(new ArrayBuffer(0));var l=s.value,u=l.length;return e.loaded+=u,u<i||n.dataLength?(n.push(l),n.dataLength>=i&&a(e,r,n.flush(),t)):a(e,r,l,t),o()})).catch((function(){return Promise.reject()}))}()},t}();function Pr(t,e){return new self.Request(t.url,e)}var Mr=function(t){var e,r;function i(e,r,i){var a;return(a=t.call(this,e)||this).code=void 0,a.details=void 0,a.code=r,a.details=i,a}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,wr(e,r),i}(_r(Error)),Fr=xr,Nr=/\s/;function Ur(){return(Ur=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function Br(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Gr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Br(Object(r),!0).forEach((function(e){Kr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Br(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Kr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jr=Gr(Gr({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:kr,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:ne,bufferController:Ae,capLevelController:Er,fpsController:br,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:Sr,testBandwidth:!0,progressive:!1,lowLatencyMode:!0},{cueHandler:{newCue:function(t,e,r,i){for(var a,n,s,o,l,u=[],h=self.VTTCue||self.TextTrackCue,d=0;d<i.rows.length;d++)if(s=!0,o=0,l="",!(a=i.rows[d]).isEmpty()){for(var c=0;c<a.chars.length;c++)Nr.test(a.chars[c].uchar)&&s?o++:(l+=a.chars[c].uchar,s=!1);a.cueStartTime=e,e===r&&(r+=1e-4),o>=16?o--:o++;var f=$e(l.trim()),g=ar(e,r,f);t&&t.cues&&t.cues.getCueById(g)||((n=new h(e,r,f)).id=g,n.line=d+1,n.align="left",n.position=10+Math.min(80,10*Math.floor(8*o/32)),u.push(n))}return t&&u.length&&(u.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),u.forEach((function(e){return O(t,e)}))),u}},enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:ve,subtitleTrackController:Ee,timelineController:pr,audioStreamController:ue,audioTrackController:ce,emeController:Ar});function Hr(t){var e=t.loader;e!==Fr&&e!==kr?(o.b.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}()&&(t.loader=Fr,t.progressive=!0,t.enableSoftwareAES=!0,o.b.log("[config]: Progressive streaming enabled, using FetchLoader"))}function Vr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Wr=function(){function t(e){void 0===e&&(e={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new zt.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this._media=null,this.url=null;var r=this.config=function(t,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==e.liveMaxLatencyDurationCount&&(void 0===e.liveSyncDurationCount||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(void 0===e.liveSyncDuration||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return Ur({},t,e)}(t.DefaultConfig,e);this.userConfig=e,Object(o.a)(r.debug),this._autoLevelCapping=-1,r.progressive&&Hr(r);var i=r.abrController,a=r.bufferController,n=r.capLevelController,s=r.fpsController,l=this.abrController=new i(this),u=this.bufferController=new a(this),h=this.capLevelController=new n(this),d=new s(this),c=new I(this),f=new C(this),g=new F(this),v=this.levelController=new et(this),p=new rt(this),m=this.streamController=new ee(this,p);h.setStreamController(m),d.setStreamController(m);var y=[v,m];this.networkControllers=y;var T=[c,f,l,u,h,d,g,p];this.audioTrackController=this.createController(r.audioTrackController,null,y),this.createController(r.audioStreamController,p,y),this.subtitleTrackController=this.createController(r.subtitleTrackController,null,y),this.createController(r.subtitleStreamController,p,y),this.createController(r.timelineController,null,T),this.emeController=this.createController(r.emeController,null,T),this.latencyController=this.createController(B,null,T),this.coreComponents=T}t.isSupported=function(){return function(){var t=Wt();if(!t)return!1;var e=Yt(),r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!i}()};var e,r,a,l=t.prototype;return l.createController=function(t,e,r){if(t){var i=e?new t(this,e):new t(this);return r&&r.push(i),i}return null},l.on=function(t,e,r){void 0===r&&(r=this),this._emitter.on(t,e,r)},l.once=function(t,e,r){void 0===r&&(r=this),this._emitter.once(t,e,r)},l.removeAllListeners=function(t){this._emitter.removeAllListeners(t)},l.off=function(t,e,r,i){void 0===r&&(r=this),this._emitter.off(t,e,r,i)},l.listeners=function(t){return this._emitter.listeners(t)},l.emit=function(t,e,r){return this._emitter.emit(t,e,r)},l.trigger=function(t,e){if(this.config.debug)return this.emit(t,t,e);try{return this.emit(t,t,e)}catch(e){o.b.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.trigger(n.a.ERROR,{type:s.b.OTHER_ERROR,details:s.a.INTERNAL_EXCEPTION,fatal:!1,event:t,error:e})}return!1},l.listenerCount=function(t){return this._emitter.listenerCount(t)},l.destroy=function(){o.b.log("destroy"),this.trigger(n.a.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(t){return t.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(t){return t.destroy()})),this.coreComponents.length=0},l.attachMedia=function(t){o.b.log("attachMedia"),this._media=t,this.trigger(n.a.MEDIA_ATTACHING,{media:t})},l.detachMedia=function(){o.b.log("detachMedia"),this.trigger(n.a.MEDIA_DETACHING,void 0),this._media=null},l.loadSource=function(t){this.stopLoad();var e=this.media,r=this.url,a=this.url=i.buildAbsoluteURL(self.location.href,t,{alwaysNormalize:!0});o.b.log("loadSource:"+a),e&&r&&r!==a&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(e)),this.trigger(n.a.MANIFEST_LOADING,{url:t})},l.startLoad=function(t){void 0===t&&(t=-1),o.b.log("startLoad("+t+")"),this.networkControllers.forEach((function(e){e.startLoad(t)}))},l.stopLoad=function(){o.b.log("stopLoad"),this.networkControllers.forEach((function(t){t.stopLoad()}))},l.swapAudioCodec=function(){o.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},l.recoverMediaError=function(){o.b.log("recoverMediaError");var t=this._media;this.detachMedia(),t&&this.attachMedia(t)},l.removeLevel=function(t,e){void 0===e&&(e=0),this.levelController.removeLevel(t,e)},e=t,a=[{key:"version",get:function(){return"1.0.4"}},{key:"Events",get:function(){return n.a}},{key:"ErrorTypes",get:function(){return s.b}},{key:"ErrorDetails",get:function(){return s.a}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:jr},set:function(e){t.defaultConfig=e}}],(r=[{key:"levels",get:function(){var t=this.levelController.levels;return t|