PageSourceSearch

https://www.iifem.com/player_video_crypt/assets/js/video.js

js iifem.com collected 2026-09-24 13:23:26 UTC 532,059 bytes, 1 lines download raw bytes

1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).videojs=t()}(this,function(){"use strict";var u="7.11.4",e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e,t){return e(t={exports:{}},t.exports),t.exports}var p="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n={},r=void 0!==e?e:"undefined"!=typeof window?window:{},a="undefined"!=typeof document?document:(a=r["__GLOBAL_DOCUMENT_CACHE@4"])||(r["__GLOBAL_DOCUMENT_CACHE@4"]=n),d=a,o=[],s=function(a,s){return function(e,t,i){var n,r=s.levels[t],t=new RegExp("^("+r+")$");"log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(a+":"),o&&(o.push([].concat(i)),n=o.length-1e3,o.splice(0,0<n?n:0)),p.console&&((n=p.console[e])||"debug"!==e||(n=p.console.info||p.console.log),n&&r&&t.test(e)&&n[Array.isArray(i)?"apply":"call"](p.console,i))}};var h=function t(i){function n(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];a("log",r,t)}var r="info",a=s(i,n);return n.createLogger=function(e){return t(i+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},n.level=function(e){if("string"==typeof e){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(n.history=function(){return o?[].concat(o):[]}).filter=function(t){return(o||[]).filter(function(e){return new RegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){o&&(o.length=0)},n.history.disable=function(){null!==o&&(o.length=0,o=null)},n.history.enable=function(){null===o&&(o=[])},n.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return a("error",r,t)},n.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return a("warn",r,t)},n.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return a("debug",r,t)},n}("VIDEOJS"),l=h.createLogger,f=i(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i,n=arguments[t];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},t.apply(this,arguments)}e.exports=t}),c=Object.prototype.toString,m=function(e){return v(e)?Object.keys(e):[]};function g(t,i){m(t).forEach(function(e){return i(t[e],e)})}function y(i){for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return Object.assign?f.apply(void 0,[i].concat(t)):(t.forEach(function(e){e&&g(e,function(e,t){i[t]=e})}),i)}function v(e){return!!e&&"object"==typeof e}function _(e){return v(e)&&"[object Object]"===c.call(e)&&e.constructor===Object}function b(e,t){if(!e||!t)return"";if("function"!=typeof p.getComputedStyle)return"";e=p.getComputedStyle(e);return e?e.getPropertyValue(t)||e[t]:""}function T(e){return"string"==typeof e&&Boolean(e.trim())}function S(e){if(0<=e.indexOf(" "))throw new Error("class has illegal whitespace characters")}function k(){return d===p.document}function C(e){return v(e)&&1===e.nodeType}function w(){try{return p.parent!==p.self}catch(e){return!0}}function E(i){return function(e,t){if(!T(e))return d[i](null);T(t)&&(t=d.querySelector(t));t=C(t)?t:d;return t[i]&&t[i](e)}}function I(e,i,t,n){void 0===e&&(e="div"),void 0===i&&(i={}),void 0===t&&(t={});var r=d.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(h.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+t+"."),r.setAttribute(e,t)):"textContent"===e?A(r,t):r[e]===t&&"tabIndex"!==e||(r[e]=t)}),Object.getOwnPropertyNames(t).forEach(function(e){r.setAttribute(e,t[e])}),n&&X(r,n),r}
1function A(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function x(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function P(e,t){return S(t),e.classList?e.classList.contains(t):new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)}function L(e,t){return e.classList?e.classList.add(t):P(e,t)||(e.className=(e.className+" "+t).trim()),e}function D(e,t){return e.classList?e.classList.remove(t):(S(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function O(e,t,i){var n=P(e,t);if("function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!n),i!==n)return(i?L:D)(e,t),e}function R(i,n){Object.getOwnPropertyNames(n).forEach(function(e){var t=n[e];null==t||!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})}function M(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&0<e.attributes.length)for(var n=e.attributes,r=n.length-1;0<=r;r--){var a=n[r].name,s=n[r].value;"boolean"!=typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function N(e,t){return e.getAttribute(t)}function U(e,t,i){e.setAttribute(t,i)}function B(e,t){e.removeAttribute(t)}function F(){d.body.focus(),d.onselectstart=function(){return!1}}function j(){d.onselectstart=function(){return!0}}function V(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(b(e,"height"))),i.width||(i.width=parseFloat(b(e,"width"))),i}}function H(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,i=e.offsetHeight,n=0,r=0;n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent,e;);return{left:n,top:r,width:t,height:i}}function q(e,t){var i={},n=H(t.target),r=H(e),a=r.width,s=r.height,e=t.offsetY-(r.top-n.top),n=t.offsetX-(r.left-n.left);return t.changedTouches&&(n=t.changedTouches[0].pageX-r.left,e=t.changedTouches[0].pageY+r.top),i.y=1-Math.max(0,Math.min(1,e/s)),i.x=Math.max(0,Math.min(1,n/a)),i}
vendor: 8,730 bytes, line 1
1function W(e){return v(e)&&3===e.nodeType}function z(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function G(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),C(e)||W(e)?e:"string"==typeof e&&/\S/.test(e)?d.createTextNode(e):void 0}).filter(function(e){return e})}function X(t,e){return G(e).forEach(function(e){return t.appendChild(e)}),t}function K(e,t){return X(z(e),t)}function Y(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var $,Q=E("querySelector"),J=E("querySelectorAll"),Z=Object.freeze({__proto__:null,isReal:k,isEl:C,isInFrame:w,createEl:I,textContent:A,prependTo:x,hasClass:P,addClass:L,removeClass:D,toggleClass:O,setAttributes:R,getAttributes:M,getAttribute:N,setAttribute:U,removeAttribute:B,blockTextSelection:F,unblockTextSelection:j,getBoundingClientRect:V,findPosition:H,getPointerPosition:q,isTextNode:W,emptyEl:z,normalizeContent:G,appendContent:X,insertContent:K,isSingleLeftClick:Y,$:Q,$$:J}),ee=!1,te=function(){if(k()&&!1!==$.options.autoSetup){var e=Array.prototype.slice.call(d.getElementsByTagName("video")),t=Array.prototype.slice.call(d.getElementsByTagName("audio")),i=Array.prototype.slice.call(d.getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&0<n.length)for(var r=0,a=n.length;r<a;r++){var s=n[r];if(!s||!s.getAttribute){ie(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&$(s)}else ee||ie(1)}};function ie(e,t){t&&($=t),p.setTimeout(te,e)}function ne(){ee=!0,p.removeEventListener("load",ne)}k()&&("complete"===d.readyState?ne():p.addEventListener("load",ne));function re(e){var t=d.createElement("style");return t.className=e,t}function ae(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}var se=3;p.WeakMap||(qt=function(){function e(){this.vdata="vdata"+Math.floor(p.performance&&p.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var i=e[this.vdata]||se++;return e[this.vdata]||(e[this.vdata]=i),this.data[i]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];h("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var oe,ue=new(p.WeakMap?WeakMap:qt);function le(e,t){var i;ue.has(e)&&(0===(i=ue.get(e)).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&&ue.delete(e))}function ce(t,i,e,n){e.forEach(function(e){t(i,e,n)})}function de(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n,r,a,s=e||p.event;for(n in e={},s)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&("returnValue"===n&&s.preventDefault||(e[n]=s[n]));e.target||(e.target=e.srcElement||d),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX&&(r=d.documentElement,a=d.body,e.pageX=e.clientX+(r&&r.scrollLeft||a&&a.scrollLeft||0)-(r&&r.clientLeft||a&&a.clientLeft||0),e.pageY=e.clientY+(r&&r.scrollTop||a&&a.scrollTop||0)-(r&&r.clientTop||a&&a.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.fixed_=!0,e}var he=function(){if("boolean"!=typeof oe){oe=!1;try{var e=Object.defineProperty({},"passive",{get:function(){oe=!0}});p.addEventListener("test",null,e),p.removeEventListener("test",null,e)}catch(e){}}return oe},pe=["touchstart","touchmove"];function fe(s,e,t){if(Array.isArray(e))return ce(fe,s,e,t);ue.has(s)||ue.set(s,{});var o=ue.get(s);o.handlers||(o.handlers={}),o.handlers[e]||(o.handlers[e]=[]),t.guid||(t.guid=se++),o.handlers[e].push(t),o.dispatcher||(o.disabled=!1,o.dispatcher=function(e,t){if(!o.disabled){e=de(e);var i=o.handlers[e.type];if(i)for(var n=i.slice(0),r=0,a=n.length;r<a&&!e.isImmediatePropagationStopped();r++)try{n[r].call(s,e,t)}catch(e){h.error(e)}}}),1===o.handlers[e].length&&(s.addEventListener?(t=!1,he()&&-1<pe.indexOf(e)&&(t={passive:!0}),s.addEventListener(e,o.dispatcher,t)):s.attachEvent&&s.attachEvent("on"+e,o.dispatcher))}function me(e,t,i){if(ue.has(e)){var n=ue.get(e);if(n.handlers){if(Array.isArray(t))return ce(me,e,t,i);var r=function(e,t){n.handlers[t]=[],le(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);le(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function ge(e,t,i){var n=ue.has(e)?ue.get(e):{},r=e.parentNode||e.ownerDocument;return"string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=de(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles?ge.call(null,r,t,i):!r&&!t.defaultPrevented&&t.target&&t.target[t.type]&&(ue.has(t.target)||ue.set(t.target,{}),r=ue.get(t.target),t.target[t.type]&&(r.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),r.disabled=!1)),!t.defaultPrevented}function ye(e,t,i){if(Array.isArray(t))return ce(ye,e,t,i);function n(){me(e,t,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||se++,fe(e,t,n)}function ve(e,t,i){function n(){me(e,t,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||se++,fe(e,t,n)}function _e(t,i){var n=p.performance.now();return function(){var e=p.performance.now();i<=e-n&&(t.apply(void 0,arguments),n=e)}}function be(n,r,a,s){var o;function e(){var e=this,t=arguments,i=function(){i=o=null,a||n.apply(e,t)};!o&&a&&n.apply(e,t),s.clearTimeout(o),o=s.setTimeout(i,r)}return void 0===s&&(s=p),e.cancel=function(){s.clearTimeout(o),o=null},e}function Te(){}var Se,ke=Object.freeze({__proto__:null,fixEvent:de,on:fe,off:me,trigger:ge,one:ye,any:ve}),Ce=function(e,t,i){t.guid||(t.guid=se++);e=t.bind(e);return e.guid=i?i+"_"+t.guid:t.guid,e};Te.prototype.allowedEvents_={},Te.prototype.addEventListener=Te.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},fe(this,e,t),this.addEventListener=i},Te.prototype.removeEventListener=Te.prototype.off=function(e,t){me(this,e,t)},Te.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ye(this,e,t),this.addEventListener=i},Te.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ve(this,e,t),this.addEventListener=i},Te.prototype.dispatchEvent=Te.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=de(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ge(this,e)},Te.prototype.queueTrigger=function(e){var t=this;Se=Se||new Map;var i=e.type||e,n=Se.get(this);n||(n=new Map,Se.set(this,n));var r=n.get(i);n.delete(i),p.clearTimeout(r);r=p.setTimeout(function(){0===n.size&&(n=null,Se.delete(t)),t.trigger(e)},0);n.set(i,r)};function we(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_||(e.constructor&&e.constructor.name?e.constructor.name:typeof e)}function Ee(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length}function Ie(e,t,i){if(!e||!e.nodeName&&!De(e))throw new Error("Invalid target for "+we(t)+"#"+i+"; must be a DOM node or evented object.")}function Ae(e,t,i){if(!Ee(e))throw new Error("Invalid event type for "+we(t)+"#"+i+"; must be a non-empty string or array.")}function xe(e,t,i){if("function"!=typeof e)throw new Error("Invalid listener for "+we(t)+"#"+i+"; must be a function.")}function Pe(e,t,i){var n,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_,t=a?(n=e.eventBusEl_,3<=t.length&&t.shift(),r=t[0],t[1]):(n=t[0],r=t[1],t[2]);return Ie(n,e,i),Ae(r,e,i),xe(t,e,i),{isTargetingSelf:a,target:n,type:r,listener:t=Ce(e,t)}}function Le(e,t,i,n){Ie(e,e,t),e.nodeName?ke[t](e,i,n):e[t](i,n)}var De=function(t){return t instanceof Te||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]}
1)},Oe={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r,a=Pe(this,i,"on"),s=a.isTargetingSelf,o=a.target,u=a.type,l=a.listener;Le(o,"on",u,l),s||((r=function(){return e.off(o,u,l)}).guid=l.guid,(s=function(){return e.off("dispose",r)}).guid=l.guid,Le(this,"on","dispose",r),Le(o,"on","dispose",s))},one:function(){for(var r=this,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=Pe(this,t,"one"),a=n.isTargetingSelf,s=n.target,o=n.type,u=n.listener;a?Le(s,"one",o,u):((a=function e(){r.off(s,o,e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];u.apply(null,i)}).guid=u.guid,Le(s,"one",o,a))},any:function(){for(var r=this,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=Pe(this,t,"any"),a=n.isTargetingSelf,s=n.target,o=n.type,u=n.listener;a?Le(s,"any",o,u):((a=function e(){r.off(s,o,e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];u.apply(null,i)}).guid=u.guid,Le(s,"any",o,a))},off:function(e,t,i){!e||Ee(e)?me(this.eventBusEl_,e,t):(t=t,Ie(e=e,this,"off"),Ae(t,this,"off"),xe(i,this,"off"),i=Ce(this,i),this.off("dispose",i),e.nodeName?(me(e,t,i),me(e,"dispose",i)):De(e)&&(e.off(t,i),e.off("dispose",i)))},trigger:function(e,t){Ie(this.eventBusEl_,this,"trigger");var i=e&&"string"!=typeof e?e.type:e;if(!Ee(i)){i="Invalid event type for "+we(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(i);(this.log||h).error(i)}return ge(this.eventBusEl_,e,t)}};function Re(e,t){void 0===t&&(t={});t=t.eventBusKey;if(t){if(!e[t].nodeName)throw new Error('The eventBusKey "'+t+'" does not refer to an element.');e.eventBusEl_=e[t]}else e.eventBusEl_=I("span",{className:"vjs-event-bus"});return y(e,Oe),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),p.setTimeout(function(){e.eventBusEl_=null},0)}),e}var Me={state:{},setState:function(e){var i,n=this;return"function"==typeof e&&(e=e()),g(e,function(e,t){n.state[t]!==e&&((i=i||{})[t]={from:n.state[t],to:e}),n.state[t]=e}),i&&De(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Ne(e,t){return y(e,Me),e.state=y({},e.state,t),"function"==typeof e.handleStateChanged&&De(e)&&e.on("statechanged",e.handleStateChanged),e}function Ue(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toLowerCase()})}function Be(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function Fe(){for(var i={},e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.forEach(function(e){e&&g(e,function(e,t){_(e)?(_(i[t])||(i[t]={}),i[t]=Fe(i[t],e)):i[t]=e})}),i}var je=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var i in this.map_)e.call(t,this.map_[i],i,this)},e}(),Ve=p.Map||je,He=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var i in this.set_)e.call(t,i,i,this)},e}(),qe=p.Set||He,We=function(){function s(e,t,i){!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Fe({},this.options_),t=this.options_=Fe(this.options_,t),this.id_=t.id||t.el&&t.el.id,this.id_||(e=e&&e.id&&e.id()||"no_player",this.id_=e+"_component_"+se++),this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(Re(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Ne(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new qe,this.setIntervalIds_=new qe,this.rafIds_=new qe,this.namedRafs_=new Ve,(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var e=s.prototype;return e.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),ue.has(this.el_)&&ue.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(e){return e&&(this.options_=Fe(this.options_,e)),this.options_},e.el=function(){return this.el_},e.createEl=function(e,t,i){return I(e,t,i)},e.localize=function(e,i,t){void 0===t&&(t=e);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],n=n&&n.split("-")[0],n=r&&r[n],t=t;return a&&a[e]?t=a[e]:n&&n[e]&&(t=n[e]),i&&(t=t.replace(/\{(\d+)\}/g,function(e,t){t=i[t-1];return void 0===t?e:t})),t},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(e){return this.childIndex_[e]},e.getChild=function(e){if(e)return this.childNameIndex_[e]},e.getDescendant=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t=t.reduce(function(e,t){return e.concat(t)},[]);for(var n=this,r=0;r<t.length;r++)if(!(n=n.getChild(t[r]))||!n.getChild)return;return n},e.addChild=function(e,t,i){var n;if(void 0===t&&(t={}),void 0===i&&(i=this.children_.length),"string"==typeof e){n=Be(e);var r=t.componentClass||n;t.name=n;var a=s.getComponent(r);if(!a)throw new Error("Component "+r+" does not exist");if("function"!=typeof a)return null;a=new a(this.player_||this,t)}else a=e;return a.parentComponent_&&a.parentComponent_.removeChild(a),this.children_.splice(i,0,a),a.parentComponent_=this,"function"==typeof a.id&&(this.childIndex_[a.id()]=a),(n=n||a.name&&Be(a.name()))&&(this.childNameIndex_[n]=a,this.childNameIndex_[Ue(n)]=a),"function"==typeof a.el&&a.el()&&(n=null,this.children_[i+1]&&(this.children_[i+1].el_?n=this.children_[i+1].el_:C(this.children_[i+1])&&(n=this.children_[i+1])),this.contentEl().insertBefore(a.el(),n)),a},e.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t,i=!1,n=this.children_.length-1;0<=n;n--)if(this.children_[n]===e){i=!0,this.children_.splice(n,1);break}i&&(e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Be(e.name())]=null,this.childNameIndex_[Ue(e.name())]=null,(t=e.el())&&t.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el()))}},e.initChildren=function(){var i,t,e,n=this,r=this.options_.children;r&&(i=this.options_,t=s.getComponent("Tech"),(e=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter(function(t){return!e.s
vendor: 36,367 bytes, line 1
1ome(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(e){var t,e="string"==typeof e?r[t=e]||n.options_[t]||{}:(t=e.name,e);return{name:t,opts:e}}).filter(function(e){e=s.getComponent(e.opts.componentClass||Be(e.name));return e&&!t.isTech(e)}).forEach(function(e){var t=e.name,e=e.opts;void 0!==i[t]&&(e=i[t]),!1!==e&&(!0===e&&(e={}),e.playerOptions=n.options_.playerOptions,(e=n.addChild(t,e))&&(n[t]=e))}))},e.buildCSSClass=function(){return""},e.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0<e.length&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},e.$=function(e,t){return Q(e,t||this.contentEl())},e.$$=function(e,t){return J(e,t||this.contentEl())},e.hasClass=function(e){return P(this.el_,e)},e.addClass=function(e){L(this.el_,e)},e.removeClass=function(e){D(this.el_,e)},e.toggleClass=function(e,t){O(this.el_,e,t)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(e){return N(this.el_,e)},e.setAttribute=function(e,t){U(this.el_,e,t)},e.removeAttribute=function(e){B(this.el_,e)},e.width=function(e,t){return this.dimension("width",e,t)},e.height=function(e,t){return this.dimension("height",e,t)},e.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.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;t=this.el_.style[e],i=t.indexOf("px");return-1!==i?parseInt(t.slice(0,i),10):parseInt(this.el_["offset"+Be(e)],10)},e.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");return t=b(this.el_,e),0!==(t=parseFloat(t))&&!isNaN(t)||(e="offset"+Be(e),t=this.el_[e]),t},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},e.handleKeyPress=function(e){this.handleKeyDown(e)},e.emitTapEvents=function(){var i,t=0,n=null;this.on("touchstart",function(e){1===e.touches.length&&(n={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},t=p.performance.now(),i=!0)}),this.on("touchmove",function(e){var t;1<e.touches.length?i=!1:n&&(t=e.touches[0].pageX-n.pageX,e=e.touches[0].pageY-n.pageY,10<Math.sqrt(t*t+e*e)&&(i=!1))});function e(){i=!1}this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",function(e){!(n=null)===i&&p.performance.now()-t<200&&(e.preventDefault(),this.trigger("tap"))})},e.enableTouchActivity=function(){var t,i,e;this.player()&&this.player().reportUserActivity&&(t=Ce(this.player(),this.player().reportUserActivity),this.on("touchstart",function(){t(),this.clearInterval(i),i=this.setInterval(t,250)}),e=function(e){t(),this.clearInterval(i)},this.on("touchmove",t),this.on("touchend",e),this.on("touchcancel",e))},e.setTimeout=function(e,t){var i,n=this;return e=Ce(this,e),this.clearTimersOnDispose_(),i=p.setTimeout(function(){n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i},e.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),p.clearTimeout(e)),e},e.setInterval=function(e,t){e=Ce(this,e),this.clearTimersOnDispose_();t=p.setInterval(e,t);return this.setIntervalIds_.add(t),t},e.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),p.clearInterval(e)),e},e.requestAnimationFrame=function(e){var t,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Ce(this,e),t=p.requestAnimationFrame(function(){i.rafIds_.has(t)&&i.rafIds_.delete(t),e()}),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},e.requestNamedAnimationFrame=function(e,t){var i=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Ce(this,t);var n=this.requestAnimationFrame(function(){t(),i.namedRafs_.has(e)&&i.namedRafs_.delete(e)});return this.namedRafs_.set(e,n),e}},e.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},e.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),p.cancelAnimationFrame(e)),e):this.clearTimeout(e)},e.clearTimersOnDispose_=function(){var n=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var t=e[0],i=e[1];n[t].forEach(function(e,t){return n[i](t)})}),n.clearingTimersOnDispose_=!1}))},s.registerComponent=function(e,t){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var i=s.getComponent("Tech"),n=i&&i.isTech(t),i=s===t||s.prototype.isPrototypeOf(t.prototype);if(n||!i){var r=n?"techs must be registered using Tech.registerTech()":"must be a Component subclass";throw new Error('Illegal component, "'+e+'"; '+r+".")}e=Be(e),s.components_||(s.components_={});r=s.getComponent("Player");if("Player"===e&&r&&r.players){var a=r.players,r=Object.keys(a);if(a&&0<r.length&&r.map(function(e){return a[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return s.components_[e]=t,s.components_[Ue(e)]=t},s.getComponent=function(e){if(e&&s.components_)return s.components_[e]},s}();We.prototype.supportsRaf_="function"==typeof p.requestAnimationFrame&&"function"==typeof p.cancelAnimationFrame,We.registerComponent("Component",We);var ze=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};i(function(t){function i(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=i=function(e){return typeof e}:t.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}t.exports=i}),i(function(t){function i(e){return t.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}t.exports=i});var Ge=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},Xe=p.navigator&&p.navigator.userAgent||"",Ke=/AppleWebKit\/([\d.]+)/i.exec(Xe),Ye=Ke?parseFloat(Ke.pop()):null,$e=/iPod/i.test(Xe),Qe=(Yt=Xe.match(/OS (\d+)_/i))&&Yt[1]?Yt[1]:null,Je=/Android/i.test(Xe),Ze=function(){var e=Xe.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}(),et=Je&&Ze<5&&Ye<537,tt=/Firefox/i.test(Xe),it=/Edg/i.test(Xe),nt=!it&&(/Chrome/i.test(Xe)||/CriOS/i.test(Xe)),rt=(ei=Xe.match(/(Chrome|CriOS)\/(\d+)/))&&ei[2]?parseFloat(ei[2]):null,at=(!(oi=(oi=/MSIE\s(\d+)\.\d/.exec(Xe))&&parseFloat(oi[1]))&&/Trident\/7.0/i.test(Xe)&&/rv:11.0/.test(Xe)&&(oi=11),oi),st=/Safari/i.test(Xe)&&!nt&&!Je&&!it,ot=/Windows/i.test(Xe),ut=Boolean(k()&&("ontouchstart"in p||p.navigator.maxTouchPoints||p.DocumentTouch&&p.document instanceof p.DocumentTouch)),lt=/iPad/i.test(Xe)||st&&ut&&!/iPhone/i.test(Xe),ct=/iPhone/i.test(Xe)&&!lt,dt=ct||lt||$e,ht=(st||dt)&&!nt,pt=Object.freeze({__proto__:null,IS_IPOD:$e,IOS_VERSION:Qe,IS_ANDROID:Je,ANDROID_VERSION:Ze,IS_NATIVE_ANDROID:et,IS_FIREFOX:tt,IS_EDGE:it,IS_CHROME:nt,CHROME_VERSION:rt,IE_VERSION:at,IS_SAFARI:st,IS_WINDOWS:ot,TOUCH_ENABLED:ut,IS_IPAD:lt,IS_IPHONE:ct,IS_IOS:dt,IS_ANY_SAFARI:ht});function ft(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||i<t)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,n,i.length-1),i[n][t]}function mt(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:ft.bind(null,"start",0,e),end:ft.bind(null,"end",1,e)}}function gt(e,t){return Array.isArray(e)?mt(e):void 0===e||void 0===t?mt():mt([[e,t]])}function yt(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=gt(0,0));for(var a=0;a<e.length;a++)i=e.start(a),t<(n=e.end(a))&&(n=t),r+=n-i;return r/t}for(var vt,_t={prefixed:!0},bt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Tt=bt[0],St=0;St<bt.length;St++)if(bt[St][1]in d){vt=bt[St];break}if(vt){for(var kt=0;kt<vt.length;kt++)_t[Tt[kt]]=vt[kt];_t.prefixed=vt[0]!==Tt[0]}function Ct(e){if(e instanceof Ct)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:v(e)&&("number"==typeof e.code&&(this.code=e.code),y(this,e)),this.message||(this.message=Ct.defaultMessages[this.code]||"")}Ct.prototype.code=0,Ct.prototype.message="",Ct.prototype.status=null,Ct.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ct.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var wt=0;wt<Ct.errorTypes.length;wt++)Ct[Ct.errorTypes[wt]]=wt,Ct.prototype[Ct.errorTypes[wt]]=wt;var Et=function(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(e){n=e}return[n,i]};function It(e){return null!=e&&"function"==typeof e.then}function At(e){It(e)&&e.then(null,function(e){})}function xt(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,t,i){return n[t]&&(e[t]=n[t]),e},{cues:n.cues&&Array.prototype.map.call(n.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var Pt=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=xt(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(xt))},Lt=function(e,i){return e.forEach(function(e){var t=i.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return t.addCue(e)})}),i.textTracks()},Dt=i(function(e,t){function i(e){if(!e||"object"!=typeof e||(t=e.which||e.keyCode||e.charCode)&&(e=t),"number"==typeof e)return o[e];var t=String(e),e=n[t.toLowerCase()];return e||((e=r[t.toLowerCase()])?e:1===t.length?t.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&"object"==typeof e){var i=e.which||e.keyCode||e.charCode;if(null==i)return!1;if("string"==typeof t){e=n[t.toLowerCase()];if(e)return e===i;if(e=r[t.toLowerCase()])return e===i}else if("number"==typeof t)return t===i;return!1}};for(var n=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91},a=97;a<123;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)n[a-48]=a;for(a=1;a<13;a++)n["f"+a]=a+111;for(a=0;a<10;a++)n["numpad "+a]=a+96;var s,o=t.names=t.title={};for(a in n)o[n[a]]=a;for(s in r)n[s]=r[s]}),Ot=(Dt.code,Dt.codes,Dt.aliases,Dt.names,Dt.title,"vjs-modal-dialog"),Rt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.opened_=t.hasBeenOpened_=t.hasBeenFilled_=!1,t.closeable(!t.options_.uncloseable),t.content(t.options_.content),t.contentEl_=I("div",{className:Ot+"-content"},{role:"document"}),t.descEl_=I("p",{className:Ot+"-description vjs-control-text",id:t.el().getAttribute("aria-describedby")}),A(t.descEl_,t.description()),t.el_.appendChild(t.descEl_),t.el_.appendChild(t.contentEl_),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,i.prototype.dispose.call(this)},t.buildCSSClass=function(){return Ot+" vjs-hidden "+i.prototype.buildCSSClass.call(this)},t.label=function(){return this.localize(this.options_.label||"Modal Window")},t.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.open=function(){var e;this.opened_||(e=this.player(),this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0)},t.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.close=function(){var e;this.opened_&&(e=this.player(),this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose())},t.closeable=function(e){var t,i;return"boolean"==typeof e&&(t=this.closeable_=!!e,i=this.getChild("closeButton"),t&&!i&&(e=this.contentEl_,this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close)),!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())),this.closeable_},t.fill=function(){this.fillWith(this.content())},t.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),K(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);t=this.getChild("closeButton");t&&i.appendChild(t.el_)},t.empty=function(){this.trigger("beforemodalempty"),z(this.contentEl()),this.trigger("modalempty")},t.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t.conditionalFocus_=function(){var e=d.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())},t.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},t.handleKeyDown=function(e){if(e.stopPropagation(),Dt.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(Dt.isEventKey(e,"Tab")){for(var t,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){t=r;break}d.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||(i[0].focus(),e.preventDefault())}},t.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof p.HTMLAnchorElement||e instanceof p.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof p.HTMLInputElement||e instanceof p.HTMLSelectElement||e instanceof p.HTMLTextAreaElement||e instanceof p.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof p.HTMLIFrameElement||e instanceof p.HTMLObjectElement||e instanceof p.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},e}(We);Rt.prototype.options_={pauseOnOpen:!0,temporary:!0},We.registerComponent("ModalDialog",Rt);var Mt,Nt=function(n){function e(e){var t;void 0===e&&(e=[]),(t=n.call(this)||this).tracks_=[],Object.defineProperty(ze(t),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<e.length;i++)t.addTrack(e[i]);return t}Ge(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this,i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get:function(){return this.tracks_[i]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},De(e)&&e.addEventListener("labelchange",e.labelchange_)},t.removeTrack=function(e){for(var t,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},t.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(Te);for(Mt in Nt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Nt.prototype.allowedEvents_)Nt.prototype["on"+Mt]=null;function Ut(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)}function Bt(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)}function Ft(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=d.createElement("a");i.href=e;var n,r=""===i.host&&"file:"!==i.protocol;r&&((n=d.createElement("div")).innerHTML='<a href="'+e+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(n));for(var a={},s=0;s<t.length;s++)a[t[s]]=i[t[s]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),a.protocol||(a.protocol=p.location.protocol),r&&d.body.removeChild(n),a}function jt(e){var t;return e.match(/^https?:\/\//)||((t=d.createElement("div")).innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href),e}function Vt(e){if("string"==typeof e){e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(e)return e.pop().toLowerCase()}return""}function Ht(e,t){return void 0===t&&(t=p.location),(":"===(e=Ft(e)).protocol?t:e).protocol+e.host!==t.protocol+t.host}var r=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].enabled){Ut(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,t}Ge(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&Ut(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Ut(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(Nt),a=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].selected){Bt(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,Object.defineProperty(ze(t),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),t}Ge(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.selected&&Bt(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){t.changing_||(t.changing_=!0,Bt(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},e}(Nt),qt=function(i){function e(){return i.apply(this,arguments)||this}Ge(e,i);var t=e.prototype;return t.addTrack=function(e){var t=this;i.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return t.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return t.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},t.removeTrack=function(e){i.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e}(Nt),je=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Wt=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;function r(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})}if(t<n)for(i=t;i<n;i++)r.call(this,i)},e.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(),zt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Gt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Xt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Kt={disabled:"disabled",hidden:"hidden",showing:"showing"},He=function(a){function e(e){var t;void 0===e&&(e={}),t=a.call(this)||this;var i,n={id:e.id||"vjs_track_"+se++,kind:e.kind||"",language:e.language||""},r=e.label||"";for(i in n)!function(e){Object.defineProperty(ze(t),e,{get:function(){return n[e]},set:function(){}})}(i);return Object.defineProperty(ze(t),"label",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger("labelchange"))}}),t}return Ge(e,a),e}(Te),Ke=Object.freeze({__proto__:null,parseUrl:Ft,getAbsoluteURL:jt,getFileExtension:Vt,isCrossOrigin:Ht}),Yt="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Ye=Yt,$t=function(e){var t=Qt.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Qt=Object.prototype.toString;var Jt=function(e){var n={};return e&&e.trim().split("\n").forEach(function(e){var t=e.indexOf(":"),i=e.slice(0,t).trim().toLowerCase(),t=e.slice(t+1).trim();void 0===n[i]?n[i]=t:Array.isArray(n[i])?n[i].push(t):n[i]=[n[i],t]}),n},Zt=ii,ei=ii;function ti(e,t,i){var n=e;return $t(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=f({},t,{uri:e}),n.callback=i,n}function ii(e,t,i){return ni(t=ti(e,t,i))}function ni(n){if(void 0===n.callback)throw new Error("callback argument missing");var r=!1,a=function(e,t,i){r||(r=!0,n.callback(e,t,i))};function s(){var e=void 0,e=l.response||l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l);if(m)try{e=JSON.parse(e)}catch(e){}return e}function t(e){return clearTimeout(u),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,a(e,g)}function e(){if(!o){var e;clearTimeout(u),e=n.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var t=g,i=null;return 0!==e?(t={body:s(),statusCode:e,method:d,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(t.headers=Jt(l.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,t,t.body)}}var i,o,u,l=n.xhr||null,c=(l=l||new(n.cors||n.useXDR?ii.XDomainRequest:ii.XMLHttpRequest)).url=n.uri||n.url,d=l.method=n.method||"GET",h=n.body||n.data,p=l.headers=n.headers||{},f=!!n.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:l};if("json"in n&&!1!==n.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===n.json?h:n.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(e,0)},l.onload=e,l.onerror=t,l.onprogress=function(){},l.onabort=function(){o=!0},l.ontimeout=t,l.open(d,c,!f,n.username,n.password),f||(l.withCredentials=!!n.withCredentials),!f&&0<n.timeout&&(u=setTimeout(function(){var e;o||(o=!0,l.abort("timeout"),(e=new Error("XMLHttpRequest timeout")).code="ETIMEDOUT",t(e))},n.timeout)),l.setRequestHeader)for(i in p)p.hasOwnProperty(i)&&l.setRequestHeader(i,p[i]);else if(n.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return;return 1}(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(l.responseType=n.responseType),"beforeSend"in n&&"function"==typeof n.beforeSend&&n.beforeSend(l),l.send(h||null),l}ii.XMLHttpRequest=Ye.XMLHttpRequest||function(){},ii.XDomainRequest="withCredentials"in new ii.XMLHttpRequest?ii.XMLHttpRequest:Ye.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],function(n){ii["delete"===n?"del":n]=function(e,t,i){return(t=ti(e,t,i)).method=n.toUpperCase(),ni(t)}}),Zt.default=ei;function ri(e,t){var i=new p.WebVTT.Parser(p,p.vttjs,p.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),0<n.length&&(p.console&&p.console.groupCollapsed&&p.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(function(e){return h.error(e)}),p.console&&p.console.groupEnd&&p.console.groupEnd()),i.flush()}function ai(e,n){var t={uri:e};(e=Ht(e))&&(t.cors=e),(e="use-credentials"===n.tech_.crossOrigin())&&(t.withCredentials=e),Zt(t,Ce(this,function(e,t,i){return e?h.error(e,t):(n.loaded_=!0,void("function"!=typeof p.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){return"vttjserror"!==e.type?ri(i,n):void h.error("vttjs failed to load, stopping trying to process "+n.src)}):ri(i,n)))}))}var si=function(u){function e(e){var t;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var e=Fe(e,{kind:Xt[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=Kt[e.mode]||"disabled",n=e.default;"metadata"!==e.kind&&"chapters"!==e.kind||(i="hidden"),(t=u.call(this,e)||this).tech_=e.tech,t.cues_=[],t.activeCues_=[],t.preload_=!1!==t.tech_.preloadTextTracks;var r=new Wt(t.cues_),s=new Wt(t.activeCues_),o=!1,a=Ce(ze(t),function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1))});return t.tech_.one("dispose",function(){t.tech_.off("timeupdate",a)}),"disabled"!==i&&t.tech_.on("timeupdate",a),Object.defineProperties(ze(t),{default:{get:function(){return n},set:function(){}},mode:{get:function(){return i},set:function(e){Kt[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||ai(this.src,this),this.tech_.off("timeupdate",a),"disabled"!==i&&this.tech_.on("timeupdate",a),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?r:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(o=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),e.src?(t.src=e.src,t.preload_||(t.loaded_=!0),(t.preload_||n||"subtitles"!==e.kind&&"captions"!==e.kind)&&ai(t.src,ze(t))):t.loaded_=!0,t}Ge(e,u);var t=e.prototype;return t.addCue=function(e){var t=e;if(p.vttjs&&!(e instanceof p.vttjs.VTTCue)){for(var i in t=new p.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},e}(He);si.prototype.allowedEvents_={cuechange:"cuechange"};var oi=function(n){function e(e){void 0===e&&(e={});var t=Fe(e,{kind:Gt[e.kind]||""}),e=n.call(this,t)||this,i=!1;return Object.defineProperty(ze(e),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(e.enabled=t.enabled),e.loaded_=!0,e}return Ge(e,n),e}(He),$e=function(n){function e(e){void 0===e&&(e={});var t=Fe(e,{kind:zt[e.kind]||""}),e=n.call(this,t)||this,i=!1;return Object.defineProperty(ze(e),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(e.selected=t.selected),e}return Ge(e,n),e}(He),Qe=function(r){function e(e){var t,i;void 0===e&&(e={}),t=r.call(this)||this;var n=new si(e);return t.kind=n.kind,t.src=n.src,t.srclang=n.language,t.label=n.label,t.default=n.default,Object.defineProperties(ze(t),{readyState:{get:function(){return i}},track:{get:function(){return n}}}),i=0,n.addEventListener("loadeddata",function(){i=2,t.trigger({type:"load",target:ze(t)})}),t}return Ge(e,r),e}(Te);Qe.prototype.allowedEvents_={load:"load"},Qe.NONE=0,Qe.LOADING=1,Qe.LOADED=2,Qe.ERROR=3;var ui={audio:{ListClass:r,TrackClass:oi,capitalName:"Audio"},video:{ListClass:a,TrackClass:$e,capitalName:"Video"},text:{ListClass:qt,TrackClass:si,capitalName:"Text"}};Object.keys(ui).forEach(function(e){ui[e].getterName=e+"Tracks",ui[e].privateName=e+"Tracks_"});var li={remoteText:{ListClass:qt,TrackClass:si,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:je,TrackClass:Qe,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ci=f({},ui,li);li.names=Object.keys(li),ui.names=Object.keys(ui),ci.names=[].concat(li.names).concat(ui.names);var di=Object.create||function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return hi.prototype=e,new hi};function hi(){}function pi(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function fi(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}e=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return e?e[3]?t(e[1],e[2],e[3].replace(":",""),e[4]):59<e[1]?t(e[1],e[2],0,e[4]):t(0,e[1],e[2],e[4]):null}function mi(){this.values=di(null)}function gi(e,t,i,n){var r,a,s=n?e.split(n):[e];for(r in s)"string"==typeof s[r]&&(2===(a=s[r].split(i)).length&&t(a[0],a[1]))}function yi(t,e,s){var i=t;function n(){var e=fi(t);if(null===e)throw new pi(pi.Errors.BadTimeStamp,"Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function r(){t=t.replace(/^\s+/,"")}if(r(),e.startTime=n(),r(),"--\x3e"!==t.substr(0,3))throw new pi(pi.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),r(),e.endTime=n(),r(),function(e,t){var a=new mi;gi(e,function(e,t){switch(e){case"region":for(var i=s.length-1;0<=i;i--)if(s[i].id===t){a.set(e,s[i].region);break}break;case"vertical":a.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),r=n[0];a.integer(e,r),a.percent(e,r)&&a.set("snapToLines",!1),a.alt(e,r,["auto"]),2===n.length&&a.alt("lineAlign",n[1],["start","center","end"]);break;case"position":n=t.split(","),a.percent(e,n[0]),2===n.length&&a.alt("positionAlign",n[1],["start","center","end"]);break;case"size":a.percent(e,t);break;case"align":a.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=a.get("region",null),t.vertical=a.get("vertical","");try{t.line=a.get("line","auto")}catch(e){}t.lineAlign=a.get("lineAlign","start"),t.snapToLines=a.get("snapToLines",!0),t.size=a.get("size",100);try{t.align=a.get("align","center")}catch(e){t.align=a.get("align","middle")}try{t.position=a.get("position","auto")}catch(e){t.position=a.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=a.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(t,e)}((pi.prototype=di(Error.prototype)).constructor=pi).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},mi.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(e,t),!0)}};var vi=d.createElement("textarea"),_i={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},bi={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Ti={v:"title",lang:"lang"},Si={rt:"ruby"};function ki(e,t){for(var i,n,r,a,s,o,u,l,c,d,h=e.document.createElement("div"),p=h,f=[];null!==(i=function(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>
1]*>?)?/);return e=e[1]||e[2],t=t.substr(e.length),e}());)"<"!==i[0]?p.appendChild(e.document.createTextNode((s=i,vi.innerHTML=s,s=vi.textContent,vi.textContent="",s))):"/"!==i[1]?(a=fi(i.substr(1,i.length-2)))?(n=e.document.createProcessingInstruction("timestamp",a),p.appendChild(n)):(r=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/))&&(l=r[1],c=r[3],d=void 0,d=_i[l],(n=d?(d=e.document.createElement(d),(l=Ti[l])&&c&&(d[l]=c.trim()),d):null)&&(o=p,Si[(u=n).localName]&&Si[u.localName]!==o.localName||(r[2]&&((a=r[2].split(".")).forEach(function(e){var t=/^bg_/.test(e),e=t?e.slice(3):e;bi.hasOwnProperty(e)&&(t=t?"background-color":"color",e=bi[e],n.style[t]=e)}),n.className=a.join(" ")),f.push(r[1]),p.appendChild(n),p=n))):f.length&&f[f.length-1]===i.substr(2).replace(">","")&&(f.pop(),p=p.parentNode);return h}var Ci=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function wi(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function a(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}for(a(t,e);i=function e(t){if(!t||!t.length)return null;var i=t.pop(),n=i.textContent||i.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?r[t.length=0]:n}return"ruby"===i.tagName?e(t):i.childNodes?(a(t,i),e(t)):void 0}(t);)for(var n=0;n<i.length;n++)if(function(e){for(var t=0;t<Ci.length;t++){var i=Ci[t];if(e>=i[0]&&e<=i[1])return 1}}(i.charCodeAt(n)))return"rtl";return"ltr"}function Ei(){}function Ii(e,t,i){Ei.call(this),this.cue=t,this.cueDiv=ki(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:wi(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")}
vendor: 4,315 bytes, line 1
1)}}function Ai(e){var t,i,n,r;e.div&&(t=e.div.offsetHeight,i=e.div.offsetWidth,n=e.div.offsetTop,r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects(),e=e.div.getBoundingClientRect(),r=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0),this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||t,this.bottom=e.bottom||n+(e.height||t),this.width=e.width||i,this.lineHeight=void 0!==r?r:e.lineHeight}function xi(e,t,o,u){var i,n=new Ai(t),r=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}(r),s=[];if(r.snapToLines){switch(r.vertical){case"":s=["+y","-y"],i="height";break;case"rl":s=["+x","-x"],i="width";break;case"lr":s=["-x","+x"],i="width"}var l=n.lineHeight,c=l*Math.round(a),d=o[i]+l,h=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===r.vertical?o.height:o.width,s=s.reverse()),n.move(h,c)}else{var p=n.lineHeight/o.height*100;switch(r.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],n=new Ai(t)}n=function(e,t){for(var i,n=new Ai(e),r=1,a=0;a<t.length;a++){for(;e.overlapsOppositeAxis(o,t[a])||e.within(o)&&e.overlapsAny(u);)e.move(t[a]);if(e.within(o))return e;var s=e.intersectPercentage(o);s<r&&(i=new Ai(e),r=s),e=new Ai(n)}return i||n}(n,s);t.move(n.toCSSCompatValues(o))}function Pi(){}Ei.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},Ei.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(Ii.prototype=di(Ei.prototype)).constructor=Ii,Ai.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Ai.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Ai.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Ai.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Ai.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},Ai.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Ai.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Ai.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},Pi.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Pi.convertCueToDOMTree=function(e,t){return e&&t?ki(e,t):null};Pi.processCues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var a=n.document.createElement("div");if(a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin="1.5%",e.appendChild(a),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return 1}(r)){var s=[],o=Ai.getSimpleBoxPosition(a),u={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var e,t,i=0;i<r.length;i++)t=r[i],e=new Ii(n,t,u),a.appendChild(e.div),xi(0,e,o,s),t.dis
vendor: 3,752 bytes, line 1
1playState=e.div,s.push(Ai.getSimpleBoxPosition(e))}()}else for(var t=0;t<r.length;t++)a.appendChild(r[t].displayState)},(Pi.Parser=function(e,t,i){i||(i=t,t={}),t=t||{},this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof pi))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,n=this;function i(){for(var e=n.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var i=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),i}function r(e){e.match(/X-TIMESTAMP-MAP/)?gi(e,function(e,t){var i;"X-TIMESTAMP-MAP"===e&&(t=t,i=new mi,gi(t,function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",fi(t))}},/[^\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")}))},/=/):gi(e,function(e,t){var r;"Region"===e&&(t=t,r=new mi,gi(t,function(e,t){switch(e){case"id":r.set(e,t);break;case"width":r.percent(e,t);break;case"lines":r.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var n=new mi;if(n.percent("x",i[0]),n.percent("y",i[1]),!n.has("x")||!n.has("y"))break;r.set(e+"X",n.get("x")),r.set(e+"Y",n.get("y"));break;case"scroll":r.alt(e,t,["up"])}},/=/,/\s/),r.has("id")&&((t=new(n.vttjs.VTTRegion||n.window.VTTRegion)).width=r.get("width",100),t.lines=r.get("lines",3),t.regionAnchorX=r.get("regionanchorX",0),t.regionAnchorY=r.get("regionanchorY",100),t.viewportAnchorX=r.get("viewportanchorX",0),t.viewportAnchorY=r.get("viewportanchorY",100),t.scroll=r.get("scroll",""),n.onregion&&n.onregion(t),n.regionList.push({id:r.get("id"),region:t})))},/:/)}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var a=(t=i()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new pi(pi.Errors.BadSignature);n.state="HEADER"}for(var s=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(s?s=!1:t=i(),n.state){case"HEADER":/:/.test(t)?r(t):t||(n.state="ID");continue;case"NOTE":t||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(t)){n.state="NOTE";break}if(!t)continue;n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,"");try{n.cue.align="center"}catch(e){n.cue.align="middle"}if(n.state="CUE",-1===t.indexOf("--\x3e")){n.cue.id=t;continue}case"CUE":try{yi(t,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var o=-1!==t.indexOf("--\x3e");if(!t||o&&(s=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=t.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":t||(n.state="ID");continue}}}catch(e){n.reportOrThrowError(e),"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),!t.cue&&"HEADER"!==t.state||(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new pi(pi.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var Li=Pi,Di={"":1,lr:1,rl:1},Oi={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Ri(e){return"string"==typeof e&&(!!Oi[e.toLowerCase()]&&e.toLowerCase())}function Mi(e,t,i){this.hasBeenReset=!1;var n="",r=!1,a=e,s=t,o=i,u=null,l="",c=!0,d="auto",h="start",p="auto",f="auto",m=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=""+e}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(e){r=!!e}},startTime:{enumerable:!0,get:function(){return a}
vendor: 2,949 bytes, line 1
1,set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");a=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");s=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){e="string"==typeof(e=e)&&(!!Di[e.toLowerCase()]&&e.toLowerCase());if(!1===e)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");l=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){e=Ri(e);e?(h=e,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||100<e)throw new Error("Position must be between 0 and 100.");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){e=Ri(e);e?(f=e,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||100<e)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){e=Ri(e);if(!e)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=e,this.hasBeenReset=!0}}}),this.displayState=void 0}Mi.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ni=Mi,Ui={"":!0,up:!0};function Bi(e){return"number"==typeof e&&0<=e&&e<=100}function Fi(){var t=100,i=3,n=0,r=100,a=0,s=100,o="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!Bi(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Bi(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Bi(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Bi(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
vendor: 8,054 bytes, line 1
1,set:function(e){if(!Bi(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return o},set:function(e){e="string"==typeof(e=e)&&(!!Ui[e.toLowerCase()]&&e.toLowerCase());!1===e?console.warn("Scroll: an invalid or illegal string was specified."):o=e}}})}var ji=i(function(e){e=e.exports={WebVTT:Li,VTTCue:Ni,VTTRegion:Fi};p.vttjs=e,p.WebVTT=e.WebVTT;var t=e.VTTCue,i=e.VTTRegion,n=p.VTTCue,r=p.VTTRegion;e.shim=function(){p.VTTCue=t,p.VTTRegion=i},e.restore=function(){p.VTTCue=n,p.VTTRegion=r},p.VTTCue||e.shim()});ji.WebVTT,ji.VTTCue,ji.VTTRegion;var Vi=function(n){function i(t,e){var i;return void 0===t&&(t={}),void 0===e&&(e=function(){}),t.reportTouchActivity=!1,(i=n.call(this,null,t,e)||this).hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}),ci.names.forEach(function(e){e=ci[e];t&&t[e.getterName]&&(i[e.privateName]=t[e.getterName])}),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===t["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.preloadTextTracks=!1!==t.preloadTextTracks,i.autoRemoteTextTracks_=new ci.text.ListClass,i.initTrackListeners(),t.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}Ge(i,n);var e=i.prototype;return e.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"})},e.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ce(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)},e.onDurationChange=function(e){this.duration_=this.duration()},e.buffered=function(){return gt(0,0)},e.bufferedPercent=function(){return yt(this.buffered(),this.duration_)},e.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.dispose=function(){this.clearTracks(ui.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),n.prototype.dispose.call(this)},e.clearTracks=function(e){var r=this;(e=[].concat(e)).forEach(function(e){for(var t=r[e+"Tracks"]()||[],i=t.length;i--;){var n=t[i];"text"===e&&r.removeRemoteTextTrack(n),t.removeTrack(n)}})},e.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},e.reset=function(){},e.crossOrigin=function(){},e.setCrossOrigin=function(){},e.error=function(e){return void 0!==e&&(this.error_=new Ct(e),this.trigger("error")),this.error_},e.played=function(){return this.hasStarted_?gt(0,0):gt()},e.play=function(){},e.setScrubbing=function(){},e.scrubbing=function(){},e.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.initTrackListeners=function(){var r=this;ui.names.forEach(function(e){function t(){r.trigger(e+"trackchange")}var i=ui[e],n=r[i.getterName]();n.addEventListener("removetrack",t),n.addEventListener("addtrack",t),r.on("dispose",function(){n.removeEventListener("removetrack",t),n.removeEventListener("addtrack",t)})})},e.addWebVttScript_=function(){var e,t=this;p.WebVTT||(d.body.contains(this.el())?!this.options_["vtt.js"]&&_(ji)&&0<Object.keys(ji).length?this.trigger("vttjsloaded"):((e=d.createElement("script")).src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),p.WebVTT=!0,this.el().parentNode.appendChild(e)):this.ready(this.addWebVttScript_))},e.emulateTextTracks=function(){function t(e){return n.addTrack(e.track)}function i(e){return n.removeTrack(e.track)}var e=this,n=this.textTracks(),r=this.remoteTextTracks();r.on("addtrack",t),r.on("removetrack",i),this.addWebVttScript_();function a(){return e.trigger("texttrackchange")}function s(){a();for(var e=0;e<n.length;e++){var t=n[e];t.removeEventListener("cuechange",a),"showing"===t.mode&&t.addEventListener("cuechange",a)}}s(),n.addEventListener("change",s),n.addEventListener("addtrack",s),n.addEventListener("removetrack",s),this.on("dispose",function(){r.off("addtrack",t),r.off("removetrack",i),n.removeEventListener("change",s),n.removeEventListener("addtrack",s),n.removeEventListener("removetrack",s);for(var e=0;e<n.length;e++)n[e].removeEventListener("cuechange",a)})},e.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,r){void 0===r&&(r={});var a=e.textTracks();return r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e,r=new ci.text.TrackClass(r),a.addTrack(r),r}(this,e,t,i)},e.createRemoteTextTrack=function(e){e=Fe(e,{tech:this});return new li.remoteTextEl.TrackClass(e)},e.addRemoteTextTrack=function(e,t){var i=this;void 0===e&&(e={});var n=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(h.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)}),n},e.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},e.getVideoPlaybackQuality=function(){return{}},e.requestPictureInPicture=function(){var e=this.options_.Promise||p.Promise;if(e)return e.reject()},e.disablePictureInPicture=function(){return!0},e.setDisablePictureInPicture=function(){},e.setPoster=function(){},e.playsinline=function(){},e.setPlaysinline=function(){},e.overrideNativeAudioTracks=function(){},e.overrideNativeVideoTracks=function(){},e.canPlayType=function(){return""},i.canPlayType=function(){return""},i.canPlaySource=function(e,t){return i.canPlayType(e.type)},i.isTech=function(e){return e.prototype instanceof i||e instanceof i||e===i},i.registerTech=function(e,t){if(i.techs_||(i.techs_={}),!i.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!i.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!i.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Be(e),i.techs_[e]=t,i.techs_[Ue(e)]=t,"Tech"!==e&&i.defaultTechOrder_.push(e),t},i.getTech=function(e){if(e)return i.techs_&&i.techs_[e]?i.techs_[e]:(e=Be(e),p&&p.videojs&&p.videojs[e]?(h.warn("The "+e+" tech w
1as added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),p.videojs[e]):void 0)},i}(We);ci.names.forEach(function(e){var t=ci[e];Vi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),Vi.prototype.featuresVolumeControl=!0,Vi.prototype.featuresMuteControl=!0,Vi.prototype.featuresFullscreenResize=!1,Vi.prototype.featuresPlaybackRate=!1,Vi.prototype.featuresProgressEvents=!1,Vi.prototype.featuresSourceset=!1,Vi.prototype.featuresTimeupdateEvents=!1,Vi.prototype.featuresNativeTextTracks=!1,Vi.withSourceHandlers=function(r){r.registerSourceHandler=function(e,t){var i=(i=r.sourceHandlers)||(r.sourceHandlers=[]);void 0===t&&(t=i.length),i.splice(t,0,e)},r.canPlayType=function(e){for(var t,i=r.sourceHandlers||[],n=0;n<i.length;n++)if(t=i[n].canPlayType(e))return t;return""},r.selectSourceHandler=function(e,t){for(var i=r.sourceHandlers||[],n=0;n<i.length;n++)if(i[n].canHandleSource(e,t))return i[n];return null},r.canPlaySource=function(e,t){var i=r.selectSourceHandler(e,t);return i?i.canHandleSource(e,t):""};["seekable","seeking","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(e){var t=r.selectSourceHandler(e,this.options_);t||(r.nativeSourceHandler?t=r.nativeSourceHandler:h.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),t!==r.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=t.handleSource(e,this,this.options_),this.one("dispose",this.disposeSourceHandler)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},We.registerComponent("Tech",Vi),Vi.registerTech("Tech",Vi),Vi.defaultTechOrder_=[];var Hi={},qi={},Wi={};function zi(e,t,i){e.setTimeout(function(){return function i(n,e,r,a,s,o){void 0===n&&(n={});void 0===e&&(e=[]);void 0===s&&(s=[]);void 0===o&&(o=!1);var t=e,e=t[0],u=t.slice(1);if("string"==typeof e)i(n,Hi[e],r,a,s,o);else if(e){var l=Qi(a,e);if(!l.setSource)return s.push(l),i(n,u,r,a,s,o);l.setSource(y({},n),function(e,t){return e?i(n,u,r,a,s,o):(s.push(l),void i(t,n.type===t.type?u:Hi[t.type],r,a,s,o))})}else u.length?i(n,u,r,a,s,o):o?r(n,s):i(n,Hi["*"],r,a,s,!0)}(t,Hi[t.type],i,e)},1)}function Gi(e,t,i,n){void 0===n&&(n=null);var r="call"+Be(i),r=e.reduce($i(r),n),n=r===Wi,r=n?null:t[i](r);return function(e,t,i,n){for(var r=e.length-1;0<=r;r--){var a=e[r];a[t]&&a[t](n,i)}}(e,i,r,n),r}var Xi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Ki={setCurrentTime:1,setMuted:1,setVolume:1},Yi={play:1,pause:1};function $i(i){return function(e,t){return e===Wi?Wi:t[i]?t[i](e):e}}function Qi(e,t){var i=qi[e.id()],n=null;if(null==i)return n=t(e),qi[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var a=i[r],s=a[0],a=a[1];s===t&&(n=a)}return null===n&&(n=t(e),i.push([t,n])),n}function Ji(e){return void 0===e&&(e=""),e=Vt(e),en[e.toLowerCase()]||""}function Zi(e){var t;return e=Array.isArray(e)?(t=[],e.forEach(function(e){e=Zi(e),Array.isArray(e)?t=t.concat(e):v(e)&&t.push(e)}),t):"string"==typeof e&&e.trim()?[tn({src:e})]:v(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[tn(e)]:[]}var en={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};function tn(e){var t;return e.type||(t=Ji(e.src))&&(e.type=t),e}st=function(u){function e(e,t,i){var n=Fe({createEl:!1},t),i=u.call(this,e,n,i)||this;if(t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(var r=0,a=t.playerOptions.techOrder;r<a.length;r++){var s=Be(a[r]),o=Vi.getTech(s);if(s||(o=We.getComponent(s)),o&&o.isSupported()){e.loadTech_(s);break}}return i}return Ge(e,u),e}(We);We.registerComponent("MediaLoader",st);lt=function(n){function e(e,t){t=n.call(this,e,t)||this;return t.emitTapEvents(),t.enable(),t}Ge(e,n);var t=e.prototype;return t.createEl=function(e,t,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={}),t=y({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&h.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=y({role:"button"},i),this.tabIndex_=t.tabIndex;i=n.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(i),i},t.dispose=function(){this.controlTextEl_=null,n.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=I("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,A(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},t.buildCSSClass=function(){return"vjs-control vjs-button "+n.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},t.handleLanguagechange=function(){this.controlText(this.controlText_)},t.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},t.handleKeyDown=function(e){Dt.isEventKey(e,"Space")||Dt.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):n.prototype.handleKeyDown.call(this,e)},e}(We);We.registerComponent("ClickableComponent",lt);Yt=function(i){function e(e,t){t=i.call(this,e,t)||this;
vendor: 25,661 bytes, line 1
1return t.update(),e.on("posterchange",Ce(ze(t),t.update)),t}Ge(e,i);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),i.prototype.dispose.call(this)},t.createEl=function(){return I("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.setSrc=function(e){e=e?'url("'+e+'")':"";this.el_.style.backgroundImage=e},t.handleClick=function(e){var t;this.player_.controls()&&(t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length,!this.player_.tech(!0)||(at||it)&&t||this.player_.tech(!0).focus(),this.player_.paused()?At(this.player_.play()):this.player_.pause())},e}(lt);We.registerComponent("PosterImage",Yt);var nn="#222",rn={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 an(e,t){var i;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 sn(e,t,i){try{e.style[t]=i}catch(e){return}}Ye=function(r){function e(i,e,t){var t=r.call(this,i,e,t)||this,n=Ce(ze(t),t.updateDisplay);return i.on("loadstart",Ce(ze(t),t.toggleDisplay)),i.on("texttrackchange",n),i.on("loadedmetadata",Ce(ze(t),t.preselectTrack)),i.ready(Ce(ze(t),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n),i.on("playerresize",n),p.addEventListener("orientationchange",n),i.on("dispose",function(){return p.removeEventListener("orientationchange",n)});for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}})),t}Ge(e,r);var t=e.prototype;return t.preselectTrack=function(){for(var e,t,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){var o=r[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in n?i=o.kind!==a.kind&&i||o:a&&!a.enabled?t=e=i=null:o.default&&("descriptions"!==o.kind||e?o.kind in n&&!t&&(t=o):e=o)}i?i.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},t.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.clearDisplay=function(){"function"==typeof p.WebVTT&&p.WebVTT.processCues(p,[],this.el_)},t.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var i=[],n=0;n<e.length;++n){var r=e[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var a=null,s=null,o=e.length;o--;){var u=e[o];"showing"===u.mode&&("descriptions"===u.kind?a=u:s=u)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},t.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){var r,a=i[n];a&&(r=a.displayState,t.color&&(r.firstChild.style.color=t.color),t.textOpacity&&sn(r.firstChild,"color",an(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(r.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&sn(r.firstChild,"backgroundColor",an(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?sn(r,"backgroundColor",an(t.windowColor,t.windowOpacity)):r.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?r.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+nn:"raised"===t.edgeStyle?r.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+nn:"depressed"===t.edgeStyle?r.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+nn:"uniform"===t.edgeStyle&&(r.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+nn)),t.fontPercent&&1!==t.fontPercent&&(a=p.parseFloat(r.style.fontSize),r.style.fontSize=a*t.fontPercent+"px",r.style.height="auto",r.style.top="auto"),t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?r.firstChild.style.fontVariant="small-caps":r.firstChild.style.fontFamily=rn[t.fontFamily]))}},t.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof p.WebVTT&&!e.every(function(e){return!e.activeCues})){for(var t=[],i=0;i<e.length;++i)for(var n=e[i],r=0;r<n.activeCues.length;++r)t.push(n.activeCues[r]);p.WebVTT.processCues(p,t,this.el_);for(var a=0;a<e.length;++a){for(var s=e[a],o=0;o<s.activeCues.length;++o){var u=s.activeCues[o].displayState;L(u,"vjs-text-track-cue"),L(u,"vjs-text-track-cue-"+(s.language||a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},e}(We);We.registerComponent("TextTrackDisplay",Ye);ei=function(i){function e(){return i.apply(this,arguments)||this}return Ge(e,i),e.prototype.createEl=function(){var e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),e=I("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[t])}),t=i.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return t.appendChild(e),t},e}(We);We.registerComponent("LoadingSpinner",ei);var on=function(t){function e(){return t.apply(this,arguments)||this}Ge(e,t);var i=e.prototype;return i.createEl=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={}),t=y({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),i=y({type:"button"},i);i=We.prototype.createEl.call(this,"button",t,i);return this.createControlTextEl(i),i},i.addChild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return h.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),We.prototype.addChild.call(this,e,t)},i.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(e){Dt.isEventKey(e,"Space")||Dt.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(lt);We.registerComponent("Button",on);He=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.mouseused_=!1,t.on("mousedown",t.handleMouseDown),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length;return At(t),void(!this.player_.tech(!0)||(at||it)&&i||this.player_.tech(!0).focus())}var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");n?(i=function(){return n.focus()},It(t)?t.then(i,function(){}):this.setTimeout(i,1)):this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,i.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},e}(on);He.prototype.controlText_="Play Video",We.registerComponent("BigPlayButton",He);r=function(i){function e(e,t){e=i.call(this,e,t)||this;return e.controlText(t&&t.controlText||e.localize("Close")),e}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+i.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){Dt.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):i.prototype.handleKeyDown.call(this,e)},e}(on);We.registerComponent("CloseButton",r);a=function(n){function e(e,t){var i;return void 0===t&&(t={}),i=n.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,i.on(e,"play",i.handlePlay),i.on(e,"pause",i.handlePause),t.replay&&i.on(e,"ended",i.handleEnded),i}Ge(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+n.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(on);a.prototype.controlText_="Play",We.registerComponent("PlayToggle",a);function un(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),t=Math.floor(t/3600);return!isNaN(e)&&e!==1/0||(r=n=i="-"),(r=0<r||0<t?r+":":"")+(n=((r||10<=a)&&n<10?"0"+n:n)+":")+(i=i<10?"0"+i:i)}var ln=un;function cn(e,t){return void 0===t&&(t=e),ln(e,t)}qt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.on(e,["timeupdate","ended"],t.updateContent),t.updateTextNode_(),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){var e=this.buildCSSClass(),t=i.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=I("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),t.appendChild(this.contentEl_),t},t.dispose=function(){this.contentEl_=null,this.textNode_=null,i.prototype.dispose.call(this)},t.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=cn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){var e;t.contentEl_&&((e=t.textNode_)&&t.contentEl_.firstChild!==e&&(e=null,h.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=d.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_)))}))},t.updateContent=function(e){},e}(We);qt.prototype.labelText_="Time",qt.prototype.controlText_="Time",We.registerComponent("TimeDisplay",qt);je=function(e){function t(){return e.apply(this,arguments)||this}Ge(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(e){var t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateTextNode_(t)},t}(qt);je.prototype.labelText_="Current Time",je.prototype.controlText_="Current Time",We.registerComponent("CurrentTimeDisplay",je);Qe=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.on(e,"durationchange",t.updateContent),t.on(e,"loadstart",t.updateContent),t.on(e,"loadedmetadata",t.updateContent),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},e}(qt);Qe.prototype.labelText_="Duration",Qe.prototype.controlText_="Duration",We.registerComponent("DurationDisplay",Qe);st=function(e){function t(){return e.apply(this,arguments)||this}return Ge(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(We);We.registerComponent("TimeDivider",st);Yt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.on(e,"durationchange",t.updateContent),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=i.prototype.createEl.call(this);return e.insertBefore(I("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},e}(qt);Yt.prototype.labelText_="Remaining Time",Yt.prototype.controlText_="Remaining Time",We.registerComponent("RemainingTimeDisplay",Yt);Ye=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.updateShowing(),t.on(t.player(),"durationchange",t.updateShowing),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){var e=i.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=I("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,i.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}(We);We.registerComponent("LiveDisplay",Ye);ei=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.updateLiveEdgeStatus(),t.player_.liveTracker&&t.on(t.player_.liveTracker,"liveedgechange",t.updateLiveEdgeStatus),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){var e=i.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=I("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,i.prototype.dispose.call(this)},e}(on);ei.prototype.controlText_="Seek to live, currently playing live",We.registerComponent("SeekToLive",ei);function dn(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}He=function(n){function e(e,t){t=n.call(this,e,t)||this;return t.bar=t.getChild(t.options_.barName),t.vertical(!!t.options_.vertical),t.enable(),t}Ge(e,n);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),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.disable=function(){var e;this.enabled()&&(e=this.bar.el_.ownerDocument,this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),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.createEl=function(e,t,i){return void 0===t&&(t={}),void 0===i&&(i={}),t.className=t.className+" vjs-slider",t=y({tabIndex:0},t),i=y({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),n.prototype.createEl.call(this,e,t,i)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||nt||e.preventDefault(),F(),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.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;j(),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.update=function(){var t=this;if(this.el_&&this.bar){var i=this.getProgress();return i===this.progress_?i:(this.progress_=i,this.requestNamedAnimationFrame("Slider#update",function(){var e=t.vertical()?"height":"width";t.bar.el().style[e]=(100*i).toFixed(2)+"%"}),i)}},t.getProgress=function(){return Number(dn(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){e=q(this.el_,e);return this.vertical()?e.y:e.x},t.handleKeyDown=function(e){Dt.isEventKey(e,"Left")||Dt.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):Dt.isEventKey(e,"Right")||Dt.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):n.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.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")},e}(We);We.registerComponent("Slider",He);function hn(e,t){return dn(e/t*100,0,100).toFixed(2)+"%"}r=function(r){function e(e,t){t=r.call(this,e,t)||this;return t.partEls_=[],t.on(e,"progress",t.update),t}Ge(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),t=I("span",{className:"vjs-control-text"}),i=I("span",{textContent:this.localize("Loaded")}),n=d.createTextNode(": ");return this.percentageEl_=I("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,r.prototype.dispose.call(this)},t.update=function(e){var l=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var e=l.player_.liveTracker,t=l.player_.buffered(),e=e&&e.isLive()?e.seekableEnd():l.player_.duration(),i=l.player_.bufferedEnd(),n=l.partEls_,e=hn(i,e);l.percent_!==e&&(l.el_.style.width=e,A(l.percentageEl_,e),l.percent_=e);for(var r=0;r<t.length;r++){var a=t.start(r),s=t.end(r),o=n[r];o||(o=l.el_.appendChild(I()),n[r]=o),o.dataset.start===a&&o.dataset.end===s||(o.dataset.start=a,o.dataset.end=s,o.style.left=hn(a,i),o.style.width=hn(s-a,i))}for(var u=n.length;u>t.length;u--)l.el_.removeChild(n[u-1]);n.length=t.length})},e}(We);We.registerComponent("LoadProgressBar",r);a=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=_e(Ce(ze(t),t.update),30),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,i){var n=H(this.el_),r=V(this.player_.el()),a=e.width*t;r&&n&&(t=e.left-r.left+a,r=e.width-a+(r.right-e.right),t<(e=n.width/2)?e+=e-t:r<e&&(e=r),e<0?e=0:e>n.width&&(e=n.width),e=Math.round(e),this.el_.style.right="-"+e+"px",this.write(i))},t.write=function(e){A(this.el_,e)},t.updateTime=function(n,r,a,s){var o=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var e,t,i=o.player_.duration();i=o.player_.liveTracker&&o.player_.liveTracker.isLive()?((t=(e=o.player_.liveTracker.liveWindow())-r*e)<1?"":"-")+cn(t,e):cn(a,i),o.update(n,r,i),s&&s()})},e}(We);We.registerComponent("TimeTooltip",a);je=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=_e(Ce(ze(t),t.update),30),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,t){var i,n=this.getChild("timeTooltip");n&&(i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),n.updateTime(e,t,i))},e}(We);je.prototype.options_={children:[]},dt||Je||je.prototype.options_.children.push("timeTooltip"),We.registerComponent("PlayProgressBar",je);Qe=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=_e(Ce(ze(t),t.update),30),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var i=this,n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,function(){i.el_.style.left=e.width*t+"px"})},e}(We);Qe.prototype.options_={children:["timeTooltip"]},We.registerComponent("MouseTimeDisplay",Qe);st=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.setEventHandlers_(),t}Ge(e,i);var t=e.prototype;return t.setEventHandlers_=function(){this.update_=Ce(this,this.update),this.update=_e(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in d&&"visibilityState"in d&&this.on(d,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){d.hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var n=this,r=i.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[cn(e,i),cn(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(V(n.el()),n.getProgress())}),r},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},t.handleMouseDown=function(e){Y(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),i.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(Y(e)){var t=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){if(.99<=t)return void i.seekToLiveEdge();var n,r=i.seekableStart(),e=i.liveCurrentTime();if(e<=(n=r+t*i.liveWindow())&&(n=e),n<=r&&(n=r+.1),n===1/0)return}else(n=t*this.player_.duration())===this.player_.duration()&&(n-=.1);this.player_.currentTime(n)}},t.enable=function(){i.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){i.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){i.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?At(this.player_.play()):this.update_()},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var t;Dt.isEventKey(e,"Space")||Dt.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.handleAction(e)):Dt.isEventKey(e,"Home")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0)):Dt.isEventKey(e,"End")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration())):/^[0-9]$/.test(Dt(e))?(e.preventDefault(),e.stopPropagation(),t=10*(Dt.codes[Dt(e)]-Dt.codes[0])/100,this.player_.currentTime(this.player_.duration()*t)):Dt.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):Dt.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):i.prototype.handleKeyDown.call(this,e)}
1,t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in d&&"visibilityState"in d&&this.off(d,"visibilitychange",this.toggleVisibility_),i.prototype.dispose.call(this)},e}(He);st.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},dt||Je||st.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),We.registerComponent("SeekBar",st);qt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.handleMouseMove=_e(Ce(ze(t),t.handleMouseMove),30),t.throttledHandleMouseSeek=_e(Ce(ze(t),t.handleMouseSeek),30),t.enable(),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t,i,n,r,a=this.getChild("seekBar");a&&(t=a.getChild("playProgressBar"),i=a.getChild("mouseTimeDisplay"),(t||i)&&(r=H(n=a.el()),e=q(n,e).x,e=dn(e,0,1),i&&i.update(r,e),t&&t.update(r,a.getProgress())))},t.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_}
vendor: 27,032 bytes, line 1
1,t.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.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.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.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)},e}(We);qt.prototype.options_={children:["seekBar"]},We.registerComponent("ProgressControl",qt);Yt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.on(e,["enterpictureinpicture","leavepictureinpicture"],t.handlePictureInPictureChange),t.on(e,["disablepictureinpicturechanged","loadedmetadata"],t.handlePictureInPictureEnabledChange),t.disable(),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){},t.handlePictureInPictureEnabledChange=function(){d.pictureInPictureEnabled&&this.player_.disablePictureInPicture(),this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(on);Yt.prototype.controlText_="Picture-in-Picture",We.registerComponent("PictureInPictureToggle",Yt);Ye=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.on(e,"fullscreenchange",t.handleFullscreenChange),!1===d[e.fsApi_.fullscreenEnabled]&&t.disable(),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+i.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(on);Ye.prototype.controlText_="Fullscreen",We.registerComponent("FullscreenToggle",Ye);ei=function(e){function t(){return e.apply(this,arguments)||this}return Ge(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(We);We.registerComponent("VolumeLevel",ei);r=function(n){function e(e,t){var i=n.call(this,e,t)||this;return i.on("slideractive",i.updateLastVolume_),i.on(e,"volumechange",i.updateARIAAttributes),e.ready(function(){return i.updateARIAAttributes()}),i}Ge(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){Y(e)&&n.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){Y(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(He);r.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},r.prototype.playerEvent="volumechange",We.registerComponent("VolumeBar",r);a=function(a){function e(e,t){var i,n,r;return void 0===t&&(t={}),t.vertical=t.vertical||!1,void 0!==t.volumeBar&&!_(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),i=a.call(this,e,t)||this,n=ze(i),(r=e).tech_&&!r.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),i.throttledHandleMouseMove=_e(Ce(ze(i),i.handleMouseMove),30),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}Ge(e,a);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(We);a.prototype.options_={children:["volumeBar"]},We.registerComponent("VolumeControl",a);je=function(r){function e(e,t){var i,n,t=r.call(this,e,t)||this;return i=ze(t),(n=e).tech_&&!n.tech_.featuresMuteControl&&i.addClass("vjs-hidden"),i.on(n,"loadstart",function(){n.tech_.featuresMuteControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),t.on(e,["loadstart","volumechange"],t.update),t}Ge(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();0===t?(i=i<.1?.1:i,this.player_.volume(i),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;dt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)D(this.el_,"vjs-vol-"+i);L(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(on);je.prototype.controlText_="Mute",We.registerComponent("MuteToggle",je);Qe=function(i){function e(e,t){return void 0===t&&(t={}),void 0!==t.inline?t.inline=t.inline:t.inline=!0,void 0!==t.volumeControl&&!_(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(t=i.call(this,e,t)||this).on(e,["loadstart"],t.volumePanelState_),t.on(t.muteToggle,"keyup",t.handleKeyPress),t.on(t.volumeControl,"keyup",t.handleVolumeControlKeyUp),t.on("keydown",t.handleKeyPress),t.on("mouseover",t.handleMouseOver),t.on("mouseout",t.handleMouseOut),t.on(t.volumeControl,["slideractive"],t.sliderActive_),t.on(t.volumeControl,["sliderinactive"],t.sliderInactive_),t}Ge(e,i);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),i.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),i.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){Dt.isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),fe(d,"keyup",Ce(this,this.handleKeyPress))},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),me(d,"keyup",Ce(this,this.handleKeyPress))},t.handleKeyPress=function(e){Dt.isEventKey(e,"Esc")&&this.handleMouseOut()},e}(We);Qe.prototype.options_={children:["muteToggle","volumeControl"]},We.registerComponent("VolumePanel",Qe);var pn=function(i){function e(e,t){e=i.call(this,e,t)||this;return t&&(e.menuButton_=t.menuButton),e.focusedChild_=-1,e.on("keydown",e.handleKeyDown),e.boundHandleBlur_=Ce(ze(e),e.handleBlur),e.boundHandleTapClick_=Ce(ze(e),e.handleTapClick),e}Ge(e,i);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof We&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof We&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),i.prototype.removeChild.call(this,e)},t.addItem=function(e){e=this.addChild(e);e&&this.addEventListenerForItem(e)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=I(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");e=i.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),fe(e,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),e},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,i.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||d.activeElement;this.children().some(function(e){return e.el()===t})||(e=this.menuButton_)&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()},t.handleTapClick=function(t){var e;this.menuButton_&&(this.menuButton_.unpressButton(),e=this.children(),!Array.isArray(e)||(e=e.filter(function(e){return e.el()===t.target})[0])&&"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())},t.handleKeyDown=function(e){Dt.isEventKey(e,"Left")||Dt.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(Dt.isEventKey(e,"Right")||Dt.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),0<t.length&&(e<0?e=0:e>=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(We);We.registerComponent("Menu",pn);st=function(n){function e(e,t){var i;void 0===t&&(t={}),(i=n.call(this,e,t)||this).menuButton_=new on(e,t),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");t=on.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+t,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"keydown",i.handleKeyDown),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),fe(d,"keyup",Ce(ze(i),i.handleMenuKeyUp))}),i.on("mouseleave",i.handleMouseLeave),i.on("keydown",i.handleSubmenuKeyDown),i}Ge(e,n);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e,t=new pn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title&&(e=I("li",{className:"vjs-menu-title",innerHTML:Be(this.options_.title),tabIndex:-1}),this.hideThreshold_+=1,e=new We(this.player_,{el:e}),t.addItem(e)),this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t},t.createItems=function(){},t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+on.prototype.buildCSSClass()+" "+n.prototype.buildCSSClass.call(this)},t.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+n.prototype.buildCSSClass.call(this)},t.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},t.dispose=function(){this.handleMouseLeave(),n.prototype.dispose.call(this)},t.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},t.handleMouseLeave=function(e){this.removeClass("vjs-hover"),me(d,"keyup",Ce(this,this.handleMenuKeyUp))},t.focus=function(){this.menuButton_.focus()},t.blur=function(){this.menuButton_.blur()},t.handleKeyDown=function(e){Dt.isEventKey(e,"Esc")||Dt.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),Dt.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(Dt.isEventKey(e,"Up")||Dt.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},t.handleMenuKeyUp=function(e){(Dt.isEventKey(e,"Esc")||Dt.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},t.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},t.handleSubmenuKeyDown=function(e){(Dt.isEventKey(e,"Esc")||Dt.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),Dt.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},t.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),dt&&w()||this.menu.focus())},t.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(We);We.registerComponent("MenuButton",st);qt=function(r){function e(e,t){var i=t.tracks,t=r.call(this,e,t)||this;if(t.items.length<=1&&t.hide(),!i)return ze(t);var n=Ce(ze(t),t.update);return i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),t.player_.on("ready",n),t.player_.on("dispose",function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)}),t}return Ge(e,r),e}(st);We.registerComponent("TrackButton",qt);var fn=["Tab","Esc","Up","Down","Right","Left"],Yt=function(n){function e(e,t){e=n.call(this,e,t)||this;return e.selectable=t.selectable,e.isSelected_=t.selected||!1,e.multiSelectable=t.multiSelectable,e.selected(e.isSelected_),e.selectable?e.multiSelectable?e.el_.setAttribute("role","menuitemcheckbox"):e.el_.setAttribute("role","menuitemradio"):e.el_.setAttribute("role","menuitem"),e}Ge(e,n);var t=e.prototype;return t.createEl=function(e,t,i){return this.nonIconControl=!0,n.prototype.createEl.call(this,"li",y({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},t),i)},t.handleKeyDown=function(t){fn.some(function(e){return Dt.isEventKey(t,e)})||n.prototype.handleKeyDown.call(this,t)},t.handleClick=function(e){this.selected(!0)},t.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))},e}(lt);We.registerComponent("MenuItem",Yt);var mn=function(u){function e(e,t){var n,i=t.track,r=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,(n=u.call(this,e,t)||this).track=i,n.kinds=(t.kinds||[t.kind||n.track.kind]).filter(Boolean);function a(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(ze(n),t)}function s(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(ze(n),t)}var o;return e.on(["loadstart","texttrackchange"],a),r.addEventListener("change",a),r.addEventListener("selectedlanguagechange",s),n.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),r.removeEventListener("change",a),r.removeEventListener("selectedlanguagechange",s)}),void 0===r.onchange&&n.on(["tap","click"],function(){if("object"!=typeof p.Event)try{o=new p.Event("change")}catch(e){}o||(o=d.createEvent("Event")).initEvent("change",!0,!0),r.dispatchEvent(o)}),n.handleTracksChange(),n}Ge(e,u);var t=e.prototype;return t.handleClick=function(e){var t=this.track,i=this.player_.textTracks();if(u.prototype.handleClick.call(this,e),i)for(var n=0;n<i.length;n++){var r=i[n];-1!==this.kinds.indexOf(r.kind)&&(r===t?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},t.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.handleSelectedLanguageChange=function(e){var t;"showing"===this.track.mode&&((t=this.player_.cache_.selectedLanguage)&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind||(this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}))},t.dispose=function(){this.track=null,u.prototype.dispose.call(this)},e}(Yt);We.registerComponent("TextTrackMenuItem",mn);var gn=function(i){function e(e,t){return t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,i.call(this,e,t)||this}Ge(e,i);var t=e.prototype;return t.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(-1<this.options_.kinds.indexOf(a.kind)&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},t.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(-1<["captions","descriptions","subtitles"].indexOf(a.kind)&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(mn);We.registerComponent("OffTextTrackMenuItem",gn);Ye=function(i){function e(e,t){return void 0===t&&(t={}),t.tracks=e.textTracks(),i.call(this,e,t)||this}return Ge(e,i),e.prototype.createItems=function(e,t){var i;void 0===e&&(e=[]),void 0===t&&(t=mn),this.label_&&(i=this.label_+" off"),e.push(new gn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var a,s=n[r];-1<this.kinds_.indexOf(s.kind)&&((a=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1})).addClass("vjs-"+s.kind+"-menu-item"),e.push(a))}return e},e}(qt);We.registerComponent("TextTrackButton",Ye);var yn=function(a){function e(e,t){var i=t.track,n=t.cue,r=e.currentTime();return t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=r&&r<n.endTime,(t=a.call(this,e,t)||this).track=i,t.cue=n,i.addEventListener("cuechange",Ce(ze(t),t.update)),t}Ge(e,a);var t=e.prototype;return t.handleClick=function(e){a.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},e}(Yt);We.registerComponent("ChaptersTrackMenuItem",yn);ei=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}Ge(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildWrapperCSSClass.call(this)},t.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),n.prototype.update.call(this)},t.setTrack=function(e){var t;this.track_!==e&&(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_&&((t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&t.removeEventListener("load",this.updateHandler_),this.track_=null),this.track_=e,this.track_&&(this.track_.mode="hidden",(e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&e.addEventListener("load",this.updateHandler_)))},t.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;0<=t;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Be(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),n.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],r=new yn(this.player_,{track:this.track_,cue:r});e.push(r)}return e},e}(Ye);ei.prototype.kind_="chapters",ei.prototype.controlText_="Chapters",We.registerComponent("ChaptersButton",ei);He=function(a){function e(e,t,i){var i=a.call(this,e,t,i)||this,n=e.textTracks(),r=Ce(ze(i),i.handleTracksChange);return n.addEventListener("change",r),i.on("dispose",function(){n.removeEventListener("change",r)}),i}Ge(e,a);var t=e.prototype;return t.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var a=t[n];if(a.kind!==this.kind_&&"showing"===a.mode){i=!0;break}}i?this.disable():this.enable()},t.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildWrapperCSSClass.call(this)},e}(Ye);He.prototype.kind_="descriptions",He.prototype.controlText_="Descriptions",We.registerComponent("DescriptionsButton",He);r=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}Ge(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildWrapperCSSClass.call(this)},e}(Ye);r.prototype.kind_="subtitles",r.prototype.controlText_="Subtitles",We.registerComponent("SubtitlesButton",r);var vn=function(i){function e(e,t){return t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",(e=i.call(this,e,t)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+t.kind+" settings dialog"),e}return Ge(e,i),e.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},e}(mn);We.registerComponent("CaptionSettingsMenuItem",vn);a=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}Ge(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-captions-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-captions-button "+n.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new vn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,e)},e}(Ye);a.prototype.kind_="captions",a.prototype.controlText_="Captions",We.registerComponent("CaptionsButton",a);var _n=function(r){function e(){return r.apply(this,arguments)||this}return Ge(e,r),e.prototype.createEl=function(e,t,i){var n='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(n+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),n+="</span>",r.prototype.createEl.call(this,e,y({innerHTML:n},t),i)},e}(mn);We.registerComponent("SubsCapsMenuItem",_n);je=function(i){function e(e,t){return void 0===t&&(t={}),(t=i.call(this,e,t)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(t.player_.language_)&&(t.label_="captions"),t.menuButton_.controlText(Be(t.label_)),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+i.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+i.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new vn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=i.prototype.createItems.call(this,e,_n)},e}(Ye);je.prototype.kinds_=["captions","subtitles"],je.prototype.controlText_="Subtitles",We.registerComponent("SubsCapsButton",je);var bn=function(s){function e(e,t){var n,i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,(n=s.call(this,e,t)||this).track=i,n.addClass("vjs-"+i.kind+"-menu-item");function a(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(ze(n),t)}return r.addEventListener("change",a),n.on("dispose",function(){r.removeEventListener("change",a)}),n}Ge(e,s);var t=e.prototype;return t.createEl=function(e,t,i){var n='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(n+='\n        <sp
1an aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "),n+="</span>",s.prototype.createEl.call(this,e,y({innerHTML:n},t),i)},t.handleClick=function(e){var t=this.player_.audioTracks();s.prototype.handleClick.call(this,e);for(var i=0;i<t.length;i++){var n=t[i];n.enabled=n===this.track}},t.handleTracksChange=function(e){this.selected(this.track.enabled)},e}(Yt);We.registerComponent("AudioTrackMenuItem",bn);Qe=function(i){function e(e,t){return void 0===t&&(t={}),t.tracks=e.audioTracks(),i.call(this,e,t)||this}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-audio-button "+i.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-audio-button "+i.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new bn(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},e}(qt);Qe.prototype.controlText_="Audio Track",We.registerComponent("AudioTrackButton",Qe);var Tn=function(r){function e(e,t){var i=t.rate,n=parseFloat(i,10);return t.label=i,t.selected=1===n,t.selectable=!0,t.multiSelectable=!1,(t=r.call(this,e,t)||this).label=i,t.rate=n,t.on(e,"ratechange",t.update),t}Ge(e,r);var t=e.prototype;return t.handleClick=function(e){r.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.update=function(e){this.selected(this.player().playbackRate()===this.rate)},e}(Yt);Tn.prototype.contentElType="button",We.registerComponent("PlaybackRateMenuItem",Tn);lt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.updateVisibility(),t.updateLabel(),t.on(e,"loadstart",t.updateVisibility),t.on(e,"ratechange",t.updateLabel),t}Ge(e,i);var t=e.prototype;return t.createEl=function(){var e=i.prototype.createEl.call(this);return this.labelEl_=I("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},t.dispose=function(){this.labelEl_=null,i.prototype.dispose.call(this)},t.buildCSSClass=function(){return"vjs-playback-rate "+i.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-playback-rate "+i.prototype.buildWrapperCSSClass.call(this)},t.createMenu=function(){var e=new pn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;0<=i;i--)e.addChild(new Tn(this.player(),{rate:t[i]+"x"}));return e},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(e){for(var t=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>t){n=i[r];break}this.player().playbackRate(n)},t.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(st);lt.prototype.controlText_="Playback Rate",We.registerComponent("PlaybackRateMenuButton",lt);ei=function(e){function t(){return e.apply(this,arguments)||this}Ge(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(We);We.registerComponent("Spacer",ei);He=function(t){function e(){return t.apply(this,arguments)||this}Ge(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},i.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(ei);We.registerComponent("CustomControlSpacer",He);r=function(e){function t(){return e.apply(this,arguments)||this}return Ge(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(We);r.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},0 in d,We.registerComponent("ControlBar",r);a=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.on(e,"error",t.open),t}Ge(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+i.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},e}(Rt);a.prototype.options_=f({}
vendor: 7,069 bytes, line 1
1,Rt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),We.registerComponent("ErrorDisplay",a);var Sn="vjs-text-track-settings",Ye=["#000","Black"],je=["#00F","Blue"],qt=["#0FF","Cyan"],Qe=["#0F0","Green"],Yt=["#F0F","Magenta"],st=["#F00","Red"],lt=["#FFF","White"],ei=["#FF0","Yellow"],He=["1","Opaque"],r=["0.5","Semi-Transparent"],a=["0","Transparent"],kn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ye,lt,st,Qe,je,ei,Yt,qt]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[He,r,a]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[lt,Ye,st,Qe,je,ei,Yt,qt]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[He,r]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[a,r,He]}};function Cn(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}kn.windowColor.options=kn.backgroundColor.options;r=function(n){function e(e,t){var i;return t.temporary=!1,(i=n.call(this,e,t)||this).updateDisplay=Ce(ze(i),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=I("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===t.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),g(kn,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}Ge(e,n);var t=e.prototype;return t.dispose=function(){this.endDialog=null,n.prototype.dispose.call(this)},t.createElSelect_=function(e,t,i){var n=this;void 0===t&&(t=""),void 0===i&&(i="label");var e=kn[e],r=e.id.replace("%s",this.id_),a=[t,r].join(" ").trim();return["<"+i+' id="'+r+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(e.label),"</"+i+">",'<select aria-labelledby="'+a+'">'].concat(e.options.map(function(e){var t=r+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',n.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.createElColors_=function(){return I("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return I("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return I("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var i,n,e,r=this;return n=function(e,t,i){var n,t=(n=r.$(t.selector),t=t.parser,Cn(n.options[n.options.selectedIndex].value,t));return void 0!==t&&(e[i]=t),e},void 0===(e={})&&(e=0),m(i=kn).reduce(function(e,t){return n(e,i[t],t)},e)},t.setValues=function(i){var n=this;g(kn,function(e,t){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(Cn(e.options[n].value,i)===t){e.selectedIndex=n;break}}(n.$(e.selector),i[t],e.parser)})},t.setDefaults=function(){var i=this;g(kn,function(e){var t=e.hasOwnProperty("default")?e.default:0;i.$(e.selector).selectedIndex=t})},t.restoreSettings=function(){var e;try{e=JSON.parse(p.localStorage.getItem(Sn))}catch(e){h.warn(e)}e&&this.setValues(e)},t.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?p.localStorage.setItem(Sn,JSON.stringify(e)):p.localStorage.removeItem(Sn)}catch(e){h.warn(e)}}},t.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,e=e&&e.captionsButton;
1t?t.focus():e&&e.focus()},e}(Rt);We.registerComponent("TextTrackSettings",r);He=function(a){function e(e,t){var i=t.ResizeObserver||p.ResizeObserver;null===t.ResizeObserver&&(i=!1);var n,r=Fe({createEl:!i,reportTouchActivity:!1},t);return(n=a.call(this,e,r)||this).ResizeObserver=t.ResizeObserver||p.ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=be(function(){n.resizeHandler()},100,!1,ze(n)),i?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(e.el())):(n.loadListener_=function(){var e,t;n.el_&&n.el_.contentWindow&&(e=n.debouncedHandler_,t=n.unloadListener_=function(){me(this,"resize",e),me(this,"unload",t),t=null},fe(n.el_.contentWindow,"unload",t),fe(n.el_.contentWindow,"resize",e))},n.one("load",n.loadListener_)),n}Ge(e,a);var t=e.prototype;return t.createEl=function(){return a.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},t.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,a.prototype.dispose.call(this)},e}(We);We.registerComponent("ResizeManager",He);var wn={trackingThreshold:30,liveTolerance:15},r=function(i){function e(e,t){var t=Fe(wn,t,{createEl:!1}),t=i.call(this,e,t)||this;return t.reset_(),t.on(t.player_,"durationchange",t.handleDurationchange),at&&"hidden"in d&&"visibilityState"in d&&t.on(d,"visibilitychange",t.handleVisibilityChange),t}Ge(e,i);var t=e.prototype;return t.handleVisibilityChange=function(){this.player_.duration()===1/0&&(d.hidden?this.stopTracking():this.startTracking())},t.trackLive_=function(){var e,t=this.player_.seekable();t&&t.length&&(e=Number(p.performance.now().toFixed(4)),t=-1===this.lastTime_?0:(e-this.lastTime_)/1e3,this.lastTime_=e,this.pastSeekEnd_=this.pastSeekEnd()+t,e=this.liveCurrentTime(),t=this.player_.currentTime(),t=this.player_.paused()||this.seekedBehindLive_||Math.abs(e-t)>this.options_.liveTolerance,this.timeupdateSeen_&&e!==1/0||(t=!1),t!==this.behindLiveEdge_&&(this.behindLiveEdge_=t,this.trigger("liveedgechange")))},t.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&2<e,this.skipNextSeeked_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},t.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}
vendor: 5,598 bytes, line 1
1,t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(d,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),i.prototype.dispose.call(this)},e}(We);We.registerComponent("LiveTracker",r);function En(e){if((n=e.el()).hasAttribute("src"))return e.triggerSourceset(n.src),1;var t=e.$$("source"),i=[],n="";if(t.length){for(var r=0;r<t.length;r++){var a=t[r].src;a&&-1===i.indexOf(a)&&i.push(a)}return!!i.length&&(1===i.length&&(n=i[0]),e.triggerSourceset(n),!0)}}function In(e,t){for(var i={},n=0;n<e.length&&!((i=Object.getOwnPropertyDescriptor(e[n],t))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i}function An(a){var t,e,i,s=a.el();s.resetSourceWatch_||(t={},e=In([a.el(),p.HTMLMediaElement.prototype,p.Element.prototype,Dn],"innerHTML"),i=function(r){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=r.apply(s,t);return En(a),n}},["append","appendChild","insertAdjacentHTML"].forEach(function(e){s[e]&&(t[e]=s[e],s[e]=i(t[e]))}),Object.defineProperty(s,"innerHTML",Fe(e,{set:i(e.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(t).forEach(function(e){s[e]=t[e]}),Object.defineProperty(s,"innerHTML",e)},a.one("sourceset",s.resetSourceWatch_))}function xn(i){var n,t,r,a;i.featuresSourceset&&((n=i.el()).resetSourceset_||(t=In([i.el(),p.HTMLMediaElement.prototype,On],"src"),r=n.setAttribute,a=n.load,Object.defineProperty(n,"src",Fe(t,{set:function(e){e=t.set.call(n,e);return i.triggerSourceset(n.src),e}})),n.setAttribute=function(e,t){t=r.call(n,e,t);return/src/i.test(e)&&i.triggerSourceset(n.src),t},n.load=function(){var e=a.call(n);return En(i)||(i.triggerSourceset(""),An(i)),e},n.currentSrc?i.triggerSourceset(n.currentSrc):En(i)||An(i),n.resetSourceset_=function(){n.resetSourceset_=null,n.load=a,n.setAttribute=r,Object.defineProperty(n,"src",t),n.resetSourceWatch_&&n.resetSourceWatch_()}))}function Pn(t,i,n,e){function r(e){return Object.defineProperty(t,i,{value:e,enumerable:!0,writable:!0})}void 0===e&&(e=!0);var a={configurable:!0,enumerable:!0,get:function(){var e=n();return r(e),e}};return e&&(a.set=r),Object.defineProperty(t,i,a)}var Ln,Dn=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=d.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var i=d.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",p.Element.prototype.appendChild.call(this,i),this.innerHTML}}),On=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?jt(p.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return p.Element.prototype.setAttribute.call(this,"src",e),e}}),Rn=function(l){function s(e,t){var i=l.call(this,e,t)||this,t=e.source,n=!1;if(t&&(i.el_.currentSrc!==t.src||e.tag&&3===e.tag.initNetworkState_)?i.setSource(t):i.handleLateInit_(i.el_),e.enableSourceset&&i.setupSourcesetHandling_(),i.isScrubbing_=!1,i.el_.hasChildNodes()){for(var r=i.el_.childNodes,a=r.length,s=[];a--;){var o=r[a];"track"===o.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(o),i.remoteTextTracks().addTrack(o.track),i.textTracks().addTrack(o.track),n||i.el_.hasAttribute("crossorigin")||!Ht(o.src)||(n=!0)):s.push(o))}for(var u=0;u<s.length;u++)i.el_.removeChild(s[u])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&n&&h.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),i.restoreMetadataTracksInIOSNativePlayer_(),(ut||ct||et)&&!0===e.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}Ge(s,l);var e=s.prototype;return e.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),s.disposeMediaElement(this.el_),this.options_=null,l.prototype.dispose.call(this)},e.setupSourcesetHandling_=function(){xn(this)},e.restoreMetadataTracksInIOSNativePlayer_=function(){function e(){i=[];for(var e=0;e<n.length;e++){var t=n[e];"metadata"===t.kind&&i.push({track:t,storedMode:t.mode})}}var i,n=this.textTracks();e(),n.addEventListener("change",e),this.on("dispose",function(){return n.removeEventListener("change",e)});function r(){for(var e=0;e<i.length;e++){var t=i[e];"disabled"===t.track.mode&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode)}n.removeEventListener("change",r)}this.on("webkitbeginfullscreen",function(){n.removeEventListener("change",e),n.removeEventListener("change",r),n.addEventListener("change",r)}),this.on("webkitendfullscreen",function(){n.removeEventListener("change",e),n.addEventListener("change",e),n.removeEventListener("change",r)})},e.overrideNative_=function(e,t){var i,n=this;t===this["featuresNative"+e+"Tracks"]&&(this[(i=e.toLowerCase())+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEac
1h(function(e){n.el()[i+"Tracks"].removeEventListener(e,n[i+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i))},e.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},e.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},e.proxyNativeTracksForType_=function(i){var e,t,n=this,r=ui[i],a=this.el()[r.getterName],s=this[r.getterName]();this["featuresNative"+r.capitalName+"Tracks"]&&a&&a.addEventListener&&(e={change:function(e){var t={type:"change",target:s,currentTarget:s,srcElement:s};s.trigger(t),"text"===i&&n[li.remoteText.getterName]().trigger(t)},addtrack:function(e){s.addTrack(e.track)},removetrack:function(e){s.removeTrack(e.track)}},t=function(){for(var e=[],t=0;t<s.length;t++){for(var i=!1,n=0;n<a.length;n++)if(a[n]===s[t]){i=!0;break}i||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())},this[r.getterName+"Listeners_"]=e,Object.keys(e).forEach(function(t){var i=e[t];a.addEventListener(t,i),n.on("dispose",function(e){return a.removeEventListener(t,i)})}),this.on("loadstart",t),this.on("dispose",function(e){return n.off("loadstart",t)}))},e.proxyNativeTracks_=function(){var t=this;ui.names.forEach(function(e){t.proxyNativeTracksForType_(e)})},e.createEl=function(){var e,t=this.options_.tag;t&&(this.options_.playerElIngest||this.movingMediaElementInDOM)||(t?(e=t.cloneNode(!0),t.parentNode&&t.parentNode.insertBefore(e,t),s.disposeMediaElement(t),t=e):(t=d.createElement("video"),e=Fe({},this.options_.tag&&M(this.options_.tag)),ut&&!0===this.options_.nativeControlsForTouch||delete e.controls,R(t,y(e,{id:this.options_.techId,class:"vjs-tech"}))),t.playerId=this.options_.playerId),void 0!==this.options_.preload&&U(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],n=0;n<i.length;n++){var r=i[n],a=this.options_[r];void 0!==a&&(a?U(t,r,r):B(t,r),t[r]=a)}return t},e.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")})}var r=["loadstart"];r.push("loadedmetadata"),2<=e.readyState&&r.push("loadeddata"),3<=e.readyState&&r.push("canplay"),4<=e.readyState&&r.push("canplaythrough"),this.ready(function(){r.forEach(function(e){this.trigger(e)},this)})}},e.setScrubbing=function(e){this.isScrubbing_=e},e.scrubbing=function(){return this.isScrubbing_},e.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&ht?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){h(e,"Video is not ready. (Video.js)")}},e.duration=function(){var t=this;if(this.el_.duration===1/0&&Je&&nt&&0===this.el_.currentTime){var e=function e(){0<t.el_.currentTime&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN},e.width=function(){return this.el_.offsetWidth},e.height=function(){return this.el_.offsetHeight},e.proxyWebkitFullscreen_=function(){var e,t,i=this;"webkitDisplayingFullscreen"in this.el_&&(e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))},this.on("webkitbeginfullscreen",t),this.on("dispose",function(){i.off("webkitbeginfullscreen",t),i.off("webkitendfullscreen",e)}))},e.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=p.navigator&&p.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},e.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)At(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},e.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},e.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},e.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},e.reset=function(){s.resetMediaElement(this.el_)},e.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.setControls=function(e){this.el_.controls=!!e},e.addTextTrack=function(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):l.prototype.addTextTrack.call(this,e,t,i)},e.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return l.prototype.createRemoteTextTrack.call(this,e);var t=d.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t},e.addRemoteTextTrack=function(e,t){t=l.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(t),t},e.removeRemoteTextTrack=function(e){if(l.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$("track"),i=t.length;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])},e.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),p.performance&&"function"==typeof p.performance.now?e.creationTime=p.performance.now():p.performance&&p.performance.timing&&"number"==typeof p.performance.timing.navigationStart&&(e.creationTime=p.Date.now()-p.performance.timing.navigationStart),e},s}(Vi);Pn(Rn,"TEST_VID",function(){if(k()){var e=d.createElement("video"),t=d.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}}
vendor: 16,095 bytes, line 1
1),Rn.isSupported=function(){try{Rn.TEST_VID.volume=.5}catch(e){return!1}return!(!Rn.TEST_VID||!Rn.TEST_VID.canPlayType)},Rn.canPlayType=function(e){return Rn.TEST_VID.canPlayType(e)},Rn.canPlaySource=function(e,t){return Rn.canPlayType(e.type)},Rn.canControlVolume=function(){try{var e=Rn.TEST_VID.volume;return Rn.TEST_VID.volume=e/2+.1,e!==Rn.TEST_VID.volume}catch(e){return!1}},Rn.canMuteVolume=function(){try{var e=Rn.TEST_VID.muted;return Rn.TEST_VID.muted=!e,Rn.TEST_VID.muted?U(Rn.TEST_VID,"muted","muted"):B(Rn.TEST_VID,"muted"),e!==Rn.TEST_VID.muted}catch(e){return!1}},Rn.canControlPlaybackRate=function(){if(Je&&nt&&rt<58)return!1;try{var e=Rn.TEST_VID.playbackRate;return Rn.TEST_VID.playbackRate=e/2+.1,e!==Rn.TEST_VID.playbackRate}catch(e){return!1}},Rn.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(d.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(d.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(d.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(d.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Rn.supportsNativeTextTracks=function(){return ht||dt&&nt},Rn.supportsNativeVideoTracks=function(){return!(!Rn.TEST_VID||!Rn.TEST_VID.videoTracks)},Rn.supportsNativeAudioTracks=function(){return!(!Rn.TEST_VID||!Rn.TEST_VID.audioTracks)},Rn.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(e){var t=e[0],i=e[1];Pn(Rn.prototype,t,function(){return Rn[i]()},!0)}),Rn.prototype.movingMediaElementInDOM=!dt,Rn.prototype.featuresFullscreenResize=!0,Rn.prototype.featuresProgressEvents=!0,Rn.prototype.featuresTimeupdateEvents=!0,Rn.patchCanPlayType=function(){4<=Ze&&!tt&&!nt&&(Ln=Rn.TEST_VID&&Rn.TEST_VID.constructor.prototype.canPlayType,Rn.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Ln.call(this,e)})},Rn.unpatchCanPlayType=function(){var e=Rn.TEST_VID.constructor.prototype.canPlayType;return Ln&&(Rn.TEST_VID.constructor.prototype.canPlayType=Ln),e},Rn.patchCanPlayType(),Rn.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Rn.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Rn.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Rn.prototype["set"+Be(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(e){Rn.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(t){Rn.prototype["set"+Be(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(e){Rn.prototype[e]=function(){return this.el_[e]()}}),Vi.withSourceHandlers(Rn),Rn.nativeSourceHandler={},Rn.nativeSourceHandler.canPlayType=function(e){try{return Rn.TEST_VID.canPlayType(e)}catch(e){return""}},Rn.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Rn.nativeSourceHandler.canPlayType(e.type);if(e.src){e=Vt(e.src);return Rn.nativeSourceHandler.canPlayType("video/"+e)}return""},Rn.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Rn.nativeSourceHandler.dispose=function(){},Rn.registerSourceHandler(Rn.nativeSourceHandler),Vi.registerTech("Html5",Rn);var Mn=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Nn={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Un=["tiny","xsmall","small","medium","large","xlarge","huge"],Bn={};Un.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Bn[e]="vjs-layout-"+t});var Fn={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},jn=function(c){function o(e,t,i){var n,r;if(e.id=e.id||t.id||"vjs_video_"+se++,(t=y(o.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof e.closest){var a=e.closest("[lang]");a&&a.getAttribute&&(t.language=a.getAttribute("lang"))}else for(var s=e;s&&1===s.nodeType;){if(M(s).hasOwnProperty("lang")){t.language=s.getAttribute("lang");break}s=s.parentNode}if((n=c.call(this,null,t,i)||this).boundDocumentFullscreenChange_=function(e){return n.documentFullscreenChange_(e)},n.boundFullWindowOnEscKey_=function(e){return n.fullWindowOnEscKey(e)},n.isFullscreen_=!1,n.log=l(n.id_),n.fsApi_=_t,n.isPosterFromTech_=!1,n.queuedCallbacks_=[],n.isReady_=!1,n.hasStarted_=!1,n.userActive_=!1,n.debugEnabled_=!1,!n.options_||!n.options_.techOrder||!n.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");n.tag=e,n.tagAttributes=e&&M(e),n.language(n.options_.language),t.languages?(r={},Object.getOwnPropertyNames(t.languages).forEach(function(e){r[e.toLowerCase()]=t.languages[e]}),n.languages_=r):n.languages_=o.prototype.options_.languages,n.resetCache_(),n.poster_=t.poster||"",n.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),n.changingSrc_=!1,n.playCallbacks_=[],n.playTerminatedQueue_=[],e.hasAttribute("autoplay")?n.autoplay(!0):n.autoplay(n.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(e){if("function"!=typeof n[e])throw new Error('plugin "'+e+'" does not exist')}),n.scrubbing_=!1,n.el_=n.createEl(),Re(ze(n),{eventBusKey:"el_"}),n.fsApi_.requestFullscreen&&(fe(d,n.fsApi_.fullscreenchange,n.boundDocumentFullscreenChange_),n.on(n.fsApi_.fullscreenchange,n.boundDocumentFullscreenChange_)),n.fluid_&&n.on(["playerreset","resize"],n.updateStyleEl_);i=Fe(n.options_);t.plugins&&Object.keys(t.plugins).forEach(function(e){n[e](t.plugins[e])}),t.debug&&n.debug(!0),n.options_.playerOptions=i,n.middleware_=[],n.initChildren(),n.isAudio("audio"===e.nodeName.toLowerCase()),n.controls()?n.addClass("vjs-controls-enabled"):n.addClass("vjs-controls-disabled"),n.el_.setAttribute("role","region"),n.isAudio()?n.el_.setAttribute("aria-label",n.localize("Audio Player")):n.el_.setAttribute("aria-label",n.localize("Video Player")),n.isAudio()&&n.addClass("vjs-audio"),n.flexNotSupported_()&&n.addClass("vjs-no-flex"),ut&&n.addClass("vjs-touch-enabled"),dt||n.addClass("vjs-workinghover"),o.players[n.id_]=ze(n);e=u.split(".")[0];return n.addClass("vjs-v"+e),n.userActive(!0),n.reportUserActivity(),n.one("play",n.listenForUserActivity_),n.on("stageclick",n.handleStageClick_),n.on("keydown",n.handleKeyDown),n.on("languagechange",n.handleLanguagechange),n.breakpoints(n.options_.breakpoints),n.responsive(n.options_.responsive),n}Ge(o,c);var e=o.prototype;return e.dispose=function(){var t=this;this.trigger("dispose"),this.off("dispose"),me(d,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),me(d,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),o.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),qi[this.id()]=null,ci.names.forEach(function(e){e=ci[e],e=t[e.getterName]();e&&e.off&&e.off()}),c.prototype.dispose.call(this)},e.createEl=function(){var t,i=this.tag,e=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),n="video-js"===this.tag.tagName.toLowerCase();e?t=this.el_=i.parentNode:n||(t=this.el_=c.prototype.createEl.call(this,"div"));var r,a,s=M(i);if(n){for(t=this.el_=i,i=this.tag=d.createElement("video");t.children.length;)i.appendChild(t.firstChild);P(t,"video-js")||L(t,"video-js"),t.appendChild(i),e=this.playerElIngest_=t,Object.keys(t).forEach(function(e){try{i[e]=t[e]}catch(e){}})}i.setAttribute("tabindex","-1"),s.tabindex="-1",(at||nt&&ot)&&(i.setAttribute("role","application"),s.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach(function(e){n&&"class"===e||t.setAttribute(e,s[e]),n&&i.setAttribute(e,s[e])}),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",(i.player=t.player=this).addClass("vjs-paused"),!0!==p.VIDEOJS_NO_DYNAMIC_STYLE&&(this.styleEl_=re("vjs-styles-dimensions"),r=Q(".vjs-styles-defaults"),(a=Q("head")).insertBefore(this.styleEl_,r?r.nextSibling:a.firstChild)),this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var o=i.getElementsByTagName("a"),u=0;u<o.length;u++){var l=o.item(u);L(l,"vjs-hidden"),l.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!e&&i.parentNode.insertBefore(t,i),x(i,t),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=t},e.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):h.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},e.width=function(e){return this.dimension("width",e)},e.height=function(e){return this.dimension("height",e)},e.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?h.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},e.fluid=function(e){var t,i=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,De(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),t=function(){i.on(["playerreset","resize"],i.updateStyleEl_)},De(e=this)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},e.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},e.updateStyleEl_=function(){var e,t,i,n;!0!==p.VIDEOJS_NO_DYNAMIC_STYLE?(n=(i=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"))[1]/i[0],e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/n:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*n,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),ae(this.styleEl_,"\n      ."+i+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*n+"%;\n      }\n    ")):(t="number"==typeof this.width_?this.width_:this.options_.width,i="number"==typeof this.height_?this.height_:this.options_.height,(n=this.tech_&&this.tech_.el())&&(0<=t&&(n.width=t),0<=i&&(n.height=i)))},e.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=Be(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Vi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};ci.names.forEach(function(e){e=ci[e];a[e.getterName]=i[e.privateName]}),y(a,this.options_[n]),y(a,this.options_[r]),y(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(a.startTime=this.cache_.currentTime);e=Vi.getTech(e);if(!e)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new e(a),this.tech_.ready(Ce(this,this.handleTechReady_),!0),Lt(this.textTracksJson_||[],this.tech_),Mn.forEach(function(e){i.on(i.tech_,e,i["handleTech"+Be(e)+"_"])}),Object.keys(Nn).forEach(function(t){i.on(i.tech_,t,function(e){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Nn[t]+"_"].bind(i),event:e}):i["handleTech"+Nn[t]+"_"](e)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||x(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.unloadTech_=function(){var t=this;ci.names.forEach(function(e){e=ci[e];t[e.privateName]=t[e.getterName]()}),this.textTracksJson_=Pt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.tech=function(e){return void 0===e&&h.warn("Using the tech directly can be dangerous. I hope you know 
1what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},e.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},e.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},e.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},e.manualAutoplay_=function(t){var n=this;if(this.tech_&&"string"==typeof t){var e,i=function(){var e=n.muted();n.muted(!0);function t(){n.muted(e)}n.playTerminatedQueue_.push(t);var i=n.play();if(It(i))return i.catch(t)};if("any"===t&&!0!==this.muted()?It(e=this.play())&&(e=e.catch(i)):e="muted"===t&&!0!==this.muted()?i():this.play(),It(e))return e.then(function(){n.trigger({type:"autoplay-success",autoplay:t})}).catch(function(e){n.trigger({type:"autoplay-failure",autoplay:t})})}},e.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!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 n=e.$$("source"),r=0;r<n.length;r++){var a=n[r];if(a.type&&a.src&&a.src===t)return a.type}return Ji(t)}(this,t)),this.cache_.source=Fe({},e,{src:t,type:i});for(var i=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),n=[],r=this.$$("source"),a=[],s=0;s<r.length;s++){var o=M(r[s]);n.push(o),o.src&&o.src===t&&a.push(o.src)}a.length&&!i.length?this.cache_.sources=n:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},e.handleTechSourceset_=function(e){var t,i,n,r=this;this.changingSrc_||(t=function(e){return r.updateSourceCaches_(e)},i=this.currentSource().src,n=e.src,i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(this.lastSource_&&(this.lastSource_.tech===n||this.lastSource_.player===i)||(t=function(){})),t(n),e.src||this.tech_.any(["sourceset","loadstart"],function(e){"sourceset"!==e.type&&(e=r.techGet("currentSrc"),r.lastSource_.tech=e,r.updateSourceCaches_(e))})),this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},e.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");function t(){i!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",t))}var i=this.currentTime();this.on("timeupdate",t)},e.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},e.handleTechFirstPlay_=function(){this.options_.starttime&&(h.warn("Passing the `starttime` option to the player will be deprecated 
1in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.handleTechClick_=function(e){Y(e)&&this.controls_&&(this.paused()?At(this.play()):this.pause())},e.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},e.handleTechTap_=function(){this.userActive(!this.userActive())},e.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},e.handleStageClick_=function(){this.reportUserActivity()},e.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.documentFullscreenChange_=function(e){var t=e.target.player;t&&t!==this||(e=this.el(),!(t=d[this.fsApi_.fullscreenElement]===e)&&e.matches?t=e.matches(":"+this.fsApi_.fullscreen):!t&&e.msMatchesSelector&&(t=e.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(t))},e.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},e.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},e.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},e.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},e.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},e.handleTechError_=function(){var e=this.tech_.error();this.error(e)},e.handleTechTextData_=function(){var e=1<arguments.length?arguments[1]:null;this.trigger("textdata",e)},e.getCache=function(){return this.cache_},e.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},e.techCall_=function(n,r){this.ready(function(){if(n in Ki)return e=this.middleware_,t=this.tech_,i=r,t[t=n](e.reduce($i(t),i));if(n in Yi)return Gi(this.middleware_,this.tech_,n,r);var e,t,i;try{this.tech_&&this.tech_[n](r)}catch(e){throw h(e),e}},!0)},e.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Xi)return e=this.middleware_,i=this.tech_,n=t,e.reduceRight($i(n),i[n]());if(t in Yi)return Gi(this.middleware_,this.tech_,t);var e,i,n;try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw h("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw h("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw h(e),e}}},e.play=function(){var t=this,e=this.options_.Promise||p.Promise;return e?new e(function(e){t.play_(e)}):this.play_()},e.play_=function(e){var t=this;void 0===e&&(e=At),this.playCallbacks_.push(e);e=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!e)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(e||!ht&&!dt||this.load());e=this.techGet_("play");null===e?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(e)},e.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},e.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(e){e(t)})},e.pause=function(){this.techCall_("pause")},e.paused=function(){return!1!==this.techGet_("paused")},e.played=function(){return this.techGet_("played")||gt(0,0)},e.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},e.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},e.remainingTime=function(){return this.duration()-this.currentTime()},e.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=gt(0,0)),e},e.bufferedPercent=function(){return yt(this.buffered(),this.duration())},e.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),e=e.end(e.length-1);return t<e&&(e=t),e},e.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},e.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},e.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},e.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},e.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.isFullscreen=function(e){if(void 0===e)return this.isFullscreen_;var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()},e.requestFullscreen=function(s){var e=this.options_.Promise||p.Promise;if(e){var o=this;return new e(function(e,i){function n(){o.off("fullscreenerror",r),o.off("fullscreenchange",t)}function t(){n(),e()}function r(e,t){n(),i(t)}o.one("fullscreenchange",t),o.one("fullscreenerror",r);var a=o.requestFullscreenHelper_(s);if(a)return a.then(n,n),a})}return this.requestFullscreenHelper_()},e.requestFullscreenHelper_=function(e){var t=this;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(i=e)),this.fsApi_.requestFullscreen){var i=this.el_[this.fsApi_.requestFullscreen](i);return i&&i.then(function(){return t.isFullscreen(!0)},function(){return t.isFullscreen(!1)}),i}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},e.exitFullscreen=function(){var e=this.options_.Promise||p.Promise;if(e){var s=this;return new e(function(e,i){function n(){s.off("fullscreenerror",r),s.off("fullscreenchange",t)}function t(){n(),e()}function r(e,t){n(),i(t)}s.one("fullscreenchange",t),s.one("fullscreenerror",r);var a=s.exitFullscreenHelper_();if(a)return a.then(n,n),a})}return this.exitFullscreenHelper_()},e.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=d[this.fsApi_.exitFullscreen]();return t&&t.then(function(){return e.isFullscreen(!1)}),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},e.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=d.documentElement.style.overflow,fe(d,"keydown",this.boundFullWindowOnEscKey_),d.documentElement.style.overflow="hidden",L(d.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.fullWindowOnEscKey=function(e){Dt.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,me(d,"keydown",this.boundFullWindowOnEscKey_),d.documentElement.style.overflow=this.docOrigOverflow,D(d.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},e.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},e.requestPictureInPicture=function(){if("pictureInPictureEnabled"in d&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},e.exitPictureInPicture=function(){if("pictureInPictureEnabled"in d)return d.exitPictureInPicture()},e.handleKeyDown=function(e){var t=this.options_.userActions;t&&t.hotkeys&&(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;
vendor: 20,505 bytes, line 1
1if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)}(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e)))},e.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},i=t.fullscreenKey,n=void 0===i?function(e){return Dt.isEventKey(e,"f")}:i,i=t.muteKey,i=void 0===i?function(e){return Dt.isEventKey(e,"m")}:i,t=t.playPauseKey,t=void 0===t?function(e){return Dt.isEventKey(e,"k")||Dt.isEventKey(e,"Space")}:t;n.call(this,e)?(e.preventDefault(),e.stopPropagation(),n=We.getComponent("FullscreenToggle"),!1!==d[this.fsApi_.fullscreenEnabled]&&n.prototype.handleClick.call(this,e)):i.call(this,e)?(e.preventDefault(),e.stopPropagation(),We.getComponent("MuteToggle").prototype.handleClick.call(this,e)):t.call(this,e)&&(e.preventDefault(),e.stopPropagation(),We.getComponent("PlayToggle").prototype.handleClick.call(this,e))},e.canPlayType=function(e){for(var t,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],a=Vi.getTech(r);if(a=a||We.getComponent(r)){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else h.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.selectSource=function(e){function t(e,i,n){var r;return e.some(function(t){return i.some(function(e){if(r=n(t,e))return!0})}),r}var i,n=this,r=this.options_.techOrder.map(function(e){return[e,Vi.getTech(e)]}).filter(function(e){var t=e[0],e=e[1];return e?e.isSupported():(h.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),a=function(e,t){var i=e[0];if(e[1].canPlaySource(t,n.options_[i.toLowerCase()]))return{source:t,tech:i}},a=this.options_.sourceOrder?t(e,r,(i=a,function(e,t){return i(t,e)})):t(r,e,a);return a||!1},e.src=function(e){var n=this;if(void 0===e)return this.cache_.src||"";var r=Zi(e);r.length?(this.changingSrc_=!0,this.cache_.sources=r,this.updateSourceCaches_(r[0]),zi(this,r[0],function(e,t){var i;return n.middleware_=t,n.cache_.sources=r,n.updateSourceCaches_(e),n.src_(e)?1<r.length?n.src(r.slice(1)):(n.changingSrc_=!1,n.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void n.triggerReady()):(t=t,i=n.tech_,void t.forEach(function(e){return e.setTech&&e.setTech(i)}))})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},e.src_=function(e){var t,i,n=this,r=this.selectSource([e]);return!r||(t=r.tech,i=this.techName_,Be(t)!==Be(i)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready(function(){n.changingSrc_=!1})):this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1)},e.load=function(){this.techCall_("load")},e.reset=function(){var e=this,t=this.options_.Promise||p.Promise;this.paused()||!t?this.doReset_():At(this.play().then(function(){return e.doReset_()}))},e.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),De(this)&&this.trigger("playerreset")},e.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},e.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,e=e.remainingTimeDisplay;t&&t.updateContent(),e&&e.updateContent()},e.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},e.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},e.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},e.currentSource=function(){return this.cache_.source||{}},e.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},e.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},e.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},e.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},e.poster=function(e){if(void 0===e)return this.poster_;(e=e||"")!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.handleTechPosterChange_=function(){var e;this.poster_&&!this.options_.techCanOverridePoster||!this.tech_||!this.tech_.poster||(e=this.tech_.poster()||"")!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))},e.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",function(){this.off(["click","touchstart"],t)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Ct(e),this.addClass("vjs-error"),h.error("(CODE:"+this.error_.code+" "+Ct.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},e.reportUserActivity=function(e){this.userActivity_=!0},e.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.listenForUserActivity_=function(){var t,i,n,r=Ce(this,this.reportUserActivity),e=function(e){r(),this.clearInterval(t)};this.on("mousedown",function(){r(),this.clearInterval(t),t=this.setInterval(r,250)}),this.on("mousemove",function(e){e.screenX===i&&e.screenY===n||(i=e.screenX,n=e.screenY,r())}),this.on("mouseup",e),this.on("mouseleave",e);var a,e=this.getChild("controlBar");!e||dt||Je||(e.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),e.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",r),this.on("keyup",r),this.setInterval(function(){var e;this.userActivity_&&(this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a),(e=this.options_.inactivityTimeout)<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e)))},250)},e.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},e.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},e.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},e.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},e.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=(t=e.track)||e;if(this.tech_)return this.tech_.removeRemoteTextTrack(t)},e.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),De(this)&&this.trigger("languagechange"))},e.languages=function(){return Fe(o.prototype.options_.languages,this.languages_)},e.toJSON=function(){var e=Fe(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];(n=Fe(n)).player=void 0,e.tracks[i]=n}return e},e.createModal=function(e,t){var i=this;(t=t||{}).content=e||"";var n=new Rt(this,t);return this.addChild(n),n.on("dispose",function(){i.removeChild(n)}),n.open(),n},e.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Un.length;i++){var n=Un[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Bn[e]),this.addClass(Bn[n]),this.breakpoint_=n;break}}},e.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},e.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=y({},Fn,e),this.updateCurrentBreakpoint_()),y(this.breakpoints_)},e.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?((this.responsive_=e)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},e.currentBreakpoint=function(){return this.breakpoint_},e.currentBreakpointClass=function(){return Bn[this.breakpoint_]||""},e.loadMedia=function(e,t){var i,n,r,a=this;e&&"object"==typeof e&&(this.reset(),this.cache_.media=Fe(e),i=(r=this.cache_.media).artwork,n=r.poster,e=r.src,r=r.textTracks,!i&&n&&(this.cache_.media.artwork=[{src:n,type:Ji(n)}]),e&&this.src(e),n&&this.poster(n),Array.isArray(r)&&r.forEach(function(e){return a.addRemoteTextTrack(e,!1)}),this.ready(t))},e.getMedia=function(){if(this.cache_.media)return Fe(this.cache_.media);var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}})};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Ji(t.poster)}]),t},o.getTagSettings=function(e){var t,i={sources:[],tracks:[]},n=M(e),r=n["data-setup"];if(P(e,"vjs-fill")&&(n.fill=!0),P(e,"vjs-fluid")&&(n.fluid=!0),null!==r&&(r=(t=Et(r||"{}"))[0],t=t[1],r&&h.error(r),y(n,t)),y(i,n),e.hasChildNodes())for(var a=e.childNodes,s=0,o=a.length;s<o;s++){var u=a[s],l=u.nodeName.toLowerCase();"source"===l?i.sources.push(M(u)):"track"===l&&i.tracks.push(M(u))}return i},e.flexNotSupported_=function(){var e=d.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},e.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},o}(We);ci.names.forEach(function(e){var t=ci[e];jn.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),jn.prototype.crossorigin=jn.prototype.crossOrigin,jn.players={};He=p.navigator;jn.prototype.options_={techOrder:Vi.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:He&&(He.languages&&He.languages[0]||He.userLanguage||He.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){jn.prototype[e]=function(){return this.techGet_(e)}}),Mn.forEach(function(e){jn.prototype["handleTech"+Be(e)+"_"]=function(){return this.trigger(e)}}),We.registerComponent("Player",jn);var Vn=i(function(i){function n(e,t){return i.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}i.exports=n});function Hn(e){return Qn.hasOwnProperty(e)}function qn(e){return Hn(e)?Qn[e]:void 0}function Wn(e,t,i){i=(i?"before":"")+"pluginsetup",e.trigger(i,t),e.trigger(i+":"+t.name,t)}function zn(t,i){function n(){Wn(this,{name:t,plugin:i,instance:null},!0);var e=i.apply(this,arguments);return Jn(this,t),Wn(this,{name:t,plugin:i,instance:e}),e}return Object.keys(i).forEach(function(e){n[e]=i[e]}),n}function Gn(r,a){return a.prototype.name=r,function(){Wn(this,{name:r,plugin:a,instance:null},!0);for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=Kn(a,[this].concat(t));return this[r]=function(){return n},Wn(this,n.getEventHash()),n}}var Xn=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}},Kn=i(function(n){function r(e,t,i){return Xn()?n.exports=r=Reflect.construct:n.exports=r=function(e,t,i){var n=[null];n.push.apply(n,t);n=new(Function.bind.apply(e,n));return i&&Vn(n,i.prototype),n},r.apply(null,arguments)}n.exports=r}),Yn="plugin",$n="activePlugins_",Qn={},Jn=function(e,t){e[$n]=e[$n]||{},e[$n][t]=!0},Zn=function(){function i(e){if(this.constructor===i)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Re(this),delete this.trigger,Ne(this,this.constructor.defaultState),Jn(e,this.name),this.dispose=Ce(this,this.dispose),e.on("dispose",this.dispose)}var e=i.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.trigger=function(e,t){return void 0===t&&(t={}),ge(this.eventBusEl_,e,this.getEventHash(t))},e.handleStateChanged=function(e){},e.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[$n][e]=!1,this.player=this.state=null,t[e]=Gn(e,Qn[e])},i.isBasic=function(e){e="string"==typeof e?qn(e):e;return"function"==typeof e&&!i.prototype.isPrototypeOf(e.prototype)},i.registerPlugin=function(e,t){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+typeof e+".");if(Hn(e))h.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(jn.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof t)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+typeof t+".");return Qn[e]=t,e!==Yn&&(i.isBasic(t)?jn.prototype[e]=zn(e,t):jn.prototype[e]=Gn(e,t)),t},i.deregisterPlugin=function(e){if(e===Yn)throw new Error("Cannot de-register base plugin.");Hn(e)&&(delete Qn[e],delete jn.prototype[e])},i.getPlugins=function(e){var i;return void 0===e&&(e=Object.keys(Qn)),e.forEach(function(e){var t=qn(e);t&&((i=i||{})[e]=t)}),i},i.getPluginVersion=function(e){e=qn(e);return e&&e.VERSION||""},i}();Zn.getPlugin=qn,Zn.BASE_PLUGIN_NAME=Yn,Zn.registerPlugin(Yn,Zn),jn.prototype.usingPlugin=function(e){return!!this[$n]&&!0===this[$n][e]},jn.prototype.hasPlugin=function(e){return!!Hn(e)};var er=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vn(e,t)},tr=function(e){return 0===e.indexOf("#")?e.slice(1):e};function ir(e,t,i){if(r=ir.getPlayer(e))return t&&h.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&r.ready(i),r;var n="string"==typeof e?Q("#"+tr(e)):e;if(!C(n))throw new TypeError("The element or ID supplied is not valid. (videojs)");n.ownerDocument.defaultView&&n.ownerDocument.body.contains(n)||h.warn("The element supplied is not included in the DOM"),t=t||{},ir.hooks("beforesetup").forEach(function(e){e=e(n,Fe(t));v(e)&&!Array.isArray(e)?t=Fe(t,e):h.error("please return an object in beforesetup hooks")});var r=new(We.getComponent("Player"))(n,t,i);return ir.hooks("setup").forEach(function(e){return e(r)}),r}ir.hooks_={},ir.hooks=function(e,t){return ir.hooks_[e]=ir.hooks_[e]||[],t&&(ir.hooks_[e]=ir.hooks_[e].concat(t)),ir.hooks_[e]},ir.hook=function(e,t){ir.hooks(e,t)},ir.hookOnce=function(i,e){ir.hooks(i,[].concat(e).map(function(t){return function e(){return ir.removeHook(i,e),t.apply(void 0,arguments)}}))},ir.removeHook=function(e,t){t=ir.hooks(e).indexOf(t);return!(t<=-1)&&(ir.hooks_[e]=ir.hooks_[e].slice(),ir.hooks_[e].splice(t,1),!0)},!0!==p.VIDEOJS_NO_DYNAMIC_STYLE&&k()&&((r=Q(".vjs-styles-defaults"))||(r=re("vjs-styles-defaults"),(He=Q("head"))&&He.insertBefore(r,He.firstChild),ae(r,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    "))),ie(1,ir),ir.VERSION=u,ir.options=jn.prototype.options_,ir.getPlayers=function(){return jn.players},ir.getPlayer=function(e){var t=jn.players;if("string"==typeof e){var i=tr(e),n=t[i];if(n)return n;i=Q("#"+i)}else i=e;if(C(i)){e=i.player,i=i.playerId;if(e||t[i])return e||t[i]}},ir.getAllPlayers=function(){return Object.keys(jn.players).map(function(e){return jn.players[e]}).filter(Boolean)},ir.players=jn.players,ir.getComponent=We.getComponent,ir.registerComponent=function(e,t){Vi.isTech(t)&&h.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),We.registerComponent.call(We,e,t)},ir.getTech=Vi.getTech,ir.registerTech=Vi.registerTech,ir.use=function(e,t){Hi[e]=Hi[e]||[],Hi[e].push(t)},Object.defineProperty(ir,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ir.middleware,"TERMINATOR",{value:Wi,writeable:!1,enumerable:!0}),ir.browser=pt,ir.TOUCH_ENABLED=ut,ir.extend=function(e,t){void 0===t&&(t={});var i,n=function(){e.apply(this,arguments)},r={};for(i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),er(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},ir.mergeOptions=Fe,ir.bind=Ce,ir.registerPlugin=Zn.registerPlugin,ir.deregisterPlugin=Zn.deregisterPlugin,ir.plugin=function(e,t){return h.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Zn.registerPlugin(e,t)},ir.getPlugins=Zn.getPlugins,ir.getPlugin=Zn.getPlugin,ir.getPluginVersion=Zn.getPluginVersion,ir.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),ir.options.languages=Fe(ir.options.languages,((i={})[e]=t,i)),ir.options.languages[e]},ir.log=h,ir.createLogger=l,ir.createTimeRange=ir.createTimeRanges=gt,ir.formatTime=cn,ir.setFormatTime=function(e){ln=e},ir.resetFormatTime=function(){ln=un},ir.parseUrl=Ft,ir.isCrossOrigin=Ht,ir.EventTarget=Te,ir.on=fe,ir.one
1=ye,ir.off=me,ir.trigger=ge,ir.xhr=Zt,ir.TextTrack=si,ir.AudioTrack=oi,ir.VideoTrack=$e,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){ir[e]=function(){return h.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Z[e].apply(null,arguments)}}),ir.computedStyle=b,ir.dom=Z,ir.url=Ke,ir.defineLazyProperty=Pn;var nr=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var rr=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},$e=void 0!==e?e:"undefined"!=typeof window?window:{},ar="undefined"!=typeof document?document:(ar=$e["__GLOBAL_DOCUMENT_CACHE@4"])||($e["__GLOBAL_DOCUMENT_CACHE@4"]=n),sr=ar,Ke="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},or=Ke;function ur(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var lr=ur(i(function(e,t){var i,a,n,r,s;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,a=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=s.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=s.normalizePath(n.path),s.buildURLFromParts(n)}n=s.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return i.alwaysNormalize?(n.path=s.normalizePath(n.path),s.buildURLFromParts(n)):t;t=s.parseURL(e);if(!t)throw new Error("Error trying to parse base URL.");!t.netLoc&&t.path&&"/"!==t.path[0]&&(r=a.exec(t.path),t.netLoc=r[1],t.path=r[2]),t.netLoc&&!t.path&&(t.path="/");var r,e={scheme:t.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};return n.netLoc||(e.netLoc=t.netLoc,"/"!==n.path[0]&&(n.path?(r=(r=t.path).substring(0,r.lastIndexOf("/")+1)+n.path,e.path=s.normalizePath(r)):(e.path=t.path,n.params||(e.params=t.params,n.query||(e.query=t.query))))),null===e.path&&(e.path=i.alwaysNormalize?s.normalizePath(n.path):n.path),s.buildURLFromParts(e)},parseURL:function(e){e=i.exec(e);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s})),cr=ur(p),dr=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=lr.buildAbsoluteURL(cr.location&&cr.location.href||"",e)),lr.buildAbsoluteURL(e,t))},$e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;t=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(t,1),-1<t},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(t){this.on("data",function(e){t.push(e)})},e}();var hr,pr=(hr=p)&&"object"==typeof hr&&"default"in hr?hr.default:hr;function fr(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);return n}var mr=function(e){for(var t=(e=e,pr.atob?pr.atob(e):Buffer.from(e,"base64").toString("binary")),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},gr=function(t){function e(){var e=t.call(this)||this;return e.buffer="",e}return Ge(e,t),e.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},e}($e),yr=function(t){function e(){var e=t.call(this)||this;return e.customParsers=[],e.tagMappers=[],e}Ge(e,t);var i=e.prototype;return i.push=function(i){var a,s,o=this;0!==(i=i.trim()).length&&("#"===i[0]?this.tagMappers.reduce(function(e,t){t=t(i);return t===i?e:e.concat([t])}
vendor: 10,697 bytes, line 1
1,[i]).forEach(function(e){for(var t,i,n,r=0;r<o.customParsers.length;r++)if(o.customParsers[r].call(o,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),a=/^#EXTM3U/.exec(e))o.trigger("data",{type:"tag",tagType:"m3u"});else{if(a=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return s={type:"tag",tagType:"inf"},a[1]&&(s.duration=parseFloat(a[1])),a[2]&&(s.title=a[2]),void o.trigger("data",s);if(a=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return s={type:"tag",tagType:"targetduration"},a[1]&&(s.duration=parseInt(a[1],10)),void o.trigger("data",s);if(a=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return s={type:"tag",tagType:"totalduration"},a[1]&&(s.duration=parseInt(a[1],10)),void o.trigger("data",s);if(a=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return s={type:"tag",tagType:"version"},a[1]&&(s.version=parseInt(a[1],10)),void o.trigger("data",s);if(a=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return s={type:"tag",tagType:"media-sequence"},a[1]&&(s.number=parseInt(a[1],10)),void o.trigger("data",s);if(a=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return s={type:"tag",tagType:"discontinuity-sequence"},a[1]&&(s.number=parseInt(a[1],10)),void o.trigger("data",s);if(a=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return s={type:"tag",tagType:"playlist-type"},a[1]&&(s.playlistType=a[1]),void o.trigger("data",s);if(a=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return s={type:"tag",tagType:"byterange"},a[1]&&(s.length=parseInt(a[1],10)),a[2]&&(s.offset=parseInt(a[2],10)),void o.trigger("data",s);if(a=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return s={type:"tag",tagType:"allow-cache"},a[1]&&(s.allowed=!/NO/.test(a[1])),void o.trigger("data",s);if(a=/^#EXT-X-MAP:?(.*)$/.exec(e),a)return s={type:"tag",tagType:"map"},a[1]&&((t=fr(a[1])).URI&&(s.uri=t.URI),t.BYTERANGE&&(n=(i=t.BYTERANGE.split("@"))[0],i=i[1],s.byterange={},n&&(s.byterange.length=parseInt(n,10)),i&&(s.byterange.offset=parseInt(i,10)))),void o.trigger("data",s);if(a=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e),a)return s={type:"tag",tagType:"stream-inf"},a[1]&&(s.attributes=fr(a[1]),s.attributes.RESOLUTION&&(n={},(i=s.attributes.RESOLUTION.split("x"))[0]&&(n.width=parseInt(i[0],10)),i[1]&&(n.height=parseInt(i[1],10)),s.attributes.RESOLUTION=n),s.attributes.BANDWIDTH&&(s.attributes.BANDWIDTH=parseInt(s.attributes.BANDWIDTH,10)),s.attributes["PROGRAM-ID"]&&(s.attributes["PROGRAM-ID"]=parseInt(s.attributes["PROGRAM-ID"],10))),void o.trigger("data",s);if(a=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return s={type:"tag",tagType:"media"},a[1]&&(s.attributes=fr(a[1])),void o.trigger("data",s);if(a=/^#EXT-X-ENDLIST/.exec(e))o.trigger("data",{type:"tag",tagType:"endlist"});else{if(!(a=/^#EXT-X-DISCONTINUITY/.exec(e)))return(a=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))?(s={type:"tag",tagType:"program-date-time"},a[1]&&(s.dateTimeString=a[1],s.dateTimeObject=new Date(a[1])),void o.trigger("data",s)):(a=/^#EXT-X-KEY:?(.*)$/.exec(e))?(s={type:"tag",tagType:"key"},a[1]&&(s.attributes=fr(a[1]),s.attributes.IV&&("0x"===s.attributes.IV.substring(0,2).toLowerCase()&&(s.attributes.IV=s.attributes.IV.substring(2)),s.attributes.IV=s.attributes.IV.match(/.{8}/g),s.attributes.IV[0]=parseInt(s.attributes.IV[0],16),s.attributes.IV[1]=parseInt(s.attributes.IV[1],16),s.attributes.IV[2]=parseInt(s.attributes.IV[2],16),s.attributes.IV[3]=parseInt(s.attributes.IV[3],16),s.attributes.IV=new Uint32Array(s.attributes.IV))),void o.trigger("data",s)):(a=/^#EXT-X-START:?(.*)$/.exec(e))?(s={type:"tag",tagType:"start"},a[1]&&(s.attributes=fr(a[1]),s.attributes["TIME-OFFSET"]=parseFloat(s.attributes["TIME-OFFSET"]),s.attributes.PRECISE=/YES/.test(s.attributes.PRECISE)),void o.trigger("data",s)):(a=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))?(s={type:"tag",tagType:"cue-out-cont"},a[1]?s.data=a[1]:s.data="",void o.trigger("data",s)):(a=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))?(s={type:"tag",tagType:"cue-out"},a[1]?s.data=a[1]:s.data="",void o.trigger("data",s)):(a=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))?(s={type:"tag",tagType:"cue-in"},a[1]?s.data=a[1]:s.data="",void o.trigger("data",s)):void o.trigger("data",{type:"tag",data:e.slice(4)});o.trigger("data",{type:"tag",tagType:"discontinuity"})}}else o.trigger("data",{type:"comment",text:e.slice(1)})}):this.trigger("data",{type:"uri",uri:i}))},i.addParser=function(e){var t=this,i=e.expression,n=e.customType,r=e.dataParser,a=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push(function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:n,segment:a}),!0})},i.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push(function(e){return t.test(e)?i(e):e})},e}($e),vr=function(t){function e(){var e=t.call(this)||this;e.lineStream=new gr,e.parseStream=new yr,e.lineStream.pipe(e.parseStream);var r,a,s=ze(e),o=[],u={},l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var d=0;return e.parseStream.on("data",function(t){var i,n;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&((u.byterange=e).length=t.length,"offset"in t||(t.offset=d)),"offset"in t&&((u.byterange=e).offset=t.offset),d=e.offset+e.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),0<t.duration&&(u.duration=t.duration),0===t.duration&&(u.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:mr(t.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),a={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(a.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else a=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,c=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){r={},t.uri&&(r.uri=t.uri),t.byterange&&(r.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||l,t.attributes?(u.attributes||(u.attributes={}),f(u.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){var e;this.manifest.mediaGroups=this.manifest.mediaGroups||l,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME?((e=this.manifest.mediaGroups[t.attributes.TYPE])[t.attributes["GROUP-ID"]]=e[t.attributes["GROUP-ID"]]||{},i=e[t.attributes["GROUP-ID"]],(n={default:/yes/i.test(t.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(n.language=t.attributes.LANGUAGE),t.attributes.URI&&(n.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(n.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(n.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(n.forced=/yes/i.test(t.attributes.FORCED)),i[t.attributes.NAME]=n):this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,u.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),u.dateTimeString=t.dateTimeString,u.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){u.cueOut=t.data},"cue-out-cont":function(){u.cueOutCont=t.data},"cue-in":function(){u.cueIn=t.data}}[t.tagType]||function(){}).call(s)},uri:function(){u.uri=t.uri,o.push(u),!this.manifest.targetDuration||"duration"in u||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),u.duration=this.manifest.targetDuration),a&&(u.key=a),u.timeline=c,r&&(u.map=r),u={}},comment:function(){},custom:function(){t.segment?(u.custom=u.custom||{},u.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(s)}),e}Ge(e,t);var i=e.prototype;return i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push("\n")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},e}
1($e),n=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,n=/^application\/dash\+xml/i;t.simpleTypeFromSourceType=function(e){return i.test(e)?"hls":n.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}});t(n);var _r=n.simpleTypeFromSourceType,ar=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,e=new RegExp("[\\-\\.0-9"+ar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),br=new RegExp("^"+ar.source+e.source+"*(?::"+ar.source+e.source+"*)?$"),Tr=0,Sr=1,kr=2,Cr=3,wr=4,Er=5,Ir=6,Ar=7;function xr(){}function Pr(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Lr(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value,o=0<(c=o.indexOf(":"))?(l=s.prefix=o.slice(0,c),d=o.slice(c+1),"xmlns"===l&&d):(l=null,"xmlns"===(d=o)&&"");s.localName=d,!1!==o&&(null==r&&(r={},Dr(i,i={})),i[o]=r[o]=u,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(o,u))}for(var l,a=e.length;a--;)(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=i[l||""]));var c,d=0<(c=n.indexOf(":"))?(l=e.prefix=n.slice(0,c),e.localName=n.slice(c+1)):(l=null,e.localName=n),h=e.uri=i[l||""];if(t.startElement(h,d,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,1;if(t.endElement(h,d,n),r)for(l in r)t.endPrefixMapping(l)}function Dr(e,t){for(var i in e)t[i]=e[i]}function Or(e){}function Rr(e,t){return e.__proto__=t,e}xr.prototype={parse:function(e,I,t){var i=this.domBuilder;i.startDocument(),Dr(I,I={}),function(i,n,r,a){function s(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(65535<e){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function e(e){var t;p<e&&(t=i.substring(p,e).replace(/&#?\w+;/g,s),d&&o(p),r.characters(t,0,e-p),p=e)}function o(e,t){for(;l<=e&&(t=c.exec(i));)u=t.index,l=u+t[0].length,d.lineNumber++;d.columnNumber=e-u+1}for(var u=0,l=0,c=/.*(?:\r\n?|\n)|.*$/g,d=r.locator,t=[{currentNSMap:I}],h={},p=0;;){try{var f,m,g=i.indexOf("<",p);if(g<0)return i.substr(p).match(/^\s*$/)||(f=r.doc,m=f.createTextNode(i.substr(p)),f.appendChild(m),r.currentElement=m);switch(p<g&&e(g),i.charAt(g+1)){case"/":var y=i.indexOf(">",g+3),v=i.substring(g+2,y),_=t.pop();y<0?(v=i.substring(g+2).replace(/[\s<].*/,""),a.error("end tag name: "+v+" is not complete:"+_.tagName),y=g+1+v.length):v.match(/\s</)&&(v=v.replace(/[\s<].*/,""),a.error("end tag name: "+v+" maybe not complete"),y=g+1+v.length);var b=_.localNSMap,T=_.tagName==v;if(T||_.tagName&&_.tagName.toLowerCase()==v.toLowerCase()){if(r.endElement(_.uri,_.localName,v),b)for(var S in b)r.endPrefixMapping(S);T||a.fatalError("end tag name: "+v+" is not match the current start tagName:"+_.tagName)}else t.push(_);y++;break;case"?":d&&o(g),y=function(e,t,i){var n=e.indexOf("?>",t);if(n){t=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(t){t[0].length;return i.processingInstruction(t[1],t[2]),n+2}return-1}return-1}(i,g,r);break;case"!":d&&o(g),y=function(e,t,i,n){{if("-"===e.charAt(t+2)){if("-"!==e.charAt(t+3))return-1;var r=e.indexOf("--\x3e",t+4);return t<r?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1)}if("CDATA["==e.substr(t+3,6)){r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var a=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),n=a.length;if(1<n&&/!doctype/i.test(a[0][0])){r=a[1][0],e=3<n&&/^public$/i.test(a[2][0])&&a[3][0],t=4<n&&a[4][0],n=a[n-1];return i.startDTD(r,e&&e.replace(/^(['"])(.*?)\1$/,"$2"),t&&t.replace(/^(['"])(.*?)\1$/,"$2")),i.endDTD(),n.index+n[0].length}}return-1}(i,g,r,a);break;default:d&&o(g);var k=new Or,v=t[t.length-1].currentNSMap,y=function(e,t,i,n,r,a){var s,o=++t,u=Tr;for(;;){var l=e.charAt(o);switch(l){case"=":if(u===Sr)s=e.slice(t,o),u=Cr;else{if(u!==kr)throw new Error("attribute equal must after attrName");u=Cr}break;case"'":case'"':if(u===Cr||u===Sr){if(u===Sr&&(a.warning('attribute value must after "="'),s=e.slice(t,o)),t=o+1,!(0<(o=e.indexOf(l,t))))throw new Error("attribute value no end '"+l+"' match");c=e.slice(t,o).replace(/&#?\w+;/g,r),i.add(s,c,t-1),u=Er}else{if(u!=wr)throw new Error('attribute value must after "="');c=e.slice(t,o).replace(/&#?\w+;/g,r),i.add(s,c,t),a.warning('attribute "'+s+'" missed start quot('+l+")!!"),t=o+1,u=Er}break;case"/":switch(u){case Tr:i.setTagName(e.slice(t,o));case Er:case Ir:case Ar:u=Ar,i.closed=!0;case wr:case Sr:case kr:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),u==Tr&&i.setTagName(e.slice(t,o)),o;case">":switch(u){case Tr:i.setTagName(e.slice(t,o));case Er:case Ir:case Ar:break;case wr:case Sr:"/"===(c=e.slice(t,o)).slice(-1)&&(i.closed=!0,c=c.slice(0,-1));case kr:u===kr&&(c=s),u==wr?(a.warning('attribute "'+c+'" missed quot(")!!'),i.add(s,c.replace(/&#?\w+;/g,r),t)):("http://www.w3.org/1999/xhtml"===n[""]&&c.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),i.add(c,c,t));break;case Cr:throw new Error("attribute value missed!!")}return o;case"€":l=" ";default:if(l<=" ")switch(u){case Tr:i.setTagName(e.slice(t,o)),u=Ir;break;case Sr:s=e.slice(t,o),u=kr;break;case wr:var c=e.slice(t,o).replace(/&#?\w+;/g,r);a.warning('attribute "'+c+'" missed quot(")!!'),i.add(s,c,t);case Er:u=Ir}else switch(u){case kr:i.tagName;"http://www.w3.org/1999/xhtml"===n[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),i.add(s,s,t),t=o,u=Sr;break;case Er:a.warning('attribute space is required"'+s+'"!!');case Ir:u=Sr,t=o;break;case Cr:u=wr,t=o;break;case Ar:throw new Error("elements closed character '/' and '>' must be connected to")}}o++}}(i,g,k,v,s,a),C=k.length;if(!k.closed&&function(e,t,i,n){var r=n[i];null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r);return r<t}(i,y,k.tagName,h)&&(k.closed=!0,n.nbsp||a.warning("unclosed xml attribute")),d&&C){for(var _=Pr(d,{}),w=0;w<C;w++){var E=k[w];o(E.offset),E.locator=Pr(d,{})}r.locator=_,Lr(k,r,v)&&t.push(k),r.locator=d}else Lr(k,r,v)&&t.push(k);"http://www.w3.org/1999/xhtml"!==k.uri||k.closed?y++:y=function(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("</"+i+">",t),e=e.substring(t+1,a);if(/[&<]/.test(e))return/^script$/i.test(i)||(e=e.replace(/&#?\w+;/g,n)),r.characters(e,0,e.length),a}return t+1}(i,y,k.tagName,s,r)}}catch(e){a.error("element parse error: "+e),y=-1}p<y?p=y:e(Math.max(g,p)+1)}}(e,t,i,this.errorHandler),i.endDocument()}},Or.prototype={setTagName:function(e){if(!br.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,i){if(!br.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Rr({},Rr.prototype);var Mr={XMLReader:xr};function Nr(e,t){for(var i in e)t[i]=e[i]}function Ur(e,t){var i,n=e.prototype;Object.create&&(i=Object.create(t.prototype),n.__proto__=i),n instanceof t||((i=function(){}).prototype=t.prototype,Nr(n,i=new i),e.prototype=n=i),n.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),n.constructor=e)}var Br,Fr="http://www.w3.org/1999/xhtml",Ke={},jr=Ke.ELEMENT_NODE=1,Vr=Ke.ATTRIBUTE_NODE=2,Hr=Ke.TEXT_NODE=3,qr=Ke.CDATA_SECTION_NODE=4,Wr=Ke.ENTITY_REFERENCE_NODE=5,zr=(Ke.ENTITY_NODE=6,Ke.PROCESSING_INSTRUCTION_NODE=7),Gr=Ke.COMMENT_NODE=8,Xr=Ke.DOCUMENT_NODE=9,Kr=Ke.DOCUMENT_TYPE_NODE=10,Yr=Ke.DOCUMENT_FRAGMENT_NODE=11,$e=(Ke.NOTATION_NODE=12,{}),$r={};$e.INDEX_SIZE_ERR=($r[1]="Index size error",1),$e.DOMSTRING_SIZE_ERR=($r[2]="DOMString size error",2),$e.HIERARCHY_REQUEST_ERR=($r[3]="Hierarchy request error",3),$e.WRONG_DOCUMENT_ERR=($r[4]="Wrong document",4),$e.INVALID_CHARACTER_ERR=($r[5]="Invalid character",5),$e.NO_DATA_ALLOWED_ER
1R=($r[6]="No data allowed",6),$e.NO_MODIFICATION_ALLOWED_ERR=($r[7]="No modification allowed",7),$e.NOT_FOUND_ERR=($r[8]="Not found",8),$e.NOT_SUPPORTED_ERR=($r[9]="Not supported",9),$e.INUSE_ATTRIBUTE_ERR=($r[10]="Attribute in use",10),$e.INVALID_STATE_ERR=($r[11]="Invalid state",11),$e.SYNTAX_ERR=($r[12]="Syntax error",12),$e.INVALID_MODIFICATION_ERR=($r[13]="Invalid modification",13),$e.NAMESPACE_ERR=($r[14]="Invalid namespace",14),$e.INVALID_ACCESS_ERR=($r[15]="Invalid access",15);function Qr(e,t){var i;return t instanceof Error?i=t:(i=this,Error.call(this,$r[e]),this.message=$r[e],Error.captureStackTrace&&Error.captureStackTrace(this,Qr)),i.code=e,t&&(this.message=this.message+": "+t),i}function Jr(){}function Zr(e,t){this._node=e,this._refresh=t,ea(this)}function ea(e){var t,i=e._node._inc||e._node.ownerDocument._inc;e._inc!=i&&(t=e._refresh(e._node),Pa(e,"length",t.length),Nr(t,e),e._inc=i)}function ta(){}function ia(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function na(e,t,i,n){n?t[ia(t,n)]=i:t[t.length++]=i,!e||(t=(i.ownerElement=e).ownerDocument)&&(n&&ca(t,e,n),e=e,i=i,(t=t)&&t._inc++,"http://www.w3.org/2000/xmlns/"==i.namespaceURI&&(e._nsMap[i.prefix?i.localName:""]=i.value))}function ra(e,t,i){var n=ia(t,i);if(!(0<=n))throw Qr(8,new Error(e.tagName+"@"+i));for(var r,a=t.length-1;n<a;)t[n]=t[++n];t.length=a,!e||(r=e.ownerDocument)&&(ca(r,e,i),i.ownerElement=null)}function aa(e){if(this._features={},e)for(var t in e)this._features=e[t]}function sa(){}function oa(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function ua(e,t){if(t(e))return 1;if(e=e.firstChild)do{if(ua(e,t))return 1}while(e=e.nextSibling)}function la(){}function ca(e,t,i){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==i.namespaceURI&&delete t._nsMap[i.prefix?i.localName:""]}function da(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,a=0;r;)r=(n[a++]=r).nextSibling;n.length=a}}}function ha(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,da(e.ownerDocument,e),t}function pa(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Yr){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;n=i?i.previousSibling:e.lastChild;for(r.previousSibling=n,a.nextSibling=i,n?n.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;r.parentNode=e,r!==a&&(r=r.nextSibling););return da(e.ownerDocument||e,e),t.nodeType==Yr&&(t.firstChild=t.lastChild=null),t}function fa(){this._nsMap={}}function ma(){}function ga(){}function ya(){}function va(){}function _a(){}function ba(){}function Ta(){}function Sa(){}function ka(){}function Ca(){}function wa(){}function Ea(){}function Ia(e,t){var i,n=[],r=9==this.nodeType?this.documentElement:this,a=r.prefix,s=r.namespaceURI;return s&&null==a&&null==(a=r.lookupPrefix(s))&&(i=[{namespace:s,prefix:null}]),xa(this,n,e,t,i),n.join("")}function Aa(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if((n||r)&&("xml"!==n||"http://www.w3.org/XML/1998/namespace"!==r)&&"http://www.w3.org/2000/xmlns/"!=r){for(var a=i.length;a--;){var s=i[a];if(s.prefix==n)return s.namespace!=r}return 1}}function xa(e,t,i,n,r){if(n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case jr:r=r||[];var a=e.attributes,s=a.length,o=e.firstChild,u=e.tagName;i=Fr===e.namespaceURI||i,t.push("<",u);for(var l=0;l<s;l++)"xmlns"==(c=a.item(l)).prefix?r.push({prefix:c.localName,namespace:c.value}):"xmlns"==c.nodeName&&r.push({prefix:"",namespace:c.value});for(var c,d,h,p,l=0;l<s;l++)Aa(c=a.item(l),0,r)&&(d=c.prefix||"",h=c.namespaceURI,p=d?" xmlns:"+d:" xmlns",t.push(p,'="',h,'"'),r.push({prefix:d,namespace:h})),xa(c,t,i,n,r);if(Aa(e,0,r)&&(d=e.prefix||"",h=e.namespaceURI,p=d?" xmlns:"+d:" xmlns",t.push(p,'="',h,'"'),r.push({prefix:d,namespace:h})),o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),i&&/^script$/i.test(u))for(;o;)o.data?t.push(o.data):xa(o,t,i,n,r),o=o.nextSibling;else for(;o;)xa(o,t,i,n,r),o=o.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Xr:case Yr:for(o=e.firstChild;o;)xa(o,t,i,n,r),o=o.nextSibling;return;case Vr:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,oa),'"');case Hr:return t.push(e.data.replace(/[<&]/g,oa));
vendor: 6,281 bytes, line 1
1case qr:return t.push("<![CDATA[",e.data,"]]>");case Gr:return t.push("\x3c!--",e.data,"--\x3e");case Kr:var f=e.publicId,u=e.systemId;return t.push("<!DOCTYPE ",e.name),void(f?(t.push(' PUBLIC "',f),u&&"."!=u&&t.push('" "',u),t.push('">')):u&&"."!=u?t.push(' SYSTEM "',u,'">'):((u=e.internalSubset)&&t.push(" [",u,"]"),t.push(">")));case zr:return t.push("<?",e.target," ",e.data,"?>");case Wr:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Pa(e,t,i){e[t]=i}Qr.prototype=Error.prototype,Nr($e,Qr),Jr.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)xa(this[n],i,e,t);return i.join("")}},Zr.prototype.item=function(e){return ea(this),this[e]},Ur(Zr,Jr),ta.prototype={length:0,item:Jr.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Qr(10);t=this.getNamedItem(e.nodeName);return na(this._ownerElement,this,e,t),t},setNamedItemNS:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Qr(10);return t=this.getNamedItemNS(e.namespaceURI,e.localName),na(this._ownerElement,this,e,t),t},removeNamedItem:function(e){e=this.getNamedItem(e);return ra(this._ownerElement,this,e),e},removeNamedItemNS:function(e,t){t=this.getNamedItemNS(e,t);return ra(this._ownerElement,this,t),t},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},aa.prototype={hasFeature:function(e,t){e=this._features[e.toLowerCase()];return!(!e||t&&!(t in e))},createDocument:function(e,t,i){var n=new la;return n.implementation=this,n.childNodes=new Jr,(n.doctype=i)&&n.appendChild(i),t&&(t=n.createElementNS(e,t),n.appendChild(t)),n},createDocumentType:function(e,t,i){var n=new ba;return n.name=e,n.nodeName=e,n.publicId=t,n.systemId=i,n}},sa.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return pa(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return ha(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,i,n){var r=new i.constructor;for(var a in i){var s=i[a];"object"!=typeof s&&s!=r[a]&&(r[a]=s)}i.childNodes&&(r.childNodes=new Jr);r.ownerDocument=t;switch(r.nodeType){case jr:var o=i.attributes,u=r.attributes=new ta,l=o.length;u._ownerElement=r;for(var c=0;c<l;c++)r.setAttributeNode(e(t,o.item(c),!0));break;case Vr:n=!0}if(n)for(var d=i.firstChild;d;)r.appendChild(e(t,d,n)),d=d.nextSibling;return r}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hr&&e.nodeType==Hr?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return 0<this.attributes.length},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(i[n]==e)return n;t=t.nodeType==Vr?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&e in i)return i[e];t=t.nodeType==Vr?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Nr(Ke,sa),Nr(Ke,sa.prototype),la.prototype={nodeName:"#document",nodeType:Xr,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType!=Yr)return null==this.documentElement&&e.nodeType==jr&&(this.documentElement=e),pa(this,e,t),e.ownerDocument=this,e;for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),ha(this,e)},importNode:function(e,t){return function e(t,i,n){var r;switch(i.nodeType){case jr:(r=i.cloneNode(!1)).ownerDocument=t;case Yr:break;case Vr:n=!0}r=r||i.cloneNode(!1);r.ownerDocument=t;r.parentNode=null;if(n)for(var a=i.firstChild;a;)r.appendChild(e(t,a,n)),a=a.nextSibling;return r}(this,e,t)},getElementById:function(t){var i=null;return ua(this.documentElement,function(e){if(e.nodeType==jr&&e.getAttribute("id")==t)return i=e,!0}),i},createElement:function(e){var t=new fa;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new Jr,(t.attributes=new ta)._ownerElement=t},createDocumentFragment:function(){var e=new Ca;return e.ownerDocument=this,e.childNodes=new Jr,e},createTextNode:function(e){var t=new ya;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new va;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new _a;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new wa;return i.ownerDocument=this,i.tagName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new ma;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ka;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new fa,n=t.split(":"),r=i.attributes=new ta;return i.childNodes=new Jr,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i},createAttributeNS:function(e,t){var i=new ma,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},Ur(la,sa),la.prototype.getElementsByTagName=(fa.prototype={nodeType:jr,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){e=this.getAttributeNode(e);return e&&e.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){e=this.ownerDocument.createAttribute(e);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(e){e=this.getAttributeNode(e);e&&this.removeAttributeNode(e)}
1,appendChild:function(e){return e.nodeType===Yr?this.insertBefore(e,null):function(e,t){var i=t.parentNode;i&&(n=e.lastChild,i.removeChild(t),n=e.lastChild);var n=e.lastChild;return t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,da(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){t=this.getAttributeNodeNS(e,t);t&&this.removeAttributeNode(t)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){t=this.getAttributeNodeNS(e,t);return t&&t.value||""},setAttributeNS:function(e,t,i){t=this.ownerDocument.createAttributeNS(e,t);t.value=t.nodeValue=""+i,this.setAttributeNode(t)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(n){return new Zr(this,function(t){var i=[];return ua(t,function(e){e===t||e.nodeType!=jr||"*"!==n&&e.tagName!=n||i.push(e)}),i})},getElementsByTagNameNS:function(n,r){return new Zr(this,function(t){var i=[];return ua(t,function(e){e===t||e.nodeType!==jr||"*"!==n&&e.namespaceURI!==n||"*"!==r&&e.localName!=r||i.push(e)}),i})}}).getElementsByTagName,la.prototype.getElementsByTagNameNS=fa.prototype.getElementsByTagNameNS,Ur(fa,sa),ma.prototype.nodeType=Vr,Ur(ma,sa),ga.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error($r[3])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Ur(ga,sa),ya.prototype={nodeName:"#text",nodeType:Hr,splitText:function(e){var t=(i=this.data).substring(e),i=i.substring(0,e);this.data=this.nodeValue=i,this.length=i.length;t=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling),t}},Ur(ya,ga),va.prototype={nodeName:"#comment",nodeType:Gr},Ur(va,ga),_a.prototype={nodeName:"#cdata-section",nodeType:qr},Ur(_a,ga),ba.prototype.nodeType=Kr,Ur(ba,sa),Ta.prototype.nodeType=12,Ur(Ta,sa),Sa.prototype.nodeType=6,Ur(Sa,sa),ka.prototype.nodeType=Wr,Ur(ka,sa),Ca.prototype.nodeName="#document-fragment",Ca.prototype.nodeType=Yr,Ur(Ca,sa),wa.prototype.nodeType=zr,Ur(wa,sa),Ea.prototype.serializeToString=function(e,t,i){return Ia.call(e,t,i)},sa.prototype.toString=Ia;try{Object.defineProperty&&(Br=function e(t){switch(t.nodeType){case jr:case Yr:var i=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&i.push(e(t)),t=t.nextSibling;return i.join("");default:return t.nodeValue}},Object.defineProperty(Zr.prototype,"length",{get:function(){return ea(this),this.$$length}}),Object.defineProperty(sa.prototype,"textContent",{get:function(){return Br(this)},set:function(e){switch(this.nodeType){case jr:case Yr:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Pa=function(e,t,i){e["$$"+t]=i})}catch(e){}function La(e){return!!e&&"object"==typeof e}function Da(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(function(t,i){return"object"!=typeof i||Object.keys(i).forEac
1h(function(e){Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):La(t[e])&&La(i[e])?t[e]=Da(t[e],i[e]):t[e]=i[e]}),t},{})}function Oa(e){return e.reduce(function(e,t){return e.concat(t)},[])}function Ra(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t}function Ma(e){var t=void 0===(i=e.baseUrl)?"":i,i=void 0===(n=e.source)?"":n,n=void 0===(n=e.range)?"":n,e=void 0===(e=e.indexRange)?"":e,i={uri:i,resolvedUri:dr(t||"",i)};return(n||e)&&(n=(n||e).split("-"),e=parseInt(n[0],10),n=parseInt(n[1],10),i.byterange={length:n-e+1,offset:e}),i}function Na(e){var s,t=void 0===(a=e.type)?"static":a,i=e.duration,n=e.timescale,r=void 0===n?1:n,a=e.sourceDuration,e=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n);return i}((n=fs[t](e)).start,n.end).map((s=e,function(e,t){var i=s.duration,n=s.timescale,r=void 0===n?1:n,a=s.periodIndex,n=s.startNumber;return{number:(void 0===n?1:n)+e,duration:i/r,timeline:a,time:t*i}}));return"static"===t&&(e[t=e.length-1].duration=a-i/r*t),e}function Ua(e){var t=e.baseUrl,i=void 0===(r=e.initialization)?{}:r,n=e.sourceDuration,r=void 0===(a=e.indexRange)?"":a,a=e.duration;if(!t)throw new Error(ds);return i=Ma({baseUrl:t,source:i.sourceURL,range:i.range}),(r=Ma({baseUrl:t,source:t,indexRange:r})).map=i,a?(e=Na(e)).length&&(r.duration=e[0].duration,r.timeline=e[0].timeline):n&&(r.duration=n,r.timeline=0),r.number=0,[r]}function Ba(e,t,i){for(var n=e.sidx.map||null,r=e.sidx.duration,a=e.timeline||0,s=(s=e.sidx.byterange).offset+s.length,o=t.timescale,u=t.references.filter(function(e){return 1!==e.referenceType}),l=[],c=s+t.firstOffset,d=0;d<u.length;d++){var h=t.references[d],p=h.referencedSize,h=h.subsegmentDuration,h=Ua({baseUrl:i,timescale:o,timeline:a,periodIndex:a,duration:h,sourceDuration:r,indexRange:c+"-"+(c+p-1)})[0];n&&(h.map=n),l.push(h),c+=p}return e.segments=l,e}function Fa(e){var t;return(t=e.reduce(function(e,t){var i,n=t.attributes.id+(t.attributes.lang||"");return e[n]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):e[n]=t,e},{}),Object.keys(t).map(function(e){return t[e]})).map(function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce(function(e,t,i){return t[n]&&e.push(i),e},[])),e})}function ja(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e){var n=e[i];n.sidx&&(a=t[a=n.sidx.uri+"-"+(r=n.sidx.byterange,a=void 0,a=r.offset+r.length-1,r.offset+"-"+a)]&&t[a].sidx,n.sidx&&a&&Ba(n,a,n.sidx.resolvedUri))}var r,a;return e}function Va(e,o){var u;return void 0===o&&(o={}),e=e.reduce(function(e,t){var i,n,r=t.attributes.role&&t.attributes.role.value||"",a=t.attributes.lang||"",s="main";return a&&(n=r?" ("+r+")":"",s=t.attributes.lang+n),e[s]&&e[s].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth||(e[s]={language:a,autoselect:!0,default:"main"===r,playlists:ja([(n=(i=t).attributes,s=i.segments,a=i.sidx,s={attributes:((i={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs})["PROGRAM-ID"]=1,i),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:s,mediaSequence:s.length?s[0].number:1},n.contentProtection&&(s.contentProtection=n.contentProtection),a&&(s.sidx=a),s)],o),uri:""},void 0===u&&"main"===r&&((u=t).default=!0)),e},{}),u||(e[Object.keys(e)[0]].default=!0),e}function Ha(e){var t=e.attributes,i=e.segments,n=e.sidx,i={attributes:((e={NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth})["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(t.type||"static"),timeline:t.periodIndex,resolvedUri:"",targetDuration:t.duration,segments:i,mediaSequence:i.length?i[0].number:1};return t.contentProtection&&(i.contentProtection=t.contentProtection),n&&(i.sidx=n),i}function qa(e,t,i){if(void 0===i&&(i={}),!e.length)return{};var n,r=(c=e[0].attributes).sourceDuration,a=void 0===(l=c.type)?"static":l,s=c.suggestedPresentationDelay,o=c.minimumUpdatePeriod,u=Fa(e.filter(function(e){e=e.attributes;return"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType})).map(Ha),l=Fa(e.filter(function(e){e=e.attributes;return"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType})),c=e.filter(function(e){e=e.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType}),u={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:((e={AUDIO:{},VIDEO:{}})["CLOSED-CAPTIONS"]={},e.SUBTITLES={},e),uri:"",duration:r,playlists:ja(u,i)};return 0<=o&&(u.minimumUpdatePeriod=1e3*o),t&&(u.locations=t),"dynamic"===a&&(u.suggestedPresentationDelay=s),l.length&&(u.mediaGroups.AUDIO.audio=Va(l,i)),c.length&&(u.mediaGroups.SUBTITLES.subs=(void 0===(n=i)&&(n={}),c.reduce(function(e,t){var i=t.attributes.lang||"text";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:ja([function(e){var t=e.attributes,i=e.segments;void 0===i&&(i=[{uri:t.baseUrl,timeline:t.periodIndex,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);(e={NAME:t.id,BANDWIDTH:t.bandwidth})["PROGRAM-ID"]=1;return t.codecs&&(e.CODECS=t.codecs),{attributes:e,uri:"",endList:"static"===(t.type||"static"),timeline:t.periodIndex,resolvedUri:t.baseUrl||"",targetDuration:t.duration,segments:i,mediaSequence:i.length?i[0].number:1}}(t)],n),uri:""}),e},{}))),u}function Wa(e,t){for(var i,n,r,a,s,o,u=e.type,l=void 0===u?"static":u,c=void 0===(u=e.minimumUpdatePeriod)?0:u,d=void 0===(u=e.media)?"":u,h=e.sourceDuration,p=void 0===(u=e.timescale)?1:u,f=void 0===(u=e.startNumber)?1:u,m=e.periodIndex,g=[],y=-1,v=0;v<t.length;v++){var _=t[v],b=_.d,T=_.r||0,S=_.t||0;y<0&&(y=S),S&&y<S&&(y=S);var k,C=void 0;C=T<0?(k=v+1)===t.length?"dynamic"===l&&0<c&&0<d.indexOf("$Number$")?(i=y,n=b,o=o=o=_=o=s=a=r=void 0,r=(S=e).NOW,a=S.clientOffset,s=S.availabilityStartTime,o=S.timescale,_=void 0===o?1:o,o=void 0===(o=S.start)?0:o,S=S.minimumUpdatePeriod,o=(r+a)/1e3+(void 0===S?0:S)-(s+o),Math.ceil((o*_-i)/n)):(h*p-y)/b:(t[k].t-y)/b:T+1;for(var w=f+g.length+C,E=f+g.length;E<w;)g.push({number:E,duration:b/p,time:y,timeline:m}),y+=b,E++}return g}function za(e,t){return e.replace(ms,(r=t,function(e,t,i,n){if("$$"===e)return"$";if(void 0===r[t])return e;e=""+r[t];return"RepresentationID"===t||(n=i?parseInt(n,10):1)<=e.length?e:ne
1w Array(n-e.length+1).join("0")+e}));var r}function Ga(i,e){var n={RepresentationID:i.id,Bandwidth:i.bandwidth||0},t=void 0===(t=i.initialization)?{sourceURL:"",range:""}:t,r=Ma({baseUrl:i.baseUrl,source:za(t.sourceURL,n),range:t.range});return(t=e,(e=i).duration||t?e.duration?Na(e):Wa(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]).map(function(e){n.Number=e.number,n.Time=e.time;var t=za(i.media||"",n);return{uri:t,timeline:e.timeline,duration:e.duration,resolvedUri:dr(i.baseUrl||"",t),map:r,number:e.number}})}function Xa(n,e){var t=n.duration,i=void 0===(i=n.segmentUrls)?[]:i;if(!t&&!e||t&&e)throw new Error(hs);var r,a=i.map(function(e){return i=e,e=(t=n).baseUrl,t=t.initialization,t=Ma({baseUrl:e,source:(t=void 0===t?{}:t).sourceURL,range:t.range}),(i=Ma({baseUrl:e,source:i.media,range:i.mediaRange})).map=t,i;var t,i});return t&&(r=Na(n)),e&&(r=Wa(n,e)),r.map(function(e,t){if(a[t]){t=a[t];return t.timeline=e.timeline,t.duration=e.duration,t.number=e.number,t}}).filter(function(e){return e})}function Ka(e){var t,i=e.attributes,n=e.segmentInfo;n.template?(a=Ga,t=Da(i,n.template)):n.base?(a=Ua,t=Da(i,n.base)):n.list&&(a=Xa,t=Da(i,n.list));var r={attributes:i};if(!a)return r;var a,e=a(t,n.timeline);return t.duration?(i=t.duration,a=void 0===(a=t.timescale)?1:a,t.duration=i/a):e.length?t.duration=e.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0,r.attributes=t,r.segments=e,n.base&&t.indexRange&&(r.sidx=e[0],r.segments=[]),r}function Ya(e,t){return Ra(e.childNodes).filter(function(e){return e.tagName===t})}function $a(e){return e.textContent.trim()}function Qa(e){if(!(r=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e)))return 0;var t=(a=r.slice(1))[0],i=a[1],n=a[2],e=a[3],r=a[4],a=a[5];return 31536e3*parseFloat(t||0)+2592e3*parseFloat(i||0)+86400*parseFloat(n||0)+3600*parseFloat(e||0)+60*parseFloat(r||0)+parseFloat(a||0)}function Ja(e){return e&&e.attributes?Ra(e.attributes).reduce(function(e,t){var i=gs[t.name]||gs.DEFAULT;return e[t.name]=i(t.value),e},{}):{}}function Za(e,i){return i.length?Oa(e.map(function(t){return i.map(function(e){return dr(t,$a(e))})})):e}function es(e){var t=Ya(e,"SegmentTemplate")[0],i=Ya(e,"SegmentList")[0],n=i&&Ya(i,"SegmentURL").map(function(e){return Da({tag:"SegmentURL"},Ja(e))}),r=Ya(e,"SegmentBase")[0],e=(a=i||t)&&Ya(a,"SegmentTimeline")[0],a=(a=i||r||t)&&Ya(a,"Initialization")[0];(t=t&&Ja(t))&&a?t.initialization=a&&Ja(a):t&&t.initialization&&(t.initialization={sourceURL:t.initialization});var s={template:t,timeline:e&&Ya(e,"S").map(Ja),list:i&&Da(Ja(i),{segmentUrls:n,initialization:Ja(a)}),base:r&&Da(Ja(r),{initialization:Ja(a)})};return Object.keys(s).forEach(function(e){s[e]||delete s[e]}),s}function ts(o,u,l){return function(e){var t=Ja(e),i=Za(u,Ya(e,"BaseURL")),n=Ya(e,"Role")[0],n={role:Ja(n)},t=Da(o,t,n),n=Ya(e,"ContentProtection").reduce(function(e,t){var i=Ja(t),n=ys[i.schemeIdUri];return n&&(e[n]={attributes:i},(t=Ya(t,"cenc:pssh")[0])&&(t=(t=$a(t))&&mr(t),e[n].pssh=t)),e},{});Object.keys(n).length&&(t=Da(t,{contentProtection:n}));var r,a,s,n=es(e),e=Ya(e,"Representation"),n=Da(l,n);return Oa(e.map((r=t,a=i,s=n,function(e){var t=Ya(e,"BaseURL"),t=Za(a,t),i=Da(r,Ja(e)),n=es(e);return t.map(function(e){return{segmentInfo:Da(s,n),attributes:Da(i,{baseUrl:e})}})})))}}function is(e,t){void 0===t&&(t={});var i=void 0===(a=(u=t).manifestUri)?"":a,n=u.NOW,r=void 0===n?Date.now():n,a=void 0===(t=u.clientOffset)?0:t;if(!(n=Ya(e,"Period")).length)throw new Error(us);var s,o,u=Ya(e,"Location"),t=Ja(e),e=Za([i],Ya(e,"BaseURL"));return t.sourceDuration=t.mediaPresentationDuration||0,t.NOW=r,t.clientOffset=a,u.length&&(t.locations=u.map($a)),{locations:t.locations,representationInfo:Oa(n.map((s=t,o=e,function(e,t){var i=Za(o,Ya(e,"BaseURL")),n=Ja(e),n=parseInt(n.id,10),t=p.isNaN(n)?t:n,n=Da(s,{periodIndex:t}),t=Ya(e,"AdaptationSet"),e=es(e);return Oa(t.map(ts(n,i,e)))})))}}function ns(e){if(""===e)throw new Error(ls);var t,i,n=new os;try{i=(t=n.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!i||i&&0<i.getElementsByTagName("parsererror").length)throw new Error(cs);return i}function rs(e,t){void 0===t&&(t={});var i=is(ns(e),t),e=i.representationInfo.map(Ka);return qa(e,i.locations,t.sidxMapping)}function as(e){return function(e){e=Ya(e,"UTCTiming")[0];if(!e)return null;var t=Ja(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ps)}return t}(ns(e))}var ss={DOMImplementation:aa,XMLSerializer:Ea},n=i(function(e,t){function i(e){this.options=e||{locator:{}}}function l(){this.cdata=!1}function c(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function d(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}
1function r(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function h(e,t){(e.currentElement||e.doc).appendChild(t)}i.prototype.parseFromString=function(e,t){var i=this.options,n=new p,r=i.domBuilder||new l,a=i.errorHandler,s=i.locator,o=i.xmlns||{},u={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return s&&r.setDocumentLocator(s),n.errorHandler=function(n,e,r){if(!n){if(e instanceof l)return e;n=e}var a={},s=n instanceof Function;function t(t){var i=n[t];!i&&s&&(i=2==n.length?function(e){n(t,e)}:n),a[t]=i?function(e){i("[xmldom "+t+"]\t"+e+d(r))}:function(){}}return r=r||{},t("warning"),t("error"),t("fatalError"),a}(a,r,s),n.domBuilder=i.domBuilder||r,/\/x?html?$/.test(t)&&(u.nbsp=" ",u.copy="©",o[""]="http://www.w3.org/1999/xhtml"),o.xml=o.xml||"http://www.w3.org/XML/1998/namespace",e?n.parse(e,o,u):n.errorHandler.error("invalid doc source"),r.doc},l.prototype={startDocument:function(){this.doc=(new n).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,a=r.createElementNS(e,i||t),s=n.length;h(this,a),this.currentElement=a,this.locator&&c(this.locator,a);for(var o=0;o<s;o++){var e=n.getURI(o),u=n.getValue(o),i=n.getQName(o),l=r.createAttributeNS(e,i);this.locator&&c(n.getLocator(o),l),l.value=l.nodeValue=u,a.setAttributeNode(l)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){t=this.doc.createProcessingInstruction(e,t);this.locator&&c(this.locator,t),h(this,t)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){var n;(e=r.apply(this,arguments))&&(n=this.cdata?this.doc.createCDATASection(e):this.doc.createTextNode(e),this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&c(this.locator,n))},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=r.apply(this,arguments);e=this.doc.createComment(e);this.locator&&c(this.locator,e),h(this,e)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;n&&n.createDocumentType&&(i=n.createDocumentType(e,t,i),this.locator&&c(this.locator,i),h(this,i))},warning:function(e){console.warn("[xmldom warning]\t"+e,d(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,d(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,d(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){l.prototype[e]=function(){return null}});var p=Mr.XMLReader,n=t.DOMImplementation=ss.DOMImplementation;t.XMLSerializer=ss.XMLSerializer,t.DOMParser=i}),os=(n.DOMImplementation,n.XMLSerializer,n.DOMParser),us="INVALID_NUMBER_OF_PERIOD",ls="DASH_EMPTY_MANIFEST",cs="DASH_INVALID_XML",ds="NO_BASE_URL",hs="SEGMENT_TIME_UNSPECIFIED",ps="UNSUPPORTED_UTC_TIMING_SCHEME",fs={static:function(e){var t=e.duration,i=e.timescale,i=void 0===i?1:i,e=e.sourceDuration;return{start:0,end:Math.ceil(e/(t/i))}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.start,r=void 0===o?0:o,o=e.minimumUpdatePeriod,o=void 0===o?0:o,e=e.timeShiftBufferDepth,e=void 0===e?1/0:e,i=(t+i)/1e3,r=n+r,o=i+o-r,o=Math.ceil(o*a/s),e=Math.floor((i-r-e)*a/s),s=Math.floor((i-r)*a/s);return{start:Math.max(0,e),end:Math.min(o,s)}}},ms=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,gs={mediaPresentationDuration:Qa,availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=e)&&(e+="Z"),Date.parse(e)/1e3},minimumUpdatePeriod:Qa,suggestedPresentationDelay:Qa,type:function(e){return e},timeShiftBufferDepth:Qa,start:Qa,width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Qa(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},ys={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},vs=Ba,_s=Math.pow(2,32),bs=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=t.getUint32(n)*_s+t.getUint32(n+4),i.firstOffset=t.getUint32(n+8)*_s+t.getUint32(n+12),n+=16),n+=2;var r=t.getUint16(n);for(n+=2;0<r;n+=12,r--)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}
1,ar=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)}function r(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,n(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}function i(e,t){void 0===t&&(t=0);var i=(e=n(e))[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?20+i:10+i}function a(e,t){return void 0===t&&(t=0),(e=n(e)).length-t<10||"ID3"!==r(e.subarray(t,t+3))?t:a(e,t+=i(e,t))}var s={aac:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&16==(22&e[t+1])},mp3:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&2==(6&e[t+1])},webm:function(e){return 4<=e.length&&26==(255&e[0])&&69==(255&e[1])&&223==(255&e[2])&&163==(255&e[3])},mp4:function(e){return 8<=e.length&&/^(f|s)typ$/.test(r(e.subarray(4,8)))&&!/^ftyp3g$/.test(r(e.subarray(4,10)))},"3gp":function(e){return 10<=e.length&&/^ftyp3g$/.test(r(e.subarray(4,10)))},ts:function(e){if(e.length<189&&1<=e.length)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){return 4<=e.length&&/^fLaC$/.test(r(e.subarray(0,4)))},ogg:function(e){return 4<=e.length&&/^OggS$/.test(r(e.subarray(0,4)))}},o=Object.keys(s).filter(function(e){return"ts"!==e}).concat("ts");o.forEach(function(e){var t=s[e];s[e]=function(e){return t(n(e))}});t.detectContainerForBytes=function(e){e=n(e);for(var t=0;t<o.length;t++){var i=o[t];if(s[i](e))return i}return""},t.getId3Offset=a,t.id3Size=i,t.isLikely=s,t.isLikelyFmp4MediaSegment=function(e){e=n(e);for(var t=0;t<e.length;){var i=(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0;if("moof"===r(e.subarray(t+4,t+8)))return!0;0==i||i+t>e.length?t=e.length:t+=i}return!1}});t(ar);var Ts=ar.detectContainerForBytes,Ss=ar.getId3Offset,ks=(ar.id3Size,ar.isLikely,ar.isLikelyFmp4MediaSegment),e=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function s(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)}t.bytesToString=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,s(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},t.concatTypedArrays=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t.reduce(function(e,t){return e+=t&&(t.byteLength||t.length)||0},0),r=new Uint8Array(n),a=0;return t.forEach(function(e){e=s(e),r.set(e,a),a+=e.byteLength}),r},t.isTypedArray=function(e){return ArrayBuffer.isView(e)},t.stringToBytes=function(e,t){void 0===t&&(t=!1);return"string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e?[]:(t||(e=unescape(encodeURIComponent(e))),e.split("").map(function(e){return 255&e.charCodeAt(0)}))},t.toUint8=s});t(e);e.bytesToString;var Cs=e.concatTypedArrays,ws=(e.isTypedArray,e.stringToBytes),Es=e.toUint8,Is=27,As=15,xs=21,$e=function(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){return!!a[e]&&(t=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(t,1),-1<t)},this.trigger=function(e){var t,i,n,r=a[e];if(r)if(2===arguments.length)for(i=r.length,t=0;t<i;++t)r[t].call(this,arguments[1]);else{for(n=[],t=arguments.length,t=1;t<arguments.length;++t)n.push(arguments[t]);for(i=r.length,t=0;t<i;++t)r[t].apply(this,n)}},this.dispose=function(){a={}}}};$e.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),this.on("partialdone",function(e){t.partialFlush(e)}),this.on("endedtimeline",function(e){t.endTimeline(e)}),this.on("reset",function(e){t.reset(e)}),t},$e.prototype.push=function(e){this.trigger("data",e)},$e.prototype.flush=function(e){this.trigger("done",e)},$e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},$e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},$e.prototype.reset=function(e){this.trigger("reset",e)};function Ps(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e}Ke=function e(t){var i,n;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=Ps(e.dts,n),e.pts=Ps(e.pts,n),i=e.dts,this.trigger("data",e))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ke.prototype=new $e;function Ls(e){var t=31&e[1];return t<<=8,t|=e[2]}function Ds(e){return!!(64&e[1])}function Os(e){var t=0;return 1<(48&e[3])>>>4&&(t+=e[4]+1),t}function Rs(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}}function Ms(e,t){var i=0<=(i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9])?i:0;return(16&e[t+5])>>4?i+20:i+10}function Ns(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1
vendor: 1,864 bytes, line 1
1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:Ns(e,t+=Ms(e,t))}function Us(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var n={parseType:function(e,t){e=Ls(e);return 0===e?"pat":e===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ds(e),i=4+Os(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ds(e),n=4+Os(e);if(i&&(n+=e[n]+1),1&e[n+5]){for(var r=3+((15&e[n+1])<<8|e[n+2])-4,a=12+((15&e[n+10])<<8|e[n+11]);a<r;){var s=n+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:Ds,parsePesType:function(e,t){switch(t[Ls(e)]){case Is:return"video";case As:return"audio";case xs:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Ds(e))return null;var t=4+Os(e);if(t>=e.byteLength)return null;var i=null,n=e[t+7];return 192&n&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+Os(e),i=e.subarray(t),n=0,r=0,a=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}for(r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===Rs(31&i[r+3])&&(a=!0);n++,1!==i[n]&&n<i.length;);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Rs(31&i[r+3])&&(a=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&3<i.byteLength&&"slice_layer_without_partitioning_rbsp_idr"===Rs(31&i[r+3])&&(a=!0),a}},Bs=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ar={isLikelyAacData:function(e){var t=Ns(e,0);return e.length>
1=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:Ms,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Bs[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n=10;64&e[5]&&(n+=4,n+=Us(e.subarray(10,14)));do{if((t=Us(e.subarray(n+4,n+8)))<1)return null;if("PRIV"===String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3])){i=e.subarray(n+10,n+t+10);for(var r=0;r<i.byteLength;r++)if(0===i[r]){if("com.apple.streaming.transportStreamTimestamp"!==unescape(function(e,t,i){for(var n="",r=t;r<i;r++)n+="%"+("00"+e[r].toString(16)).slice(-2);return n}(i,0,r)))break;var a=i.subarray(r+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}}}while(n+=10,(n+=t)<e.byteLength);return null}},e=9e4,Fs=e,js=Ps,Vs={};Vs.ts=n,Vs.aac=ar;function Hs(e,t,i){for(var n,r,a,s,o=0,u=zs,l=!1;u<=e.byteLength;)if(71!==e[o]||71!==e[u]&&u!==e.byteLength)o++,u++;else{if(n=e.subarray(o,u),"pes"===Vs.ts.parseType(n,t.pid)&&(r=Vs.ts.parsePesType(n,t.table),a=Vs.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(s=Vs.ts.parsePesTime(n))&&(s.type="audio",i.audio.push(s),l=!0)),l)break;o+=zs,u+=zs}for(o=(u=e.byteLength)-zs,l=!1;0<=o;)if(71!==e[o]||71!==e[u]&&u!==e.byteLength)o--,u--;else{if(n=e.subarray(o,u),"pes"===Vs.ts.parseType(n,t.pid)&&(r=Vs.ts.parsePesType(n,t.table),a=Vs.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(s=Vs.ts.parsePesTime(n))&&(s.type="audio",i.audio.push(s),l=!0)),l)break;o-=zs,u-=zs}}function qs(e){var t,i={pid:null,table:null},n={};for(t in!function(e,t){for(var i,n=0,r=zs;r<e.byteLength;)if(71!==e[n]||71!==e[r])n++,r++;else{switch(i=e.subarray(n,r),Vs.ts.parseType(i,t.pid)){case"pat":t.pid||(t.pid=Vs.ts.parsePat(i));break;case"pmt":t.table||(t.table=Vs.ts.parsePmt(i))}if(t.pid&&t.table)return;n+=zs,r+=zs}}(e,i),i.table)if(i.table.hasOwnProperty(t))switch(i.table[t]){case Is:n.video=[],function(e,t,i){for(var n,r,a,s,o,u,l,c,d,h=0,p=zs,f=!1,m={data:[],size:0};p<e.byteLength;)if(71!==e[h]||71!==e[p])h++,p++;else{if(n=e.subarray(h,p),r=Vs.ts.parseType(n,t.pid),"pes"===r)if(a=Vs.ts.parsePesType(n,t.table),s=Vs.ts.parsePayloadUnitStartIndicator(n),"video"===a&&(s&&!f&&(o=Vs.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),f=!0),!i.firstKeyFrame)){if(s&&0!==m.size){for(u=new Uint8Array(m.size),l=0;m.data.length;)c=m.data.shift(),u.set(c,l),l+=c.byteLength;Vs.ts.videoPacketContainsKeyFrame(u)&&((d=Vs.ts.parsePesTime(u))?(i.firstKeyFrame=d,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")),m.size=0}m.data.push(n),m.size+=n.byteLength}if(f&&i.firstKeyFrame)break;h+=zs,p+=zs}for(h=(p=e.byteLength)-zs,f=!1;0<=h;)if(71!==e[h]||71!==e[p])h--,p--;else{if(n=e.subarray(h,p),"pes"===(r=Vs.ts.parseType(n,t.pid))&&(a=Vs.ts.parsePesType(n,t.table),s=Vs.ts.parsePayloadUnitStartIndicator(n),"video"===a&&s&&(o=Vs.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),f=!0)),f)break;h-=zs,p-=zs}}(e,i,n),0===n.video.length&&delete n.video;break;case As:n.audio=[],Hs(e,i,n),0===n.audio.length&&delete n.audio}return n}var Ws=e,zs=188,Gs=function(e,t){var i,n,r=(Vs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,a=null,s=0,o=0;3<=e.length-o;){switch(Vs.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((s=Vs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=Vs.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){i=!0;break}if((s=Vs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+s),r=Vs.aac.parseSampleRate(t)),n++,o+=s;break;default:o++}if(i)return null}if(null===r||null===a)return null;var u=Ws/r;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*u,pts:a+1024*n*u}]}}:qs)(e);return r&&(r.audio||r.video)?(e=t,(t=r).audio&&t.audio.length&&(void 0===(i=e)&&(i=t.audio[0].dts),t.audio.forEac
1h(function(e){e.dts=js(e.dts,i),e.pts=js(e.pts,i),e.dtsTime=e.dts/Ws,e.ptsTime=e.pts/Ws})),t.video&&t.video.length&&(void 0===(n=e)&&(n=t.video[0].dts),t.video.forEach(function(e){e.dts=js(e.dts,n),e.pts=js(e.pts,n),e.dtsTime=e.dts/Ws,e.ptsTime=e.pts/Ws}),t.firstKeyFrame&&((t=t.firstKeyFrame).dts=js(t.dts,n),t.pts=js(t.pts,n),t.dtsTime=t.dts/Ws,t.ptsTime=t.dts/Ws)),r):null},$e=function(e){return e>>>0},Xs=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Ks=$e,Ys=function e(t,i){var n,r,a,s=[];if(!i.length)return null;for(n=0;n<t.byteLength;)r=Ks(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),a=Xs(t.subarray(n+4,n+8)),r=1<r?n+r:t.byteLength,a===i[0]&&(1===i.length?s.push(t.subarray(n+8,r)):(a=e(t.subarray(n+8,r),i.slice(1))).length&&(s=s.concat(a))),n=r;return s},$s=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4)},n=1&i.flags[2],r=2&i.flags[2],a=8&i.flags[2],s=16&i.flags[2],o=32&i.flags[2],u=65536&i.flags[0],l=131072&i.flags[0],e=8;return n&&(e+=4,i.baseDataOffset=t.getUint32(12),e+=4),r&&(i.sampleDescriptionIndex=t.getUint32(e),e+=4),a&&(i.defaultSampleDuration=t.getUint32(e),e+=4),s&&(i.defaultSampleSize=t.getUint32(e),e+=4),o&&(i.defaultSampleFlags=t.getUint32(e)),u&&(i.durationIsEmpty=!0),!n&&l&&(i.baseDataOffsetIsMoof=!0),i},Qs=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Js=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),a&&c&&(t={flags:Qs(e.subarray(d,d+4))},d+=4,s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(t.flags=Qs(e.subarray(d,d+4)),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);return i},Zs=$e,eo=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Zs(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Zs(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},to=$e,io=function(e){return("00"+e.toString(16)).slice(-2)},Ke=function(e){return Ys(e,["moov","trak"]).reduce(function(e,t){var i,n,r=Ys(t,["tkhd"])[0];return r?(i=r[0],r=to(r[n=0===i?12:20]<<24|r[1+n]<<16|r[2+n]<<8|r[3+n]),(t=Ys(t,["mdia","mdhd"])[0])?(n=0===t[0]?12:20,e[r]=to(t[n]<<24|t[1+n]<<16|t[2+n]<<8|t[3+n]),e):null):null},{})},n=function(n,e){var e=Ys(e,["moof","traf"]),e=[].concat.apply([],e.map(function(i){return Ys(i,["tfhd"]).map(function(e){var t=to(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),e=n[t]||9e4,t=Ys(i,["tfdt"]).map(function(e){var t=e[0],i=to(e[4]<<24|e[5]<<16|e[6]<<8|e[7]);return 1===t&&(i*=Math.pow(2,32),i+=to(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i})[0];return(t="number"!=typeof t||isNaN(t)?1/0:t)/e})})),e=Math.min.apply(null,e);return isFinite(e)?e:0},ar=function(e,t){var i,n,r=Ys(t,["moof","traf"]),a=0,s=0;return r&&r.length&&(i=Ys(r[0],["tfhd"])[0],t=Ys(r[0],["trun"])[0],r=Ys(r[0],["tfdt"])[0],i&&(n=$s(i).trackId),r&&(a=eo(r).baseMediaDecodeTime),!t||(t=Js(t)).samples&&t.samples.length&&(s=t.samples[0].compositionTimeOffset||0)),(a+s)/(e[n]||9e4)},e=function(e){var e=Ys(e,["moov","trak"]),n=[];return e.forEach(function(e){var t=Ys(e,["mdia","hdlr"]),i=Ys(e,["tkhd"]);t.forEach(function(e,t){e=Xs(e.subarray(8,12)),t=i[t];"vide"===e&&(t=0===(t=new DataView(t.buffer,t.byteOffset,t.byteLength)).getUint8(0)?t.getUint32(12):t.getUint32(20),n.push(t))})}),n},no=function(e){var t=0===e[0]?12:20;return to(e[t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])},$e=function(e){var e=Ys(e,["moov","trak"]),s=[];return e.forEach(function(e){var t={},i=Ys(e,["tkhd"])[0];i&&(i=(n=new DataView(i.buffer,i.byteOffset,i.byteLength)).getUint8(0),t.id=0===i?n.getUint32(12):n.getUint32(20));var n=Ys(e,["mdia","hdlr"])[0];n&&(a=Xs(n.subarray(8,12)),t.type="vide"===a?"video":"soun"===a?"audio":a);var r,a=Ys(e,["mdia","minf","stbl","stsd"])[0];a&&(a=a.subarray(8),t.codec=Xs(a.subarray(4,8)),(a=Ys(a,[t.codec])[0])&&(/^[a-z]vc[1-9]$/i.test(t.codec)?(r=a.subarray(78),"avcC"===Xs(r.subarray(4,8))&&11<r.length?(t.codec+=".",t.codec+=io(r[9]),t.codec+=io(r[10]),t.codec+=io(r[11])):t.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(t.codec)?(r=a.subarray(28),"esds"===Xs(r.subarray(4,8))&&20<r.length&&0!==r[19]?(t.codec+="."+io(r[19]),t.codec+="."+io(r[20]>>>2&63).replace(/^0/,"")):t.codec="mp4a.40.2"):t.codec=t.codec.toLowerCase()));e=Ys(e,["mdia","mdhd"])[0];e&&(t.timescale=no(e)),s.push(t)}),s}
1,ro=n,ao=$e,ar=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})}function i(e){return e.map(r)}function a(e){void 0===e&&(e="");var e=e.split(","),a={},t=[];return e.forEach(function(n){var r;n=n.trim(),d.forEach(function(e){var t,i=c[e].exec(n.toLowerCase());!i||i.length<=1||(r=e,t=n.substring(0,i[1].length),i=n.replace(t,""),a[e]={type:t,details:i})}),r||t.push(n)}),t.length&&(a.unknown=t),a}function s(e){return void 0===e&&(e=""),c.audio.test(e.trim().toLowerCase())}function o(e){return void 0===e&&(e=""),c.text.test(e.trim().toLowerCase())}function n(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map(function(e){return r(e.trim())}),i="video";1===t.length&&s(t[0])?i="audio":1===t.length&&o(t[0])&&(i="application");var n="mp4";return t.every(function(e){return c.mp4.test(e)})?n="mp4":t.every(function(e){return c.webm.test(e)})?n="webm":t.every(function(e){return c.ogg.test(e)})&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}}var u,l=(u=p)&&"object"==typeof u&&"default"in u?u.default:u,c={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)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},d=["video","audio","text"],h=["Video","Audio","Text"];t.DEFAULT_AUDIO_CODEC="mp4a.40.2",t.DEFAULT_VIDEO_CODEC="avc1.4d400d",t.browserSupportsCodec=function(e){return void 0===e&&(e=""),l.MediaSource&&l.MediaSource.isTypeSupported&&l.MediaSource.isTypeSupported(n(e))||!1},t.codecsFromDefault=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i,n=e.mediaGroups.AUDIO[t];if(!n)return null;for(i in n){var r=n[i];if(r.default&&r.playlists)return a(r.playlists[0].attributes.CODECS)}return null},t.getMimeForCodec=n,t.isAudioCodec=s,t.isTextCodec=o,t.isVideoCodec=function(e){return void 0===e&&(e=""),c.video.test(e.trim().toLowerCase())},t.mapLegacyAvcCodecs=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return i([e])[0]})},t.muxerSupportsCodec=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every(function(e){e=e.trim();for(var t=0;t<h.length;t++)if(c["muxer"+h[t]].test(e))return!0;return!1})},t.parseCodecs=a,t.translateLegacyCodec=r,t.translateLegacyCodecs=i});t(ar);function so(e,t,i){return e&&i&&i.responseURL&&t!==i.responseURL?i.responseURL:t}function oo(e,t){return e+"-"+t}function uo(e){var t=e.manifestString,i=void 0===(i=e.customTagParsers)?[]:i,e=void 0===(e=e.customTagMappers)?[]:e,n=new vr;return i.forEach(function(e){return n.addParser(e)}),e.forEach(function(e){return n.addTagMapper(e)}),n.push(t),n.end(),n.manifest}function lo(r,a){["AUDIO","SUBTITLES"].forEach(function(e){for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var n=r.mediaGroups[e][t][i];a(n,e,t,i)}})}function co(e){var t=e.playlist,i=e.uri,e=e.id;t.id=e,i&&(t.uri=i),t.attributes=t.attributes||{}}function ho(r,e){r.uri=e;for(var t,i,n=0;n<r.playlists.length;n++)r.playlists[n].uri||(t="placeholder-uri-"+n,r.playlists[n].uri=t);lo(r,function(e,t,i,n){e.playlists&&e.playlists.length&&!e.playlists[0].uri&&(n=oo(0,i="placeholder-uri-"+t+"-"+i+"-"+n),e.playlists[0].uri=i,e.playlists[0].id=n,r.playlists[n]=e.playlists[0],r.playlists[i]=e.playlists[0])}),function(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];co({playlist:i,id:oo(t,i.uri)}),i.resolvedUri=gu(e.uri,i.uri),e.playlists[i.id]=i,(e.playlists[i.uri]=i).attributes.BANDWIDTH||yu.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(r),lo(i=r,function(e){e.uri&&(e.resolvedUri=gu(i.uri,e.uri))})}function po(e,t){e.resolvedUri||(e.resolvedUri=gu(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=gu(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=gu(t,e.map.uri))}function fo(e,t){var i=vu(e,{});if(!(e=i.playlists[t.id]))return null;if(e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence)return null;var n=vu(e,t);e.segments&&(n.segments=function(e,t,i){var n=t.slice();i=i||0;for(var r=Math.min(e.length,t.length+i),a=i;a<r;a++)n[a-i]=vu(e[a],n[a-i]);return n}(e.segments,t.segments,t.mediaSequence-e.mediaSequence)),n.segments.forEac
1h(function(e){po(e,n.resolvedUri)});for(var r=0;r<i.playlists.length;r++)i.playlists[r].id===t.id&&(i.playlists[r]=n);return i.playlists[t.id]=n,i.playlists[t.uri]=n,i}function mo(e,t){var i=e.segments[e.segments.length-1];return e=t&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)}function go(e,t){var i,n=[];if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return ir.createTimeRanges(n)}function yo(e,i){return go(e,function(e,t){return e-.1<=i&&i<=t+.1})}function vo(e,t){return go(e,function(e){return t<=e-bu})}function _o(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")}function bo(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}function To(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var n=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(void 0!==(r=e.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t);return n.precise?n.result:(t=function(e,t){for(var i,n=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(i=e.segments[r]).start)return{result:i.start-n,precise:!0};if(n+=i.duration,void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?t.result:n.result+i}function So(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return or.Infinity}return To(e,t,i)}function ko(e,t,i){var n,r=0;if(i<t&&(t=(n=[i,t])[0],i=n[1]),t<0){for(var a=t;a<Math.min(0,i);a++)r+=e.targetDuration;t=0}for(var s=t;s<i;s++)r+=e.segments[s].duration;return r}function Co(e,t){if(!e.segments.length)return 0;var i=e.segments.length,n=e.segments[i-1].duration||e.targetDuration,r="number"==typeof t?t:n+2*e.targetDuration;if(0===r)return i;for(var a=0;i--&&!(r<=(a+=e.segments[i].duration)););return Math.max(0,i)}function wo(e,t,i,n){return e&&e.segments?e.endList?So(e):null===t?null:(t=t||0,n=i?Co(e,n):e.segments.length,To(e,e.mediaSequence+n,t)):null}function Eo(e){return e.excludeUntil&&e.excludeUntil>Date.now()}function Io(e){return e.excludeUntil&&e.excludeUntil===1/0}function Ao(e){var t=Eo(e);return!e.disabled&&!t}function xo(e,t){return t.attributes&&t.attributes[e]}function Po(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!Ao(e)&&(e.attributes.BANDWIDTH||0)<i}).length}function Lo(e,t,i,n){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),n(t,e)}function Do(){return function e(t,i){t=Cu({timeout:45e3},t);var n=e.beforeRequest||ir.Vhs.xhr.beforeRequest;!n||"function"!=typeof n||(n=n(t))&&(t=n);var r=ku(t,function(e,t){return Lo(r,e,t,i)}),a=r.abort;return r.abort=function(){return r.aborted=!0,a.apply(r,arguments)},r.uri=t.uri,r.requestTime=Date.now(),r}}function Oo(e){var t,i={};return e.byterange&&(i.Range=(t=e.byterange,e=t.offset+t.length-1,"bytes="+t.offset+"-"+e)),i}function Ro(e,t){return e=e.toString(16),"00".substring(0,2-e.length)+e+(t%2?" ":"")}function Mo(e){return 32<=e&&e<126?String.fromCharCode(e):"."}function No(i){var n={};
1return Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t}),n}function Uo(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}function Bo(e){return e.resolvedUri}function Fo(e){for(var t=Array.prototype.slice.call(e),i="",n=0;n<t.length/16;n++)i+=t.slice(16*n,16*n+16).map(Ro).join("")+" "+t.slice(16*n,16*n+16).map(Mo).join("")+"\n";return i}function jo(e){var t=e.playlist,i=e.time,n=void 0===i?void 0:i;if(!(i=e.callback))throw new Error("getProgramTime: callback must be provided");return t&&void 0!==n?(e=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var i,n=0,r=0;r<t.segments.length&&!(e<=(n=(i=t.segments[r]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration));r++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(n<e){if(e>n+.25*a.duration)return null;i=a}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(n,t))?"estimate"===e.type?i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:e.estimatedStart}):(t={mediaSeconds:n},(e=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*i)}(n,e.segment))&&(t.programDateTime=e.toISOString()),i(null,t)):i({message:"valid programTime was not found"}):i({message:"getProgramTime: playlist and time must be provided"})}function Vo(e){var t=e.programTime,i=e.playlist,n=e.retryCount,r=void 0===n?2:n,a=e.seekTo,s=e.pauseAfterSeek,o=void 0===s||s,u=e.tech,l=e.callback;if(!l)throw new Error("seekToProgramTime: callback must be provided");return void 0!==t&&i&&a?i.endList||u.hasStarted_?function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(i)?(n=function(e,t){var i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;if(i<(r=t.segments[0]).dateTimeObject)return null;for(var n=0;n<t.segments.length-1;n++){var r=t.segments[n];if(i<t.segments[n+1].dateTimeObject)break}var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,a=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return new Date(o.getTime()+1e3*a)<i?null:(o<i&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Su.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(t,i))?(s=n.segment,e=function(e,t){var i,n;try{i=new Date(e),n=new Date(t)}catch(e){}var r=i.getTime();return(n.getTime()-r)/1e3}(s.dateTimeObject,t),"estimate"===n.type?0===r?l({message:t+" is not buffered yet. Try again"}):(a(n.estimatedStart+e),void u.one("seeked",function(){Vo({programTime:t,playlist:i,retryCount:r-1,seekTo:a,pauseAfterSeek:o,tech:u,callback:l})})):(e=s.start+e,u.one("seeked",function(){return l(null,u.currentTime())}),o&&u.pause(),void a(e))):l({message:t+" was not found in the stream"}):l({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri}):l({message:"player must be playing a live stream to start buffering"}):l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"})}function Ho(e,t){if(4===e.readyState)return t()}function qo(e,t,r){function n(e,t,i,n){return t.abort(),o=!0,r(e,t,i,n)}function i(e,t){if(!o){if(e)return n(e,t,"",s);var i=t.responseText.substring(s&&s.byteLength||0,t.responseText.length);if(s=Cs(s,ws(i,!0)),a=a||Ss(s),s.length<10||a&&s.length<a+2)return Ho(t,function(){return n(e,t,"",s)});i=Ts(s);return"ts"===i&&s.length<188||!i&&s.length<376?Ho(t,function(){return n(e,t,"",s)}):n(null,t,i,s)}}var a,s=[],o=!1,u=t({uri:e,beforeSend:function(t){t.overrideMimeType("text/plain;
1 charset=x-user-defined"),t.addEventListener("progress",function(e){e.total,e.loaded;return Lo(t,null,{statusCode:t.status},i)})}},function(e,t){return Lo(u,e,t,i)});return u}function Wo(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t}function zo(e,t){var i,n={};for(i in e){var r=e[i].sidx;if(r){var a=Wo(r);if(!t[a])break;var s=t[a].sidxInfo;s=s,r=r,(Boolean(!s.map&&!r.map)||Boolean(s.map&&r.map&&s.map.byterange.offset===r.map.byterange.offset&&s.map.byterange.length===r.map.byterange.length))&&s.uri===r.uri&&s.byterange.offset===r.byterange.offset&&s.byterange.length===r.byterange.length&&(n[a]=t[a])}}return n}function Go(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer}function Xo(e){var c=e.transmuxer,t=e.bytes,i=e.audioAppendStart,n=e.gopsToAlignWith,r=e.isPartial,a=e.remux,d=e.onData,h=e.onTrackInfo,p=e.onAudioTimingInfo,f=e.onVideoTimingInfo,m=e.onVideoSegmentTimingInfo,g=e.onAudioSegmentTimingInfo,y=e.onId3,v=e.onCaptions,_=e.onDone,b={isPartial:r,buffer:[]};c.onmessage=function(e){var t,i,n,r,a,s,o,u,l;au&&("data"===e.data.action&&(i=d,n=(u=(t=e).data.segment).type,l=u.initSegment,r=u.captions,a=u.captionStreams,s=u.metadata,o=u.videoFrameDtsTime,u=u.videoFramePtsTime,b.buffer.push({captions:r,captionStreams:a,metadata:s}),t=t.data.segment.boxes||{data:t.data.segment.data},l={type:n,data:new Uint8Array(t.data,t.data.byteOffset,t.data.byteLength),initSegment:new Uint8Array(l.data,l.byteOffset,l.byteLength)},void 0!==o&&(l.videoFrameDtsTime=o),void 0!==u&&(l.videoFramePtsTime=u),i(l)),"trackinfo"===e.data.action&&h(e.data.trackInfo),"gopInfo"===e.data.action&&(b.gopInfo=e.data.gopInfo),"audioTimingInfo"===e.data.action&&p(e.data.audioTimingInfo),"videoTimingInfo"===e.data.action&&f(e.data.videoTimingInfo),"videoSegmentTimingInfo"===e.data.action&&m(e.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===e.data.action&&g(e.data.audioSegmentTimingInfo),"id3Frame"===e.data.action&&y([e.data.id3Frame],e.data.id3Frame.dispatchType),"caption"===e.data.action&&v(e.data.caption),"transmuxed"===e.data.type&&(c.onmessage=null,e=(l={transmuxedData:b,callback:_}).transmuxedData,l=l.callback,e.buffer=[],l(e),xu()))},i&&c.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(n)&&c.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),void 0!==a&&c.postMessage({action:"setRemux",remux:a}),t.byteLength&&(n=t instanceof ArrayBuffer?t:t.buffer,a=t instanceof ArrayBuffer?0:t.byteOffset,c.postMessage({action:"push",data:n,byteOffset:a,byteLength:t.byteLength},[n])),c.postMessage({action:r?"partialFlush":"flush"})}function Ko(e,t){e.postMessage({action:t}),xu()}function Yo(e,t){au?Au.push(Ko.bind(null,t,e)):Ko(t,au=e)}function $o(e){au?Au.push(e):Xo(au=e)}function Qo(e){e.forEach(function(e){e.abort()})}function Jo(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ru,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Mu,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Ou,xhr:t}:null}function Zo(e){var n=e.segment,r=e.finishProcessingFn,a=e.responseType;return function(e,t){var i=t.response,e=Jo(e,t);if(e)return r(e,n);e="arraybuffer"!==a&&t.responseText?Go(t.responseText.substring(n.lastReachedChar||0)):t.response;return 0===i.byteLength?r({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:Ou,xhr:t},n):(n.stats={bandwidth:(t=t).bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0},n.key?n.encryptedBytes=new Uint8Array(e):n.bytes=new Uint8Array(e),r(null,n))}}function eu(e){var i=e.segment,t=e.bytes,n=e.isPartial,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,d=e.doneFn,e=i.map&&i.map.tracks||{},h=Boolean(e.audio&&e.video),p=a.bind(null,i,"audio","start"),f=a.bind(null,i,"audio","end"),m=a.bind(null,i,"video","start"),g=a.bind(null,i,"video","end");n||i.lastReachedChar||(a=function(e,t){e=Gs(e,t*Fs);if(!e)return null;t={hasVideo:e.video&&2===e.video.length||!1,hasAudio:e.audio&&2===e.audio.length||!1};return t.hasVideo&&(t.videoStart=e.video[0].ptsTime),t.hasAudio&&(t.audioStart=e.audio[0].ptsTime),t}(t,i.baseStartTime))&&(r(i,{hasAudio:a.hasAudio,hasVideo:a.hasVideo,isMuxed:h}),r=null,a.hasAudio&&!h&&p(a.audioStart),a.hasVideo&&m(a.videoStart),m=p=null),$o({bytes:t,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,isPartial:n,remux:h,onData:function(e){e.type="combined"===e.type?"video":e.type,c(i,e)},onTrackInfo:function(e){r&&(h&&(e.isMuxed=!0),r(i,e))},onAudioTimingInfo:function(e){p&&void 0!==e.start&&(p(e.start),p=null),f&&void 0!==e.end&&f(e.end)},onVideoTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),g&&void 0!==e.end&&g(e.end)},onVideoSegmentTimingInfo:function(e){s(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,t){u(i,e,t)},onCaptions:function(e){l(i,[e])},onDone:function(e){d&&!n&&(e.type="combined"===e.type?"video":e.type,d(null,i,e))}})}function tu(e){var n=e.segment,r=e.bytes,t=e.isPartial,i=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,d=e.doneFn,h=new Uint8Array(r);if(ks(h)){n.isFmp4=!0;var p=n.map.tracks,f={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&"enca"!==p.audio.codec&&(f.audioCodec=p.audio.codec),p.video&&p.video.codec&&"encv"!==p.video.codec&&(f.videoCodec=p.video.codec),p.video&&p.audio&&(f.isMuxed=!0),i(n,f);var m=ro(n.map.timescales,h);f.hasAudio&&!f.isMuxed&&a(n,"audio","start",m),f.hasVideo&&a(n,"video","start",m);var g=function(e){c(n,{data:r,type:f.hasAudio&&!f.isMuxed?"audio":"video"}),e&&e.length&&l(n,e),d(null,n,{})};if(!p.video||!r.byteLength||!n.transmuxer)return g(),0;var y=r instanceof ArrayBuffer?r:r.buffer,e=r instanceof ArrayBuffer?0:r.byteOffset,m=function e(t){var i;"mp4Captions"===t.data.action&&(n.transmuxer.removeEventListener("message",e),i=t.data.data,n.bytes=r=new Uint8Array(i,i.byteOffset||0,i.byteLength),g(t.data.captions))};return n.transmuxer.addEventListener("message",m),n.transmuxer.postMessage({action:"pushMp4Captions",timescales:n.map.timescales,trackIds:[p.video.id],data:y,byteOffset:e,byteLength:r.byteLength},[y]),0}if(n.transmuxer){if(void 0===n.container&&(n.container=Ts(h)),"ts"!==n.container&&"aac"!==n.container)return i(n,{hasAudio:!1,hasVideo:!1}),d(null,n,{}),0;eu({segment:n,bytes:r,isPartial:t,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,dataFn:c,doneFn:d})}else d(null,n,{})}function iu(e){var h=e.activeXhrs,p=e.decryptionWorker,f=e.trackInfoFn,m=e.timingInfoFn,g=e.videoSegmentTimingInfoFn,y=e.audioSegmentTimingInfoFn,v=e.id3Fn,_=e.captionsFn,b=e.dataFn,T=e.doneFn,S=0,k=!1;return function(e,t){if(!k){if(e)return k=!0,Qo(h),T(e,t);if((S+=1)===h.length){if(t.endOfAllRequests=Date.now(),t.encryptedBytes)return i=(e={decryptionWorker:p,segment:t,trackInfoFn:f,timingInfoFn:m,videoSegmentTimingInfoFn:g,audioSegmentTimingInfoFn:y,id3Fn:v,captionsFn:_,dataFn:b,doneFn:T}).decryptionWorker,n=e.segment,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,d=e.doneFn,e=function e(t){t.data.source===n.requestId&&(i.removeEventListener("message",e),t=t.data.decrypted,n.bytes=new Uint8Array(t.bytes,t.byteOffset,t.byteLength),tu({segment:n,bytes:n.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,dataFn:c,doneFn:d}))},i.addEventListener("message",e),e=n.key.bytes.slice?n.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(n.key.bytes)),void i.postMessage(No({source:n.requestId,encrypted:n.encryptedBytes,key:e,iv:n.key.iv}),[n.encryptedBytes.buffer,e.buffer]);
1tu({segment:t,bytes:t.bytes,isPartial:!1,trackInfoFn:f,timingInfoFn:m,videoSegmentTimingInfoFn:g,audioSegmentTimingInfoFn:y,id3Fn:v,captionsFn:_,dataFn:b,doneFn:T})}var i,n,r,a,s,o,u,l,c,d}}}function nu(e){var n=e.segment,r=e.progressFn,a=e.trackInfoFn,s=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,u=e.audioSegmentTimingInfoFn,l=e.id3Fn,c=e.captionsFn,d=e.dataFn,h=e.handlePartialData;return function(e){var t,i=e.target;if(!i.aborted)return h&&!n.key&&i.responseText&&8<=i.responseText.length&&(t=Go(i.responseText.substring(n.lastReachedChar||0)),!n.lastReachedChar&&ks(new Uint8Array(t))||(n.lastReachedChar=i.responseText.length,tu({segment:n,bytes:t,isPartial:!0,trackInfoFn:a,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:l,captionsFn:c,dataFn:d}))),n.stats=ir.mergeOptions(n.stats,(t=(i=e).target,(t={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0}).bytesReceived=i.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3),t)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),r(e,n)}}function ru(e){var n,r,t,a,s,i=e.xhr,o=e.xhrOptions,u=e.decryptionWorker,l=e.segment,c=e.abortFn,d=e.progressFn,h=e.trackInfoFn,p=e.timingInfoFn,f=e.videoSegmentTimingInfoFn,m=e.audioSegmentTimingInfoFn,g=e.id3Fn,y=e.captionsFn,v=e.dataFn,_=e.doneFn,e=e.handlePartialData,b=[],_=iu({activeXhrs:b,decryptionWorker:u,trackInfoFn:h,timingInfoFn:p,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:m,id3Fn:g,captionsFn:y,dataFn:v,doneFn:_});l.key&&!l.key.bytes&&(t=i(ir.mergeOptions(o,{uri:l.key.resolvedUri,responseType:"arraybuffer"}),(n=l,r=_,function(e,t){var i=t.response,e=Jo(e,t);if(e)return r(e,n);if(16!==i.byteLength)return r({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:Ou,xhr:t},n);i=new DataView(i);return n.key.bytes=new Uint32Array([i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12)]),r(null,n)})),b.push(t)),l.map&&!l.map.bytes&&(t=i(ir.mergeOptions(o,{uri:l.map.resolvedUri,responseType:"arraybuffer",headers:Oo(l.map)}),(a=(t={segment:l,finishProcessingFn:_}).segment,s=t.finishProcessingFn,function(e,t){var i=t.response,e=Jo(e,t);if(e)return s(e,a);if(0===i.byteLength)return s({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:Ou,xhr:t},a);a.map.bytes=new Uint8Array(t.response);i=Ts(a.map.bytes);return"mp4"!==i?s({status:t.status,message:"Found unsupported "+(i||"unknown")+" container for initialization segment at URL: "+t.uri,code:Ou,internal:!0,xhr:t},a):(ao(a.map.bytes).forEach(function(e){a.map.tracks=a.map.tracks||{},a.map.tracks[e.type]||"number"==typeof(a.map.tracks[e.type]=e).id&&e.timescale&&(a.map.timescales=a.map.timescales||{},a.map.timescales[e.id]=e.timescale)}),s(null,a))})),b.push(t)),o=ir.mergeOptions(o,{uri:l.resolvedUri,responseType:"arraybuffer",headers:Oo(l)}),e&&(o.responseType="text",o.beforeSend=function(e){e.overrideMimeType("text/plain; charset=x-user-defined")}),(o=i(o,Zo({segment:l,finishProcessingFn:_,responseType:o.responseType}))).addEventListener("progress",nu({segment:l,progressFn:d,trackInfoFn:h,timingInfoFn:p,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:m,id3Fn:g,captionsFn:y,dataFn:v,handlePartialData:e})),b.push(o);var T={};return b.forEach(function(e){var t,i;e.addEventListener("loadend",(t=(e={loadendState:T,abortFn:c}).loadendState,i=e.abortFn,function(e){e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}))}),function(){return Qo(b)}}var au,su=ar.DEFAULT_AUDIO_CODEC,ou=ar.DEFAULT_VIDEO_CODEC,uu=ar.browserSupportsCodec,lu=ar.codecsFromDefault,cu=ar.getMimeForCodec,du=ar.isAudioCodec,hu=(ar.isTextCodec,ar.isVideoCodec),pu=(ar.mapLegacyAvcCodecs,ar.muxerSupportsCodec),fu=ar.parseCodecs,mu=ar.translateLegacyCodec,gu=(ar.translateLegacyCodecs,dr),yu=ir.log,vu=ir.mergeOptions,e=ir.EventTarget,_u=function(a){function e(e,t,i){var n;if(void 0===i&&(i={}),n=a.call(this)||this,!e)throw new Error("A non-empty playlist URL or object is required");var r=i.withCredentials,r=void 0!==r&&r,i=i.handleManifestRedirects,i=void 0!==i&&i;n.src=e,n.vhs_=t,n.withCredentials=r,n.handleManifestRedirects=i;t=t.options_;return n.customTagParsers=t&&t.customTagParsers||[],n.customTagMappers=t&&t.customTagMappers||[],n.state="HAVE_NOTHING",n.on("mediaupdatetimeout",function(){"HAVE_METADATA"===n.state&&(n.state="HAVE_CURRENT_METADATA",n.request=n.vhs_.xhr({uri:gu(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(e,t){if(n.request)return e?n.playlistRequestError(n.request,n.media(),"HAVE_METADATA"):void n.haveMetadata({playlistString:n.request.responseText,url:n.media().uri,id:n.media().id})}))}),n}rr(e,a);var t=e.prototype;return t.playlistRequestError=function(e,t,i){var n=t.uri,t=t.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+n+".",responseText:e.responseText,code:500<=e.status?4:2},this.trigger("error")},t.haveMetadata=function(e){var t=this,i=e.playlistString,n=e.playlistOb
1ject,r=e.url,e=e.id;this.request=null,this.state="HAVE_METADATA";i=n||uo({manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});i.lastRequest=Date.now(),co({playlist:i,uri:r,id:e});r=fo(this.master,i);this.targetDuration=i.targetDuration,r?(this.master=r,this.media_=this.master.playlists[e]):this.trigger("playlistunchanged"),this.media().endList||(or.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=or.setTimeout(function(){t.trigger("mediaupdatetimeout")},mo(this.media(),!!r))),this.trigger("loadedplaylist")},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),or.clearTimeout(this.mediaUpdateTimeout),or.clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())},t.media=function(i,e){var n=this;if(!i)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof i){if(!this.master.playlists[i])throw new Error("Unknown playlist URI: "+i);i=this.master.playlists[i]}if(or.clearTimeout(this.finalRenditionTimeout),e){var t=i.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=or.setTimeout(this.media.bind(this,i,!1),t)}else{var r=this.state,t=!this.media_||i.id!==this.media_.id;if(this.master.playlists[i.id].endList||i.endList&&i.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=i,void(t&&(this.trigger("mediachanging"),"HAVE_MASTER"===r?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(t){if(this.state="SWITCHING_MEDIA",this.request){if(i.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:i.resolvedUri,withCredentials:this.withCredentials},function(e,t){if(n.request){if(i.lastRequest=Date.now(),i.resolvedUri=so(n.handleManifestRedirects,i.resolvedUri,t),e)return n.playlistRequestError(n.request,i,r);n.haveMetadata({playlistString:t.responseText,url:i.uri,id:i.id}),"HAVE_MASTER"===r?n.trigger("loadedmetadata"):n.trigger("mediachange")}})}}},t.pause=function(){this.stopRequest(),or.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},t.load=function(e){var t=this;or.clearTimeout(this.mediaUpdateTimeout);var i=this.media();e?(e=i?i.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=or.setTimeout(function(){return t.load()},e)):this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},t.start=function(){var i=this;
1if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=or.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){i.setupInitialPlaylist(i.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(e,t){if(i.request){if(i.request=null,e)return i.error={status:t.status,message:"HLS playlist request error at URL: "+i.src+".",responseText:t.responseText,code:2},"HAVE_NOTHING"===i.state&&(i.started=!1),i.trigger("error");i.src=so(i.handleManifestRedirects,i.src,t);t=uo({manifestString:t.responseText,customTagParsers:i.customTagParsers,customTagMappers:i.customTagMappers});i.setupInitialPlaylist(t)}})},t.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,ho(this.master,this.srcUri()),e.playlists.forEach(function(t){t.segments&&t.segments.forEach(function(e){po(e,t.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t,i,n,r=this.srcUri()||or.location.href;this.master=(i=oo(0,t=r),(n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:or.location.href,resolvedUri:or.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]}).playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n),this.haveMetadata({playlistObject:e,url:r,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},e}(e),bu=1/30,Tu=ir.createTimeRange,Su={duration:So,seekable:function(e,t,i){var n=t||0,i=wo(e,t,!0,i);return null===i?Tu():Tu(n,i)},safeLiveIndex:Co,getMediaInfoForTime:function(e,t,i,n){var r,a=e.segments.length,s=t-n;if(s<0){if(0<i)for(r=i-1;0<=r;r--)if(0<(s+=e.segments[r].duration+bu))return{mediaIndex:r,startTime:n-ko(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;r<a;r++)if((s-=e.segments[r].duration+bu)<0)return{mediaIndex:r,startTime:n+ko(e,i,r)};return{mediaIndex:a-1,startTime:t}},isEnabled:Ao,isDisabled:function(e){return e.disabled},isBlacklisted:Eo,isIncompatible:Io,playlistEnd:wo,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:xo,estimateSegmentRequestTime:function(e,t,i,n){return void 0===n&&(n=0),xo("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:Po},ku=ir.xhr,Cu=ir.mergeOptions,$e=Object.freeze({__proto__:null,createTransferableMessage:No,initSegmentId:Uo,segmentKeyId:Bo,hexDump:Fo,tagDump:function(e){e=e.bytes;return Fo(e)},textRanges:function(e){for(var t,i,n="",r=0;r<e.length;r++)n+=(i=r,(t=e).start(i)+"-"+t.end(i)+" ");return n}}),ar=ir.EventTarget,wu=ir.mergeOptions,Eu=function(a){function e(e,t,i,n){var r;void 0===i&&(i={}),(r=a.call(this)||this).masterPlaylistLoader_=n||nr(r),n||(r.isMaster_=!0);n=i.withCredentials,n=void 0!==n&&n,i=i.handleManifestRedirects,i=void 0!==i&&i;if(r.vhs_=t,r.withCredentials=n,r.handleManifestRedirects=i,!e)throw new Error("A non-empty playlist URL or object is required");return r.on("minimumUpdatePeriod",function(){r.refreshXml_()}),r.on("mediaupdatetimeout",function(){r.refreshMedia_(r.media().id)}),r.state="HAVE_NOTHING",r.loadedPlaylists_={},r.isMaster_?(r.masterPlaylistLoader_.srcUrl=e,r.masterPlaylistLoader_.sidxMapping_={}):r.childPlaylist_=e,r}rr(e,a);var t=e.prototype;return t.requestErrored_=function(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)},t.addSidxSegments_=function(a,i,n){var s,r,o,u=this,l=a.sidx&&Wo(a.sidx);a.sidx&&l&&!this.masterPlaylistLoader_.sidxMapping_[l]?(s=so(this.handleManifestRedirects,a.sidx.resolvedUri),(r=this.masterPlaylistLoader_.sidxMapping_)[l]={sidxInfo:a.sidx},o=function(e,t){if(!u.requestErrored_(e,t,i)){t=bs(Es(t.response).subarray(8));return r[l].sidx=t,vs(a,t,a.sidx.resolvedUri),n(!0)}},this.request=qo(s,this.vhs_.xhr,function(e,t,i,n){if(e)return o(e,t);if(!i||"mp4"!==i)return o({status:t.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+s,response:"",playlist:a,internal:!0,blackl
1istDuration:1/0,code:2},t);var r=a.sidx.byterange,i=r.offset,r=r.length;if(n.length>=r+i)return o(e,{response:n.subarray(i,i+r),status:t.status,uri:t.uri});u.request=u.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:Oo({byterange:a.sidx.byterange})},o)})):this.mediaRequest_=or.setTimeout(function(){return n(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},or.clearTimeout(this.minimumUpdatePeriodTimeout_),or.clearTimeout(this.mediaRequest_),or.clearTimeout(this.mediaUpdateTimeout),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())},t.media=function(t){var i=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof t){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.masterPlaylistLoader_.master.playlists[t]}var e=!this.media_||t.id!==this.media_.id;if(e&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state="HAVE_METADATA",this.media_=t,void(e&&(this.trigger("mediachanging"),this.trigger("mediachange")));e&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,n,function(e){i.haveMetadata({startingState:n,playlist:t})}))},t.haveMetadata=function(e){var t=e.startingState,e=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[e.id]=e,this.mediaRequest_=null,this.refreshMedia_(e.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},t.pause=function(){this.stopRequest(),or.clearTimeout(this.mediaUpdateTimeout),or.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var t=this;or.clearTimeout(this.mediaUpdateTimeout),or.clearTimeout(this.minimumUpdatePeriodTimeout_);var i=this.media();e?(e=i?i.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=or.setTimeout(function(){return t.load()},e)):this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},t.start=function(){var i=this;this.started=!0,this.isMaster_?this.requestMaster_(function(e,t){i.haveMaster_(),i.hasPendingRequest()||i.media_||i.media(i.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=or.setTimeout(function(){return i.haveMaster_()},0)},t.requestMaster_=function(n){var r=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(e,t){if(!r.requestErrored_(e,t)){var i=t.responseText!==r.masterPlaylistLoader_.masterXml_;return r.masterPlaylistLoader_.masterXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?r.masterLoaded_=Date.parse(t.responseHeaders.date):r.masterLoaded_=Date.now(),r.masterPlaylistLoader_.srcUrl=so(r.handleManifestRedirects,r.masterPlaylistLoader_.srcUrl,t),i?(r.handleMaster_(),void r.syncClientServerClock_(function(){return n(t,i)})):n(t,i)}"HAVE_NOTHING"===r.state&&(r.started=!1)})},t.syncClientServerClock_=function(i){var n=this,r=as(this.masterPlaylistLoader_.masterXml_);return null===r?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),i()):"DIRECT"===r.method?(this.masterPlaylistLoader_.clientOffset_=r.value-Date.now(),i()):void(this.request=this.vhs_.xhr({uri:gu(this.masterPlaylistLoader_.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},function(e,t){if(n.request){if(e)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),i();t="HEAD"===r.method?t.responseHeaders&&t.responseHeaders.date?Date.parse(t.responseHeaders.date):n.masterLoaded_:Date.parse(t.responseText);n.masterPlaylistLoader_.clientOffset_=t-Date.now(),i()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e,t,t=(n={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},e=n.masterXml,i=n.srcUrl,t=n.clientOffset,n=n.sidxMapping,n=rs(e,{manifestUri:i,clientOffset:t,sidxMapping:n}),ho(n,i),n),i=this.masterPlaylistLoader_.master;i&&(t=function(e,t,i){for(var a=!0,s=wu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),n=0;n<t.playlists.length;n++){var r,o=t.playlists[n];
1o.sidx&&(r=Wo(o.sidx),i&&i[r]&&vs(o,i[r].sidx,o.sidx.resolvedUri));o=fo(s,o);o&&(s=o,a=!1)}return lo(t,function(e,t,i,n){var r;e.playlists&&e.playlists.length&&(r=e.playlists[0].id,(e=fo(s,e.playlists[0]))&&((s=e).mediaGroups[t][i][n].playlists[0]=s.playlists[r],a=!1))}),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(a=!1),a?null:s}(i,t,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=t||i;var n=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return n&&n!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=n),(!i||t&&i.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(t)},t.updateMinimumUpdatePeriodTimeout_=function(){var t=this;or.clearTimeout(this.minimumUpdatePeriodTimeout_);function i(e){t.minimumUpdatePeriodTimeout_=or.setTimeout(function(){t.trigger("minimumUpdatePeriod"),i(e)},e)}var e=this.masterPlaylistLoader_.master&&this.masterPlaylistLoader_.master.minimumUpdatePeriod;0<e?i(e):0===e&&(this.media()?i(1e3*this.media().targetDuration):this.one("loadedplaylist",function(){i(1e3*t.media().targetDuration)}))},t.refreshXml_=function(){var i=this;this.requestMaster_(function(e,t){var r,a;t&&(i.media_&&(i.media_=i.masterPlaylistLoader_.master.playlists[i.media_.id]),i.masterPlaylistLoader_.sidxMapping_=(t=i.masterPlaylistLoader_.master,r=i.masterPlaylistLoader_.sidxMapping_,a=zo(t.playlists,r),lo(t,function(e,t,i,n){e.playlists&&e.playlists.length&&(e=e.playlists,a=wu(a,zo(e,r)))}),a),i.addSidxSegments_(i.media(),i.state,function(e){i.refreshMedia_(i.media().id)}))})},t.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,n=!this.media_||this.media_!==i[e];n?this.media_=i[e]:this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=or.setTimeout(function(){t.trigger("mediaupdatetimeout")},mo(this.media(),Boolean(n)))),this.trigger("loadedplaylist")},e}(ar),Iu={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Au=[],xu=function(){au=null,Au.length&&("function"==typeof(au=Au.shift())?au():Xo(au))},Pu=function(e){Yo("reset",e)},Lu=function(){au=null,Au.length=0},Du=function(e){Yo("endTimeline",e)},Ou=2,Ru=-101,Mu=-102,e="undefined"!=typeof window?window:{},Nu="undefined"==typeof Symbol?"__target":Symbol(),Uu="application/javascript",Bu=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,Fu=e.URL||e.webkitURL||Fu&&Fu.msURL,ju=e.Worker;function Vu(a,s){return function(e){var t=this;if(!s)return new ju(a);if(ju&&!e){e=zu(s.toString().replace(/^function.+?{/,"").slice(0,-1));return this[Nu]=new ju(e),i=this[Nu],e=e,i&&e&&(n=i.terminate,i.objURL=e,i.terminate=function(){i.objURL&&Fu.revokeObjectURL(i.objURL),n.call(i)}),this[Nu]}var i,n,r={postMessage:function(e){t.onmessage&&setTimeout(function(){t.onmessage({data:e,target:r})})}};s.call(r),this.postMessage=function(e){setTimeout(function(){r.onmessage({data:e,target:t})})},this.isThisThread=!0}}if(ju){var Hu,qu=zu("self.onmessage = function () {}"),Wu=new Uint8Array(1);try{(Hu=new ju(qu)).postMessage(Wu,[Wu.buffer])}catch(e){ju=null}finally{Fu.revokeObjectURL(qu),Hu&&Hu.terminate()}}function zu(t){try{return Fu.createObjectURL(new Blob([t],{type:Uu}))}catch(e){var i=new Bu;return i.append(t),Fu.createObjectURL(i.getBlob(type))}}function Gu(e,t){return t=t.attributes||{},e&&e.mediaGroups&&e.mediaGroups.AUDIO&&t.AUDIO&&e.mediaGroups.AUDIO[t.AUDIO]}function Xu(e,t){var i=t.attributes||{},n=function(e){e=e.attributes||{};if(e.CODECS)return fu(e.CODECS)}(t)||{};Gu(e,t)&&!n.audio&&!function(e,t){if(!Gu(e,t))return!0;var i,t=t.attributes||{},n=e.mediaGroups.AUDIO[t.AUDIO];for(i in n)if(!n[i].uri&&!n[i].playlists)return!0;return!1}(e,t)&&(r=lu(e,i.AUDIO))&&(n.audio=r.audio);var r={};return n.video&&(r.video=mu(""+n.video.type+n.video.details)),n.audio&&(r.audio=mu(""+n.audio.type+n.audio.details)),n.text&&(r.text=n.text.type),n.unknown&&(r.unknown=n.unknown),r}function Ku(e){return ir.log.debug?ir.log.debug.bind(ir,"VHS:",e+" >"):function(){}}function Yu(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}}function $u(e,t){return(e=e&&or.getComputedStyle(e))?e[t]:""}function Qu(e,n){var r=e.slice();e.sort(function(e,t){var i=n(e,t);return 0===i?r.indexOf(e)-r.indexOf(t):i})}function Ju(e,t){var i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||or.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),i-(n=n||or.Number.MAX_VALUE)}function Zu(e,t,i,n,r){if(e){var a={bandwidth:t,width:i,height:n,limitRenditionByPlayerDimensions:r},s=e.playlists.map(function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,n=e.attributes.BANDWIDTH;return{bandwidth:n||or.Number.MAX_VALUE,width:t,height:i,playlist:e}});Qu(s,function(e,t){return e.bandwidth-t.bandwidth});var o=(s=s.filter(function(e){return!Su.isIncompatible(e.playlist)})).filter(function(e){return Su.isEnabled(e.playlist)});o.length||(o=s.filter(function(e){return!Su.isDisabled(e.playlist)}));var u=o.filter(function(e){return e.bandwidth*Iu.BANDWIDTH_VARIANCE<t}),l=u[u.length-1],e=u.filter(function(e){return e.bandwidth===l.bandwidth})[0];if(!1===r){var c=e||o[0]||s[0];if(c&&c.playlist){r=e?"bandwidthBestRep":"sortedPlaylistReps";return o[0]&&(r="enabledPlaylistReps"),ll("choosing "+Yu(c)+" using "+r+" with options",a),c.playlist}return ll("could not choose a playlist with options",a),null}c=u.filter(function(e){return e.width&&e.height});Qu(c,function(e,t){return e.width-t.width});var d,h,u=c.filter(function(e){return e.width===i&&e.height===n}),l=u[u.length-1],u=u.filter(function(e){return e.bandwidth===l.bandwidth})[0];u||(p=(d=c.filter(function(e){return e.width>i||e.height>n})).filter(function(e){return e.width===d[0].width&&e.height===d[0].height}),l=p[p.length-1],h=p.filter(function(e){return e.bandwidth===l.bandwidth})[0]);var p=h||u||e||o[0]||s[0];if(p&&p.playlist){s="sortedPlaylistReps";return h?s="resolutionPlusOneRep":u?s="resolutionBestRep":e?s="bandwidthBestRep":o[0]&&(s="enabledPlaylistReps"),ll("choosing "+Yu(p)+" using "+s+" with options",a),p.playlist}return ll("could not choose a playlist with options",a),null}}function el(e){var t=e.inbandTextTracks,i=e.metadataArray,r=e.timestampOffset,n=e.videoDuration;if(i){var a=or.WebKitDataCue||or.VTTCue,s=t.metadataTrack_;if(s&&(i.forEach(function(e){var n=e.cueTime+r;
1!("number"!=typeof n||or.isNaN(n)||n<0)&&n<1/0&&e.frames.forEach(function(e){var t,i=new a(n,n,e.value||e.url||e.data||"");i.frame=e,i.value=e,t=i,Object.defineProperties(t.frame,{id:{get:function(){return ir.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return ir.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return ir.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}}),s.addCue(i)})}),s.cues&&s.cues.length)){for(var o=s.cues,u=[],l=0;l<o.length;l++)o[l]&&u.push(o[l]);var c=u.reduce(function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),d=Object.keys(c).sort(function(e,t){return Number(e)-Number(t)});d.forEach(function(e,t){var e=c[e],i=Number(d[t+1])||n;e.forEach(function(e){e.endTime=i})})}}}function tl(e,t,i){var n,r;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime>=e&&r.endTime<=t&&i.removeCue(r)}function il(e){return"number"==typeof e&&isFinite(e)}function nl(e){return e+"TimingInfo"}function rl(e){var t=e.segmentTimeline,i=e.currentTimeline,n=e.startOfSegment,r=e.buffered;return e.overrideCheck||t!==i?!(t<i)&&r.length?r.end(r.length-1):n:null}function al(e){var t=e.timelineChangeController,i=e.currentTimeline,n=e.segmentTimeline,r=e.loaderType,e=e.audioDisabled;if(i!==n){if("audio"===r){i=t.lastTimelineChange({type:"main"});return!i||i.to!==n}if("main"===r&&e){t=t.pendingTimelineChange({type:"audio"});return t&&t.to===n?!1:!0}}}function sl(e){var t=e.segmentDuration,e=e.maxDuration;return!!t&&Math.round(t)>e+bu}function ol(e,t){if("hls"!==t)return null;var i=function(e,t){e=e&&"number"==typeof e.start&&"number"==typeof e.end?e.end-e.start:0,t=t&&"number"==typeof t.start&&"number"==typeof t.end?t.end-t.start:0;return Math.max(e,t)}(e.audioTimingInfo,e.videoTimingInfo);if(!i)return null;var n=e.playlist.targetDuration,r=sl({segmentDuration:i,maxDuration:2*n}),t=sl({segmentDuration:i,maxDuration:n}),n="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+i+" when the reported duration is "+e.duration+" and the target duration is "+n+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return r||t?{severity:r?"warn":"info",message:n}:null}var ul=new Vu("./transmuxer-worker.worker.js",function(e,t){var Gt=this;!function(){(Ue=function(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){return!!a[e]&&(t=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(t,1),-1<t)},this.trigger=function(e){var t,i,n,r=a[e];if(r)if(2===arguments.length)for(i=r.length,t=0;t<i;++t)r[t].call(this,arguments[1]);else{for(n=[],t=arguments.length,t=1;t<arguments.length;++t)n.push(arguments[t]);for(i=r.length,t=0;t<i;++t)r[t].apply(this,n)}},this.dispose=function(){a={}}}}).prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),this.on("partialdone",function(e){t.partialFlush(e)}),this.on("endedtimeline",function(e){t.endTimeline(e)}),this.on("reset",function(e){t.reset(e)}),t},Ue.prototype.push=function(e){this.trigger("data",e)},Ue.prototype.flush=function(e){this.trigger("done",e)},Ue.prototype.partialFlush=function(e){this.trigger("partialdone",e)},Ue.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},Ue.prototype.reset=function(e){this.trigger("reset",e)};var u,t,i,n,r,a,s,o,l,c,d,h,p,f,m,g,y,v,_,b,T,S,k,C,w,E,I,A,x,P,L,D,O,R,M,N,U,B,F,j=Ue,V=Math.pow(2,32)-1;function H(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i}function q(e){for(var t=[];e--;)t.push(0);return t}function W(){var e,i;return z||(e={96e3:[ie,[227,64],q(154),[56]],88200:[ie,[231],q(170),[56]],64e3:[ie,[248,192],q(240),[56]],48e3:[ie,[255,192],q(268),[55,148,128],q(54),[112]],44100:[ie,[25
vendor: 9,932 bytes, line 1
15,192],q(268),[55,163,128],q(84),[112]],32e3:[ie,[255,192],q(268),[55,234],q(226),[112]],24e3:[ie,[255,192],q(268),[55,255,128],q(268),[111,112],q(126),[224]],16e3:[ie,[255,192],q(268),[55,255,128],q(268),[111,255],q(269),[223,108],q(195),[1,192]],12e3:[ne,q(268),[3,127,248],q(268),[6,255,240],q(268),[13,255,224],q(268),[27,253,128],q(259),[56]],11025:[ne,q(268),[3,127,248],q(268),[6,255,240],q(268),[13,255,224],q(268),[27,255,192],q(268),[55,175,128],q(108),[112]],8e3:[ne,q(268),[3,121,16],q(47),[7]]},i=e,z=Object.keys(i).reduce(function(e,t){return e[t]=new Uint8Array(i[t].reduce(function(e,t){return e.concat(t)},[])),e},{})),z}!function(){if(T={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(var e in T)T.hasOwnProperty(e)&&(T[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);S=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),w=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),E=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:w,audio:E},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),x=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),D=L,O=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R=L,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),u=function(e){for(var t,i=[],n=0,r=1;r<arguments.length;r++)i.push(arguments[r]);for(r=i.length;r--;)n+=i[r].byteLength;for(t=new Uint8Array(n+8),new DataView(t.buffer,t.byteOffset,t.byteLength).setUint32(0,t.byteLength),t.set(e,4),r=0,n=8;r<i.length;r++)t.set(i[r],n),n+=i[r].byteLength;return t},t=function(){return u(T.dinf,u(T.dref,P))},i=function(e){return u(T.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return u(T.hdlr,I[e])},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),u(T.mdhd,t)},h=function(e){return u(T.mdia,p(e),f(e.type),a(e))},r=function(e){return u(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},a=function(e){return u(T.minf,"video"===e.type?u(T.vmhd,A):u(T.smhd,x),t(),g(e))},Xe=function(e,t){for(var i=[],n=t.length;n--;)i[n]=v(t[n]);return u.apply(null,[T.moof,r(e)].concat(i))},s=function(e){for(var t=e.length,i=[];t--;)i[t]=c(e[t]);return u.apply(null,[T.moov,l(4294967295)].concat(i).concat(o(e)))},o=function(e){for(var t=e.length,i=[];t--;)i[t]=_(e[t]);return u.apply(null,[T.mvex].concat(i))},l=function(e){e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return u(T.mvhd,e)},m=function(e){for(var t,i=e.samples||[],n=new Uint8Array(4+i.length),r=0;r<i.length;r++)t=i[r].flags,n[r+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return u(T.sdtp,n)},g=function(e){return u(T.stbl,y(e),u(T.stts,R),u(T.stsc,D),u(T.stsz,O),u(T.stco,L))},y=function(e){return u(T.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),("video"===e.type?M:N)(e))},M=function(e){for(var t,i,n=e.sps||[],r=e.pps||[],a=[],s=[],o=0;o<n.length;o++)a.push((65280&n[o].byteLength)>>>8),a.push(255&n[o].byteLength),a=a.concat(Array.prototype.slice.call(n[o]));for(o=0;o<r.length;o++)s.push((65280&r[o].byteLength)>>>8),s.push(255&r[o].byteLength),s=s.concat(Array.prototype.slice.call(r[o]));return t=[T.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u(T.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],s))),u(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio&&(i=e.sarRatio[0],e=e.sarRatio[1],t.push(u(T.pasp,new Uint8Array([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])))),u.apply(null,t)},N=function(e){return u(T.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},d=function(e){e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return u(T.tkhd,e)},v=function(e){var t,i=u(T.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),n=Math.floor(e.baseMediaDecodeTime/(1+V)),r=Math.floor(e.baseMediaDecodeTime%(1+V)),n=u(T.tfdt,new Uint8Array([1,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r]));return"audio"===e.type?(t=b(e,92),u(T.traf,i,n,t)):(r=m(e),t=b(e,r.length+92),u(T.traf,i,n,t,r))},c=function(e){return e.duration=e.duration||4294967295,u(T.trak,d(e),h(e))},_=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),u(T.trex,t)},U=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},B=function(e,t){var i,n,r,a,s=e.samples||[],t=U(s,t+=20+16*s.length);for((n=new Uint8Array(t.length+16*s.length)).set(t),i=t.length,a=0;a<s.length;a++)r=s[a],n[i++]=(4278190080&r.duration)>>>24,n[i++]=(16711680&r.duration)>>>16,n[i++]=(65280&r.duration)>>>8,n[i++]=255&r.duration,n[i++]=(4278190080&r.size)>>>24,n[i++]=(16711680&r.size)>>>16,n[i++]=(65280&r.size)>>>8,n[i++]=255&r.size,n[i++]=r.flags.isLeading<<2|r.flags.dependsOn,n[i++]=r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,n[i++]=61440&r.flags.degradationPriority,n[i++]=15&r.flags.degradationPriority,n[i++]=(4278190080&r.compositionTimeOffset)>>>24,n[i++]=(16711680&r.compositionTimeOffset)>>>16,n[i++]=(65280&r.compositionTimeOffset)>>>8,n[i++]=255&r.compositionTimeOffset;return u(T.trun,n)},F=function(e,t){var i,n,r,a,s=e.samples||[],t=U(s,t+=20+8*s.length);for((i=new Uint8Array(t.length+8*s.length)).set(t),n=t.length,a=0;a<s.length;a++)r=s[a],i[n++]=(4278190080&r.duration)>>>24,i[n++]=(16711680&r.duration)>>>16,i[n++]=(65280&r.duration)>>>8,i[n++]=255&r.duration,i[n++]=(4278190080&r.size)>>>24,i[n++]=(16711680&r.size)>>>16,i[n++]=(65280&r.size)>>>8,i[n++]=255&r.size;return u(T.trun,i)},b=function(e,t){return("audio"===e.type?F:B)(e,t)},n=function(){return u(T.ftyp,S,k,S,C)};var z,G=function(e){return u(T.mdat,e)},X=Xe,K=function(e){var t=n(),i=s(e),e=new Uint8Array(t.byteLength+i.byteLength);return e.set(t),e.set(i,t.byteLength),e},Y=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,t=n.byteLength=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},$=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},Q=function(e){var t;return!e[0][0].keyFrame&&1<e.length&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},J=function(e,t){for(var i,n,r,a=t||0,s=[],o=0;o<e.length;o++)for(n=e[o],i=0;i<n.length;i++)r=n[i],a+=(r=H(r,a)).size,s.push(r);return s},Z=function(e){for(var t,i,n,r,a,s=0,o=e.byteLength,u=e.nalCount,l=new Uint8Array(o+4*u),c=new DataView(l.buffer),d=0;d<e.length;d++)for(n=e[d],t=0;t<n.length;t++)for(r=n[t],i=0;i<r.length;
vendor: 4,167 bytes, line 1
1i++)a=r[i],c.setUint32(s,a.data.byteLength),s+=4,l.set(a.data,s),s+=a.data.byteLength;return l},ee=function(e,t){var i=[],t=H(e,t||0);return i.push(t),i},te=function(e){for(var t,i=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),s=new DataView(a.buffer),o=0;o<e.length;o++)t=e[o],s.setUint32(i,t.data.byteLength),i+=4,a.set(t.data,i),i+=t.data.byteLength;return a},ie=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){return 9e4*e},ae=function(e,t){return e*t},se=function(e){return e/9e4},oe=function(e,t){return e/t},ue=9e4,le=re,ce=se,de=function(e,t){return re(oe(e,t))},he=function(e,t){return ae(se(e),t)},pe=function(e,t,i){return se(i?e:e-t)},fe=function(e,t,i,n){var r,a,s,o,u,l,c=0,d=0;if(t.length&&(r=de(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(ue/(e.samplerate/1024)),i&&n&&(s=r-Math.max(i,n),d=(c=Math.floor(s/a))*a),!(c<1||ue/2<d))){for(o=(o=W()[e.samplerate])||t[0].data,u=0;u<c;u++)l=t[0],t.splice(0,0,{data:o,dts:l.dts-a,pts:l.pts-a});return e.baseMediaDecodeTime-=Math.floor(he(d,e.samplerate)),d}},me=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},ge=function(e){for(var t,i=[],n=0;n<e.length;n++)t=e[n],i.push({size:t.data.byteLength,duration:1024});return i},ye=function(e){for(var t,i=0,n=new Uint8Array(function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i].data.byteLength;return t}(e)),r=0;r<e.length;r++)t=e[r],n.set(t.data,i),i+=t.data.byteLength;return n},ve=ue,_e=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},be=function(e,t){var i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),t=e.timelineStartInfo.baseMediaDecodeTime,t+=i,t=Math.max(0,t),"audio"===e.type&&(t*=e.samplerate/ve,t=Math.floor(t)),t},Te=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Se=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}i.payload=void 0}t+=r,r=n=0}return i},ke=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Ce=function(e,t){var i,n,r,a,s=[];if(!(64&t[0]))return s;for(n=31&t[0],i=0;i<n;i++)a={type:3&t[2+(r=3*i)],pts:e},4&t[2+r]&&(a.ccData=t[3+r]<<8|t[4+r],s.push(a));return s},e=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);for(var s=0,a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},we=4;function Ee(e){return 32<=e&&e<=127||160<=e&&e<=255}function Ie(e){this.windowNum=e,this.reset()}((He=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Me(0,0),new Me(0,1),new Me(1,0),new Me(1,1)],this.cc708Stream_=new Pe,this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this),this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done"))}).prototype=new j).push=function(e){var t,i;
vendor: 13,126 bytes, line 1
1if("sei_rbsp"===e.nalUnitType&&(t=Se(e.escapedRBSP),t.payload&&t.payloadType===we&&(i=ke(t))))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=Ce(e.pts,i),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},He.prototype.flushCCStreams=function(t){this.ccStreams_.forEach(function(e){return"flush"===t?e.flush():e.partialFlush()},this)},He.prototype.flushStream=function(e){this.captionPackets_.length&&(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0),this.flushCCStreams(e)},He.prototype.flush=function(){return this.flushStream("flush")},He.prototype.partialFlush=function(){return this.flushStream("partialFlush")},He.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},He.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},He.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},He.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},He.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},He.prototype.dispatchCea708Packet=function(e){this.cc708Stream_.push(e)};var Ae={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600};function xe(e){this.serviceNum=e,this.text="",this.currentWindow=new Ie(-1),this.windows=[]}Ie.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ie.prototype.getText=function(){return this.rows.join("\n")},Ie.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ie.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),0<this.rows.length&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ie.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ie.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ie.prototype.backspace=function(){var e;this.isEmpty()||(e=this.rows[this.rowIdx],this.rows[this.rowIdx]=e.substr(0,e.length-1))},xe.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new Ie(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},xe.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var Pe=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){(3===e.type||null===t.current708Packet)&&t.new708Packet(),t.add708Bytes(e)}};function Le(e){return null===e?"":(e=Oe[e]||e,String.fromCharCode(e))}function De(){for(var e=[],t=15;t--;)e.push("");return e}Pe.prototype=new j,Pe.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Pe.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,t=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(t)},Pe.prototype.push708Packet=function(){var e,t=this.current708Packet,i=t.data,n=null,r=0,a=i[r++];for(t.seq=a>>6,t.sizeCode=63&a;r<i.length;r++)e=31&(a=i[r++]),7===(n=a>>5)&&0<e&&(n=i[r++]),this.pushServiceBlock(n,r,e),0<e&&(r+=e-1)},Pe.prototype.pushServiceBlock=function(e,t,i){for(var n,r=t,a=this.current708Packet.data,s=(s=this.services[e])||this.initService(e,r);r<t+i&&r<a.length;r++)n=a[r],Ee(n)?r=this.handleText(r,s):16===n?r=this.extendedCommands(r,s):128<=n&&n<=135?r=this.setCurrentWindow(r,s):152<=n&&n<=159?r=this.defineWindow(r,s):136===n?r=this.clearWindows(r,s):140===n?r=this.deleteWindows(r,s):137===n?r=this.displayWindows(r,s):138===n?r=this.hideWindows(r,s):139===n?r=this.toggleWindows(r,s):151===n?r=this.setWindowAttributes(r,s):144===n?r=this.setPenAttributes(r,s):145===n?r=this.setPenColor(r,s):146===n?r=this.setPenLocation(r,s):143===n?s=this.reset(r,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&r++},Pe.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return Ee(i)&&(e=this.handleText(e,t,!0)),e},Pe.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Pe.prototype.initService=function(t,e){var i=this;return this.services[t]=new xe(t),this.services[t].init(this.getPts(e),function(e){i.flushDisplayed(e,i.services[t])}),this.services[t]},Pe.prototype.handleText=function(e,t,i){var n=this.current708Packet.data[e],n=(n=Ae[i=(i?4096:0)|n]||i,4096&i&&i===n?"":String.fromCharCode(n)),t=t.currentWindow;return t.pendingNewLine&&!t.isEmpty()&&t.newLine(this.getPts(e)),t.pendingNewLine=!1,t.addText(n),e},Pe.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Pe.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=7&(r=i[e]);t.setCurrentWindow(n);var t=t.currentWindow,r=i[++e];return t.visible=(32&r)>>5,t.rowLock=(16&r)>>4,t.columnLock=(8&r)>>3,t.priority=7&r,r=i[++e],t.relativePositioning=(128&r)>>7,t.anchorVertical=127&r,r=i[++e],t.anchorHorizontal=r,r=i[++e],t.anchorPoint=(240&r)>>4,t.rowCount=15&r,r=i[++e],t.columnCount=63&r,r=i[++e],t.windowStyle=(56&r)>>3,t.penStyle=7&r,t.virtualRowCount=t.rowCount+1,e},Pe.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],t=t.currentWindow.winAttr,n=i[++e];return t.fillOpacity=(192&n)>>6,t.fillRed=(48&n)>>4,t.fillGreen=(12&n)>>2,t.fillBlue=3&n,n=i[++e],t.borderType=(192&n)>>6,t.borderRed=(48&n)>>4,t.borderGreen=(12&n)>>2,t.borderBlue=3&n,n=i[++e],t.borderType+=(128&n)>>5,t.wordWrap=(64&n)>>6,t.printDirection=(48&n)>>4,t.scrollDirection=(12&n)>>2,t.justify=3&n,n=i[++e],t.effectSpeed=(240&n)>>4,t.effectDirection=(12&n)>>2,t.displayEffect=3&n,e},Pe.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Pe.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Pe.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=1);return e},Pe.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=0);return e},Pe.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible^=1);return e},Pe.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].clearText();return e},Pe.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].reset();return e},Pe.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],t=t.currentWindow.penAttr,n=i[++e];return t.textTag=(240&n)>>4,t.offset=(12&n)>>2,t.penSize=3&n,n=i[++e],t.italics=(128&n)>>7,t.underline=(64&n)>>6,t.edgeType=(56&n)>>3,t.fontStyle=7&n,e},Pe.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],t=t.currentWindow.penColor,n=i[++e];return t.fgOpacity=(192&n)>>6,t.fgRed=(48&n)>>4,t.fgGreen=(12&n)>>2,t.fgBlue=3&n,n=i[++e],t.bgOpacity=(192&n)>>6,t.bgRed=(48&n)>>4,t.bgGreen=(12&n)>>2,t.bgBlue=3&n,n=i[++e],t.edgeRed=(48&n)>>4,t.edgeGreen=(12&n)>>2,t.edgeBlue=3&n,e},Pe.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},Pe.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Oe={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Re=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Me=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a=32639&e.ccData;a!==this.lastControlCode_?(4096==(61440&a)?this.lastControlCode_=a:a!==this.PADDING_&&(this.lastControlCode_=null),t=a>>>8,i=255&a,a===this.PADDING_||(a===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":a===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),r=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=r,this.startPts_=e.pts):a===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(e.pts)):a===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(e.pts)):a===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(e.pts)):a===this.CARRIAGE_RETURN_?(this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts):a===this.BACKSPACE_?"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1):a===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(e.pts),this.displayed_=De()):a===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=De():a===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=De()),this.mode_="paintOn",this.startPts_=e.pts):this.isSpecialCharacter(t,i)?(n=Le((t=(3&t)<<8)|i),this[this.mode_](e.pts,n),this.column_++):this.isExtCharacter(t,i)?("popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),n=Le((t=(3&t)<<8)|i),this[this.mode_](e.pts,n),this.column_++):this.isMidRowCode(t,i)?(this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"])):this.isOffsetControlCode(t,i)?this.column_+=3&i:this.isPAC(t,i)?(r=Re.indexOf(7968&a),"rollUp"===this.mode_&&(r-this.rollUpRows_+1<0&&(r=this.rollUpRows_-1),this.setRollUp(e.pts,r)),r!==this.row_&&(this.clearFormatting(e.pts),this.row_=r),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&a)&&(this.column_=4*((14&a)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])):this.isNormalChar(t)&&(0===i&&(i=null),n=Le(t),n+=Le(i),this[this.mode_](e.pts,n),this.column_+=n.length))):this.lastControlCode_=null}};function Ne(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e}Me.prototype=new j,Me.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream
vendor: 24,856 bytes, line 1
1:this.name_})},Me.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=De(),this.nonDisplayed_=De(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Me.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Me.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},Me.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},Me.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},Me.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},Me.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&64<=t&&t<=127},Me.prototype.isColorPAC=function(e){return 64<=e&&e<=79||96<=e&&e<=127},Me.prototype.isNormalChar=function(e){return 32<=e&&e<=127},Me.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=De(),this.displayed_=De()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Me.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);t=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,t)},Me.prototype.clearFormatting=function(e){var t;this.formatting_.length&&(t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},""),this.formatting_=[],this[this.mode_](e,t))},Me.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Me.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Me.prototype.shiftRowsUp_=function(){for(var e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Me.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};var Ue={CaptionStream:He,Cea608Stream:Me,Cea708Stream:Pe},Be={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};function Fe(e,t,i){for(var n="",r=t;r<i;r++)n+="%"+("00"+e[r].toString(16)).slice(-2);return n}function je(e,t,i){return decodeURIComponent(Fe(e,t,i))}function Ve(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}(Xe=function e(t){var i,n;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=Ne(e.dts,n),e.pts=Ne(e.pts,n),i=e.dts,this.trigger("data",e))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}}).prototype=new j;var He=Xe,qe={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=je(e.data,1,t),e.value=je(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=je(e.data,1,t),e.url=je(e.data,t+1,e.data.length);break}},PRIV:function(e){for(var t,i=0;i<e.data.length;i++)if(0===e.data[i]){e.owner=(t=e.data,unescape(Fe(t,0,i)));break}e.privateData=e.data.subarray(i+1),e.data=e.privateData}},We=function(e){var t,u={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},l=0,c=[],d=0;if(We.prototype.init.call(this),this.dispatchType=Be.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(t=0;t<u.descriptor.length;t++)this.dispatchType+=("00"+u.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,n,r,a,s,o;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(d=0,c.length=0),0===c.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))u.debug&&console.log("Skipping unrecognized metadata packet");else if(c.push(e),d+=e.data.byteLength,1===c.length&&(l=Ve(e.data.subarray(6,10)),l+=10),!(d<l)){for(t={data:new Uint8Array(l),frames:[],pts:c[0].pts,dts:c[0].dts},r=0;r<l;)t.data.set(c[0].data.subarray(0,l-r),r),r+=c[0].data.byteLength,d-=c[0].data.byteLength,c.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve(t.data.subarray(10,14)),l-=Ve(t.data.subarray(16,20)));do{if((n=Ve(t.data.subarray(i+4,i+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}while((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+n+10)}).key=o.id,qe[o.id]&&(qe[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner&&(s=(1&(a=o.data)[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2,s*=4,s+=3&a[7],o.timeStamp=s,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o))),t.frames.push(o),i+=10,(i+=n)<l);this.trigger("data",t)}}};We.prototype=new j;var ze,Ge,Xe=We,He=He,Ke=function(){var r=new Uint8Array(188),a=0;Ke.prototype.init.call(this),this.push=function(e){var t,i=0,n=188;for(a?((t=new Uint8Array(e.byteLength+a)).set(r.subarray(0,a)),t.set(e,a),a=0):t=e;n<t.byteLength;)71!==t[i]||71!==t[n]?(i++,n++):(this.trigger("data",t.subarray(i,n)),i+=188,n+=188);i<t.byteLength&&(r.set(t.subarray(i),0),a=t.byteLength-i)},this.flush=function(){188===a&&71===r[0]&&(this.trigger("data",r),a=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){a=0,this.trigger("reset")}};Ke.prototype=new j,(ze=function(){var n,r,a,s;ze.prototype.init.call(this),(s=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(e,t){var i=0;t.payloadUnitStartIndicator&&(i+=e[i]+1),("pat"===t.type?r:a)(e.subarray(i),t)},r=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},a=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Be.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Be.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Be.METADATA_STREAM_TYPE&&(s.programMapTable["timed-metadata"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(e){var t={},i=4;if(t.payloadUnitStartIndicator=!!(64&e[1]),t.pid=31&e[1],t.pid<<=8,t.pid|=e[2],1<(48&e[3])>>>4&&(i+=e[i]+1),0===t.pid)t.type="pat",n(e.subarray(i),t),this.trigger("data",t);else if(t.pid===this.pmtPid)for(t.type="pmt",n(e.subarray(i),t),this.trigger("data",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Be.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Be.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new j,ze.STREAM_TYPES={h264:27,adts:15},(Ge=function(){function n(e,t,i){var n,r,a,s,o=new Uint8Array(e.size),u={type:t},l=0,c=0;if(e.data.length&&!(e.size<9)){for(u.trackId=e.data[0].pid,l=0;l<e.data.length;l++)n=e.data[l],o.set(n.data,c),c+=n.data.byteLength;r=o,(a=u).packetLength=6+(r[4]<<8|r[5]),a.dataAlignmentIndicator=0!=(4&r[6]),192&(s=r[7])&&(a.pts=(14&r[9])<<27|(255&r[10])<<20|(254&r[11])<<12|(255&r[12])<<5|(254&r[13])>>>3,a.pts*=4,a.pts+=(6&r[13])>>>1,a.dts=a.pts,64&s&&(a.dts=(14&r[14])<<27|(255&r[15])<<20|(254&r[16])<<12|(255&r[17])<<5|(254&r[18])>>>3,a.dts*=4,a.dts+=(6&r[18])>>>1)),a.data=r.subarray(9+r[8]),t="video"===t||u.packetLength<=e.size,(i||t)&&(e.size=0,e.data.length=0),t&&d.trigger("data",u)}}var t,d=this,r={data:[],size:0},a={data:[],size:0},s={data:[],size:0};Ge.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case Be.H264_STREAM_TYPE:e=r,t="video";break;case Be.ADTS_STREAM_TYPE:e=a,t="audio";break;case Be.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&n(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]};null!==(t=i.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),d.trigger("data",e)}})[i.type]()},this.reset=function(){r.size=0,r.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){n(r,"video"),n(a,"audio"),n(s,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new j;var Ye,$e={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ke,TransportParseStream:ze,ElementaryStream:Ge,TimestampRolloverStream:He,CaptionStream:Ue.CaptionStream,Cea608Stream:Ue.Cea608Stream,Cea708Stream:Ue.Cea708Stream,MetadataStream:Xe};for(Ye in Be)Be.hasOwnProperty(Ye)&&($e[Ye]=Be[Ye]);var Qe=$e,Je=ue,Ze=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],et=function(o){var u,l=0;et.prototype.init.call(this),this.push=function(e){var t,i,n,r,a,s=0;if(o||(l=0),"audio"===e.type)for(u?(n=u,(u=new Uint8Array(n.byteLength+e.data.byteLength)).set(n),u.set(e.data,n.byteLength)):u=e.data;s+5<u.length;)if(255===u[s]&&240==(246&u[s+1])){if(t=2*(1&~u[s+1]),i=(3&u[s+3])<<11|u[s+4]<<3|(224&u[s+5])>>5,a=(r=1024*(1+(3&u[s+6])))*Je/Ze[(60&u[s+2])>>>2],i=s+i,u.byteLength<i)return;if(this.trigger("data",{pts:e.pts+l*a,dts:e.dts+l*a,sampleCount:r,audioobjecttype:1+(u[s+2]>>>6&3),channelcount:(1&u[s+2])<<2|(192&u[s+3])>>>6,samplerate:Ze[(60&u[s+2])>>>2],samplingfrequencyindex:(60&u[s+2])>>>2,samplesize:16,data:u.subarray(s+7+t,i)}),l++,u.byteLength===i)return void(u=void 0);u=u.subarray(i)}else s++},this.flush=function(){l=0,this.trigger("done")},this.reset=function(){u=void 0,this.trigger("reset")},this.endTimeline=function(){u=void 0,this.trigger("endedtimeline")}};et.prototype=new j;var tt,it,nt=et,rt=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var e=n.byteLength-r,t=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");t.set(n.subarray(e,e+i)),a=new DataView(t.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(e){var t;e<s||(e-=s,e-=8*(t=Math.floor(e/8)),r-=t,this.loadWord()),a<<=e,s-=e},this.readBits=function(e){var t=Math.min(s,e),i=a>>>32-t;return 0<(s-=t)?a<<=t:0<r&&this.loadWord(),0<(t=e-t)?i<<t|this.readBits(t):i},this.skipLeadingZeros=function(){for(var e=0;e<s;++e)if(0!=(a&2147483648>>>e))return a<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},at=function(){var n,r,a=0;at.prototype.init.call(this),this.push=function(e){for(var t,i=(r=r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),t):e.data).byteLength;a<i-3;a++)if(1===r[a+2]){n=a+5;break}for(;n<i;)switch(r[n]){case 0:if(0!==r[n-1]){n+=2;break}if(0!==r[n-2]){n++;break}for(a+3!==n-2&&this.trigger("data",r.subarray(a+3,n-2));n++,1!==r[n]&&n<i;);a=n-2,n+=3;break;case 1:if(0!==r[n-1]||0!==r[n-2]){n+=3;break}this.trigger("data",r.subarray(a+3,n-2)),a=n-2,n+=3;break;default:n+=3}r=r.subarray(a),n-=a,a=0},this.reset=function(){r=null,a=0,this.trigger("reset")},this.flush=function(){r&&3<r.byteLength&&this.trigger("data",r.subarray(a+3)),r=null,a=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}};function st(e,t){var i=0<=(i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9])?i:0;return(16&e[t+5])>>4?i+20:i+10}function ot(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:ot(e,t+=st(e,t))}at.prototype=new j,it={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(tt=function(){var i,n,r,a,s,o,g,t=new at;tt.prototype.init.call(this),(i=this).push=function(e){"video"===e.type&&(n=e.trackId,r=e.pts,a=e.dts,t.push(e))},t.on("data",function(e){var t={trackId:n,pts:r,dts:a,data:e};switch(31&e[0]){case 5:t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:t.nalUnitType="sei_rbsp",t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType="seq_parameter_set_rbsp",t.escapedRBSP=s(e.subarray(1)),t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType="pic_parameter_set_rbsp";break;case 9:t.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",t)}),t.on("done",function(){i.trigger("done")}),t.on("partialdone",function(){i.trigger("partialdone")}),t.on("reset",function(){i.trigger("reset")}),t.on("endedtimeline",function(){i.trigger("endedtimeline")}),this.flush=function(){t.flush()},this.partialFlush=function(){t.partialFlush()},this.reset=function(){t.reset()},this.endTimeline=function(){t.endTimeline()},g=function(e,t){for(var i=8,n=8,r=0;r<e;r++)0!==n&&(n=(i+t.readExpGolomb()+256)%256),i=0===n?i:n},s=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);for(var s=0,a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},o=function(e){var t,i,n,r,a,s,o=0,u=0,l=0,c=0,d=1,h=new rt(e),p=h.readUnsignedByte(),f=h.readUnsignedByte(),m=h.readUnsignedByte();if(h.skipUnsignedExpGolomb(),it[p]&&(3===(i=h.readUnsignedExpGolomb())&&h.skipBits(1),h.skipUnsignedExpGolomb(),h.skipUnsignedExpGolomb(),h.skipBits(1),h.readBoolean()))for(r=3!==i?8:12,s=0;s<r;s++)h.readBoolean()&&g(s<6?16:64,h);if(h.skipUnsignedExpGolomb(),0===(n=h.readUnsignedExpGolomb()))h.readUnsignedExpGolomb();else if(1===n)for(h.skipBits(1),h.skipExpGolomb(),h.skipExpGolomb(),t=h.readUnsignedExpGolomb(),s=0;s<t;s++)h.skipExpGolomb();if(h.skipUnsignedExpGolomb(),h.skipBits(1),e=h.readUnsignedExpGolomb(),i=h.readUnsignedExpGolomb(),n=h.readBits(1),0===n&&h.skipBits(1),h.skipBits(1),h.readBoolean()&&(o=h.readUnsignedExpGolomb(),u=h.readUnsignedExpGolomb(),l=h.readUnsignedExpGolomb(),c=h.readUnsignedExpGolomb()),h.readBoolean()&&h.readBoolean()){switch(h.readUnsignedByte()){case 1:a=[1,1];break;case 2:a=[12,11];break;case 3:a=[10,11];break;case 4:a=[16,11];break;case 5:a=[40,33];break;case 6:a=[24,11];break;case 7:a=[20,11];break;case 8:a=[32,11];break;case 9:a=[80,33];break;case 10:a=[18,11];break;case 11:a=[15,11];break;case 12:a=[64,33];break;case 13:a=[160,99];break;case 14:a=[4,3];break;case 15:a=[3,2];break;case 16:a=[2,1];break;case 255:a=[h.readUnsignedByte()<<8|h.readUnsignedByte(),h.readUnsignedByte()<<8|h.readUnsignedByte()]}a&&(d=a[0]/a[1])}return{profileIdc:p,levelIdc:m,profileCompatibility:f,width:Math.ceil((16*(e+1)-2*o-2*u)*d),height:(2-n)*(i+1)*16-2*l-2*c,sarRatio:a}}}).prototype=new j;var He={H264Stream:tt,NalByteStream:at},Xe=function(e){var t=ot(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},ut=st,lt=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},ct=function(){var a=new Uint8Array,s=0;ct.prototype.init.call(this),this.setTimestamp=function(e){s=e},this.push=function(e){var t,i,n=0,r=0;for(a.length?(i=a.length,(a=new Uint8Array(e.byteLength+i)).set(a.subarray(0,i)),a.set(e,i)):a=e;3<=a.length-r;)if(a[r]!=="I".charCodeAt(0)||a[r+1]!=="D".charCodeAt(0)||a[r+2]!=="3".charCodeAt(0))if(255!=(255&a[r])||240!=(240&a[r+1]))r++;else{if(a.length-r<7)break;if(r+(n=lt(a,r))>a.length)break;t={type:"audio",data:a.subarray(r,r+n),pts:s,dts:s},this.trigger("data",t),r+=n}else{if(a.length-r<10)break;if(r+(n=ut(a,r))>a.length)break;t={type:"timed-metadata",data:a.subarray(r,r+n)},this.trigger("data",t),r+=n}e=a.length-r,a=0<e?a.subarray(r):new Uint8Array},this.reset=function(){a=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){a=new Uint8Array,this.trigger("endedtimeline")}};function dt(e,t){var i;if(e.length===t.length){for(i=0;i<e.length;i++)if(e[i]!==t[i])return;return 1}}function ht(e,t,i,n,r,a){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:a,baseMediaDecodeTime:e}}ct.prototype=new j;var pt,ft,mt,gt=ct,yt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],vt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],_t=He.H264Stream,bt=Xe,Tt=ue,St=function(a,s){var o=[],u=0,l=0,c=0,d=1/0;s=s||{},St.prototype.init.call(this),this.push=function(t){Te(a,t),a&&yt.forEach(function(e){a[e]=t[e]}),o.push(t)},this.setEarliestDts=function(e){l=e},this.setVideoBaseMediaDecodeTime=function(e){d=e},this.setAudioAppendStart=function(e){c=e},this.flush=function(){var e,t,i,n,r;0!==o.length&&(e=me(o,a,l),a.baseMediaDecodeTime=be(a,s.keepOriginalTimestamps),r=fe(a,e,c,d),a.samples=ge(e),t=G(ye(e)),o=[],n=X(u,[a]),i=new Uint8Array(n.byteLength+t.byteLength),u++,i.set(n),i.set(t,n.byteLength),_e(a),n=Math.ceil(1024*Tt/a.samplerate),e.length&&(n=e.length*n,this.trigger("segmentTimingInfo",ht(de(a.baseMediaDecodeTime,a.samplerate),e[0].dts,e[0].pts,e[0].dts+n,e[0].pts+n,r||0)),this.trigger("timingInfo",{start:e[0].pts,end:e[0].pts+n})),this.trigger("data",{track:a,boxes:i})),this.trigger("done","AudioSegmentStream")},this.reset=function(){_e(a),o=[],this.trigger("reset")}};St.prototype=new j,(pt=function(s,a){var t,i,o=0,u=[],l=[];a=a||{},pt.prototype.init.call(this),delete s.minPTS,this.gopCache_=[],this.push=function(e){Te(s,e),"seq_parameter_set_rbsp"!==e.nalUnitType||t||(t=e.config,s.sps=[e.data],vt.forEach(function(e){s[e]=t[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.data,s.pps=[e.data]),u.push(e)},this.flush=function(){for(var e,t,i,n=0;u.length&&"access_unit_delimiter_rbsp"!==u[0].nalUnitType;)u.shift();if(0===u.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(e=Y(u),(t=$(e))[0][0].keyFrame||((i=this.getGopForFusion_(u[0],s))?(n=i.duration,t.unshift(i),t.byteLength+=i.byteLength,t.nalCount+=i.nalCount,t.pts=i.pts,t.dts=i.dts,t.duration+=i.duration):t=Q(t)),l.length){var r=a.alignGopsAtEnd?this.alignGopsAtEnd_(t):this.alignGopsAtStart_(t);if(!r)return this.gopCache_.unshift({gop:t.pop(),pps:s.pps,sps:s.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),u=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");_e(s),t=r}Te(s,t),s.samples=J(t),e=G(Z(t)),s.baseMediaDecodeTime=be(s,a.keepOriginalTimestamps),this.trigger("processedGopsInfo",t.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),i=t[0],r=t[t.length-1],this.trigger("segmentTimingInfo",ht(s.baseMediaDecodeTime,i.dts,i.pts,r.dts+r.duration,r.pts+r.duration,n)),this.trigger("timingInfo",{start:t[0].pts,end:t[t.length-1].pts+t[t.length-1].duration}),this.gopCache_.unshift({gop:t.pop(),pps:s.pps,sps:s.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),u=[],this.trigger("baseMediaDecodeTime",s.baseMediaDecodeTime),this.trigger("timelineStartInfo",s.timelineStartInfo),n=X(o,[s]),t=new Uint8Array(n.byteLength+e.byteLength),o++,t.set(n),t.set(e,n.byteLength),this.trigger("data",{track:s,boxes:t}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),u=[],this.gopCache_.length=0,l.length=0,this.trigger("reset")},this.resetStream_=function(){_e(s),i=t=void 0},this.getGopForFusion_=function(e){for(var t,i,n,r=1/0,a=0;a<this.gopCache_.length;a++)i=(n=this.gopCache_[a]).gop,s.pps&&dt(s.pps[0],n.pps[0])&&s.sps&&dt(s.sps[0],n.sps[0])&&(i.dts<s.timelineStartInfo.dts||-1e4<=(i=e.dts-i.dts-i.duration)&&i<=45e3&&(!t||i<r)&&(t=n,r=i));return t?t.gop:null},this.alignGopsAtStart_=function(e){for(var t,i,n,r,a=e.byteLength,s=e.nalCount,o=e.duration,u=t=0;u<l.length&&t<e.length&&(i=l[u],n=e[t],i.pts!==n.pts);)n.pts>i.pts?u++:(t++,a-=n.byteLength,s-=n.nalCount,o-=n.duration);return 0===t?e:t===e.length?null:((r=e.slice(t)).byteLength=a,r.duration=o,r.nalCount=s,r.pts=r[0].pts,r.dts=r[0].dts,r)},this.alignGopsAtEnd_=function(e){for(var t,i,n=l.length-1,r=e.length-1,a=null,s=!1;0<=n&&0<=r;){if(t=l[n],i=e[r],t.pts===i.pts){s=!0;break}t.pts>i.pts?n--:(n===l.length-1&&(a=r),r--)}if(!s&&null===a)return null;if(0===(u=s?r:a))return e;var o=e.slice(u),u=o.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return o.byteLength=u.byteLength,o.duration=u.duration,o.nalCount=u.nalCount,o.pts=o[0].pts,o.dts=o[0].dts,o},this.alignGopsWith=function(e){l=e}}).prototype=new j,(mt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,mt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new j,mt.prototype.flush=function(e){var t,i,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,vt.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,yt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,e=K(this.pendingTracks),a.initSegment=new Uint8Array(e.byteLength),a.initSegment.set(e),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=pe(t.startPts,s,this.keepOriginalTimestamps),t.endTime=pe(t.endPts,s,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=pe(i.pts,s,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger("caption",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},mt.prototype.setRemux=function(e){this.remuxTracks=e},(ft=function(n){var r,a,s=this,i=!0;ft.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type="aac",t.metadataStream=new Qe.MetadataStream,t.aacStream
vendor: 7,229 bytes, line 1
1=new gt,t.audioTimestampRolloverStream=new Qe.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new Qe.TimestampRolloverStream("timed-metadata"),t.adtsStream=new nt,t.coalesceStream=new mt(n,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type&&"audio"!==e.type||t.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new St(a,n),t.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream),s.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!r}))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Qe.MetadataStream,i.packetStream=new Qe.TransportPacketStream,i.parseStream=new Qe.TransportParseStream,i.elementaryStream=new Qe.ElementaryStream,i.timestampRolloverStream=new Qe.TimestampRolloverStream,i.adtsStream=new nt,i.h264Stream=new _t,i.captionStream=new Qe.CaptionStream,i.coalesceStream=new mt(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(e){var t;if("metadata"===e.type){for(t=e.tracks.length;t--;)r||"video"!==e.tracks[t].type?a||"audio"!==e.tracks[t].type||((a=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new pt(r,n),i.videoSegmentStream.on("timelineStartInfo",function(e){a&&!n.keepOriginalTimestamps&&(a.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts-s.baseMediaDecodeTime))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(e){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.videoSegmentStream.on("timingInfo",s.trigger.bind(s,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new St(a,n),i.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),s.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!r})}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",function(e){e.dispatchType=i.metadataStream.dispatchType,s.trigger("id3Frame",e)}),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=e),a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,_e(a),t.audioTimestampRolloverStream&&t.audioTimestampRolloverStream.discontinuity()),r&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,_e(r),t.captionStream.reset()),t.timestampRolloverStream&&t.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(e){var t=this.transmuxPipeline_;n.remux=e,t&&t.coalesceStream&&t.coalesceStream.setRemux(e)},this.alignGopsWith=function(e){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){var t;i&&((t=bt(e))&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1),this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new j;var kt={Transmuxer:ft,VideoSegmentStream:pt,AudioSegmentStream:St,AUDIO_PROPERTIES:yt,VIDEO_PROPERTIES:vt,generateSegmentTimingInfo:ht},Ct={Adts:nt,h264:He},wt=ue;(He=function e(r,a){var s=[],o=0,u=0,l=0,c=1/0,d=null,h=null;a=a||{},e.prototype.init.call(this),this.push=function(t){Te(r,t),r&&yt.forEach(function(e){r[e]=t[e]}),s.push(t)},this.setEarliestDts=function(e){u=e},this.setVideoBaseMediaDecodeTime=function(e){c=e},this.setAudioAppendStart=function(e){l=e},this.processFrames_=function(){var e,t,i,n;0!==s.length&&0!==(n=me(s,r,u)).length&&(r.baseMediaDecodeTime=be(r,a.keepOriginalTimestamps),fe(r,n,l,c),r.samples=ge(n),t=G(ye(n)),s=[],e=X(o,[r]),o++,r.initSegment=K([r]),(i=new Uint8Array(e.byteLength+t.byteLength)).set(e),i.set(t,e.byteLength),_e(r),null===d&&(h=d=n[0].pts),h+=n.length*(1024*wt/r.samplerate),n={start:d},this.trigger("timingInfo",n),this.trigger("data",{track:r,boxes:i}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:d,end:h}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){_e(r),h=d=null},this.reset=function(){this.resetTiming_(),s=[],this.trigger("reset")}}).prototype=new j;var Et=He;function It(e){return e.prototype=new j,e.prototype.init.call(e),e}function At(t,i){t.on("data",i.trigger.bind(i,"data")),t.on("done",i.trigger.bind(i,"done")),t.on("partialdone",i.trigger.bind(i,"partialdone")),t.on("endedtimeline",i.trigger.bind(i,"endedtimeline")),t.on("audioTimingInfo",i.trigger.bind(i,"audioTimingInfo")),t.on("videoTimingInfo",i.trigger.bind(i,"videoTimingInfo")),t.on("trackinfo",i.trigger.bind(i,"trackinfo")),t.on("id3Frame",function(e){e.dispatchType=t.metadataStream.dispatchType,e.cueTime=ce(e.pts),i.trigger("id3Frame",e)}),t.on("caption",function(e){i.trigger("caption",e)})}(He=function e(o,u){var t,i,l,c=0,d=[],h=[],p=null,f=null,m=!0;u=u||{},e.prototype.init.call(this),this.push=function(e){Te(o,e),void 0===o.timelineStartInfo.dts&&(o.timelineStartInfo.dts=e.dts),"seq_parameter_set_rbsp"!==e.nal
1UnitType||t||(t=e.config,o.sps=[e.data],vt.forEach(function(e){o[e]=t[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.data,o.pps=[e.data]),d.push(e)},this.processNals_=function(e){var t;for(d=h.concat(d);d.length&&"access_unit_delimiter_rbsp"!==d[0].nalUnitType;)d.shift();if(0!==d.length){var i=Y(d);if(i.length)if(h=i[i.length-1],e&&(i.pop(),i.duration-=h.duration,i.nalCount-=h.length,i.byteLength-=h.byteLength),i.length){if(this.trigger("timelineStartInfo",o.timelineStartInfo),m){if(!(l=$(i))[0][0].keyFrame){if(!(l=Q(l))[0][0].keyFrame)return d=[].concat.apply([],i).concat(h),void(h=[]);(i=[].concat.apply([],l)).duration=l.duration}m=!1}for(null===p&&(p=i[0].pts,f=p),f+=i.duration,this.trigger("timingInfo",{start:p,end:f}),t=0;t<i.length;t++){var n=i[t];o.samples=ee(n);var r=G(te(n));_e(o),Te(o,n),o.baseMediaDecodeTime=be(o,u.keepOriginalTimestamps);var a=X(c,[o]);c++,o.initSegment=K([o]);var s=new Uint8Array(a.byteLength+r.byteLength);s.set(a),s.set(r,a.byteLength),this.trigger("data",{track:o,boxes:s,sequence:c,videoFrameDts:n.dts,videoFramePts:n.pts})}d=[]}else d=[]}},this.resetTimingAndConfig_=function(){i=t=void 0,f=p=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),h=[],d=[],m=!0,this.trigger("reset")}}).prototype=new j;var xt=He,Pt=Xe;function Lt(e,c){var i=Nt(e,["moof","traf"]),e=Nt(e,["mdat"]),d={},n=[];return e.forEach(function(e,t){t=i[t];n.push({mdat:e,traf:t})}),n.forEach(function(e){var t,i,n,r,a,s=e.mdat,o=e.traf,u=Nt(o,["tfhd"]),l=Vt(u[0]),e=l.trackId,u=Nt(o,["tfdt"]),u=0<u.length?Bt(u[0]).baseMediaDecodeTime:0,o=Nt(o,["trun"]);c===e&&0<o.length&&(o=o,t=u,i=(l=l).defaultSampleDuration||0,n=l.defaultSampleSize||0,r=l.trackId,a=[],o.forEach(function(e){e=jt(e).samples;e.forEach(function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=n),e.trackId=r,e.dts=t,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=t+e.compositionTimeOffset,t+=e.duration}),a=a.concat(e)}),s=function(e,t,i){for(var n,r,a=new DataView(e.buffer,e.byteOffset,e.byteLength),s=[],o=0;o+4<e.length;o+=n)if(n=a.getUint32(o),o+=4,!(n<=0))switch(31&e[o]){case 6:var u=e.subarray(o+1,o+1+n),l=function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null}(o,t),u={nalUnitType:"sei_rbsp",size:n,data:u,escapedRBSP:Ht(u),trackId:i};if(l)u.pts=l.pts,u.dts=l.dts,r=l;else{if(!r){console.log("We've encountered a nal unit without data. See mux.js#233.");break}u.pts=r.pts,u.dts=r.dts}s.push(u)}return s}(s,a,e),d[e]||(d[e]=[]),d[e]=d[e].concat(s))}),d}function Dt(e){return"AudioSegmentStream"===e?"audio":"VideoSegmentStream"===e?"video":""}(Xe=function e(s){var o=null,u=!0;s=s||{},e.prototype.init.call(this),s.baseMediaDecodeTime=s.baseMediaDecodeTime||0,this.push=function(e){var t,i,n,r,a;u&&(!(t=Pt(e))||o&&"aac"===o.type?t||o&&"ts"===o.type||(i=s,(n={type:"ts",tracks:{audio:null,video:null},packet:new Qe.TransportPacketStream,parse:new Qe.TransportParseStream,elementary:new Qe.ElementaryStream,timestampRollover:new Qe.TimestampRolloverStream,adts:new Ct.Adts,h264:new Ct.h264.H264Stream,captionStream:new Qe.CaptionStream,metadataStream:new Qe.MetadataStream}).headOfPipeline=n.packet,n.packet.pipe(n.parse).pipe(n.elementary).pipe(n.timestampRollover),n.timestampRollover.pipe(n.h264),n.h264.pipe(n.captionStream),n.timestampRollover.pipe(n.metadataStream),n.timestampRollover.pipe(n.adts),n.elementary.on("data",function(e){if("metadata"===e.type){for(var t=0;t<e.tracks.length;t++)n.tracks[e.tracks[t].type]||(n.tracks[e.tracks[t].type]=e.tracks[t],n.tracks[e.tracks[t].type].timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime);n.tracks.video&&!n.videoSegmentStream&&(n.videoSegmentStream=new xt(n.tracks.video,i),n.videoSegmentStream.on("timelineStartInfo",function(e){n.tracks.audio&&!i.keepOriginalTimestamps&&n.audioSegmentStream.setEarliestDts(e.dts-i.baseMediaDecodeTime)}),n.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),n.videoSegmentStream.on("data",function(e){n.trigger("data",{type:"video",data:e})}),n.videoSegmentStream.on("done",n.trigger.bind(n,"done")),n.videoSegmentStream.on("partialdone",n.trigger.bind(n,"partialdone")),n.videoSegmentStream.on("endedtimeline",n.trigger.bind(n,"endedtimeline")),n.h264.pipe(n.videoSegmentStream)),n.tracks.audio&&!n.audioSegmentStream&&(n.audioSegmentStream=new Et(n.tracks.audio,i),n.audioSegmentStream.on("data",function(e){n.trigger("data",{type:"audio",data:e})}),n.audioSegmentStream.on("done",n.trigger.bind(n,"done")),n.audioSegmentStream.on("partialdone",n.trigger.bind(n,"partialdone")),n.audioSegmentStream.on("endedtimeline",n.trigger.bind(n,"endedtimeline")),n.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),n.adts.pipe(n.audioSegmentStream)),n.trigger("trackinfo",{hasAudio:!!n.tracks.audio,hasVideo:!!n.tracks.video})}}),n.captionStream.on("data",function(e){var t=n.tracks.video&&n.tracks.video.timelineStartInfo.pts||0;e.startTime=pe(e.startPts,t,i.keepOriginalTimestamps),e.endTime=pe(e.endPts,t,i.keepOriginalTimestamps),n.trigger("caption",e)}),(n=It(n)).metadataStream.on("data",n.trigger.bind(n,"id3Frame")),At(o=n,this)):(r=s,(a={type:"aac",tracks:{audio:null},metadataStream:new Qe.MetadataStream,aacStream:new gt,audioRollover:new Qe.TimestampRolloverStream("audio"),timedMetadataRollover:new Qe.TimestampRolloverStream("timed-metadata"),adtsStream:new nt(!0)}).headOfPipeline=a.aacStream,a.aacStream.pipe(a.audioRollover).pipe(a.adtsStream),a.aacStream.pipe(a.timedMetadataRollover).pipe(a.metadataStream),a.metadataStream.on("timestamp",function(e){a.aacStream.setTimestamp(e.timeStamp)}),a.aacStream.on("data",function(e){"timed-metadata"!==e.type&&"audio"!==e.type||a.audioSegmentStream||(a.tracks.audio=a.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},a.audioSegmentStream=new Et(a.tracks.audio,r),a.audioSegmentStream.on("data",function(e){a.trigger("data",{type:"audio",data:e})}),a.audioSegmentStream.on("partialdone",a.trigger.bind(a,"partialdone")),a.audioSegmentStream.on("done",a.trigger.bind(a,"done")),a.audioSegmentStream.on("endedtimeline",a.trigger.bind(a,"endedtimeline")),a.audioSegmentStream.on("timingInfo",a.trigger.bind(a,"audioTimingInfo")),a.adtsStream.pipe(a.audioSegmentStream),a.trigger("trackinfo",{hasAudio:!!a.tracks.audio,hasVideo:!!a.tracks.video}))}),(a=It(a)).metadataStream.on("data",a.trigger.bind(a,"id3Frame")),At(o=a,this)),u=!1),o.headOfPipeline.push(e)},this.flush=function(){o&&(u=!0,o.headOfPipeline.flush())},this.partialFlush=function(){o&&o.headOfPipeline.partialFlush()},this.endTimeline=function(){o&&o.headOfPipeline.endTimeline()},this.reset=function(){o&&o.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(e){s.keepOriginalTimestamps||(s.baseMediaDecodeTime=e),o&&(o.tracks.audio&&(o.tracks.audio.timelineStartInfo.dts=void 0,o.tracks.audio.timelineStartInfo.pts=void 0,_e(o.tracks.audio),o.audioR
vendor: 4,161 bytes, line 1
1ollover&&o.audioRollover.discontinuity()),o.tracks.video&&(o.videoSegmentStream&&(o.videoSegmentStream.gopCache_=[]),o.tracks.video.timelineStartInfo.dts=void 0,o.tracks.video.timelineStartInfo.pts=void 0,_e(o.tracks.video)),o.timestampRollover&&o.timestampRollover.discontinuity())},this.setRemux=function(e){s.remux=e,o&&o.coalesceStream&&o.coalesceStream.setRemux(e)},this.setAudioAppendStart=function(e){o&&o.tracks.audio&&o.audioSegmentStream&&o.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){}}).prototype=new j;var Ot=Xe,Rt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Mt=Xe=function(e){return e>>>0},Nt=function e(t,i){var n,r,a,s=[];if(!i.length)return null;for(n=0;n<t.byteLength;)r=Mt(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),a=Rt(t.subarray(n+4,n+8)),r=1<r?n+r:t.byteLength,a===i[0]&&(1===i.length?s.push(t.subarray(n+8,r)):(a=e(t.subarray(n+8,r),i.slice(1))).length&&(s=s.concat(a))),n=r;return s},Ut=Xe,Bt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Ut(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Ut(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},Ft=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},jt=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),a&&c&&(t={flags:Ft(e.subarray(d,d+4))},d+=4,s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(t.flags=Ft(e.subarray(d,d+4)),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);return i},Vt=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4)},n=1&i.flags[2],r=2&i.flags[2],a=8&i.flags[2],s=16&i.flags[2],o=32&i.flags[2],u=65536&i.flags[0],l=131072&i.flags[0],e=8;return n&&(e+=4,i.baseDataOffset=t.getUint32(12),e+=4),r&&(i.sampleDescriptionIndex=t.getUint32(e),e+=4),a&&(i.defaultSampleDuration=t.getUint32(e),e+=4),s&&(i.defaultSampleSize=t.getUint32(e),e+=4),o&&(i.defaultSampleFlags=t.getUint32(e)),u&&(i.durationIsEmpty=!0),!n&&l&&(i.baseDataOffsetIsMoof=!0),i},Ht=e,qt=Ue.CaptionStream,Wt=function(){var t,s,o,u,l,i,n=!1;this.isInitialized=function(){return n},this.init=function(e){t=new qt,n=!0,i=!!e&&e.isPartial,t.on("data",function(e){e.startTime=e.startPts/u,e.endTime=e.endPts/u,l.captions.push(e),l.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(o!==e[0]||u!==t[o])},this.parse=function(e,t,i){var n,r;if(!this.isInitialized())return null;if(!t||!i)return null;if(this.isNewInit(t,i))o=t[0],u=i[o];else if(null===o||!u)return s.push(e),null;for(;0<s.length;){var a=s.shift();this.parse(a,t,i)}return n=e,r=u,null!==(r=null===(e=o)?null:{seiNals:Lt(n,e)[e],timescale:r})&&r.seiNals?(this.pushNals(r.seiNals),this.flushStream(),l):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach(function(e){t.push(e)})},this.flushStream=function(){if(!this.isInitialized())return null;i?t.partialFlush():t.flush()},this.clearParsedCaptions=function(){l.captions=[],l.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){s=[],u=o=null,l?this.clearParsedCaptions():l={captions:[],captionStream
1s:{}},this.resetCaptionStream()},this.reset()},zt=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){var i,n,e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new(this.options.handlePartialData?Ot:kt.Transmuxer)(this.options),this.options.handlePartialData?(n=this.self,(e=this.transmuxer).on("data",function(e){var t={data:e.data.track.initSegment.buffer,byteOffset:e.data.track.initSegment.byteOffset,byteLength:e.data.track.initSegment.byteLength},t={boxes:{data:e.data.boxes.buffer,byteOffset:e.data.boxes.byteOffset,byteLength:e.data.boxes.byteLength},initSegment:t,type:e.type,sequence:e.data.sequence};void 0!==e.data.videoFrameDts&&(t.videoFrameDtsTime=ce(e.data.videoFrameDts)),void 0!==e.data.videoFramePts&&(t.videoFramePtsTime=ce(e.data.videoFramePts)),n.postMessage({action:"data",segment:t},[t.boxes.data,t.initSegment.data])}),e.on("id3Frame",function(e){n.postMessage({action:"id3Frame",id3Frame:e})}),e.on("caption",function(e){n.postMessage({action:"caption",caption:e})}),e.on("done",function(e){n.postMessage({action:"done",type:Dt(e)})}),e.on("partialdone",function(e){n.postMessage({action:"partialdone",type:Dt(e)})}),e.on("endedsegment",function(e){n.postMessage({action:"endedSegment",type:Dt(e)})}),e.on("trackinfo",function(e){n.postMessage({action:"trackinfo",trackInfo:e})}),e.on("audioTimingInfo",function(e){var t;null!==e.start?(t={start:ce(e.start)},e.end&&(t.end=ce(e.end)),n.postMessage({action:"audioTimingInfo",audioTimingInfo:t})):n.postMessage({action:"audioTimingInfo",audioTimingInfo:e})}),e.on("videoTimingInfo",function(e){var t={start:ce(e.start)};e.end&&(t.end=ce(e.end)),n.postMessage({action:"videoTimingInfo",videoTimingInfo:t})})):(i=this.self,(e=this.transmuxer).on("data",function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};t=e.data;e.data=t.buffer,i.postMessage({action:"data",segment:e,byteOffset:t.byteOffset,byteLength:t.byteLength},[e.data])}),e.on("done",function(e){i.postMessage({action:"done"})}),e.on("gopInfo",function(e){i.postMessage({action:"gopInfo",gopInfo:e})}),e.on("videoSegmentTimingInfo",function(e){var t={start:{decode:ce(e.start.dts),presentation:ce(e.start.pts)},end:{decode:ce(e.end.dts),presentation:ce(e.end.pts)},baseMediaDecodeTime:ce(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=ce(e.prependedContentDuration)),i.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}),e.on("audioSegmentTimingInfo",function(e){var t={start:{decode:ce(e.start.dts),presentation:ce(e.start.pts)},end:{decode:ce(e.end.dts),presentation:ce(e.end.pts)},baseMediaDecodeTime:ce(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=ce(e.prependedContentDuration)),i.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:t})}),e.on("id3Frame",function(e){i.postMessage({action:"id3Frame",id3Frame:e})}),e.on("caption",function(e){i.postMessage({action:"caption",caption:e})}),e.on("trackinfo",function(e){i.postMessage({action:"trackinfo",trackInfo:e})}),e.on("audioTimingInfo",function(e){i.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ce(e.start),end:ce(e.end)}})}),e.on("videoTimingInfo",function(e){i.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ce(e.start),end:ce(e.end)}})}))},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Wt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),e=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:e&&e.captions||[],data:t.buffer},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){e=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(e)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){e=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(le(e)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(le(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),Gt.postMessage({action:"done",type:"transmuxed"})},t.partialFlush=function(e){this.transmuxer.partialFlush(),Gt.postMessage({action:"partialdone",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),Gt.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();
1!function(t){t.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new zt(t,e.data.options):(this.messageHandlers||(this.messageHandlers=new zt(t)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}(Gt)}()}),ll=Ku("PlaylistSelector"),ar=function(){var e=this.useDevicePixelRatio&&or.devicePixelRatio||1;return Zu(this.playlists.master,this.systemBandwidth,parseInt($u(this.tech_.el(),"width"),10)*e,parseInt($u(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)},cl=function(n){function e(e,t){var i=n.call(this)||this;if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return i.bandwidth=e.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.hasPlayed_=e.hasPlayed,i.currentTime_=e.currentTime,i.seekable_=e.seekable,i.seeking_=e.seeking,i.duration_=e.duration,i.mediaSource_=e.mediaSource,i.vhs_=e.vhs,i.loaderType_=e.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=e.segmentMetadataTrack,i.goalBufferLength_=e.goalBufferLength,i.sourceType_=e.sourceType,i.sourceUpdater_=e.sourceUpdater,i.inbandTextTracks_=e.inbandTextTracks,i.state_="INIT",i.handlePartialData_=e.handlePartialData,i.timelineChangeController_=e.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=ir.browser.IE_VERSION,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=e.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=e.decrypter,i.syncController_=e.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",function(){i.isEndOfStream_()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=Ku("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(nr(i),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}rr(e,n);var t=e.prototype;return t.createTransmuxer_=function(){var e=new ul;return e.postMessage({action:"init",options:{remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_}}),e},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},t.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&(this.transmuxer_.terminate(),Lu()),this.resetStats_(),this.checkBufferTimeout_&&or.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)}
1,t.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},t.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Pu(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},t.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return ir.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,i=e.hasVideo,e=e.isMuxed;if(i&&t&&!this.audioDisabled_&&!e)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Uo(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e},t.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Bo(e),n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});e={resolvedUri:(n||e).resolvedUri};return n&&(e.bytes=n.bytes),e},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,t){if(void 0===t&&(t={}),e){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0});t=null;if(i&&(i.id?t=i.id:i.uri&&(t=i.uri)),this.logger_("playlist update ["+t+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null===this.mediaIndex&&!this.handlePartialData_||this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");t=e.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+t+"]"),null!==this.mediaIndex&&(this.mediaIndex-=t),n&&(n.mediaIndex-=t,0<=n.mediaIndex&&(n.segment=e.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}},t.pause=function(){this.checkBufferTimeout_&&(or.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&Pu(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},t.remove=function(e,t,i){if(void 0===i&&(i=function(){}),t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.currentMediaInfo_){var n,r=1,a=function(){0===--r&&i()};for(n in this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,a)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(e,t,i,n){for(var r=Math.ceil((t-n)*Fs),a=Math.ceil((i-n)*Fs),n=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return n;for(var o=s+1;o--&&!(e[o].pts<=r););return o=Math.max(o,0),n.splice(o,s-o+1),n}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)tl(e,t,this.inbandTextTracks_[n]);tl(e,t,this.segmentMetadataTrack_),a()}},t.monitorBuffer_=function(){this.checkBufferTimeout_&&or.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=or.setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&or.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=or.setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){var e,t;this.sourceUpdater_.updating()||(this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())),e=this.buffered_(),(t=this.checkBuffer_(e,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_))&&(t.timestampOffset=rl({segmentTimeline:t.timeline,currentTimeline:this.currentTimeline_,startOfSegment:t.startOfSegment,buffered:e,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof t.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),this.loadSegment_(t)))},t.isEndOfStream_=function(e,t){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),!t||!this.mediaSource_)return!1;e=e+1===t.segments.length;return t.endList&&"open"===this.mediaSource_.readyState&&e},t.checkBuffer_=function(e,t,i,n,r,a){var s=0;e.length&&(s=e.end(e.length-1));e=Math.max(0,s-r);if(!t.segments.length)return null;if(e>=this.goalBufferLength_())return null;if(!n&&1<=e)return null;var o,n=null,e=!1;null===a?(n=this.getSyncSegmentCandidate_(t),e=!0):null!==i?(o=(o=t.segments[i])&&o.end?o.end:s,n=i+1):o=this.fetchAtBuffer_?(n=(s=Su.getMediaInfoForTime(t,s,a.segmentIndex,a.time)).mediaIndex,s.startTime):(n=(u=Su.getMediaInfoForTime(t,r,a.segmentIndex,a.time)).mediaIndex,u.startTime);var u=this.generateSegmentInfo_(t,n,o,e);return!u||this.mediaSource_&&this.playlist_&&u.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+u.uri,{segmentInfo:u,playlist:t,currentMediaIndex:i,nextMediaIndex:n,startOfSegment:o,isSyncRequest:e}),u)},t.getSyncSegmentCandidate_=function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)},t.generateSegmentInfo_=function(e,t,i,n){if(t<0||t>=e.segments.length)return null;
1var r,a,s=e.segments[t],o=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();return o.length&&(r=o.end(o.length-1)-this.sourceUpdater_.audioTimestampOffset()),u.length&&(a=function(e,t,i){if(null==t||!e.length)return[];for(var n=Math.ceil((t-i+3)*Fs),r=0;r<e.length&&!(e[r].pts>n);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:s.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:s.timeline,duration:s.duration,segment:s,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:r,gopsToAlignWith:a}},t.earlyAbortWhenNeeded_=function(e){var t,i,n,r,a,s;!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3||(t=this.currentTime_(),i=e.bandwidth,a=this.pendingSegment_.duration,s=Su.estimateSegmentRequestTime(a,i,this.playlist_,e.bytesReceived),n=this.buffered_(),r=t,void 0===(e=this.vhs_.tech_.playbackRate())&&(e=1),s<=(e=((n.length?n.end(n.length-1):0)-r)/e-1)||(a=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,u=e.syncController,e=t.playlists.filter(function(e){return!Su.isIncompatible(e)}),t=e.filter(Su.isEnabled);t.length||(t=e.filter(function(e){return!Su.isDisabled(e)}));e=t.filter(Su.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=u.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:Su.estimateSegmentRequestTime(a,n,e)*t-s}}),t=e.filter(function(e){return e.rebufferingImpact<=0});return Qu(t,function(e,t){return Ju(t.playlist,e.playlist)}),t.length?t[0]:(Qu(e,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),e[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:a,timeUntilRebuffer:e,currentTimeline:this.currentTimeline_,syncController:this.syncController_}))&&(s=s-e-a.rebufferingImpact,e=e<=bu?1:.5,!a.playlist||a.playlist.uri===this.playlist_.uri||s<e||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Iu.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort")))))},t.handleAbort_=function(){this.mediaRequestsAborted+=1},t.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},t.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++){var a=i[r];if(a!==n[r])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},t.handleTimingInfo_=function(e,t,i,n){var r;this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||((r=this.pendingSegment_)[e=nl(t)]=r[e]||{},r[e][i]=n,this.logger_("timinginfo: "+t+" - "+i+" - "+n),this.hasEnoughInfoToAppend_()&&this.processCallQueue_())},t.handleCaptions_=function(e,t){var h,p,f=this;this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(0!==t.length?this.pendingSegment_.hasAppendedData_?(h=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),p={},t.forEach(function(e){p[e.stream]=p[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=p[e.stream];t.startTime=Math.min(t.startTime,e.startTime+h),t.endTime=Math.max(t.endTime,e.endTime+h),t.captions.push(e)}),Object.keys(p).forEach(function(e){var t,i,n,r,a,s,o=p[e],u=o.startTime,l=o.endTime,c=o.captions,d=f.inbandTextTracks_;f.logger_("adding cues from "+u+" -> "+l+" for "+e),t=d,i=f.vhs_.tech_,t[n=e]||(i.trigger({type:"usage",name:"vhs-608"}),i.trigger({type:"usage",name:"hls-608"}),o=i.textTracks().getTrackById(n),t[n]=o||i.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track),tl(u,l,d[e]),a=(c={captionArray:c,inbandTextTracks:d,timestampOffset:h}).inbandTextTracks,d=c.captionArray,s=c.timestampOffset,d&&(r=or.WebKitDataCue||or.VTTCue,d.forEach(function(e){var t=e.stream;a[t].addCue(new r(e.startTime+s,e.endTime+s,e.text))}))}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})):this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t)):this.logger_("SegmentLoader received no captions from a caption event"))},t.handleId3_=function(e,t,i){var n,r,a,s;this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||
1(this.pendingSegment_.hasAppendedData_?(n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),r=this.inbandTextTracks_,a=i,s=this.vhs_.tech_,r.metadataTrack_||(r.metadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,r.metadataTrack_.inBandMetadataTrackDispatchType=a),el({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:this.duration_()})):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))},t.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},t.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(e){return e()})},t.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(e){return e()})},t.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.currentMediaInfo_||!al({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},t.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;if(!this.handlePartialData_){var t=this.currentMediaInfo_,i=t.hasAudio,n=t.hasVideo,t=t.isMuxed;if(n&&!e.videoTimingInfo)return!1;if(i&&!this.audioDisabled_&&!t&&!e.audioTimingInfo)return!1}return!al({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},t.handleData_=function(e,t){var i,n,r;this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()?(i=this.pendingSegment_,this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.segment),"closed"!==this.mediaSource_.readyState&&(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4?(this.trigger("fmp4"),i.timingInfo.start=i[nl(t.type)].start):((n="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo)&&(r=this.handlePartialData_?t.videoFramePtsTime:i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:n,firstVideoFrameTimeForData:r,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})),this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t))):this.callQueue_.push(this.handleData_.bind(this,e,t)))},t.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},t.getInitSegmentAndUpdateState_=function(e){var t=e.type,i=e.initSegment,n=e.map,r=e.playlist;if(n){e=Uo(n);if(this.activeInitSegmentId_===e)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=e}return i&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!!n,this.activeInitSegmentId_=null,i):null},t.appendToSourceBuffer_=function(e){var t=this,i=e.segmentInfo,n=e.type,r=e.initSegment,a=e.data,e=[a],a=a.byteLength;r&&(e.unshift(r),a+=r.byteLength);var s,o,u=(o=0,(e={bytes:a,segments:e}).bytes&&(s=new Uint8Array(e.bytes),e.segments.forEach(function(e){s.set(e,o),o+=e.byteLength})),s);this.sourceUpdater_.appendBuffer({segmentInfo:i,type:n,bytes:u},function(e){e&&(t.error(n+" append of "+u.length+"b failed for segment #"+i.mediaIndex+" in playlist "+i.playlist.id),t.trigger("appenderror"))})},t.handleSegmentTimingInfo_=function(e,t,i){this.pendingSegment_&&t===this.pendingSegment_.requestId&&((t=this.pendingSegment_.segment)[e=e+"TimingInfo"]||(t[e]={}),t[e].transmuxerPrependedSeconds=i.prependedContentDuration||0,t[e].transmuxedPresentationStart=i.start.presentation,t[e].transmuxedDecodeStart=i.start.decode,t[e].transmuxedPresentationEnd=i.end.presentation,t[e].transmuxedDecodeEnd=i.end.decode,t[e].baseMediaDecodeTime=i.baseMediaDecodeTime)},t.appendData_=function(e,t){var i=t.type,n=t.data;n&&n.byteLength&&("audio"===i&&this.audioDisabled_||(t=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null}),this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:t,data:n})))},t.loadSegment_=function(t){var i=this;this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),"number"==typeof t.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):this.loadQueue_.push(function(){var e=i.buffered_();"number"==typeof t.timestampOffset&&(t.timestampOffset=rl({segmentTimeline:t.timeline,currentTimeline:i.currentTimeline_,startOfSegment:t.startOfSegment,buffered:e,overrideCheck:!0})),delete t.audioAppendStart;
1e=i.sourceUpdater_.audioBuffered();e.length&&(t.audioAppendStart=e.end(e.length-1)-i.sourceUpdater_.audioTimestampOffset()),i.updateTransmuxerAndRequestSegment_(t)})},t.updateTransmuxerAndRequestSegment_=function(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var t=this.createSimplifiedSegmentObj_(e);e.abortRequests=ru({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},t.trimBackBuffer_=function(e){var t=function(e,t,i){var n=t-Iu.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));i=t-i;return Math.min(i,n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<t&&this.remove(0,t)},t.createSimplifiedSegmentObj_=function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith},n=e.playlist.segments[e.mediaIndex-1];return n&&n.timeline===t.timeline&&(n.videoTimingInfo?i.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(i.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),t.key&&(e=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]),i.key=this.segmentKey(t.key),i.key.iv=e),t.map&&(i.map=this.initSegmentForMap(t.map)),i},t.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},t.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},t.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},t.segmentRequestFinished_=function(e,t,i){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===Mu?void 0:(this.pause(),e.code===Ru?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var n=t[0].pts,r=0;r<e.length&&!(e[r].pts>=n);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING";e=this.isEndOfStream_(n.mediaIndex,n.playlist),t=null!==this.mediaIndex,i=n.timeline!==this.currentTimeline_&&0<n.timeline;!n.isFmp4&&(e||t&&i)&&Du(this.transmuxer_),this.trigger("appending"),this.waitForAppendsToComplete_(n)}},t.setTimeMapping_=function(e){e=this.syncController_.mappingForTimeline(e);null!==e&&(this.timeMapping_=e)},t.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var t=e.currentStart,i=e.playlist,n=e.mediaIndex,r=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,e=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return e.start;i=i.segments[n-1];return 0!==n&&i&&void 0!==i.start&&i.end===r+a?o.start:r},t.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,i=t.hasAudio,n=t.hasVideo,t=t.isMuxed,n="main"===this.loaderType_&&n,t=!this.audioDisabled_&&i&&!t;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);n&&e.waitingOnAppends++,t&&e.waitingOnAppends++,n&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),t&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||
1(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var t,i,e=(t=this.loaderType_,i=this.currentMediaInfo_,e=e,"main"===t&&i&&e?e.hasAudio||e.hasVideo?i.hasVideo&&!e.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!i.hasVideo&&e.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null);return!!e&&(this.error({message:e,blacklistDuration:1/0}),this.trigger("error"),!0)},t.updateSourceBufferTimestampOffset_=function(e){var t;null===e.timestampOffset||"number"!=typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_||(t=!1,e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset"))},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e,t,i,n,r,a,s=this.pendingSegment_;this.updateTimingInfoEnd_(s),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:s,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_((e=(o=s).segment,t=e.start,i=e.end,n=o.playlist,r=n.mediaSequence,a=n.id,e=n.segments,n=void 0===e?[]:e,e=o.mediaIndex,o=o.timeline,["appending ["+e+"] of ["+r+", "+(r+n.length)+"] from playlist ["+a+"]","["+t+" => "+i+"] in timeline ["+o+"]"].join(" ")));var o=ol(s,this.sourceType_);o&&("warn"===o.severity?ir.log.warn(o.message):this.logger_(o.message)),this.recordThroughput_(s),this.pendingSegment_=null,this.state="READY",s.isSyncRequest?this.trigger("syncinfoupdate"):(this.addSegmentMetadataCue_(s),this.fetchAtBuffer_=!0,this.currentTimeline_!==s.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:s.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:s.timeline})),this.currentTimeline_=s.timeline,this.trigger("syncinfoupdate"),(o=s.segment).end&&this.currentTime_()-o.end>3*s.playlist.targetDuration?this.resetEverything():(null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=s.mediaIndex,this.isEndOfStream_(s.mediaIndex,s.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()))},t.recordThroughput_=function(e){var t,i;e.duration<1/60?this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60):(t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/i*8*1e3),this.throughput.rate+=(i-t)/++this.throughput.count)},t.addSegmentMetadataCue_=function(e){var t,i,n,r;this.segmentMetadataTrack_&&(i=(t=e.segment).start,r=t.end,il(i)&&il(r)&&(tl(i,r,this.segmentMetadataTrack_),n=or.WebKitDataCue||or.VTTCue,e={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:r},(r=new n(i,r,JSON.stringify(e))).value=e,this.segmentMetadataTrack_.addCue(r)))},e}(ir.EventTarget);function dl(){}function hl(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function pl(e,t){var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]}function fl(e,t){if(0!==t.queue.length){var i=0,n=t.queue[i];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!pl(e,t)){if(n.type!==e){if(null===(i=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null}(e,t.queue)))return;n=t.queue[i]}t.queue.splice(i,1),n.action(e,t),n.doneFn?t.queuePending[e]=n:fl(e,t)}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),fl("audio",t),fl("video",t))}}function ml(e,t){var i=t[e+"Buffer"],n=hl(e);i&&(i.removeEventListener("updateend",t["on"+n+"UpdateEnd_"]),i.removeEventListener("error",t["on"+n+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)}function gl(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)}function yl(e){var t=e.type,i=e.sourceUpdater,n=e.action,r=e.doneFn,e=e.name;i.queue.push({type:t,action:n,doneFn:r,name:e}),fl(t,i)}function vl(i,n){return function(e){var t;n.queuePending[i]&&(t=n.queuePending[i].doneFn,n.queuePending[i]=null,t&&t(n[i+"Error_"])),fl(i,n)}}function _l(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}function bl(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)}function Tl(e,t){(t.activePlaylistLoader=e).load()}function Sl(n){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){Gl[e](e,n)});var c=n.mediaTypes,e=n.masterPlaylistLoader,t=n.tech,i=n.vhs;["AUDIO","SUBTITLES"].forEach(function(e){var r,a,s,o,t,i,u,l;c[e].activeGroup=(r=e,a=n,function(t){var e=a.masterPlaylistLoader,i=a.mediaTypes[r].groups,n=e.media();if(!n)return null;e=null;return n.attributes[r]&&(e=i[n.attributes[r]]),e=e||i.main,void 0===t?e:null!==t&&e.filter(function(e){return e.id===t.id})[0]||null}),c[e].activeTrack=Xl[e](e,n),c[e].onGroupChanged=(s=e,o=n,function(){var e=o.segmentLoaders,t=e[s],i=e.main,n=o.mediaTypes[s],r=n.activeTrack(),e=n.activeGroup(r),r=n.activePlaylistLoader;bl(t,n),e&&(e.playlistLoader?(t.resyncLoader(),Tl(e.playlistLoader,n)):r&&i.resetEverything())}),c[e].onGroupChanging=(t=e,i=n,function(){var e=i.segmentLoaders[t];e.abort(),e.pause()}
1),c[e].onTrackChanged=(u=e,l=n,function(){var e=l.segmentLoaders,t=e[u],i=e.main,n=l.mediaTypes[u],r=n.activeTrack(),a=n.activeGroup(r),e=n.activePlaylistLoader;if(bl(t,n),a){if("AUDIO"===u){if(!a.playlistLoader)return i.setAudio(!0),void i.resetEverything();t.setAudio(!0),i.setAudio(!1)}e!==a.playlistLoader&&(t.track&&t.track(r),t.resetEverything()),Tl(a.playlistLoader,n)}})});var r,a=c.AUDIO.activeGroup();function s(){c.AUDIO.onTrackChanged(),t.trigger({type:"usage",name:"vhs-audio-change"}),t.trigger({type:"usage",name:"hls-audio-change"})}for(r in a&&(a=(a.filter(function(e){return e.default})[0]||a[0]).id,c.AUDIO.tracks[a].enabled=!0,c.AUDIO.onTrackChanged()),e.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return c[e].onGroupChanged()})}),e.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(e){return c[e].onGroupChanging()})}),t.audioTracks().addEventListener("change",s),t.remoteTextTracks().addEventListener("change",c.SUBTITLES.onTrackChanged),i.on("dispose",function(){t.audioTracks().removeEventListener("change",s),t.remoteTextTracks().removeEventListener("change",c.SUBTITLES.onTrackChanged)}),t.clearTracks("audio"),c.AUDIO.tracks)t.audioTracks().addTrack(c.AUDIO.tracks[r])}function kl(e,t,i){var n,r,a,s,o=e.masterPlaylistController_,u=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);t.attributes.RESOLUTION&&(n=t.attributes.RESOLUTION,this.width=n.width,this.height=n.height),this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Xu(o.master(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,s=u,function(e){var t=r.master.playlists[a],i=Io(t),n=Ao(t);return void 0===e?n:(e?delete t.disabled:t.disabled=!0,e===n||i||(s(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})}function Cl(t,e){var i=0,n=0,r=ir.mergeOptions(Jl,e);function a(){n&&t.currentTime(n)}function s(e){null!=e&&(n=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())}function o(){return Date.now()-i<1e3*r.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):r.getSource&&"function"==typeof r.getSource?(i=Date.now(),r.getSource.call(t,s)):void ir.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}function u(){t.off("loadedmetadata",a),t.off("error",o),t.off("dispose",u)}t.ready(function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}),t.on("error",o),t.on("dispose",u),t.reloadSourceOnError=function(e){u(),Cl(t,e)}}var wl,El=["video","audio"],Il=function(n,r){return function(e,t){var i=t[e+"Buffer"];gl(t.mediaSource,i)&&(t.logger_("Appending segment "+r.mediaIndex+"'s "+n.length+" bytes to "+e+"Buffer"),i.appendBuffer(n))}},Al=function(n,r){return function(e,t){var i=t[e+"Buffer"];gl(t.mediaSource,i)&&(t.logger_("Removing "+n+" to "+r+" from "+e+"Buffer"),i.remove(n,r))}},xl=function(n){return function(e,t){var i=t[e+"Buffer"];gl(t.mediaSource,i)&&(t.logger_("Setting "+e+"timestampOffset to "+n),i.timestampOffset=n)}},Pl=function(i){return function(e,t){i()}},Ll=function(t){return function(e){if("open"===e.mediaSource.readyState){e.logger_("Calling mediaSource endOfStream("+(t||"")+")");try{e.mediaSource.endOfStream(t)}catch(e){ir.log.warn("Failed to call media source endOfStream",e)}}}},Dl=function(t){return function(e){e.logger_("Setting mediaSource duration to "+t);try{e.mediaSource.duration=t}catch(e){ir.log.warn("Failed to set media source duration",e)}}},Ol=function(){return function(t,e){if("open"===e.mediaSource.readyState){var i=e[t+"Buffer"];if(gl(e.mediaSource,i)){e.logger_("calling abort on "+t+"Buffer");try{i.abort()}catch(e){ir.log.warn("Failed to abort on "+t+"Buffer",e)}}}}},Rl=function(n,r){return function(e){var t=hl(n),i=cu(r);e.logger_("Adding "+n+"Buffer with codec "+r+" to mediaSource");i=e.mediaSource.addSourceBuffer(i);i.addEventListener("updateend",e["on"+t+"UpdateEnd_"]),i.addEventListener("error",e["on"+t+"Error_"]),e.codecs[n]=r,e[n+"Buffer"]=i}},Ml=function(i){return function(e){var t=e[i+"Buffer"];if(ml(i,e),gl(e.mediaSource,t)){e.logger_("Removing "+i+"Buffer with codec "+e.codecs[i]+" from mediaSource");try{e.mediaSource.removeSourceBuffer(t)}catch(e){ir.log.warn("Failed to removeSourceBuffer "+i+"Buffer",e)}}}},Nl=function(r){return function(e,t){var i=t[e+"Buffer"],n=cu(r);gl(t.mediaSource,i)&&t.codecs[e]!==r&&(t.logger_("changing "+e+"Buffer codec from "+t.codecs[e]+" to "+r),i.changeType(n),t.codecs[e]=r)}},Ul=function(i){function e(e){var t=i.call(this)||this;return t.mediaSource=e,t.sourceopenListener_=function(){return fl("mediaSource",nr(t))},t.mediaSource.addEventListener("sourceopen",t.sourceopenListener_),t.logger_=Ku("SourceUpdater"),t.audioTimestampOffset_=0,t.videoTimestampOffset_=0,t.queue=[],t.queuePending={audio:null,video:null},t.delayedAudioAppendQueue_=[],t.videoAppendQueued_=!1,t.codecs={},t.onVideoUpdateEnd_=vl("video",nr(t)),t.onAudioUpdateEnd_=vl("audio",nr(t)),t.onVideoError_=function(e){t.videoError_=e},t.onAudioError_=function(e){t.audioError_=e},t.createdSourceBuffers_=!1,t.initializedEme_=!1,t.triggeredReady_=!1,t}
1rr(e,i);var t=e.prototype;return t.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},t.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},t.hasInitializedAnyEme=function(){return this.initializedEme_},t.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},t.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},t.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},t.addSourceBuffer=function(e,t){yl({type:"mediaSource",sourceUpdater:this,action:Rl(e,t),name:"addSourceBuffer"})},t.abort=function(e){yl({type:e,sourceUpdater:this,action:Ol(e),name:"abort"})},t.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?yl({type:"mediaSource",sourceUpdater:this,action:Ml(e),name:"removeSourceBuffer"}):ir.log.error("removeSourceBuffer is not supported!")},t.canRemoveSourceBuffer=function(){return!ir.browser.IE_VERSION&&!ir.browser.IS_FIREFOX&&or.MediaSource&&or.MediaSource.prototype&&"function"==typeof or.MediaSource.prototype.removeSourceBuffer},e.canChangeType=function(){return or.SourceBuffer&&or.SourceBuffer.prototype&&"function"==typeof or.SourceBuffer.prototype.changeType},t.canChangeType=function(){return this.constructor.canChangeType()},t.changeType=function(e,t){this.canChangeType()?yl({type:e,sourceUpdater:this,action:Nl(t),name:"changeType"}):ir.log.error("changeType is not supported!")},t.addOrChangeSourceBuffers=function(i){var n=this;if(!i||"object"!=typeof i||0===Object.keys(i).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");
1Object.keys(i).forEach(function(e){var t=i[e];if(!n.hasCreatedSourceBuffers())return n.addSourceBuffer(e,t);n.canChangeType()&&n.changeType(e,t)})},t.appendBuffer=function(e,t){var i=this,n=e.segmentInfo,r=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");yl({type:r,sourceUpdater:this,action:Il(a,n||{mediaIndex:-1}),doneFn:t,name:"appendBuffer"}),"video"===r&&(this.videoAppendQueued_=!0,this.delayedAudioAppendQueue_.length&&(r=this.delayedAudioAppendQueue_.slice(),this.logger_("queuing delayed audio "+r.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,r.forEach(function(e){i.appendBuffer.apply(i,e)})))},t.audioBuffered=function(){return gl(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered||ir.createTimeRange()},t.videoBuffered=function(){return gl(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered||ir.createTimeRange()},t.buffered=function(){var e=gl(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=gl(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var i=null,n=null,r=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return ir.createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(o=t.length;o--;)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort(function(e,t){return e.time-t.time}),o=0;o<a.length;o++)"start"===a[o].type?2===++r&&(i=a[o].time):"end"===a[o].type&&1===--r&&(n=a[o].time),null!==i&&null!==n&&(s.push([i,n]),n=i=null);return ir.createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},t.setDuration=function(e,t){void 0===t&&(t=dl),yl({type:"mediaSource",sourceUpdater:this,action:Dl(e),name:"duration",doneFn:t})},t.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=dl),"string"!=typeof e&&(e=void 0),yl({type:"mediaSource",sourceUpdater:this,action:Ll(e),name:"endOfStream",doneFn:t})},t.removeAudio=function(e,t,i){void 0===i&&(i=dl),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?yl({type:"audio",sourceUpdater:this,action:Al(e,t),doneFn:i,name:"remove"}):i()},t.removeVideo=function(e,t,i){void 0===i&&(i=dl),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?yl({type:"video",sourceUpdater:this,action:Al(e,t),doneFn:i,name:"remove"}):i()},t.updating=function(){return!(!pl("audio",this)&&!pl("video",this))},t.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(yl({type:"audio",sourceUpdater:this,action:xl(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},t.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(yl({type:"video",sourceUpdater:this,action:xl(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},t.audioQueueCallback=function(e){this.audioBuffer&&yl({type:"audio",sourceUpdater:this,action:Pl(e),name:"callback"})},t.videoQueueCallback=function(e){this.videoBuffer&&yl({type:"video",sourceUpdater:this,action:Pl(e),name:"callback"})},t.dispose=function(){var t=this;this.trigger("dispose"),El.forEach(function(e){t.abort(e),t.canRemoveSourceBuffer()?t.removeSourceBuffer(e):t[e+"QueueCallback"](function(){return ml(e,t)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},e}(ir.EventTarget),Bl=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)})),Fl=function(i){function e(e,t){return void 0===t&&(t={}),(t=i.call(this,e,t)||this).handlePartialData_=!1,t.mediaSource_=null,t.subtitlesTrack_=null,t.loaderType_="subtitle",t.featuresNativeTextTracks_=e.featuresNativeTextTracks,t.shouldSaveSegmentTimingInfo_=!1,t}rr(e,i);var t=e.prototype;return t.createTransmuxer_=function(){return null},t.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return ir.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,e=e[e.length-1].startTime;return ir.createTimeRanges([[t,e]])},t.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Uo(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(t=Bl.byteLength+e.bytes.byteLength,(t=new Uint8Array(t)).set(e.bytes),t.set(Bl,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:t}),n||e},t.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},t.remove=function(e,t){tl(e,t,this.subtitlesTrack_)},t.fillBuffer_=function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline))return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(t)}},t.skipEmptySegments_=function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e},t.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},t.segmentRequestFinished_=function(e,t,i){var n=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Ru&&this.handleTimeout_(),e.code===Mu?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),this.state="APPENDING",this.trigger("appending");var a=r.segment;if(a.map&&(a.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!=typeof or.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s=function(){n.subtitlesTrack_.tech_.off("vttjsloaded",o),n.stopForError({message:"Error loading vtt.js"})},o=function(){n.subtitlesTrack_.tech_.off("vttjserror",s),n.segmentRequestFinished_(e,t,i)};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",s)}a.requested=!0;try{this.parseVTTCues_(r)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,r.cues.forEac
1h(function(e){n.subtitlesTrack_.addCue(n.featuresNativeTextTracks_?new or.VTTCue(e.startTime,e.endTime,e.text):e)}),function(t){var e=t.cues;if(e)for(var i=0;i<e.length;i++){for(var n=[],r=0,a=0;a<e.length;a++)e[i].startTime===e[a].startTime&&e[i].endTime===e[a].endTime&&e[i].text===e[a].text&&1<++r&&n.push(e[a]);n.length&&n.forEach(function(e){return t.removeCue(e)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},t.handleData_=function(){},t.updateTimingInfoEnd_=function(){},t.parseVTTCues_=function(t){var e=!1;"function"==typeof or.TextDecoder?i=new or.TextDecoder("utf8"):(i=or.WebVTT.StringDecoder(),e=!0);var i=new or.WebVTT.Parser(or,or.vttjs,i);t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=t.cues.push.bind(t.cues),i.ontimestampmap=function(e){t.timestampmap=e},i.onparsingerror=function(e){ir.log.warn("Error encountered when parsing cues: "+e.message)},t.segment.map&&(n=t.segment.map.bytes,e&&(n=_l(n)),i.parse(n));var n=t.bytes;e&&(n=_l(n)),i.parse(n),i.flush()},t.updateTimeMapping_=function(e,t,i){var n,r,a=e.segment;t&&(e.cues.length?(r=e.timestampmap,n=r.MPEGTS/Fs-r.LOCAL+t.mapping,e.cues.forEach(function(e){e.startTime+=n,e.endTime+=n}),i.syncInfo||(r=e.cues[0].startTime,t=e.cues[e.cues.length-1].startTime,i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(r,t-a.duration)})):a.empty=!0)},e}(cl),jl=[{name:"VOD",run:function(e,t,i,n,r){if(i===1/0)return null;return{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(e,t,i,n,r){if(!e.datetimeToDisplayTime)return null;var a=t.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,l=Math.abs(r-c);if(null!==o&&(0===l||o<l))break;o=l,s={time:c,segmentIndex:u}}}return s}},{name:"Segment",run:function(e,t,i,n,r){var a=t.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.timeline===n&&void 0!==l.start){var c=Math.abs(r-l.start);if(null!==o&&o<c)break;(!s||null===o||c<=o)&&(o=c,s={time:l.start,segmentIndex:u})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){l=Math.abs(r-c.time);if(null!==s&&s<l)break;(!a||null===s||l<=s)&&(s=l,a={time:c.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,i,n,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Vl=function(i){function e(e){var t=i.call(this)||this;return t.timelines=[],t.discontinuities=[],t.datetimeToDisplayTime=null,t.logger_=Ku("SyncController"),t}rr(e,i);var t=e.prototype;return t.getSyncPoint=function(e,t,i,n){i=this.runStrategies_(e,t,i,n);return i.length?this.selectSyncPoint_(i,{key:"time",value:n}):null},t.getExpiredTime=function(e,t){if(!e||!e.segments)return null;t=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!t.length)return null;t=this.selectSyncPoint_(t,{key:"segmentIndex",value:0});return 0<t.segmentIndex&&(t.time*=-1),Math.abs(t.time+ko(e,t.segmentIndex,0))},t.runStrategies_=function(e,t,i,n){for(var r=[],a=0;a<jl.length;a++){var s=jl[a],o=s.run(this,e,t,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r},t.selectSyncPoint_=function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<n&&(n=s,i=e[a].syncPoint,r=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i},t.saveExpiredSegmentInfo=function(e,t){for(var i=t.mediaSequence-e.mediaSequence-1;0<=i;i--){var n=e.segments[i];if(n&&void 0!==n.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:n.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},t.setDateTimeMapping=function(e){!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject&&(e=e.segments[0].dateTimeObject.getTime()/1e3,this.datetimeToDisplayTime=-e)},t.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,e=e.shouldSaveTimelineMapping;this.calculateSegmentTimeMapping_(t,t.timingInfo,e)&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:t.segment.start}))},t.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},t.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,t,i){var n=e.segment,r=this.timelines[e.timeline];if(null!==e.timestampOffset)r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+r.t
vendor: 6,061 bytes, line 1
1ime+"] [mapping: "+r.mapping+"]")),n.start=e.startOfSegment,n.end=t.end+r.mapping;else{if(!r)return!1;n.start=t.start+r.mapping,n.end=t.end+r.mapping}return!0},t.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var n=0;n<t.discontinuityStarts.length;n++){var r,a=t.discontinuityStarts[n],s=t.discontinuitySequence+n+1,o=a-e.mediaIndex,u=Math.abs(o);(!this.discontinuities[s]||this.discontinuities[s].accuracy>u)&&(r=void 0,r=o<0?i.start-ko(t,e.mediaIndex,a):i.end+ko(t,e.mediaIndex+1,a),this.discontinuities[s]={time:r,accuracy:u})}},t.dispose=function(){this.trigger("dispose"),this.off()},e}(ir.EventTarget),Hl=function(t){function e(){var e=t.call(this)||this;return e.pendingTimelineChanges_={},e.lastTimelineChanges_={},e}rr(e,t);var i=e.prototype;return i.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(e){var t=e.type,i=e.from,e=e.to;return"number"==typeof i&&"number"==typeof e&&(this.pendingTimelineChanges_[t]={type:t,from:i,to:e},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},i.lastTimelineChange=function(e){var t=e.type,i=e.from,e=e.to;return"number"==typeof i&&"number"==typeof e&&(this.lastTimelineChanges_[t]={type:t,from:i,to:e},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},e}(ir.EventTarget),ql=new Vu("./decrypter-worker.worker.js",function(e,t){var i,n,r,c,m,l,g,s,a=this;i=function(e,t,i){return t&&o(e.prototype,t),i&&o(e,i),e},n=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;t=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(t,1),-1<t},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(t){this.on("data",function(e){t.push(e)})},e}(),c=null,m=function(){function e(e){var t,i,n;c=c||function(){for(var e,t,i,n,r,a,s,o=[[[],[],[],[],[]],[[],[],[],[],[]]],u=o[0],l=o[1],c=u[4],d=l[4],h=[],p=[],f=0;f<256;f++)p[(h[f]=f<<1^283*(f>>7))^f]=f;for(e=t=0;!c[e];e^=i||1,t=p[t]||1)for(r=(r=t^t<<1^t<<2^t<<3^t<<4)>>8^255&r^99,s=16843009*h[n=h[i=h[d[c[e]=r]=e]]]^65537*n^257*i^16843008*e,a=257*h[r]^16843008*r,f=0;f<4;f++)u[f][e]=a=a<<24^a>>>8,l[f][r]=s=s<<24^s>>>8;for(f=0;f<5;f++)u[f]=u[f].slice(0),l[f]=l[f].slice(0);return o}(),this._tables=[[c[0][0].slice(),c[0][1].slice(),c[0][2].slice(),c[0][3].slice(),c[0][4].slice()],[c[1][0].slice(),c[1][1].slice(),c[1][2].slice(),c[1][3].slice(),c[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],s=e.length,o=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var u=e.slice(0),l=[];for(this._key=[u,l],t=s;t<4*s+28;t++)n=u[t-1],(t%s==0||8===s&&t%s==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],t%s==0&&(n=n<<8^n>>>24^o<<24,o=o<<1^283*(o>>7))),u[t]=u[t-s]^n;for(i=0;t;i++,t--)n=u[3&i?t:t-4],l[i]=t<=4||i<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}return e.prototype.decrypt=function(e,t,i,n,r,a){for(var s,o,u,l=this._key[1],c=e^l[0],d=n^l[1],h=i^l[2],p=t^l[3],f=l.length/4-2,m=4,t=this._tables[1],g=t[0],y=t[1],v=t[2],_=t[3],b=t[4],T=0;T<f;T++)s=g[c>>>24]^y[d>>16&255]^v[h>>8&255]^_[255&p]^l[m],o=g[d>>>24]^y[h>>16&255]^v[p>>8&255]^_[255&c]^l[m+1],u=g[h>>>24]^y[p>>16&255]^v[c>>8&255]^_[255&d]^l[m+2],p=g[p>>>24]^y[c>>16&255]^v[d>>8&255]^_[255&h]^l[m+3],m+=4,c=s,d=o,h=u;for(T=0;T<4;T++)r[(3&-T)+a]=b[c>>>24]<<24^b[d>>16&255]<<16^b[h>>8&255]<<8^b[255&p]^l[m++],s=c,c=d,d=h,h=p,p=s},e}(),l=function(t){function e(){var e=t.call(this,r)||this;return e.jobs=[],e.delay=1,e.timeout_=null,e}n(e,t);var i=e.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(r),g=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},s=function(){function u(e,t,i,n){var r=u.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s)),o=r;o<a.length;o+=r)i=new Uint32Array([g(a[o-4]),g(a[o-3]),g(a[o-2]),g(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s));this.asyncStream_.push(function(){var e;n(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))})}return u.prototype.decryptChunk_=function(t,i,n,r){return function(){var e=function(e,t,i){for(var n,r,a,s,o=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),u=new m(Array.prototype.slice.call(t)),e=new Uint8Array(e.byteLength),l=new Int32Array(e.buffer),c=i[0],d=i[1],h=i[2],p=i[3],f=0;f<o.length;f+=4)n=g(o[f]),r=g(o[f+1]),a=g(o[f+2]),s=g(o[f+3]),u.decrypt(n,r,a,s,l,f),l[f]=g(l[f]^c),l[f+1]=g(l[f+1]^d),l[f+2]=g(l[f+2]^h),l[f+3]=g(l[f+3]^p),c=n,d=r,h=a,p=s;return e}(t,i,n);r.set(e,t.byteOffset)}},i(u,null,[{key:"STEP",get:function(){return 32e3}}]),u}(),function(a){a.onmessage=function(e){var r=e.data,t=new Uint8Array(r.encrypted.bytes,r.encrypted.byteOffset,r.encrypted.byteLength),i=new Uint32Array(r.key.bytes,r.key.byteOffset,r.key.byteLength/4),e=new Uint32Array(r.iv.bytes,r.iv.byteOffset,r.iv.byteLength/4);new s(t,i,e,function(e,t){var i,n;a.postMessage((i={source:r.source,decrypted:t},n={}
1,Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t}),n),[t.buffer])})}}(a);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}}),Wl={AUDIO:function(s,o){return function(){var e=o.segmentLoaders[s],t=o.mediaTypes[s],i=o.blacklistCurrentPlaylist;bl(e,t);var n=t.activeTrack(),e=t.activeGroup(),e=(e.filter(function(e){return e.default})[0]||e[0]).id,r=t.tracks[e];if(n!==r){for(var a in ir.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),t.tracks)t.tracks[a].enabled=t.tracks[a]===r;t.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(i,n){return function(){var e=n.segmentLoaders[i],t=n.mediaTypes[i];ir.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),bl(e,t);e=t.activeTrack();e&&(e.mode="disabled"),t.onTrackChanged()}}},zl={AUDIO:function(e,t,i){var n,r,a;t&&(n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",Wl[e](e,i)))},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",Wl[e](e,i))}},Gl={AUDIO:function(s,o){var u=o.vhs,l=o.sourceType,e=o.segmentLoaders[s],c=o.requestOptions,t=o.master,d=t.mediaGroups,i=t.playlists,t=o.mediaTypes[s],h=t.groups,p=t.tracks,f=o.masterPlaylistLoader;d[s]&&0!==Object.keys(d[s]).length||(d[s]={main:{default:{default:!0}}});for(var n in d[s])!function(r){h[r]||(h[r]=[]);var e,a=i.filter(function(e){return e.attributes[s]===r});for(e in d[s][r])!function(e){var t=d[s][r][e];!a.filter(function(e){return e.resolvedUri!==t.resolvedUri}).length&&a.length&&delete t.resolvedUri;var i,n=void 0,n="vhs-json"===l&&t.playlists?new _u(t.playlists[0],u,c):t.resolvedUri?new _u(t.resolvedUri,u,c):t.playlists&&"dash"===l?new Eu(t.playlists[0],u,c,f):null,t=ir.mergeOptions({id:e,playlistLoader:n},t);zl[s](s,t.playlistLoader,o),h[r].push(t),void 0===p[e]&&(n=new ir.AudioTrack({id:e,kind:(n=(i=t).default?"main":"alternative",i.characteristics&&0<=i.characteristics.indexOf("public.accessibility.describes-video")&&(n="main-desc"),n),enabled:!1,language:t.language,default:t.default,label:e}),p[e]=n)}(e)}(n);e.on("error",Wl[s](s,o))},SUBTITLES:function(e,t){var i,n=t.tech,r=t.vhs,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions,u=t.master.mediaGroups,l=t.mediaTypes[e],c=l.groups,d=l.tracks,h=t.masterPlaylistLoader;for(i in u[e])for(var p in c[i]||(c[i]=[]),u[e][i])if(!u[e][i][p].forced){var f=u[e][i][p],m=void 0;if("hls"===a)m=new _u(f.resolvedUri,r,o);else if("dash"===a){if(!f.playlists.filter(function(e){return e.excludeUntil!==1/0}).length)return;m=new Eu(f.playlists[0],r,o,h)}else"vhs-json"===a&&(m=new _u(f.playlists?f.playlists[0]:f.resolvedUri,r,o));f=ir.mergeOptions({id:p,playlistLoader:m},f),zl[e](e,f.playlistLoader,t),c[i].push(f),void 0===d[p]&&(f=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track,d[p]=f)}s.on("error",Wl[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i,n=t.tech,r=t.master.mediaGroups,t=t.mediaTypes[e],a=t.groups,s=t.tracks;for(i in r[e])for(var o in a[i]||(a[i]=[]),r[e][i]){var u=r[e][i][o];u.instreamId.match(/CC\d/)&&(a[i].push(ir.mergeOptions({id:o},u)),void 0===s[o]&&(u=n.addRemoteTextTrack({id:u.instreamId,kind:"captions",default:u.default&&u.autoselect,language:u.language,label:o},!1).track,s[o]=u))}}},Xl={AUDIO:function(i,n){return function(){var e,t=n.mediaTypes[i].tracks;for(e in t)if(t[e].enabled)return t[e];return null}},SUBTITLES:function(i,n){return function(){var e,t=n.mediaTypes[i].tracks;for(e in t)if("showing"===t[e].mode||"hidden"===t[e].mode)return t[e];return null}}},Kl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Yl=function(g){function e(e){var t,i=g.call(this)||this,n=e.src,r=e.handleManifestRedirects,a=e.withCredentials,s=e.tech,o=e.bandwidth,u=e.externVhs,l=e.useCueTags,c=e.blacklistDuration,d=e.enableLowInitialPlaylist,h=e.sourceType,p=e.cacheEncryptionKeys,f=e.handlePartialData,m=e.experimentalBufferBasedABR;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");wl=u,i.experimentalBufferBasedABR=Boolean(m),i.withCredentials=a,i.tech_=s,i.vhs_=s.vhs,i.sourceType_=h,i.useCueTags_=l,i.blacklistDuration=c,i.enableLowInitialPlaylist=d,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:a,handleManifestRedirects:r,timeout:null},i.on("error",i.pauseLoading),i.mediaTypes_=(t={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:dl,activeTrack:dl,onGroupChanged:dl,onTrackChanged:dl}}),t),i.mediaSource=new or.MediaSource,i.handleDurationChange_=i.handleDurationChange_.bind(nr(i)),i.handleSourceOpen_=i.handleSourceOpen_.bind(nr(i)),i.handleSourceEnded_=i.handleSourceEnded_.bind(nr(i)),i.mediaSource.addEventListener("durationchange",i.handleDurationChange_),i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_),i.mediaSource.addEventListener("sourceended",i.handleSourceEnded_),i.seekable_=ir.createTimeRanges(),i.hasPlayed_=!1,i.syncController_=new Vl(e),i.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new ql,i.sourceUpdater_=new Ul(i.mediaSource),i.inbandTextTracks_={},i.timelineChangeController_=new Hl;f={vhs:i.vhs_,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.duration()},hasPlayed:function(){return i.hasPlayed_},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:o,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:p,handlePartialData:f,sourceUpdater:i.sourceUpdater_,timelineChangeController:i.timelineChangeController_};return i.masterPlaylistLoader_=new("dash"===i.sourceType_?Eu:_u)(n,i.vhs_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new cl(ir.mergeOptions(f,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),e),i.audioSegmentLoader_=new cl(ir.mergeOptions(f,{loaderType:"audio"}),e),i.subtitleSegmentLoader_=new Fl(ir.mergeOptions(f,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),e),i.setupSegmentLoaderListeners_(),i.experimentalBufferBasedABR&&(i.masterPlaylistLoader_.one("loadedplaylist",function(){return i.startABRTimer_()}),i.tech_.on("pause",function(){return i.stopABRTimer_()}),i.tech_.on("play",function(){return i.startABRTimer_()})),Kl.forEach(function(e){i[e+"_"]=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]}.bind(nr(i),e)}),i.logger_=Ku("MPC"),i.triggeredFmp4Usage=!1,i.masterPlaylistLoader_.load(),i}rr(e,g);var t=e.prototype;return t.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=or.setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(or.clearInterval(this.abrTimer_),this.abrTimer_=null)},t.setupMasterPlaylistLoaderListeners_=function(){var i=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=i.masterPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Po(i.masterPlaylistLoader_.master,i.masterPlaylistLoader_.media())?i.requestOptions_.timeout=0:i.requestOptions_.timeout=t,e.endList&&"none"!==i.tech_.preload()&&(i.mainSegmentLoader_.playlist(e,i.requestOptions_),i.mainSegmentLoader_.load()),Sl({sourceType:i.sourceType_,segmentLoaders:{AUDIO:i.audioSegmentLoader_,SUBTITLES:i.subtitleSegmentLoader_,main:i.mainSegmentLoader_},tech:i.tech_,requestOptions:i.requestOptions_,masterPlaylistLoader:i.masterPlaylistLoader_,vhs:i.vhs_,master:i.master(),mediaTypes:i.mediaTypes_,blacklistCurrentPlaylist:i.blackl
1istCurrentPlaylist.bind(i)}),i.triggerPresenceUsage_(i.master(),e),i.setupFirstPlay(),!i.mediaTypes_.AUDIO.activePlaylistLoader||i.mediaTypes_.AUDIO.activePlaylistLoader.media()?i.trigger("selectedinitialmedia"):i.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){i.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var e,t=i.masterPlaylistLoader_.media();if(!t){if(i.excludeUnsupportedVariants_(),i.enableLowInitialPlaylist&&(e=i.selectInitialPlaylist()),!(e=e||i.selectPlaylist())||!i.shouldSwitchToMedia_(e))return;if(i.initialMedia_=e,i.masterPlaylistLoader_.media(i.initialMedia_),!("vhs-json"===i.sourceType_&&i.initialMedia_.segments))return;t=i.initialMedia_}i.handleUpdatedMediaPlaylist(t)}),this.masterPlaylistLoader_.on("error",function(){i.blacklistCurrentPlaylist(i.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){i.mainSegmentLoader_.abort(),i.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var e=i.masterPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Po(i.masterPlaylistLoader_.master,i.masterPlaylistLoader_.media())?i.requestOptions_.timeout=0:i.requestOptions_.timeout=t,i.mainSegmentLoader_.playlist(e,i.requestOptions_),i.mainSegmentLoader_.load(),i.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var e=i.masterPlaylistLoader_.media();i.stuckAtPlaylistEnd_(e)&&(i.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),i.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){i.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),i.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){i.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),i.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},t.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},t.triggerPresenceUsage_=function(e,t){var i,n=e.mediaGroups||{},r=!0,e=Object.keys(n.AUDIO);for(i in n.AUDIO)for(var a in n.AUDIO[i])n.AUDIO[i][a].uri||(r=!1);r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),wl.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),e.length&&1<Object.keys(n.AUDIO[e[0]]).length&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},t.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),i=this.tech_.buffered();return function(e){var t=e.currentPlaylist,i=e.nextPlaylist,n=e.forwardBuffer,r=e.bufferLowWaterLine,a=e.bufferHighWaterLine,s=e.duration,o=e.experimentalBufferBasedABR,u=e.log;if(!i)return ir.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(i.id===t.id)return!1;e=o?Iu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Iu.MAX_BUFFER_LOW_WATER_LINE;if(s<e)return u(l+" as duration < max low water line ("+s+" < "+e+")"),!0;e=i.attributes.BANDWIDTH,i=t.attributes.BANDWIDTH;if(e<i&&(!o||n<a)){t=l+" as next bandwidth < current bandwidth ("+e+" < "+i+")";return o&&(t+=" and forwardBuffer < bufferHighWaterLine ("+n+" < "+a+")"),u(t),!0}if((!o||i<e)&&r<=n){r=l+" as forwardBuffer >= bufferLowWaterLine ("+n+" >= "+r+")";return o&&(r+=" and next bandwidth > current bandwidth ("+e+" > "+i+")"),u(r),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:i.length?i.end(i.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var t=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=t.selectPlaylist();t.shouldSwitchToMedia_(e)&&t.masterPlaylistLoader_.media(e),t.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){t.error=t.mainSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){t.error=t.audioSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){t.logger_("main segment loader ended"),t.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(e){t.experimentalBufferBasedABR||(t.delegateLoaders_("all",["abort"]),t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});function e(){if(!t.sourceUpdater_.hasCreatedSourceBuffers())return t.tryToCreateSourceBuffers_();var e=t.getCodecsOrExclude_();e&&t.sourceUpdater_.addOrChangeSourceBuffers(e)}this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){t.logger_("audioSegmentLoader ended"),t.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},t.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything(function(){ir.browser.IE_VERSION||ir.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},t.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(ir.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0},t.handleSourceOpen_=function(){var e;this.tryToCreateSourceBuffers_(),!this.tech_.autoplay()||void 0!==(e=this.tech_.play())&&"function"==typeof e.then&&e.then(null,function(e){}),this.trigger("sourceopen")},t.handleSourceEnded_=function(){var e,t;!this.inbandTextTracks_.metadataTrack_||(e=this.inbandTextTracks_.metadataTrack_.cues)&&e.length&&(t=this.duration(),e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t)},t.handleDurationChange_=function(){this.tech_.trigger("durationchange")},t.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=(this.mainSegmentLoader_.currentMediaInfo_&&!this.mainSegmentLoader_.currentMediaInfo_.hasVideo||e)&&this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},t.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var i=wl.Playlist.playlistEnd(e,t),e=this.tech_.currentTime(),t=this.tech_.buffered();if(!t.length)return i-e<=.1;t=t.end(t.length-1);return t-e<=.1&&i-t<=.1},t.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var i=e.playlist||this.masterPlaylistLoader_.media();
1if(t=t||e.blacklistDuration||this.blacklistDuration,!i)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var n,r=this.masterPlaylistLoader_.master.playlists,a=r.filter(Ao),s=1===a.length&&a[0]===i;if(1===r.length&&t!==1/0)return ir.log.warn("Problem encountered with playlist "+i.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(s);s&&(n=!1,r.forEach(function(e){var t;e===i||void 0!==(t=e.excludeUntil)&&t!==1/0&&(n=!0,delete e.excludeUntil)}),n&&(ir.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))),i.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});a=this.selectPlaylist();if(!a)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");r=e.internal?this.logger_:ir.log.warn,t=e.message?" "+e.message:"";r((e.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+t+" Switching to playlist "+a.id+"."),a.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),a.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);t=a.targetDuration/2*1e3||5e3,t="number"==typeof a.lastRequest&&Date.now()-a.lastRequest<=t;return this.masterPlaylistLoader_.media(a,s||t)},t.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},t.delegateLoaders_=function(i,e){var n=this,r=[],t="all"===i;!t&&"main"!==i||r.push(this.masterPlaylistLoader_);var a=[];!t&&"audio"!==i||a.push("AUDIO"),!t&&"subtitle"!==i||(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(function(e){e=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;e&&r.push(e)}),["main","audio","subtitle"].forEach(function(e){var t=n[e+"SegmentLoader_"];!t||i!==e&&"all"!==i||r.push(t)}),r.forEach(function(t){return e.forEach(function(e){"function"==typeof t[e]&&t[e]()})})},t.setCurrentTime=function(e){var t=yo(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:wl.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.duration());if(null!==i){var n,r,a=this.masterPlaylistLoader_.master.suggestedPresentationDelay,s=wl.Playlist.seekable(t,i,a);if(0!==s.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=wl.Playlist.seekable(t,i,a)).length)return}this.seekable_&&this.seekable_.length&&(n=this.seekable_.end(0),r=this.seekable_.start(0)),!e||e.start(0)>s.end(0)||s.start(0)>e.end(0)?this.seekable_=s:this.seekable_=ir.createTimeRanges([[(e.start(0)>s.start(0)?e:s).start(0),(e.end(0)<s.end(0)?e:s).end(0)]]),this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===n&&this.seekable_.start(0)===r||(this.logger_("seekable updated ["+_o(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},t.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();return t.length?void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))):void 0}e=this.tech_.buffered(),t=wl.Playlist.duration(this.masterPlaylistLoader_.media());0<e.length&&(t=Math.max(t,e.end(e.length-1))),this.mediaSource.duration!==t&&this.sourceUpdater_.setDuration(t)}
1,t.dispose=function(){var n=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(e){var t,i=n.mediaTypes_[e].groups;for(t in i)i[t].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},t.master=function(){return this.masterPlaylistLoader_.master},t.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},t.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},t.getCodecsOrExclude_=function(){var n=this,r={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};r.video=r.main;var e=Xu(this.master(),this.media()),a={},t=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(r.main.hasVideo&&(a.video=e.video||r.main.videoCodec||ou),r.main.isMuxed&&(a.video+=","+(e.audio||r.main.audioCodec||su)),(r.main.hasAudio&&!r.main.isMuxed||r.audio.hasAudio||t)&&(a.audio=e.audio||r.main.audioCodec||r.audio.audioCodec||su,r.audio.isFmp4=(r.main.hasAudio&&!r.main.isMuxed?r.main:r.audio).isFmp4),a.audio||a.video){var s,i,o={};if(["video","audio"].forEach(function(e){var t,i;a.hasOwnProperty(e)&&(t=r[e].isFmp4,i=a[e],!(t?uu:pu)(i))&&(i=r[e].isFmp4?"browser":"muxer",o[i]=o[i]||[],o[i].push(a[e]),"audio"===e&&(s=i))}),t&&s&&this.media().attributes.AUDIO&&(i=this.media().attributes.AUDIO,this.master().playlists.forEac
1h(function(e){(e.attributes&&e.attributes.AUDIO)===i&&e!==n.media()&&(e.excludeUntil=1/0)}),this.logger_("excluding audio group "+i+" as "+s+' does not support codec(s): "'+a.audio+'"')),!Object.keys(o).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach(function(e){var t=(fu(n.sourceUpdater_.codecs[e]||"")[e]||{}).type,i=(fu(a[e]||"")[e]||{}).type;t&&i&&t.toLowerCase()!==i.toLowerCase()&&u.push('"'+n.sourceUpdater_.codecs[e]+'" -> "'+a[e]+'"')}),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return a}t=Object.keys(o).reduce(function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:t,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){var e;"open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_()||(e=this.getCodecsOrExclude_())&&(this.sourceUpdater_.createSourceBuffers(e),e=[e.video,e.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(e))},t.excludeUnsupportedVariants_=function(){var n=this,r=this.master().playlists,a=[];Object.keys(r).forEach(function(e){var t,i=r[e];-1===a.indexOf(i.id)&&(a.push(i.id),t=[],!(e=Xu(n.master,i)).audio||pu(e.audio)||uu(e.audio)||(i.excludeUntil=1/0,t.push("audio codec "+e.audio)),!e.video||pu(e.video)||uu(e.video)||(i.excludeUntil=1/0,t.push("video codec "+e.video)),e.text&&"stpp.ttml.im1t"===e.text&&(i.excludeUntil=1/0,t.push("text codec "+e.text)),t.length&&n.logger_("excluding "+i.id+" as codecs "+t.join(", ")+" are unsupported"))})},t.excludeIncompatibleVariants_=function(e){var a=this,s=fu(e),o=Object.keys(s).length;
1this.master().playlists.forEach(function(e){var t,i,n,r;e.excludeUntil!==1/0&&(n={},r=2,t=[],((i=Xu(a.masterPlaylistLoader_.master,e)).audio||i.video)&&(i=[i.video,i.audio].filter(Boolean).join(","),n=fu(i),r=Object.keys(n).length),r!==o&&(t.push('codec count "'+r+'" !== "'+o+'"'),e.excludeUntil=1/0),a.sourceUpdater_.canChangeType()||(n.video&&s.video&&n.video.type.toLowerCase()!==s.video.type.toLowerCase()&&(t.push('video codec "'+n.video.type+'" !== "'+s.video.type+'"'),e.excludeUntil=1/0),n.audio&&s.audio&&n.audio.type.toLowerCase()!==s.audio.type.toLowerCase()&&(e.excludeUntil=1/0,t.push('audio codec "'+n.audio.type+'" !== "'+s.audio.type+'"'))),t.length&&a.logger_("blacklisting "+e.id+": "+t.join(" && ")))})},t.updateAdCues_=function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){if(void 0===i&&(i=0),e.segments)for(var n=i,r=0;r<e.segments.length;r++){var a,s,o,u=e.segments[r];if(o=o||function(e,t){for(var i=e.cues,n=0;n<i.length;n++){var r=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null}(t,n+u.duration/2)){if("cueIn"in u){o.endTime=n,o.adEndTime=n,n+=u.duration,o=null;continue}if(n<o.endTime){n+=u.duration;continue}o.endTime+=u.duration}else"cueOut"in u&&((o=new or.VTTCue(n,n+u.duration,u.cueOut)).adStartTime=n,o.adEndTime=n+parseFloat(u.cueOut),t.addCue(o)),"cueOutCont"in u&&(a=(s=u.cueOutCont.split("/").map(parseFloat))[0],s=s[1],(o=new or.VTTCue(n,n+u.duration,"")).adStartTime=n-a,o.adEndTime=o.adStartTime+s,t.addCue(o));n+=u.duration}}(e,this.cueTagsTrack_,t)},t.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Iu.GOAL_BUFFER_LENGTH,i=Iu.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,Iu.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)},t.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Iu.BUFFER_LOW_WATER_LINE,i=Iu.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,Iu.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,Iu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.experimentalBufferBasedABR?r:n)},t.bufferHighWaterLine=function(){return Iu.BUFFER_HIGH_WATER_LINE},e}(ir.EventTarget),$l=["seeking","seeked","pause","playing","error"],Ql=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ku("PlaybackWatcher"),this.logger_("initialize");function i(){return t.monitorCurrentTime_()}function n(){return t.techWaiting_()}function r(){return t.cancelTimer_()}function a(){return t.fixesBadSeeks_()}var s=this.masterPlaylistController_,o=["main","subtitle","audio"],u={};o.forEach(function(e){u[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",u[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",u[e].reset),t.tech_.on(["seeked","seeking"],u[e].reset)}),this.tech_.on("seekablechanged",a),this.tech_.on("waiting",n),this.tech_.on($l,r),this.tech_.on("canplay",i),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",a),t.tech_.off("waiting",n),t.tech_.off($l,r),t.tech_.off("canplay",i),o.forEach(function(e){s[e+"SegmentLoader_"].off("appendsdone",u[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",u[e].reset),t.tech_.off(["seeked","seeking"],u[e].reset)}),t.checkCurrentTimeTimeout_&&or.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&or.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=or.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];0<this[e+"StalledDownloads_"]&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,i=t[e+"SegmentLoader_"],n=i.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;
1if(e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[e+"Buffered_"],n);this[e+"Buffered_"]=n,r?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:bo(n)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),i=this.tech_.currentTime();if(this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,i)&&(e=(r=t.start(0))+(r===t.end(0)?0:.1)),void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+_o(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var n,r,a=this.tech_.buffered();return n={buffered:a,targetDuration:this.media().targetDuration,currentTime:i},r=n.buffered,t=n.targetDuration,n=n.currentTime,!(!r.length||r.end(0)-r.start(0)<2*t||n>r.start(0))&&r.start(0)-n<t&&(e=a.start(0)+.1,this.logger_("Buffered region starts ("+a.start(0)+")  just beyond seek point ("+i+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){var e,t;this.techWaiting_()||(e=this.tech_.currentTime(),t=this.tech_.buffered(),(t=yo(t,e)).length&&e+3<=t.end(0)&&(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+t.start(0)+" -> "+t.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})))},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}e=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:e.audioBuffered(),videoBuffered:e.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;e=vo(i,t);if(0<e.length){i=e.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+i+", seeking to "+e.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*i,t),!0}return!1},t.afterSeekableWindow_=function(e,t,i,n){if(void 0===n&&(n=!1),!e.length)return!1;var r=e.end(e.length-1)+.1;return!i.endList&&n&&(r=e.end(e.length-1)+3*i.targetDuration),r<t},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&0<e.start(0)&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t,i,n=e.videoBuffered,r=e.audioBuffered,a=e.currentTime;if(n)return n.length&&r.length?(i=yo(n,a-3),e=yo(n,a),(r=yo(r,a)).length&&!e.length&&i.length&&(t={start:i.end(0),end:r.end(0)})):vo(n,a).length||(t=this.gapFromVideoUnderflow_(n,a)),!!t&&(this.logger_("Encountered a gap in video from "+t.start+" to "+t.end+". Seeking to current time "+a),!0)},t.skipTheGap_=function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),t=vo(t,i);this.cancelTimer_(),0!==t.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",t.start(0)),this.tech_.setCurrentTime(t.start(0)+bu),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}
1,t.gapFromVideoUnderflow_=function(e,t){for(var i=function(e){if(e.length<2)return ir.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return ir.createTimeRanges(t)}(e),n=0;n<i.length;n++){var r=i.start(n),a=i.end(n);if(t-r<4&&2<t-r)return{start:r,end:a}}return null},e}(),Jl={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},e=function(e){Cl(this,e)},Zl={PlaylistLoader:_u,Playlist:Su,utils:$e,STANDARD_PLAYLIST_SELECTOR:ar,INITIAL_PLAYLIST_SELECTOR:function(){var t=this,e=this.playlists.master.playlists.filter(Su.isEnabled);return Qu(e,Ju),e.filter(function(e){return!!Xu(t.playlists.master,e).video})[0]||null},lastBandwidthSelector:ar,movingAverageBandwidthSelector:function(t){var i=-1;if(t<0||1<t)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&or.devicePixelRatio||1;return i<0&&(i=this.systemBandwidth),i=t*this.systemBandwidth+(1-t)*i,Zu(this.playlists.master,i,parseInt($u(this.tech_.el(),"width"),10)*e,parseInt($u(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Ju,comparePlaylistResolution:function(e,t){var i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||or.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),i===(n=n||or.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:Do()};Object.keys(Iu).forEach(function(t){Object.defineProperty(Zl,t,{get:function(){return ir.log.warn("using Vhs."+t+" is UNSAFE be sure you know what you are doing"),Iu[t]},set:function(e){ir.log.warn("using Vhs."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0?ir.log.warn("value of Vhs."+t+" must be greater than or equal to 0"):Iu[t]=e}})});function ec(e,t){for(var i=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}var tc="videojs-vhs";Zl.canPlaySource=function(){return ir.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};function ic(e){var n=e.player,t=e.sourceKeySystems,i=e.audioMedia,e=e.mainPlaylists;if(!n.eme.initializeMediaKeys)return Promise.resolve();var r,e=(e=e=i?e.concat([i]):e,r=Object.keys(t),e.reduce(function(e,n){if(!n.contentProtection)return e;var t=r.reduce(function(e,t){var i=n.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e},{});return Object.keys(t).length&&e.push(t),e},[])),a=[],s=[];return e.forEach(function(e){s.push(new Promise(function(e,t){n.tech_.one("keysessioncreated",e)})),a.push(new Promise(function(t,i){n.eme.initializeMediaKeys({keySystems:e},function(e){e?i(e):t()})}))}),Promise.race([Promise.all(a),Promise.race(s)])}function nc(e){var t=e.player;return!!(e=function(e,t,i){if(!e)return e;var n={video:t&&t.attributes&&t.attributes.CODECS,audio:i&&i.attributes&&i.attributes.CODECS};!n.audio&&n.video&&1<n.video.split(",").length&&n.video.split(",").forEach(function(e){e=e.trim(),du(e)?n.audio=e:hu(e)&&(n.video=e)});var r,a=n.video?'video/mp4;codecs="'+n.video+'"':null,s=n.audio?'audio/mp4;codecs="'+n.audio+'"':null,o={};for(r in e)o[r]={audioContentType:s,videoContentType:a},t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(o[r].pssh=t.contentProtection[r].pssh),"string"==typeof e[r]&&(o[r].url=e[r]);return ir.mergeOptions(e,o)}(e.sourceKeySystems,e.media,e.audioMedia))&&(!((t.currentSource().keySystems=e)&&!t.eme)||(ir.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))}function rc(){if(!or.localStorage)return null;var e=or.localStorage.getItem(tc);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}Zl.supportsNativeHls=function(){if(!sr||!sr.createElement)return!1;var t=sr.createElement("video");if(!ir.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),Zl.supportsNativeDash=!!(sr&&sr.createElement&&ir.getTech("Html5").isSupported())&&/maybe|probably/i.test(sr.createElement("video").canPlayType("application/d
1ash+xml")),Zl.supportsTypeNatively=function(e){return"hls"===e?Zl.supportsNativeHls:"dash"===e&&Zl.supportsNativeDash},Zl.isSupported=function(){return ir.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var ac=function(r){function e(e,t,i){var n=r.call(this,t,ir.mergeOptions(i.hls,i.vhs))||this;if(i.hls&&Object.keys(i.hls).length&&ir.log.warn("Using hls options is deprecated. Use vhs instead."),n.logger_=Ku("VhsHandler"),t.options_&&t.options_.playerId&&((i=ir(t.options_.playerId)).hasOwnProperty("hls")||Object.defineProperty(i,"hls",{get:function(){return ir.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"hls-player-access"}),nr(n)},configurable:!0}),i.hasOwnProperty("vhs")||Object.defineProperty(i,"vhs",{get:function(){return ir.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"vhs-player-access"}),nr(n)},configurable:!0}),i.hasOwnProperty("dash")||Object.defineProperty(i,"dash",{get:function(){return ir.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),nr(n)},configurable:!0}),n.player_=i),n.tech_=t,n.source_=e,n.stats={},n.ignoreNextSeekingEvent_=!1,n.setOptions_(),n.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(n.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return n.on(sr,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=sr.fullscreenElement||sr.webkitFullscreenElement||sr.mozFullScreenElement||sr.msFullscreenElement;t&&t.contains(n.tech_.el())&&n.masterPlaylistController_.smoothQualityChange_()}),n.on(n.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),n.on(n.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),n.on(n.tech_,"play",n.play),n}rr(e,r);var t=e.prototype;return t.setOptions_=function(){var e,t=this;this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage&&((e=rc())&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Iu.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Iu.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach(function(e){void 0!==t.source_[e]&&(t.options_[e]=t.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},t.src=function(e,t){var n=this;e&&(this.setOptions_(),this.options_.src=0===(e=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e,this.options_.tech=this.tech_,this.options_.externVhs=Zl,this.options_.sourceType=_r(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new Yl(this.options_),t=ir.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_}),this.playbackWatcher_=new Ql(t),this.masterPlaylistController_.on("error",function(){var e=ir.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}),t=this.options_.experimentalBufferBasedABR?Zl.movingAverageBandwidthSelector(.55):Zl.STANDARD_PLAYLIST_SELECTOR,this.masterPlaylistController_.selectPlaylist=(this.selectPlaylist||t).bind(this),this.masterPlaylistController_.selectInitialPlaylist=Zl.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth}
1,set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=0<this.throughput?1/this.throughput:0;return Math.floor(1/(e+t))},set:function(){ir.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 n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return bo(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return bo(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(or.localStorage){var t=(t=rc())?ir.mergeOptions(t,e):e;try{or.localStorage.setItem(tc,JSON.stringify(t))}catch(e){return}}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var i,e;e=(i=n).playlists,i.representations=function(){return e&&e.master&&e.master.playlists?e.master.playlists.filter(function(e){return!Io(e)}).map(function(e,t){return new kl(i,e,e.id)}):[]}}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){n.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=or.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_)))},t.setupEme_=function(){var t=this,e=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=nc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});11!==ir.browser.IE_VERSION&&i?(this.logger_("waiting for EME key session creation"),ic({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){t.logger_("created EME key session"),t.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(e){t.logger_("error while creating EME key session",e),t.player_.error({message:"Failed to initialize media keys for EME",code:3})})):this.masterPlaylistController_.sourceUpdater_.initializedEme()},t.setupQualityLevels_=function(){var i=this,e=ir.players[this.tech_.options_.playerId];
1e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var t,e;t=i.qualityLevels_,(e=i).representations().forEach(function(e){t.addQualityLevel(e)}),ec(t,e.playlists)}),this.playlists.on("mediachange",function(){ec(i.qualityLevels_,i.playlists)}))},e.version=function(){return{"@videojs/http-streaming":"2.4.2","mux.js":"5.8.0","mpd-parser":"0.15.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},t.version=function(){return this.constructor.version()},t.canChangeType=function(){return Ul.canChangeType()},t.play=function(){this.masterPlaylistController_.play()},t.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},t.duration=function(){return this.masterPlaylistController_.duration()},t.seekable=function(){return this.masterPlaylistController_.seekable()},t.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),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,this.mediaSourceUrl_&&or.URL.revokeObjectURL&&(or.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),r.prototype.dispose.call(this)},t.convertToProgramTime=function(e,t){return jo({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},t.seekToProgramTime=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=2),Vo({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},e}(ir.getComponent("Component")),sc={name:"videojs-http-streaming",VERSION:"2.4.2",canHandleSource:function(e,t){void 0===t&&(t={});t=ir.mergeOptions(ir.options,t);return sc.canPlayType(e.type,t)},handleSource:function(e,t,i){void 0===i&&(i={});i=ir.mergeOptions(ir.options,i);return t.vhs=new ac(e,t,i),ir.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return ir.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Do(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});t=ir.mergeOptions(ir.options,t).vhs.overrideNative,t=void 0===t?!ir.browser.IS_ANY_SAFARI:t,e=_r(e);return e&&(!Zl.supportsTypeNatively(e)||t)?"maybe":""}};return uu("avc1.4d400d,mp4a.40.2")&&ir.getTech("Html5").registerSourceHandler(sc,0),ir.VhsHandler=ac,Object.defineProperty(ir,"HlsHandler",{get:function(){return ir.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),ac},configurable:!0}),ir.VhsSourceHandler=sc,Object.defineProperty(ir,"HlsSourceHandler",{get:function(){return ir.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),sc},configurable:!0}),ir.Vhs=Zl,Object.defineProperty(ir,"Hls",{get:function(){return ir.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Zl},configurable:!0}),ir.use||(ir.registerComponent("Hls",Zl),ir.registerComponent("Vhs",Zl)),ir.options.vhs=ir.options.vhs||{},ir.options.hls=ir.options.hls||{},ir.registerPlugin?ir.registerPlugin("reloadSourceOnError",e):ir.plugin("reloadSourceOnError",e),ir});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.