var et=Object.defineProperty,tt=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var Ae=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable;var De=(x,b,O)=>b in x?et(x,b,{enumerable:!0,configurable:!0,writable:!0,value:O}):x[b]=O,Te=(x,b)=>{for(var O in b||(b={}))we.call(b,O)&&De(x,O,b[O]);if(Ae)for(var O of Ae(b))Fe.call(b,O)&&De(x,O,b[O]);return x},Be=(x,b)=>tt(x,rt(b));var Ue=(x,b)=>{var O={};for(var D in x)we.call(x,D)&&b.indexOf(D)<0&&(O[D]=x[D]);if(x!=null&&Ae)for(var D of Ae(x))b.indexOf(D)<0&&Fe.call(x,D)&&(O[D]=x[D]);return O};import{_ as ze,o as Re,e as Oe,f as re,U as ge,a5 as xe,t as it,D as He,v as Xe,x as Ye,d as nt,ao as st,ap as ot,n as Pe,an as at,p as ke,E as je,a1 as Ee}from"./index.9ed4dad3.js";import{c as ut}from"./operation.7d8ad074.js";function lt(x,b,O){O===void 0&&(O={});var D={type:"Feature"};return(O.id===0||O.id)&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.properties=b||{},D.geometry=x,D}function Vt(x,b,O){if(O===void 0&&(O={}),!x)throw new Error("coordinates is required");if(!Array.isArray(x))throw new Error("coordinates must be an Array");if(x.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ne(x[0])||!Ne(x[1]))throw new Error("coordinates must contain numbers");var D={type:"Point",coordinates:x};return lt(D,b,O)}function Kt(x,b){b===void 0&&(b={});var O={type:"FeatureCollection"};return b.id&&(O.id=b.id),b.bbox&&(O.bbox=b.bbox),O.features=x,O}function Ne(x){return!isNaN(x)&&x!==null&&!Array.isArray(x)}function Je(x,b,O){if(x!==null)for(var D,F,V,T,L,_,y,h=0,a=0,o,d=x.type,i=d==="FeatureCollection",u=d==="Feature",l=i?x.features.length:1,r=0;rO[0]&&(b[0]=O[0]),b[1]>O[1]&&(b[1]=O[1]),b[2]{console.log("pluginError callback: ",O,D,F),this.msg=Ke[D]?Ke[D]:`\u9519\u8BEF\u7801\uFF1A${D}`,this.playStop()}}),b&&this.play()},play(){let{player:x,url:b}=this;if(!b){this.msg="\u89C6\u9891\u52A0\u8F7D\u5931\u8D25";return}this.loading=!0,this.player.JS_Play(b,{playURL:b},0).then(()=>{this.pause=!1,this.loading=!1},O=>{console.error(O),this.pause=!0,this.loading=!1})},playPause(){this.pause?this.play():this.playStop()},playStop(){this.loading&&(this.loading=!1),this.player&&this.player.JS_Stop().then(()=>{this.pause=!0},x=>{console.error(x)})},stopVideo(){this.playStop(),this.msg="",this.player=null},fullScreen(){this.player.JS_FullScreenDisplay(!0).then(()=>{console.log("wholeFullScreen success")},x=>{console.error(x)})}}};const ht=x=>(Xe("data-v-2b1e8648"),x=x(),Ye(),x),ct={class:"container"},_t=["id"],pt={class:"control"},mt={class:"loading"},vt=ht(()=>re("span",null,"\u89C6\u9891\u52A0\u8F7D\u4E2D..",-1)),gt=[vt];function xt(x,b,O,D,F,V){return Re(),Oe("div",ct,[re("div",{id:F.elId,style:{width:"100%",height:"100%"}},null,8,_t),ge(re("div",{class:"info"},it(F.msg),513),[[xe,F.msg]]),ge(re("div",pt,[re("i",{class:He(F.pause?"el-icon-video-play":"el-icon-video-pause"),onClick:b[0]||(b[0]=(...T)=>V.playPause&&V.playPause(...T))},null,2),re("i",{class:"el-icon-full-screen",onClick:b[1]||(b[1]=(...T)=>V.fullScreen&&V.fullScreen(...T))})],512),[[xe,O.url&&!F.msg&&!F.loading]]),ge(re("div",mt,gt,512),[[xe,F.loading]])])}var Gt=ze(dt,[["render",xt],["__scopeId","data-v-2b1e8648"]]),Ge=nt({inject:["getMap"],props:{options:{type:Object,default:null},position:{type:Array,default:null},trackPointer:{type:Boolean,default:!1}},data(){return{node:null}},watch:{options(x,b){JSON.stringify(x)!==JSON.stringify(b)&&this.initPop()},position:{deep:!0,handler(x,b){x&&b&&x[0]===b[0]&&x[1]===b[1]||this.update()}},trackPointer:{handler(){this.update()}}},created(){this.initVM(),this.initPop()},beforeUnmount(){console.log("Popup beforeUnmount"),this.removePopup()},methods:{initVM(){const x=this,b=st({provide:{getMap:x.getMap},render(){return x.node}}),O=document.createElement("div");O.className="minimap-popup-content-box",b.mount(O),this.vm=b},initPop(){const{vm:x}=this;if(!x)return;this.pop&&(this.pop.off("open",this.onOpen),this.pop.off("close",this.onClose),this.pop.remove());const b=Te({},this.options);b.maxWidth||(b.maxWidth="none");const O=new minemap.Popup(b);O.on("open",this.onOpen),O.on("close",this.onClose),O.setDOMContent(x._container),this.pop=O,this.update()},update(){this.getMap().then(x=>{this.map=x;const{pop:b,vm:O,position:D,trackPointer:F}=this;if(!(!x||!b)){if(!this.node||!D&&!F||!O._container.children||O._container.children.length<1){b.remove();return}D?b.setLngLat(D):F&&b.trackPointer(),b.isOpen()||b.addTo(x)}})},onOpen(x){this.$emit("open",x)},onClose(x){this.$emit("close",x)},removePopup(){const{map:x,pop:b}=this;!x||!b||(this.vm&&this.vm._container&&(this.vm.unmount(),this.vm=null),b.remove())}},render(){var x,b;return this.node=(b=(x=this.$slots).default)==null?void 0:b.call(x),null}});const Le=new Set,be={};let me=null,fe=null;var Et={inject:["getMap"],props:{layerIds:{type:Array,default:null}},data(){return{feature:null,features:null}},watch:{layerIds:{immediate:!0,handler(x,b){this.updateLayers(x,b)}}},mounted(){this.getMap().then(x=>{this.map=x,this.init()})},beforeUnmount(){const{layerIds:x}=this;x&&x.forEach(b=>{this.removeLayer(b)})},methods:{init(){const{map:x}=this},updateLayers(x,b){const O=new Set(x),D=new Set(b);O.forEach(F=>{D.has(F)||this.addLayer(F)}),D.forEach(F=>{O.has(F)||this.removeLayer(F)})},addLayer(x){!x||(be[x]=this,Le.add(x),this.initEvent())},removeLayer(x){!x||(delete be[x],Le.delete(x),this.initEvent())},initEvent(){this.getMap().then(x=>{const b=Object.values(be)[0];if(me){if(me===b)return;x.off("mousemove",me.onMousemove)}me=b,me&&x.on("mousemove",me.onMousemove)})},onMousemove:ot(function(x){const{map:b}=this;if(b&&Le.size>0){const O=b.queryRenderedFeatures(x.point,{}).filter(F=>Le.has(F.layer.id)),D=O&&O[0];if(D){const F=D.layer.id,V=be[F];if(V){V.feature=D,V.features=O,fe&&fe!==V&&(fe.feature=null,fe.features=null),fe=V;return}}}fe&&(fe.feature=null,fe.features=null,fe=null)},67)},render(){const{feature:x,features:b}=this;return this.$slots.default({feature:x,features:b})}};function yt(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!at(x)}var Wt={props:{popupOptions:{type:Object,default:()=>({closeButton:!1})},layerIds:{type:Array,default:null},optionsParam:{type:Object,default:()=>({})}},render(){const{layerIds:x,popupOptions:b,optionsParam:O,$slots:D}=this;return Pe(Et,{layerIds:x},{default:({feature:F,features:V})=>{let T;if(!F)return Pe(Ge,{key:"hoverPopup",position:null},null);const{properties:L,layer:{id:_},geometry:{coordinates:y}}=F,h=O[_]?Object.assign({},b,O[_]):b;return Pe(Ge,{key:"hoverPopup",position:y,options:h},yt(T=D.default({layerId:_,data:L,feature:F,features:V}))?T:{default:()=>[T]})}})}},zt={inject:{getMap:{from:"getMap"},sourceIdFromParent:{from:"sourceId",default:null}},props:{id:{type:String,required:!0},sourceId:{type:String,default:null},static:{type:Boolean,defalut:!1},type:{type:String,default:"symbol"},minzoom:{type:Number,default:0},maxzoom:{type:Number,default:24},layout:{type:Object,default:null},paint:{type:Object,default:null},filter:{type:Array,default:null}},watch:{minzoom(){this.updateZoomRange()},maxzoom(){this.updateZoomRange()},layout:{deep:!0,handler(){this.updateLayout()}},paint:{deep:!0,handler(){this.updatePaint()}},filter:{deep:!0,handler(){this.updateFilter()}}},mounted(){this.addLayer()},beforeUnmount(){console.log("Layer beforeUnmount"),this.static?this.hide():this.removeLayer()},methods:{addLayer(){console.log("addLayer"),this.getMap().then(x=>{this.map=x;const{id:b,sourceId:O,type:D,minzoom:F,maxzoom:V,layout:T,paint:L,filter:_,sourceIdFromParent:y}=this;if(x.getLayer(b))this.updateLayout(),this.updatePaint(),this.updateFilter(),this.show();else{const h={id:b,type:D,source:O||y,minzoom:F,maxzoom:V};T&&(h.layout=T),L&&(h.paint=L),_&&(h.filter=_),x.addLayer(h)}this.initEvent()})},initEvent(){const{map:x,id:b,$attrs:O,$listeners:D}=this,F=Ue(O,[]);if(!!x)for(let V in F)V=V&&V.startsWith("on")&&V.toLowerCase().replace(/^on/,""),V&&x.on(V,b,T=>{this.$emit(V,Be(Te({},T),{layerId:b}))})},show(){const{map:x,id:b}=this;!x||x.setLayoutProperty(b,"visibility","visible")},hide(){const{map:x,id:b}=this;!x||x.setLayoutProperty(b,"visibility","none")},updateZoomRange(){const{map:x,id:b,minzoom:O,maxzoom:D}=this;!x||x.setLayerZoomRange(b,O,D)},updateLayout(){const{map:x,id:b,layout:O}=this;if(!(!x||!O))for(const D in O)O.hasOwnProperty(D)&&x.setLayoutProperty(b,D,O[D])},updatePaint(){const{map:x,id:b,paint:O}=this;if(!(!x||!O))for(const D in O)O.hasOwnProperty(D)&&x.setLayoutProperty(b,D,O[D])},updateFilter(){const{map:x,id:b,filter:O}=this;!x||!O||x.setFilter(b,O)},removeLayer(){const{map:x,id:b}=this;!x||!x.getLayer(b)||x.removeLayer(b)}},render(){return null}};function Ht(x){if(!x&&x!==0)return"";const b=String(x).replace(/[a-z]+/gi,"").split(".");let O=b[1]||"";if(!O)return`K${b[0]}`;for(;O.length<3;)O+="0";return`K${b[0]}+${O}`}var St={exports:{}};(function(x,b){(function(D,F){x.exports=F()})(self,function(){return function(){var O={"./node_modules/es6-promise/dist/es6-promise.js":function(T,L,_){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.8+1e68dce6 */(function(y,h){T.exports=h()})(this,function(){function y(R){var P=typeof R;return R!==null&&(P==="object"||P==="function")}function h(R){return typeof R=="function"}var a=void 0;Array.isArray?a=Array.isArray:a=function(R){return Object.prototype.toString.call(R)==="[object Array]"};var o=a,d=0,i=void 0,u=void 0,l=function(P,M){g[d]=P,g[d+1]=M,d+=2,d===2&&(u?u(A):C())};function r(R){u=R}function t(R){l=R}var s=typeof window!="undefined"?window:void 0,n=s||{},e=n.MutationObserver||n.WebKitMutationObserver,f=typeof self=="undefined"&&typeof process!="undefined"&&{}.toString.call(process)==="[object process]",c=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function p(){return function(){return process.nextTick(A)}}function v(){return typeof i!="undefined"?function(){i(A)}:m()}function S(){var R=0,P=new e(A),M=document.createTextNode("");return P.observe(M,{characterData:!0}),function(){M.data=R=++R%2}}function E(){var R=new MessageChannel;return R.port1.onmessage=A,function(){return R.port2.postMessage(0)}}function m(){var R=setTimeout;return function(){return R(A,1)}}var g=new Array(1e3);function A(){for(var R=0;R0&&(w=g[0]),w instanceof Error)throw w;var K=new Error("Unhandled error."+(w?" ("+w.message+")":""));throw K.context=w,K}var G=C[m];if(G===void 0)return!1;if(typeof G=="function")_(G,this,g);else for(var j=G.length,z=e(G,j),A=0;A0&&w.length>I&&!w.warned){w.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+w.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=E,K.type=m,K.count=w.length,h(K)}return E}o.prototype.addListener=function(m,g){return l(this,m,g,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(m,g){return l(this,m,g,!0)};function r(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function t(E,m,g){var A={fired:!1,wrapFn:void 0,target:E,type:m,listener:g},I=r.bind(A);return I.listener=g,A.wrapFn=I,I}o.prototype.once=function(m,g){return i(g),this.on(m,t(this,m,g)),this},o.prototype.prependOnceListener=function(m,g){return i(g),this.prependListener(m,t(this,m,g)),this},o.prototype.removeListener=function(m,g){var A,I,C,w,K;if(i(g),I=this._events,I===void 0)return this;if(A=I[m],A===void 0)return this;if(A===g||A.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete I[m],I.removeListener&&this.emit("removeListener",m,A.listener||g));else if(typeof A!="function"){for(C=-1,w=A.length-1;w>=0;w--)if(A[w]===g||A[w].listener===g){K=A[w].listener,C=w;break}if(C<0)return this;C===0?A.shift():f(A,C),A.length===1&&(I[m]=A[0]),I.removeListener!==void 0&&this.emit("removeListener",m,K||g)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(m){var g,A,I;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[m]),this;if(arguments.length===0){var C=Object.keys(A),w;for(I=0;I=0;I--)this.removeListener(m,g[I]);return this};function s(E,m,g){var A=E._events;if(A===void 0)return[];var I=A[m];return I===void 0?[]:typeof I=="function"?g?[I.listener||I]:[I]:g?c(I):e(I,I.length)}o.prototype.listeners=function(m){return s(this,m,!0)},o.prototype.rawListeners=function(m){return s(this,m,!1)},o.listenerCount=function(E,m){return typeof E.listenerCount=="function"?E.listenerCount(m):n.call(E,m)},o.prototype.listenerCount=n;function n(E){var m=this._events;if(m!==void 0){var g=m[E];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]};function e(E,m){for(var g=new Array(m),A=0;A0},!1)}function l(r,t){for(var s={main:[t]},n={main:[]},e={main:{}};u(s);)for(var f=Object.keys(s),c=0;c=a[u]&&o0&&i[0].originalDts=u[t].dts&&iu[r].lastSample.originalDts&&i=u[r].lastSample.originalDts&&(r===u.length-1||r0&&(t=this._searchNearestSegmentBefore(l.originalBeginDts)+1),this._lastAppendLocation=t,this._list.splice(t,0,l)},d.prototype.getLastSegmentBefore=function(i){var u=this._searchNearestSegmentBefore(i);return u>=0?this._list[u]:null},d.prototype.getLastSampleBefore=function(i){var u=this.getLastSegmentBefore(i);return u!=null?u.lastSample:null},d.prototype.getLastSyncPointBefore=function(i){for(var u=this._searchNearestSegmentBefore(i),l=this._list[u].syncPoints;l.length===0&&u>0;)u--,l=this._list[u].syncPoints;return l.length>0?l[l.length-1]:null},d}()},"./src/core/mse-controller.js":function(T,L,_){_.r(L);var y=_("./node_modules/events/events.js"),h=_.n(y),a=_("./src/utils/logger.js"),o=_("./src/utils/browser.js"),d=_("./src/core/mse-events.js"),i=_("./src/core/media-segment-info.js"),u=_("./src/utils/exception.js"),l=function(){function r(t){this.TAG="MSEController",this._config=t,this._emitter=new(h()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new i.IDRSampleList}return r.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},r.prototype.on=function(t,s){this._emitter.addListener(t,s)},r.prototype.off=function(t,s){this._emitter.removeListener(t,s)},r.prototype.attachMediaElement=function(t){if(this._mediaSource)throw new u.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var s=this._mediaSource=new window.MediaSource;s.addEventListener("sourceopen",this.e.onSourceOpen),s.addEventListener("sourceended",this.e.onSourceEnded),s.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=t,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),t.src=this._mediaSourceObjectURL},r.prototype.detachMediaElement=function(){if(this._mediaSource){var t=this._mediaSource;for(var s in this._sourceBuffers){var n=this._pendingSegments[s];n.splice(0,n.length),this._pendingSegments[s]=null,this._pendingRemoveRanges[s]=null,this._lastInitSegments[s]=null;var e=this._sourceBuffers[s];if(e){if(t.readyState!=="closed"){try{t.removeSourceBuffer(e)}catch(f){a.default.e(this.TAG,f.message)}e.removeEventListener("error",this.e.onSourceBufferError),e.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[s]=null,this._sourceBuffers[s]=null}}if(t.readyState==="open")try{t.endOfStream()}catch(f){a.default.e(this.TAG,f.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},r.prototype.appendInitSegment=function(t,s){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(t),this._pendingSegments[t.type].push(t);return}var n=t,e=""+n.container;n.codec&&n.codec.length>0&&(e+=";codecs="+n.codec);var f=!1;if(a.default.v(this.TAG,"Received Initialization Segment, mimeType: "+e),this._lastInitSegments[n.type]=n,e!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])a.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+e);else{f=!0;try{var c=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(e);c.addEventListener("error",this.e.onSourceBufferError),c.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(p){a.default.e(this.TAG,p.message),this._emitter.emit(d.default.ERROR,{code:p.code,msg:p.message});return}}this._mimeTypes[n.type]=e}s||this._pendingSegments[n.type].push(n),f||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),o.default.safari&&n.container==="audio/mpeg"&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())},r.prototype.appendMediaSegment=function(t){var s=t;this._pendingSegments[s.type].push(s),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[s.type];n&&!n.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()},r.prototype.seek=function(t){for(var s in this._sourceBuffers)if(!!this._sourceBuffers[s]){var n=this._sourceBuffers[s];if(this._mediaSource.readyState==="open")try{n.abort()}catch(S){a.default.e(this.TAG,S.message)}this._idrList.clear();var e=this._pendingSegments[s];if(e.splice(0,e.length),this._mediaSource.readyState!=="closed"){for(var f=0;f=1&&t-e.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},r.prototype._doCleanupSourceBuffer=function(){var t=this._mediaElement.currentTime;for(var s in this._sourceBuffers){var n=this._sourceBuffers[s];if(n){for(var e=n.buffered,f=!1,c=0;c=this._config.autoCleanupMaxBackwardDuration){f=!0;var S=t-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[s].push({start:p,end:S})}}else v0&&(isNaN(s)||n>s)&&(a.default.v(this.TAG,"Update MediaSource duration from "+s+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},r.prototype._doRemoveRanges=function(){for(var t in this._pendingRemoveRanges)if(!(!this._sourceBuffers[t]||this._sourceBuffers[t].updating))for(var s=this._sourceBuffers[t],n=this._pendingRemoveRanges[t];n.length&&!s.updating;){var e=n.shift();s.remove(e.start,e.end)}},r.prototype._doAppendSegments=function(){var t=this._pendingSegments;for(var s in t)if(!(!this._sourceBuffers[s]||this._sourceBuffers[s].updating)&&t[s].length>0){var n=t[s].shift();if(n.timestampOffset){var e=this._sourceBuffers[s].timestampOffset,f=n.timestampOffset/1e3,c=Math.abs(e-f);c>.1&&(a.default.v(this.TAG,"Update MPEG audio timestampOffset from "+e+" to "+f),this._sourceBuffers[s].timestampOffset=f),delete n.timestampOffset}if(!n.data||n.data.byteLength===0)continue;try{this._sourceBuffers[s].appendBuffer(n.data),this._isBufferFull=!1,s==="video"&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(p){this._pendingSegments[s].unshift(n),p.code===22?(this._isBufferFull||this._emitter.emit(d.default.BUFFER_FULL),this._isBufferFull=!0):(a.default.e(this.TAG,p.message),this._emitter.emit(d.default.ERROR,{code:p.code,msg:p.message}))}}},r.prototype._onSourceOpen=function(){if(a.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var t=this._pendingSourceBufferInit;t.length;){var s=t.shift();this.appendInitSegment(s,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(d.default.SOURCE_OPEN)},r.prototype._onSourceEnded=function(){a.default.v(this.TAG,"MediaSource onSourceEnded")},r.prototype._onSourceClose=function(){a.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},r.prototype._hasPendingSegments=function(){var t=this._pendingSegments;return t.video.length>0||t.audio.length>0},r.prototype._hasPendingRemoveRanges=function(){var t=this._pendingRemoveRanges;return t.video.length>0||t.audio.length>0},r.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(d.default.UPDATE_END)},r.prototype._onSourceBufferError=function(t){a.default.e(this.TAG,"SourceBuffer Error: "+t)},r}();L.default=l},"./src/core/mse-events.js":function(T,L,_){_.r(L);var y={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};L.default=y},"./src/core/transmuxer.js":function(T,L,_){_.r(L);var y=_("./node_modules/events/events.js"),h=_.n(y),a=_("./node_modules/webworkify-webpack/index.js"),o=_.n(a),d=_("./src/utils/logger.js"),i=_("./src/utils/logging-control.js"),u=_("./src/core/transmuxing-controller.js"),l=_("./src/core/transmuxing-events.js"),r=_("./src/core/media-info.js"),t=function(){function s(n,e){if(this.TAG="Transmuxer",this._emitter=new(h()),e.enableWorker&&typeof Worker!="undefined")try{this._worker=o()("./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[n,e]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},i.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:i.default.getConfig()})}catch{d.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new u.default(n,e)}else this._controller=new u.default(n,e);if(this._controller){var f=this._controller;f.on(l.default.IO_ERROR,this._onIOError.bind(this)),f.on(l.default.DEMUX_ERROR,this._onDemuxError.bind(this)),f.on(l.default.INIT_SEGMENT,this._onInitSegment.bind(this)),f.on(l.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),f.on(l.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),f.on(l.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),f.on(l.default.MEDIA_INFO,this._onMediaInfo.bind(this)),f.on(l.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),f.on(l.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),f.on(l.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),f.on(l.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return s.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),i.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},s.prototype.on=function(n,e){this._emitter.addListener(n,e)},s.prototype.off=function(n,e){this._emitter.removeListener(n,e)},s.prototype.hasWorker=function(){return this._worker!=null},s.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},s.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},s.prototype.seek=function(n){this._worker?this._worker.postMessage({cmd:"seek",param:n}):this._controller.seek(n)},s.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},s.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},s.prototype._onInitSegment=function(n,e){var f=this;Promise.resolve().then(function(){f._emitter.emit(l.default.INIT_SEGMENT,n,e)})},s.prototype._onMediaSegment=function(n,e){var f=this;Promise.resolve().then(function(){f._emitter.emit(l.default.MEDIA_SEGMENT,n,e)})},s.prototype._onLoadingComplete=function(){var n=this;Promise.resolve().then(function(){n._emitter.emit(l.default.LOADING_COMPLETE)})},s.prototype._onRecoveredEarlyEof=function(){var n=this;Promise.resolve().then(function(){n._emitter.emit(l.default.RECOVERED_EARLY_EOF)})},s.prototype._onMediaInfo=function(n){var e=this;Promise.resolve().then(function(){e._emitter.emit(l.default.MEDIA_INFO,n)})},s.prototype._onMetaDataArrived=function(n){var e=this;Promise.resolve().then(function(){e._emitter.emit(l.default.METADATA_ARRIVED,n)})},s.prototype._onScriptDataArrived=function(n){var e=this;Promise.resolve().then(function(){e._emitter.emit(l.default.SCRIPTDATA_ARRIVED,n)})},s.prototype._onStatisticsInfo=function(n){var e=this;Promise.resolve().then(function(){e._emitter.emit(l.default.STATISTICS_INFO,n)})},s.prototype._onIOError=function(n,e){var f=this;Promise.resolve().then(function(){f._emitter.emit(l.default.IO_ERROR,n,e)})},s.prototype._onDemuxError=function(n,e){var f=this;Promise.resolve().then(function(){f._emitter.emit(l.default.DEMUX_ERROR,n,e)})},s.prototype._onRecommendSeekpoint=function(n){var e=this;Promise.resolve().then(function(){e._emitter.emit(l.default.RECOMMEND_SEEKPOINT,n)})},s.prototype._onLoggingConfigChanged=function(n){this._worker&&this._worker.postMessage({cmd:"logging_config",param:n})},s.prototype._onWorkerMessage=function(n){var e=n.data,f=e.data;if(e.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(e.msg){case l.default.INIT_SEGMENT:case l.default.MEDIA_SEGMENT:this._emitter.emit(e.msg,f.type,f.data);break;case l.default.LOADING_COMPLETE:case l.default.RECOVERED_EARLY_EOF:this._emitter.emit(e.msg);break;case l.default.MEDIA_INFO:Object.setPrototypeOf(f,r.default.prototype),this._emitter.emit(e.msg,f);break;case l.default.METADATA_ARRIVED:case l.default.SCRIPTDATA_ARRIVED:case l.default.STATISTICS_INFO:this._emitter.emit(e.msg,f);break;case l.default.IO_ERROR:case l.default.DEMUX_ERROR:this._emitter.emit(e.msg,f.type,f.info);break;case l.default.RECOMMEND_SEEKPOINT:this._emitter.emit(e.msg,f);break;case"logcat_callback":d.default.emitter.emit("log",f.type,f.logcat);break}},s}();L.default=t},"./src/core/transmuxing-controller.js":function(T,L,_){_.r(L);var y=_("./node_modules/events/events.js"),h=_.n(y),a=_("./src/utils/logger.js"),o=_("./src/utils/browser.js"),d=_("./src/core/media-info.js"),i=_("./src/demux/flv-demuxer.js"),u=_("./src/remux/mp4-remuxer.js"),l=_("./src/demux/demux-errors.js"),r=_("./src/io/io-controller.js"),t=_("./src/core/transmuxing-events.js"),s=function(){function n(e,f){this.TAG="TransmuxingController",this._emitter=new(h()),this._config=f,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),typeof e.cors!="boolean"&&(e.cors=!0),typeof e.withCredentials!="boolean"&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var c=0;this._mediaDataSource.segments.forEach(function(p){p.timestampBase=c,c+=p.duration,p.cors=e.cors,p.withCredentials=e.withCredentials,f.referrerPolicy&&(p.referrerPolicy=f.referrerPolicy)}),!isNaN(c)&&this._mediaDataSource.duration!==c&&(this._mediaDataSource.duration=c),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return n.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},n.prototype.on=function(e,f){this._emitter.addListener(e,f)},n.prototype.off=function(e,f){this._emitter.removeListener(e,f)},n.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},n.prototype._loadSegment=function(e,f){this._currentSegmentIndex=e;var c=this._mediaDataSource.segments[e],p=this._ioctl=new r.default(c,this._config,e);p.onError=this._onIOException.bind(this),p.onSeeked=this._onIOSeeked.bind(this),p.onComplete=this._onIOComplete.bind(this),p.onRedirect=this._onIORedirect.bind(this),p.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),f?this._demuxer.bindDataSource(this._ioctl):p.onDataArrival=this._onInitChunkArrival.bind(this),p.open(f)},n.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},n.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},n.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},n.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},n.prototype.seek=function(e){if(!(this._mediaInfo==null||!this._mediaInfo.isSeekable())){var f=this._searchSegmentIndexContains(e);if(f===this._currentSegmentIndex){var c=this._mediaInfo.segments[f];if(c==null)this._pendingSeekTime=e;else{var p=c.getNearestKeyframe(e);this._remuxer.seek(p.milliseconds),this._ioctl.seek(p.fileposition),this._pendingResolveSeekPoint=p.milliseconds}}else{var v=this._mediaInfo.segments[f];if(v==null)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(f);else{var p=v.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[f].timestampBase,this._loadSegment(f,p.fileposition),this._pendingResolveSeekPoint=p.milliseconds,this._reportSegmentMediaInfo(f)}}this._enableStatisticsReporter()}},n.prototype._searchSegmentIndexContains=function(e){for(var f=this._mediaDataSource.segments,c=f.length-1,p=0;p0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,v=this._demuxer.parseChunks(e,f);else if((p=i.default.probe(e)).match){this._demuxer=new i.default(p,this._config),this._remuxer||(this._remuxer=new u.default(this._config));var S=this._mediaDataSource;S.duration!=null&&!isNaN(S.duration)&&(this._demuxer.overridedDuration=S.duration),typeof S.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=S.hasAudio),typeof S.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=S.hasVideo),this._demuxer.timestampBase=S.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),v=this._demuxer.parseChunks(e,f)}else p=null,a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){c._internalAbort()}),this._emitter.emit(t.default.DEMUX_ERROR,l.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),v=0;return v},n.prototype._onMediaInfo=function(e){var f=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,d.default.prototype));var c=Object.assign({},e);Object.setPrototypeOf(c,d.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=c,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var p=f._pendingSeekTime;f._pendingSeekTime=null,f.seek(p)})},n.prototype._onMetaDataArrived=function(e){this._emitter.emit(t.default.METADATA_ARRIVED,e)},n.prototype._onScriptDataArrived=function(e){this._emitter.emit(t.default.SCRIPTDATA_ARRIVED,e)},n.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},n.prototype._onIOComplete=function(e){var f=e,c=f+1;c0&&c[0].originalDts===p&&(p=c[0].pts),this._emitter.emit(t.default.RECOMMEND_SEEKPOINT,p)}},n.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},n.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},n.prototype._reportSegmentMediaInfo=function(e){var f=this._mediaInfo.segments[e],c=Object.assign({},f);c.duration=this._mediaInfo.duration,c.segmentCount=this._mediaInfo.segmentCount,delete c.segments,delete c.keyframesIndex,this._emitter.emit(t.default.MEDIA_INFO,c)},n.prototype._reportStatisticsInfo=function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(t.default.STATISTICS_INFO,e)},n}();L.default=s},"./src/core/transmuxing-events.js":function(T,L,_){_.r(L);var y={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};L.default=y},"./src/core/transmuxing-worker.js":function(T,L,_){_.r(L);var y=_("./src/utils/logging-control.js"),h=_("./src/utils/polyfill.js"),a=_("./src/core/transmuxing-controller.js"),o=_("./src/core/transmuxing-events.js"),d=function(i){var u=null,l=m.bind(this);h.default.install(),i.addEventListener("message",function(g){switch(g.data.cmd){case"init":u=new a.default(g.data.param[0],g.data.param[1]),u.on(o.default.IO_ERROR,v.bind(this)),u.on(o.default.DEMUX_ERROR,S.bind(this)),u.on(o.default.INIT_SEGMENT,r.bind(this)),u.on(o.default.MEDIA_SEGMENT,t.bind(this)),u.on(o.default.LOADING_COMPLETE,s.bind(this)),u.on(o.default.RECOVERED_EARLY_EOF,n.bind(this)),u.on(o.default.MEDIA_INFO,e.bind(this)),u.on(o.default.METADATA_ARRIVED,f.bind(this)),u.on(o.default.SCRIPTDATA_ARRIVED,c.bind(this)),u.on(o.default.STATISTICS_INFO,p.bind(this)),u.on(o.default.RECOMMEND_SEEKPOINT,E.bind(this));break;case"destroy":u&&(u.destroy(),u=null),i.postMessage({msg:"destroyed"});break;case"start":u.start();break;case"stop":u.stop();break;case"seek":u.seek(g.data.param);break;case"pause":u.pause();break;case"resume":u.resume();break;case"logging_config":{var A=g.data.param;y.default.applyConfig(A),A.enableCallback===!0?y.default.addLogListener(l):y.default.removeLogListener(l);break}}});function r(g,A){var I={msg:o.default.INIT_SEGMENT,data:{type:g,data:A}};i.postMessage(I,[A.data])}function t(g,A){var I={msg:o.default.MEDIA_SEGMENT,data:{type:g,data:A}};i.postMessage(I,[A.data])}function s(){var g={msg:o.default.LOADING_COMPLETE};i.postMessage(g)}function n(){var g={msg:o.default.RECOVERED_EARLY_EOF};i.postMessage(g)}function e(g){var A={msg:o.default.MEDIA_INFO,data:g};i.postMessage(A)}function f(g){var A={msg:o.default.METADATA_ARRIVED,data:g};i.postMessage(A)}function c(g){var A={msg:o.default.SCRIPTDATA_ARRIVED,data:g};i.postMessage(A)}function p(g){var A={msg:o.default.STATISTICS_INFO,data:g};i.postMessage(A)}function v(g,A){i.postMessage({msg:o.default.IO_ERROR,data:{type:g,info:A}})}function S(g,A){i.postMessage({msg:o.default.DEMUX_ERROR,data:{type:g,info:A}})}function E(g){i.postMessage({msg:o.default.RECOMMEND_SEEKPOINT,data:g})}function m(g,A){i.postMessage({msg:"logcat_callback",data:{type:g,logcat:A}})}};L.default=d},"./src/demux/amf-parser.js":function(T,L,_){_.r(L);var y=_("./src/utils/logger.js"),h=_("./src/utils/utf8-conv.js"),a=_("./src/utils/exception.js"),o=function(){var i=new ArrayBuffer(2);return new DataView(i).setInt16(0,256,!0),new Int16Array(i)[0]===256}(),d=function(){function i(){}return i.parseScriptData=function(u,l,r){var t={};try{var s=i.parseValue(u,l,r),n=i.parseValue(u,l+s.size,r-s.size);t[s.data]=n.data}catch(e){y.default.e("AMF",e.toString())}return t},i.parseObject=function(u,l,r){if(r<3)throw new a.IllegalStateException("Data not enough when parse ScriptDataObject");var t=i.parseString(u,l,r),s=i.parseValue(u,l+t.size,r-t.size),n=s.objectEnd;return{data:{name:t.data,value:s.data},size:t.size+s.size,objectEnd:n}},i.parseVariable=function(u,l,r){return i.parseObject(u,l,r)},i.parseString=function(u,l,r){if(r<2)throw new a.IllegalStateException("Data not enough when parse String");var t=new DataView(u,l,r),s=t.getUint16(0,!o),n;return s>0?n=(0,h.default)(new Uint8Array(u,l+2,s)):n="",{data:n,size:2+s}},i.parseLongString=function(u,l,r){if(r<4)throw new a.IllegalStateException("Data not enough when parse LongString");var t=new DataView(u,l,r),s=t.getUint32(0,!o),n;return s>0?n=(0,h.default)(new Uint8Array(u,l+4,s)):n="",{data:n,size:4+s}},i.parseDate=function(u,l,r){if(r<10)throw new a.IllegalStateException("Data size invalid when parse Date");var t=new DataView(u,l,r),s=t.getFloat64(0,!o),n=t.getInt16(8,!o);return s+=n*60*1e3,{data:new Date(s),size:8+2}},i.parseValue=function(u,l,r){if(r<1)throw new a.IllegalStateException("Data not enough when parse Value");var t=new DataView(u,l,r),s=1,n=t.getUint8(0),e,f=!1;try{switch(n){case 0:e=t.getFloat64(1,!o),s+=8;break;case 1:{var c=t.getUint8(1);e=!!c,s+=1;break}case 2:{var p=i.parseString(u,l+1,r-1);e=p.data,s+=p.size;break}case 3:{e={};var v=0;for((t.getUint32(r-4,!o)&16777215)===9&&(v=3);s32)throw new y.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(o<=this._current_word_bits_left){var d=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,d}var i=this._current_word_bits_left?this._current_word:0;i=i>>>32-this._current_word_bits_left;var u=o-this._current_word_bits_left;this._fillCurrentWord();var l=Math.min(u,this._current_word_bits_left),r=this._current_word>>>32-l;return this._current_word<<=l,this._current_word_bits_left-=l,i=i<>>o)!==0)return this._current_word<<=o,this._current_word_bits_left-=o,o;return this._fillCurrentWord(),o+this._skipLeadingZero()},a.prototype.readUEG=function(){var o=this._skipLeadingZero();return this.readBits(o+1)-1},a.prototype.readSEG=function(){var o=this.readUEG();return o&1?o+1>>>1:-1*(o>>>1)},a}();L.default=h},"./src/demux/flv-demuxer.js":function(T,L,_){_.r(L);var y=_("./src/utils/logger.js"),h=_("./src/demux/amf-parser.js"),a=_("./src/demux/sps-parser.js"),o=_("./src/demux/demux-errors.js"),d=_("./src/core/media-info.js"),i=_("./src/utils/exception.js");function u(r,t){return r[t]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3]}var l=function(){function r(t,s){this.TAG="FLVDemuxer",this._config=s,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new d.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var n=new ArrayBuffer(2);return new DataView(n).setInt16(0,256,!0),new Int16Array(n)[0]===256}()}return r.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},r.probe=function(t){var s=new Uint8Array(t),n={match:!1};if(s[0]!==70||s[1]!==76||s[2]!==86||s[3]!==1)return n;var e=(s[4]&4)>>>2!==0,f=(s[4]&1)!==0,c=u(s,5);return c<9?n:{match:!0,consumed:c,dataOffset:c,hasAudioTrack:e,hasVideoTrack:f}},r.prototype.bindDataSource=function(t){return t.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(r.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(t){this._onTrackMetadata=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(t){this._onMediaInfo=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(t){this._onMetaDataArrived=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(t){this._onScriptDataArrived=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onError",{get:function(){return this._onError},set:function(t){this._onError=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(t){this._onDataAvailable=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(t){this._timestampBase=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"overridedDuration",{get:function(){return this._duration},set:function(t){this._durationOverrided=!0,this._duration=t,this._mediaInfo.duration=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"overridedHasAudio",{set:function(t){this._hasAudioFlagOverrided=!0,this._hasAudio=t,this._mediaInfo.hasAudio=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"overridedHasVideo",{set:function(t){this._hasVideoFlagOverrided=!0,this._hasVideo=t,this._mediaInfo.hasVideo=t},enumerable:!1,configurable:!0}),r.prototype.resetMediaInfo=function(){this._mediaInfo=new d.default},r.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1},r.prototype.parseChunks=function(t,s){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new i.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var n=0,e=this._littleEndian;if(s===0)if(t.byteLength>13){var f=r.probe(t);n=f.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,s+n!==this._dataOffset&&y.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");var c=new DataView(t,n),p=c.getUint32(0,!e);p!==0&&y.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),n+=4}for(;nt.byteLength)break;var v=c.getUint8(0),S=c.getUint32(0,!e)&16777215;if(n+11+S+4>t.byteLength)break;if(v!==8&&v!==9&&v!==18){y.default.w(this.TAG,"Unsupported tag type "+v+", skipped"),n+=11+S+4;continue}var E=c.getUint8(4),m=c.getUint8(5),g=c.getUint8(6),A=c.getUint8(7),I=g|m<<8|E<<16|A<<24,C=c.getUint32(7,!e)&16777215;C!==0&&y.default.w(this.TAG,"Meet tag which has StreamID != 0!");var w=n+11;switch(v){case 8:this._parseAudioData(t,w,S,I);break;case 9:this._parseVideoData(t,w,S,I,s+n);break;case 18:this._parseScriptData(t,w,S);break}var K=c.getUint32(11+S,!e);K!==11+S&&y.default.w(this.TAG,"Invalid PrevTagSize "+K),n+=11+S+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),n},r.prototype._parseScriptData=function(t,s,n){var e=h.default.parseScriptData(t,s,n);if(e.hasOwnProperty("onMetaData")){if(e.onMetaData==null||typeof e.onMetaData!="object"){y.default.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&y.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=e;var f=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},f)),typeof f.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=f.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof f.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=f.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof f.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=f.audiodatarate),typeof f.videodatarate=="number"&&(this._mediaInfo.videoDataRate=f.videodatarate),typeof f.width=="number"&&(this._mediaInfo.width=f.width),typeof f.height=="number"&&(this._mediaInfo.height=f.height),typeof f.duration=="number"){if(!this._durationOverrided){var c=Math.floor(f.duration*this._timescale);this._duration=c,this._mediaInfo.duration=c}}else this._mediaInfo.duration=0;if(typeof f.framerate=="number"){var p=Math.floor(f.framerate*1e3);if(p>0){var v=p/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=v,this._referenceFrameRate.fps_num=p,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=v}}if(typeof f.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var S=f.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(S),f.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=f,y.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(e).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},e))},r.prototype._parseKeyframesIndex=function(t){for(var s=[],n=[],e=1;e>>4;if(p!==2&&p!==10){this._onError(o.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+p);return}var v=0,S=(c&12)>>>2;if(S>=0&&S<=4)v=this._flvSoundRateTable[S];else{this._onError(o.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+S);return}var E=c&1,m=this._audioMetadata,g=this._audioTrack;if(m||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),m=this._audioMetadata={},m.type="audio",m.id=g.id,m.timescale=this._timescale,m.duration=this._duration,m.audioSampleRate=v,m.channelCount=E===0?1:2),p===10){var A=this._parseAACAudioData(t,s+1,n-1);if(A==null)return;if(A.packetType===0){m.config&&y.default.w(this.TAG,"Found another AudioSpecificConfig!");var I=A.data;m.audioSampleRate=I.samplingRate,m.channelCount=I.channelCount,m.codec=I.codec,m.originalCodec=I.originalCodec,m.config=I.config,m.refSampleDuration=1024/m.audioSampleRate*m.timescale,y.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",m);var C=this._mediaInfo;C.audioCodec=m.originalCodec,C.audioSampleRate=m.audioSampleRate,C.audioChannelCount=m.channelCount,C.hasVideo?C.videoCodec!=null&&(C.mimeType='video/x-flv; codecs="'+C.videoCodec+","+C.audioCodec+'"'):C.mimeType='video/x-flv; codecs="'+C.audioCodec+'"',C.isComplete()&&this._onMediaInfo(C)}else if(A.packetType===1){var w=this._timestampBase+e,K={unit:A.data,length:A.data.byteLength,dts:w,pts:w};g.samples.push(K),g.length+=A.data.length}else y.default.e(this.TAG,"Flv: Unsupported AAC data type "+A.packetType)}else if(p===2){if(!m.codec){var I=this._parseMP3AudioData(t,s+1,n-1,!0);if(I==null)return;m.audioSampleRate=I.samplingRate,m.channelCount=I.channelCount,m.codec=I.codec,m.originalCodec=I.originalCodec,m.refSampleDuration=1152/m.audioSampleRate*m.timescale,y.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",m);var C=this._mediaInfo;C.audioCodec=m.codec,C.audioSampleRate=m.audioSampleRate,C.audioChannelCount=m.channelCount,C.audioDataRate=I.bitRate,C.hasVideo?C.videoCodec!=null&&(C.mimeType='video/x-flv; codecs="'+C.videoCodec+","+C.audioCodec+'"'):C.mimeType='video/x-flv; codecs="'+C.audioCodec+'"',C.isComplete()&&this._onMediaInfo(C)}var G=this._parseMP3AudioData(t,s+1,n-1,!1);if(G==null)return;var w=this._timestampBase+e,j={unit:G,length:G.byteLength,dts:w,pts:w};g.samples.push(j),g.length+=G.length}}},r.prototype._parseAACAudioData=function(t,s,n){if(n<=1){y.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var e={},f=new Uint8Array(t,s,n);return e.packetType=f[0],f[0]===0?e.data=this._parseAACAudioSpecificConfig(t,s+1,n-1):e.data=f.subarray(1),e},r.prototype._parseAACAudioSpecificConfig=function(t,s,n){var e=new Uint8Array(t,s,n),f=null,c=0,p=0,v=0,S=null;if(c=p=e[0]>>>3,v=(e[0]&7)<<1|e[1]>>>7,v<0||v>=this._mpegSamplingRates.length){this._onError(o.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var E=this._mpegSamplingRates[v],m=(e[1]&120)>>>3;if(m<0||m>=8){this._onError(o.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}c===5&&(S=(e[1]&7)<<1|e[2]>>>7,(e[2]&124)>>>2);var g=self.navigator.userAgent.toLowerCase();return g.indexOf("firefox")!==-1?v>=6?(c=5,f=new Array(4),S=v-3):(c=2,f=new Array(2),S=v):g.indexOf("android")!==-1?(c=2,f=new Array(2),S=v):(c=5,S=v,f=new Array(4),v>=6?S=v-3:m===1&&(c=2,f=new Array(2),S=v)),f[0]=c<<3,f[0]|=(v&15)>>>1,f[1]=(v&15)<<7,f[1]|=(m&15)<<3,c===5&&(f[1]|=(S&15)>>>1,f[2]=(S&1)<<7,f[2]|=2<<2,f[3]=0),{config:f,samplingRate:E,channelCount:m,codec:"mp4a.40."+c,originalCodec:"mp4a.40."+p}},r.prototype._parseMP3AudioData=function(t,s,n,e){if(n<4){y.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}this._littleEndian;var f=new Uint8Array(t,s,n),c=null;if(e){if(f[0]!==255)return;var p=f[1]>>>3&3,v=(f[1]&6)>>1,S=(f[2]&240)>>>4,E=(f[2]&12)>>>2,m=f[3]>>>6&3,g=m!==3?2:1,A=0,I=0,C="mp3";switch(p){case 0:A=this._mpegAudioV25SampleRateTable[E];break;case 2:A=this._mpegAudioV20SampleRateTable[E];break;case 3:A=this._mpegAudioV10SampleRateTable[E];break}switch(v){case 1:S>>4,v=c&15;if(v!==7){this._onError(o.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+v);return}this._parseAVCVideoPacket(t,s+1,n-1,e,f,p)}},r.prototype._parseAVCVideoPacket=function(t,s,n,e,f,c){if(n<4){y.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var p=this._littleEndian,v=new DataView(t,s,n),S=v.getUint8(0),E=v.getUint32(0,!p)&16777215,m=E<<8>>8;if(S===0)this._parseAVCDecoderConfigurationRecord(t,s+4,n-4);else if(S===1)this._parseAVCVideoData(t,s+4,n-4,e,f,c,m);else if(S!==2){this._onError(o.default.FORMAT_ERROR,"Flv: Invalid video packet type "+S);return}},r.prototype._parseAVCDecoderConfigurationRecord=function(t,s,n){if(n<7){y.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var e=this._videoMetadata,f=this._videoTrack,c=this._littleEndian,p=new DataView(t,s,n);e?typeof e.avcc!="undefined"&&y.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),e=this._videoMetadata={},e.type="video",e.id=f.id,e.timescale=this._timescale,e.duration=this._duration);var v=p.getUint8(0),S=p.getUint8(1);if(p.getUint8(2),p.getUint8(3),v!==1||S===0){this._onError(o.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(p.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(o.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));return}var E=p.getUint8(5)&31;if(E===0){this._onError(o.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else E>1&&y.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+E);for(var m=6,g=0;g1&&y.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+H);m++;for(var g=0;g=n){y.default.w(this.TAG,"Malformed Nalu near timestamp "+I+", offset = "+g+", dataSize = "+n);break}var w=S.getUint32(g,!v);if(A===3&&(w>>>=8),w>n-A){y.default.w(this.TAG,"Malformed Nalus near timestamp "+I+", NaluSize > DataSize!");return}var K=S.getUint8(g+A)&31;K===5&&(C=!0);var G=new Uint8Array(t,s+g,A+w),j={type:K,data:G};E.push(j),m+=G.byteLength,g+=A+w}if(E.length){var z=this._videoTrack,Y={units:E,length:m,isKeyframe:C,dts:I,cts:p,pts:I+p};C&&(Y.fileposition=f),z.samples.push(Y),z.length+=m}},r}();L.default=l},"./src/demux/sps-parser.js":function(T,L,_){_.r(L);var y=_("./src/demux/exp-golomb.js"),h=function(){function a(){}return a._ebsp2rbsp=function(o){for(var d=o,i=d.byteLength,u=new Uint8Array(i),l=0,r=0;r=2&&d[r]===3&&d[r-1]===0&&d[r-2]===0||(u[l]=d[r],l++);return new Uint8Array(u.buffer,0,l)},a.parseSPS=function(o){var d=a._ebsp2rbsp(o),i=new y.default(d);i.readByte();var u=i.readByte();i.readByte();var l=i.readByte();i.readUEG();var r=a.getProfileString(u),t=a.getLevelString(l),s=1,n=420,e=[0,420,422,444],f=8;if((u===100||u===110||u===122||u===244||u===44||u===83||u===86||u===118||u===128||u===138||u===144)&&(s=i.readUEG(),s===3&&i.readBits(1),s<=3&&(n=e[s]),f=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var c=s!==3?8:12,p=0;p0&&J<16?(j=ie[J-1],z=$[J-1]):J===255&&(j=i.readByte()<<8|i.readByte(),z=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var ee=i.readBits(32),ue=i.readBits(32);k=i.readBool(),H=ue,se=ee*2,Y=H/se}}var Q=1;(j!==1||z!==1)&&(Q=j/z);var U=0,te=0;if(s===0)U=1,te=2-A;else{var oe=s===3?1:2,he=s===1?2:1;U=oe,te=he*(2-A)}var le=(m+1)*16,de=(2-A)*((g+1)*16);le-=(I+C)*U,de-=(w+K)*te;var ce=Math.ceil(le*Q);return i.destroy(),i=null,{profile_string:r,level_string:t,bit_depth:f,ref_frames:E,chroma_format:n,chroma_format_string:a.getChromaFormatString(n),frame_rate:{fixed:k,fps:Y,fps_den:se,fps_num:H},sar_ratio:{width:j,height:z},codec_size:{width:le,height:de},present_size:{width:ce,height:de}}},a._skipScalingList=function(o,d){for(var i=8,u=8,l=0,r=0;r=15048,r=y.default.msedge?l:!0;return self.fetch&&self.ReadableStream&&r}catch{return!1}},u.prototype.destroy=function(){this.isWorking()&&this.abort(),i.prototype.destroy.call(this)},u.prototype.open=function(l,r){var t=this;this._dataSource=l,this._range=r;var s=l.url;this._config.reuseRedirectedURL&&l.redirectedURL!=null&&(s=l.redirectedURL);var n=this._seekHandler.getConfig(s,r),e=new self.Headers;if(typeof n.headers=="object"){var f=n.headers;for(var c in f)f.hasOwnProperty(c)&&e.append(c,f[c])}var p={method:"GET",headers:e,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var c in this._config.headers)e.append(c,this._config.headers[c]);l.cors===!1&&(p.mode="same-origin"),l.withCredentials&&(p.credentials="include"),l.referrerPolicy&&(p.referrerPolicy=l.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,p.signal=this._abortController.signal),this._status=h.LoaderStatus.kConnecting,self.fetch(n.url,p).then(function(v){if(t._requestAbort){t._status=h.LoaderStatus.kIdle,v.body.cancel();return}if(v.ok&&v.status>=200&&v.status<=299){if(v.url!==n.url&&t._onURLRedirect){var S=t._seekHandler.removeURLParameters(v.url);t._onURLRedirect(S)}var E=v.headers.get("Content-Length");return E!=null&&(t._contentLength=parseInt(E),t._contentLength!==0&&t._onContentLengthKnown&&t._onContentLengthKnown(t._contentLength)),t._pump.call(t,v.body.getReader())}else if(t._status=h.LoaderStatus.kError,t._onError)t._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:v.status,msg:v.statusText});else throw new a.RuntimeException("FetchStreamLoader: Http code invalid, "+v.status+" "+v.statusText)}).catch(function(v){if(!(t._abortController&&t._abortController.signal.aborted))if(t._status=h.LoaderStatus.kError,t._onError)t._onError(h.LoaderErrors.EXCEPTION,{code:-1,msg:v.message});else throw v})},u.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==h.LoaderStatus.kBuffering||!y.default.chrome)&&this._abortController)try{this._abortController.abort()}catch{}},u.prototype._pump=function(l){var r=this;return l.read().then(function(t){if(t.done)if(r._contentLength!==null&&r._receivedLength0&&(this._stashInitialSize=f.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,f.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new h.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return n.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},n.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},n.prototype.isPaused=function(){return this._paused},Object.defineProperty(n.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasRedirect",{get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentSpeed",{get:function(){return this._loaderClass===i.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),n.prototype._selectSeekHandler=function(){var e=this._config;if(e.seekType==="range")this._seekHandler=new l.default(this._config.rangeLoadZeroStart);else if(e.seekType==="param"){var f=e.seekParamStart||"bstart",c=e.seekParamEnd||"bend";this._seekHandler=new r.default(f,c)}else if(e.seekType==="custom"){if(typeof e.customSeekHandler!="function")throw new t.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}else throw new t.InvalidArgumentException("Invalid seekType in config: "+e.seekType)},n.prototype._selectLoader=function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=u.default;else if(o.default.isSupported())this._loaderClass=o.default;else if(d.default.isSupported())this._loaderClass=d.default;else if(i.default.isSupported())this._loaderClass=i.default;else throw new t.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!")},n.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},n.prototype.open=function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},n.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},n.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},n.prototype.resume=function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}},n.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},n.prototype._internalSeek=function(e,f){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(f),this._loader.destroy(),this._loader=null;var c={from:e,to:-1};this._currentRange={from:c.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,c),this._onSeeked&&this._onSeeked()},n.prototype.updateUrl=function(e){if(!e||typeof e!="string"||e.length===0)throw new t.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e},n.prototype._expandBuffer=function(e){for(var f=this._stashSize;f+1024*1024*10){var p=new Uint8Array(this._stashBuffer,0,this._stashUsed),v=new Uint8Array(c,0,f);v.set(p,0)}this._stashBuffer=c,this._bufferSize=f}},n.prototype._normalizeSpeed=function(e){var f=this._speedNormalizeList,c=f.length-1,p=0,v=0,S=c;if(e=f[p]&&e=512&&e<=1024?f=Math.floor(e*1.5):f=e*2,f>8192&&(f=8192);var c=f*1024+1024*1024*1;this._bufferSize0){var A=this._stashBuffer.slice(0,this._stashUsed),S=this._dispatchChunks(A,this._stashByteStart);if(S0){var g=new Uint8Array(A,S);m.set(g,0),this._stashUsed=g.byteLength,this._stashByteStart+=S}}else this._stashUsed=0,this._stashByteStart+=S;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),m=new Uint8Array(this._stashBuffer,0,this._bufferSize)),m.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var S=this._dispatchChunks(e,f);if(Sthis._bufferSize&&(this._expandBuffer(E),m=new Uint8Array(this._stashBuffer,0,this._bufferSize)),m.set(new Uint8Array(e,S),0),this._stashUsed+=E,this._stashByteStart=f+S}}}else if(this._stashUsed===0){var S=this._dispatchChunks(e,f);if(Sthis._bufferSize&&this._expandBuffer(E);var m=new Uint8Array(this._stashBuffer,0,this._bufferSize);m.set(new Uint8Array(e,S),0),this._stashUsed+=E,this._stashByteStart=f+S}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var m=new Uint8Array(this._stashBuffer,0,this._bufferSize);m.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var S=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(S0){var g=new Uint8Array(this._stashBuffer,S);m.set(g,0)}this._stashUsed-=S,this._stashByteStart+=S}}},n.prototype._flushStashBuffer=function(e){if(this._stashUsed>0){var f=this._stashBuffer.slice(0,this._stashUsed),c=this._dispatchChunks(f,this._stashByteStart),p=f.byteLength-c;if(c0){var v=new Uint8Array(this._stashBuffer,0,this._bufferSize),S=new Uint8Array(f,c);v.set(S,0),this._stashUsed=S.byteLength,this._stashByteStart+=c}return 0}return this._stashUsed=0,this._stashByteStart=0,p}return 0},n.prototype._onLoaderComplete=function(e,f){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},n.prototype._onLoaderError=function(e,f){switch(y.default.e(this.TAG,"Loader error, code = "+f.code+", msg = "+f.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=a.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case a.LoaderErrors.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var c=this._currentRange.to+1;c0)for(var l=d.split("&"),r=0;r0;t[0]!==this._startName&&t[0]!==this._endName&&(s&&(u+="&"),u+=l[r])}return u.length===0?o:o+"?"+u},h}();L.default=y},"./src/io/range-seek-handler.js":function(T,L,_){_.r(L);var y=function(){function h(a){this._zeroStart=a||!1}return h.prototype.getConfig=function(a,o){var d={};if(o.from!==0||o.to!==-1){var i=void 0;o.to!==-1?i="bytes="+o.from.toString()+"-"+o.to.toString():i="bytes="+o.from.toString()+"-",d.Range=i}else this._zeroStart&&(d.Range="bytes=0-");return{url:a,headers:d}},h.prototype.removeURLParameters=function(a){return a},h}();L.default=y},"./src/io/speed-sampler.js":function(T,L,_){_.r(L);var y=function(){function h(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return h.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},h.prototype.addBytes=function(a){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=a,this._totalBytes+=a):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=a,this._totalBytes+=a):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=a,this._totalBytes+=a,this._lastCheckpoint=this._now())},Object.defineProperty(h.prototype,"currentKBps",{get:function(){this.addBytes(0);var a=(this._now()-this._lastCheckpoint)/1e3;return a==0&&(a=1),this._intervalBytes/a/1024},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"averageKBps",{get:function(){var a=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/a/1024},enumerable:!1,configurable:!0}),h}();L.default=y},"./src/io/websocket-loader.js":function(T,L,_){_.r(L);var y=_("./src/io/loader.js"),h=_("./src/utils/exception.js"),a=function(){var d=function(i,u){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,r){l.__proto__=r}||function(l,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(l[t]=r[t])},d(i,u)};return function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");d(i,u);function l(){this.constructor=i}i.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}}(),o=function(d){a(i,d);function i(){var u=d.call(this,"websocket-loader")||this;return u.TAG="WebSocketLoader",u._needStash=!0,u._ws=null,u._requestAbort=!1,u._receivedLength=0,u}return i.isSupported=function(){try{return typeof self.WebSocket!="undefined"}catch{return!1}},i.prototype.destroy=function(){this._ws&&this.abort(),d.prototype.destroy.call(this)},i.prototype.open=function(u){try{var l=this._ws=new self.WebSocket(u.url);l.binaryType="arraybuffer",l.onopen=this._onWebSocketOpen.bind(this),l.onclose=this._onWebSocketClose.bind(this),l.onmessage=this._onWebSocketMessage.bind(this),l.onerror=this._onWebSocketError.bind(this),this._status=y.LoaderStatus.kConnecting}catch(t){this._status=y.LoaderStatus.kError;var r={code:t.code,msg:t.message};if(this._onError)this._onError(y.LoaderErrors.EXCEPTION,r);else throw new h.RuntimeException(r.msg)}},i.prototype.abort=function(){var u=this._ws;u&&(u.readyState===0||u.readyState===1)&&(this._requestAbort=!0,u.close()),this._ws=null,this._status=y.LoaderStatus.kComplete},i.prototype._onWebSocketOpen=function(u){this._status=y.LoaderStatus.kBuffering},i.prototype._onWebSocketClose=function(u){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=y.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)},i.prototype._onWebSocketMessage=function(u){var l=this;if(u.data instanceof ArrayBuffer)this._dispatchArrayBuffer(u.data);else if(u.data instanceof Blob){var r=new FileReader;r.onload=function(){l._dispatchArrayBuffer(r.result)},r.readAsArrayBuffer(u.data)}else{this._status=y.LoaderStatus.kError;var t={code:-1,msg:"Unsupported WebSocket message type: "+u.data.constructor.name};if(this._onError)this._onError(y.LoaderErrors.EXCEPTION,t);else throw new h.RuntimeException(t.msg)}},i.prototype._dispatchArrayBuffer=function(u){var l=u,r=this._receivedLength;this._receivedLength+=l.byteLength,this._onDataArrival&&this._onDataArrival(l,r,this._receivedLength)},i.prototype._onWebSocketError=function(u){this._status=y.LoaderStatus.kError;var l={code:u.code,msg:u.message};if(this._onError)this._onError(y.LoaderErrors.EXCEPTION,l);else throw new h.RuntimeException(l.msg)},i}(y.BaseLoader);L.default=o},"./src/io/xhr-moz-chunked-loader.js":function(T,L,_){_.r(L);var y=_("./src/utils/logger.js"),h=_("./src/io/loader.js"),a=_("./src/utils/exception.js"),o=function(){var i=function(u,l){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])},i(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");i(u,l);function r(){this.constructor=u}u.prototype=l===null?Object.create(l):(r.prototype=l.prototype,new r)}}(),d=function(i){o(u,i);function u(l,r){var t=i.call(this,"xhr-moz-chunked-loader")||this;return t.TAG="MozChunkedLoader",t._seekHandler=l,t._config=r,t._needStash=!0,t._xhr=null,t._requestAbort=!1,t._contentLength=null,t._receivedLength=0,t}return u.isSupported=function(){try{var l=new XMLHttpRequest;return l.open("GET","https://example.com",!0),l.responseType="moz-chunked-arraybuffer",l.responseType==="moz-chunked-arraybuffer"}catch(r){return y.default.w("MozChunkedLoader",r.message),!1}},u.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),i.prototype.destroy.call(this)},u.prototype.open=function(l,r){this._dataSource=l,this._range=r;var t=l.url;this._config.reuseRedirectedURL&&l.redirectedURL!=null&&(t=l.redirectedURL);var s=this._seekHandler.getConfig(t,r);this._requestURL=s.url;var n=this._xhr=new XMLHttpRequest;if(n.open("GET",s.url,!0),n.responseType="moz-chunked-arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onloadend=this._onLoadEnd.bind(this),n.onerror=this._onXhrError.bind(this),l.withCredentials&&(n.withCredentials=!0),typeof s.headers=="object"){var e=s.headers;for(var f in e)e.hasOwnProperty(f)&&n.setRequestHeader(f,e[f])}if(typeof this._config.headers=="object"){var e=this._config.headers;for(var f in e)e.hasOwnProperty(f)&&n.setRequestHeader(f,e[f])}this._status=h.LoaderStatus.kConnecting,n.send()},u.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=h.LoaderStatus.kComplete},u.prototype._onReadyStateChange=function(l){var r=l.target;if(r.readyState===2){if(r.responseURL!=null&&r.responseURL!==this._requestURL&&this._onURLRedirect){var t=this._seekHandler.removeURLParameters(r.responseURL);this._onURLRedirect(t)}if(r.status!==0&&(r.status<200||r.status>299))if(this._status=h.LoaderStatus.kError,this._onError)this._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:r.status,msg:r.statusText});else throw new a.RuntimeException("MozChunkedLoader: Http code invalid, "+r.status+" "+r.statusText);else this._status=h.LoaderStatus.kBuffering}},u.prototype._onProgress=function(l){if(this._status!==h.LoaderStatus.kError){this._contentLength===null&&l.total!==null&&l.total!==0&&(this._contentLength=l.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var r=l.target.response,t=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength,this._onDataArrival&&this._onDataArrival(r,t,this._receivedLength)}},u.prototype._onLoadEnd=function(l){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===h.LoaderStatus.kError)return;this._status=h.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)},u.prototype._onXhrError=function(l){this._status=h.LoaderStatus.kError;var r=0,t=null;if(this._contentLength&&l.loaded=this._contentLength&&(s=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:s},this._internalOpen(this._dataSource,this._currentRequestRange)},l.prototype._internalOpen=function(r,t){this._lastTimeLoaded=0;var s=r.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?s=this._currentRedirectedURL:r.redirectedURL!=null&&(s=r.redirectedURL));var n=this._seekHandler.getConfig(s,t);this._currentRequestURL=n.url;var e=this._xhr=new XMLHttpRequest;if(e.open("GET",n.url,!0),e.responseType="arraybuffer",e.onreadystatechange=this._onReadyStateChange.bind(this),e.onprogress=this._onProgress.bind(this),e.onload=this._onLoad.bind(this),e.onerror=this._onXhrError.bind(this),r.withCredentials&&(e.withCredentials=!0),typeof n.headers=="object"){var f=n.headers;for(var c in f)f.hasOwnProperty(c)&&e.setRequestHeader(c,f[c])}if(typeof this._config.headers=="object"){var f=this._config.headers;for(var c in f)f.hasOwnProperty(c)&&e.setRequestHeader(c,f[c])}e.send()},l.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=a.LoaderStatus.kComplete},l.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},l.prototype._onReadyStateChange=function(r){var t=r.target;if(t.readyState===2){if(t.responseURL!=null){var s=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&s!==this._currentRedirectedURL&&(this._currentRedirectedURL=s,this._onURLRedirect&&this._onURLRedirect(s))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=a.LoaderStatus.kBuffering}else if(this._status=a.LoaderStatus.kError,this._onError)this._onError(a.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText});else throw new o.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText)}},l.prototype._onProgress=function(r){if(this._status!==a.LoaderStatus.kError){if(this._contentLength===null){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var s=r.total;this._internalAbort(),s!=null&s!==0&&(this._totalLength=s)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var n=r.loaded-this._lastTimeLoaded;this._lastTimeLoaded=r.loaded,this._speedSampler.addBytes(n)}},l.prototype._normalizeSpeed=function(r){var t=this._chunkSizeKBList,s=t.length-1,n=0,e=0,f=s;if(r=t[n]&&r=3&&(t=this._speedSampler.currentKBps)),t!==0){var s=this._normalizeSpeed(t);this._currentSpeedNormalized!==s&&(this._currentSpeedNormalized=s,this._currentChunkSizeKB=s)}var n=r.target.response,e=this._range.from+this._receivedLength;this._receivedLength+=n.byteLength;var f=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new i.default(this._mediaDataSource,this._config),this._transmuxer.on(u.default.INIT_SEGMENT,function(p,v){c._msectl.appendInitSegment(v)}),this._transmuxer.on(u.default.MEDIA_SEGMENT,function(p,v){if(c._msectl.appendMediaSegment(v),c._config.lazyLoad&&!c._config.isLive){var S=c._mediaElement.currentTime;v.info.endDts>=(S+c._config.lazyLoadMaxDuration)*1e3&&c._progressChecker==null&&(a.default.v(c.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),c._suspendTransmuxer())}}),this._transmuxer.on(u.default.LOADING_COMPLETE,function(){c._msectl.endOfStream(),c._emitter.emit(d.default.LOADING_COMPLETE)}),this._transmuxer.on(u.default.RECOVERED_EARLY_EOF,function(){c._emitter.emit(d.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(u.default.IO_ERROR,function(p,v){c._emitter.emit(d.default.ERROR,t.ErrorTypes.NETWORK_ERROR,p,v)}),this._transmuxer.on(u.default.DEMUX_ERROR,function(p,v){c._emitter.emit(d.default.ERROR,t.ErrorTypes.MEDIA_ERROR,p,{code:-1,msg:v})}),this._transmuxer.on(u.default.MEDIA_INFO,function(p){c._mediaInfo=p,c._emitter.emit(d.default.MEDIA_INFO,Object.assign({},p))}),this._transmuxer.on(u.default.METADATA_ARRIVED,function(p){c._emitter.emit(d.default.METADATA_ARRIVED,p)}),this._transmuxer.on(u.default.SCRIPTDATA_ARRIVED,function(p){c._emitter.emit(d.default.SCRIPTDATA_ARRIVED,p)}),this._transmuxer.on(u.default.STATISTICS_INFO,function(p){c._statisticsInfo=c._fillStatisticsInfo(p),c._emitter.emit(d.default.STATISTICS_INFO,Object.assign({},c._statisticsInfo))}),this._transmuxer.on(u.default.RECOMMEND_SEEKPOINT,function(p){c._mediaElement&&!c._config.accurateSeek&&(c._requestSetTime=!0,c._mediaElement.currentTime=p/1e3)}),this._transmuxer.open()}},f.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},f.prototype.play=function(){return this._mediaElement.play()},f.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(f.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(c){this._mediaElement.volume=c},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(c){this._mediaElement.muted=c},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(c){this._mediaElement?this._internalSeek(c):this._pendingSeekTime=c},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"statisticsInfo",{get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),f.prototype._fillStatisticsInfo=function(c){if(c.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return c;var p=!0,v=0,S=0;if(this._mediaElement.getVideoPlaybackQuality){var E=this._mediaElement.getVideoPlaybackQuality();v=E.totalVideoFrames,S=E.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(v=this._mediaElement.webkitDecodedFrameCount,S=this._mediaElement.webkitDroppedFrameCount):p=!1;return p&&(c.decodedFrames=v,c.droppedFrames=S),c},f.prototype._onmseUpdateEnd=function(){if(!(!this._config.lazyLoad||this._config.isLive)){for(var c=this._mediaElement.buffered,p=this._mediaElement.currentTime,v=0,S=0;S=p+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(a.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},f.prototype._onmseBufferFull=function(){a.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()},f.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},f.prototype._checkProgressAndResume=function(){for(var c=this._mediaElement.currentTime,p=this._mediaElement.buffered,v=!1,S=0;S=E&&c=m-this._config.lazyLoadRecoverDuration&&(v=!0);break}}v&&(window.clearInterval(this._progressChecker),this._progressChecker=null,v&&(a.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},f.prototype._isTimepointBuffered=function(c){for(var p=this._mediaElement.buffered,v=0;v=S&&c0){var E=this._mediaElement.buffered.start(0);(E<1&&c0&&p.currentTime0){var S=v.start(0);if(S<1&&p0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},u.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},u.prototype.play=function(){return this._mediaElement.play()},u.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(u.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(l){this._mediaElement.volume=l},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(l){this._mediaElement.muted=l},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(l){this._mediaElement?this._mediaElement.currentTime=l:this._pendingSeekTime=l},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"mediaInfo",{get:function(){var l=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",r={mimeType:l+this._mediaDataSource.type};return this._mediaElement&&(r.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(r.width=this._mediaElement.videoWidth,r.height=this._mediaElement.videoHeight)),r},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"statisticsInfo",{get:function(){var l={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return l;var r=!0,t=0,s=0;if(this._mediaElement.getVideoPlaybackQuality){var n=this._mediaElement.getVideoPlaybackQuality();t=n.totalVideoFrames,s=n.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(t=this._mediaElement.webkitDecodedFrameCount,s=this._mediaElement.webkitDroppedFrameCount):r=!1;return r&&(l.decodedFrames=t,l.droppedFrames=s),l},enumerable:!1,configurable:!0}),u.prototype._onvLoadedMetadata=function(l){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(a.default.MEDIA_INFO,this.mediaInfo)},u.prototype._reportStatisticsInfo=function(){this._emitter.emit(a.default.STATISTICS_INFO,this.statisticsInfo)},u}();L.default=i},"./src/player/player-errors.js":function(T,L,_){_.r(L),_.d(L,{ErrorTypes:function(){return a},ErrorDetails:function(){return o}});var y=_("./src/io/loader.js"),h=_("./src/demux/demux-errors.js"),a={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},o={NETWORK_EXCEPTION:y.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:y.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:y.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:y.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:h.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:h.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:h.default.CODEC_UNSUPPORTED}},"./src/player/player-events.js":function(T,L,_){_.r(L);var y={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};L.default=y},"./src/remux/aac-silent.js":function(T,L,_){_.r(L);var y=function(){function h(){}return h.getSilentFrame=function(a,o){if(a==="mp4a.40.2"){if(o===1)return new Uint8Array([0,200,0,128,35,128]);if(o===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(o===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(o===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(o===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(o===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(o===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(o===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(o===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},h}();L.default=y},"./src/remux/mp4-generator.js":function(T,L,_){_.r(L);var y=function(){function h(){}return h.init=function(){h.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var a in h.types)h.types.hasOwnProperty(a)&&(h.types[a]=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)]);var o=h.constants={};o.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),o.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),o.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),o.STSC=o.STCO=o.STTS,o.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),o.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),o.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),o.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),o.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},h.box=function(a){for(var o=8,d=null,i=Array.prototype.slice.call(arguments,1),u=i.length,l=0;l>>24&255,d[1]=o>>>16&255,d[2]=o>>>8&255,d[3]=o&255,d.set(a,4);for(var r=8,l=0;l>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},h.trak=function(a){return h.box(h.types.trak,h.tkhd(a),h.mdia(a))},h.tkhd=function(a){var o=a.id,d=a.duration,i=a.presentWidth,u=a.presentHeight;return h.box(h.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,o&255,0,0,0,0,d>>>24&255,d>>>16&255,d>>>8&255,d&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,i&255,0,0,u>>>8&255,u&255,0,0]))},h.mdia=function(a){return h.box(h.types.mdia,h.mdhd(a),h.hdlr(a),h.minf(a))},h.mdhd=function(a){var o=a.timescale,d=a.duration;return h.box(h.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,o&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,85,196,0,0]))},h.hdlr=function(a){var o=null;return a.type==="audio"?o=h.constants.HDLR_AUDIO:o=h.constants.HDLR_VIDEO,h.box(h.types.hdlr,o)},h.minf=function(a){var o=null;return a.type==="audio"?o=h.box(h.types.smhd,h.constants.SMHD):o=h.box(h.types.vmhd,h.constants.VMHD),h.box(h.types.minf,o,h.dinf(),h.stbl(a))},h.dinf=function(){var a=h.box(h.types.dinf,h.box(h.types.dref,h.constants.DREF));return a},h.stbl=function(a){var o=h.box(h.types.stbl,h.stsd(a),h.box(h.types.stts,h.constants.STTS),h.box(h.types.stsc,h.constants.STSC),h.box(h.types.stsz,h.constants.STSZ),h.box(h.types.stco,h.constants.STCO));return o},h.stsd=function(a){return a.type==="audio"?a.codec==="mp3"?h.box(h.types.stsd,h.constants.STSD_PREFIX,h.mp3(a)):h.box(h.types.stsd,h.constants.STSD_PREFIX,h.mp4a(a)):h.box(h.types.stsd,h.constants.STSD_PREFIX,h.avc1(a))},h.mp3=function(a){var o=a.channelCount,d=a.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,d>>>8&255,d&255,0,0]);return h.box(h.types[".mp3"],i)},h.mp4a=function(a){var o=a.channelCount,d=a.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,d>>>8&255,d&255,0,0]);return h.box(h.types.mp4a,i,h.esds(a))},h.esds=function(a){var o=a.config||[],d=o.length,i=new Uint8Array([0,0,0,0,3,23+d,0,1,0,4,15+d,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([d]).concat(o).concat([6,1,2]));return h.box(h.types.esds,i)},h.avc1=function(a){var o=a.avcc,d=a.codecWidth,i=a.codecHeight,u=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,d>>>8&255,d&255,i>>>8&255,i&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return h.box(h.types.avc1,u,h.box(h.types.avcC,o))},h.mvex=function(a){return h.box(h.types.mvex,h.trex(a))},h.trex=function(a){var o=a.id,d=new Uint8Array([0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.box(h.types.trex,d)},h.moof=function(a,o){return h.box(h.types.moof,h.mfhd(a.sequenceNumber),h.traf(a,o))},h.mfhd=function(a){var o=new Uint8Array([0,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,a&255]);return h.box(h.types.mfhd,o)},h.traf=function(a,o){var d=a.id,i=h.box(h.types.tfhd,new Uint8Array([0,0,0,0,d>>>24&255,d>>>16&255,d>>>8&255,d&255])),u=h.box(h.types.tfdt,new Uint8Array([0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,o&255])),l=h.sdtp(a),r=h.trun(a,l.byteLength+16+16+8+16+8+8);return h.box(h.types.traf,i,u,r,l)},h.sdtp=function(a){for(var o=a.samples||[],d=o.length,i=new Uint8Array(4+d),u=0;u>>24&255,i>>>16&255,i>>>8&255,i&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0);for(var r=0;r>>24&255,t>>>16&255,t>>>8&255,t&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.isNonSync,0,0,e>>>24&255,e>>>16&255,e>>>8&255,e&255],12+16*r)}return h.box(h.types.trun,l)},h.mdat=function(a){return h.box(h.types.mdat,a)},h}();y.init(),L.default=y},"./src/remux/mp4-remuxer.js":function(T,L,_){_.r(L);var y=_("./src/utils/logger.js"),h=_("./src/remux/mp4-generator.js"),a=_("./src/remux/aac-silent.js"),o=_("./src/utils/browser.js"),d=_("./src/core/media-segment-info.js"),i=_("./src/utils/exception.js"),u=function(){function l(r){this.TAG="MP4Remuxer",this._config=r,this._isLive=r.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new d.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new d.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(o.default.chrome&&(o.default.version.major<50||o.default.version.major===50&&o.default.version.build<2661)),this._fillSilentAfterSeek=o.default.msedge||o.default.msie,this._mp3UseMpegAudio=!o.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return l.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},l.prototype.bindDataSource=function(r){return r.onDataAvailable=this.remux.bind(this),r.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(l.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(r){this._onInitSegment=r},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(r){this._onMediaSegment=r},enumerable:!1,configurable:!0}),l.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},l.prototype.seek=function(r){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},l.prototype.remux=function(r,t){if(!this._onMediaSegment)throw new i.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(r,t),this._remuxVideo(t),this._remuxAudio(r)},l.prototype._onTrackMetadataReceived=function(r,t){var s=null,n="mp4",e=t.codec;if(r==="audio")this._audioMeta=t,t.codec==="mp3"&&this._mp3UseMpegAudio?(n="mpeg",e="",s=new Uint8Array):s=h.default.generateInitSegment(t);else if(r==="video")this._videoMeta=t,s=h.default.generateInitSegment(t);else return;if(!this._onInitSegment)throw new i.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(r,{type:r,data:s.buffer,codec:e,container:r+"/"+n,mediaDuration:t.duration})},l.prototype._calculateDtsBase=function(r,t){this._dtsBaseInited||(r.samples&&r.samples.length&&(this._audioDtsBase=r.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},l.prototype.flushStashedSamples=function(){var r=this._videoStashedLastSample,t=this._audioStashedLastSample,s={type:"video",id:1,sequenceNumber:0,samples:[],length:0};r!=null&&(s.samples.push(r),s.length=r.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};t!=null&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(s,!0),this._remuxAudio(n,!0)},l.prototype._remuxAudio=function(r,t){if(this._audioMeta!=null){var s=r,n=s.samples,e=void 0,f=-1,c=-1,p=this._audioMeta.refSampleDuration,v=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,S=this._dtsBaseInited&&this._audioNextDts===void 0,E=!1;if(!(!n||n.length===0)&&!(n.length===1&&!t)){var m=0,g=null,A=0;v?(m=0,A=s.length):(m=8,A=8+s.length);var I=null;if(n.length>1&&(I=n.pop(),A-=I.length),this._audioStashedLastSample!=null){var C=this._audioStashedLastSample;this._audioStashedLastSample=null,n.unshift(C),A+=C.length}I!=null&&(this._audioStashedLastSample=I);var w=n[0].dts-this._dtsBase;if(this._audioNextDts)e=w-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())e=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(E=!0);else{var K=this._audioSegmentInfoList.getLastSampleBefore(w);if(K!=null){var G=w-(K.originalDts+K.duration);G<=3&&(G=0);var j=K.dts+K.duration+G;e=w-j}else e=0}if(E){var z=w-e,Y=this._videoSegmentInfoList.getLastSegmentBefore(w);if(Y!=null&&Y.beginDts=te*p&&this._fillAudioTimestampGap&&!o.default.safari){ee=!0;var oe=Math.floor(e/p);y.default.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync. `+("originalDts: "+$+" ms, curRefDts: "+U+" ms, ")+("dtsCorrection: "+Math.round(e)+" ms, generate: "+oe+" frames")),H=Math.floor(U),Q=Math.floor(U+p)-H;var k=a.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);k==null&&(y.default.w(this.TAG,"Unable to generate silent frame for "+(this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame")),k=ie),ue=[];for(var he=0;he=1?Q=X[X.length-1].duration:Q=Math.floor(p);this._audioNextDts=H+Q}f===-1&&(f=H),X.push({dts:H,pts:H,cts:0,unit:C.unit,size:C.unit.byteLength,duration:Q,originalDts:$,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ee&&X.push.apply(X,ue)}}if(X.length===0){s.samples=[],s.length=0;return}v?g=new Uint8Array(A):(g=new Uint8Array(A),g[0]=A>>>24&255,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g.set(h.default.types.mdat,4));for(var J=0;J1&&(g=n.pop(),m-=g.length),this._videoStashedLastSample!=null){var A=this._videoStashedLastSample;this._videoStashedLastSample=null,n.unshift(A),m+=A.length}g!=null&&(this._videoStashedLastSample=g);var I=n[0].dts-this._dtsBase;if(this._videoNextDts)e=I-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())e=0;else{var C=this._videoSegmentInfoList.getLastSampleBefore(I);if(C!=null){var w=I-(C.originalDts+C.duration);w<=3&&(w=0);var K=C.dts+C.duration+w;e=I-K}else e=0}for(var G=new d.MediaSegmentInfo,j=[],z=0;z=1?J=j[j.length-1].duration:J=Math.floor(this._videoMeta.refSampleDuration);if(k){var $=new d.SampleInfo(H,X,J,A.dts,!0);$.fileposition=A.fileposition,G.appendSyncPoint($)}j.push({dts:H,pts:X,cts:se,units:A.units,size:A.length,isKeyframe:k,duration:J,originalDts:Y,flags:{isLeading:0,dependsOn:k?2:1,isDependedOn:k?1:0,hasRedundancy:0,isNonSync:k?0:1}})}E=new Uint8Array(m),E[0]=m>>>24&255,E[1]=m>>>16&255,E[2]=m>>>8&255,E[3]=m&255,E.set(h.default.types.mdat,4);for(var z=0;z=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(a)||[],d=/(ipad)/.exec(a)||/(ipod)/.exec(a)||/(windows phone)/.exec(a)||/(iphone)/.exec(a)||/(kindle)/.exec(a)||/(android)/.exec(a)||/(windows)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||/(cros)/.exec(a)||[],i={browser:o[5]||o[3]||o[1]||"",version:o[2]||o[4]||"0",majorVersion:o[4]||o[2]||"0",platform:d[0]||""},u={};if(i.browser){u[i.browser]=!0;var l=i.majorVersion.split(".");u.version={major:parseInt(i.majorVersion,10),string:i.version},l.length>1&&(u.version.minor=parseInt(l[1],10)),l.length>2&&(u.version.build=parseInt(l[2],10))}if(i.platform&&(u[i.platform]=!0),(u.chrome||u.opr||u.safari)&&(u.webkit=!0),u.rv||u.iemobile){u.rv&&delete u.rv;var r="msie";i.browser=r,u[r]=!0}if(u.edge){delete u.edge;var t="msedge";i.browser=t,u[t]=!0}if(u.opr){var s="opera";i.browser=s,u[s]=!0}if(u.safari&&u.android){var n="android";i.browser=n,u[n]=!0}u.name=i.browser,u.platform=i.platform;for(var e in y)y.hasOwnProperty(e)&&delete y[e];Object.assign(y,u)}h(),L.default=y},"./src/utils/exception.js":function(T,L,_){_.r(L),_.d(L,{RuntimeException:function(){return h},IllegalStateException:function(){return a},InvalidArgumentException:function(){return o},NotImplementedException:function(){return d}});var y=function(){var i=function(u,l){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])},i(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");i(u,l);function r(){this.constructor=u}u.prototype=l===null?Object.create(l):(r.prototype=l.prototype,new r)}}(),h=function(){function i(u){this._message=u}return Object.defineProperty(i.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),i.prototype.toString=function(){return this.name+": "+this.message},i}(),a=function(i){y(u,i);function u(l){return i.call(this,l)||this}return Object.defineProperty(u.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),u}(h),o=function(i){y(u,i);function u(l){return i.call(this,l)||this}return Object.defineProperty(u.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),u}(h),d=function(i){y(u,i);function u(l){return i.call(this,l)||this}return Object.defineProperty(u.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),u}(h)},"./src/utils/logger.js":function(T,L,_){_.r(L);var y=_("./node_modules/events/events.js"),h=_.n(y),a=function(){function o(){}return o.e=function(d,i){(!d||o.FORCE_GLOBAL_TAG)&&(d=o.GLOBAL_TAG);var u="["+d+"] > "+i;o.ENABLE_CALLBACK&&o.emitter.emit("log","error",u),o.ENABLE_ERROR&&(console.error?console.error(u):console.warn?console.warn(u):console.log(u))},o.i=function(d,i){(!d||o.FORCE_GLOBAL_TAG)&&(d=o.GLOBAL_TAG);var u="["+d+"] > "+i;o.ENABLE_CALLBACK&&o.emitter.emit("log","info",u),o.ENABLE_INFO&&(console.info?console.info(u):console.log(u))},o.w=function(d,i){(!d||o.FORCE_GLOBAL_TAG)&&(d=o.GLOBAL_TAG);var u="["+d+"] > "+i;o.ENABLE_CALLBACK&&o.emitter.emit("log","warn",u),o.ENABLE_WARN&&(console.warn?console.warn(u):console.log(u))},o.d=function(d,i){(!d||o.FORCE_GLOBAL_TAG)&&(d=o.GLOBAL_TAG);var u="["+d+"] > "+i;o.ENABLE_CALLBACK&&o.emitter.emit("log","debug",u),o.ENABLE_DEBUG&&(console.debug?console.debug(u):console.log(u))},o.v=function(d,i){(!d||o.FORCE_GLOBAL_TAG)&&(d=o.GLOBAL_TAG);var u="["+d+"] > "+i;o.ENABLE_CALLBACK&&o.emitter.emit("log","verbose",u),o.ENABLE_VERBOSE&&console.log(u)},o}();a.GLOBAL_TAG="flv.js",a.FORCE_GLOBAL_TAG=!1,a.ENABLE_ERROR=!0,a.ENABLE_INFO=!0,a.ENABLE_WARN=!0,a.ENABLE_DEBUG=!0,a.ENABLE_VERBOSE=!0,a.ENABLE_CALLBACK=!1,a.emitter=new(h()),L.default=a},"./src/utils/logging-control.js":function(T,L,_){_.r(L);var y=_("./node_modules/events/events.js"),h=_.n(y),a=_("./src/utils/logger.js"),o=function(){function d(){}return Object.defineProperty(d,"forceGlobalTag",{get:function(){return a.default.FORCE_GLOBAL_TAG},set:function(i){a.default.FORCE_GLOBAL_TAG=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"globalTag",{get:function(){return a.default.GLOBAL_TAG},set:function(i){a.default.GLOBAL_TAG=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"enableAll",{get:function(){return a.default.ENABLE_VERBOSE&&a.default.ENABLE_DEBUG&&a.default.ENABLE_INFO&&a.default.ENABLE_WARN&&a.default.ENABLE_ERROR},set:function(i){a.default.ENABLE_VERBOSE=i,a.default.ENABLE_DEBUG=i,a.default.ENABLE_INFO=i,a.default.ENABLE_WARN=i,a.default.ENABLE_ERROR=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"enableDebug",{get:function(){return a.default.ENABLE_DEBUG},set:function(i){a.default.ENABLE_DEBUG=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"enableVerbose",{get:function(){return a.default.ENABLE_VERBOSE},set:function(i){a.default.ENABLE_VERBOSE=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"enableInfo",{get:function(){return a.default.ENABLE_INFO},set:function(i){a.default.ENABLE_INFO=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"enableWarn",{get:function(){return a.default.ENABLE_WARN},set:function(i){a.default.ENABLE_WARN=i,d._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(d,"enableError",{get:function(){return a.default.ENABLE_ERROR},set:function(i){a.default.ENABLE_ERROR=i,d._notifyChange()},enumerable:!1,configurable:!0}),d.getConfig=function(){return{globalTag:a.default.GLOBAL_TAG,forceGlobalTag:a.default.FORCE_GLOBAL_TAG,enableVerbose:a.default.ENABLE_VERBOSE,enableDebug:a.default.ENABLE_DEBUG,enableInfo:a.default.ENABLE_INFO,enableWarn:a.default.ENABLE_WARN,enableError:a.default.ENABLE_ERROR,enableCallback:a.default.ENABLE_CALLBACK}},d.applyConfig=function(i){a.default.GLOBAL_TAG=i.globalTag,a.default.FORCE_GLOBAL_TAG=i.forceGlobalTag,a.default.ENABLE_VERBOSE=i.enableVerbose,a.default.ENABLE_DEBUG=i.enableDebug,a.default.ENABLE_INFO=i.enableInfo,a.default.ENABLE_WARN=i.enableWarn,a.default.ENABLE_ERROR=i.enableError,a.default.ENABLE_CALLBACK=i.enableCallback},d._notifyChange=function(){var i=d.emitter;if(i.listenerCount("change")>0){var u=d.getConfig();i.emit("change",u)}},d.registerListener=function(i){d.emitter.addListener("change",i)},d.removeListener=function(i){d.emitter.removeListener("change",i)},d.addLogListener=function(i){a.default.emitter.addListener("log",i),a.default.emitter.listenerCount("log")>0&&(a.default.ENABLE_CALLBACK=!0,d._notifyChange())},d.removeLogListener=function(i){a.default.emitter.removeListener("log",i),a.default.emitter.listenerCount("log")===0&&(a.default.ENABLE_CALLBACK=!1,d._notifyChange())},d}();o.emitter=new(h()),L.default=o},"./src/utils/polyfill.js":function(T,L,_){_.r(L);var y=function(){function h(){}return h.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},Object.assign=Object.assign||function(a){if(a==null)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(a),d=1;d=128){o.push(String.fromCharCode(l&65535)),i+=2;continue}}}else if(d[i]<240){if(y(d,i,2)){var l=(d[i]&15)<<12|(d[i+1]&63)<<6|d[i+2]&63;if(l>=2048&&(l&63488)!==55296){o.push(String.fromCharCode(l&65535)),i+=3;continue}}}else if(d[i]<248&&y(d,i,3)){var l=(d[i]&7)<<18|(d[i+1]&63)<<12|(d[i+2]&63)<<6|d[i+3]&63;if(l>65536&&l<1114112){l-=65536,o.push(String.fromCharCode(l>>>10|55296)),o.push(String.fromCharCode(l&1023|56320)),i+=4;continue}}}o.push(String.fromCharCode(65533)),++i}return o.join("")}L.default=h}},D={};function F(T){var L=D[T];if(L!==void 0)return L.exports;var _=D[T]={exports:{}};return O[T].call(_.exports,_,_.exports,F),_.exports}F.m=O,function(){F.n=function(T){var L=T&&T.__esModule?function(){return T.default}:function(){return T};return F.d(L,{a:L}),L}}(),function(){F.d=function(T,L){for(var _ in L)F.o(L,_)&&!F.o(T,_)&&Object.defineProperty(T,_,{enumerable:!0,get:L[_]})}}(),function(){F.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){F.o=function(T,L){return Object.prototype.hasOwnProperty.call(T,L)}}(),function(){F.r=function(T){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})}}();var V=F("./src/index.js");return V}()})})(St);let At=100,We={"0x12f900003":"\u4EC5\u56DE\u653E\u652F\u6301\u8BE5\u529F\u80FD","0x12f900004":"\u666E\u901A\u6A21\u5F0F\u4E0D\u652F\u6301\u8BE5\u529F\u80FD","0x12f900005":"\u9AD8\u7EA7\u6A21\u5F0F\u4E0D\u652F\u6301\u8BE5\u529F\u80FD","0x12f900006":"\u64AD\u653E\u5E93\u62A5\u9519","0x12f900007":"Decoder.js\u52A0\u8F7D\u5931\u8D25","0x12f910000":"websocket\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5BF9\u53D6\u6D41URL","0x12f910010":"\u53D6\u6D41\u5931\u8D25","0x12f910011":"\u6D41\u4E2D\u65AD","0x12f910014":"\u6CA1\u6709\u97F3\u9891\u6570\u636E","0x12f910015":"\u672A\u627E\u5230\u5BF9\u5E94websocket","0x12f910016":"websocket\u4E0D\u5728\u8FDE\u63A5\u72B6\u6001","0x12f910017":"\u4E0D\u652F\u6301\u667A\u80FD\u4FE1\u606F\u5C55\u793A","0x12f910020":"\u5355\u5E27\u56DE\u653E\u65F6\u4E0D\u80FD\u6682\u505C","0x12f910021":"\u5DF2\u662F\u6700\u5927\u500D\u901F","0x12f910022":"\u5DF2\u662F\u6700\u5C0F\u500D\u901F","0x12f920000":"\u50A8\u5B58\u7A7A\u95F4\u914D\u989D\u5931\u8D25","0x12f920001":"\u8BF7\u6C42\u6587\u4EF6\u7CFB\u7EDF\u5931\u8D25","0x12f920002":"\u83B7\u53D6\u6587\u4EF6\u5931\u8D25","0x12f920003":"\u521B\u5EFAwriter\u5931\u8D25","0x12f920004":"\u5199\u6570\u636E\u5931\u8D25","0x12f930000":"\u5185\u5B58\u4E0D\u8DB3","0x12f950000":"\u91C7\u96C6\u97F3\u9891\u5931\u8D25\uFF0C\u53EF\u80FD\u662F\u5728\u975Ehttps/localhost\u57DF\u4E0B\u4F7F\u7528\u5BF9\u8BB2\u5BFC\u81F4","0x12f950001":"\u5BF9\u8BB2\u4E0D\u652F\u6301\u8FD9\u79CD\u97F3\u9891\u7F16\u7801\u683C\u5F0F","0x02200404":"\u53D6\u6D41\u5931\u8D25"};var Lt={props:{autoPlay:{type:Boolean,default:!0},retry:{type:Number,default:6}},data(){return{loading:!1,player:null,elId:"",msg:"",pause:!0,showVideo:!0,videoUrl:"",code:"",retryAccu:0,offlineShow:!1}},created(){this.elId=`playWnd_${At++}`},mounted(){},beforeUnmount(){this.stopVideo()},methods:{createPlayer(x,b){this.offlineShow=!1,this.videoUrl=x,this.code=b;const{elId:O,autoPlay:D}=this;this.player=new window.JSPlugin({szId:O,szBasePath:"/",openDebug:!0,oStyle:{borderSelect:"none"}}),this.player.JS_SetWindowControlCallback({pluginErrorHandler:(F,V,T)=>{console.log("\u63D2\u4EF6\u9519\u8BEF\u56DE\u8C03"),this.msg=We[V]?We[V]:`\u9519\u8BEF\u7801\uFF1A${V}`,this.playStop(),this.showVideo=!1,setTimeout(()=>{this.reloadUrl()},500)},performanceLack:()=>{console.log("\u6027\u80FD\u4E0D\u8DB3")}}),D&&this.play()},async reloadUrl(){if(this.retryAccu++,this.retryAccu>this.retry){this.offlineShow=!0;return}this.showVideo=!0;const x=await ut(this.code);x.data&&(this.videoUrl=x.data,this.player=null,this.createPlayer(this.videoUrl,this.code))},play(){let{player:x,videoUrl:b}=this;if(!b){this.msg="\u89C6\u9891\u52A0\u8F7D\u5931\u8D25";return}this.loading=!0,this.player.JS_Play(b,{playURL:b},0).then(O=>{this.pause=!1,this.loading=!1},O=>{this.loading=!1})},playPause(){this.pause?this.play():this.playStop()},playStop(){this.loading&&(this.loading=!1),this.player&&this.player.JS_Stop().then(()=>{this.pause=!0},x=>{console.error(x)})},stopVideo(){this.playStop(),this.msg="",this.player=null},fullScreen(){this.player.JS_FullScreenDisplay(!0).then(()=>{console.log("wholeFullScreen success")},x=>{console.error(x)})}}};const bt=x=>(Xe("data-v-25a77352"),x=x(),Ye(),x),Rt={class:"container"},Ot={key:0},Ct=["id"],It={class:"control"},Tt={class:"loading"},Pt=bt(()=>re("span",null,"\u89C6\u9891\u52A0\u8F7D\u4E2D..",-1)),Mt=[Pt],Dt={key:1,class:"offlinediv"};function wt(x,b,O,D,F,V){return Re(),Oe("div",Rt,[F.showVideo?(Re(),Oe("div",Ot,[re("div",{id:F.elId,style:{width:"700px",height:"500px"}},null,8,Ct)])):ke("",!0),ge(re("div",It,[re("i",{class:He(F.pause?"el-icon-video-play":"el-icon-video-pause"),onClick:b[0]||(b[0]=je((...T)=>V.playPause&&V.playPause(...T),["stop"]))},null,2),re("i",{class:"el-icon-full-screen",onClick:b[1]||(b[1]=je((...T)=>V.fullScreen&&V.fullScreen(...T),["stop"]))})],512),[[xe,x.url&&!F.msg&&!F.loading]]),ge(re("div",Tt,Mt,512),[[xe,F.loading]]),F.offlineShow?(Re(),Oe("div",Dt,"\u5F53\u524D\u76D1\u63A7\u8BBE\u5907\u6682\u65F6\u65E0\u6CD5\u9884\u89C8\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")):ke("",!0)])}var Xt=ze(Lt,[["render",wt],["__scopeId","data-v-25a77352"]]);const Ft="/http-server-base/publish/quota-v1",Bt=`/bizapi1${Ft}`,Ut="/bizapi2/http-server-plus",Me="/bizapi2/http-server-base/publish/cockpit/quota-v1";function Yt(x,b,O,D){return Ee.get(`${Bt}/videoResource`,{params:{regionId:x,enunittype:b,dimension:O,level:D}})}function Jt(){return Ee.get(`${Ut}/video/getTree`)}function Qt(x){return Ee.get(`${Me}/VideoTreeCountsAndStateCnt?videoregion=${x}`)}function Zt(){return Ee.get(`${Me}/videoIdStatus`)}function $t(x){return Ee.get(`${Me}/rescueCameraList`,{params:x})}var qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAsFJREFUSEu1lVuITWEUx3/rbHumJsVMSUmhEGpQHigZdyVF0aSzt4eJaRhRcnlUHjzwIl7cCWO+wXnxIHIZt4TkRaMQD5KaMjGmaXDsYy99Zzbtc5x9Zhqsx32+7/9ba31r/Y/wn0P+pb56XjWwmiAwksl8tdqDAmg63YjIAeAkxuwQ0OLEtL5+FK57C5gONIoxpwYF0HXr5hGG9mJFXlTkMK2tW+KQIvEOhg1bKOfOfRwQoL4/FtWnwOiCjGOQP8SDYLFkMl2/zie2SOvrK3Dde8CchHc6guPs4cePm1FbOigSL1uBNjSMJJu9i8iMMoPwGRgJlBRPBKjnbQD6CIJ2XPcuMK0MpAfHmSwtLR9KnSnZIvU8m9lwVNfiOA8JQ9uqSWUgRzFmc6npSgJcBlYB3wnD1TjOM1TvAxMSISLHaG1tLoaUBjQ1VdHXdxvV2UAWkZWo2qoeD7A7xzFmUxxSbopqov7XAl+Ad8CUQWx+AaTsJkd78AAYFy3ZC8KwGZEMMCoRpnqCtraNtpICgPr+cmAulZX75fTpXvX9ZcBBVKdGYj2E4RJEviNyB6gpU9EhMWZbIcDzevPTA7sIgrO47hNgPCIvUB0DjAA+kUotIpdzSaWshdhvpeKzGFNdDPhlYm+jx+xvDWxH5BGq7UAV0IXIAsJwBCI3oqTikB5gqxjTkgSIH35Nd3etXLuW1XR6KSJXIuPrBObnKxO5GoGtGV5CZJucP29/L7Rr9by4DXei+gaRnWKMbVU+NJ1eg8hFwAHe4zh15HITETloKxVjrsez+11B5Ir96676nFxuUdwV45fU99ejejJK8BUVFTPlzJlviVYRidv+2pm3sVeM2V1u5vOQMKwD9klb28uks/kK1POs588C7ONkCcMVcuGC/fbX0Q/w/ceopgiCFUltGSppUP/JQxX/Y4r+Rijp7k9+fBMoV2iv9gAAAABJRU5ErkJggg==",er="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAmtJREFUSEvV1U1sTFEUwPH/ue000vbNVJNGSBORsJE0WJGIElGChISIrehMfVXSFAsLO4vaCCHovBLChpWFSIj6ipCIjY2QbixUJRKdeUOjY3qPvNcZrfbNTAdduMt3b87vnnPvu0eY5SGzHJ+yQIencYXTQJ/rcAQRrWRTJYG4p2sEHgA1QVDlghulsxKkKBAf0WbJ8QqY99uOK0RCgV2qNQ0ZngCrwsqhysW+KIdmkkkosGdYGyJVPAaWFav3TJFpQNzTdhG+5aC/WgNkadFDVS65UQ6WymQakPA0BdQj7BbDcx0LSrXkT5Ew4DawHciKssNGeC05ngKLSlzPXtfhQFgm04COj1qr9TwEVgKjYtlmYUBMgDQXQwSSSYf9U5HQQ25Pa6ORoP4tCCPAFmsZNBIg8ytByv0Hz4CFwFdgkxFSdvzgm0qUy3Ud9hUy+QUk0rpZYbXNcupKk2Q6UrpRDXVAbz5g2lg2jFWTFcsjoLEoIpx1Heny5ycATzPB7YFjPxzORzK8ASIKnQLXgBjwxRjWkyNiTfCE+N/CRsqNytypQOERey/KsAorggVKt4UXYuhHqQU+G2EdSszC/fymJiNplMNuTK4XAyYvHpjj0HJOZDSe0jYx3Mk/fENGWWsNC4C7edh/DG9JNV3JOhkqBJlcoiADhU8iDKKMWOXo5Zi8LCxOZHQnyk2gCvigllZgsRjOoHS7Mbk3tV5hQE9fVI4XO8CEp3v93uBXT+Bd1mH5VZHvJa7u+FTC0zHAoJx0Y3KiVFPxEYVWAz3JqLwttXYig4zeQGkzlq29DeL3gX8yyrbMv1X+f+AnK4LsGXwi4NYAAAAASUVORK5CYII=";export{zt as _,Kt as a,Ve as b,Wt as c,Ge as d,Xt as e,Ht as f,$t as g,qt as h,er as i,Jt as j,Qt as k,Zt as l,Yt as m,Vt as p,Gt as v};