/**
* @license
* Video.js 7.15.4
* Copyright Brightcove, Inc.
* Available under Apache License Version 2.0
*
*
* Includes vtt.js
* Available under Apache License Version 2.0
*
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojs=t()}(this,function(){"use strict";var l="7.15.4",e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}for(var n,h="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},i={},s=function(e,t){return i[e]=i[e]||[],t&&(i[e]=i[e].concat(t)),i[e]},r=function(e,t){t=s(e).indexOf(t);return!(t<=-1)&&(i[e]=i[e].slice(),i[e].splice(t,1),!0)},o="undefined"!=typeof e?e:"undefined"!=typeof window?window:{},a="undefined"!=typeof document?document:(a=o["__GLOBAL_DOCUMENT_CACHE@4"])||(o["__GLOBAL_DOCUMENT_CACHE@4"]={}),d=a,c={prefixed:!0},u=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],p=u[0],f=0;f
* Copyright (c) 2014 David Björklund
* Available under the MIT license
*
*/
var Qt=function(e){var i={};return e&&e.trim().split("\n").forEach(function(e){var t=e.indexOf(":"),n=e.slice(0,t).trim().toLowerCase(),t=e.slice(t+1).trim();"undefined"==typeof i[n]?i[n]=t:Array.isArray(i[n])?i[n].push(t):i[n]=[i[n],t]}),i},Jt=en,A=en;function Zt(e,t,n){var i=e;return $t(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=b({},t,{uri:e}),i.callback=n,i}function en(e,t,n){return tn(t=Zt(e,t,n))}function tn(i){if("undefined"==typeof i.callback)throw new Error("callback argument missing");var r=!1,s=function(e,t,n){r||(r=!0,i.callback(e,t,n))};function o(){var e=void 0,e=c.response||c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c);if(v)try{e=JSON.parse(e)}catch(e){}return e}function t(e){return clearTimeout(l),(e=!(e instanceof Error)?new Error(""+(e||"Unknown XMLHttpRequest Error")):e).statusCode=0,s(e,g)}function e(){if(!a){clearTimeout(l);var e=i.useXDR&&void 0===c.status?200:1223===c.status?204:c.status,t=g,n=null;return 0!==e?(t={body:o(),statusCode:e,method:h,headers:{},url:u,rawRequest:c},c.getAllResponseHeaders&&(t.headers=Qt(c.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),s(n,t,t.body)}}var n,a,l,c=i.xhr||null,u=(c=c||new(i.cors||i.useXDR?en.XDomainRequest:en.XMLHttpRequest)).url=i.uri||i.url,h=c.method=i.method||"GET",d=i.body||i.data,p=c.headers=i.headers||{},f=!!i.sync,v=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:u,rawRequest:c};if("json"in i&&!1!==i.json&&(v=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===i.json?d:i.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(e,0)},c.onload=e,c.onerror=t,c.onprogress=function(){},c.onabort=function(){a=!0},c.ontimeout=t,c.open(h,u,!f,i.username,i.password),f||(c.withCredentials=!!i.withCredentials),!f&&0=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(var s=0;st.length;l--)c.el_.removeChild(i[l-1]);i.length=t.length})},e}(gt)),gt.registerComponent("TimeTooltip",function(n){function e(e,t){t=n.call(this,e,t)||this;return t.update=Ge(Xe(_t(t),t.update),30),t}yt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,n){var i=ge(this.el_),r=ve(this.player_.el()),s=e.width*t;r&&i&&(t=e.left-r.left+s,r=e.width-s+(r.right-e.right),t<(e=i.width/2)?e+=e-t:ri.width&&(e=i.width),e=Math.round(e),this.el_.style.right="-"+e+"px",this.write(n))},t.write=function(e){ne(this.el_,e)},t.updateTime=function(i,r,s,o){var a=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var e,t,n=a.player_.duration();n=a.player_.liveTracker&&a.player_.liveTracker.isLive()?((t=(e=a.player_.liveTracker.liveWindow())-r*e)<1?"":"-")+Mn(t,e):Mn(s,n),a.update(i,r,n),o&&o()})},e}(gt));I=function(n){function e(e,t){t=n.call(this,e,t)||this;return t.update=Ge(Xe(_t(t),t.update),30),t}yt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,t){var n,i=this.getChild("timeTooltip");i&&(n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),i.updateTime(e,t,n))},e}(gt);I.prototype.options_={children:[]},q||D||I.prototype.options_.children.push("timeTooltip"),gt.registerComponent("PlayProgressBar",I);N=function(n){function e(e,t){t=n.call(this,e,t)||this;return t.update=Ge(Xe(_t(t),t.update),30),t}yt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var n=this,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,function(){n.el_.style.left=e.width*t+"px"})},e}(gt);N.prototype.options_={children:["timeTooltip"]},gt.registerComponent("MouseTimeDisplay",N);U=function(s){function e(e,t){t=s.call(this,e,t)||this;return t.setEventHandlers_(),t}yt(e,s);var t=e.prototype;return t.setEventHandlers_=function(){var t=this;this.update_=Xe(this,this.update),this.update=Ge(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(e){return t.enableInterval_(e)},this.disableIntervalHandler_=function(e){return t.disableInterval_(e)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in d&&"visibilityState"in d&&this.on(d,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===d.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var i=this;if("hidden"!==d.visibilityState){var r=s.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var e=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),t=i.player_.liveTracker,n=i.player_.duration();t&&t.isLive()&&(n=i.player_.liveTracker.liveCurrentTime()),i.percent_!==r&&(i.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),i.percent_=r),i.currentTime_===e&&i.duration_===n||(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[Mn(e,n),Mn(n,n)],"{1} of {2}")),i.currentTime_=e,i.duration_=n),i.bar&&i.bar.update(ve(i.el()),i.getProgress())}),r}},t.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},t.handleMouseDown=function(e){Ce(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),s.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(Ce(e)){var t=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(.99<=t)return void n.seekToLiveEdge();var i,r=n.seekableStart(),e=n.liveCurrentTime();if((i=(i=e<=(i=r+t*n.liveWindow())?e:i)<=r?r+.1:i)===1/0)return}else(i=t*this.player_.duration())===this.player_.duration()&&(i-=.1);this.userSeek_(i)}},t.enable=function(){s.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){s.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){s.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?xt(this.player_.play()):this.update_()},t.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},t.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var t,n=this.player_.liveTracker;It.isEventKey(e,"Space")||It.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.handleAction(e)):It.isEventKey(e,"Home")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(0)):It.isEventKey(e,"End")?(e.preventDefault(),e.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration())):/^[0-9]$/.test(It(e))?(e.preventDefault(),e.stopPropagation(),t=10*(It.codes[It(e)]-It.codes[0])/100,n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*t):this.userSeek_(this.player_.duration()*t)):It.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):It.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):s.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in d&&"visibilityState"in d&&this.off(d,"visibilitychange",this.toggleVisibility_),s.prototype.dispose.call(this)},e}(a);U.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},q||D||U.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),gt.registerComponent("SeekBar",U);Nn=function(i){function e(e,t){var n=i.call(this,e,t)||this;return n.handleMouseMove=Ge(Xe(_t(n),n.handleMouseMove),30),n.throttledHandleMouseSeek=Ge(Xe(_t(n),n.handleMouseSeek),30),n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)},n.handleMouseDownHandler_=function(e){return n.handleMouseDown(e)},n.enable(),n}yt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t,n,i,r,s=this.getChild("seekBar");s&&(t=s.getChild("playProgressBar"),n=s.getChild("mouseTimeDisplay"),(t||n)&&(r=ge(i=s.el()),e=_e(i,e).x,e=On(e,0,1),n&&n.update(r,e),t&&t.update(r,s.getProgress())))},t.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){var e;this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing()&&(e=this.getChild("seekBar"),this.player_.scrubbing(!1),e.videoWasPlaying&&xt(this.player_.play())))},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},t.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},e}(gt);Nn.prototype.options_={children:["seekBar"]},gt.registerComponent("ProgressControl",Nn);j=function(i){function e(e,t){var n=i.call(this,e,t)||this;return n.on(e,["enterpictureinpicture","leavepictureinpicture"],function(e){return n.handlePictureInPictureChange(e)}),n.on(e,["disablepictureinpicturechanged","loadedmetadata"],function(e){return n.handlePictureInPictureEnabledChange(e)}),n.disable(),n}yt(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+i.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){d.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(In);j.prototype.controlText_="Picture-in-Picture",gt.registerComponent("PictureInPictureToggle",j);Kt=function(i){function e(e,t){var n=i.call(this,e,t)||this;return n.on(e,"fullscreenchange",function(e){return n.handleFullscreenChange(e)}),!1===d[e.fsApi_.fullscreenEnabled]&&n.disable(),n}yt(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+i.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(In);Kt.prototype.controlText_="Fullscreen",gt.registerComponent("FullscreenToggle",Kt);gt.registerComponent("VolumeLevel",function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(t.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},e}(gt)),gt.registerComponent("VolumeLevelTooltip",function(n){function e(e,t){t=n.call(this,e,t)||this;return t.update=Ge(Xe(_t(t),t.update),30),t}yt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,n,i){if(!n){var r=ve(this.el_),s=ve(this.player_.el()),n=e.width*t;if(!s||!r)return;t=e.left-s.left+n,s=e.width-n+(s.right-e.right),e=r.width/2;tr.width&&(e=r.width),this.el_.style.right="-"+e+"px"}this.write(i+"%")},t.write=function(e){ne(this.el_,e)},t.updateVolume=function(e,t,n,i,r){var s=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){s.update(e,t,n,i.toFixed(0)),r&&r()})},e}(gt));A=function(n){function e(e,t){t=n.call(this,e,t)||this;return t.update=Ge(Xe(_t(t),t.update),30),t}yt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t,n){var i=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,r,function(){n?i.el_.style.bottom=e.height*t+"px":i.el_.style.left=e.width*t+"px"})},e}(gt);A.prototype.options_={children:["volumeLevelTooltip"]},gt.registerComponent("MouseVolumeLevelDisplay",A);e=function(i){function e(e,t){var n=i.call(this,e,t)||this;return n.on("slideractive",function(e){return n.updateLastVolume_(e)}),n.on(e,"volumechange",function(e){return n.updateARIAAttributes(e)}),e.ready(function(){return n.updateARIAAttributes()}),n}yt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){Ce(e)&&i.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){var t,n,i,r=this.getChild("mouseVolumeLevelDisplay");r&&(t=ve(i=this.el()),n=this.vertical(),i=_e(i,e),i=n?i.y:i.x,i=On(i,0,1),r.update(t,i,n)),Ce(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(a);e.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},q||D||e.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),e.prototype.playerEvent="volumechange",gt.registerComponent("VolumeBar",e);o=function(s){function e(e,t){var n,i,r;return(t=void 0===t?{}:t).vertical=t.vertical||!1,"undefined"!=typeof t.volumeBar&&!w(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),n=s.call(this,e,t)||this,i=_t(n),(r=e).tech_&&!r.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),n.throttledHandleMouseMove=Ge(Xe(_t(n),n.handleMouseMove),30),n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)},n.on("mousedown",function(e){return n.handleMouseDown(e)}),n.on("touchstart",function(e){return n.handleMouseDown(e)}),n.on("mousemove",function(e){return n.handleMouseMove(e)}),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}yt(e,s);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(gt);o.prototype.options_={children:["volumeBar"]},gt.registerComponent("VolumeControl",o);I=function(s){function e(e,t){var n,i,r=s.call(this,e,t)||this;return n=_t(r),(i=e).tech_&&!i.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(i,"loadstart",function(){i.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),r.on(e,["loadstart","volumechange"],function(e){return r.update(e)}),r}yt(e,s);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();0===t?(this.player_.volume(n<.1?.1:n),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;q&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)oe(this.el_,"vjs-vol-"+n);se(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(In);I.prototype.controlText_="Mute",gt.registerComponent("MuteToggle",I);N=function(i){function e(e,t){var n;return"undefined"!=typeof(t=void 0===t?{}:t).inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumeControl&&!w(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(n=i.call(this,e,t)||this).handleKeyPressHandler_=function(e){return n.handleKeyPress(e)},n.on(e,["loadstart"],function(e){return n.volumePanelState_(e)}),n.on(n.muteToggle,"keyup",function(e){return n.handleKeyPress(e)}),n.on(n.volumeControl,"keyup",function(e){return n.handleVolumeControlKeyUp(e)}),n.on("keydown",function(e){return n.handleKeyPress(e)}),n.on("mouseover",function(e){return n.handleMouseOver(e)}),n.on("mouseout",function(e){return n.handleMouseOut(e)}),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}yt(e,i);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),i.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),i.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){It.isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),Ke(d,"keyup",this.handleKeyPressHandler_)},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),We(d,"keyup",this.handleKeyPressHandler_)},t.handleKeyPress=function(e){It.isEventKey(e,"Esc")&&this.handleMouseOut()},e}(gt);N.prototype.options_={children:["muteToggle","volumeControl"]},gt.registerComponent("VolumePanel",N);var Rn=function(i){function e(e,t){var n=i.call(this,e,t)||this;return t&&(n.menuButton_=t.menuButton),n.focusedChild_=-1,n.on("keydown",function(e){return n.handleKeyDown(e)}),n.boundHandleBlur_=function(e){return n.handleBlur(e)},n.boundHandleTapClick_=function(e){return n.handleTapClick(e)},n}yt(e,i);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof gt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof gt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),i.prototype.removeChild.call(this,e)},t.addItem=function(e){e=this.addChild(e);e&&this.addEventListenerForItem(e)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=te(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");e=i.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),Ke(e,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),e},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,i.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||d.activeElement;this.children().some(function(e){return e.el()===t})||(e=this.menuButton_)&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()},t.handleTapClick=function(t){var e;this.menuButton_&&(this.menuButton_.unpressButton(),e=this.children(),!Array.isArray(e)||(e=e.filter(function(e){return e.el()===t.target})[0])&&"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())},t.handleKeyDown=function(e){It.isEventKey(e,"Left")||It.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(It.isEventKey(e,"Right")||It.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),0=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(gt);gt.registerComponent("Menu",Rn);U=function(i){function e(e,t){var n;(n=i.call(this,e,t=void 0===t?{}:t)||this).menuButton_=new In(e,t),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");t=In.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+t,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0;t=function(e){return n.handleClick(e)};return n.handleMenuKeyUp_=function(e){return n.handleMenuKeyUp(e)},n.on(n.menuButton_,"tap",t),n.on(n.menuButton_,"click",t),n.on(n.menuButton_,"keydown",function(e){return n.handleKeyDown(e)}),n.on(n.menuButton_,"mouseenter",function(){n.addClass("vjs-hover"),n.menu.show(),Ke(d,"keyup",n.handleMenuKeyUp_)}),n.on("mouseleave",function(e){return n.handleMouseLeave(e)}),n.on("keydown",function(e){return n.handleSubmenuKeyDown(e)}),n}yt(e,i);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e,t=new Rn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title&&(e=te("li",{className:"vjs-menu-title",textContent:dt(this.options_.title),tabIndex:-1}),e=new gt(this.player_,{el:e}),t.addItem(e)),this.items=this.createItems(),this.items)for(var n=0;nt){i=n[r];break}this.player().playbackRate(i)},t.handlePlaybackRateschange=function(e){this.update()},t.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0 select",id:"captions-background-color-%s",label:"Color",options:[o,U,j,Nn,Kt,V,N,I]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[A,a,e]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[U,o,j,Nn,Kt,V,N,I]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[A,a]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[e,a,A]}};function $n(e,t){if((e=t?t(e):e)&&"none"!==e)return e}Gn.windowColor.options=Gn.backgroundColor.options,gt.registerComponent("TextTrackSettings",function(i){function e(e,t){var n;return t.temporary=!1,(n=i.call(this,e,t)||this).updateDisplay=n.updateDisplay.bind(_t(n)),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=te("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===t.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",function(){n.saveSettings(),n.close()}),n.on(n.$(".vjs-default-button"),"click",function(){n.setDefaults(),n.updateDisplay()}),C(Gn,function(e){n.on(n.$(e.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}yt(e,i);var t=e.prototype;return t.dispose=function(){this.endDialog=null,i.prototype.dispose.call(this)},t.createElSelect_=function(e,t,n){var i=this;void 0===t&&(t=""),void 0===n&&(n="label");var e=Gn[e],r=e.id.replace("%s",this.id_),s=[t,r].join(" ").trim();return["<"+n+' id="'+r+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(e.label),""+n+">",'").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['"].join("")},t.createElColors_=function(){return te("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return te("div",{className:"vjs-track-settings-font",innerHTML:['",'",'"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return te("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return i.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var n,i,e,r=this;return i=function(e,t,n){var i,t=(i=r.$(t.selector),t=t.parser,$n(i.options[i.options.selectedIndex].value,t));return void 0!==t&&(e[n]=t),e},void 0===(e={})&&(e=0),k(n=Gn).reduce(function(e,t){return i(e,n[t],t)},e)},t.setValues=function(n){var i=this;C(Gn,function(e,t){!function(e,t,n){if(t)for(var i=0;ithis.options_.liveTolerance,(t=!this.timeupdateSeen_||e===1/0?!1:t)!==this.behindLiveEdge_&&(this.behindLiveEdge_=t,this.trigger("liveedgechange")))},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&2