unt:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1)
e=this.throughput>0?1/this.throughput:0
return Math.floor(1/(t+e))},set:function(){ql.log.error('The "systemBandwidth" property is read-only')}}})
this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth)
this.options_.throughput&&(this.throughput=this.options_.throughput)
Object.defineProperties(this.stats,{bandwidth:{get:function(){return i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return i.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return i.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return i.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return tc(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return tc(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}})
this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_))
this.tech_.on("bandwidthupdate",(function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!x.localStorage)return!1
var t=tp()
t=t?ql.mergeOptions(t,e):e
try{x.localStorage.setItem($h,JSON.stringify(t))}catch(e){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})}))
this.masterPlaylistController_.on("selectedinitialmedia",(function(){(e=i).representations=function(){var t=e.masterPlaylistController_.master(),i=Tc(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists
return i?i.filter((function(e){return!mc(e)})).map((function(t,i){return new Wh(e,t,t.id)})):[]}
var e}))
this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){i.setupEme_()}))
this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")}))
this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0}))
this.setupQualityLevels_()
if(this.tech_.el()){this.mediaSourceUrl_=x.URL.createObjectURL(this.masterPlaylistController_.mediaSource)
this.tech_.src(this.mediaSourceUrl_)}}}
i.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader
this.logger_("waiting for EME key session creation")
Zh({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session")
e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t)
e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))}
i.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions")
this.createKeySessions_()}
i.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=ep({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()})
this.player_.tech_.on("keystatuschange",(function(t){"output-restricted"===t.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+t.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})}))
this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this)
this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_)
11!==ql.browser.IE_VERSION&&i?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()}
i.setupQualityLevels_=function(){var e=this,t=ql.players[this.tech_.options_.playerId]
if(t&&t.qualityLevels&&!this.qualityLevels_){this.qualityLevels_=t.qualityLevels()
this.masterPlaylistController_.on("selectedinitialmedia",(function(){!function(e,t){t.representations().forEach((function(t){e.addQualityLevel(t)}))
Jh(e,t.playlists)}(e.qualityLevels_,e)}))
this.playlists.on("mediachange",(function(){Jh(e.qualityLevels_,e.playlists)}))}}
t.version=function(){return{"@videojs/http-streaming":Yh,"mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}}
i.version=function(){return this.constructor.version()}
i.canChangeType=function(){return kh.canChangeType()}
i.play=function(){this.masterPlaylistController_.play()}
i.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)}
i.duration=function(){return this.masterPlaylistController_.duration()}
i.seekable=function(){return this.masterPlaylistController_.seekable()}
i.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose()
this.masterPlaylistController_&&this.masterPlaylistController_.dispose()
this.qualityLevels_&&this.qualityLevels_.dispose()
if(this.player_){delete this.player_.vhs
delete this.player_.dash
delete this.player_.hls}this.tech_&&this.tech_.vhs&&delete this.tech_.vhs
this.tech_&&delete this.tech_.hls
if(this.mediaSourceUrl_&&x.URL.revokeObjectURL){x.URL.revokeObjectURL(this.mediaSourceUrl_)
this.mediaSourceUrl_=null}this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_)
e.prototype.dispose.call(this)}
i.convertToProgramTime=function(e,t){return Qc({playlist:this.masterPlaylistController_.media(),time:e,callback:t})}
i.seekToProgramTime=function(e,t,i,n){void 0===i&&(i=!0)
void 0===n&&(n=2)
return $c({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}
return t}(ql.getComponent("Component")),np={name:"videojs-http-streaming",VERSION:Yh,canHandleSource:function(e,t){void 0===t&&(t={})
var i=ql.mergeOptions(ql.options,t)
return np.canPlayType(e.type,i)},handleSource:function(e,t,i){void 0===i&&(i={})
var n=ql.mergeOptions(ql.options,i)
t.vhs=new ip(e,t,n)
ql.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){ql.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead.")
return t.vhs},configurable:!0})
t.vhs.xhr=jc()
t.vhs.src(e.src,e.type)
return t.vhs},canPlayType:function(e,t){void 0===t&&(t={})
var i=ql.mergeOptions(ql.options,t),n=i.vhs,r=(n=void 0===n?{}:n).overrideNative,a=void 0===r?!ql.browser.IS_ANY_SAFARI:r,s=i.hls,o=(s=void 0===s?{}:s).overrideNative,u=void 0!==o&&o,l=Ze(e)
return l&&(!Qh.supportsTypeNatively(l)||u||a)?"maybe":""}}
Xe("avc1.4d400d,mp4a.40.2")&&ql.getTech("Html5").registerSourceHandler(np,0)
ql.VhsHandler=ip
Object.defineProperty(ql,"HlsHandler",{get:function(){ql.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead.")
return ip},configurable:!0})
ql.VhsSourceHandler=np
Object.defineProperty(ql,"HlsSourceHandler",{get:function(){ql.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead.")
return np},configurable:!0})
ql.Vhs=Qh
Object.defineProperty(ql,"Hls",{get:function(){ql.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead.")
return Qh},configurable:!0})
if(!ql.use){ql.registerComponent("Hls",Qh)
ql.registerComponent("Vhs",Qh)}ql.options.vhs=ql.options.vhs||{}
ql.options.hls=ql.options.hls||{}
if(!ql.getPlugin||!ql.getPlugin("reloadSourceOnError")){(ql.registerPlugin||ql.plugin)("reloadSourceOnError",(function(e){Xh(this,e)}))}
/*! @name videojs-contrib-quality-levels @version 2.1.0 @license Apache-2.0 */function rp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return e}var ap=function e(t){var i=this
if(ql.browser.IS_IE8){i=L.createElement("custom")
for(var n in e.prototype)"constructor"!==n&&(i[n]=e.prototype[n])}i.id=t.id
i.label=i.id
i.width=t.width
i.height=t.height
i.bitrate=t.bandwidth
i.enabled_=t.enabled
Object.defineProperty(i,"enabled",{get:function(){return i.enabled_()},set:function(e){i.enabled_(e)}})
return i},sp=function(e){!function(e,t){e.prototype=Object.create(t.prototype)
e.prototype.constructor=e
e.__proto__=t}(t,e)
function t(){var i,n=rp(rp(i=e.call(this)||this))
if(ql.browser.IS_IE8){n=L.createElement("custom")
for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}n.levels_=[]
n.selectedIndex_=-1
Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}})
Object.defineProperty(n,"length",{get:function(){return n.levels_.length}})
return n||rp(i)}var i=t.prototype
i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id)
if(t)return t
var i=this.levels_.length
t=new ap(e)
""+i in this||Object.defineProperty(this,i,{get:function(){return this.levels_[i]}})
this.levels_.push(t)
this.trigger({qualityLevel:t,type:"addqualitylevel"})
return t}
i.removeQualityLevel=function(e){for(var t=null,i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0]
this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--
break}t&&this.trigger({qualityLevel:e,type:"removequalitylevel"})
return t}
i.getQualityLevelById=function(e){for(var t=0,i=this.length;t<i;t++){var n=this[t]
if(n.id===e)return n}return null}
i.dispose=function(){this.selectedIndex_=-1
this.levels_.length=0}
return t}(ql.EventTarget)
sp.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"}
for(var op in sp.prototype.allowedEvents_)sp.prototype["on"+op]=null
var up="2.1.0",lp=ql.registerPlugin||ql.plugin,cp=function(e){return function(e){var t=e.qualityLevels,i=new sp
e.on("dispose",(function n(){i.dispose()
e.qualityLevels=t
e.off("dispose",n)}))
e.qualityLevels=function(){return i}
e.qualityLevels.VERSION=up
return i}(this,ql.mergeOptions({},e))}
lp("qualityLevels",cp)
cp.VERSION=up
var dp=ql.getComponent("Component"),hp=ql.dom,pp=function(e){d(i,e)
var t=g(i)
function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.checked,s=void 0!==a&&a,u=r.readonly,l=void 0!==u&&u
o(this,i);(n=t.apply(this,arguments))._player=e
n._isReadonly=l
n._isReadonly||n.on(["tap","click"],n._onClick)
s&&n.check()
return n}l(i,[{key:"createEl",value:function(){var e=hp.createEl("div",{className:"vjs-toggle"})
this._toggleSwitch=hp.createEl("div",{className:"vjs-toggle-input vjs-toggle-switch"})
e.appendChild(this._toggleSwitch)
return e}},{key:"check",value:function(){this._toggleSwitch.setAttribute("data-toggled",!0)
this._toggleSwitch.classList.add("vjs-toggle-switch--toggled")
this._isChecked=!0
this.trigger("check")}},{key:"uncheck",value:function(){this._toggleSwitch.removeAttribute("data-toggled")
this._toggleSwitch.classList.remove("vjs-toggle-switch--toggled")
this._isChecked=!1
this.trigger("uncheck")}},{key:"_onClick",value:function(){this._isChecked?this.uncheck():this.check()}}])
return i}(dp)
ql.registerComponent("Toggle",pp)
ql.getComponent("Menu").prototype.handleBlur=function(e){var t=e.relatedTarget||document.activeElement
if(t===this.contentEl()&&e.target)e.target.focus()
else if(!this.children().some((function(e){return e.el()===t}))){var i=this.menuButton_
i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}}
function fp(e,t){if(!t)throw new Error("Assertion Failed: ".concat(e))}function mp(e,t){t||console.warn(e)}function gp(e){return(e instanceof window.HTMLAnchorElement||e instanceof window.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof window.HTMLInputElement||e instanceof window.HTMLSelectElement||e instanceof window.HTMLTextAreaElement||e instanceof window.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof window.HTMLIFrameElement||e instanceof window.HTMLObjectElement||e instanceof window.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}var vp=ql.getComponent("Player")
function yp(e){var t=e.split(":")
return"vjs-".concat(t[0],"-").concat(t[1])}var _p=["auto","16:9","4:3","1:1","4:5"],bp=function(e){d(i,e)
var t=g(i)
function i(e,n){var r
o(this,i);(r=t.call(this,e,n))._focusableControls=r._getFocusableControls()
r._focusableControls.forEach((function(e){r.on(e,"keydown",r._handleKeydown)}))
return r}l(i,[{key:"_handleKeydown",value:function(e){!this.isFullscreen()||"Tab"!==e.key&&9!==e.keyCode||this._trapFullscreenTap(e)}},{key:"_trapFullscreenTap",value:function(e){if(S){var t,i=this._focusableControls.indexOf(e.target)
e.shiftKey?0===i&&(t=this._focusableControls.length-1):i===this._focusableControls.length-1&&(t=0)
if(void 0!==t){this._focusableControls[t].focus()
e.preventDefault()}}}},{key:"_getFocusableControls",value:function(){var e=this.controlBar.children(),t=[]
e.forEach((function(e){var i=e.el()
if(gp(i))t.push(i)
else if(i.children){var n=Array.from(i.children).find((function(e){return gp(e)}))
n&&t.push(n)}}))
return t}},{key:"aspectRatio",value:function(e){if(void 0===e)return this.aspectRatio_
fp("media-player: Aspect ratio ".concat(e," is not supported"),_p.indexOf(e)>-1)
this.aspectRatio_&&"auto"!==this.aspectRatio_&&this.removeClass(yp(this.aspectRatio_))
"auto"!==e&&this.addClass(yp(e))
this.aspectRatio_=e
return e}},{key:"resetPlaybackRate_",value:function(){var e=this.playbackRate()
this.playbackRate(e)}},{key:"reset",value:function(){var e=this
this._isResetting=!0
var t=this.volume(),n=this.muted(),r=this.playbackRate()
this.one("playerreset",(function(){e.volume(t)
e.muted(n)
e.defaultPlaybackRate(r)
e._isResetting=!1}))
v(h(i.prototype),"reset",this).call(this)}},{key:"isResetting",value:function(){return this._isResetting||!1}}])
return i}(vp)
ql.registerComponent("Player",bp)
var Tp=ql.getComponent("Component"),kp=ql.dom,Sp=function(e){d(i,e)
var t=g(i)
function i(e){var n
o(this,i);(n=t.apply(this,arguments))._isShowing=!0
n.addClass("vjs-custom-captions-display")
n.hide()
n._hasPlayed=!1
n._showOnPlayed=!1
n.on(e,"playerreset",n._onPlayerReset)
n.on(e,"playing",n._onPlaying)
return n}l(i,[{key:"contentEl",value:function(){return this._cue}},{key:"hide",value:function(){if(this._isShowing){v(h(i.prototype),"hide",this).call(this)
this._showOnPlayed=!1
this._isShowing=!1
this.trigger("hide")}}},{key:"show",value:function(){this._hasPlayed?v(h(i.prototype),"show",this).call(this):this._showOnPlayed=!0
if(!this._isShowing){this._isShowing=!0
this.trigger("show")}}},{key:"createEl",value:function(){this._display=kp.createEl("div",void 0,{class:"vjs-custom-captions-display"})
this._cue=kp.createEl("div",void 0,{class:"vjs-custom-captions-cue",id:this.id()})
return kp.appendContent(this._display,this._cue)}},{key:"setText",value:function(e){kp.textContent(this.contentEl(),e)}},{key:"_onPlaying",value:function(){this._hasPlayed=!0
this._showOnPlayed&&this.show()}},{key:"_onPlayerReset",value:function(){var e=this._isShowing
this.hide()
this._hasPlayed=!1
this._showOnPlayed=e}}])
return i}(Tp)
ql.registerComponent("CustomCaptionsDisplay",Sp)
var Ep=ql.mergeOptions,Cp=ql.getComponent("Button"),wp="vjs-captions-active",Ip="captions",Pp={useCustomCaptions:!1,selected:!1},xp=function(e){d(i,e)
var t=g(i)
function i(e,n){var r
o(this,i);(r=t.call(this,e,Ep({},Pp,n)))._player=e
r._isActive=!1
r.options_.useCustomCaptions||r.hide()
r.controlText("Show Captions")
r.addClass("vjs-captions-toggle")
if(r._player.usingPlugin("userPreferences")){r._userPrefs=r._player.userPreferences()
r.one(r._player,"play",r._handlePlay)
r.on(r._player,"playerreset",(function(){r.off(r._player,"off",r._handlePlay)
r.one(r._player,"play",r._handlePlay)}))}if(r.options_.useCustomCaptions)r._player.ready((function(){var e=r._player.getChild("customCaptionsDisplay")
r.on(e,"show",r.activate)
r.on(e,"hide",r.deactivate)}))
else{var a=r._player.textTracks()
if(a){r.on(a,"addtrack",r._handleAddTrack)
r.on(a,"removetrack",r._handleRemoveTrack)}}return r}l(i,[{key:"handleClick",value:function(){this._isActive?this.deactivate():this.activate()
this._userPrefs&&this._userPrefs.set(Ip,this._isActive)}},{key:"activate",value:function(){this.options_.useCustomCaptions?this._player.getChild("customCaptionsDisplay").show():this._textTrack&&(this._textTrack.mode="showing")
this._player.usingPlugin("tracking")&&this._player.tracking().setIsCcVisible(!0)
this.addClass(wp)
this.controlText("Hide Captions")
this._isActive=!0
this.trigger("activate")}},{key:"deactivate",value:function(){if(this._isActive){this.options_.useCustomCaptions?this._player.getChild("customCaptionsDisplay").hide():this._textTrack&&(this._textTrack.mode="hidden")
this._player.usingPlugin("tracking")&&this._player.tracking().setIsCcVisible(!1)
this.removeClass(wp)
this.controlText("Show Captions")
this._isActive=!1
this.trigger("deactivate")}}},{key:"_handleAddTrack",value:function(e){if(e.track&&"captions"===e.track.kind){this._textTrack=e.track
this.show()
"showing"===this._textTrack.mode&&this.activate()}}},{key:"_handleRemoveTrack",value:function(e){if(e.track&&"captions"===e.track.kind){this._textTrack=null
this.deactivate()
this.hide()}}},{key:"_handlePlay",value:function(){this._userPrefs&&this._userPrefs.get(Ip)&&this.activate()}}])
return i}(Cp)
ql.registerComponent("CaptionsToggle",xp)
function Ap(e,t,i){var n,r,a,s,o
null==t&&(t=100)
function u(){var l=Date.now()-s
if(l<t&&l>=0)n=setTimeout(u,t-l)
else{n=null
if(!i){o=e.apply(a,r)
a=r=null}}}var l=function(){a=this
r=arguments
s=Date.now()
var l=i&&!n
n||(n=setTimeout(u,t))
if(l){o=e.apply(a,r)
a=r=null}return o}
l.clear=function(){if(n){clearTimeout(n)
n=null}}
l.flush=function(){if(n){o=e.apply(a,r)
a=r=null
clearTimeout(n)
n=null}}
return l}Ap.debounce=Ap
var Op=Ap,Lp=ql.getComponent("TextTrackMenuItem"),Dp=ql.dom,Rp=function(e){d(i,e)
var t=g(i)
function i(){o(this,i)
return t.apply(this,arguments)}l(i,[{key:"createEl",value:function(e,t,n){var r=v(h(i.prototype),"createEl",this).call(this,e,t,n)
if("subtitles"===this.options_.track.kind){this.options_.label="English (auto-generated)"
r.removeChild(r.querySelector(".vjs-menu-item-text"))
var a=Dp.createEl("span",void 0,{class:"vjs-menu-item-text"})
Dp.textContent(a,this.localize(this.options_.label))
r.appendChild(a)}return r}}])
return i}(Lp)
ql.registerComponent("CaptionsMenuItem",Rp)
var Mp=ql.getComponent("TextTrackButton"),Np=ql.getComponent("OffTextTrackMenuItem"),Up="vjs-captions-active",Bp="captionsLang",Fp=function(e){d(i,e)
var t=g(i)
function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
o(this,i);(n=t.call(this,e,r))._player=e
n.controlText("Open Captions Menu")
n._isMenuOpen=!1
n._hasManuallyDisabled=!1
n.addClass("vjs-captions-menu-toggle")
r.id&&n.setAttribute("id",r.id)
var a=e.textTracks()
n.sort=r.sort
n.selectedLanguage=r.selectedLanguage
n.reEnableCaptions=Op(n._reEnableCaptions,300,!0)
n.on("captionMenuItemSelected",(function(e,t){var i=t.track
n.trigger("captionChange",i)}))
if(n._player.usingPlugin("userPreferences")){n._userPrefs=n._player.userPreferences()
n.on(n._player,"playerreset",(function(){n.removeClass(Up)}))}a&&n.on(a,"change",n._handleChangeTrack)
n.on("dispose",n._onDispose)
n.on(n._player,"loadedmetadata",n._handleLoadedMetaData)
return n}l(i,[{key:"createItems",value:function(){var e=this,t=[]
this.removeClass(Up);(t=v(h(i.prototype),"createItems",this).call(this,t,Rp)).shift()
"function"==typeof this.sort?t.sort(this.sort):!1!==this.sort&&t.sort((function(e,t){var i=e.track.label.toLowerCase(),n=t.track.label.toLowerCase()
return i<n?-1:n<i?1:0}))
1===t.length&&"CC1"===t[0].track.label&&(t[0].el().textContent="CC")
var n=new Np(this.player_,{kinds:this.kinds_,kind:this.kind_,label:"Off"})
t.unshift(n)
n.on(["tap","click"],this._offMenuItemSelected.bind(this))
t.forEach((function(t){var i=t.track
"showing"===i.mode&&"Off"!==i.label&&e.addClass(Up)
t.on(["tap","click"],(function(){e.trigger("captionMenuItemSelected",t)}))}))
this._items=t
return t}},{key:"handleClick",value:function(e){v(h(i.prototype),"handleClick",this).call(this,e)
this._isMenuOpen=!this._isMenuOpen
this.controlText(this._isMenuOpen?"Close Captions Menu":"Open Captions Menu")}},{key:"handleSubmenuKeyDown",value:function(e){v(h(i.prototype),"handleSubmenuKeyDown",this).call(this,e)
"Escape"===e.key&&e.stopPropagation()}},{key:"_handleChangeTrack",value:function(){var e=this.items.find((function(e){return"showing"===e.track.mode})),t=!!e
if(this._hasManuallyDisabled||t){if(t){this.addClass(Up)
this._activeTrack=e.track}else{this.removeClass(Up)
this._activeTrack=void 0}this._player.usingPlugin("tracking")&&this._player.tracking().setIsCcVisible(t)
this._userPrefs&&this._userPrefs.set(Bp,this._activeTrack?this._activeTrack.language:"")
this._hasManuallyDisabled=!1}else{this.reEnableCaptions()
this._hasManuallyDisabled=!1}}},{key:"_handleLoadedMetaData",value:function(){var e=this._player.textTracks(),t=this._userPrefs&&this._userPrefs.get(Bp),i=this.selectedLanguage||t
if(e&&i)for(var n=0;n<e.length;n++){var r=e[n]
if(r.language===i){r.mode="showing"
this.trigger("captionChange",r)}}}},{key:"_offMenuItemSelected",value:function(){this._hasManuallyDisabled=!0}},{key:"_onDispose",value:function(){this.reEnableCaptions.clear()}},{key:"_reEnableCaptions",value:function(){if(this._activeTrack){this._activeTrack.mode="showing"
this.trigger("captionChange",this._activeTrack)}}}])
return i}(Mp)
Fp.prototype.kinds_=["captions","subtitles"]
ql.registerComponent("CaptionsMenuToggle",Fp)
var jp=function(e){d(i,e)
var t=g(i)
function i(e,n){var r,a=n.disabled,s=void 0!==a&&a
o(this,i);(r=t.apply(this,arguments)).controlText("Previous")
r.addClass("vjs-previous-button")
s&&r.disable()
return r}l(i,[{key:"handleClick",value:function(){this.trigger("previous")}}])
return i}(ql.getComponent("Button"))
ql.registerComponent("PreviousButton",jp)
var Vp=function(e){d(i,e)
var t=g(i)
function i(e,n){var r,a=n.disabled,s=void 0!==a&&a
o(this,i);(r=t.apply(this,arguments)).controlText("Next")
r.addClass("vjs-next-button")
s&&r.disable()
return r}l(i,[{key:"handleClick",value:function(){this.trigger("next")}}])
return i}(ql.getComponent("Button"))
ql.registerComponent("NextButton",Vp)
var Hp=".vjs-play-control:not(.vjs-playing):not(.vjs-ended)",qp=".vjs-play-control.vjs-playing:not(.vjs-ended)",Wp=".vjs-play-control.vjs-ended",Gp=".vjs-tech",zp=".vjs-poster",Kp=".vjs-mute-control",Xp=".vjs-fullscreen-control",Yp=".vjs-captions-toggle.vjs-captions-active",Qp=".vjs-captions-toggle:not(.vjs-captions-active)",$p=".vjs-subtitles-menu-item",Jp=".vjs-captions-menu-item",Zp=".vjs-menu-item",ef=".vjs-progress-holder",tf=".vjs-volume-control",nf=".vjs-back-to-start-button",rf=".vjs-big-play-button",af="PLAY_CONTROL",sf="PAUSE_CONTROL",of="REPLAY_CONTROL",uf="MUTE_CONTROL",lf="UNMUTE_CONTROL",cf="POSTER_CONTROL",df="MEDIA_CONTROL",hf="FULLSCREEN_CONTROL",pf="UNFULLSCREEN_CONTROL",ff="CAPTIONS_ON_CONTROL",mf="CAPTIONS_OFF_CONTROL",gf="MENU_CAPTIONS_ON_CONTROL",vf="MENU_CAPTIONS_OFF_CONTROL",yf="PROGRESS_SCRUBBER_CONTROL",_f="VOLUME_SLIDER_CONTROL",bf="BACK_TO_START_CONTROL",Tf="PLAY_OVERLAY_CONTROL",kf="SKIP_AHEAD_CONTROL",Sf="SKIP_BACK_CONTROL",Ef="THEATER_MODE_CONTROL",Cf="PLAYBACK_RATE_CONTROL",wf=ql.getComponent("Button"),If=10,Pf=function(e){d(i,e)
var t=g(i)
function i(e,n){var r,a=n.duration,s=void 0===a?If:a
o(this,i);(r=t.apply(this,arguments))._player=e
r._duration=s
e.playerInteraction().registerControl(r.el(),kf)
r.controlText("Skip ahead")
r.addClass("vjs-skip-ahead-button")
return r}l(i,[{key:"handleClick",value:function(){var e=this._player.currentTime()+this._duration
e>this._player.duration()&&(e=this._player.duration())
this._player.currentTime(e)
this.trigger("skipAhead")}}])
return i}(wf)
ql.registerComponent("SkipAheadButton",Pf)
var xf=ql.getComponent("Button"),Af=10,Of=function(e){d(i,e)
var t=g(i)
function i(e,n){var r,a=n.duration,s=void 0===a?Af:a
o(this,i);(r=t.apply(this,arguments))._player=e
r._duration=s
e.playerInteraction().registerControl(r.el(),Sf)
r.controlText("Skip back")
r.addClass("vjs-skip-back-button")
return r}l(i,[{key:"handleClick",value:function(){var e=this._player.currentTime()-this._duration,t=e<0?0:e
this._player.currentTime(t)
this.trigger("skipBack")}}])
return i}(xf)
ql.registerComponent("SkipBackButton",Of)
var Lf=function(e){d(i,e)
var t=g(i)
function i(e){var n
o(this,i);(n=t.apply(this,arguments))._player=e
n.controlText("Back to start")
n.addClass("vjs-back-to-start-button")
return n}l(i,[{key:"handleClick",value:function(){this._player.currentTime(0)
this.trigger("backToStart")}}])
return i}(ql.getComponent("Button"))
ql.registerComponent("BackToStartButton",Lf)
var Df=function(e){d(i,e)
var t=g(i)
function i(e){var n
o(this,i);(n=t.apply(this,arguments))._player=e
n._player.playerInteraction().registerControl(n.el(),Ef)
n.controlText("Theater mode")
n.addClass("vjs-theater-mode-button")
n.isTheaterModeEnabled=!1
return n}l(i,[{key:"handleClick",value:function(){this.isTheaterModeEnabled=!this.isTheaterModeEnabled
if(this.isTheaterModeEnabled){this.addClass("vjs-theater-mode-button--enabled")
this.controlText("Theater mode default view")
this.trigger("activate")}else{this.removeClass("vjs-theater-mode-button--enabled")
this.controlText("Theater mode")
this.trigger("deactivate")}}}])
return i}(ql.getComponent("Button"))
ql.registerComponent("TheaterModeButton",Df)
var Rf=ql.getComponent("PlaybackRateMenuButton"),Mf=ql.getComponent("PlaybackRateMenuItem"),Nf=ql.dom,Uf=function(e){d(i,e)
var t=g(i)
function i(){var e
o(this,i);(e=t.apply(this,arguments)).player().playerInteraction().registerControl(e.getChild("PlaybackRateMenuButton").el(),Cf)
return e}l(i,[{key:"createEl",value:function(){var e=v(h(i.prototype),"createEl",this).call(this)
this.labelEl_.setAttribute("aria-hidden",!0)
return e}},{key:"createItems",value:function(){var e=this,t=this.playbackRates(),i=[]
t&&t.forEach((function(t){var n=new Mf(e.player(),{rate:"".concat(t,"x")}),r=Nf.createEl("span",{className:"vjs-icon-placeholder"})
Nf.prependTo(r,n.el())
n.addClass("vjs-menu-item-checkable")
i.push(n)}))
return i}},{key:"handleClick",value:function(){this.buttonPressed_?this.unpressButton():this.pressButton()}}])
return i}(Rf)
ql.registerComponent("PlaybackRateMenuButton",Uf)
var Bf=function(e){d(i,e)
var t=g(i)
function i(e){var n
o(this,i);(n=t.apply(this,arguments)).addClass("vjs-poster-background")
n.setBackground()
n.on(e,"playerreset",n._playerReset)
n.on(e,"posterchange",n.setBackground)
return n}l(i,[{key:"setBackground",value:function(){var e=this.player().poster()
this.el().style.backgroundImage=e?"url(".concat(e,")"):"none"}},{key:"_playerReset",value:function(){this.el().style.backgroundImage="none"}}])
return i}(ql.getComponent("Component"))
ql.registerComponent("PosterBackground",Bf)
var Ff=ql.getComponent("Component"),jf=ql.dom,Vf="LEFT",Hf="RIGHT",qf={LEFT:"vjs-tooltip-left",RIGHT:"vjs-tooltip-right"},Wf=function(e){d(i,e)
var t=g(i)
function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.control,s=r.text
o(this,i)
fp("tooltip: must be pased a control",a);(n=t.apply(this,arguments)).player=e
n._control=a
n.setText(s)
n.on(a,"focus",n._onFocus)
n.on(a,"focusout",n._onFocusout)
n.on(a,"keydown",n._onKeydown)
n.on(a,"mouseenter",n._onMouseenter)
n.on(a,"mouseleave",n._onMouseleave)
n.on(n.player,"fullscreenchange",n._exitFullscreen)
n.on(n._tooltipContainer,"click",(function(e){if(e.target.classList.contains("vjs-tooltip-container")){e.preventDefault()
e.stopPropagation()}}))
return n}l(i,[{key:"createEl",value:function(){var e=qf[this.options_.side]||""
this._tooltip=v(h(i.prototype),"createEl",this).call(this,"div",{className:"vjs-tooltip"},{"aria-hidden":"true",role:"tooltip"})
this._tooltipContainer=v(h(i.prototype),"createEl",this).call(this,"div",{className:"vjs-tooltip-container ".concat(e)})
this._tooltipContainer.appendChild(this._tooltip)
return this._tooltipContainer}},{key:"show",value:function(){if(!this._isShowing){this.addClass("vjs-tooltip-active")
this._isShowing=!0}}},{key:"hide",value:function(){if(this._isShowing){this.removeClass("vjs-tooltip-active")
this._isShowing=!1}}},{key:"setText",value:function(e){var t=this.player.localize(e)
jf.textContent(this._tooltip,t)}},{key:"_onKeydown",value:function(e){"Escape"!==e.key&&"Esc"!==e.key||!this._isShowing||this.hide()}},{key:"_exitFullscreen",value:function(){this._isShowing&&this.hide()}},{key:"_onFocus",value:function(){this.show()}},{key:"_onFocusout",value:function(){this.hide()}},{key:"_onMouseenter",value:function(){this.show()}},{key:"_onMouseleave",value:function(){this.hide()}}])
return i}(Ff)
Wf.prototype.options_={name:"ControlTooltip"}
ql.registerComponent("ControlTooltip",Wf)
var Gf=function(e){d(i,e)
var t=g(i)
function i(){o(this,i)
return t.apply(this,arguments)}l(i,[{key:"handleClick",value:function(){var e=this
v(h(i.prototype),"handleClick",this).apply(this,arguments)
this.player().one("fullscreenchange",(function(){e.el().focus()}))}}])
return i}(ql.getComponent("FullscreenToggle"))
ql.registerComponent("FullscreenToggle",Gf)
var zf=function(e){d(i,e)
var t=g(i)
function i(e,n){var r
o(this,i)
r=t.call(this,e,n)
e.ready((function(){n.inline?e.controlBar.addClass("vjs-control-bar--inline"):e.controlBar.addClass("vjs-control-bar--tier")}))
return r}return l(i)}(ql.getComponent("ProgressControl"))
ql.registerComponent("ProgressControl",zf)
var Kf=ql.getComponent("Menu"),Xf=ql.dom,Yf="vjs-settings-menu-sub-menu-active",Qf=function(e){d(i,e)
var t=g(i)
function i(){var e
o(this,i);(e=t.apply(this,arguments))._selectedSubMenuItem=null
e.on("focusout",e._onFocusout)
return e}l(i,[{key:"createEl",value:function(){var e=v(h(i.prototype),"createEl",this).apply(this,arguments)
Xf.addClass(e,"vjs-settings-menu")
this._subMenus=Xf.createEl("div",{className:"vjs-settings-menu-sub-menus"})
e.appendChild(this._subMenus)
return e}},{key:"addItem",value:function(e){var t=this,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).index
this.addChild(e,void 0,i)
var n=e.getMenu()
if(n){this._subMenus.appendChild(n.el())
this.on(e,"select",(function(){return t._onSelectSubMenu(e)}))
this.on(e,"deselect",(function(){return t._onDeselectSubMenu(e)}))}}},{key:"_onFocusout",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).relatedTarget
if(this.menuButton_&&!this.el().contains(e)){this._selectedSubMenuItem&&this._selectedSubMenuItem.selected(!1)
this.menuButton_.el().contains(e)||this.menuButton_.unpressButton()}}},{key:"_onSelectSubMenu",value:function(e){var t=e.getMenu()
if(t){t.focus()
this.addClass(Yf)
this._selectedSubMenuItem=e}}},{key:"_onDeselectSubMenu",value:function(e){if(e.getMenu()){this.removeClass(Yf)
this.hasClass("vjs-lock-showing")&&e.focus()
this._selectedSubMenuItem=null}}}])
return i}(Kf)
ql.registerComponent("SettingsMenu",Qf)
var $f=ql.getComponent("MenuItem"),Jf=ql.dom,Zf=ql.mergeOptions,em="vjs-settings-menu-item-active",tm={selectable:!0,valueText:void 0},im=function(e){d(i,e)
var t=g(i)
function i(e,n){o(this,i)
return t.call(this,e,Zf({},tm,n))}l(i,[{key:"createMenu",value:function(){}},{key:"getMenu",value:function(){return this._menu}},{key:"createEl",value:function(){var e=this,t=v(h(i.prototype),"createEl",this).apply(this,arguments),n=this.options_,r=n.valueText,a=n.icon
Jf.addClass(t,"vjs-settings-menu-item")
this._menu=this.createMenu()
this._value=Jf.createEl("div",{className:"vjs-settings-menu-item-value"})
r&&this.setValueText(r)
t.appendChild(this._value)
a&&Jf.prependTo(Jf.createEl("span",{className:"vjs-icon-placeholder"}),t)
if(this._menu){var s=new i(this.player(),{label:this.options_.label,icon:!0,selectable:!1})
s.addClass("vjs-settings-menu-item-header")
s.on(["tap","click"],(function(){e.selected(!1)}))
this._menu.addChild(s,void 0,0)
Jf.addClass(t,"vjs-settings-menu-item-expandable")
t.appendChild(Jf.createEl("span",{className:"vjs-icon-placeholder"}))
t.setAttribute("aria-haspopup","true")
t.setAttribute("aria-expanded","false")}return t}},{key:"setValueText",value:function(e){e&&Jf.textContent(this._value,this.localize(e))}},{key:"selected",value:function(e){v(h(i.prototype),"selected",this).apply(this,arguments)
this.selectable&&(e?this._select():this._deselect())}},{key:"handleClick",value:function(){v(h(i.prototype),"handleClick",this).apply(this,arguments)
this.trigger("clicked")}},{key:"_select",value:function(){if(this._menu){this._menu.addClass(em)
this.el().setAttribute("aria-expanded","true")}this.trigger("select")}},{key:"_deselect",value:function(){if(this._menu){this._menu.removeClass(em)
this.el().setAttribute("aria-expanded","false")}this.trigger("deselect")}}])
return i}($f)
ql.registerComponent("SettingsMenuItem",im)
function nm(e){return!!e||!1===e||0===e}var rm=ql.mergeOptions,am=ql.getComponent("SettingsMenuItem"),sm=ql.getComponent("Toggle"),om={multiselectable:!0,selected:!0},um=function(e){d(i,e)
var t=g(i)
function i(e,n){var r
o(this,i)
var a=(r=t.call(this,e,rm({},om,n))).options_,s=a.userPrefsKey,u=a.enableUserPrefs,l=a.className
r.addClass("vjs-settings-toggle-menu-item")
l&&r.addClass(l)
if(u&&e.usingPlugin("userPreferences")){r._userPrefs=e.userPreferences()
r._userPrefsKey=s
e.ready((function(){var e=r._userPrefs.get(s)
nm(e)&&r.selected(e)}))}return r}l(i,[{key:"createEl",value:function(){var e=v(h(i.prototype),"createEl",this).apply(this,arguments)
this._toggle=this._createToggle()
e.appendChild(this._toggle.el())
return e}},{key:"handleClick",value:function(){this.selected(!this.isSelected_)
this._userPrefs&&this._userPrefs.set(this._userPrefsKey,this.isSelected_)}},{key:"selected",value:function(e){if(nm(e)&&e!==this._lastSelected){v(h(i.prototype),"selected",this).apply(this,arguments)
if(e){this.setValueText("On")
this._toggle.check()}else{this.setValueText("Off")
this._toggle.uncheck()}this._lastSelected=e}return this.isSelected_}},{key:"_createToggle",value:function(){return new sm(this.player(),{readonly:!0})}}])
return i}(am)
ql.registerComponent("SettingsToggleMenuItem",um)
var lm=ql.getComponent("SettingsMenu"),cm=function(e){d(i,e)
var t=g(i)
function i(){var e
o(this,i);(e=t.apply(this,arguments)).addClass("vjs-settings-menu-button")
return e}l(i,[{key:"createMenu",value:function(){var e=new lm(this.player(),{menuButton:this})
this.hideThreshold_=0
this.items||(this.items=this.createItems())
this.items.forEach((function(t){e.addItem(t)}))
return e}},{key:"createItems",value:function(){var e,t=this,i=this.options_&&this.options_.items||[]
if(Array.isArray(i)){e=i
i={}}else e=Object.keys(i)
return e.map((function(e){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:""
return e.charAt(0).toUpperCase()+e.slice(1)}(e),r=ql.getComponent(n)
fp("settings-menu: Component ".concat(n," must exist"),r)
var a=new r(t.player(),i[e]||{})
a.addClass("vjs-settings-menu-button-item")
return a}))}}])
return i}(ql.getComponent("MenuButton"))
cm.prototype.controlText_="Settings"
ql.registerComponent("SettingsMenuButton",cm)
var dm=ql.mergeOptions,hm=ql.getComponent("SettingsToggleMenuItem"),pm=function(e){d(i,e)
var t=g(i)
function i(){o(this,i)
return t.apply(this,arguments)}return l(i)}(hm)
pm.prototype.options_=dm(hm.prototype.options_,{label:"Autoplay",name:"AutoplaySetting",enableUserPrefs:!0,userPrefsKey:"autoplay",className:"vjs-autoplay-setting"})
ql.registerComponent("AutoplaySetting",pm)
var fm=ql.mergeOptions,mm=ql.getComponent("SettingsToggleMenuItem"),gm=function(e){d(i,e)
var t=g(i)
function i(){o(this,i)
return t.apply(this,arguments)}return l(i)}(mm)
gm.prototype.options_=fm(mm.prototype.options_,{label:"Auto-advance",name:"AutoAdvanceSetting",enableUserPrefs:!0,userPrefsKey:"auto-advance",className:"vjs-auto-advance-setting"})
ql.registerComponent("AutoAdvanceSetting",gm)
var vm=ql.mergeOptions,ym=ql.getComponent("SettingsMenu"),_m=ql.getComponent("SettingsMenuItem"),bm={multiselectable:!1,selected:!1},Tm="quality-adapt",km="quality-prog"
function Sm(e){return"auto"===e?"Auto":"".concat(e,"p")}var Em=function(e){d(i,e)
var t=g(i)
function i(e,n){var r
o(this,i)
r=t.call(this,e,vm({},bm,n))
fp("quality-setting: The qualityLevels plugin is required",e.hasPlugin("qualityLevels"))
r.addClass("vjs-quality-setting")
r._qualityLevels=e.qualityLevels()
r._items=[]
r._qualities=[]
r._selectedHeight=null
if(e.usingPlugin("userPreferences")){r._userPrefs=e.userPreferences()
r._userPrefsKey=r.options_.userPrefsKey}r.on(r._qualityLevels,"addqualitylevel",r._onAddQualityLevel)
r.on(r._qualityLevels,"removequalitylevel",r._onRemoveQualityLevel)
r.on(r.player_,"sourceset",r._onSourceSet)
r.on(r.player_,"loadedmetadata",r._onLoadedMetadata)
r.on(r.player_,"playerreset",r._onPlayerReset)
return r}l(i,[{key:"createMenu",value:function(){var e=new ym(this.player_)
e.addClass("vjs-quality-setting-sub-menu")
return e}},{key:"_onSourceSet",value:function(){this._isAdaptive()&&this._onAddQualityLevel({qualityLevel:{height:"auto"}})}},{key:"_onLoadedMetadata",value:function(){this._qualityLevels.length?this.enable():this.disable()
var e=this._userPrefs&&this._userPrefs.get(this._getUserPrefKey()),t=this._items[e]&&e
if(!t)if(this._isAdaptive())t="auto"
else{var i=this._qualityLevels,n=i[i.selectedIndex]
t=n&&n.height}var r=this._items[t]
r&&r.selected(!0)}},{key:"_onPlayerReset",value:function(){var e=this
this._qualities.forEach((function(t){e._removeQualityLevelMenuItem({height:t})}))
this._qualities=[]
this._selectedHeight=null}},{key:"_onAddQualityLevel",value:function(e){var t=e.qualityLevel,i=t.height
if(i&&-1===this._qualities.indexOf(i)){this._qualities.push(i)
this._qualities.sort((function(e,t){return e-t}))
this._addQualityLevelMenuItem(t)}}},{key:"_onRemoveQualityLevel",value:function(e){var t=e.qualityLevel,i=t.height,n=i?this._qualities.indexOf(i):null
if(i&&n>-1){this._qualities.splice(n,1)
this._removeQualityLevelMenuItem(t)}}},{key:"_addQualityLevelMenuItem",value:function(e){var t=this,i=e.height,n=new _m(this.player_,{icon:!0,label:Sm(i),selected:!1})
this.on(n,"select",(function(){t.trigger("change",e)
t._onSelectQuality(e)}))
this.on(n,"clicked",(function(){t._userPrefs&&t._selectedHeight&&t._userPrefs.set(t._getUserPrefKey(),t._selectedHeight)}))
n.addClass("vjs-quality-setting-level")
n.addClass("vjs-menu-item-checkable")
this._items[i]=n
var r=this._qualities.indexOf(i)
this._menu.addItem(n,{index:r>-1?r+1:void 0})}},{key:"_removeQualityLevelMenuItem",value:function(e){var t=e.height,i=this._items[t]
this._menu.removeChild(i)
i.dispose()
delete this._items[t]}},{key:"_onSelectQuality",value:function(e){var t=e.height
if(this._selectedHeight!==t){var i=this._qualityLevels,n=this._items[this._selectedHeight]
n&&n.selected(!1)
if(this._isAdaptive())for(var r=0;r<i.length;r++){var a=i[r]
a.enabled=a.height===t||"auto"===t}else{var s=i.levels_.findIndex((function(e){return e.height===t}))
i.selectedIndex_=s
i.trigger({type:"change",selectedIndex:s})}this.setValueText(Sm(t))
this._selectedHeight=t
this.selected(!1)}}},{key:"_isAdaptive",value:function(){return!!this.player_.tech({IWillNotUseThisInPlugins:!0}).vhs}},{key:"_getUserPrefKey",value:function(){var e=this._userPrefsKey
e||(e=this._isAdaptive()?Tm:km)
return e}}])
return i}(_m)
Em.prototype.options_=vm(_m.prototype.options_,{label:"Quality",name:"QualitySetting"})
ql.registerComponent("QualitySetting",Em)
var Cm=function(e){d(i,e)
var t=g(i)
function i(){o(this,i)
return t.apply(this,arguments)}l(i,[{key:"createEl",value:function(){return v(h(i.prototype),"createEl",this).call(this,"div",{className:"vjs-time-display vjs-control"},{translate:"no"})}}])
return i}(ql.getComponent("Component"))
Cm.prototype.options_={name:"TimeDisplay",children:["currentTimeDisplay","timeDivider","durationDisplay"]}
ql.registerComponent("TimeDisplay",Cm)
var wm=ql.getComponent("Component"),Im=ql.dom,Pm=function(e){d(i,e)
var t=g(i)
function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.id,s=r.hideOnInactivity,u=void 0===s||s,l=r.hideBeforeStart,c=void 0===l||l
o(this,i);(n=t.apply(this,arguments)).addClass("vjs-player-banner")
u&&n.addClass("vjs-hide-on-inactivity")
c&&n.addClass("vjs-hide-before-start")
a&&n.contentEl().setAttribute("id",a)
return n}l(i,[{key:"fillWith",value:function(e){Im.insertContent(this.contentEl(),e)}}])
return i}(wm)
ql.registerComponent("PlayerBanner",Pm)
var xm=ql.getComponent("Component"),Am=ql.dom,Om=function(e){d(i,e)
var t=g(i)
function i(){o(this,i)
return t.apply(this,arguments)}l(i,[{key:"createEl",value:function(){this._display=Am.createEl("div",void 0,{class:"media-player-audio-animated-background"})
this._animationSandbox=Am.createEl("iframe",{sandbox:"allow-same-origin"},{class:"media-player-animation-container"})
this._display.appendChild(this._animationSandbox)
return this._display}},{key:"setAnimation",value:function(e){if(e){this._animationSvg=e
var t=this._animationSandbox.contentWindow.document.body
t.style.margin=0
t.appendChild(this._animationSvg)}}},{key:"pauseAnimation",value:function(){var e
null===(e=this._animationSvg)||void 0===e||e.pauseAnimations()}},{key:"unpauseAnimation",value:function(){var e
null===(e=this._animationSvg)||void 0===e||e.unpauseAnimations()}}])
return i}(xm)
ql.registerComponent("AudioAnimatedBackground",Om)
function Lm(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]
e&&"function"==typeof e[t]&&e[t].apply(e,_(i))}function Dm(){return window.performance&&window.performance.timing&&"function"==typeof window.performance.now?Math.round(window.performance.now())+(window.performance.timing.navigationStart||1):(new Date).getTime()}var Rm="MediaInitializationStartEvent",Mm="MediaInitializationEndEvent",Nm="MediaBufferingStartEvent",Um="MediaBufferingEndEvent",Bm="MediaPlaybackErrorV2Event",Fm="MediaBitrateChangedEvent",jm="MediaRenderedEvent",Vm="CAPTION",Hm="CUSTOM",qm="ABORTED",Wm="NETWORK",Gm="DECODING",zm="SOURCE_FILE",Km="ENCRYPTION",Xm="INIT",Ym="SEEK",Qm={EDGECAST:"ecst",AKAMAI:"akam"},$m="STREAMING",Jm="PROGRESSIVE",Zm="HLS",eg="VIDEO",tg="HTML5",ig={FREE:"FREE",PAID:"PAID",ENTERPRISE:"ENTERPRISE",GUEST:"GUEST"},ng=Object.keys(Qm).map((function(e){return Qm[e]})),rg=["ads","assessments","career_video","learning","linkedin","live_video","messaging","slideshare","stories","ugc.aws","ugc.inhouse","ugc"],ag={IS_LIVE:"IS_LIVE",WAS_LIVE:"WAS_LIVE",PRE_RECORDED:"PRE_RECORDED"},sg=Object.assign||function(e,t){Object.keys(t).forEach((function(i){e[i]=t[i]}))
return e}
function og(e){var t,n=e.staticMediaHeader,r=e.player,a=e.primaryMediaTrackingId,s=r.tech({IWillNotUseThisInPlugins:!0}).vhs
return i(i({},n),{},{primaryMediaTrackingId:a,userBandwidth:navigator.connection&&1e3*navigator.connection.downlink*1e3,playerEstimatedBandwidth:null==s||null===(t=s.stats)||void 0===t?void 0:t.bandwidth})}function ug(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.cdnProvider,n=t.accountAccessType,r=t.mediaSource,a=t.contextTrackingId,s=t.fetchCDN,o=void 0!==s&&s
i&&fp("media-player: rum: cdnProvider must be a valid param",ng.includes(i))
n&&fp("media-player: rum: accountAccessType must be a valid param",ig[n])
r&&mp("media-player: rum: mediaSource must be a valid param",rg.includes(r))
var u=!!e.tech({IWillNotUseThisInPlugins:!0}).vhs,l={deliveryMode:u?$m:Jm,playerType:tg,mediaType:eg,cdnProvider:i}
o&&function(e,t){fetch(t,{method:"HEAD"}).then((function(t){var i=t.headers
e.cdnProvider=i.get("x-cdn")}))}(l,e.currentSource().src)
n&&(l.accountAccessType=n)
r&&(l.mediaSource=r)
a&&(l.contextTrackingId=a)
u&&(l.streamProtocol=Zm)
return l}function lg(e,t){return"live_video"!==e?ag.PRE_RECORDED:t.duration()===1/0?ag.IS_LIVE:ag.WAS_LIVE}var cg=function(){function e(t){o(this,e)
this._bufferingRanges={}
this.staticMediaHeader={}
this.mediaLiveState=null
this.mediaTrackingObject={objectUrn:""}
this.player=t}l(e,[{key:"setPrimaryMediaTrackingId",value:function(e){this._primaryMediaTrackingId=e}},{key:"_getMediaHeader",value:function(){return og({staticMediaHeader:this.staticMediaHeader,player:this.player,primaryMediaTrackingId:this._primaryMediaTrackingId})}},{key:"_buildInitializationBeacon",value:function(e){var t={mobileHeader:null,mediaHeader:this._getMediaHeader(),mediaTrackingObject:this.mediaTrackingObject,initializationStartTime:this._initializationStartTs}
if(!e){t.duration=this._initializationEndTs-this._initializationStartTs
t.mediaLiveState=this.mediaLiveState}return{eventName:e?Rm:Mm,eventBody:t}}},{key:"_buildBufferingEventBeacon",value:function(e,t){var i=this._bufferingRanges[e],n={mobileHeader:null,mediaHeader:this._getMediaHeader(),mediaTrackingObject:this.mediaTrackingObject,mediaLiveState:this.mediaLiveState,bufferingType:i.type,initializationStartTime:this._initializationStartTs,bufferingStartTime:i.start}
if(!t){n.duration=i.end-i.start
delete this._bufferingRanges[e]}return{eventName:t?Nm:Um,eventBody:n}}},{key:"_buildMediaPlaybackErrorEventBeacon",value:function(e,t,i){var n={mobileHeader:null,mediaHeader:this._getMediaHeader(),mediaTrackingObject:this.mediaTrackingObject,mediaLiveState:this.mediaLiveState,errorType:e}
"string"==typeof t&&(n.errorMessage=t)
"string"==typeof i&&""!==i&&(n.url=i)
return{eventName:Bm,eventBody:n}}},{key:"_buildMediaBitrateChangedEventBeacon",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
return{eventName:Fm,eventBody:sg({mobileHeader:null,mediaHeader:this._getMediaHeader(),mediaTrackingObject:this.mediaTrackingObject,mediaLiveState:this.mediaLiveState},e)}}},{key:"_buildMediaRenderedEvent",value:function(e){this._ensureInitCalled()
return{eventName:jm,eventBody:{mobileHeader:null,mediaHeader:this._getMediaHeader(),mediaLiveState:this.mediaLiveState,mediaTrackingObject:this.mediaTrackingObject,perceivedTimeToFirstFrameDuration:e}}}},{key:"_ensureInitCalled",value:function(){if("number"!=typeof this._initializationStartTs)throw new Error("initializationStart not called")}},{key:"_throwErrorIfBufferingEventInvalid",value:function(e,t){this._ensureInitCalled()
if("number"!=typeof e)throw new TypeError("bufferingId not a number")
if(t){if("object"===r(this._bufferingRanges[e]))throw new Error("duplicate bufferingId")}else if("object"!==r(this._bufferingRanges[e])||void 0!==this._bufferingRanges[e].end)throw new Error("incorrect bufferingId or wrong buffering type")}},{key:"setTrackingId",value:function(e){this.mediaTrackingObject.trackingId=e}},{key:"setObjectUrn",value:function(e){this.mediaTrackingObject.objectUrn=e}},{key:"setStaticMediaHeader",value:function(e){this.staticMediaHeader=e}},{key:"setMediaLiveState",value:function(e){fp("rum-video-tracking: Must provide a valid mediaLiveState",ag[e])
this.mediaLiveState=e}},{key:"initializationStart",value:function(){this._initializationStartTs=Dm()
return this._buildInitializationBeacon(!0)}},{key:"initializationEnd",value:function(){this._ensureInitCalled()
this._initializationEndTs=Dm()
return this._buildInitializationBeacon(!1)}},{key:"mediaRenderStart",value:function(){this._renderStart=Dm()}},{key:"mediaRenderEnd",value:function(e){if(!this._renderStart)throw new Error("mediaRenderStart not called before mediaRenderEnd")
return this._buildMediaRenderedEvent((e||Dm())-this._renderStart)}},{key:"bufferingStart",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,i=void 0===t?null:t,n=!0
this._throwErrorIfBufferingEventInvalid(e,n)
this._bufferingRanges[e]={start:Dm(),type:i}
return this._buildBufferingEventBeacon(e,n)}},{key:"bufferingEnd",value:function(e){var t=!1
this._throwErrorIfBufferingEventInvalid(e,t)
this._bufferingRanges[e].end=Dm()
return this._buildBufferingEventBeacon(e,t)}},{key:"mediaPlaybackError",value:function(e,t,i){var n=i
if("string"==typeof n&&""!==n){var r=n.match("^[^?]+")
n=y(r,1)[0]}return this._buildMediaPlaybackErrorEventBeacon(e,t,n)}},{key:"bitrateChangedEvent",value:function(e){return this._buildMediaBitrateChangedEventBeacon(e)}}])
return e}(),dg={0:Hm,1:qm,2:Wm,3:Gm,4:zm,5:Km},hg=function(e){d(i,e)
var t=g(i)
function i(e,n){var r,a=n.mediaUrn,s=n.trackingId,u=n.mediaHeader,l=n.onTrack,c=n.resetMediaRenderStartOnPause,d=void 0!==c&&c,h=n.primaryMediaTrackingId,p=n.suppressMediaRenderWhenOutOfViewport,f=void 0!==p&&p
o(this,i);(r=t.apply(this,arguments))._bufferId=0
r._resetMediaRenderStartOnPause=d
r._suppressMediaRenderWhenOutOfViewport=f
r.setState({mediaUrn:a,trackingId:s,mediaHeader:u,onTrack:l,primaryMediaTrackingId:h})
r.on(e,"sourceset",r._onSourceset)
r.on(e,"loadstart",r._onLoadStart)
r.on(e,"loadedmetadata",r._onLoadedMetadata)
r.on(e,"loadeddata",r._onLoadedData)
r.on(e,"play",r._onPlay)
r.on(e,"playing",r._onPlaying)
r.on(e,"pause",r._onPause)
r.on(e,"waiting",r._onWaiting)
r.on(e,"error",r._onError)
r.on(e,"dispose",r._onDispose)
r.on(e,"playerreset",r._onPlayerReset)
r.on(e,"autoplay-failure",r._onAutoplayFailure)
var m=r.player.textTracks()
m&&r.on(m,"addtrack",r._onAddTrack)
e.ready((function(){r.player.usingPlugin("playlist")&&r.on(e.playlist(),"itemchange",(function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).plugins
fp("rum must be updated on playlist item change",(void 0===t?{}:t).rum)}))}))
return r}l(i,[{key:"createNewSession",value:function(e){var t=e.mediaUrn,i=e.trackingId,n=e.primaryMediaTrackingId
this.setState({mediaUrn:t,trackingId:i,primaryMediaTrackingId:n})
this.tracker.setPrimaryMediaTrackingId(n)}},{key:"handleStateChanged",value:function(e){var t=e.changes
if(t.mediaUrn||t.trackingId){var i=this.state.mediaUrn,n=t.trackingId
fp("rum: mediaUrn is required when updating trackingId",i)
n&&n.from!==n.to&&this.player.generateTrackingId().setTrackingId(n.to)
this.tracker=new cg(this.player)
this.tracker.setObjectUrn(i)
this.tracker.setTrackingId(this.player.generateTrackingId().getTrackingId())}t.primaryMediaTrackingId&&this.tracker.setPrimaryMediaTrackingId(t.primaryMediaTrackingId.to)}},{key:"getEventHash",value:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},{key:"_setInitializationStart",value:function(){if(!this._isInitializationStarted){this.tracker.setStaticMediaHeader(ug(this.player,this.state.mediaHeader))
this._trigger(this.tracker.initializationStart())
this._isInitializationStarted=!0}}},{key:"_setInitializationEnd",value:function(){if(!this._isInitializationEnded){this._trigger(this.tracker.initializationEnd())
this._isInitializationEnded=!0}}},{key:"_setMediaRenderStart",value:function(){if(!this._isMediaRenderStarted){this.tracker.mediaRenderStart()
this._isMediaRenderStarted=!0}}},{key:"_setMediaRenderEnd",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null
if(!this._isMediaRenderEnded){this._trigger(this.tracker.mediaRenderEnd(e))
this._isMediaRenderEnded=!0}}},{key:"_setBufferingStart",value:function(){if(!this._isBuffering){this._isBuffering=!0
this._bufferId++
var e=null
this.player.seeking()?e=Ym:this._hasPlayed||(e=Xm)
this._trigger(this.tracker.bufferingStart(this._bufferId,{type:e}))}}},{key:"_setBufferingEnd",value:function(){if(this._isBuffering){this._trigger(this.tracker.bufferingEnd(this._bufferId))
this._isBuffering=!1}}},{key:"_onSourceset",value:function(){this._reset()}},{key:"_onLoadStart",value:function(){"none"!==this.player.preload()&&this._setInitializationStart()}},{key:"_onLoadedMetadata",value:function(){var e=this.state.mediaHeader,t=(e=void 0===e?{}:e).mediaSource
this.tracker.setMediaLiveState(lg(t,this.player))
this._metadataTrack=this.player.textTracks().tracks_.find((function(e){return"segment-metadata"===e.label}))
this._metadataTrack&&this.on(this._metadataTrack,"cuechange",this._onBitrateChange)}},{key:"_onLoadedData",value:function(){this._setInitializationStart()
this._setInitializationEnd()}},{key:"_onPlay",value:function(){this._setInitializationStart()
this._setMediaRenderStart()}},{key:"_onPause",value:function(){this._setBufferingEnd()
this._resetMediaRenderStartOnPause&&this._isMediaRenderStarted&&!this._isMediaRenderEnded&&(this._isMediaRenderStarted=!1)}},{key:"_onAutoplayFailure",value:function(){this._setBufferingEnd()}},{key:"_onPlaying",value:function(){this._hasPlayed=!0
this._setBufferingEnd()
if(!this._suppressMediaRenderWhenOutOfViewport||(e=this.player.el(),t=e.getBoundingClientRect(),i=t.top,n=t.left,r=t.bottom,a=t.right,s=window,o=s.innerWidth,u=s.innerHeight,(i>=0&&i<=u||r>=0&&r<=u)&&(n>=0&&n<=o||a>=0&&a<=o))){var e,t,i,n,r,a,s,o,u
this._setMediaRenderEnd(this._mediaRenderEndTime)}else this._mediaRenderEndTime=Dm()}},{key:"_onWaiting",value:function(){this._setBufferingStart()}},{key:"_onBitrateChange",value:function(){var e=this._metadataTrack.activeCues[0],t=e&&e.value
if(t&&t.playlist!==this._lastCuePlaylist){var i=Math.floor(1e3*(t.end-t.start)),n=y(t.codecs?t.codecs.split(",").map((function(e){return e.trim()})):[],2),r=n[0],a=n[1]
this._trigger(this.tracker.bitrateChangedEvent({newBitrate:t.bandwidth,viewingDisplaySize:{width:this.player.currentWidth(),height:this.player.currentHeight()},encodedDisplaySize:t.resolution,audioCodec:a,videoCodec:r,newSegmentDuration:i,targetSegmentDuration:6e3,frameRate:60}))
this._lastCuePlaylist=t.playlist}}},{key:"_onError",value:function(){this._setBufferingEnd()
var e=this.player.error(),t=this.player.currentSrc(),i=this.tracker.mediaPlaybackError(dg[e.code],e.message,t)
this._trigger(i)}},{key:"_onAddTrack",value:function(e){var t=e.track
t&&"captions"===t.kind&&!this.player.options().html5.nativeTextTracks&&this.one(t,"loadeddata",this._onCaptionsLoad)}},{key:"_onCaptionsLoad",value:function(){var e=this.player.log.history().find((function(e){var t=y(e,3)[2]
return t&&"ParsingError"===t.name}))
if(e){var t=[].find.call(this.player.textTracks(),(function(e){return"captions"===e.kind})),i=this.tracker.mediaPlaybackError(Vm,e[2].message,t.src)
this._trigger(i)}}},{key:"_onPlayerReset",value:function(){this._reset()}},{key:"_onDispose",value:function(){this._reset()}},{key:"_trigger",value:function(e){var t=e.eventBody,i=e.eventName
this.trigger(i,t)
this.trigger("track",{eventName:i,eventData:t})
Lm(this.state,"onTrack",[i,t])}},{key:"_reset",value:function(){this._setBufferingEnd()
this._isInitializationStarted=!1
this._isInitializationEnded=!1
this._isBuffering=!1
this._isMediaRenderStarted=!1
this._isMediaRenderEnded=!1
this._hasPlayed=!1
this._mediaRenderEndTime=null
if(this._metadataTrack){this.off(this._metadataTrack,"cuechange",this._onBitrateChange)
this._metadataTrack=null}}}])
return i}(ql.getPlugin("plugin"))
ql.registerPlugin("rum",hg)
var pg=ql.getPlugin("plugin"),fg={viewQuartile:.25,viewMidpoint:.5,viewThirdQuartile:.75,viewCompletion:.97},mg=Object.keys(fg),gg=function(e){d(i,e)
var t=g(i)
function i(e,n){var r,a=n.pageContext,s=n.onTrack
o(this,i)
r=t.apply(this,arguments)
fp("moat: pageContext is required field which must be a value referring to SponsoredVideoViewEvent.pageContext",a)
r.setState({pageContext:a,onTrack:s})
r._setInitialState()
r.on(e,"ended",r._onEnded)
r.on(e,"playing",r._onPlaying)
r.on(e,"pause",r._onPause)
r.on(e,"loadedmetadata",r._onLoadedMetadata)
r.on(e,"timeupdate",r._onTimeUpdate)
r.on(e,"playerreset",r._onPlayerreset)
r.on(e.playerInteraction(),"interact",r._onInteract)
return r}l(i,[{key:"getEventHash",value:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},{key:"_setInitialState",value:function(){sg(this,{_elapsedPlaybackTime:0,_currentTime:0,_previousTime:0,_hasFiredViewVideo:!1,_hasFiredViewPlayStart:!1})}},{key:"_onInteract",value:function(e,t){var i,n,r=t.controlId,a=t.meta
switch(r){case df:i=this.player.paused()?"pauseVideo":"playVideo"
n="video_play_pause"
break
case cf:case Tf:i="playVideo"
n="video_thumbnail_play"
break
case af:i="playVideo"
n="video_toolbar_play_pause"
break
case sf:i="pauseVideo"
n="video_toolbar_play_pause"
break
case hf:i="fullscreenVideo"
n="video_toolbar_fullscreen_toggle"
break
case pf:i="unfullscreenVideo"
n="video_toolbar_fullscreen_toggle"
break
case yf:i="seekVideo"
n="video_toolbar_scrubber"
break
case of:i="replayVideo"
n="video_toolbar_replay"}i&&n&&this.fireVideoActionEvent(i,n,a)}},{key:"_didSeekOccur",value:function(){return Math.abs(this._currentTime-this._previousTime)>2}},{key:"_maybeFireViewVideoEvent",value:function(){var e=this
this._hasFiredViewVideo||this._elapsedPlaybackTime>2&&this.fireVideoViewEvent("viewVideo",(function(){e._hasFiredViewVideo=!0
e._elapsedPlaybackTime=0}))}},{key:"_trigger",value:function(e,t,i){this.trigger(e,sg(t,i))
this.trigger("track",{eventName:e,eventData:t,meta:i})
Lm(this.state,"onTrack",[e,t,i])}},{key:"_onEnded",value:function(){this.fireVideoViewEvent("viewFullCompletion")}},{key:"_onPause",value:function(){this.resetElapsedPlaybackTime()}},{key:"_onPlaying",value:function(){var e=this
this._hasFiredViewPlayStart||this.fireVideoViewEvent("viewPlayStart",(function(){e._hasFiredViewPlayStart=!0}))}},{key:"_onLoadedMetadata",value:function(){this.computeThresholds()}},{key:"_onTimeUpdate",value:function(){this.updateCurrentPlayerPosition()}},{key:"_onPlayerreset",value:function(){this._setInitialState()}},{key:"computeThresholds",value:function(){var e=1e3*this.player.duration()
this._thresholds=mg.reduce((function(t,i){var n=fg[i]
t[i]=Math.floor(n*e)
return t}),{})}},{key:"fireElapsedThresholdEvents",value:function(){var e=this
if(this._thresholds){var t=Math.floor(1e3*this._previousTime),i=Math.floor(1e3*this._currentTime)
mg.forEach((function(n){var r=e._thresholds[n]
t<r&&i>=r&&e.fireVideoViewEvent(n)}))}}},{key:"fireVideoViewEvent",value:function(e,t){var i=!this.player.muted()&&this.player.volume()>0,n=this.player.duration()
if(n){var r={videoDuration:1e3*n,isVideoAudible:i,videoUIContext:this.state.pageContext,timestamp:Date.now()}
this._trigger("viewEvent",{eventName:e,trackingParams:r})
"function"==typeof t&&t()}}},{key:"fireVideoActionEvent",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
this._trigger("actionEvent",{actionName:e,controlName:t,timestamp:Date.now()},i)}},{key:"updateCurrentPlayerPosition",value:function(){this._previousTime=this._currentTime||0
this._currentTime=this.player.currentTime()||0
if(this._didSeekOccur())this.resetElapsedPlaybackTime()
else{this._elapsedPlaybackTime+=this._currentTime-this._previousTime
this._maybeFireViewVideoEvent()
this.fireElapsedThresholdEvents()}}},{key:"resetElapsedPlaybackTime",value:function(){this._elapsedPlaybackTime=0}}])
return i}(pg)
ql.registerPlugin("moat",gg)
var vg={PLAYER_ASK_TO_PLAY_EVENT:"PlayerAskToPlayEvent",PLAYER_BEACON_EVENT:"PlayerBeaconEvent",PLAYER_PLAY_PAUSE_EVENT:"PlayerPlayPauseEvent",PLAYER_PLAYBACK_EXIT_EVENT:"PlayerPlaybackExitEvent",PLAYER_PLAYBACK_STALL_EVENT:"PlayerPlaybackStallEvent",PLAYER_SEEK_EVENT:"PlayerSeekEvent",PLAYER_VOLUME_CHANGED_EVENT:"PlayerVolumeChangedEvent",MULTIVARIANT_PLAYLIST_FETCHED_EVENT:"MultivariantPlaylistFetchedEvent",MEDIA_PLAYLIST_FETCHED_EVENT:"MediaPlaylistFetchedEvent",SEGMENT_FETCHED_EVENT:"SegmentFetchedEvent"},yg={AUTOPLAY_ON_LOAD:"AUTOPLAY_ON_LOAD",DISALLOW_BACKGROUND_PLAYBACK:"DISALLOW_BACKGROUND_PLAYBACK",ENTERED_VIEWPORT:"ENTERED_VIEWPORT",EXITED_VIEWPORT:"EXITED_VIEWPORT",USER_TRIGGERED:"USER_TRIGGERED",VIDEO_PRIORITY_CHANGED:"VIDEO_PRIORITY_CHANGED",VIDEO_AUTOLOOPED:"VIDEO_AUTOLOOPED"},_g={ENTERED_VIEWPORT:"ENTERED_VIEWPORT",USER_TRIGGERED:"USER_TRIGGERED",AUTO_TRIGGERED:"AUTO_TRIGGERED",UNKNOWN:"UNKNOWN"},bg="ERROR",Tg="END",kg="PLAYING",Sg="STALLING",Eg="UNKNOWN",Cg="ENDED",wg="STARTED",Ig="ON",Pg="OFF",xg="NOT_MEASURED",Ag={CAPTIONS_ON_CONTROL:!0,CAPTIONS_OFF_CONTROL:!0,MENU_CAPTIONS_ON_CONTROL:!0,MENU_CAPTIONS_OFF_CONTROL:!0},Og="LOCAL",Lg="BROWSER_CACHE",Dg="CDN_CACHE_HIT",Rg="CDN_CACHE_MISS",Mg="UNKNOWN",Ng="timing-allow-origin",Ug="x-cache",Bg="x-cdn",Fg=ql.getPlugin("plugin"),jg=[3e3,7e3,2e4,3e4],Vg=function(e){d(n,e)
var t=g(n)
function n(e,i){var r,a=i.mediaUrn,s=i.trackingId,u=i.mediaHeader,l=i.onTrack,c=i.primaryMediaTrackingId
o(this,n)
r=t.apply(this,arguments)
fp("tracking: playerInteraction plugin is required",e.hasPlugin("playerInteraction"))
r._qualityLevels=e.qualityLevels()
r._hasRenderedFirstFrame=!1
r._isPlaying=!1
r._isStalled=!1
r._isCcVisible=Pg
r._volume=r._getVolume()
r._fullscreenState=r._getFullScreenState()
r._isVisible=null
r._pauseReason=null
r._playReason=null
r._staticMediaHeader=null
r._currentPlaylist=null
r._currentTime=0
r._currentBeaconInterval=null
r._multivariantPlaylistDetails={}
r._mediaPlaylistDetails={}
r._firstSegmentDetails={}
r.setState({mediaUrn:a,trackingId:s,mediaHeader:u,onTrack:l,primaryMediaTrackingId:c})
var d=r._onUnload.bind(f(r)),h=Op(r._onSeeked,300),p=Op(r._onVolumeChange,300)
r.on(e.playerInteraction(),"interact",r._onPlayerInteraction)
r.on(e,"fullscreenchange",r._onFullscreenChange)
r.on(e,"pause",r._onPause)
r.on(e,"play",r._onPlay)
r.on(e,"error",r._onError)
r.on(e,"playing",r._onPlaying)
r.on(e,"timeupdate",r._onTimeupdate)
r.on(e,"ratechange",r._onRateChange)
r.on(e,"seeked",h)
r.on(e,"seeking",r._onSeeking)
r.on(e,"volumechange",p)
r.on(e,"waiting",r._onWaiting)
r.on(e,"sourceset",r._onSourceSet)
r.on(e,"playerreset",r._onPlayerReset)
r.on(e,"loadstart",r._onLoadStart)
r.one(e,"loadedmetadata",r._onLoadedMetadata)
r.one(e,"play",r._onFirstPlayOfSource)
r._isFetchRequestFiringEnabled=e.xhrHooks().enabled
r._isFetchRequestFiringEnabled&&r.on(e.xhrHooks(),"response",r._onXhrResponse)
var m="onpagehide"in window?"pagehide":"beforeunload"
window.addEventListener(m,d)
r.on("dispose",(function(){window.removeEventListener(m,d)
h.clear()
p.clear()}))
e.ready((function(){var t=e.playerVisibility()
t.rea