!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i(i.s=114)}({0:function(e,t,i){"use strict";function n(e,t,i,n,r,o,s,a){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=u):r&&(u=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var d=l.render;l.render=function(e,t){return u.call(t),d(e,t)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,u):[u]}return{exports:e,options:l}}i.d(t,"a",(function(){return n}))},10:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},114:function(e,t,i){"use strict";i.r(t);var n=i(36),r=i(40);function o(){return(o=Object.assign||function(e){for(var t=1;tl&&(p=l);var S=o({width:f||(p&&u*p||u)+"%"},v),A=o({},b),L=o({},E);if((m=m||e.labelWidth)&&(A.width="string"==typeof m?m:m+"px"),"right"===(_=_||e.labelPosition)&&(A["text-align"]="right"),"image"===c){h=h&&h.map((function(e){var i=a(e&&e.path||e);return i?t("el-image",{attrs:{src:i,previewSrcList:[i]}}):null}))}if("files"===c&&h){var R=h.map((function(e){return{url:a(e&&(e.url||e.src||e.path)||e)}}));h=t(r.default,{attrs:{appendToBody:!0,data:R}})}return null!=h&&""!==h||(h="-"),t("div",{class:"info-group-item",key:n,style:S},[t("div",{class:"info-group-item-label",style:A},[s,d&&t("span",{class:"info-group-item-label-suffix"},[d])]),t("div",{class:"info-group-item-content",style:L},[h])])}))])])}},l=i(0),d=Object(l.a)(u,void 0,void 0,!1,null,null,null);d.options.__file="InfoGroup/index.vue";t.default=d.exports},26:function(e,t,i){(function(t){var i;self,i=function(){return function(){var e={"./node_modules/es6-promise/dist/es6-promise.js": /*!******************************************************!*\ !*** ./node_modules/es6-promise/dist/es6-promise.js ***! \******************************************************/function(e,i,n){ /*! * @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 */ e.exports=function(){"use strict";function e(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,s=void 0,a=function(e,t){p[r]=e,p[r+1]=t,2===(r+=2)&&(s?s(m):b())},u="undefined"!=typeof window?window:void 0,l=u||{},d=l.MutationObserver||l.WebKitMutationObserver,c="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var p=new Array(1e3);function m(){for(var e=0;e0&&s.length>r&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=d.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,d=p(u,l);for(i=0;i=0;o--)if(i[o]===t||i[o].listener===t){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},"./node_modules/webworkify-webpack/index.js": /*!**************************************************!*\ !*** ./node_modules/webworkify-webpack/index.js ***! \**************************************************/function(e,t,i){function n(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.i=function(e){return e},i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var n=i(i.s=ENTRY_MODULE);return n.default||n}function r(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,n){var o={};o[n]=[];var s=t.toString(),a=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!a)return o;for(var u,l=a[1],d=new RegExp("(\\\\n|\\W)"+r(l)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");u=d.exec(s);)"dll-reference"!==u[3]&&o[n].push(u[3]);for(d=new RegExp("\\("+r(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");u=d.exec(s);)e[u[2]]||(o[n].push(u[1]),e[u[2]]=i(u[1]).m),o[u[2]]=o[u[2]]||[],o[u[2]].push(u[4]);for(var c,h=Object.keys(o),f=0;f0}),!1)}e.exports=function(e,t){t=t||{};var r={main:i.m},a=t.all?{main:Object.keys(r.main)}:function(e,t){for(var i={main:[t]},n={main:[]},r={main:{}};s(i);)for(var a=Object.keys(i),u=0;u=e[r]&&t0&&e[0].originalDts=t[r].dts&&et[n].lastSample.originalDts&&e=t[n].lastSample.originalDts&&(n===t.length-1||n0&&(r=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,i)},e.prototype.getLastSegmentBefore=function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null},e.prototype.getLastSampleBefore=function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null},e.prototype.getLastSyncPointBefore=function(e){for(var t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;0===i.length&&t>0;)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null},e}()},"./src/core/mse-controller.js": /*!************************************!*\ !*** ./src/core/mse-controller.js ***! \************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./mse-events.js */"./src/core/mse-events.js"),u=i(/*! ./media-segment-info.js */"./src/core/media-segment-info.js"),l=i(/*! ../utils/exception.js */"./src/utils/exception.js"),d=function(){function e(e){this.TAG="MSEController",this._config=e,this._emitter=new(r()),this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(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 u.IDRSampleList}return e.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaSource)throw new l.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL},e.prototype.detachMediaElement=function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var n=this._sourceBuffers[t];if(n){if("closed"!==e.readyState){try{e.removeSourceBuffer(n)}catch(e){o.default.e(this.TAG,e.message)}n.removeEventListener("error",this.e.onSourceBufferError),n.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){o.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.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)},e.prototype.appendInitSegment=function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var i=e,n=""+i.container;i.codec&&i.codec.length>0&&(n+=";codecs="+i.codec);var r=!1;if(o.default.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])o.default.v(this.TAG,"Notice: "+i.type+" mimeType changed, origin: "+this._mimeTypes[i.type]+", target: "+n);else{r=!0;try{var u=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);u.addEventListener("error",this.e.onSourceBufferError),u.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return o.default.e(this.TAG,e.message),void this._emitter.emit(a.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[i.type]=n}t||this._pendingSegments[i.type].push(i),r||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),s.default.safari&&"audio/mpeg"===i.container&&i.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())},e.prototype.appendMediaSegment=function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var i=this._sourceBuffers[t.type];!i||i.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},e.prototype.seek=function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var i=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{i.abort()}catch(e){o.default.e(this.TAG,e.message)}this._idrList.clear();var n=this._pendingSegments[t];if(n.splice(0,n.length),"closed"!==this._mediaSource.readyState){for(var r=0;r=1&&e-n.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},e.prototype._doCleanupSourceBuffer=function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var i=this._sourceBuffers[t];if(i){for(var n=i.buffered,r=!1,o=0;o=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:u})}}else a0&&(isNaN(t)||i>t)&&(o.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+i),this._mediaSource.duration=i),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},e.prototype._doRemoveRanges=function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],i=this._pendingRemoveRanges[e];i.length&&!t.updating;){var n=i.shift();t.remove(n.start,n.end)}},e.prototype._doAppendSegments=function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var i=e[t].shift();if(i.timestampOffset){var n=this._sourceBuffers[t].timestampOffset,r=i.timestampOffset/1e3;Math.abs(n-r)>.1&&(o.default.v(this.TAG,"Update MPEG audio timestampOffset from "+n+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete i.timestampOffset}if(!i.data||0===i.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(i.data),this._isBufferFull=!1,"video"===t&&i.hasOwnProperty("info")&&this._idrList.appendArray(i.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(i),22===e.code?(this._isBufferFull||this._emitter.emit(a.default.BUFFER_FULL),this._isBufferFull=!0):(o.default.e(this.TAG,e.message),this._emitter.emit(a.default.ERROR,{code:e.code,msg:e.message}))}}},e.prototype._onSourceOpen=function(){if(o.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(a.default.SOURCE_OPEN)},e.prototype._onSourceEnded=function(){o.default.v(this.TAG,"MediaSource onSourceEnded")},e.prototype._onSourceClose=function(){o.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},e.prototype._hasPendingSegments=function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0},e.prototype._hasPendingRemoveRanges=function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0},e.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(a.default.UPDATE_END)},e.prototype._onSourceBufferError=function(e){o.default.e(this.TAG,"SourceBuffer Error: "+e)},e}();t.default=d},"./src/core/mse-events.js": /*!********************************!*\ !*** ./src/core/mse-events.js ***! \********************************/function(e,t,i){"use strict";i.r(t),t.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"}},"./src/core/transmuxer.js": /*!********************************!*\ !*** ./src/core/transmuxer.js ***! \********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),s=i.n(o),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),u=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),l=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),d=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),c=i(/*! ./media-info.js */"./src/core/media-info.js"),h=function(){function e(e,t){if(this.TAG="Transmuxer",this._emitter=new(r()),t.enableWorker&&"undefined"!=typeof Worker)try{this._worker=s()(/*! ./transmuxing-worker */"./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,t]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},u.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:u.default.getConfig()})}catch(i){a.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new l.default(e,t)}else this._controller=new l.default(e,t);if(this._controller){var i=this._controller;i.on(d.default.IO_ERROR,this._onIOError.bind(this)),i.on(d.default.DEMUX_ERROR,this._onDemuxError.bind(this)),i.on(d.default.INIT_SEGMENT,this._onInitSegment.bind(this)),i.on(d.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),i.on(d.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),i.on(d.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),i.on(d.default.MEDIA_INFO,this._onMediaInfo.bind(this)),i.on(d.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),i.on(d.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),i.on(d.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),i.on(d.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return e.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),u.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.hasWorker=function(){return null!=this._worker},e.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},e.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},e.prototype.seek=function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)},e.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},e.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},e.prototype._onInitSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.INIT_SEGMENT,e,t)}))},e.prototype._onMediaSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.MEDIA_SEGMENT,e,t)}))},e.prototype._onLoadingComplete=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(d.default.LOADING_COMPLETE)}))},e.prototype._onRecoveredEarlyEof=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(d.default.RECOVERED_EARLY_EOF)}))},e.prototype._onMediaInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.MEDIA_INFO,e)}))},e.prototype._onMetaDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.METADATA_ARRIVED,e)}))},e.prototype._onScriptDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.SCRIPTDATA_ARRIVED,e)}))},e.prototype._onStatisticsInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.STATISTICS_INFO,e)}))},e.prototype._onIOError=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.IO_ERROR,e,t)}))},e.prototype._onDemuxError=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.DEMUX_ERROR,e,t)}))},e.prototype._onRecommendSeekpoint=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.RECOMMEND_SEEKPOINT,e)}))},e.prototype._onLoggingConfigChanged=function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})},e.prototype._onWorkerMessage=function(e){var t=e.data,i=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case d.default.INIT_SEGMENT:case d.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case d.default.LOADING_COMPLETE:case d.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case d.default.MEDIA_INFO:Object.setPrototypeOf(i,c.default.prototype),this._emitter.emit(t.msg,i);break;case d.default.METADATA_ARRIVED:case d.default.SCRIPTDATA_ARRIVED:case d.default.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case d.default.IO_ERROR:case d.default.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case d.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":a.default.emitter.emit("log",i.type,i.logcat)}},e}();t.default=h},"./src/core/transmuxing-controller.js": /*!********************************************!*\ !*** ./src/core/transmuxing-controller.js ***! \********************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./media-info.js */"./src/core/media-info.js"),u=i(/*! ../demux/flv-demuxer.js */"./src/demux/flv-demuxer.js"),l=i(/*! ../remux/mp4-remuxer.js */"./src/remux/mp4-remuxer.js"),d=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),c=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),h=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),f=function(){function e(e,t){this.TAG="TransmuxingController",this._emitter=new(r()),this._config=t,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!=typeof e.cors&&(e.cors=!0),"boolean"!=typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(n){n.timestampBase=i,i+=n.duration,n.cors=e.cors,n.withCredentials=e.withCredentials,t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return e.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},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},e.prototype._loadSegment=function(e,t){this._currentSegmentIndex=e;var i=this._mediaDataSource.segments[e],n=this._ioctl=new c.default(i,this._config,e);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)},e.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},e.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},e.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},e.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},e.prototype.seek=function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var i=this._mediaInfo.segments[t];if(null==i)this._pendingSeekTime=e;else{var n=i.getNearestKeyframe(e);this._remuxer.seek(n.milliseconds),this._ioctl.seek(n.fileposition),this._pendingResolveSeekPoint=n.milliseconds}}else{var r=this._mediaInfo.segments[t];null==r?(this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t)):(n=r.getNearestKeyframe(e),this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,n.fileposition),this._pendingResolveSeekPoint=n.milliseconds,this._reportSegmentMediaInfo(t))}this._enableStatisticsReporter()}},e.prototype._searchSegmentIndexContains=function(e){for(var t=this._mediaDataSource.segments,i=t.length-1,n=0;n0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((n=u.default.probe(e)).match){this._demuxer=new u.default(n,this._config),this._remuxer||(this._remuxer=new l.default(this._config));var s=this._mediaDataSource;null==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(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),r=this._demuxer.parseChunks(e,t)}else n=null,o.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){i._internalAbort()})),this._emitter.emit(h.default.DEMUX_ERROR,d.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r},e.prototype._onMediaInfo=function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,a.default.prototype));var i=Object.assign({},e);Object.setPrototypeOf(i,a.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=i,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))},e.prototype._onMetaDataArrived=function(e){this._emitter.emit(h.default.METADATA_ARRIVED,e)},e.prototype._onScriptDataArrived=function(e){this._emitter.emit(h.default.SCRIPTDATA_ARRIVED,e)},e.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},e.prototype._onIOComplete=function(e){var t=e+1;t0&&i[0].originalDts===n&&(n=i[0].pts),this._emitter.emit(h.default.RECOMMEND_SEEKPOINT,n)}},e.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},e.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype._reportSegmentMediaInfo=function(e){var t=this._mediaInfo.segments[e],i=Object.assign({},t);i.duration=this._mediaInfo.duration,i.segmentCount=this._mediaInfo.segmentCount,delete i.segments,delete i.keyframesIndex,this._emitter.emit(h.default.MEDIA_INFO,i)},e.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(h.default.STATISTICS_INFO,e)},e}();t.default=f},"./src/core/transmuxing-events.js": /*!****************************************!*\ !*** ./src/core/transmuxing-events.js ***! \****************************************/function(e,t,i){"use strict";i.r(t),t.default={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"}},"./src/core/transmuxing-worker.js": /*!****************************************!*\ !*** ./src/core/transmuxing-worker.js ***! \****************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),r=i(/*! ../utils/polyfill.js */"./src/utils/polyfill.js"),o=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),s=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js");t.default=function(e){var t=null,i=function(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}.bind(this);function a(t,i){var n={msg:s.default.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function u(t,i){var n={msg:s.default.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function l(){var t={msg:s.default.LOADING_COMPLETE};e.postMessage(t)}function d(){var t={msg:s.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function c(t){var i={msg:s.default.MEDIA_INFO,data:t};e.postMessage(i)}function h(t){var i={msg:s.default.METADATA_ARRIVED,data:t};e.postMessage(i)}function f(t){var i={msg:s.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function p(t){var i={msg:s.default.STATISTICS_INFO,data:t};e.postMessage(i)}function m(t,i){e.postMessage({msg:s.default.IO_ERROR,data:{type:t,info:i}})}function _(t,i){e.postMessage({msg:s.default.DEMUX_ERROR,data:{type:t,info:i}})}function g(t){e.postMessage({msg:s.default.RECOMMEND_SEEKPOINT,data:t})}r.default.install(),e.addEventListener("message",(function(r){switch(r.data.cmd){case"init":(t=new o.default(r.data.param[0],r.data.param[1])).on(s.default.IO_ERROR,m.bind(this)),t.on(s.default.DEMUX_ERROR,_.bind(this)),t.on(s.default.INIT_SEGMENT,a.bind(this)),t.on(s.default.MEDIA_SEGMENT,u.bind(this)),t.on(s.default.LOADING_COMPLETE,l.bind(this)),t.on(s.default.RECOVERED_EARLY_EOF,d.bind(this)),t.on(s.default.MEDIA_INFO,c.bind(this)),t.on(s.default.METADATA_ARRIVED,h.bind(this)),t.on(s.default.SCRIPTDATA_ARRIVED,f.bind(this)),t.on(s.default.STATISTICS_INFO,p.bind(this)),t.on(s.default.RECOMMEND_SEEKPOINT,g.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(r.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var v=r.data.param;n.default.applyConfig(v),!0===v.enableCallback?n.default.addLogListener(i):n.default.removeLogListener(i)}}))}},"./src/demux/amf-parser.js": /*!*********************************!*\ !*** ./src/demux/amf-parser.js ***! \*********************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ../utils/utf8-conv.js */"./src/utils/utf8-conv.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=(n=new ArrayBuffer(2),new DataView(n).setInt16(0,256,!0),256===new Int16Array(n)[0]),u=function(){function e(){}return e.parseScriptData=function(t,i,n){var o={};try{var s=e.parseValue(t,i,n),a=e.parseValue(t,i+s.size,n-s.size);o[s.data]=a.data}catch(e){r.default.e("AMF",e.toString())}return o},e.parseObject=function(t,i,n){if(n<3)throw new s.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,i,n),o=e.parseValue(t,i+r.size,n-r.size),a=o.objectEnd;return{data:{name:r.data,value:o.data},size:r.size+o.size,objectEnd:a}},e.parseVariable=function(t,i,n){return e.parseObject(t,i,n)},e.parseString=function(e,t,i){if(i<2)throw new s.IllegalStateException("Data not enough when parse String");var n=new DataView(e,t,i).getUint16(0,!a);return{data:n>0?(0,o.default)(new Uint8Array(e,t+2,n)):"",size:2+n}},e.parseLongString=function(e,t,i){if(i<4)throw new s.IllegalStateException("Data not enough when parse LongString");var n=new DataView(e,t,i).getUint32(0,!a);return{data:n>0?(0,o.default)(new Uint8Array(e,t+4,n)):"",size:4+n}},e.parseDate=function(e,t,i){if(i<10)throw new s.IllegalStateException("Data size invalid when parse Date");var n=new DataView(e,t,i),r=n.getFloat64(0,!a),o=n.getInt16(8,!a);return{data:new Date(r+=60*o*1e3),size:10}},e.parseValue=function(t,i,n){if(n<1)throw new s.IllegalStateException("Data not enough when parse Value");var o,u=new DataView(t,i,n),l=1,d=u.getUint8(0),c=!1;try{switch(d){case 0:o=u.getFloat64(1,!a),l+=8;break;case 1:o=!!u.getUint8(1),l+=1;break;case 2:var h=e.parseString(t,i+1,n-1);o=h.data,l+=h.size;break;case 3:o={};var f=0;for(9==(16777215&u.getUint32(n-4,!a))&&(f=3);l32)throw new n.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var i=this._current_word_bits_left?this._current_word:0;i>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var o=Math.min(r,this._current_word_bits_left),s=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,i=i<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},e.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},e.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},e}();t.default=r},"./src/demux/flv-demuxer.js": /*!**********************************!*\ !*** ./src/demux/flv-demuxer.js ***! \**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./amf-parser.js */"./src/demux/amf-parser.js"),o=i(/*! ./sps-parser.js */"./src/demux/sps-parser.js"),s=i(/*! ./demux-errors.js */"./src/demux/demux-errors.js"),a=i(/*! ../core/media-info.js */"./src/core/media-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),l=function(){function e(e,t){var i;this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new a.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=(i=new ArrayBuffer(2),new DataView(i).setInt16(0,256,!0),256===new Int16Array(i)[0])}return e.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},e.probe=function(e){var t=new Uint8Array(e),i={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return i;var n,r,o=(4&t[4])>>>2!=0,s=0!=(1&t[4]),a=(n=t)[r=5]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3];return a<9?i:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:o,hasVideoTrack:s}},e.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(e.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedDuration",{get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),e.prototype.resetMediaInfo=function(){this._mediaInfo=new a.default},e.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},e.prototype.parseChunks=function(t,i){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new u.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,o=this._littleEndian;if(0===i){if(!(t.byteLength>13))return 0;r=e.probe(t).dataOffset}for(this._firstParse&&(this._firstParse=!1,i+r!==this._dataOffset&&n.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==(s=new DataView(t,r)).getUint32(0,!o)&&n.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);rt.byteLength)break;var a=s.getUint8(0),l=16777215&s.getUint32(0,!o);if(r+11+l+4>t.byteLength)break;if(8===a||9===a||18===a){var d=s.getUint8(4),c=s.getUint8(5),h=s.getUint8(6)|c<<8|d<<16|s.getUint8(7)<<24;0!=(16777215&s.getUint32(7,!o))&&n.default.w(this.TAG,"Meet tag which has StreamID != 0!");var f=r+11;switch(a){case 8:this._parseAudioData(t,f,l,h);break;case 9:this._parseVideoData(t,f,l,h,i+r);break;case 18:this._parseScriptData(t,f,l)}var p=s.getUint32(11+l,!o);p!==11+l&&n.default.w(this.TAG,"Invalid PrevTagSize "+p),r+=11+l+4}else n.default.w(this.TAG,"Unsupported tag type "+a+", skipped"),r+=11+l+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r},e.prototype._parseScriptData=function(e,t,i){var o=r.default.parseScriptData(e,t,i);if(o.hasOwnProperty("onMetaData")){if(null==o.onMetaData||"object"!=typeof o.onMetaData)return void n.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&n.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=o;var s=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},s)),"boolean"==typeof s.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=s.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof s.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=s.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof s.audiodatarate&&(this._mediaInfo.audioDataRate=s.audiodatarate),"number"==typeof s.videodatarate&&(this._mediaInfo.videoDataRate=s.videodatarate),"number"==typeof s.width&&(this._mediaInfo.width=s.width),"number"==typeof s.height&&(this._mediaInfo.height=s.height),"number"==typeof s.duration){if(!this._durationOverrided){var a=Math.floor(s.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof s.framerate){var u=Math.floor(1e3*s.framerate);if(u>0){var l=u/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=l,this._referenceFrameRate.fps_num=u,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=l}}if("object"==typeof s.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var d=s.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(d),s.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=s,n.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(o).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},o))},e.prototype._parseKeyframesIndex=function(e){for(var t=[],i=[],n=1;n>>4;if(2===a||10===a){var u=0,l=(12&o)>>>2;if(l>=0&&l<=4){u=this._flvSoundRateTable[l];var d=1&o,c=this._audioMetadata,h=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(c=this._audioMetadata={}).type="audio",c.id=h.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=u,c.channelCount=0===d?1:2),10===a){var f=this._parseAACAudioData(e,t+1,i-1);if(null==f)return;if(0===f.packetType){c.config&&n.default.w(this.TAG,"Found another AudioSpecificConfig!");var p=f.data;c.audioSampleRate=p.samplingRate,c.channelCount=p.channelCount,c.codec=p.codec,c.originalCodec=p.originalCodec,c.config=p.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,n.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",c),(g=this._mediaInfo).audioCodec=c.originalCodec,g.audioSampleRate=c.audioSampleRate,g.audioChannelCount=c.channelCount,g.hasVideo?null!=g.videoCodec&&(g.mimeType='video/x-flv; codecs="'+g.videoCodec+","+g.audioCodec+'"'):g.mimeType='video/x-flv; codecs="'+g.audioCodec+'"',g.isComplete()&&this._onMediaInfo(g)}else if(1===f.packetType){var m=this._timestampBase+r,_={unit:f.data,length:f.data.byteLength,dts:m,pts:m};h.samples.push(_),h.length+=f.data.length}else n.default.e(this.TAG,"Flv: Unsupported AAC data type "+f.packetType)}else if(2===a){if(!c.codec){var g;if(null==(p=this._parseMP3AudioData(e,t+1,i-1,!0)))return;c.audioSampleRate=p.samplingRate,c.channelCount=p.channelCount,c.codec=p.codec,c.originalCodec=p.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,n.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c),(g=this._mediaInfo).audioCodec=c.codec,g.audioSampleRate=c.audioSampleRate,g.audioChannelCount=c.channelCount,g.audioDataRate=p.bitRate,g.hasVideo?null!=g.videoCodec&&(g.mimeType='video/x-flv; codecs="'+g.videoCodec+","+g.audioCodec+'"'):g.mimeType='video/x-flv; codecs="'+g.audioCodec+'"',g.isComplete()&&this._onMediaInfo(g)}var v=this._parseMP3AudioData(e,t+1,i-1,!1);if(null==v)return;m=this._timestampBase+r;var y={unit:v,length:v.byteLength,dts:m,pts:m};h.samples.push(y),h.length+=v.length}}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+l)}else this._onError(s.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}},e.prototype._parseAACAudioData=function(e,t,i){if(!(i<=1)){var r={},o=new Uint8Array(e,t,i);return r.packetType=o[0],0===o[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):r.data=o.subarray(1),r}n.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},e.prototype._parseAACAudioSpecificConfig=function(e,t,i){var n,r,o=new Uint8Array(e,t,i),a=null,u=0,l=null;if(u=n=o[0]>>>3,(r=(7&o[0])<<1|o[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(s.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var d=this._mpegSamplingRates[r],c=(120&o[1])>>>3;if(!(c<0||c>=8)){5===u&&(l=(7&o[1])<<1|o[2]>>>7,o[2]);var h=self.navigator.userAgent.toLowerCase();return-1!==h.indexOf("firefox")?r>=6?(u=5,a=new Array(4),l=r-3):(u=2,a=new Array(2),l=r):-1!==h.indexOf("android")?(u=2,a=new Array(2),l=r):(u=5,l=r,a=new Array(4),r>=6?l=r-3:1===c&&(u=2,a=new Array(2),l=r)),a[0]=u<<3,a[0]|=(15&r)>>>1,a[1]=(15&r)<<7,a[1]|=(15&c)<<3,5===u&&(a[1]|=(15&l)>>>1,a[2]=(1&l)<<7,a[2]|=8,a[3]=0),{config:a,samplingRate:d,channelCount:c,codec:"mp4a.40."+u,originalCodec:"mp4a.40."+n}}this._onError(s.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},e.prototype._parseMP3AudioData=function(e,t,i,r){if(!(i<4)){this._littleEndian;var o=new Uint8Array(e,t,i),s=null;if(r){if(255!==o[0])return;var a=o[1]>>>3&3,u=(6&o[1])>>1,l=(240&o[2])>>>4,d=(12&o[2])>>>2,c=3!=(o[3]>>>6&3)?2:1,h=0,f=0;switch(a){case 0:h=this._mpegAudioV25SampleRateTable[d];break;case 2:h=this._mpegAudioV20SampleRateTable[d];break;case 3:h=this._mpegAudioV10SampleRateTable[d]}switch(u){case 1:l>>4,l=15&a;7===l?this._parseAVCVideoPacket(e,t+1,i-1,r,o,u):this._onError(s.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+l)}},e.prototype._parseAVCVideoPacket=function(e,t,i,r,o,a){if(i<4)n.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var u=this._littleEndian,l=new DataView(e,t,i),d=l.getUint8(0),c=(16777215&l.getUint32(0,!u))<<8>>8;if(0===d)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===d)this._parseAVCVideoData(e,t+4,i-4,r,o,a,c);else if(2!==d)return void this._onError(s.default.FORMAT_ERROR,"Flv: Invalid video packet type "+d)}},e.prototype._parseAVCDecoderConfigurationRecord=function(e,t,i){if(i<7)n.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,a=this._videoTrack,u=this._littleEndian,l=new DataView(e,t,i);r?void 0!==r.avcc&&n.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=a.id,r.timescale=this._timescale,r.duration=this._duration);var d=l.getUint8(0),c=l.getUint8(1);if(l.getUint8(2),l.getUint8(3),1===d&&0!==c)if(this._naluLengthSize=1+(3&l.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var h=31&l.getUint8(5);if(0!==h){h>1&&n.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+h);for(var f=6,p=0;p1&&n.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+L),f++,p=0;p=i){n.default.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+h+", dataSize = "+i);break}var _=l.getUint32(h,!u);if(3===f&&(_>>>=8),_>i-f)return void n.default.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var g=31&l.getUint8(h+f);5===g&&(m=!0);var v=new Uint8Array(e,t+h,f+_),y={type:g,data:v};d.push(y),c+=v.byteLength,h+=f+_}if(d.length){var b=this._videoTrack,w={units:d,length:c,isKeyframe:m,dts:p,cts:a,pts:p+a};m&&(w.fileposition=o),b.samples.push(w),b.length+=c}},e}();t.default=l},"./src/demux/sps-parser.js": /*!*********************************!*\ !*** ./src/demux/sps-parser.js ***! \*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ./exp-golomb.js */"./src/demux/exp-golomb.js"),r=function(){function e(){}return e._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,o=0;o=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(n[r]=t[o],r++);return new Uint8Array(n.buffer,0,r)},e.parseSPS=function(t){var i=e._ebsp2rbsp(t),r=new n.default(i);r.readByte();var o=r.readByte();r.readByte();var s=r.readByte();r.readUEG();var a=e.getProfileString(o),u=e.getLevelString(s),l=1,d=420,c=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(d=[0,420,422,444][l]),c=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var h=3!==l?8:12,f=0;f0&&C<16?(A=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][C-1],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][C-1]):255===C&&(A=r.readByte()<<8|r.readByte(),L=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var k=r.readBits(32),I=r.readBits(32);x=r.readBool(),R=(T=I)/(O=2*k)}}var D=1;1===A&&1===L||(D=A/L);var M=0,P=0;0===l?(M=1,P=2-y):(M=3===l?1:2,P=(1===l?2:1)*(2-y));var B=16*(g+1),j=16*(v+1)*(2-y);B-=(b+w)*M,j-=(E+S)*P;var N=Math.ceil(B*D);return r.destroy(),r=null,{profile_string:a,level_string:u,bit_depth:c,ref_frames:_,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:x,fps:R,fps_den:O,fps_num:T},sar_ratio:{width:A,height:L},codec_size:{width:B,height:j},present_size:{width:N,height:j}}},e._skipScalingList=function(e,t){for(var i=8,n=8,r=0;r=15048,t=!r.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){var i=this;this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t),a=new self.Headers;if("object"==typeof r.headers){var u=r.headers;for(var l in u)u.hasOwnProperty(l)&&a.append(l,u[l])}var d={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var l in this._config.headers)a.append(l,this._config.headers[l]);!1===e.cors&&(d.mode="same-origin"),e.withCredentials&&(d.credentials="include"),e.referrerPolicy&&(d.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,d.signal=this._abortController.signal),this._status=o.LoaderStatus.kConnecting,self.fetch(r.url,d).then((function(e){if(i._requestAbort)return i._status=o.LoaderStatus.kIdle,void e.body.cancel();if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==r.url&&i._onURLRedirect){var t=i._seekHandler.removeURLParameters(e.url);i._onURLRedirect(t)}var n=e.headers.get("Content-Length");return null!=n&&(i._contentLength=parseInt(n),0!==i._contentLength&&i._onContentLengthKnown&&i._onContentLengthKnown(i._contentLength)),i._pump.call(i,e.body.getReader())}if(i._status=o.LoaderStatus.kError,!i._onError)throw new s.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);i._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(!i._abortController||!i._abortController.signal.aborted){if(i._status=o.LoaderStatus.kError,!i._onError)throw e;i._onError(o.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}}))},t.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==o.LoaderStatus.kBuffering||!r.default.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},t.prototype._pump=function(e){var t=this;return e.read().then((function(i){if(i.done)if(null!==t._contentLength&&t._receivedLength0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===t.enableStashBuffer&&(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 r.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 e.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},e.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},e.prototype.isPaused=function(){return this._paused},Object.defineProperty(e.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentSpeed",{get:function(){return this._loaderClass===u.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),e.prototype._selectSeekHandler=function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new d.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new c.default(t,i)}else{if("custom"!==e.seekType)throw new h.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new h.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}},e.prototype._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=l.default;else if(s.default.isSupported())this._loaderClass=s.default;else if(a.default.isSupported())this._loaderClass=a.default;else{if(!u.default.isSupported())throw new h.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=u.default}},e.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(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)},e.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))},e.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},e.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(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)},e.prototype.resume=function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}},e.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},e.prototype._internalSeek=function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var i={from:e,to:-1};this._currentRange={from:i.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,i),this._onSeeked&&this._onSeeked()},e.prototype.updateUrl=function(e){if(!e||"string"!=typeof e||0===e.length)throw new h.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e},e.prototype._expandBuffer=function(e){for(var t=this._stashSize;t+10485760){var n=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(i,0,t).set(n,0)}this._stashBuffer=i,this._bufferSize=t}},e.prototype._normalizeSpeed=function(e){var t=this._speedNormalizeList,i=t.length-1,n=0,r=0,o=i;if(e=t[n]&&e=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var i=1024*t+1048576;this._bufferSize0){var o=this._stashBuffer.slice(0,this._stashUsed);(u=this._dispatchChunks(o,this._stashByteStart))0&&(l=new Uint8Array(o,u),a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=u):(this._stashUsed=0,this._stashByteStart+=u),this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else(u=this._dispatchChunks(e,t))this._bufferSize&&(this._expandBuffer(s),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,u),0),this._stashUsed+=s,this._stashByteStart=t+u);else if(0===this._stashUsed){var s;(u=this._dispatchChunks(e,t))this._bufferSize&&this._expandBuffer(s),(a=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e,u),0),this._stashUsed+=s,this._stashByteStart=t+u)}else{var a,u;if(this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),(a=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,(u=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))0){var l=new Uint8Array(this._stashBuffer,u);a.set(l,0)}this._stashUsed-=u,this._stashByteStart+=u}}},e.prototype._flushStashBuffer=function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-i;if(i0){var o=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,i);o.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=i}return 0}n.default.w(this.TAG,r+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,r}return 0},e.prototype._onLoaderComplete=function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},e.prototype._onLoaderError=function(e,t){switch(n.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=o.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case o.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var i=this._currentRange.to+1;return void(i0)for(var o=i.split("&"),s=0;s0;a[0]!==this._startName&&a[0]!==this._endName&&(u&&(r+="&"),r+=o[s])}return 0===r.length?t:t+"?"+r},e}();t.default=n},"./src/io/range-seek-handler.js": /*!**************************************!*\ !*** ./src/io/range-seek-handler.js ***! \**************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(e){this._zeroStart=e||!1}return e.prototype.getConfig=function(e,t){var i={};if(0!==t.from||-1!==t.to){var n=void 0;n=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",i.Range=n}else this._zeroStart&&(i.Range="bytes=0-");return{url:e,headers:i}},e.prototype.removeURLParameters=function(e){return e},e}();t.default=n},"./src/io/speed-sampler.js": /*!*********************************!*\ !*** ./src/io/speed-sampler.js ***! \*********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){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 e.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},e.prototype.addBytes=function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())},Object.defineProperty(e.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),e}();t.default=n},"./src/io/websocket-loader.js": /*!************************************!*\ !*** ./src/io/websocket-loader.js ***! \************************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ./loader.js */"./src/io/loader.js"),o=i(/*! ../utils/exception.js */"./src/utils/exception.js"),s=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=function(e){function t(){var t=e.call(this,"websocket-loader")||this;return t.TAG="WebSocketLoader",t._needStash=!0,t._ws=null,t._requestAbort=!1,t._receivedLength=0,t}return s(t,e),t.isSupported=function(){try{return void 0!==self.WebSocket}catch(e){return!1}},t.prototype.destroy=function(){this._ws&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=r.LoaderStatus.kConnecting}catch(e){this._status=r.LoaderStatus.kError;var i={code:e.code,msg:e.message};if(!this._onError)throw new o.RuntimeException(i.msg);this._onError(r.LoaderErrors.EXCEPTION,i)}},t.prototype.abort=function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=r.LoaderStatus.kComplete},t.prototype._onWebSocketOpen=function(e){this._status=r.LoaderStatus.kBuffering},t.prototype._onWebSocketClose=function(e){!0!==this._requestAbort?(this._status=r.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},t.prototype._onWebSocketMessage=function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var i=new FileReader;i.onload=function(){t._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(e.data)}else{this._status=r.LoaderStatus.kError;var n={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new o.RuntimeException(n.msg);this._onError(r.LoaderErrors.EXCEPTION,n)}},t.prototype._dispatchArrayBuffer=function(e){var t=e,i=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)},t.prototype._onWebSocketError=function(e){this._status=r.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new o.RuntimeException(t.msg);this._onError(r.LoaderErrors.EXCEPTION,t)},t}(r.BaseLoader);t.default=a},"./src/io/xhr-moz-chunked-loader.js": /*!******************************************!*\ !*** ./src/io/xhr-moz-chunked-loader.js ***! \******************************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),u=function(e){function t(t,i){var n=e.call(this,"xhr-moz-chunked-loader")||this;return n.TAG="MozChunkedLoader",n._seekHandler=t,n._config=i,n._needStash=!0,n._xhr=null,n._requestAbort=!1,n._contentLength=null,n._receivedLength=0,n}return a(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return r.default.w("MozChunkedLoader",e.message),!1}},t.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),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(i=e.redirectedURL);var n=this._seekHandler.getConfig(i,t);this._requestURL=n.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){var s=n.headers;for(var a in s)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a])}if("object"==typeof this._config.headers)for(var a in s=this._config.headers)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a]);this._status=o.LoaderStatus.kConnecting,r.send()},t.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=o.LoaderStatus.kComplete},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var i=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(i)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=o.LoaderStatus.kError,!this._onError)throw new s.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=o.LoaderStatus.kBuffering}},t.prototype._onProgress=function(e){if(this._status!==o.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}},t.prototype._onLoadEnd=function(e){!0!==this._requestAbort?this._status!==o.LoaderStatus.kError&&(this._status=o.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},t.prototype._onXhrError=function(e){this._status=o.LoaderStatus.kError;var t=0,i=null;if(this._contentLength&&e.loaded=this._contentLength&&(i=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:i},this._internalOpen(this._dataSource,this._currentRequestRange)},t.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var i=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));var n=this._seekHandler.getConfig(i,t);this._currentRequestURL=n.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){var o=n.headers;for(var s in o)o.hasOwnProperty(s)&&r.setRequestHeader(s,o[s])}if("object"==typeof this._config.headers)for(var s in o=this._config.headers)o.hasOwnProperty(s)&&r.setRequestHeader(s,o[s]);r.send()},t.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=s.LoaderStatus.kComplete},t.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)},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var i=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&i!==this._currentRedirectedURL&&(this._currentRedirectedURL=i,this._onURLRedirect&&this._onURLRedirect(i))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=s.LoaderStatus.kBuffering}else{if(this._status=s.LoaderStatus.kError,!this._onError)throw new a.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}},t.prototype._onProgress=function(e){if(this._status!==s.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var i=e.total;this._internalAbort(),null!=i&0!==i&&(this._totalLength=i)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var n=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(n)}},t.prototype._normalizeSpeed=function(e){var t=this._chunkSizeKBList,i=t.length-1,n=0,r=0,o=i;if(e=t[n]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var i=this._normalizeSpeed(t);this._currentSpeedNormalized!==i&&(this._currentSpeedNormalized=i,this._currentChunkSizeKB=i)}var n=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=n.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new u.default(this._mediaDataSource,this._config),this._transmuxer.on(l.default.INIT_SEGMENT,(function(t,i){e._msectl.appendInitSegment(i)})),this._transmuxer.on(l.default.MEDIA_SEGMENT,(function(t,i){if(e._msectl.appendMediaSegment(i),e._config.lazyLoad&&!e._config.isLive){var n=e._mediaElement.currentTime;i.info.endDts>=1e3*(n+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(o.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(l.default.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(a.default.LOADING_COMPLETE)})),this._transmuxer.on(l.default.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(a.default.RECOVERED_EARLY_EOF)})),this._transmuxer.on(l.default.IO_ERROR,(function(t,i){e._emitter.emit(a.default.ERROR,h.ErrorTypes.NETWORK_ERROR,t,i)})),this._transmuxer.on(l.default.DEMUX_ERROR,(function(t,i){e._emitter.emit(a.default.ERROR,h.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:i})})),this._transmuxer.on(l.default.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(a.default.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(l.default.METADATA_ARRIVED,(function(t){e._emitter.emit(a.default.METADATA_ARRIVED,t)})),this._transmuxer.on(l.default.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(a.default.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(l.default.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(a.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(l.default.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))},e.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)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),e.prototype._fillStatisticsInfo=function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();i=r.totalVideoFrames,n=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e},e.prototype._onmseUpdateEnd=function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,i=0,n=0;n=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(o.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},e.prototype._onmseBufferFull=function(){o.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},e.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},e.prototype._checkProgressAndResume=function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,i=!1,n=0;n=r&&e=s-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(o.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},e.prototype._isTimepointBuffered=function(e){for(var t=this._mediaElement.buffered,i=0;i=n&&e0){var r=this._mediaElement.buffered.start(0);(r<1&&e0&&t.currentTime0){var n=i.start(0);if(n<1&&t0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},e.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();i=r.totalVideoFrames,n=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e},enumerable:!1,configurable:!0}),e.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(o.default.MEDIA_INFO,this.mediaInfo)},e.prototype._reportStatisticsInfo=function(){this._emitter.emit(o.default.STATISTICS_INFO,this.statisticsInfo)},e}();t.default=u},"./src/player/player-errors.js": /*!*************************************!*\ !*** ./src/player/player-errors.js ***! \*************************************/function(e,t,i){"use strict";i.r(t),i.d(t,{ErrorTypes:function(){return o},ErrorDetails:function(){return s}});var n=i(/*! ../io/loader.js */"./src/io/loader.js"),r=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),o={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},s={NETWORK_EXCEPTION:n.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:r.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:r.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:r.default.CODEC_UNSUPPORTED}},"./src/player/player-events.js": /*!*************************************!*\ !*** ./src/player/player-events.js ***! \*************************************/function(e,t,i){"use strict";i.r(t),t.default={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"}},"./src/remux/aac-silent.js": /*!*********************************!*\ !*** ./src/remux/aac-silent.js ***! \*********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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(1===t)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(2===t)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(3===t)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},e}();t.default=n},"./src/remux/mp4-generator.js": /*!************************************!*\ !*** ./src/remux/mp4-generator.js ***! \************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.init=function(){for(var t in e.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":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var i=e.constants={};i.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),i.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),i.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),i.STSC=i.STCO=i.STTS,i.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),i.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]),i.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]),i.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),i.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},e.box=function(e){for(var t=8,i=null,n=Array.prototype.slice.call(arguments,1),r=n.length,o=0;o>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);var s=8;for(o=0;o>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,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]))},e.trak=function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.tkhd=function(t){var i=t.id,n=t.duration,r=t.presentWidth,o=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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,r>>>8&255,255&r,0,0,o>>>8&255,255&o,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))},e.mdhd=function(t){var i=t.timescale,n=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))},e.hdlr=function(t){var i=null;return i="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,i)},e.minf=function(t){var i=null;return i="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,i,e.dinf(),e.stbl(t))},e.dinf=function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))},e.mp3=function(t){var i=t.channelCount,n=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types[".mp3"],r)},e.mp4a=function(t){var i=t.channelCount,n=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types.mp4a,r,e.esds(t))},e.esds=function(t){var i=t.config||[],n=i.length,r=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(i).concat([6,1,2]));return e.box(e.types.esds,r)},e.avc1=function(t){var i=t.avcc,n=t.codecWidth,r=t.codecHeight,o=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,n>>>8&255,255&n,r>>>8&255,255&r,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 e.box(e.types.avc1,o,e.box(e.types.avcC,i))},e.mvex=function(t){return e.box(e.types.mvex,e.trex(t))},e.trex=function(t){var i=t.id,n=new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,n)},e.moof=function(t,i){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,i))},e.mfhd=function(t){var i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,i)},e.traf=function(t,i){var n=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=e.sdtp(t),a=e.trun(t,s.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,o,a,s)},e.sdtp=function(t){for(var i=t.samples||[],n=i.length,r=new Uint8Array(4+n),o=0;o>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0);for(var a=0;a>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*a)}return e.box(e.types.trun,s)},e.mdat=function(t){return e.box(e.types.mdat,t)},e}();n.init(),t.default=n},"./src/remux/mp4-remuxer.js": /*!**********************************!*\ !*** ./src/remux/mp4-remuxer.js ***! \**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./mp4-generator.js */"./src/remux/mp4-generator.js"),o=i(/*! ./aac-silent.js */"./src/remux/aac-silent.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ../core/media-segment-info.js */"./src/core/media-segment-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),l=function(){function e(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,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 a.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new a.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.default.chrome||!(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661)),this._fillSilentAfterSeek=s.default.msedge||s.default.msie,this._mp3UseMpegAudio=!s.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return e.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},e.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(e.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),e.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},e.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},e.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new u.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)},e.prototype._onTrackMetadataReceived=function(e,t){var i=null,n="mp4",o=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",o="",i=new Uint8Array):i=r.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=r.default.generateInitSegment(t)}if(!this._onInitSegment)throw new u.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:o,container:e+"/"+n,mediaDuration:t.duration})},e.prototype._calculateDtsBase=function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.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)},e.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=e.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(n,!0)},e.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var i,u=e,l=u.samples,d=void 0,c=-1,h=this._audioMeta.refSampleDuration,f="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,p=this._dtsBaseInited&&void 0===this._audioNextDts,m=!1;if(l&&0!==l.length&&(1!==l.length||t)){var _=0,g=null,v=0;f?(_=0,v=u.length):(_=8,v=8+u.length);var y=null;if(l.length>1&&(v-=(y=l.pop()).length),null!=this._audioStashedLastSample){var b=this._audioStashedLastSample;this._audioStashedLastSample=null,l.unshift(b),v+=b.length}null!=y&&(this._audioStashedLastSample=y);var w=l[0].dts-this._dtsBase;if(this._audioNextDts)d=w-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())d=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var E=this._audioSegmentInfoList.getLastSampleBefore(w);if(null!=E){var S=w-(E.originalDts+E.duration);S<=3&&(S=0),d=w-(E.dts+E.duration+S)}else d=0}if(m){var A=w-d,L=this._videoSegmentInfoList.getLastSegmentBefore(w);if(null!=L&&L.beginDts=3*h&&this._fillAudioTimestampGap&&!s.default.safari){I=!0;var B,j=Math.floor(d/h);n.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+k+" ms, curRefDts: "+P+" ms, dtsCorrection: "+Math.round(d)+" ms, generate: "+j+" frames"),R=Math.floor(P),M=Math.floor(P+h)-R,null==(B=o.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(n.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),B=C),D=[];for(var N=0;N=1?T[T.length-1].duration:Math.floor(h),this._audioNextDts=R+M;-1===c&&(c=R),T.push({dts:R,pts:R,cts:0,unit:b.unit,size:b.unit.byteLength,duration:M,originalDts:k,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),I&&T.push.apply(T,D)}}if(0===T.length)return u.samples=[],void(u.length=0);for(f?g=new Uint8Array(v):((g=new Uint8Array(v))[0]=v>>>24&255,g[1]=v>>>16&255,g[2]=v>>>8&255,g[3]=255&v,g.set(r.default.types.mdat,4)),O=0;O1&&(f-=(p=s.pop()).length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,s.unshift(m),f+=m.length}null!=p&&(this._videoStashedLastSample=p);var _=s[0].dts-this._dtsBase;if(this._videoNextDts)u=_-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())u=0;else{var g=this._videoSegmentInfoList.getLastSampleBefore(_);if(null!=g){var v=_-(g.originalDts+g.duration);v<=3&&(v=0),u=_-(g.dts+g.duration+v)}else u=0}for(var y=new a.MediaSegmentInfo,b=[],w=0;w=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),S){var T=new a.SampleInfo(A,R,x,m.dts,!0);T.fileposition=m.fileposition,y.appendSyncPoint(T)}b.push({dts:A,pts:R,cts:L,units:m.units,size:m.length,isKeyframe:S,duration:x,originalDts:E,flags:{isLeading:0,dependsOn:S?2:1,isDependedOn:S?1:0,hasRedundancy:0,isNonSync:S?0:1}})}for((h=new Uint8Array(f))[0]=f>>>24&255,h[1]=f>>>16&255,h[2]=f>>>8&255,h[3]=255&f,h.set(r.default.types.mdat,4),w=0;w=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||""},o={};if(r.browser){o[r.browser]=!0;var s=r.majorVersion.split(".");o.version={major:parseInt(r.majorVersion,10),string:r.version},s.length>1&&(o.version.minor=parseInt(s[1],10)),s.length>2&&(o.version.build=parseInt(s[2],10))}for(var a in r.platform&&(o[r.platform]=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),(o.rv||o.iemobile)&&(o.rv&&delete o.rv,r.browser="msie",o.msie=!0),o.edge&&(delete o.edge,r.browser="msedge",o.msedge=!0),o.opr&&(r.browser="opera",o.opera=!0),o.safari&&o.android&&(r.browser="android",o.android=!0),o.name=r.browser,o.platform=r.platform,n)n.hasOwnProperty(a)&&delete n[a];Object.assign(n,o)}(),t.default=n},"./src/utils/exception.js": /*!********************************!*\ !*** ./src/utils/exception.js ***! \********************************/function(e,t,i){"use strict";i.r(t),i.d(t,{RuntimeException:function(){return o},IllegalStateException:function(){return s},InvalidArgumentException:function(){return a},NotImplementedException:function(){return u}});var n,r=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=function(){function e(e){this._message=e}return Object.defineProperty(e.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.name+": "+this.message},e}(),s=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),t}(o),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),t}(o),u=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),t}(o)},"./src/utils/logger.js": /*!*****************************!*\ !*** ./src/utils/logger.js ***! \*****************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=function(){function e(){}return e.e=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",n),e.ENABLE_ERROR&&(console.error?console.error(n):console.warn?console.warn(n):console.log(n))},e.i=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",n),e.ENABLE_INFO&&(console.info?console.info(n):console.log(n))},e.w=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",n),e.ENABLE_WARN&&(console.warn?console.warn(n):console.log(n))},e.d=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",n),e.ENABLE_DEBUG&&(console.debug?console.debug(n):console.log(n))},e.v=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",n),e.ENABLE_VERBOSE&&console.log(n)},e}();o.GLOBAL_TAG="flv.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new(r()),t.default=o},"./src/utils/logging-control.js": /*!**************************************!*\ !*** ./src/utils/logging-control.js ***! \**************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ./logger.js */"./src/utils/logger.js"),s=function(){function e(){}return Object.defineProperty(e,"forceGlobalTag",{get:function(){return o.default.FORCE_GLOBAL_TAG},set:function(t){o.default.FORCE_GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"globalTag",{get:function(){return o.default.GLOBAL_TAG},set:function(t){o.default.GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableAll",{get:function(){return o.default.ENABLE_VERBOSE&&o.default.ENABLE_DEBUG&&o.default.ENABLE_INFO&&o.default.ENABLE_WARN&&o.default.ENABLE_ERROR},set:function(t){o.default.ENABLE_VERBOSE=t,o.default.ENABLE_DEBUG=t,o.default.ENABLE_INFO=t,o.default.ENABLE_WARN=t,o.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableDebug",{get:function(){return o.default.ENABLE_DEBUG},set:function(t){o.default.ENABLE_DEBUG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableVerbose",{get:function(){return o.default.ENABLE_VERBOSE},set:function(t){o.default.ENABLE_VERBOSE=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableInfo",{get:function(){return o.default.ENABLE_INFO},set:function(t){o.default.ENABLE_INFO=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableWarn",{get:function(){return o.default.ENABLE_WARN},set:function(t){o.default.ENABLE_WARN=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableError",{get:function(){return o.default.ENABLE_ERROR},set:function(t){o.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),e.getConfig=function(){return{globalTag:o.default.GLOBAL_TAG,forceGlobalTag:o.default.FORCE_GLOBAL_TAG,enableVerbose:o.default.ENABLE_VERBOSE,enableDebug:o.default.ENABLE_DEBUG,enableInfo:o.default.ENABLE_INFO,enableWarn:o.default.ENABLE_WARN,enableError:o.default.ENABLE_ERROR,enableCallback:o.default.ENABLE_CALLBACK}},e.applyConfig=function(e){o.default.GLOBAL_TAG=e.globalTag,o.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,o.default.ENABLE_VERBOSE=e.enableVerbose,o.default.ENABLE_DEBUG=e.enableDebug,o.default.ENABLE_INFO=e.enableInfo,o.default.ENABLE_WARN=e.enableWarn,o.default.ENABLE_ERROR=e.enableError,o.default.ENABLE_CALLBACK=e.enableCallback},e._notifyChange=function(){var t=e.emitter;if(t.listenerCount("change")>0){var i=e.getConfig();t.emit("change",i)}},e.registerListener=function(t){e.emitter.addListener("change",t)},e.removeListener=function(t){e.emitter.removeListener("change",t)},e.addLogListener=function(t){o.default.emitter.addListener("log",t),o.default.emitter.listenerCount("log")>0&&(o.default.ENABLE_CALLBACK=!0,e._notifyChange())},e.removeLogListener=function(t){o.default.emitter.removeListener("log",t),0===o.default.emitter.listenerCount("log")&&(o.default.ENABLE_CALLBACK=!1,e._notifyChange())},e}();s.emitter=new(r()),t.default=s},"./src/utils/polyfill.js": /*!*******************************!*\ !*** ./src/utils/polyfill.js ***! \*******************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i=128){t.push(String.fromCharCode(65535&s)),r+=2;continue}}else if(i[r]<240){if(n(i,r,2)&&(s=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2])>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),r+=3;continue}}else if(i[r]<248){var s;if(n(i,r,3)&&(s=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3])>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return e[t].call(o.exports,o,o.exports,n),o.exports}return n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n("./src/index.js")}()},e.exports=i()}).call(this,i(93))},30:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"pdf-viewer"},[this.pdfSrc?this._e():t("p",{staticClass:"pdf-viewer-errorMessage"},[this._v("\n "+this._s("暂无"+this.titleName+"信息")+"\n ")]),this._v(" "),t("div",{attrs:{id:"pdf-content"}})])};n._withStripped=!0;var r=i(39),o=i.n(r),s={props:{pdfSrc:{type:String,default:""},titleName:{type:String,default:""}},data:function(){return{}},watch:{pdfSrc:function(){this.updatePDF()}},mounted:function(){this.updatePDF()},methods:{updatePDF:function(){this.pdfSrc&&o.a.embed(this.pdfSrc,"#pdf-content")}}},a=i(0),u=Object(a.a)(s,n,[],!1,null,"039353e9",null);u.options.__file="PDFViewer/index.vue";t.default=u.exports},31:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this.$createElement;return(this._self._c||e)("div",[this._t("default",null,{images:this.images,options:this.options})],2)};n._withStripped=!0;var r=i(38),o=i.n(r);function s(){return(s=Object.assign||function(e){for(var t=1;t1?t-1:0),n=1;n0&&i.forEach((function(t){z(t)&&Object.keys(t).forEach((function(i){e[i]=t[i]}))})),e},K=/^(?:width|height|left|top|marginLeft|marginTop)$/;function X(e,t){var i=e.style;W(t,(function(e,t){K.test(t)&&F(e)&&(e+="px"),i[t]=e}))}function Y(e){return j(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):e}function $(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)}function Z(e,t){if(e&&t)if(F(e.length))W(e,(function(e){Z(e,t)}));else if(e.classList)e.classList.add(t);else{var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function J(e,t){e&&t&&(F(e.length)?W(e,(function(e){J(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function Q(e,t,i){t&&(F(e.length)?W(e,(function(e){Q(e,t,i)})):i?Z(e,t):J(e,t))}var ee=/([a-z\d])([A-Z])/g;function te(e){return e.replace(ee,"$1-$2").toLowerCase()}function ie(e,t){return z(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(te(t)))}function ne(e,t,i){z(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(te(t)),i)}var re=function(){var e=!1;if(d){var t=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return e}();function oe(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i;t.trim().split(P).forEach((function(t){if(!re){var o=e.listeners;o&&o[t]&&o[t][i]&&(r=o[t][i],delete o[t][i],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,r,n)}))}function se(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i;t.trim().split(P).forEach((function(t){if(n.once&&!re){var o=e.listeners,s=void 0===o?{}:o;r=function(){delete s[t][i],e.removeEventListener(t,r,n);for(var o=arguments.length,a=new Array(o),u=0;ua?d=a/o:s=u*o,s=Math.min(.9*s,t),d=Math.min(.9*d,r);var c=(a-s)/2,h=(u-d)/2,f={left:c,top:h,x:c,y:h,width:s,height:d,oldRatio:1,ratio:s/t,aspectRatio:o,naturalWidth:t,naturalHeight:r},p=H({},f);n.rotatable&&(f.rotate=l.rotate||0,p.rotate=0),n.scalable&&(f.scaleX=l.scaleX||1,f.scaleY=l.scaleY||1,p.scaleX=1,p.scaleY=1),i.imageData=f,i.initialImageData=p,e&&e()}))},renderImage:function(e){var t=this,i=this.image,n=this.imageData;if(X(i,H({width:n.width,height:n.height,marginLeft:n.x,marginTop:n.y},le(n))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&$(i,C)){var r=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){oe(i,"transitionend",r)}},se(i,"transitionend",r,{once:!0})}else e()},resetImage:function(){if(this.viewing||this.viewed){var e=this.image;this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null}}},ge={bind:function(){var e=this.options,t=this.viewer,i=this.canvas,n=this.element.ownerDocument;se(t,"click",this.onClick=this.click.bind(this)),se(t,"dragstart",this.onDragStart=this.dragstart.bind(this)),se(i,k,this.onPointerDown=this.pointerdown.bind(this)),se(n,I,this.onPointerMove=this.pointermove.bind(this)),se(n,D,this.onPointerUp=this.pointerup.bind(this)),se(n,"keydown",this.onKeyDown=this.keydown.bind(this)),se(window,"resize",this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&se(t,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&se(i,"dblclick",this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,i=this.canvas,n=this.element.ownerDocument;oe(t,"click",this.onClick),oe(t,"dragstart",this.onDragStart),oe(i,k,this.onPointerDown),oe(n,I,this.onPointerMove),oe(n,D,this.onPointerUp),oe(n,"keydown",this.onKeyDown),oe(window,"resize",this.onResize),e.zoomable&&e.zoomOnWheel&&oe(t,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&oe(i,"dblclick",this.onDblclick)}},ve={click:function(e){var t=this.options,i=this.imageData,n=e.target,r=ie(n,M);switch(r||"img"!==n.localName||"li"!==n.parentElement.localName||(r=ie(n=n.parentElement,M)),h&&e.isTrusted&&n===this.canvas&&clearTimeout(this.clickCanvasTimeout),r){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.hide();break;case"view":this.view(ie(n,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-i.scaleX||-1);break;case"flip-vertical":this.scaleY(-i.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(h&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,i=this.options,n=this.image,r=this.index,o=this.viewerData;J(n,L),i.loading&&J(this.canvas,R),n.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage((function(){Q(n,x,i.movable),Q(n,C,i.transition),e.renderImage((function(){e.viewed=!0,e.viewing=!1,q(i.viewed)&&se(t,"viewed",i.viewed,{once:!0}),ae(t,"viewed",{originalImage:e.images[r],index:r,image:n},{cancelable:!1})}))}))},loadImage:function(e){var t=e.target,i=t.parentNode,n=i.offsetWidth||30,r=i.offsetHeight||50,o=!!ie(t,"filled");ce(t,this.options,(function(e,i){var s=e/i,a=n,u=r;r*s>n?o?a=r*s:u=n/s:o?u=n/s:a=r*s,X(t,H({width:a,height:u},le({translateX:(n-a)/2,translateY:(r-u)/2})))}))},keydown:function(e){var t=this.options;if(t.keyboard){var i=e.keyCode||e.which||e.charCode;switch(i){case 13:this.viewer.contains(e.target)&&this.click(e)}if(this.fulled)switch(i){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,i=this.pointers,n=e.buttons,r=e.button;if(!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(F(n)&&1!==n||F(r)&&0!==r||e.ctrlKey))){e.preventDefault(),e.changedTouches?W(e.changedTouches,(function(e){i[e.identifier]=fe(e)})):i[e.pointerId||0]=fe(e);var o=!!t.movable&&"move";t.zoomOnTouch&&t.zoomable&&Object.keys(i).length>1?o="zoom":t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o="switch"),!t.transition||"move"!==o&&"zoom"!==o||J(this.image,C),this.action=o}},pointermove:function(e){var t=this.pointers,i=this.action;this.viewed&&i&&(e.preventDefault(),e.changedTouches?W(e.changedTouches,(function(e){H(t[e.identifier]||{},fe(e,!0))})):H(t[e.pointerId||0]||{},fe(e,!0)),this.change(e))},pointerup:function(e){var t,i=this,n=this.options,r=this.action,o=this.pointers;e.changedTouches?W(e.changedTouches,(function(e){t=o[e.identifier],delete o[e.identifier]})):(t=o[e.pointerId||0],delete o[e.pointerId||0]),r&&(e.preventDefault(),!n.transition||"move"!==r&&"zoom"!==r||Z(this.image,C),this.action=!1,h&&"zoom"!==r&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),n.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout((function(){ae(i.image,"dblclick")}),50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout((function(){i.imageClicked=!1}),500)):(this.imageClicked=!1,n.backdrop&&"static"!==n.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout((function(){ae(i.canvas,"click")}),50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage()})),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();W(this.player.getElementsByTagName("img"),(function(t){se(t,"load",e.loadImage.bind(e),{once:!0}),ae(t,"load")}))}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50);var i=Number(this.options.zoomRatio)||.1,n=1;e.deltaY?n=e.deltaY>0?1:-1:e.wheelDelta?n=-e.wheelDelta/120:e.detail&&(n=e.detail>0?1:-1),this.zoom(-n*i,!0,e)}}},ye={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,i=this.options;if(i.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(q(i.show)&&se(t,"show",i.show,{once:!0}),!1===ae(t,"show")||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var n=this.viewer;if(J(n,b),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("aria-hidden"),i.transition&&!e){var r=this.shown.bind(this);this.transitioning={abort:function(){oe(n,"transitionend",r),J(n,A)}},Z(n,C),n.initialOffsetWidth=n.offsetWidth,se(n,"transitionend",r,{once:!0}),Z(n,A)}else Z(n,A),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.element,n=this.options;if(n.inline||this.hiding||!this.isShown&&!this.showing)return this;if(q(n.hide)&&se(i,"hide",n.hide,{once:!0}),!1===ae(i,"hide"))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var r=this.viewer,o=this.image,s=function(){J(r,A),e.hidden()};if(n.transition&&!t){var a=function t(i){i&&i.target===r&&(oe(r,"transitionend",t),e.hidden())},u=function(){$(r,C)?(se(r,"transitionend",a),J(r,A)):s()};this.transitioning={abort:function(){e.viewed&&$(o,C)?oe(o,"transitionend",u):$(r,C)&&oe(r,"transitionend",a)}},this.viewed&&$(o,C)?(se(o,"transitionend",u,{once:!0}),this.zoomTo(0,!1,null,!0)):u()}else s();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var i=this.element,n=this.options,r=this.title,o=this.canvas,s=this.items[t],a=s.querySelector("img"),u=ie(a,"originalUrl"),l=a.getAttribute("alt"),d=document.createElement("img");if(W(n.inheritedAttributes,(function(e){var t=a.getAttribute(e);null!==t&&d.setAttribute(e,t)})),d.src=u,d.alt=l,q(n.view)&&se(i,"view",n.view,{once:!0}),!1===ae(i,"view",{originalImage:this.images[t],index:t,image:d})||!this.isShown||this.hiding||this.played)return this;var c=this.items[this.index];c&&(J(c,p),c.removeAttribute("aria-selected")),Z(s,p),s.setAttribute("aria-selected",!0),n.focus&&s.focus(),this.image=d,this.viewed=!1,this.index=t,this.imageData={},Z(d,L),n.loading&&Z(o,R),o.innerHTML="",o.appendChild(d),this.renderList(),r.innerHTML="";var h,f,m=function(){var t=e.imageData,i=Array.isArray(n.title)?n.title[1]:n.title;r.innerHTML=Y(q(i)?i.call(e,d,t):"".concat(l," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))};return se(i,"viewed",m,{once:!0}),this.viewing={abort:function(){oe(i,"viewed",m),d.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(d.src="",oe(d,"load",h),e.timeout&&clearTimeout(e.timeout))}},d.complete?this.load():(se(d,"load",h=function(){oe(d,"error",f),e.load()},{once:!0}),se(d,"error",f=function(){oe(d,"load",h),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),J(d,L),n.loading&&J(e.canvas,R)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout((function(){J(d,L),e.timeout=!1}),1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,i=this.index+1;return i>t&&(i=e?0:t),this.view(i),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.imageData;return this.moveTo(U(e)?e:i.x+Number(e),U(t)?t:i.y+Number(t)),this},moveTo:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.element,o=this.options,s=this.imageData;if(e=Number(e),i=Number(i),this.viewed&&!this.played&&o.movable){var a=s.x,u=s.y,l=!1;if(F(e)?l=!0:e=a,F(i)?l=!0:i=u,l){if(q(o.move)&&se(r,"move",o.move,{once:!0}),!1===ae(r,"move",{x:e,y:i,oldX:a,oldY:u,originalEvent:n}))return this;s.x=e,s.y=i,s.left=e,s.top=i,this.moving=!0,this.renderImage((function(){t.moving=!1,q(o.moved)&&se(r,"moved",o.moved,{once:!0}),ae(r,"moved",{x:e,y:i,oldX:a,oldY:u,originalEvent:n},{cancelable:!1})}))}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,i=this.element,n=this.options,r=this.imageData;if(F(e=Number(e))&&this.viewed&&!this.played&&n.rotatable){var o=r.rotate;if(q(n.rotate)&&se(i,"rotate",n.rotate,{once:!0}),!1===ae(i,"rotate",{degree:e,oldDegree:o}))return this;r.rotate=e,this.rotating=!0,this.renderImage((function(){t.rotating=!1,q(n.rotated)&&se(i,"rotated",n.rotated,{once:!0}),ae(i,"rotated",{degree:e,oldDegree:o},{cancelable:!1})}))}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.element,r=this.options,o=this.imageData;if(e=Number(e),i=Number(i),this.viewed&&!this.played&&r.scalable){var s=o.scaleX,a=o.scaleY,u=!1;if(F(e)?u=!0:e=s,F(i)?u=!0:i=a,u){if(q(r.scale)&&se(n,"scale",r.scale,{once:!0}),!1===ae(n,"scale",{scaleX:e,scaleY:i,oldScaleX:s,oldScaleY:a}))return this;o.scaleX=e,o.scaleY=i,this.scaling=!0,this.renderImage((function(){t.scaling=!1,q(r.scaled)&&se(n,"scaled",r.scaled,{once:!0}),ae(n,"scaled",{scaleX:e,scaleY:i,oldScaleX:s,oldScaleY:a},{cancelable:!1})}))}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,t,i),this},zoomTo:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.element,s=this.options,a=this.pointers,u=this.imageData,l=u.x,d=u.y,c=u.width,h=u.height,f=u.naturalWidth,p=u.naturalHeight;if(F(e=Math.max(0,e))&&this.viewed&&!this.played&&(r||s.zoomable)){if(!r){var m=Math.max(.01,s.minZoomRatio),_=Math.min(100,s.maxZoomRatio);e=Math.min(Math.max(e,m),_)}n&&s.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);var g=f*e,v=p*e,y=g-c,b=v-h,w=u.ratio;if(q(s.zoom)&&se(o,"zoom",s.zoom,{once:!0}),!1===ae(o,"zoom",{ratio:e,oldRatio:w,originalEvent:n}))return this;if(this.zooming=!0,n){var E=ue(this.viewer),S=a&&Object.keys(a).length?pe(a):{pageX:n.pageX,pageY:n.pageY};u.x-=y*((S.pageX-E.left-l)/c),u.y-=b*((S.pageY-E.top-d)/h)}else u.x-=y/2,u.y-=b/2;u.left=u.x,u.top=u.y,u.width=g,u.height=v,u.oldRatio=w,u.ratio=e,this.renderImage((function(){t.zooming=!1,q(s.zoomed)&&se(o,"zoomed",s.zoomed,{once:!0}),ae(o,"zoomed",{ratio:e,oldRatio:w,originalEvent:n},{cancelable:!1})})),i&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var i=this.element,n=this.options;if(q(n.play)&&se(i,"play",n.play,{once:!0}),!1===ae(i,"play"))return this;var r=this.player,o=this.loadImage.bind(this),s=[],a=0,u=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),Z(r,O),W(this.items,(function(e,t){var i=e.querySelector("img"),l=document.createElement("img");l.src=ie(i,"originalUrl"),l.alt=i.getAttribute("alt"),l.referrerPolicy=i.referrerPolicy,a+=1,Z(l,_),Q(l,C,n.transition),$(e,p)&&(Z(l,A),u=t),s.push(l),se(l,"load",o,{once:!0}),r.appendChild(l)})),F(n.interval)&&n.interval>0){var l=function t(){e.playing=setTimeout((function(){J(s[u],A),Z(s[u=(u+=1)1&&l()}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,i=this.options;if(q(i.stop)&&se(t,"stop",i.stop,{once:!0}),!1===ae(t,"stop"))return this;var n=this.player;return this.played=!1,clearTimeout(this.playing),W(n.getElementsByTagName("img"),(function(t){oe(t,"load",e.onLoadWhenPlay)})),J(n,O),n.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,i=this.viewer,n=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),Z(this.button,y),t.transition&&(J(r,C),this.viewed&&J(n,C)),Z(i,g),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("style"),X(i,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=H({},this.containerData),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage((function(){t.transition&&setTimeout((function(){Z(n,C),Z(r,C)}),0)}))}))),this},exit:function(){var e=this,t=this.options,i=this.viewer,n=this.image,r=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),J(this.button,y),t.transition&&(J(r,C),this.viewed&&J(n,C)),t.focus&&this.clearEnforceFocus(),i.removeAttribute("role"),i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-modal"),J(i,g),X(i,{zIndex:t.zIndexInline}),this.viewerData=H({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage((function(){t.transition&&setTimeout((function(){Z(n,C),Z(r,C)}),0)}))})),this):this},tooltip:function(){var e=this,t=this.options,i=this.tooltipBox,n=this.imageData;return this.viewed&&!this.played&&t.tooltip?(i.textContent="".concat(Math.round(100*n.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&ae(i,"transitionend"),Z(i,O),Z(i,_),Z(i,C),i.removeAttribute("aria-hidden"),i.initialOffsetWidth=i.offsetWidth,Z(i,A)):(Z(i,O),i.removeAttribute("aria-hidden")),this.tooltipping=setTimeout((function(){t.transition?(se(i,"transitionend",(function(){J(i,O),J(i,_),J(i,C),i.setAttribute("aria-hidden",!0),e.fading=!1}),{once:!0}),J(i,A),e.fading=!0):(J(i,O),i.setAttribute("aria-hidden",!0)),e.tooltipping=!1}),1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,e):this.zoomTo(1,!0,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=H({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,i=this.options,n=this.isImg;if(n&&!t.parentNode)return this.destroy();var r=[];if(W(n?[t]:t.querySelectorAll("img"),(function(t){q(i.filter)?i.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)})),!r.length)return this;if(this.images=r,this.length=r.length,this.ready){var o=[];if(W(this.items,(function(e,t){var i=e.querySelector("img"),n=r[t];n&&i&&n.src===i.src&&n.alt===i.alt||o.push(t)})),X(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=o.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var a=this.items[this.index];Z(a,p),a.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e.viewer?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||oe(e,"click",this.onStart),e.viewer=void 0,this):this}},be={getImageURL:function(e){var t=this.options.url;return t=j(t)?e.getAttribute(t):q(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),se(document,"focusin",this.onFocusin=function(t){var i=e.viewer,n=t.target;n===document||n===i||i.contains(n)||null!==n.getAttribute("tabindex")&&"true"===n.getAttribute("aria-modal")||i.focus()})},clearEnforceFocus:function(){this.onFocusin&&(oe(document,"focusin",this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;Z(e,T),e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px")},close:function(){var e=this.body;J(e,T),e.style.paddingRight=this.initialBodyPaddingRight},shown:function(){var e=this.element,t=this.options,i=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(i.focus(),this.enforceFocus()),q(t.shown)&&se(e,"shown",t.shown,{once:!0}),!1!==ae(e,"shown")&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,i=this.viewer;t.fucus&&this.clearEnforceFocus(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.close(),this.unbind(),Z(i,b),i.removeAttribute("role"),i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-modal"),i.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.hiding=!1,this.destroyed||(q(t.hidden)&&se(e,"hidden",t.hidden,{once:!0}),ae(e,"hidden",null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var i=t.documentElement;i.requestFullscreen?G(e)?i.requestFullscreen(e):i.requestFullscreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):i.mozRequestFullScreen?i.mozRequestFullScreen():i.msRequestFullscreen&&i.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,i=this.pointers,n=i[Object.keys(i)[0]];if(n){var o=n.endX-n.startX,s=n.endY-n.startY;switch(this.action){case"move":this.move(o,s,e);break;case"zoom":this.zoom(function(e){var t=r({},e),i=[];return W(e,(function(e,n){delete t[n],W(t,(function(t){var n=Math.abs(e.startX-t.startX),r=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),s=Math.abs(e.endY-t.endY),a=Math.sqrt(n*n+r*r),u=(Math.sqrt(o*o+s*s)-a)/a;i.push(u)}))})),i.sort((function(e,t){return Math.abs(e)1&&a>Math.abs(s)&&(this.pointers={},o>1?this.prev(t.loop):o<-1&&this.next(t.loop))}W(i,(function(e){e.startX=e.endX,e.startY=e.endY}))}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},we=c.Viewer,Ee=(me=-1,function(){return me+=1}),Se=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,e),!t||1!==t.nodeType)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=H({},l,G(i)&&i),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.id=Ee(),this.init()}var t,i,n;return t=e,n=[{key:"noConflict",value:function(){return window.Viewer=we,e}},{key:"setDefaults",value:function(e){H(l,G(e)&&e)}}],(i=[{key:"init",value:function(){var e=this,t=this.element,i=this.options;if(!t.viewer){t.viewer=this,i.focus&&!i.keyboard&&(i.focus=!1);var n="img"===t.localName,r=[];if(W(n?[t]:t.querySelectorAll("img"),(function(t){q(i.filter)?i.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)})),this.isImg=n,this.length=r.length,this.images=r,this.initBody(),U(document.createElement("viewer").style.transition)&&(i.transition=!1),i.inline){var o=0,s=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout((function(){e.delaying=!1,e.build()}),0))};this.initializing={abort:function(){W(r,(function(e){e.complete||oe(e,"load",s)}))}},W(r,(function(e){e.complete?s():se(e,"load",s,{once:!0})}))}else se(t,"click",this.onStart=function(t){var n=t.target;"img"!==n.localName||q(i.filter)&&!i.filter.call(e,n)||e.view(e.images.indexOf(n))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,i=e.parentNode,n=document.createElement("div");n.innerHTML='
';var r=n.querySelector(".".concat("viewer","-container")),o=r.querySelector(".".concat("viewer","-title")),s=r.querySelector(".".concat("viewer","-toolbar")),a=r.querySelector(".".concat("viewer","-navbar")),u=r.querySelector(".".concat("viewer","-button")),l=r.querySelector(".".concat("viewer","-canvas"));if(this.parent=i,this.viewer=r,this.title=o,this.toolbar=s,this.navbar=a,this.button=u,this.canvas=l,this.footer=r.querySelector(".".concat("viewer","-footer")),this.tooltipBox=r.querySelector(".".concat("viewer","-tooltip")),this.player=r.querySelector(".".concat("viewer","-player")),this.list=r.querySelector(".".concat("viewer","-list")),r.id="".concat("viewer").concat(this.id),o.id="".concat("viewer","Title").concat(this.id),Z(o,t.title?he(Array.isArray(t.title)?t.title[0]:t.title):b),Z(a,t.navbar?he(t.navbar):b),Q(u,b,!t.button),t.keyboard&&u.setAttribute("tabindex",0),t.backdrop&&(Z(r,"".concat("viewer","-backdrop")),t.inline||"static"===t.backdrop||ne(l,M,"hide")),j(t.className)&&t.className&&t.className.split(P).forEach((function(e){Z(r,e)})),t.toolbar){var d=document.createElement("ul"),c=G(t.toolbar),h=B.slice(0,3),f=B.slice(7,9),p=B.slice(9);c||Z(s,he(t.toolbar)),W(c?t.toolbar:B,(function(e,i){var n=c&&G(e),r=c?te(i):e,o=n&&!U(e.show)?e.show:e;if(o&&(t.zoomable||-1===h.indexOf(r))&&(t.rotatable||-1===f.indexOf(r))&&(t.scalable||-1===p.indexOf(r))){var s=n&&!U(e.size)?e.size:e,a=n&&!U(e.click)?e.click:e,u=document.createElement("li");t.keyboard&&u.setAttribute("tabindex",0),u.setAttribute("role","button"),Z(u,"".concat("viewer","-").concat(r)),q(a)||ne(u,M,r),F(o)&&Z(u,he(o)),-1!==["small","large"].indexOf(s)?Z(u,"".concat("viewer","-").concat(s)):"play"===r&&Z(u,"".concat("viewer","-large")),q(a)&&se(u,"click",a),d.appendChild(u)}})),s.appendChild(d)}else Z(s,b);if(!t.rotatable){var y=s.querySelectorAll('li[class*="rotate"]');Z(y,L),W(y,(function(e){s.appendChild(e)}))}if(t.inline)Z(u,v),X(r,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(i).position&&X(i,{position:"relative"}),i.insertBefore(r,e.nextSibling);else{Z(u,m),Z(r,g),Z(r,_),Z(r,b),X(r,{zIndex:t.zIndex});var w=t.container;j(w)&&(w=e.ownerDocument.querySelector(w)),w||(w=this.body),w.appendChild(r)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,q(t.ready)&&se(e,"ready",t.ready,{once:!0}),!1!==ae(e,"ready")?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}])&&a(t.prototype,i),n&&a(t,n),e}();H(Se.prototype,_e,ge,ve,ye,be),e.exports=Se},39:function(e,t,i){var n,r,o; /** * PDFObject v2.2.7 * https://github.com/pipwerks/PDFObject * @license * Copyright (c) 2008-2021 Philip Hutchison * MIT-style license: http://pipwerks.mit-license.org/ * UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js */r=[],void 0===(o="function"==typeof(n=function(){"use strict";if("undefined"==typeof window||void 0===window.navigator||void 0===window.navigator.userAgent||void 0===window.navigator.mimeTypes)return!1;let e=window.navigator,t=window.navigator.userAgent,i="ActiveXObject"in window,n=void 0!==window.Promise,r=void 0!==e.mimeTypes["application/pdf"],o=void 0!==e.platform&&"MacIntel"===e.platform&&void 0!==e.maxTouchPoints&&e.maxTouchPoints>1||/Mobi|Tablet|Android|iPad|iPhone/.test(t),s=!o&&void 0!==e.vendor&&/Apple/.test(e.vendor)&&/Safari/.test(t),a=!!(!o&&/irefox/.test(t)&&t.split("rv:").length>1)&&parseInt(t.split("rv:")[1].split(".")[0],10)>18,u=function(e){var t;try{t=new ActiveXObject(e)}catch(e){t=null}return t},l=!o&&(n||a||r||i&&!(!u("AcroPDF.PDF")&&!u("PDF.PdfCtrl"))),d=function(e,t){return t||console.log("[PDFObject] "+e),!1},c=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},h=function(e,t,i,n,r,o,s){c(e);let a=n+"?file="+encodeURIComponent(t)+i,u=document.createElement("div"),l=document.createElement("iframe");return l.src=a,l.className="pdfobject",l.type="application/pdf",l.frameborder="0",l.allow="fullscreen",l.title=o,r&&(l.id=r),s||(u.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; left: 0;",l.style.cssText="border: none; width: 100%; height: 100%;",e.style.position="relative",e.style.overflow="auto"),u.appendChild(l),e.appendChild(u),e.classList.add("pdfobject-container"),e.getElementsByTagName("iframe")[0]},f=function(e,t,i){let n=t||!1,r=i||{},a="string"==typeof r.id?r.id:"",u=r.page||!1,f=r.pdfOpenParams||{},p=r.fallbackLink||!0,m=r.width||"100%",_=r.height||"100%",g=r.title||"Embedded PDF",v="boolean"!=typeof r.assumptionMode||r.assumptionMode,y="boolean"==typeof r.forcePDFJS&&r.forcePDFJS,b="boolean"==typeof r.supportRedirect&&r.supportRedirect,w="boolean"==typeof r.omitInlineStyles&&r.omitInlineStyles,E="boolean"==typeof r.suppressConsole&&r.suppressConsole,S="boolean"==typeof r.forceIframe&&r.forceIframe,A=r.PDFJS_URL||!1,L=function(e){let t=document.body;return"string"==typeof e?t=document.querySelector(e):void 0!==window.jQuery&&e instanceof jQuery&&e.length?t=e.get(0):void 0!==e.nodeType&&1===e.nodeType&&(t=e),t}(n),R="",x="";return"string"!=typeof e?d("URL is not valid",E):L?(u&&(f.page=u),x=function(e){let t,i="";if(e){for(t in e)e.hasOwnProperty(t)&&(i+=encodeURIComponent(t)+"="+encodeURIComponent(e[t])+"&");i&&(i="#"+i,i=i.slice(0,i.length-1))}return i}(f),y&&A?h(L,e,x,A,a,g,w):l||v&&!o?function(e,t,i,n,r,o,s,a,u,l){c(t);let d=document.createElement(e);if(d.src=n+r,d.className="pdfobject",d.type="application/pdf",d.title=u,a&&(d.id=a),"iframe"===e&&(d.allow="fullscreen"),!l){let t="embed"===e?"overflow: auto;":"border: none;";i&&i!==document.body?t+="width: "+o+"; height: "+s+";":t+="position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;",d.style.cssText=t}return t.classList.add("pdfobject-container"),t.appendChild(d),t.getElementsByTagName(e)[0]}(S||b||s?"iframe":"embed",L,t,e,x,m,_,a,g,w):A?h(L,e,x,A,a,g,w):(p&&(R="string"==typeof p?p:"

This browser does not support inline PDFs. Please download the PDF to view it: Download PDF

",L.innerHTML=R.replace(/\[url\]/g,e)),d("This browser does not support embedded PDFs",E))):d("Target element cannot be determined",E)};return{embed:function(e,t,i){return f(e,t,i)},pdfobjectversion:"2.2.7",supportsPDFs:l}})?n.apply(t,r):n)||(e.exports=o)},4:function(e,t,i){window,e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i(i.s=15)}({15:function(e,t,i){"use strict";i.r(t),i.d(t,"getExtName",(function(){return o})),i.d(t,"download",(function(){return s})),i.d(t,"downloadBlob",(function(){return a})),i.d(t,"getFileType",(function(){return u})),i.d(t,"isImage",(function(){return d})),i.d(t,"isVideo",(function(){return c})),i.d(t,"isAudio",(function(){return h})),i.d(t,"isPDF",(function(){return f})),i.d(t,"FileType",(function(){return n}));var n={IMAGE:"IMAGE",VIDEO:"VIDEO",AUDIO:"AUDIO",PDF:"PDF",OTHER:"OTHER"},r=[{type:n.IMAGE,extList:[".png",".jpg",".jpeg",".bmp",".gif",".webp",".svg"]},{type:n.VIDEO,extList:[".flv",".avi",".mp4",".ogg"]},{type:n.AUDIO,extList:[".mp3",".m4a",".wav",".mpeg"]},{type:n.PDF,extList:[".pdf"]}],o=function(e,t){if(void 0===t&&(t=!0),!e)return"";var i=/^.+(\.(\w+))$/g.exec(e)||[],n=i[1],r=void 0===n?"":n,o=i[2];return t?r:void 0===o?"":o},s=function(e,t,i){var n=document.createElement("a");n.style.display="none",n.href=e,t&&n.setAttribute("download",decodeURI(t)),void 0===n.download&&n.setAttribute("target","_blank"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},a=function(e,t,i){var n=new Blob([e],{type:i}),r=window.URL.createObjectURL(n);s(r,t),window.URL.revokeObjectURL(r)},u=function(e){var t=o(e),i=r.find((function(e){return e.extList.includes(t)}));return i?i.type:n.OTHER},l=function(e){return function(t){var i=u(t);return e===i}},d=l(n.IMAGE),c=l(n.VIDEO),h=l(n.AUDIO),f=l(n.PDF)}})},40:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"viewer"},[e._t("default",(function(){return[i("thumbnail-list",{attrs:{data:e.rebuildData,direction:"horizontal"},nativeOn:{click:function(t){return e.toggle.apply(null,arguments)}},model:{value:e.currentIndex,callback:function(t){e.currentIndex=t},expression:"currentIndex"}})]}),null,{list:e.rebuildData,change:e.change,toggle:e.toggle}),e._v(" "),i("transition",{attrs:{name:"fade"}},[e.visible&&e.current?i("div",{ref:"viewer-dialog",staticClass:"viewer-dialog"},[i("div",{staticClass:"viewer-dialog-close",on:{click:e.toggle}}),e._v(" "),i("el-scrollbar",{staticClass:"viewer-dialog-navbar"},[i("thumbnail-list",{attrs:{data:e.rebuildData,direction:"vertical"},model:{value:e.currentIndex,callback:function(t){e.currentIndex=t},expression:"currentIndex"}})],1),e._v(" "),i("div",{staticClass:"viewer-dialog-content"},[e.current._fileType===e.fileType.IMAGE?i("image-viewer",e._b({ref:"imageViewer",staticClass:"viewer-box"},"image-viewer",e.imageViewerProps,!1),[i("div",{staticClass:"image-viewer-images"},e._l(e.imageData,(function(t){return i("img",{key:t._typeIndex,staticClass:"img",attrs:{"data-src":e.getSrc(t),src:e.getSrc(t)}})})),0)]):e.current._fileType===e.fileType.VIDEO?i("video-player",e._b({staticClass:"viewer-box"},"video-player",e.videoPlayerProps,!1)):e.current._fileType===e.fileType.AUDIO?i("audio-player",e._b({},"audio-player",e.audioPlayerProps,!1)):e.current._fileType===e.fileType.PDF?i("p-d-f-viewer",e._b({staticClass:"viewer-box"},"p-d-f-viewer",e.PDFViewerProps,!1)):e._e()],1)],1):e._e()])],2)};n._withStripped=!0;var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ul",{staticClass:"thumbnail-list",class:e.directionClass},e._l(e.data,(function(t,n){return i("li",{key:n,ref:"thumbnails",refInFor:!0,staticClass:"thumbnail-item",class:{"is-active":e.isActive(n)}},[i("thumbnail",{attrs:{data:t},nativeOn:{click:function(t){return e.handleView(n)}}})],1)})),0)};r._withStripped=!0;var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"thumbnail",class:e.thumbnailClass},[i("div",{staticClass:"thumbnail-content"},[e.data._fileType===e.fileType.IMAGE?i("img",{attrs:{src:e.data._src,alt:e.data.title||e.data.__filename}}):i("svg-icon",{attrs:{"icon-class":e.thumbnailIconClass,"class-name":"thumbnail-icon"}}),e._v(" "),e.thumbnailTip?i("div",{staticClass:"thumbnail-tip"},[e._v(e._s(e.thumbnailTip))]):e._e()],1)])};o._withStripped=!0;var s=i(6),a=i.n(s),u=i(7),l=i.n(u),d=new a.a({id:"icon-web-lib-icon-filetype-audio",use:"icon-web-lib-icon-filetype-audio-usage",viewBox:"0 0 1024 1024",content:''}),c=(l.a.add(d),new a.a({id:"icon-web-lib-icon-filetype-image",use:"icon-web-lib-icon-filetype-image-usage",viewBox:"0 0 1024 1024",content:''})),h=(l.a.add(c),new a.a({id:"icon-web-lib-icon-filetype-other",use:"icon-web-lib-icon-filetype-other-usage",viewBox:"0 0 1024 1024",content:''})),f=(l.a.add(h),new a.a({id:"icon-web-lib-icon-filetype-pdf",use:"icon-web-lib-icon-filetype-pdf-usage",viewBox:"0 0 1024 1024",content:''})),p=(l.a.add(f),new a.a({id:"icon-web-lib-icon-filetype-video",use:"icon-web-lib-icon-filetype-video-usage",viewBox:"0 0 1024 1024",content:''})),m=(l.a.add(p),i(5)),_=i(4),g={name:"Thumbnail",components:{SvgIcon:m.default},props:{data:{type:Object,required:!0},type:{type:String,default:""}},data:function(){return{fileType:_.FileType}},computed:{thumbnailClass:function(){var e,t=this.data._fileType;return((e={})[_.FileType.IMAGE]="is-image",e[_.FileType.VIDEO]="is-video",e[_.FileType.AUDIO]="is-audio",e[_.FileType.PDF]="is-pdf",e[_.FileType.OTHER]="is-other",e)[t]},thumbnailIconClass:function(){var e,t=this.data._fileType;return((e={})[_.FileType.IMAGE]="web-lib-icon-filetype-image",e[_.FileType.VIDEO]="web-lib-icon-filetype-video",e[_.FileType.AUDIO]="web-lib-icon-filetype-audio",e[_.FileType.PDF]="web-lib-icon-filetype-pdf",e[_.FileType.OTHER]="web-lib-icon-filetype-other",e)[t]},thumbnailTip:function(){return this.data.title}}},v=i(0),y=Object(v.a)(g,o,[],!1,null,"92c8869c",null);y.options.__file="Viewer/components/Thumbnail.vue";var b={name:"ThumbnailList",components:{Thumbnail:y.exports},props:{data:{type:Array,default:function(){return[]}},value:{type:Number,default:0},direction:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}}},computed:{directionClass:function(){return"is-"+this.direction}},watch:{value:function(){this.scrollIntoView()}},mounted:function(){this.scrollIntoView()},methods:{handleView:function(e){this.$emit("input",e)},isActive:function(e){return this.value===e},scrollIntoView:function(){"horizontal"!==this.direction&&this.$refs.thumbnails&&this.$refs.thumbnails[this.value]&&this.$refs.thumbnails[this.value].scrollIntoView()}}},w=Object(v.a)(b,r,[],!1,null,"6ff2f07b",null);w.options.__file="Viewer/ThumbnailList.vue";var E=w.exports,S=i(32),A=i(31),L=i(30),R=i(33);function x(){return(x=Object.assign||function(e){for(var t=1;t"+e+""};return function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,i=this.render();return this.node=i,t.appendChild(i),i},t.prototype.render=function(){var e=this.stringify();return function(e){var t=!!document.importNode,i=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(i,!0):i}(u(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,i),t}(e)},e.exports=i()}).call(this,i(10))},7:function(e,t,i){(function(t){var i;i=function(){"use strict";function e(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self;var i=e((function(e,t){e.exports=function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(t,i){var r;return i&&!0===i.clone&&e(t)?n((r=t,Array.isArray(r)?[]:{}),t,i):t}function i(i,r,o){var s=i.slice();return r.forEach((function(r,a){void 0===s[a]?s[a]=t(r,o):e(r)?s[a]=n(i[a],r,o):-1===i.indexOf(r)&&s.push(t(r,o))})),s}function n(r,o,s){var a=Array.isArray(o),u=(s||{arrayMerge:i}).arrayMerge||i;return a?Array.isArray(r)?u(r,o,s):t(o,s):function(i,r,o){var s={};return e(i)&&Object.keys(i).forEach((function(e){s[e]=t(i[e],o)})),Object.keys(r).forEach((function(a){e(r[a])&&i[a]?s[a]=n(i[a],r[a],o):s[a]=t(r[a],o)})),s}(r,o,s)}return n.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,i){return n(e,i,t)}))},n}()})),n=e((function(e,t){t.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},e.exports=t.default})),r=n.svg,o=n.xlink,s={};s[r.name]=r.uri,s[o.name]=o.uri;var a,u=function(e,t){return void 0===e&&(e=""),""+e+""},l=n.svg,d=n.xlink,c={attrs:(a={style:["position: absolute","width: 0","height: 0"].join("; "),"aria-hidden":"true"},a[l.name]=l.uri,a[d.name]=d.uri,a)},h=function(e){this.config=i(c,e||{}),this.symbols=[]};h.prototype.add=function(e){var t=this.symbols,i=this.find(e.id);return i?(t[t.indexOf(i)]=e,!1):(t.push(e),!0)},h.prototype.remove=function(e){var t=this.symbols,i=this.find(e);return!!i&&(t.splice(t.indexOf(i),1),i.destroy(),!0)},h.prototype.find=function(e){return this.symbols.filter((function(t){return t.id===e}))[0]||null},h.prototype.has=function(e){return null!==this.find(e)},h.prototype.stringify=function(){var e=this.config.attrs,t=this.symbols.map((function(e){return e.stringify()})).join("");return u(t,e)},h.prototype.toString=function(){return this.stringify()},h.prototype.destroy=function(){this.symbols.forEach((function(e){return e.destroy()}))};var f=function(e){var t=e.id,i=e.viewBox,n=e.content;this.id=t,this.viewBox=i,this.content=n};f.prototype.stringify=function(){return this.content},f.prototype.toString=function(){return this.stringify()},f.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach((function(t){return delete e[t]}))};var p=function(e){var t=!!document.importNode,i=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(i,!0):i},m=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,i=this.render();return this.node=i,t.appendChild(i),i},t.prototype.render=function(){var e=this.stringify();return p(u(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,i),t}(f),_={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},g=function(e){return Array.prototype.slice.call(e,0)},v=function(){return/firefox/i.test(navigator.userAgent)},y=function(){return/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)},b=function(){return/edge/i.test(navigator.userAgent)},w=function(e){return(e||window.location.href).split("#")[0]},E=function(e){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",(function(t,i,n){var r,o,s;r=e,o={oldUrl:n,newUrl:i},(s=document.createEvent("CustomEvent")).initCustomEvent(r,!1,!1,o),window.dispatchEvent(s)}))}])},S=function(e,t){return void 0===t&&(t="linearGradient, radialGradient, pattern, mask, clipPath"),g(e.querySelectorAll("symbol")).forEach((function(e){g(e.querySelectorAll(t)).forEach((function(t){e.parentNode.insertBefore(t,e)}))})),e},A=n.xlink.uri,L=/[{}|\\\^\[\]`"<>]/g;function R(e){return e.replace(L,(function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()}))}var x,T=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],O=T.map((function(e){return"["+e+"]"})).join(","),C=function(e,t,i,n){var r=R(i),o=R(n);(function(e,t){return g(e).reduce((function(e,i){if(!i.attributes)return e;var n=g(i.attributes),r=t?n.filter(t):n;return e.concat(r)}),[])})(e.querySelectorAll(O),(function(e){var t=e.localName,i=e.value;return-1!==T.indexOf(t)&&-1!==i.indexOf("url("+r)})).forEach((function(e){return e.value=e.value.replace(new RegExp(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),o)})),function(e,t,i){g(e).forEach((function(e){var n=e.getAttribute("xlink:href");if(n&&0===n.indexOf(t)){var r=n.replace(t,i);e.setAttributeNS(A,"xlink:href",r)}}))}(t,r,o)},k="mount",I="symbol_mount",D=function(e){function t(t){var n=this;void 0===t&&(t={}),e.call(this,i(_,t));var r,o=(r=r||Object.create(null),{on:function(e,t){(r[e]||(r[e]=[])).push(t)},off:function(e,t){r[e]&&r[e].splice(r[e].indexOf(t)>>>0,1)},emit:function(e,t){(r[e]||[]).map((function(e){e(t)})),(r["*"]||[]).map((function(i){i(e,t)}))}});this._emitter=o,this.node=null;var s=this.config;if(s.autoConfigure&&this._autoConfigure(t),s.syncUrlsWithBaseTag){var a=document.getElementsByTagName("base")[0].getAttribute("href");o.on(k,(function(){return n.updateUrls("#",a)}))}var u=this._handleLocationChange.bind(this);this._handleLocationChange=u,s.listenLocationChangeEvent&&window.addEventListener(s.locationChangeEvent,u),s.locationChangeAngularEmitter&&E(s.locationChangeEvent),o.on(k,(function(e){s.moveGradientsOutsideSymbol&&S(e)})),o.on(I,(function(e){var t;s.moveGradientsOutsideSymbol&&S(e.parentNode),(y()||b())&&(t=[],g(e.querySelectorAll("style")).forEach((function(e){e.textContent+="",t.push(e)})))}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.prototype._autoConfigure=function(e){var t=this.config;void 0===e.syncUrlsWithBaseTag&&(t.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===e.locationChangeAngularEmitter&&(t.locationChangeAngularEmitter=void 0!==window.angular),void 0===e.moveGradientsOutsideSymbol&&(t.moveGradientsOutsideSymbol=v())},t.prototype._handleLocationChange=function(e){var t=e.detail,i=t.oldUrl,n=t.newUrl;this.updateUrls(i,n)},t.prototype.add=function(t){var i=e.prototype.add.call(this,t);return this.isMounted&&i&&(t.mount(this.node),this._emitter.emit(I,t.node)),i},t.prototype.attach=function(e){var t=this,i=this;if(i.isMounted)return i.node;var n="string"==typeof e?document.querySelector(e):e;return i.node=n,this.symbols.forEach((function(e){e.mount(i.node),t._emitter.emit(I,e.node)})),g(n.querySelectorAll("symbol")).forEach((function(e){var t=m.createFromExistingNode(e);t.node=e,i.add(t)})),this._emitter.emit(k,n),n},t.prototype.destroy=function(){var e=this.config,t=this.symbols,i=this._emitter;t.forEach((function(e){return e.destroy()})),i.off("*"),window.removeEventListener(e.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},t.prototype.mount=function(e,t){if(void 0===e&&(e=this.config.mountTo),void 0===t&&(t=!1),this.isMounted)return this.node;var i="string"==typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t&&i.childNodes[0]?i.insertBefore(n,i.childNodes[0]):i.appendChild(n),this._emitter.emit(k,n),n},t.prototype.render=function(){return p(this.stringify())},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},t.prototype.updateUrls=function(e,t){if(!this.isMounted)return!1;var i=document.querySelectorAll(this.config.usagesToUpdate);return C(this.node,i,w(e)+"#",w(t)+"#"),!0},Object.defineProperties(t.prototype,n),t}(h),M=e((function(e){var t,i,n,r,o;e.exports=(i=[],n=document,r=n.documentElement.doScroll,(o=(r?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState))||n.addEventListener("DOMContentLoaded",t=function(){for(n.removeEventListener("DOMContentLoaded",t),o=1;t=i.shift();)t()}),function(e){o?setTimeout(e,0):i.push(e)})}));window.__SVG_SPRITE__?x=window.__SVG_SPRITE__:(x=new D({attrs:{id:"__SVG_SPRITE_NODE__","aria-hidden":"true"}}),window.__SVG_SPRITE__=x);var P=function(){var e=document.getElementById("__SVG_SPRITE_NODE__");e?x.attach(e):x.mount(document.body,!0)};return document.body?P():M(P),x},e.exports=i()}).call(this,i(10))},9:function(e,t,i){window,e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i(i.s=20)}({20:function(e,t,i){"use strict";function n(e){return function(t,i,n){if(!e||!e.length)return n();for(var r=i&&i.length,o=function(t){var o=e[t]||{},s=o.predicate,a=o.message;return o.required&&!r||s&&r&&!s(i)?{v:n(new Error(a))}:void 0},s=0;s1)for(var i=1;i