@cybergab/gab-react-video-js-player
Version:
React wrapper for VideoJS
6 lines • 585 kB
JavaScript
module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=56)}([function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(8))},function(e,t,n){(function(t){var i,r=void 0!==t?t:"undefined"!=typeof window?window:{},s=n(31);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=i}).call(this,n(8))},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,s=String(e);return(n=i[s.toLowerCase()])?n:(n=r[s.toLowerCase()])||(1===s.length?s.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var s;if(s=i[t.toLowerCase()])return s===n;if(s=r[t.toLowerCase()])return s===n}else if("number"==typeof t)return t===n;return!1}};var i=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
/*!
* Programatically add the following
*/
for(s=97;s<123;s++)i[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)i[s-48]=s;for(s=1;s<13;s++)i["f"+s]=s+111;for(s=0;s<10;s++)i["numpad "+s]=s+96;var a=t.names=t.title={};for(s in i)a[i[s]]=s;for(var o in r)i[o]=r[o]},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){e.exports=n(29)()},function(e,t,n){"use strict";var i,r,s,a,o,l=n(13).toUnsigned,u=n(13).toHexString,c=n(9);i=function(e){return c.findBox(e,["moov","trak"]).reduce((function(e,t){var n,i,r,s,a;return(n=c.findBox(t,["tkhd"])[0])?(i=n[0],s=l(n[r=0===i?12:20]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3]),(a=c.findBox(t,["mdia","mdhd"])[0])?(r=0===(i=a[0])?12:20,e[s]=l(a[r]<<24|a[r+1]<<16|a[r+2]<<8|a[r+3]),e):null):null}),{})},r=function(e,t){var n,i,r;return n=c.findBox(t,["moof","traf"]),i=[].concat.apply([],n.map((function(t){return c.findBox(t,["tfhd"]).map((function(n){var i,r;return i=l(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),r=e[i]||9e4,(c.findBox(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0]||1/0)/r}))}))),r=Math.min.apply(null,i),isFinite(r)?r:0},s=function(e,t){var n,i=c.findBox(t,["moof","traf"]),r=0,s=0;if(i&&i.length)for(var a=c.parseTraf(i[0]),o=0;o<a.boxes.length;o++)"tfhd"===a.boxes[o].type?n=a.boxes[o].trackId:"tfdt"===a.boxes[o].type?r=a.boxes[o].baseMediaDecodeTime:"trun"===a.boxes[o].type&&a.boxes[o].samples.length&&(s=a.boxes[o].samples[0].compositionTimeOffset||0);return(r+s)/(e[n]||9e4)},a=function(e){var t=c.findBox(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=c.findBox(e,["mdia","hdlr"]),i=c.findBox(e,["tkhd"]);t.forEach((function(e,t){var r,s,a=c.parseType(e.subarray(8,12)),o=i[t];"vide"===a&&(s=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),n.push(s))}))})),n},o=function(e){var t=c.findBox(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,i,r={},s=c.findBox(e,["tkhd"])[0];s&&(i=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===i?t.getUint32(12):t.getUint32(20));var a=c.findBox(e,["mdia","hdlr"])[0];if(a){var o=c.parseType(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var h=c.findBox(e,["mdia","minf","stbl","stsd"])[0];if(h){var d=h.subarray(8);r.codec=c.parseType(d.subarray(4,8));var p,f=c.findBox(d,[r.codec])[0];f&&(/^[a-z]vc[1-9]$/i.test(r.codec)?(p=f.subarray(78),"avcC"===c.parseType(p.subarray(4,8))&&p.length>11?(r.codec+=".",r.codec+=u(p[9]),r.codec+=u(p[10]),r.codec+=u(p[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)&&(p=f.subarray(28),"esds"===c.parseType(p.subarray(4,8))&&p.length>20&&0!==p[19]?(r.codec+="."+u(p[19]),r.codec+="."+u(p[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"))}var m=c.findBox(e,["mdia","mdhd"])[0];if(m&&s){var v=0===i?12:20;r.timescale=l(m[v]<<24|m[v+1]<<16|m[v+2]<<8|m[v+3])}n.push(r)})),n},e.exports={findBox:c.findBox,parseType:c.parseType,timescale:i,startTime:r,compositionStartTime:s,videoTrackIds:a,tracks:o}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i,r,s=n(13).toUnsigned,a=function(e){return new Date(1e3*e-20828448e5)},o=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},l=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},u=function(e,t){var n,i,r,a,o,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)i=s(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),r=l(e.subarray(n+4,n+8)),a=i>1?n+i:e.byteLength,r===t[0]&&(1===t.length?c.push(e.subarray(n+8,a)):(o=u(e.subarray(n+8,a),t.slice(1))).length&&(c=c.concat(o))),n=a;return c},c=function(e){var t,n,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=n)if(n=i.getUint32(t),t+=4,n<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},h={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:i(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,i,r,s=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(i=6,r=0;r<o;r++)n=s.getUint16(i),i+=2,a.sps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;for(t=e[i],i++,r=0;r<t;r++)n=s.getUint16(i),i+=2,a.pps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:l(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},i=8;i<e.byteLength;)n.compatibleBrands.push(l(e.subarray(i,i+4))),i+=4;return n},dinf:function(e){return{boxes:i(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:i(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:l(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:c(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,r={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(i+=4,r.creationTime=a(n.getUint32(i)),i+=8,r.modificationTime=a(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=8,r.duration=n.getUint32(i)):(r.creationTime=a(n.getUint32(i)),i+=4,r.modificationTime=a(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=4,r.duration=n.getUint32(i)),i+=4,t=n.getUint16(i),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:i(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:i(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=i(e.subarray(28))[0]),n},moof:function(e){return{boxes:i(e)}},moov:function(e){return{boxes:i(e)}},mvex:function(e){return{boxes:i(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=a(t.getUint32(n)),n+=8,i.modificationTime=a(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=8,i.duration=t.getUint32(n)):(i.creationTime=a(t.getUint32(n)),n+=4,i.modificationTime=a(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=4,i.duration=t.getUint32(n)),n+=4,i.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,i.nextTrackId=t.getUint32(n),i},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},r=n.getUint16(22);for(t=24;r;t+=12,r--)i.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:i(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.chunkOffsets.push(n.getUint32(t));return i},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;i;t+=12,i--)r.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:i(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)i.entries.push(n.getUint32(t));return i},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return i},styp:function(e){return h.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:s(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=s(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],s=2&i.flags[2],a=8&i.flags[2],o=16&i.flags[2],l=32&i.flags[2],u=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),s&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),u&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=a(t.getUint32(n)),n+=8,i.modificationTime=a(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=8,i.duration=t.getUint32(n)):(i.creationTime=a(t.getUint32(n)),n+=4,i.modificationTime=a(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=4,i.duration=t.getUint32(n)),n+=4,n+=8,i.layer=t.getUint16(n),n+=2,i.alternateGroup=t.getUint16(n),n+=2,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,i.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.height=t.getUint16(n)+t.getUint16(n+2)/16,i},traf:function(e){return{boxes:i(e)}},trak:function(e){return{boxes:i(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],s=4&n.flags[2],a=1&n.flags[1],l=2&n.flags[1],u=4&n.flags[1],c=8&n.flags[1],h=i.getUint32(4),d=8;for(r&&(n.dataOffset=i.getInt32(d),d+=4),s&&h&&(t={flags:o(e.subarray(d,d+4))},d+=4,a&&(t.duration=i.getUint32(d),d+=4),l&&(t.size=i.getUint32(d),d+=4),c&&(t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t),h--);h--;)t={},a&&(t.duration=i.getUint32(d),d+=4),l&&(t.size=i.getUint32(d),d+=4),u&&(t.flags=o(e.subarray(d,d+4)),d+=4),c&&(t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};i=function(e){for(var t,n,i,r,s,a=0,o=[],u=new ArrayBuffer(e.length),c=new Uint8Array(u),d=0;d<e.length;++d)c[d]=e[d];for(t=new DataView(u);a<e.byteLength;)n=t.getUint32(a),i=l(e.subarray(a+4,a+8)),r=n>1?a+n:e.byteLength,(s=(h[i]||function(e){return{data:e}})(e.subarray(a+8,r))).size=n,s.type=i,o.push(s),a=r;return o},r=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map((function(e,i){return n+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var i=n+" "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var s=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return s?1===s.length?i+"<"+s.join("").slice(1)+">":i+"<\n"+s.map((function(e){return n+" "+e})).join("\n")+"\n"+n+" >":i+"<>"}return i+JSON.stringify(r,null,2).split("\n").map((function(e,t){return 0===t?e:n+" "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+r(e.boxes,t+1):"")})).join("\n")},e.exports={inspect:i,textify:r,parseType:l,findBox:u,parseTraf:h.traf,parseTfdt:h.tfdt,parseHdlr:h.hdlr,parseTfhd:h.tfhd,parseTrun:h.trun,parseSidx:h.sidx}},function(e,t,n){var i,r,s,a,o;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,r=/^([^\/?#]*)(.*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var s=o.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return n.alwaysNormalize?(s.path=o.normalizePath(s.path),o.buildURLFromParts(s)):t;var a=o.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var l=r.exec(a.path);a.netLoc=l[1],a.path=l[2]}a.netLoc&&!a.path&&(a.path="/");var u={scheme:a.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(u.netLoc=a.netLoc,"/"!==s.path[0]))if(s.path){var c=a.path,h=c.substring(0,c.lastIndexOf("/")+1)+s.path;u.path=o.normalizePath(h)}else u.path=a.path,s.params||(u.params=a.params,s.query||(u.query=a.query));return null===u.path&&(u.path=n.alwaysNormalize?o.normalizePath(s.path):s.path),o.buildURLFromParts(u)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(s,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o},function(e){e.exports=JSON.parse('{"play":"playToggle","volume":"volumePanel","seekbar":"progressControl","timer":"remainingTimeDisplay","playbackrates":"playbackRateMenuButton","fullscreen":"fullscreenToggle"}')},function(e,t,n){"use strict";
/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */function i(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=i(n(10)),s=i(n(0));e.exports=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=r.buildAbsoluteURL(s.location&&s.location.href||"",e)),r.buildAbsoluteURL(e,t))}},function(e,t){e.exports={toUnsigned:function(e){return e>>>0},toHexString:function(e){return("00"+e.toString(16)).slice(-2)}}},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";var i=n(35),r=n(7),s=n(36);function a(e,t,n){var i=e;return s(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=r({},t,{uri:e}),i.callback=n,i}function o(e,t,n){return l(t=a(e,t,n))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,i,r){t||(t=!0,e.callback(n,i,r))};function i(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,g)}function s(){if(!l){var t;clearTimeout(c),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=g,s=null;return 0!==t?(r={body:i(),statusCode:t,method:d,headers:{},url:h,rawRequest:u},u.getAllResponseHeaders&&(r.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();void 0===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),t):t}(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),n(s,r,r.body)}}var a,l,u=e.xhr||null;u||(u=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var c,h=u.url=e.uri||e.url,d=u.method=e.method||"GET",p=e.body||e.data,f=u.headers=e.headers||{},m=!!e.sync,v=!1,g={body:void 0,headers:{},statusCode:0,method:d,url:h,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(s,0)},u.onload=s,u.onerror=r,u.onprogress=function(){},u.onabort=function(){l=!0},u.ontimeout=r,u.open(d,h,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!l){l=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),u.setRequestHeader)for(a in f)f.hasOwnProperty(a)&&u.setRequestHeader(a,f[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}e.exports=o,e.exports.default=o,o.XMLHttpRequest=i.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,n,i){return(n=a(t,n,i)).method=e.toUpperCase(),l(n)}}))},function(e,t,n){var i=n(0),r=e.exports={WebVTT:n(37),VTTCue:n(38),VTTRegion:n(39)};i.vttjs=r,i.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=i.VTTCue,l=i.VTTRegion;r.shim=function(){i.VTTCue=s,i.VTTRegion=a},r.restore=function(){i.VTTCue=o,i.VTTRegion=l},i.VTTCue||r.shim()},function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,i)}e.exports=n},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function i(e,t){var i=e.prototype;if(Object.create){var r=Object.create(t.prototype);i.__proto__=r}if(!(i instanceof t)){function s(){}s.prototype=t.prototype,n(i,s=new s),e.prototype=i=s}i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}var r={},s=r.ELEMENT_NODE=1,a=r.ATTRIBUTE_NODE=2,o=r.TEXT_NODE=3,l=r.CDATA_SECTION_NODE=4,u=r.ENTITY_REFERENCE_NODE=5,c=r.ENTITY_NODE=6,h=r.PROCESSING_INSTRUCTION_NODE=7,d=r.COMMENT_NODE=8,p=r.DOCUMENT_NODE=9,f=r.DOCUMENT_TYPE_NODE=10,m=r.DOCUMENT_FRAGMENT_NODE=11,v=r.NOTATION_NODE=12,g={},y={},_=(g.INDEX_SIZE_ERR=(y[1]="Index size error",1),g.DOMSTRING_SIZE_ERR=(y[2]="DOMString size error",2),g.HIERARCHY_REQUEST_ERR=(y[3]="Hierarchy request error",3)),b=(g.WRONG_DOCUMENT_ERR=(y[4]="Wrong document",4),g.INVALID_CHARACTER_ERR=(y[5]="Invalid character",5),g.NO_DATA_ALLOWED_ERR=(y[6]="No data allowed",6),g.NO_MODIFICATION_ALLOWED_ERR=(y[7]="No modification allowed",7),g.NOT_FOUND_ERR=(y[8]="Not found",8)),T=(g.NOT_SUPPORTED_ERR=(y[9]="Not supported",9),g.INUSE_ATTRIBUTE_ERR=(y[10]="Attribute in use",10));g.INVALID_STATE_ERR=(y[11]="Invalid state",11),g.SYNTAX_ERR=(y[12]="Syntax error",12),g.INVALID_MODIFICATION_ERR=(y[13]="Invalid modification",13),g.NAMESPACE_ERR=(y[14]="Invalid namespace",14),g.INVALID_ACCESS_ERR=(y[15]="Invalid access",15);function S(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,y[e]),this.message=y[e],Error.captureStackTrace&&Error.captureStackTrace(this,S);return n.code=e,t&&(this.message=this.message+": "+t),n}function k(){}function w(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);te(e,"length",i.length),n(i,e),e._inc=t}}function E(){}function j(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function A(e,t,n,i){if(i?t[j(t,i)]=n:t[t.length++]=n,e){n.ownerElement=e;var r=e.ownerDocument;r&&(i&&R(r,e,i),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function x(e,t,n){var i=j(t,n);if(!(i>=0))throw S(b,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var s=e.ownerDocument;s&&(R(s,e,n),n.ownerElement=null)}}function P(e){if(this._features={},e)for(var t in e)this._features=e[t]}function I(){}function O(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function D(){}function R(e,t,n,i){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function U(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s}}}function N(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,U(e.ownerDocument,e),t}function M(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===m){var r=t.firstChild;if(null==r)return t;var s=t.lastChild}else r=s=t;var a=n?n.previousSibling:e.lastChild;r.previousSibling=a,s.nextSibling=n,a?a.nextSibling=r:e.firstChild=r,null==n?e.lastChild=s:n.previousSibling=s;do{r.parentNode=e}while(r!==s&&(r=r.nextSibling));return U(e.ownerDocument||e,e),t.nodeType==m&&(t.firstChild=t.lastChild=null),t}function B(){this._nsMap={}}function F(){}function H(){}function V(){}function q(){}function z(){}function W(){}function G(){}function Y(){}function X(){}function K(){}function J(){}function Q(){}function Z(e,t){var n=[],i=9==this.nodeType?this.documentElement:this,r=i.prefix,s=i.namespaceURI;if(s&&null==r&&null==(r=i.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return ee(this,n,e,t,a),n.join("")}function $(e,t,n){var i=e.prefix||"",r=e.namespaceURI;if(!i&&!r)return!1;if("xml"===i&&"http://www.w3.org/XML/1998/namespace"===r||"http://www.w3.org/2000/xmlns/"==r)return!1;for(var s=n.length;s--;){var a=n[s];if(a.prefix==i)return a.namespace!=r}return!0}function ee(e,t,n,i,r){if(i){if(!(e=i(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case s:r||(r=[]);r.length;var c=e.attributes,v=c.length,g=e.firstChild,y=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",y);for(var _=0;_<v;_++){"xmlns"==(b=c.item(_)).prefix?r.push({prefix:b.localName,namespace:b.value}):"xmlns"==b.nodeName&&r.push({prefix:"",namespace:b.value})}for(_=0;_<v;_++){var b;if($(b=c.item(_),0,r)){var T=b.prefix||"",S=b.namespaceURI,k=T?" xmlns:"+T:" xmlns";t.push(k,'="',S,'"'),r.push({prefix:T,namespace:S})}ee(b,t,n,i,r)}if($(e,0,r)){T=e.prefix||"",S=e.namespaceURI,k=T?" xmlns:"+T:" xmlns";t.push(k,'="',S,'"'),r.push({prefix:T,namespace:S})}if(g||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(y)){if(t.push(">"),n&&/^script$/i.test(y))for(;g;)g.data?t.push(g.data):ee(g,t,n,i,r),g=g.nextSibling;else for(;g;)ee(g,t,n,i,r),g=g.nextSibling;t.push("</",y,">")}else t.push("/>");return;case p:case m:for(g=e.firstChild;g;)ee(g,t,n,i,r),g=g.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,O),'"');case o:return t.push(e.data.replace(/[<&]/g,O));case l:return t.push("<![CDATA[",e.data,"]]>");case d:return t.push("\x3c!--",e.data,"--\x3e");case f:var w=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),w)t.push(' PUBLIC "',w),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var E=e.internalSubset;E&&t.push(" [",E,"]"),t.push(">")}return;case h:return t.push("<?",e.target," ",e.data,"?>");case u:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}S.prototype=Error.prototype,n(g,S),k.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)ee(this[i],n,e,t);return n.join("")}},w.prototype.item=function(e){return C(this),this[e]},i(w,k),E.prototype={length:0,item:k.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new S(T);var n=this.getNamedItem(e.nodeName);return A(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new S(T);return t=this.getNamedItemNS(e.namespaceURI,e.localName),A(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return x(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return x(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},P.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var i=new D;if(i.implementation=this,i.childNodes=new k,i.doctype=n,n&&i.appendChild(n),t){var r=i.createElementNS(e,t);i.appendChild(r)}return i},createDocumentType:function(e,t,n){var i=new W;return i.name=e,i.nodeName=e,i.publicId=t,i.systemId=n,i}},I.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return M(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return N(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,i){var r=new n.constructor;for(var o in n){var l=n[o];"object"!=typeof l&&l!=r[o]&&(r[o]=l)}n.childNodes&&(r.childNodes=new k);switch(r.ownerDocument=t,r.nodeType){case s:var u=n.attributes,c=r.attributes=new E,h=u.length;c._ownerElement=r;for(var d=0;d<h;d++)r.setAttributeNode(e(t,u.item(d),!0));break;case a:i=!0}if(i)for(var p=n.firstChild;p;)r.appendChild(e(t,p,i)),p=p.nextSibling;return r}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==o&&e.nodeType==o?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(r,I),n(r,I.prototype),D.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==m){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==s&&(this.documentElement=e),M(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),N(this,e)},importNode:function(e,t){return function e(t,n,i){var r;switch(n.nodeType){case s:(r=n.cloneNode(!1)).ownerDocument=t;case m:break;case a:i=!0}r||(r=n.cloneNode(!1));if(r.ownerDocument=t,r.parentNode=null,i)for(var o=n.firstChild;o;)r.appendChild(e(t,o,i)),o=o.nextSibling;return r}(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==s&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new B;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new k,(t.attributes=new E)._ownerElement=t,t},createDocumentFragment:function(){var e=new K;return e.ownerDocument=this,e.childNodes=new k,e},createTextNode:function(e){var t=new V;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new J;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new X;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new B,i=t.split(":"),r=n.attributes=new E;return n.childNodes=new k,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},i(D,I),B.prototype={nodeType:s,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===m?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var i=e.lastChild;n.removeChild(t);i=e.lastChild}return i=e.lastChild,t.parentNode=e,t.previousSibling=i,t.nextSibling=null,i?i.nextSibling=t:e.firstChild=t,e.lastChild=t,U(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new w(this,(function(t){var n=[];return L(t,(function(i){i===t||i.nodeType!=s||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new w(this,(function(n){var i=[];return L(n,(function(r){r===n||r.nodeType!==s||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)})),i}))}},D.prototype.getElementsByTagName=B.prototype.getElementsByTagName,D.prototype.getElementsByTagNameNS=B.prototype.getElementsByTagNameNS,i(B,I),F.prototype.nodeType=a,i(F,I),H.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(y[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},i(H,I),V.prototype={nodeName:"#text",nodeType:o,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},i(V,H),q.prototype={nodeName:"#comment",nodeType:d},i(q,H),z.prototype={nodeName:"#cdata-section",nodeType:l},i(z,H),W.prototype.nodeType=f,i(W,I),G.prototype.nodeType=v,i(G,I),Y.prototype.nodeType=c,i(Y,I),X.prototype.nodeType=u,i(X,I),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=m,i(K,I),J.prototype.nodeType=h,i(J,I),Q.prototype.serializeToString=function(e,t,n){return Z.call(e,t,n)},I.prototype.toString=Z;try{if(Object.defineProperty){Object.defineProperty(w.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case s:case m:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case s:case m:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=P,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={parseSei:function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}t+=r,i=0,r=0}return n},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var n,i,r,s,a=[];if(!(64&t[0]))return a;for(i=31&t[0],n=0;n<i;n++)s={type:3&t[(r=3*n)+2],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a},discardEmulationPreventionBytes:function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},USER_DATA_REGISTERED_ITU_T_T35:4}},function(e,t,n){"use strict";var i=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,s;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(s=[],i=arguments.length,i=1;i<arguments.length;++i)s.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,s)}},this.dispose=function(){e={}}}};i.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},i.prototype.partialFlush=function(e){this.trigger("partialdone",e)},i.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},i.prototype.reset=function(e){this.trigger("reset",e)},e.exports=i},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){e.exports=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]}},function(e,t,n){var i=n(17),r=n(40);function s(t,n,a){return r()?e.exports=s=Reflect.construct:e.exports=s=function(e,t,n){var r=[null];r.push.apply(r,t);var s=new(Function.bind.apply(e,r));return n&&i(s,n.prototype),s},s.apply(null,arguments)}e.exports=s},function(e,t,n){var i=n(17);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}},function(e,t,n){"use strict";(function(t){var i,r=(i=n(0))&&"object"==typeof i&&"default"in i?i.default:i;e.exports=function(e){for(var n,i=(n=e,r.atob?r.atob(n):t.from(n,"base64").toString("binary")),s=new Uint8Array(i.length),a=0;a<i.length;a++)s[a]=i.charCodeAt(a);return s}}).call(this,n(41).Buffer)},function(e,t,n){function i(e){this.options=e||{locator:{}}}function r(){this.cdata=!1}function s(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function o(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}i.prototype.parseFromString=function(e,t){var n=this.options,i=new u,s=n.domBuilder||new r,o=n.errorHandler,l=n.locator,c=n.xmlns||{},h={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return l&&s.setDocumentLocator(l),i.errorHandler=function(e,t,n){if(!e){if(t instanceof r)return t;e=t}var i={},s=e instanceof Function;function o(t){var r=e[t];!r&&s&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),i}(o,s,l),i.domBuilder=n.domBuilder||s,/\/x?html?$/.test(t)&&(h.nbsp=" ",h.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?i.parse(e,c,h):i.errorHandler.error("invalid doc source"),s.doc},r.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,a=r.createElementNS(e,n||t),o=i.length;l(this,a),this.currentElement=a,this.locator&&s(this.locator,a);for(var u=0;u<o;u++){e=i.getURI(u);var c=i.getValue(u),h=(n=i.getQName(u),r.createAttributeNS(e,n));this.locator&&s(i.getLocator(u),h),h.value=h.nodeValue=c,a.setAttributeNode(h)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&s(this.locator,n),l(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=o.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&s(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=o.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&s(this.locator,i),l(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(e,t,n);this.locator&&s(this.locator,r),l(this,r)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){r.prototype[e]=function(){return null}}));var u=n(45).XMLReader,c=t.DOMImplementation=n(18).DOMImplementation;t.XMLSerializer=n(18).XMLSerializer,t.DOMParser=i},function(e,t,n){"use strict";var i=n(19).discardEmulationPreventionBytes,r=n(46).CaptionStream,s=n(6),a=n(9),o=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},l=function(e,t){var n=s.findBox(e,["moof","traf"]),r=s.findBox(e,["mdat"]),l={},u=[];return r.forEach((function(e,t){var i=n[t];u.push({mdat:e,traf:i})})),u.forEach((function(e){var n,r=e.mdat,u=e.traf,c=s.findBox(u,["tfhd"]),h=a.parseTfhd(c[0]),d=h.trackId,p=s.findBox(u,["tfdt"]),f=p.length>0?a.parseTfdt(p[0]).baseMediaDecodeTime:0,m=s.findBox(u,["trun"]);t===d&&m.length>0&&(n=function(e,t,n){var r,s,a,l,u=new DataView(e.buffer,e.byteOffset,e.byteLength),c=[];for(s=0;s+4<e.length;s+=a)if(a=u.getUint32(s),s+=4,!(a<=0))switch(31&e[s]){case 6:var h=e.subarray(s+1,s+1+a),d=o(s,t);r={nalUnitType:"sei_rbsp",size:a,data:h,escapedRBSP:i(h),trackId:n},d?(r.pts=d.pts,r.dts=d.dts,l=d):(r.pts=l.pts,r.dts=l.dts),c.push(r)}return c}(r,function(e,t,n){var i=t,r=n.defaultSampleDuration||0,s=n.defaultSampleSize||0,o=n.trackId,l=[];return e.forEach((function(e){var t=a.parseTrun(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=o,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=i+e.compositionTimeOffset,i+=e.duration})),l=l.concat(t)})),l}(m,f,h),d),l[d]||(l[d]=[]),l[d]=l[d].concat(n))})),l};e.exports=function(){var e,t,n,i,s,a,o=!1;this.isInitialized=function(){return o},this.init=function(t){e=new r,o=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,s.captions.push(e),s.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||i!==t[n])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))n=r[0],i=a[n];else if(null===n||!i)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,r,a)}return null!==(o=function(e,t,n){return null===t?null:{seiNals:l(e,t)[t],timescale:n}}(e,n,i))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),s):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){s.captions=[],s.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,s?this.clearParsedCaptions():s={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},function(e,t,n){"use strict";var i=n(21),r=n(47).handleRollover,s={};s.ts=n(48),s.aac=n(49);var a=n(50).ONE_SECOND_IN_TS,o=function(e,t,n){for(var i,r,a,o,l=0,u=188,c=!1;u<=e.byteLength;)if(71!==e[l]||71!==e[u]&&u!==e.byteLength)l++,u++;else{switch(i=e.subarray(l,u),s.ts.parseType(i,t.pid)){case"pes":r=s.ts.parsePesType(i,t.table),a=s.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&a&&(o=s.ts.parsePesTime(i))&&(o.type="audio",n.audio.push(o),c=!0)}if(c)break;l+=188,u+=188}for(l=(u=e.byteLength)-188,c=!1;l>=0;)if(71!==e[l]||71!==e[u]&&u!==e.byteLength)l--,u--;else{switch(i=e.subarray(l,u),s.ts.parseType(i,t.pid)){case"pes":r=s.ts.parsePesType(i,t.table),a=s.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&a&&(o=s.ts.parsePesTime(i))&&(o.type="audio",n.audio.push(o),c=!0)}if(c)break;l-=188,u-=188}},l=function(e,t,n){for(var i,r,a,o,l,u,c,h=0,d=188,p=!1,f={data:[],size:0};d<e.byteLength;)if(71!==e[h]||71!==e[d])h++,d++;else{switch(i=e.subarray(h,d),s.ts.parseType(i,t.pid)){case"pes":if(r=s.ts.parsePesType(i,t.table),a=s.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(a&&!p&&(o=s.ts.parsePesTime(i))&&(o.type="video",n.video.push(o),p=!0),!n.firstKeyFrame)){if(a&&0!==f.size){for(l=new Uint8Array(f.size),u=0;f.data.length;)c=f.data.shift(),l.set(c,u),u+=c.byteLength;if(s.ts.videoPacketContainsKeyFrame(l)){var m=s.ts.parsePesTime(l);m?(n.firstKeyFrame=m,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(i),f.size+=i.byteLength}}if(p&&n.firstKeyFrame)break;h+=188,d+=188}for(h=(d=e.byteLe