⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.63
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
wixi.com.ng
/
public
/
assets
/
front
/
js
/
Edit File: video.min.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){var t="7.0.5",e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},a={},s=Object.freeze({default:a}),o=s&&a||s,u=void 0!==e?e:"undefined"!=typeof window?window:{};"undefined"!=typeof document?r=document:(r=u["__GLOBAL_DOCUMENT_CACHE@4"])||(r=u["__GLOBAL_DOCUMENT_CACHE@4"]=o);var l=r,c=void 0,h="info",d=[],p=function(t,e){var i=c.levels[h],r=new RegExp("^("+i+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),d&&d.push([].concat(e)),e.unshift("VIDEOJS:"),n.console){var a=n.console[t];a||"debug"!==t||(a=n.console.info||n.console.log),a&&i&&r.test(t)&&a[Array.isArray(e)?"apply":"call"](n.console,e)}};(c=function(){for(var t=arguments.length,e=Array(t),i=0;i
',i=a.firstChild,a.setAttribute("style","display:none; position:absolute;"),l.body.appendChild(a));for(var s={},o=0;o
x',t=e.firstChild.href}return t},Qe=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(e)return e.pop().toLowerCase()}return""},Je=function(t){var e=n.location,i=$e(t);return(":"===i.protocol?e.protocol:i.protocol)+i.host!==e.protocol+e.host},Ze=Object.freeze({parseUrl:$e,getAbsoluteURL:Ke,getFileExtension:Qe,isCrossOrigin:Je}),ti=function(t){var e=ei.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},ei=Object.prototype.toString,ii=Object.freeze({default:ti,__moduleExports:ti}),ri=i(function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),ni=ri.left,ai=ri.right,si=Object.freeze({default:ri,__moduleExports:ri,left:ni,right:ai}),oi=ii&&ti||ii,ui=function(t,e,i){if(!oi(e))throw new TypeError("iterator must be a function");arguments.length<3&&(i=this),"[object Array]"===li.call(t)?function(t,e,i){for(var r=0,n=t.length;r
=t?e.push(n):n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t&&e.push(n)}if(l=!1,e.length!==this.activeCues_.length)l=!0;else for(var a=0;a
","":"‎","":"â€"," ":" "},qi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Wi={v:"title",lang:"lang"},zi={rt:"ruby"};function Gi(t,e){function i(){if(!e)return null;var t,i=e.match(/^([^<]*)(<[^>]*>?)?/);return t=i[1]?i[1]:i[2],e=e.substr(t.length),t}function r(t){return Vi[t]}function n(t){for(;f=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(f[0],r);return t}function a(e,i){var r=qi[e];if(!r)return null;var n=t.document.createElement(r);n.localName=r;var a=Wi[e];return a&&i&&(n[a]=i.trim()),n}for(var s,o,u,l=t.document.createElement("div"),c=l,h=[];null!==(s=i());)if("<"!==s[0])c.appendChild(t.document.createTextNode(n(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),c=c.parentNode);continue}var d,p=Bi(s.substr(1,s.length-2));if(p){d=t.document.createProcessingInstruction("timestamp",p),c.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=a(f[1],f[3])))continue;if(o=c,zi[(u=d).localName]&&zi[u.localName]!==o.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),c.appendChild(d),c=d}return l}var Xi=[[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 Yi(t){for(var e=0;e
=i[0]&&t<=i[1])return!0}return!1}function $i(){}function Ki(t,e,i){$i.call(this),this.cue=e,this.cueDiv=Gi(t,e.text);var r={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:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=t.document.createElement("div"),r={direction:function(t){var e=[],i="";if(!t||!t.childNodes)return"ltr";function r(t,e){for(var i=e.childNodes.length-1;0<=i;i--)t.push(e.childNodes[i])}function n(t){if(!t||!t.length)return null;var e=t.pop(),i=e.textContent||e.innerText;if(i){var a=i.match(/^.*(\n|\r)/);return a?a[t.length=0]:i}return"ruby"===e.tagName?n(t):e.childNodes?(r(t,e),n(t)):void 0}for(r(e,t);i=n(e);)for(var a=0;a
h&&(c=c<0?-1:1,c*=Math.ceil(h/l)*l),s<0&&(c+=""===a.vertical?i.height:i.width,o=o.reverse()),n.move(d,c)}else{var p=n.lineHeight/i.height*100;switch(a.lineAlign){case"middle":s-=p/2;break;case"end":s-=p}switch(a.vertical){case"":e.applyStyles({top:e.formatStyle(s,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(s,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],n=new Qi(e)}var f=function(t,e){for(var n,a=new Qi(t),s=1,o=0;o
t.left&&this.top
t.top},Qi.prototype.overlapsAny=function(t){for(var e=0;e
=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Qi.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left
t.right;case"+y":return this.top
t.bottom}},Qi.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Qi.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Qi.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,i=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||i}},Zi.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},Zi.convertCueToDOMTree=function(t,e){return t&&e?Gi(t,e):null},Zi.processCues=function(t,e,i){if(!t||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",i.appendChild(r),function(t){for(var e=0;e
',className:this.buildCSSClass(),tabIndex:0},i),"button"===e&&f.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=C({role:"button"},r),this.tabIndex_=i.tabIndex;var n=t.prototype.createEl.call(this,e,i,r);return this.createControlTextEl(n),n},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=M("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=1
',className:this.buildCSSClass()},e),i=C({type:"button"},i);var r=Xt.prototype.createEl.call(this,"button",e,i);return this.createControlTextEl(r),r},e.prototype.addChild=function(t){var e=1
'+this.localize(this.labelText_)+" "});return this.contentEl_=M("span",{className:i+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=l.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return Wr(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(Xt);zr.prototype.labelText_="Time",zr.prototype.controlText_="Time",Xt.registerComponent("TimeDisplay",zr);var Gr=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.on(i,"ended",n.handleEnded),n}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(zr);Gr.prototype.labelText_="Current Time",Gr.prototype.controlText_="Current Time",Xt.registerComponent("CurrentTimeDisplay",Gr);var Xr=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.on(i,"durationchange",n.updateContent),n.on(i,"loadedmetadata",n.throttledUpdateContent),n}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(zr);Xr.prototype.labelText_="Duration",Xr.prototype.controlText_="Duration",Xt.registerComponent("DurationDisplay",Xr);var Yr=function(t){function e(){return y(this,e),_(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},e}(Xt);Xt.registerComponent("TimeDivider",Yr);var $r=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.on(i,"durationchange",n.throttledUpdateContent),n.on(i,"ended",n.handleEnded),n}return v(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(zr);$r.prototype.labelText_="Remaining Time",$r.prototype.controlText_="Remaining Time",Xt.registerComponent("RemainingTimeDisplay",$r);var Kr=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}return v(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=M("div",{className:"vjs-live-display",innerHTML:'
'+this.localize("Stream Type")+"
"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(Xt);Xt.registerComponent("LiveDisplay",Kr);var Qr=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}return v(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var i=1
'+this.localize("Loaded")+"
: 0%"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),i=this.player_.duration(),r=this.player_.bufferedEnd(),n=this.partEls_,a=function(t,e){var i=t/e||0;return 100*(1<=i?1:i)+"%"};this.el_.style.width=a(r,i);for(var s=0;s
e.length;c--)this.el_.removeChild(n[c-1]);n.length=e.length},e}(Xt);Xt.registerComponent("LoadProgressBar",Jr);var Zr=function(t){function e(){return y(this,e),_(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,i){var r=$(this.el_),n=$(this.player_.el()),a=t.width*e;if(n&&r){var s=t.left-n.left+a,o=t.width-a+(n.right-t.right),u=r.width/2;s
r.width&&(u=r.width),this.el_.style.right="-"+u+"px",U(this.el_,i)}},e}(Xt);Xt.registerComponent("TimeTooltip",Zr);var tn=function(t){function e(){return y(this,e),_(this,t.apply(this,arguments))}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'
'+this.localize("Progress")+"
: 0%
"})},e.prototype.update=function(t,e){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=Wr(i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),i.player_.duration()),n=i.getChild("timeTooltip");n&&n.update(t,e,r)})},e}(Xt);tn.prototype.options_={children:[]},ne||se||tn.prototype.options_.children.push("timeTooltip"),Xt.registerComponent("PlayProgressBar",tn);var en=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.update=xt(Ot(n,n.update),25),n}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=i.player_.duration(),n=Wr(e*r,r);i.el_.style.left=t.width*e+"px",i.getChild("timeTooltip").update(t,e,n)})},e}(Xt);en.prototype.options_={children:["timeTooltip"]},Xt.registerComponent("MouseTimeDisplay",en);var rn=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.setEventHandlers_(),n}return v(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=xt(Ot(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Wr(t,i),Wr(i,i)],"{1} of {2}")),this.bar.update($(this.el_),e)},e.prototype.update=function(e){var i=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),i),i},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return 1<=t?1:t||0},e.prototype.handleMouseDown=function(e){rt(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(rt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&xe(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(Qr);rn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ne||se||rn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),rn.prototype.playerEvent="timeupdate",Xt.registerComponent("SeekBar",rn);var nn=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.handleMouseMove=xt(Ot(n,n.handleMouseMove),25),n.throttledHandleMouseSeek=xt(Ot(n,n.handleMouseSeek),25),n.enable(),n}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var i=e.getChild("mouseTimeDisplay"),r=e.el(),n=$(r),a=Q(r,t).x;1
'})},e}(Xt);Xt.registerComponent("VolumeLevel",on);var un=function(t){function e(i,r){y(this,e);var n=_(this,t.call(this,i,r));return n.on("slideractive",n.updateLastVolume_),n.on(i,"volumechange",n.updateARIAAttributes),i.ready(function(){return n.updateARIAAttributes()}),n}return v(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){rt(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){rt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},e}(Qr);un.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},un.prototype.playerEvent="volumechange",Xt.registerComponent("VolumeBar",un);var ln=function(t){function e(i){var r=1
=e.length&&(t=e.length-1),e[this.focusedChild_=t].el_.focus())},e}(Xt);Xt.registerComponent("Menu",dn);var pn=function(t){function e(i){var r=1
'+this.localize(this.options_.label)+"",tabIndex:-1},i),r)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(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}(Or);Xt.registerComponent("MenuItem",mn);var gn=function(t){function e(i,r){y(this,e);var a=r.track,s=i.textTracks();r.label=a.label||a.language||"Unknown",r.selected="showing"===a.mode;var o=_(this,t.call(this,i,r));o.track=a;var u=function(){for(var t=arguments.length,e=Array(t),i=0;i
\n
'+this.localize("Captions")+"
\n "),n+="",t.prototype.createEl.call(this,e,C({innerHTML:n},i),r)},e}(gn);Xt.registerComponent("SubsCapsMenuItem",En);var wn=function(t){function e(i){var r=1
e){r=i[n];break}this.player().playbackRate(r)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0
select",id:"captions-background-color-%s",label:"Color",options:[Un,Vn,Hn,jn,Nn,qn,Fn,Bn]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Wn,zn,Gn]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Vn,Un,Hn,jn,Nn,qn,Fn,Bn]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Wn,zn]},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:[Gn,zn,Wn]}};function Yn(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}Xn.windowColor.options=Xn.backgroundColor.options;var $n=function(t){function e(i,r){y(this,e),r.temporary=!1;var n=_(this,t.call(this,i,r));return n.updateDisplay=Ot(n,n.updateDisplay),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=M("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===r.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",function(){n.saveSettings(),n.close()}),n.on(n.$(".vjs-default-button"),"click",function(){n.setDefaults(),n.updateDisplay()}),k(Xn,function(t){n.on(n.$(t.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}return v(e,t),e.prototype.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},e.prototype.createElSelect_=function(t){var e=this,i=1
',this.localize(n.label),""+r+">",'
'].concat(n.options.map(function(t){var i=a+"-"+t[1].replace(/\W+/g,"");return['
',e.localize(t[1]),"
"].join("")})).concat("
").join("")},e.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['
','
',this.localize("Text"),"
",this.createElSelect_("color",t),'
',this.createElSelect_("textOpacity",t),"
","
"].join("")},e.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['
','
',this.localize("Background"),"
",this.createElSelect_("backgroundColor",t),'
',this.createElSelect_("backgroundOpacity",t),"
","
"].join("")},e.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['
','
',this.localize("Window"),"
",this.createElSelect_("windowColor",t),'
',this.createElSelect_("windowOpacity",t),"
","
"].join("")},e.prototype.createElColors_=function(){return M("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.prototype.createElFont_=function(){return M("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},e.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return M("div",{className:"vjs-track-settings-controls",innerHTML:['
',this.localize("Reset"),'
'+t+"
","
",'
'+this.localize("Done")+"
"].join("")})},e.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.prototype.label=function(){return this.localize("Caption Settings Dialog")},e.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.prototype.getValues=function(){var t=this;return function(t,e){var i=2
e.attributes.bandwidth||(t[l]={language:u,autoselect:!0,default:"main"===o,playlists:[(i=e,n=i.attributes,a=i.segments,s={attributes:(r={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},r["PROGRAM-ID"]=1,r),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:a,mediaSequence:a.length?a[0].number:1},n.contentProtection&&(s.contentProtection=n.contentProtection),s)],uri:""}),t},{})),u.length&&(l.mediaGroups.SUBTITLES.subs=u.reduce(function(t,e){var i,r,n,a,s=e.attributes.lang||"text";return t[s]||(t[s]={language:s,default:!1,autoselect:!1,playlists:[(i=e,n=i.attributes,a=i.segments,void 0===a&&(a=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration),{attributes:(r={NAME:n.id,BANDWIDTH:n.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:a,mediaSequence:a.length?a[0].number:1})],uri:""}),t},{})),l}(function(t){var e=1
>>0}},ds=hs.toUnsigned,ps=Object.freeze({default:hs,__moduleExports:hs,toUnsigned:ds}),fs=(ps&&hs||ps).toUnsigned;Ea=function(t,e){var i,r,n,a,s,o=[];if(!e.length)return null;for(i=0;i
>>4&&(e+=t[4]+1),e},Ds=function(t){switch(t){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}},Rs={parseType:function(t,e){var i=Os(t);return 0===i?"pat":i===e?"pmt":e?"pes":null},parsePat:function(t){var e=xs(t),i=4+Is(t);return e&&(i+=t[i]+1),(31&t[i+10])<<8|t[i+11]},parsePmt:function(t){var e={},i=xs(t),r=4+Is(t);if(i&&(r+=t[r]+1),1&t[r+5]){var n;n=3+((15&t[r+1])<<8|t[r+2])-4;for(var a=12+((15&t[r+10])<<8|t[r+11]);a
=t.byteLength)return null;var i,r=null;return 192&(i=t[e+7])&&((r={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,r.pts*=4,r.pts+=(6&t[e+13])>>>1,r.dts=r.pts,64&i&&(r.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,r.dts*=4,r.dts+=(6&t[e+18])>>>1)),r},videoPacketContainsKeyFrame:function(t){for(var e=4+Is(t),i=t.subarray(e),r=0,n=0,a=!1;n
>4?i+20:i+10},parseAdtsSize:function(t,e){var i=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|i},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5
>>2];e++}return null},parseAacTimestamp:function(t){var e,i,r;e=10,64&t[5]&&(e+=4,e+=Ws(t.subarray(10,14)));do{if((i=Ws(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){r=t.subarray(e+10,e+i+10);for(var n=0;n
>>2;return(s*=4)+(3&a[7])}break}}e+=10,e+=i}while(e
>7))^a]=a;for(s=o=0;!r[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[n[r[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)e[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)e[a]=e[a].slice(0),i[a]=i[a].slice(0);return t},lo=null,co=function(){function t(e){ao(this,t),lo||(lo=uo()),this._tables=[[lo[0][0].slice(),lo[0][1].slice(),lo[0][2].slice(),lo[0][3].slice(),lo[0][4].slice()],[lo[1][0].slice(),lo[1][1].slice(),lo[1][2].slice(),lo[1][3].slice(),lo[1][4].slice()]];var i=void 0,r=void 0,n=void 0,a=void 0,s=void 0,o=this._tables[0][4],u=this._tables[1],l=e.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(a=e.slice(0),s=[],this._key=[a,s],i=l;i<4*l+28;i++)n=a[i-1],(i%l==0||8===l&&i%l==4)&&(n=o[n>>>24]<<24^o[n>>16&255]<<16^o[n>>8&255]<<8^o[255&n],i%l==0&&(n=n<<8^n>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-l]^n;for(r=0;i;r++,i--)n=a[3&r?i:i-4],s[r]=i<=4||r<4?n:u[0][o[n>>>24]]^u[1][o[n>>16&255]]^u[2][o[n>>8&255]]^u[3][o[255&n]]}return t.prototype.decrypt=function(t,e,i,r,n,a){var s=this._key[1],o=t^s[0],u=r^s[1],l=i^s[2],c=e^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m
>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)n[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},t}(),ho=function(){function t(){ao(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1
>8|t>>>24},mo=function(t,e,i){var r=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),n=new co(Array.prototype.slice.call(e)),a=new Uint8Array(t.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;m
Date.now()},qo=function(t){return t.excludeUntil&&t.excludeUntil===1/0},Wo=function(t){var e=Vo(t);return!t.disabled&&!e},zo=function(t,e){return e.attributes&&e.attributes[t]},Go=function(t,e){if(1===t.playlists.length)return!0;var i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter(function(t){return!!Wo(t)&&(t.attributes.BANDWIDTH||0)
"+t.end(i));return e.join(", ")},uu=function(t){for(var e=[],i=0;i
=t&&i.removeCue(n)},cu=function(t){return isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t},hu="undefined"!=typeof window?window:{},du="undefined"==typeof Symbol?"__target":Symbol(),pu="application/javascript",fu=hu.BlobBuilder||hu.WebKitBlobBuilder||hu.MozBlobBuilder||hu.MSBlobBuilder,mu=hu.URL||hu.webkitURL||mu&&mu.msURL,gu=hu.Worker;function yu(t,e){return function(i){var r=this;if(!e)return new gu(t);if(gu&&!i){var n=Tu(e.toString().replace(/^function.+?{/,"").slice(0,-1));return this[du]=new gu(n),function(t,e){if(t&&e){var i=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&mu.revokeObjectURL(t.objURL),i.call(t)}}}(this[du],n),this[du]}var a={postMessage:function(t){r.onmessage&&setTimeout(function(){r.onmessage({data:t,target:a})})}};e.call(a),this.postMessage=function(t){setTimeout(function(){a.onmessage({data:t,target:r})})},this.isThisThread=!0}}if(gu){var vu,_u=Tu("self.onmessage = function () {}"),bu=new Uint8Array(1);try{(vu=new gu(_u)).postMessage(bu,[bu.buffer])}catch(e){gu=null}finally{mu.revokeObjectURL(_u),vu&&vu.terminate()}}function Tu(t){try{return mu.createObjectURL(new Blob([t],{type:pu}))}catch(i){var e=new fu;return e.append(t),mu.createObjectURL(e.getBlob(type))}}var Su=new yu("./transmuxer-worker.worker.js",function(t,e){var i=this;!function(){var e,r,n,a,s,o,u,l,c,h,d,p,f,m,g,y,v,_,b,T,S,k,C,E,w,A,L,P,O,x,I,D,R,M,U,N,B,j,F,H,V=void 0!==t?t:"undefined"!=typeof global?global:void 0!==i?i:{},q=void 0!==t?t:void 0!==V?V:void 0!==i?i:{},W=Math.pow(2,32)-1;!function(){var t;if(k={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in k)k.hasOwnProperty(t)&&(k[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),w=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),A=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]),L=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]),P={video:A,audio:L},I=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]),D=new Uint8Array([0,0,0,0,0,0,0,0]),R=D,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U=D,O=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(t){var e,i,r=[],n=0;for(e=1;e
>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},g=function(t){return e(k.hdlr,P[t])},m=function(t){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(i[12]=t.samplerate>>>24&255,i[13]=t.samplerate>>>16&255,i[14]=t.samplerate>>>8&255,i[15]=255&t.samplerate),e(k.mdhd,i)},f=function(t){return e(k.mdia,m(t),g(t.type),o(t))},s=function(t){return e(k.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},o=function(t){return e(k.minf,"video"===t.type?e(k.vmhd,O):e(k.smhd,x),r(),v(t))},u=function(t,i){for(var r=[],n=i.length;n--;)r[n]=b(i[n]);return e.apply(null,[k.moof,s(t)].concat(r))},l=function(t){for(var i=t.length,r=[];i--;)r[i]=d(t[i]);return e.apply(null,[k.moov,h(4294967295)].concat(r).concat(c(t)))},c=function(t){for(var i=t.length,r=[];i--;)r[i]=T(t[i]);return e.apply(null,[k.mvex].concat(r))},h=function(t){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 e(k.mvhd,i)},y=function(t){var i,r,n=t.samples||[],a=new Uint8Array(4+n.length);for(r=0;r
>>8),a.push(255&r[i].byteLength),a=a.concat(Array.prototype.slice.call(r[i]));for(i=0;i
>>8),s.push(255&n[i].byteLength),s=s.concat(Array.prototype.slice.call(n[i]));return e(k.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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),e(k.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([r.length]).concat(a).concat([n.length]).concat(s))),e(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},B=function(t){return e(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),n(t))},p=function(t){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return e(k.tkhd,i)},b=function(t){var i,r,n,a,s,o;return i=e(k.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(t.baseMediaDecodeTime/(W+1)),o=Math.floor(t.baseMediaDecodeTime%(W+1)),r=e(k.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===t.type?(n=S(t,92),e(k.traf,i,r,n)):(a=y(t),n=S(t,a.length+92),e(k.traf,i,r,n,a))},d=function(t){return t.duration=t.duration||4294967295,e(k.trak,p(t),f(t))},T=function(t){var i=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(i[i.length-1]=0),e(k.trex,i)},H=function(t,e){var i=0,r=0,n=0,a=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(r=2),void 0!==t[0].flags&&(n=4),void 0!==t[0].compositionTimeOffset&&(a=8)),[0,0,i|r|n|a,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},F=function(t,i){var r,n,a,s;for(i+=20+16*(n=t.samples||[]).length,r=H(n,i),s=0;s
>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size,a.flags.isLeading<<2|a.flags.dependsOn,a.flags.isDependedOn<<6|a.flags.hasRedundancy<<4|a.flags.paddingValue<<1|a.flags.isNonSyncSample,61440&a.flags.degradationPriority,15&a.flags.degradationPriority,(4278190080&a.compositionTimeOffset)>>>24,(16711680&a.compositionTimeOffset)>>>16,(65280&a.compositionTimeOffset)>>>8,255&a.compositionTimeOffset]);return e(k.trun,new Uint8Array(r))},j=function(t,i){var r,n,a,s;for(i+=20+8*(n=t.samples||[]).length,r=H(n,i),s=0;s
>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);return e(k.trun,new Uint8Array(r))},S=function(t,e){return"audio"===t.type?j(t,e):F(t,e)};var z={ftyp:a=function(){return e(k.ftyp,C,E,C,w)},mdat:function(t){return e(k.mdat,t)},moof:u,moov:l,initSegment:function(t){var e,i=a(),r=l(t);return(e=new Uint8Array(i.byteLength+r.byteLength)).set(i),e.set(r,i.byteLength),e}},G=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var r;return!!t[e]&&(r=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(r,1),-1
>>8,n=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.topRow_=13,this.mode_="rollUp";else if(e===this.ROLL_UP_3_ROWS_)this.topRow_=12,this.mode_="rollUp";else if(e===this.ROLL_UP_4_ROWS_)this.topRow_=11,this.mode_="rollUp";else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=J();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=J();else if(e===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(r,n))a=K((r=(3&r)<<8)|n),this[this.mode_](t.pts,a),this.column_++;else if(this.isExtCharacter(r,n))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),a=K((r=(3&r)<<8)|n),this[this.mode_](t.pts,a),this.column_++;else if(this.isMidRowCode(r,n))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&n)&&this.addFormatting(t.pts,["i"]),1==(1&n)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(r,n))this.column_+=3&n;else if(this.isPAC(r,n)){var s=Q.indexOf(7968&e);s!==this.row_&&(this.clearFormatting(t.pts),this.row_=s),1&n&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(n)&&14==(14&n)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(r)&&(0===n&&(n=null),a=K(r),a+=K(n),this[this.mode_](t.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Z.prototype=new X,Z.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},Z.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=J(),this.nonDisplayed_=J(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.formatting_=[]},Z.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_},Z.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},Z.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},Z.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},Z.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},Z.prototype.isPAC=function(t,e){return t>=this.BASE_&&t
"},"");this[this.mode_](t,i)},Z.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+""+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},Z.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Z.prototype.rollUp=function(t,e){var i=this.displayed_[14];i+=e,this.displayed_[14]=i},Z.prototype.shiftRowsUp_=function(){var t;for(t=0;t
>>2;h*=4,h+=3&c[7],u.timeStamp=h,void 0===e.pts&&void 0===e.dts&&(e.pts=u.timeStamp,e.dts=u.timeStamp),this.trigger("timestamp",u)}e.frames.push(u),s+=10,s+=o}while(s
>>4&&(r+=e[r]+1),0===i.pid)i.type="pat",t(e.subarray(r),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(r),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,r,i]):this.processPes_(e,r,i)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=et.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=et.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new X,ht.STREAM_TYPES={h264:27,adts:15},(dt=function(){var t=this,e={data:[],size:0},i={data:[],size:0},r={data:[],size:0},n=function(e,i,r){var n,a,s=new Uint8Array(e.size),o={type:i},u=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u
>>3,h.pts*=4,h.pts+=(6&c[13])>>>1,h.dts=h.pts,64&d&&(h.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,h.dts*=4,h.dts+=(6&c[18])>>>1)),h.data=c.subarray(9+c[8]),n="video"===i||o.packetLength<=e.size,(r||n)&&(e.size=0,e.data.length=0),n&&t.trigger("data",o)}};dt.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var t,s;switch(a.streamType){case et.H264_STREAM_TYPE:case et.H264_STREAM_TYPE:t=e,s="video";break;case et.ADTS_STREAM_TYPE:t=i,s="audio";break;case et.METADATA_STREAM_TYPE:t=r,s="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&n(t,s,!0),t.data.push(a),t.size+=a.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]},i=a.programMapTable;null!==i.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.video,codec:"avc",type:"video"}),null!==i.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.audio,codec:"adts",type:"audio"}),t.trigger("data",e)}})[a.type]()},this.flush=function(){n(e,"video"),n(i,"audio"),n(r,"timed-metadata"),this.trigger("done")}}).prototype=new X;var mt={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:ct,TransportParseStream:ht,ElementaryStream:dt,TimestampRolloverStream:ft,CaptionStream:tt.CaptionStream,Cea608Stream:tt.Cea608Stream,MetadataStream:pt};for(var gt in et)et.hasOwnProperty(gt)&&(mt[gt]=et[gt]);var yt,vt=mt,_t=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(yt=function(){var t;yt.prototype.init.call(this),this.push=function(e){var i,r,n,a,s,o,u=0,l=0;if("audio"===e.type)for(t?(a=t,(t=new Uint8Array(a.byteLength+e.data.byteLength)).set(a),t.set(e.data,a.byteLength)):t=e.data;u+5
>5,o=9e4*(s=1024*(1+(3&t[u+6])))/_t[(60&t[u+2])>>>2],n=u+i,t.byteLength
>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:_t[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+r,n)}),t.byteLength===n)return void(t=void 0);l++,t=t.subarray(n)}else u++},this.flush=function(){this.trigger("done")}}).prototype=new X;var bt,Tt,St,kt=yt,Ct=function(t){var e=t.byteLength,i=0,r=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+r},this.loadWord=function(){var n=t.byteLength-e,a=new Uint8Array(4),s=Math.min(4,e);if(0===s)throw new Error("no bytes available");a.set(t.subarray(n,n+s)),i=new DataView(a.buffer).getUint32(0),r=8*s,e-=s},this.skipBits=function(t){var n;t
>>32-n;return 0<(r-=n)?i<<=n:0
>>t))return i<<=t,r-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Tt=function(){var t,e,i=0;Tt.prototype.init.call(this),this.push=function(r){var n;for(e?((n=new Uint8Array(e.byteLength+r.data.byteLength)).set(e),n.set(r.data,e.byteLength),e=n):e=r.data;i
>4?i+20:i+10},this.parseAdtsSize=function(t,e){var i=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|i},this.push=function(i){var r,n,a,s,o=0,u=0;for(t.length?(s=t.length,(t=new Uint8Array(i.byteLength+s)).set(t.subarray(0,s)),t.set(i,s)):t=i;3<=t.length-u;)if(t[u]!=="I".charCodeAt(0)||t[u+1]!=="D".charCodeAt(0)||t[u+2]!=="3".charCodeAt(0))if(!0&t[u]&&240==(240&t[u+1])){if(t.length-u<7)break;if((o=this.parseAdtsSize(t,u))>t.length)break;a={type:"audio",data:t.subarray(u,u+o),pts:e,dts:e},this.trigger("data",a),u+=o}else u++;else{if(t.length-u<10)break;if((o=this.parseId3TagSize(t,u))>t.length)break;n={type:"timed-metadata",data:t.subarray(u,u+o)},this.trigger("data",n),u+=o}r=t.length-u,t=0
=n?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,i,r=[];for(e=0;e
r.pts?e++:(i++,a-=n.byteLength,o-=n.nalCount,u-=n.duration);return 0===i?t:i===t.length?null:((l=t.slice(i)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(t){var e,i,r,n,a,o,u;for(e=s.length-1,i=t.length-1,a=null,o=!1;0<=e&&0<=i;){if(r=s[e],n=t[i],r.pts===n.pts){o=!0;break}r.pts>n.pts?e--:(e===s.length-1&&(a=i),i--)}if(!o&&null===a)return null;if(0===(u=o?i:a))return t;var l=t.slice(u),c=l.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(t){s=t}}).prototype=new X,Nt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},Bt=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},jt=function(t,e){var i,r=t.minSegmentDts;return e||(r-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=r,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/9e4,i=Math.floor(i)),i},(Mt=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,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(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new X,Mt.prototype.flush=function(t){var e,i,r,n,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length
=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Qt.forEach(function(t){s.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Kt.forEach(function(t){s.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,r=z.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(r.byteLength),s.initSegment.set(r),s.data=new Uint8Array(this.pendingBytes),n=0;n
=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(Rt=function(t){var e,i,r=this,n=!0;Rt.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new vt.MetadataStream,e.aacStream=new Vt,e.audioTimestampRolloverStream=new vt.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new vt.TimestampRolloverStream("timed-metadata"),e.adtsStream=new kt,e.coalesceStream=new Mt(t,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(n){"timed-metadata"!==n.type||e.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new Dt(i,t),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var n={};(this.transmuxPipeline_=n).type="ts",n.metadataStream=new vt.MetadataStream,n.packetStream=new vt.TransportPacketStream,n.parseStream=new vt.TransportParseStream,n.elementaryStream=new vt.ElementaryStream,n.videoTimestampRolloverStream=new vt.TimestampRolloverStream("video"),n.audioTimestampRolloverStream=new vt.TimestampRolloverStream("audio"),n.timedMetadataTimestampRolloverStream=new vt.TimestampRolloverStream("timed-metadata"),n.adtsStream=new kt,n.h264Stream=new $t,n.captionStream=new vt.CaptionStream,n.coalesceStream=new Mt(t,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream),n.elementaryStream.pipe(n.videoTimestampRolloverStream).pipe(n.h264Stream),n.elementaryStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.elementaryStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on("data",function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)e||"video"!==a.tracks[s].type?i||"audio"!==a.tracks[s].type||((i=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(e=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;e&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new It(e,t),n.videoSegmentStream.on("timelineStartInfo",function(t){i&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts))}),n.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),n.videoSegmentStream.on("baseMediaDecodeTime",function(t){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new Dt(i,t),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream))}}),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var r=this.transmuxPipeline_;this.baseMediaDecodeTime=t,i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Bt(i),i.timelineStartInfo.baseMediaDecodeTime=t,r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),e&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,Bt(e),r.captionStream.reset(),e.timelineStartInfo.baseMediaDecodeTime=t),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){e&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(n){var e=Ut(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new X;var Jt={Transmuxer:Rt,VideoSegmentStream:It,AudioSegmentStream:Dt,AUDIO_PROPERTIES:Kt,VIDEO_PROPERTIES:Qt},Zt={generator:z,Transmuxer:Jt.Transmuxer,AudioSegmentStream:Jt.AudioSegmentStream,VideoSegmentStream:Jt.VideoSegmentStream},te=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ee=function(){function t(t,e){for(var i=0;i
r);n++);return t.slice(n)}(this.gopBuffer_,this.mediaSource_.player_,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(t){this.gopBuffer_=function(t,e,i){if(!e.length)return t;if(i)return e.slice();for(var r=e[0].pts,n=0;n
=r);n++);return t.slice(0,n).concat(e)}(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(t,e){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(t,e),this.gopBuffer_=function(t,e,i,r){for(var n=Math.ceil(9e4*(e-r)),a=Math.ceil(9e4*(i-r)),s=t.slice(),o=t.length;o--&&!(t[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(t[u].pts<=n););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,t,e,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(t,e)),lu(t,e,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)lu(t,e,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce(function(t,e){var i=e.type,r=e.data,n=e.initSegment;return t[i].segments.push(r),t[i].bytes+=r.byteLength,t[i].initSegment=n,e.captions&&(t.captions=t.captions.concat(e.captions)),e.info&&(t[i].info=e.info),e.metadata&&(t.metadata=t.metadata.concat(e.metadata)),t},t),this.videoBuffer_||this.audioBuffer_||(0===t.video.bytes&&(this.videoCodec_=null),0===t.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),t.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info}),t.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:t.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(t.audio.segments.unshift(t.audio.initSegment),t.audio.bytes+=t.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var e=!1;this.videoBuffer_&&t.video.bytes?(t.video.segments.unshift(t.video.initSegment),t.video.bytes+=t.video.initSegment.byteLength,this.concatAndAppendSegments_(t.video,this.videoBuffer_),function(t,e,i){var r=n.WebKitDataCue||n.VTTCue;if(e&&e.forEach(function(t){var e=t.stream;this.inbandTextTracks_[e].addCue(new r(t.startTime+this.timestampOffset,t.endTime+this.timestampOffset,t.text))},t),i){var a=cu(t.mediaSource_.duration);if(i.forEach(function(t){var e=t.cueTime+this.timestampOffset;t.frames.forEach(function(t){var i,n=new r(e,e,t.value||t.url||t.data||"");n.frame=t,n.value=t,i=n,Object.defineProperties(i.frame,{id:{get:function(){return Sa.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),i.value.key}},value:{get:function(){return Sa.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),i.value.data}},privateData:{get:function(){return Sa.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),i.value.data}}}),this.metadataTrack_.addCue(n)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var s=t.metadataTrack_.cues,o=[],u=0;u
this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=e)}},{key:"addSourceBuffer",value:function(t){var e,i,r=void 0,n=(e={type:"",parameters:{}},i=t.trim().split(";"),e.type=i.shift().trim(),i.forEach(function(t){var i=t.trim().split("=");if(1
"):function(){}};function Bu(){}var ju=function(){function t(e,i,r,n){vo(this,t),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=e,this.processedAppend_=!1,this.type_=r,this.mimeType_=i,this.logger_=Nu("SourceUpdater["+r+"]["+i+"]"),"closed"===e.readyState?e.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,i,n)):this.createSourceBuffer_(i,n)}return _o(t,[{key:"createSourceBuffer_",value:function(t,e){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t),this.logger_("created SourceBuffer"),e&&(e.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?e.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){var t=this;this.started_=!0,this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null,t.logger_("buffered ["+ou(t.buffered())+"]"),e&&e(),t.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(t){var e=this;this.processedAppend_&&this.queueCallback_(function(){e.sourceBuffer_.abort()},t)}},{key:"appendBuffer",value:function(t,e){var i=this;this.processedAppend_=!0,this.queueCallback_(function(){i.sourceBuffer_.appendBuffer(t)},e)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:Sa.createTimeRanges()}},{key:"remove",value:function(t,e){var i=this;this.processedAppend_&&this.queueCallback_(function(){i.logger_("remove ["+t+" => "+e+"]"),i.sourceBuffer_.remove(t,e)},Bu)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(t){var e=this;return void 0!==t&&(this.queueCallback_(function(){e.sourceBuffer_.timestampOffset=t}),this.timestampOffset_=t),this.timestampOffset_}},{key:"queueCallback_",value:function(t,e){this.callbacks_.push([t.bind(this),e]),this.runCallback_()}},{key:"runCallback_",value:function(){var t=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(t=this.callbacks_.shift(),this.pendingCallback_=t[1],t[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),t}(),Fu={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},Hu=function(t){var e,i,r={};return t.byterange&&(r.Range=(i=(e=t.byterange).offset+e.length-1,"bytes="+e.offset+"-"+i)),r},Vu=function(t){t.forEach(function(t){t.abort()})},qu=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:-101,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:-102,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:2,xhr:e}:null},Wu=function(t,e,i,r,n,a){var s,o,u,l,c=[],h=function(t,e,i){var r=[],n=0;return function(a,s){if(a&&(Vu(t),r.push(a)),(n+=1)===t.length){if(s.endOfAllRequests=Date.now(),0
t.code?e:t});return i(o,s)}return s.encryptedBytes?(l=s,c=i,(u=e).addEventListener("message",function t(e){if(e.data.source===l.requestId){u.removeEventListener("message",t);var i=e.data.decrypted;return l.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),c(null,l)}}),void u.postMessage(Zo({source:l.requestId,encrypted:l.encryptedBytes,key:l.key.bytes,iv:l.key.iv}),[l.encryptedBytes.buffer,l.key.bytes.buffer])):i(null,s)}var u,l,c}}(c,i,a);if(r.key){var d=t(Sa.mergeOptions(e,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),(s=r,o=h,function(t,e){var i=e.response,r=qu(t,e);if(r)return o(r,s);if(16!==i.byteLength)return o({status:e.status,message:"Invalid HLS key at URL: "+e.uri,code:2,xhr:e},s);var n=new DataView(i);return s.key.bytes=new Uint32Array([n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12)]),o(null,s)}));c.push(d)}if(r.map&&!r.map.bytes){var p=t(Sa.mergeOptions(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Hu(r.map)}),(u=r,l=h,function(t,e){var i=e.response,r=qu(t,e);return r?l(r,u):0===i.byteLength?l({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:2,xhr:e},u):(u.map.bytes=new Uint8Array(e.response),l(null,u))}));c.push(p)}var f,m,g=t(Sa.mergeOptions(e,{uri:r.resolvedUri,responseType:"arraybuffer",headers:Hu(r)}),(f=r,m=h,function(t,e){var i,r=e.response,n=qu(t,e);return n?m(n,f):0===r.byteLength?m({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:2,xhr:e},f):(f.stats={bandwidth:(i=e).bandwidth,bytesReceived:i.bytesReceived||0,roundTripTime:i.roundTripTime||0},f.key?f.encryptedBytes=new Uint8Array(e.response):f.bytes=new Uint8Array(e.response),m(null,f))}));return g.addEventListener("progress",function(t,e){return function(i){var r,n,a;return t.stats=Sa.mergeOptions(t.stats,(n=(r=i).target,(a={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-n.requestTime||0}).bytesReceived=r.loaded,a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3),a)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),e(i,t)}}(r,n)),c.push(g),function(){return Vu(c)}},zu={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},Gu=function(){var t,e=0
"+t),this.state_=t)}}),i}return bo(e,Sa.EventTarget),_o(e,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(t){return void 0!==t&&(this.error_=t),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():Sa.createTimeRanges()}},{key:"initSegment",value:function(t){var e=1
"+t.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(i&&i.uri===t.uri){var a=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),r&&(r.mediaIndex-=a,0<=r.mediaIndex&&(r.segment=t.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,t)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(t,e){this.mimeType_||(this.mimeType_=t,this.sourceBufferEmitter_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(t,e){this.sourceUpdater_&&this.sourceUpdater_.remove(t,e),lu(t,e,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){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_);t&&(Qu(this.playlist_,this.mediaSource_,t.mediaIndex)?this.endOfStream():(t.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((t.timeline!==this.currentTimeline_||null!==t.startOfSegment&&t.startOfSegment
=this.goalBufferLength_())return null;if(!r&&1<=u)return null;if(null===a)return i=this.getSyncSegmentCandidate_(e),this.generateSegmentInfo_(e,i,null,!0);if(null!==i){var l=e.segments[i];return o=l&&l.end?l.end:s,this.generateSegmentInfo_(e,i+1,o,!1)}if(this.fetchAtBuffer_){var c=Xo.getMediaInfoForTime(e,s,a.segmentIndex,a.time);i=c.mediaIndex,o=c.startTime}else{var h=Xo.getMediaInfoForTime(e,n,a.segmentIndex,a.time);i=h.mediaIndex,o=h.startTime}return this.generateSegmentInfo_(e,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(t){var e=this;if(-1===this.currentTimeline_)return 0;var i=t.segments.map(function(t,e){return{timeline:t.timeline,segmentIndex:e}}).filter(function(t){return t.timeline===e.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(t,e,i,r){if(e<0||e>=t.segments.length)return null;var n=t.segments[e];return{requestId:"segment-loader-"+Math.random(),uri:n.resolvedUri,mediaIndex:e,isSyncRequest:r,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:n.timeline,duration:n.duration,segment:n}}},{key:"abortRequestEarly_",value:function(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return!1;var e=this.currentTime_(),i=t.bandwidth,r=this.pendingSegment_.duration,n=Xo.estimateSegmentRequestTime(r,i,this.playlist_,t.bytesReceived),a=function(t,e){var i=2
"+h+"] in timeline ["+v+"]"].join(" "))),this.sourceUpdater_.appendBuffer(e.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_,e=t.segment,i=null!==this.mediaIndex;this.pendingSegment_=null,this.recordThroughput_(t),this.addSegmentMetadataCue_(t),this.state="READY",this.mediaIndex=t.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),e.end&&this.currentTime_()-e.end>3*t.playlist.targetDuration?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),Qu(t.playlist,this.mediaSource_,t.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(t){var e=this.throughput.rate,i=Date.now()-t.endOfAllRequests+1,r=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(r-e)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var e=t.segment,i=e.start,r=e.end;if(Ju(i)&&Ju(r)){lu(i,r,this.segmentMetadataTrack_);var a=n.WebKitDataCue||n.VTTCue,s={bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:i,end:r},o=new a(i,r,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}}}]),e}(),tl=new Uint8Array("\n\n".split("").map(function(t){return t.charCodeAt(0)})),el=function(t){return String.fromCharCode.apply(null,t)},il=function(t){function e(t){var i=1
=n.adStartTime&&e<=n.adEndTime)return n}return null},nl=function(t,e){var i,r;return(r=(i=t)[0]==="I".charCodeAt(0)&&i[1]==="D".charCodeAt(0)&&i[2]==="3".charCodeAt(0)?function(t){for(var e,i=!1,r=0,n=null,a=null,s=0,o=0;3<=t.length-o;){switch(eo.aac.parseType(t,o)){case"timed-metadata":if(t.length-o<10){i=!0;break}if((s=eo.aac.parseId3TagSize(t,o))>t.length){i=!0;break}null===a&&(e=t.subarray(o,o+s),a=eo.aac.parseAacTimestamp(e)),o+=s;break;case"audio":if(t.length-o<7){i=!0;break}if((s=eo.aac.parseAdtsSize(t,o))>t.length){i=!0;break}null===n&&(e=t.subarray(o,o+s),n=eo.aac.parseSampleRate(e)),r++,o+=s;break;default:o++}if(i)return null}if(null===n||null===a)return null;var u=9e4/n;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(t):function(t){var e={pid:null,table:null},i={};for(var r in function(t,e){for(var i,r=0,n=io;n
o){var u;u=s<0?i.start-Mo(e,t.mediaIndex,n):i.end+Mo(e,t.mediaIndex+1,n),this.discontinuities[a]={time:u,accuracy:o}}}}}]),e}(),ol=new yu("./decrypter-worker.worker.js",function(t,e){var i,r,n,a,s,o,u,l,c,h,d,p,f=this;i=void 0!==t?t:"undefined"!=typeof global?global:void 0!==f?f:{},r=void 0!==t?t:void 0!==i?i:void 0!==f?f:{},n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var i=0;i
>7))^a]=a;for(s=o=0;!r[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[n[r[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)e[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)e[a]=e[a].slice(0),i[a]=i[a].slice(0);return t},u=null,l=function(){function t(e){n(this,t),u||(u=o()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var i=void 0,r=void 0,a=void 0,s=void 0,l=void 0,c=this._tables[0][4],h=this._tables[1],d=e.length,p=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(s=e.slice(0),l=[],this._key=[s,l],i=d;i<4*d+28;i++)a=s[i-1],(i%d==0||8===d&&i%d==4)&&(a=c[a>>>24]<<24^c[a>>16&255]<<16^c[a>>8&255]<<8^c[255&a],i%d==0&&(a=a<<8^a>>>24^p<<24,p=p<<1^283*(p>>7))),s[i]=s[i-d]^a;for(r=0;i;r++,i--)a=s[3&r?i:i-4],l[r]=i<=4||r<4?a:h[0][c[a>>>24]]^h[1][c[a>>16&255]]^h[2][c[a>>8&255]]^h[3][c[255&a]]}return t.prototype.decrypt=function(t,e,i,r,n,a){var s=this._key[1],o=t^s[0],u=r^s[1],l=i^s[2],c=e^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m
>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)n[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},t}(),c=function(){function t(){n(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1
>8|t>>>24},p=function(){function t(e,i,r,a){n(this,t);var s=t.STEP,o=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength),l=0;for(this.asyncStream_=new h,this.asyncStream_.push(this.decryptChunk_(o.subarray(l,l+s),i,r,u)),l=s;l
>2),n=new l(Array.prototype.slice.call(e)),a=new Uint8Array(t.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,c=void 0,h=void 0,p=void 0,f=void 0,m=void 0,g=void 0,y=void 0;for(o=i[0],u=i[1],c=i[2],h=i[3],y=0;y
t.end(0)||t.start(0)>e.end(0)?this.seekable_=t:this.seekable_=Sa.createTimeRanges([[e.start(0)>t.start(0)?e.start(0):t.start(0),e.end(0)
=e.end(e.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var t=this.tech_.seeking(),e=this.seekable(),i=this.tech_.currentTime(),r=void 0;return t&&this.afterSeekableWindow_(e,i)&&(r=e.end(e.length-1)),t&&this.beforeSeekableWindow_(e,i)&&(r=e.start(0)+.1),void 0!==r&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+ou(e)+". Seeking to "+r+"."),this.tech_.setCurrentTime(r),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),i=au(e,t);return i.length&&t+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var i=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.buffered(),n=su(r,e);if(this.videoUnderflow_(n,r,e))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(0
t.end(t.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(t,e){return!!(t.length&&0
i||t.height>r})).filter(function(t){return t.width===p[0].width&&t.height===p[0].height}),u=f[f.length-1],m=f.filter(function(t){return t.bandwidth===u.bandwidth})[0]);var g=m||d||l||s[0]||a[0];return g?g.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(Yu(this.tech_.el(),"width"),10),parseInt(Yu(this.tech_.el(),"height"),10))},INITIAL_PLAYLIST_SELECTOR:function(){var t=this.playlists.master.playlists.filter(Xo.isEnabled);return $u(t,function(t,e){return Ku(t,e)}),t.filter(function(t){return Gu(t.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:Ku,comparePlaylistResolution:function(t,e){var i=void 0,r=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||n.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),i===(r=r||n.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-r},xhr:Ko()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(t){Object.defineProperty(wl,t,{get:function(){return Sa.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),Fu[t]},set:function(e){Sa.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0?Sa.log.warn("value of Hls."+t+" must be greater than or equal to 0"):Fu[t]=e}})});var Al=function(t){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(t)?"hls":/^application\/dash\+xml/i.test(t)?"dash":null},Ll=function(t,e){for(var i=e.media(),r=-1,n=0;n
Simpan