s.width&&(p=s.width),this.el_.style.right="-"+p+"px",qe(this.el_,a)}},e.updateTime=function(t,n,a,s){var o=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var u,c=o.player_.duration();if(o.player_.liveTracker&&o.player_.liveTracker.isLive()){var d=o.player_.liveTracker.liveWindow(),p=d-n*d;u=(p<1?"":"-")+Qe(p,d)}else u=Qe(a,c);o.update(t,n,u),s&&s()})},r}(D);D.registerComponent("TimeTooltip",ud);var jr=function(i){function r(){return i.apply(this,arguments)||this}F(r,i);var e=r.prototype;return e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},e.update=function(t,n){var a=this.getChild("timeTooltip");if(a){var s=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(t,n,s)}},r}(D);jr.prototype.options_={children:[]},ue||Pe||jr.prototype.options_.children.push("timeTooltip"),D.registerComponent("PlayProgressBar",jr);var Uo=function(i){function r(t,n){var a;return(a=i.call(this,t,n)||this).update=Ge($(V(V(a)),a.update),25),a}F(r,i);var e=r.prototype;return e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.update=function(t,n){var a=this,s=n*this.player_.duration();this.getChild("timeTooltip").updateTime(t,n,s,function(){a.el_.style.left=t.width*n+"px"})},r}(D);Uo.prototype.options_={children:["timeTooltip"]},D.registerComponent("MouseTimeDisplay",Uo);var pn=function(i){function r(t,n){var a;return(a=i.call(this,t,n)||this).setEventHandlers_(),a}F(r,i);var e=r.prototype;return e.setEventHandlers_=function(){var t=this;this.update=Ge($(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(n){t.player_.liveTracker&&t.player_.liveTracker.isLive()&&n.type!=="ended"||t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.update_=function(t,n){var a=this.player_.liveTracker,s=this.player_.duration();a&&a.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),a&&a.seekableEnd()===1/0?this.disable():this.enable(),this.el_.setAttribute("aria-valuenow",(100*n).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Qe(t,s),Qe(s,s)],"{1} of {2}")),this.bar.update(gi(this.el_),n)},e.update=function(t){var n=i.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},e.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.getPercent=function(){var t,n=this.getCurrentTime_(),a=this.player_.liveTracker;return a&&a.isLive()?(t=(n-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(t=1)):t=n/this.player_.duration(),1<=t?1:t||0},e.handleMouseDown=function(t){ze(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),i.prototype.handleMouseDown.call(this,t))},e.handleMouseMove=function(t){if(ze(t)){var n,a=this.calculateDistance(t),s=this.player_.liveTracker;if(s&&s.isLive()){var o=s.seekableStart(),u=s.liveCurrentTime();if(u<=(n=o+a*s.liveWindow())&&(n=u),n<=o&&(n=o+.1),n===1/0)return}else(n=a*this.player_.duration())===this.player_.duration()&&(n-=.1);this.player_.currentTime(n)}},e.enable=function(){i.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},e.disable=function(){i.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},e.handleMouseUp=function(t){i.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Si(this.player_.play())},e.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.handleKeyPress=function(t){t.which===32||t.which===13?(t.preventDefault(),this.handleAction(t)):i.prototype.handleKeyPress&&i.prototype.handleKeyPress.call(this,t)},r}(Nr);pn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ue||Pe||pn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),pn.prototype.playerEvent="timeupdate",D.registerComponent("SeekBar",pn);var Io=function(i){function r(t,n){var a;return(a=i.call(this,t,n)||this).handleMouseMove=Ge($(V(V(a)),a.handleMouseMove),25),a.throttledHandleMouseSeek=Ge($(V(V(a)),a.handleMouseSeek),25),a.enable(),a}F(r,i);var e=r.prototype;return e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.handleMouseMove=function(t){var n=this.getChild("seekBar");if(n){var a=n.getChild("mouseTimeDisplay"),s=n.el(),o=gi(s),u=er(s,t).x;1'})},r}(D);D.registerComponent("VolumeLevel",ld);var Fr=function(i){function r(t,n){var a;return(a=i.call(this,t,n)||this).on("slideractive",a.updateLastVolume_),a.on(t,"volumechange",a.updateARIAAttributes),t.ready(function(){return a.updateARIAAttributes()}),a}F(r,i);var e=r.prototype;return e.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"})},e.handleMouseDown=function(t){ze(t)&&i.prototype.handleMouseDown.call(this,t)},e.handleMouseMove=function(t){ze(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.updateARIAAttributes=function(t){var n=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",n),this.el_.setAttribute("aria-valuetext",n+"%")},e.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.updateLastVolume_=function(){var t=this,n=this.player_.volume();this.one("sliderinactive",function(){t.player_.volume()===0&&t.player_.lastVolume_(n)})},r}(Nr);Fr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Fr.prototype.playerEvent="volumechange",D.registerComponent("VolumeBar",Fr);var Do=function(i){function r(t,n){var a,s,o;return n===void 0&&(n={}),n.vertical=n.vertical||!1,(typeof n.volumeBar=="undefined"||di(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),a=i.call(this,t,n)||this,s=V(V(a)),(o=t).tech_&&!o.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(o,"loadstart",function(){o.tech_.featuresVolumeControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")}),a.throttledHandleMouseMove=Ge($(V(V(a)),a.handleMouseMove),25),a.on("mousedown",a.handleMouseDown),a.on("touchstart",a.handleMouseDown),a.on(a.volumeBar,["focus","slideractive"],function(){a.volumeBar.addClass("vjs-slider-active"),a.addClass("vjs-slider-active"),a.trigger("slideractive")}),a.on(a.volumeBar,["blur","sliderinactive"],function(){a.volumeBar.removeClass("vjs-slider-active"),a.removeClass("vjs-slider-active"),a.trigger("sliderinactive")}),a}F(r,i);var e=r.prototype;return e.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),i.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},e.handleMouseDown=function(t){var n=this.el_.ownerDocument;this.on(n,"mousemove",this.throttledHandleMouseMove),this.on(n,"touchmove",this.throttledHandleMouseMove),this.on(n,"mouseup",this.handleMouseUp),this.on(n,"touchend",this.handleMouseUp)},e.handleMouseUp=function(t){var n=this.el_.ownerDocument;this.off(n,"mousemove",this.throttledHandleMouseMove),this.off(n,"touchmove",this.throttledHandleMouseMove),this.off(n,"mouseup",this.handleMouseUp),this.off(n,"touchend",this.handleMouseUp)},e.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},r}(D);Do.prototype.options_={children:["volumeBar"]},D.registerComponent("VolumeControl",Do);var Ro=function(i){function r(t,n){var a,s,o;return a=i.call(this,t,n)||this,s=V(V(a)),(o=t).tech_&&!o.tech_.featuresMuteControl&&s.addClass("vjs-hidden"),s.on(o,"loadstart",function(){o.tech_.featuresMuteControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")}),a.on(t,["loadstart","volumechange"],a.update),a}F(r,i);var e=r.prototype;return e.buildCSSClass=function(){return"vjs-mute-control "+i.prototype.buildCSSClass.call(this)},e.handleClick=function(t){var n=this.player_.volume(),a=this.player_.lastVolume_();if(n===0){var s=a<.1?.1:a;this.player_.volume(s),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.update=function(t){this.updateIcon_(),this.updateControlText_()},e.updateIcon_=function(){var t=this.player_.volume(),n=3;ue&&this.player_.muted(this.player_.tech_.el_.muted),t===0||this.player_.muted()?n=0:t<.33?n=1:t<.67&&(n=2);for(var a=0;a<4;a++)fi(this.el_,"vjs-vol-"+a);Ee(this.el_,"vjs-vol-"+n)},e.updateControlText_=function(){var t=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},r}(re);Ro.prototype.controlText_="Mute",D.registerComponent("MuteToggle",Ro);var Mo=function(i){function r(t,n){var a;return n===void 0&&(n={}),typeof n.inline!="undefined"?n.inline=n.inline:n.inline=!0,(typeof n.volumeControl=="undefined"||di(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(a=i.call(this,t,n)||this).on(t,["loadstart"],a.volumePanelState_),a.on(a.volumeControl,["slideractive"],a.sliderActive_),a.on(a.volumeControl,["sliderinactive"],a.sliderInactive_),a}F(r,i);var e=r.prototype;return e.sliderActive_=function(){this.addClass("vjs-slider-active")},e.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.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")},e.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),i.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},r}(D);Mo.prototype.options_={children:["muteToggle","volumeControl"]},D.registerComponent("VolumePanel",Mo);var Vr=function(i){function r(t,n){var a;return a=i.call(this,t,n)||this,n&&(a.menuButton_=n.menuButton),a.focusedChild_=-1,a.on("keydown",a.handleKeyPress),a}F(r,i);var e=r.prototype;return e.addItem=function(t){this.addChild(t),t.on("blur",$(this,this.handleBlur)),t.on(["tap","click"],$(this,function(n){this.menuButton_&&(this.menuButton_.unpressButton(),t.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus())}))},e.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=yt(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=i.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Yt(n,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),n},e.dispose=function(){this.contentEl_=null,i.prototype.dispose.call(this)},e.handleBlur=function(t){var n=t.relatedTarget||B.activeElement;if(!this.children().some(function(s){return s.el()===n})){var a=this.menuButton_;a&&a.buttonPressed_&&n!==a.el().firstChild&&a.unpressButton()}},e.handleKeyPress=function(t){t.which===37||t.which===40?(t.preventDefault(),this.stepForward()):t.which!==38&&t.which!==39||(t.preventDefault(),this.stepBack())},e.stepForward=function(){var t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_+1),this.focus(t)},e.stepBack=function(){var t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_-1),this.focus(t)},e.focus=function(t){t===void 0&&(t=0);var n=this.children().slice();n.length&&n[0].className&&/vjs-menu-title/.test(n[0].className)&&n.shift(),0
`+this.localize("Captions")+`
`),a+="",i.prototype.createEl.call(this,e,ct({innerHTML:a},t),n)},r}(Ii);D.registerComponent("SubsCapsMenuItem",jo);var $r=function(i){function r(t,n){var a;return n===void 0&&(n={}),(a=i.call(this,t,n)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(a.player_.language_)&&(a.label_="captions"),a.menuButton_.controlText(ft(a.label_)),a}F(r,i);var e=r.prototype;return e.buildCSSClass=function(){return"vjs-subs-caps-button "+i.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+i.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Xr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=i.prototype.createItems.call(this,t,jo)},r}(Ze);$r.prototype.kinds_=["captions","subtitles"],$r.prototype.controlText_="Subtitles",D.registerComponent("SubsCapsButton",$r);var Fo=function(i){function r(t,n){var a,s=n.track,o=t.audioTracks();n.label=s.label||s.language||"Unknown",n.selected=s.enabled,(a=i.call(this,t,n)||this).track=s,a.addClass("vjs-"+s.kind+"-menu-item");var u=function(){for(var c=arguments.length,d=new Array(c),p=0;p