(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-monitor"],{"0158":function(e,t,i){"use strict";i.r(t);var r=i("0247"),n=i.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t["default"]=n.a},"0235":function(e,t,i){"use strict";i.d(t,"i",(function(){return l})),i.d(t,"h",(function(){return u})),i.d(t,"d",(function(){return c})),i.d(t,"f",(function(){return d})),i.d(t,"e",(function(){return p})),i.d(t,"c",(function(){return f})),i.d(t,"g",(function(){return m})),i.d(t,"a",(function(){return g})),i.d(t,"b",(function(){return v}));var r=i("be09"),n=i.n(r),a={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},s=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){var r=("00"+Number(t).toString(16)).slice(-2),n=("00"+Number(i).toString(16)).slice(-2);return"avc1."+r+"00"+n})):e},u=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),s.forEach((function(r){var n=a[r].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=r;var s=e.substring(0,n[1].length),o=e.replace(s,"");i.push({type:s,details:o,mediaType:r})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},c=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var r in i){var n=i[r];if(n.default&&n.playlists)return u(n.playlists[0].attributes.CODECS)}return null},d=function(e){return void 0===e&&(e=""),a.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),a.text.test(e.trim().toLowerCase())},p=function(e){if(e&&"string"===typeof e){var t=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===t.length&&d(t[0])?i="audio":1===t.length&&h(t[0])&&(i="application");var r="mp4";return t.every((function(e){return a.mp4.test(e)}))?r="mp4":t.every((function(e){return a.webm.test(e)}))?r="webm":t.every((function(e){return a.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},f=function(e){return void 0===e&&(e=""),n.a.MediaSource&&n.a.MediaSource.isTypeSupported&&n.a.MediaSource.isTypeSupported(p(e))||!1},m=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t=0&&!this.plain?"":"u-hairline-border"}},data:function(){return{rippleTop:0,rippleLeft:0,fields:{},waveActive:!1}},methods:{click:function(e){var t=this;this.$u.throttle((function(){!0!==t.loading&&!0!==t.disabled&&(t.ripple&&(t.waveActive=!1,t.$nextTick((function(){this.getWaveQuery(e)}))),t.$emit("click",e))}),this.throttleTime)},getWaveQuery:function(e){var t=this;this.getElQuery().then((function(i){var r=i[0];if(r.width&&r.width&&(r.targetWidth=r.height>r.width?r.height:r.width,r.targetWidth)){t.fields=r;var n="",a="";n=e.touches[0].clientX,a=e.touches[0].clientY,t.rippleTop=a-r.top-r.targetWidth/2,t.rippleLeft=n-r.left-r.targetWidth/2,t.$nextTick((function(){t.waveActive=!0}))}}))},getElQuery:function(){var e=this;return new Promise((function(t){var i="";i=uni.createSelectorQuery().in(e),i.select(".u-btn").boundingClientRect(),i.exec((function(e){t(e)}))}))},getphonenumber:function(e){this.$emit("getphonenumber",e)},getuserinfo:function(e){this.$emit("getuserinfo",e)},error:function(e){this.$emit("error",e)},opensetting:function(e){this.$emit("opensetting",e)},launchapp:function(e){this.$emit("launchapp",e)}}}},"02b9":function(e,t,i){"use strict";var r;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return r}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"h-full w-full"},[i("div",{ref:"muiPlayer"})])},a=[]},"0696":function(e,t,i){"use strict";var r=i("8866"),n=i.n(r);n.a},"095a":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return s}));var r=i("be09"),n=i.n(r),a=function(t){return n.a.atob?n.a.atob(t):e.from(t,"base64").toString("binary")};function s(e){for(var t=a(e),i=new Uint8Array(t.length),r=0;r0;n+=12,a--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i};e.exports=n},"0b92":function(e,t,i){var r=i("7357");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var n=i("4f06").default;n("87c220d8",r,!0,{sourceMap:!1,shadowMode:!1})},"0c01":function(e,t,i){"use strict";var r=i("d136"),n=i.n(r),a=i("be09"),s=i.n(a),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=s.a.location&&s.a.location.href||"");var i="function"===typeof s.a.URL,r=/^\/\//.test(e),a=!s.a.location&&!/\/\//i.test(e);if(i?e=new s.a.URL(e,s.a.location||o):/\/\//i.test(e)||(e=n.a.buildAbsoluteURL(s.a.location&&s.a.location.href||"",e)),i){var l=new URL(t,e);return a?l.href.slice(o.length):r?l.href.slice(l.protocol.length):l.href}return n.a.buildAbsoluteURL(e,t)};t["a"]=l},"0c1c":function(e,t,i){"use strict";e.exports=function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}},"0c42":function(e,t,i){var r=i("24fb");t=r(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-switch[data-v-0d3821ba]{position:relative;display:inline-block;box-sizing:initial;width:2em;height:1em;background-color:#fff;border:1px solid rgba(0,0,0,.1);border-radius:1em;transition:background-color .3s;font-size:%?50?%}.u-switch__node[data-v-0d3821ba]{display:flex;flex-direction:row;align-items:center;justify-content:center;position:absolute;top:0;left:0;border-radius:100%;z-index:1;background-color:#fff;background-color:#fff;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05),-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:-webkit-transform cubic-bezier(.3,1.05,.4,1.05);transition:transform cubic-bezier(.3,1.05,.4,1.05);transition:transform cubic-bezier(.3,1.05,.4,1.05),-webkit-transform cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05)}.u-switch__loading[data-v-0d3821ba]{display:flex;flex-direction:row;align-items:center;justify-content:center}.u-switch--on[data-v-0d3821ba]{background-color:#1989fa}.u-switch--on .u-switch__node[data-v-0d3821ba]{-webkit-transform:translateX(100%);transform:translateX(100%)}.u-switch--disabled[data-v-0d3821ba]{opacity:.4}',""]),e.exports=t},"0de0":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return/mp4a\.\d+.\d+/i.test(e)},n=function(e){return/avc1\.[\da-f]+/i.test(e)},a=function(e){var t={type:"",parameters:{}},i=e.trim().split(";");return t.type=i.shift().trim(),i.forEach((function(e){var i=e.trim().split("=");if(i.length>1){var r=i[0].replace(/"/g,"").trim(),n=i[1].replace(/"/g,"").trim();t.parameters[r]=n}})),t},s=function(e){return e.map((function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){var r=("00"+Number(t).toString(16)).slice(-2),n=("00"+Number(i).toString(16)).slice(-2);return"avc1."+r+"00"+n}))}))};t["default"]={isAudioCodec:r,parseContentType:a,isVideoCodec:n,translateLegacyCodecs:s},e.exports=t["default"]},"0ea2":function(e,t,i){"use strict";var r,n,a,s=i("4329"),o=i("4e69"),l=i("ae75"),u=i("256f").TimestampRolloverStream,c=i("ae75"),d=188,h=71;r=function(){var e=new Uint8Array(d),t=0;r.prototype.init.call(this),this.push=function(i){var r,n=0,a=d;t?(r=new Uint8Array(i.byteLength+t),r.set(e.subarray(0,t)),r.set(i,t),t=0):r=i;while(a>>4>1&&(r+=t[r]+1),0===i.pid)i.type="pat",e(t.subarray(r),i),this.trigger("data",i);else if(i.pid===this.pmtPid){i.type="pmt",e(t.subarray(r),i),this.trigger("data",i);while(this.packetsWaitingForPmt.length)this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,i]):this.processPes_(t,r,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=l.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=l.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},n.prototype=new s,n.STREAM_TYPES={h264:27,adts:15},a=function(){var e=this,t={data:[],size:0},i={data:[],size:0},r={data:[],size:0},n=function(e,t){var i;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])},s=function(t,i,r){var a,s=new Uint8Array(t.size),o={type:i},l=0,u=0,c=!1;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,l=0;l=0&&e<=100}function a(){var e=100,t=3,i=0,a=100,s=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=r(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t}}})}e.exports=a},"12c6":function(e,t,i){ /** * @license * Video.js 6.13.0 * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * * * Includes vtt.js * Available under Apache License Version 2.0 * */ function r(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var n=r(i("ea7c")),a=r(i("4742")),s=r(i("1b8d")),o=r(i("8c10")),l=r(i("eec7")),u=r(i("bec7")),c="6.13.0",d=n.navigator&&n.navigator.userAgent||"",h=/AppleWebKit\/([\d.]+)/i.exec(d),p=h?parseFloat(h.pop()):null,f=/iPad/i.test(d),m=/iPhone/i.test(d)&&!f,g=/iPod/i.test(d),v=m||f||g,y=function(){var e=d.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),b=/Android/i.test(d),_=function(){var e=d.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),T=b&&/webkit/i.test(d)&&_<2.3,S=b&&_<5&&p<537,E=/Firefox/i.test(d),w=/Edge/i.test(d),k=!w&&(/Chrome/i.test(d)||/CriOS/i.test(d)),C=function(){var e=d.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),A=/MSIE\s8\.0/.test(d),x=function(){var e=/MSIE\s(\d+)\.\d/.exec(d),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(d)&&/rv:11.0/.test(d)&&(t=11),t}(),L=/Safari/i.test(d)&&!k&&!b&&!w,I=(L||v)&&!k,D=ie()&&("ontouchstart"in n||n.navigator.maxTouchPoints||n.DocumentTouch&&n.document instanceof n.DocumentTouch),R=ie()&&"backgroundSize"in n.document.createElement("video").style,O=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:m,IS_IPOD:g,IS_IOS:v,IOS_VERSION:y,IS_ANDROID:b,ANDROID_VERSION:_,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:S,IS_FIREFOX:E,IS_EDGE:w,IS_CHROME:k,CHROME_VERSION:C,IS_IE8:A,IE_VERSION:x,IS_SAFARI:L,IS_ANY_SAFARI:I,TOUCH_ENABLED:D,BACKGROUND_SIZE_SUPPORTED:R}),P="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},j=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},N=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},B=function(e,t){return e.raw=t,e},U=Object.prototype.toString,F=function(e){return q(e)?Object.keys(e):[]};function $(e,t){F(e).forEach((function(i){return t(e[i],i)}))}function V(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return F(e).reduce((function(i,r){return t(i,e[r],r)}),i)}function H(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],n=a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Y.warn(s(J,e,i)),n.setAttribute(e,i)):"textContent"===e?oe(n,i):n[e]=i})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),r&&Ce(n,r),n}function oe(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function le(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ue(e,t){return ee(t),e.classList?e.classList.contains(t):te(t).test(e.className)}function ce(e,t){return e.classList?e.classList.add(t):ue(e,t)||(e.className=(e.className+" "+t).trim()),e}function de(e,t){return e.classList?e.classList.remove(t):(ee(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function he(e,t,i){var r=ue(e,t);if("function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=!r),i!==r)return i?ce(e,t):de(e,t),e}function pe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var r=t[i];null===r||"undefined"===typeof r||!1===r?e.removeAttribute(i):e.setAttribute(i,!0===r?"":r)}))}function fe(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,n=r.length-1;n>=0;n--){var a=r[n].name,s=r[n].value;"boolean"!==typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function me(e,t){return e.getAttribute(t)}function ge(e,t,i){e.setAttribute(t,i)}function ve(e,t){e.removeAttribute(t)}function ye(){a.body.focus(),a.onselectstart=function(){return!1}}function be(){a.onselectstart=function(){return!0}}function _e(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(Q(e,"height"))),i.width||(i.width=parseFloat(Q(e,"width"))),i}}function Te(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=a.documentElement,r=a.body,s=i.clientLeft||r.clientLeft||0,o=n.pageXOffset||r.scrollLeft,l=t.left+o-s,u=i.clientTop||r.clientTop||0,c=n.pageYOffset||r.scrollTop,d=t.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function Se(e,t){var i={},r=Te(e),n=e.offsetWidth,a=e.offsetHeight,s=r.top,o=r.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-l+a)/a)),i.x=Math.max(0,Math.min(1,(u-o)/n)),i}function Ee(e){return q(e)&&3===e.nodeType}function we(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function ke(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"===typeof e&&(e=e()),re(e)||Ee(e)?e:"string"===typeof e&&/\S/.test(e)?a.createTextNode(e):void 0})).filter((function(e){return e}))}function Ce(e,t){return ke(t).forEach((function(t){return e.appendChild(t)})),e}function Ae(e,t){return Ce(we(e),t)}function xe(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(9===x||0===e.button&&1===e.buttons))}var Le=ae("querySelector"),Ie=ae("querySelectorAll"),De=(Object.freeze||Object)({isReal:ie,isEl:re,isInFrame:ne,createEl:se,textContent:oe,prependTo:le,hasClass:ue,addClass:ce,removeClass:de,toggleClass:he,setAttributes:pe,getAttributes:fe,getAttribute:me,setAttribute:ge,removeAttribute:ve,blockTextSelection:ye,unblockTextSelection:be,getBoundingClientRect:_e,findPosition:Te,getPointerPosition:Se,isTextNode:Ee,emptyEl:we,normalizeContent:ke,appendContent:Ce,insertContent:Ae,isSingleLeftClick:xe,$:Le,$$:Ie}),Re=1;function Oe(){return Re++}var Pe={},Me="vdata"+(new Date).getTime();function je(e){var t=e[Me];return t||(t=e[Me]=Oe()),Pe[t]||(Pe[t]={}),Pe[t]}function Ne(e){var t=e[Me];return!!t&&!!Object.getOwnPropertyNames(Pe[t]).length}function Be(e){var t=e[Me];if(t){delete Pe[t];try{delete e[Me]}catch(i){e.removeAttribute?e.removeAttribute(Me):e[Me]=null}}}function Ue(e,t){var i=je(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Be(e)}function Fe(e,t,i,r){i.forEach((function(i){e(t,i,r)}))}function $e(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var r=e||n.event;for(var s in e={},r)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&r.preventDefault||(e[s]=r[s]));if(e.target||(e.target=e.srcElement||a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=a.documentElement,l=a.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var Ve=!1;(function(){try{var e=Object.defineProperty({},"passive",{get:function(){Ve=!0}});n.addEventListener("test",null,e),n.removeEventListener("test",null,e)}catch(t){}})();var He=["touchstart","touchmove"];function qe(e,t,i){if(Array.isArray(t))return Fe(qe,e,t,i);var r=je(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),i.guid||(i.guid=Oe()),r.handlers[t].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,i){if(!r.disabled){t=$e(t);var n=r.handlers[t.type];if(n)for(var a=n.slice(0),s=0,o=a.length;s-1&&(n={passive:!0}),e.addEventListener(t,r.dispatcher,n)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function Ge(e,t,i){if(Ne(e)){var r=je(e);if(r.handlers){if(Array.isArray(t))return Fe(Ge,e,t,i);var n=function(e,t){r.handlers[t]=[],Ue(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s0)for(var n=0,s=e.length;n0)for(var o=0,l=t.length;o0)for(var u=0,c=i.length;u0)for(var d=0,h=r.length;d=t&&(e.apply(void 0,arguments),i=r)};return r},rt=function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,a=void 0,s=function(){r.clearTimeout(a),a=null},o=function(){var n=this,s=arguments,o=function(){a=null,o=null,i||e.apply(n,s)};!a&&i&&e.apply(n,s),r.clearTimeout(a),a=r.setTimeout(o,t)};return o.cancel=s,o},nt=function(){};nt.prototype.allowedEvents_={},nt.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},qe(this,e,t),this.addEventListener=i},nt.prototype.addEventListener=nt.prototype.on,nt.prototype.off=function(e,t){Ge(this,e,t)},nt.prototype.removeEventListener=nt.prototype.off,nt.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},We(this,e,t),this.addEventListener=i},nt.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=$e(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ze(this,e)},nt.prototype.dispatchEvent=nt.prototype.trigger;var at=function(e){return e instanceof nt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"===typeof e[t]}))},st=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},ot=function(e){if(!e.nodeName&&!at(e))throw new Error("Invalid target; must be a DOM node or evented object.")},lt=function(e){if(!st(e))throw new Error("Invalid event type; must be a non-empty string or array.")},ut=function(e){if("function"!==typeof e)throw new Error("Invalid listener; must be a function.")},ct=function(e,t){var i=t.length<3||t[0]===e||t[0]===e.eventBusEl_,r=void 0,n=void 0,a=void 0;return i?(r=e.eventBusEl_,t.length>=3&&t.shift(),n=t[0],a=t[1]):(r=t[0],n=t[1],a=t[2]),ot(r),lt(n),ut(a),a=tt(e,a),{isTargetingSelf:i,target:r,type:n,listener:a}},dt=function(e,t,i,r){ot(e),e.nodeName?Ke[t](e,i,r):e[t](i,r)},ht={on:function(){for(var e=this,t=arguments.length,i=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=se("span",{className:"vjs-event-bus"});return H(e,ht),e.on("dispose",(function(){e.off(),n.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ft={state:{},setState:function(e){var t=this;"function"===typeof e&&(e=e());var i=void 0;return $(e,(function(e,r){t.state[r]!==e&&(i=i||{},i[r]={from:t.state[r],to:e}),t.state[r]=e})),i&&at(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function mt(e,t){return H(e,ft),e.state=H({},e.state,t),"function"===typeof e.handleStateChanged&&at(e)&&e.on("statechanged",e.handleStateChanged),e}function gt(e){return"string"!==typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function vt(e,t){return gt(e)===gt(t)}function yt(){for(var e={},t=arguments.length,i=Array(t),r=0;r=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Be(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return Y.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=yt(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,i){return se(e,t,i)},e.prototype.localize=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),a=n&&n[r],s=r&&r.split("-")[0],o=n&&n[s],l=i;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var r=t[i-1],n=r;return"undefined"===typeof r&&(n=e),n}))),l},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=gt(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,n=void 0,a=void 0;if("string"===typeof t){a=gt(t);var s=i.componentClass||a;i.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!==typeof o)return null;n=new o(this.player_||this,i)}else n=t;if(this.children_.splice(r,0,n),"function"===typeof n.id&&(this.childIndex_[n.id()]=n),a=a||n.name&>(n.name()),a&&(this.childNameIndex_[a]=n),"function"===typeof n.el&&n.el()){var l=this.contentEl().children,u=l[r]||null;this.contentEl().insertBefore(n.el(),u)}return n},e.prototype.removeChild=function(e){if("string"===typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,i=this.options_.children;if(i){var r=this.options_,n=function(e){var i=e.name,n=e.opts;if(void 0!==r[i]&&(n=r[i]),!1!==n){!0===n&&(n={}),n.playerOptions=t.options_.playerOptions;var a=t.addChild(i,n);a&&(t[i]=a)}},a=void 0,s=e.getComponent("Tech");a=Array.isArray(i)?i:Object.keys(i),a.concat(Object.keys(this.options_).filter((function(e){return!a.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((function(e){var r=void 0,n=void 0;return"string"===typeof e?(r=e,n=i[r]||t.options_[r]||{}):(r=e.name,n=e),{name:r,opts:n}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||gt(t.name));return i&&!s.isTech(i)})).forEach(n)}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return Le(e,t||this.contentEl())},e.prototype.$$=function(e,t){return Ie(e,t||this.contentEl())},e.prototype.hasClass=function(e){return ue(this.el_,e)},e.prototype.addClass=function(e){ce(this.el_,e)},e.prototype.removeClass=function(e){de(this.el_,e)},e.prototype.toggleClass=function(e,t){he(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return me(this.el_,e)},e.prototype.setAttribute=function(e,t){ge(this.el_,e,t)},e.prototype.removeAttribute=function(e){ve(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],n=r.indexOf("px");return-1!==n?parseInt(r.slice(0,n),10):parseInt(this.el_["offset"+gt(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"===typeof n.getComputedStyle){var i=n.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(t=parseFloat(t),0===t){var r="offset"+gt(e);t=this.el_[r]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,i=10,r=200,n=void 0;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=(new Date).getTime(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){var r=e.touches[0].pageX-t.pageX,a=e.touches[0].pageY-t.pageY,s=Math.sqrt(r*r+a*a);s>i&&(n=!1)}}));var a=function(){n=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",(function(i){if(t=null,!0===n){var a=(new Date).getTime()-e;a0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,i},e.getComponent=function(t){if(t)return t=gt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();function _t(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}function Tt(e,t,i,r){return _t(e,r,i.length-1),i[r][t]}function St(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Tt.bind(null,"start",0,e),end:Tt.bind(null,"end",1,e)}}function Et(e,t){return Array.isArray(e)?St(e):void 0===e||void 0===t?St():St([[e,t]])}function wt(e,t){var i=0,r=void 0,n=void 0;if(!t)return 0;e&&e.length||(e=Et(0,0));for(var a=0;at&&(n=t),i+=n-r;return i/t}bt.prototype.supportsRaf_="function"===typeof n.requestAnimationFrame&&"function"===typeof n.cancelAnimationFrame,bt.registerComponent("Component",bt);for(var kt={},Ct=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],At=Ct[0],xt=void 0,Lt=0;Lt0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;M(this,t);var s=N(this,e.call(this));if(!n&&(n=s,A))for(var o in n=a.createElement("custom"),t.prototype)"constructor"!==o&&(n[o]=t.prototype[o]);n.tracks_=[],Object.defineProperty(n,"length",{get:function(){return this.tracks_.length}});for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[];M(this,t);for(var s=void 0,o=n.length-1;o>=0;o--)if(n[o].enabled){qt(n,n[o]);break}if(A){for(var l in s=a.createElement("custom"),Vt.prototype)"constructor"!==l&&(s[l]=Vt.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=N(this,e.call(this,n,s)),s=i,s.changing_=!1,r=s,N(i,r)}return j(t,e),t.prototype.addTrack=function(t){var i=this;t.enabled&&qt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){i.changing_||(i.changing_=!0,qt(i,t),i.changing_=!1,i.trigger("change"))}))},t}(Vt),zt=function(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];M(this,t);for(var s=void 0,o=n.length-1;o>=0;o--)if(n[o].selected){zt(n,n[o]);break}if(A){for(var l in s=a.createElement("custom"),Vt.prototype)"constructor"!==l&&(s[l]=Vt.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=N(this,e.call(this,n,s)),s=i,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:[];M(this,t);var s=void 0;if(A){for(var o in s=a.createElement("custom"),Vt.prototype)"constructor"!==o&&(s[o]=Vt.prototype[o]);for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l])}return i=N(this,e.call(this,n,s)),s=i,r=s,N(i,r)}return j(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",tt(this,(function(){this.trigger("change")})));var i=["metadata","chapters"];-1===i.indexOf(t.kind)&&t.addEventListener("modechange",tt(this,(function(){this.trigger("selectedlanguagechange")})))},t}(Vt),Yt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];M(this,e);var i=this;if(A)for(var r in i=a.createElement("custom"),e.prototype)"constructor"!==r&&(i[r]=e.prototype[r]);i.trackElements_=[],Object.defineProperty(i,"length",{get:function(){return this.trackElements_.length}});for(var n=0,s=t.length;n0&&void 0!==arguments[0]?arguments[0]:{};M(this,t);var n=N(this,e.call(this)),s=n;if(A)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l={id:r.id||"vjs_track_"+Oe(),kind:r.kind||"",label:r.label||"",language:r.language||""},u=function(e){Object.defineProperty(s,e,{get:function(){return l[e]},set:function(){}})};for(var c in l)u(c);return i=s,N(n,i)}return j(t,e),t}(nt),ii=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=a.createElement("a");i.href=e;var r=""===i.host&&"file:"!==i.protocol,s=void 0;r&&(s=a.createElement("div"),s.innerHTML='',i=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(s));for(var o={},l=0;lx',e=t.firstChild.href}return e},ni=function(e){if("string"===typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ai=function(e){var t=n.location,i=ii(e),r=":"===i.protocol?t.protocol:i.protocol,a=r+i.host!==t.protocol+t.host;return a},si=(Object.freeze||Object)({parseUrl:ii,getAbsoluteURL:ri,getFileExtension:ni,isCrossOrigin:ai}),oi=function(e,t){var i=new n.WebVTT.Parser(n,n.vttjs,n.WebVTT.StringDecoder()),r=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){r.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),r.length>0&&(n.console&&n.console.groupCollapsed&&n.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Y.error(e)})),n.console&&n.console.groupEnd&&n.console.groupEnd()),i.flush()},li=function(e,t){var i={uri:e},r=ai(e);r&&(i.cors=r),l(i,tt(this,(function(e,i,r){if(e)return Y.error(e,i);if(t.loaded_=!0,"function"!==typeof n.WebVTT){if(t.tech_){var a=function(){return oi(r,t)};t.tech_.on("vttjsloaded",a),t.tech_.on("vttjserror",(function(){Y.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",a)}))}}else oi(r,t)})))},ui=function(e){function t(){var i,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(M(this,t),!n.tech)throw new Error("A tech was not provided.");var a=yt(n,{kind:Zt[n.kind]||"subtitles",language:n.language||n.srclang||""}),s=ei[a.mode]||"disabled",o=a["default"];"metadata"!==a.kind&&"chapters"!==a.kind||(s="hidden");var l=(i=N(this,e.call(this,a)),i);if(l.tech_=a.tech,A)for(var u in t.prototype)"constructor"!==u&&(l[u]=t.prototype[u]);l.cues_=[],l.activeCues_=[];var c=new Xt(l.cues_),d=new Xt(l.activeCues_),h=!1,p=tt(l,(function(){this.activeCues=this.activeCues,h&&(this.trigger("cuechange"),h=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",p)}),!0),Object.defineProperty(l,"default",{get:function(){return o},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(e){var t=this;ei[e]&&(s=e,"disabled"!==s?this.tech_.ready((function(){t.tech_.on("timeupdate",p)}),!0):this.tech_.off("timeupdate",p),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?c:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var e=this.tech_.currentTime(),t=[],i=0,r=this.cues.length;i=e||n.startTime===n.endTime&&n.startTime<=e&&n.startTime+.5>=e)&&t.push(n)}if(h=!1,t.length!==this.activeCues_.length)h=!0;else for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{};M(this,t);var a=yt(n,{kind:Jt[n.kind]||""}),s=(i=N(this,e.call(this,a)),i),o=!1;if(A)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),a.enabled&&(s.enabled=a.enabled),s.loaded_=!0,r=s,N(i,r)}return j(t,e),t}(ti),di=function(e){function t(){var i,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};M(this,t);var a=yt(n,{kind:Qt[n.kind]||""}),s=(i=N(this,e.call(this,a)),i),o=!1;if(A)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),a.selected&&(s.selected=a.selected),r=s,N(i,r)}return j(t,e),t}(ti),hi=0,pi=1,fi=2,mi=3,gi=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};M(this,t);var r=N(this,e.call(this)),n=void 0,s=r;if(A)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l,u=new ui(i);return s.kind=u.kind,s.src=u.src,s.srclang=u.language,s.label=u.label,s["default"]=u["default"],Object.defineProperty(s,"readyState",{get:function(){return n}}),Object.defineProperty(s,"track",{get:function(){return u}}),n=hi,u.addEventListener("loadeddata",(function(){n=fi,s.trigger({type:"load",target:s})})),A?(l=s,N(r,l)):r}return j(t,e),t}(nt);gi.prototype.allowedEvents_={load:"load"},gi.NONE=hi,gi.LOADING=pi,gi.LOADED=fi,gi.ERROR=mi;var vi={audio:{ListClass:Gt,TrackClass:ci,capitalName:"Audio"},video:{ListClass:Wt,TrackClass:di,capitalName:"Video"},text:{ListClass:Kt,TrackClass:ui,capitalName:"Text"}};Object.keys(vi).forEach((function(e){vi[e].getterName=e+"Tracks",vi[e].privateName=e+"Tracks_"}));var yi={remoteText:{ListClass:Kt,TrackClass:ui,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Yt,TrackClass:gi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},bi=yt(vi,yi);function _i(e,t,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();n.kind=t,i&&(n.label=i),r&&(n.language=r),n.tech=e;var s=new bi.text.TrackClass(n);return a.addTrack(s),s}yi.names=Object.keys(yi),vi.names=Object.keys(vi),bi.names=[].concat(yi.names).concat(vi.names);var Ti=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};M(this,t),i.reportTouchActivity=!1;var n=N(this,e.call(this,null,i,r));return n.hasStarted_=!1,n.on("playing",(function(){this.hasStarted_=!0})),n.on("loadstart",(function(){this.hasStarted_=!1})),bi.names.forEach((function(e){var t=bi[e];i&&i[t.getterName]&&(n[t.privateName]=i[t.getterName])})),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===i["native"+e+"Tracks"]&&(n["featuresNative"+e+"Tracks"]=!1)})),!1===i.nativeCaptions||!1===i.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.autoRemoteTextTracks_=new bi.text.ListClass,n.initTrackListeners(),i.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}return j(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(tt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return Et(0,0)},t.prototype.bufferedPercent=function(){return wt(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(vi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach((function(e){var i=t[e+"Tracks"]()||[],r=i.length;while(r--){var n=i[r];"text"===e&&t.removeRemoteTextTrack(n),i.removeTrack(n)}}))},t.prototype.cleanupAutoTextTracks=function(){var e=this.autoRemoteTextTracks_||[],t=e.length;while(t--){var i=e[t];this.removeRemoteTextTrack(i)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new Dt(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?Et(0,0):Et()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;vi.names.forEach((function(t){var i=vi[t],r=function(){e.trigger(t+"trackchange")},n=e[i.getterName]();n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!n.WebVTT)if(a.body.contains(this.el())){if(!this.options_["vtt.js"]&&G(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),n.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},n=function(e){return t.removeTrack(e.track)};i.on("addtrack",r),i.on("removetrack",n),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],r=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Y.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==i&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(r.track)})),r},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=gt(e),t.techs_[e]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return e=gt(e),t.techs_&&t.techs_[e]?t.techs_[e]:n&&n.videojs&&n.videojs[e]?(Y.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),n.videojs[e]):void 0},t}(bt);bi.names.forEach((function(e){var t=bi[e];Ti.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Ti.prototype.featuresVolumeControl=!0,Ti.prototype.featuresMuteControl=!0,Ti.prototype.featuresFullscreenResize=!1,Ti.prototype.featuresPlaybackRate=!1,Ti.prototype.featuresProgressEvents=!1,Ti.prototype.featuresSourceset=!1,Ti.prototype.featuresTimeupdateEvents=!1,Ti.prototype.featuresNativeTextTracks=!1,Ti.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===i&&(i=r.length),r.splice(i,0,t)},e.canPlayType=function(t){for(var i=e.sourceHandlers||[],r=void 0,n=0;n3&&void 0!==arguments[3]?arguments[3]:null,n="call"+gt(i),a=e.reduce(Pi(n),r),s=a===wi,o=s?null:t[i](a);return Mi(e,i,o,s),o}var Di={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Ri={setCurrentTime:1},Oi={play:1,pause:1};function Pi(e){return function(t,i){return t===wi?wi:i[e]?i[e](t):t}}function Mi(e,t,i,r){for(var n=e.length-1;n>=0;n--){var a=e[n];a[t]&&a[t](r,i)}}function ji(e){Ei[e.id()]=null}function Ni(e,t){var i=Ei[e.id()],r=null;if(void 0===i||null===i)return r=t(e),Ei[e.id()]=[[t,r]],r;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments[2],r=arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=t[0],o=t.slice(1);if("string"===typeof s)Bi(e,Si[s],i,r,n,a);else if(s){var l=Ni(r,s);if(!l.setSource)return n.push(l),Bi(e,o,i,r,n,a);l.setSource(H({},e),(function(t,s){if(t)return Bi(e,o,i,r,n,a);n.push(l),Bi(s,e.type===s.type?o:Si[s.type],i,r,n,a)}))}else o.length?Bi(e,o,i,r,n,a):a?i(e,n):Bi(e,Si["*"],i,r,n,!0)}var Ui={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Fi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=ni(e),i=Ui[t.toLowerCase()];return i||""},$i=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter((function(e){return e.src===t}));if(i.length)return i[0].type;for(var r=e.$$("source"),n=0;n0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=H({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&Y.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=H({role:"button"},r),this.tabIndex_=i.tabIndex;var n=e.prototype.createEl.call(this,t,i,r);return this.createControlTextEl(n),n},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=se("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,oe(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){qe(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){Ge(a,"keydown",tt(this,this.handleKeyPress))},t}(bt);bt.registerComponent("ClickableComponent",Gi);var zi=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.update(),i.on("posterchange",tt(n,n.update)),n}return j(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=se("div",{className:"vjs-poster",tabIndex:-1});return R||(this.fallbackImg_=se("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?Pt(this.player_.play()):this.player_.pause())},t}(Gi);bt.registerComponent("PosterImage",zi);var Wi="#222",Ki="#ccc",Yi={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Xi(e,t){var i=void 0;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Qi(e,t,i){try{e.style[t]=i}catch(r){return}}var Ji=function(e){function t(i,r,a){M(this,t);var s=N(this,e.call(this,i,r,a)),o=tt(s,s.updateDisplay);return i.on("loadstart",tt(s,s.toggleDisplay)),i.on("texttrackchange",o),i.on("loadstart",tt(s,s.preselectTrack)),i.ready(tt(s,(function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",o),i.on("playerresize",o),n.addEventListener&&n.addEventListener("orientationchange",o),i.on("dispose",(function(){return n.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=H({innerHTML:'',className:this.buildCSSClass()},t),i=H({type:"button"},i);var r=bt.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return Y.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),bt.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(Gi);bt.registerComponent("Button",er);var tr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)Pt(t);else{var i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(r){var n=function(){return r.focus()};Ot(t)?t.then(n,(function(){})):this.setTimeout(n,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(er);tr.prototype.controlText_="Play Video",bt.registerComponent("BigPlayButton",tr);var ir=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.controlText(r&&r.controlText||n.localize("Close")),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(er);bt.registerComponent("CloseButton",ir);var rr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.on(i,"play",n.handlePlay),n.on(i,"pause",n.handlePause),n.on(i,"ended",n.handleEnded),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(er);rr.prototype.controlText_="Play",bt.registerComponent("PlayToggle",rr);var nr=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),r=Math.floor(e/60%60),n=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=r=i="-"),n=n>0||s>0?n+":":"",r=((n||a>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,n+r+i},ar=nr;function sr(e){ar=e}function or(){ar=nr}var lr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return ar(e,t)},ur=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.throttledUpdateContent=it(tt(n,n.updateContent),25),n.on(i,"timeupdate",n.throttledUpdateContent),n}return j(t,e),t.prototype.createEl=function(t){var i=this.buildCSSClass(),r=e.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=se("span",{className:i+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return lr(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(bt);ur.prototype.labelText_="Time",ur.prototype.controlText_="Time",bt.registerComponent("TimeDisplay",ur);var cr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.on(i,"ended",n.handleEnded),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(ur);cr.prototype.labelText_="Current Time",cr.prototype.controlText_="Current Time",bt.registerComponent("CurrentTimeDisplay",cr);var dr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.on(i,"durationchange",n.updateContent),n.on(i,"loadedmetadata",n.throttledUpdateContent),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(ur);dr.prototype.labelText_="Duration",dr.prototype.controlText_="Duration",bt.registerComponent("DurationDisplay",dr);var hr=function(e){function t(){return M(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},t}(bt);bt.registerComponent("TimeDivider",hr);var pr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.on(i,"durationchange",n.throttledUpdateContent),n.on(i,"ended",n.handleEnded),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(ur);pr.prototype.labelText_="Remaining Time",pr.prototype.controlText_="Remaining Time",bt.registerComponent("RemainingTimeDisplay",pr);var fr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}return j(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=se("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(bt);bt.registerComponent("LiveDisplay",fr);var mr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}return j(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.className=i.className+" vjs-slider",i=H({tabIndex:0},i),r=H({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,i,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||k||e.preventDefault(),ye(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;be(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!==typeof e||e!==e||e<0||e===1/0)&&(e=0);var i=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=i:r.width=i,e}}},t.prototype.calculateDistance=function(e){var t=Se(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(bt);bt.registerComponent("Slider",mr);var gr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.partEls_=[],n.on(i,"progress",n.update),n}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),i=this.player_.duration(),r=this.player_.bufferedEnd(),n=this.partEls_,a=function(e,t){var i=e/t||0;return 100*(i>=1?1:i)+"%"};this.el_.style.width=a(r,i);for(var s=0;st.length;c--)this.el_.removeChild(n[c-1]);n.length=t.length},t}(bt);bt.registerComponent("LoadProgressBar",gr);var vr=function(e){function t(){return M(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,i){var r=_e(this.el_),n=_e(this.player_.el()),a=e.width*t;if(n&&r){var s=e.left-n.left+a,o=e.width-a+(n.right-e.right),l=r.width/2;sr.width&&(l=r.width),this.el_.style.right="-"+l+"px",oe(this.el_,i)}},t}(bt);bt.registerComponent("TimeTooltip",vr);var yr=function(e){function t(){return M(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),n=lr(r,i.player_.duration()),a=i.getChild("timeTooltip");a&&a.update(e,t,n)}))},t}(bt);yr.prototype.options_={children:[]},x&&!(x>8)||v||b||yr.prototype.options_.children.push("timeTooltip"),bt.registerComponent("PlayProgressBar",yr);var br=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.update=it(tt(n,n.update),25),n}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=i.player_.duration(),n=lr(t*r,r);i.el_.style.left=e.width*t+"px",i.getChild("timeTooltip").update(e,t,n)}))},t}(bt);br.prototype.options_={children:["timeTooltip"]},bt.registerComponent("MouseTimeDisplay",br);var _r=5,Tr=30,Sr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.setEventHandlers_(),n}return j(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=it(tt(this,this.update),Tr),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),Tr)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[lr(e,i),lr(i,i)],"{1} of {2}")),this.bar.update(_e(this.el_),t)},t.prototype.update=function(t){var i=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),i),i},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){xe(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(xe(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Pt(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+_r)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-_r)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(mr);Sr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},x&&!(x>8)||v||b||Sr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Sr.prototype.playerEvent="timeupdate",bt.registerComponent("SeekBar",Sr);var Er=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.handleMouseMove=it(tt(n,n.handleMouseMove),25),n.throttledHandleMouseSeek=it(tt(n,n.handleMouseSeek),25),n.enable(),n}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("mouseTimeDisplay"),r=t.el(),n=_e(r),a=Se(r,e).x;a>1?a=1:a<0&&(a=0),i&&i.update(n,a)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(bt);Er.prototype.options_={children:["seekBar"]},bt.registerComponent("ProgressControl",Er);var wr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.on(i,"fullscreenchange",n.handleFullscreenChange),!1===a[kt.fullscreenEnabled]&&n.disable(),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(er);wr.prototype.controlText_="Fullscreen",bt.registerComponent("FullscreenToggle",wr);var kr=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},Cr=function(e){function t(){return M(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},t}(bt);bt.registerComponent("VolumeLevel",Cr);var Ar=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.on("slideractive",n.updateLastVolume_),n.on(i,"volumechange",n.updateARIAAttributes),i.ready((function(){return n.updateARIAAttributes()})),n}return j(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){xe(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){xe(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(mr);Ar.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Ar.prototype.playerEvent="volumechange",bt.registerComponent("VolumeBar",Ar);var xr=function(e){function t(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,t),r.vertical=r.vertical||!1,("undefined"===typeof r.volumeBar||G(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var n=N(this,e.call(this,i,r));return kr(n,i),n.throttledHandleMouseMove=it(tt(n,n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),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}return j(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.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.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.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.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(bt);xr.prototype.options_={children:["volumeBar"]},bt.registerComponent("VolumeControl",xr);var Lr=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},Ir=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return Lr(n,i),n.on(i,["loadstart","volumechange"],n.update),n}return j(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var r=i<.1?.1:i;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;v&&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 i=0;i<4;i++)de(this.el_,"vjs-vol-"+i);ce(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(er);Ir.prototype.controlText_="Mute",bt.registerComponent("MuteToggle",Ir);var Dr=function(e){function t(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,t),"undefined"!==typeof r.inline?r.inline=r.inline:r.inline=!0,("undefined"===typeof r.volumeControl||G(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var n=N(this,e.call(this,i,r));return n.on(i,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}return j(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.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.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(bt);Dr.prototype.options_={children:["muteToggle","volumeControl"]},bt.registerComponent("VolumePanel",Dr);var Rr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return r&&(n.menuButton_=r.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyPress),n}return j(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",tt(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=se(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),qe(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),i=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(bt);bt.registerComponent("Menu",Rr);var Or=function(e){function t(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,t);var n=N(this,e.call(this,i,r));n.menuButton_=new er(i,r),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var a=er.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+a,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"focus",n.handleFocus),n.on(n.menuButton_,"blur",n.handleBlur),n.on("keydown",n.handleSubmenuKeyPress),n}return j(t,e),t.prototype.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.prototype.createMenu=function(){var e=new Rr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=se("li",{className:"vjs-menu-title",innerHTML:gt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),le(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",tt(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){qe(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleBlur=function(){Ge(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),v&&ne())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(bt);bt.registerComponent("MenuButton",Or);var Pr=function(e){function t(i,r){M(this,t);var n=r.tracks,a=N(this,e.call(this,i,r));if(a.items.length<=1&&a.hide(),!n)return N(a);var s=tt(a,a.update);return n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),a.player_.on("ready",s),a.player_.on("dispose",(function(){n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s)})),a}return j(t,e),t}(Or);bt.registerComponent("TrackButton",Pr);var Mr=function(e){function t(i,r){M(this,t);var n=N(this,e.call(this,i,r));return n.selectable=r.selectable,n.isSelected_=r.selected||!1,n.multiSelectable=r.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}return j(t,e),t.prototype.createEl=function(t,i,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",H({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},i),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Gi);bt.registerComponent("MenuItem",Mr);var jr=function(e){function t(i,r){M(this,t);var s=r.track,o=i.textTracks();r.label=s.label||s.language||"Unknown",r.selected="showing"===s.mode;var l=N(this,e.call(this,i,r));l.track=s;var u=function(){for(var e=arguments.length,t=Array(e),i=0;i-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Mr);bt.registerComponent("TextTrackMenuItem",jr);var Nr=function(e){function t(i,r){return M(this,t),r.track={player:i,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,N(this,e.call(this,i,r))}return j(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,r=0,n=t.length;r-1&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,r=0,n=t.length;r-1&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(jr);bt.registerComponent("OffTextTrackMenuItem",Nr);var Br=function(e){function t(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M(this,t),r.tracks=i.textTracks(),N(this,e.call(this,i,r))}return j(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jr,i=void 0;this.label_&&(i=this.label_+" off"),e.push(new Nr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var n=0;n-1){var s=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Pr);bt.registerComponent("TextTrackButton",Br);var Ur=function(e){function t(i,r){M(this,t);var n=r.track,a=r.cue,s=i.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=a.text,r.selected=a.startTime<=s&&s=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(gt(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,r=t.length;i