text: !function t(e,i,n){function a(s,o){if(!i[s]){if(!e[s]){var d="function"==typeof require&&require;if(!o&&d)return d(s,!0);if(r)return r(s,!0);var p=new Error("Cannot find module '"+s+"'");throw p.code="MODULE_NOT_FOUND",p}var u=i[s]={exports:{}};e[s][0].call(u.exports,function(t){var i=e[s][1][t];return a(i||t)},u,u.exports,t,e,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(t,e,i){"use strict";var n,a=t(24),r=t(2);n=function(){var t=new Uint8Array,e=0;n.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,s,o,d=0,p=0;for(t.length?(o=t.length,t=new Uint8Array(i.byteLength+o),t.set(t.subarray(0,o)),t.set(i,o)):t=i;t.length-p>=3;)if(t[p]!=="I".charCodeAt(0)||t[p+1]!=="D".charCodeAt(0)||t[p+2]!=="3".charCodeAt(0))if(255!=(255&t[p])||240!=(240&t[p+1]))p++;else{if(t.length-p<7)break;if(d=r.parseAdtsSize(t,p),p+d>t.length)break;s={type:"audio",data:t.subarray(p,p+d),pts:e,dts:e},this.trigger("data",s),p+=d}else{if(t.length-p<10)break;if(d=r.parseId3TagSize(t,p),p+d>t.length)break;a={type:"timed-metadata",data:t.subarray(p,p+d)},this.trigger("data",a),p+=d}n=t.length-p,t=n>0?t.subarray(p):new Uint8Array}},n.prototype=new a,e.exports=n},{}],2:[function(t,e,i){"use strict";var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],a=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},r=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},s=function(t,e,i){var n,a="";for(n=e;n<i;n++)a+="%"+("00"+t[n].toString(16)).slice(-2);return a},o=function(t,e,i){return unescape(s(t,e,i))},d=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},p=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},u=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},h=function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return n[(60&t[e+2])>>>2];e++}return null},l=function(t){var e,i,n;e=10,64&t[5]&&(e+=4,e+=r(t.subarray(10,14)));do{if((i=r(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){n=t.subarray(e+10,e+i+10);for(var a=0;a<n.byteLength;a++)if(0===n[a]){var s=o(n,0,a);if("com.apple.streaming.transportStreamTimestamp"===s){var d=n.subarray(a+1),p=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;return p*=4,p+=3&d[7]}break}}e+=10,e+=i}while(e<t.byteLength);return null};e.exports={isLikelyAacData:a,parseId3TagSize:d,parseAdtsSize:p,parseType:u,parseSampleRate:h,parseAacTimestamp:l}},{}],3:[function(t,e,i){"use strict";var n,a=t(24),r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];n=function(){var t;n.prototype.init.call(this),this.push=function(e){var i,n,a,s,o,d,p=0,u=0;if("audio"===e.type)for(t?(s=t,t=new Uint8Array(s.byteLength+e.data.byteLength),t.set(s),t.set(e.data,s.byteLength)):t=e.data;p+5<t.length;)if(255===t[p]&&240==(246&t[p+1])){if(n=2*(1&~t[p+1]),i=(3&t[p+3])<<11|t[p+4]<<3|(224&t[p+5])>>5,o=1024*(1+(3&t[p+6])),d=9e4*o/r[(60&t[p+2])>>>2],a=p+i,t.byteLength<a)return;if(this.trigger("data",{pts:e.pts+u*d,dts:e.dts+u*d,sampleCount:o,audioobjecttype:1+(t[p+2]>>>6&3),channelcount:(1&t[p+2])<<2|(192&t[p+3])>>>6,samplerate:r[(60&t[p+2])>>>2],samplingfrequencyindex:(60&t[p+2])>>>2,samplesize:16,data:t.subarray(p+7+n,a)}),t.byteLength===a)return void(t=void 0);u++,t=t.subarray(a)}else p++},this.flush=function(){this.trigger("done")}},n.prototype=new a,e.exports=n},{}],4:[function(t,e,i){"use strict";var n,a,r,s=t(24),o=t(23);a=function(){var t,e,i=0;a.prototype.init.call(this),this.push=function(n){var a;for(e?(a=new Uint8Array(e.byteLength+n.data.byteLength),a.set(e),a.set(n.data,e.byteLength),e=a):e=n.data;i<e.byteLength-3;i++)if(1===e[i+2]){t=i+5;break}for(;t<e.byteLength;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}i+3!==t-2&&this.trigger("data",e.subarray(i+3,t-2));do{t++}while(1!==e[t]&&t<e.length);i=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(i+3,t-2)),i=t-2,t+=3;break;default:t+=3}e=e.subarray(i),t-=i,i=0},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(i+3)),e=null,i=0,this.trigger("done")}},a.prototype=new s,r={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},n=function(){var t,e,i,s,d,p,u,h=new a;n.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,i=t.pts,s=t.dts,h.push(t))},h.on("data",function(n){var a={trackId:e,pts:i,dts:s,data:n};switch(31&n[0]){case 5:a.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:a.nalUnitType="sei_rbsp",a.escapedRBSP=d(n.subarray(1));break;case 7:a.nalUnitType="seq_parameter_set_rbsp",a.escapedRBSP=d(n.subarray(1)),a.config=p(a.escapedRBSP);break;case 8:a.nalUnitType="pic_parameter_set_rbsp";break;case 9:a.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",a)}),h.on("done",function(){t.trigger("done")}),this.flush=function(){h.flush()},u=function(t,e){var i,n,a=8,r=8;for(i=0;i<t;i++)0!==r&&(n=e.readExpGolomb(),r=(a+n+256)%256),a=0===r?a:r},d=function(t){for(var e,i,n=t.byteLength,a=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(a.push(r+2),r+=2):r++;if(0===a.length)return t;e=n-a.length,i=new Uint8Array(e);var s=0;for(r=0;r<e;s++,r++)s===a[0]&&(s++,a.shift()),i[r]=t[s];return i},p=function(t){var e,i,n,a,s,d,p,h,l,c,f,m,g,y=0,b=0,S=0,_=0,v=1;if(e=new o(t),i=e.readUnsignedByte(),a=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),r[i]&&(s=e.readUnsignedExpGolomb(),3===s&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(f=3!==s?8:12,g=0;g<f;g++)e.readBoolean()&&(g<6?u(16,e):u(64,e));if(e.skipUnsignedExpGolomb(),0===(d=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===d)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),p=e.readUnsignedExpGolomb(),g=0;g<p;g++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),h=e.readUnsignedExpGolomb(),l=e.readUnsignedExpGolomb(),c=e.readBits(1),0===c&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(y=e.readUnsignedExpGolomb(),b=e.readUnsignedExpGolomb(),S=e.readUnsignedExpGolomb(),_=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:m=[1,1];break;case 2:m=[12,11];break;case 3:m=[10,11];break;case 4:m=[16,11];break;case 5:m=[40,33];break;case 6:m=[24,11];break;case 7:m=[20,11];break;case 8:m=[32,11];break;case 9:m=[80,33];break;case 10:m=[18,11];break;case 11:m=[15,11];break;case 12:m=[64,33];break;case 13:m=[160,99];break;case 14:m=[4,3];break;case 15:m=[3,2];break;case 16:m=[2,1];break;case 255:m=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}m&&(v=m[0]/m[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:a,width:Math.ceil((16*(h+1)-2*y-2*b)*v),height:(2-c)*(l+1)*16-2*S-2*_}}},n.prototype=new s,e.exports={H264Stream:n,NalByteStream:a}},{}],5:[function(t,e,i){var n=[33,16,5,32,164,27],a=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],r=function(t){for(var e=[];t--;)e.push(0);return e},s={96e3:[n,[227,64],r(154),[56]],88200:[n,[231],r(170),[56]],64e3:[n,[248,192],r(240),[56]],48e3:[n,[255,192],r(268),[55,148,128],r(54),[112]],44100:[n,[255,192],r(268),[55,163,128],r(84),[112]],32e3:[n,[255,192],r(268),[55,234],r(226),[112]],24e3:[n,[255,192],r(268),[55,255,128],r(268),[111,112],r(126),[224]],16e3:[n,[255,192],r(268),[55,255,128],r(268),[111,255],r(269),[223,108],r(195),[1,192]],12e3:[a,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,253,128],r(259),[56]],11025:[a,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,255,192],r(268),[55,175,128],r(108),[112]],8e3:[a,r(268),[3,121,16],r(47),[7]]};e.exports=function(t){return Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(t,e){return t.concat(e)},[])),e},{})}(s)},{}],6:[function(t,e,i){"use strict";var n=t(24),a=t(19),r=function(){r.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new u(0,0),new u(0,1),new u(1,0),new u(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)};r.prototype=new n,r.prototype.push=function(t){var e,i,n;if("sei_rbsp"===t.nalUnitType&&(e=a.parseSei(t.escapedRBSP),e.payloadType===a.USER_DATA_REGISTERED_ITU_T_T35&&(i=a.parseUserData(e)))){if(t.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return void(--this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=a.parseCaptionPackets(t.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},r.prototype.flush=function(){if(!this.captionPackets_.length)return void this.ccStreams_.forEach(function(t){t.flush()},this);this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)},r.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},r.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},r.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},r.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};var s={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},o=function(t){return null===t?"":(t=s[t]||t,String.fromCharCode(t))},d=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],p=function(){for(var t=[],e=15;e--;)t.push("");return t},u=function(t,e){u.prototype.init.call(this),this.field_=t||0,this.dataChannel_=e||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,a,r;if((e=32639&t.ccData)===this.lastControlCode_)return void(this.lastControlCode_=null);if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,a=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",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.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);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_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=p();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=p();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=p()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,a))n=(3&n)<<8,r=o(n|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isExtCharacter(n,a))"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=(3&n)<<8,r=o(n|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isMidRowCode(n,a))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&a)&&this.addFormatting(t.pts,["i"]),1==(1&a)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,a))this.column_+=3&a;else if(this.isPAC(n,a)){var s=d.indexOf(7968&e);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(t.pts,s)),s!==this.row_&&(this.clearFormatting(t.pts),this.row_=s),1&a&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(a)&&14==(14&a)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===a&&(a=null),r=o(n),r+=o(a),this[this.mode_](t.pts,r),this.column_+=r.length)}};u.prototype=new n,u.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){try{return t.trim()}catch(t){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},u.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=p(),this.nonDisplayed_=p(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},u.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_},u.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},u.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},u.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},u.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=33&&e<=35},u.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},u.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},u.prototype.isNormalChar=function(t){return t>=32&&t<=127},u.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=p(),this.displayed_=p()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},u.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,i)},u.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)}},u.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},u.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},u.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},u.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},e.exports={CaptionStream:r,Cea608Stream:u}},{}],7:[function(t,e,i){"use strict";var n,a,r,s=t(24),o=t(6),d=t(9),p=t(10).TimestampRolloverStream,u=t(9);n=function(){var t=new Uint8Array(188),e=0;n.prototype.init.call(this),this.push=function(i){var n,a=0,r=188;for(e?(n=new Uint8Array(i.byteLength+e),n.set(t.subarray(0,e)),n.set(i,e),e=0):n=i;r<n.byteLength;)71!==n[a]||71!==n[r]?(a++,r++):(this.trigger("data",n.subarray(a,r)),a+=188,r+=188);a<n.byteLength&&(t.set(n.subarray(a),0),e=n.byteLength-a)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")}},n.prototype=new s,a=function(){var t,e,i,n;a.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,n){var a=0;n.payloadUnitStartIndicator&&(a+=t[a]+1),"pat"===n.type?e(t.subarray(a),n):i(t.subarray(a),n)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],n.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=n.pmtPid},i=function(t,e){var i,a,r,s;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=(15&t[1])<<8|t[2],a=3+i-4,r=(15&t[10])<<8|t[11],s=12+r;s<a;){var o=t[s],p=(31&t[s+1])<<8|t[s+2];o===d.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=p:o===d.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=p:o===d.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][p]=o),s+=5+((15&t[s+3])<<8|t[s+4])}e.programMapTable=n.programMapTable}},this.push=function(e){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&e[1]),i.pid=31&e[1],i.pid<<=8,i.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),0===i.pid)i.type="pat",t(e.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,n,i]):this.processPes_(e,n,i)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=d.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=d.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}},a.prototype=new s,a.STREAM_TYPES={h264:27,adts:15},r=function(){var t=this,e={data:[],size:0},i={data:[],size:0},n={data:[],size:0},a=function(t,e){var i;e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=0!=(4&t[6]),i=t[7],192&i&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&i&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),e.data=t.subarray(9+t[8])},s=function(e,i,n){var r,s=new Uint8Array(e.size),o={type:i},d=0,p=0,u=!1;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,d=0;d<e.data.length;d++)r=e.data[d],s.set(r.data,p),p+=r.data.byteLength;a(s,o),u="video"===i||o.packetLength<=e.size,(n||u)&&(e.size=0,e.data.length=0),u&&t.trigger("data",o)}};r.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var t,r;switch(a.streamType){case d.H264_STREAM_TYPE:case u.H264_STREAM_TYPE:t=e,r="video";break;case d.ADTS_STREAM_TYPE:t=i,r="audio";break;case d.METADATA_STREAM_TYPE:t=n,r="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&s(t,r,!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(){s(e,"video"),s(i,"audio"),s(n,"timed-metadata"),this.trigger("done")}},r.prototype=new s;var h={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:n,TransportParseStream:a,ElementaryStream:r,TimestampRolloverStream:p,CaptionStream:o.CaptionStream,Cea608Stream:o.Cea608Stream,MetadataStream:t(8)};for(var l in d)d.hasOwnProperty(l)&&(h[l]=d[l]);e.exports=h},{}],8:[function(t,e,i){"use strict";var n,a=t(24),r=t(9),s=function(t,e,i){var n,a="";for(n=e;n<i;n++)a+="%"+("00"+t[n].toString(16)).slice(-2);return a},o=function(t,e,i){return decodeURIComponent(s(t,e,i))},d=function(t,e,i){return unescape(s(t,e,i))},p=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},u={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=o(t.data,1,e),t.value=o(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=o(t.data,1,e),t.url=o(t.data,e+1,t.data.length);break}},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=d(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};n=function(t){var e,i={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},a=0,s=[],o=0;if(n.prototype.init.call(this),this.dispatchType=r.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(e=0;e<i.descriptor.length;e++)this.dispatchType+=("00"+i.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,n,r,d,h,l;if("timed-metadata"===t.type){if(t.dataAlignmentIndicator&&(o=0,s.length=0),0===s.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))return void(i.debug&&console.log("Skipping unrecognized metadata packet"));if(s.push(t),o+=t.data.byteLength,1===s.length&&(a=p(t.data.subarray(6,10)),a+=10),!(o<a)){for(e={data:new Uint8Array(a),frames:[],pts:s[0].pts,dts:s[0].dts},h=0;h<a;)e.data.set(s[0].data.subarray(0,a-h),h),h+=s[0].data.byteLength,o-=s[0].data.byteLength,s.shift();n=10,64&e.data[5]&&(n+=4,n+=p(e.data.subarray(10,14)),a-=p(e.data.subarray(16,20)));do{if((r=p(e.data.subarray(n+4,n+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if(l=String.fromCharCode(e.data[n],e.data[n+1],e.data[n+2],e.data[n+3]),d={id:l,data:e.data.subarray(n+10,n+r+10)},d.key=d.id,u[d.id]&&(u[d.id](d),"com.apple.streaming.transportStreamTimestamp"===d.owner)){var c=d.data,f=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;f*=4,f+=3&c[7],d.timeStamp=f,void 0===e.pts&&void 0===e.dts&&(e.pts=d.timeStamp,e.dts=d.timeStamp),this.trigger("timestamp",d)}e.frames.push(d),n+=10,n+=r}while(n<a);this.trigger("data",e)}}}},n.prototype=new a,e.exports=n},{}],9:[function(t,e,i){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],10:[function(t,e,i){"use strict";var n=t(24),a=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>4294967296;)t+=8589934592*i;return t},r=function(t){var e,i;r.prototype.init.call(this),this.type_=t,this.push=function(t){t.type===this.type_&&(void 0===i&&(i=t.dts),t.dts=a(t.dts,i),t.pts=a(t.pts,i),e=t.dts,this.trigger("data",t))},this.flush=function(){i=e,this.trigger("done")},this.discontinuity=function(){i=void 0,e=void 0}};r.prototype=new n,e.exports={TimestampRolloverStream:r,handleRollover:a}},{}],11:[function(t,e,i){var n=t(5),a=t(22),r=function(t){var e,i,n=0;for(e=0;e<t.length;e++)i=t[e],n+=i.data.byteLength;return n},s=function(t,e,i,r){var s,o,d,p=0,u=0,h=0,l=0;if(e.length&&(s=a.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate),p=Math.ceil(9e4/(t.samplerate/1024)),i&&r&&(u=s-Math.max(i,r),h=Math.floor(u/p),l=h*p),!(h<1||l>45e3))){for(o=n[t.samplerate],o||(o=e[0].data),d=0;d<h;d++)e.splice(d,0,{data:o});t.baseMediaDecodeTime-=Math.floor(a.videoTsToAudioTs(l,t.samplerate))}},o=function(t,e,i){return e.minSegmentDts>=i?t:(e.minSegmentDts=1/0,t.filter(function(t){return t.dts>=i&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)}))},d=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},p=function(t){var e,i,n=0,a=new Uint8Array(r(t));for(e=0;e<t.length;e++)i=t[e],a.set(i.data,n),n+=i.data.byteLength;return a};e.exports={prefixWithSilence:s,trimAdtsFramesByEarliestDts:o,generateSampleTable:d,concatenateFrameData:p}},{}],12:[function(t,e,i){"use strict";var n=t(19).discardEmulationPreventionBytes,a=t(6).CaptionStream,r=t(16),s=t(20),o=function(t,e){for(var i=t,n=0;n<e.length;n++){var a=e[n];if(i<a.size)return a;i-=a.size}return null},d=function(t,e,i){var a,r,s,d,p=new DataView(t.buffer,t.byteOffset,t.byteLength),u=[];for(r=0;r+4<t.length;r+=s)if(s=p.getUint32(r),r+=4,!(s<=0))switch(31&t[r]){case 6:var h=t.subarray(r+1,r+1+s),l=o(r,e);a={nalUnitType:"sei_rbsp",size:s,data:h,escapedRBSP:n(h),trackId:i},l?(a.pts=l.pts,a.dts=l.dts,d=l):(a.pts=d.pts,a.dts=d.dts),u.push(a)}return u},p=function(t,e,i){var n=e,a=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,o=i.trackId,d=[];return t.forEach(function(t){var e=s.parseTrun(t),i=e.samples;i.forEach(function(t){void 0===t.duration&&(t.duration=a),void 0===t.size&&(t.size=r),t.trackId=o,t.dts=n,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=n+t.compositionTimeOffset,n+=t.duration}),d=d.concat(i)}),d},u=function(t,e){var i=r.findBox(t,["moof","traf"]),n=r.findBox(t,["mdat"]),a={},o=[];return n.forEach(function(t,e){var n=i[e];o.push({mdat:t,traf:n})}),o.forEach(function(t){var i,n,o=t.mdat,u=t.traf,h=r.findBox(u,["tfhd"]),l=s.parseTfhd(h[0]),c=l.trackId,f=r.findBox(u,["tfdt"]),m=f.length>0?s.parseTfdt(f[0]).baseMediaDecodeTime:0,g=r.findBox(u,["trun"]);e===c&&g.length>0&&(i=p(g,m,l),n=d(o,i,c),a[c]||(a[c]=[]),a[c]=a[c].concat(n))}),a},h=function(t,e,i){var n;return e?(n=u(t,e),{seiNals:n[e],timescale:i}):null},l=function(){var t,e,i,n,r,s=!1;this.isInitialized=function(){return s},this.init=function(){t=new a,s=!0,t.on("data",function(t){t.startTime=t.startPts/n,t.endTime=t.endPts/n,r.captions.push(t),r.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length)&&(i!==t[0]||n!==e[i])},this.parse=function(t,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))i=a[0],n=s[i];else if(!i||!n)return e.push(t),null;for(;e.length>0;){var d=e.shift();this.parse(d,a,s)}return null!==(o=h(t,i,n))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):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;t.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){e=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()};e.exports=l},{}],13:[function(t,e,i){var n=function(t){var e,i,n=[],a=[];for(n.byteLength=0,e=0;e<t.length;e++)i=t[e],"access_unit_delimiter_rbsp"===i.nalUnitType?(n.length&&(n.duration=i.dts-n.dts,a.push(n)),n=[i],n.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 a.length&&(!n.duration||n.duration<=0)&&(n.duration=a[a.length-1].duration),a.push(n),a},a=function(t){var e,i,n=[],a=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,a.byteLength=0,a.nalCount=0,a.duration=0,a.pts=t[0].pts,a.dts=t[0].dts,e=0;e<t.length;e++)i=t[e],i.keyFrame?(n.length&&(a.push(n),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration),n=[i],n.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 a.length&&n.duration<=0&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration,a.push(n),a},r=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},s=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},o=function(t,e){var i=s();return i.dataOffset=e,i.compositionTimeOffset=t.pts-t.dts,i.duration=t.duration,i.size=4*t.length,i.size+=t.byteLength,t.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},d=function(t,e){var i,n,a,r,s,d=e||0,p=[];for(i=0;i<t.length;i++)for(r=t[i],n=0;n<r.length;n++)s=r[n],a=o(s,d),d+=a.size,p.push(a);return p},p=function(t){var e,i,n,a,r,s,o=0,d=t.byteLength,p=t.nalCount,u=d+4*p,h=new Uint8Array(u),l=new DataView(h.buffer);for(e=0;e<t.length;e++)for(a=t[e],i=0;i<a.length;i++)for(r=a[i],n=0;n<r.length;n++)s=r[n],l.setUint32(o,s.data.byteLength),o+=4,h.set(s.data,o),o+=s.data.byteLength;return h};e.exports={groupNalsIntoFrames:n,groupFramesIntoGops:a,extendFirstKeyFrame:r,generateSampleTable:d,concatenateNalData:p}},{}],14:[function(t,e,i){e.exports={generator:t(15),probe:t(16),Transmuxer:t(18).Transmuxer,AudioSegmentStream:t(18).AudioSegmentStream,VideoSegmentStream:t(18).VideoSegmentStream,CaptionParser:t(12)}},{}],15:[function(t,e,i){"use strict";var n,a,r,s,o,d,p,u,h,l,c,f,m,g,y,b,S,_,v,T,U,w,A,D,C,k,L,O,x,E,P,I,R,M,B,N,z=Math.pow(2,32)-1;!function(){var t;if(A={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 A)A.hasOwnProperty(t)&&(A[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);D=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),k=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=new Uint8Array([0,0,0,1]),L=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]),O=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]),x={video:L,audio:O},I=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),M=R,B=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=R,E=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(t){var e,i,n,a=[],r=0;for(e=1;e<arguments.length;e++)a.push(arguments[e]);for(e=a.length;e--;)r+=a[e].byteLength;for(i=new Uint8Array(r+8),n=new DataView(i.buffer,i.byteOffset,i.byteLength),n.setUint32(0,i.byteLength),i.set(t,4),e=0,r=8;e<a.length;e++)i.set(a[e],r),r+=a[e].byteLength;return i},a=function(){return n(A.dinf,n(A.dref,I))},r=function(t){return n(A.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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},s=function(){return n(A.ftyp,D,C,D,k)},b=function(t){return n(A.hdlr,x[t])},o=function(t){return n(A.mdat,t)},y=function(t){
  var e=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&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),n(A.mdhd,e)},g=function(t){return n(A.mdia,y(t),b(t.type),p(t))},d=function(t){return n(A.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},p=function(t){return n(A.minf,"video"===t.type?n(A.vmhd,E):n(A.smhd,P),a(),_(t))},u=function(t,e){for(var i=[],a=e.length;a--;)i[a]=T(e[a]);return n.apply(null,[A.moof,d(t)].concat(i))},h=function(t){for(var e=t.length,i=[];e--;)i[e]=f(t[e]);return n.apply(null,[A.moov,c(4294967295)].concat(i).concat(l(t)))},l=function(t){for(var e=t.length,i=[];e--;)i[e]=U(t[e]);return n.apply(null,[A.mvex].concat(i))},c=function(t){var e=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 n(A.mvhd,e)},S=function(t){var e,i,a=t.samples||[],r=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)e=a[i].flags,r[i+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return n(A.sdtp,r)},_=function(t){return n(A.stbl,v(t),n(A.stts,N),n(A.stsc,M),n(A.stsz,B),n(A.stco,R))},function(){var t,e;v=function(i){return n(A.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?t(i):e(i))},t=function(t){var e,i=t.sps||[],a=t.pps||[],r=[],s=[];for(e=0;e<i.length;e++)r.push((65280&i[e].byteLength)>>>8),r.push(255&i[e].byteLength),r=r.concat(Array.prototype.slice.call(i[e]));for(e=0;e<a.length;e++)s.push((65280&a[e].byteLength)>>>8),s.push(255&a[e].byteLength),s=s.concat(Array.prototype.slice.call(a[e]));return n(A.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]),n(A.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(r).concat([a.length]).concat(s))),n(A.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},e=function(t){return n(A.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]),r(t))}}(),m=function(t){var e=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 n(A.tkhd,e)},T=function(t){var e,i,a,r,s,o,d;return e=n(A.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])),o=Math.floor(t.baseMediaDecodeTime/(z+1)),d=Math.floor(t.baseMediaDecodeTime%(z+1)),i=n(A.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,d>>>24&255,d>>>16&255,d>>>8&255,255&d])),s=92,"audio"===t.type?(a=w(t,s),n(A.traf,e,i,a)):(r=S(t),a=w(t,r.length+s),n(A.traf,e,i,a,r))},f=function(t){return t.duration=t.duration||4294967295,n(A.trak,m(t),g(t))},U=function(t){var e=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&&(e[e.length-1]=0),n(A.trex,e)},function(){var t,e,i;i=function(t,e){var i=0,n=0,a=0,r=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(a=4),void 0!==t[0].compositionTimeOffset&&(r=8)),[0,0,i|n|a|r,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]},e=function(t,e){var a,r,s,o;for(r=t.samples||[],e+=20+16*r.length,a=i(r,e),o=0;o<r.length;o++)s=r[o],a=a.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);return n(A.trun,new Uint8Array(a))},t=function(t,e){var a,r,s,o;for(r=t.samples||[],e+=20+8*r.length,a=i(r,e),o=0;o<r.length;o++)s=r[o],a=a.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);return n(A.trun,new Uint8Array(a))},w=function(i,n){return"audio"===i.type?t(i,n):e(i,n)}}(),e.exports={ftyp:s,mdat:o,moof:u,moov:h,initSegment:function(t){var e,i=s(),n=h(t);return e=new Uint8Array(i.byteLength+n.byteLength),e.set(i),e.set(n,i.byteLength),e}}},{}],16:[function(t,e,i){"use strict";var n,a,r,s,o,d=t(21).toUnsigned;n=function(t,e){var i,r,s,o,p,u=[];if(!e.length)return null;for(i=0;i<t.byteLength;)r=d(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),s=a(t.subarray(i+4,i+8)),o=r>1?i+r:t.byteLength,s===e[0]&&(1===e.length?u.push(t.subarray(i+8,o)):(p=n(t.subarray(i+8,o),e.slice(1)),p.length&&(u=u.concat(p)))),i=o;return u},a=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},r=function(t){var e={};return n(t,["moov","trak"]).reduce(function(t,e){var i,a,r,s,o;return(i=n(e,["tkhd"])[0])?(a=i[0],r=0===a?12:20,s=d(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(o=n(e,["mdia","mdhd"])[0])?(a=o[0],r=0===a?12:20,t[s]=d(o[r]<<24|o[r+1]<<16|o[r+2]<<8|o[r+3]),t):null):null},e)},s=function(t,e){var i,a,r;return i=n(e,["moof","traf"]),a=[].concat.apply([],i.map(function(e){return n(e,["tfhd"]).map(function(i){var a,r,s;return a=d(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),r=t[a]||9e4,s=n(e,["tfdt"]).map(function(t){var e,i;return e=t[0],i=d(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=d(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0],(s=s||1/0)/r})})),r=Math.min.apply(null,a),isFinite(r)?r:0},o=function(t){var e=n(t,["moov","trak"]),i=[];return e.forEach(function(t){var e=n(t,["mdia","hdlr"]),r=n(t,["tkhd"]);e.forEach(function(t,e){var n,s,o,d=a(t.subarray(8,12)),p=r[e];"vide"===d&&(n=new DataView(p.buffer,p.byteOffset,p.byteLength),s=n.getUint8(0),o=0===s?n.getUint32(12):n.getUint32(20),i.push(o))})}),i},e.exports={findBox:n,parseType:a,timescale:r,startTime:s,videoTrackIds:o}},{}],17:[function(t,e,i){var n=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))},a=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},r=function(t,e){var i,n,a=t.minSegmentDts;return e||(a-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=a,i=Math.max(0,i),"audio"===t.type&&(n=t.samplerate/9e4,i*=n,i=Math.floor(i)),i};e.exports={clearDtsInfo:a,calculateTrackBaseMediaDecodeTime:r,collectDtsInfo:n}},{}],18:[function(t,e,i){"use strict";var n,a,r,s,o=t(24),d=t(15),p=t(13),u=t(11),h=t(17),l=t(7),c=t(3),f=t(4).H264Stream,m=t(1),g=t(2).isLikelyAacData,y=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],b=["width","height","profileIdc","levelIdc","profileCompatibility"],S=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},_=function(t,e,i,n,a,r){return{start:{dts:t,pts:t+(i-e)},end:{dts:t+(n-e),pts:t+(a-i)},prependedContentDuration:r,baseMediaDecodeTime:t}};a=function(t,e){var i=[],n=0,r=0,s=0,o=1/0;e=e||{},a.prototype.init.call(this),this.push=function(e){h.collectDtsInfo(t,e),t&&y.forEach(function(i){t[i]=e[i]}),i.push(e)},this.setEarliestDts=function(e){r=e-t.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){o=t},this.setAudioAppendStart=function(t){s=t},this.flush=function(){var a,p,l,c;if(0===i.length)return void this.trigger("done","AudioSegmentStream");a=u.trimAdtsFramesByEarliestDts(i,t,r),t.baseMediaDecodeTime=h.calculateTrackBaseMediaDecodeTime(t,e.keepOriginalTimestamps),u.prefixWithSilence(t,a,s,o),t.samples=u.generateSampleTable(a),l=d.mdat(u.concatenateFrameData(a)),i=[],p=d.moof(n,[t]),c=new Uint8Array(p.byteLength+l.byteLength),n++,c.set(p),c.set(l,p.byteLength),h.clearDtsInfo(t),this.trigger("data",{track:t,boxes:c}),this.trigger("done","AudioSegmentStream")}},a.prototype=new o,n=function(t,e){var i,a,r=0,s=[],o=[];e=e||{},n.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){h.collectDtsInfo(t,e),"seq_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.config,t.sps=[e.data],b.forEach(function(e){t[e]=i[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||a||(a=e.data,t.pps=[e.data]),s.push(e)},this.flush=function(){for(var i,n,a,u,l,c,f,m,g=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=p.groupNalsIntoFrames(s),a=p.groupFramesIntoGops(i),a[0][0].keyFrame||(n=this.getGopForFusion_(s[0],t),n?(g=n.duration,a.unshift(n),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.pts=n.pts,a.dts=n.dts,a.duration+=n.duration):a=p.extendFirstKeyFrame(a)),o.length){var y;if(!(y=e.alignGopsAtEnd?this.alignGopsAtEnd_(a):this.alignGopsAtStart_(a)))return this.gopCache_.unshift({gop:a.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");h.clearDtsInfo(t),a=y}h.collectDtsInfo(t,a),t.samples=p.generateSampleTable(a),l=d.mdat(p.concatenateNalData(a)),t.baseMediaDecodeTime=h.calculateTrackBaseMediaDecodeTime(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",a.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),f=a[0],m=a[a.length-1],this.trigger("segmentTimingInfo",_(t.baseMediaDecodeTime,f.dts,f.pts,m.dts+m.duration,m.pts+m.duration,g)),this.gopCache_.unshift({gop:a.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),u=d.moof(r,[t]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:t,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){h.clearDtsInfo(t),i=void 0,a=void 0},this.getGopForFusion_=function(e){var i,n,a,r,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=this.gopCache_[s],a=r.gop,t.pps&&S(t.pps[0],r.pps[0])&&t.sps&&S(t.sps[0],r.sps[0])&&(a.dts<t.timelineStartInfo.dts||(i=e.dts-a.dts-a.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=r,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,a,r,s,d,p;for(r=t.byteLength,s=t.nalCount,d=t.duration,e=i=0;e<o.length&&i<t.length&&(n=o[e],a=t[i],n.pts!==a.pts);)a.pts>n.pts?e++:(i++,r-=a.byteLength,s-=a.nalCount,d-=a.duration);return 0===i?t:i===t.length?null:(p=t.slice(i),p.byteLength=r,p.duration=d,p.nalCount=s,p.pts=p[0].pts,p.dts=p[0].dts,p)},this.alignGopsAtEnd_=function(t){var e,i,n,a,r,s;for(e=o.length-1,i=t.length-1,r=null,s=!1;e>=0&&i>=0;){if(n=o[e],a=t[i],n.pts===a.pts){s=!0;break}n.pts>a.pts?e--:(e===o.length-1&&(r=i),i--)}if(!s&&null===r)return null;var d;if(0===(d=s?i:r))return t;var p=t.slice(d),u=p.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 p.byteLength=u.byteLength,p.duration=u.duration,p.nalCount=u.nalCount,p.pts=p[0].pts,p.dts=p[0].dts,p},this.alignGopsWith=function(t){o=t}},n.prototype=new o,s=function(t,e){this.numberOfTracks=0,this.metadataStream=e,t=t||{},void 0!==t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps&&(this.keepOriginalTimestamps=t.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,s.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)))}},s.prototype=new o,s.prototype.flush=function(t){var e,i,n,a,r=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return void(++this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,b.forEach(function(t){s.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,y.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,n=d.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),a=0;a<this.pendingBoxes.length;a++)s.data.set(this.pendingBoxes[a],r),r+=this.pendingBoxes[a].byteLength;for(a=0;a<this.pendingCaptions.length;a++)e=this.pendingCaptions[a],e.startTime=e.startPts,this.keepOriginalTimestamps||(e.startTime-=o),e.startTime/=9e4,e.endTime=e.endPts,this.keepOriginalTimestamps||(e.endTime-=o),e.endTime/=9e4,s.captionStreams[e.stream]=!0,s.captions.push(e);for(a=0;a<this.pendingMetadata.length;a++)i=this.pendingMetadata[a],i.cueTime=i.pts,this.keepOriginalTimestamps||(i.cueTime-=o),i.cueTime/=9e4,s.metadata.push(i);s.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",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},r=function(t){var e,i,o=this,d=!0;r.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e,e.type="aac",e.metadataStream=new l.MetadataStream,e.aacStream=new m,e.audioTimestampRolloverStream=new l.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new l.TimestampRolloverStream("timed-metadata"),e.adtsStream=new c,e.coalesceStream=new s(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:o.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new a(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 r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new l.MetadataStream,r.packetStream=new l.TransportPacketStream,r.parseStream=new l.TransportParseStream,r.elementaryStream=new l.ElementaryStream,r.videoTimestampRolloverStream=new l.TimestampRolloverStream("video"),r.audioTimestampRolloverStream=new l.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new l.TimestampRolloverStream("timed-metadata"),r.adtsStream=new c,r.h264Stream=new f,r.captionStream=new l.CaptionStream,r.coalesceStream=new s(t,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream),r.elementaryStream.pipe(r.videoTimestampRolloverStream).pipe(r.h264Stream),r.elementaryStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.elementaryStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",function(s){var d;if("metadata"===s.type){for(d=s.tracks.length;d--;)e||"video"!==s.tracks[d].type?i||"audio"!==s.tracks[d].type||(i=s.tracks[d],i.timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime):(e=s.tracks[d],e.timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime);e&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new n(e,t),r.videoSegmentStream.on("timelineStartInfo",function(t){i&&(i.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts))}),r.videoSegmentStream.on("processedGopsInfo",o.trigger.bind(o,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",o.trigger.bind(o,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",function(t){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new a(i,t),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream))}}),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(n){var a=this.transmuxPipeline_;t.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,h.clearDtsInfo(i),t.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=n),a.audioTimestampRolloverStream&&a.audioTimestampRolloverStream.discontinuity()),e&&(a.videoSegmentStream&&(a.videoSegmentStream.gopCache_=[],a.videoTimestampRolloverStream.discontinuity()),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,h.clearDtsInfo(e),a.captionStream.reset(),t.keepOriginalTimestamps||(e.timelineStartInfo.baseMediaDecodeTime=n)),a.timedMetadataTimestampRolloverStream&&a.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(d){var e=g(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),d=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){d=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},r.prototype=new o,e.exports={Transmuxer:r,VideoSegmentStream:n,AudioSegmentStream:a,AUDIO_PROPERTIES:y,VIDEO_PROPERTIES:b,generateVideoSegmentTimingInfo:_}},{}],19:[function(t,e,i){"use strict";var n=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,a=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)a+=255,e++;if(a+=t[e++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=a,i.payload=t.subarray(e,e+a);break}e+=a,n=0,a=0}return i},a=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},r=function(t,e){var i,n,a,r,s=[];if(!(64&e[0]))return s;for(n=31&e[0],i=0;i<n;i++)a=3*i,r={type:3&e[a+2],pts:t},4&e[a+2]&&(r.ccData=e[a+3]<<8|e[a+4],s.push(r));return s},s=function(t){for(var e,i,n=t.byteLength,a=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(a.push(r+2),r+=2):r++;if(0===a.length)return t;e=n-a.length,i=new Uint8Array(e);var s=0;for(r=0;r<e;s++,r++)s===a[0]&&(s++,a.shift()),i[r]=t[s];return i};e.exports={parseSei:n,parseUserData:a,parseCaptionPackets:r,discardEmulationPreventionBytes:s,USER_DATA_REGISTERED_ITU_T_T35:4}},{}],20:[function(t,e,i){"use strict";var n,a,r=t(16).parseType,s=function(t){return new Date(1e3*t-20828448e5)},o=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},d=function(t){var e,i,n=new DataView(t.buffer,t.byteOffset,t.byteLength),a=[];for(e=0;e+4<t.length;e+=i)if(i=n.getUint32(e),e+=4,i<=0)a.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:a.push("slice_layer_without_partitioning_rbsp");break;case 5:a.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:a.push("sei_rbsp");break;case 7:a.push("seq_parameter_set_rbsp");break;case 8:a.push("pic_parameter_set_rbsp");break;case 9:a.push("access_unit_delimiter_rbsp");break;default:a.push("UNKNOWN NAL - "+t[e]&31)}return a},p={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:n(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,a,r=new DataView(t.buffer,t.byteOffset,t.byteLength),s={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,a=0;a<o;a++)i=r.getUint16(n),n+=2,s.sps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;for(e=t[n],n++,a=0;a<e;a++)i=r.getUint16(n),n+=2,s.pps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;return s},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:r(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;n<t.byteLength;)i.compatibleBrands.push(r(t.subarray(n,n+4))),n+=4;return i},dinf:function(t){return{boxes:n(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:n(t.subarray(8))}},hdlr:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:r(t.subarray(8,12)),name:""},n=8;for(n=24;n<t.byteLength;n++){if(0===t[n]){n++;break}i.name+=String.fromCharCode(t[n])}return i.name=decodeURIComponent(escape(i.name)),i},mdat:function(t){return{byteLength:t.byteLength,nals:d(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,a={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===a.version?(n+=4,a.creationTime=s(i.getUint32(n)),n+=8,a.modificationTime=s(i.getUint32(n)),n+=4,a.timescale=i.getUint32(n),n+=8,a.duration=i.getUint32(n)):(a.creationTime=s(i.getUint32(n)),n+=4,a.modificationTime=s(i.getUint32(n)),n+=4,a.timescale=i.getUint32(n),n+=4,a.duration=i.getUint32(n)),n+=4,e=i.getUint16(n),a.language+=String.fromCharCode(96+(e>>10)),a.language+=String.fromCharCode(96+((992&e)>>5)),a.language+=String.fromCharCode(96+(31&e)),a},mdia:function(t){return{boxes:n(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:n(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return t.byteLength>28&&(i.streamDescriptor=n(t.subarray(28))[0]),i},moof:function(t){return{boxes:n(t)}},moov:function(t){return{boxes:n(t)}},mvex:function(t){return{boxes:n(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=s(e.getUint32(i)),i+=8,n.modificationTime=s(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=8,n.duration=e.getUint32(i)):(n.creationTime=s(e.getUint32(i)),i+=4,n.modificationTime=s(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=4,n.duration=e.getUint32(i)),i+=4,n.rate=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=e.getUint32(i),n},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)i.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},a=i.getUint16(22);for(e=24;a;e+=12,a--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:n(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},a=i.getUint32(4);for(e=8;a;e+=4,a--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),a={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)a.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return a},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:n(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)n.entries.push(i.getUint32(e));return n},stts:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},a=i.getUint32(4);for(e=8;a;e+=8,a--)n.timeToSamples.push({sampleCount:i.getUint32(e),sampleDelta:i.getUint32(e+4)});return n},styp:function(t){return p.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},a=1&n.flags[2],r=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],d=32&n.flags[2],p=65536&n.flags[0],u=131072&n.flags[0];return e=8,a&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),r&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),s&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),d&&(n.defaultSampleFlags=i.getUint32(e)),p&&(n.durationIsEmpty=!0),!a&&u&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=s(e.getUint32(i)),i+=8,n.modificationTime=s(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=8,n.duration=e.getUint32(i)):(n.creationTime=s(e.getUint32(i)),i+=4,n.modificationTime=s(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=4,n.duration=e.getUint32(i)),i+=4,i+=8,n.layer=e.getUint16(i),i+=2,n.alternateGroup=e.getUint16(i),i+=2,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,n.width=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.height=e.getUint16(i)+e.getUint16(i+2)/16,n},traf:function(t){return{boxes:n(t)}},trak:function(t){return{boxes:n(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),a=1&i.flags[2],r=4&i.flags[2],s=1&i.flags[1],d=2&i.flags[1],p=4&i.flags[1],u=8&i.flags[1],h=n.getUint32(4),l=8;for(a&&(i.dataOffset=n.getInt32(l),l+=4),r&&h&&(e={flags:o(t.subarray(l,l+4))},l+=4,s&&(e.duration=n.getUint32(l),l+=4),d&&(e.size=n.getUint32(l),l+=4),u&&(e.compositionTimeOffset=n.getUint32(l),l+=4),i.samples.push(e),h--);h--;)e={},s&&(e.duration=n.getUint32(l),l+=4),d&&(e.size=n.getUint32(l),l+=4),p&&(e.flags=o(t.subarray(l,l+4)),l+=4),u&&(e.compositionTimeOffset=n.getUint32(l),l+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}};n=function(t){for(var e,i,n,a,s,o=0,d=[],u=new ArrayBuffer(t.length),h=new Uint8Array(u),l=0;l<t.length;++l)h[l]=t[l];for(e=new DataView(u);o<t.byteLength;)i=e.getUint32(o),n=r(t.subarray(o+4,o+8)),a=i>1?o+i:t.byteLength,s=(p[n]||function(t){return{data:t}})(t.subarray(o+8,a)),s.size=i,s.type=n,d.push(s),o=a;return d},a=function(t,e){var i;return e=e||0,i=new Array(2*e+1).join(" "),t.map(function(t,n){return i+t.type+"\n"+Object.keys(t).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(e){var n=i+"  "+e+": ",a=t[e]
  ;if(a instanceof Uint8Array||a instanceof Uint32Array){var r=Array.prototype.slice.call(new Uint8Array(a.buffer,a.byteOffset,a.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return r?1===r.length?n+"<"+r.join("").slice(1)+">":n+"<\n"+r.map(function(t){return i+"  "+t}).join("\n")+"\n"+i+"  >":n+"<>"}return n+JSON.stringify(a,null,2).split("\n").map(function(t,e){return 0===e?t:i+"  "+t}).join("\n")}).join("\n")+(t.boxes?"\n"+a(t.boxes,e+1):"")}).join("\n")},e.exports={inspect:n,textify:a,parseTfdt:p.tfdt,parseHdlr:p.hdlr,parseTfhd:p.tfhd,parseTrun:p.trun,parseSidx:p.sidx}},{}],21:[function(t,e,i){var n=function(t){return t>>>0};e.exports={toUnsigned:n}},{}],22:[function(t,e,i){var n,a,r,s,o,d;n=function(t){return 9e4*t},a=function(t,e){return t*e},r=function(t){return t/9e4},s=function(t,e){return t/e},o=function(t,e){return n(s(t,e))},d=function(t,e){return a(r(t),e)},e.exports={secondsToVideoTs:n,secondsToAudioTs:a,videoTsToSeconds:r,audioTsToSeconds:s,audioTsToVideoTs:o,videoTsToAudioTs:d}},{}],23:[function(t,e,i){"use strict";var n;n=function(t){var e=t.byteLength,i=0,n=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+n},this.loadWord=function(){var a=t.byteLength-e,r=new Uint8Array(4),s=Math.min(4,e);if(0===s)throw new Error("no bytes available");r.set(t.subarray(a,a+s)),i=new DataView(r.buffer).getUint32(0),n=8*s,e-=s},this.skipBits=function(t){var a;n>t?(i<<=t,n-=t):(t-=n,a=Math.floor(t/8),t-=8*a,e-=a,this.loadWord(),i<<=t,n-=t)},this.readBits=function(t){var a=Math.min(n,t),r=i>>>32-a;return n-=a,n>0?i<<=a:e>0&&this.loadWord(),a=t-a,a>0?r<<a|this.readBits(a):r},this.skipLeadingZeros=function(){var t;for(t=0;t<n;++t)if(0!=(i&2147483648>>>t))return i<<=t,n-=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()},e.exports=n},{}],24:[function(t,e,i){"use strict";var n=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 n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,a,r;if(i=t[e])if(2===arguments.length)for(a=i.length,n=0;n<a;++n)i[n].call(this,arguments[1]);else{for(r=[],n=arguments.length,n=1;n<arguments.length;++n)r.push(arguments[n]);for(a=i.length,n=0;n<a;++n)i[n].apply(this,r)}},this.dispose=function(){t={}}}};n.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),t},n.prototype.push=function(t){this.trigger("data",t)},n.prototype.flush=function(t){this.trigger("done",t)},e.exports=n},{}]},{},[14]);