(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1304a9ad"],{"09fa":function(A,t,i){var e=i("4588"),o=i("9def");A.exports=function(A){if(void 0===A)return 0;var t=e(A),i=o(t);if(t!==i)throw RangeError("Wrong length!");return i}},"0a49":function(A,t,i){var e=i("9b43"),o=i("626a"),a=i("4bf8"),s=i("9def"),n=i("cd1c");A.exports=function(A,t){var i=1==A,r=2==A,g=3==A,I=4==A,B=6==A,h=5==A||B,C=t||n;return function(t,n,E){for(var Q,c,d=a(t),l=o(d),u=e(n,E,3),p=s(l.length),f=0,m=i?C(t,p):r?C(t,0):void 0;p>f;f++)if((h||f in l)&&(Q=l[f],c=u(Q,f,d),A))if(i)m[f]=c;else if(c)switch(A){case 3:return!0;case 5:return Q;case 6:return f;case 2:m.push(Q)}else if(I)return!1;return B?-1:g||I?I:m}}},"0f88":function(A,t,i){var e,o=i("7726"),a=i("32e9"),s=i("ca5a"),n=s("typed_array"),r=s("view"),g=!(!o.ArrayBuffer||!o.DataView),I=g,B=0,h=9,C="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");while(B1?arguments[1]:void 0,i),r=s>2?arguments[2]:void 0,g=void 0===r?i:o(r,i);while(g>n)t[n++]=A;return t}},"456d":function(A,t,i){var e=i("4bf8"),o=i("0d58");i("5eda")("keys",(function(){return function(A){return o(e(A))}}))},4917:function(A,t,i){"use strict";var e=i("cb7c"),o=i("9def"),a=i("0390"),s=i("5f1b");i("214f")("match",1,(function(A,t,i,n){return[function(i){var e=A(this),o=void 0==i?void 0:i[t];return void 0!==o?o.call(i,e):new RegExp(i)[t](String(e))},function(A){var t=n(i,A,this);if(t.done)return t.value;var r=e(A),g=String(this);if(!r.global)return s(r,g);var I=r.unicode;r.lastIndex=0;var B,h=[],C=0;while(null!==(B=s(r,g))){var E=String(B[0]);h[C]=E,""===E&&(r.lastIndex=a(g,o(r.lastIndex),I)),C++}return 0===C?null:h}]}))},"4fa4":function(A,t,i){},5691:function(A,t){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAABRElEQVQokZWSvSvFURjHP9fLYpAUWVwviyyKUgblZVcGDEqZzAbJLIPBYGN0FZMk+QOUTREWUnRNXmJQFMX96HTPT16H31Pf+p5znudznp5zUNPqwGIch7oS0kczsAbUA5NpAXVAFXAEVACDaQH9wB1wAdwAvQlgAegDpqOCXwZagVWgOuaNAVuAn8g4wCn1XX2MCv5SLag7arnaHtdt6qD6pK6UfengPLaWARqBPWAEyAEFYAlYB07iIN+AfNLBqJpVe6KycS85X1Sv1Zq4Dh3kg08Scuqd+hp1q66qGXVWfVY7vwB/AUrVeXVIHY6+Tt1UH9TuH58tAN4CJJnBOzATfS3QApwCx0AHcPXHk94D4wEwAGSBJqAr6hCYADa+Pdn3eAF2A2A73pAH9oE54CzmNvxTHLoMtY1hSI9AZcofWQzgA1FVNpcYIkeeAAAAAElFTkSuQmCC"},"5eda":function(A,t,i){var e=i("5ca1"),o=i("8378"),a=i("79e5");A.exports=function(A,t){var i=(o.Object||{})[A]||Object[A],s={};s[A]=t(i),e(e.S+e.F*a((function(){i(1)})),"Object",s)}},"63d9":function(A,t,i){i("ec30")("Float32",4,(function(A){return function(t,i,e){return A(this,t,i,e)}}))},"6aa2":function(A,t,i){i("ec30")("Uint8",1,(function(A){return function(t,i,e){return A(this,t,i,e)}}),!0)},"6c7b":function(A,t,i){var e=i("5ca1");e(e.P,"Array",{fill:i("36bd")}),i("9c6c")("fill")},"6cdd":function(A,t){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAVCAYAAACt4nWrAAACIUlEQVQ4ja3U24uOURQG8J/PmCJyuEBIUYiIlESJ3BgxoRiHwhRKuUCi/AEURUihuRkKM02GSBoSxQVNySHHuJHG+ZQih/lGW+utr4lvTp67vd+1nnetZz9rdavI5wUG4hEe4Bhq8VkXkCtIXYj+mIQjeIWTKEP3zvyikHwBPmEQluASFuMCXmA3xneEPJOlN97jFFagJ0bjZZwrMTFybuFodPW2PZWn1ktxPs71uI1F2BdSJfK9GIr9aMKZiCktRp70zocE/8JdbMEwzMPpKKo+fnQQU1rL0gOvcR8z4j6T5U4bsvbDMqzCtLh7iOrUcS4Ik0vOFSR9awexMMBhTMcY7MAo7MKsXEiiQO/O4kkoUIJruJILC/6Ih8p1gTxVvyfmowI/E9mHeO0GPMfO0LsjGIy6iN+Em6hK5JND9yr0wXY8xg2sj0crhiRDDYZE7mYMx8VE3hI7ZADWxsA0hK0ORZs1RdZAmtyZOI4RmBqzUZdN6Ma4SHgTgZcxIWw2Nr41xbfqWHAVseDu4UB0fx2zk+aJPFX6FO+i6pXRorBjInqGuVgaHSY0YlwiibwT+BIypyL+DFFL7IrKSEqtb4gRz/Arprc2zssxJ2LL0QtbsQ1Xs6SSv2jYHLZKmB8WrQyS8nBX2idr4uEaI7auNVFWeWrta8F933jUsoK7NHmrMTKka27Lqhn5x/B4hu9YF8uq08hkOVug+X9DV8a9OPAbO9GOnIEMfJkAAAAASUVORK5CYII="},"741e":function(A,t){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAVCAYAAACt4nWrAAACG0lEQVQ4jbWUyWpUURCGv9Z2QiVKcFgYUaNEYjedjYKabRw2boS40p07H8IncO8LOOAmiAsHcB1EoRVbHEM7hKhBxSlOeJUK34FDk046RAuK233vOX8Nf/1VGi4KtJXAKWASuAs0gO8swMrZ1Z3ACmAjsBk4DDwE6sAYUMw3TCt4ZHoG2A7UgH6gAnyxmvC38wVfCmwDHgA/gSfAe+AyUAUGgP36hNXcB752Ah6ZLhY07JjvrgCj+gaDVG3ZQeCx1cTzdzvwaMmfDHwmewNcA24AvQbq8+6UlUSg8Rw8Mt4BvAS++f4i0A28niFIYRLhy+Uk+NmjT9q20bKTEVPyKAP41Qa41WIAbuvdBhkEhuL+IstijpZ0Yu8kODCfA80EHmSsBkoLAO8BDji2lwKzbJ+7gOPAJ0mpm0mntgoY9uxV4CTwLORfMmpNcpZ56FU2z7Otgaj+BLAFuK7wNkX2ZUfwh6SGaJYYpNdDh+ZYA0MC3wPWeCd00UhzvtWI/ZISB28B67OKwj/7re7I7QL2qoEmcAR4oRaItgwo9SmFUZNcHMcA+qBiK1aIYllnJSPAUTtw1iSmwU8LMJL1cLcST5aE0/B/xWDB13lbuc+Mm+lSvhVzoB5/n7OKJPU+p+uC/HRlcm+0AiXwaiYmlPVTF1LYnUyBa10VhTPd1hJ4rNmP2aEQ1TQpmcXc35wNrF3msVdSz/+ZBXn/x4C/q1OToS7WTFgAAAAASUVORK5CYII="},"744f":function(A,t,i){var e=i("5ca1");e(e.P,"Array",{copyWithin:i("ba92")}),i("9c6c")("copyWithin")},7649:function(A,t,i){"use strict";i("aade")},8521:function(A,t,i){"use strict";i("4fa4")},9093:function(A,t,i){var e=i("ce10"),o=i("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(A){return e(A,o)}},"95d6":function(A,t){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAABH0lEQVQokYWSvyvFURjGP8QtYVUySRZFZDUT2SwWf8CtO1gU+RtEMVpksVgMysogg0wkkvxIukXuP+CjU+fW8e3c+z311nmf87xP73net0OlxRkALoBfYAb4ytHaCewDFaALaADVLCsIZGJa/VEH1SG1oU7muLni0NWlupZg6+p5fCsVWFHv1W61L0ZFfVSXywT61Q91LuaH6kG8L6jvam9a01mwZBO4As5iHt6bLp8CN8BGKxNHo1nDCbarbiX5SJGTdrAN7ADPCRZm/53kT8Be5P7rIPzvRe0peFJTqwUsePCmzjZNDA4/qEuZiUypExk8TOMuTCp8YRV4BY4ze7YIzGfwI6AO1IJaXR1rsZHtYlz9DHt+Ddxm97zswMkfTSOyOtuXyrcAAAAASUVORK5CYII="},"9c29":function(A,t,i){i("ec30")("Uint32",4,(function(A){return function(t,i,e){return A(this,t,i,e)}}))},aade:function(A,t,i){},ac6a:function(A,t,i){for(var e=i("cadf"),o=i("0d58"),a=i("2aba"),s=i("7726"),n=i("32e9"),r=i("84f2"),g=i("2b4c"),I=g("iterator"),B=g("toStringTag"),h=r.Array,C={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},E=o(C),Q=0;Q2?arguments[2]:void 0,I=Math.min((void 0===g?s:o(g,s))-r,s-n),B=1;r0)r in i?i[n]=i[r]:delete i[n],n+=B,r+=B;return i}},cd1c:function(A,t,i){var e=i("e853");A.exports=function(A,t){return new(e(A))(t)}},e09e:function(A,t,i){"use strict";i("7f7f"),i("6762"),i("2fdb");var e=function(){var A=this,t=A._self._c;return t("div",{staticClass:"ringMainUnit",class:"分支箱"==A.equipmentName?"ringMain":""},[t("div",{staticClass:"top"},[t("div",{staticClass:"title"},[A._v(A._s(A.ringMainUnit))]),t("div",{staticClass:"close"},[t("img",{staticStyle:{cursor:"pointer"},attrs:{src:i("d991")},on:{click:A.handleClose}})])]),t("div",{staticClass:"main"},[A.ringMainUnit.includes("总览")||A.ringMainUnit.includes("环网柜")?t("el-tabs",{staticStyle:{height:"4%"},on:{"tab-click":A.handleClick},model:{value:A.activeName,callback:function(t){A.activeName=t},expression:"activeName"}},[t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"设备信息",name:"first"}}),t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"现场照片/红外视频",name:"second"}})],1):A._e(),A.ringMainUnit.includes("分支箱")?t("el-tabs",{staticStyle:{height:"4%"},on:{"tab-click":A.handleClick},model:{value:A.activeName,callback:function(t){A.activeName=t},expression:"activeName"}},[t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"设备信息",name:"first"}}),t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"现场照片",name:"second"}})],1):A._e(),A.ringMainUnit.includes("箱变")?t("el-tabs",{staticStyle:{height:"4%"},on:{"tab-click":A.handleClick},model:{value:A.activeName,callback:function(t){A.activeName=t},expression:"activeName"}},[t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"设备信息",name:"first"}}),t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"现场照片/红外视频",name:"second"}})],1):A._e(),A.ringMainUnit.includes("开闭所")?t("el-tabs",{staticStyle:{height:"4%"},on:{"tab-click":A.handleClick},model:{value:A.activeName,callback:function(t){A.activeName=t},expression:"activeName"}},[t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"设备信息",name:"first"}}),t("el-tab-pane",{staticStyle:{"font-size":"20px"},attrs:{label:"红外线视频/监检视频/现场照片",name:"second"}})],1):A._e(),"first"==A.activeName?t("div",{staticStyle:{height:"100%",width:"100%"}},[t("div",{staticClass:"basic"},[t("div",{staticClass:"title",staticStyle:{"margin-top":"10px"}},[A._v("基本信息")]),t("div",{staticClass:"content"},[t("div",{staticClass:"information"},[t("div",{staticClass:"informationContent"},[A._v("\n "+A._s(A.equipmentName)+"名称    "+A._s(A.ringMainUnit)+"\n ")]),t("div",{staticClass:"informationContent"},[A._v("\n "+A._s(A.equipmentName)+"编号    "+A._s(A.deviceSn)+"\n ")]),"分支箱"==A.equipmentName?t("div",{staticClass:"informationContent"},[A._v(" \n 蓄电池电压(v)\n ")]):"箱变"==A.equipmentName?void 0:[t("div",{staticClass:"informationContent"},[A._v("\n IP地址    "+A._s(A.deviceInformation.device_ip)+"\n ")]),t("div",{staticClass:"informationContent"},[A._v("\n 总间隔    "+A._s(A.totalInterval)+"\n ")])]],2)])]),t("div",{directives:[{name:"show",rawName:"v-show",value:"分支箱"!=A.equipmentName,expression:'equipmentName!="分支箱"'}],staticClass:"earlyWarning"},[t("div",{staticClass:"title"},[A._v("预警信息")]),t("div",{staticClass:"content"},[t("div",{staticClass:"information"},[t("div",{staticClass:"informationContent"},[t("img",{attrs:{src:i("5691")}}),A._v("\n 电缆沟水位 :    "+A._s(A.waterLevel)+"米\n \n ")]),t("div",{staticClass:"informationContent"},["箱变"!=A.equipmentName?t("span",{staticStyle:{"margin-left":"10px"}},[A._v(" 状态:    "+A._s(A.waterLevel1))]):A._e()]),t("div",{staticClass:"informationContent"},[t("img",{attrs:{src:i("95d6")}}),A._v("\n 小电流接地故障状态 :    "+A._s(A.grounding)+"\n ")])])])]),"分支箱"==A.equipmentName?t("div",{staticClass:"interval"},[t("div",{staticClass:"title"},[A._v("出现线缆温度监测")]),t("div",{staticClass:"fenzhiMessage"},A._l(A.fenzhiArr,(function(i){return t("div",{staticClass:"fenzhiItem"},[A._m(0,!0),t("div",{staticClass:"fenzhiUnit"},[t("span",[A._v(A._s(i))])])])})),0)]):t("div",{staticClass:"interval"},["箱变"==A.equipmentName?t("div",{staticClass:"title"},[A._v("电参数监测")]):t("div",{staticClass:"title"},[A._v("间隔监测")]),t("div",{staticClass:"table user_skills"},[t("el-table",{staticStyle:{width:"100%",height:"100%"},attrs:{data:A.tableData,"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"},stripe:""}},[t("el-table-column",{attrs:{prop:"name",label:"",align:"center",width:"150"}}),t("el-table-column",{attrs:{prop:"phase",label:"相位"}}),A._l(A.tableColumns,(function(A,i){return t("el-table-column",{key:i,attrs:{prop:A.key,align:"center",label:A.name}})}))],2)],1)]),"箱变"==A.equipmentName?t("div",{staticClass:"addTitle"},[A._v("进线局放数据")]):"分支箱"==A.equipmentName?t("div",{staticClass:"addTitle"},[A._v("局放数据")]):A._e(),t("div",{staticClass:"intervalData"},[t("el-tabs",{on:{"tab-click":A.intervalClick},model:{value:A.intervalName,callback:function(t){A.intervalName=t},expression:"intervalName"}},A._l(A.echartsTab,(function(A,i){return t("el-tab-pane",{key:i,attrs:{label:A.name,name:A.key}})})),1),t("el-tabs",{on:{"tab-click":A.intervalClick1},model:{value:A.intervalName1,callback:function(t){A.intervalName1=t},expression:"intervalName1"}},A._l(A.echartsTab1,(function(A,i){return t("el-tab-pane",{key:i,attrs:{label:A.name,name:A.key}})})),1),t("div",{directives:[{name:"show",rawName:"v-show",value:A.echartsShow,expression:"echartsShow"}],attrs:{id:"intervalShow"}}),t("div",{directives:[{name:"show",rawName:"v-show",value:!A.echartsShow,expression:"!echartsShow"}],attrs:{id:"temperatureShow"}})],1)]):A._e(),"second"==A.activeName?t("div",{staticClass:"InfraredVideo",staticStyle:{height:"96%",width:"100%"}},[t("div",{staticClass:"title"},[t("el-tabs",{staticStyle:{height:"100%"},attrs:{"tab-position":A.tabPosition},model:{value:A.InfraredName,callback:function(t){A.InfraredName=t},expression:"InfraredName"}},[A._l(A.vectorgraphData,(function(i,e){return t("el-tab-pane",{key:e},[t("span",{staticStyle:{display:"flex","align-items":"center"},attrs:{slot:"label"},on:{click:function(t){return A.InfraredClick(e)}},slot:"label"},[t("img",{attrs:{src:i.vectorgraph}}),t("span",{staticStyle:{"margin-left":"10px","font-size":"19px"},style:{color:i.color}},[A._v(A._s(i.name))])])])})),t("div",{directives:[{name:"show",rawName:"v-show",value:A.photoShow,expression:"photoShow"}],staticClass:"content"},A._l(A.photoList,(function(A,i){return t("div",{key:i,staticStyle:{"margin-top":"40px","margin-right":"20px"}},[t("img",{staticStyle:{width:"407px",height:"274px"},attrs:{src:A.photo}})])})),0),t("div",{directives:[{name:"show",rawName:"v-show",value:A.videoShow,expression:"videoShow"}],staticClass:"content1"},[t("canvas",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"canvas"}})]),t("div",{directives:[{name:"show",rawName:"v-show",value:A.videoShow1,expression:"videoShow1"}],staticClass:"content1"},[t("canvas",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"canvas1"}})])],2)],1)]):A._e()],1)])},o=[function(){var A=this,t=A._self._c;return t("div",{staticClass:"unitNum"},[t("span",[A._v("55")])])}],a=(i("456d"),i("ac6a"),i("365c"));i("af56"),i("63d9"),i("b05c"),i("15ac"),i("9c29"),i("6aa2"),i("b6e4"),i("744f");function s(A){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},s(A)}i("4917"),i("34ef"),i("6c7b");window.JSMpeg={Player:null,VideoElement:null,BitBuffer:null,Source:{},Demuxer:{},Decoder:{},Renderer:{},AudioOutput:{},Now:function(){return window.performance?window.performance.now()/1e3:Date.now()/1e3},CreateVideoElements:function(){for(var A=document.querySelectorAll(".jsmpeg"),t=0;t',A.UNMUTE_BUTTON='',A}(),JSMpeg.Player=function(){var A=function(A,t){if(this.options=t||{},t.source?(this.source=new t.source(A,t),t.streaming=!!this.source.streaming):A.match(/^wss?:\/\//)?(this.source=new JSMpeg.Source.WebSocket(A,t),t.streaming=!0):!1!==t.progressive?(this.source=new JSMpeg.Source.AjaxProgressive(A,t),t.streaming=!1):(this.source=new JSMpeg.Source.Ajax(A,t),t.streaming=!1),this.maxAudioLag=t.maxAudioLag||.25,this.loop=!1!==t.loop,this.autoplay=!!t.autoplay||t.streaming,this.demuxer=new JSMpeg.Demuxer.TS(t),this.source.connect(this.demuxer),!t.disableWebAssembly&&JSMpeg.WASMModule.IsSupported()&&(this.wasmModule=JSMpeg.WASMModule.GetModule(),t.wasmModule=this.wasmModule),!1!==t.video&&(this.video=t.wasmModule?new JSMpeg.Decoder.MPEG1VideoWASM(t):new JSMpeg.Decoder.MPEG1Video(t),this.renderer=!t.disableGl&&JSMpeg.Renderer.WebGL.IsSupported()?new JSMpeg.Renderer.WebGL(t):new JSMpeg.Renderer.Canvas2D(t),this.demuxer.connect(JSMpeg.Demuxer.TS.STREAM.VIDEO_1,this.video),this.video.connect(this.renderer)),!1!==t.audio&&JSMpeg.AudioOutput.WebAudio.IsSupported()&&(this.audio=t.wasmModule?new JSMpeg.Decoder.MP2AudioWASM(t):new JSMpeg.Decoder.MP2Audio(t),this.audioOut=new JSMpeg.AudioOutput.WebAudio(t),this.demuxer.connect(JSMpeg.Demuxer.TS.STREAM.AUDIO_1,this.audio),this.audio.connect(this.audioOut)),Object.defineProperty(this,"currentTime",{get:this.getCurrentTime,set:this.setCurrentTime}),Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this.paused=!0,this.unpauseOnShow=!1,!1!==t.pauseWhenHidden&&document.addEventListener("visibilitychange",this.showHide.bind(this)),this.wasmModule)if(this.wasmModule.ready)this.startLoading();else if(JSMpeg.WASM_BINARY_INLINED){var i=JSMpeg.Base64ToArrayBuffer(JSMpeg.WASM_BINARY_INLINED);this.wasmModule.loadFromBuffer(i,this.startLoading.bind(this))}else this.wasmModule.loadFromFile("jsmpeg.wasm",this.startLoading.bind(this));else this.startLoading()};return A.prototype.startLoading=function(){this.source.start(),this.autoplay&&this.play()},A.prototype.showHide=function(A){"hidden"===document.visibilityState?(this.unpauseOnShow=this.wantsToPlay,this.pause()):this.unpauseOnShow&&this.play()},A.prototype.play=function(A){this.animationId||(this.animationId=requestAnimationFrame(this.update.bind(this)),this.wantsToPlay=!0,this.paused=!1)},A.prototype.pause=function(A){this.paused||(cancelAnimationFrame(this.animationId),this.animationId=null,this.wantsToPlay=!1,this.isPlaying=!1,this.paused=!0,this.audio&&this.audio.canPlay&&(this.audioOut.stop(),this.seek(this.currentTime)),this.options.onPause&&this.options.onPause(this))},A.prototype.getVolume=function(){return this.audioOut?this.audioOut.volume:0},A.prototype.setVolume=function(A){this.audioOut&&(this.audioOut.volume=A)},A.prototype.stop=function(A){this.pause(),this.seek(0),this.video&&!1!==this.options.decodeFirstFrame&&this.video.decode()},A.prototype.destroy=function(){this.pause(),this.source.destroy(),this.video&&this.video.destroy(),this.renderer&&this.renderer.destroy(),this.audio&&this.audio.destroy(),this.audioOut&&this.audioOut.destroy()},A.prototype.seek=function(A){var t=this.audio&&this.audio.canPlay?this.audio.startTime:this.video.startTime;this.video&&this.video.seek(A+t),this.audio&&this.audio.seek(A+t),this.startTime=JSMpeg.Now()-A},A.prototype.getCurrentTime=function(){return this.audio&&this.audio.canPlay?this.audio.currentTime-this.audio.startTime:this.video.currentTime-this.video.startTime},A.prototype.setCurrentTime=function(A){this.seek(A)},A.prototype.update=function(){this.animationId=requestAnimationFrame(this.update.bind(this)),this.source.established?(this.isPlaying||(this.isPlaying=!0,this.startTime=JSMpeg.Now()-this.currentTime,this.options.onPlay&&this.options.onPlay(this)),this.options.streaming?this.updateForStreaming():this.updateForStaticFile()):this.renderer&&this.renderer.renderProgress(this.source.progress)},A.prototype.updateForStreaming=function(){if(this.video&&this.video.decode(),this.audio){var A=!1;do{this.audioOut.enqueuedTime>this.maxAudioLag&&(this.audioOut.resetEnqueuedTime(),this.audioOut.enabled=!1),A=this.audio.decode()}while(A);this.audioOut.enabled=!0}},A.prototype.nextFrame=function(){return!(!this.source.established||!this.video)&&this.video.decode()},A.prototype.updateForStaticFile=function(){var A=!1,t=0;if(this.audio&&this.audio.canPlay){while(!A&&this.audio.decodedTime-this.audio.currentTime<.25)A=!this.audio.decode();this.video&&this.video.currentTime0&&(e>2*o&&(this.startTime+=e),A=!this.video.decode()),t=this.demuxer.currentTime-i}this.source.resume(t),A&&this.source.completed?this.loop?this.seek(0):(this.pause(),this.options.onEnded&&this.options.onEnded(this)):A&&this.options.onStalled&&this.options.onStalled(this)},A}(),JSMpeg.BitBuffer=function(){var A=function A(t,i){"object"===s(t)?(this.bytes=t instanceof Uint8Array?t:new Uint8Array(t),this.byteLength=this.bytes.length):(this.bytes=new Uint8Array(t||1048576),this.byteLength=0),this.mode=i||A.MODE.EXPAND,this.index=0};return A.prototype.resize=function(A){var t=new Uint8Array(A);0!==this.byteLength&&(this.byteLength=Math.min(this.byteLength,A),t.set(this.bytes,0,this.byteLength)),this.bytes=t,this.index=Math.min(this.index,this.byteLength<<3)},A.prototype.evict=function(A){var t=this.index>>3,i=this.bytes.length-this.byteLength;if(this.index===this.byteLength<<3||A>i+t)return this.byteLength=0,void(this.index=0);0!==t&&(this.bytes.copyWithin?this.bytes.copyWithin(0,t,this.byteLength):this.bytes.set(this.bytes.subarray(t,this.byteLength)),this.byteLength=this.byteLength-t,this.index-=t<<3)},A.prototype.write=function(t){var i="object"===s(t[0]),e=0,o=this.bytes.length-this.byteLength;if(i){e=0;for(var a=0;ao)if(this.mode===A.MODE.EXPAND){var n=Math.max(2*this.bytes.length,e-o);this.resize(n)}else this.evict(e);if(i)for(a=0;a>3;A>3;return A>=this.byteLength||0==this.bytes[A]&&0==this.bytes[A+1]&&1==this.bytes[A+2]},A.prototype.peek=function(A){var t=this.index,i=0;while(A){var e=this.bytes[t>>3],o=8-(7&t),a=o>8-a;i=i<>s,t+=a,A-=a}return i},A.prototype.read=function(A){var t=this.peek(A);return this.index+=A,t},A.prototype.skip=function(A){return this.index+=A},A.prototype.rewind=function(A){this.index=Math.max(this.index-A,0)},A.prototype.has=function(A){return(this.byteLength<<3)-this.index>=A},A.MODE={EVICT:1,EXPAND:2},A}(),JSMpeg.Source.Ajax=function(){var A=function(A,t){this.url=A,this.destination=null,this.request=null,this.streaming=!1,this.completed=!1,this.established=!1,this.progress=0,this.onEstablishedCallback=t.onSourceEstablished,this.onCompletedCallback=t.onSourceCompleted};return A.prototype.connect=function(A){this.destination=A},A.prototype.start=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){this.request.readyState===this.request.DONE&&200===this.request.status&&this.onLoad(this.request.response)}.bind(this),this.request.onprogress=this.onProgress.bind(this),this.request.open("GET",this.url),this.request.responseType="arraybuffer",this.request.send()},A.prototype.resume=function(A){},A.prototype.destroy=function(){this.request.abort()},A.prototype.onProgress=function(A){this.progress=A.loaded/A.total},A.prototype.onLoad=function(A){this.established=!0,this.completed=!0,this.progress=1,this.onEstablishedCallback&&this.onEstablishedCallback(this),this.onCompletedCallback&&this.onCompletedCallback(this),this.destination&&this.destination.write(A)},A}(),JSMpeg.Source.Fetch=function(){var A=function(A,t){this.url=A,this.destination=null,this.request=null,this.streaming=!0,this.completed=!1,this.established=!1,this.progress=0,this.aborted=!1,this.onEstablishedCallback=t.onSourceEstablished,this.onCompletedCallback=t.onSourceCompleted};return A.prototype.connect=function(A){this.destination=A},A.prototype.start=function(){var A={method:"GET",headers:new Headers,cache:"default"};self.fetch(this.url,A).then(function(A){if(A.ok&&A.status>=200&&A.status<=299)return this.progress=1,this.established=!0,this.pump(A.body.getReader())}.bind(this)).catch((function(A){throw A}))},A.prototype.pump=function(A){return A.read().then(function(t){if(!t.done)return this.aborted?A.cancel():(this.destination&&this.destination.write(t.value.buffer),this.pump(A));this.completed=!0}.bind(this)).catch((function(A){throw A}))},A.prototype.resume=function(A){},A.prototype.abort=function(){this.aborted=!0},A}(),JSMpeg.Source.AjaxProgressive=function(){var A=function(A,t){this.url=A,this.destination=null,this.request=null,this.streaming=!1,this.completed=!1,this.established=!1,this.progress=0,this.fileSize=0,this.loadedSize=0,this.chunkSize=t.chunkSize||1048576,this.isLoading=!1,this.loadStartTime=0,this.throttled=!1!==t.throttled,this.aborted=!1,this.onEstablishedCallback=t.onSourceEstablished,this.onCompletedCallback=t.onSourceCompleted};return A.prototype.connect=function(A){this.destination=A},A.prototype.start=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){this.request.readyState===this.request.DONE&&(this.fileSize=parseInt(this.request.getResponseHeader("Content-Length")),this.loadNextChunk())}.bind(this),this.request.onprogress=this.onProgress.bind(this),this.request.open("HEAD",this.url),this.request.send()},A.prototype.resume=function(A){if(!this.isLoading&&this.throttled){var t=8*this.loadTime+2;t>A&&this.loadNextChunk()}},A.prototype.destroy=function(){this.request.abort(),this.aborted=!0},A.prototype.loadNextChunk=function(){var A=this.loadedSize,t=Math.min(this.loadedSize+this.chunkSize-1,this.fileSize-1);if(A>=this.fileSize||this.aborted)return this.completed=!0,void(this.onCompletedCallback&&this.onCompletedCallback(this));this.isLoading=!0,this.loadStartTime=JSMpeg.Now(),this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){this.request.readyState===this.request.DONE&&this.request.status>=200&&this.request.status<300?this.onChunkLoad(this.request.response):this.request.readyState===this.request.DONE&&this.loadFails++<3&&this.loadNextChunk()}.bind(this),0===A&&(this.request.onprogress=this.onProgress.bind(this)),this.request.open("GET",this.url+"?"+A+"-"+t),this.request.setRequestHeader("Range","bytes="+A+"-"+t),this.request.responseType="arraybuffer",this.request.send()},A.prototype.onProgress=function(A){this.progress=A.loaded/A.total},A.prototype.onChunkLoad=function(A){var t=!this.established;this.established=!0,this.progress=1,this.loadedSize+=A.byteLength,this.loadFails=0,this.isLoading=!1,t&&this.onEstablishedCallback&&this.onEstablishedCallback(this),this.destination&&this.destination.write(A),this.loadTime=JSMpeg.Now()-this.loadStartTime,this.throttled||this.loadNextChunk()},A}(),JSMpeg.Source.WebSocket=function(){var A=function(A,t){this.url=A,this.options=t,this.socket=null,this.streaming=!0,this.callbacks={connect:[],data:[]},this.destination=null,this.reconnectInterval=void 0!==t.reconnectInterval?t.reconnectInterval:5,this.shouldAttemptReconnect=!!this.reconnectInterval,this.completed=!1,this.established=!1,this.progress=0,this.reconnectTimeoutId=0,this.onEstablishedCallback=t.onSourceEstablished,this.onCompletedCallback=t.onSourceCompleted};return A.prototype.connect=function(A){this.destination=A},A.prototype.destroy=function(){clearTimeout(this.reconnectTimeoutId),this.shouldAttemptReconnect=!1,this.socket.close()},A.prototype.start=function(){this.shouldAttemptReconnect=!!this.reconnectInterval,this.progress=0,this.established=!1,this.socket=new WebSocket(this.url,this.options.protocols||null),this.socket.binaryType="arraybuffer",this.socket.onmessage=this.onMessage.bind(this),this.socket.onopen=this.onOpen.bind(this),this.socket.onerror=this.onClose.bind(this),this.socket.onclose=this.onClose.bind(this)},A.prototype.resume=function(A){},A.prototype.onOpen=function(){this.progress=1},A.prototype.onClose=function(){this.shouldAttemptReconnect&&(clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=setTimeout(function(){this.start()}.bind(this),1e3*this.reconnectInterval))},A.prototype.onMessage=function(A){var t=!this.established;this.established=!0,t&&this.onEstablishedCallback&&this.onEstablishedCallback(this),this.destination&&this.destination.write(A.data)},A}(),JSMpeg.Demuxer.TS=function(){var A=function(A){this.bits=null,this.leftoverBytes=null,this.guessVideoFrameEnd=!0,this.pidsToStreamIds={},this.pesPacketInfo={},this.startTime=0,this.currentTime=0};return A.prototype.connect=function(A,t){this.pesPacketInfo[A]={destination:t,currentLength:0,totalLength:0,pts:0,buffers:[]}},A.prototype.write=function(A){if(this.leftoverBytes){var t=A.byteLength+this.leftoverBytes.byteLength;this.bits=new JSMpeg.BitBuffer(t),this.bits.write([this.leftoverBytes,A])}else this.bits=new JSMpeg.BitBuffer(A);while(this.bits.has(1504)&&this.parsePacket());var i=this.bits.byteLength-(this.bits.index>>3);this.leftoverBytes=i>0?this.bits.bytes.subarray(this.bits.index>>3):null},A.prototype.parsePacket=function(){if(71!==this.bits.read(8)&&!this.resync())return!1;var A=187+(this.bits.index>>3),t=(this.bits.read(1),this.bits.read(1)),i=(this.bits.read(1),this.bits.read(13)),e=(this.bits.read(2),this.bits.read(2)),o=(this.bits.read(4),this.pidsToStreamIds[i]);if(t&&o){var a=this.pesPacketInfo[o];a&&a.currentLength&&this.packetComplete(a)}if(1&e){if(2&e){var s=this.bits.read(8);this.bits.skip(s<<3)}if(t&&this.bits.nextBytesAreStartCode()){this.bits.skip(24),o=this.bits.read(8),this.pidsToStreamIds[i]=o;var n=this.bits.read(16);this.bits.skip(8);var r=this.bits.read(2);this.bits.skip(6);var g=this.bits.read(8),I=this.bits.index+(g<<3);a=this.pesPacketInfo[o];if(a){var B=0;if(2&r){this.bits.skip(4);var h=this.bits.read(3);this.bits.skip(1);var C=this.bits.read(15);this.bits.skip(1);var E=this.bits.read(15);this.bits.skip(1),B=(1073741824*h+32768*C+E)/9e4,this.currentTime=B,-1===this.startTime&&(this.startTime=B)}var Q=n?n-g-3:0;this.packetStart(a,B,Q)}this.bits.index=I}if(o){a=this.pesPacketInfo[o];if(a){var c=this.bits.index>>3,d=this.packetAddData(a,c,A),l=!t&&2&e;(d||this.guessVideoFrameEnd&&l)&&this.packetComplete(a)}}}return this.bits.index=A<<3,!0},A.prototype.resync=function(){if(!this.bits.has(9024))return!1;for(var A=this.bits.index>>3,t=0;t<187;t++)if(71===this.bits.bytes[A+t]){for(var i=!0,e=1;e<5;e++)if(71!==this.bits.bytes[A+t+188*e]){i=!1;break}if(i)return this.bits.index=A+t+1<<3,!0}return console.warn("JSMpeg: Possible garbage data. Skipping."),this.bits.skip(1496),!1},A.prototype.packetStart=function(A,t,i){A.totalLength=i,A.currentLength=0,A.pts=t},A.prototype.packetAddData=function(A,t,i){A.buffers.push(this.bits.bytes.subarray(t,i)),A.currentLength+=i-t;var e=0!==A.totalLength&&A.currentLength>=A.totalLength;return e},A.prototype.packetComplete=function(A){A.destination.write(A.pts,A.buffers),A.totalLength=0,A.currentLength=0,A.buffers=[]},A.STREAM={PACK_HEADER:186,SYSTEM_HEADER:187,PROGRAM_MAP:188,PRIVATE_1:189,PADDING:190,PRIVATE_2:191,AUDIO_1:192,VIDEO_1:224,DIRECTORY:255},A}(),JSMpeg.Decoder.Base=function(){var A=function(A){this.destination=null,this.canPlay=!1,this.collectTimestamps=!A.streaming,this.bytesWritten=0,this.timestamps=[],this.timestampIndex=0,this.startTime=0,this.decodedTime=0,Object.defineProperty(this,"currentTime",{get:this.getCurrentTime})};return A.prototype.destroy=function(){},A.prototype.connect=function(A){this.destination=A},A.prototype.bufferGetIndex=function(){return this.bits.index},A.prototype.bufferSetIndex=function(A){this.bits.index=A},A.prototype.bufferWrite=function(A){return this.bits.write(A)},A.prototype.write=function(A,t){this.collectTimestamps&&(0===this.timestamps.length&&(this.startTime=A,this.decodedTime=A),this.timestamps.push({index:this.bytesWritten<<3,time:A})),this.bytesWritten+=this.bufferWrite(t),this.canPlay=!0},A.prototype.seek=function(A){if(this.collectTimestamps){this.timestampIndex=0;for(var t=0;tA)break;this.timestampIndex=t}var i=this.timestamps[this.timestampIndex];i?(this.bufferSetIndex(i.index),this.decodedTime=i.time):(this.bufferSetIndex(0),this.decodedTime=this.startTime)}},A.prototype.decode=function(){this.advanceDecodedTime(0)},A.prototype.advanceDecodedTime=function(A){if(this.collectTimestamps){for(var t=-1,i=this.bufferGetIndex(),e=this.timestampIndex;ei)break;t=e}if(-1!==t&&t!==this.timestampIndex)return this.timestampIndex=t,void(this.decodedTime=this.timestamps[this.timestampIndex].time)}this.decodedTime+=A},A.prototype.getCurrentTime=function(){return this.decodedTime},A}(),JSMpeg.Decoder.MPEG1Video=function(){var A=function(A){JSMpeg.Decoder.Base.call(this,A),this.onDecodeCallback=A.onVideoDecode;var t=A.videoBufferSize||524288,i=A.streaming?JSMpeg.BitBuffer.MODE.EVICT:JSMpeg.BitBuffer.MODE.EXPAND;this.bits=new JSMpeg.BitBuffer(t,i),this.customIntraQuantMatrix=new Uint8Array(64),this.customNonIntraQuantMatrix=new Uint8Array(64),this.blockData=new Int32Array(64),this.currentFrame=0,this.decodeFirstFrame=!1!==A.decodeFirstFrame};return A.prototype=Object.create(JSMpeg.Decoder.Base.prototype),A.prototype.constructor=A,A.prototype.write=function(t,i){if(JSMpeg.Decoder.Base.prototype.write.call(this,t,i),!this.hasSequenceHeader){if(-1===this.bits.findStartCode(A.START.SEQUENCE))return!1;this.decodeSequenceHeader(),this.decodeFirstFrame&&this.decode()}},A.prototype.decode=function(){var t=JSMpeg.Now();if(!this.hasSequenceHeader)return!1;if(-1===this.bits.findStartCode(A.START.PICTURE)){this.bits.byteLength,this.bits.index;return!1}this.decodePicture(),this.advanceDecodedTime(1/this.frameRate);var i=JSMpeg.Now()-t;return this.onDecodeCallback&&this.onDecodeCallback(this,i),!0},A.prototype.readHuffman=function(A){var t=0;do{t=A[t+this.bits.read(1)]}while(t>=0&&0!==A[t]);return A[t+2]},A.prototype.frameRate=30,A.prototype.decodeSequenceHeader=function(){var t=this.bits.read(12),i=this.bits.read(12);if(this.bits.skip(4),this.frameRate=A.PICTURE_RATE[this.bits.read(4)],this.bits.skip(30),t===this.width&&i===this.height||(this.width=t,this.height=i,this.initBuffers(),this.destination&&this.destination.resize(t,i)),this.bits.read(1)){for(var e=0;e<64;e++)this.customIntraQuantMatrix[A.ZIG_ZAG[e]]=this.bits.read(8);this.intraQuantMatrix=this.customIntraQuantMatrix}if(this.bits.read(1)){for(e=0;e<64;e++){var o=A.ZIG_ZAG[e];this.customNonIntraQuantMatrix[o]=this.bits.read(8)}this.nonIntraQuantMatrix=this.customNonIntraQuantMatrix}this.hasSequenceHeader=!0},A.prototype.initBuffers=function(){this.intraQuantMatrix=A.DEFAULT_INTRA_QUANT_MATRIX,this.nonIntraQuantMatrix=A.DEFAULT_NON_INTRA_QUANT_MATRIX,this.mbWidth=this.width+15>>4,this.mbHeight=this.height+15>>4,this.mbSize=this.mbWidth*this.mbHeight,this.codedWidth=this.mbWidth<<4,this.codedHeight=this.mbHeight<<4,this.codedSize=this.codedWidth*this.codedHeight,this.halfWidth=this.mbWidth<<3,this.halfHeight=this.mbHeight<<3,this.currentY=new Uint8ClampedArray(this.codedSize),this.currentY32=new Uint32Array(this.currentY.buffer),this.currentCr=new Uint8ClampedArray(this.codedSize>>2),this.currentCr32=new Uint32Array(this.currentCr.buffer),this.currentCb=new Uint8ClampedArray(this.codedSize>>2),this.currentCb32=new Uint32Array(this.currentCb.buffer),this.forwardY=new Uint8ClampedArray(this.codedSize),this.forwardY32=new Uint32Array(this.forwardY.buffer),this.forwardCr=new Uint8ClampedArray(this.codedSize>>2),this.forwardCr32=new Uint32Array(this.forwardCr.buffer),this.forwardCb=new Uint8ClampedArray(this.codedSize>>2),this.forwardCb32=new Uint32Array(this.forwardCb.buffer)},A.prototype.currentY=null,A.prototype.currentCr=null,A.prototype.currentCb=null,A.prototype.pictureType=0,A.prototype.forwardY=null,A.prototype.forwardCr=null,A.prototype.forwardCb=null,A.prototype.fullPelForward=!1,A.prototype.forwardFCode=0,A.prototype.forwardRSize=0,A.prototype.forwardF=0,A.prototype.decodePicture=function(t){if(this.currentFrame++,this.bits.skip(10),this.pictureType=this.bits.read(3),this.bits.skip(16),!(this.pictureType<=0||this.pictureType>=A.PICTURE_TYPE.B)){if(this.pictureType===A.PICTURE_TYPE.PREDICTIVE){if(this.fullPelForward=this.bits.read(1),this.forwardFCode=this.bits.read(3),0===this.forwardFCode)return;this.forwardRSize=this.forwardFCode-1,this.forwardF=1<=A.START.SLICE_FIRST&&i<=A.START.SLICE_LAST)this.decodeSlice(255&i),i=this.bits.findNextStartCode();if(-1!==i&&this.bits.rewind(32),this.destination&&this.destination.render(this.currentY,this.currentCr,this.currentCb,!0),this.pictureType===A.PICTURE_TYPE.INTRA||this.pictureType===A.PICTURE_TYPE.PREDICTIVE){var e=this.forwardY,o=this.forwardY32,a=this.forwardCr,s=this.forwardCr32,n=this.forwardCb,r=this.forwardCb32;this.forwardY=this.currentY,this.forwardY32=this.currentY32,this.forwardCr=this.currentCr,this.forwardCr32=this.currentCr32,this.forwardCb=this.currentCb,this.forwardCb32=this.currentCb32,this.currentY=e,this.currentY32=o,this.currentCr=a,this.currentCr32=s,this.currentCb=n,this.currentCb32=r}}},A.prototype.quantizerScale=0,A.prototype.sliceBegin=!1,A.prototype.decodeSlice=function(A){this.sliceBegin=!0,this.macroblockAddress=(A-1)*this.mbWidth-1,this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0,this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.quantizerScale=this.bits.read(5);while(this.bits.read(1))this.bits.skip(8);do{this.decodeMacroblock()}while(!this.bits.nextBytesAreStartCode())},A.prototype.macroblockAddress=0,A.prototype.mbRow=0,A.prototype.mbCol=0,A.prototype.macroblockType=0,A.prototype.macroblockIntra=!1,A.prototype.macroblockMotFw=!1,A.prototype.motionFwH=0,A.prototype.motionFwV=0,A.prototype.motionFwHPrev=0,A.prototype.motionFwVPrev=0,A.prototype.decodeMacroblock=function(){var t=0,i=this.readHuffman(A.MACROBLOCK_ADDRESS_INCREMENT);while(34===i)i=this.readHuffman(A.MACROBLOCK_ADDRESS_INCREMENT);while(35===i)t+=33,i=this.readHuffman(A.MACROBLOCK_ADDRESS_INCREMENT);if(t+=i,this.sliceBegin)this.sliceBegin=!1,this.macroblockAddress+=t;else{if(this.macroblockAddress+t>=this.mbSize)return;t>1&&(this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.pictureType===A.PICTURE_TYPE.PREDICTIVE&&(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0));while(t>1)this.macroblockAddress++,this.mbRow=this.macroblockAddress/this.mbWidth|0,this.mbCol=this.macroblockAddress%this.mbWidth,this.copyMacroblock(this.motionFwH,this.motionFwV,this.forwardY,this.forwardCr,this.forwardCb),t--;this.macroblockAddress++}this.mbRow=this.macroblockAddress/this.mbWidth|0,this.mbCol=this.macroblockAddress%this.mbWidth;var e=A.MACROBLOCK_TYPE[this.pictureType];this.macroblockType=this.readHuffman(e),this.macroblockIntra=1&this.macroblockType,this.macroblockMotFw=8&this.macroblockType,0!==(16&this.macroblockType)&&(this.quantizerScale=this.bits.read(5)),this.macroblockIntra?(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0):(this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.decodeMotionVectors(),this.copyMacroblock(this.motionFwH,this.motionFwV,this.forwardY,this.forwardCr,this.forwardCb));for(var o=0!==(2&this.macroblockType)?this.readHuffman(A.CODE_BLOCK_PATTERN):this.macroblockIntra?63:0,a=0,s=32;a<6;a++)0!==(o&s)&&this.decodeBlock(a),s>>=1},A.prototype.decodeMotionVectors=function(){var t,i,e=0;this.macroblockMotFw?(t=this.readHuffman(A.MOTION),0!==t&&1!==this.forwardF?(e=this.bits.read(this.forwardRSize),i=(Math.abs(t)-1<(this.forwardF<<4)-1?this.motionFwHPrev-=this.forwardF<<5:this.motionFwHPrev<-this.forwardF<<4&&(this.motionFwHPrev+=this.forwardF<<5),this.motionFwH=this.motionFwHPrev,this.fullPelForward&&(this.motionFwH<<=1),t=this.readHuffman(A.MOTION),0!==t&&1!==this.forwardF?(e=this.bits.read(this.forwardRSize),i=(Math.abs(t)-1<(this.forwardF<<4)-1?this.motionFwVPrev-=this.forwardF<<5:this.motionFwVPrev<-this.forwardF<<4&&(this.motionFwVPrev+=this.forwardF<<5),this.motionFwV=this.motionFwVPrev,this.fullPelForward&&(this.motionFwV<<=1)):this.pictureType===A.PICTURE_TYPE.PREDICTIVE&&(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0)},A.prototype.copyMacroblock=function(A,t,i,e,o){var a,s,n,r,g,I,B,h,C,E,Q,c,d,l,u,p,f,m,w,D=this.currentY32,y=this.currentCb32,b=this.currentCr32;if(a=this.codedWidth,s=a-16,n=A>>1,r=t>>1,g=1===(1&A),I=1===(1&t),B=((this.mbRow<<4)+r)*a+(this.mbCol<<4)+n,h=this.mbRow*a+this.mbCol<<2,C=h+(a<<2),g)if(I)while(h>2&255,Q=i[B]+i[B+a],B++,d|=Q+c+2<<6&65280,c=i[B]+i[B+a],B++,d|=Q+c+2<<14&16711680,Q=i[B]+i[B+a],B++,d|=Q+c+2<<22&4278190080,D[h++]=d;h+=s>>2,B+=s-1}else while(h>1&255,Q=i[B++],d|=Q+c+1<<7&65280,c=i[B++],d|=Q+c+1<<15&16711680,Q=i[B++],d|=Q+c+1<<23&4278190080,D[h++]=d;h+=s>>2,B+=s-1}else if(I)while(h>1&255,B++,d|=i[B]+i[B+a]+1<<7&65280,B++,d|=i[B]+i[B+a]+1<<15&16711680,B++,d|=i[B]+i[B+a]+1<<23&4278190080,B++,D[h++]=d;h+=s>>2,B+=s}else while(h>2,B+=s}if(a=this.halfWidth,s=a-8,n=A/2>>1,r=t/2>>1,g=1===(A/2&1),I=1===(t/2&1),B=((this.mbRow<<3)+r)*a+(this.mbCol<<3)+n,h=this.mbRow*a+this.mbCol<<1,C=h+(a<<1),g)if(I)while(h>2&255,w=f+m+2>>2&255,l=e[B]+e[B+a],f=o[B]+o[B+a],B++,p|=l+u+2<<6&65280,w|=f+m+2<<6&65280,u=e[B]+e[B+a],m=o[B]+o[B+a],B++,p|=l+u+2<<14&16711680,w|=f+m+2<<14&16711680,l=e[B]+e[B+a],f=o[B]+o[B+a],B++,p|=l+u+2<<22&4278190080,w|=f+m+2<<22&4278190080,b[h]=p,y[h]=w,h++;h+=s>>2,B+=s-1}else while(h>1&255,w=f+m+1>>1&255,l=e[B],f=o[B++],p|=l+u+1<<7&65280,w|=f+m+1<<7&65280,u=e[B],m=o[B++],p|=l+u+1<<15&16711680,w|=f+m+1<<15&16711680,l=e[B],f=o[B++],p|=l+u+1<<23&4278190080,w|=f+m+1<<23&4278190080,b[h]=p,y[h]=w,h++;h+=s>>2,B+=s-1}else if(I)while(h>1&255,w=o[B]+o[B+a]+1>>1&255,B++,p|=e[B]+e[B+a]+1<<7&65280,w|=o[B]+o[B+a]+1<<7&65280,B++,p|=e[B]+e[B+a]+1<<15&16711680,w|=o[B]+o[B+a]+1<<15&16711680,B++,p|=e[B]+e[B+a]+1<<23&4278190080,w|=o[B]+o[B+a]+1<<23&4278190080,B++,b[h]=p,y[h]=w,h++;h+=s>>2,B+=s}else while(h>2,B+=s}},A.prototype.dcPredictorY=0,A.prototype.dcPredictorCr=0,A.prototype.dcPredictorCb=0,A.prototype.blockData=null,A.prototype.decodeBlock=function(t){var i,e=0;if(this.macroblockIntra){var o,a;if(t<4?(o=this.dcPredictorY,a=this.readHuffman(A.DCT_DC_SIZE_LUMINANCE)):(o=4===t?this.dcPredictorCr:this.dcPredictorCb,a=this.readHuffman(A.DCT_DC_SIZE_CHROMINANCE)),a>0){var s=this.bits.read(a);this.blockData[0]=0!==(s&1<0&&0===this.bits.read(1))break;65535===h?(B=this.bits.read(6),I=this.bits.read(8),0===I?I=this.bits.read(8):128===I?I=this.bits.read(8)-256:I>128&&(I-=256)):(B=h>>8,I=255&h,this.bits.read(1)&&(I=-I)),e+=B;var C=A.ZIG_ZAG[e];e++,I<<=1,this.macroblockIntra||(I+=I<0?-1:1),I=I*this.quantizerScale*i[C]>>4,0===(1&I)&&(I-=I>0?1:-1),I>2047?I=2047:I<-2048&&(I=-2048),this.blockData[C]=I*A.PREMULTIPLIER_MATRIX[C]}t<4?(n=this.currentY,g=this.codedWidth-8,r=this.mbRow*this.codedWidth+this.mbCol<<4,0!==(1&t)&&(r+=8),0!==(2&t)&&(r+=this.codedWidth<<3)):(n=4===t?this.currentCb:this.currentCr,g=(this.codedWidth>>1)-8,r=(this.mbRow*this.codedWidth<<2)+(this.mbCol<<3)),this.macroblockIntra?1===e?(A.CopyValueToDestination(this.blockData[0]+128>>8,n,r,g),this.blockData[0]=0):(A.IDCT(this.blockData),A.CopyBlockToDestination(this.blockData,n,r,g),JSMpeg.Fill(this.blockData,0)):1===e?(A.AddValueToDestination(this.blockData[0]+128>>8,n,r,g),this.blockData[0]=0):(A.IDCT(this.blockData),A.AddBlockToDestination(this.blockData,n,r,g),JSMpeg.Fill(this.blockData,0)),e=0},A.CopyBlockToDestination=function(A,t,i,e){for(var o=0;o<64;o+=8,i+=e+8)t[i+0]=A[o+0],t[i+1]=A[o+1],t[i+2]=A[o+2],t[i+3]=A[o+3],t[i+4]=A[o+4],t[i+5]=A[o+5],t[i+6]=A[o+6],t[i+7]=A[o+7]},A.AddBlockToDestination=function(A,t,i,e){for(var o=0;o<64;o+=8,i+=e+8)t[i+0]+=A[o+0],t[i+1]+=A[o+1],t[i+2]+=A[o+2],t[i+3]+=A[o+3],t[i+4]+=A[o+4],t[i+5]+=A[o+5],t[i+6]+=A[o+6],t[i+7]+=A[o+7]},A.CopyValueToDestination=function(A,t,i,e){for(var o=0;o<64;o+=8,i+=e+8)t[i+0]=A,t[i+1]=A,t[i+2]=A,t[i+3]=A,t[i+4]=A,t[i+5]=A,t[i+6]=A,t[i+7]=A},A.AddValueToDestination=function(A,t,i,e){for(var o=0;o<64;o+=8,i+=e+8)t[i+0]+=A,t[i+1]+=A,t[i+2]+=A,t[i+3]+=A,t[i+4]+=A,t[i+5]+=A,t[i+6]+=A,t[i+7]+=A},A.IDCT=function(A){for(var t,i,e,o,a,s,n,r,g,I,B,h,C,E,Q,c,d,l,u=0;u<8;++u)t=A[32+u],i=A[16+u]+A[48+u],e=A[40+u]-A[24+u],s=A[8+u]+A[56+u],n=A[24+u]+A[40+u],o=A[8+u]-A[56+u],a=s+n,r=A[0+u],C=(473*o-196*e+128>>8)-a,g=C-(362*(s-n)+128>>8),I=r-t,B=(362*(A[16+u]-A[48+u])+128>>8)-i,h=r+t,E=I+B,Q=h+i,c=I-B,d=h-i,l=-g-(473*e+196*o+128>>8),A[0+u]=a+Q,A[8+u]=C+E,A[16+u]=c-g,A[24+u]=d-l,A[32+u]=d+l,A[40+u]=g+c,A[48+u]=E-C,A[56+u]=Q-a;for(u=0;u<64;u+=8)t=A[4+u],i=A[2+u]+A[6+u],e=A[5+u]-A[3+u],s=A[1+u]+A[7+u],n=A[3+u]+A[5+u],o=A[1+u]-A[7+u],a=s+n,r=A[0+u],C=(473*o-196*e+128>>8)-a,g=C-(362*(s-n)+128>>8),I=r-t,B=(362*(A[2+u]-A[6+u])+128>>8)-i,h=r+t,E=I+B,Q=h+i,c=I-B,d=h-i,l=-g-(473*e+196*o+128>>8),A[0+u]=a+Q+128>>8,A[1+u]=C+E+128>>8,A[2+u]=c-g+128>>8,A[3+u]=d-l+128>>8,A[4+u]=d+l+128>>8,A[5+u]=g+c+128>>8,A[6+u]=E-C+128>>8,A[7+u]=Q-a+128>>8},A.PICTURE_RATE=[0,23.976,24,25,29.97,30,50,59.94,60,0,0,0,0,0,0,0],A.ZIG_ZAG=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),A.DEFAULT_INTRA_QUANT_MATRIX=new Uint8Array([8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83]),A.DEFAULT_NON_INTRA_QUANT_MATRIX=new Uint8Array([16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16]),A.PREMULTIPLIER_MATRIX=new Uint8Array([32,44,42,38,32,25,17,9,44,62,58,52,44,35,24,12,42,58,55,49,42,33,23,12,38,52,49,44,38,30,20,10,32,44,42,38,32,25,17,9,25,35,33,30,25,20,14,7,17,24,23,20,17,14,9,5,9,12,12,10,9,7,5,2]),A.MACROBLOCK_ADDRESS_INCREMENT=new Int16Array([3,6,0,9,12,0,0,0,1,15,18,0,21,24,0,27,30,0,33,36,0,0,0,3,0,0,2,39,42,0,45,48,0,0,0,5,0,0,4,51,54,0,57,60,0,0,0,7,0,0,6,63,66,0,69,72,0,75,78,0,81,84,0,-1,87,0,-1,90,0,93,96,0,99,102,0,105,108,0,111,114,0,0,0,9,0,0,8,117,120,0,123,126,0,129,132,0,135,138,0,0,0,15,0,0,14,0,0,13,0,0,12,0,0,11,0,0,10,141,-1,0,-1,144,0,147,150,0,153,156,0,159,162,0,165,168,0,171,174,0,177,180,0,183,-1,0,-1,186,0,189,192,0,195,198,0,201,204,0,207,210,0,213,216,0,219,222,0,0,0,21,0,0,20,0,0,19,0,0,18,0,0,17,0,0,16,0,0,35,0,0,34,0,0,33,0,0,32,0,0,31,0,0,30,0,0,29,0,0,28,0,0,27,0,0,26,0,0,25,0,0,24,0,0,23,0,0,22]),A.MACROBLOCK_TYPE_INTRA=new Int8Array([3,6,0,-1,9,0,0,0,1,0,0,17]),A.MACROBLOCK_TYPE_PREDICTIVE=new Int8Array([3,6,0,9,12,0,0,0,10,15,18,0,0,0,2,21,24,0,0,0,8,27,30,0,33,36,0,-1,39,0,0,0,18,0,0,26,0,0,1,0,0,17]),A.MACROBLOCK_TYPE_B=new Int8Array([3,6,0,9,15,0,12,18,0,24,21,0,0,0,12,27,30,0,0,0,14,39,42,0,36,33,0,0,0,4,0,0,6,54,48,0,45,51,0,0,0,8,0,0,10,-1,57,0,0,0,1,60,63,0,0,0,30,0,0,17,0,0,22,0,0,26]),A.MACROBLOCK_TYPE=[null,A.MACROBLOCK_TYPE_INTRA,A.MACROBLOCK_TYPE_PREDICTIVE,A.MACROBLOCK_TYPE_B],A.CODE_BLOCK_PATTERN=new Int16Array([6,3,0,9,18,0,12,15,0,24,33,0,36,39,0,27,21,0,30,42,0,60,57,0,54,48,0,69,51,0,81,75,0,63,84,0,45,66,0,72,78,0,0,0,60,105,120,0,132,144,0,114,108,0,126,141,0,87,93,0,117,96,0,0,0,32,135,138,0,99,123,0,129,102,0,0,0,4,90,111,0,0,0,8,0,0,16,0,0,44,150,168,0,0,0,28,0,0,52,0,0,62,183,177,0,156,180,0,0,0,1,165,162,0,0,0,61,0,0,56,171,174,0,0,0,2,0,0,40,153,186,0,0,0,48,192,189,0,147,159,0,0,0,20,0,0,12,240,249,0,0,0,63,231,225,0,195,219,0,252,198,0,0,0,24,0,0,36,0,0,3,207,261,0,243,237,0,204,213,0,210,234,0,201,228,0,216,222,0,258,255,0,264,246,0,-1,282,0,285,291,0,0,0,33,0,0,9,318,330,0,306,348,0,0,0,5,0,0,10,279,267,0,0,0,6,0,0,18,0,0,17,0,0,34,339,357,0,309,312,0,270,276,0,327,321,0,351,354,0,303,297,0,294,288,0,300,273,0,342,345,0,315,324,0,336,333,0,363,375,0,0,0,41,0,0,14,0,0,21,372,366,0,360,369,0,0,0,11,0,0,19,0,0,7,0,0,35,0,0,13,0,0,50,0,0,49,0,0,58,0,0,37,0,0,25,0,0,45,0,0,57,0,0,26,0,0,29,0,0,38,0,0,53,0,0,23,0,0,43,0,0,46,0,0,42,0,0,22,0,0,54,0,0,51,0,0,15,0,0,30,0,0,39,0,0,47,0,0,55,0,0,27,0,0,59,0,0,31]),A.MOTION=new Int16Array([3,6,0,12,9,0,0,0,0,18,15,0,24,21,0,0,0,-1,0,0,1,27,30,0,36,33,0,0,0,2,0,0,-2,42,45,0,48,39,0,60,54,0,0,0,3,0,0,-3,51,57,0,-1,69,0,81,75,0,78,63,0,72,66,0,96,84,0,87,93,0,-1,99,0,108,105,0,0,0,-4,90,102,0,0,0,4,0,0,-7,0,0,5,111,123,0,0,0,-5,0,0,7,114,120,0,126,117,0,0,0,-6,0,0,6,153,162,0,150,147,0,135,138,0,156,141,0,129,159,0,132,144,0,0,0,10,0,0,9,0,0,8,0,0,-8,171,198,0,0,0,-9,180,192,0,168,183,0,165,186,0,174,189,0,0,0,-10,177,195,0,0,0,12,0,0,16,0,0,13,0,0,14,0,0,11,0,0,15,0,0,-16,0,0,-12,0,0,-14,0,0,-15,0,0,-11,0,0,-13]),A.DCT_DC_SIZE_LUMINANCE=new Int8Array([6,3,0,18,15,0,9,12,0,0,0,1,0,0,2,27,24,0,21,30,0,0,0,0,36,33,0,0,0,4,0,0,3,39,42,0,0,0,5,0,0,6,48,45,0,51,-1,0,0,0,7,0,0,8]),A.DCT_DC_SIZE_CHROMINANCE=new Int8Array([6,3,0,12,9,0,18,15,0,24,21,0,0,0,2,0,0,1,0,0,0,30,27,0,0,0,3,36,33,0,0,0,4,42,39,0,0,0,5,48,45,0,0,0,6,51,-1,0,0,0,7,0,0,8]),A.DCT_COEFF=new Int32Array([3,6,0,12,9,0,0,0,1,21,24,0,18,15,0,39,27,0,33,30,0,42,36,0,0,0,257,60,66,0,54,63,0,48,57,0,0,0,513,51,45,0,0,0,2,0,0,3,81,75,0,87,93,0,72,78,0,96,90,0,0,0,1025,69,84,0,0,0,769,0,0,258,0,0,1793,0,0,65535,0,0,1537,111,108,0,0,0,1281,105,102,0,117,114,0,99,126,0,120,123,0,156,150,0,162,159,0,144,147,0,129,135,0,138,132,0,0,0,2049,0,0,4,0,0,514,0,0,2305,153,141,0,165,171,0,180,168,0,177,174,0,183,186,0,0,0,2561,0,0,3329,0,0,6,0,0,259,0,0,5,0,0,770,0,0,2817,0,0,3073,228,225,0,201,210,0,219,213,0,234,222,0,216,231,0,207,192,0,204,189,0,198,195,0,243,261,0,273,240,0,246,237,0,249,258,0,279,276,0,252,255,0,270,282,0,264,267,0,0,0,515,0,0,260,0,0,7,0,0,1026,0,0,1282,0,0,4097,0,0,3841,0,0,3585,315,321,0,333,342,0,312,291,0,375,357,0,288,294,0,-1,369,0,285,303,0,318,363,0,297,306,0,339,309,0,336,348,0,330,300,0,372,345,0,351,366,0,327,354,0,360,324,0,381,408,0,417,420,0,390,378,0,435,438,0,384,387,0,0,0,2050,396,402,0,465,462,0,0,0,8,411,399,0,429,432,0,453,414,0,426,423,0,0,0,10,0,0,9,0,0,11,0,0,5377,0,0,1538,0,0,771,0,0,5121,0,0,1794,0,0,4353,0,0,4609,0,0,4865,444,456,0,0,0,1027,459,450,0,0,0,261,393,405,0,0,0,516,447,441,0,516,519,0,486,474,0,510,483,0,504,498,0,471,537,0,507,501,0,522,513,0,534,531,0,468,477,0,492,495,0,549,546,0,525,528,0,0,0,263,0,0,2562,0,0,2306,0,0,5633,0,0,5889,0,0,6401,0,0,6145,0,0,1283,0,0,772,0,0,13,0,0,12,0,0,14,0,0,15,0,0,517,0,0,6657,0,0,262,540,543,0,480,489,0,588,597,0,0,0,27,609,555,0,606,603,0,0,0,19,0,0,22,591,621,0,0,0,18,573,576,0,564,570,0,0,0,20,552,582,0,0,0,21,558,579,0,0,0,23,612,594,0,0,0,25,0,0,24,600,615,0,0,0,31,0,0,30,0,0,28,0,0,29,0,0,26,0,0,17,0,0,16,567,618,0,561,585,0,654,633,0,0,0,37,645,648,0,0,0,36,630,636,0,0,0,34,639,627,0,663,666,0,657,624,0,651,642,0,669,660,0,0,0,35,0,0,267,0,0,40,0,0,268,0,0,266,0,0,32,0,0,264,0,0,265,0,0,38,0,0,269,0,0,270,0,0,33,0,0,39,0,0,7937,0,0,6913,0,0,7681,0,0,4098,0,0,7425,0,0,7169,0,0,271,0,0,274,0,0,273,0,0,272,0,0,1539,0,0,2818,0,0,3586,0,0,3330,0,0,3074,0,0,3842]),A.PICTURE_TYPE={INTRA:1,PREDICTIVE:2,B:3},A.START={SEQUENCE:179,SLICE_FIRST:1,SLICE_LAST:175,PICTURE:0,EXTENSION:181,USER_DATA:178},A}(),JSMpeg.Decoder.MPEG1VideoWASM=function(){var A=function(A){JSMpeg.Decoder.Base.call(this,A),this.onDecodeCallback=A.onVideoDecode,this.module=A.wasmModule,this.bufferSize=A.videoBufferSize||524288,this.bufferMode=A.streaming?JSMpeg.BitBuffer.MODE.EVICT:JSMpeg.BitBuffer.MODE.EXPAND,this.decodeFirstFrame=!1!==A.decodeFirstFrame,this.hasSequenceHeader=!1};return A.prototype=Object.create(JSMpeg.Decoder.Base.prototype),A.prototype.constructor=A,A.prototype.initializeWasmDecoder=function(){this.module.instance?(this.instance=this.module.instance,this.functions=this.module.instance.exports,this.decoder=this.functions._mpeg1_decoder_create(this.bufferSize,this.bufferMode)):console.warn("JSMpeg: WASM module not compiled yet")},A.prototype.destroy=function(){this.decoder&&this.functions._mpeg1_decoder_destroy(this.decoder)},A.prototype.bufferGetIndex=function(){if(this.decoder)return this.functions._mpeg1_decoder_get_index(this.decoder)},A.prototype.bufferSetIndex=function(A){this.decoder&&this.functions._mpeg1_decoder_set_index(this.decoder,A)},A.prototype.bufferWrite=function(A){this.decoder||this.initializeWasmDecoder();for(var t=0,i=0;i>2)),n=this.instance.heapU8.subarray(o,o+(this.codedSize>>2));this.destination.render(a,s,n,!1)}this.advanceDecodedTime(1/this.frameRate);var r=JSMpeg.Now()-A;return this.onDecodeCallback&&this.onDecodeCallback(this,r),!0},A}(),JSMpeg.Decoder.MP2Audio=function(){var A=function A(t){JSMpeg.Decoder.Base.call(this,t),this.onDecodeCallback=t.onAudioDecode;var i=t.audioBufferSize||131072,e=t.streaming?JSMpeg.BitBuffer.MODE.EVICT:JSMpeg.BitBuffer.MODE.EXPAND;this.bits=new JSMpeg.BitBuffer(i,e),this.left=new Float32Array(1152),this.right=new Float32Array(1152),this.sampleRate=44100,this.D=new Float32Array(1024),this.D.set(A.SYNTHESIS_WINDOW,0),this.D.set(A.SYNTHESIS_WINDOW,512),this.V=[new Float32Array(1024),new Float32Array(1024)],this.U=new Int32Array(32),this.VPos=0,this.allocation=[new Array(32),new Array(32)],this.scaleFactorInfo=[new Uint8Array(32),new Uint8Array(32)],this.scaleFactor=[new Array(32),new Array(32)],this.sample=[new Array(32),new Array(32)];for(var o=0;o<2;o++)for(var a=0;a<32;a++)this.scaleFactor[o][a]=[0,0,0],this.sample[o][a]=[0,0,0]};return A.prototype=Object.create(JSMpeg.Decoder.Base.prototype),A.prototype.constructor=A,A.prototype.decode=function(){var A=JSMpeg.Now(),t=this.bits.index>>3;if(t>=this.bits.byteLength)return!1;var i=this.decodeFrame(this.left,this.right);if(this.bits.index=t+i<<3,!i)return!1;this.destination&&this.destination.play(this.sampleRate,this.left,this.right),this.advanceDecodedTime(this.left.length/this.sampleRate);var e=JSMpeg.Now()-A;return this.onDecodeCallback&&this.onDecodeCallback(this,e),!0},A.prototype.getCurrentTime=function(){var A=this.destination?this.destination.enqueuedTime:0;return this.decodedTime-A},A.prototype.decodeFrame=function(t,i){var e=this.bits.read(11),o=this.bits.read(2),a=this.bits.read(2),s=!this.bits.read(1);if(e!==A.FRAME_SYNC||o!==A.VERSION.MPEG_1||a!==A.LAYER.II)return 0;var n=this.bits.read(4)-1;if(n>13)return 0;var r=this.bits.read(2),g=A.SAMPLE_RATE[r];if(3===r)return 0;o===A.VERSION.MPEG_2&&(r+=4,n+=14);var I=this.bits.read(1),B=(this.bits.read(1),this.bits.read(2)),h=0;B===A.MODE.JOINT_STEREO?h=this.bits.read(2)+1<<2:(this.bits.skip(2),h=B===A.MODE.MONO?0:32),this.bits.skip(4),s&&this.bits.skip(16);var C=A.BIT_RATE[n],E=(g=A.SAMPLE_RATE[r],144e3*C/g+I|0),Q=0,c=0;if(o===A.VERSION.MPEG_2)Q=2,c=30;else{var d=B===A.MODE.MONO?0:1,l=A.QUANT_LUT_STEP_1[d][n];Q=A.QUANT_LUT_STEP_2[l][r],c=63&Q,Q>>=6}h>c&&(h=c);for(var u=0;u>1),M=this.VPos%128>>1;while(M<1024){for(var v=0;v<32;++v)this.U[v]+=this.D[S++]*this.V[f][M++];M+=96,S+=32}M=1120-M,S-=480;while(M<1024){for(v=0;v<32;++v)this.U[v]+=this.D[S++]*this.V[f][M++];M+=96,S+=32}for(var k=0===f?t:i,R=0;R<32;R++)k[w+R]=this.U[R]/2147418112}w+=32}}return this.sampleRate=g,E},A.prototype.readAllocation=function(t,i){var e=A.QUANT_LUT_STEP_3[i][t],o=A.QUANT_LUT_STEP4[15&e][this.bits.read(e>>4)];return o?A.QUANT_TAB[o-1]:0},A.prototype.readSamples=function(t,i,e){var o=this.allocation[t][i],a=this.scaleFactor[t][i][e],s=this.sample[t][i],n=0;if(o){if(63===a)a=0;else{var r=a/3|0;a=A.SCALEFACTOR_BASE[a%3]+(1<>1)>>r}var g=o.levels;o.group?(n=this.bits.read(o.bits),s[0]=n%g,n=n/g|0,s[1]=n%g,s[2]=n/g|0):(s[0]=this.bits.read(o.bits),s[1]=this.bits.read(o.bits),s[2]=this.bits.read(o.bits));var I=65536/(g+1)|0;g=(g+1>>1)-1,n=(g-s[0])*I,s[0]=n*(a>>12)+(n*(4095&a)+2048>>12)>>12,n=(g-s[1])*I,s[1]=n*(a>>12)+(n*(4095&a)+2048>>12)>>12,n=(g-s[2])*I,s[2]=n*(a>>12)+(n*(4095&a)+2048>>12)>>12}else s[0]=s[1]=s[2]=0},A.MatrixTransform=function(A,t,i,e){var o,a,s,n,r,g,I,B,h,C,E,Q,c,d,l,u,p,f,m,w,D,y,b,S,M,v,k,R,G,F,q,N,J;o=A[0][t]+A[31][t],a=.500602998235*(A[0][t]-A[31][t]),s=A[1][t]+A[30][t],n=.505470959898*(A[1][t]-A[30][t]),r=A[2][t]+A[29][t],g=.515447309923*(A[2][t]-A[29][t]),I=A[3][t]+A[28][t],B=.53104259109*(A[3][t]-A[28][t]),h=A[4][t]+A[27][t],C=.553103896034*(A[4][t]-A[27][t]),E=A[5][t]+A[26][t],Q=.582934968206*(A[5][t]-A[26][t]),c=A[6][t]+A[25][t],d=.622504123036*(A[6][t]-A[25][t]),l=A[7][t]+A[24][t],u=.674808341455*(A[7][t]-A[24][t]),p=A[8][t]+A[23][t],f=.744536271002*(A[8][t]-A[23][t]),m=A[9][t]+A[22][t],w=.839349645416*(A[9][t]-A[22][t]),D=A[10][t]+A[21][t],y=.972568237862*(A[10][t]-A[21][t]),b=A[11][t]+A[20][t],S=1.16943993343*(A[11][t]-A[20][t]),M=A[12][t]+A[19][t],v=1.48416461631*(A[12][t]-A[19][t]),k=A[13][t]+A[18][t],R=2.05778100995*(A[13][t]-A[18][t]),G=A[14][t]+A[17][t],F=3.40760841847*(A[14][t]-A[17][t]),q=A[15][t]+A[16][t],N=10.1900081235*(A[15][t]-A[16][t]),J=o+q,q=.502419286188*(o-q),o=s+G,G=.52249861494*(s-G),s=r+k,k=.566944034816*(r-k),r=I+M,M=.64682178336*(I-M),I=h+b,b=.788154623451*(h-b),h=E+D,D=1.06067768599*(E-D),E=c+m,m=1.72244709824*(c-m),c=l+p,p=5.10114861869*(l-p),l=J+c,c=.509795579104*(J-c),J=o+E,o=.601344886935*(o-E),E=s+h,h=.899976223136*(s-h),s=r+I,I=2.56291544774*(r-I),r=l+s,l=.541196100146*(l-s),s=J+E,E=1.30656296488*(J-E),J=r+s,r=.707106781187*(r-s),s=l+E,l=.707106781187*(l-E),s+=l,E=c+I,c=.541196100146*(c-I),I=o+h,h=1.30656296488*(o-h),o=E+I,I=.707106781187*(E-I),E=c+h,c=.707106781187*(c-h),E+=c,o+=E,E+=I,I+=c,h=q+p,q=.509795579104*(q-p),p=G+m,G=.601344886935*(G-m),m=k+D,D=.899976223136*(k-D),k=M+b,b=2.56291544774*(M-b),M=h+k,h=.541196100146*(h-k),k=p+m,m=1.30656296488*(p-m),p=M+k,k=.707106781187*(M-k),M=h+m,m=.707106781187*(h-m),M+=m,h=q+b,q=.541196100146*(q-b),b=G+D,D=1.30656296488*(G-D),G=h+b,b=.707106781187*(h-b),h=q+D,q=.707106781187*(q-D),h+=q,G+=h,h+=b,b+=q,p+=G,G+=M,M+=h,h+=k,k+=b,b+=m,m+=q,D=a+N,a=.502419286188*(a-N),N=n+F,n=.52249861494*(n-F),F=g+R,R=.566944034816*(g-R),g=B+v,B=.64682178336*(B-v),v=C+S,C=.788154623451*(C-S),S=Q+y,y=1.06067768599*(Q-y),Q=d+w,w=1.72244709824*(d-w),d=u+f,u=5.10114861869*(u-f),f=D+d,d=.509795579104*(D-d),D=N+Q,N=.601344886935*(N-Q),Q=F+S,S=.899976223136*(F-S),F=g+v,v=2.56291544774*(g-v),g=f+F,f=.541196100146*(f-F),F=D+Q,Q=1.30656296488*(D-Q),D=g+F,F=.707106781187*(g-F),g=f+Q,Q=.707106781187*(f-Q),g+=Q,f=d+v,v=.541196100146*(d-v),d=N+S,S=1.30656296488*(N-S),N=f+d,d=.707106781187*(f-d),f=v+S,S=.707106781187*(v-S),f+=S,N+=f,f+=d,v=d+S,d=a+u,a=.509795579104*(a-u),u=n+w,n=.601344886935*(n-w),w=R+y,y=.899976223136*(R-y),R=B+C,C=2.56291544774*(B-C),B=d+R,d=.541196100146*(d-R),R=u+w,w=1.30656296488*(u-w),u=B+R,R=.707106781187*(B-R),B=d+w,w=.707106781187*(d-w),B+=w,d=a+C,a=.541196100146*(a-C),C=n+y,y=1.30656296488*(n-y),n=d+C,C=.707106781187*(d-C),d=a+y,a=.707106781187*(a-y),d+=a,n+=d,d+=C,C+=a,u+=n,n+=B,B+=d,d+=R,R+=C,C+=w,w+=a,D+=u,u+=N,N+=n,n+=g,g+=B,B+=f,f+=d,d+=F,F+=R,R+=v,v+=C,C+=Q,Q+=w,w+=S,S+=a,i[e+48]=-J,i[e+49]=i[e+47]=-D,i[e+50]=i[e+46]=-p,i[e+51]=i[e+45]=-u,i[e+52]=i[e+44]=-o,i[e+53]=i[e+43]=-N,i[e+54]=i[e+42]=-G,i[e+55]=i[e+41]=-n,i[e+56]=i[e+40]=-s,i[e+57]=i[e+39]=-g,i[e+58]=i[e+38]=-M,i[e+59]=i[e+37]=-B,i[e+60]=i[e+36]=-E,i[e+61]=i[e+35]=-f,i[e+62]=i[e+34]=-h,i[e+63]=i[e+33]=-d,i[e+32]=-r,i[e+0]=r,i[e+31]=-F,i[e+1]=F,i[e+30]=-k,i[e+2]=k,i[e+29]=-R,i[e+3]=R,i[e+28]=-I,i[e+4]=I,i[e+27]=-v,i[e+5]=v,i[e+26]=-b,i[e+6]=b,i[e+25]=-C,i[e+7]=C,i[e+24]=-l,i[e+8]=l,i[e+23]=-Q,i[e+9]=Q,i[e+22]=-m,i[e+10]=m,i[e+21]=-w,i[e+11]=w,i[e+20]=-c,i[e+12]=c,i[e+19]=-S,i[e+13]=S,i[e+18]=-q,i[e+14]=q,i[e+17]=-a,i[e+15]=a,i[e+16]=0},A.FRAME_SYNC=2047,A.VERSION={MPEG_2_5:0,MPEG_2:2,MPEG_1:3},A.LAYER={III:1,II:2,I:3},A.MODE={STEREO:0,JOINT_STEREO:1,DUAL_CHANNEL:2,MONO:3},A.SAMPLE_RATE=new Uint16Array([44100,48e3,32e3,0,22050,24e3,16e3,0]),A.BIT_RATE=new Uint16Array([32,48,56,64,80,96,112,128,160,192,224,256,320,384,8,16,24,32,40,48,56,64,80,96,112,128,144,160]),A.SCALEFACTOR_BASE=new Uint32Array([33554432,26632170,21137968]),A.SYNTHESIS_WINDOW=new Float32Array([0,-.5,-.5,-.5,-.5,-.5,-.5,-1,-1,-1,-1,-1.5,-1.5,-2,-2,-2.5,-2.5,-3,-3.5,-3.5,-4,-4.5,-5,-5.5,-6.5,-7,-8,-8.5,-9.5,-10.5,-12,-13,-14.5,-15.5,-17.5,-19,-20.5,-22.5,-24.5,-26.5,-29,-31.5,-34,-36.5,-39.5,-42.5,-45.5,-48.5,-52,-55.5,-58.5,-62.5,-66,-69.5,-73.5,-77,-80.5,-84.5,-88,-91.5,-95,-98,-101,-104,106.5,109,111,112.5,113.5,114,114,113.5,112,110.5,107.5,104,100,94.5,88.5,81.5,73,63.5,53,41.5,28.5,14.5,-1,-18,-36,-55.5,-76.5,-98.5,-122,-147,-173.5,-200.5,-229.5,-259.5,-290.5,-322.5,-355.5,-389.5,-424,-459.5,-495.5,-532,-568.5,-605,-641.5,-678,-714,-749,-783.5,-817,-849,-879.5,-908.5,-935,-959.5,-981,-1000.5,-1016,-1028.5,-1037.5,-1042.5,-1043.5,-1040,-1031.5,1018.5,1e3,976,946.5,911,869.5,822,767.5,707,640,565.5,485,397,302.5,201,92.5,-22.5,-144,-272.5,-407,-547.5,-694,-846,-1003,-1165,-1331.5,-1502,-1675.5,-1852.5,-2031.5,-2212.5,-2394,-2576.5,-2758.5,-2939.5,-3118.5,-3294.5,-3467.5,-3635.5,-3798.5,-3955,-4104.5,-4245.5,-4377.5,-4499,-4609.5,-4708,-4792.5,-4863.5,-4919,-4958,-4979.5,-4983,-4967.5,-4931.5,-4875,-4796,-4694.5,-4569.5,-4420,-4246,-4046,-3820,-3567,3287,2979.5,2644,2280.5,1888,1467.5,1018.5,541,35,-499,-1061,-1650,-2266.5,-2909,-3577,-4270,-4987.5,-5727.5,-6490,-7274,-8077.5,-8899.5,-9739,-10594.5,-11464.5,-12347,-13241,-14144.5,-15056,-15973.5,-16895.5,-17820,-18744.5,-19668,-20588,-21503,-22410.5,-23308.5,-24195,-25068.5,-25926.5,-26767,-27589,-28389,-29166.5,-29919,-30644.5,-31342,-32009.5,-32645,-33247,-33814.5,-34346,-34839.5,-35295,-35710,-36084.5,-36417.5,-36707.5,-36954,-37156.5,-37315,-37428,-37496,37519,37496,37428,37315,37156.5,36954,36707.5,36417.5,36084.5,35710,35295,34839.5,34346,33814.5,33247,32645,32009.5,31342,30644.5,29919,29166.5,28389,27589,26767,25926.5,25068.5,24195,23308.5,22410.5,21503,20588,19668,18744.5,17820,16895.5,15973.5,15056,14144.5,13241,12347,11464.5,10594.5,9739,8899.5,8077.5,7274,6490,5727.5,4987.5,4270,3577,2909,2266.5,1650,1061,499,-35,-541,-1018.5,-1467.5,-1888,-2280.5,-2644,-2979.5,3287,3567,3820,4046,4246,4420,4569.5,4694.5,4796,4875,4931.5,4967.5,4983,4979.5,4958,4919,4863.5,4792.5,4708,4609.5,4499,4377.5,4245.5,4104.5,3955,3798.5,3635.5,3467.5,3294.5,3118.5,2939.5,2758.5,2576.5,2394,2212.5,2031.5,1852.5,1675.5,1502,1331.5,1165,1003,846,694,547.5,407,272.5,144,22.5,-92.5,-201,-302.5,-397,-485,-565.5,-640,-707,-767.5,-822,-869.5,-911,-946.5,-976,-1e3,1018.5,1031.5,1040,1043.5,1042.5,1037.5,1028.5,1016,1000.5,981,959.5,935,908.5,879.5,849,817,783.5,749,714,678,641.5,605,568.5,532,495.5,459.5,424,389.5,355.5,322.5,290.5,259.5,229.5,200.5,173.5,147,122,98.5,76.5,55.5,36,18,1,-14.5,-28.5,-41.5,-53,-63.5,-73,-81.5,-88.5,-94.5,-100,-104,-107.5,-110.5,-112,-113.5,-114,-114,-113.5,-112.5,-111,-109,106.5,104,101,98,95,91.5,88,84.5,80.5,77,73.5,69.5,66,62.5,58.5,55.5,52,48.5,45.5,42.5,39.5,36.5,34,31.5,29,26.5,24.5,22.5,20.5,19,17.5,15.5,14.5,13,12,10.5,9.5,8.5,8,7,6.5,5.5,5,4.5,4,3.5,3.5,3,2.5,2.5,2,2,1.5,1.5,1,1,1,1,.5,.5,.5,.5,.5,.5]),A.QUANT_LUT_STEP_1=[[0,0,1,1,1,2,2,2,2,2,2,2,2,2],[0,0,0,0,0,0,1,1,1,2,2,2,2,2]],A.QUANT_TAB={A:91,B:94,C:8,D:12},A.QUANT_LUT_STEP_2=[[A.QUANT_TAB.C,A.QUANT_TAB.C,A.QUANT_TAB.D],[A.QUANT_TAB.A,A.QUANT_TAB.A,A.QUANT_TAB.A],[A.QUANT_TAB.B,A.QUANT_TAB.A,A.QUANT_TAB.B]],A.QUANT_LUT_STEP_3=[[68,68,52,52,52,52,52,52,52,52,52,52],[67,67,67,66,66,66,66,66,66,66,66,49,49,49,49,49,49,49,49,49,49,49,49,32,32,32,32,32,32,32],[69,69,69,69,52,52,52,52,52,52,52,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36]],A.QUANT_LUT_STEP4=[[0,1,2,17],[0,1,2,3,4,5,6,17],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17],[0,1,3,5,6,7,8,9,10,11,12,13,14,15,16,17],[0,1,2,4,5,6,7,8,9,10,11,12,13,14,15,17],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],A.QUANT_TAB=[{levels:3,group:1,bits:5},{levels:5,group:1,bits:7},{levels:7,group:0,bits:3},{levels:9,group:1,bits:10},{levels:15,group:0,bits:4},{levels:31,group:0,bits:5},{levels:63,group:0,bits:6},{levels:127,group:0,bits:7},{levels:255,group:0,bits:8},{levels:511,group:0,bits:9},{levels:1023,group:0,bits:10},{levels:2047,group:0,bits:11},{levels:4095,group:0,bits:12},{levels:8191,group:0,bits:13},{levels:16383,group:0,bits:14},{levels:32767,group:0,bits:15},{levels:65535,group:0,bits:16}],A}(),JSMpeg.Decoder.MP2AudioWASM=function(){var A=function(A){JSMpeg.Decoder.Base.call(this,A),this.onDecodeCallback=A.onAudioDecode,this.module=A.wasmModule,this.bufferSize=A.audioBufferSize||131072,this.bufferMode=A.streaming?JSMpeg.BitBuffer.MODE.EVICT:JSMpeg.BitBuffer.MODE.EXPAND,this.sampleRate=0};return A.prototype=Object.create(JSMpeg.Decoder.Base.prototype),A.prototype.constructor=A,A.prototype.initializeWasmDecoder=function(){this.module.instance?(this.instance=this.module.instance,this.functions=this.module.instance.exports,this.decoder=this.functions._mp2_decoder_create(this.bufferSize,this.bufferMode)):console.warn("JSMpeg: WASM module not compiled yet")},A.prototype.destroy=function(){this.decoder&&this.functions._mp2_decoder_destroy(this.decoder)},A.prototype.bufferGetIndex=function(){if(this.decoder)return this.functions._mp2_decoder_get_index(this.decoder)},A.prototype.bufferSetIndex=function(A){this.decoder&&this.functions._mp2_decoder_set_index(this.decoder,A)},A.prototype.bufferWrite=function(A){this.decoder||this.initializeWasmDecoder();for(var t=0,i=0;i>4<<4;this.gl.viewport(0,0,i,this.height)},A.prototype.createTexture=function(A,t){var i=this.gl,e=i.createTexture();return i.bindTexture(i.TEXTURE_2D,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.uniform1i(i.getUniformLocation(this.program,t),A),e},A.prototype.createProgram=function(A,t){var i=this.gl,e=i.createProgram();return i.attachShader(e,this.compileShader(i.VERTEX_SHADER,A)),i.attachShader(e,this.compileShader(i.FRAGMENT_SHADER,t)),i.linkProgram(e),i.useProgram(e),e},A.prototype.compileShader=function(A,t){var i=this.gl,e=i.createShader(A);if(i.shaderSource(e,t),i.compileShader(e),!i.getShaderParameter(e,i.COMPILE_STATUS))throw new Error(i.getShaderInfoLog(e));return e},A.prototype.allowsClampedTextureData=function(){var A=this.gl,t=A.createTexture();return A.bindTexture(A.TEXTURE_2D,t),A.texImage2D(A.TEXTURE_2D,0,A.LUMINANCE,1,1,0,A.LUMINANCE,A.UNSIGNED_BYTE,new Uint8ClampedArray([0])),0===A.getError()},A.prototype.renderProgress=function(A){var t=this.gl;t.useProgram(this.loadingProgram);var i=t.getUniformLocation(this.loadingProgram,"progress");t.uniform1f(i,A),t.drawArrays(t.TRIANGLE_STRIP,0,4)},A.prototype.render=function(A,t,i,e){if(this.enabled){var o=this.gl,a=this.width+15>>4<<4,s=this.height,n=a>>1,r=s>>1;e&&this.shouldCreateUnclampedViews&&(A=new Uint8Array(A.buffer),t=new Uint8Array(t.buffer),i=new Uint8Array(i.buffer)),o.useProgram(this.program),this.updateTexture(o.TEXTURE0,this.textureY,a,s,A),this.updateTexture(o.TEXTURE1,this.textureCb,n,r,t),this.updateTexture(o.TEXTURE2,this.textureCr,n,r,i),o.drawArrays(o.TRIANGLE_STRIP,0,4)}},A.prototype.updateTexture=function(A,t,i,e,o){var a=this.gl;a.activeTexture(A),a.bindTexture(a.TEXTURE_2D,t),this.hasTextureData[A]?a.texSubImage2D(a.TEXTURE_2D,0,0,0,i,e,a.LUMINANCE,a.UNSIGNED_BYTE,o):(this.hasTextureData[A]=!0,a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,i,e,0,a.LUMINANCE,a.UNSIGNED_BYTE,o))},A.prototype.deleteTexture=function(A,t){var i=this.gl;i.activeTexture(A),i.bindTexture(i.TEXTURE_2D,null),i.deleteTexture(t)},A.IsSupported=function(){try{if(!window.WebGLRenderingContext)return!1;var A=document.createElement("canvas");return!(!A.getContext("webgl")&&!A.getContext("experimental-webgl"))}catch(t){return!1}},A.SHADER={FRAGMENT_YCRCB_TO_RGBA:["precision mediump float;","uniform sampler2D textureY;","uniform sampler2D textureCb;","uniform sampler2D textureCr;","varying vec2 texCoord;","mat4 rec601 = mat4(","1.16438, 0.00000, 1.59603, -0.87079,","1.16438, -0.39176, -0.81297, 0.52959,","1.16438, 2.01723, 0.00000, -1.08139,","0, 0, 0, 1",");","void main() {","float y = texture2D(textureY, texCoord).r;","float cb = texture2D(textureCb, texCoord).r;","float cr = texture2D(textureCr, texCoord).r;","gl_FragColor = vec4(y, cr, cb, 1.0) * rec601;","}"].join("\n"),FRAGMENT_LOADING:["precision mediump float;","uniform float progress;","varying vec2 texCoord;","void main() {","float c = ceil(progress-(1.0-texCoord.y));","gl_FragColor = vec4(c,c,c,1);","}"].join("\n"),VERTEX_IDENTITY:["attribute vec2 vertex;","varying vec2 texCoord;","void main() {","texCoord = vertex;","gl_Position = vec4((vertex * 2.0 - 1.0) * vec2(1, -1), 0.0, 1.0);","}"].join("\n")},A}(),JSMpeg.Renderer.Canvas2D=function(){var A=function(A){this.canvas=A.canvas||document.createElement("canvas"),this.width=this.canvas.width,this.height=this.canvas.height,this.enabled=!0,this.context=this.canvas.getContext("2d")};return A.prototype.destroy=function(){},A.prototype.resize=function(A,t){this.width=0|A,this.height=0|t,this.canvas.width=this.width,this.canvas.height=this.height,this.imageData=this.context.getImageData(0,0,this.width,this.height),JSMpeg.Fill(this.imageData.data,255)},A.prototype.renderProgress=function(A){var t=this.canvas.width,i=this.canvas.height,e=this.context;e.fillStyle="#222",e.fillRect(0,0,t,i),e.fillStyle="#fff",e.fillRect(0,i-i*A,t,i*A)},A.prototype.render=function(A,t,i){this.YCbCrToRGBA(A,t,i,this.imageData.data),this.context.putImageData(this.imageData,0,0)},A.prototype.YCbCrToRGBA=function(A,t,i,e){if(this.enabled)for(var o,a,s,n,r,g=this.width+15>>4<<4,I=g>>1,B=0,h=g,C=g+(g-this.width),E=0,Q=I-(this.width>>1),c=0,d=4*this.width,l=4*this.width,u=this.width>>1,p=this.height>>1,f=0;f>8)-179,n=(88*a>>8)-44+(183*o>>8)-91,r=a+(198*a>>8)-227;var w=A[B++],D=A[B++];e[c]=w+s,e[c+1]=w-n,e[c+2]=w+r,e[c+4]=D+s,e[c+5]=D-n,e[c+6]=D+r,c+=8;var y=A[h++],b=A[h++];e[d]=y+s,e[d+1]=y-n,e[d+2]=y+r,e[d+4]=b+s,e[d+5]=b-n,e[d+6]=b+r,d+=8}B+=C,h+=C,c+=l,d+=l,E+=Q}},A}(),JSMpeg.AudioOutput.WebAudio=function(){var A=function A(t){this.context=A.CachedContext=A.CachedContext||new(window.AudioContext||window.webkitAudioContext),this.gain=this.context.createGain(),this.destination=this.gain,this.gain.connect(this.context.destination),this.context._connections=(this.context._connections||0)+1,this.startTime=0,this.buffer=null,this.wallclockStartTime=0,this.volume=1,this.enabled=!0,this.unlocked=!A.NeedsUnlocking(),Object.defineProperty(this,"enqueuedTime",{get:this.getEnqueuedTime})};return A.prototype.destroy=function(){this.gain.disconnect(),this.context._connections--,0===this.context._connections&&(this.context.close(),A.CachedContext=null)},A.prototype.play=function(A,t,i){if(this.enabled){if(!this.unlocked){var e=JSMpeg.Now();return this.wallclockStartTimethis.memory.buffer.byteLength){var i=this.brk-this.memory.buffer.byteLength,e=Math.ceil(i/this.pageSize);this.memory.grow(e),this.createHeapViews()}return t},A.prototype.c_abort=function(A){console.warn("JSMPeg: WASM abort",arguments)},A.prototype.c_assertFail=function(A){console.warn("JSMPeg: WASM ___assert_fail",arguments)},A.prototype.readDylinkSection=function(A){var t=new Uint8Array(A),i=0,e=function(){var A=0,e=1;while(1){var o=t[i++];if(A+=(127&o)*e,e*=128,!(128&o))return A}},o=function(A){for(var e=0;e局放数据:"+A[0].value+"dbm"}},grid:{top:"10%",left:"3%",right:"3%",bottom:"10%"},xAxis:[{type:"category",boundaryGap:!0,axisLine:{show:!0,lineStyle:{color:'color:"#93dcfe"'}},axisLabel:{textStyle:{color:"#93dcfe",margin:15},formatter:function(A){return A}},axisTick:{show:!1},data:o.time}],yAxis:[{name:"dbm",splitLine:{show:!0,lineStyle:{color:"rgba(147,220,254,0.3)"}},axisLine:{show:!1,lineStyle:{color:"#93dcfe"}},axisLabel:{show:!0,textStyle:{color:"#93dcfe"}},axisTick:{show:!1}}],series:[{name:"局放数据",type:"line",symbol:"circle",showAllSymbol:!0,symbolSize:8,lineStyle:{normal:{color:"#1f93fa"},borderColor:"rgba(0,0,0,.4)"},itemStyle:{color:"#1f93fa",borderColor:"#1f93fa",borderWidth:2},label:{normal:{show:!1,position:"top",formatter:[" {a|{c}%}"].join(","),rich:{a:{color:"#fff",align:"center"}}}},tooltip:{show:!0},data:o.num}]};a.setOption(s)},temperatureShow:function(A,t,i,e){var o=A,a=e,s=t,n=i,r=this.$echarts.init(document.getElementById("temperatureShow")),g={tooltip:{trigger:"axis",formatter:function(A){return"时间:"+A[0].name+"
温度A:"+A[0].value+"℃
温度B:"+A[1].value+"℃
温度C:"+A[2].value+"℃"}},legend:{origin:"horizontal",textStyle:{color:"#fff",fontSize:"18px"}},grid:{top:"10%",left:"3%",right:"3%",bottom:"10%"},xAxis:[{type:"category",boundaryGap:!0,axisLine:{show:!0,lineStyle:{color:'color:"#93dcfe"'}},axisLabel:{textStyle:{color:"#93dcfe",margin:15},formatter:function(A){return A}},axisTick:{show:!1},data:a}],yAxis:[{name:"℃",splitLine:{show:!0,lineStyle:{color:"rgba(147,220,254,0.3)"}},axisLine:{show:!1,lineStyle:{color:"#93dcfe"}},axisLabel:{show:!0,textStyle:{color:"#93dcfe"}},axisTick:{show:!1}}],series:[{name:"A相位",type:"line",symbol:"circle",showAllSymbol:!0,symbolSize:8,lineStyle:{normal:{color:"#1f93fa"},borderColor:"rgba(0,0,0,0.4)"},itemStyle:{color:"#1f93fa",borderColor:"#1f93fa",borderWidth:2},label:{normal:{show:!1,position:"top",formatter:[" {a|{c}%}"].join(","),rich:{a:{color:"#fff",align:"center"}}}},tooltip:{show:!0},data:o},{name:"B相位",type:"line",symbol:"circle",showAllSymbol:!0,symbolSize:8,lineStyle:{normal:{color:"rgb(39,239,94)"},borderColor:"rgba(0,0,0,0.4)"},itemStyle:{color:"rgb(39,239,94)",borderColor:"rgb(39,239,94)",borderWidth:2},label:{normal:{show:!1,position:"top",formatter:[" {a|{c}%}"].join(","),rich:{a:{color:"#fff",align:"center"}}}},tooltip:{show:!0},data:s},{name:"C相位",type:"line",symbol:"circle",showAllSymbol:!0,symbolSize:8,lineStyle:{normal:{color:"rgb(255,193,64)"},borderColor:"rgba(0,0,0,0.4)"},itemStyle:{color:"rgb(255,193,64)",borderColor:"rgb(255,193,64)",borderWidth:2},label:{normal:{show:!1,position:"top",formatter:[" {a|{c}%}"].join(","),rich:{a:{color:"#fff",align:"center"}}}},tooltip:{show:!0},data:n}]};r.setOption(g)}},watch:{equipmentName:{handler:function(A,t){"箱变"==A?this.tableColumns.forEach((function(A,t){A.name=0==t||t%2==0?"进线":"出线"})):this.tableColumns.forEach((function(A,t){A.name="间隔"+(t+1)}))}}}}),g=r,I=(i("8521"),i("7649"),i("2877")),B=Object(I["a"])(g,e,o,!1,null,"77912aec",null);t["a"]=B.exports},e853:function(A,t,i){var e=i("d3f4"),o=i("1169"),a=i("2b4c")("species");A.exports=function(A){var t;return o(A)&&(t=A.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),e(t)&&(t=t[a],null===t&&(t=void 0))),void 0===t?Array:t}},ec30:function(A,t,i){"use strict";if(i("9e1e")){var e=i("2d00"),o=i("7726"),a=i("79e5"),s=i("5ca1"),n=i("0f88"),r=i("ed0b"),g=i("9b43"),I=i("f605"),B=i("4630"),h=i("32e9"),C=i("dcbc"),E=i("4588"),Q=i("9def"),c=i("09fa"),d=i("77f1"),l=i("6a99"),u=i("69a8"),p=i("23c6"),f=i("d3f4"),m=i("4bf8"),w=i("33a4"),D=i("2aeb"),y=i("38fd"),b=i("9093").f,S=i("27ee"),M=i("ca5a"),v=i("2b4c"),k=i("0a49"),R=i("c366"),G=i("ebd6"),F=i("cadf"),q=i("84f2"),N=i("5cc5"),J=i("7a56"),U=i("36bd"),L=i("ba92"),T=i("86cc"),x=i("11e9"),Y=T.f,H=x.f,O=o.RangeError,P=o.TypeError,_=o.Uint8Array,K="ArrayBuffer",W="Shared"+K,X="BYTES_PER_ELEMENT",Z="prototype",j=Array[Z],V=r.ArrayBuffer,z=r.DataView,$=k(0),AA=k(2),tA=k(3),iA=k(4),eA=k(5),oA=k(6),aA=R(!0),sA=R(!1),nA=F.values,rA=F.keys,gA=F.entries,IA=j.lastIndexOf,BA=j.reduce,hA=j.reduceRight,CA=j.join,EA=j.sort,QA=j.slice,cA=j.toString,dA=j.toLocaleString,lA=v("iterator"),uA=v("toStringTag"),pA=M("typed_constructor"),fA=M("def_constructor"),mA=n.CONSTR,wA=n.TYPED,DA=n.VIEW,yA="Wrong length!",bA=k(1,(function(A,t){return RA(G(A,A[fA]),t)})),SA=a((function(){return 1===new _(new Uint16Array([1]).buffer)[0]})),MA=!!_&&!!_[Z].set&&a((function(){new _(1).set({})})),vA=function(A,t){var i=E(A);if(i<0||i%t)throw O("Wrong offset!");return i},kA=function(A){if(f(A)&&wA in A)return A;throw P(A+" is not a typed array!")},RA=function(A,t){if(!f(A)||!(pA in A))throw P("It is not a typed array constructor!");return new A(t)},GA=function(A,t){return FA(G(A,A[fA]),t)},FA=function(A,t){var i=0,e=t.length,o=RA(A,e);while(e>i)o[i]=t[i++];return o},qA=function(A,t,i){Y(A,t,{get:function(){return this._d[i]}})},NA=function(A){var t,i,e,o,a,s,n=m(A),r=arguments.length,I=r>1?arguments[1]:void 0,B=void 0!==I,h=S(n);if(void 0!=h&&!w(h)){for(s=h.call(n),e=[],t=0;!(a=s.next()).done;t++)e.push(a.value);n=e}for(B&&r>2&&(I=g(I,arguments[2],2)),t=0,i=Q(n.length),o=RA(this,i);i>t;t++)o[t]=B?I(n[t],t):n[t];return o},JA=function(){var A=0,t=arguments.length,i=RA(this,t);while(t>A)i[A]=arguments[A++];return i},UA=!!_&&a((function(){dA.call(new _(1))})),LA=function(){return dA.apply(UA?QA.call(kA(this)):kA(this),arguments)},TA={copyWithin:function(A,t){return L.call(kA(this),A,t,arguments.length>2?arguments[2]:void 0)},every:function(A){return iA(kA(this),A,arguments.length>1?arguments[1]:void 0)},fill:function(A){return U.apply(kA(this),arguments)},filter:function(A){return GA(this,AA(kA(this),A,arguments.length>1?arguments[1]:void 0))},find:function(A){return eA(kA(this),A,arguments.length>1?arguments[1]:void 0)},findIndex:function(A){return oA(kA(this),A,arguments.length>1?arguments[1]:void 0)},forEach:function(A){$(kA(this),A,arguments.length>1?arguments[1]:void 0)},indexOf:function(A){return sA(kA(this),A,arguments.length>1?arguments[1]:void 0)},includes:function(A){return aA(kA(this),A,arguments.length>1?arguments[1]:void 0)},join:function(A){return CA.apply(kA(this),arguments)},lastIndexOf:function(A){return IA.apply(kA(this),arguments)},map:function(A){return bA(kA(this),A,arguments.length>1?arguments[1]:void 0)},reduce:function(A){return BA.apply(kA(this),arguments)},reduceRight:function(A){return hA.apply(kA(this),arguments)},reverse:function(){var A,t=this,i=kA(t).length,e=Math.floor(i/2),o=0;while(o1?arguments[1]:void 0)},sort:function(A){return EA.call(kA(this),A)},subarray:function(A,t){var i=kA(this),e=i.length,o=d(A,e);return new(G(i,i[fA]))(i.buffer,i.byteOffset+o*i.BYTES_PER_ELEMENT,Q((void 0===t?e:d(t,e))-o))}},xA=function(A,t){return GA(this,QA.call(kA(this),A,t))},YA=function(A){kA(this);var t=vA(arguments[1],1),i=this.length,e=m(A),o=Q(e.length),a=0;if(o+t>i)throw O(yA);while(a255?255:255&e),o.v[C](i*t+o.o,e,SA)},v=function(A,t){Y(A,t,{get:function(){return S(this,t)},set:function(A){return M(this,t,A)},enumerable:!0})};u?(E=i((function(A,i,e,o){I(A,E,g,"_d");var a,s,n,r,B=0,C=0;if(f(i)){if(!(i instanceof V||(r=p(i))==K||r==W))return wA in i?FA(E,i):NA.call(E,i);a=i,C=vA(e,t);var d=i.byteLength;if(void 0===o){if(d%t)throw O(yA);if(s=d-C,s<0)throw O(yA)}else if(s=Q(o)*t,s+C>d)throw O(yA);n=s/t}else n=c(i),s=n*t,a=new V(s);h(A,"_d",{b:a,o:C,l:s,e:n,v:new z(a)});while(B>1,I=23===t?k(2,-24)-k(2,-77):0,B=0,h=A<0||0===A&&1/A<0?1:0;for(A=v(A),A!=A||A===S?(o=A!=A?1:0,e=r):(e=R(G(A)/F),A*(a=k(2,-e))<1&&(e--,a*=2),A+=e+g>=1?I/a:I*k(2,1-g),A*a>=2&&(e++,a/=2),e+g>=r?(o=0,e=r):e+g>=1?(o=(A*a-1)*k(2,t),e+=g):(o=A*k(2,g-1)*k(2,t),e=0));t>=8;s[B++]=255&o,o/=256,t-=8);for(e=e<0;s[B++]=255&e,e/=256,n-=8);return s[--B]|=128*h,s}function Y(A,t,i){var e,o=8*i-t-1,a=(1<>1,n=o-7,r=i-1,g=A[r--],I=127&g;for(g>>=7;n>0;I=256*I+A[r],r--,n-=8);for(e=I&(1<<-n)-1,I>>=-n,n+=t;n>0;e=256*e+A[r],r--,n-=8);if(0===I)I=1-s;else{if(I===a)return e?NaN:g?-S:S;e+=k(2,t),I-=s}return(g?-1:1)*e*k(2,I-t)}function H(A){return A[3]<<24|A[2]<<16|A[1]<<8|A[0]}function O(A){return[255&A]}function P(A){return[255&A,A>>8&255]}function _(A){return[255&A,A>>8&255,A>>16&255,A>>24&255]}function K(A){return x(A,52,8)}function W(A){return x(A,23,4)}function X(A,t,i){Q(A[p],t,{get:function(){return this[i]}})}function Z(A,t,i,e){var o=+i,a=C(o);if(a+t>A[L])throw b(m);var s=A[U]._b,n=a+A[T],r=s.slice(n,n+t);return e?r:r.reverse()}function j(A,t,i,e,o,a){var s=+i,n=C(s);if(n+t>A[L])throw b(m);for(var r=A[U]._b,g=n+A[T],I=e(+o),B=0;BAA;)(V=$[AA++])in w||n(w,V,M[V]);a||(z.constructor=w)}var tA=new D(new w(2)),iA=D[p].setInt8;tA.setInt8(0,2147483648),tA.setInt8(1,2147483649),!tA.getInt8(0)&&tA.getInt8(1)||r(D[p],{setInt8:function(A,t){iA.call(this,A,t<<24>>24)},setUint8:function(A,t){iA.call(this,A,t<<24>>24)}},!0)}else w=function(A){I(this,w,l);var t=C(A);this._b=c.call(new Array(t),0),this[L]=t},D=function(A,t,i){I(this,D,u),I(A,w,u);var e=A[L],o=B(t);if(o<0||o>e)throw b("Wrong offset!");if(i=void 0===i?e-o:h(i),o+i>e)throw b(f);this[U]=A,this[T]=o,this[L]=i},o&&(X(w,N,"_l"),X(D,q,"_b"),X(D,N,"_l"),X(D,J,"_o")),r(D[p],{getInt8:function(A){return Z(this,1,A)[0]<<24>>24},getUint8:function(A){return Z(this,1,A)[0]},getInt16:function(A){var t=Z(this,2,A,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(A){var t=Z(this,2,A,arguments[1]);return t[1]<<8|t[0]},getInt32:function(A){return H(Z(this,4,A,arguments[1]))},getUint32:function(A){return H(Z(this,4,A,arguments[1]))>>>0},getFloat32:function(A){return Y(Z(this,4,A,arguments[1]),23,4)},getFloat64:function(A){return Y(Z(this,8,A,arguments[1]),52,8)},setInt8:function(A,t){j(this,1,A,O,t)},setUint8:function(A,t){j(this,1,A,O,t)},setInt16:function(A,t){j(this,2,A,P,t,arguments[2])},setUint16:function(A,t){j(this,2,A,P,t,arguments[2])},setInt32:function(A,t){j(this,4,A,_,t,arguments[2])},setUint32:function(A,t){j(this,4,A,_,t,arguments[2])},setFloat32:function(A,t){j(this,4,A,W,t,arguments[2])},setFloat64:function(A,t){j(this,8,A,K,t,arguments[2])}});d(w,l),d(D,u),n(D[p],s.VIEW,!0),t[l]=w,t[u]=D}}]); //# sourceMappingURL=chunk-1304a9ad.461e2139.js.map