1/*! WebPlayer built @2023/11/28 16:27:37 */ 2!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cyberplayer=t():e.cyberplayer=t()}(window,function(){var o=[function(e,t,i){t=function(){function l(e){return null==e?A.identity:A.isFunction(e)?e:A.property(e)}function e(s){return function(i,n,r){var a={};return n=l(n),E(i,function(e,t){t=n.call(r,e,t,i);s(a,t,e)}),a}}function s(){}var o={},r=Array.prototype,t=Object.prototype,i=Function.prototype,u=r.slice,a=r.concat,n=t.toString,h=t.hasOwnProperty,d=r.map,c=r.reduce,f=r.forEach,p=r.filter,m=r.every,g=r.some,_=r.indexOf,t=Array.isArray,y=Object.keys,v=i.bind,A=function(e){return e instanceof A?e:this instanceof A?void 0:new A(e)},E=A.each=A.forEach=function(e,t,i){if(null!=e)if(f&&e.forEach===f)e.forEach(t,i);else if(e.length===+e.length){for(var n=0,r=e.length;n<r;n++)if(t.call(i,e[n],n,e)===o)return}else for(var a=A.keys(e),n=0,r=a.length;n<r;n++)if(t.call(i,e[a[n]],a[n],e)===o)return;return e},b=(A.map=A.collect=function(e,n,r){var a=[];if(null!=e){if(d&&e.map===d)return e.map(n,r);E(e,function(e,t,i){a.push(n.call(r,e,t,i))})}return a},A.reduce=A.foldl=A.inject=function(e,n,r,a){var s=2<arguments.length;if(null==e&&(e=[]),c&&e.reduce===c)return a&&(n=A.bind(n,a)),s?e.reduce(n,r):e.reduce(n);if(E(e,function(e,t,i){s?r=n.call(a,r,e,t,i):(r=e,s=!0)}),s)return r;throw new TypeError("Reduce of empty array with no initial value")},A.find=A.detect=function(e,n,r){var a;return b(e,function(e,t,i){if(n.call(r,e,t,i))return a=e,!0}),a},A.filter=A.select=function(e,n,r){var a=[];if(null!=e){if(p&&e.filter===p)return e.filter(n,r);E(e,function(e,t,i){n.call(r,e,t,i)&&a.push(e)})}return a},A.reject=function(e,n,r){return A.filter(e,function(e,t,i){return!n.call(r,e,t,i)},r)},A.compact=function(e){return A.filter(e,A.identity)},A.every=A.all=function(e,n,r){n=n||A.identity;var a=!0;return null==e?a:m&&e.every===m?e.every(n,r):(E(e,function(e,t,i){if(!(a=a&&n.call(r,e,t,i)))return o}),!!a)},A.some=A.any=function(e,n,r){n=n||A.identity;var a=!1;return null==e?a:g&&e.some===g?e.some(n,r):(E(e,function(e,t,i){if(a=a||n.call(r,e,t,i))return o}),!!a)}),b=(A.size=function(e){return null==e?0:(e.length===+e.length?e:A.keys(e)).length},A.last=function(e,t,i){if(null!=e)return null==t||i?e[e.length-1]:u.call(e,Math.max(e.length-t,0))},A.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},A.before=function(e,t){var i;return function(){return 0<--e&&(i=t.apply(this,arguments)),e<=1&&(t=null),i}},A.groupBy=e(function(e,t,i){A.has(e,t)?e[t].push(i):e[t]=[i]}),A.indexBy=e(function(e,t,i){e[t]=i}),A.sortedIndex=function(e,t,i,n){for(var r=(i=l(i)).call(n,t),a=0,s=e.length;a<s;){var o=a+s>>>1;i.call(n,e[o])<r?a=1+o:s=o}return a},A.some=A.any=function(e,n,r){n=n||A.identity;var a=!1;return null==e?a:g&&e.some===g?e.some(n,r):(E(e,function(e,t,i){if(a=a||n.call(r,e,t,i))return o}),!!a)}),w=(A.contains=A.include=function(e,t){return null!=e&&(e.length!==+e.length&&(e=A.values(e)),0<=A.indexOf(e,t))},A.pluck=function(e,t){return A.map(e,A.property(t))},A.where=function(e,t){return A.filter(e,A.matches(t))},A.findWhere=function(e,t){return A.find(e,A.matches(t))},A.max=function(e,n,r){var a,s;return!n&&A.isArray(e)&&e[0]===+e[0]&&e.length<65535?Math.max.apply(Math,e):(s=a=-1/0,E(e,function(e,t,i){t=n?n.call(r,e,t,i):e;s<t&&(a=e,s=t)}),a)},A.difference=function(e){var t=a.apply(r,u.call(arguments,1));return A.filter(e,function(e){return!A.contains(t,e)})},A.without=function(e){return A.difference(e,u.call(arguments,1))},A.indexOf=function(e,t,i){if(null!=e){var n=0,r=e.length;if(i){if("number"!=typeof i)return e[n=A.sortedIndex(e,t)]===t?n:-1;n=i<0?Math.max(0,r+i):i}if(_&&e.indexOf===_)return e.indexOf(t,i);for(;n<r;n++)if(e[n]===t)return n}return-1},A.bind=function(i,n){var r,a;if(v&&i.bind===v)return v.apply(i,u.call(arguments,1));if(A.isFunction(i))return r=u.call(arguments,2),a=function(){if(!(this instanceof a))return i.apply(n,r.concat(u.call(arguments)));s.prototype=i.prototype;var e=new s,t=(s.prototype=null,i.apply(e,r.concat(u.call(arguments))));return Object(t)===t?t:e};throw new TypeError}
2,A.partial=function(r){var a=u.call(arguments,1);return function(){for(var e=0,t=a.slice(),i=0,n=t.length;i<n;i++)t[i]===A&&(t[i]=arguments[e++]);for(;e<arguments.length;)t.push(arguments[e++]);return r.apply(this,t)}},A.once=A.partial(A.before,2),A.memoize=function(t,i){var n={};return i=i||A.identity,function(){var e=i.apply(this,arguments);return A.has(n,e)?n[e]:n[e]=t.apply(this,arguments)}},A.delay=function(e,t){var i=u.call(arguments,2);return setTimeout(function(){return e.apply(null,i)},t)},A.defer=function(e){return A.delay.apply(A,[e,1].concat(u.call(arguments,1)))},A.throttle=function(i,n,r){function a(){h=!1===r.leading?0:A.now(),u=null,l=i.apply(s,o),s=o=null}var s,o,l,u=null,h=0;r=r||{};return function(){var e=A.now(),t=(h||!1!==r.leading||(h=e),n-(e-h));return s=this,o=arguments,t<=0?(clearTimeout(u),u=null,h=e,l=i.apply(s,o),s=o=null):u||!1===r.trailing||(u=setTimeout(a,t)),l}},A.keys=function(e){if(!A.isObject(e))return[];if(y)return y(e);var t,i=[];for(t in e)A.has(e,t)&&i.push(t);return i},A.invert=function(e){for(var t={},i=A.keys(e),n=0,r=i.length;n<r;n++)t[e[i[n]]]=i[n];return t},A.defaults=function(i){return E(u.call(arguments,1),function(e){if(e)for(var t in e)void 0===i[t]&&(i[t]=e[t])}),i},A.extend=function(i){return E(u.call(arguments,1),function(e){if(e)for(var t in e)i[t]=e[t]}),i},A.pick=function(t){var i={},e=a.apply(r,u.call(arguments,1));return E(e,function(e){e in t&&(i[e]=t[e])}),i},A.omit=function(e){var t,i={},n=a.apply(r,u.call(arguments,1));for(t in e)A.contains(n,t)||(i[t]=e[t]);return i},A.clone=function(e){return A.isObject(e)?A.isArray(e)?e.slice():A.extend({},e):e},A.isArray=t||function(e){return"[object Array]"==n.call(e)},A.isObject=function(e){return e===Object(e)},E(["Arguments","Function","String","Number","Date","RegExp"],function(t){A["is"+t]=function(e){return n.call(e)=="[object "+t+"]"}}),A.isArguments(arguments)||(A.isArguments=function(e){return!(!e||!A.has(e,"callee"))}),A.isFunction=function(e){return"function"==typeof e},A.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},A.isNaN=function(e){return A.isNumber(e)&&e!=+e},A.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"==n.call(e)},A.isNull=function(e){return null===e},A.isUndefined=function(e){return void 0===e},A.has=function(e,t){return h.call(e,t)},A.identity=function(e){return e},A.constant=function(e){return function(){return e}},A.property=function(t){return function(e){return e[t]}},A.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},A.matches=function(i){return function(e){if(e!==i)for(var t in i)if(i[t]!==e[t])return!1;return!0}},A.now=Date.now||function(){return(new Date).getTime()},A.result=function(e,t){if(null!=e)return t=e[t],A.isFunction(t)?t.call(e):t},0);return A.uniqueId=function(e){var t=++w+"";return e?e+t:t},A}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(12),i(0),i(92),i(65),i(29),i(56),i(93),i(94),i(32),i(140),i(141),i(142)],t=function(e,t,i,n,r,a,s,o,l,u,h,d){var c={log:function(){window.console&&console.log},between:function(e,t,i){return Math.max(Math.min(e,i),t)},foreach:function(e,t){for(var i in e)("function"!==c.typeOf(e.hasOwnProperty)||e.hasOwnProperty(i))&&t(i,e[i])}};return c.indexOf=t.indexOf,c.noop=function(){},c.seconds=e.seconds,c.prefix=e.prefix,c.suffix=e.suffix,t.extend(c,a,s,l,i,o,n,r,u,h,d),c}.apply(t,i);void 0!==t&&(e.exports=t)},,function(e,t,i){t=function(){var e={COMPLETE:"complete",ERROR:"error",JWPLAYER_AD_CLICK:"adClick",JWPLAYER_AD_COMPANIONS:"adCompanions",JWPLAYER_AD_COMPLETE:"adComplete",JWPLAYER_AD_ERROR:"adError",JWPLAYER_AD_IMPRESSION:"adImpression",JWPLAYER_AD_META:"adMeta",JWPLAYER_AD_PAUSE:"adPause",JWPLAYER_AD_PLAY:"adPlay",JWPLAYER_AD_SKIPPED:"adSkipped",JWPLAYER_AD_TIME:"adTime",JWPLAYER_CAST_AD_CHANGED:"castAdChanged",JWPLAYER_MEDIA_COMPLETE:"complete",JWPLAYER_READY:"ready",JWPLAYER_H265WEB_COVERLOADED:"coverImageLoaded",JWPLAYER_MEDIA_SEEK:"seek",JWPLAYER_MEDIA_BEFOREPLAY:"beforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"beforeComplete",JWPLAYER_MEDIA_BUFFER_FULL:"bufferFull",JWPLAYER_DISPLAY_CLICK:"displayClick",JWPLAYER_PLAYLIST_COMPLETE:"playlistComplete",JWPLAYER_CAST_SESSION:"cast",JWPLAYER_MEDIA_ERROR:"mediaError",JWPLAYER_MEDIA_FIRST_FRAME:"firstFrame",JWPLAYER_MEDIA_PLAY_ATTEMPT:"playAttempt",JWPLAYER_MEDIA_LOADED:"loaded",JWPLAYER_MEDIA_SEEKED:"seeked",JWPLAYER_SETUP_ERROR:"setupError",JWPLAYER_ERROR:"error",JWPLAYER_PLAYER_STATE:"state",JWPLAYER_CAST_AVAILABLE:"castAvailable",JWPLAYER_MEDIA_BUFFER:"bufferChange",JWPLAYER_MEDIA_TIME:"time",JWPLAYER_MEDIA_TYPE:"mediaType",JWPLAYER_MEDIA_VOLUME:"volume",JWPLAYER_MEDIA_MUTE:"mute",JWPLAYER_MEDIA_SEEK_START:"seekStart",JWPLAYER_MEDIA_SEEK_FINISHED:"seekFinished",JWPLAYER_MEDIA_META:"meta",JWPLAYER_MEDIA_LEVELS:"levels",JWPLAYER_MEDIA_LEVEL_CHANGED:"levelsChanged",JWPLAYER_CONTROLS:"controls",JWPLAYER_FULLSCREEN:"fullscreen",JWPLAYER_SCREENSHOT:"screenshot",JWPLAYER_CaptureFrameFinished:"captureFrameFinished",JWPLAYER_RESIZE:"resize",JWPLAYER_PLAYLIST_ITEM:"playlistItem",JWPLAYER_PLAYLIST_LOADED:"playlist",JWPLAYER_AUDIO_TRACKS:"audioTracks",JWPLAYER_AUDIO_TRACK_CHANGED:"audioTrackChanged",JWPLAYER_CONNECTING:"connecting",JWPLAYER_CONNECT_FAILD:"connectFaild",JWPLAYER_NO_LIVE_STREAM:"noLiveStream",JWPLAYER_ALIVE:"alive",JWPLAYER_VIDEO_SEI:"sei_info",JWPLAYER_LIVE_STOP:"liveStop",JWP
2LAYER_PLAYBACKRATE:"playbackRate",JWPLAYER_LOGO_CLICK:"logoClick",JWPLAYER_CAPTIONS_LIST:"captionsList",JWPLAYER_CAPTIONS_CHANGED:"captionsChanged",JWPLAYER_PROVIDER_CHANGED:"providerChanged",JWPLAYER_PROVIDER_FIRST_FRAME:"providerFirstFrame",JWPLAYER_USER_ACTION:"userAction",JWPLAYER_PROVIDER_CLICK:"providerClick",JWPLAYER_VIEW_TAB_FOCUS:"tabFocus",JWPLAYER_CONTROLBAR_DRAGGING:"scrubbing",JWPLAYER_INSTREAM_CLICK:"instreamClick",JWPLAYER_CUEPOINT:"cuepoint",JWPLAYER_SEEK_FORWARD_FORBIDDEN:"seekForwardForbidden",JWPLAYER_PERFORMANCE:"performance",JWPLAYER_RTCEVENT:"rtcEvent",JWPLAYER_HLS_QUALITYLIST_CHANGE:"hls_qualitylist_change",JWPLAYER_HLS_LEVEL_UPDATED:"hls_level_updated",JWPLAYER_CHANGE_LANGs:"change_lang",touchEvents:{DRAG:"drag",DRAG_START:"dragStart",DRAG_END:"dragEnd",CLICK:"click",DOUBLE_CLICK:"doubleClick",TAP:"tap",DOUBLE_TAP:"doubleTap",OVER:"over",MOVE:"move",OUT:"out"}};return e}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(d){var r=[].slice,l=/\s+/,c=function(e,t,i,n){if(i){if("object"==typeof i){for(var r in i)e[t].apply(e,[r,i[r]].concat(n));return!1}if(l.test(i)){for(var a=i.split(l),s=0,o=a.length;s<o;s++)e[t].apply(e,[a[s]].concat(n));return!1}}return!0},a=function(e,t,i){var n,r=-1,a=e.length,s=t[0],o=t[1],l=t[2];switch(t.length){case 0:for(;++r<a;)(n=e[r]).callback.call(n.context||i);return;case 1:for(;++r<a;)(n=e[r]).callback.call(n.context||i,s);return;case 2:for(;++r<a;)(n=e[r]).callback.call(n.context||i,s,o);return;case 3:for(;++r<a;)(n=e[r]).callback.call(n.context||i,s,o,l);return;default:for(;++r<a;)(n=e[r]).callback.apply(n.context||i,t);return}},s=function(e,t,i){for(var n,r=-1,a=e.length;++r<a;)try{(n=e[r]).callback.apply(n.context||i,t)}catch(e){}};return{on:function(e,t,i){return c(this,"on",e,[t,i])&&t&&(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:i})),this},once:function(e,t,i){var n,r;return c(this,"once",e,[t,i])&&t?(n=this,(r=d.once(function(){n.off(e,r),t.apply(this,arguments)}))._callback=t,this.on(e,r,i)):this},off:function(e,t,i){var n,r,a,s,o,l,u,h;if(this._events&&c(this,"off",e,[t,i]))if(e||t||i){for(o=0,l=(s=e?[e]:d.keys(this._events)).length;o<l;o++)if(e=s[o],a=this._events[e]){if(this._events[e]=n=[],t||i)for(u=0,h=a.length;u<h;u++)r=a[u],(t&&t!==r.callback&&t!==r.callback._callback||i&&i!==r.context)&&n.push(r);n.length||delete this._events[e]}}else this._events=void 0;return this},trigger:function(e){var t,i,n;return this._events&&(t=r.call(arguments,1),c(this,"trigger",e,t))&&(i=this._events[e],n=this._events.all,i&&a(i,t,this),n)&&a(n,arguments,this),this},triggerSafe:function(e){var t,i,n;return this._events&&(t=r.call(arguments,1),c(this,"trigger",e,t))&&(i=this._events[e],n=this._events.all,i&&s(i,t,this),n)&&s(n,arguments,this),this}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t){e.exports={H265WEBJS_COMPILE_MULTI_THREAD_SHAREDBUFFER:0,DEFAULT_PLAYERE_LOAD_TIMEOUT:20,DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",PLAYER_IN_TYPE_RTC:"rtc",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:30,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,PLAYER_CNATIVE_VOD_RETRY_MAX:7,URI_PROTOCOL_WEBSOCKET:"ws",URI_PROTOCOL_WEBSOCKET_DESC:"websocket",URI_PROTOCOL_HTTP:"http",URI_PROTOCOL_HTTP_DESC:"http",FETCH_FIRST_MAX_TIMES:5,FETCH_HTTP_FLV_TIMEOUT_MS:7e3,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:1001,CACHE_WITH_PLAY_SIGN:1002,CACHE_WITH_NOPLAY_SIGN:1003,V_CODEC_AVC_DEFAULT_FPS:25}},,,,,function(e,t,i){i=i(5);const r=[{format:"mp4",value:"mp4",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"mkv",value:"mp4",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"ps",value:"ts",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"265",value:"raw265",core:i.PLAYER_CORE_TYPE_DEFAULT},{format:"mp3",value:"mp3",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"aac",value:"aac",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"flac",value:"flac",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"ogg",value:"ogg",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"wav",value:"wav",core:i.PLAYER_CORE_TYPE_CNATIVE},{format:"opus",value:"opus",core:i.PLAYER_CORE_TYPE_CNATIVE}],a=[{format:i.URI_PROTOCOL_HTTP,value:i.URI_PROTOCOL_HTTP_DESC},{format:i.URI_PROTOCOL_WEBSOCKET,value:i.URI_PROTOCOL_WEBSOCKET_DESC}];e.exports={frameDataAlignCrop:function(t,i,n,e,r,a,s,o){if(0==t-e)return[a,s,o];var l=e*r,u=l/4,h=new Uint8Array(l),d=new Uint8Array(u),c=new Uint8Array(u),f=e,p=e/2;for(let e=0;e<r;e++)h.set(a.subarray(e*t,f),e*r);for(let e=0;e<r/2;e++)d.set(s.subarray(e*i,p),e*r/2);for(let e=0;e<r/2;e++)c.set(o.subarray(e*n,p),e*r/2);return[h,d,c]},GetUriFormat:function(t){if(null!=t)for(let e=0;e<r.length;e++){var i=r[e],n="."+i.format;if(0<=t.indexOf(n))return i.value}return r[0].value},GetFormatPlayCore:function(t){if(null!=t)for(let e=0;e<r.length;e++){var i=r[e];if(i.value===t)return i.core}return r[0].core},GetUriProtocol:function(t){if(null!=t)for(let e=0;e<a.length;e++){var i=a[e],n=i.format+"[s]{0,}://";if(0<=t.search(n))return i.value}return a[0].value},GetMsTime:function(){return(new Date).getTime()},GetScriptPath:function(e){return e=[(e=(e=e.toString()).match(/^\s*function\s*\(\s*\)\s*\{(([\s\S](?!\}$))*[\s\S])/))[1]],window.URL.createObjectURL(new Blob(e,{type:"text/javascript"}))},BrowserJudge:function(){let e=window.document,t=window.navigator,i=t.userAgent.toLowerCase(),n=e.documentMode,r=window.chrome||!1,a={agent:i,isIE:/msie/.test(i),isGecko:0<i.indexOf("gecko")&&i.indexOf("like gecko")<0,isWebkit:0<i.indexOf("webkit"),isStrict:"CSS1Compat"===e.compatMode,supportSubTitle:function(){return"track"in e.createElement("track")},supportScope:function(){return"scoped"in e.createElement("style")},ieVersion:function(){try{return i.match(/msie ([\d.]+)/)[1]||0}catch(e){return n}},operaVersion:function(){try{return window.opera?i.match(/opera.([\d.]+)/)[1]:0<i.indexOf("opr")?i.match(/opr\/([\d.]+)/)[1]:void 0}catch(e){return 0}},versionFilter:function(){if(1!==arguments.length||"string"!=typeof arguments[0])return 1===arguments.length?arguments[0]:0;var e=arguments[0],t=e.indexOf(".");if(0<t){t=e.indexOf(".",t+1);if(-1!==t)return e.substr(0,t)}return e}};try{a.type=a.isIE?"IE":window.opera||0<i.indexOf("opr")?"Opera":0<i.indexOf("chrome")?"Chrome":0<i.indexOf("safari")||window.openD
2atabase?"Safari":0<i.indexOf("firefox")?"Firefox":"unknow",a.version="IE"===a.type?a.ieVersion():"Firefox"===a.type?i.match(/firefox\/([\d.]+)/)[1]:"Chrome"===a.type?i.match(/chrome\/([\d.]+)/)[1]:"Opera"===a.type?a.operaVersion():"Safari"===a.type?i.match(/version\/([\d.]+)/)[1]:"0",a.shell=function(){var e,t;return 0<i.indexOf("maxthon")?(a.version=i.match(/maxthon\/([\d.]+)/)[1]||a.version,"岿¸¸æµè§å¨"):0<i.indexOf("qqbrowser")?(a.version=i.match(/qqbrowser\/([\d.]+)/)[1]||a.version,"QQæµè§å¨"):0<i.indexOf("se 2.x")?"æçæµè§å¨":r&&"Opera"!==a.type?(t=window.external,e=window.clientInformation.languages,t&&"LiebaoGetVersion"in t?"çè±¹æµè§å¨":0<i.indexOf("bidubrowser")?(a.version=i.match(/bidubrowser\/([\d.]+)/)[1]||i.match(/chrome\/([\d.]+)/)[1],"ç¾åº¦æµè§å¨"):a.supportSubTitle()&&void 0===e?(t=Object.keys(r.webstore).length,0 in window,1<t?"360æéæµè§å¨":"360å®å
¨æµè§å¨"):"Chrome"):a.type},a.name=a.shell(),a.version=a.versionFilter(a.version)}catch(e){}return[a.type,a.version]},ParseGetMediaURL:function(e,t="http"){if("ws"===(t="http"!==t&&"ws"!==t&&"wss"!==t&&(0<=e.indexOf("ws")||0<=e.indexOf("wss"))?"ws":t)||"wss"===t)return e;let i=e;return i=0<=e.indexOf(t)?e:"/"===e[0]?"/"===e[1]?t+":"+e:window.location.origin+e:":"===e[0]?t+e:(t=window.location.href.split("/"),window.location.href.replace(t[t.length-1],e))},IsSupport265Mse:function(){return MediaSource.isTypeSupported('video/mp4;codecs=hvc1.1.1.L63.B0"')}}},function(e,t,i){i=[i(4),i(3),i(0),i(1)],t=function(e,y,v,A){var E=!v.isUndefined(window.PointerEvent),t=!E&&A.isMobile(),b=!E&&!t,w=A.isFF()&&A.isOSX();function S(e,t){return(/touch/.test(e.type)?(e.originalEvent||e).changedTouches[0]:e)["page"+t]}function T(e,t,i){var n=!A.isPoorIE()&&t instanceof MouseEvent||!t.touches&&!t.changedTouches?t:(t.touches&&t.touches.length?t.touches:t.changedTouches)[0],r=document.documentElement.scrollLeft||document.body.scrollLeft,a=document.documentElement.scrollTop||document.body.scrollTop;return{type:e,target:t.target||t.srcElement,currentTarget:i,pageX:n.pageX||n.clientX+r,pageY:n.pageY||n.clientY+a}}function L(e){(A.isPoorIE()||e instanceof MouseEvent||e instanceof window.TouchEvent)&&(e.preventManipulation&&e.preventManipulation(),e.cancelable)&&e.preventDefault&&e.preventDefault()}function i(n,r){var a,s,o=n,l=!1,u=0,h=0,d=0,c=300;function e(e){(b||E&&"touch"!==e.pointerType)&&_(y.touchEvents.OVER,e)}function t(e){(b||E&&"touch"!==e.pointerType)&&_(y.touchEvents.MOVE,e)}function i(e){(b||E&&"touch"!==e.pointerType&&!n.contains(document.elementFromPoint(e.x,e.y)))&&_(y.touchEvents.OUT,e)}function f(e){var t,i;a=e.target,u=S(e,"X"),h=S(e,"Y"),i=(t=e)||window.event,(A.isPoorIE()||t instanceof MouseEvent)&&("which"in i?3===i.which:"button"in i&&2===i.button)||(E?e.isPrimary&&(r.preventScrolling&&(s=e.pointerId,n.setPointerCapture(s)),A.addEventListener(n,"pointermove",p),A.addEventListener(n,"pointercancel",m),A.addEventListener(n,"pointerup",m)):b&&(A.addEventListener(document,"mousemove",p),w&&"object"===e.target.nodeName.toLowerCase()?A.addEventListener(n,"click",m):A.addEventListener(document,"mouseup",m)),a&&(A.addEventListener(a,"touchmove",p),A.addEventListener(a,"touchcancel",m),A.addEventListener(a,"touchend",m)))}function p(e){var t,i,n=y.touchEvents;l?_(n.DRAG,e):(i=S(e,"X"),t=S(e,"Y"),36<(i=i-u)*i+(i=t-h)*i&&(_(n.DRAG_START,e),l=!0,_(n.DRAG,e))),r.preventScrolling&&L(e)}function m(e){var t=y.touchEvents;E?(r.preventScrolling&&n.releasePointerCapture(s),A.removeEventListener(n,"pointermove",p),A.removeEventListener(n,"pointercancel",m),A.removeEventListener(n,"pointerup",m)):b&&(A.removeEventListener(document,"mousemove",p),A.removeEventListener(document,"mouseup",m)),a&&(A.removeEventListener(a,"touchmove",p),A.removeEventListener(a,"touchcancel",m),A.removeEventListener(a,"touchend",m)),l?_(t.DRAG_END,e):r.directSelect&&e.target!==n||-1!==e.type.indexOf("cancel")||(E&&e instanceof window.PointerEvent?(e.pointerType,_(t.CLICK,e)):b?_(t.CLICK,e):(_(t.TAP,e),L(e))),a=null,l=!1}r=r||{},E?(A.addEventListener(n,"pointerdown",f),r.useHover&&(A.addEventListener(n,"pointerover",e),A.addEventListener(n,"pointerout",i)),r.useMove&&A.addEventListener(n,"pointermove",t)):b&&(A.addEventListener(n,"mousedown",f),r.useHover&&(A.addEventListener(n,"mouseover",e),A.addEventListener(n,"mouseout",i)),r.useMove)&&A.addEventListener(n,"mousemove",t),A.addEventListener(n,"touchstart",f);var g=this;function _(e,t){var i,n;!r.enableDoubleTap||e!==y.touchEvents.CLICK&&e!==y.touchEvents.TAP||(d=v.now()-d<c?(n=T(i=e===y.touchEvents.CLICK?y.touchEvents.DOUBLE_CLICK:y.touchEvents.DOUBLE_TAP,t,o),g.trigger(i,n),0):v.now()),n=T(e,t,o),g.trigger(e,n)}return this.triggerEvent=_,this.destroy=function(){A.removeEventListener(n,"touchstart",f),A.removeEventListener(n,"mousedown",f),a&&(A.removeEventListener(a,"touchmove",p),A.removeEventListener(a,"touchcancel",m),A.removeEventListener(a,"touchend",m)),E&&(r.preventScrolling&&n.releasePointerCapture(s),A.removeEventListener(n,"pointerover",e),A.removeEventListener(n,"pointerdown",f),A.removeEventListener(n,"pointermove",p),A.removeEventListener(n,"pointermove",t),A.removeEventListener(n,"pointercancel",m),A.removeEventListener(n,"pointerout",i),A.removeEventListener(n,"pointerup",m)),A.removeEventListener(n,"click",m),A.removeEventListener(n,"mouseover",e),A.removeEventListener(n,"mousemove",t),A.removeEventListener(n,"mouseout",i),A.removeEventListener(document,"mousemove",p),A.removeEventListener(document,"mouseup",m)},this}return v.extend(i.prototype,e),i}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(n){function r(e,t,i){for(e=""+e,i=i||"0";e.length<t;)e=i+e;return e}return{trim:function(e){return e.replace(/^\s+|\s+$/g,"")},pad:r,xmlAttribute:function(e,t){for(var i=0;i<e.attributes.length;i++)if(e.attributes[i].name&&e.attributes[i].name.toLowerCase()===t.toLowerCase())return e.attributes[i].value.toString();return""},extension:function(e){var t;return e&&"rtmp"!==e.substr(0,4)?(t=e,!!/[\(,]format=m3u8-/i.test(t)&&"m3u8"||(-1<(e=e.split("?")[0].split("#")[0]).lastIndexOf(".")?e.substr(e.lastIndexOf(".")+1,e.length).toLowerCase():void 0)):""},hms:function(e){var t=parseInt(e/3600),i=parseInt(e/60)%60,e=e%60;return r(t,2)+":"+r(i,2)+":"+r(e.toFixed(3),6)},seconds:function(e){var t,i;return n.isNumber(e)?e:(t=(e=e.replace(",",".")).split(":"),i=0,"s"===e.slice(-1)?i=p
2arseFloat(e):"m"===e.slice(-1)?i=60*parseFloat(e):"h"===e.slice(-1)?i=3600*parseFloat(e):1<t.length?(i=parseFloat(t[t.length-1]),i+=60*parseFloat(t[t.length-2]),3===t.length&&(i+=3600*parseFloat(t[t.length-3]))):i=parseFloat(e),i)},suffix:function(e,t){return n.map(e,function(e){return e+t})},prefix:function(e,t){return n.map(e,function(e){return t+e})}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){e.exports=i(179).default},function(e,t,i){"use strict";i.r(t),i.d(t,"ErrorTypes",function(){return n}),i.d(t,"ErrorDetails",function(){return r}),i.d(t,"ErrorEvent",function(){return a});const n={NOT_SUPPORT:"NotSupport",NETWORK_ERROR:"networkError",OTHER:"other"},r={NOT_SUPPORT_DETAIL:"play format not support",RECONNECT_ERROR_DETAIL:"reconnect is timeout"},a={TIMEOUT:"timeout",ERROR:"error"}},function(e,t,i){t=function(){return{BUFFERING:"buffering",IDLE:"idle",COMPLETE:"complete",PAUSED:"paused",PLAYING:"playing",ERROR:"error",LOADING:"loading",STALLED:"stalled"}}.apply(t,[]);void 0!==t&&(e.exports=t)},,,function(e,t,i){"use strict";t.__esModule=!0,t.extend=o,t.indexOf=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}return a.test(e)?e.replace(r,s):e},t.isEmpty=function(e){return!e&&0!==e||!(!h(e)||0!==e.length)},t.createFrame=function(e){var t=o({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,a=/[&<>"'`=]/;function s(e){return n[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var i in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],i)&&(e[i]=arguments[t][i]);return e}var l=Object.prototype.toString,u=(t.toString=l,function(e){return"function"==typeof e}),h=(u(/x/)&&(t.isFunction=u=function(e){return"function"==typeof e&&"[object Function]"===l.call(e)}),t.isFunction=u,Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===l.call(e)});t.isArray=h},,,,function(e,t,i){"use strict";i.r(t),i.d(t,"getPlayerPath",function(){return l}),i.d(t,"loadWasm",function(){return n}),i.d(t,"setPerformance",function(){return r});var t=i(113),s=i.n(t),t=i(1),o=i.n(t);const l=(e=0)=>{var t=document.getElementsByTagName("script"),i=null;for(let e=0;e<t.length;e++)if(t[e].src.includes("cyberplayer.js")&&!t[e].src.includes("sdk-player")){i=t[e].src.substring(0,t[e].src.lastIndexOf("/")+1);break}return i},n=e=>{var t=document.getElementsByTagName("html"),i=s.a.simd(),n=l();let r=document.getElementById("cyberplayer-wasm");var a=o.a.isSafari();r&&e(),r||((r=document.createElement("script")).type="text/javascript",r.id="cyberplayer-wasm",r.src=i&&!a?n+"missile-simd.js":n+"missile.js",t[0].appendChild(r)),r.addEventListener("load",()=>{e()})},r=e=>{}},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var t=i(24),n=i.n(t);function r(){return n()('/*! WebPlayer built @2023/11/28 16:27:37 */!function(r){var s={};function a(e){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,a),t.l=!0,t)).exports}a.m=r,a.c=s,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)a.d(r,s,function(e){return t[e]}.bind(null,s));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=2)}([function(e,t){e.exports={DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNEL:1,H264AUD:[0,0,0,1,9,224],H265AUD:[0,0,0,1,70,1,80],DEF_AAC:"aac",DEF_MP3:"mp3",DEF_H265:"h265",DEF_HEVC:"hevc",DEF_H264:"h264",DEF_AVC:"avc",CODEC_OFFSET_TABLE:["hevc","h265","avc","h264","aac","mp3"]}},function(e,t,r){e.exports=function(){"use strict";return{bigInt:()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),multiValue:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),saturatedFloatToInt:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),tailCall:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads:()=>(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}}()},function(e,t,r){"use strict";r.r(t);var t=r(1),s=r.n(t),t=r(0),m=r.n(t);self.Module={onRuntimeInitialized:function(){self.decoder&&self.decoder.onWasmLoaded()}
2,postRun:function(){self.decoder&&self.decoder.onPostRun()}},self.wasmPath=null;self.onmessage=e=>{var t=e["data"];switch(t.t){case 0:self.decoder.initDecoder(t.data);break;case 1:self.decoder.decodeVideo(t);break;case 2:self.decoder.returnVideoBuffer(t.f);break;case 11:self.decoder.initDemuxer();break;case 12:self.decoder.demuxCore(t);break;case 13:self.decoder.getReadLayer(t);break;case 14:self.decoder.release();break;case 15:self.decoder.releaseTsDemuxer();case 111:self.decoder.loadJs(t.pathUrl,t.isSafari)}},self.decoder=new class{constructor(){this.wasmLoaded=!1,this.videoCallback=null,this.vcodecerPtr=null,this.playerData=null,this.videoFrameBuffer=[],this.time=null,this.decodeTime=null,this.oneScondTime=(new Date).getTime(),this.frameRate=null,this.naluLayer={vps:null,sps:null,pps:null,sei:null},this.vlcLayer={vlc:null},this.offsetDemux=null,this.mediaAttr={},this.extensionInfo={vWidth:0,vHeight:0},this.isReadDemuxData=!1}initDecoder(e){this.playerData=e,this.vcodecerPtr=Module.cwrap("registerPlayer","number",["string","string"])(e.token,e.playerVersion);let u=this;this.videoCallback=Module.addFunction(function(e,t,r,s,a,i,n,o,d){var e=Module.HEAPU8.subarray(e,e+s*o),t=Module.HEAPU8.subarray(t,t+a*o/2),r=Module.HEAPU8.subarray(r,r+i*o/2);0<self.decoder.videoFrameBuffer.length&&self.decoder.videoFrameBuffer[0].y.length<s*o&&(self.decoder.videoFrameBuffer=[]);let l=null;0<self.decoder.videoFrameBuffer.length?((l={t:1,y:self.decoder.videoFrameBuffer[0].y,u:self.decoder.videoFrameBuffer[0].u,v:self.decoder.videoFrameBuffer[0].v,height:o,width:s,ptsSec:+d/1e3,stride_y:s,stride_u:a,stride_v:i}).y.set(e),l.u.set(t),l.v.set(r),self.decoder.videoFrameBuffer.shift()):l={t:1,y:new Uint8Array(e),u:new Uint8Array(t),v:new Uint8Array(r),height:o,width:s,ptsSec:+d/1e3,stride_y:s,stride_u:a,stride_v:i},u.frameRate++,u.oneScondTime&&1e3<(new Date).getTime()-u.oneScondTime&&(e=JSON.parse(JSON.stringify(u.frameRate)),u.frameRate=0,u.oneScondTime=(new Date).getTime(),self.postMessage({t:3,frameRate:e,decodeTime:parseInt(1e3/e)})),self.postMessage(l,[l.y.buffer,l.u.buffer,l.v.buffer])},"viiiiiiiid"),Module.cwrap("setCodecType","number",["number","number","number"])(this.vcodecerPtr,e.videoCodec,this.videoCallback),Module.cwrap("initializeDecoder","number",["number"])(this.vcodecerPtr),self.postMessage({t:2})}decodeVideo(e){var{nalBuf:e,pts:t,flushDecoder:r}=e,s=Module._malloc(e.length),t=(Module.HEAP8.set(e,s),parseInt(1e3*t));Module.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(this.vcodecerPtr,s,e.length,t,r),Module._free(s)}onWasmLoaded(){this.wasmLoaded||(this.wasmLoaded=!0,self.postMessage({t:0}))}returnVideoBuffer(e){this.videoFrameBuffer.length<10&&this.videoFrameBuffer.push(e)}loadJs(e,t){t=s.a.simd()&&!t?e+"missile-simd.js":e+"missile.js";self.wasmPath=e,self.importScripts(t)}onPostRun(){self.postMessage({t:11})}initDemuxer(){Module.cwrap("initTsMissile","number",[])(),Module.cwrap("initializeDemuxer","number",[])(),self.postMessage({t:12})}releaseTsDemuxer(){Module.cwrap("exitTsMissile","number",[])()}releaseOffset(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(Module._free(this.offsetDemux),this.offsetDemux=null)}demuxBox(e){var{d:e,isLive:t}=e,e=(this.offsetDemux=Module._malloc(e.length),Module.HEAP8.set(e,this.offsetDemux),Module.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,t));0<=e?(this.setMediaInfo(),this.setExtensionInfo(),postMessage({t:14,mediaAttr:this.mediaAttr,extensionInfo:this.extensionInfo})):postMessage({t:20,type:"demux",message:"demux error"})}setMediaInfo(){var e=Module.cwrap("getMediaInfo","number",[])(),t=Module.HEAPU32[e/4],r=Module.HEAPU32[e/4+1],s=Module.HEAPF64[e/8+1],a=Module.HEAPF64[e/8+1+1],i=Module.HEAPF64[e/8+1+1+1],n=Module.HEAPF64[e/8+1+1+1+1],e=Module.HEAPU32[e/4+2+2+2+2+2],s=(this.mediaAttr.vFps=s,this.mediaAttr.vGop=e,this.mediaAttr.vDuration=a,this.mediaAttr.aDuration=i,this.mediaAttr.duration=n,Module.cwrap("getAudioCodecID","number",[])()),e=(0<=s?(this.mediaAttr.aCodec=m.a.CODEC_OFFSET_TABLE[s],this.mediaAttr.sampleRate=0<t?t:m.a.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=0<=r?r:m.a.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0),Module.cwrap("getVideoCodecID","number",[])());0<=e&&(this.mediaAttr.vCodec=m.a.CODEC_OFFSET_TABLE[e])}setExtensionInfo(){var e=Module.cwrap("getExtensionInfo","number",[])(),t=Module.HEAPU32[e/4],e=Module.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=e}demuxCore(e){this.releaseOffset(),this.refreshDemuxer(),this.demuxBox(e)}refreshDemuxer(){this.releaseTsDemuxer(),this.initDemuxer()}getReadLayer(){var e=Module.cwrap("getPacket","number",[])(),t=Module.HEAPU32[e/4],r=Module.HEAPU32[e/4+1],s=Module.HEAPF64[e/8+1],a=Module.HEAPF64[e/8+1+1],i=Module.HEAPU32[e/4+1+1+2+2];if(0==t||1==t){var e=Module.HEAPU32[e/4+1+1+2+2+1],e=Module.HEAPU8.subarray(e,e+r),n=new Uint8Array(e),o=Module.cwrap("getSPSLen","number",[])(),d=Module.cwrap("getSPS","number",[])();if(!(o<0)){var l,d=Module.HEAPU8.subarray(d,d+o),o=(this.naluLayer.sps=new Uint8Array(o),this.naluLayer.sps.set(d,0),Module.cwrap("getPPSLen","number",[])()),u=Module.cwrap("getPPS","number",[])(),u=Module.HEAPU8.subarray(u,u+o),o=(this.naluLayer.pps=new Uint8Array(o),this.naluLayer.pps.set(u,0),Module.cwrap("getSEILen","number",[])()),c=Module.cwrap("getSEI","number",[])(),c=Module.HEAPU8.subarray(c,c+o),o=(this.naluLayer.sei=new Uint8Array(o),this.naluLayer.sei.set(c,0),Module.cwrap("getVLCLen","number",[])()),f=Module.cwrap("getVLC","number",[])(),f=Module.HEAPU8.subarray(f,f+o);this.vlcLayer.vlc=new Uint8Array(o),this.vlcLayer.vlc.set(f,0),this.mediaAttr.vCodec==m.a.DEF_HEVC||this.mediaAttr.vCodec==m.a.DEF_H265?(o=Module.cwrap("getVPSLen","number",[])(),l=Module.cwrap("getVPS","number",[])(),l=Module.HEAPU8.subarray(l,l+o),this.naluLayer.vps=new Uint8Array(o),this.naluLayer.vps.set(l,0),Module._free(l),l=null):this.mediaAttr.vCodec!=m.a.DEF_AVC&&(this.mediaAttr.vCodec,m.a.DEF_H264);try{postMessage({t:13,type:t,size:r,ptime:s,dtime:a,keyframe:i,src:n,layer:{nalu:this.naluLayer,vlc:this.vlcLayer}},[n.buffer,this.vlcLayer.vlc.buffer]),this.getReadLayer()}catch(e){}Module._free(e),Module._free(d),Module._free(u),Module._free(c),Module._free(f)}}}release(){Module.cwrap("release","number",["number"])(this.vcodecerPtr),Module.cwrap("exitMissile","number",["number"])(this.vcodecerPtr)}}}]);',"Worker",void 0,i.p+"decoder.worker.worker.js")}},function(e,t,i){"use strict";e.exports=function(t,i,n,r){var a,s=self||window;try{try{try{a=new s.Blob([t])}catch(e){(a=new(s.BlobBuilder||s.WebKitBlobBuilder||s.MozBlobBuilder||s.MSBlobBuilder)).append(t),a=a.getBlob()}var e=s.URL||s.webkitURL,o=e.createObjectURL(a),l=new s[i](o,n);return e.revokeObjectURL(o),l}catch(e){return new s[i]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(e){if(r)return new s[i](r,n);throw Error("Inline worker is not supported")}}},function(e,t){e.exports={PLAYER_VERSION:"4.3.1.0"}},function(e,t,i){const s=i(37);e.exports=()=>{let a={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:(e,t,i=!0,n=!1)=>{var t=new s.BufferFrame(e,n,t,i),r=parseInt(e);return i?(a.videoBuffer.length-1>=r?a.videoBuffer[r].push(t):a.videoBuffer.push([t]),n&&!a.idrIdxBuffer.includes(e)&&a.idrIdxBuffer.push(e)):a.audioBuffer.length-1>=r&&null!=a.audioBuffer[r]&&null!=a.audioBuffer[r]?a.audioBuffer[r]&&a.audioBuffer[r].push(t):a.audioBuffer.push([t]),!0},appendFrameWithDts:(e,t,i,n=!0,r=!1)=>{e=s.ConstructWithDts(e,t,r,i,n),i=parseInt(t);return n?(a.videoBuffer.length-1>=i?a.videoBuffer[i].push(e):a.videoBuffer.push([e]),r&&!a.idrIdxBuffer.includes(t)&&a.idrIdxBuffer.push(t)):a.audioBuffer.length-1>=i&&null!=a.audioBuffer[i]&&null!=a.audioBuffer[i]?a.audioBuffer[i]&&a.audioBuffer[i].push(e):a.audioBuffer.push([e]),!0},appendFrameByBufferFrame:e=>{var t=e.pts,i=parseInt(t);return e.video?(a.videoBuffer.length-1>=i?a.videoBuffer[i].push(e):a.videoBuffer.push([e]),isKey&&!a.idrIdxBuffer.includes(t)&&a.idrIdxBuffer.push(t)):a.audioBuffer.length-1>=i?a.audioBuffer[i].push(e):a.audioBuffer.push([e]),!0},cleanPipeline:()=>{a.videoBuffer.length=0,a.audioBuffer.length=0,a.videoBuffer=[],a.audioBuffer=[]},vFrame:(e=-1)=>
2{if(!(e<0||e>a.videoBuffer.length-1))return a.videoBuffer[e]},aFrame:(e=-1)=>{if(!(e<0||e>a.audioBuffer.length-1))return a.audioBuffer[e]},seekIDR:(e=-1)=>{if(e<0)return null;if(a.idrIdxBuffer.includes(e))return e;for(let t=0;t<a.idrIdxBuffer.length;t++)if(t===a.idrIdxBuffer.length-1||a.idrIdxBuffer[t]<e&&a.idrIdxBuffer[t+1]>e||0===t&&a.idrIdxBuffer[t]>=e){for(let e=1;0<=e;e--){var i=t-e;if(0<=i)return a.idrIdxBuffer[i]}return a.idrIdxBuffer[t]}}};return a}},function(e,t,i){"use strict";t.__esModule=!0;var l=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function u(e,t){for(var t=t&&t.loc,i=void 0,n=void 0,r=void 0,a=void 0,s=(t&&(i=t.start.line,n=t.end.line,r=t.start.column,a=t.end.column,e+=" - "+i+":"+r),Error.prototype.constructor.call(this,e)),o=0;o<l.length;o++)this[l[o]]=s[l[o]];Error.captureStackTrace&&Error.captureStackTrace(this,u);try{t&&(this.lineNumber=i,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:r,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=r,this.endColumn=a))}catch(e){}}u.prototype=new Error,t.default=u,e.exports=t.default},,function(e,t,i){i=[i(12),i(139)],t=function(o,a){function s(e,t){if(null!=e){void 0===e.length&&(e=[e]);var i,n={};for(i in t)n[i]=function(e,t,i){if(""===t||null==t)return"";i=i?" !important":"";if("string"==typeof t&&isNaN(t))return/png|gif|jpe?g/i.test(t)&&t.indexOf("url")<0?"url("+t+")":t+i;if(0===t||"z-index"===e||"opacity"===e)return t+i;if(/color/i.test(e))return"#"+o.pad(t.toString(16).replace(/^0x/i,""),6)+i;return Math.ceil(t)+"px"+i}(i,t[i]);for(var r=0;r<e.length;r++){var a,s=e[r];if(null!=s)for(i in n)a=function(e){e=e.split("-");for(var t=1;t<e.length;t++)e[t]=e[t].charAt(0).toUpperCase()+e[t].slice(1);return e.join("")}(i),s.style[a]!==n[i]&&(s.style[a]=n[i])}}}return{css:function(e,t,i){i=i||"all-players";var n,r="";"object"==typeof t?(n=document.createElement("div"),s(n,t),r="{"+n.style.cssText+"}"):"string"==typeof t&&(r=t),a.style([[e,e+r]],i)},style:s,clearCss:a.clear,transform:function(e,t){s(e,{transform:t,webkitTransform:t,msTransform:t,mozTransform:t,oTransform:t})},animation:function(e,t){s(e,{animation:t,webkitAnimation:t,msAnimation:t,mozAnimation:t,oAnimation:t})},hexToRgba:function(e,t){var i="rgb",e=(e?3===(e=String(e).replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)):e="000000",[parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16),parseInt(e.substr(4,2),16)]);return void 0!==t&&100!==t&&(i+="a",e.push(t/100)),i+"("+e.join(",")+")"}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){e.exports=function(){"use strict";function S(){S=function(){return s};var s={},e=Object.prototype,l=e.hasOwnProperty,u=Object.defineProperty||function(e,t,i){e[t]=i.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",i=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function a(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(e){a=function(e,t,i){return e[t]=i}}function o(e,t,i,n){var r,a,s,o,t=t&&t.prototype instanceof c?t:c,t=Object.create(t.prototype),n=new E(n||[]);return u(t,"_invoke",{value:(r=e,a=i,s=n,o="suspendedStart",function(e,t){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===e)throw t;return{value:void 0,done:!0}}for(s.method=e,s.arg=t;;){var i=s.delegate;if(i){i=function e(t,i){var n=i.method,r=t.iterator[n];if(void 0===r)return i.delegate=null,"throw"===n&&t.iterator.return&&(i.method="return",i.arg=void 0,e(t,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;n=h(r,t.iterator,i.arg);if("throw"===n.type)return i.method="throw",i.arg=n.arg,i.delegate=null,d;r=n.arg;return r?r.done?(i[t.resultName]=r.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=void 0),i.delegate=null,d):r:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,d)}(i,s);if(i){if(i===d)continue;return i}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===o)throw o="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);o="executing";i=h(r,a,s);if("normal"===i.type){if(o=s.done?"completed":"suspendedYield",i.arg===d)continue;return{value:i.arg,done:s.done}}
vendor: 4,300 bytes, line 2
2"throw"===i.type&&(o="completed",s.method="throw",s.arg=i.arg)}})}),t}function h(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}s.wrap=o;var d={};function c(){}function f(){}function p(){}var t={},m=(a(t,n,function(){return this}),Object.getPrototypeOf),m=m&&m(m(b([]))),g=(m&&m!==e&&l.call(m,n)&&(t=m),p.prototype=c.prototype=Object.create(t));function _(e){["next","throw","return"].forEach(function(t){a(e,t,function(e){return this._invoke(t,e)})})}function y(s,o){var t;u(this,"_invoke",{value:function(i,n){function e(){return new o(function(e,t){!function t(e,i,n,r){var a,e=h(s[e],s,i);if("throw"!==e.type)return(i=(a=e.arg).value)&&"object"==typeof i&&l.call(i,"__await")?o.resolve(i.__await).then(function(e){t("next",e,n,r)},function(e){t("throw",e,n,r)}):o.resolve(i).then(function(e){a.value=e,n(a)},function(e){return t("throw",e,n,r)});r(e.arg)}(i,n,e,t)})}return t=t?t.then(e,e):e()}})}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function b(t){if(t){var i,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return i=-1,(e=function e(){for(;++i<t.length;)if(l.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e}).next=e}return{next:w}}function w(){return{value:void 0,done:!0}}return u(g,"constructor",{value:f.prototype=p,configurable:!0}),u(p,"constructor",{value:f,configurable:!0}),f.displayName=a(p,r,"GeneratorFunction"),s.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a(e,r,"GeneratorFunction")),e.prototype=Object.create(g),e},s.awrap=function(e){return{__await:e}},_(y.prototype),a(y.prototype,i,function(){return this}),s.AsyncIterator=y,s.async=function(e,t,i,n,r){void 0===r&&(r=Promise);var a=new y(o(e,t,i,n),r);return s.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},_(g),a(g,r,"Generator"),a(g,n,function(){return this}),a(g,"toString",function(){return"[object Generator]"}),s.keys=function(e){var t,i=Object(e),n=[];for(t in i)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in i)return e.value=t,e.done=!1,e}return e.done=!0,e}},s.values=b,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(i){if(this.done)throw i;var n=this;function e(e,t){return a.type="throw",a.arg=i,n.next=e,t&&(n.method="next",n.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t],a=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var s=l.call(r,"catchLoc"),o=l.call(r,"finallyLoc");if(s&&o){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;0<=i;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&l.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}var a=(r=r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc?null:r)?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var i=this.tryEntries[t];
2if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),A(i),d}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var i,n,r=this.tryEntries[t];if(r.tryLoc===e)return"throw"===(i=r.completion).type&&(n=i.arg,A(r)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:b(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),d}},s}function l(e,t,i,n,r,a,s){try{var o=e[a](s),l=o.value}catch(e){return i(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function n(o){return function(){var e=this,s=arguments;return new Promise(function(t,i){var n=o.apply(e,s);function r(e){l(n,t,i,r,a,"next",e)}function a(e){l(n,t,i,r,a,"throw",e)}r(void 0)})}}function e(e,t){for(var i,n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);t=t.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))?i:String(i),r)}}var r,f,t={exports:{}};function i(){}function a(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(e,t,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new a(i,n||e,r),n=f?f+t:t;return e._events[n]?e._events[n].fn?e._events[n]=[e._events[n],i]:e._events[n].push(i):(e._events[n]=i,e._eventsCount++),e}function u(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function o(){this._events=new i,this._eventsCount=0}v=t,r=Object.prototype.hasOwnProperty,f="~",Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(f=!1)),o.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)r.call(e,t)&&i.push(f?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var e=f?f+e:e,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var i=0,n=t.length,r=new Array(n);i<n;i++)r[i]=t[i].fn;return r},o.prototype.listenerCount=function(e){e=f?f+e:e,e=this._events[e];return e?e.fn?1:e.length:0},o.prototype.emit=function(e,t,i,n,r,a){var s=f?f+e:e;if(!this._events[s])return!1;var o,l=this._events[s],u=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,i),!0;case 4:return l.fn.call(l.context,t,i,n),!0;case 5:return l.fn.call(l.context,t,i,n,r),!0;case 6:return l.fn.call(l.context,t,i,n,r,a),!0}for(c=1,o=new Array(u-1);c<u;c++)o[c-1]=arguments[c];l.fn.apply(l.context,o)}else for(var h,d=l.length,c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),u){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,i);break;case 4:l[c].fn.call(l[c].context,t,i,n);break;default:if(!o)for(h=1,o=new Array(u-1);h<u;h++)o[h-1]=arguments[h];l[c].fn.apply(l[c].context,o)}return!0},o.prototype.on=function(e,t,i){return s(this,e,t,i,!1)},o.prototype.once=function(e,t,i){return s(this,e,t,i,!0)},o.prototype.removeListener=function(e,t,i,n){e=f?f+e:e;if(this._events[e])if(t){var r=this._events[e];if(r.fn)r.fn!==t||n&&!r.once||i&&r.context!==i||u(this,e);else{for(var a=0,s=[],o=r.length;a<o;a++)(r[a].fn!==t||n&&!r[a].once||i&&r[a].context!==i)&&s.push(r[a]);s.length?this._events[e]=1===s.length?s[0]:s:u(this,e)}}else u(this,e);return this},o.prototype.removeAllListeners=function(e){return e?(e=f?f+e:e,this._events[e]&&u(this,e)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=f,v.exports=o.EventEmitter=o;var h=(v=t.exports)&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v,d=((t={}).REMOTE_STREAM_ADD="remoteStreamAdd",t.CONNECTION_STATE_CHANGE="connectionStateChange",t.CANDIDATE_ERROR="candidateError",t.ON_DATA_CHANNEL_OPEN="onDataChannelOpen",t.ON_DATA_CHANNEL_MSG="onDataChannelMsg",t.ON_DATA_CHANNEL_ERROR="onDataChannelError",t.ON_DATA_CHANNEL_CLOSE="onDataChannelClose",t.RE_CONNECTING="reConnecting",t.RE_CONNECT_FAILED="reConnectFailed",t.RE_CONNECT_SUCCESS="reConnectSuccess",t.ERROR="error",t),c=function(){},p={trace:c,debug:c,log:c,warn:c,info:c,error:c},m=p;function g(i){for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];t.forEach(function(e){var t;m[e]=i[e]?i[e].bind(i):(t=self.console[e])?t.bind(self.console,"["+e+"] >"):c})}var _,y,v,A=m,E=((v={}
2).NETWORK_ERROR="networkError",v.CONNECTION_ERROR="connectionError",v),b=((t={}).HTTP_LOAD_ERROR="httpLoadError",t),w=(k.prototype.load=function(r,e){return new Promise(function(n){fetch(r,e).then(function(e){return e.json()}).then(function(e){var t=e.code,i=e.msg;n(0!=t?{type:E.NETWORK_ERROR,details:b.HTTP_LOAD_ERROR,code:t,msg:i,url:r}:e)}).catch(function(e){var t=e?e.code||-1:0,e=e?e.message:null;n({type:E.NETWORK_ERROR,details:b.HTTP_LOAD_ERROR,code:t,msg:e,url:r})})})},k),T=((v=L.prototype)._initPeerConnection=function(){this.pc=new RTCPeerConnection,this._addEvent()},v._addEvent=function(){var e;this.pc.addEventListener("icecandidate",this._onIceCandidate.bind(this)),this.pc.addEventListener("track",this._onTrack.bind(this)),this.pc.addEventListener("icecandidateerror",this._onIceCandidateError.bind(this)),this.pc.addEventListener("iceconnectionstatechange",this._onConnectionStateChange.bind(this)),null!=(e=this.rtcPlayer)&&null!=(e=e.rtcConfig)&&e.usedatachanne&&(this.datachannel=this.pc.createDataChannel("chat"),this.datachannel.addEventListener("open",this._onDataChannelOpen.bind(this)),this.datachannel.addEventListener("message",this._onDataChannelMsg.bind(this)),this.datachannel.addEventListener("close",this._onDataChannelClose.bind(this)),this.datachannel.addEventListener("error",this._onDataChannelError.bind(this)))},v._onIceCandidate=function(){},v._onTrack=function(e){this.rtcPlayer.trigger(d.REMOTE_STREAM_ADD,{MediaStream:e.streams[0]})},v._onIceCandidateError=function(){},v._onConnectionStateChange=function(e){"disconnected"===this.pc.iceConnectionState&&(this.isReConnect=!0,this.reConnecting(),this.rtcPlayer.trigger(d.RE_CONNECTING,{type:d.RE_CONNECTING})),"connected"===this.pc.iceConnectionState&&this.isReConnect&&this.reConnectSuccess(),this.rtcPlayer.trigger(d.CONNECTION_STATE_CHANGE,{state:this.pc.iceConnectionState})},v._onDataChannelOpen=function(){this.rtcPlayer.trigger(d.ON_DATA_CHANNEL_OPEN,{type:d.ON_DATA_CHANNEL_OPEN})},v._onDataChannelMsg=function(e){this.rtcPlayer.trigger(d.ON_DATA_CHANNEL_MSG,{data:e})},v._onDataChannelClose=function(){this.rtcPlayer.trigger(d.ON_DATA_CHANNEL_CLOSE,{type:d.ON_DATA_CHANNEL_CLOSE})},v._onDataChannelError=function(){this.rtcPlayer.trigger(d.ON_DATA_CHANNEL_ERROR,{type:d.ON_DATA_CHANNEL_ERROR})},v.subscribeLiveStream=(y=n(S().mark(function e(){var s=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var i=n(S().mark(function e(t,i){var n,r,a;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.pc.addTransceiver("video",{direction:"recvonly",sendEncodings:[]}),s.pc.addTransceiver("audio",{direction:"recvonly",sendEncodings:[]}),e.next=4,s.pc.createOffer();case 4:return n=e.sent,e.next=7,s.pc.setLocalDescription(n);case 7:return e.prev=7,e.next=10,s.fetch.load(s.rtcPlayer.rtcConfig.serverUrl||"",{method:"post",body:n.sdp,headers:{"Content-Type":"text/plain;charset=utf-8"}});case 10:if(0==(r=e.sent).code)return a=r.sdp,a={sdp:a,type:"answer"},e.next=17,s.pc.setRemoteDescription(a);e.next=19;break;case 17:e.next=20;break;case 19:s.rtcPlayer.trigger(d.ERROR,r);case 20:t(r),e.next=27;break;case 23:e.prev=23,e.t0=e.catch(7),A.warn("subscribeLiveStream fetch: "+e.t0.message),i(e.t0);case 27:case"end":return e.stop()}},e,null,[[7,23]])}));return function(e,t){return i.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e)})),function(){return y.apply(this,arguments)}),v.getstats=function(){},v.sendMsg=function(e){try{this.datachannel.send(e)}catch(e){this.rtcPlayer.trigger(d.ERROR,{type:"datachannelSend",err:e})}},v.reConnecting=(_=n(S().mark(function e(){var t,i=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closeReconnect(),t=JSON.parse(JSON.stringify(this.reConnectNumber)),t=this.reConnectTime/t,"connected"!=this.pc.iceConnectionState)return this.destroyPc(),this._initPeerConnection(),e.next=8,this.subscribeLiveStream();e.next=10;break;case 8:e.next=12;break;case 10:return this.reConnectSuccess(),e.abrupt("return");case 12:if(0==this.reConnectNumber)return this.reConnectFailed(),e.abrupt("return");e.next=15;break;case 15:this.reConnectTimer=setTimeout(n(S().mark(function e(){return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:"connected"!=i.pc.iceConnectionState&&(i.reConnectNumber--,i.reConnecting());case 1:case"end":return e.stop()}},e)})),1e3*t);case 16:case"end":return e.stop()}},e,this)})),function(){return _.apply(this,arguments)}),v.reConnectFailed=function(){this.closeReconnect(),this.reConnectNumber=5,this.isReConnect=!1,this.rtcPlayer.trigger(d.RE_CONNECT_FAILED,{type:d.RE_CONNECT_FAILED})},v.reConnectSuccess=function(){this.isReConnect&&(this.closeReconnect(),this.reConnectNumber=5,this.isReConnect=!1,this.rtcPlayer.trigger(d.RE_CONNECT_SUCCESS,{type:d.RE_CONNECT_SUCCESS}))},v.closeReconnect=function(){this.reConnectTimer&&(clearTimeout(this.reConnectTime),this.reConnectTimer=null)},v.closeDataChannel=function(){this.datachannel&&(this.datachannel.close&&this.datachannel.close(),this.datachannel=null)}
2,v.destroyPc=function(){this.closeDataChannel(),this.pc&&(this.pc.close(),this.pc=null)},v.destroy=function(){this.destroyPc(),this.reConnectTime=-1,this.reConnectNumber=-1,this.reConnectTimer=null,this.isReConnect=!1},L);function L(e){this.rtcPlayer=void 0,this.pc={},this.datachannel={},this.fetch=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this.reConnectTime=void 0,this.reConnectNumber=void 0,this.reConnectTimer=void 0,this.isReConnect=void 0,this.rtcPlayer=e,this.fetch=new w;e="[rtc-peerconnection]";this.log=A.log.bind(A,e),this.warn=A.warn.bind(A,e),this.error=A.error.bind(A,e),this.reConnectTime=this.rtcPlayer.rtcConfig.reConnectTimeOut||30,this.reConnectNumber=this.rtcPlayer.rtcConfig.reConnectTime||6,this.reConnectTimer=null,this.isReConnect=!1,this._initPeerConnection()}function k(){}return(t=C.prototype).on=function(e,t,i){this._emitter.on(e,t,i=void 0===i?this:i)},t.once=function(e,t,i){this._emitter.once(e,t,i=void 0===i?this:i)},t.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},t.off=function(e,t,i,n){this._emitter.off(e,t,i=void 0===i?this:i,n)},t.listeners=function(e){return this._emitter.listeners(e)},t.emit=function(e,t,i){return this._emitter.emit(e,t,i)},t.trigger=function(e,t){return this.emit(e,e,t)},t.listenerCount=function(e){return this._emitter.listenerCount(e)},t.subscribeLiveStream=function(){this.peerConnection.subscribeLiveStream()},t.sendMsg=function(e){this.peerConnection.sendMsg(e)},t.closeDataChannel=function(){this.peerConnection.closeDataChannel()},t.destroy=function(){this.peerConnection.destroy()},t=C,v=[{key:"Events",get:function(){return d}}],null&&e(t.prototype,null),e(t,v),Object.defineProperty(t,"prototype",{writable:!1}),C;function C(e){if(void 0===e&&(e={}),this._emitter=new h,this.rtcConfig=void 0,this.peerConnection=void 0,self.console){g(!0,"debug","log","info","warn","error");try{m.log("Debug logs enabled for 'RTC instance' in rtcplayer.js version 1.0.0")}catch(e){m=p}}else m=p;this.rtcConfig=e,this.peerConnection=new T(this)}}()},function(e,t){var i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){i=[i(0),i(12)],t=function(i,n){var r={exists:function(e){switch(typeof e){case"string":return 0<e.length;case"object":return null!==e;case"undefined":return!1}return!0},isHTTPS:function(){return 0===window.location.href.indexOf("https")},isRtmp:function(e,t){return e&&(0===e.indexOf("rtmp")||"rtmp"===t)},isHls:function(e,t){return e&&("m3u8"===n.extension(e)||"hls"===n.extension(e)||"hls"===t)},isFlv:function(e,t){return e&&("flv"===n.extension(e)||"flv"===t)},isMp4:function(e,t){return e&&("mp4"===n.extension(e)||"mp4"===t)},isMov:function(e,t){return e&&("mov"===n.extension(e)||"mov"===t)},isMpegTs:function(e,t){return e&&("ts"===n.extension(e)||"ts"===t)},isHtml5Flv:function(e,t=""){return r.isFlv(e,t)&&r.isFlvjsSupported()},isFlvjsSupported:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},isMutipleHls:function(e){if(i.isArray(e)&&1<e.length){var t=0;if(i.each(e,function(e){r.isHls(e.file,e.type)&&t++}),t===e.length)return!0}return!1},typeOf:function(e){var t;return null===e?"null":"object"==(t=typeof e)&&i.isArray(e)?"array":t},isRtc:function(e){return"rtc"==e},isMp3:function(e,t){return e&&("mp3"===n.extension(e)||"mp3"===t)},isAac:function(e,t){return e&&("aac"===n.extension(e)||"aac"===t)},isFlac:function(e,t){return e&&("flac"===n.extension(e)||"flac"===t)},isOgg:function(e,t){var i=document.createElement("audio").canPlayType('audio/ogg;codecs="vorbis"');return e&&("ogg"===n.extension(e)||"ogg"===t)&&i},isWav:function(e,t){return e&&("wav"===n.extension(e)||"wav"===t)},isOpus:function(e,t){return e&&("opus"===n.extension(e)||"opus"===t)}};return r}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){t=function(){return"4.3.1.1"}.apply(t,[]);void 0!==t&&(e.exports=t)},function(t,e,i){!function(e){i(35);e.CACHE_APPEND_STATUS_CODE={FAILED:-1,OVERFLOW:-2,OK:0,NOT_FULL:1,FULL:2,NULL:3}
2,t.exports=(e=60)=>{let t={limit:e,yuvCache:[],appendCacheByCacheYuv:e=>{e.pts;t.yuvCache.push(e)},getState:()=>t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL,cleanPipeline:()=>{t.yuvCache.length=0},vYuv:()=>t.yuvCache.length<=0?null:t.yuvCache.shift(),getYuv:()=>t.yuvCache.length<=0?null:t.yuvCache[0]};return t}}.call(this,i(31))},function(e,t){t.CacheYuvStruct=class{constructor(e,t,i,n,r,a){this.pts=e,this.width=t,this.height=i,this.y=n,this.u=r,this.v=a}setYuv(e,t,i,n,r,a){this.pts=e,this.width=t,this.height=i,this.y=n,this.u=r,this.v=a}}},function(e,t,i){i(10);function s(e){this.gl=e,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}s.prototype.bind=function(e,t,i){var n=this.gl;n.activeTexture([n.TEXTURE0,n.TEXTURE1,n.TEXTURE2][e]),n.bindTexture(n.TEXTURE_2D,this.texture),n.uniform1i(n.getUniformLocation(t,i),e)},s.prototype.fill=function(e,t,i){var n=this.gl;n.bindTexture(n.TEXTURE_2D,this.texture),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,e,t,0,n.LUMINANCE,n.UNSIGNED_BYTE,i)},e.exports={renderFrame:function(e,t,i,n,r,a){e.viewport(0,0,e.canvas.width,e.canvas.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.y.fill(r,a,t),e.u.fill(r>>1,a>>1,i),e.v.fill(r>>1,a>>1,n),e.drawArrays(e.TRIANGLE_STRIP,0,4)},setupCanvas:function(e,t){var i,n,r,a;return(e=e.getContext("webgl",{alpha:!1,depth:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!0})||e.getContext("experimental-webgl",{alpha:!1,depth:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!0}))&&(i=e.createProgram(),n=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),r=e.createShader(e.VERTEX_SHADER),e.shaderSource(r,n),e.compileShader(r),n=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),a=e.createShader(e.FRAGMENT_SHADER),e.shaderSource(a,n),e.compileShader(a),e.attachShader(i,r),e.attachShader(i,a),e.linkProgram(i),e.useProgram(i),e.getProgramParameter(i,e.LINK_STATUS),n=e.getAttribLocation(i,"aVertexPosition"),e.enableVertexAttribArray(n),r=e.getAttribLocation(i,"aTextureCoord"),e.enableVertexAttribArray(r),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),e.STATIC_DRAW),e.vertexAttribPointer(n,3,e.FLOAT,!1,0,0),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0),e.y=new s(e),e.u=new s(e),e.v=new s(e),e.y.bind(0,i,"YTexture"),e.u.bind(1,i,"UTexture"),e.v.bind(2,i,"VTexture")),e},releaseContext:function(e){e.deleteTexture(e.y.texture),e.deleteTexture(e.u.texture),e.deleteTexture(e.v.texture)}}},function(e,t){class a{constructor(e,t,i,n){this.pts=e,this.dts=e,this.isKey=t,this.data=i,this.video=n}setFrame(e,t,i,n){this.pts=e,this.isKey=t,this.data=i,this.video=n}}t.BufferFrame=a,t.ConstructWithDts=(e,t,i,n,r)=>{e=new a(e,i,n,r);return e.dts=t,e}},function(e,t,i){i=[i(74),i(1)],t=function(e,t){return e.extend({constructor:function(e){var t,i;this.el=document.createElement("div"),this.el.className="jw-icon jw-icon-tooltip "+e+" jw-button-color jw-reset jw-hidden",this.container=document.createElement("div"),this.container.className="jw-overlay jw-reset",this.openClass="jw-open",this.componentType="tooltip","jw-icon-hd"===e?((t=document.createElement("span")).className="jw-hd-label",this.el.appendChild(t)):"jw-icon-playrate"===e?((t=document.createElement("span")).className="jw-playrate-label",this.el.appendChild(t)):"jw-icon-cc"===e?((t=document.createElement("span")).className="jw-cc-label",this.el.appendChild(t)):"jw-icon-qualityChange"===e?((i=document.createElement("span")).className="jw-qualityChange-label",this.el.appendChild(i)):"jw-icon-lang"===e&&((i=document.createElement("span")).className="jw-lang-label",this.el.appendChild(i)),this.el.appendChild(this.container)},addContent:function(e){this.content&&this.removeContent(),this.content=e,this.container.appendChild(e)},removeContent:function(){this.content&&(this.container.removeChild(this.content),this.content=null)},hasContent:function(){return!!this.content},element:function(){return this.el},openTooltip:function(e){this.trigger("open-"+this.componentType,e,{isOpen:!0}),this.isOpen=!0,t.toggleClass(this.el,this.openClass,this.isOpen)},closeTooltip:function(e){this.trigger("close-"+this.componentType,e,{isOpen:!1}),this.isOpen=!1,t.toggleClass(this.el,this.openClass,this.isOpen)},toggleOpenState:function(e){this.isOpen?this.closeTooltip(e):this.openTooltip(e)}})}.apply(t,i);void 0!==t&&(e.exports=t)},,,,,,function(e,t,i){t=function(){return{repo:"https://bce.bdstatic.com/jwplayer/",SkinsIncluded:["bce"],SkinsLoadable:["beelden","bekle","five","glow","roundster","six","seven","stormtrooper","vapor"],dvrSeekLimit:-25}}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(96),i(97),i(148),i(0)],t=function(n,r,a,s){function i(e){this.providers=r.slice(),this.config=e||{}}return i.registerProvider=function(e){var t=e.getName().name;if(!a[t]){if(!s.find(r,s.matches({name:t}))){if(!s.isFunction(e.supports))throw{message:"Tried to register a provider with an invali
2d object"};r.unshift({name:t,supports:e.supports})}function i(){}i.prototype=n,e.prototype=new i,a[t]=e}},i.load=function(e){return Promise.all(s.map(e,function(t){return new Promise(function(e){t.name,e()}).then(function(e){e&&i.registerProvider(e)})}))},s.extend(i.prototype,{providerSupports:function(e,t){return e.supports(t)},required:function(r,a){return r=r.slice(),s.compact(s.map(this.providers,function(e){for(var t=!1,i=r.length;i--;){var n=r[i],n=e.supports(n.sources[0],a);n&&r.splice(i,1),t=t||n}if(t)return e}))},choose:function(e){e=s.isObject(e)?e:{};for(var t=this.providers.length,i=0;i<t;i++){var n=this.providers[i];if(this.providerSupports(n,e))return{priority:t-i-1,name:n.name,type:e.type,provider:a[n.name]}}return null}}),i}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){const n=window.AudioContext||window.webkitAudioContext,a=i(5),s=i(10);e.exports=e=>{let r={options:{sampleRate:e.sampleRate||a.DEFAULT_SAMPLERATE,appendType:e.appendType||a.APPEND_TYPE_STREAM,playMode:e.playMode||a.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new n({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,isLIVE:!1,voice:1,onLoadCache:null,resetStartParam:()=>{r.playTimestamp=0,r.playStartTime=0},setOnLoadCache:e=>{r.onLoadCache=e},setDurationMs:(e=-1)=>{r.durationMs=e},setVoice:(e=1,t)=>{var i;"running"!=r.audioCtx.state&&(-1<(i=r.sampleQueue.findIndex(e=>e.pts>=t))&&r.sampleQueue.splice(0,i),r.audioCtx.resume()),r.voice=e,r.gainNode.gain.value=e},getAlignVPTS:()=>r.playTimestamp+(s.GetMsTime()-r.playStartTime)/1e3,swapSource:(e=-1,t=-1)=>{if(0==r.startStatus)return null;if(e<0||e>=r.sourceList.length)return null;if(t<0||t>=r.sourceList.length)return null;try{r.sourceChannel===e&&null!==r.sourceList[e]&&(r.sourceList[e].disconnect(r.gainNode),r.sourceList[e]=null)}catch(e){}r.sourceChannel=t,-2==r.decodeSample(t,e)&&r.isLIVE&&(r.getAlignVPTS()>=r.durationMs/1e3-.04?r.pause():null!==r.onLoadCache&&r.onLoadCache())},addSample:(e=null)=>!(null==e||!e||null==e||(0==r.sampleQueue.length&&(r.seekPos=e.pts),r.sampleQueue.push(e),0)),runNextBuffer:()=>{window.setInterval(()=>{if(!(null!=r.nextBuffer||r.sampleQueue.length<a.DEFAULT_CONSU_SAMPLE_LEN)){var t;r.nextBuffer={data:null,pts:-1};for(let e=0;e<a.DEFAULT_CONSU_SAMPLE_LEN;e++){t=r.sampleQueue.shift();let e=null;if(e=r.options.appendType==a.APPEND_TYPE_STREAM?t:t.data,r.nextBuffer.pts<0&&(r.nextBuffer.pts=t.pts),null==r.nextBuffer.data?r.nextBuffer.data=new Uint8Array(e):((t=new Uint8Array(e.length+r.nextBuffer.data.length)).set(r.nextBuffer.data,0),t.set(e,r.nextBuffer.data.length),r.nextBuffer.data=t),r.sampleQueue.length<=0)break;0}}},20)},decodeSample:(t=-1,e=-1)=>{if(t<0||t>=r.sourceList.length)return-1;if(null!=r.sourceList[t]&&null!=r.sourceList[t]&&r.sourceList[t]||(r.sourceList[t]=r.audioCtx.createBufferSource(),r.sourceList[t].onended=function(){r.swapSource(t,e)}),0==r.sampleQueue.length)return r.isLIVE?(r.sourceList[t].connect(r.gainNode),r.sourceList[t].start(),r.sourceList[t].onended=function(){r.swapSource(t,e)},r.sourceList[t].stop(),0):-2;if(r.sourceList[t].buffer)r.swapSource(t,e);else{if(null==r.nextBuffer||r.nextBuffer.data.length<1)return r.sourceList[t].connect(r.gainNode),r.sourceList[t].start(),r.sourceList[t].startState=!0,r.sourceList[t].stop(),1;var i=r.nextBuffer.data.buffer;r.playTimestamp=r.nextBuffer.pts,r.playStartTime=s.GetMsTime();try{r.audioCtx.decodeAudioData(i,function(e){null!==r.sourceList[t]&&(r.sourceList[t].buffer=e,r.sourceList[t].connect(r.gainNode),r.sourceList[t].context.resume(),r.sourceList[t].start(),r.sourceList[t].startState=!0)},function(e){})}catch(e){return r.nextBuffer=null,-3}r.nextBuffer=null}return 0},decodeWholeSamples:(t=-1)=>{if((r.sourceChannel=t)<0||t>=r.sourceList.length)return-1;if(null!=r.sourceList[t]&&null!=r.sourceList[t]&&r.sourceList[t]||(r.sourceList[t]=r.audioCtx.createBufferSource(),r.sourceList[t].onended=function(){}),0==r.sampleQueue.length)return-2;let i=null;var n;for(let e=0;e<r.sampleQueue.length;e++){n=r.sampleQueue.shift();let e=null;if(e=r.options.appendType==a.APPEND_TYPE_STREAM?n:n.data,i=null==i?new Uint8Array(e):((n=new Uint8Array(e.length+i.length)).set(i,0),n.set(e,i.length),n),r.sampleQueue.length<=0)break;0}var e=i;
2if(null==e||e.length<1)return r.sourceList[t].connect(r.gainNode),r.sourceList[t].start(),r.sourceList[t].stop(),1;e=e.buffer;try{r.audioCtx.decodeAudioData(e,function(e){r.sourceList[t].buffer=e,r.sourceList[t].connect(r.gainNode),r.audioCtx.resume(),r.sourceList[t].start(),r.sourceList[t].startState=!0},function(e){e.err})}catch(e){return alert("Crash[brower]! Please refresh your page"),-3}return 0},play:()=>{if(0==r.startStatus){r.startStatus=!0;let e=0;"running"!=r.audioCtx.state&&r.audioCtx.resume(),-2==(e=r.options.playMode==a.AUDIO_MODE_ONCE?r.decodeWholeSamples(0):r.swapSource(0,1))&&r.pause()}},pause:()=>{r.startStatus=!1;for(let e=0;e<r.sourceList.length;e++)if(void 0!==r.sourceList[e]&&null!==r.sourceList[e])try{void 0!==r.sourceList[e].buffer&&null!==r.sourceList[e].buffer&&(r.sourceList[e].stop(),r.sourceList[e].disconnect(r.gainNode)),r.sourceList[e]=null}catch(e){}},stop:()=>{r.pause(),r.cleanQueue(),r.nextBuffer=null,r.sourceChannel=-1},cleanQueue:()=>{for(let e=r.sampleQueue.length=0;e<r.sourceList.length;e++)try{void 0!==r.sourceList[e].buffer&&null!==r.sourceList[e].buffer&&(r.sourceList[e].stop(),r.sourceList[e].disconnect(r.gainNode)),r.sourceList[e]=null}catch(e){}}};return r.sourceList.push(r.audioCtx.createBufferSource()),r.sourceList.push(r.audioCtx.createBufferSource()),r.sourceList[0].onended=function(){r.swapSource(0,1)},r.sourceList[1].onended=function(){r.swapSource(1,0)},r.gainNode=r.audioCtx.createGain(),r.gainNode.gain.value=r.voice,r.gainNode.connect(r.audioCtx.destination),"running"!=r.audioCtx.state&&r.audioCtx.resume(),r.runNextBuffer(),r}},function(e,t,i){i=[i(12)],t=function(t){return{localName:function(e){return e&&(e.localName||e.baseName)||""},textContent:function(e){return e?e.textContent?t.trim(e.textContent):e.text?t.trim(e.text):"":""},getChildNode:function(e,t){return e.childNodes[t]},numChildren:function(e){return e.childNodes?e.childNodes.length:0}}}.apply(t,i);void 0!==t&&(e.exports=t)},,function(e,t,i){"use strict";i.d(t,"a",function(){return r});var t=i(24),n=i.n(t);function r(){return n()('/*! WebPlayer built @2023/11/28 16:27:37 */!function(r){var a={};function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}n.m=r,n.c=a,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(r,a,function(e){return t[e]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,r){e.exports=function(){"use strict";return{bigInt:()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),multiValue:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),saturatedFloatToInt:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),tailCall:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads:()=>(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}}()},function(e,t,r){"use strict";r.r(t);var t=r(0),a=r.n(t);self.Module={onRuntimeInitialized:function(){self.decoder&&self.decoder.onWasmLoaded()}};self.onmessage=e=>{var t=e["data"];switch(t.t){case 0:self.decoder.initDecoder(t.data);break;case 1:self.decoder.pushSniffData(t.d,t.probeSize);break;case 2:self.decoder.getSniffStreamPacket(t.p);break;case 3:self.decoder.decodeVideo(t);break;case 4:self.decoder.getNaluListLength();break;case 5:self.decoder.getSniffHttpFlvPacket();break;case 6:self.decoder.getBufferLengthApi();break;case 7:self.decoder.pushSniffHttpFlvData(t);break;case 8:self.decoder.releaseSniffStream();break;case 111:self.decoder.loadJs(t.pathUrl,t.isSafari)}}
2,self.decoder=new class{constructor(){this.wasmLoaded=!1,this.corePtr=null,this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null,this.time=null}initDecoder(e){let u=this;var{token:e,VersionModule:t,ignoreAudio:r,playModeEnum:a,defaultFps:n,mode:i}=e,e=(this.corePtr=Module.cwrap(1==i?"AVSniffHttpFlvInit":"AVSniffStreamInit","number",["string","string"])(e,t),1==i?"vdiidiiiiii":"vdiidiiiii"),t=(this._ptr_probeCallback=Module.addFunction(function(e,t,r,a,n,i,s,l,u,o=0){self.postMessage({t:2,duration:e,width:t,height:r,fps:a,audioIdx:n,sample_rate:i,channels:s,vcodec_name_id:l,sample_fmt:u,trans_to_gcore:o})},e),this._ptr_frameCallback=Module.addFunction(function(e,t,r,a,n,i,s,l,u,o){e=Module.HEAPU8.subarray(e,e+a*l),t=Module.HEAPU8.subarray(t,t+n*l/2),r=Module.HEAPU8.subarray(r,r+i*l/2),e={t:5,buf_y:new Uint8Array(e),buf_u:new Uint8Array(t),buf_v:new Uint8Array(r),line1:a,line2:n,line3:i,width:s,height:l,pts:u,tag:o};self.postMessage(e,[e.buf_y.buffer,e.buf_u.buffer,e.buf_v.buffer])},"viiiiiiiidi"),1==i?"viiiiidd":"viiiiiddi");this._ptr_naluCallback=Module.addFunction(function(e,t,r,a,n,i,s,l){e=Module.HEAPU8.subarray(e,e+t),e={t:3,d:new Uint8Array(e),len:t,isKey:r,width:a,height:n,pts:i,dts:s,isRawStream:l};self.postMessage(e,[e.d.buffer]),u.time,u.time=(new Date).getTime()},t),this._ptr_sampleCallback=Module.addFunction(function(){},"vi"),this._ptr_aacCallback=Module.addFunction(function(e,t,r,a){e=Module.HEAPU8.subarray(e,e+t),e={t:4,d:new Uint8Array(e),line1:t,channel:r,pts:a};self.postMessage(e,[e.d.buffer])},"viiid"),1==i?Module.cwrap("initializeSniffHttpFlvModule","number",["number","number","number","number","number","number","number"])(this.corePtr,this._ptr_probeCallback,this._ptr_frameCallback,this._ptr_naluCallback,this._ptr_sampleCallback,this._ptr_aacCallback,r):Module.cwrap("initializeSniffStreamModuleWithAOpt","number",["number","number","number","number","number","number","number","number","number"])(this.corePtr,this._ptr_probeCallback,this._ptr_frameCallback,this._ptr_naluCallback,this._ptr_sampleCallback,this._ptr_aacCallback,r,a,n),self.postMessage({t:1})}pushSniffData(e,t){var e=new Uint8Array(e),r=Module._malloc(e.length);Module.HEAP8.set(e,r),Module.cwrap("pushSniffStreamData","number",["number","number","number","number"])(this.corePtr,r,e.length,t)}getSniffStreamPacket(e){(1==e?Module.cwrap("getSniffStreamPkg","number",["number"]):Module.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"]))(this.corePtr)}getSniffHttpFlvPacket(){Module.cwrap("getSniffHttpFlvPkg","number",["number"])(this.corePtr)}decodeVideo(e){var{d:e,ptsMS:t,dtsMS:r,frameCallTag:a}=e,n=Module._malloc(e.length),n=(Module.HEAP8.set(e,n),Module.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(this.corePtr,n,e.length,t,r,a));self.postMessage({t:6,l:n})}getNaluListLength(){var e=Module.cwrap("naluLListLength","number",["number"])(this.corePtr);self.postMessage({t:6,l:e})}getBufferLengthApi(){var e=Module.cwrap("getBufferLengthApi","number",["number"])(this.corePtr);self.postMessage({t:6,l:e})}pushSniffHttpFlvData(e){var{d:e,probeSize:t}=e,r=Module._malloc(e.length);Module.HEAP8.set(e,r),Module.cwrap("pushSniffHttpFlvData","number",["number","number","number","number"])(this.corePtr,r,e.length,t)}releaseSniffStream(){void 0!==this.corePtr&&null!==this.corePtr&&(Module.cwrap("releaseSniffStream","number",["number"])(this.corePtr),this.corePtr=null)}onWasmLoaded(){this.wasmLoaded||(this.wasmLoaded=!0,self.postMessage({t:0}))}loadJs(e,t){t=a.a.simd()&&!t?e+"missile-simd.js":e+"missile.js";self.wasmPath=e,self.importScripts(t)}}}]);',"Worker",void 0,i.p+"cNativeCoreDecoder.worker.worker.js")}},,,,,,,function(e,t,i){i=[i(0),i(32)],t=function(t,o){var e={};function i(e){return t.some(e,function(e){return"parsererror"===e.nodeName})}return e.getAbsolutePath=function(e,t){if(o.exists(t)||(t=document.location.href),o.exists(e)){if(/^(?:(?:https?|file)\:)?\/\//.test(e))return e;for(var i,n=t.substring(0,t.indexOf("://")+3),r=t.substring(n.length,t.indexOf("/",n.length+1)),a=(i=0===e.indexOf("/")?e.split("/"):(t=(t=t.split("?")[0]).substring(n.length+r.length+1,t.lastIndexOf("/"))).split("/").concat(e.split("/")),[]),s=0;s<i.length;s++)i[s]&&o.exists(i[s])&&"."!==i[s]&&(".."===i[s]?a.pop():a.push(i[s]));return n+r+"/"+a.join("/")}},e.getScriptPath=t.memoize(function(e){for(var t=document.getElementsByTagName("script"),i=0;i<t.length;i++){var n=t[i].src;if(n&&0<=n.indexOf(e))return n.substr(0,n.indexOf(e))}return""}),e.parseXML=function(e){var t=null;try{"DOMParser"in window?(i((t=(new window.DOMParser).parseFromString(e,"text/xml")).childNodes)||t.childNodes&&i(t.childNodes[0].childNodes))&&
2(t=null):((t=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e))}catch(e){}return t},e.serialize=function(e){if(void 0===e)return null;if("string"==typeof e&&e.length<6){var t=e.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;if(!isNaN(Number(e))&&!isNaN(parseFloat(e)))return Number(e)}return e},e.parseDimension=function(e){return"string"==typeof e?""===e?0:-1<e.lastIndexOf("%")?e:parseInt(e.replace("px",""),10):e},e.timeFormat=function(e,t){return e<=0&&!t?"00:00":(t=e<0?"-":"",e=Math.abs(e),t+((t=Math.floor(e/3600))?t+":":"")+((t=Math.floor((e-3600*t)/60))<10?"0":"")+t+":"+((t=Math.floor(e%60))<10?"0":"")+t)},e.adaptiveType=function(e){if(0!==e){if(e<=-120)return"DVR";if(e<0||e===1/0)return"LIVE"}return"VOD"},e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){const n=window.AudioContext||window.webkitAudioContext;i(5);const r=i(10);t.AudioPcmPlayer=class{constructor(){this._sample_rate=44100,this._seg_dur=.1,this._channels=1,this._swapStartPlay=!0,this.playStartTime=-1,this.playTimestamp=0,this._now_seg_dur=-1,this._push_start_idx=0,this._playInterval=null,this._pcm_array_buf=null,this._pcm_array_frame=[],this._once_pop_len=parseInt(this._sample_rate*this._seg_dur),this._active_node=null,this._ctx=new n,this._gain=this._ctx.createGain(),this._gain.gain.value=1,this._gain.connect(this._ctx.destination)}setVoice(e){this._gain.gain.value=e}pushBufferFrame(e,t){}pushBuffer(e){e=e.buffer;let i=null;var n=e.byteLength%4;i=0!=n?((n=new Uint8Array(e.byteLength+n)).set(new Uint8Array(e),0),new Float32Array(n.buffer)):new Float32Array(e);let r=null;if(2<=this._channels){n=i.length/2;r=new Float32Array(n);let t=0;for(let e=0;e<i.length;e+=2)r[t]=i[e],t++}else r=new Float32Array(i);null===this._pcm_array_buf?this._pcm_array_buf=new Float32Array(r):((e=new Float32Array(this._pcm_array_buf.length+r.length)).set(this._pcm_array_buf,0),e.set(r,this._pcm_array_buf.length),this._pcm_array_buf=e)}readingLoopWithF32(){if(!(null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx))return-1;{this.playStartTime<0&&(this.playStartTime=r.GetMsTime(),this.playTimestamp=r.GetMsTime()),this._swapStartPlay=!1;let e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e),i=(this._push_start_idx+=t.length,this._now_seg_dur=+t.length/this._sample_rate*1e3,this._ctx.createBuffer(1,t.length,this._sample_rate));i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this.playStartTime=r.GetMsTime(),this._active_node.start(0),this.playTimestamp+=this._now_seg_dur}return 0}getAlignVPTS(){return this.playTimestamp}pause(){null!==this._playInterval&&(window.clearInterval(this._playInterval),this._playInterval=null)}play(){let e=this;this._playInterval=window.setInterval(()=>{e.readingLoopWithF32()},10)}}},function(e,t,i){i=[i(12)],t=function(n){var e={},r=e.pluginPathType={ABSOLUTE:0,RELATIVE:1,CDN:2};return e.getPluginPathType=function(e){var t,i;if("string"==typeof e)return 0<(t=(e=e.split("?")[0]).indexOf("://"))?r.ABSOLUTE:(i=e.indexOf("/"),e=n.extension(e),!(t<0&&i<0)||e&&isNaN(e)?r.RELATIVE:r.CDN)},e.getPluginName=function(e){return e.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")},e.getPluginVersion=function(e){return e.replace(/[^-]*-?([^\.]*).*$/,"$1")},e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(74),i(11),i(216),i(1)],t=function(e,i,n,r){return e.extend({constructor:function(e,t,i){this.className=e+" jw-background-color jw-reset",this.orientation=t,this.dragStartListener=this.dragStart.bind(this),this.dragMoveListener=this.dragMove.bind(this),this.dragEndListener=this.dragEnd.bind(this),this.tapListener=this.tap.bind(this),this.setup(i)},setup:function(e){var t={default:this.default,className:this.className,orientation:"jw-slider-"+this.orientation};this.el=r.createElement(n(t)),this.elementRail=r.getElementsByClassName("jw-slider-container",this.el)[0],this.elementBuffer=r.getElementsByClassName("jw-buffer",this.el)[0],this.elementProgress=r.getElementsByClassName("jw-progress",this.el)[0],this.elementThumb=r.getElementsByClassName("jw-knob",this.el)[0],this.elementJwRail=r.getElementsByClassName("jw-rail",this.el)[0],this.userInteract=new i(this.element
2(),{preventScrolling:!0}),this.userInteract.on("dragStart",this.dragStartListener),this.userInteract.on("drag",this.dragMoveListener),this.userInteract.on("dragEnd",this.dragEndListener),this.userInteract.on("tap click",this.tapListener),e&&this.addBreakpointElement(e)},dragStart:function(){this.trigger("dragStart"),this.railBounds=r.bounds(this.elementRail)},dragEnd:function(e){this.dragMove(e),this.trigger("dragEnd")},dragMove:function(e){var t=this.railBounds=this.railBounds||r.bounds(this.elementRail),i="horizontal"===this.orientation?(i=e.pageX)<t.left?0:i>t.right?100:100*r.between((i-t.left)/t.width,0,1):(i=e.pageY)>=t.bottom?0:i<=t.top?100:100*r.between((t.height-(i-t.top))/t.height,0,1),t=this.limit(i);return this.render(t),"drag"===e.type&&r.hasClass(e.currentTarget,"jw-slider-time")||this.update(t),!1},tap:function(e){this.railBounds=r.bounds(this.elementRail),this.dragMove(e)},limit:function(e){return e},update:function(e){this.trigger("update",{percentage:e})},render:function(e){e=parseInt(Math.max(0,Math.min(e,100))),"horizontal"===this.orientation?(this.elementThumb.style.left=e+"%",this.elementProgress.style.width=e+"%"):(this.elementThumb.style.bottom=e+"%",this.elementProgress.style.height=e+"%")},updateBuffer:function(e){e&&(this.elementBuffer.style.width=e+"%")},element:function(){return this.el},addBreakpointElement:function(t){var i=parseInt(100/(t+1));for(let e=1;e<t+1;e++){var n=i*e,r=document.createElement("div");r.classList.add("jw-slider-breakpoint"),r.style.left=n-2+"%",this.elementJwRail.appendChild(r)}}})}.apply(t,i);void 0!==t&&(e.exports=t)},,,,,,function(e,t,i){i=[i(12),i(0),i(137),i(138)],t=function(i,r,e,n){function a(e){return r.isString(e.className)?e.className.split(" "):[]}function s(e,t){t=i.trim(t),e.className!==t&&(e.className=t)}var o={createElement:function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild},styleDimension:function(e){return e+(0<e.toString().indexOf("%")?"":"px")}};return o.classList=function(e){return e.classList||a(e)},o.hasClass=e.hasClass,o.addClass=function(e,t){var i=a(e),t=r.isArray(t)?t:t.split(" ");r.each(t,function(e){r.contains(i,e)||i.push(e)}),s(e,i.join(" "))},o.removeClass=function(e,t){var i=a(e),t=r.isArray(t)?t:t.split(" ");s(e,r.difference(i,t).join(" "))},o.replaceClass=function(e,t,i){var n=e.className||"";t.test(n)?n=n.replace(t,i):i&&(n+=" "+i),s(e,n)},o.toggleClass=function(e,t,i){var n=o.hasClass(e,t);(i=r.isBoolean(i)?i:!n)!==n&&(i?o.addClass(e,t):o.removeClass(e,t))},o.emptyElement=function(e){if(e)for(var t=0;0<e.childElementCount-t;){if(e.children[t].hasAttribute("remove-ignore"))if(e.children[t].getAttribute("remove-ignore")===n.DOM_REMOVE_IGNORE){t++;continue}e.removeChild(e.children[t])}},o.addStyleSheet=function(e){var t=document.createElement("link");t.rel="stylesheet",t.href=e,document.getElementsByTagName("head")[0].appendChild(t)},o.empty=function(e){if(e)for(var t=0;0<e.childElementCount-t;){if(e.children[t].hasAttribute("remove-ignore"))if(e.children[t].getAttribute("remove-ignore")===n.DOM_REMOVE_IGNORE){t++;continue}e.removeChild(e.children[t])}},o.bounds=function(e){var t,i,n={left:0,right:0,width:0,height:0,top:0,bottom:0};return e&&document.body.contains(e)&&(e=e.getBoundingClientRect(e),t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,i=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,e.width||e.height||e.left||e.top)&&(n.left=e.left+i,n.right=e.right+i,n.top=e.top+t,n.bottom=e.bottom+t,n.width=e.right-e.left,n.height=e.bottom-e.top),n},o}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(15)],t=function(t){function r(e){return e===t.COMPLETE||e===t.ERROR?t.IDLE:e}return function(e,t,i){var n;(t=r(t))!==(i=r(i))&&(t={type:n=t.replace(/(?:ing|d)$/,""),newstate:t,oldstate:i,reason:e.mediaModel.get("state")},"play"===n&&(t.playReason=e.get("playReason")),this.trigger(n,t))}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(45),i(100),i(176),i(0),i(4),i(177),i(3),i(15),i(178)],t=function(l,e,u,h,d,c,t,f,p,m){function i(){var t,r,a,s,i=this,n=l.noop;function o(e,t){var i=d.extend({},t,{type:e});switch(e){case"flashThrottle":var n="resume"!==t.state;this.set("flashThrottle",n),this.set("flashBlocked",n);break;case"flashBlocked":return void this.set("flashBlocked",!0);case"flashUnblocked":return void this.set("flashBlocked",!1);case"volume":case"mute":return void this.set(e,t[e]);case f.JWPLAYER_MEDIA_TYPE:return void(this.mediaModel.get("mediaType")!==t.mediaType&&(this.mediaModel.set("mediaType",t.mediaType),this.mediaController.trigger(e,i
2)));case f.JWPLAYER_PLAYER_STATE:return void this.mediaModel.set("state",t.newstate);case f.JWPLAYER_MEDIA_BUFFER:this.set("buffer",t.bufferPercent);case f.JWPLAYER_MEDIA_META:n=t.duration;d.isNumber(n)&&(this.mediaModel.set("duration",n),this.set("duration",n)),t.duration===1/0&&this.trigger("alive");break;case f.JWPLAYER_MEDIA_BUFFER_FULL:this.mediaModel.get("playAttempt")?this.playVideo():this.mediaModel.on("change:playAttempt",function(){this.playVideo()},this);break;case f.JWPLAYER_MEDIA_TIME:this.mediaModel.set("position",t.position),this.set("position",t.position),d.isNumber(t.duration)&&(this.mediaModel.set("duration",t.duration),this.set("duration",t.duration),0<t.duration&&this.recordMediaPosition(t.position,t.duration),t.duration===1/0)&&this.trigger("alive"),this.advManage&&this.get("imageAdvs").advs&&this.advManage.refreshProcessAdv(t.position);break;case f.JWPLAYER_PROVIDER_CHANGED:this.set("provider",r.getName());break;case f.JWPLAYER_MEDIA_LEVELS:this.setQualityLevel(t.currentQuality,t.levels),this.mediaModel.set("levels",t.levels);break;case f.JWPLAYER_MEDIA_LEVEL_CHANGED:this.setQualityLevel(t.currentQuality,t.levels),this.persistQualityLevel(t.currentQuality,t.levels);break;case f.JWPLAYER_AUDIO_TRACKS:this.setCurrentAudioTrack(t.currentTrack,t.tracks),this.mediaModel.set("audioTracks",t.tracks);break;case f.JWPLAYER_AUDIO_TRACK_CHANGED:this.setCurrentAudioTrack(t.currentTrack,t.tracks);break;case f.JWPLAYER_CONNECTING:this.trigger("connecting");break;case f.JWPLAYER_CONNECT_FAILD:this.trigger("connectFaild");break;case f.JWPLAYER_ALIVE:this.trigger("alive");break;case f.JWPLAYER_NO_LIVE_STREAM:this.trigger("noLiveStream");break;case f.JWPLAYER_LIVE_STOP:this.trigger("liveStop");break;case"stop":this.set("duration",0);break;case"subtitlesTrackChanged":this.setVideoSubtitleTrack(t.currentTrack,t.tracks);break;case"visualQuality":n=d.extend({},t);this.mediaModel.set("visualQuality",n);break;case f.JWPLAYER_PLAYBACKRATE:this.set("playbackRate",t.playbackRate),this.mediaModel.set("playbackRate",t.playbackRate);break;case f.JWPLAYER_HLS_QUALITYLIST_CHANGE:this.mediaModel.set("hlsQualityListChange",t.levels)}this.mediaController.trigger(e,i)}this.mediaController=d.extend({},c),this.mediaModel=new g,this.advManage=null,h.model(this),this.set("mediaModel",this.mediaModel),this.setup=function(e){return s=new u,d.extend(this.attributes,e,{item:0,state:p.IDLE,flashBlocked:!1,fullscreen:!1,compactUI:!1,scrubbing:!1,duration:e.duration||0,position:0,buffer:0}),!l.isMobile()||e.mobileSdk||"running"===(new AudioContext).state&&!l.isWeChat()||this.set("autostart",!1),this.get("imageAdvs")&&(this.advManage=new m.default(this.get("imageAdvs"))),this.updateProviders(),this},this.getConfiguration=function(){return d.omit(this.clone(),["mediaModel"])},this.updateProviders=function(){t=new e(this.getConfiguration())},this.recordMediaPosition=function(t,i){var e=a&&a.sources&&a.sources[0],n=this;e&&e.file&&!isNaN(t)&&!isNaN(i)&&0<i&&!1!==isFinite(i)&&d.each(a.sources,function(e){t<i&&2<t?n.mediaModel.get("isMemoryPlay")&&s.setItem("filePostion."+e.file,t):i<=t&&s.clearItem("filePostion."+e.file)})},this.getLastPosition=function(e){var t=0;return t=e&&"array"===l.typeOf(e.sources)&&0<e.sources.length&&s.getItem("filePostion."+e.sources[0].file)?s.getItem("filePostion."+e.sources[0].file):t},this.setQualityLevel=function(e,t){-1<e&&1<t.length&&this.mediaModel.set("currentLevel",parseInt(e))},this.setCurrentQuality=function(e){r.setCurrentQuality(e)},this.persistQualityLevel=function(e,t){t=(t[e]||{}).label;this.set("qualityLabel",t)},this.setCurrentAudioTrack=function(e,t){-1<e&&0<t.length&&e<t.length&&this.mediaModel.set("currentAudioTrack",parseInt(e))},this.onMediaContainer=function(){var e=this.get("mediaContainer");n.setContainer(e)},this.changeVideoProvider=function(e){var t;this.off("change:mediaContainer",this.onMediaContainer),r&&(r.off(null,null,this),r.getContainer())&&r.remove(),e?(n=new e(i.get("id"),i.getConfiguration()),(t=this.get("mediaContainer"))?n.setContainer(t):this.once("change:mediaContainer",this.onMediaContainer),this.once("change:provider",function(){this.setVolume(this.get("volume"))},this),this.set("provider",n.getName()),-1===n.getName().name.indexOf("flash")&&(this.set("flashThrottle",void 0),this.set("flashBlocked",!1)),(r=n).volume(i.get("volume")),r.mute(i.get("mute")),r.on("all",o,this)):(r=n=e,this.set("provider",void 0))},this.destroy=function(){r&&(r.off(null,null,this),r.destroy())},this.getVideo=function(){return r},this.setFullscreen=function(e){(e=!!e)!==i.get("fullscreen")&&i.set("fullscreen",e)},this.chooseProvider=function(e){return t.choose(e).provider},this.setActiveItem=function(e,t){r&&r.extPlayerPTS&&(e.starttime=r.extPlayerPTS,this.set("starttime",e.starttime||0)),this.mediaModel.off(),this.mediaModel=new g,this.set("mediaModel",this.mediaModel),this.set("position",e.starttime||0),this.set("duration",this.get("duration")?this.get("duration"):e.duration||0),this.setProvider(e,t)},this.setProvider=function(e,t){t=null!=t?Number(t):0;var t=e&&e.sources&&e.sources[t];void 0!==t&&(a=e,t=this.chooseProvider(t),i.changeVideoProvider(t),n)&&(n.init&&n.init(e,this.attributes),this.trigger("itemReady",e))},this.getCurrentItem=function(){return a},this.getProviders=function(){return t},this.resetProvider=function(){n=null},this.setVolume=function(e){e=Math.round(e),e=r&&"html5"===r.getName().name?Math.min(e,100):Math.min(e,500),i.set("volume",e),r&&r.volume(e);e=0===e;e!==i.get("mute")&&i.setMute(e)},this.enableGPU=function(){r.enableGPU()},this.disableGPU=function(){r.disableGPU()},this.setToken=function(e){var t=[];"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(t[0]={file:arguments[0],tokenText:arguments[1]},e=t),r.setToken&&r.setToken(e)},this.setMute=function(e){l.exists(e)||(e=!this.get("mute")),this.set("mute",e),r&&r.mute(e),e||(e=0==this.get("volume")&&this.attributes.origin_volume?this.attributes.origin_volume:0!=this.get("volume")?this.get("volume"):10,this.setVolume(e))},this.loadVideo=function(e){e||(t=this.get("item"),e=this.get("playlist")[t]);var t=this.get("isMemoryPlay");t&&(this.mediaModel.set("isMemoryPlay",!0),e.starttime=this.getLastPosition(e)),void 0!==this.get("starttime")&&(e.starttime=this.get("starttime")),this.set("position",e.starttime||0),this.set("duration",e.duration||0),this.mediaModel.set("playAttempt",!0),this.mediaController.trigger(f.JWPLAYER_MEDIA_PLAY_ATTEMPT,{playReason:this.get("playReason")}),r.load(e)},this.stopVideo=function(){r&&r.stop()},this.playVideo=function(){r.play()},this.prevFrame=function(){return r.prevFrame()},this.nextFrame=function(){return r.nextFrame()},this.snapshot=function(e){return r.snapshot(e)},this.test1=function(){r.test1()}
2,this.persistCaptionsTrack=function(){var e=this.get("captionsTrack");e?this.set("captionLabel",e.label):this.set("captionLabel","Off")},this.setDanmuStatus=function(){var e=JSON.parse(JSON.stringify(i.get("danmaku")));i.set("danmaku",Object.assign(e,{active:!e.active}))},this.setVideoSubtitleTrack=function(e,t){this.set("captionsIndex",e),e&&t&&e<=t.length&&t[e-1].data&&this.set("captionsTrack",t[e-1]),r&&r.setSubtitlesTrack&&r.setSubtitlesTrack(e)},this.persistVideoSubtitleTrack=function(e){this.setVideoSubtitleTrack(e),this.persistCaptionsTrack()},this.setPlaybackRate=function(e){r.setPlaybackRate(e)},this.changeHlsQuality=function(e){r.changeHlsQuality(e)}}var g=i.MediaModel=function(){this.set("state",p.IDLE)};return d.extend(i.prototype,t),d.extend(g.prototype,t),i}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,s,u){"use strict";u.r(s),function(t){var e=u(114),i=u(22),n=u(23),r=u(1),a=u.n(r);const o=u(167),l=u(168);s.default={MPEG_JS_Module:class{constructor(e){this.configFormat={},this.isLive=0,this.mediaAttr={sampleRate:0,sampleChannel:0,vFps:0,vGop:0,vDuration:0,aDuration:0,duration:0,aCodec:"",vCodec:"",audioNone:!1},this.extensionInfo={vWidth:0,vHeight:0},this.controller=new AbortController,this.offsetDemux=null,this.wasmState=0,this.naluLayer=null,this.vlcLayer=null,this.onReady=null,this.onDemuxed=null,this.onDemuxedFailed=null,this.aacDec=null,this.demux=null,this.onNalu=null,this.onError=null}makeWasm(){var e=Object(i.getPlayerPath)();this.demux=new n.a,this.demux.postMessage({t:111,pathUrl:e,isSafari:a.a.isSafari()}),this.demux.onmessage=t=>{var i=t["data"];switch(i.t){case 0:case 11:null!=this.onReady&&0==this.wasmState&&(this.wasmState=1,this.onReady());break;case 12:break;case 13:let e=null;e=1==t.data.type&&this.mediaAttr.aCodec==l.DEF_AAC?this.aacDec.sliceAACFrames(t.data.ptime,t.data.src):t.data.src.buffer,t.data.data=e,this.onNalu(t.data);break;case 14:this.mediaAttr=i.mediaAttr,this.extensionInfo=i.extensionInfo,null==this.aacDec?this.aacDec=new o.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr),null!=this.onDemuxed&&this.onDemuxed();break;case 20:this.onError&&this.onError(i)}}}initDemuxer(){let e=this;if(window.WebAssembly)this.makeWasm(),1===t.STATIC_MEM_wasmDecoderState?(e.wasmState=1,e.onReady()):(Module.onRuntimeInitialized=()=>{null!=e.onReady&&0==e.wasmState&&(e.wasmState=1,e.onReady())},Module.postRun=()=>{null!=e.onReady&&0==e.wasmState&&(e.wasmState=1,e.onReady())});else{let e="unsupport WASM!";/iPhone|iPad/.test(window.navigator.userAgent)&&(e+=" ios:min-version 11"),alert(e),alert("Please check your browers, it not support wasm! See:https://www.caniuse.com/#search=wasm")}return this.WorkerFetch(),!0}WorkerFetch(){this.downloaderWorker=new e.a,this.downloaderWorker.onmessage=e=>{this._demuxCore(e.data)}}demuxURL(e){this.downloaderWorker.postMessage({videoURL:e,type:"pushUrl"})}demuxUint8Buf(e){this._demuxCore(e)}_demuxerTsInit(t){let i=this;var e=this.controller.signal;fetch(t,{signal:e}).then(e=>e.arrayBuffer()).then(e=>{e.fileStart=0;e=new Uint8Array(e);null!=e&&i._demuxCore(e)}).catch(e=>{i._releaseOffset(),i.onDemuxedFailed&&i.onDemuxedFailed(e,t)})}_releaseOffset(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(Module._free(this.offsetDemux),this.offsetDemux=null)}_demuxCore(e){this.demux.postMessage({t:12,d:e,isLive:this.isLive},[e.buffer])}_setMediaInfo(){var e=Module.cwrap("getMediaInfo","number",[])(),t=Module.HEAPU32[e/4],i=Module.HEAPU32[e/4+1],n=Module.HEAPF64[e/8+1],r=Module.HEAPF64[e/8+1+1],a=Module.HEAPF64[e/8+1+1+1],s=Module.HEAPF64[e/8+1+1+1+1],e=Module.HEAPU32[e/4+2+2+2+2+2],n=(this.mediaAttr.vFps=n,this.mediaAttr.vGop=e,this.mediaAttr.vDuration=r,this.mediaAttr.aDuration=a,this.mediaAttr.duration=s,Module.cwrap("getAudioCodecID","number",[])()),e=(0<=n?(this.mediaAttr.aCodec=l.CODEC_OFFSET_TABLE[n],this.mediaAttr.sampleRate=0<t?t:l.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=0<=i?i:l.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0),Module.cwrap("getVideoCodecID","number",[])());0<=e&&(this.mediaAttr.vCodec=l.CODEC_OFFSET_TABLE[e]),null==this.aacDec?this.aacDec=new o.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr)}_setExtensionInfo(){var e=Module.cwrap("getExtensionInfo","number",[])(),t=Module.HEAPU32[e/4],e=Module.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=e}readMediaInfo(){return this.mediaAttr}readExtensionInfo(){return this.extensionInfo}readAudioNone(){return this.mediaAttr.audioNone}_readLayer(){null===this.naluLayer?this.naluLayer={vps:null,sps:null,pps:null,sei:null}:(this.naluLayer.vps=null,this.naluLayer.sps=null,this.naluLayer.pps=null,this.naluLayer.sei=null),null===this.vlcLayer?this.vlcLayer={vlc:null}:this.vlcLayer.vlc=null;var e,t,i,n,r=Module.cwrap("getSPSLen","number",[])(),a=Module.cwrap("getSPS","number",[])();if(!(r<0))return a=Module.HEAPU8.subarray(a,a+r),this.naluLayer.sps=new Uint8Array(r),this.naluLayer.sps.set(a,0),r=Module.cwrap("getPPSLen","number",[])(),e=Module.cwrap("getPPS","number",[])(),e=Module.HEAPU8.subarray(e,e+r),this.naluLayer.pps=new Uint8Array(r),this.naluLayer.pps.set(e,0),r=Module.cwrap("getSEILen","number",[])(),t=Module.cwrap("getSEI","number",[])(),t=Module.HEAPU8.subarray(t,t+r),this.naluLayer.sei=new Uint8Array(r),this.naluLayer.sei.set(t,0),r=Module.cwrap("getVLCLen","number",[])(),i=Module.cwrap("getVLC","number",[])(),i=Module.HEAPU8.subarray(i,i+r),this.vlcLayer.vlc=new Uint8Array(r),this.vlcLayer.vlc.set(i,0),this.mediaAttr.vCodec==l.DEF_HEVC||this.mediaAttr.vCodec==l.DEF_H265?(r=Module.cwrap("getVPSLen","number",[])(),n=Module.cwrap("getVPS","number",[])(),n=Module.HEAPU8.subarray(n,n+r),this.naluLayer.vps=new Uint8Array(r),this.naluLayer.vps.set(n,0),Module._free(n),n=null):this.mediaAttr.vCodec!=l.DEF_AVC&&(this.mediaAttr.vCodec,l.DEF_H264),Module._free(a),a=null,Module._free(e),e=null,Module._free(t),t=null,Module._free(i),i=null,{nalu:this.naluLayer,vlc:this.vlcLayer}}isHEVC(){return this.mediaAttr.vCodec==l.DEF_HEVC||this.mediaAttr.vCodec==l.DEF_H265}readPacket(){return void this.demux.postMessage({t:13})}_refreshDemuxer(){this.releaseTsDemuxer(),this._initDemuxer()}_initDemuxer(){Module.cwrap("initTsMissile","number",[])(),Module.cwrap("initializeDemuxer","number",[])()}releaseTsDemuxer(){}release(){this.downloaderWorker.postMessage({type:"destory"}),this.downloaderWorker&&this.downloaderWorker.terminate(),this.demux.postMessage({t:15}),this.demux.postMessage({t:14}),this.demux&&this.demux.terminate()}}}}.call(this,u(31))},function(e,t,i){const n=i(99),r=[n.HEVC_NAL_VPS,n.HEVC_NAL_SPS,n.HEVC_NAL_PPS,n.HEVC_NAL_SEI_PREFIX,n.HEVC_NAL_SEI_SUFFIX];e.exports={IS_HEV_PS_INFO_CHAR:e=>{e=(126&e)>>1;return r.indexOf(e)},GET_NALU_TYPE:e=>{var e=(126&e)>>1;return 1<=e&&e<=9?n.DEFINE_P_FRAME:16<=e&&e<=21?n.DEFINE_KEY_FRAME:0<=(e=r.indexOf(e))?r[e]:n.DEFINE_OTHERS_FRAME},PACK_NALU:e=>{var t=e.nalu,e=e.vlc.vlc,i=(null==t.vps&&(t.vps=new Uint8Array),new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+e.length));return i.set(t.vps,0),i.set(t.sps,t.vps.length),i.set(t.pps,t.vps.length+t.sps.length),i.set(t.sei,t.vps.length+t.sps.length+t.pps.length),i.set(e,t.vps.length+t.sps.length+t.pps.length+t.sei.length),i}}},function(e,t,i){i=[i(197),i(198),i(105),i(58)],t=function(i,n,a,s){var o={},r={};return{loadPlugins:function(e,t){return r[e]=new i(new n(o),t),r[e]},registerPlugin:function(e,t,i,n){var r=s.getPluginName(e);o[r]||(o[r]=new a(e)),o[r].registerPlugin(e,t,i,n)}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(3),i(4),i(0)],t=function(u,e,i){function t(r,a){var t=i.extend(this,e),s=d.NEW;function o(e){s=d.ERROR,t.trigger(u.ERROR,e)}function l(e){s=d.COMPLETE,t.trigger(u.COMPLETE,e)}this.addEventListener=this.on,this.removeEventListener=this.off,this.makeStyleLink=function(e){var t=document.createElement("link");return t.type="text/css",t.rel="stylesheet",t.href=e,t},this.makeScriptTag=function(e){var t=document.createElement("script");return t.src=e,t},this.makeTag=a?this.makeStyleLink:this.makeScriptTag,this.load=function(){var e,t,i,n;s===d.NEW&&((e=h[r])&&(s=e.getStatus())<2?(e.on(u.ERROR,o),e.on(u.COMPLETE,l)):(t=document.getElementsByTagName("head")[0]||document.documentElement,i=this.makeTag(r),n=!1,i.onload=i.onreadystatechange=function(e){n||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(n=!0,l(e),i.onload=i.onreadystatechange=null,t&&i.parentNode&&!a&&t.removeChild(i))},i.onerror=o,t.insertBefore(i,t.firstChild),s=d.LOADING,h[r]=this))}
2,this.getStatus=function(){return s}}var h={},d={NEW:0,LOADING:1,ERROR:2,COMPLETE:3};return t.loaderstatus=d,t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(12)],t=function(e,a){var s=e.seconds;return function(e){var t=[],i=(e=(e=(e=a.trim(e)).replace(/\n\n \n\n/g,"\r\n\r\n")).replace(/\n \n\n/g,"\r\n\r\n")).split("\r\n\r\n");1===i.length&&(i=e.split("\n\n"));for(var n,r=0;r<i.length;r++)"WEBVTT"!==i[r]&&(i[r]=i[r].replace(/\n\n/g,"\r\n"),(n=function(e){var t={},i=e.split("\r\n");1===i.length&&(i=e.split("\n"));e=1;0<i[0].indexOf(" --\x3e ")&&(e=0);{var n,r;i.length>e+1&&i[e+1]&&(n=i[e],0<(r=n.indexOf(" --\x3e ")))&&(t.begin=s(n.substr(0,r)),t.end=s(n.substr(r+5)),t.text=i.slice(e+1).join("<br/>"))}return t}(i[r])).text)&&t.push(n);return t}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t){t.default={zh:{DANMU:{DANMUSETTING:"å¼¹å¹è®¾ç½®",RESET:"éç½®",DANMUOPACITY:"ä¸éæåº¦",DANMUAREA:"æ¾ç¤ºåºå",DANMUSPEED:"å¼¹å¹é度",DANMUFONT:"åä½å¤§å°",INTELLIGENTBLOCKING:"æºè½æ¡æ¿",MINIMAL:"æå°",MODERATE:"éä¸",GREAT:"æå¤§",QUARTERSCREEN:"1/4",THREEQUARTERSCREEN:"3/4",HALFSCREEN:"1/2",FULLSCREEN:"1"},PERFORMANCE:{FORMAT:"æ ¼å¼",FPS:"帧ç",RESOLUTION:"å辨ç",ENCODETYPE:"ç¼ç æ¹å¼",BUFFEREND:"bufferæ°´ä½çº¿",FIRSETIME:"é¦å¸§æ¶é´",DECODEEFFICIENCY:"è§£ç æç",DECODECONSUMPTION:"è§£ç æ¶è"},HLSQUALITYCHANGE:{AUTO:"èªå¨"}},en:{DANMU:{DANMUSETTING:"Barrage settings",RESET:"Reset",DANMUOPACITY:"Opacity",DANMUAREA:"Display area",DANMUSPEED:"Barrage speed",DANMUFONT:"Font size",INTELLIGENTBLOCKING:"Intelligent blocking",MINIMAL:"Minimal",MODERATE:"Moderate",GREAT:"Great",QUARTERSCREEN:"1/4",THREEQUARTERSCREEN:"3/4",HALFSCREEN:"1/2",FULLSCREEN:"1"},PERFORMANCE:{FORMAT:"format",FPS:"fps",RESOLUTION:"resolution",ENCODETYPE:"encodeType",BUFFEREND:"bufferEnd",FIRSETIME:"firstTime",DECODEEFFICIENCY:"decodeEfficiency",DECODECONSUMPTION:"decodeConsumption"},HLSQUALITYCHANGE:{AUTO:"Auto"}}}},function(e,t,i){i=[i(4),i(0)],t=function(e,a){function t(){}return t.extend=function(e,t){function i(){this.constructor=r}var n=this,r=e&&a.has(e,"constructor")?e.constructor:function(){return n.apply(this,arguments)};a.extend(r,n,t);return i.prototype=n.prototype,r.prototype=new i,e&&a.extend(r.prototype,e),r.__super__=n.prototype,r},a.extend(t.prototype,e),t}.apply(t,i);void 0!==t&&(e.exports=t)},,,,,,,,,,,,,,,,,function(e,t,i){"use strict";var n="object"==typeof Reflect?Reflect:null,l=n&&"function"==typeof n.apply?n.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};var r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(o,l){return new Promise(function(e,t){function i(e){o.removeListener(l,n),t(e)}function n(){"function"==typeof o.removeListener&&o.removeListener("error",i),e([].slice.call(arguments))}var r,a,s;g(o,l,n,{once:!0}),"error"!==l&&(a=i,s={once:!0},"function"==typeof(r=o).on)&&g(r,"error",a,s)})},(s.EventEmitter=s).prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,a;return u(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener||i),r=e._events),a=r[t]),void 0===a?(a=r[t]=i,++e._eventsCount):("function"==typeof a?a=r[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),0<(r=h(e))&&a.length>r&&!a.warned&&(a.warned=!0,(n=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=a.length,console)&&console.warn),e}function c(e,t,i){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},t=function(){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)}.bind(e);return t.listener=i,e.wrapFn=t}function f(e,t,i){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return i?[e.listener||e]:[e];if(i){for(var n=e,r=new Array(n.length),a=0;a<r.length;++a)r[a]=n[a].listener||n[a];return r}return m(e,e.length)}function p(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function m(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function g(i,n,r,a){if("function"==typeof i.on)a.once?i.once(n,r):i.on(n,r);else{if("function"!=typeof i.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i);i.addEventListener(n,function e(t){a.once&&i.removeEventListener(n,e),r(t)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o}
2,set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return h(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){if((a=0<t.length?t[0]:a)instanceof Error)throw a;n=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw n.context=a,n}var a=r[e];if(void 0===a)return!1;if("function"==typeof a)l(a,this,t);else for(var s=a.length,o=m(a,s),i=0;i<s;++i)l(o[i],this,t);return!0},s.prototype.on=s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,c(this,e,t)),this},s.prototype.off=s.prototype.removeListener=function(e,t){var i,n,r,a,s;if(u(t),void 0!==(n=this._events)&&void 0!==(i=n[e]))if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,a=i.length-1;0<=a;a--)if(i[a]===t||i[a].listener===t){s=i[a].listener,r=a;break}if(r<0)return this;if(0===r)i.shift();else{for(var o=i,l=r;l+1<o.length;l++)o[l]=o[l+1];o.pop()}1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.removeAllListeners=function(e){var t,i=this._events;if(void 0!==i)if(void 0===i.removeListener)0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]);else if(0===arguments.length){for(var n,r=Object.keys(i),a=0;a<r.length;++a)"removeListener"!==(n=r[a])&&this.removeAllListeners(n);this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0}else if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;0<=a;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return 0<this._eventsCount?r(this._events):[]}},function(e,t,i){i=[i(0)],t=function(e){var i={},n=e.memoize(function(e){return null!==navigator.userAgent.toLowerCase().match(e)});function t(e){return function(){return n(e)}}var r=i.isInt=function(e){return parseFloat(e)%1==0},a=(i.isFlashSupported=function(){var e=i.flashVersion();return e&&e>=__FLASH_VERSION__},i.isFF=t(/firefox/i),i.isIPod=t(/iP(hone|od)/i),i.isIPad=t(/iPad/i),i.isSafari602=t(/Macintosh.*Mac OS X 10_8.*6\.0\.\d* Safari/i),i.isOSX=t(/Mac OS X/i),i.isEdge=t(/\sedge\/\d+/i),i.isIETrident=function(e){return!!i.isEdge()||(e?(e=parseFloat(e).toFixed(1),n(new RegExp("trident/.+rv:\\s*"+e,"i"))):n(/trident/i))}),s=i.isMSIE=function(e){return e?(e=parseFloat(e).toFixed(1),n(new RegExp("msie\\s*"+e,"i"))):n(/msie/i)},o=t(/chrome/i),l=(i.isChrome=function(){return o()&&!i.isEdge()},i.isChrome66=function(){var e=window.navigator.userAgent.toLowerCase().match(/chrome\/([\d.]+)/);return!!(this.isChrome()&&e&&e[1]&&66<=parseInt(e[1]))},i.isIE=function(e){return e?(11<=(e=parseFloat(e).toFixed(1))?a:s)(e):s()||a()},i.isSafari=function(){return n(/safari/i)&&!n(/chrome/i)&&!n(/chromium/i)&&!n(/android/i)},i.isIOS=function(e){return n(e?new RegExp("iP(hone|ad|od).+\\s(OS\\s"+e+"|.*\\sVersion/"+e+")","i"):/iP(hone|ad|od)/i)}),u=(i.isAndroidNative=function(e){return u(e,!0)},i.isAndroid=function(e,t){return!(t&&n(/chrome\/[123456789]/i)&&!n(/chrome\/18/))&&(e?(r(e)&&!/\./.test(e)&&(e+="."),n(new RegExp("Android\\s*"+e,"i"))):n(/Android/i))});return i.isMobile=function(){return l()||u()},i.isWeChat=function(){return"micromessenger"==navigator.userAgent.toLowerCase().match(/MicroMessenger/i)},i.isIframe=function(){return window.frameElement&&"IFRAME"===window.frameElement.nodeName},i.flashVersion=function(){if(i.isAndroid())return 0;var e,t=navigator.plugins;if(t&&(e=t["Shockwave Flash"])&&e.description)return parseFloat(e.description.replace(/\D+(\d+\.?\d*).*/,"$1"));if(void 0===window.ActiveXObject)return 0;try{if(e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseFloat(e.GetVariable("$version").split(" ")[1].replace(/\s*,\s*/,"."))}catch(e){return 0}return e},i.getBrowserInfo=function(){var e,t=window.navigator.userAgent.toLowerCase();return this.isIE()?t.match(/msie ([\d.]+)/)?"IE-"+t.match(/msie ([\d.]+)/)[1]:"IE-unknown":this.isChrome()?(e=t.match(/chrome\/([\d.]+)/))&&1<e.length?"Chrome-"+e[1]:"Chrome-unknown":this.isFF()?"Firefox-"+t.match(/firefox\/([\d.]+)/)[1]:this.isSafari()?"Safari"+((e=t.match(/version\/([\d.]+)/))&&e.length?"-"+t.match(/version\/([\d.]+)/)[1]:""):l()?"ios":u()?"android":"other"},i.isPoorIE=function(){return this.isIE()&&(s(8)||s(7)||s(6)||document.documentMode&&document.documentMode<=8)},i.getChromeVersion=function(){var e=window.navigator.userAgent.toLowerCase();
2return this.isChrome()&&(e=e.match(/chrome\/([\d.]+)/))&&1<e.length?e[1]:-1},i.browserJudge=function(){let e=window.document;let i=window.navigator.userAgent.toLowerCase(),t=e.documentMode,n=window.chrome||!1,r={agent:i,isIE:/msie/.test(i),isGecko:0<i.indexOf("gecko")&&i.indexOf("like gecko")<0,isWebkit:0<i.indexOf("webkit"),isStrict:"CSS1Compat"===e.compatMode,supportSubTitle:function(){return"track"in e.createElement("track")},supportScope:function(){return"scoped"in e.createElement("style")},ieVersion:function(){try{return i.match(/msie ([\d.]+)/)[1]||0}catch(e){return t}},operaVersion:function(){try{return window.opera?i.match(/opera.([\d.]+)/)[1]:0<i.indexOf("opr")?i.match(/opr\/([\d.]+)/)[1]:void 0}catch(e){return 0}},versionFilter:function(){if(1!==arguments.length||"string"!=typeof arguments[0])return 1===arguments.length?arguments[0]:0;var e=arguments[0],t=e.indexOf(".");if(0<t){t=e.indexOf(".",t+1);if(-1!==t)return e.substr(0,t)}return e}};try{r.type=r.isIE?"IE":window.opera||0<i.indexOf("opr")?"Opera":0<i.indexOf("chrome")?"Chrome":0<i.indexOf("safari")||window.openDatabase?"Safari":0<i.indexOf("firefox")?"Firefox":"unknow",r.version="IE"===r.type?r.ieVersion():"Firefox"===r.type?i.match(/firefox\/([\d.]+)/)[1]:"Chrome"===r.type?i.match(/chrome\/([\d.]+)/)[1]:"Opera"===r.type?r.operaVersion():"Safari"===r.type?i.match(/version\/([\d.]+)/)[1]:"0",r.shell=function(){var e,t;return 0<i.indexOf("maxthon")?(r.version=i.match(/maxthon\/([\d.]+)/)[1]||r.version,"岿¸¸æµè§å¨"):0<i.indexOf("qqbrowser")?(r.version=i.match(/qqbrowser\/([\d.]+)/)[1]||r.version,"QQæµè§å¨"):0<i.indexOf("se 2.x")?"æçæµè§å¨":n&&"Opera"!==r.type?(t=window.external,e=window.clientInformation.languages,t&&"LiebaoGetVersion"in t?"çè±¹æµè§å¨":0<i.indexOf("bidubrowser")?(r.version=i.match(/bidubrowser\/([\d.]+)/)[1]||i.match(/chrome\/([\d.]+)/)[1],"ç¾åº¦æµè§å¨"):r.supportSubTitle()&&void 0===e?(t=Object.keys(n.webstore).length,0 in window,1<t?"360æéæµè§å¨":"360å®å
¨æµè§å¨"):"Chrome"):r.type},r.name=r.shell(),r.version=r.versionFilter(r.version)}catch(e){}return[r.type,r.version]},i.isSupportWASM=function(){if(i.isMobile())return!1;var e=(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}return!1})();if(!1===e)return!1;if(!0===e){var e=i.browserJudge(),t=e[0],e=e[1];if("Chrome"===t&&e<85)return!1;if(0<=t.indexOf("360"))return!1;if(/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&13<e)return!1}return!0},i.isPictureInpicture=()=>document.pictureInPictureEnabled,i}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(d){var c={},f={TIT2:"title",TT2:"title",WXXX:"url",TPE1:"artist",TP1:"artist",TALB:"album",TAL:"album"};return c.utf8ArrayToStr=function(e,t){for(var i,n,r,a="",s=e.length,o=t||0;o<s;)if(0!==(i=e[o++])&&3!==i)switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(i);break;case 12:case 13:n=e[o++],a+=String.fromCharCode((31&i)<<6|63&n);break;case 14:n=e[o++],r=e[o++],a+=String.fromCharCode((15&i)<<12|(63&n)<<6|(63&r)<<0)}return a},c.utf16BigEndianArrayToStr=function(e,t){for(var i="",n=e.length-1,r=t||0;r<n;)254===e[r]&&255===e[r+1]||(i+=String.fromCharCode((e[r]<<8)+e[r+1])),r+=2;return i},c.syncSafeInt=function(e){e=c.arrayToInt(e);return 127&e|(32512&e)>>1|(8323072&e)>>2|(2130706432&e)>>3},c.arrayToInt=function(e){for(var t="0x",i=0;i<e.length;i++)t+=e[i].toString(16);return parseInt(t)},c.parseID3=function(e){return d.reduce(e,function(e,t){if(!("value"in t)&&"data"in t&&t.data instanceof ArrayBuffer){for(var i=new Uint8Array(t.data),n=i.length,r=(t={value:{key:"",data:""}},10);r<14&&r<i.length&&0!==i[r];)t.value.key+=String.fromCharCode(i[r]),r++;var a,s=19,o=i[s],l=(3!==o&&0!==o||(o=i[++s],n--),0);if(1!==o&&2!==o)for(var u=s+1;u<n;u++)if(0===i[u]){l=u-s;break}0<l?(o=c.utf8ArrayToStr(i.subarray(s,s+=l),0),"PRIV"===t.value.key?("com.apple.streaming.transportStreamTimestamp"===o?(a=1&c.syncSafeInt(i.subarray(s,s+=4)),h=c.syncSafeInt(i.subarray(s,s+=4)),a&&(h+=4294967296),t.value.data=h):t.value.data=c.utf8ArrayToStr(i,s+1),t.value.info=o):(t.value.info=o,t.value.data=c.utf8ArrayToStr(i,s+1))):(a=i[s],t.value.data=1===a||2===a?c.utf16BigEndianArrayToStr(i,s+1):c.utf8ArrayToStr(i,s+1))}var h;return f.hasOwnProperty(t.value.key)&&(e[f[t.value.key]]=t.value.data),t.value.info?(h=e[t.value.key],d.isObject(h)||(e[t.value.key]=h={}),h[t.value.info]=t.value.data):e[t.value.key]=t.value.data,e},{})},c}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(56)],t=function(u,a){function h(){}function d(e){var t=document.createElement("a"),i=document.createElement("a");t.href=location.href;try{return i.href=e,i.href=i.href,t.protocol+"//"+t.host!=i.protocol+"//"+i.host}catch(e){}return!0}var c=!1,f=function(e,t,i,n){u.isObject(e)&&(e=(n=e).url);var r,a,s=u.extend({xhr:null,url:e,withCredentials:!1,retryWithoutCredentials:!1,timeout:6e4,timeoutId:-1,oncomplete:t||h,onerror:i||h,mimeType:n&&!n.responseType?"text/xml":"",requireValidXML:!1,responseType:n&&n.plainText?"text":""},n);if("XDomainRequest"in window&&d(e))(r=s.xhr=new window.XDomainRequest).onload=m(s),r.ontimeout=r.onprogress=h,c=!0;
2else{if(!("XMLHttpRequest"in window))return void s.onerror("",e);(r=s.xhr=new window.XMLHttpRequest).onreadystatechange=(a=s,function(e){var t,i=e&&e.currentTarget||a.xhr;if(4===i.readyState)return clearTimeout(a.timeoutId),400<=i.status?(t=404===i.status?"File not found":i.status+"("+i.statusText+")",a.onerror(t,a.url,i)):200===i.status?m(a)(e):void 0})}o="æä»¶å 载失败",l=s;var o,l,t=function(e){var t,e=e&&e.currentTarget||l.xhr;clearTimeout(l.timeoutId),l.retryWithoutCredentials&&l.xhr.withCredentials?(p(e),t=u.extend({},l,{xhr:null,withCredentials:!1,retryWithoutCredentials:!1}),f(t)):l.onerror(o,l.url,e)};r.onerror=t,"overrideMimeType"in r?s.mimeType&&r.overrideMimeType(s.mimeType):c=!0;try{e=e.replace(/#.*$/,""),r.open("GET",e,!0)}catch(e){return t(e),r}if(s.responseType)try{r.responseType=s.responseType}catch(e){}s.timeout&&(s.timeoutId=setTimeout(function(){p(r),s.onerror("Timeout",e,r)},s.timeout),r.onabort=function(){clearTimeout(s.timeoutId)});try{s.withCredentials&&"withCredentials"in r&&(r.withCredentials=!0),r.send()}catch(e){t(e)}return r};function p(e){e.onload=null,e.onprogress=null,e.onreadystatechange=null,e.onerror=null,"abort"in e&&e.abort()}function m(r){return function(e){e=e&&e.currentTarget||r.xhr;if(clearTimeout(r.timeoutId),r.responseType){if("json"===r.responseType){var t=e,i=r;if(!t.response||u.isString(t.response)&&'"'!==t.responseText.substr(1))try{t=u.extend({},t,{response:JSON.parse(t.responseText)})}catch(e){return void i.onerror("Invalid JSON",i.url,t)}return i.oncomplete(t)}}else{var n,i=e.responseXML;if(i)try{n=i.firstChild}catch(e){}if(i&&n)return s(e,i,r);if(c&&e.responseText&&!i&&(i=a.parseXML(e.responseText))&&i.firstChild)return s(e,i,r);if(r.requireValidXML)return void r.onerror("Invalid XML",r.url,e)}r.oncomplete(e)}}function s(e,t,i){var n=t.documentElement;if(!i.requireValidXML||"parsererror"!==n.nodeName&&!n.getElementsByTagName("parsererror").length)return e.responseXML||(e=u.extend({},e,{responseXML:t})),i.oncomplete(e);i.onerror("Invalid XML",i.url,e)}return{ajax:f,crossdomain:d}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(a){return function(){var i={},n={},t={},r={};return{start:function(e){i[e]=a.now(),t[e]=t[e]+1||1},end:function(e){var t;i[e]&&(t=a.now()-i[e],n[e]=n[e]+t||t)},dump:function(){return{counts:t,sums:n,events:r}},tick:function(e,t){r[e]=t||a.now()},between:function(e,t){return r[t]&&r[e]?r[t]-r[e]:-1}}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(3),i(15),i(0)],t=function(e,i,n,t){e=e.noop,t=t.constant(!1);return{supports:t,prevFrame:e,nextFrame:e,snapshot:e,test1:e,play:e,load:e,stop:e,volume:e,mute:e,seek:e,resize:e,remove:e,destroy:e,setVisibility:e,setFullscreen:t,getFullscreen:e,getContainer:e,setContainer:t,getName:e,getQualityLevels:e,getCurrentQuality:e,setCurrentQuality:e,getAudioTracks:e,getCurrentAudioTrack:e,setCurrentAudioTrack:e,checkComplete:e,setControls:e,attachMedia:e,detachMedia:e,setState:function(e){var t=this.state||n.IDLE;(this.state=e)!==t&&this.trigger(i.JWPLAYER_PLAYER_STATE,{newstate:e})},sendMediaType:function(e){e=e[0].type;this.trigger(i.JWPLAYER_MEDIA_TYPE,{mediaType:"oga"===e||"aac"===e||"mp3"===e||"mpeg"===e||"vorbis"===e?"audio":"video"})}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(0),i(147),i(32)],t=function(e,t,i,n){return[{name:"cybercore",supports:function(e){return!!(n.isHls(e.file,"")||n.isMp4(e.file,"")||n.isMov(e.file,"")||n.isFlv(e.file,"")||n.isMpegTs(e.file,"")||n.isRtc(e.type)||n.isMp3(e.file,"")||n.isAac(e.file,"")||n.isFlac(e.file,"")||n.isOgg(e.file,"")||n.isWav(e.file,"")||n.isOpus(e.file,""))&&e.isHEVC}}]}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,x,D){!function(R,I){var P; 3/** 4 * @license 5 * Lodash <https://lodash.com/> 6 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 7 * Released under MIT license <https://lodash.com/license> 8 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 9 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 10 */!function(){var ja,Ga="Expected a function",_s="__lodash_hash_undefined__",ys="__lodash_placeholder__",Va=128,Ha=9007199254740991,vs=NaN,Ya=4294967295,As=[["ary",Va],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],za="[object Arguments]",Es="[object Array]",Wa="[object Boolean]",Qa="[object Date]",b
10s="[object Error]",ws="[object Function]",Ss="[object GeneratorFunction]",Ka="[object Map]",Ja="[object Number]",qa="[object Object]",Ts="[object Promise]",Xa="[object RegExp]",Za="[object Set]",$a="[object String]",Ls="[object Symbol]",es="[object WeakMap]",ts="[object ArrayBuffer]",is="[object DataView]",ks="[object Float32Array]",Cs="[object Float64Array]",Rs="[object Int8Array]",Is="[object Int16Array]",Ps="[object Int32Array]",xs="[object Uint8Array]",Ds="[object Uint8ClampedArray]",Ms="[object Uint16Array]",Bs="[object Uint32Array]",Fs=/\b__p \+= '';/g,Os=/\b(__p \+=) '' \+/g,Us=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ns=/&(?:amp|lt|gt|quot|#39);/g,js=/[&<>"']/g,Gs=RegExp(Ns.source),Vs=RegExp(js.source),Hs=/<%-([\s\S]+?)%>/g,Ys=/<%([\s\S]+?)%>/g,zs=/<%=([\s\S]+?)%>/g,Ws=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qs=/^\w*$/,Ks=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Js=/[\\^$.*+?()[\]{}|]/g,qs=RegExp(Js.source),Xs=/^\s+/,a=/\s/,Zs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$s=/\{\n\/\* \[wrapped with (.+)\] \*/,eo=/,? & /,to=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,io=/[()=,{}\[\]\/\s]/,no=/\\(\\)?/g,ro=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ao=/\w*$/,so=/^[-+]0x[0-9a-f]+$/i,oo=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,uo=/^0o[0-7]+$/i,ho=/^(?:0|[1-9]\d*)$/,co=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 5,759 bytes, line 10
107f]/g,fo=/($^)/,po=/['\n\r\u2028\u2029\\]/g,s="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",e="\\u2700-\\u27bf",t="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",l="\\ufe0e\\ufe0f",n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",u="['â]",r="["+s+"]",h="["+n+"]",d="["+o+"]",c="["+e+"]",f="["+t+"]",n="[^"+s+n+"\\d+"+e+t+i+"]",e="\\ud83c[\\udffb-\\udfff]",t="[^"+s+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",i="["+i+"]",g="\\u200d",_="(?:"+f+"|"+n+")",n="(?:"+i+"|"+n+")",y="(?:['â](?:d|ll|m|re|s|t|ve))?",v="(?:['â](?:D|LL|M|RE|S|T|VE))?",A="(?:"+d+"|"+e+")"+"?",E="["+l+"]?",E=E+A+("(?:"+g+"(?:"+[t,p,m].join("|")+")"+E+A+")*"),A="(?:"+[c,p,m].join("|")+")"+E,c="(?:"+[t+d+"?",d,p,m,r].join("|")+")",mo=RegExp(u,"g"),go=RegExp(d,"g"),b=RegExp(e+"(?="+e+")|"+c+E,"g"),_o=RegExp([i+"?"+f+"+"+y+"(?="+[h,i,"$"].join("|")+")",n+"+"+v+"(?="+[h,i+_,"$"].join("|")+")",i+"?"+_+"+"+y,i+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",A].join("|"),"g"),w=RegExp("["+g+s+o+l+"]"),yo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ao=-1,ns={},rs=(ns[ks]=ns[Cs]=ns[Rs]=ns[Is]=ns[Ps]=ns[xs]=ns[Ds]=ns[Ms]=ns[Bs]=!0,ns[za]=ns[Es]=ns[ts]=ns[Wa]=ns[is]=ns[Qa]=ns[bs]=ns[ws]=ns[Ka]=ns[Ja]=ns[qa]=ns[Xa]=ns[Za]=ns[$a]=ns[es]=!1,{}),S=(rs[za]=rs[Es]=rs[ts]=rs[is]=rs[Wa]=rs[Qa]=rs[ks]=rs[Cs]=rs[Rs]=rs[Is]=rs[Ps]=rs[Ka]=rs[Ja]=rs[qa]=rs[Xa]=rs[Za]=rs[$a]=rs[Ls]=rs[xs]=rs[Ds]=rs[Ms]=rs[Bs]=!0,rs[bs]=rs[ws]=rs[es]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),Eo=parseFloat,bo=parseInt,t="object"==typeof R&&R&&R.Object===Object&&R,p="object"==typeof self&&self&&self.Object===Object&&self,as=t||p||Function("return this")(),m=x&&!x.nodeType&&x,T=m&&"object"==typeof I&&I&&!I.nodeType&&I,wo=T&&T.exports===m,L=wo&&t.process,r=function(){try{var e=T&&T.require&&T.require("util").types;return e?e:L&&L.binding&&L.binding("util")}catch(e){}}(),So=r&&r.isArrayBuffer,To=r&&r.isDate,Lo=r&&r.isMap,ko=r&&r.isRegExp,Co=r&&r.isSet,Ro=r&&r.isTypedArray;function ss(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Io(e,t,i,n){for(var r=-1,a=null==e?0:e.length;++r<a;){var s=e[r];t(n,s,i(s),e)}return n}function os(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function Po(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function xo(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function ls(e,t){for(var i=-1,n=null==e?0:e.length,r=0,a=[];++i<n;){var s=e[i];t(s,i,e)&&(a[r++]=s)}return a}function Do(e,t){return!!(null==e?0:e.length)&&-1<ds(e,t,0)}function Mo(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function us(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function hs(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function Bo(e,t,i,n){var r=-1,a=null==e?0:e.length;for(n&&a&&(i=e[++r]);++r<a;)i=t(i,e[r],r,e);return i}function Fo(e,t,i,n){var r=null==e?0:e.length;for(n&&r&&(i=e[--r]);r--;)i=t(i,e[r],r,e);return i}function Oo(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var k=Ho("length");function Uo(e,n,t){var r;return t(e,function(e,t,i){if(n(e,t,i))return r=t,!1}),r}function No(e,t,i,n){for(var r=e.length,a=i+(n?1:-1);n?a--:++a<r;)if(t(e[a],a,e))return a;return-1}function ds(e,t,i){if(t!=t)return No(e,Go,i);for(var n=e,r=t,a=i-1,s=n.length;++a<s;)if(n[a]===r)return a;return-1}function jo(e,t,i,n){for(var r=i-1,a=e.length;++r<a;)if(n(e[r],t))return r;return-1}function Go(e){return e!=e}function Vo(e,t){var i=null==e?0:e.length;return i?zo(e,t)/i:vs}function Ho(t){return function(e){return null==e?ja:e[t]}}function C(t){return function(e){return null==t?ja:t[e]}}function Yo(e,n,r,a,t){return t(e,function(e,t,i){r=a?(a=!1,e):n(r,e,t,i)}),r}function zo(e,t){for(var i,n=-1,r=e.length;++n<r;){var a=t(e[n]);a!==ja&&(i=i===ja?a:i+a)}return i}function Wo(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Qo(e){return e&&e.slice(0,rl(e)+1).replace(Xs,"")}function cs(t){return function(e){return t(e)}}function Ko(t,e){return us(e,function(e){return t[e]})}function Jo(e,t){return e.has(t)}function qo(e,t){for(var i=-1,n=e.length;++i<n&&-1<ds(t,e[i],0););return i}function Xo(e,t){for(var i=e.length;i--&&-1<ds(t,e[i],0););return i}var Zo=C({"Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã
":"A","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","Ã":"C","ç":"c","Ã":"D","ð":"d","Ã":"E","Ã":"E","Ã":"E","Ã":"E","è":"e","é":"e","ê":"e","ë":"e","Ã":"I","Ã":"I","Ã":"I","Ã":"I","ì":"i","Ã":"i","î":"i","ï":"i","Ã":"N","ñ":"n","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ã":"U","Ã":"U","Ã":"U","Ã":"U","ù":"u","ú":"u","û":"u","ü":"u","Ã":"Y","ý":"y","ÿ":"y","Ã":"Ae","æ":"ae","Ã":"Th","þ":"th","Ã":"ss","Ä":"A","Ä":"A","Ä":"A","Ä":"a","Ä":"a","Ä
":"a","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"
10c","Ä":"c","Ä":"c","Ä":"c","Ä":"D","Ä":"D","Ä":"d","Ä":"d","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"G","Ä":"G","Ä ":"G","Ä¢":"G","Ä":"g","Ä":"g","Ä¡":"g","Ä£":"g","Ĥ":"H","Ħ":"H","Ä¥":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Ä®":"I","İ":"I","Ä©":"i","Ä«":"i","Ä":"i","į":"i","ı":"i","Ä´":"J","ĵ":"j","Ķ":"K","Ä·":"k","ĸ":"k","Ĺ":"L","Ä»":"L","Ľ":"L","Ä¿":"L","Å":"L","ĺ":"l","ļ":"l","ľ":"l","Å":"l","Å":"l","Å":"N","Å
":"N","Å":"N","Å":"N","Å":"n","Å":"n","Å":"n","Å":"n","Å":"O","Å":"O","Å":"O","Å":"o","Å":"o","Å":"o","Å":"R","Å":"R","Å":"R","Å":"r","Å":"r","Å":"r","Å":"S","Å":"S","Å":"S","Å ":"S","Å":"s","Å":"s","Å":"s","Å¡":"s","Å¢":"T","Ť":"T","Ŧ":"T","Å£":"t","Å¥":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Å®":"U","Ű":"U","Ų":"U","Å©":"u","Å«":"u","Å":"u","ů":"u","ű":"u","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","Å»":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Å":"Oe","Å":"oe","Å":"'n","Å¿":"s"}),$o=C({"&":"&","<":"<",">":">",'"':""","'":"'"});function el(e){return"\\"+S[e]}function fs(e){return w.test(e)}function tl(e){var i=-1,n=Array(e.size);return e.forEach(function(e,t){n[++i]=[t,e]}),n}function il(t,i){return function(e){return t(i(e))}}function ps(e,t){for(var i=-1,n=e.length,r=0,a=[];++i<n;){var s=e[i];s!==t&&s!==ys||(e[i]=ys,a[r++]=i)}return a}function nl(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function ms(e){return(fs(e)?function(e){var t=b.lastIndex=0;for(;b.test(e);)++t;return t}:k)(e)}function gs(e){return fs(e)?e.match(b)||[]:e.split("")}function rl(e){for(var t=e.length;t--&&a.test(e.charAt(t)););return t}var al=C({"&":"&","<":"<",">":">",""":'"',"'":"'"});var sl=function r(e){var b=(e=null==e?as:sl.defaults(as.Object(),e,sl.pick(as,vo))).Array,a=e.Date,x=e.Error,D=e.Function,M=e.Math,m=e.Object,B=e.RegExp,V=e.String,w=e.TypeError,H=b.prototype,Y=D.prototype,z=m.prototype,W=e["__core-js_shared__"],Q=Y.toString,F=z.hasOwnProperty,K=0,J=(Y=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",q=z.toString,X=Q.call(m),Z=as._,$=B("^"+Q.call(F).replace(Js,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=wo?e.Buffer:ja,t=e.Symbol,ee=e.Uint8Array,te=Y?Y.allocUnsafe:ja,ie=il(m.getPrototypeOf,m),ne=m.create,re=z.propertyIsEnumerable,ae=H.splice,se=t?t.isConcatSpreadable:ja,oe=t?t.iterator:ja,le=t?t.toStringTag:ja,ue=function(){try{var e=Xi(m,"defineProperty");return e({},"",{}),e}catch(e){}}(),he=e.clearTimeout!==as.clearTimeout&&e.clearTimeout,de=a&&a.now!==as.Date.now&&a.now,ce=e.setTimeout!==as.setTimeout&&e.setTimeout,fe=M.ceil,pe=M.floor,me=m.getOwnPropertySymbols,Y=Y?Y.isBuffer:ja,ge=e.isFinite,_e=H.join,ye=il(m.keys,m),S=M.max,T=M.min,ve=a.now,Ae=e.parseInt,Ee=M.random,be=H.reverse,a=Xi(e,"DataView"),we=Xi(e,"Map"),Se=Xi(e,"Promise"),Te=Xi(e,"Set"),e=Xi(e,"WeakMap"),Le=Xi(m,"create"),ke=e&&new e,Ce={},Re=wn(a),Ie=wn(we),Pe=wn(Se),xe=wn(Te),De=wn(e),t=t?t.prototype:ja,Me=t?t.valueOf:ja,Be=t?t.toString:ja;function p(e){if(G(e)&&!j(e)&&!(e instanceof _)){if(e instanceof g)return e;if(F.call(e,"__wrapped__"))return Sn(e)}return new g(e)}var Fe=function(e){if(!E(e))return{};if(ne)return ne(e);Oe.prototype=e;e=new Oe;return Oe.prototype=ja,e};function Oe(){}function Ue(){}function g(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ja}function _(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ya,this.__views__=[]}function Ne(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function je(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Ge(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Ve(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Ge;++t<i;)this.add(e[t])}function O(e){e=this.__data__=new je(e);this.size=e.size}function He(e,t){var i,n=j(e),r=!n&&_r(e),a=!n&&!r&&vr(e),s=!n&&!r&&!a&&Ir(e),o=n||r||a||s,l=o?Wo(e.length,V):[],u=l.length;for(i in e)!t&&!F.call(e,i)||o&&("length"==i||a&&("offset"==i||"parent"==i)||s&&("buffer"==i||"byteLength"==i||"byteOffset"==i)||rn(i,u))||l.push(i);return l}function Ye(e){var t=e.length;return t?e[Ut(0,t-1)]:ja}function ze(e,t){return vn(L(e),et(t,0,e.length))}function We(e){return vn(L(e))}function Qe(e,t,i){(i===ja||N(e[t],i))&&(i!==ja||t in e)||Ze(e,t,i)}function Ke(e,t,i){var n=e[t];F.call(e,t)&&N(n,i)&&(i!==ja||t in e)||Ze(e,t,i)}function Je(e,t){for(var i=e.length;i--;)if(N(e[i][0],t))return i;return-1}function qe(e,n,r,a){return rt(e,function(e,t,i){n(a,e,r(e),i)}),a}function Xe(e,t){return e&&mi(t,R(t),e)}
vendor: 54,585 bytes, line 10
10function Ze(e,t,i){"__proto__"==t&&ue?ue(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function $e(e,t){for(var i=-1,n=t.length,r=b(n),a=null==e;++i<n;)r[i]=a?ja:Yr(e,t[i]);return r}function et(e,t,i){return e=e==e&&(i!==ja&&(e=e<=i?e:i),t!==ja)?t<=e?e:t:e}function y(i,n,r,e,t,a){var s,o=1&n,l=2&n,u=4&n;if((s=r?t?r(i,e,t,a):r(i):s)===ja){if(!E(i))return i;var h,e=j(i);if(e){if(s=function(e){var t=e.length,i=new e.constructor(t);t&&"string"==typeof e[0]&&F.call(e,"index")&&(i.index=e.index,i.input=e.input);return i}(i),!o)return L(i,s)}else{var d=U(i),c=d==ws||d==Ss;if(vr(i))return ui(i,o);if(d==qa||d==za||c&&!t){if(s=l||c?{}:tn(i),!o)return l?(f=c=i,f=(h=s)&&mi(f,I(f),h),mi(c,$i(c),f)):(c=Xe(s,h=i),mi(h,Zi(h),c))}else{if(!rs[d])return t?i:{};s=function(e,t,i){var n=e.constructor;switch(t){case ts:return hi(e);case Wa:case Qa:return new n(+e);case is:return function(e,t){t=t?hi(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}(e,i);case ks:case Cs:case Rs:case Is:case Ps:case xs:case Ds:case Ms:case Bs:return di(e,i);case Ka:return new n;case Ja:case $a:return new n(e);case Xa:return function(e){var t=new e.constructor(e.source,ao.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Za:return new n;case Ls:return function(e){return Me?m(Me.call(e)):{}}(e)}}(i,d,o)}}var f=(a=a||new O).get(i);if(f)return f;a.set(i,s),Cr(i)?i.forEach(function(e){s.add(y(e,n,r,e,i,a))}):Sr(i)&&i.forEach(function(e,t){s.set(t,y(e,n,r,t,i,a))});var p=e?ja:(u?l?zi:Yi:l?I:R)(i);os(p||i,function(e,t){p&&(e=i[t=e]),Ke(s,t,y(e,n,r,t,i,a))})}return s}function tt(e,t,i){var n=i.length;if(null==e)return!n;for(e=m(e);n--;){var r=i[n],a=t[r],s=e[r];if(s===ja&&!(r in e)||!a(s))return!1}return!0}function it(e,t,i){if("function"!=typeof e)throw new w(Ga);return mn(function(){e.apply(ja,i)},t)}function nt(e,t,i,n){var r=-1,a=Do,s=!0,o=e.length,l=[],u=t.length;if(o){i&&(t=us(t,cs(i))),n?(a=Mo,s=!1):200<=t.length&&(a=Jo,s=!1,t=new Ve(t));e:for(;++r<o;){var h=e[r],d=null==i?h:i(h),h=n||0!==h?h:0;if(s&&d==d){for(var c=u;c--;)if(t[c]===d)continue e;l.push(h)}else a(t,d,n)||l.push(h)}}return l}p.templateSettings={escape:Hs,evaluate:Ys,interpolate:zs,variable:"",imports:{_:p}},(p.prototype=Ue.prototype).constructor=p,(g.prototype=Fe(Ue.prototype)).constructor=g,(_.prototype=Fe(Ue.prototype)).constructor=_,Ne.prototype.clear=function(){this.__data__=Le?Le(null):{},this.size=0},Ne.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Ne.prototype.get=function(e){var t,i=this.__data__;return Le?(t=i[e])===_s?ja:t:F.call(i,e)?i[e]:ja},Ne.prototype.has=function(e){var t=this.__data__;return Le?t[e]!==ja:F.call(t,e)},Ne.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Le&&t===ja?_s:t,this},je.prototype.clear=function(){this.__data__=[],this.size=0},je.prototype.delete=function(e){var t=this.__data__;return!((e=Je(t,e))<0||(e==t.length-1?t.pop():ae.call(t,e,1),--this.size,0))},je.prototype.get=function(e){var t=this.__data__;return(e=Je(t,e))<0?ja:t[e][1]},je.prototype.has=function(e){return-1<Je(this.__data__,e)},je.prototype.set=function(e,t){var i=this.__data__,n=Je(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Ge.prototype.clear=function(){this.size=0,this.__data__={hash:new Ne,map:new(we||je),string:new Ne}},Ge.prototype.delete=function(e){return e=Ji(this,e).delete(e),this.size-=e?1:0,e},Ge.prototype.get=function(e){return Ji(this,e).get(e)},Ge.prototype.has=function(e){return Ji(this,e).has(e)},Ge.prototype.set=function(e,t){var i=Ji(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},Ve.prototype.add=Ve.prototype.push=function(e){return this.__data__.set(e,_s),this},Ve.prototype.has=function(e){return this.__data__.has(e)},O.prototype.clear=function(){this.__data__=new je,this.size=0},O.prototype.delete=function(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e},O.prototype.get=function(e){return this.__data__.get(e)},O.prototype.has=function(e){return this.__data__.has(e)},O.prototype.set=function(e,t){var i=this.__data__;if(i instanceof je){var n=i.__data__;if(!we||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Ge(n)}return i.set(e,t),this.size=i.size,this};var rt=yi(dt),at=yi(ct,!0);function st(e,n){var r=!0;return rt(e,function(e,t,i){return r=!!n(e,t,i)}),r}function ot(e,t,i){for(var n=-1,r=e.length;++n<r;){var a,s,o=e[n],l=t(o);null!=l&&(a===ja?l==l&&!v(l):i(l,a))&&(a=l,s=o)}return s}function lt(e,n){var r=[];return rt(e,function(e,t,i){n(e,t,i)&&r.push(e)}),r}function l(e,t,i,n,r){var a=-1,s=e.length;for(i=i||nn,r=r||[];++a<s;){var o=e[a];0<t&&i(o)?1<t?l(o,t-1,i,n,r):hs(r,o):n||(r[r.length]=o)}return r}var ut=vi(),ht=vi(!0);function dt(e,t){return e&&ut(e,t,R)}function ct(e,t){return e&&ht(e,t,R)}function ft(t,e){return ls(e,function(e){return Er(t[e])})}function pt(e,t){for(var i=0,n=(t=ai(t,e)).length;null!=e&&i<n;)e=e[bn(t[i++])];return i&&i==n?e:ja}function mt(e,t,i){t=t(e);return j(e)?t:hs(t,i(e))}function i(e){if(null==e)return e===ja?"[object Undefined]":"[object Null]";if(le&&le in m(e)){var t=e,i=F.call(t,le),n=t[le];try{t[le]=ja;var r=!0}catch(e){}var a=q.call(t);return r&&(i?t[le]=n:delete t[le]),a}return q.call(e)}function gt(e,t){return t<e}function _t(e,t){return null!=e&&F.call(e,t)}function yt(e,t){return null!=e&&t in m(e)}function vt(e,t,i){for(var n=i?Mo:Do,r=e[0].length,a=e.length,s=a,o=b(a),l=1/0,u=[];s--;){var h=e[s];s&&t&&(h=us(h,cs(t))),l=T(h.length,l),o[s]=!i&&(t||120<=r&&120<=h.length)?new Ve(s&&h):ja}var h=e[0],d=-1,c=o[0];e:for(;++d<r&&u.length<l;){var f=h[d],p=t?t(f):f,f=i||0!==f?f:0;if(!(c?Jo(c,p):n(u,p,i))){for(s=a;--s;){var m=o[s];if(!(m?Jo(m,p):n(e[s],p,i)))continue e}c&&c.push(p),u.push(f)}}return u}function At(e,t,i){t=null==(e=cn(e,t=ai(t,e)))?e:e[bn(n(t))];return null==t?ja:ss(t,e,i)}function Et(e){return G(e)&&i(e)==za}function bt(e,t,i,n,r){if(e===t)return!0;if(null==e||null==t||!G(e)&&!G(t))return e!=e&&t!=t;var a=bt,s=j(e),o=j(t),l=s?Es:U(e),o=o?Es:U(t),u=(l=l==za?qa:l)==qa,h=(o=o==za?qa:o)==qa;if((o=l==o)&&vr(e)){if(!vr(t))return!1;u=!(s=!0)}if(o&&!u){r=r||new O;if(s||Ir(e))return Vi(e,t,i,n,a,r);else{var d=e;var c=t;var f=l;var p=i;var m=n;var g=a;var _=r;switch(f){case is:if(d.byteLength!=c.byteLength||d.byteOffset!=c.byteOffset)return!1;d=d.buffer,c=c.buffer;case ts:return d.byteLength==c.byteLength&&g(new ee(d),new ee(c))?!0:!1;case Wa:case Qa:case Ja:return N(+d,+c);case bs:return d.name==c.name&&d.message==c.message;case Xa:case $a:return d==c+"";case Ka:var y=tl;case Za:var v=1&p;if(y=y||nl,d.size!=c.size&&!v)return!1;v=_.get(d);if(v)return v==c;p|=2,_.set(d,c);v=Vi(y(d),y(c),p,m,g,_);return _.delete(d),v;case Ls:if(Me)return Me.call(d)==Me.call(c)}return!1;return}}if(!(1&i)){s=u&&F.call(e,"__wrapped__"),l=h&&F.call(t,"__wrapped__");if(s||l)return u=s?e.value():e,h=l?t.value():t,r=r||new O,a(u,h,i,n,r)}if(o){r=r||new O;var A=e,E=t,b=i,w=n,S=a,T=r,L=1&b,k=Yi(A),C=k.length,s=Yi(E).length;if(C!=s&&!L)return!1;for(var R=C;R--;){var I=k[R];if(!(L?I in E:F.call(E,I)))return!1}s=T.get(A),l=T.get(E);if(s&&l)return s==E&&l==A;for(var P=!0,x=(T.set(A,E),T.set(E,A),L);++R<C;){I=k[R];var D,M=A[I],B=E[I];if(!((D=w?L?w(B,M,I,E,A,T):w(M,B,I,A,E,T):D)===ja?M===B||S(M,B,b,w,T):D)){P=!1;break}x=x||"constructor"==I}return P&&!x&&(s=A.constructor,l=E.constructor,s!=l)&&"constructor"in A&&"constructor"in E&&!("function"==typeof s&&s instanceof s&&"function"==typeof l&&l instanceof l)&&(P=!1),T.delete(A),T.delete(E),P}return!1}function wt(e,t,i,n){var r=i.length,a=r,s=!n;if(null==e)return!a;for(e=m(e);r--;){var o=i[r];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<a;){var l=(o=i[r])[0],u=e[l],h=o[1];if(s&&o[2]){if(u===ja&&!(l in e))return!1}else{var d,c=new O;if(!((d=n?n(u,h,l,e,t,c):d)===ja?bt(h,u,3,n,c):d))return!1}}return!0}function St(e){var t;return!(!E(e)||(t=e,J&&J in t))&&(Er(e)?$:lo).test(wn(e))}function Tt(e){return"function"==typeof e?e:null==e?P:"object"==typeof e?j(e)?Pt(e[0],e[1]):It(e):ka(e)}function Lt(e){if(!ln(e))return ye(e);var t,i=[];for(t in m(e))F.call(e,t)&&"constructor"!=t&&i.push(t);return i}function kt(e){if(!E(e)){var t=e,i=[];if(null!=t)for(var n in m(t))i.push(n);return i}var r,a=ln(e),s=[];for(r in e)("constructor"!=r||!a&&F.call(e,r))&&s.push(r);return s}function Ct(e,t){return e<t}function Rt(e,n){var r=-1,a=h(e)?b(e.length):[];return rt(e,function(e,t,i){a[++r]=n(e,t,i)}),a}function It(t){var i=qi(t);return 1==i.length&&i[0][2]?hn(i[0][0],i[0][1]):function(e){return e===t||wt(e,t,i)}}function Pt(i,n){return an(i)&&un(n)?hn(bn(i),n):function(e){var t=Yr(e,i);return t===ja&&t===n?zr(e,i):bt(n,t,3)}}function xt(m,g,_,y,v){m!==g&&ut(g,function(e,t){var i,n,r,a,s,o,l,u,h,d,c,f,p;v=v||new O,E(e)?(n=g,a=_,s=xt,o=y,l=v,c=fn(i=m,r=t),f=fn(n,r),(p=l.get(f))?Qe(i,r,p):(p=o?o(c,f,r+"",i,n,l):ja,(n=p===ja)&&(u=j(f),h=!u&&vr(f),d=!u&&!h&&Ir(f),p=f,u||h||d?p=j(c)?c:A(c)?L(c):h?ui(f,!(n=!1)):d?di(f,!(n=!1)):[]:Lr(f)||_r(f)?_r(p=c)?p=Fr(c):E(c)&&!Er(c)||(p=tn(f)):n=!1),n&&(l.set(f,p),s(p,f,a,o,l),l.delete(f)),Qe(i,r,p))):(u=y?y(fn(m,t),e,t+"",m,g,v):ja,Qe(m,t,u=u===ja?e:u))},I)}function Dt(e,t){var i=e.length;if(i)return rn(t+=t<0?i:0,i)?e[t]:ja}function Mt(e,n,h){n=n.length?us(n,function(t){return j(t)?function(e){return pt(e,1===t.length?t[0]:t)}:t}):[P];var r=-1;n=us(n,cs(d()));var t=Rt(e,function(t,e,i){return{criteria:us(n,function(e){return e(t)}),index:++r,value:t}}),e=function(e,t){for(var i=h,n=-1,r=e.criteria,a=t.criteria,s=r.length,o=i.length;++n<s;){var l,u=ci(r[n],a[n]);if(u)return o<=n?u:(l=i[n],u*("desc"==l?-1:1))}return e.index-t.index},i=t.length;for(t.sort(e);i--;)t[i]=t[i].value;return t}function Bt(e,t,i){for(var n=-1,r=t.length,a={};++n<r;){var s=t[n],o=pt(e,s);i(o,s)&&Vt(a,ai(s,e),o)}return a}function Ft(e,t,i,n){var r=n?jo:ds,a=-1,s=t.length,o=e;for(e===t&&(t=L(t)),i&&(o=us(e,cs(i)));++a<s;)for(var l=0,u=t[a],h=i?i(u):u;-1<(l=r(o,h,l,n));)o!==e&&ae.call(o,l,1),ae.call(e,l,1);return e}function Ot(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r,a=t[i];i!=n&&a===r||(rn(r=a)?ae.call(e,a,1):Xt(e,a))}}function Ut(e,t){return e+pe(Ee()*(t-e+1))}function Nt(e,t){var i="";if(!(!e||t<1||Ha<t))for(;t%2&&(i+=e),(t=pe(t/2))&&(e+=e),t;);return i}function s(e,t){return gn(dn(e,t,P),e+"")}function jt(e){return Ye(ia(e))}function Gt(e,t){e=ia(e);return vn(e,et(t,0,e.length))}function Vt(e,t,i,n){if(E(e))for(var r=-1,a=(t=ai(t,e)).length,s=a-1,o=e;null!=o&&++r<a;){var l,u=bn(t[r]),h=i;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;Ke(o,u,h=r!=s&&(l=o[u],(h=n?n(l,u,o):ja)===ja)?E(l)?l:rn(t[r+1])?[]:{}:h),o=o[u]}return e}var Ht=ke?function(e,t){return ke.set(e,t),e}:P,t=ue?function(e,t){return ue(e,"toString",{configurable:!0,enumerable:!1,value:ga(t),writable:!0})}:P;function Yt(e){return vn(ia(e))}function o(e,t,i){for(var n=-1,r=e.length,a=((i=r<i?r:i)<0&&(i+=r),r=i<(t=t<0?r<-t?0:r+t:t)?0:i-t>>>0,t>>>=0,b(r));++n<r;)a[n]=e[n+t];return a}function zt(e,n){var r;return rt(e,function(e,t,i){return!(r=n(e,t,i))}),!!r}function Wt(e,t,i){var n=0,r=null==e?n:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;n<r;){var a=n+r>>>1,s=e[a];null!==s&&!v(s)&&(i?s<=t:s<t)?n=1+a:r=a}return r}return Qt(e,t,P,i)}function Qt(e,t,i,n){var r=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=i(t))!=t,o=null===t,l=v(t),u=t===ja;r<a;){var h=pe((r+a)/2),d=i(e[h]),c=d!==ja,f=null===d,p=d==d,m=v(d),p=s?n||p:u?p&&(n||c):o?p&&c&&(n||!f):l?p&&c&&!f&&(n||!m):!f&&!m&&(n?d<=t:d<t);p?r=h+1:a=h}return T(a,4294967294)}function Kt(e,t){for(var i=-1,n=e.length,r=0,a=[];++i<n;){var s,o=e[i],l=t?t(o):o;i&&N(l,s)||(s=l,a[r++]=0===o?0:o)}return a}function Jt(e){return"number"==typeof e?e:v(e)?vs:+e}function u(e){var t;return"string"==typeof e?e:j(e)?us(e,u)+"":v(e)?Be?Be.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}function qt(e,t,i){var n=-1,r=Do,a=e.length,s=!0,o=[],l=o;if(i)s=!1,r=Mo;else if(200<=a){var u=t?null:Fi(e);if(u)return nl(u);s=!1,r=Jo,l=new Ve}else l=t?[]:o;e:for(;++n<a;){var h=e[n],d=t?t(h):h,h=i||0!==h?h:0;if(s&&d==d){for(var c=l.length;c--;)if(l[c]===d)continue e;t&&l.push(d),o.push(h)}else r(l,d,i)||(l!==o&&l.push(d),o.push(h))}return o}function Xt(e,t){return null==(e=cn(e,t=ai(t,e)))||delete e[bn(n(t))]}function Zt(e,t,i,n){return Vt(e,t,i(pt(e,t)),n)}function $t(e,t,i,n){for(var r=e.length,a=n?r:-1;(n?a--:++a<r)&&t(e[a],a,e););return i?o(e,n?0:a,n?a+1:r):o(e,n?a+1:0,n?r:a)}function ei(e,t){var i=e;return Bo(t,function(e,t){return t.func.apply(t.thisArg,hs([e],t.args))},i=e instanceof _?e.value():i)}function ti(e,t,i){var n=e.length;if(n<2)return n?qt(e[0]):[];for(var r=-1,a=b(n);++r<n;)for(var s=e[r],o=-1;++o<n;)o!=r&&(a[r]=nt(a[r]||s,e[o],t,i));return qt(l(a,1),t,i)}function ii(e,t,i){for(var n=-1,r=e.length,a=t.length,s={};++n<r;){var o=n<a?t[n]:ja;i(s,e[n],o)}return s}function ni(e){return A(e)?e:[]}function ri(e){return"function"==typeof e?e:P}function ai(e,t){return j(e)?e:an(e,t)?[e]:En(f(e))}var si=s;function oi(e,t,i){var n=e.length;return i=i===ja?n:i,!t&&n<=i?e:o(e,t,i)}var li=he||function(e){return as.clearTimeout(e)};function ui(e,t){return t?e.slice():(t=e.length,t=te?te(t):new e.constructor(t),e.copy(t),t)}function hi(e){var t=new e.constructor(e.byteLength);return new ee(t).set(new ee(e)),t}function di(e,t){t=t?hi(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function ci(e,t){if(e!==t){var i=e!==ja,n=null===e,r=e==e,a=v(e),s=t!==ja,o=null===t,l=t==t,u=v(t);if(!o&&!u&&!a&&t<e||a&&s&&l&&!o&&!u||n&&s&&l||!i&&l||!r)return 1;if(!n&&!a&&!u&&e<t||u&&i&&r&&!n&&!a||o&&i&&r||!s&&r||!l)return-1}return 0}function fi(e,t,i,n){for(var r=-1,a=e.length,s=i.length,o=-1,l=t.length,u=S(a-s,0),h=b(l+u),d=!n;++o<l;)h[o]=t[o];for(;++r<s;)(d||r<a)&&(h[i[r]]=e[r]);for(;u--;)h[o++]=e[r++];return h}function pi(e,t,i,n){for(var r=-1,a=e.length,s=-1,o=i.length,l=-1,u=t.length,h=S(a-o,0),d=b(h+u),c=!n;++r<h;)d[r]=e[r];for(var f=r;++l<u;)d[f+l]=t[l];for(;++s<o;)(c||r<a)&&(d[f+i[s]]=e[r++]);return d}function L(e,t){var i=-1,n=e.length;for(t=t||b(n);++i<n;)t[i]=e[i];return t}function mi(e,t,i,n){for(var r=!i,a=(i=i||{},-1),s=t.length;++a<s;){var o=t[a],l=n?n(i[o],e[o],o,i,e):ja;(r?Ze:Ke)(i,o,l=l===ja?e[o]:l)}return i}function gi(r,a){return function(e,t){var i=j(e)?Io:qe,n=a?a():{};return i(e,r,d(t,2),n)}}function _i(o){return s(function(e,t){var i=-1,n=t.length,r=1<n?t[n-1]:ja,a=2<n?t[2]:ja,r=3<o.length&&"function"==typeof r?(n--,r):ja;for(a&&c(t[0],t[1],a)&&(r=n<3?ja:r,n=1),e=m(e);++i<n;){var s=t[i];s&&o(e,s,i,r)}return e})}function yi(a,s){return function(e,t){if(null!=e){if(!h(e))return a(e,t);for(var i=e.length,n=s?i:-1,r=m(e);(s?n--:++n<i)&&!1!==t(r[n],n,r););}return e}}function vi(l){return function(e,t,i){for(var n=-1,r=m(e),a=i(e),s=a.length;s--;){var o=a[l?s:++n];if(!1===t(r[o],o,r))break}return e}}function Ai(n){return function(e){var t=fs(e=f(e))?gs(e):ja,i=t?t[0]:e.charAt(0),t=t?oi(t,1).join(""):e.slice(1);return i[n]()+t}}function Ei(t){return function(e){return Bo(fa(aa(e).replace(mo,"")),t,"")}}function bi(n){return function(){var e=arguments;switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3]);case 5:return new n(e[0],e[1],e[2],e[3],e[4]);case 6:return new n(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new n(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=Fe(n.prototype),i=n.apply(t,e);return E(i)?i:t}}function wi(a,s,o){var l=bi(a);return function e(){for(var t=arguments.length,i=b(t),n=t,r=Ki(e);n--;)i[n]=arguments[n];r=t<3&&i[0]!==r&&i[t-1]!==r?[]:ps(i,r);return(t-=r.length)<o?Mi(a,s,Li,e.placeholder,ja,i,r,ja,ja,o-t):ss(this&&this!==as&&this instanceof e?l:a,this,i)}}function Si(a){return function(e,t,i){var n,r=m(e),t=(h(e)||(n=d(t,3),e=R(e),t=function(e){return n(r[e],e,r)}),a(e,t,i));return-1<t?r[n?e[t]:t]:ja}}function Ti(l){return Hi(function(r){var a=r.length,e=a,t=g.prototype.thru;for(l&&r.reverse();e--;){var i=r[e];if("function"!=typeof i)throw new w(Ga);t&&!o&&"wrapper"==Qi(i)&&(o=new g([],!0))}for(e=o?e:a;++e<a;)var n=Qi(i=r[e]),s="wrapper"==n?Wi(i):ja,o=s&&sn(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[Qi(s[0])].apply(o,s[3]):1==i.length&&sn(i)?o[n]():o.thru(i);return function(){var e=arguments,t=e[0];if(o&&1==e.length&&j(t))return o.plant(t).value();for(var i=0,n=a?r[i].apply(this,e):t;++i<a;)n=r[i].call(this,n);return n}})}function Li(s,o,l,u,h,d,c,f,p,m){var g=o&Va,_=1&o,y=2&o,v=24&o,A=512&o,E=y?ja:bi(s);return function e(){for(var t,i,n,r=b(n=arguments.length),a=n;a--;)r[a]=arguments[a];return v&&(i=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(r,t=Ki(e))),u&&(r=fi(r,u,h,v)),d&&(r=pi(r,d,c,v)),n-=i,v&&n<m?(i=ps(r,t),Mi(s,o,Li,e.placeholder,l,r,i,f,p,m-n)):(t=_?l:this,i=y?t[s]:s,n=r.length,f?r=function(e,t){for(var i=e.length,n=T(t.length,i),r=L(e);n--;){var a=t[n];e[n]=rn(a,i)?r[a]:ja}return e}(r,f):A&&1<n&&r.reverse(),g&&p<n&&(r.length=p),(i=this&&this!==as&&this instanceof e?E||bi(i):i).apply(t,r))}}function ki(i,s){return function(e,t){return e=e,n=i,r=s(t),a={},dt(e,function(e,t,i){n(a,r(e),t,i)}),a;var n,r,a}}function Ci(n,r){return function(e,t){var i;if(e===ja&&t===ja)return r;if(e!==ja&&(i=e),t!==ja){if(i===ja)return t;t=("string"==typeof e||"string"==typeof t?(e=u(e),u):(e=Jt(e),Jt))(t),i=n(e,t)}return i}}function Ri(n){return Hi(function(e){return e=us(e,cs(d())),s(function(t){var i=this;return n(e,function(e){return ss(e,i,t)})})})}function Ii(e,t){var i=(t=t===ja?" ":u(t)).length;return i<2?i?Nt(t,e):t:(i=Nt(t,fe(e/ms(t))),fs(t)?oi(gs(i),0,e).join(""):i.slice(0,e))}function Pi(o,e,l,u){var h=1&e,d=bi(o);return function e(){for(var t=-1,i=arguments.length,n=-1,r=u.length,a=b(r+i),s=this&&this!==as&&this instanceof e?d:o;++n<r;)a[n]=u[n];for(;i--;)a[n++]=arguments[++t];return ss(s,h?l:this,a)}}function xi(u){return function(e,t,i){i&&"number"!=typeof i&&c(e,t,i)&&(t=i=ja),e=Mr(e),t===ja?(t=e,e=0):t=Mr(t),i=i===ja?e<t?1:-1:Mr(i);for(var n=e,r=i,a=u,s=-1,o=S(fe((t-n)/(r||1)),0),l=b(o);o--;)l[a?o:++s]=n,n+=r;return l}}function Di(i){return function(e,t){return"string"==typeof e&&"string"==typeof t||(e=C(e),t=C(t)),i(e,t)}}function Mi(e,t,i,n,r,a,s,o,l,u){var h=8&t,r=(4&(t=(t|(h?32:64))&~(h?64:32))||(t&=-4),[e,t,r,h?a:ja,h?s:ja,h?ja:a,h?ja:s,o,l,u]),a=i.apply(ja,r);return sn(e)&&pn(a,r),a.placeholder=n,_n(a,e,t)}function Bi(e){var n=M[e];return function(e,t){var i;return e=C(e),(t=null==t?0:T(k(t),292))&&ge(e)?(i=(f(e)+"e").split("e"),+((i=(f(n(i[0]+"e"+(+i[1]+t)))+"e").split("e"))[0]+"e"+(+i[1]-t))):n(e)}}var Fi=Te&&1/nl(new Te([,-0]))[1]==1/0?function(e){return new Te(e)}:wa;function Oi(a){return function(e){var t,i,n,r=U(e);return r==Ka?tl(e):r==Za?(r=e,t=-1,i=Array(r.size),r.forEach(function(e){i[++t]=[e,e]}),i):us(a(n=e),function(e){return[e,n[e]]})}}function Ui(e,t,i,n,r,a,s,o){var l,u,h,d,c,f,p,m,g,_,y,v,A,E=2&t;if(E||"function"==typeof e)return(l=n?n.length:0)||(t&=-97,n=r=ja),s=s===ja?s:S(k(s),0),o=o===ja?o:k(o),l-=r?r.length:0,64&t&&(h=n,d=r,n=r=ja),u=E?ja:Wi(e),h=[e,t,i,n,r,h,d,a,s,o],u&&(d=u,s=(a=h)[1],f=d[1],m=(p=s|f)<131,g=f==Va&&8==s||f==Va&&256==s&&a[7].length<=d[8]||384==f&&d[7].length<=d[8]&&8==s,m||g)&&(1&f&&(a[2]=d[2],p|=1&s?0:4),(m=d[3])&&(c=a[3],a[3]=c?fi(c,m,d[4]):m,a[4]=c?ps(a[3],ys):d[4]),(m=d[5])&&(c=a[5],a[5]=c?pi(c,m,d[6]):m,a[6]=c?ps(a[5],ys):d[6]),(m=d[7])&&(a[7]=m),f&Va&&(a[8]=null==a[8]?d[8]:T(a[8],d[8])),null==a[9]&&(a[9]=d[9]),a[0]=d[0],a[1]=p),e=h[0],t=h[1],i=h[2],n=h[3],r=h[4],!(o=h[9]=h[9]===ja?E?0:e.length:S(h[9]-l,0))&&24&t&&(t&=-25),g=t&&1!=t?8==t||16==t?wi(e,t,o):32!=t&&33!=t||r.length?Li.apply(ja,h):Pi(e,t,i,n):(y=i,v=1&t,A=bi(_=e),function e(){return(this&&this!==as&&this instanceof e?A:_).apply(v?y:this,arguments)}),_n((u?Ht:pn)(g,h),e,t);throw new w(Ga)}function Ni(e,t,i,n){return e===ja||N(e,z[i])&&!F.call(n,i)?t:e}function ji(e,t,i,n,r,a){return E(e)&&E(t)&&(a.set(t,e),xt(e,t,ja,ji,a),a.delete(t)),e}function Gi(e){return Lr(e)?ja:e}function Vi(e,t,i,n,r,a){var s=1&i,o=e.length,l=t.length;if(o!=l&&!(s&&o<l))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var h=-1,d=!0,c=2&i?new Ve:ja;for(a.set(e,t),a.set(t,e);++h<o;){var f,p=e[h],m=t[h];if((f=n?s?n(m,p,h,t,e,a):n(p,m,h,e,t,a):f)!==ja){if(f)continue;d=!1;break}if(c){if(!Oo(t,function(e,t){return!Jo(c,t)&&(p===e||r(p,e,i,n,a))&&c.push(t)})){d=!1;break}}else if(p!==m&&!r(p,m,i,n,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Hi(e){return gn(dn(e,ja,kn),e+"")}function Yi(e){return mt(e,R,Zi)}function zi(e){return mt(e,I,$i)}var Wi=ke?function(e){return ke.get(e)}:wa;function Qi(e){for(var t=e.name+"",i=Ce[t],n=F.call(Ce,t)?i.length:0;n--;){var r=i[n],a=r.func;if(null==a||a==e)return r.name}return t}function Ki(e){return(F.call(p,"placeholder")?p:e).placeholder}function d(){var e=(e=p.iteratee||va)===va?Tt:e;return arguments.length?e(arguments[0],arguments[1]):e}function Ji(e,t){var i,n,e=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?e["string"==typeof t?"string":"hash"]:e.map}function qi(e){for(var t=R(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,un(r)]}return t}function Xi(e,t){t=t;e=null==(e=e)?ja:e[t];return St(e)?e:ja}var Zi=me?function(t){return null==t?[]:(t=m(t),ls(me(t),function(e){return re.call(t,e)}))}:Ia,$i=me?function(e){for(var t=[];e;)hs(t,Zi(e)),e=ie(e);return t}:Ia,U=i;function en(e,t,i){for(var n=-1,r=(t=ai(t,e)).length,a=!1;++n<r;){var s=bn(t[n]);if(!(a=null!=e&&i(e,s)))break;e=e[s]}return a||++n!=r?a:!!(r=null==e?0:e.length)&&wr(r)&&rn(s,r)&&(j(e)||_r(e))}function tn(e){return"function"!=typeof e.constructor||ln(e)?{}:Fe(ie(e))}function nn(e){return j(e)||_r(e)||!!(se&&e&&e[se])}function rn(e,t){var i=typeof e;return!!(t=null==t?Ha:t)&&("number"==i||"symbol"!=i&&ho.test(e))&&-1<e&&e%1==0&&e<t}function c(e,t,i){var n;if(E(i))return("number"==(n=typeof t)?h(i)&&rn(t,i.length):"string"==n&&t in i)&&N(i[t],e)}function an(e,t){var i;if(!j(e))return"number"==(i=typeof e)||"symbol"==i||"boolean"==i||null==e||v(e)||Qs.test(e)||!Ws.test(e)||null!=t&&e in m(t)}function sn(e){var t=Qi(e),i=p[t];return"function"==typeof i&&t in _.prototype&&(e===i||(t=Wi(i))&&e===t[0])}(a&&U(new a(new ArrayBuffer(1)))!=is||we&&U(new we)!=Ka||Se&&U(Se.resolve())!=Ts||Te&&U(new Te)!=Za||e&&U(new e)!=es)&&(U=function(e){var t=i(e),e=t==qa?e.constructor:ja,e=e?wn(e):"";if(e)switch(e){case Re:return is;case Ie:return Ka;case Pe:return Ts;case xe:return Za;case De:return es}return t});var on=W?Er:Pa;function ln(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||z)}function un(e){return e==e&&!E(e)}function hn(t,i){return function(e){return null!=e&&e[t]===i&&(i!==ja||t in m(e))}}function dn(a,s,o){return s=S(s===ja?a.length-1:s,0),function(){for(var e=arguments,t=-1,i=S(e.length-s,0),n=b(i);++t<i;)n[t]=e[s+t];for(var t=-1,r=b(s+1);++t<s;)r[t]=e[t];return r[s]=o(n),ss(a,this,r)}}function cn(e,t){return t.length<2?e:pt(e,o(t,0,-1))}function fn(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pn=yn(Ht),mn=ce||function(e,t){return as.setTimeout(e,t)},gn=yn(t);function _n(e,t,i){var n,r,a,t=t+"";return gn(e,(r=(t=(t=e=t).match($s))?t[1].split(eo):[],a=i,os(As,function(e){var t="_."+e[0];a&e[1]&&!Do(r,t)&&r.push(t)}),t=r.sort(),(i=t.length)?(t[n=i-1]=(1<i?"& ":"")+t[n],t=t.join(2<i?", ":" "),e.replace(Zs,"{\n/* [wrapped with "+t+"] */\n")):e))}function yn(i){var n=0,r=0;return function(){var e=ve(),t=16-(e-r);if(r=e,0<t){if(800<=++n)return arguments[0]}else n=0;return i.apply(ja,arguments)}}function vn(e,t){var i=-1,n=e.length,r=n-1;for(t=t===ja?n:t;++i<t;){var a=Ut(i,r),s=e[a];e[a]=e[i],e[i]=s}return e.length=t,e}An=(he=hr(he=function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(Ks,function(e,t,i,n){r.push(i?n.replace(no,"$1"):t||e)}),r},function(e){return 500===An.size&&An.clear(),e})).cache;var An,En=he;function bn(e){var t;return"string"==typeof e||v(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function wn(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Sn(e){var t;return e instanceof _?e.clone():((t=new g(e.__wrapped__,e.__chain__)).__actions__=L(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t)}a=s(function(e,t){return A(e)?nt(e,l(t,1,A,!0)):[]}),Se=s(function(e,t){var i=n(t);return A(i)&&(i=ja),A(e)?nt(e,l(t,1,A,!0),d(i,2)):[]}),e=s(function(e,t){var i=n(t);return A(i)&&(i=ja),A(e)?nt(e,l(t,1,A,!0),ja,i):[]});function Tn(e,t,i){var n=null==e?0:e.length;return n?((i=null==i?0:k(i))<0&&(i=S(n+i,0)),No(e,d(t,3),i)):-1}function Ln(e,t,i){var n,r=null==e?0:e.length;return r?(n=r-1,i!==ja&&(n=k(i),n=i<0?S(r+n,0):T(n,r-1)),No(e,d(t,3),n,!0)):-1}function kn(e){return(null==e?0:e.length)?l(e,1):[]}function Cn(e){return e&&e.length?e[0]:ja}W=s(function(e){var t=us(e,ni);return t.length&&t[0]===e[0]?vt(t):[]}),ce=s(function(e){var t=n(e),i=us(e,ni);return t===n(i)?t=ja:i.pop(),i.length&&i[0]===e[0]?vt(i,d(t,2)):[]}),t=s(function(e){var t=n(e),i=us(e,ni);return(t="function"==typeof t?t:ja)&&i.pop(),i.length&&i[0]===e[0]?vt(i,ja,t):[]});function n(e){var t=null==e?0:e.length;return t?e[t-1]:ja}he=s(Rn);function Rn(e,t){return e&&e.length&&t&&t.length?Ft(e,t):e}var In=Hi(function(e,t){var i=null==e?0:e.length,n=$e(e,t);return Ot(e,us(t,function(e){return rn(e,i)?+e:e}).sort(ci)),n});function Pn(e){return null==e?e:be.call(e)}var xn=s(function(e){return qt(l(e,1,A,!0))}),Dn=s(function(e){var t=n(e);return A(t)&&(t=ja),qt(l(e,1,A,!0),d(t,2))}),Mn=s(function(e){var t="function"==typeof(t=n(e))?t:ja;return qt(l(e,1,A,!0),ja,t)});function Bn(t){var i;return t&&t.length?(i=0,t=ls(t,function(e){return A(e)&&(i=S(e.length,i),1)}),Wo(i,function(e){return us(t,Ho(e))})):[]}function Fn(e,t){return e&&e.length?(e=Bn(e),null==t?e:us(e,function(e){return ss(t,ja,e)})):[]}var On=s(function(e,t){return A(e)?nt(e,t):[]}),Un=s(function(e){return ti(ls(e,A))}),Nn=s(function(e){var t=n(e);return A(t)&&(t=ja),ti(ls(e,A),d(t,2))}),jn=s(function(e){var t="function"==typeof(t=n(e))?t:ja;return ti(ls(e,A),ja,t)}),Gn=s(Bn);var Vn=s(function(e){var t=e.length,t="function"==typeof(t=1<t?e[t-1]:ja)?(e.pop(),t):ja;return Fn(e,t)});function Hn(e){e=p(e);return e.__chain__=!0,e}function Yn(e,t){return t(e)}var zn=Hi(function(t){function e(e){return $e(e,t)}var i=t.length,n=i?t[0]:0,r=this.__wrapped__;return!(1<i||this.__actions__.length)&&r instanceof _&&rn(n)?((r=r.slice(n,+n+(i?1:0))).__actions__.push({func:Yn,args:[e],thisArg:ja}),new g(r,this.__chain__).thru(function(e){return i&&!e.length&&e.push(ja),e})):this.thru(e)});var Wn=gi(function(e,t,i){F.call(e,i)?++e[i]:Ze(e,i,1)});var Qn=Si(Tn),Kn=Si(Ln);function Jn(e,t){return(j(e)?os:rt)(e,d(t,3))}function qn(e,t){return(j(e)?Po:at)(e,d(t,3))}var Xn=gi(function(e,t,i){F.call(e,i)?e[i].push(t):Ze(e,i,[t])});var Zn=s(function(e,t,i){var n=-1,r="function"==typeof t,a=h(e)?b(e.length):[];return rt(e,function(e){a[++n]=r?ss(t,e,i):At(e,t,i)}),a}),$n=gi(function(e,t,i){Ze(e,i,t)});function er(e,t){return(j(e)?us:Rt)(e,d(t,3))}var tr=gi(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]});var ir=s(function(e,t){var i;return null==e?[]:(1<(i=t.length)&&c(e,t[0],t[1])?t=[]:2<i&&c(t[0],t[1],t[2])&&(t=[t[0]]),Mt(e,l(t,1),[]))}),nr=de||function(){return as.Date.now()};function rr(e,t,i){return t=i?ja:t,t=e&&null==t?e.length:t,Ui(e,Va,ja,ja,ja,ja,t)}function ar(e,t){var i;if("function"!=typeof t)throw new w(Ga);return e=k(e),function(){return 0<--e&&(i=t.apply(this,arguments)),e<=1&&(t=ja),i}}var sr=s(function(e,t,i){var n,r=1;return i.length&&(n=ps(i,Ki(sr)),r|=32),Ui(e,r,t,i,n)}),or=s(function(e,t,i){var n,r=3;return i.length&&(n=ps(i,Ki(or)),r|=32),Ui(t,r,e,i,n)});function lr(n,i,e){var r,a,s,o,l,u,h=0,d=!1,c=!1,t=!0;if("function"!=typeof n)throw new w(Ga);function f(e){var t=r,i=a;return r=a=ja,h=e,o=n.apply(i,t)}function p(e){var t=e-u;return u===ja||i<=t||t<0||c&&s<=e-h}function m(){var e,t=nr();if(p(t))return g(t);l=mn(m,(e=i-((t=t)-u),c?T(e,s-(t-h)):e))}function g(e){return l=ja,t&&r?f(e):(r=a=ja,o)}function _(){var e=nr(),t=p(e);if(r=arguments,a=this,u=e,t){if(l===ja)return h=e=u,l=mn(m,i),d?f(e):o;if(c)return li(l),l=mn(m,i),f(u)}return l===ja&&(l=mn(m,i)),o}return i=C(i)||0,E(e)&&(d=!!e.leading,c="maxWait"in e,s=c?S(C(e.maxWait)||0,i):s,t="trailing"in e?!!e.trailing:t),_.cancel=function(){l!==ja&&li(l),h=0,r=u=a=l=ja},_.flush=function(){return l===ja?o:g(nr())},_}var de=s(function(e,t){return it(e,1,t)}),ur=s(function(e,t,i){return it(e,C(t)||0,i)});function hr(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new w(Ga);function a(){var e=arguments,t=r?r.apply(this,e):e[0],i=a.cache;return i.has(t)?i.get(t):(e=n.apply(this,e),a.cache=i.set(t,e)||i,e)}return a.cache=new(hr.Cache||Ge),a}function dr(t){if("function"!=typeof t)throw new w(Ga);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}hr.Cache=Ge;var si=si(function(n,r){var a=(r=1==r.length&&j(r[0])?us(r[0],cs(d())):us(l(r,1),cs(d()))).length;return s(function(e){for(var t=-1,i=T(e.length,a);++t<i;)e[t]=r[t].call(this,e[t]);return ss(n,this,e)})}),cr=s(function(e,t){var i=ps(t,Ki(cr));return Ui(e,32,ja,t,i)}),fr=s(function(e,t){var i=ps(t,Ki(fr));return Ui(e,64,ja,t,i)}),pr=Hi(function(e,t){return Ui(e,256,ja,ja,ja,t)});function N(e,t){return e===t||e!=e&&t!=t}var mr=Di(gt),gr=Di(function(e,t){return t<=e}),_r=Et(function(){return arguments}())?Et:function(e){return G(e)&&F.call(e,"callee")&&!re.call(e,"callee")},j=b.isArray,yr=So?cs(So):function(e){return G(e)&&i(e)==ts};function h(e){return null!=e&&wr(e.length)&&!Er(e)}function A(e){return G(e)&&h(e)}var vr=Y||Pa,Y=To?cs(To):function(e){return G(e)&&i(e)==Qa};function Ar(e){var t;return!!G(e)&&((t=i(e))==bs||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Lr(e))}function Er(e){return!!E(e)&&((e=i(e))==ws||e==Ss||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function br(e){return"number"==typeof e&&e==k(e)}function wr(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=Ha}function E(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function G(e){return null!=e&&"object"==typeof e}var Sr=Lo?cs(Lo):function(e){return G(e)&&U(e)==Ka};function Tr(e){return"number"==typeof e||G(e)&&i(e)==Ja}function Lr(e){return!(!G(e)||i(e)!=qa)&&(null===(e=ie(e))||"function"==typeof(e=F.call(e,"constructor")&&e.constructor)&&e instanceof e&&Q.call(e)==X)}var kr=ko?cs(ko):function(e){return G(e)&&i(e)==Xa};var Cr=Co?cs(Co):function(e){return G(e)&&U(e)==Za};function Rr(e){return"string"==typeof e||!j(e)&&G(e)&&i(e)==$a}function v(e){return"symbol"==typeof e||G(e)&&i(e)==Ls}var Ir=Ro?cs(Ro):function(e){return G(e)&&wr(e.length)&&!!ns[i(e)]};var Pr=Di(Ct),xr=Di(function(e,t){return e<=t});function Dr(e){if(!e)return[];if(h(e))return(Rr(e)?gs:L)(e);if(oe&&e[oe]){for(var t,i=e[oe](),n=[];!(t=i.next()).done;)n.push(t.value);return n}var r=U(e);return(r==Ka?tl:r==Za?nl:ia)(e)}function Mr(e){return e?(e=C(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function k(e){var e=Mr(e),t=e%1;return e==e?t?e-t:e:0}function Br(e){return e?et(k(e),0,Ya):0}function C(e){if("number"==typeof e)return e;if(v(e))return vs;if("string"!=typeof(e=E(e)?E(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t:e))return 0===e?e:+e;e=Qo(e);var t=oo.test(e);return t||uo.test(e)?bo(e.slice(2),t?2:8):so.test(e)?vs:+e}function Fr(e){return mi(e,I(e))}function f(e){return null==e?"":u(e)}var Or=_i(function(e,t){if(ln(t)||h(t))mi(t,R(t),e);else for(var i in t)F.call(t,i)&&Ke(e,i,t[i])}),Ur=_i(function(e,t){mi(t,I(t),e)}),Nr=_i(function(e,t,i,n){mi(t,I(t),e,n)}),jr=_i(function(e,t,i,n){mi(t,R(t),e,n)}),Gr=Hi($e);var Vr=s(function(e,t){e=m(e);var i=-1,n=t.length,r=2<n?t[2]:ja;for(r&&c(t[0],t[1],r)&&(n=1);++i<n;)for(var a=t[i],s=I(a),o=-1,l=s.length;++o<l;){var u=s[o],h=e[u];(h===ja||N(h,z[u])&&!F.call(e,u))&&(e[u]=a[u])}return e}),Hr=s(function(e){return e.push(ja,ji),ss(qr,ja,e)});function Yr(e,t,i){e=null==e?ja:pt(e,t);return e===ja?i:e}function zr(e,t){return null!=e&&en(e,t,yt)}var Wr=ki(function(e,t,i){e[t=null!=t&&"function"!=typeof t.toString?q.call(t):t]=i},ga(P)),Qr=ki(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=q.call(t)),F.call(e,t)?e[t].push(i):e[t]=[i]},d),Kr=s(At);function R(e){return(h(e)?He:Lt)(e)}function I(e){return h(e)?He(e,!0):kt(e)}var Jr=_i(function(e,t,i){xt(e,t,i)}),qr=_i(function(e,t,i,n){xt(e,t,i,n)}),Xr=Hi(function(t,e){var i={};if(null!=t)for(var n=!1,r=(e=us(e,function(e){return e=ai(e,t),n=n||1<e.length,e}),mi(t,zi(t),i),n&&(i=y(i,7,Gi)),e.length);r--;)Xt(i,e[r]);return i});var Zr=Hi(function(e,t){return null==e?{}:Bt(i=e,t,function(e,t){return zr(i,t)});var i});function $r(e,i){var t;return null==e?{}:(t=us(zi(e),function(e){return[e]}),i=d(i),Bt(e,t,function(e,t){return i(e,t[0])}))}var ea=Oi(R),ta=Oi(I);function ia(e){return null==e?[]:Ko(e,R(e))}var na=Ei(function(e,t,i){return t=t.toLowerCase(),e+(i?ra(t):t)});function ra(e){return ca(f(e).toLowerCase())}function aa(e){return(e=f(e))&&e.replace(co,Zo).replace(go,"")}var sa=Ei(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),oa=Ei(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),la=Ai("toLowerCase");var ua=Ei(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()});var ha=Ei(function(e,t,i){return e+(i?" ":"")+ca(t)});var da=Ei(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),ca=Ai("toUpperCase");function fa(e,t,i){return e=f(e),(t=i?ja:t)===ja?(i=e,yo.test(i)?e.match(_o)||[]:e.match(to)||[]):e.match(t)||[]}var pa=s(function(e,t){try{return ss(e,ja,t)}catch(e){return Ar(e)?e:new x(e)}}),ma=Hi(function(t,e){return os(e,function(e){e=bn(e),Ze(t,e,sr(t[e],t))}),t});function ga(e){return function(){return e}}var _a=Ti(),ya=Ti(!0);function P(e){return e}function va(e){return Tt("function"==typeof e?e:y(e,1))}var Aa=s(function(t,i){return function(e){return At(e,t,i)}}),Ea=s(function(t,i){return function(e){return At(t,e,i)}});function ba(n,t,e){var i=R(t),r=ft(t,i),a=(null!=e||E(t)&&(r.length||!i.length)||(e=t,t=n,n=this,r=ft(t,R(t))),!(E(e)&&"chain"in e&&!e.chain)),s=Er(n);return os(r,function(e){var i=t[e];n[e]=i,s&&(n.prototype[e]=function(){var e,t=this.__chain__;return a||t?(((e=n(this.__wrapped__)).__actions__=L(this.__actions__)).push({func:i,args:arguments,thisArg:n}),e.__chain__=t,e):i.apply(n,hs([this.value()],arguments))})}),n}function wa(){}var Sa=Ri(us),Ta=Ri(xo),La=Ri(Oo);function ka(e){return an(e)?Ho(bn(e)):(t=e,function(e){return pt(e,t)});var t}var Ca=xi(),Ra=xi(!0);function Ia(){return[]}function Pa(){return!1}var xa=Ci(function(e,t){return e+t},0),Da=Bi("ceil"),Ma=Ci(function(e,t){return e/t},1),Ba=Bi("floor");var Fa,Oa=Ci(function(e,t){return e*t},1),Ua=Bi("round"),Na=Ci(function(e,t){return e-t},0);return p.after=function(e,t){if("function"!=typeof t)throw new w(Ga);return e=k(e),function(){if(--e<1)return t.apply(this,arguments)}},p.ary=rr,p.assign=Or,p.assignIn=Ur,p.assignInWith=Nr,p.assignWith=jr,p.at=Gr,p.before=ar,p.bind=sr,p.bindAll=ma,p.bindKey=or,p.castArray=function(){var e;return arguments.length?j(e=arguments[0])?e:[e]:[]},p.chain=Hn,p.chunk=function(e,t,i){t=(i?c(e,t,i):t===ja)?1:S(k(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var r=0,a=0,s=b(fe(n/t));r<n;)s[a++]=o(e,r,r+=t);return s},p.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var a=e[t];a&&(r[n++]=a)}return r},p.concat=function(){var e=arguments.length;if(!e)return[];for(var t=b(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return hs(j(i)?L(i):[i],l(t,1))},p.cond=function(n){var r=null==n?0:n.length,t=d();return n=r?us(n,function(e){if("function"!=typeof e[1])throw new w(Ga);return[t(e[0]),e[1]]}):[],s(function(e){for(var t=-1;++t<r;){var i=n[t];if(ss(i[0],this,e))return ss(i[1],this,e)}})},p.conforms=function(e){return t=y(e,1),i=R(t),function(e){return tt(e,t,i)};var t,i},p.constant=ga,p.countBy=Wn,p.create=function(e,t){return e=Fe(e),null==t?e:Xe(e,t)},p.curry=function e(t,i,n){t=Ui(t,8,ja,ja,ja,ja,ja,i=n?ja:i);return t.placeholder=e.placeholder,t},p.curryRight=function e(t,i,n){t=Ui(t,16,ja,ja,ja,ja,ja,i=n?ja:i);return t.placeholder=e.placeholder,t},p.debounce=lr,p.defaults=Vr,p.defaultsDeep=Hr,p.defer=de,p.delay=ur,p.difference=a,p.differenceBy=Se,p.differenceWith=e,p.drop=function(e,t,i){var n=null==e?0:e.length;return n?o(e,(t=i||t===ja?1:k(t))<0?0:t,n):[]},p.dropRight=function(e,t,i){var n=null==e?0:e.length;return n?o(e,0,(t=n-(t=i||t===ja?1:k(t)))<0?0:t):[]},p.dropRightWhile=function(e,t){return e&&e.length?$t(e,d(t,3),!0,!0):[]},p.dropWhile=function(e,t){return e&&e.length?$t(e,d(t,3),!0):[]},p.fill=function(e,t,i,n){if(!(l=null==e?0:e.length))return[];i&&"number"!=typeof i&&c(e,t,i)&&(i=0,n=l);var r=e,a=t,s=i,o=n,l=r.length;for((s=k(s))<0&&(s=l<-s?0:l+s),(o=o===ja||l<o?l:k(o))<0&&(o+=l),o=o<s?0:Br(o);s<o;)r[s++]=a;return r},p.filter=function(e,t){return(j(e)?ls:lt)(e,d(t,3))},p.flatMap=function(e,t){return l(er(e,t),1)},p.flatMapDeep=function(e,t){return l(er(e,t),1/0)},p.flatMapDepth=function(e,t,i){return i=i===ja?1:k(i),l(er(e,t),i)},p.flatten=kn,p.flattenDeep=function(e){return(null==e?0:e.length)?l(e,1/0):[]},p.flattenDepth=function(e,t){return(null==e?0:e.length)?l(e,t=t===ja?1:k(t)):[]},p.flip=function(e){return Ui(e,512)},p.flow=_a,p.flowRight=ya,p.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var r=e[t];n[r[0]]=r[1]}return n},p.functions=function(e){return null==e?[]:ft(e,R(e))},p.functionsIn=function(e){return null==e?[]:ft(e,I(e))},p.groupBy=Xn,p.initial=function(e){return(null==e?0:e.length)?o(e,0,-1):[]},p.intersection=W,p.intersectionBy=ce,p.intersectionWith=t,p.invert=Wr,p.invertBy=Qr,p.invokeMap=Zn,p.iteratee=va,p.keyBy=$n,p.keys=R,p.keysIn=I,p.map=er,p.mapKeys=function(e,n){var r={};return n=d(n,3),dt(e,function(e,t,i){Ze(r,n(e,t,i),e)}),r},p.mapValues=function(e,n){var r={};return n=d(n,3),dt(e,function(e,t,i){Ze(r,t,n(e,t,i))}),r},p.matches=function(e){return It(y(e,1))},p.matchesProperty=function(e,t){return Pt(e,y(t,1))},p.memoize=hr,p.merge=Jr,p.mergeWith=qr,p.method=Aa,p.methodOf=Ea,p.mixin=ba,p.negate=dr,p.nthArg=function(t){return t=k(t),s(function(e){return Dt(e,t)})},p.omit=Xr,p.omitBy=function(e,t){return $r(e,dr(d(t)))},p.once=function(e){return ar(2,e)},p.orderBy=function(e,t,i,n){return null==e?[]:Mt(e,t=j(t)?t:null==t?[]:[t],i=j(i=n?ja:i)?i:null==i?[]:[i])},p.over=Sa,p.overArgs=si,p.overEvery=Ta,p.overSome=La,p.partial=cr,p.partialRight=fr,p.partition=tr,p.pick=Zr,p.pickBy=$r,p.property=ka,p.propertyOf=function(t){return function(e){return null==t?ja:pt(t,e)}},p.pull=he,p.pullAll=Rn,p.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Ft(e,t,d(i,2)):e},p.pullAllWith=function(e,t,i){return e&&e.length&&t&&t.length?Ft(e,t,ja,i):e},p.pullAt=In,p.range=Ca,p.rangeRight=Ra,p.rearg=pr,p.reject=function(e,t){return(j(e)?ls:lt)(e,dr(d(t,3)))},p.remove=function(e,t){var i=[];if(e&&e.length){var n=-1,r=[],a=e.length;for(t=d(t,3);++n<a;){var s=e[n];t(s,n,e)&&(i.push(s),r.push(n))}Ot(e,r)}return i},p.rest=function(e,t){if("function"!=typeof e)throw new w(Ga);return s(e,t=t===ja?t:k(t))},p.reverse=Pn,p.sampleSize=function(e,t,i){return t=(i?c(e,t,i):t===ja)?1:k(t),(j(e)?ze:Gt)(e,t)},p.set=function(e,t,i){return null==e?e:Vt(e,t,i)},p.setWith=function(e,t,i,n){return n="function"==typeof n?n:ja,null==e?e:Vt(e,t,i,n)},p.shuffle=function(e){return(j(e)?We:Yt)(e)},p.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i=i&&"number"!=typeof i&&c(e,t,i)?(t=0,n):(t=null==t?0:k(t),i===ja?n:k(i)),o(e,t,i)):[]},p.sortBy=ir,p.sortedUniq=function(e){return e&&e.length?Kt(e):[]},p.sortedUniqBy=function(e,t){return e&&e.length?Kt(e,d(t,2)):[]},p.split=function(e,t,i){return i&&"number"!=typeof i&&c(e,t,i)&&(t=i=ja),(i=i===ja?Ya:i>>>0)?(e=f(e))&&("string"==typeof t||null!=t&&!kr(t))&&!(t=u(t))&&fs(e)?oi(gs(e),0,i):e.split(t,i):[]},p.spread=function(i,n){if("function"!=typeof i)throw new w(Ga);return n=null==n?0:S(k(n),0),s(function(e){var t=e[n],e=oi(e,0,n);return t&&hs(e,t),ss(i,this,e)})},p.tail=function(e){var t=null==e?0:e.length;return t?o(e,1,t):[]},p.take=function(e,t,i){return e&&e.length?o(e,0,(t=i||t===ja?1:k(t))<0?0:t):[]},p.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?o(e,(t=n-(t=i||t===ja?1:k(t)))<0?0:t,n):[]},p.takeRightWhile=function(e,t){return e&&e.length?$t(e,d(t,3),!1,!0):[]},p.takeWhile=function(e,t){return e&&e.length?$t(e,d(t,3)):[]},p.tap=function(e,t){return t(e),e},p.throttle=function(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new w(Ga);return E(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),lr(e,t,{leading:n,maxWait:t,trailing:r})},p.thru=Yn,p.toArray=Dr,p.toPairs=ea,p.toPairsIn=ta,p.toPath=function(e){return j(e)?us(e,bn):v(e)?[e]:L(En(f(e)))},p.toPlainObject=Fr,p.transform=function(e,n,r){var t,i=j(e),a=i||vr(e)||Ir(e);return n=d(n,4),null==r&&(t=e&&e.constructor,r=a?i?new t:[]:E(e)&&Er(t)?Fe(ie(e)):{}),(a?os:dt)(e,function(e,t,i){return n(r,e,t,i)}),r},p.unary=function(e){return rr(e,1)},p.union=xn,p.unionBy=Dn,p.unionWith=Mn,p.uniq=function(e){return e&&e.length?qt(e):[]},p.uniqBy=function(e,t){return e&&e.length?qt(e,d(t,2)):[]},p.uniqWith=function(e,t){return t="function"==typeof t?t:ja,e&&e.length?qt(e,ja,t):[]},p.unset=function(e,t){return null==e||Xt(e,t)},p.unzip=Bn,p.unzipWith=Fn,p.update=function(e,t,i){return null==e?e:Zt(e,t,ri(i))},p.updateWith=function(e,t,i,n){return n="function"==typeof n?n:ja,null==e?e:Zt(e,t,ri(i),n)},p.values=ia,p.valuesIn=function(e){return null==e?[]:Ko(e,I(e))},p.without=On,p.words=fa,p.wrap=function(e,t){return cr(ri(t),e)},p.xor=Un,p.xorBy=Nn,p.xorWith=jn,p.zip=Gn,p.zipObject=function(e,t){return ii(e||[],t||[],Ke)},p.zipObjectDeep=function(e,t){return ii(e||[],t||[],Vt)},p.zipWith=Vn,p.entries=ea,p.entriesIn=ta,p.extend=Ur,p.extendWith=Nr,ba(p,p),p.add=xa,p.attempt=pa,p.camelCase=na,p.capitalize=ra,p.ceil=Da,p.clamp=function(e,t,i){return i===ja&&(i=t,t=ja),i!==ja&&(i=(i=C(i))==i?i:0),t!==ja&&(t=(t=C(t))==t?t:0),et(C(e),t,i)},p.clone=function(e){return y(e,4)},p.cloneDeep=function(e){return y(e,5)},p.cloneDeepWith=function(e,t){return y(e,5,t="function"==typeof t?t:ja)},p.cloneWith=function(e,t){return y(e,4,t="function"==typeof t?t:ja)},p.conformsTo=function(e,t){return null==t||tt(e,t,R(t))},p.deburr=aa,p.defaultTo=function(e,t){return null==e||e!=e?t:e},p.divide=Ma,p.endsWith=function(e,t,i){e=f(e),t=u(t);var n=e.length,n=i=i===ja?n:et(k(i),0,n);return 0<=(i-=t.length)&&e.slice(i,n)==t},p.eq=N,p.escape=function(e){return(e=f(e))&&Vs.test(e)?e.replace(js,$o):e},p.escapeRegExp=function(e){return(e=f(e))&&qs.test(e)?e.replace(Js,"\\$&"):e},p.every=function(e,t,i){return(j(e)?xo:st)(e,d(t=i&&c(e,t,i)?ja:t,3))},p.find=Qn,p.findIndex=Tn,p.findKey=function(e,t){return Uo(e,d(t,3),dt)},p.findLast=Kn,p.findLastIndex=Ln,p.findLastKey=function(e,t){return Uo(e,d(t,3),ct)},p.floor=Ba,p.forEach=Jn,p.forEachRight=qn,p.forIn=function(e,t){return null==e?e:ut(e,d(t,3),I)},p.forInRight=function(e,t){return null==e?e:ht(e,d(t,3),I)},p.forOwn=function(e,t){return e&&dt(e,d(t,3))},p.forOwnRight=function(e,t){return e&&ct(e,d(t,3))},p.get=Yr,p.gt=mr,p.gte=gr,p.has=function(e,t){return null!=e&&en(e,t,_t)},p.hasIn=zr,p.head=Cn,p.identity=P,p.includes=function(e,t,i,n){return e=h(e)?e:ia(e),i=i&&!n?k(i):0,n=e.length,i<0&&(i=S(n+i,0)),Rr(e)?i<=n&&-1<e.indexOf(t,i):!!n&&-1<ds(e,t,i)},p.indexOf=function(e,t,i){var n=null==e?0:e.length;return n?ds(e,t,e=(e=null==i?0:k(i))<0?S(n+e,0):e):-1},p.inRange=function(e,t,i){return t=Mr(t),i===ja?(i=t,t=0):i=Mr(i),(e=e=C(e))>=T(t=t,i=i)&&e<S(t,i)},p.invoke=Kr,p.isArguments=_r,p.isArray=j,p.isArrayBuffer=yr,p.isArrayLike=h,p.isArrayLikeObject=A,p.isBoolean=function(e){return!0===e||!1===e||G(e)&&i(e)==Wa},p.isBuffer=vr,p.isDate=Y,p.isElement=function(e){return G(e)&&1===e.nodeType&&!Lr(e)},p.isEmpty=function(e){if(null!=e){if(h(e)&&(j(e)||"string"==typeof e||"function"==typeof e.splice||vr(e)||Ir(e)||_r(e)))return!e.length;var t,i=U(e);if(i==Ka||i==Za)return!e.size;if(ln(e))return!Lt(e).length;for(t in e)if(F.call(e,t))return!1}return!0},p.isEqual=function(e,t){return bt(e,t)},p.isEqualWith=function(e,t,i){var n=(i="function"==typeof i?i:ja)?i(e,t):ja;return n===ja?bt(e,t,ja,i):!!n},p.isError=Ar,p.isFinite=function(e){return"number"==typeof e&&ge(e)},p.isFunction=Er,p.isInteger=br,p.isLength=wr,p.isMap=Sr,p.isMatch=function(e,t){return e===t||wt(e,t,qi(t))},p.isMatchWith=function(e,t,i){return i="function"==typeof i?i:ja,wt(e,t,qi(t),i)},p.isNaN=function(e){return Tr(e)&&e!=+e},p.isNative=function(e){if(on(e))throw new x("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return St(e)},p.isNil=function(e){return null==e},p.isNull=function(e){return null===e},p.isNumber=Tr,p.isObject=E,p.isObjectLike=G,p.isPlainObject=Lr,p.isRegExp=kr,p.isSafeInteger=function(e){return br(e)&&-Ha<=e&&e<=Ha},p.isSet=Cr,p.isString=Rr,p.isSymbol=v,p.isTypedArray=Ir,p.isUndefined=function(e){return e===ja},p.isWeakMap=function(e){return G(e)&&U(e)==es},p.isWeakSet=function(e){return G(e)&&"[object WeakSet]"==i(e)},p.join=function(e,t){return null==e?"":_e.call(e,t)},p.kebabCase=sa,p.last=n,p.lastIndexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n;if(i!==ja&&(r=(r=k(i))<0?S(n+r,0):T(r,n-1)),t!=t)return No(e,Go,r,!0);for(var a=e,s=t,o=r+1;o--;)if(a[o]===s)return o;return o},p.lowerCase=oa,p.lowerFirst=la,p.lt=Pr,p.lte=xr,p.max=function(e){return e&&e.length?ot(e,P,gt):ja},p.maxBy=function(e,t){return e&&e.length?ot(e,d(t,2),gt):ja},p.mean=function(e){return Vo(e,P)},p.meanBy=function(e,t){return Vo(e,d(t,2))},p.min=function(e){return e&&e.length?ot(e,P,Ct):ja},p.minBy=function(e,t){return e&&e.length?ot(e,d(t,2),Ct):ja},p.stubArray=Ia,p.stubFalse=Pa,p.stubObject=function(){return{}},p.stubString=function(){return""},p.stubTrue=function(){return!0},p.multiply=Oa,p.nth=function(e,t){return e&&e.length?Dt(e,k(t)):ja},p.noConflict=function(){return as._===this&&(as._=Z),this},p.noop=wa,p.now=nr,p.pad=function(e,t,i){e=f(e);var n=(t=k(t))?ms(e):0;return!t||t<=n?e:Ii(pe(t=(t-n)/2),i)+e+Ii(fe(t),i)},p.padEnd=function(e,t,i){e=f(e);var n=(t=k(t))?ms(e):0;return t&&n<t?e+Ii(t-n,i):e},p.padStart=function(e,t,i){e=f(e);var n=(t=k(t))?ms(e):0;return t&&n<t?Ii(t-n,i)+e:e},p.parseInt=function(e,t,i){return t=i||null==t?0:t&&+t,Ae(f(e).replace(Xs,""),t||0)},p.random=function(e,t,i){var n;return i&&"boolean"!=typeof i&&c(e,t,i)&&(t=i=ja),i===ja&&("boolean"==typeof t?(i=t,t=ja):"boolean"==typeof e&&(i=e,e=ja)),e===ja&&t===ja?(e=0,t=1):(e=Mr(e),t===ja?(t=e,e=0):t=Mr(t)),t<e&&(n=e,e=t,t=n),i||e%1||t%1?(n=Ee(),T(e+n*(t-e+Eo("1e-"+((n+"").length-1))),t)):Ut(e,t)},p.reduce=function(e,t,i){var n=j(e)?Bo:Yo,r=arguments.length<3;return n(e,d(t,4),i,r,rt)},p.reduceRight=function(e,t,i){var n=j(e)?Fo:Yo,r=arguments.length<3;return n(e,d(t,4),i,r,at)},p.repeat=function(e,t,i){return t=(i?c(e,t,i):t===ja)?1:k(t),Nt(f(e),t)},p.replace=function(){var e=arguments,t=f(e[0]);return e.length<3?t:t.replace(e[1],e[2])},p.result=function(e,t,i){var n=-1,r=(t=ai(t,e)).length;for(r||(r=1,e=ja);++n<r;){var a=null==e?ja:e[bn(t[n])];a===ja&&(n=r,a=i),e=Er(a)?a.call(e):a}return e},p.round=Ua,p.runInContext=r,p.sample=function(e){return(j(e)?Ye:jt)(e)},p.size=function(e){var t;return null==e?0:h(e)?Rr(e)?ms(e):e.length:(t=U(e))==Ka||t==Za?e.size:Lt(e).length},p.snakeCase=ua,p.some=function(e,t,i){return(j(e)?Oo:zt)(e,d(t=i&&c(e,t,i)?ja:t,3))},p.sortedIndex=function(e,t){return Wt(e,t)},p.sortedIndexBy=function(e,t,i){return Qt(e,t,d(i,2))},p.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=Wt(e,t);if(n<i&&N(e[n],t))return n}return-1},p.sortedLastIndex=function(e,t){return Wt(e,t,!0)},p.sortedLastIndexBy=function(e,t,i){return Qt(e,t,d(i,2),!0)},p.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var i=Wt(e,t,!0)-1;if(N(e[i],t))return i}return-1},p.startCase=ha,p.startsWith=function(e,t,i){return e=f(e),i=null==i?0:et(k(i),0,e.length),t=u(t),e.slice(i,i+t.length)==t},p.subtract=Na,p.sum=function(e){return e&&e.length?zo(e,P):0},p.sumBy=function(e,t){return e&&e.length?zo(e,d(t,2)):0},p.template=function(s,e,t){var o,l,i=p.templateSettings;t&&c(s,e,t)&&(e=ja),s=f(s),e=Nr({},e,i,Ni);var n=R(t=Nr({},e.imports,i.imports,Ni)),r=Ko(t,n),u=0,i=e.interpolate||fo,h="__p += '",t=B((e.escape||fo).source+"|"+i.source+"|"+(i===zs?ro:fo).source+"|"+(e.evaluate||fo).source+"|$","g"),a="//# sourceURL="+(F.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ao+"]")+"\n";if(s.replace(t,function(e,t,i,n,r,a){return i=i||n,h+=s.slice(u,a).replace(po,el),t&&(o=!0,h+="' +\n__e("+t+") +\n'"),r&&(l=!0,h+="';\n"+r+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=a+e.length,e}),h+="';\n",i=F.call(e,"variable")&&e.variable){if(io.test(i))throw new x("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";if(h=(l?h.replace(Fs,""):h).replace(Os,"$1").replace(Us,"$1;"),h="function("+(i||"obj")+") {\n"+(i?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(l?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}",(t=pa(function(){return D(n,a+"return "+h).apply(ja,r)})).source=h,Ar(t))throw t;return t},p.times=function(e,t){if((e=k(e))<1||Ha<e)return[];for(var i=Ya,n=T(e,Ya),n=(t=d(t),e-=Ya,Wo(n,t));++i<e;)t(i);return n},p.toFinite=Mr,p.toInteger=k,p.toLength=Br,p.toLower=function(e){return f(e).toLowerCase()},p.toNumber=C,p.toSafeInteger=function(e){return e?et(k(e),-Ha,Ha):0===e?e:0},p.toString=f,p.toUpper=function(e){return f(e).toUpperCase()},p.trim=function(e,t,i){return(e=f(e))&&(i||t===ja)?Qo(e):e&&(t=u(t))?oi(i=gs(e),qo(i,t=gs(t)),Xo(i,t)+1).join(""):e},p.trimEnd=function(e,t,i){return(e=f(e))&&(i||t===ja)?e.slice(0,rl(e)+1):e&&(t=u(t))?oi(i=gs(e),0,Xo(i,gs(t))+1).join(""):e},p.trimStart=function(e,t,i){return(e=f(e))&&(i||t===ja)?e.replace(Xs,""):e&&(t=u(t))?oi(i=gs(e),qo(i,gs(t))).join(""):e},p.truncate=function(e,t){var i,n=30,r="...",t=(E(t)&&(i="separator"in t?t.separator:i,n="length"in t?k(t.length):n,r="omission"in t?u(t.omission):r),(e=f(e)).length);if((t=fs(e)?(a=gs(e)).length:t)<=n)return e;if((t=n-ms(r))<1)return r;var a,n=a?oi(a,0,t).join(""):e.slice(0,t);if(i!==ja)if(a&&(t+=n.length-t),kr(i)){if(e.slice(t).search(i)){var s,o=n;for((i=i.global?i:B(i.source,f(ao.exec(i))+"g")).lastIndex=0;s=i.exec(o);)var l=s.index;n=n.slice(0,l===ja?t:l)}}else e.indexOf(u(i),t)!=t&&-1<(a=n.lastIndexOf(i))&&(n=n.slice(0,a));return n+r},p.unescape=function(e){return(e=f(e))&&Gs.test(e)?e.replace(Ns,al):e},p.uniqueId=function(e){var t=++K;return f(e)+t},p.upperCase=da,p.upperFirst=ca,p.each=Jn,p.eachRight=qn,p.first=Cn,ba(p,(Fa={},dt(p,function(e,t){F.call(p.prototype,t)||(Fa[t]=e)}),Fa),{chain:!1}),p.VERSION="4.17.21",os(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),os(["drop","take"],function(i,n){_.prototype[i]=function(e){e=e===ja?1:S(k(e),0);var t=this.__filtered__&&!n?new _(this):this.clone();return t.__filtered__?t.__takeCount__=T(e,t.__takeCount__):t.__views__.push({size:T(e,Ya),type:i+(t.__dir__<0?"Right":"")}),t},_.prototype[i+"Right"]=function(e){return this.reverse()[i](e).reverse()}}),os(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;_.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:d(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),os(["head","last"],function(e,t){var i="take"+(t?"Right":"");_.prototype[e]=function(){return this[i](1).value()[0]}}),os(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");_.prototype[e]=function(){return this.__filtered__?new _(this):this[i](1)}}),_.prototype.compact=function(){return this.filter(P)},_.prototype.find=function(e){return this.filter(e).head()},_.prototype.findLast=function(e){return this.reverse().find(e)},_.prototype.invokeMap=s(function(t,i){return"function"==typeof t?new _(this):this.map(function(e){return At(e,t,i)})}),_.prototype.reject=function(e){return this.filter(dr(d(e)))},_.prototype.slice=function(e,t){e=k(e);var i=this;return i.__filtered__&&(0<e||t<0)?new _(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==ja?(t=k(t))<0?i.dropRight(-t):i.take(t-e):i)},_.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_.prototype.toArray=function(){return this.take(Ya)},dt(_.prototype,function(u,e){var h=/^(?:filter|find|map|reject)|While$/.test(e),d=/^(?:head|last)$/.test(e),c=p[d?"take"+("last"==e?"Right":""):e],f=d||/^find/.test(e);c&&(p.prototype[e]=function(){function e(e){return e=c.apply(p,hs([e],n)),d&&o?e[0]:e}var t,i=this.__wrapped__,n=d?[1]:arguments,r=i instanceof _,a=n[0],s=r||j(i),o=(s&&h&&"function"==typeof a&&1!=a.length&&(r=s=!1),this.__chain__),a=!!this.__actions__.length,l=f&&!o,r=r&&!a;return!f&&s?(i=r?i:new _(this),(t=u.apply(i,n)).__actions__.push({func:Yn,args:[e],thisArg:ja}),new g(t,o)):l&&r?u.apply(this,n):(t=this.thru(e),l?d?t.value()[0]:t.value():t)})}),os(["pop","push","shift","sort","splice","unshift"],function(e){var i=H[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var e,t=arguments;return r&&!this.__chain__?(e=this.value(),i.apply(j(e)?e:[],t)):this[n](function(e){return i.apply(j(e)?e:[],t)})}}),dt(_.prototype,function(e,t){var i,n=p[t];n&&(i=n.name+"",F.call(Ce,i)||(Ce[i]=[]),Ce[i].push({name:t,func:n}))}),Ce[Li(ja,2).name]=[{name:"wrapper",func:ja}],_.prototype.clone=function(){var e=new _(this.__wrapped__);return e.__actions__=L(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=L(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=L(this.__views__),e},_.prototype.reverse=function(){var e;return this.__filtered__?((e=new _(this)).__dir__=-1,e.__filtered__=!0):(e=this.clone()).__dir__*=-1,e},_.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=j(e),n=t<0,r=i?e.length:0,a=function(e,t,i){var n=-1,r=i.length;for(;++n<r;){var a=i[n],s=a.size;switch(a.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=T(t,e+s);break;case"takeRight":e=S(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=a.start,o=(a=a.end)-s,l=n?a:s-1,u=this.__iteratees__,h=u.length,d=0,c=T(o,this.__takeCount__);if(!i||!n&&r==o&&c==o)return ei(e,this.__actions__);var f=[];e:for(;o--&&d<c;){for(var p=-1,m=e[l+=t];++p<h;){var g=u[p],_=g.iteratee,g=g.type,_=_(m);
10if(2==g)m=_;else if(!_){if(1==g)continue e;break e}}f[d++]=m}return f},p.prototype.at=zn,p.prototype.chain=function(){return Hn(this)},p.prototype.commit=function(){return new g(this.value(),this.__chain__)},p.prototype.next=function(){this.__values__===ja&&(this.__values__=Dr(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?ja:this.__values__[this.__index__++]}},p.prototype.plant=function(e){for(var t,i=this;i instanceof Ue;)var n=Sn(i),r=(n.__index__=0,n.__values__=ja,t?r.__wrapped__=n:t=n,n),i=i.__wrapped__;return r.__wrapped__=e,t},p.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof _?(e=e,(e=(e=this.__actions__.length?new _(this):e).reverse()).__actions__.push({func:Yn,args:[Pn],thisArg:ja}),new g(e,this.__chain__)):this.thru(Pn)},p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},p.prototype.first=p.prototype.head,oe&&(p.prototype[oe]=function(){return this}),p}();as._=sl,(P=function(){return sl}.call(x,D,x,I))!==ja&&(I.exports=P)}.call(this)}.call(this,D(31),D(154)(e))},function(e,t){e.exports={HEVC_NAL_TRAIL_N:0,HEVC_NAL_TRAIL_R:1,HEVC_NAL_TSA_N:2,HEVC_NAL_TSA_R:3,HEVC_NAL_STSA_N:4,HEVC_NAL_STSA_R:5,HEVC_NAL_RADL_N:6,HEVC_NAL_RADL_R:7,HEVC_NAL_RASL_N:8,HEVC_NAL_RASL_R:9,HEVC_NAL_VCL_N10:10,HEVC_NAL_VCL_R11:11,HEVC_NAL_VCL_N12:12,HEVC_NAL_VCL_R13:13,HEVC_NAL_VCL_N14:14,HEVC_NAL_VCL_R15:15,HEVC_NAL_BLA_W_LP:16,HEVC_NAL_BLA_W_RADL:17,HEVC_NAL_BLA_N_LP:18,HEVC_NAL_IDR_W_RADL:19,HEVC_NAL_IDR_N_LP:20,HEVC_NAL_CRA_NUT:21,HEVC_NAL_IRAP_VCL22:22,HEVC_NAL_IRAP_VCL23:23,HEVC_NAL_RSV_VCL24:24,HEVC_NAL_RSV_VCL25:25,HEVC_NAL_RSV_VCL26:26,HEVC_NAL_RSV_VCL27:27,HEVC_NAL_RSV_VCL28:28,HEVC_NAL_RSV_VCL29:29,HEVC_NAL_RSV_VCL30:30,HEVC_NAL_RSV_VCL31:31,HEVC_NAL_VPS:32,HEVC_NAL_SPS:33,HEVC_NAL_PPS:34,HEVC_NAL_AUD:35,HEVC_NAL_EOS_NUT:36,HEVC_NAL_EOB_NUT:37,HEVC_NAL_FD_NUT:38,HEVC_NAL_SEI_PREFIX:39,HEVC_NAL_SEI_SUFFIX:40,HEVC_NAL_RSV_NVCL41:41,HEVC_NAL_RSV_NVCL42:42,HEVC_NAL_RSV_NVCL43:43,HEVC_NAL_RSV_NVCL44:44,HEVC_NAL_RSV_NVCL45:45,HEVC_NAL_RSV_NVCL46:46,HEVC_NAL_RSV_NVCL47:47,HEVC_NAL_UNSPEC48:48,HEVC_NAL_UNSPEC49:49,HEVC_NAL_UNSPEC50:50,HEVC_NAL_UNSPEC51:51,HEVC_NAL_UNSPEC52:52,HEVC_NAL_UNSPEC53:53,HEVC_NAL_UNSPEC54:54,HEVC_NAL_UNSPEC55:55,HEVC_NAL_UNSPEC56:56,HEVC_NAL_UNSPEC57:57,HEVC_NAL_UNSPEC58:58,HEVC_NAL_UNSPEC59:59,HEVC_NAL_UNSPEC60:60,HEVC_NAL_UNSPEC61:61,HEVC_NAL_UNSPEC62:62,HEVC_NAL_UNSPEC63:63,SOURCE_CODE_VPS:64,SOURCE_CODE_SPS:66,SOURCE_CODE_PPS:68,SOURCE_CODE_SEI:78,SOURCE_CODE_IDR:38,SOURCE_CODE_P:2,SOURCE_CODE_SEI_END:128,DEFINE_STARTCODE:new Uint8Array([0,0,0,1]),DEFINE_KEY_FRAME:21,DEFINE_P_FRAME:9,DEFINE_OTHERS_FRAME:153}},function(e,t,i){i=[i(0),i(1)],t=function(t,n){var r={getItem:n.noop,setItem:n.noop,removeItem:n.noop};try{r=window.localStorage}catch(e){}function a(e){return("baiducyberplayer."+e).toString()}function s(e,t){try{r[a(e)]=t}catch(e){__DEBUG__}}function e(){this.persistItems=["volume","mute","captionLabel","qualityLabel","playbackRate"]}return t.extend(e.prototype,{getAllItems:function(){return t.reduce(this.persistItems,function(e,t){var i=r[a(t)];return i&&(e[t]=n.serialize(i)),e},{})},track:function(e){t.each(this.persistItems,function(i){e.on("change:"+i,function(e,t){s(i,t)})})},clear:function(){t.each(this.persistItems,function(e){r.removeItem(a(e))})},setItem:s,getItem:function(e){return r[a(e)]},clearItem:function(e){return r.removeItem(a(e))}}),e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.HandlebarsEnvironment=d;var r=i(18),a=n(i(27)),s=i(102),o=i(187),l=n(i(103)),u=i(104),h=(t.VERSION="4.7.8",t.COMPILER_REVISION=8,t.LAST_COMPATIBLE_COMPILER_REVISION=7,t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"},"[object Object]");function d(e,t,i){this.helpers=e||{},this.partials=t||{},this.decorators=i||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}d.prototype={constructor:d,logger:l.default,log:l.default.log,registerHelper:function(e,t){if(r.toString.call(e)===h){if(t)throw new a.default("Arg not supported with multiple helpers");r.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(r.toString.call(e)===h)r.extend(this.partials,e);else{if(void 0===t)throw new a.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(r.toString.call(e)===h){if(t)throw new a.default("Arg not supported with multiple decorators");r.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){u.resetLoggedProperties()}};i=l.default.log;t.log=i,t.createFrame=r.createFrame,t.logger=l.default},function(e,t,i){"use strict";
10function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.registerDefaultHelpers=function(e){r.default(e),a.default(e),s.default(e),o.default(e),l.default(e),u.default(e),h.default(e)},t.moveHelperToHooks=function(e,t,i){e.helpers[t]&&(e.hooks[t]=e.helpers[t],i||delete e.helpers[t])};var r=n(i(180)),a=n(i(181)),s=n(i(182)),o=n(i(183)),l=n(i(184)),u=n(i(185)),h=n(i(186))},function(e,t,i){"use strict";t.__esModule=!0;var n=i(18),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){var t;return e="string"==typeof e?0<=(t=n.indexOf(r.methodMap,e.toLowerCase()))?t:parseInt(e,10):e},log:function(e){if(e=r.lookupLevel(e),"undefined"!=typeof console&&r.lookupLevel(r.level)<=e){e=r.methodMap[e];console[e]||(e="log");for(var t=arguments.length,i=Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n]}}};t.default=r,e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.createProtoAccessControl=function(e){var t=Object.create(null),i=(t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,Object.create(null));return i.__proto__=!1,{properties:{whitelist:n.createNewLookupObject(i,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},t.resultIsAllowed=function(e,t,i){return s("function"==typeof e?t.methods:t.properties,i)},t.resetLoggedProperties=function(){Object.keys(a).forEach(function(e){delete a[e]})};var n=i(189),t=i(103),r=(i=t)&&i.__esModule?i:{default:i},a=Object.create(null);function s(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(!0!==a[e=t]&&(a[e]=!0,r.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details')),!1)}},function(e,t,i){i=[i(1),i(58),i(3),i(4),i(71),i(0)],t=function(e,d,c,f,p,m){var g=2;return function(t){var r,a,s,o,l=m.extend(this,f),u=p.loaderstatus.NEW;function i(){switch(d.getPluginPathType(t)){case d.pluginPathType.ABSOLUTE:return t;case d.pluginPathType.RELATIVE:return e.getAbsolutePath(t,window.location.href)}}function n(){m.defer(function(){u=p.loaderstatus.COMPLETE,l.trigger(c.COMPLETE)})}function h(){u=p.loaderstatus.ERROR,l.trigger(c.ERROR,{url:t})}this.load=function(){var e;u===p.loaderstatus.NEW&&(0<t.lastIndexOf(".swf")?(r=t,u=p.loaderstatus.COMPLETE,l.trigger(c.COMPLETE)):d.getPluginPathType(t)===d.pluginPathType.CDN?(u=p.loaderstatus.COMPLETE,l.trigger(c.COMPLETE)):(u=p.loaderstatus.LOADING,(e=new p(i())).on(c.COMPLETE,n),e.on(c.ERROR,h),e.load()))},this.registerPlugin=function(e,t,i,n){o&&(clearTimeout(o),o=void 0),s=t,i&&n?(r=n,a=i):"string"==typeof i?r=i:"function"==typeof i?a=i:i||n||(r=e),u=p.loaderstatus.COMPLETE,l.trigger(c.COMPLETE)},this.getStatus=function(){return u},this.getPluginName=function(){return d.getPluginName(t)},this.getFlashPath=function(){if(r)switch(d.getPluginPathType(r)){case d.pluginPathType.ABSOLUTE:return r;case d.pluginPathType.RELATIVE:return 0<t.lastIndexOf(".swf")?e.getAbsolutePath(r,window.location.href):e.getAbsolutePath(r,i())}return null},this.getJS=function(){return a},this.getTarget=function(){return s},this.getPluginmode=function(){return g},this.getNewInstance=function(e,t,i){return new a(e,t,i)},this.getURL=function(){return t}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(47),i(199),i(1),i(3),i(4),i(0)],t=function(l,u,n,h,e,d){return function(){var s=d.extend(this,e);function t(a){n.tryCatch(function(){var e,t=a.responseXML?a.responseXML.childNodes:null,i="";if(t){for(var n=0;n<t.length&&8===(i=t[n]).nodeType;n++);"xml"===l.localName(i)&&(i=i.nextSibling),"rss"===l.localName(i)&&(e={playlist:u.parse(i)})}if(!e)try{var r=JSON.parse(a.responseText);if(d.isArray(r))e={playlist:r};else{if(!d.isArray(r.playlist))throw null;e=r}}catch(e){return void o("Not a valid RSS/JSON feed")}s.trigger(h.JWPLAYER_PLAYLIST_LOADED,e)})instanceof n.Error&&o()}function i(e){o("Playlist load error: "+e)}function o(e){s.trigger(h.JWPLAYER_ERROR,{message:e||"æä»¶å 载失败"})}this.load=function(e){n.ajax(e,t,i)},this.destroy=function(){this.off()}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(108),i(202)],t=function(a,s,o){var l={sources:[],tracks:[]};return function(e){a.isArray((e=e||{}).tracks)||delete e.tracks;var t=a.extend({},l,e);a.isObject(t.sources)&&!a.isArray(t.sources)&&(t.sources=[s(t.sources)]),a.isArray(t.sources)&&0!==t.sources.length||(e.levels?t.s
10ources=e.levels:t.sources=[s(e)]);for(var i=0;i<t.sources.length;i++){var n,r=t.sources[i];r&&(n=r.default,r.default=!!n&&"true"===n.toString(),t.sources[i].label||(t.sources[i].label=i.toString()),t.sources[i]=s(t.sources[i]))}return t.sources=a.compact(t.sources),a.isArray(t.tracks)||(t.tracks=[]),a.isArray(t.captions)&&(t.tracks=t.tracks.concat(t.captions),delete t.captions),t.tracks=a.compact(a.map(t.tracks,o)),t}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(12),i(0)],t=function(t,n,r){var a={default:!1,isHEVC:!1,isNative:!1};return function(e){if(e&&e.file){(t.isRtmp(e.file)||t.isFlv(e.file))&&t.isMobile()&&e.fallbackfile&&t.isHls(e.fallbackfile)&&(e.file=e.fallbackfile),t.isMobile()||t.isFlvjsSupported()||!t.isHls(e.file)&&!t.isFlv(e.file)||!e.fallbackfile||(e.file=e.fallbackfile);var i=r.extend({},a,e),e=(i.file=n.trim(""+i.file),/^[^\/]+\/(?:x-)?([^\/]+)$/);if(t.isRtmp(i.file)?i.type="rtmp":e.test(i.type)?i.type=i.type.replace(e,"$1"):i.type?i.isrtc&&(i.type="rtc"):i.type=n.extension(i.file),i.type){switch(i.type){case"m3u8":case"vnd.apple.mpegurl":i.type="hls";break;case"dash+xml":i.type="dash";break;case"smil":i.type="rtmp";break;case"m4a":i.type="aac"}return r.each(i,function(e,t){""===e&&delete i[t]}),i}}}}.apply(t,i);void 0!==t&&(e.exports=t)},,,,,function(e,t,i){e.exports=function(){"use strict";return{bigInt:()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),multiValue:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),saturatedFloatToInt:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),tailCall:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads:()=>(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var t=i(24),n=i.n(t);function r(){return n()('/*! WebPlayer built @2023/11/28 16:27:37 */!function(r){var n={};function o(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}o.m=r,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t){self.controller=new AbortController,self.onmessage=e=>{var t,e=e["data"];"pushUrl"==e.type?(t=self.controller.signal,fetch(e.videoURL,{signal:t}).then(e=>e.arrayBuffer()).then(e=>{e=new Uint8Array(e);postMessage(e,[e.buffer])}).catch(e=>{})):"destory"==e.type&&self.controller.signal.about()}}]);',"Worker",void 0,i.p+"fetch.worker.worker.js")}},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var t=i(30),r=i.n(t);class n{constructor(e,t){this.config=e,this.configFormat=t,this.myPlayer=null,this.playerId=t.playerId,this.myPlayerID=t.playerId+"-rtc",this.duration=-1,this.loadSuccess=!1,this.onMakeItReady=null,this.onLoadFinish=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onPlayState=null,this.onRtcEvent=null,this.onError=null}makeIt(){let n=this;for(var e in this.videoTag=document.createElement("video"),this.videoTag.id=this.myPlayerID,this.videoTag.width=this.configFormat.playerW,this.videoTag.height=this.configFormat.playerH,!0===this.configFormat.autoPlay&&(this.videoTag.muted="muted",this.videoTag.autoplay="autoplay",window.onclick=document.body.onclick=function(e){n.videoTag.muted=!1}),this.myPlayer=new r.a(this.config),this.myPlayer.subscribeLiveStream(),this.myPlayer.on(r.a.Events.REMOTE_STREAM_ADD,(e,t)=>{this.videoTag.srcObject=t.MediaStream}),this.myPlayer.on(r.a.Events.RE_CONNECT_SUCCESS,()=>{this.play()}),this.myPlayer.on(r.a.Events.ERROR,(e,t)=>{this.onError&&this.onError(Object.assign({event:e},t))}),r.a.Events)this.myPlayer.on(r.a.Events[e],(e,t)=>{this.onRtcEvent&&this.onRtcEvent(Object.assign({event:e},t))});this.videoTag.addEventListener("canplay",function(e){var t,i=document.querySelector("#"+n.playerId);i.getElementsByTagName("video")[0]||(t=i.getElementsByTagName("div"),i.insertBefore(n.videoTag,t[0])),!0!==n.loadSuccess&&(n.onLoadFinish&&n.onLoadFinish(),n.onReadyShowDone&&n.onReadyShowDone(),n.loadSuccess=!0)}),this.videoTag.addEventListener("play",()=>{this.onPlayState&&this.onPlayState(!0)}),this.videoTag.addEventListener("pause",()=>{this.onPlayState&&this.onPlayState(!1)}),this.videoTag.addEventListener("loadedmetadata",e=>{n.duration=n.videoTag.duration}),this.onMakeItReady&&this.onMakeItReady()}_refreshVideoTagEvent(){this.videoTag=document.getElementById(this.myPlayerID).querySelector("video")}getSize(){return{width:this.videoTag.videoWidth||this.metadata.width,height:this.videoTag.videoHeight||this.metadata.height}}play(){this.videoTag.play()}setVoice(e){this.videoTag.volume=e}pause(){this.videoTag.pause()}isPlayingState(){return!this.videoTag.paused}release(){this.loadSuccess=!1,this.myPlayer.destroy(),this.myPlayerID=null,this.myPlayer=null,this.onMakeItReady=null,this.onLoadFinish=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onPlayState=null}}},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var t=i(24),n=i.n(t);function r(){return n()('/*! WebPlayer built @2023/11/28 16:27:37 */!function(r){var n={};function o(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}o.m=r,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
10),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t){self.onmessage=e=>{var t,o,e=e["data"];0==e.type?(self.controller&&self.controller.abort(),self.controller=new AbortController,t=self.controller.signal,o=0,fetch(e.videoURL,{signal:t}).then(e=>{function n(r){return r.read().then(function(e){var t;if(!e.done)return e=e.value,t=JSON.parse(JSON.stringify(e.byteLength)),self.postMessage({type:0,fileStart:o,buffer:e.buffer},[e.buffer]),o+=t,n(r);self.postMessage({type:1})})}return n(e.body.getReader())}).catch(e=>{})):1==e.type&&self.controller&&self.controller.abort()}}]);',"Worker",void 0,i.p+"downloader.worker.worker.js")}},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="jw-process-adv jw-reset">\n <a target="_blank"><img/></a>\n</div>'},useData:!0})},,,,,,,,,,,,,function(e,t){var i,n,e=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{i="function"==typeof setTimeout?setTimeout:r}catch(e){i=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}function s(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return(i=setTimeout)(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}var o,l=[],u=!1,h=-1;function d(){u&&o&&(u=!1,o.length?l=o.concat(l):h=-1,l.length)&&c()}function c(){if(!u){for(var e=s(d),t=(u=!0,l.length);t;){for(o=l,l=[];++h<t;)o&&o[h].run();h=-1,t=l.length}o=null,u=!1,!function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return(n=clearTimeout)(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new f(e,t)),1!==l.length||u||s(c)},f.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.prependListener=p,e.prependOnceListener=p,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},,,,function(e,t,i){i=[i(135),i(249)],t=function(e){return window.__DEBUG__=!1,window.__LOG_API__="https://drm.media.baidubce.com:8888/v1/sdk-player",window.cyberplayer=e.selectPlayer,e.selectPlayer}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(136),i(0),i(45),i(97),i(70)],t=function(n,e,t,i,r){function a(e){var t,i;return e?"string"==typeof e?(t=s(e))||(i=document.getElementById(e)):"number"==typeof e?t=h[e]:e.nodeType&&(t=s((i=e).id)):t=h[0],t||(i?(e=new n(i,o),d++,e.uniqueId=d,h.push(e),e):{registerPlugin:r.registerPlugin})}function s(e){for(var t=0;t<h.length;t++)if(h[t].id===e)return h[t];return null}function o(e){for(var t=h.length;t--;)if(h[t].uniqueId===e.uniqueId){h.splice(t,1);break}}var l,u,h=[],d=0,t={selectPlayer:a,registerProvider:t.registerProvider,availableProviders:i,registerPlugin:r.registerPlugin};a.api=t,_hmt=[];try{navigator.onLine?((l=document.createElement("script")).onerror=function(){_hmt=null},l.src="https://hm.baidu.com/hm.js?20ba3a41aeedac500c94bdef787f57e6",(u=document.getElementsByTagName("script")[0]).parentNode.insertBefore(l,u),_hmt.push(["_setAutoPageview",!1])):_hmt=null}catch(e){_hmt=null}return t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(3),i(15),i(4),i(1),i(95),i(0),i(143),i(245),i(246),i(247),i(248),i(33),i(14)],t=function(l,u,h,d,c,f,p,m,g,_,y,v,A){return function(e,t){function i(){r=new p(e),m(a,r),g(a,r),r.on(l.JWPLAYER_PLAYLIST_ITEM,function(){s={}}),r.on(l.JWPLAYER_MEDIA_META,function(e){f.extend(s,e)}),r.on(l.JWPLAYER_READY,function(e){o.tick("ready"),e.setupTime=o.between("setup","ready"),new y(a.getConfig(),a).userCertify()}),r.on("all",a.trigger),r.on(l.JWPLAYER_ERROR,function(e){var{errorType:t,msg:i}=e;"mediaError"===e.type&&d.isMp4(e.videoSrc)&&e.detail&&("DEMUXER_ERROR_COULD_NOT_OPEN: FFmpegDemuxer: open context failed"===e.detail.message||4===e.detail.code)?((e=a.getConfig().options).primary="justflash",r.setup(e,a)):t&&t==A.ErrorTypes.NOT_SUPPORT&&r.setupError({message:i})})}function n(){s={},a.off(),localStorage.setItem("baiducyberplayer.playbackRate",1),localStorage.setItem("baiducyberplayer.mute",!0),r&&r.off(),r&&r.playerDe
10stroy&&r.playerDestroy()}var r,a=this,s={},o=(f.extend(this,h),this.utils=d,this._=f,this.Events=h,this.version=v,this.trigger=function(e,t){return(t=f.isObject(t)?f.extend({},t):{}).type=e,(window.jwplayer&&window.jwplayer.debug?h.trigger:h.triggerSafe).call(a,e,t)},this.dispatchEvent=this.trigger,this.removeEventListener=this.off.bind(this),i(),_(this),this.id=e.id,this._qoe=new c);o.tick("init");return this.getPlugin=function(e){return a.plugins&&a.plugins[e]},this.addPlugin=function(e,t){this.plugins=this.plugins||{},this.plugins[e]=t,this.onReady(t.addToPlayer),t.resize&&this.onResize(t.resizeHandler)},this.setup=function(e){return window.startInitTime=(new Date).getTime(),o.tick("setup"),n(),i(),d.foreach(e.events,function(e,t){e=a[e];"function"==typeof e&&e.call(a,t)}),e.id=a.id,r.setup(e,this),a},this.qoe=function(){var e=r.getItemQoe();return{setupTime:o.between("setup","ready"),firstFrame:e.between(l.JWPLAYER_MEDIA_PLAY_ATTEMPT,l.JWPLAYER_MEDIA_FIRST_FRAME),player:o.dump(),item:e.dump()}},this.getContainer=function(){return r.getContainer?r.getContainer():e},this.getMeta=this.getItemMeta=function(){return s},this.getPlaylistItem=function(e){var t;return d.exists(e)?(t=a.getPlaylist())?t[e]:null:r._model.get("playlistItem")},this.getRenderingMode=function(){return"html5"},this.load=function(e,t){var i=this.getPlugin("vast")||this.getPlugin("googima");return i&&i.destroy(),r.load(e,t),a},this.prevFrame=function(){return r.prevFrame()},this.nextFrame=function(){return r.nextFrame()},this.snapshot=function(e){return r.snapshot(e)},this.test1=function(){return r.test1(),a},this.play=function(e,t){return t=(t=f.isBoolean(e)?t:e)||{reason:"external"},!0===e?r.play(t):!1===e||(e=a.getState())===u.PLAYING?r.pause():r.play(t),a},this.pause=function(e){return f.isBoolean(e)?this.play(!e):this.play()},this.createInstream=function(){return r.createInstream()},this.castToggle=function(){r&&r.castToggle&&r.castToggle()},this.playAd=this.pauseAd=d.noop,this.remove=function(){return t(a),a.trigger("remove"),n(),a},this}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){t=function(){return{hasClass:function(e,t){t=" "+t+" ";return 1===e.nodeType&&0<=(" "+e.className+" ").replace(/[\t\r\n\f]/g," ").indexOf(t)}}}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){t=function(){return{DOM_REMOVE_IGNORE:"dom-remove-ignore"}}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){i=function(e,t,i){var n,r,o={},a={},s=(n=function(){return document.head||document.getElementsByTagName("head")[0]},function(){return r=void 0===r?n.apply(this,arguments):r});function l(e){var t=document.createElement("style");return t.type="text/css",t.setAttribute("data-jwplayer-id",e),e=t,s().appendChild(e),t}function u(e,t){var i=a[e],e=(i=i||(a[e]={element:l(e),counter:0})).counter++,i=i.element,n=c.bind(null,i,e,!1),r=c.bind(null,i,e,!0);return n(t),function(e){e?e.css===t.css&&e.media===t.media||n(t=e):r()}}i.exports={style:function(e,t){!function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=(o[e]||{})[n.id];if(r){for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(u(e,n.parts[a]))}else{for(var s=[],a=0;a<n.parts.length;a++)s.push(u(e,n.parts[a]));o[e]=o[e]||{},o[e][n.id]={id:n.id,parts:s}}}}(t,function(e){for(var t=[],i={},n=0;n<e.length;n++){var r=e[n],a=r[0],s=r[1],r=r[2],s={css:s,media:r};i[a]?i[a].parts.push(s):t.push(i[a]={id:a,parts:[s]})}return t}(e))},clear:function(e){var t=o[e];if(t){for(var i=Object.keys(t),n=0;n<i.length;n+=1)for(var r=t[i[n]],a=0;a<r.parts.length;a+=1)r.parts[a]();delete o[e]}}};h=[];var h,d=function(e,t){return h[e]=t,h.filter(Boolean).join("\n")};function c(e,t,i,n){var i=i?"":n.css;e.styleSheet?e.styleSheet.cssText=d(t,i):(n=document.createTextNode(i),(i=e.childNodes)[t]&&e.removeChild(i[t]),i.length?e.insertBefore(n,i[t]):e.appendChild(n))}}.call(t,i,t,e);void 0!==i&&(e.exports=i)},function(e,t,i){i=[i(44),i(0),i(32),i(56),i(33)],t=function(t,e,i,n,r){var a={};return a.repo=e.memoize(function(){var e=r.split("+")[0],e=t.repo+e+"/";return i.isHTTPS()?e.replace(/^http:/,"https:"):e}),a.versionCheck=function(e){var e=("0"+e).split(/\W/),t=r.split(/\W/),i=parseFloat(e[0]),n=parseFloat(t[0]);return!(n<i||i===n&&parseFloat("0"+e[1])>parseFloat(t[1]))},a.loadFrom=function(){return __DEBUG__?n.getScriptPath("cyberplayer.js"):a.repo()},a}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){t=function(){function n(e,t){this.name=e,this.message=t.message||t.toString(),this.error=t}
10return{tryCatch:function(t,e,i){if(e=e||this,i=i||[],window.jwplayer&&window.jwplayer.debug)return t.apply(e,i);try{return t.apply(e,i)}catch(e){return new n(t.name,e)}},Error:n}}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){t=function(){var e={getElementsByClassName:function(e,t,i){if(i=i||"*",(t=t||document).getElementsByClassName)return t.getElementsByClassName(e);for(var n=[],r=t.getElementsByTagName(i),a=r.length,s=new RegExp("(^|\\s)"+e+"(\\s|$)"),o=0;o<a;o++)s.test(r[o].className)&&n.push(r[o]);return n},addEventListener:function(e,t,i,n){n=n||!1,(e=e||document).addEventListener?e.addEventListener(t,i,n):e.attachEvent("on"+t,i)},removeEventListener:function(e,t,i,n){n=n||!1,(e=e||document).removeEventListener?e.removeEventListener(t,i,n):e.detachEvent("on"+t,i)},arrayFilter:function(){Array.prototype.filter||(Array.prototype.filter=function(e){if(null==this)throw TypeError();var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw TypeError();for(var n,r=[],a=arguments[1],s=0;s<i;s++)s in t&&(n=t[s],e.call(a,n,s,t))&&r.push(n);return r})},funcBind:function(){Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");function t(){return n.apply(this instanceof r&&e?this:e||window,i.concat(Array.prototype.slice.call(arguments)))}var i=Array.prototype.slice.call(arguments,1),n=this,r=function(){};return r.prototype=this.prototype,t.prototype=new r,t})}};return e.arrayFilter(),e.funcBind(),e}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(144),i(145),i(0),i(195),i(203),i(67),i(100),i(205),i(106),i(1),i(206),i(45),i(4),i(66),i(15),i(3),i(242),i(244),i(32)],t=function(P,x,D,M,B,t,F,O,U,N,j,G,i,V,H,Y,s,z,e){function n(t){return function(){var e=Array.prototype.slice.call(arguments,0);this._model.getVideo()?this["_"+t].apply(this,e):this.eventsQueue.push([t,e])}}function r(e){this.originalContainer=this.currentContainer=e,this.eventsQueue=[],this.isFirstTriggerPlay=!0,D.extend(this,i),this._model=new t}return r.prototype={prevFrame:n("prevFrame"),nextFrame:n("nextFrame"),snapshot:n("snapshot"),test1:n("test1"),play:n("play"),pause:n("pause"),setVolume:n("setVolume"),enableGPU:n("enableGPU"),disableGPU:n("disableGPU"),setToken:n("setToken"),setMute:n("setMute"),seek:n("seek"),stop:n("stop"),load:n("load"),playlistNext:n("next"),playlistPrev:n("prev"),playlistItem:n("item"),setFullscreen:n("setFullscreen"),setScreenshot:n("setScreenshot"),setPictInPict:n("setPictInPict"),setCaptureFrameStart:n("setCaptureFrameStart"),setCaptureFrameEnd:n("setCaptureFrameEnd"),setCurrentCaptions:n("setCurrentCaptions"),setCurrentQuality:n("setCurrentQuality"),setDanmuStatus:n("setDanmuStatus"),sendDanmu:n("sendDanmu"),setup:function(s,r){!0!==s.autostart||N.isMobile()||(s.origin_volume=s.volume,s.volume=0);var a,e,n,o,l,u=this._model,h=!1,i=!1,d=this,c=(this.recording=!1,function(){return u.getVideo()}),t=new F,f=(t.track(u),new P(s,t));function p(){u.mediaModel.on("change:state",function(e,t){"playing"!==t||!N.isChrome66()&&!N.isMobile()||0!==r.getVolume()||u.get("autostart")||u.setVolume(f.originVolume);t=(t=t)===H.LOADING||t===H.STALLED?H.BUFFERING:t;u.set("state",t)})}function m(){d.trigger(Y.JWPLAYER_READY,{setupTime:0}),d.trigger(Y.JWPLAYER_PLAYLIST_LOADED,{playlist:u.get("playlist")}),d.trigger(Y.JWPLAYER_PLAYLIST_ITEM,{index:u.get("item"),item:u.get("playlistItem")}),d.trigger(Y.JWPLAYER_CAPTIONS_LIST,{tracks:u.get("captionsList"),track:u.get("
10captionsIndex")}),u.get("autostart")&&(!N.isPoorIE()&&u.get("imageAdvs")&&u.get("imageAdvs").start?a.beginStartAdv():y({reason:"autostart"})),g()}function g(){for(;0<d.eventsQueue.length;){var e=d.eventsQueue.shift(),t=e[0],e=e[1]||[];d["_"+t].apply(d,e)}}function _(e,t){switch(u.get("state")===H.ERROR&&u.set("state",H.IDLE),v(!0),u.get("autostart")&&u.once("itemReady",y),typeof e){case"string":!function(e){var t=new U;t.on(Y.JWPLAYER_PLAYLIST_LOADED,function(e){_(e.playlist)}),t.on(Y.JWPLAYER_ERROR,function(e){e.message="ææ¾å表å 载失败: "+e.message,this.triggerError(e)},this),t.load(e)}(e);break;case"object":var i=O(e),n=u.get("edition"),i=u.getProviders().required(i,n);G.load(i,n).then(function(){d.getProvider()||(u.setProvider(u.get("playlistItem")),g())}),w(e)&&S(0);break;case"number":S(e,t)}}function y(i){var e;if(i&&u.set("playReason",i.reason),u.get("state")!==H.ERROR){var t=d._instreamAdapter&&d._instreamAdapter.getState();if(D.isString(t))return r.pauseAd(!1);if(u.get("state")===H.COMPLETE&&(v(!0),S(0)),!h){h=!0;let t=u.getVideo().getCurrentQuality();var n=u.get("playlistItem");let e=!1;if(t<0&&n&&u.get("qualityLabel")){for(let e=0;e<n.sources.length;e++)n.sources[e].label.toString()===u.get("qualityLabel").toString()&&(t=e);"flash"===u.getVideo().getName().name&&(e=!0)}if(t<0&&(t=0),(i&&"interaction"!=i.reason||d.isFirstTriggerPlay)&&(d.isFirstTriggerPlay=!1,d.trigger(Y.JWPLAYER_MEDIA_BEFOREPLAY,{file:u.get("file")||u.get("playlistItem").sources[t].file,currentQuality:e?++t:t})),h=!1,l)return l=!1,void(o=null)}if(!0===u.get("hevc"))e=N.tryCatch(function(){u.playVideo()});else if(E()){if(0===u.get("playlist").length)return!1;!N.isPoorIE()&&u.get("imageAdvs")&&u.get("imageAdvs").start?a.beginStartAdv():e=N.tryCatch(function(){u.loadVideo()})}else u.get("state")===H.PAUSED&&(e=N.tryCatch(function(){u.playVideo()}));return!(e instanceof N.Error&&(d.triggerError(e),o=null,1))}}function v(e){u.off("itemReady",y);var e=!e,t=(o=null,N.tryCatch(function(){u.stopVideo()},d));return t instanceof N.Error?(d.triggerError(t),!1):(e&&(i=!0),h&&(l=!0),!0)}function A(){o=null;var e=d._instreamAdapter&&d._instreamAdapter.getState();if(D.isString(e))return r.pauseAd(!0);switch(u.get("state")){case H.ERROR:return!1;case H.PLAYING:case H.BUFFERING:var t=N.tryCatch(function(){c().pause()},this);if(t instanceof N.Error)return d.triggerError(t),!1;break;default:h&&(l=!0)}return!0}function E(){var e=u.get("state");return e===H.IDLE||e===H.COMPLETE||e===H.ERROR}function b(e,t){v(!0),S(e),y(t)}function w(e){e=O(e),e=O.filterPlaylist(e,u.getProviders(),u.get("androidhls"),u.get("drm"),u.get("preload"),u.get("feedid"),u.get("withCredentials"),u.get("hevc"),u.get("native"));return u.set("playlist",e),!(!D.isArray(e)||0===e.length)||(d.triggerError({message:"Error loading playlist: No playable sources found"}),!1)}function S(e,t){void 0!==_hmt&&null!==_hmt&&_hmt.push(["_trackPageview","/init/playerItem/hevc
10/"+(!0===u.get("hevc"))]);var i=u.get("playlist");e=((e=parseInt(e,10)||0)+i.length)%i.length,u.set("item",e),null!=t&&i[e].sources&&i[e].sources[t]&&(i[e].file=i[e].sources[t].file),u.set("playlistItem",i[e]),u.setActiveItem(i[e],t)}function T(e){b(u.get("item")+1,e||{reason:"external"})}function L(){E()&&(i?i=!1:(o=L,u.get("item")===u.get("playlist").length-1?u.get("repeat")?T({reason:"repeat"}):(u.set("state",H.COMPLETE),d.trigger(Y.JWPLAYER_PLAYLIST_COMPLETE,{})):T({reason:"playlist"})))}function k(){return c()?c().getCurrentQuality():-1}function C(){return c()?c().getQualityLevels():null}function R(){return e.getCurrentIndex()}function I(){return e.getCaptionsList()}u.setup(f,t),u.advManage&&u.advManage.setApi(r),a=this._view=new j(r,u),new z(r,u),e=new B(r,u),(n=new M(r,u,a,w)).on(Y.JWPLAYER_READY,function(){var e=u.get("playlist");var t=e.findIndex(e=>e.default);var i=0;-1!=t&&(u.set("item",t),i=-1==(i=e[t].sources.findIndex(e=>e.default))?0:i);n=null,S(u.get("item"),i),u.on("change:state",V,this),u.on("change:castState",function(e,t){d.trigger(Y.JWPLAYER_CAST_SESSION,t)}),u.on("change:fullscreen",function(e,t){d.trigger(Y.JWPLAYER_FULLSCREEN,{fullscreen:t})}),u.on("change:screenshot",function(e,t){d.trigger(Y.JWPLAYER_SCREESHOT,{img:t})}),u.on("itemReady",function(){d.trigger(Y.JWPLAYER_PLAYLIST_ITEM,{index:u.get("item"),item:u.get("playlistItem")})}),u.on("change:playlist",function(e,t){t.length&&d.trigger(Y.JWPLAYER_PLAYLIST_LOADED,{playlist:t})}),u.on("change:volume",function(e,t){d.trigger(Y.JWPLAYER_MEDIA_VOLUME,{volume:t})}),u.on("change:mute",function(e,t){d.trigger(Y.JWPLAYER_MEDIA_MUTE,{mute:t})}),u.on("change:controls",function(e,t){d.trigger(Y.JWPLAYER_CONTROLS,{controls:t})}),u.on("change:scrubbing",function(e,t){(t?A:y)()}),u.on("change:captionsList",function(e,t){d.trigger(Y.JWPLAYER_CAPTIONS_LIST,{tracks:t,track:R()})}),u.on("change:danmaku",(e,t)=>{}),u.mediaModel.set("mediaType",null),u.mediaController.on("all",d.trigger.bind(d)),a.on("all",d.trigger.bind(d)),this.showView(a.element()),D.defer(m)},this),n.on(Y.JWPLAYER_SETUP_ERROR,this.setupError,this),u.mediaController.on(Y.JWPLAYER_MEDIA_COMPLETE,function(){D.defer(L)}),u.mediaController.on(Y.JWPLAYER_MEDIA_ERROR,this.triggerError,this),p(),u.on("change:mediaModel",p),this._prevFrame=function(){return void 0!==u.get("hevc")&&!0===u.get("hevc")&&u.prevFrame()},this._nextFrame=function(){return void 0!==u.get("hevc")&&!0===u.get("hevc")&&u.nextFrame()},this._snapshot=function(e){return!0===u.get("hevc")&&u.snapshot(e)},this._test1=function(){u.test1()},this._play=y,this._pause=A,this._seek=function(e){u.get("state")!==H.ERROR&&(this.getConfig().disableSeekForward&&e>this._model.get("position")?d.trigger(Y.JWPLAYER_SEEK_FORWARD_FORBIDDEN):(u.get("scrubbing")||u.get("state")===H.PLAYING||y(!0),c().seek(e)))},this._stop=v,this._load=_,this._next=T,this._prev=function(e){b(u.get("item")-1,e||{reason:"external"})},this._item=b,this._setCurrentCaptions=function(e){e=parseInt(e,10)||0,u.persistVideoSubtitleTrack(e),d.trigger(Y.JWPLAYER_CAPTIONS_CHANGED,{tracks:I(),track:e})},this._setCurrentQuality=function(e){c()&&(e=parseInt(e,10)||0,c().setCurrentQuality(e))},this._setFullscreen=function(e){D.isBoolean(e)||(e=!u.get("fullscreen")),u.set("fullscreen",e),this._instreamAdapter&&this._instreamAdapter._adModel&&this._instreamAdapter._adModel.set("fullscreen",e)},this._setScreenshot=function(){var e,t,i;void 0!==u.get("hevc")&&!0===u.get("hevc")?(document.getElementById("snapshot-player")&&document.getElementById("snapshot-player").remove(),e=document.createElement("canvas"),document.body.appendChild(e),e.setAttribute("id","snapshot-player"),e.setAttribute("crossOrigin","anonymous"),u.snapshot(e),d.trigger(Y.JWPLAYER_SCREENSHOT,e)):((e=document.querySelector("video"))||(i=document.querySelector("canvas")),(t=document.createElement("img")).setAttribute("crossOrigin","anonymous"),t.src="",i?t.src=i.toDataURL("image/jpg"):(e.setAttribute("crossOrigin","anonymous"),i=document.createElement("canvas"),void 0!==e.videoWidth&&(i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d").drawImage(e,0,0,i.width,i.height),t.src=i.toDataURL())),d.trigger(Y.JWPLAYER_SCREENSHOT,t))},this._setPictInPict=function(e){D.isBoolean(e)||(e=!u.get("pictinpict")),(e=document.querySelector("video"))&&e!==document.pictureInPictureElement?(e.requestPictureInPicture(),u.set("pictinpict",!0)):(document.exitPictureInPicture(),u.set("pictinpict",!1))},this._setCaptureFrameStart=function(){if(!this.recording){let i=Y.JWPLAYER_CaptureFrameFinished;this.recording_start=window.performance.now();var e=document.getElementById(this._model.get("id")).querySelector("video");if(e){var e=e.captureStream(),n=e.getVideoTracks()[0],e=e.getAudioTracks()[0],r=new MediaStream;r.addTrack(n),0!==s.volume&&r.addTrack(e);try{var a={mimeType:"video/webm;codecs=vp8"};this.mediaRecorder=new MediaRecorder(r,a)}catch(e){return void this.trigger(i,{recorder_video_url:"",code:-1,error:e})}this.captureFrameData=[];let t=this;this.mediaRecorder.ondataavailable=function(e){e.data&&0<e.data.size&&t.captureFrameData.push(e.data)},this.mediaRecorder.onstop=function(){t.CaptureFrameFinished(),t.mediaRecorder=null},this.mediaRecorder.onerror=function(e){t.trigger(i,{recorder_video_url:"",code:-2,error:e})},this.recording=!this.recording,this.mediaRecorder.start()}else this.trigger(i,{recorder_video_url:"",code:-3,error:"playback error"})}},this._setCaptureFrameEnd=function(){if(this.recording){this.recording_end=window.performance.now(),this.recording=!this.recording;let e=this;var t=this.recording_end-this.recording_start;setTimeout(()=>{e.mediaRecorder.stop()},t/2)}},this.CaptureFrameFinished=function(){let i=Y.JWPLAYER_CaptureFrameFinished;return new Promise(t=>{setTimeout(()=>{var e=new Blob(this.captureFrameData,{type:"video/webm"});this.videoUrl=window.URL.createObjectURL(e),d.trigger(i,{recorder_video_url:this.videoUrl,code:0}),t()})})},this.detachMedia=function(){var e=u.getVideo();if(e){e=e.detachMedia();if(e instanceof HTMLVideoElement)return e}return null},this.attachMedia=function(){var e=N.tryCatch(function(){u.getVideo().attachMedia()});e instanceof N.Error?N.log("Error calling _attachMedia",e):"function"==typeof o&&o()},this.getCurrentQuality=k,this.getQualityLevels=C,this.setCurrentAudioTrack=function(e){c()&&(e=parseInt(e,10)||0,c().setCurrentAudioTrack(e))},this.getCurrentAudioTrack=function(){return c()?c().getCurrentAudioTrack():-1},this.getAudioTracks=function(){return c()?c().getAudioTracks():null},this.getCurrentCaptions=R,this.getCaptionsList=I,this.getVisualQuality=function(){if(this._model.mediaModel)return this._model.mediaModel.get("visualQuality");if(t=C()){var e=k(),t=t[e];if(t)return{level:D.extend({index:e},t),mode:"",reason:""}}return null},this.getConfig=function(){if(this._model)return this._model.getConfiguration()}
10,this.getState=function(){var e=d._instreamAdapter&&d._instreamAdapter.getState();return D.isString(e)?e:u.get("state")},this.getHlsCurrentLevel=function(){return c()?c().getHlsCurrentLevel():null},this.setVolume=u.setVolume.bind(u),this.setMute=u.setMute.bind(u),this.enableGPU=u.enableGPU,this.disableGPU=u.disableGPU,this.setToken=u.setToken,this.setPlaybackRate=u.setPlaybackRate,this.setDanmuStatus=u.setDanmuStatus,this.getProvider=function(){return u.get("provider")},this.getWidth=function(){return u.get("containerWidth")},this.getHeight=function(){return u.get("containerHeight")},this.getContainer=function(){return this.currentContainer},this.resize=a.resize,this.getSafeRegion=a.getSafeRegion,this.setCues=a.addCues,this.setThumbnails=a.addThumbnails,this.setCaptions=a.setCaptions,this.sendDanmu=a.sendDanmu,this.setLang=a.setLang,this.addButton=function(e,t,i,n,r){e={img:e,tooltip:t,callback:i,id:n,btnClass:r},t=(t=u.get("dock"))?t.slice(0):[];(t=D.reject(t,D.matches({id:e.id}))).push(e),u.set("dock",t)},this.removeButton=function(e){var t=u.get("dock")||[],t=D.reject(t,D.matches({id:e}));u.set("dock",t)},this.checkBeforePlay=function(){return h},this.getItemQoe=function(){return u._qoeItem},this.setControls=function(e){D.isBoolean(e)||(e=!u.get("controls")),u.set("controls",e);var t=u.getVideo();t&&t.setControls(e)},this.setSeekStep=function(e){u.set("seek_step",e)},this.setKeyControls=function(e){u.set("keyControls",e)},this.playerDestroy=function(){this.stop(),this.showView(this.originalContainer),a&&a.destroy(),u&&u.destroy(),n&&(n.destroy(),n=null)},this.isBeforePlay=this.checkBeforePlay,this.isBeforeComplete=function(){return u.getVideo().checkComplete()},this.createInstream=function(){return this.instreamDestroy(),this._instreamAdapter=new x(this,u,a),this._instreamAdapter},this.skipAd=function(){this._instreamAdapter&&this._instreamAdapter.skipAd()},this.instreamDestroy=function(){d._instreamAdapter&&d._instreamAdapter.destroy()},n.start()},showView:function(e){(document.documentElement.contains(this.currentContainer)||(this.currentContainer=document.getElementById(this._model.get("id")),this.currentContainer))&&(this.currentContainer.parentElement&&this.currentContainer.parentElement.replaceChild(e,this.currentContainer),this.currentContainer=e)},triggerError:function(e){this._model.set("errorEvent",e),this._model.set("state",H.ERROR),this._model.once("change:state",function(){this._model.set("errorEvent",void 0)},this),this.trigger(Y.JWPLAYER_ERROR,e)},setupError:function(e){var t=e.message,i=N.createElement(s(this._model.get("id"),this._model.get("skin"),t)),n=this._model.get("width"),r=this._model.get("height"),a=(N.style(i,{width:0<n.toString().indexOf("%")?n:n+"px",height:0<r.toString().indexOf("%")?r:r+"px"}),this.showView(i),this);D.defer(function(){a.trigger(Y.JWPLAYER_SETUP_ERROR,{message:t,code:e.code})})}},r}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,o){var i=[o(1),o(0)],t=function(n,r){var a={autostart:!1,controls:!0,keyControls:!0,displaytitle:!0,displaydescription:!0,mobilecontrols:!1,repeat:!1,castAvailable:!1,skin:"bce",stretching:"uniform",mute:!1,volume:100,width:480,height:270,controlbar:{barLogo:!1,barLogoUrl:"https://cloud.baidu.com/solution/media.html",canDrag:!0},marquee:{show:!1,text:"ç¾åº¦äº",fontSize:12,color:"#FFF"},startseek:!0,flashUI:!1,playRate:!0,playbackRate:1,playRateConfig:[{label:"Ã0.5"},{label:"Ã1"},{label:"Ã1.5"},{label:"Ã2"},{label:"Ã3"},{label:"Ã4"},{label:"Ã5"},{label:"Ã8"}],isLive:!1,allowDoubleClickFullscreen:!0,allowClickToDisplay:!0,retryCount:0,tokenEncrypt:!1,crossoriginAnonymous:!1,withLog:!0};function s(e){return e=e.slice&&"px"===e.slice(-2)?e.slice(0,-2):e}return function(e,t){e.autoStart&&(e.autostart=!0),"over"!==e.controls&&"none"!==e.controls||(e.controls="over"===e.controls),e.startParam&&(e.startparam=e.startParam);var i,t=t&&t.getAllItems(),t=r.extend({},(window.jwplayer||{}).defaults,t,e),t=(i=t,r.each(i,function(e,t){i[t]=n.serialize(e)}),r.extend({},a,t));return t.options=e,void 0===t.controlbar.canDrag&&(t.controlbar.canDrag=!0),"."===t.base&&(t.base=n.getScriptPath("cyberplayer.js")),t.playRate||(t.playbackRate=1),t.base=(t.base||n.loadFrom()).replace(/\/?$/,"/"),o.p=t.base,t.width=s(t.width),t.height=s(t.height),t.flashplayer=t.flashplayer||n.getScriptPath("cyberplayer.js")+"cyberplayer.flash.swf","http:"===window.location.protocol&&(t.flashplayer=t.flashplayer.replace("https","http")),t.aspectratio=function(e,t){if(-1===t.toString().indexOf("%"))return 0;if("string"!=typeof e||!n.exists(e))return 0;if(/^\d*\.?\d+%$/.test(e))return e;t=e.indexOf(":");if(-1===t)return 0;var i=parseFloat(e.substr(0,t)),e=parseFloat(e.substr(t+1));if(i<=0||e<=0)return 0;return e/i*100+"%"}(t.aspectratio,t.width),r.isObject(t.skin)&&(t.skinUrl=t.skin.url,t.skinColorInactive=t.skin.inactive,t.skinColorActive=t.skin.active,t.skinColorBackgroun
10d=t.skin.background,t.skin=r.isString(t.skin.name)?t.skin.name:a.skin),r.isString(t.skin)&&0<t.skin.indexOf(".xml")&&(t.skin=t.skin.replace(".xml","")),t.aspectratio||delete t.aspectratio,t.playlist||(!(e=r.pick(t,["title","description","type","mediaid","image","file","sources","tracks","preload","fallbackfile"])).file&&t.RtcPlugin&&(e=Object.assign(e,{file:t.RtcPlugin.serverUrl,isrtc:!0},t.RtcPlugin)),t.playlist=[e]),n.isPoorIE()&&(e=t,(n.isMSIE(7)||n.isMSIE(6))&&(e.flashUI=!0),e.skin="bce",e.startseek=!1,delete e.skinColorInactive,delete e.skinColorActive,delete e.skinColorBackground,t=e),(n.isChrome66()||n.isMobile())&&(t.originVolume=t.volume,t.volume=0),t}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(146),i(194),i(3),i(15),i(1),i(4),i(0)],t=function(g,_,y,v,A,e,E){function t(t,r,i){var a,s,n,o,l,u=new(0<=(r.get("provider").name||"").indexOf("flash")?_:g)(t,r),h=0,d={},e=E.bind(function(e){(e=e||{}).hasControls=!!r.get("controls"),this.trigger(y.JWPLAYER_INSTREAM_CLICK,e),u&&u._adModel&&(u._adModel.get("state")===v.PAUSED?e.hasControls&&u.instreamPlay():u.instreamPause())},this),c=E.bind(function(){u&&u._adModel&&u._adModel.get("state")===v.PAUSED&&r.get("controls")&&(t.setFullscreen(),t.play())},this);function f(e,t){"complete"!==e&&(t=t||{},d.tag&&!t.tag&&(t.tag=d.tag),this.trigger(e,t))}function p(e){u._adModel.set("duration",e.duration),u._adModel.set("position",e.position)}function m(e){var t,i,n={};d.tag&&(n.tag=d.tag),a&&h+1<a.length?(this.trigger(y.JWPLAYER_MEDIA_COMPLETE,n),u._adModel.set("state","buffering"),r.set("skipButton",!1),t=a[++h],s&&(i=s[h]),this.loadItem(t,i)):(e.type===y.JWPLAYER_MEDIA_COMPLETE&&(this.trigger(y.JWPLAYER_MEDIA_COMPLETE,n),this.trigger(y.JWPLAYER_PLAYLIST_COMPLETE,{})),this.destroy())}this.type="instream",this.init=function(){n=r.getVideo(),o=r.get("position"),l=r.get("playlist")[r.get("item")],u.on("all",f,this),u.on(y.JWPLAYER_MEDIA_TIME,p,this),u.on(y.JWPLAYER_MEDIA_COMPLETE,m,this),u.init(),n.detachMedia(),r.mediaModel.set("state",v.BUFFERING),t.checkBeforePlay()||0===o&&!n.checkComplete()?(o=0,r.set("preInstreamState","instream-preroll")):n&&n.checkComplete()||r.get("state")===v.COMPLETE?r.set("preInstreamState","instream-postroll"):r.set("preInstreamState","instream-midroll");var e=r.get("state");return e!==v.PLAYING&&e!==v.BUFFERING||n.pause(),i.setupInstream(u._adModel),u._adModel.set("state",v.BUFFERING),i.clickHandler().setAlternateClickHandlers(A.noop,null),this.setText("Loading ad"),this},this.loadItem=function(e,t){A.isAndroid(2.3)?this.trigger({type:y.JWPLAYER_ERROR,message:"æµå 载失败ï¼å¨Android 2.3ä¸ä¸è½å è½½æµ"}):(E.isArray(e)&&(s=t,e=(a=e)[h],s)&&(t=s[h]),this.trigger(y.JWPLAYER_PLAYLIST_ITEM,{index:h,item:e}),d=E.extend({},b,t),u.load(e),this.addClickHandler(),(t=e.skipoffset||d.skipoffset)&&(u._adModel.set("skipMessage",d.skipMessage),u._adModel.set("skipText",d.skipText),u._adModel.set("skipOffset",t),r.set("skipButton",!0)))},this.applyProviderListeners=function(e){u.applyProviderListeners(e),this.addClickHandler()},this.play=function(){u.instreamPlay()},this.pause=function(){u.instreamPause()},this.hide=function(){u.hide()},this.addClickHandler=function(){i.clickHandler().setAlternateClickHandlers(e,c),u.on(y.JWPLAYER_MEDIA_META,this.metaHandler,this)},this.skipAd=function(e){var t=y.JWPLAYER_AD_SKIPPED;this.trigger(t,e),m.call(this,{type:t})},this.metaHandler=function(e){e.width&&e.height&&i.resizeMedia()},this.destroy=function(){if(this.off(),r.set("skipButton",!1),u)switch(i.clickHandler()&&i.clickHandler().revertAlternateClickHandlers(),u.instreamDestroy(),i.destroyInstream(),u=null,t.attachMedia(),r.get("preInstreamState")){case"instream-preroll":case"instream-midroll":var e=E.extend({},l);e.starttime=o,r.loadVideo(e),A.isMobile()&&r.mediaModel.get("state")===v.BUFFERING&&n.setState(v.BUFFERING),n.play();break;case"instream-postroll":case"instream-idle":n.stop()}}
10,this.getState=function(){return!(!u||!u._adModel)&&u._adModel.get("state")},this.setText=function(e){i.setAltText(e||"")},this.hide=function(){i.useExternalControls()}}var b={skipoffset:null,tag:null};return E.extend(t.prototype,e),t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(4),i(66),i(3),i(15),i(67)],t=function(u,h,d,c,f,p){return function(e,t){var i,n,r=u.extend(this,h);function a(e){e=e||i.getVideo();n!==e&&(n=e)&&(e.off(),e.on("all",function(e,t){t=u.extend({},t,{type:e}),this.trigger(e,t)},r),e.on(c.JWPLAYER_MEDIA_BUFFER_FULL,l),e.on(c.JWPLAYER_PLAYER_STATE,s),e.attachMedia(),e.volume(t.get("volume")),e.mute(t.get("mute")),i.on("change:state",d,r))}function s(e){switch(e.newstate){case f.PLAYING:case f.PAUSED:i.set("state",e.newstate)}}function o(e){t.trigger(e.type,e),r.trigger(c.JWPLAYER_FULLSCREEN,{fullscreen:e.jwstate})}function l(){i.getVideo().play()}return e.on(c.JWPLAYER_FULLSCREEN,function(e){this.trigger(c.JWPLAYER_FULLSCREEN,e)},r),this.init=function(){(i=(new p).setup({id:t.get("id"),volume:t.get("volume"),fullscreen:t.get("fullscreen"),mute:t.get("mute")})).on("fullscreenchange",o),this._adModel=i},r.load=function(e){i.set("item",0),i.set("playlistItem",e),i.setActiveItem(e),a(),i.off(c.JWPLAYER_ERROR),i.on(c.JWPLAYER_ERROR,function(e){this.trigger(c.JWPLAYER_ERROR,e)},r),i.loadVideo(e)},r.applyProviderListeners=function(e){a(e),e.off(c.JWPLAYER_ERROR),e.on(c.JWPLAYER_ERROR,function(e){this.trigger(c.JWPLAYER_ERROR,e)},r),t.on("change:volume",function(e,t){n.volume(t)},r),t.on("change:mute",function(e,t){n.mute(t)},r)},this.instreamDestroy=function(){i&&(i.off(),this.off(),n&&(n.detachMedia(),n.off(),i.getVideo())&&n.destroy(),i=null,e.off(null,null,this),e=null)},r.instreamPlay=function(){i.getVideo()&&i.getVideo().play(!0)},r.instreamPause=function(){i.getVideo()&&i.getVideo().pause(!0)},r}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){t=function(){return document.createElement("video")}.apply(t,[]);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(149)],t=function(e){return{cybercore:e}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i(10);
10i=[i(29),i(1),i(65),i(0),i(3),i(15),i(96),i(4),i(150),i(32),i(151),i(10)],t=function(D,M,e,B,F,O,U,N,j,t,G,V){var H=window.clearTimeout,Y=(M.isIE(),M.isMSIE(),M.isMobile(),M.isFF()),z=M.isAndroidNative();M.isIOS(7),M.isIOS(8);function i(l,u){let t=u.file,h=u.starttime;!t&&u.playlist.length&&(e=u.item||0,t=u.playlist[e].file);var e=u.width,i=u.height;const d=u.autostart;var n=u.repeat,r=u.duration;const c=u.controls;this.isInitSeek=!0;let a=40960,s=0;u.hevcProbe?a=u.hevcProbe:s=.1;var o,f,p,m,g,_=this,e={player:l,width:e,height:i,token:"base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1",danmaku:u.danmaku,extInfo:{probeSize:a,coreProbePart:s,moovStartFlag:!0,ignoreAudio:u.audioNone||0,autoPlay:d,repeat:n,duration:r,hevc:!u.native},useSoftDecoding:!!u.useSoftDecoding,RtcPlugin:u.RtcPlugin,openToken:u.openToken,maxBufferLength:u.maxBufferLength},_=(this.videoURL=t,this.alreadyMvNode=!1,this.extNeedManualClickBoot=!1,this.extPlayerContainer=null,this.extPlayerPTS=0,this.extPlayerDur=0,this.vol=u.volume||u.options.origin_volume||u.options.volume,this.isMuted=u.mute,this.playbackRate=u.playbackRate,this.extPlayerGL=null,this.extPlayerLoadOK=!1,this.extPlayerMediaInfo=null,this.extPlayer=G.default.createPlayer(t,e),this.extPlayer.onMakeItReady=()=>{var e=document.querySelector("#"+l),t=e.getElementsByTagName("div");_.extPlayerGL=e.getElementsByTagName("video")[0],!1===_.alreadyMvNode&&_.extPlayerGL&&t[0]&&_.extPlayerGL!==t[0]&&(_.alreadyMvNode=!0,_.extPlayerGL.parentNode===e?_.extPlayerGL.parentNode.insertBefore(_.extPlayerGL,t[0]):_.extPlayerGL.parentNode.parentNode.insertBefore(_.extPlayerGL.parentNode,t[0])),!0===d&&_.setState(O.LOADING),u.image&&_.trigger(F.JWPLAYER_H265WEB_COVERLOADED)},this.extPlayer.onPerformance=e=>{this.trigger(F.JWPLAYER_PERFORMANCE,e)},this.extPlayer.onNetworkError=e=>{_.trigger(F.JWPLAYER_MEDIA_ERROR,{message:message,code:"111",detail:"network error",videoSrc:t})},this.extPlayer.onReadyShowDone=()=>{this.extPlayerLoadOK=!0;let t=4,i=window.setInterval(function(){if(0===t&&(window.clearInterval(i),i=null),!_.extPlayerMediaInfo||void 0!==_.extPlayerMediaInfo.meta.size.width&&null!==_.extPlayerMediaInfo.meta.size.width&&0!==_.extPlayerMediaInfo.meta.size.width&&void 0!==_.extPlayerMediaInfo.meta.size.height&&null!==_.extPlayerMediaInfo.meta.size.height&&0!==_.extPlayerMediaInfo.meta.size.height&&_.extPlayerGL){window.clearInterval(i),i=null,_.extPlayer.setVoice(_.vol/100);var e={duration:_.extPlayerDur,height:_.extPlayerMediaInfo.meta.size.height,width:_.extPlayerMediaInfo.meta.size.width},e=(!(_.extPlayer&&_.extPlayer.configFormat&&_.extPlayer.configFormat.useSoftDecoding)&&0<h&&h<=_.extPlayerDur&&_.extPlayer.seek(h,null,!0),_.trigger(F.JWPLAYER_MEDIA_META,e),R(_.extPlayerDur),document.querySelector(".jw-display-icon-container"));if(e&&(e.parentNode.style="pointer-events:none",e.style.display=""),!0===d&&_.isMuted&&(_.mute(!0),_.extPlayer.player.isPlayingState)&&!_.extPlayer.player.isPlayingState()&&_.play(!0),I(),_.extPlayerGL.setAttribute("disableRemotePlayback",""),_.extPlayerGL.setAttribute("x-webkit-airplay","allow"),_.extPlayerGL.setAttribute("webkit-playsinline",""),_.extPlayerGL.setAttribute("playsinline",""),_.extPlayerGL.setAttribute("x5-playsinline",""),_.extPlayerGL.setAttribute("crossOrigin","anonymous"),!0===c&&u.playRate){const a="jw-icon jw-icon-tooltip jw-icon-playrate jw-button-color jw-reset",s="jw-text jw-option jw-item-0 jw-reset";let t=_.extPlayerContainer.querySelector(".jw-icon-playrate"),i=(t.style.display="",t.setAttribute("class","jw-icon jw-icon-tooltip jw-icon-playrate jw-button-color jw-reset"),t.contains(document.querySelector(".jw-menu-playrate"))&&document.querySelector(".jw-menu-playrate").parentElement.removeChild(document.querySelector(".jw-menu-playrate")),t.openShow=!1,t.onclick=function(e){!1===t.openShow?t.setAttribute("class",a+" jw-open"):t.setAttribute("class",a),t.openShow=!t.openShow},_.extPlayerContainer.querySelector(".jw-playrate-label"));i.textContent="x1";var e=t.querySelector("div.jw-overlay"),n=document.createElement("ul"),r=(n.setAttribute("class","jw-menu jw-menu-playrate jw-background-color jw-reset"),e.appendChild(n),u.playRateConfig||[{label:"Ã0.5"},{label:"Ã1"},{label:"Ã2"},{label:"Ã3"},{label:"Ã4"},{label:"Ã8"}]);for(let t=0;t<r.length;t++){const o=r[t].label;let e=document.createElement("li");e.setAttribute("class",s+"jw-active-option"),e.textContent=o,e.onmouseenter=function(){e.setAttribute("class",s+" jw-active-option")},e.onmouseleave=function(){e.setAttribute("class",s)},e.onclick=function(e){i.textContent=o,_.setPlaybackRate(o.slice(1))},n.appendChild(e)}1!=_.playbackRate&&_.setPlaybackRate(JSON.stringify(_.playbackRate))}}else--t,_.extPlayerContainer=document.querySelector("#"+l),u.native||!0!==_.extPlayerMediaInfo.meta.isHEVC?(_.extPlayerGL=_.extPlayerContainer.getElementsByTagName("video")[0],_.extPlayerGL||_.extPlayer.onMakeItReady(),!0===d&&(_.extPlayerGL.muted=!0,_.volume(0)),void 0!==_.extPlayerGL&&null!==_.extPlayerGL&&_.extPlayerGL&&(e=_.extPlayerContainer.getElementsByTagName("div"),
10!1===_.alreadyMvNode&&_.extPlayerGL!==e[0]&&(_.alreadyMvNode=!0,_.extPlayerGL.parentNode.insertBefore(_.extPlayerGL,e[0])),void 0!==_.extPlayerMediaInfo.meta.size.width&&null!==_.extPlayerMediaInfo.meta.size.width&&0!==_.extPlayerMediaInfo.meta.size.width&&void 0!==_.extPlayerMediaInfo.meta.size.height&&null!==_.extPlayerMediaInfo.meta.size.height&&0!==_.extPlayerMediaInfo.meta.size.height||(_.extPlayerMediaInfo.meta.size.width=_.extPlayerGL.videoWidth,_.extPlayerMediaInfo.meta.size.height=_.extPlayerGL.videoHeight))):(_.extPlayerGL=_.extPlayerContainer.getElementsByTagName("canvas")[0],_.extPlayerGL.setAttribute("crossOrigin","anonymous"))},500)},this.extPlayer.onLoadFinish=e=>{this.extNeedManualClickBoot=!1;try{this.extPlayerMediaInfo=this.extPlayer.mediaInfo(),this.extPlayerDur=this.extPlayerMediaInfo.meta.durationMs/1e3}catch(e){}this.extPlayerContainer=document.querySelector("#"+l),void 0!==this.extPlayerGL&&null!==this.extPlayerGL||(!0===this.extPlayerMediaInfo.meta.isHEVC&&Y?(this.extPlayerGL=this.extPlayerContainer.getElementsByTagName("canvas")[0],this.extPlayerGL.setAttribute("crossOrigin","anonymous")):(this.extPlayerGL=this.extPlayerContainer.getElementsByTagName("video")[0],void 0!==this.extPlayerGL&&null!==this.extPlayerGL&&this.extPlayerGL&&(t=this.extPlayerContainer.getElementsByTagName("div"),!1===this.alreadyMvNode&&this.extPlayerGL!==t[0]&&(this.alreadyMvNode=!0,this.extPlayerGL.parentNode.insertBefore(this.extPlayerGL,t[0])),void 0!==this.extPlayerMediaInfo.meta.size.width&&null!==this.extPlayerMediaInfo.meta.size.width&&0!==this.extPlayerMediaInfo.meta.size.width&&void 0!==this.extPlayerMediaInfo.meta.size.height&&null!==this.extPlayerMediaInfo.meta.size.height&&0!==this.extPlayerMediaInfo.meta.size.height||(this.extPlayerMediaInfo.meta.size.width=this.extPlayerGL.videoWidth,this.extPlayerMediaInfo.meta.size.height=this.extPlayerGL.videoHeight))));var t={duration:this.extPlayerDur,height:this.extPlayerMediaInfo.meta.size.height,width:this.extPlayerMediaInfo.meta.size.width};!1===e?this.setState(O.LOADING):(this.extPlayer.setVoice(this.vol/100),!0===d||u.image||this.extPlayer.isPlaying()||this.setState(O.PAUSED)),this.trigger(F.JWPLAYER_MEDIA_META,t),R(this.extPlayerDur)},this.extPlayer.onLoadCache=()=>{this.setState(O.LOADING)},this.extPlayer.onLoadCacheFinshed=()=>{this.extPlayer.isPlaying()?this.setState(O.PLAYING):this.setState(O.PAUSED)},this.extPlayer.onPlayState=e=>{!0===e?0<h&&h<=_.extPlayerDur&&this.isInitSeek||_.setState(O.PLAYING):_.setState(O.PAUSED)},this.extPlayer.onPlayTime=(e,t)=>{this.extPlayerPTS=Math.min(e,f);var i=this.extPlayerPTS;p=i=f<0?-(!0-i):i,this.state===O.PLAYING&&this.trigger(F.JWPLAYER_MEDIA_TIME,{position:t?t+e:p,duration:t?t+f:f})},this.extPlayer.onSeiInfo=e=>{this.state===O.PLAYING&&this.trigger(F.JWPLAYER_VIDEO_SEI,e)},this.extPlayer.onCacheProcess=e=>{var t,i;e=Math.min(+e/f,1),t=this.extPlayerPTS,i=f,e===A&&i===f||(A=e,_.trigger(F.JWPLAYER_MEDIA_BUFFER,{bufferPercent:100*e,position:t,duration:i}))},this.extPlayer.onSeekStart=()=>{this.seeking=!0,this.extPlayer.isPlaying()&&this.setState(O.LOADING),this.mute(!0),this.trigger(F.JWPLAYER_MEDIA_SEEK_START)},this.extPlayer.onSeekFinish=(e,t)=>{this.seeking=!1,(this.extPlayer.isPlaying()&&e&&!t||0<h&&h<=_.extPlayerDur&&this.isInitSeek&&e&&!t)&&(this.isInitSeek=!1,this.setState(O.PLAYING)),e&&this.mute(!1),this.trigger(F.JWPLAYER_MEDIA_SEEK_FINISHED)},this.extPlayer.onPlayFinish=()=>{H(v),_.setState(O.PAUSED),w=!1,_.trigger(F.JWPLAYER_MEDIA_COMPLETE)},this.extPlayer.onRtcEvent=e=>{this.trigger(F.JWPLAYER_RTCEVENT,e)},this.extPlayer.onError=e=>{setTimeout(()=>{this.trigger(F.ERROR,e)})},this.extPlayer.onRender=(e,t,i,n,r)=>{},this.extPlayer.onQualityLevels=e=>{this.trigger(F.JWPLAYER_HLS_QUALITYLIST_CHANGE,{levels:e})},this.extPlayer.onLevelUpdates=e=>{this.trigger(F.JWPLAYER_HLS_LEVEL_UPDATED,{data:e})},this.extPlayer.onPause=()=>{this.pause()},this.extPlayer.onPlay=()=>{this.play()},this.cybercorePlay=(e=!1)=>{this.extPlayer&&!this.extPlayer.isPlaying()?("ts"===V.GetUriFormat(this.videoURL)||h||this.setState(O.PLAYING),this.extPlayer.play(),!0===this.autoPlayWithInterrupt&&(0===this.vol&&(this.vol=u.options.origin_volume),this.volume(this.vol),this.mute(!1))):!1===e?(this.setState(O.PAUSED),this.extPlayer.pause()):(h||this.setState(O.PLAYING),this.extPlayer.play(),!0===this.autoPlayWithInterrupt&&this.volume(this.vol))},this.cybercorePause=()=>{this.extPlayer.pause(),!0===d&&(this.autoPlayWithInterrupt=!0)},this.state=O.IDLE,this.seeking=!1,B.extend(this,N,j),this.trigger=function(e,t){if(E)return N.trigger.call(this,e,t)},this.setState=function(e){return U.setState.call(this,e)},this.setControls=function(e){},this),y=0,v=-1,A=-1,E=!0,b=-1,i=!!u.sdkplatform,w=!1,S=!1,T=null,L=-1,k={level:{}},C=null,n=document.getElementById(l);function R(e){f=e,y&&e&&e!==1/0&&_.seek(y)}function I(){m||(m=!0,_.trigger(F.JWPLAYER_MEDIA_BUFFER_FULL))}function P(e){b=function(e){var t=Math.max(0,b),i=u.qualityLabel;if(e)for(var n=0;n<e.length;n++)if(e[n].default&&(t=n),i&&e[n].label===i)return n;return k.reason="initial choice",k.level={},t}(g=e);e=x(e);e&&_.trigger(F.JWPLAYER_MEDIA_LEVELS,{levels:e,currentQuality:b})}function x(e){var t;return t="array"===M.typeOf(e)&&0<e.length?B.map(e,function(e,t){return{label:e.label||t}}):t}this.isSDK=i,this.itemTracks=null,this.video=n,this.stop=function(){H(v),E&&(this.setState(O.IDLE),this.extPlayerLoadOK=!1)},this.destroy=function(){this.remove(),this.alreadyMvNode=!1},this.init=function(e,t){E&&(g=e.sources,e.sources.length&&"hls"!==e.sources[0].type&&this.sendMediaType(e.sources),p=e.starttime||0,f=e.duration||0,k.reason="",e.tracks&&e.tracks.length&&this.setupSideloadedTracks(e.tracks),this.itemTracks,C=t)},this.load=function(e){var t;E&&(P(e.sources),e.sources.length&&"hls"!==e.sources[0].type&&this.sendMediaType(e.sources),t=e.starttime||0,e.duration,h=t)},this.test1=function(){alert("test1")},this.play=function(e=!0){_.seeking?(_.setState(O.LOADING),_.once(F.JWPLAYER_MEDIA_SEEKED,_.play)):([e=!1]=[e],_.cybercorePlay(e))},this.prevFrame=function(){this.pause(),_.extPlayer.seek(p-.033)},this.nextFrame=function(){_.extPlayer.playNextFrame()},this.snapshot=function(e){return null!=(e=e)&&(_.extPlayer.snapshot(e),!0)},this.pause=function(){H(v),this.cybercorePause(),this.setState(O.PAUSED)},this.seek=function(e){!0===d&&(this.autoPlayWithInterrupt=!0,0===this.vol&&(this.vol=u.options.origin_volume),this.volume(this.vol)),E&&this.extPlayer.seek(e)&&this.trigger(F.JWPLAYER_MEDIA_SEEK,{position:this.extPlayerPTS,offset:e})},this.volume=function(e){this.extPlayerLoadOK&&(e=M.between(e/100,0,1),!0===this.extPlayerLoadOK&&(this.extPlayer.setVoice(e),this.trigger("volume",{volume:Math.round(100*e)})),this.vol=100*e,0===e)&&_.trigger("mute",{mute:!0})}
10,this.enableGPU=function(){throw"åªæä½¿ç¨Flashææ¾ææ¯æå¼å¯GPU"},this.disableGPU=function(){throw"åªæä½¿ç¨Flashææ¾ææ¯æå¼å¯GPU"},this.mute=function(e){this.extPlayerLoadOK&&!0===this.extPlayerLoadOK&&(!0===e?(this.extPlayer.setVoice(0),this.trigger("volume",{volume:Math.round(0)}),this.trigger("mute",{mute:!0})):(this.extPlayer.setVoice(this.vol/100),this.extPlayer.player.videoTag&&(this.extPlayer.player.videoTag.muted=!1),this.trigger("volume",{volume:this.vol}),this.trigger("mute",{mute:!1})))},this.checkComplete=function(){return w},this.detachMedia=function(){H(v),this.disableTextTrack(),E=!1},this.setContainer=function(e){o=e},this.getContainer=function(){return o},this.remove=function(){H(v),this.extPlayerLoadOK=!1,null!==this.extPlayer&&(this.extPlayer.pause(),this.extPlayer.release(),this.extPlayer=null,void 0!==this.extPlayerGL&&null!==this.extPlayerGL&&this.extPlayerGL.remove(),this.extPlayerGL=null)},this.setVisibility=function(e){(e=!!e)||z?D.style(o,{visibility:"visible",opacity:1}):D.style(o,{visibility:"",opacity:0})},this.resize=function(e,t,i){if(null!==this.extPlayerMediaInfo&&null!==this.extPlayerGL){if(!1===this.extPlayerMediaInfo.meta.isHEVC&&this.extPlayerMediaInfo.meta.size.width<=0&&(this.extPlayerMediaInfo.meta.size.width=this.extPlayerGL.videoWidth,this.extPlayerMediaInfo.meta.size.height=this.extPlayerGL.videoHeight),!(e&&t&&this.extPlayerMediaInfo.meta.size.width&&this.extPlayerMediaInfo.meta.size.height))return!1;mediaW=this.extPlayerMediaInfo.meta.size.width,mediaH=this.extPlayerMediaInfo.meta.size.height,!0===this.extPlayerMediaInfo.meta.isHEVC?(n=e,r=t,a=mediaW/n>mediaH/r,s=n/mediaW,o=r/mediaH,a=a?s:o,s=parseInt(mediaW*a,10),o=parseInt(mediaH*a,10),a=[parseInt((r-o)/2,10),parseInt((n-s)/2,10),s,o],this.extPlayerGL.style.marginTop=a[0]+"px",this.extPlayerGL.style.marginLeft=a[1]+"px",this.extPlayerGL.style.width=a[2]+"px",this.extPlayerGL.style.height=a[3]+"px"):(this.extPlayerGL.style.width=e+"px",this.extPlayerGL.style.height=t+"px")}var n,r,a,s,o;return!1},this.setFullscreen=function(e){let t=this.extPlayerGL;var i;return(e=!!e)?!(M.tryCatch(function(){var e=t.webkitEnterFullscreen||t.webkitEnterFullScreen;e&&e.apply(t)})instanceof M.Error)&&_.getFullScreen(t):((i=t.webkitExitFullscreen||t.webkitExitFullScreen)&&i.apply(t),e)},_.getFullScreen=function(){var e=this.extPlayerGL;return S||e&&!!e.webkitDisplayingFullscreen},this.setCurrentQuality=function(e){b!==e&&0<=e&&g&&g.length>e&&(b=e,k.reason="api",k.level={},this.trigger(F.JWPLAYER_MEDIA_LEVEL_CHANGED,{currentQuality:e,levels:x(g)}),u.qualityLabel=g[e].label)},this.getCurrentQuality=function(){return b},this.getQualityLevels=function(){return x(g)},this.getName=function(){return{name:"cybercore"}},this.setCurrentAudioTrack=function(e){},this.getAudioTracks=function(){return T||[]},this.getCurrentAudioTrack=function(){return L},this.setPlaybackRate=function(e){C.isLive||(!1===this.extPlayer.setPlaybackRate(e)&&this.extPlayerGL&&(this.extPlayerGL.playbackRate=e),this.extPlayerContainer&&(this.extPlayerContainer.querySelector(".jw-playrate-label").innerText="x"+e),this.trigger(F.JWPLAYER_PLAYBACKRATE,{playbackRate:Number(e)}))},this.changeHlsQuality=e=>{this.extPlayer.changeHlsQuality(e)},this.getHlsCurrentLevel=()=>_.extPlayer&&_.extPlayer.player&&_.extPlayer.player.getCurrentLevel(),this.setToken=e=>{for(var t={},i=0;i<e.length;i++)t[e[i].file]=e[i].tokenText;_.extPlayer.do(t)},u.tokenEncrypt||_.extPlayer.do()}function n(){}return n.prototype=U,i.prototype=new n,i.getName=function(){return{name:"cybercore"}},i}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(93),i(1),i(65)],t=function(n,r,a,i){var s=null,o=null,l=-1,u=0;function h(e){var t,i,e=e.currentTarget.activeCues;e&&e.length&&(t=e[e.length-1].startTime,i=[],n.each(e,function(e){e.startTime<t||(e.data?i.push(e):e.text&&this.trigger("meta",{metadataTime:t,metadata:JSON.parse(e.text)}))},this),i.length)&&(e=r.parseID3(i),this.trigger("meta",{metadataTime:t,metadata:e}))}function d(){s=[],o={}}function c(){if(s){for(var e=-1,t=0;t<s.length;t++)if("showing"===s[t].mode){e=t;break}this.setSubtitlesTrack(e+1)}else this.setTextTracks()}function f(){s&&s[l]&&(s[l].mode="disabled")}return{addTracksListener:function(e,t,i){i=i.bind(this),e.addEventListener?e.addEventListener(t,i):e["on"+t]=i},clearTracks:function(){o=s=null,u=0},disableTextTrack:f,getSubtitlesTrack:function(){return l},removeTracksListener:function(e,t,i){e&&(e.removeEventListener?e.removeEventListener(t,i):e["on"+t]=null)},setTextTracks:function(){var e=this.video.textTracks;
10if(l=-1,e){if(s||d(),e.length){var t=0,i=e.length;for(u=0;t<i;t++){var n,r=e[t];o[t+r.kind]||("metadata"===r.kind?(r.oncuechange=h.bind(this),r.mode="showing","ID3 Metadata"===(o[t+r.kind]=r).label&&u++):"subtitles"!==r.kind&&"captions"!==r.kind||(n=r.mode,r.mode="hidden",!r.cues.length&&"caterpillar"===this.getName().name&&"Unknown CC"===r.label)||(r.mode=n,s.push(r),"Unknown CC"!==(o[t+r.kind]=r).label)||u++)}}this.addTracksListener(e,"change",c),s&&s.length&&this.trigger("subtitlesTracks",{tracks:s})}},setupSideloadedTracks:function(e){var t=a.isChrome()||a.isIOS()||a.isSafari();!this._isSDK&&t&&e&&!function(e){return e===this.itemTracks&&s&&s.length===u+this.itemTracks.length}.call(this,e)&&(f(),i.emptyElement(this.video),s&&(t=n.filter(s,function(e){return"Unknown CC"===e.label||"ID3 Metadata"===e.label}),d(),n.each(t,function(e,t){o[t+e]=e}),s=t),this.itemTracks=e,function(e){if(e){var t=!1;s||d();for(var i=0;i<e.length;i++){var n,r=e[i];/\.(?:web)?vtt(?:\?.*)?$/i.test(r.file)?/subtitles|captions|descriptions|chapters|metadata/i.test(r.kind)&&(t||!this.video.hasAttribute("crossorigin")&&a.crossdomain(r.file)&&(this.video.setAttribute("crossorigin","anonymous"),t=!0),(n=document.createElement("track")).src=r.file,n.kind=r.kind,n.srclang=r.language||"",n.label=r.label,n.mode="disabled",n.id=r.defaulttrack?"default":"",this.video.appendChild(n)):(s.push(r),o[i+r.kind]=n)}}}.call(this,e))},setSubtitlesTrack:function(e){s&&(0===e&&n.each(s,function(e){e.mode="disabled"}),l!==e-1)&&(f(),s[l=e-1]&&(s[l].mode="showing"),this.trigger("subtitlesTrackChanged",{currentTrack:l+1,tracks:s}))},textTrackChangeHandler:c}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,i,n){"use strict";n.r(i),function(e){n.d(i,"default",function(){return t}),n(152);class t{static createPlayer(e,t){return window.newcybercorejs(e,t)}static clear(){e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0}}}.call(this,n(31))},function(e,S,T){"use strict";T.r(S),function(t){var e=T(115),i=T(116);const n=T(153),u=T(155),c=T(156),r=T(157),s=T(158),o=T(160),a=T(161),l=T(163),h=T(165),f=T(10);T(68);const d=T(169),p=T(171),m=T(172),g=T(5);T(174);const _=T(175);T(34);const y=T(36),v=T(1);var{}=T(98);const A=T(22)["loadWasm"];T(5);const E={moovStartFlag:!0,readyShow:!0,rawFps:24,autoCrop:!1,core:g.PLAYER_CORE_TYPE_DEFAULT,coreProbePart:0,checkProbe:!0,ignoreAudio:0,probeSize:4096,autoPlay:!1,repeat:!1,cacheLength:50,loadTimeout:30,hevc:!0},b=(e,t)=>t-1e3/e;void 0!==t.Module&&null!==t.Module||(t.Module={}),Module.onRuntimeInitialized=()=>{t.STATIC_MEM_wasmDecoderState=1},window.g_players={},window.onmessage=e=>{},window.addEventListener("wasmLoaded",function(){t.STATIC_MEM_wasmDecoderState=1}),t.onWASMLoaded=function(){t.STATIC_MEM_wasmDecoderState=1};class w{constructor(e,i){if(t.STATICE_MEM_playerCount+=1,this.playerIndex=t.STATICE_MEM_playerCount,this.mp4Obj=null,this.mpegTsObj=null,this.hlsObj=null,this.hlsConf={hlsType:g.PLAYER_IN_TYPE_M3U8_VOD},this.snapshotCanvasContext=null,this.snapshotYuvLastFrame={width:0,height:0,luma:null,chromaB:null,chromaR:null},this.videoURL=e,this.sei_maps=[],this.configFormat={playerId:i.player||g.DEFAILT_WEBGL_PLAY_ID,playerW:i.width||g.DEFAULT_WIDTH,playerH:i.height||g.DEFAULT_HEIGHT,type:i.type||f.GetUriFormat(this.videoURL),accurateSeek:i.accurateSeek||!0,playIcon:i.playIcon||"assets/[email protected]",loadIcon:i.loadIcon||"assets/icon-loading.gif",token:i.token||null,danmaku:i.danmaku,repeat:i.repeat,duration:i.duration,audioNone:i.audioNone,extInfo:E,useSoftDecoding:i.useSoftDecoding||!1,RtcPlugin:i.RtcPlugin,openToken:i.openToken,maxBufferLength:i.maxBufferLength},i.RtcPlugin&&(this.configFormat.type="rtc"),this.mediaExtFormat=this.configFormat.type,this.mediaExtProtocol=null,void 0!==this.videoURL&&null!==this.videoURL&&(this.mediaExtProtocol=f.GetUriProtocol(this.videoURL)),i.extInfo.duration&&(this.configFormat.extInfo.duration=i.extInfo.duration),i.extInfo.ignoreAudio&&(this.configFormat.extInfo.ignoreAudio=1),null==this.configFormat.token)alert("请è¾å
¥TOKENï¼Please set token param!");else{for(var n in this.configFormat.extInfo.core=f.GetFormatPlayCore(this.configFormat.type),i.extInfo)n in this.configFormat.extInfo&&(this.configFormat.extInfo[n]=i.extInfo[n]);this.playMode=g.PLAYER_MODE_VOD,this.seekTarget=0,this.playParam=null,this.timerFeed=null,this.player=null,this.volume=1,this.rawModePts=0,this.loadTimeoutInterval=null,this.loadTimeoutSecNow=this.configFormat.extInfo.loadTimeout,this.autoScreenClose=!0,this.feedMP4Data=null,this.workerFetch=null,this.workerParse=null,this.onPlayTime=null,this.onLoadFinish=null,this.onSeekStart=null,this.onSeekFinish=null,this.onRender=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onPlayFinish=null,this.onCacheProcess=null,this.onReadyShowDone=null,this.onOpenFullScreen=null,this.onCloseFullScreen=null,this.onError=null,this.onProbeError=null,this.onMakeItReady=null,this.onPlayState=null,this.onPerformance=null,this._g_init=null,this.onRtcEvent=null,this.filterConfigParams();let t=this;document.addEventListener("fullscreenchange",function(e){t._isFullScreen()?t.onOpenFullScreen&&t.onOpenFullScreen():(!0===t.autoScreenClose&&t.closeFullScreen(!0),t.onCloseFullScreen&&t.onCloseFullScreen())}),this.screenW=window.screen.width,this.screenH=window.screen.height,this.controller=null,this.downLoadWorker=null,this.onQualityLevels=null,this.onLevelUpdates=null}}filterConfigParams(){void 0!==this.configFormat.extInfo.checkProbe&&null!==this.configFormat.extInfo.checkProbe||(this.configFormat.extInfo.checkProbe=!0),this.configFormat.type===g.PLAYER_IN_TYPE_FLV?(this.configFormat.extInfo.core=g.PLAYER_CORE_TYPE_CNATIVE,this.configFormat.type=g.PLAYER_IN_TYPE_MP4):this.configFormat.type===g.PLAYER_IN_TYPE_HTTPFLV&&(this.configFormat.extInfo.core=g.PLAYER_CORE_TYPE_CNATIVE,this.configFormat.type=g.PLAYER_IN_TYPE_MP4,this.playMode=g.PLAYER_MODE_NOTIME_LIVE)}do(e){e&&(this.configFormat=Object.assign(this.configFormat,{authToken:e}));let t=!1;0<this.configFormat.extInfo.ignoreAudio&&(t=!0),this.configFormat.type===g.PLAYER_IN_TYPE_RAW_265&&(t=!0,this.playMode=g.PLAYER_MODE_NOTIME_LIVE),this.playParam={durationMs:0,fps:0,sampleRate:0,size:{width:0,height:0},audioNone:t,videoCodec:null},_.UI.createPlayerRender(this.configFormat.playerId,this.configFormat.playerW,this.configFormat.playerH);this._makeMP4Player(!0)}release(){return void 0!==this.player&&null!==this.player&&(window.clearInterval(this.timerFeed),this.timerFeed=null,this.playParam.videoCodec===g.CODEC_H265&&this.player&&this.configFormat.type==g.PLAYER_IN_TYPE_M3U8&&void 0!==this.hlsObj&&null!==this.hlsObj&&this.hlsObj.release(),this.player.release(),void 0!==this.snapshotCanvasContext&&null!==this.snapshotCanvasContext&&(y.releaseContext(this.snapshotCanvasContext),this.snapshotCanvasContext=null,void 0!==this.snapshotYuvLastFrame)&&null!==this.snapshotYuvLastFrame&&(this.snapshotYuvLastFrame.luma=null,this.snapshotYuvLastFrame.chromaB=null,this.snapshotYuvLastFrame.chromaR=null,this.snapshotYuvLastFrame.width=0,this.snapshotYuvLastFrame.height=0),void 0!==this.workerFetch&&null!==this.workerFetch&&(this.workerFetch.postMessage({cmd:"stop",params:"",type:this.mediaExtProtocol}),this.workerFetch.onmessage=null),void 0!==this.workerParse&&null!==this.workerParse&&(this.workerParse.postMessage({cmd:"stop",params:""}),this.workerParse.onmessage=null),this.workerFetch=null,this.workerParse=null,this.configFormat.extInfo.readyShow=!0,window.onclick=document.body.onclick=null,window.g_players={},this.downLoadWorker&&this.downLoadWorker.postMessage({type:1}),!0)}debugYUV(e){this.player.debugYUV(e)}setPlaybackRate(e=1){return!(this.playParam.videoCodec===g.CODEC_H265||e<=0||void 0===this.player||null===this.player)&&this.player.setPlaybackRate(e)}changeHlsQuality(e){this.player&&this.player.changeHlsQuality&&this.player.changeHlsQuality(e)}getPlaybackRate(){return void 0!==this.player&&null!==this.player&&(this.playParam.videoCodec===g.CODEC_H265?1:this.player.getPlaybackRate())}setRenderScreen(e=!1){return void 0!==this.player&&null!==this.player&&(this.player.setScreen(e),!0)}play(){var e;return void 0!==this.player&&null!==this.player&&(this.playParam.videoCodec===g.CODEC_H265?(e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0},this.player.play(e)):this.player.play(),!0)}pause(){return void 0!==this.player&&null!==this.player&&(this.player.pause(),!0)}isPlaying(){return void 0!==this.player&&null!==this.player&&this.player.isPlayingState()}setVoice(e){return!(e<0||void 0===this.player||null===this.player||(this.volume=e,this.player&&this.player.setVoice(e),0))}getVolume(){return this.volume}mediaInfo(){var e={meta:this.playParam,videoType:this.playMode};return e.meta.isHEVC=0===this.playParam.videoCodec,e}snapshot(e=null){return null!==e&&(void 0!==this.playParam&&null!==this.playParam)&&(v.isFF()?(this.player.setScreen(!0),e.
10width=this.snapshotYuvLastFrame.width,e.height=this.snapshotYuvLastFrame.height,void 0!==this.snapshotCanvasContext&&null!==this.snapshotCanvasContext||(this.snapshotCanvasContext=y.setupCanvas(e,{preserveDrawingBuffer:!1})),y.renderFrame(this.snapshotCanvasContext,this.snapshotYuvLastFrame.luma,this.snapshotYuvLastFrame.chromaB,this.snapshotYuvLastFrame.chromaR,this.snapshotYuvLastFrame.width,this.snapshotYuvLastFrame.height)):(e.width=this.playParam.size.width,e.height=this.playParam.size.height,e.getContext("2d").drawImage(this.player.videoTag,0,0,e.width,e.height))),null}_seekHLS(e,t,i){if(void 0===this.player||null===this.player)return!1;setTimeout(function(){t.player.getCachePTS()>e?i():t._seekHLS(e,t,i)},100)}_seek(e,t){this.hlsObj&&this.hlsObj.toSeek(e),t()}seek(i,e,t=0){if(void 0===this.player||null===this.player)return!1;let n=this,r=(this.seekTarget=i,this.onSeekStart&&this.onSeekStart(i),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null),this._getSeekTarget());var a;if(!this.configFormat.useSoftDecoding)return a=this.player.seek(i),this.onSeekFinish&&this.onSeekFinish(a,!0),a;if(this.configFormat.extInfo.core===g.PLAYER_CORE_TYPE_CNATIVE)this.pause(),this._seekHLS(i,this,function(){n.player.seek(()=>{},{seekTime:r,mode:n.playMode,accurateSeek:n.configFormat.accurateSeek})});else{if(n.configFormat.type==g.PLAYER_IN_TYPE_M3U8)return void n._seek(i,()=>{n.player.seek(null,{seekTime:r,mode:n.playMode,accurateSeek:n.configFormat.accurateSeek},()=>{e&&e()})});this._seekHLS(i,this,function(){n.player.seek(()=>{n.configFormat.type==g.PLAYER_IN_TYPE_MP4?n.mp4Obj.seek(i):n.configFormat.type==g.PLAYER_IN_TYPE_TS||n.configFormat.type==g.PLAYER_IN_TYPE_MPEGTS?n.mpegTsObj.seek(i):n.configFormat.type==g.PLAYER_IN_TYPE_M3U8&&(n.hlsObj.onSamples=null,n.hlsObj.seek(i));var e=function(){let e=0;return e=n.configFormat.accurateSeek?i:n._getBoxBufSeekIDR(),parseInt(e)}(),t=parseInt(n._getBoxBufSeekIDR())||0;n._avFeedMP4Data(t,e)},{seekTime:r,mode:n.playMode,accurateSeek:n.configFormat.accurateSeek})})}return!0}fullScreen(){var e,t,i;this.autoScreenClose=!0,this.player.vCodecID===g.V_CODEC_NAME_HEVC?(t=(e=document.querySelector("#"+this.configFormat.playerId)).getElementsByTagName("canvas")[0],e.style.width=this.screenW+"px",e.style.height=this.screenH+"px",i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height),t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e)):this._requestFullScreen(this.player.videoTag)}closeFullScreen(e=!1){var t;!1===e&&(this.autoScreenClose=!1,this._exitFull()),this.player.vCodecID===g.V_CODEC_NAME_HEVC&&(t=(e=document.querySelector("#"+this.configFormat.playerId)).getElementsByTagName("canvas")[0],e.style.width=this.configFormat.playerW+"px",e.style.height=this.configFormat.playerH+"px",e=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height),t.style.marginTop=e[0]+"px",t.style.marginLeft=e[1]+"px",t.style.width=e[2]+"px",t.style.height=e[3]+"px")}playNextFrame(){return this.pause(),void 0!==this.playParam&&null!==this.playParam&&(0===this.playParam.videoCodec?this.player.playYUV():this.player.nativeNextFrame(),!0)}resize(e,t){var i,n,r;if(void 0===this.player||null===this.player)return!1;{if(!(e&&t&&this.playParam.size.width&&this.playParam.size.height))return!1;const u=this.playParam.size.width,h=this.playParam.size.height;var a,s,o=0===this.playParam.videoCodec,l=document.querySelector("#"+this.configFormat.playerId);return l.style.width=e+"px",l.style.height=t+"px",!0==o?(o=l.getElementsByTagName("canvas")[0],i=e,s=t,a=u/i>h/s,n=(i/u).toFixed(2),r=(s/h).toFixed(2),a=a?n:r,n=parseInt(u*a,10),r=parseInt(h*a,10),a=[parseInt((s-r)/2,10),parseInt((i-n)/2,10),n,r],o.style.marginTop=a[0]+"px",o.style.marginLeft=a[1]+"px",o.style.width=a[2]+"px",o.style.height=a[3]+"px"):((s=l.getElementsByTagName("video")[0]).style.width=e+"px",s.style.height=t+"px"),!0}}_checkScreenDisplaySize(e,t,i,n){var r=n/t<i/e,a=(e/i).toFixed(2),s=(t/n).toFixed(2),r=r?a:s,a=this.fixed?e:parseInt(i*r),s=this.fixed?t:parseInt(n*r);return[parseInt((t-s)/2),parseInt((e-a)/2),a,s]}_isFullScreen(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return null!=e}_requestFullScreen(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen()}_exitFull(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}_durationText(e){return e<0?"Play":(e=Math.round(e),Math.floor(e/3600)+":"+Math.floor(e%3600/60)+":"+Math.floor(e%60))}_getSeekTarget(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR()}_getBoxBufSeekIDR(){return this.configFormat.type==g.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==g.PLAYER_IN_TYPE_TS||this.configFormat.type==g.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==g.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0}_playControl(){this.isPlaying()?this.pause():this.play()}_avFeedMP4Data(r=0,a=0,s=null){if(void 0===this.player||null===this.player)return!1;let o=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval(()=>{let t=null,i=null,e=!0,n=!0;if(this.configFormat.type==g.PLAYER_IN_TYPE_MP4?(t=this.mp4Obj.popBuffer(1,r),i=this.mp4Obj.audioNone?null:this.mp4Obj.popBuffer(2,a)):this.configFormat.type==g.PLAYER_IN_TYPE_TS||this.configFormat.type==g.PLAYER_IN_TYPE_MPEGTS?(t=this.mpegTsObj.popBuffer(1,r),i=this.mpegTsObj.getAudioNone()?null:this.mpegTsObj.popBuffer(2,a)):this.configFormat.type==g.PLAYER_IN_TYPE_M3U8&&(t=this.hlsObj.popBuffer(1,r),i=this.hlsObj.audioNone?null:this.hlsObj.popBuffer(2,a),r<o-1&&r>=this.hlsObj.getLastIdx()&&(e=!1),a<o-1)&&a>=this.hlsObj.getALastIdx()&&(n=!1),!0===e&&null!==t&&void 0!==t)for(let e=0;e<t.length;e++)this.player.appendHevcFrame(t[e]);if(!0===n&&null!==i&&void 0!==i)for(let e=0;e<i.length;e++)this.player.appendAACFrame(i[e]);this.playMode!==g.PLAYER_MODE_NOTIME_LIVE&&this.configFormat.type!==g.PLAYER_IN_TYPE_M3U8&&this.onCacheProcess&&this.onCacheProcess(this.player.getCachePTS()),!0===e&&null!==t&&void 0!==t&&(this.configFormat.extInfo.readyShow&&(this.configFormat.type===g.PLAYER_IN_TYPE_M3U8?this.configFormat.extInfo.readyShow=!1:this.configFormat.extInfo.core!==g.PLAYER_CORE_TYPE_CNATIVE&&(this.player.cacheYuvBuf.getState(),CACHE_APPEND_STATUS_CODE.NULL,!0===this.player.playYUV(!0,!0))&&(this.configFormat.extInfo.readyShow=!1,this.onReadyShowDone)&&this.onReadyShowDone()),r++),!0===n&&null!==i&&void 0!==i&&a++,r>o&&(window.clearInterval(this.timerFeed),(this.timerFeed=null)!=s)&&s()},5)}_isSupportWASM(){window.document;var e=window.navigator,t=e.userAgent.toLowerCase(),i="ipad"==t.match(/ipad/i),n="iphone os"==t.match(/iphone os/i),r="iPad"==t.match(/iPad/i),a="iPhone os"==t.match(/iPhone os/i),s="midp"==t.match(/midp/i),o="rv:1.2.3.4"==t.match(/rv:1.2.3.4/i),l="ucweb"==t.match(/ucweb/i),u="android"==t.match(/android/i),h="Android"==t.match(/Android/i),d="windows ce"==t.match(/windows ce/i),t="windows mobile"==t.match(/windows mobile/i);if(i||n||r||a||s||o||l||u||h||d||t)return!1;i=(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}return!1})();if(!1===i)return!1;if(!0===i){n=f.BrowserJudge(),r=n[0],a=n[1];if("Chrome"===r&&a<85)return!1;if(0<=r.indexOf("360"))return!1;if(/Safari/.test(e.userAgent)&&!/Chrome/.test(e.userAgent)&&13<a)return!1}return!0}_makeMP4Player(e=!1){if(-1!=["mp3","ogg","flac","aac","wav","opus"].indexOf(this.configFormat.type))this._makeNativePlayer();else{if(!1===this._isSupportWASM()||!0===e){if(this.configFormat.type==g.PLAYER_IN_TYPE_MP4)this.mediaExtFormat===g.PLAYER_IN_TYPE_FLV?this.configFormat.useSoftDecoding?this._cDemuxDecoderEntry():this._flvJsPlayer(this.playParam.durationMs,this.playParam.audioNone):this.configFormat.danmaku&&null!=this.configFormat.danmaku.useMask?this._mp4EntryVodStream():this._makeNativePlayer();else if(this.configFormat.type==g.PLAYER_IN_TYPE_TS||this.configFormat.type==g.PLAYER_IN_TYPE_MPEGTS)this.configFormat.extInfo.duration?this._mpegTsNv3rdPlayer(1e3*this.configFormat.extInfo.duration,!1):this._mpegTsEntry();else if(this.configFormat.type==g.PLAYER_IN_TYPE_M3U8)this._m3u8Entry();else{if(this.configFormat.type===g.PLAYER_IN_TYPE_RAW_265)return-1;this.configFormat.type==g.PLAYER_IN_TYPE_RTC&&this._rtcPlayer()}return 1}this.mediaExtProtocol===g.URI_PROTOCOL_WEBSOCKET_DESC?this.configFormat.type===g.PLAYER_IN_TYPE_RAW_265?this._raw265Entry():this._cWsFLVDecoderEntry():null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===g.PLAYER_CORE_TYPE_CNATIVE?this.mediaExtFormat===g.PLAYER_IN_TYPE_MP4?this._mp4EntryVodStream():this._cDemuxDecoderEntry():this.configFormat.type==g.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==g.PLAYER_IN_TYPE_TS||this.configFormat.type==g.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==g.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===g.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry()}return 0}_makeMP4PlayerViewEvent(t,e,i,n,r=!1,a=null,s){let o=this;var l,u;this.playParam.durationMs=t,this.playParam.fps=e,this.playParam.sampleRate=i,this.playParam.size=n,this.playParam.audioNone=r,this.playParam.videoCodec=a||g.CODEC_H265,(this.configFormat.type==g.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==g.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==g.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=g.PLAYER_MODE_NOTIME_LIVE),o.configFormat.extInfo.autoCrop&&(l=document.querySelector("#"+this.configFormat.playerId),n=n.width/n.height,(u=this.configFormat.playerW/this.configFormat.playerH)<n?l.style.height=this.configFormat.playerW/n+"px":n<u&&(l.style.width=this.configFormat.playerH*n+"px")),this.player.setConfig({width:this.configFormat.playerW,height:this.configFormat.playerH,sampleRate:i,fps:e,appendHevcType:g.APPEND_TYPE_FRAME,fixed:!1,playerId:this.configFormat.playerId,audioNone:r,token:this.configFormat.token,videoCodec:a,repeat:this.configFormat.extInfo&&this.configFormat.extInfo.repeat}),this.player.onPlayingTime=e=>{o._durationText(e),o._durationText(t/1e3);null!=o.onPlayTime&&o.onPlayTime(e)},this.player.onPlayingFinish=e=>{this.pause(),this.seek(0,()=>{e&&e()}),null!=this.onPlayFinish&&this.onPlayFinish()},this.player.onSeekStart=()=>{null!=o.onSeekStart&&o.onSeekStart()},this.player.onSeekFinish=()=>{null!=o.onSeekFinish&&o.onSeekFinish()},this.player.onRender=(e,t,i,n,r)=>{window.performance.now(),o._g_init;null!=o.onRender&&o.onRender(e,t,i,n,r)},this.player.onLoadCache=()=>{null!=this.onLoadCache&&this.onLoadCache()},this.player.onLoadCacheFinshed=()=>{null!=this.onLoadCacheFinshed&&this.onLoadCacheFinshed()},o.player.setDurationMs(t),o.player.setFrameRate(e),null!=o.onLoadFinish&&(o.onLoadFinish(),o.configFormat.type!=g.PLAYER_IN_TYPE_M3U8&&o.configFormat.type!=g.PLAYER_IN_TYPE_MP4||o.onReadyShowDone&&o.onReadyShowDone()),this.player.onInitDecodeComplete=()=>{s&&s()}}_makeNativePlayer(i=0,e=0,t=0,n,r=0,a){let s=this,o=(this.playParam.durationMs=i,this.playParam.fps=e,this.playParam.sampleRate=t,this.playParam.size=n,this.playParam.audioNone=this.configFormat.extInfo.ignoreAudio||r,this.playParam.videoCodec=a||g.CODEC_H264,this.configFormat.type==g.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==g.PLAYER_IN_TYPE_M3U8_LIVE&&(this.playMode=g.PLAYER_MODE_NOTIME_LIVE),this.player=new u.Mp4Player({width:this.configFormat.playerW,height:this.configFormat.playerH,sampleRate:t,fps:e,appendHevcType:g.APPEND_TYPE_FRAME,fixed:!1,playerId:this.configFormat.playerId,audioNone:this.playParam.audioNone,token:this.configFormat.token,videoCodec:a,autoPlay:this.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat}),0),l=window.setInterval(function(){o++,void 0!==s.player&&null!==s.player||(window.clearInterval(l),l=null),o>g.DEFAULT_PLAYERE_LOAD_TIMEOUT&&(s.player.release(),s.onPlayState&&s.onPlayState(!0),s.onError({msg:"reconnect is timeout",event:"timeout",url:s.videoURL,type:"networkError"}),s.player=null,window.clearInterval(l),l=null)},1e3);return this.player.onSeekStart=()=>{null!=s.onSeekStart&&s.onSeekStart()},this.player.onPlayingTime=t=>{var e;s._durationText(t),s._durationText(i/1e3);this.player.sei_maps&&null!=s.onSeiInfo&&(e=this.player.sei_maps.findIndex(e=>e.pts>t),s.onSeiInfo(this.player.sei_maps[e])),null!=s.onPlayTime&&s.onPlayTime(t)},this.player.onSeiTimer=t=>{var e;this.player.sei_maps&&null!=s.onSeiInfo&&(e=this.player.sei_maps.findIndex(e=>e.pts>t),s.onSeiInfo(this.player.sei_maps[e]))},this.player.onSeiInfo=e=>{null!=s.onSeiInfo&&s.onSeiInfo(e)},this.player.onPlayingFinish=()=>{null!=s.onPlayFinish&&s.onPlayFinish()},this.player.onMakeItReady=()=>{null!=s.onMakeItReady&&s.onMakeItReady()},this.player.onLoadFinish=()=>{window.clearInterval(l),l=null,s.playParam.durationMs=1e3*s.player.duration,s.playParam.size=s.player.getSize(),s.onLoadFinish&&s.onLoadFinish(),s.onReadyShowDone&&s.onReadyShowDone(),s.configFormat.useSoftDecoding=!1},this.player.onPlayState=e=>{s.onPlayState&&s.onPlayState(e)},this.player.onCacheProcess=e=>{s.onCacheProcess&&s.onCacheProcess(e)},this.player.onSeekFinish=e=>{s.onSeekFinish&&s.onSeekFinish(e)},this.player.onError=e=>{var t=e.msg&&4===e.msg.code;window.clearInterval(l),t?(this.player.release(),this.configFormat.useSoftDecoding=!0,this._mp4EntryVodStream()):s.onError(e)},this.player.makeIt(this.videoURL),this.player}_initMp4BoxObject(){this.timerFeed=null,this.mp4Obj=new d,this.mp4Obj.onMp4BoxReady=e=>{let t=this.mp4Obj.getFPS(),i=b(t,this.mp4Obj.getDurationMs()),n,r=this.mp4Obj.getSampleRate(),a=this.mp4Obj.getSize(),s=this.mp4Obj.getVideoCoder();e===g.CODEC_H265&&v.isFF()?(this.initDecoder(),setTimeout(()=>{this._makeMP4PlayerViewEvent(i,t,r,a,this.mp4Obj.audioNone,s);parseInt(i/1e3);this._avFeedMP4Data(0,0)},1e3)):n=this._makeNativePlayer(i,t,r,a,this.mp4Obj.audioNone,s),this.mp4Obj.on("parse_sei",function(e){n&&n.sei_maps.push(e)})}}_mp4Entry(){let t=this;fetch(this.videoURL).then(e=>e.arrayBuffer()).then(e=>{t._initMp4BoxObject(),this.mp4Obj.demux(),this.mp4Obj.appendBufferData(e,0),this.mp4Obj.finishBuffer(),this.mp4Obj.seek(-1)})}_mp4EntryVodStream(){this.timerFeed=null,this.mp4Obj=new d,this._initMp4BoxObject(),this.mp4Obj.demux();this._downLoadeWorker()}_downLoadeWorker(){this.downLoadWorker=new i.a,this.downLoadWorker.postMessage({type:0,videoURL:this.videoURL}),this.downLoadWorker.onmessage=e=>{var t=e.data["type"];switch(t){case 0:this.mp4Obj.appendBufferData(e.data.buffer,e.data.fileStart);break;case 1:this.mp4Obj.finishBuffer(),this.mp4Obj.seek(-1)}}}_downLoader(e){let n=this,r=0;n.controller&&n.controller.abort(),n.controller=new AbortController;var t=n.controller.signal;fetch(this.videoURL,e?{headers:{Range:`bytes=${e}-`},signal:t}:{signal:t}).then(function(e){function i(t){return t.read().then(function(e){if(!e.done)return e=e.value,n.mp4Obj.appendBufferData(e.buffer,r),r+=e.byteLength,i(t);n.mp4Obj.finishBuffer(),n.mp4Obj.seek(-1),window.clearInterval(networkInterval)})}return i(e.body.getReader())}).catch(function(e){})}_cDemuxDecoderEntry(n=0,e=!1){let a=this,r=!1,s=new AbortController,o=s.signal,l={width:this.configFormat.playerW,height:this.configFormat.playerH,playerId:this.configFormat.playerId,token:this.configFormat.token,readyShow:this.configFormat.extInfo.readyShow,checkProbe:this.configFormat.extInfo.checkProbe,ignoreAudio:this.configFormat.extInfo.ignoreAudio,playMode:this.playMode,autoPlay:this.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat,defaultFps:this.configFormat.extInfo.rawFps,cacheLength:this.conf
10igFormat.extInfo.cacheLength},u=(this.player=new c.default.CNativeCore(l),window.g_players[this.player.corePtr]=this.player,this.player.onReadyShowDone=()=>{a.configFormat.extInfo.readyShow=!1,a.onReadyShowDone&&a.onReadyShowDone(),this.configFormat.useSoftDecoding=!0},this.player.onRelease=()=>{s&&s.abort()},this.player.onProbeFinish=()=>{r=!0,a.playParam.fps=a.player.config.fps,a.playParam.durationMs=b(a.playParam.fps,1e3*a.player.duration),a.player.duration<0&&(a.playMode=g.PLAYER_MODE_NOTIME_LIVE,a.playParam.durationMs=-1),a.playParam.sampleRate=a.player.config.sampleRate,a.playParam.size={width:a.player.width,height:a.player.height},a.playParam.audioNone=a.player.audioNone,a.player.vCodecID===g.V_CODEC_NAME_HEVC?(a.playParam.videoCodec=g.CODEC_H265,a.playParam.audioIdx<0&&(a.playParam.audioNone=!0),this.configFormat.useSoftDecoding||!0!==f.IsSupport265Mse()||!1!==e||a.mediaExtFormat!==g.PLAYER_IN_TYPE_MP4&&a.mediaExtFormat!==g.PLAYER_IN_TYPE_FLV?a.onLoadFinish&&a.onLoadFinish():(s.abort(),a.player.release(),a.player=null,a.mediaExtFormat===g.PLAYER_IN_TYPE_MP4?a._makeNativePlayer(a.playParam.durationMs,a.playParam.fps,a.playParam.sampleRate,a.playParam.size,!1,a.playParam.videoCodec):a.mediaExtFormat===g.PLAYER_IN_TYPE_FLV&&a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone))):(a.playParam.videoCodec=g.CODEC_H264,s.abort(),a.player.release(),a.player=null,a.mediaExtFormat===g.PLAYER_IN_TYPE_MP4?a._makeNativePlayer(a.playParam.durationMs,a.playParam.fps,a.playParam.sampleRate,a.playParam.size,!1,a.playParam.videoCodec):a.mediaExtFormat===g.PLAYER_IN_TYPE_FLV?a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone):a.onLoadFinish&&a.onLoadFinish())},this.player.onPlayingTime=e=>{a._durationText(e),a._durationText(a.player.duration);null!=a.onPlayTime&&a.onPlayTime(e)},this.player.onPlayingFinish=()=>{a.pause(),null!=a.onPlayTime&&a.onPlayTime(0),a.onPlayFinish&&a.onPlayFinish(),a.player.reFull=!0,a.seek(0)},this.player.onCacheProcess=e=>{this.onCacheProcess&&this.onCacheProcess(e)},this.player.onLoadCache=()=>{null!=this.onLoadCache&&this.onLoadCache()},this.player.onLoadCacheFinshed=()=>{null!=this.onLoadCacheFinshed&&this.onLoadCacheFinshed()},this.player.onRender=(e,t,i,n,r)=>{a.snapshotYuvLastFrame.luma=null,a.snapshotYuvLastFrame.chromaB=null,a.snapshotYuvLastFrame.chromaR=null,a.snapshotYuvLastFrame.width=e,a.snapshotYuvLastFrame.height=t,a.snapshotYuvLastFrame.luma=new Uint8Array(i),a.snapshotYuvLastFrame.chromaB=new Uint8Array(n),a.snapshotYuvLastFrame.chromaR=new Uint8Array(r),null!=a.onRender&&a.onRender(e,t,i,n,r)},this.player.onSeekFinish=()=>{null!=this.onSeekFinish&&this.onSeekFinish()},!(this.player.onPerformance=e=>{a.onPerformance&&a.onPerformance(e)})),h=!1,d=0;this.player.onWasmFinished=()=>{function i(t){setTimeout(function(){var e;!1===u&&(s.abort(),s=null,o=null,t>=g.FETCH_FIRST_MAX_TIMES?(a.player.release(),a.onPlayState&&a.onPlayState(!0),a.onError&&a.onError({msg:"fetch is timeout",event:"timeout",url:a.videoURL,type:"networkError"})):(s=new AbortController,o=s.signal,e=t+1,i(e)))},g.FETCH_HTTP_FLV_TIMEOUT_MS),fetch(a.videoURL,{signal:o}).then(function(e){if(!e.ok)return!1;if(u=!0,e.headers.has("Content-Length"))d=e.headers.get("Content-Length"),a.configFormat.extInfo.coreProbePart<=0?a.player&&a.player.setProbeSize(a.configFormat.extInfo.probeSize):a.player&&a.player.setProbeSize(d*a.configFormat.extInfo.coreProbePart);else{if(a.mediaExtFormat===g.PLAYER_IN_TYPE_FLV)return s.abort(),a.player.release(),a.player=null,a._cLiveFLVDecoderEntry(l),!0;a.player&&a.player.setProbeSize(40960)}let i=function(t){return t.read().then(function(e){e.done&&setTimeout(()=>{return!0!==r?(a.player.release(),a.player=null,n<g.PLAYER_CNATIVE_VOD_RETRY_MAX?(n+=1,a._cDemuxDecoderEntry(n),!0):(a._mp4EntryVodStream(),!1)):h=!0},100);e.value.buffer;if(a.player&&a.player.pushBuffer(e.value.buffer)<0)return a.player.release(),a.player=null,n<g.PLAYER_CNATIVE_VOD_RETRY_MAX?(n+=1,a._cDemuxDecoderEntry(n),!0):(a._mp4EntryVodStream(),!1);return i(t)})};return i(e.body.getReader())}).catch(function(e){e.toString().includes("user aborted")})}i(0)}}_cLiveG711DecoderEntry(e){let a=this;e.probeSize=this.configFormat.extInfo.probeSize,this.player=new s.CHttpG711Core(e),window.g_players[this.player.corePtr]=this.player,this.player.onProbeFinish=()=>{a.playParam.fps=a.player.mediaInfo.fps,a.playParam.durationMs=-1,a.playMode=g.PLAYER_MODE_NOTIME_LIVE,a.playParam.sampleRate=a.player.mediaInfo.sampleRate,a.playParam.size={width:a.player.mediaInfo.width,height:a.player.mediaInfo.height},a.playParam.audioNone=a.player.mediaInfo.audioNone,a.player.vCodecID===g.V_CODEC_NAME_HEVC?(a.playParam.audioIdx<0&&(a.playParam.audioNone=!0),a.playParam.videoCodec=g.CODEC_H265,a.onLoadFinish&&a.onLoadFinish()):(a.playParam.videoCodec=g.CODEC_H264,a.player.release(),a.player=null,a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone))},this.player.onError=e=>{a.onError&&a.onError(e)},this.player.onReadyShowDone=()=>{a.configFormat.extInfo.readyShow=!1,a.onReadyShowDone&&a.onReadyShowDone()},this.player.onLoadCache=()=>{null!=this.onLoadCache&&this.onLoadCache()},this.player.onLoadCacheFinshed=()=>{null!=this.onLoadCacheFinshed&&this.onLoadCacheFinshed()},this.player.onRender=(e,t,i,n,r)=>{a.snapshotYuvLastFrame.luma=null,a.snapshotYuvLastFrame.chromaB=null,a.snapshotYuvLastFrame.chromaR=null,a.snapshotYuvLastFrame.width=e,a.snapshotYuvLastFrame.height=t,a.snapshotYuvLastFrame.luma=new Uint8Array(i),a.snapshotYuvLastFrame.chromaB=new Uint8Array(n),a.snapshotYuvLastFrame.chromaR=new Uint8Array(r),null!=a.onRender&&a.onRender(e,t,i,n,r)},this.player.onPlayState=e=>{a.onPlayState&&a.onPlayState(e)},this.player.start(this.videoURL)}_cLiveFLVDecoderEntry(t){let a=this;t.probeSize=this.configFormat.extInfo.probeSize,this.player=new r.default.CHttpLiveCore(t),window.g_players[this.player.corePtr]=this.player,this.player.onProbeFinish=(e=0)=>{if(1===e)a.player.release(),a.player=null,a._cLiveG711DecoderEntry(t);else if(a.playParam.fps=a.player.mediaInfo.fps,a.playParam.durationMs=-1,a.playMode=g.PLAYER_MODE_NOTIME_LIVE,a.playParam.sampleRate=a.player.mediaInfo.sampleRate,a.playParam.size={width:a.player.mediaInfo.width,height:a.player.mediaInfo.height},a.playParam.audioNone=a.player.mediaInfo.audioNone,a.player.vCodecID===g.V_CODEC_NAME_HEVC)a.playParam.videoCodec=g.CODEC_H265,a.playParam.audioIdx<0&&(a.playParam.audioNone=!0),this.configFormat.useSoftDecoding||!0!==f.IsSupport265Mse()||a.mediaExtFormat!==g.PLAYER_IN_TYPE_FLV?a.onLoadFinish&&a.onLoadFinish():(a.player.release(),a.player=null,a.mediaExtFormat===g.PLAYER_IN_TYPE_FLV&&a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone));else{a.playParam.videoCodec=g.CODEC_H264;a.player.release();if(a.player=null,a.mediaExtFormat===g.PLAYER_IN_TYPE_FLV)a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone);else{if(a.mediaExtFormat!==g.PLAYER_IN_TYPE_TS&&a.mediaExtFormat!==g.PLAYER_IN_TYPE_MPEGTS)return-1;a._mpegTsNv3rdPlayer(a.playParam.durationMs,a.playParam.audioNone)}}},this.player.onError=e=>{a.onError&&a.onError(e)},this.player.onReadyShowDone=()=>{a.configFormat.extInfo.readyShow=!1,a.onReadyShowDone&&a.onReadyShowDone(),this.configFormat.useSoftDecoding=!0},this.player.onLoadCache=()=>{null!=this.onLoadCache&&this.onLoadCache()},this.player.onLoadCacheFinshed=()=>{null!=this.onLoadCacheFinshed&&this.onLoadCacheFinshed()},this.player.onRender=(e,t,i,n,r)=>{a.snapshotYuvLastFrame.luma=null,a.snapshotYuvLastFrame.chromaB=null,a.snapshotYuvLastFrame.chromaR=null,a.snapshotYuvLastFrame.width=e,a.snapshotYuvLastFrame.height=t,a.snapshotYuvLastFrame.luma=new Uint8Array(i),a.snapshotYuvLastFrame.chromaB=new Uint8Array(n),a.snapshotYuvLastFrame.chromaR=new Uint8Array(r),null!=a.onRender&&a.onRender(e,t,i,n,r)},this.player.onPlayState=e=>{a.onPlayState&&a.onPlayState(e)},this.player.start(this.videoURL),this.player.onPerformance=e=>{a.onPerformance&&a.onPerformance(e)}}_cWsFLVDecoderEntry(){let a=this;
10var e={width:this.configFormat.playerW,height:this.configFormat.playerH,playerId:this.configFormat.playerId,token:this.configFormat.token,readyShow:this.configFormat.extInfo.readyShow,checkProbe:this.configFormat.extInfo.checkProbe,ignoreAudio:this.configFormat.extInfo.ignoreAudio,playMode:this.playMode,autoPlay:this.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat};e.probeSize=this.configFormat.extInfo.probeSize,this.player=new o.CWsLiveCore(e),window.g_players[this.player.corePtr]=this.player,this.player.onProbeFinish=()=>{a.playParam.fps=a.player.mediaInfo.fps,a.playParam.durationMs=-1,a.playMode=g.PLAYER_MODE_NOTIME_LIVE,a.playParam.sampleRate=a.player.mediaInfo.sampleRate,a.playParam.size={width:a.player.mediaInfo.width,height:a.player.mediaInfo.height},a.playParam.audioNone=a.player.mediaInfo.audioNone,a.player.vCodecID===g.V_CODEC_NAME_HEVC?(a.playParam.audioIdx<0&&(a.playParam.audioNone=!0),a.playParam.videoCodec=g.CODEC_H265,!0===f.IsSupport265Mse()&&a.mediaExtFormat===g.PLAYER_IN_TYPE_FLV?(a.player.release(),a.player=null,a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone)):a.onLoadFinish&&a.onLoadFinish()):(a.playParam.videoCodec=g.CODEC_H264,a.player.release(),a.player=null,a._flvJsPlayer(a.playParam.durationMs,a.playParam.audioNone))},this.player.onError=e=>{a.onError&&a.onError(e)},this.player.onReadyShowDone=()=>{a.configFormat.extInfo.readyShow=!1,a.onReadyShowDone&&a.onReadyShowDone()},this.player.onLoadCache=()=>{null!=this.onLoadCache&&this.onLoadCache()},this.player.onLoadCacheFinshed=()=>{null!=this.onLoadCacheFinshed&&this.onLoadCacheFinshed()},this.player.onRender=(e,t,i,n,r)=>{a.snapshotYuvLastFrame.luma=null,a.snapshotYuvLastFrame.chromaB=null,a.snapshotYuvLastFrame.chromaR=null,a.snapshotYuvLastFrame.width=e,a.snapshotYuvLastFrame.height=t,a.snapshotYuvLastFrame.luma=new Uint8Array(i),a.snapshotYuvLastFrame.chromaB=new Uint8Array(n),a.snapshotYuvLastFrame.chromaR=new Uint8Array(r),null!=a.onRender&&a.onRender(e,t,i,n,r)},this.player.start(this.videoURL)}_mpegTsEntry(){let a=this,t=new AbortController,i=t.signal;this.timerFeed=null,this.mpegTsObj=new p.MpegTs,this.mpegTsObj.bindReady(a),this.mpegTsObj.onDemuxed=this._mpegTsEntryReady.bind(this),this.mpegTsObj.onReady=()=>{let r=null;fetch(a.videoURL,{signal:i}).then(function(e){if(e.headers.has("Content-Length")){a.onMakeItReady&&a.onMakeItReady();let n=function(i){return i.read().then(function(e){var t;if(!e.done)return e=e.value,null===r?r=e:(e=e,t=r.length+e.length,(t=new Uint8Array(t)).set(r),t.set(e,r.length),r=new
10Uint8Array(t),t=e=null),n(i);a.mpegTsObj.demux(r)})};return n(e.body.getReader())}t.abort(),i=null,t=null,e={width:a.configFormat.playerW,height:a.configFormat.playerH,playerId:a.configFormat.playerId,token:a.configFormat.token,readyShow:a.configFormat.extInfo.readyShow,checkProbe:a.configFormat.extInfo.checkProbe,ignoreAudio:a.configFormat.extInfo.ignoreAudio,playMode:a.playMode,autoPlay:a.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat},alert("is LIVE ts"),a._cLiveFLVDecoderEntry(e)}).catch(function(e){e.toString().includes("user aborted")})},this.mpegTsObj.initMPEG()}_mpegTsEntryReady(e){let t=e;t.mpegTsObj.getVCodec();let i=t.mpegTsObj.getACodec(),n=t.mpegTsObj.getDurationMs(),r=t.mpegTsObj.getFPS(),a=t.mpegTsObj.getSampleRate(),s=t.mpegTsObj.getSize();e=this.mpegTsObj.isHEVC();!v.isFF()||v.isFF()&&!e?(this.mpegTsObj.releaseTsDemuxer(),this.mpegTsObj=null,this.playParam.durationMs=n,this.playParam.fps=r,this.playParam.sampleRate=a,this.playParam.size=s,this.playParam.audioNone=""===i,this.playParam.videoCodec=e?0:1,this._mpegTsNv3rdPlayer(this.playParam.durationMs,this.playParam.audioNone)):(t.initDecoder(),setTimeout(()=>{t._makeMP4PlayerViewEvent(n,r,a,s,""===i,""),t._avFeedMP4Data(0,0)},1e3))}_m3u8Entry(e=!1){let s=this;if(!this.configFormat.useSoftDecoding||e)return this._HjsJsPlayer();let i=!1,o=0,n;this._g_init=window.performance.now(),this.hlsObj=new m.M3u8,this.hlsObj.bindReady(s),this.initDecoder(),this.isHjsJsPlayer=!1,this.hlsObj.onFinished=(e,t)=>{!1===i&&(window.performance.now(),s._g_init,o=s.hlsObj.getDurationMs(),n=o/1e3,s.hlsConf.hlsType=t.type,i=!0)},this.hlsObj.onCacheProcess=e=>{this.playMode!==g.PLAYER_MODE_NOTIME_LIVE&&this.onCacheProcess&&this.onCacheProcess(e)},this.hlsObj.onDemuxed=e=>{if(!this.player||!this.player.config.token){s.hlsObj.isHevcParam;var t=s.hlsObj.getVCodec();if(v.isFF()&&"h264"==t)this.hlsObj.release(),this._m3u8Entry(!0),this.configFormat.useSoftDecoding=!1;else{var t=s.hlsObj.getACodec(),i=s.hlsObj.getFPS(),n=s.hlsObj.getSampleRate(),r=s.hlsObj.getSize(),a=s.hlsObj.getSampleChannel();let e=!1;e=a<=0||""===t;window.performance.now(),s._g_init;s._makeMP4PlayerViewEvent(o,i,n,r,e);window.performance.now();s._g_init}}},this.hlsObj.onSamples=this._hlsOnSamples.bind(this),this.hlsObj.onError=()=>{v.isFF()&&!this.isHjsJsPlayer&&(this.isHjsJsPlayer=!0,this.hlsObj.release(),this._m3u8Entry(!0),this.configFormat.useSoftDecoding=!1)},this.hlsObj.demux(this.videoURL);window.performance.now(),this._g_init}_hlsOnSamples(e,t){window.performance.now(),this._g_init;!0===t.video?this.player&&this.player.appendHevcFrame&&this.player.appendHevcFrame(t):!1===this.hlsObj.audioNone&&this.player&&this.player.appendAACFrame&&this.player.appendAACFrame(t)}_HjsJsPlayer(e=-1){let n=this;e={probeDurationMS:e,width:this.configFormat.playerW,height:this.configFormat.playerH,playerId:this.configFormat.playerId,ignoreAudio:this.configFormat.extInfo.ignoreAudio,autoPlay:this.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat,playMode:this.playMode,danmaku:this.configFormat.danmaku,authToken:this.configFormat.authToken,openToken:this.configFormat.openToken,maxBufferLength:this.configFormat.maxBufferLength};this.player=new a.NvHLSjsCore(e),this.player.onMakeItReady=()=>{n.onMakeItReady&&n.onMakeItReady()},this.player.onLoadFinish=()=>{n.playParam.size=n.player.getSize(),n.playParam.videoCodec=1,n.player.duration===1/0||n.player.duration<0?(n.playParam.durationMs=-1,n.playMode=g.PLAYER_MODE_NOTIME_LIVE):(n.playParam.durationMs=1e3*n.player.duration,n.playMode=g.PLAYER_MODE_VOD),n.onLoadFinish&&n.onLoadFinish()},this.player.onReadyShowDone=()=>{n.onReadyShowDone&&n.onReadyShowDone()},this.player.onPlayingFinish=()=>{n.pause(),n.seek(0),null!=n.onPlayFinish&&n.onPlayFinish()},this.player.onPlayingTime=e=>{n._durationText(e),n._durationText(n.player.duration);null!=n.onPlayTime&&n.onPlayTime(e)},this.player.onSeekFinish=e=>{n.onSeekFinish&&n.onSeekFinish(e)},this.player.onPlayState=e=>{n.onPlayState&&n.onPlayState(e)},this.player.onCacheProcess=e=>{n.onCacheProcess&&n.onCacheProcess(e)},this.player.onQualityLevels=e=>{n.onQualityLevels&&n.onQualityLevels(e)},this.player.onLevelUpdates=e=>{n.onLevelUpdates&&n.onLevelUpdates(e)},this.player.onError=e=>{var t=e.msg&&"bufferAddCodecError"===e.msg.details&&"video/mp4;codecs=hvc1.1.1.L120.B0"===e.msg.mimeType,i=e.isAppleMpegurl;t?(this.player.release(),this.configFormat.useSoftDecoding=!0,this._m3u8Entry(!1)):i?this._makeNativePlayer():n.onError&&n.onError(e)},this.player.makeIt(this.videoURL)}_flvJsPlayer(e=-1,t=!1){let i=this;e={width:this.configFormat.playerW,height:this.configFormat.playerH,playerId:this.configFormat.playerId,ignoreAudio:this.configFormat.extInfo.ignoreAudio,duration:e,autoPlay:this.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat,audioNone:t};this.player=new l.NvFlvjsCore(e),this.player.onLoadFinish=()=>{i.playParam.size=i.player.getSize(),!i.player.duration||NaN===i.player.duration||i.player.duration===1/0||i.player.duration<0?(i.playParam.durationMs=-1,i.playMode=g.PLAYER_MODE_NOTIME_LIVE):(i.playParam.durationMs=1e3*i.player.duration,i.playMode=g.PLAYER_MODE_VOD),i.onLoadFinish&&i.onLoadFinish()},this.player.onReadyShowDone=()=>{i.onReadyShowDone&&i.onReadyShowDone()},this.player.onPlayingTime=(e,t)=>
10{i._durationText(e),i._durationText(i.player.duration);null!=i.onPlayTime&&i.onPlayTime(e,t)},this.player.onPlayingFinish=()=>{i.pause(),i.seek(0),null!=i.onPlayFinish&&i.onPlayFinish()},this.player.onPlayState=e=>{i.onPlayState&&i.onPlayState(e)},this.player.onCacheProcess=e=>{i.onCacheProcess&&i.onCacheProcess(e)},this.player.onError=e=>{e.msg&&9===e.msg.code?(i.player.release(),i._cDemuxDecoderEntry()):(i.onPlayState&&i.onPlayState(!0),i.onError&&i.onError(e))},this.player.onSeekFinish=e=>{i.onSeekFinish&&i.onSeekFinish(e)},this.player.makeIt(this.videoURL)}_mpegTsNv3rdPlayer(e=-1,t=!1){let i=this;e={width:this.configFormat.playerW,height:this.configFormat.playerH,playerId:this.configFormat.playerId,ignoreAudio:this.configFormat.extInfo.ignoreAudio,duration:e,autoPlay:this.configFormat.extInfo.autoPlay,repeat:this.configFormat.extInfo.repeat,audioNone:t};this.player=new h.NvMpegTsCore(e),this.player.onLoadFinish=e=>{i.configFormat.useSoftDecoding=!1,i.playParam.size=i.player.getSize(),!i.player.duration||NaN===i.player.duration||i.player.duration===1/0||i.player.duration<0?(i.playParam.durationMs=-1,i.playMode=g.PLAYER_MODE_NOTIME_LIVE):(i.playParam.durationMs=1e3*i.player.duration,i.playMode=g.PLAYER_MODE_VOD),i.onLoadFinish&&i.onLoadFinish(e)},this.player.onReadyShowDone=()=>{i.onReadyShowDone&&i.onReadyShowDone()},this.player.onMakeItReady=()=>{null!=i.onMakeItReady&&i.onMakeItReady()},this.player.onPlayingTime=e=>{i._durationText(e),i._durationText(i.player.duration);null!=i.onPlayTime&&i.onPlayTime(e)},this.player.onPlayingFinish=()=>{i.pause(),i.seek(0),null!=i.onPlayFinish&&i.onPlayFinish()},this.player.onPlayState=e=>{i.onPlayState&&i.onPlayState(e)},this.player.onCacheProcess=e=>{i.onCacheProcess&&i.onCacheProcess(e)},this.player.onSeekFinish=e=>{i.onSeekFinish&&i.onSeekFinish(e)},this.player.makeIt(this.videoURL)}_raw265Entry(){let a=this;let r=function(){setTimeout(()=>{a.workerParse.postMessage({cmd:"get-nalu",data:null,msg:"get-nalu"}),!0===a.workerFetch.onMsgFetchFinished&&!0===a.workerParse.frameListEmpty&&!1===a.workerParse.streamEmpty&&a.workerParse.postMessage({cmd:"last-nalu",data:null,msg:"last-nalu"}),!0===a.workerParse.parseEmpty&&(a.workerParse.stopNaluInterval=!0),!0!==a.workerParse.stopNaluInterval&&r()},1e3)},e=function(){setTimeout(()=>{a.configFormat.extInfo.readyShow&&(a.player.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.NULL?(a.player.playFrameYUV(!0,!0),a.configFormat.extInfo.readyShow=!1,a.onReadyShowDone&&a.onReadyShowDone()):e())},1e3)};this._makeMP4PlayerViewEvent(-1,this.configFormat.extInfo.rawFps,-1,{width:this.configFormat.playerW,height:this.configFormat.playerH},!0,g.CODEC_H265),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null),a.workerFetch=new Worker(f.GetScriptPath(function(){let r=new AbortController,a=r.signal,s=null;onmessage=e=>{var t=e.data;let i=null;switch(i=void 0===t.cmd||null===t.cmd?"":t.cmd){case"start":var n=t.url;"http"===t.type?fetch(n,{signal:a}).then(function(e){let i=function(t){return t.read().then(function(e){if(!e.done)return e=e.value,postMessage({cmd:"fetch-chunk",data:e,msg:"fetch-chunk"}),i(t);postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"})})};return i(e.body.getReader())}).catch(function(e){}):"websocket"===t.type&&(n=n,(s=new WebSocket(n)).binaryType="arraybuffer",s.onopen=function(e){s.send("Hello WebSockets!")},s.onmessage=function(e){e.data instanceof ArrayBuffer&&0<(e=e.data).byteLength&&postMessage({cmd:"fetch-chunk",data:new Uint8Array(e),msg:"fetch-chunk"})},s.onclose=function(e){postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"})}),postMessage({cmd:"default",data:"WORKER STARTED",msg:"default"});break;case"stop":"http"===t.type?r.abort():"websocket"===t.type&&s&&s.close(),close()}}})),a.workerFetch.onMsgFetchFinished=!1,a.workerFetch.onmessage=function(e){var t=e.data;let i=null;switch(i=void 0===t.cmd||null===t.cmd?"":t.cmd){case"fetch-chunk":var n=t.data;a.workerParse.postMessage({cmd:"append-chunk",data:n,msg:"append-chunk"});break;case"fetch-fin":a.workerFetch.onMsgFetchFinished=!0,r()}},a.workerParse=new Worker(f.GetScriptPath(function(){const o=3;let r=function(){let s=new Object;return s.frameList=[],s.stream=null,s.frameListEmpty=function(){return s.frameList.length<=0},s.streamEmpty=function(){return null===s.stream||s.stream.length<=0},s.checkEmpty=function(){return!0===s.streamEmpty()&&!0===s.frameListEmpty()},s.pushFrameRet=function(e){return!(!e||null==e||(s.frameList&&null!=s.frameList&&null!=s.frameList||(s.frameList=[]),s.frameList.push(e),0))},s.nextFrame=function(){return!s.frameList&&null==s.frameList||null==s.frameList&&s.frameList.length<1?null:s.frameList.shift()},s.clearFrameRet=function(){s.frameList=null},s.setStreamRet=function(e){s.stream=e},s.getStreamRet=function(){return s.stream},s.appendStreamRet=function(e){if(!e||void 0===e||null==e)return!1;if(s.stream&&void 0!==s.stream&&null!=s.stream){var t=s.stream.length,i=e.length,i=new Uint8Array(t
10+i);i.set(s.stream,0),i.set(e,t),s.stream=i;for(let e=0;e<9999;e++){var n=s.nextNalu();if(!1===n||null==n)break;s.frameList.push(n)}}else s.stream=e;return!0},s.subBuf=function(e,t){e=new Uint8Array(s.stream.subarray(e,t+1));return s.stream=new Uint8Array(s.stream.subarray(t+1)),e},s.lastNalu=function(){var e=s.subBuf(0,s.stream.length);s.frameList.push(e)},s.nextNalu=function(i=1){if(!(null==s.stream||s.stream.length<=4)){let t=-1;for(let e=0;e<s.stream.length;e++){if(e+5>=s.stream.length)return!1;if(0==s.stream[e]&&0==s.stream[e+1]&&1==s.stream[e+2]||0==s.stream[e]&&0==s.stream[e+1]&&0==s.stream[e+2]&&1==s.stream[e+3]){var n=e;if(e+=o,-1==t)t=n;else{if(i<=1)return s.subBuf(t,n-1);--i}}}}return!1},s.nextNalu2=function(n=1){if(!(null==s.stream||s.stream.length<=4)){let t=-1,i=null;for(let e=0;e<s.stream.length;e++){if(e+5>=s.stream.length)return-1!=t&&(i=s.subBuf(t,s.stream.length-1));var r="0 0 1"==s.stream.slice(e,e+3).join(" "),a="0 0 0 1"==s.stream.slice(e,e+4).join(" ");if(r||a){r=e;if(e+=o,-1==t)t=r;else{if(n<=1)return i=s.subBuf(t,r-1);--n}}}}return!1},s}();onmessage=e=>{var t=e.data;let i=null;switch(i=void 0===t.cmd||null===t.cmd?"":t.cmd){case"append-chunk":var n=t.data,n=(r.appendStreamRet(n),r.nextFrame());postMessage({cmd:"return-nalu",data:n,msg:"return-nalu",parseEmpty:r.checkEmpty(),streamEmpty:r.streamEmpty(),frameListEmpty:r.frameListEmpty()});break;case"get-nalu":n=r.nextFrame();postMessage({cmd:"return-nalu",data:n,msg:"return-nalu",parseEmpty:r.checkEmpty(),streamEmpty:r.streamEmpty(),frameListEmpty:r.frameListEmpty()});break;case"last-nalu":n=r.lastNalu();postMessage({cmd:"return-nalu",data:n,msg:"return-nalu",parseEmpty:r.checkEmpty(),streamEmpty:r.streamEmpty(),frameListEmpty:r.frameListEmpty()});break;case"stop":postMessage("parse - WORKER STOPPED: "+t),close()}}})),a.workerParse.stopNaluInterval=!1,a.workerParse.parseEmpty=!1,a.workerParse.streamEmpty=!1,a.workerParse.frameListEmpty=!1,a.workerParse.onmessage=e=>{var t,i,n,e=e.data;let r=null;"return-nalu"===(r=void 0===e.cmd||null===e.cmd?"":e.cmd)&&(t=e.data,i=e.parseEmpty,n=e.streamEmpty,e=e.frameListEmpty,a.workerParse.parseEmpty=i,a.workerParse.streamEmpty=n,a.workerParse.frameListEmpty=e,!1===t||null==t?!0===a.workerFetch.onMsgFetchFinished&&!0===i&&(a.workerParse.stopNaluInterval=!0):(a.append265NaluFrame(t),a.workerParse.postMessage({cmd:"get-nalu",data:null,msg:"get-nalu"})))},alert(f.ParseGetMediaURL(this.videoURL)),this.workerFetch.postMessage({cmd:"start",url:f.ParseGetMediaURL(this.videoURL),type:this.mediaExtProtocol,msg:"start"}),e()}append265NaluFrame(e){e={data:e,pts:this.rawModePts};this.player.appendHevcFrame(e),this.configFormat.extInfo.readyShow&&this.player.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.NULL&&(this.player.playFrameYUV(!0,!0),this.configFormat.extInfo.readyShow=!1,this.onReadyShowDone)&&this.onReadyShowDone(),this.rawModePts+=1/this.configFormat.extInfo.rawFps}_rtcPlayer(){let t=this;this.player=new e.a(this.configFormat.RtcPlugin,this.configFormat),this.player.onMakeItReady=()=>{t.onMakeItReady&&t.onMakeItReady()},this.player.onLoadFinish=()=>{t.playParam.size=t.player.getSize(),t.playParam.durationMs=t.player.duration,t.playParam.videoCodec=1,t.onLoadFinish&&t.onLoadFinish()},this.player.onReadyShowDone=()=>{t.onReadyShowDone&&t.onReadyShowDone()},this.player.onPlayingFinish=()=>{null!=t.onPlayFinish&&t.onPlayFinish()},this.player.onRtcEvent=e=>{null!=t.onRtcEvent&&t.onRtcEvent(e)},this.player.onError=e=>{t.onPlayState&&t.onPlayState(!1),t.onError&&t.onError(e)},this.player.makeIt()}initDecoder(){let t=this;this.player=n.default.Player(),this.player.onPerformance=e=>{t.onPerformance&&t.onPerformance(e)},this.player.onCacheLimit=e=>{this.hlsObj&&this.hlsObj.limitDownloads(e)},this.player.onPause=()=>{t.onPause()},this.player.onPlay=()=>{t.onPlay()},this.configFormat.useSoftDecoding=!0}loadJsWasm(e){A(e)}}S.default={cybercorejs:w},t.newcybercorejs=(e,t)=>{return new w(e,t)}}.call(this,T(31))},function(e,t,i){"use strict";i.r(t);var n=i(22),r=i(23),a=i(1),s=i.n(a);i(98),i(5);const l=i(10),u=i(46),h=i(34),d=i(35),c=i(36),f=i(5),p=i(25);t.default={Player:e=>{let o={config:{width:e&&e.width||f.DEFAULT_WIDTH,height:e&&e.height||f.DEFAULT_HEIGHT,fps:e&&e.fps||f.DEFAULT_FPS,fixed:e&&e.fixed||f.DEFAULT_FIXED,sampleRate:e&&e.sampleRate||f.DEFAULT_SAMPLERATE,appendHevcType:e&&e.appendHevcType||f.APPEND_TYPE_STREAM,frameDurMs:e&&e.frameDur||f.DEFAULT_FRAME_DUR,playerId:e&&e.playerId||f.DEFAILT_WEBGL_PLAY_ID,audioNone:e&&e.audioNone||!1,token:e&&e.token||null,videoCodec:e&&e.videoCodec||f.CODEC_H265},vcodecerPtr:null,videoCallback:null,frameList:[],cacheInterval:null,cacheYuvBuf
10:h(25),nowPacket:null,stream:new Uint8Array,vCodecID:f.V_CODEC_NAME_HEVC,audio:null,liveStartMs:-1,durationMs:-1,videoPTS:0,loop:null,debugYUVSwitch:!1,debugID:null,cacheLoop:null,playParams:{seekPos:-1,mode:f.PLAYER_MODE_VOD,accurateSeek:!0,seekEvent:!1,realPlay:!0},calcuteStartTime:-1,fix_poc_err_skip:0,frameTime:0,frameTimeSec:0,preCostTime:0,realVolume:1,isPlaying:!1,isCaching:f.CACHE_NO_LOADCACHE,isNewSeek:!1,flushDecoder:0,isCheckDisplay:!1,isPlayLoadingFinish:0,vCachePTS:0,aCachePTS:0,showScreen:!1,noCacheFrame:0,onPlayingTime:null,onPlayingFinish:null,onSeekFinish:null,onLoadCache:null,onLoadCacheFinshed:null,onRender:null,resampleFps:0,seekTime:null,isSeekBack:null,appendAudioStatus:0,appendVideoStatus:0,yuvVideoStatus:0,performance:{frameRate:30,buffer:0,broken:[],bitRate:0,seek:[],decodeFrameRate:30,firstFrameTime:-1,playStyle:"",height:0,width:0,code:null,progress:0,decodeTime:null},seekInitTime:0,oneScondTime:(new Date).getTime(),frameRate:0,startPlayTime:0,onPerformance:null,onCacheLimit:null,curDecoderTime:null,onInitDecodeComplete:null,seekFinishCallBack:!1,initPerformance:()=>{o.performance={frameRate:30,buffer:0,broken:[],bitRate:0,seek:[]}},setConfig:e=>{o.config=Object.assign(o.config,e),null==o.config.token?alert("请è¾å
¥TOKENï¼Please set token param!"):(o.config.token&&o.decoder&&o.decoder.postMessage({t:0,data:{token:o.config.token,playerVersion:p.PLAYER_VERSION,videoCodec:o.config.videoCodec}}),o.makeIt(),o.cacheThread())},setScreen:(e=!1)=>{null!==o&&void 0!==o&&(o.showScreen=e)},setSize:(e,t)=>
10{o.config.width=e||f.DEFAULT_WIDTH,o.config.height=t||f.DEFAULT_HEIGHT},setFrameRate:(e=25)=>{o.config.fps=e,o.config.frameDurMs=1e3/e},setDurationMs:(e=-1)=>{o.durationMs=e,0==o.config.audioNone&&o.audio.setDurationMs(e)},setPlayingCall:e=>{o.onPlayingTime=e},setVoice:e=>{o.realVolume=e,0==o.config.audioNone&&o.audio.setVoice(o.realVolume)},isPlayingState:()=>o.isPlaying||o.isCaching===f.CACHE_WITH_PLAY_SIGN,appendAACFrame:e=>{!0===o.isSeekBack&&(e.pts<o.seekTime&&0==o.appendAudioStatus&&(o.appendAudioStatus=-2),-2==o.appendAudioStatus)&&e.pts>o.seekTime&&(o.appendAudioStatus=-1),!1===o.isSeekBack&&e.pts-o.seekTime<0||!0===o.isSeekBack&&-1!=o.appendVideoStatus||(o.audio.addSample(e),o.aCachePTS=Math.max(e.pts,o.aCachePTS))},appendHevcFrame:e=>{var t,i,n;o.config.appendHevcType==f.APPEND_TYPE_STREAM?o.stream=new Uint8Array([...o.stream].concat(...e)):o.config.appendHevcType==f.APPEND_TYPE_FRAME&&(!0===o.isSeekBack&&(e.pts<o.seekTime&&0==o.appendVideoStatus&&(o.appendVideoStatus=-2),-2==o.appendVideoStatus)&&e.pts>o.seekTime&&(o.appendVideoStatus=-1),!1===o.isSeekBack&&e.pts-o.seekTime<0||!0===o.isSeekBack&&-1!=o.appendVideoStatus||((10<o.cacheYuvBuf.yuvCache.length||({data:t,pts:i,isKey:n}=0==o.frameList.length?e:o.frameList.shift(),o.decodeNalu1Frame(t,i,!0,n),0<o.frameList.length))&&o.frameList.push(e),o.vCachePTS=Math.max(e.pts,o.vCachePTS)))},getCachePTS:()=>Math.max(o.vCachePTS,o.aCachePTS),endAudio:()=>{0==o.config.audioNone&&o.audio.stop()},cleanSample:()=>{0==o.config.audioNone&&o.audio.cleanQueue()},cleanVideoQueue:()=>{o.config.appendHevcType==f.APPEND_TYPE_STREAM?o.stream=new Uint8Array:o.config.appendHevcType==f.APPEND_TYPE_FRAME&&(o.frameList=[],o.frameList.length=0)},cleanCacheYUV:()=>{o.cacheYuvBuf.cleanPipeline()},pause:()=>{o.loop&&window.clearInterval(o.loop),cancelAnimationFrame(o.requestAnimationFrameId),o.loop=null,0==o.config.audioNone&&o.audio.pause(),o.isPlaying=!1,o.isCaching===f.CACHE_WITH_PLAY_SIGN&&(o.isCaching=f.CACHE_WITH_NOPLAY_SIGN)},checkFinished:(e=f.PLAYER_MODE_VOD)=>e==f.PLAYER_MODE_VOD&&o.cacheYuvBuf.yuvCache.length<=0&&o.videoPTS.toFixed(1)>=(o.durationMs-o.config.frameDurMs)/1e3&&(null!=o.onPlayingFinish&&o.onPlayingFinish(()=>{o.config&&o.config.repeat&&o.onPlay()}),!0),clearAllCache:()=>{o.nowPacket=null,o.vCachePTS=0,o.aCachePTS=0,o.cleanSample(),o.cleanVideoQueue(),o.cleanCacheYUV()},seek:(e,t={},i)=>{o.decoder.postMessage({t:14}),o.decoder.postMessage({t:0,data:{token:o.config.token,playerVersion:p.PLAYER_VERSION,videoCodec:o.config.videoCodec}}),o.seekInitTime=(new Date).getTime(),o.performance.seek.push({seekPts:t.seekTime,fromSeekPts:o.videoPTS,time:0});var n=o.isPlaying,e=(null!=o.onLoadCache&&o.onLoadCache(),o.pause(),o.stopCacheThread(),o.clearAllCache(),e&&e(),o.isNewSeek=!0,o.flushDecoder=1,o.isSeekBack=o.videoPTS>t.seekTime,o.videoPTS=0,{seekPos:t.seekTime||-1,mode:t.mode||f.PLAYER_MODE_VOD,accurateSeek:t.accurateSeek||!0,seekEvent:t.seekEvent||!0,realPlay:n});o.seekTime=t.seekTime,o.cacheThread(),o.play(e),i&&(o.seekFinishCallBack=i)},getNalu1Packet:(e=!0)=>{var t=window.performance.now();let i=null,n=-1,r=!1;if(o.config.appendHevcType==f.APPEND_TYPE_STREAM)i=o.nextNalu();else{if(o.config.appendHevcType!=f.APPEND_TYPE_FRAME)return null;var a=o.frameList.shift();if(!a)return null;i=a.data,n=a.pts,r=a.isKey,e&&(o.videoPTS=n)}window.performance.now();return{nalBuf:i,pts:n,isKey:r}},decodeNalu1Frame:(e,t,i=0,n)=>{var r={t:1,nalBuf:e,pts:t,flushDecoder:o.flushDecoder};o.decoder.postMessage(r,[e.buffer]),o.curDecoderTime=t},cacheThread:()=>{o.stopCacheThread(),o.cacheLoop=window.setInterval(()=>{var e,t,i=o.getNalu1Packet(!1);null==i?o.playParams.mode!=f.PLAYER_MODE_NOTIME_LIVE&&o.stopCacheThread():(e=i.nalBuf,t=i.pts,i=i.isKey,o.decodeNalu1Frame(e,t,!0,i))},10)},stopCacheThread:()=>{null!==o.cacheLoop&&(window.clearInterval(o.cacheLoop),o.cacheLoop=null)},loadCache:()=>{if(!(0<((o.durationMs-o.config.frameDurMs)/1e3-o.videoPTS.toFixed(1)<1))){var e=o.isPlaying;if(o.cacheYuvBuf.yuvCache.length<=3){o.pause(),null!=o.onLoadCache&&o.onLoadCache(),o.performance.broken.push({start:(new Date).getTime,end:null,time:null}),o.isCaching=e?f.CACHE_WITH_PLAY_SIGN:f.CACHE_WITH_NOPLAY_SIGN;e=o.frameDur;null===o.cacheInterval&&(o.cacheInterval=window.setInterval(()=>{var e,t;25<=o.cacheYuvBuf.yuvCache.length&&(null!=o.onLoadCacheFinshed&&o.onLoadCacheFinshed(),(e=o.performance.broken[o.performance.broken.length-1])&&e.start&&!e.end&&(t=(new Date).getTime(),e.end=t,e.time=t-e.start),window.clearInterval(o.cacheInterval),o.cacheInterval=null,o.isCaching===f.CACHE_WITH_PLAY_SIGN&&o.play(o.playParams),o.isCaching=f.CACHE_NO_LOADCACHE)},e))}}},playFunc:()=>{let t=!1;if(o.playParams.seekEvent||l.GetMsTime()-o.calcuteStartTime>=o.frameTime-o.preCostTime){let e=t=!0;
10if(o.calcuteStartTime=l.GetMsTime(),o.config.audioNone)o.playFrameYUV(e,o.playParams.accurateSeek);else{0<o.fix_poc_err_skip&&(o.fix_poc_err_skip--,e=!1);var i=o.videoPTS-o.audio.getAlignVPTS();if(0<i)return void(o.playParams.seekEvent&&!o.config.audioNone&&o.audio.setVoice(0));if(e){if(!(e=-1*i<=+o.frameTimeSec)){var n=parseInt(i/o.frameTimeSec);for(let e=0;e<n;e++)o.playFrameYUV(!1,o.playParams.accurateSeek);null!=o.onLoadCacheFinshed&&o.onLoadCacheFinshed(),o.playFrameYUV(!0,o.playParams.accurateSeek)}null!=o.onLoadCacheFinshed&&o.onLoadCacheFinshed(),o.playFrameYUV(e,o.playParams.accurateSeek)}}}return o.playParams.seekEvent&&(o.playParams.seekEvent=!1,o.onSeekFinish(),o.isPlaying||(o.playFrameYUV(!0,o.playParams.accurateSeek),o.pause()),o.config.audioNone||o.audio.setVoice(o.realVolume)),o.onPlayingTime&&o.onPlayingTime(o.videoPTS),o.checkFinished(o.playParams.mode),t},play:e=>{if(o.playParams=e,o.calcuteStartTime=l.GetMsTime(),o.noCacheFrame=0,o.isPlaying=o.playParams.realPlay,o.performance.code="hevc",o.performance.playStyle="hls_"+o.playParams.mode,!0===o.config.audioNone&&o.playParams.mode==f.PLAYER_MODE_NOTIME_LIVE){o.liveStartMs=l.GetMsTime(),o.frameTime=Math.floor(1e3/o.config.fps),o.frameTimeSec=o.frameTime/1e3;let e=0;o.loop=window.setInterval(()=>{(l.GetMsTime()-o.liveStartMs)/o.frameTime>=e&&(o.playFrameYUV(!0,o.playParams.accurateSeek),e+=1)},1)}else o.videoPTS>=o.playParams.seekPos&&!o.isNewSeek||0===o.playParams.seekPos||0===o.playParams.seekPos?(o.frameTime=1e3/o.config.fps,o.frameTimeSec=o.frameTime/1e3,0==o.config.audioNone&&o.audio.play(),o.realVolume=o.config.audioNone?0:o.audio.voice,o.playParams.seekEvent&&(o.fix_poc_err_skip=10),cancelAnimationFrame(o.requestAnimationFrameId),o.displayLoop()):(o.loop=window.setInterval(()=>{o.playFrameYUV(!1,o.playParams.accurateSeek),o.checkFinished(o.playParams.mode)?(window.clearInterval(o.loop),o.loop=null):o.videoPTS>o.playParams.seekPos&&(window.clearInterval(o.loop),o.loop=null,o.play(o.playParams),o.isSeekBack=null,o.seekTime=null,o.appendAudioStatus=0,o.appendVideoStatus=0,o.yuvVideoStatus=0,o.performance.seek[o.performance.seek.length-1].time=(new Date).getTime()-o.seekInitTime,o.seekFinishCallBack)&&o.seekFinishCallBack()},35),o.isNewSeek=!1)},displayLoop:()=>{var e=l.GetMsTime();o.requestAnimationFrameId=requestAnimationFrame(o.displayLoop.bind(void 0)),o.playFunc(),o.preCostTime=l.GetMsTime()-e},stop:()=>{o.release(),o.stream=new Uint8Array},release:()=>(void 0!==o.yuv&&null!==o.yuv&&(c.releaseContext(o.yuv),o.yuv=null),o.decoder.postMessage({t:14}),o.endAudio(),o.cacheLoop&&window.clearInterval(o.cacheLoop),o.cacheLoop=null,o.loop&&window.clearInterval(o.loop),o.loop=null,o.pause(),null!==o.videoCallback&&Module.removeFunction(o.videoCallback),o.videoCallback=null,o.stream=null,o.clearAllCache(),o.frameList.length=0,o.durationMs=-1,o.videoPTS=0,o.isPlaying=!1,o.canvas.remove(),o.canvas=null,o.decoder&&o.decoder.terminate(),!(window.onclick=document.body.onclick=null)),nextNalu:(i=1)=>{if(!(o.stream.length<=4)){let t=-1;for(let e=0;e<o.stream.length;e++){if(e+5>=o.stream.length)return-1!=t&&(n=o.stream.subarray(t),o.stream=new Uint8Array,n);var n="0 0 1"==o.stream.slice(0,3).join(" "),r="0 0 0 1"==o.stream.slice(0,4).join(" ");if(n||r){if(-1==t)t=e;else{if(i<=1)return r=o.stream.subarray(t,e),o.stream=o.stream.subarray(e),r;--i}e+=3}}}return!1},decodeSendPacket:e=>{var t=Module._malloc(e.length),e=(Module.HEAP8.set(e,t),Module.cwrap("decodeSendPacket","number",["number","number","number"])(o.vcodecerPtr,t,e.length));return Module._free(t),e},decodeRecvFrame:()=>{return Module.cwrap("decodeRecv","number",["number"])(o.vcodecerPtr)},playYUV:()=>o.playFrameYUV(!0,!0),playFrameYUV:(e=!1,t=!1)=>{var i=o.cacheYuvBuf.vYuv();if(null==i)return o.noCacheFrame+=1,e&&!o.playParams.seekEvent&&o.loadCache(),!1;80<o.cacheYuvBuf.yuvCache.length||100<o.frameList.length?o.onCacheLimit&&o.onCacheLimit(!0):o.onCacheLimit&&o.onCacheLimit(!1),o.noCacheFrame=0;var n=o.cacheYuvBuf.yuvCache.length;if(n<100&&0<o.frameList.length){const{data:a,pts:r,isKey:s}=o.frameList.shift();o.decodeNalu1Frame(a,r,!0,s)}let r=i.pts;o.videoPTS=r,(!e&&t||e)&&e&&(o.onRender(i.width,i.height,i.y,i.u,i.v),o.drawImage(i.width,i.height,i.y,i.u,i.v));n={t:2,f:i};return o.decoder.postMessage(n,[n.f.y.buffer,n.f.u.buffer,n.f.v.buffer]),e&&!o.playParams.seekEvent&&o.isPlaying&&o.loadCache(),!0},drawImage:(e,t,i,n,r)=>{window.performance.now();o.canvas.width===e&&o.canvas.height==t||(o.canvas.width=e,o.canvas.height=t),o.showScreen&&null!=o.onRender&&o.onRender(e,t,i,n,r),o.isCheckDisplay||o.checkDisplaySize(e,t),c.renderFrame(o.yuv,i,n,r,e,t),o.frameRate++,-1==o.performance.firstFrameTime&&(o.performance.firstFrameTime=(new Date).getTime()-o.startPlayTime),o.oneScondTime&&1e3
10<(new Date).getTime()-o.oneScondTime&&(i=JSON.parse(JSON.stringify(o.frameRate)),o.frameRate=0,o.oneScondTime=(new Date).getTime(),o.performance.frameRate=i,0<o.cacheYuvBuf.yuvCache.length&&(o.performance.buffer=o.cacheYuvBuf.yuvCache[o.cacheYuvBuf.yuvCache.length-1].pts-o.cacheYuvBuf.yuvCache[0].pts),o.onPerformance)&&o.onPerformance(o.performance)},debugYUV:e=>{o.debugYUVSwitch=!0,o.debugID=e},checkDisplaySize:(e,t)=>{var i=e/o.config.width>t/o.config.height,n=o.config.width/e,r=o.config.height/t,i=i?n:r,n=o.config.fixed,r=n?o.config.width:parseInt(e*i),e=n?o.config.height:parseInt(t*i);return o.canvas.offsetWidth==r&&o.canvas.offsetHeight==e||(n=parseInt((o.canvasBox.offsetHeight-e)/2),t=parseInt((o.canvasBox.offsetWidth-r)/2),o.canvas.style.marginTop=n+"px",o.canvas.style.marginLeft=t+"px",o.canvas.style.width=r+"px",o.canvas.style.height=e+"px"),o.isCheckDisplay=!0,[r,e]},makeWasm:()=>{var e=Object(n.getPlayerPath)();o.decoder=new r.a,o.decoder.postMessage({t:111,pathUrl:e,isSafari:s.a.isSafari()}),o.decoder.onmessage=e=>{var t,i,n,r=e["data"];switch(r.t){case 0:o.startPlayTime=(new Date).getTime(),o.config.token&&o.decoder.postMessage({t:0,data:{token:o.config.token,playerVersion:p.PLAYER_VERSION,videoCodec:o.config.videoCodec}});break;case 1:!0===o.isSeekBack&&-1!=o.yuvVideoStatus&&(!(r.ptsSe-o.seekTime<0||5<r.ptsSe-o.seekTime||-3==o.yuvVideoStatu)||(o.yuvVideoStatus=-3,r.ptsSec<o.seekTime&&0==o.yuvVideoStatus&&(o.yuvVideoStatus=-2),-2==o.yuvVideoStatus&&streamBytes.pts>o.seekTime))&&(o.yuvVideoStatus=-1),!1===o.isSeekBack&&r.ptsSec-o.seekTime<0||!0===o.isSeekBack&&-1!=o.yuvVideoStatus||(o.decodeFramecount--,3<o.resampleFps?(o.resampleFps=0,t={t:2,f:r},o.decoder.postMessage(t,[t.f.y.buffer,t.f.u.buffer,t.f.v.buffer])):(o.resampleFps++,o.performance.width||(o.performance.width=r.width,o.performance.height=r.height),t=new d.CacheYuvStruct(r.ptsSec,r.width,r.height,r.y,r.u,r.v),o.cacheYuvBuf.appendCacheByCacheYuv(t),80<o.cacheYuvBuf.yuvCache.length||15<o.curDecoderTime-r.ptsSec||100<o.frameList.length?o.onCacheLimit&&o.onCacheLimit(!0):o.onCacheLimit&&o.onCacheLimit(!1),o.cacheYuvBuf.yuvCache.length<100&&0<o.frameList.length&&({data:t,pts:i,isKey:n}=o.frameList.shift(),o.decodeNalu1Frame(t,i,!0,n))));break;case 2:o.onInitDecodeComplete&&o.onInitDecodeComplete();break;case 3:o.performance.decodeFrameRate=r.frameRate,o.performance.decodeTime=r.decodeTime}}},makeIt:()=>{var e=document.querySelector("div#"+o.config.playerId),t=document.createElement("canvas");t.style.width=e.clientWidth+"px",t.style.height=e.clientHeight+"px",t.style.top="0px",t.style.left="0px",e.appendChild(t),o.canvasBox=e,o.canvas=t,o.yuv=c.setupCanvas(t,{preserveDrawingBuffer:!1}),0==o.config.audioNone&&(o.audio=u({sampleRate:o.config.sampleRate,appendType:o.config.appendHevcType})),o.isPlayLoadingFinish=1},bindEvents:()=>{document.addEventListener("visibilitychange",o._onVisibilityChange.bind(void 0))},_onVisibilityChange:()=>{"visible"!==document.visibilityState||o.isPlayingState()?o.onPause():o.onPlay()}};return o.makeWasm(),o.bindEvents(),o}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){const n=i(5);t.Mp4Player=class{constructor(e){this.configFormat={width:e.width||n.DEFAULT_WIDTH,height:e.height||n.DEFAULT_HEIGHT,fps:e.fps||n.DEFAULT_FPS,fixed:e.fixed||n.DEFAULT_FIXED,sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendHevcType:e.appendHevcType||n.APPEND_TYPE_STREAM,frameDurMs:e.frameDur||n.DEFAULT_FRAME_DUR,playerId:e.playerId||n.DEFAILT_WEBGL_PLAY_ID,audioNone:e.audioNone||!1,token:e.token||null,videoCodec:e.videoCodec||n.CODEC_H265,autoPlay:e.autoPlay||!1,repeatPlay:e.repeat||!1},this.videoTag=null,this.isPlaying=!1,this.duration=-1,this.bufferInterval=null,this.onMakeItReady=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onPlayState=null,this.onCacheProcess=null,this.onSeekFinish=null,this.onSeiInfo=null,this.sei_maps=[],this.sei_count=0,this.seiTimer=null,this.onSeiTimer=null,this.onSeekStart=null,this.seekResult=null,this.onError=null}makeIt(i){let n=this;this.videoTag=null,this.videoTag=document.createElement("video"),this.configFormat.repeatPlay&&this.videoTag.setAttribute("loop","loop"),this.videoTag.setAttribute("crossOrigin","anonymous"),this.videoTag.setAttribute("webkit-playsinline","true"),this.videoTag.setAttribute("playsinline","true"),!0===this.configFormat.autoPlay&&(window.onclick=document.body.onclick=function(e){n.videoTag.muted=!1}),this.configFormat.audioNone&&(this.videoTag.setAttribute("muted","true"),this.videoTag.setAttribute("autoplay","autoplay")),this.videoTag.onplay=function(){var e=n.isPlayingState();n.onPlayState&&n.onPlayState(e),n.seiTimer&&(clearInterval(n.seiTimer),n.seiTimer=null),n.seiTimer=setInterval(()=>{n.onSeiTimer&&n.onSeiTimer(n.videoTag.currentTime)},30)},this.videoTag.onpause=function(){var e=n.isPlayingState();n.onPlayState&&n.onPlayState(e)},this.videoTag.ontimeupdate=()=>{n.onPlayingTime&&n.onPlayingTime(n.videoTag.currentTime)},this.videoTag.onended=()=>{n.sei_count=0,n.onPlayingFinish&&n.onPlayingFinish()},this.videoTag.onloadedmetadata=e=>{n.duration=n.videoTag.duration;var t,i=document.querySelector("#"+n.configFormat.playerId);i.getElementsByTagName("video")[0]||(t=i.getElementsByTagName("div"),i.insertBefore(n.videoTag,t[0])),n.onLoadFinish&&n.onLoadFinish(),null!==n.bufferInterval&&(window.clearInterval(n.bufferInterval),n.bufferInterval=null),n.bufferInterval=window.setInterval(function(){var e,t;n.videoTag.buffered.length&&((e=n.videoTag.buffered.end(n.videoTag.buffered.length-1))>=n.duration-.04&&(n.onCacheProcess&&n.onCacheProcess(n.duration),window.clearInterval(n.bufferInterval)),n.seekReadyPts&&e>n.seekReadyPts&&(t=n.seek(n.seekReadyPts),n.seekResult=t,n.seekReadyPts=null),n.onCacheProcess)&&n.onCacheProcess(e)},200)},this.videoTag.onerror=e=>{var t=e.target.error;n.onError&&n.onError({msg:t,event:e.type,url:i,type:e.type})},this.videoTag.onseeking=()=>{this.onSeekStart&&this.onSeekStart()},this.videoTag.onseeked=()=>{n.onSeekFinish&&n.onSeekFinish(n.seekResult)},this.videoTag.src=i,this.videoTag.style.width="100%",this.videoTag.style.height="100%",this.onMakeItReady&&this.onMakeItReady()}setPlaybackRate(e=1){return!(e<=0||null==this.videoTag||null===this.videoTag||(this.videoTag.playbackRate=e,0))}getPlaybackRate(){return null==this.videoTag||null===this.videoTag?0:this.videoTag.playbackRate}getSize(){return{width:0<this.videoTag.videoWidth?this.videoTag.videoWidth:this.configFormat.width,height:0<this.videoTag.videoHeight?this.videoTag.videoHeight:this.configFormat.height}}play(){this.videoTag.play()}seek(t){try{return this.videoTag.currentTime=t,this.videoTag.buffered.end(this.videoTag.buffered.length-1)>t?this.seekResult=!0:(this.seekReadyPts=t,this.seekResult=!1)}catch(e){return this.videoTag.currentTime=0,this.seekReadyPts=t,this.seekResult=!1}}pause(){this.videoTag&&this.videoTag.pause()}setVoice(e){this.videoTag.volume=e,this.videoTag.muted=0==e}isPlayingState(){return this.videoTag&&!this.videoTag.paused}release(){this.videoTag&&this.videoTag.remove(),this.videoTag=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onPlayState=null,this.sei_maps=[],this.sei_count=0,null!==this.bufferInterval&&(window.clearInterval(this.bufferInterval),this.bufferInterval=null),this.seiTimer&&(clearInterval(this.seiTimer),this.seiTimer=null),window.onclick=document.body.onclick=null}nativeNextFrame(){void 0!==this.videoTag&&null!==this.videoTag&&(this.videoTag.currentTime+=1/this.configFormat.fps)}}},function(e,t,i){"use strict";i.r(t);var r=i(49),n=i(23),a=i(22),s=i(1),o=i.n(s);const l=i(37),u=i(26);i(34),i(35);const h=i(36),d=i(10);i(57);const c=i(46),f=i(5),p=i(25);class m{constructor(e,t,i,n,r,a,s,o,l){this.pts=l,this.data_y=e,this.data_u=t,this.data_v=i,this.line1=n,this.line2=r,this.line3=a,this.width=s,this.height=o,this.byteAlignIncr=this.line1-this.width}}t.default={CNativeCore:class{constructor(e){this.config={width:e.width||f.DEFAULT_WIDTH,height:e.height||f.DEFAULT_HEIGHT,fps:e.fps||f.DEFAULT_FPS,sampleRate:e.sampleRate||f.DEFAULT_SAMPLERATE,playerId:e.playerId||f.DEFAILT_WEBGL_PLAY_ID,token:e.token||null,readyShow:e.readyShow||!1,checkProbe:e.checkProbe,ignoreAudio:e.ignoreAudio,playMode:e.playMode||f.PLAYER_MODE_VOD,autoPlay:e.autoPlay||!1,defaultFps:e.defaultFps||-1,cacheLength:e.cacheLength||50,videoCodec:e&&e.videoCodec||f.CODEC_H265},this.config.cacheLength=Math.max(this.config.cacheLength,5),this.probeSize=4524611,this.audioWAudio=null,this.audioVoice=1,this.frameCallTag=0,this.seekTarget=0,this.avSeekVState=!1,this.isNewSeek=!1,this.openFrameCall=!0,this.bufRecvStat=!1,this.bufObject=u(),this.bufLastVDTS=0,this.bufLastADTS=0,this.yuvMaxTime=0,this.loopMs=10,this.isCacheV=f.CACHE_NO_LOADCACHE,this.playVPipe=[],this._videoQueue=[],this._VIDEO_CACHE_LEN=this.config.cacheLength,this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null,this.duration=-1,this.channels=-1,this.width=-1,this.height=-1,this.isPlaying=!1,this.isCheckDisplay=!1,this.frameTime=1e3/this.config.fps,this.vCodecID=f.V_CODEC_NAME_UNKN,this.audioIdx=-1,this.audioNone=!1,this.frameDur=0,this.canvasBox=null,this.canvas=null,this.yuv=null,this.retryAuSampleNo=0,this.cacheStatus=!1,this.showScreen=!1,this.playPTS=0,this.vCachePTS=0,this.aCachePTS=0,this.reFull=!1,this.bufOK=!1,this.avRecvInterval=null,this.avFeedVideoInterval=null,this.avFeedAudioInterval=null,this.decVFrameInterval=null,this.playFrameInterval=null,this.onProbeFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onRender=null,this.onCacheProcess=null,this.onReadyShowDone=null,this.onRelease=null,this.playModeEnum=this.config.playMode===f.PLAYER_MODE_NOTIME_LIVE?1:0,this.decoder=null,this.demuxWorker=null,this.isWasmInit=!1,this.isDemuxWasmInit=!1,this.makeWasm(),this.onWasmFinished=null,this.naluLListLength=0,this.time=0,this.resampleFps=0,this.requestAnimationFrameId=null,this.calcuteStartTime=0,this.nowTimestamp=0,this.playFrameCostTime=0,this.performance={frameRate:30,buffer:0,broken:[],bitRate:0,seek:[],decodeFrameRate:30,firstFrameTime:-1,playStyle:"",height:0,width:0,code:null,progress:0,decodeTime:null},this.seekInitTime=0,this.oneScondTime=(new Date).getTime(),this.frameRate=0,this.startPlayTime=0,this.onPerformance=null}makeWasm(){var e=Object(a.getPlayerPath)();this.demuxWorker=new r.a,this.demuxWorker.postMessage({t:111,pathUrl:e,isSafari:o.a.isSafari()}),this.demuxWorker.onmessage=e=>{var t=e["data"];switch(t.t){case 0:-1==this.performance.firstFrameTime&&(this.startPlayTime=(new Date).getTime()),this.config.token&&this.demuxWorker.postMessage({t:0,data:{token:this.config.token,playerVersion:p.PLAYER_VERSION,ignoreAudio:this.config.ignoreAudio,playModeEnum:this.playModeEnum,defaultFps:this.config.defaultFps}});break;case 1:this.isDemuxWasmInit=!0,this.isWasmInit&&this.onWasmFinished&&this.onWasmFinished();break;case 2:var{duration:i,width:n,height:r,fps:a,audioIdx:s,sample_rate:o,channels:l,vcodec_name_id:u,sample_fmt:h}=t;this._probeFinCallback(i,n,r,a,s,o,l,u,h);break;case 3:var{d:i,len:n,isKey:r,pts:a,dts:s,isRawStream:o}=t;this._naluCallback(i,n,r,t.width,t.height,a,s,o);break;case 4:var{line1:l,channel:u}=t;this._aacFrameCallback(t.d,l,u,t.pts);break;case 5:this._frameCallback(t.buf_y,t.buf_u,t.buf_v,t.line1,t.line2,t.line3,t.width,t.height,t.pts,t.tag);break;case 6:this.naluLListLength=t.l}},this.decoder=new n.a,this.decoder.postMessage({t:111,pathUrl:e,isSafari:o.a.isSafari()}),this.decoder.onmessage=e=>{var t,i=e["data"];switch(i.t){case 0:this.config.token&&this.decoder.postMessage({t:0,data:{token:this.config.token,playerVersion:p.PLAYER_VERSION,videoCodec:this.videoCodec}});break;case 1:3<this.resampleFps?(this.resampleFps=0,this.decoder.postMessage(t={t:2,f:i},[t.f.y.buffer,t.f.u.buffer,t.f.v.buffer])):(this.performance.width||(this.performance.width=i.width,this.performance.height=i.height),this.resampleFps++,this._frameCallback(i.y,i.u,i.v,i.stride_y,i.stride_u,i.stride_v,i.width,i.height,i.ptsSec,this.frameCallTag));break;case 2:this.isWasmInit=!0,this.isDemuxWasmInit&&this.onWasmFinished&&this.onWasmFinished();break;case 3:this.performance.decodeFrameRate=i.frameRate,this.performance.decodeTime=i.decodeTime}}}_createWorker1(){let n=this;this.worker1=new r.a("./dist/dc-worker-dist.js"),this.worker1ready=!1,this.worker1decing=!1,this.worker1.onmessage=function(e){var e=e.data,t=e.cmd,i=e.params;switch(t){case"onRuntimeInitialized":n.worker1.postMessage({cmd:"AVSniffStreamInit",params:[n.config.token,p.PLAYER_VERSION]});break;case"onInitDecOK":n.worker1ready=!0;break;case"decodeVideoFrame_Start":n.worker1decing=!0;break;case"decodeVideoFrame_End":n.worker1decing=!1;break;case"_frameCallback":n._handleFrameYUVCallback(i.buf_y,i.buf_u,i.buf_v,i.line1,i.line2,i.line3,i.width,i.height,i.pts,i.tag);break;case"stop_End":n.worker1.onmessage=null,n.worker1=null}}}_removeBindFuncPtr(){null!==this._ptr_probeCallback&&Module.removeFunction(this._ptr_probeCallback),null!==this._ptr_frameCallback&&Module.removeFunction(this._ptr_frameCallback),null!==this._ptr_naluCallback&&Module.removeFunction(this._ptr_naluCallback),null!==this._ptr_sampleCallback&&Module.removeFunction(this._ptr_sampleCallback),null!==this._ptr_aacCallback&&Module.removeFunction(this._ptr_aacCallback),this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null}release(){null!==this.playFrameInterval&&(window.clearInterval(this.playFrameInterval),this.playFrameInterval=null),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),this._clearDecInterval(),this._removeBindFuncPtr();return this.demuxWorker.postMessage({t:8}),this.demuxWorker&&this.demuxWorker.terminate(),this.decoder.postMessage({t:14}),this.decoder&&this.decoder.terminate(),this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null,this.bufRecvStat=!1,this.bufObject.cleanPipeline(),this.playVPipe.length=0,this.loopMs=10,void 0!==this.yuv&&null!==this.yuv&&(h.releaseContext(this.yuv),this.yuv=null),void 0!==this.canvas&&null!==this.canvas&&(this.canvas.remove(),this.canvas=null),this.config.readyShow=!0,window.onclick=document.body.onclick=null,delete window.g_players[this.corePtr],this.onRelease&&this.onRelease(),-1}setScreen(e=!1){this.showScreen=e}getCachePTS(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS}getMaxPTS(){return Math.max(this.vCachePTS,this.aCachePTS)}isPlayingState(){return this.isPlaying}_clearDecInterval(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null}_checkPlayFinished(){return!(this.config.playMode!==f.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS<this.frameDur)||(this.pause(),this._clearDecInterval(),this.onPlayingTime&&this.onPlayingTime(this.duration),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.onPlayingFinish&&this.onPlayingFinish(),this.setPerformanceBrokenEnd(),0))}play(){let t=this;if(this.performance.playStyle="flv_vod",this.performance.code="hevc",this.isCacheV===f.CACHE_WITH_NOPLAY_SIGN&&(this.isCacheV=f.CACHE_WITH_PLAY_SIGN),this.isPlaying=!0,!this.playFrameInterval||null===this.playFrameInterval||null==this.playFrameInterval){let n=0,r=0,a=0;const s=+this.frameTime;this.config.playMode===f.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval(()=>{var e;r=d.GetMsTime(),0<t._videoQueue.length&&r-n>=t.frameTime-a&&(e=t._videoQueue.shift(),h.renderFrame(t.yuv,e.data_y,e.data_u,e.data_v,e.line1,e.height),this.setPerformance()
10,(a=d.GetMsTime()-r)>=t.frameTime&&(a=t.frameTime),n=r)},2):this.playFrameInterval=window.setInterval(()=>{if(r=d.GetMsTime(),0<this._videoQueue.length&&r-n>=this.frameTime-a){var t=this._videoQueue[0].pts;let e=0;if(this.isNewSeek||null===this.audioWAudio||void 0===this.audioWAudio||(e=1e3*(t-this.audioWAudio.getAlignVPTS()),this.playPTS=Math.max(this.audioWAudio.getAlignVPTS(),this.playPTS)),n=r,0<e)return;if(this.playPTS=Math.max(t,this.playPTS),this.isNewSeek&&this.seekTarget-this.frameDur>t)return a=this.frameTime,void this._videoQueue.shift();this.isNewSeek&&(this.audioWAudio&&this.audioWAudio.setVoice(this.audioVoice),this.audioWAudio&&this.audioWAudio.play(),a=0,this.isNewSeek=!1,this.seekTarget=0,this.performance.seek[this.performance.seek.length-1].time=(new Date).getTime()-this.seekInitTime);var i=this._videoQueue.shift();if(this.showScreen&&this.onRender&&this.onRender(i.line1,i.height,i.data_y,i.data_u,i.data_v),h.renderFrame(this.yuv,i.data_y,i.data_u,i.data_v,i.line1,i.height),this.setPerformance(),this.onPlayingTime&&this.onPlayingTime(t),!this.isNewSeek&&this.audioWAudio&&(e<0&&-1*e<=s||0<=e)){if(this.config.playMode===f.PLAYER_MODE_VOD)if(t>=this.duration)this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.setPerformanceBrokenEnd(),this.onPlayingFinish&&this.onPlayingFinish(),this._clearDecInterval(),this.pause();else if(this._checkPlayFinished())return;a=d.GetMsTime()-r}else!this.isNewSeek&&this.audioWAudio&&(a=(e<0&&(e,s),this.frameTime))}this._checkPlayFinished()},30)}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play()}displayLoop(e){this.playFunc(e),this.requestAnimationFrameId=requestAnimationFrame(this.displayLoop.bind(this))}playFunc(t){if(this.nowTimestamp=d.GetMsTime(),0<this._videoQueue.length&&this.nowTimestamp-this.calcuteStartTime>=this.frameTime-this.playFrameCostTime){var i=this._videoQueue[0].pts;let e=0;if(this.isNewSeek||null===this.audioWAudio||void 0===this.audioWAudio||(e=1e3*(i-this.audioWAudio.getAlignVPTS()),this.playPTS=Math.max(this.audioWAudio.getAlignVPTS(),this.playPTS)),this.calcuteStartTime=this.nowTimestamp,0<e)return;if(this.playPTS=Math.max(i,this.playPTS),this.isNewSeek&&this.seekTarget-this.frameDur>i)return this.playFrameCostTime=this.frameTime,void this._videoQueue.shift();this.isNewSeek&&(this.audioWAudio&&this.audioWAudio.setVoice(this.audioVoice),this.audioWAudio&&this.audioWAudio.play(),this.playFrameCostTime=0,this.isNewSeek=!1,this.seekTarget=0);var n=this._videoQueue.shift();if(this.showScreen&&this.onRender&&this.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v),h.renderFrame(this.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height),this.setPerformance(),this.onPlayingTime&&this.onPlayingTime(i),!this.isNewSeek&&this.audioWAudio&&(e<0&&-1*e<=t||0<=e)){if(this.config.playMode===f.PLAYER_MODE_VOD)if(i>=this.duration)this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.onPlayingFinish&&this.onPlayingFinish(),this.setPerformanceBrokenEnd(),this._clearDecInterval(),this.pause();else if(this._checkPlayFinished())return;this.playFrameCostTime=d.GetMsTime()-this.nowTimestamp}else!this.isNewSeek&&this.audioWAudio&&(e<0&&-1*e>t?this.playFrameCostTime=this.frameTime:this.layFrameCostTime=this.frameTime)}this._checkPlayFinished()}pause(){this.isPlaying=!1,this._pause(),this.isCacheV===f.CACHE_WITH_PLAY_SIGN&&(this.isCacheV=f.CACHE_WITH_NOPLAY_SIGN)}_pause(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause()}seek(e,t={}){this.seekInitTime=(new Date).getTime(),this.performance.seek.push({seekPts:t.seekTime,fromSeekPts:this._videoQueue[0]&&this._videoQueue[0].pts||0,time:0}),this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=t.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(t.seekTime),setTimeout(()=>{this.yuvMaxTime=0,this._videoQueue.length=0,this.openFrameCall=!0,this.frameCallTag+=1,this._decVFrameIntervalFunc()},1e3)}setVoice(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}cacheIsFull(){return this._videoQueue.length>=this._VIDEO_CACHE_LEN}_checkDisplaySize(e,t,i){var e=this.config.width+Math.ceil((t-e)/2),n=t/this.config.width>i/this.config.height,r=(e/t).toFixed(2),a=(this.config.height/i).toFixed(2),n=n?r:a,r=this.config.fixed,a=r?e:parseInt(t*n),e=r?this.config.height:parseInt(i*n);return this.canvas.offsetWidth==a&&this.canvas.offsetHeight==e||(t=parseInt((this.canvasBox.offsetHeight-e)/2),r=(r=parseInt((this.canvasBox.offsetWidth-a)/2))<0?0:r,this.canvas.style.marginTop=(t=t<0?0:t)+"px",this.canvas.style.marginLeft=r+"px",this.canvas.style.width=a+"px",this.canvas.style.height=e+"px"),this.isCheckDisplay=!0,[a,e]}_createYUVCanvas(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=h.setupCanvas(this.canvas,{preserveDrawingBuffer:!1})}_avRecvPackets(){this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval(()=>{this.demuxWorker.postMessage({t:2,p:1}
10),this._avCheckRecvFinish()},5):this.avRecvInterval=window.setInterval(()=>{this.demuxWorker.postMessage({t:2,p:0}),this._avCheckRecvFinish()},5),this._avFeedData(0,!1)}_avCheckRecvFinish(){this.config.playMode===f.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()<this.frameDur&&this._avSetRecvFinished()}_avSetRecvFinished(){this.bufRecvStat=!0,null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),this.bufOK=!0}_afterAvFeedSeekToStartWithFinishedBuffer(e){let t=this,i=window.setInterval(()=>{t._videoQueue.length>=t._VIDEO_CACHE_LEN&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null)},10);return!0}_afterAvFeedSeekToStartWithUnFinBuffer(e){let t=this,i=window.setInterval(()=>{t._videoQueue.length>=t._VIDEO_CACHE_LEN&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null)},10);return!0}_avFeedData(n){let r=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),n<=0&&!1===this.bufOK){let i=0;if(r.avFeedVideoInterval=window.setInterval(()=>{var e=r.bufObject.videoBuffer.length;if(e-1>i||0<r.duration&&r.duration-r.getMaxPTS()<r.frameDur&&e-1==i){var t=r.bufObject.videoBuffer[i].length;if(0<t){for(let e=0;e<t;e++)r.playVPipe.push(l.ConstructWithDts(r.bufObject.videoBuffer[i][e].pts,r.bufObject.videoBuffer[i][e].dts,r.bufObject.videoBuffer[i][e].isKey,r.bufObject.videoBuffer[i][e].data,!0));i+=1}r.config.playMode===f.PLAYER_MODE_VOD&&r.duration-r.getMaxPTS()<r.frameDur&&0<r.playVPipe.length&&r.playVPipe[r.playVPipe.length-1].pts>=r.bufLastVDTS&&(window.clearInterval(r.avFeedVideoInterval),r.avFeedVideoInterval=null)}else r.config.playMode===f.PLAYER_MODE_VOD&&0<r.playVPipe.length&&r.playVPipe[r.playVPipe.length-1].pts>=r.duration&&(window.clearInterval(r.avFeedVideoInterval),r.avFeedVideoInterval=null);r.avSeekVState&&r.config.playMode===f.PLAYER_MODE_VOD&&(r._afterAvFeedSeekToStartWithFinishedBuffer(n),r.avSeekVState=!1)},5),void 0!==r.audioWAudio&&null!==r.audioWAudio&&r.config.ignoreAudio<1){let i=0;r.avFeedAudioInterval=window.setInterval(()=>{var e=r.bufObject.audioBuffer.length;if(e-1>i||r.duration-r.getMaxPTS()<r.frameDur&&e-1==i){var t=r.bufObject.audioBuffer[i].length;for(let e=0;e<t;e++)r.audioWAudio.addSample(new l.BufferFrame(r.bufObject.audioBuffer[i][e].pts,r.bufObject.audioBuffer[i][e].isKey,r.bufObject.audioBuffer[i][e].data,!1));i+=1,r.config.playMode===f.PLAYER_MODE_VOD&&r.duration-r.getMaxPTS()<r.frameDur&&0<r.audioWAudio.sampleQueue.length&&r.audioWAudio.sampleQueue[r.audioWAudio.sampleQueue.length-1].pts>=r.bufLastADTS&&(window.clearInterval(r.avFeedAudioInterval),r.avFeedAudioInterval=null)}else r.config.playMode===f.PLAYER_MODE_VOD&&0<r.audioWAudio.sampleQueue.length&&r.audioWAudio.sampleQueue[r.audioWAudio.sampleQueue.length-1].pts>=r.duration&&(window.clearInterval(r.avFeedAudioInterval),r.avFeedAudioInterval=null)},5)}}else{var e=this.bufObject.seekIDR(n),e=parseInt(e,10);this.playPTS=0;let i=e;if(this.avFeedVideoInterval=window.setInterval(()=>{var e=r.bufObject.videoBuffer.length;if(e-1>i||r.duration-r.getMaxPTS()<r.frameDur&&e-1==i){var t=r.bufObject.videoBuffer[i].length;if(0<t){for(let e=0;e<t;e++)r.playVPipe.push(l.ConstructWithDts(r.bufObject.videoBuffer[i][e].pts,r.bufObject.videoBuffer[i][e].dts,r.bufObject.videoBuffer[i][e].isKey,r.bufObject.videoBuffer[i][e].data,!0));i+=1}r.config.playMode===f.PLAYER_MODE_VOD&&r.duration-r.getMaxPTS()<r.frameDur&&0<r.playVPipe.length&&r.playVPipe[r.playVPipe.length-1].pts>=r.bufLastVDTS&&(window.clearInterval(r.avFeedVideoInterval),r.avFeedVideoInterval=null)}else r.config.playMode===f.PLAYER_MODE_VOD&&0<r.playVPipe.length&&r.playVPipe[r.playVPipe.length-1].pts>=r.duration&&(window.clearInterval(r.avFeedVideoInterval),r.avFeedVideoInterval=null);r.avSeekVState&&r.config.playMode===f.PLAYER_MODE_VOD&&(r._afterAvFeedSeekToStartWithUnFinBuffer(n),r.avSeekVState=!1)},5),this.audioWAudio&&this.config.ignoreAudio<1){let i=parseInt(n,10);this.avFeedAudioInterval=window.setInterval(()=>
10{var e=r.bufObject.audioBuffer.length;if(e-1>i||r.duration-r.getMaxPTS()<r.frameDur&&e-1==i){var t=r.bufObject.audioBuffer[i].length;for(let e=0;e<t;e++)r.bufObject.audioBuffer[i][e].pts<r.seekTarget||r.audioWAudio.addSample(new l.BufferFrame(r.bufObject.audioBuffer[i][e].pts,r.bufObject.audioBuffer[i][e].isKey,r.bufObject.audioBuffer[i][e].data,!1));i+=1,r.config.playMode===f.PLAYER_MODE_VOD&&r.duration-r.getMaxPTS()<r.frameDur&&0<r.audioWAudio.sampleQueue.length&&r.audioWAudio.sampleQueue[r.audioWAudio.sampleQueue.length-1].pts>=r.bufLastADTS&&(window.clearInterval(r.avFeedAudioInterval),r.avFeedAudioInterval=null)}else r.config.playMode===f.PLAYER_MODE_VOD&&0<r.audioWAudio.sampleQueue.length&&r.audioWAudio.sampleQueue[r.audioWAudio.sampleQueue.length-1].pts>=r.duration&&(window.clearInterval(r.avFeedAudioInterval),r.avFeedAudioInterval=null)},5)}}}_probeFinCallback(e,t,i,n,r,a,s,o,l){let u=this;this._createYUVCanvas(),this.config.fps=+n,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=o,this.config.sampleRate=a,this.channels=s,this.audioIdx=r,this.duration<0&&(this.config.playMode=f.PLAYER_MODE_NOTIME_LIVE),0<=r&&this.config.ignoreAudio<1?this.audioNone=!1:this.audioNone=!0,f.V_CODEC_NAME_HEVC===this.vCodecID&&(!1===this.audioNone&&(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=c({sampleRate:a,appendType:f.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache)&&this.audioWAudio.setOnLoadCache(()=>{if(u.retryAuSampleNo<=5){u.pause(),u.onLoadCache&&u.onLoadCache(),u.setPerformanceBrokenStart();let e=window.setInterval(()=>{2<u.audioWAudio.sampleQueue.length?(u.onLoadCacheFinshed&&u.onLoadCacheFinshed(),u.setPerformanceBrokenEnd(),u.play(),u.retryAuSampleNo=0,window.clearInterval(e),e=null):(u.retryAuSampleNo+=1,5<u.retryAuSampleNo&&(u.play(),u.onLoadCacheFinshed&&u.onLoadCacheFinshed(),u.setPerformanceBrokenEnd(),window.clearInterval(e),e=null))},1e3)}}),this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish()}_ptsFixed2(e){return Math.ceil(100*e)/100}_naluCallback(e,t,i,n,r,a,s,o){let l=this._ptsFixed2(a);0<o&&(l=a),this.bufObject.appendFrameWithDts(l,s,e,!0,i),this.bufLastVDTS=Math.max(s,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}_samplesCallback(e,t,i,n){}_aacFrameCallback(e,t,i,n){n=this._ptsFixed2(n);this.audioWAudio&&(this.bufObject.appendFrame(n,e,!1,!0),this.bufLastADTS=Math.max(n,this.bufLastADTS),this.aCachePTS=Math.max(n,this.aCachePTS),this.onCacheProcess)&&this.onCacheProcess(this.getCachePTS())}_setLoadCache(){var e;return null===this.avFeedVideoInterval&&null===this.avFeedAudioInterval&&this.playVPipe.length<=0?1:(e=this.isPlaying,this.pause(),this.onLoadCache&&this.onLoadCache(),this.isCacheV=e?f.CACHE_WITH_PLAY_SIGN:f.CACHE_WITH_NOPLAY_SIGN,0)}_setLoadCacheFinished(){this.isCacheV!==f.CACHE_NO_LOADCACHE&&(this.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.setPerformanceBrokenEnd(),this.isCacheV=f.CACHE_NO_LOADCACHE)}_createDecVframeInterval(e=10){let i=this;null!==this.decVFrameInterval&&(window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null),this.naluLListLength=0,this.loopMs=e,this.decVFrameInterval=window.setInterval(()=>{var e,t;i._videoQueue.length<1?i._setLoadCache():i._videoQueue.length>=i._VIDEO_CACHE_LEN&&i._setLoadCacheFinished(),i._videoQueue.length<i._VIDEO_CACHE_LEN&&this.naluLListLength<=i._VIDEO_CACHE_LEN&&0<i.playVPipe.length&&(100===i.loopMs&&i._createDecVframeInterval(10),t=(e=i.playVPipe.shift()).data,i.yuvMaxTime=Math.max(e.pts,i.yuvMaxTime),t={t:1,nalBuf:t,pts:e.pts,flushDecoder:0},this.decoder.postMessage(t))},e)}_decVFrameIntervalFunc(){null==this.decVFrameInterval&&this._createDecVframeInterval(10)}_frameCallback(e,t,i,n,r,a,s,o,l,u){if(this.canvas){if(!1===this.openFrameCall)return-1;if(u!==this.frameCallTag)return-2;if(l>this.yuvMaxTime+this.frameDur)return-3;if(this.isNewSeek&&this.seekTarget-l>3*this.frameDur)return-4;var h=this._videoQueue.length;if(this.canvas.width==n&&this.canvas.height==o||(this.canvas.width=n,this.canvas.height=o,this.isCheckDisplay)||this._checkDisplaySize(s,n,o),this.playPTS>l)return-5;var d=new m(e,t,i,n,r,a,s,o,l);if(h<=0||l>this._videoQueue[h-1].pts)this._videoQueue.push(d);else if(l<this._videoQueue[0].pts)this._videoQueue.splice(0,0,d);else if(l<this._videoQueue[h-1].pts)for(let e=0;e<h;e++)if(l>this._videoQueue[e].pts&&e+1<h&&l<this._videoQueue[e+1].pts){this._videoQueue.splice(e+1,0,d);break}return this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS()),this.config.readyShow&&!0===this.playYUV()&&(this.config.readyShow=!1,this.onReadyShowDone)&&this.onReadyShowDone(),0}}_handleFrameYUVCallback(e,t,i,n,r,a,s,o,l,u){e=new Uint8Array(e),t=new Uint8Array(t),i=new Uint8Array(i);if(!(!1===this.openFrameCall||u!==this.frameCallTag||l>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-l>3*this.frameDur)){var h=this._videoQueue.length;if(this.canvas.width==n&&this.canvas.height==o||(this.canvas.width=n,this.canvas.height=o,this.isCheckDisplay)||this._checkDisplaySize(s,n,o),!(this.playPTS>l)){var d=new m(e,t,i,n,r,a,s,o,l);if(h<=0||l>this._videoQueue[h-1].pts)this._videoQueue.push(d);else if(l<this._videoQueue[0].pts)this._videoQueue.splice(0,0,d);else if(l<this._videoQueue[h-1].pts)for(let e=0;e<h;e++)if(l>this._videoQueue[e].pts&&e+1<h&&l<this._videoQueue[e+1].pts){this._videoQueue.splice(e+1,0,d);break}this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS()),this.config.readyShow&&!0===this.playYUV()&&(this.config.readyShow=!1,this.onReadyShowDone)&&this.onReadyShowDone()}}}
10playYUV(){var e;return 0<this._videoQueue.length&&(e=this._videoQueue.shift(),this.onRender&&this.onRender(e.line1,e.height,e.data_y,e.data_u,e.data_v),h.renderFrame(this.yuv,e.data_y,e.data_u,e.data_v,e.line1,e.height),!0)}setProbeSize(e){this.probeSize=e}setPerformance(){var e;this.frameRate++,-1==this.performance.firstFrameTime&&(this.performance.firstFrameTime=(new Date).getTime()-this.startPlayTime),this.oneScondTime&&1e3<(new Date).getTime()-this.oneScondTime&&(e=JSON.parse(JSON.stringify(this.frameRate)),this.frameRate=0,this.oneScondTime=(new Date).getTime(),this.performance.frameRate=e,0<this._videoQueue.length&&(this.performance.buffer=this._videoQueue[this._videoQueue.length-1].pts-this._videoQueue[0].pts),this.onPerformance)&&this.onPerformance(this.performance)}setPerformanceBrokenStart(){this.performance.broken.push({start:(new Date).getTime(),end:null,time:null})}setPerformanceBrokenEnd(){var e,t=this.performance.broken[this.performance.broken.length-1];t&&null==t.end&&(e=(new Date).getTime(),t.end=e,t.time=e-t.start)}pushBuffer(e){return this.demuxWorker.postMessage({t:1,d:e,probeSize:this.probeSize},[e]),0}}}},function(e,t,i){"use strict";i.r(t);var n=i(91),r=i.n(n),a=i(49),s=i(23),o=i(22),n=i(1),l=i.n(n);i(37),i(26),i(34),i(35);const u=i(36),h=i(10);i(57);const d=i(46),c=i(5),f=i(25);t.default={CHttpLiveCore:class{constructor(e){let t=this;this.config={width:e.width||c.DEFAULT_WIDTH,height:e.height||c.DEFAULT_HEIGHT,fps:e.fps||c.DEFAULT_FPS,sampleRate:e.sampleRate||c.DEFAULT_SAMPLERATE,playerId:e.playerId||c.DEFAILT_WEBGL_PLAY_ID,token:e.token||null,probeSize:e.probeSize||4096,ignoreAudio:e.ignoreAudio||0,autoPlay:e.autoPlay||!1},this.mediaInfo={noFPS:!1,fps:c.DEFAULT_FPS,width:this.config.width,height:this.config.height,sampleRate:this.config.sampleRate,size:{width:-1,height:-1},audioNone:!1},this.duration=-1,this.vCodecID=c.V_CODEC_NAME_HEVC,this.corePtr=null,this.AVGetInterval=null,this.AVDecodeInterval=null,this.decVFrameInterval=null,this.readyShowDone=!1,this.readyKeyFrame=!1,this.cache_status=!1,this.download_length=0,this.AVGLObj=null,this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.CanvasObj=null,this.CanvasObj=document.createElement("canvas"),this.CanvasObj.style.width=this.canvasBox.clientWidth+"px",this.CanvasObj.style.height=this.canvasBox.clientHeight+"px",this.CanvasObj.style.top="0px",this.CanvasObj.style.left="0px",this.canvasBox.appendChild(this.CanvasObj),this.audioWAudio=null,this.audioVoice=1,this.isCacheV=c.CACHE_NO_LOADCACHE,this.muted=this.config.autoPlay,!0===this.config.autoPlay&&this.config.ignoreAudio<1&&(window.onclick=document.body.onclick=function(e){t.muted=!1,t._reinitAudioModule(t.mediaInfo.sampleRate),!0===t.isPlayingState()&&(t.pause(),t.play()),window.onclick=document.body.onclick=null}),this.frameTimeSec=1/this.config.fps,this.frameTime=1e3*this.frameTimeSec,this.NaluBuf=[],this.YuvBuf=[],this.getPackageTimeMS=0,this.workerFetch=null,this.playInterval=null,this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null,this.totalLen=0,this.pushPkg=0,this.showScreen=!1,this.onProbeFinish=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onRender=null,this.onReadyShowDone=null,this.onError=null,this.onPlayState=null,this.decoder=null,this.demuxWorker=null,this.isWasmInit=!1,this.isDemuxWasmInit=!1,this._emitter=new r.a,this.makeWasm(),this.onWasmFinished=null,this.naluLListLength=0,this.time=0,this.resampleFps=0,this.requestAnimationFrameId=null,this.calcuteStartTime=0,this.nowTimestamp=0,this.playFrameCostTime=0,this.performance={frameRate:30,buffer:0,broken:[],bitRate:0,decodeFrameRate:30,firstFrameTime:-1,playStyle:"",height:0,width:0,code:null,progress:0},this.oneScondTime=(new Date).getTime(),this.frameRate=0,this.startPlayTime=0,this.onPerformance=null}makeWasm(){var e=Object(o.getPlayerPath)();this.demuxWorker=new a.a,this.demuxWorker.postMessage({t:111,pathUrl:e,isSafari:l.a.isSafari()}),this.demuxWorker.onmessage=e=>{var t=e["data"];switch(t.t){case 0:-1==this.performance.firstFrameTime&&(this.startPlayTime=(new Date).getTime()),this.config.token&&this.demuxWorker.postMessage({t:0,data:{token:this.config.token,playerVersion:f.PLAYER_VERSION,ignoreAudio:this.config.ignoreAudio,playModeEnum:this.playModeEnum,defaultFps:this.config.defaultFps,mode:1}});break;case 1:this.isDemuxWasmInit=!0,this._emitter.emit("isDemuxWasmInit",!0),this.isWasmInit&&this.onWasmFinished&&this.onWasmFinished();break;case 2:var{duration:i,width:n,height:r,fps:a,audioIdx:s,sample_rate:o,channels:l,vcodec_name_id:u,sample_fmt:h,trans_to_gcore:d}=t;this._callbackProbe(i,n,r,a,s,o,l,u,h,d);break;case 3:var{d:i,len:n,isKey:r,pts:a,dts:s,isRawStream:o}=t;this._callbackNALU(i,n,r,t.width,t.height,a,s,o);break;case 4:var{line1:l,channel:u}=t;this._callbackAAC(t.d,l,u,t.pts);break;case 5:this._frameCallback(t.buf_y,t.buf_u,t.buf_v,t.line1,t.line2,t.line3,t.width,t.height,t.pts,t.tag);break;case 6:this.naluLListLength=t.l}},this.decoder=new s.a,this.decoder.postMessage({t:111,pathUrl:e,isSafari:l.a.isSafari()}),this.decoder.onmessage=e=>{var t,i=e["data"];switch(i.t){case 0:this.config.token&&this.decoder.postMessage({t:0,data:{token:this.config.token,playerVersion:f.PLAYER_VERSION,videoCodec:this.videoCodec}});break;case 1:3<this.resampleFps?(this.resampleFps=0,this.decoder.postMessage(t={t:2,f:i},[t.f.y.buffer,t.f.u.buffer,t.f.v.buffer])):(this.resampleFps++,this.performance.width||(this.performance.width=i.width,this.performance.height=i.height),this._callbackYUV(i.y,i.u,i.v,i.stride_y,i.stride_u,i.stride_v,i.width,i.height,i.ptsSec,this.frameCallTag));break;case 2:this.isWasmInit=!0,this.isDemuxWasmInit&&this.onWasmFinished&&this.onWasmFinished();break;case 3:this.performance.decodeFrameRate=i.frameRate}}}_workerFetch_onmessage(e,t){var i=e.data;let n=null;switch(n=void 0===i.cmd||null===i.cmd?"":i.cmd){case"startok":t.getPackageTimeMS=h.GetMsTime(),void 0!==t.AVGetInterval&&null!==t.AVGetInterval||(t.AVGetInterval=window.setInterval(function(){t.demuxWorker.postMessage({t:6}),t.naluLListLength>t.config.probeSize?(t.demuxWorker.postMessage({t:5}),--t.pushPkg):0<t.getPackageTimeMS&&h.GetMsTime()-t.getPackageTimeMS>=c.FETCH_HTTP_FLV_TIMEOUT_MS&&(t.getPackageTimeMS=h.GetMsTime(),t.workerFetch.postMessage({cmd:"retry",data:null,msg:"retry"}))},5));break;case"fetch-chunk":let e=i.data;t.download_length+=e.length;setTimeout(function(){t.demuxWorker.postMessage({t:7,d:e,probeSize:t.config.probeSize},[e.buffer])},0),t.totalLen+=e.length,0<e.length&&(t.getPackageTimeMS=h.GetMsTime()),t.pushPkg++;break;
10case"close":t.AVGetInterval&&clearInterval(t.AVGetInterval),t.AVGetInterval=null;break;case"fetch-fin":break;case"fetch-error":t.onError&&t.onError(i.data)}}_checkDisplaySize(e,t,i){var e=this.config.width+Math.ceil((t-e)/2),n=t/this.config.width>i/this.config.height,r=(e/t).toFixed(2),a=(this.config.height/i).toFixed(2),n=n?r:a,r=this.config.fixed,a=r?e:parseInt(t*n),e=r?this.config.height:parseInt(i*n);return this.CanvasObj.offsetWidth==a&&this.CanvasObj.offsetHeight==e||(t=parseInt((this.canvasBox.offsetHeight-e)/2),r=(r=parseInt((this.canvasBox.offsetWidth-a)/2))<0?0:r,this.CanvasObj.style.marginTop=(t=t<0?0:t)+"px",this.CanvasObj.style.marginLeft=r+"px",this.CanvasObj.style.width=a+"px",this.CanvasObj.style.height=e+"px"),this.isCheckDisplay=!0,[a,e]}_ptsFixed2(e){return Math.ceil(100*e)/100}_reinitAudioModule(e=44100){0<this.config.ignoreAudio||(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=d({sampleRate:e,appendType:c.APPEND_TYPE_FRAME}),this.audioWAudio.isLIVE=!0)}_callbackProbe(e,t,i,n,r,a,s,o,l,u=0){if(1===u)this.onProbeFinish&&this.onProbeFinish(u);else{let e=n;100<n&&(e=c.DEFAULT_FPS,this.mediaInfo.noFPS=!0),this.vCodecID=o,this.config.fps=e,this.mediaInfo.fps=e,this.mediaInfo.size.width=t,this.mediaInfo.size.height=i,this.frameTime=Math.floor(1e3/(this.mediaInfo.fps+5)),this.chaseFrame=0,this.CanvasObj.width==t&&this.CanvasObj.height==i||(this.CanvasObj.width=t,this.CanvasObj.height=i,this.isCheckDisplay)||this._checkDisplaySize(t,t,i),0<=r&&!1===this.mediaInfo.noFPS?(this.config.sampleRate=a,this.mediaInfo.sampleRate=a,this.config.ignoreAudio<1&&!1===this.muted&&this._reinitAudioModule(this.mediaInfo.sampleRate)):this.mediaInfo.audioNone=!0,this.onProbeFinish&&this.onProbeFinish()}}_callbackYUV(e,t,i,n,r,a,s,o,l,u){this.YuvBuf.push({bufY:e,bufU:t,bufV:i,line_y:n,h:o,pts:l}),this.checkCacheState(),!1===this.readyShowDone&&!0===this.playYUV()&&(this.readyShowDone=!0,this.onReadyShowDone&&this.onReadyShowDone(),this.audioWAudio||!0!==this.config.autoPlay||(this.play(),setTimeout(function(){},3e3)))}_callbackNALU(e,t,i,n,r,a,s){if(!1===this.readyKeyFrame){if(i<=0)return;this.readyKeyFrame=!0}this.NaluBuf.push({bufData:e,len:t,isKey:i,w:n,h:r,pts:1e3*a,dts:1e3*s})}_callbackPCM(e){this.config.ignoreAudio}_callbackAAC(e,t,i,n){0<this.config.ignoreAudio||(n=this._ptsFixed2(n),this.audioWAudio&&!1===this.muted&&(this.audioWAudio.addSample({pts:n,data:e}),this.checkCacheState()))}_decode(e=0){let t=this;setTimeout(()=>{var e;null!==t.workerFetch&&(null!=(e=t.NaluBuf.shift())&&(e={t:1,nalBuf:e.bufData,pts:e.pts,flushDecoder:0},this.decoder.postMessage(e)),t._decode())},1)}setScreen(e=!1){this.showScreen=e}checkCacheState(){var e=25<=this.YuvBuf.length&&(!0===this.muted||0<this.config.ignoreAudio||!0===this.mediaInfo.audioNone||this.audioWAudio&&50<=this.audioWAudio.sampleQueue.length);return!1===this.cache_status&&e&&(this.playInterval&&this.audioWAudio&&this.audioWAudio.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.setPerformanceBrokenEnd(),this.cache_status=!0),e}setVoice(e){this.config.ignoreAudio<1&&(this.audioWAudio||(this.muted=!1,this._reinitAudioModule(this.mediaInfo.sampleRate)),this.audioVoice=e,this.audioWAudio)&&this.audioWAudio.setVoice(e)}_removeBindFuncPtr(){}release(){return this.pause(),this.NaluBuf.length=0,void(this.YuvBuf.length=0)!==this.workerFetch&&null!==this.workerFetch&&this.workerFetch.postMessage({cmd:"stop",data:"stop",msg:"stop"}),this.workerFetch=null,this.AVGetInterval&&clearInterval(this.AVGetInterval),this.AVGetInterval=null,this._removeBindFuncPtr(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null,void 0!==this.AVGLObj&&null!==this.AVGLObj&&(u.releaseContext(this.AVGLObj),this.AVGLObj=null),this.CanvasObj&&this.CanvasObj.remove(),this.CanvasObj=null,window.onclick=document.body.onclick=null,delete window.g_players[this.corePtr],0}isPlayingState(){return null!==this.playInterval&&void 0!==this.playInterval}pause(){this.config.ignoreAudio<1&&this.audioWAudio&&this.audioWAudio.pause(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.chaseFrame=0,this.onPlayState&&this.onPlayState(this.isPlayingState())}playYUV(){var e;return 0<this.YuvBuf.length&&(e=this.YuvBuf.shift(),this.onRender&&this.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),u.renderFrame(this.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),!0)}play(){this.performance.playStyle="flv_live",this.performance.code="hevc";let s=this;if(this.chaseFrame=0,!1===this.checkCacheState())return this.onLoadCache&&this.onLoadCache(),setTimeout(()=>{this.play()},100),!1;const i=+s.frameTime;if(void 0===this.playInterval||null===this.playInterval){let n=0,r=0,a=0;if(this.config.ignoreAudio<1&&!1===this.mediaInfo.audioNone&&null!=this.audioWAudio&&!1===this.mediaInfo.noFPS)this.playInterval=setInterval(function(){var e,t;r=h.GetMsTime(),s.cache_status?r-n>=s.frameTime-a&&(0<s.YuvBuf[0].pts-1e3*s.audioWAudio.getAlignVPTS()||(null!=(e=s.YuvBuf.shift())&&null!==e&&(t=0,a=null===s.audioWAudio||void 0===s.audioWAudio||(t=1e3*(e.pts-s.audioWAudio.getAlignVPTS()))<0&&-1*t<=i||0<t&&t<=i||0==t||0<t&&t>i?h.GetMsTime()-r+1:(t<0&&i,s.frameTime),s.showScreen&&s.onRender&&s.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),u.renderFrame(s.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),s.setPerformance()),(s.YuvBuf.length<=0||s.audioWAudio&&s.audioWAudio.sampleQueue.length<=0)&&(s.cache_status=!1,s.onLoadCache&&s.onLoadCache(),s.audioWAudio&&s.audioWAudio.pause(),s.setPerformanceBrokenStart()),n=r)):a=s.frameTime},30),this.audioWAudio&&this.audioWAudio.play();else{let i=-1;this.playInterval=setInterval(function(){if(r=h.GetMsTime(),s.cache_status){let e=-1;var t;0<i&&(e=r-n,s.frameTime,a,s.chaseFrame<=0)&&0<a&&(s.chaseFrame=Math.floor(a/s.frameTime)),!(i<=0||e>=s.frameTime||0<s.chaseFrame)||h.GetMsTime()&&h.GetMsTime()<s.YuvBuf[0].pts||(i=1,null!=(t=s.YuvBuf.shift())&&null!==t&&(s.showScreen&&s.onRender&&s.onRender(t.line_y,t.h,t.bufY,t.bufU,t.bufV),u.renderFrame(s.AVGLObj,t.bufY,t.bufU,t.bufV,t.line_y,t.h),s.setPerformance(),a=h.GetMsTime()-r+1),s.YuvBuf.length<=0&&(s.cache_status=!1,s.onLoadCache&&s.onLoadCache(),s.setPerformanceBrokenStart()),n=r,0<s.chaseFrame&&(s.chaseFrame--,0===s.chaseFrame)&&(a=s.frameTime))}else a=s.frameTime,i=-1,s.chaseFrame=0,n=0,r=0,a=0},30)}}this.onPlayState&&this.onPlayState(this.isPlayingState())}isLoad(e){this.isDemuxWasmInit?e():this._emitter.addListener("isDemuxWasmInit",()=>{e()})}start(e){let t=this;this.isLoad(()=>{this.workerFetch=new Worker(h.GetScriptPath(function(){let n=null,r=new AbortController,a=r.signal;self;let s=e=>{fetch(e,{signal:a}).then(function(e){let i=function(t){return t.read().then(function(e){if(!e.done)return e=e.value,self.postMessage({cmd:"fetch-chunk",data:e,msg:"fetch-chunk"}),i(t);self.postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"})})};return i(e.body.getReader())}).catch(function(e){e.toString().includes("user aborted")||(e=" httplive request error:"+e+" start to retry",self.postMessage({cmd:"fetch-error",data:e,msg:"fetch-error"}))})};self.onmessage=e=>{var t=e.data;let i=null;switch(i=void 0===t.cmd||null===t.cmd?"":t.cmd){case"start":n=t.data,s(n),self.postMessage({cmd:"startok",data:"WORKER STARTED",msg:"startok"});break;case"stop":r.abort(),self.close(),self.postMessage({cmd:"close",data:"close",msg:"close"});break;case"retry":r.abort(),r=null,a=null,r=new AbortController,a=r.signal,setTimeout(function(){s(n)},3e3)}}})),this.workerFetch.onmessage=function(e){t._workerFetch_onmessage(e,t)},this.AVGLObj=u.setupCanvas(this.CanvasObj,{preserveDrawingBuffer:!1}),this.workerFetch.postMessage({cmd:"start",data:e,msg:"start"}),this._decode()})}setPerformance(){var e;this.frameRate++,-1==this.performance.firstFrameTime&&(this.performance.firstFrameTime=(new Date).getTime()-this.startPlayTime),this.oneScondTime&&1e3
10<(new Date).getTime()-this.oneScondTime&&(e=JSON.parse(JSON.stringify(this.frameRate)),this.frameRate=0,this.oneScondTime=(new Date).getTime(),this.performance.frameRate=e,0<this.YuvBuf.length&&(this.performance.buffer=(this.YuvBuf[this.YuvBuf.length-1].pts-this.YuvBuf[0].pts)/100),this.onPerformance)&&this.onPerformance(this.performance)}setPerformanceBrokenStart(){this.performance.broken.push({start:(new Date).getTime(),end:null,time:null})}setPerformanceBrokenEnd(){var e,t=this.performance.broken[this.performance.broken.length-1];t&&null==t.end&&(e=(new Date).getTime(),t.end=e,t.time=e-t.start)}}}},function(e,t,i){i(37),i(26),i(34),i(35);const o=i(36),l=i(10);i(57),i(46);const n=i(159),f=i(5);i(25);t.CHttpG711Core=class{constructor(e){let t=this;this.config={width:e.width||f.DEFAULT_WIDTH,height:e.height||f.DEFAULT_HEIGHT,fps:e.fps||f.DEFAULT_FPS,sampleRate:e.sampleRate||f.DEFAULT_SAMPLERATE,playerId:e.playerId||f.DEFAILT_WEBGL_PLAY_ID,token:e.token||null,probeSize:e.probeSize||4096,ignoreAudio:e.ignoreAudio||0,autoPlay:e.autoPlay||!1},alert("this.config.probeSize"+this.config.probeSize+" ignoreAudio:"+this.config.ignoreAudio),this.mediaInfo={noFPS:!1,fps:f.DEFAULT_FPS,width:this.config.width,height:this.config.height,sampleRate:this.config.sampleRate,size:{width:-1,height:-1},audioNone:!1},this.duration=-1,this.vCodecID=f.V_CODEC_NAME_HEVC,this.corePtr=null,this.AVGetInterval=null,this.readyShowDone=!1,this.readyKeyFrame=!1,this.cache_status=!1,this.download_length=0,this.AVGLObj=null,this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.CanvasObj=null,this.CanvasObj=document.createElement("canvas"),this.CanvasObj.style.width=this.canvasBox.clientWidth+"px",this.CanvasObj.style.height=this.canvasBox.clientHeight+"px",this.CanvasObj.style.top="0px",this.CanvasObj.style.left="0px",this.canvasBox.appendChild(this.CanvasObj),this.audioWAudio=null,this.audioVoice=1,this.muted=this.config.autoPlay,!0===this.config.autoPlay&&this.config.ignoreAudio<1&&(window.onclick=document.body.onclick=function(e){t.muted=!1,t._reinitAudioModule(t.mediaInfo.sampleRate),!0===t.isPlayingState()&&(t.pause(),t.play()),window.onclick=document.body.onclick=null}),this.frameTime=1e3/this.config.fps,this.NaluBuf=[],this.YuvBuf=[],this.getPackageTimeMS=0,this.workerFetch=null,this.playInterval=null,this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null,this.totalLen=0,this.pushPkg=0,this.showScreen=!1,this.onProbeFinish=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onRender=null,this.onReadyShowDone=null,this.onError=null,this.onPlayState=null,this.corePtr=Module.cwrap("AVSniffHttpG711Init","number",["string","string"])(this.config.token,"0.0.0")}_workerFetch_onmessage(e,n){var r=e.data;let a=null;switch(a=void 0===r.cmd||null===r.cmd?"":r.cmd){case"startok":alert("startok"),n.getPackageTimeMS=l.GetMsTime(),void 0!==n.AVGetInterval&&null!==n.AVGetInterval||(n.AVGetInterval=window.setInterval(function(){Module.cwrap("getG711BufferLengthApi","number",["number"])(n.corePtr)<=n.config.probeSize&&0<n.getPackageTimeMS&&l.GetMsTime()-n.getPackageTimeMS>=f.FETCH_HTTP_FLV_TIMEOUT_MS&&(n.getPackageTimeMS=l.GetMsTime(),n.workerFetch.postMessage({cmd:"retry",data:null,msg:"retry"}))},5));break;case"fetch-chunk":let t=r.data,i=void(n.download_length+=t.length);setTimeout(function(){var e=Module._malloc(t.length);Module.HEAP8.set(t,e),i=Module.cwrap("pushSniffG711FlvData","number",["number","number","number","number"])(n.corePtr,e,t.length,n.config.probeSize),Module._free(e)},0),n.totalLen+=t.length,0<t.length&&(n.getPackageTimeMS=l.GetMsTime()),n.pushPkg++;break;case"close":n.AVGetInterval&&clearInterval(n.AVGetInterval),n.AVGetInterval=null;case"fetch-fin":break;case"fetch-error":n.onError&&n.onError(r.data)}}_checkDisplaySize(e,t,i){var e=this.config.width+Math.ceil((t-e)/2),n=t/this.config.width>i/this.config.height,r=(e/t).toFixed(2),a=(this.config.height/i).toFixed(2),n=n?r:a,r=this.config.fixed,a=r?e:parseInt(t*n),e=r?this.config.height:parseInt(i*n);return this.CanvasObj.offsetWidth==a&&this.CanvasObj.offsetHeight==e||(t=parseInt((this.canvasBox.offsetHeight-e)/2),r=(r=parseInt((this.canvasBox.offsetWidth-a)/2))<0?0:r,this.CanvasObj.style.marginTop=(t=t<0?0:t)+"px",this.CanvasObj.style.marginLeft=r+"px",this.CanvasObj.style.width=a+"px",this.CanvasObj.style.height=e+"px"),this.isCheckDisplay=!0,[a,e]}_ptsFixed2(e){return Math.ceil(100*e)/100}_reinitAudioModule(e=0){void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=n()}_callbackProbe(e,t,i,n,r,a,s,o,l){var u=Module.HEAPU8.subarray(l,l+10);let h="";for(let e=0;e<u.length;e++){var d=String.fromCharCode(u[e]);h+=d}let c=n;100<n&&(c=f.DEFAULT_FPS,this.mediaInfo.noFPS=!0),this.vCodecID=o,this.config.fps=c,this.mediaInfo.fps=c,this.mediaInfo.size.width=t,this.mediaInfo.size.height=i,this.frameTime=Math.floor(1e3/(this.mediaInfo.fps+2)),this.CanvasObj.width==t&&this.CanvasObj.height==i||(this.CanvasObj.width=t,this.CanvasObj.height=i,this.isCheckDisplay)||this._checkDisplaySize(t,t,i),0<=r&&!1===this.mediaInfo.noFPS?(this.config.sampleRate=a,this.mediaInfo.sampleRate=a,!1===this.muted&&this._reinitAudioModule(this.mediaInfo.sampleRate)):this.mediaInfo.audioNone=!0,this.onProbeFinish&&this.onProbeFinish()}_callbackYUV(e,t,i,n,r,a,s,o,l,u){var e=Module.HEAPU8.subarray(e,e+n*o),h=new Uint8Array(e),t=Module.HEAPU8.subarray(t,t+r*o/2),r=new Uint8Array(t),i=Module.HEAPU8.subarray(i,i+a*o/2),a=new Uint8Array(i);this.YuvBuf.push({bufY:h,bufU:r,bufV:a,line_y:n,h:o,pts:l}),this.checkCacheState(),Module._free(e),Module._free(t),Module._free(i),!1===this.readyShowDone&&!0===this.playYUV()&&(this.readyShowDone=!0,this.onReadyShowDone&&this.onReadyShowDone(),this.audioWAudio||
10!0!==this.config.autoPlay||(this.play(),setTimeout(function(){},3e3)))}_callbackNALU(e,t,i,n,r,a,s){if(!1===this.readyKeyFrame){if(i<=0)return;this.readyKeyFrame=!0}var e=Module.HEAPU8.subarray(e,e+t),o=new Uint8Array(e);this.NaluBuf.push({bufData:o,len:t,isKey:i,w:n,h:r,pts:1e3*a,dts:1e3*s}),Module._free(e)}_callbackPCM(e,t,i,n){e=Module.HEAPU8.subarray(e,e+t),t=new Uint8Array(e).buffer,e=this._ptsFixed2(i);let r=null;i=t.byteLength%4,i={pts:e,data:r=0!=i?((e=new Uint8Array(t.byteLength+i)).set(new Uint8Array(t),0),new Float32Array(e.buffer)):new Float32Array(t)};this.audioWAudio.addSample(i),this.checkCacheState()}_decode(){let e=this;setTimeout(()=>{null!==e.workerFetch&&(Module.cwrap("decodeG711Frame","number",["number"])(e.corePtr),e._decode())},1)}setScreen(e=!1){this.showScreen=e}checkCacheState(){var e=25<=this.YuvBuf.length&&(!0===this.mediaInfo.audioNone||this.audioWAudio&&50<=this.audioWAudio.sampleQueue.length);return!1===this.cache_status&&e&&(this.playInterval&&this.audioWAudio&&this.audioWAudio.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.cache_status=!0),e}setVoice(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}_removeBindFuncPtr(){null!==this._ptr_probeCallback&&Module.removeFunction(this._ptr_probeCallback),null!==this._ptr_frameCallback&&Module.removeFunction(this._ptr_frameCallback),null!==this._ptr_naluCallback&&Module.removeFunction(this._ptr_naluCallback),null!==this._ptr_sampleCallback&&Module.removeFunction(this._ptr_sampleCallback),null!==this._ptr_aacCallback&&Module.removeFunction(this._ptr_aacCallback),this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null}release(){return this.pause(),this.NaluBuf.length=0,void(this.YuvBuf.length=0)!==this.workerFetch&&null!==this.workerFetch&&this.workerFetch.postMessage({cmd:"stop",data:"stop",msg:"stop"}),this.workerFetch=null,this.AVGetInterval&&clearInterval(this.AVGetInterval),this.AVGetInterval=null,this._removeBindFuncPtr(),void 0!==this.corePtr&&null!==this.corePtr&&Module.cwrap("releaseG711","number",["number"])(this.corePtr),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null,void 0!==this.AVGLObj&&null!==this.AVGLObj&&(o.releaseContext(this.AVGLObj),this.AVGLObj=null),this.CanvasObj&&this.CanvasObj.remove(),this.CanvasObj=null,window.onclick=document.body.onclick=null,delete window.g_players[this.corePtr],0}isPlayingState(){return null!==this.playInterval&&void 0!==this.playInterval}pause(){this.audioWAudio&&this.audioWAudio.pause(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.onPlayState&&this.onPlayState(this.isPlayingState())}playYUV(){var e;return 0<this.YuvBuf.length&&(e=this.YuvBuf.shift(),this.onRender&&this.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),o.renderFrame(this.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),!0)}play(){let a=this;if(!1===this.checkCacheState())return this.onLoadCache&&this.onLoadCache(),setTimeout(()=>{a.play()},100),!1;const s=+a.frameTime;if(void 0===this.playInterval||null===this.playInterval){let i=0,n,r=0;!1===this.mediaInfo.audioNone&&this.audioWAudio&&!1===this.mediaInfo.noFPS?(this.playInterval=setInterval(function(){var e,t;n=l.GetMsTime(),a.cache_status?n-i>=a.frameTime-r&&(null!=(e=a.YuvBuf.shift())&&null!==e&&(t=0,r=null===a.audioWAudio||void 0===a.audioWAudio||(t=1e3*(e.pts-a.audioWAudio.getAlignVPTS()))<0&&-1*t<=s||0<t&&t<=s||0==t||0<t&&t>s?l.GetMsTime()-n+1:(t<0&&s,a.frameTime),a.showScreen&&a.onRender&&a.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),o.renderFrame(a.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h)),a.YuvBuf.length<=0&&(a.cache_status=!1,a.onLoadCache&&a.onLoadCache(),a.audioWAudio)&&a.audioWAudio.pause(),i=n):r=a.frameTime},1),this.audioWAudio&&this.audioWAudio.play()):this.playInterval=setInterval(function(){var e=a.YuvBuf.shift();null!=e&&null!==e&&(a.showScreen&&a.onRender&&a.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),o.renderFrame(a.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h)),a.YuvBuf.length<=0&&(a.cache_status=!1)},a.frameTime)}this.onPlayState&&this.onPlayState(this.isPlayingState())}start(e){let t=this;this.workerFetch=new Worker(l.GetScriptPath(function(){let n=null,r=new AbortController,a=r.signal;self;let s=e=>{fetch(e,{signal:a}).then(function(e){let i=function(t){return t.read().then(function(e){if(!e.done)return e=e.value,self.postMessage({cmd:"fetch-chunk",data:e,msg:"fetch-chunk"}),i(t);self.postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"})})};return i(e.body.getReader())}).catch(function(e){e.toString().includes("user aborted")||(e=" httplive request error:"+e+" start to retry",self.postMessage({cmd:"fetch-error",data:e,msg:"fetch-error"}))})};self.onmessage=e=>{var t=e.data;let i=null;switch(i=void 0===t.cmd||null===t.cmd?"":t.cmd){case"start":n=t.data,s(n),self.postMessage({cmd:"startok",data:"WORKER STARTED",msg:"startok"});break;case"stop":r.abort(),self.close(),self.postMessage({cmd:"close",data:"close",msg:"close"});break;case"retry":r.abort(),r=null,a=null,r=new AbortController,a=r.signal,setTimeout(function(){s(n)},3e3)}}})),this.workerFetch.onmessage=function(e){t._workerFetch_onmessage(e,t)},this._ptr_probeCallback=Module.addFunction(this._callbackProbe.bind(this),"vdiidiiiiii"),this._ptr_yuvCallback=Module.addFunction(this._callbackYUV.bind(this),"vi"),this._ptr_sampleCallback=Module.addFunction(this._callbackPCM.bind(this),"vi");Module.cwrap("initializeSniffG711Module","number",["number","number","number","number","number","number"])(this.corePtr,this._ptr_probeCallback,this._ptr_yuvCallback,this._ptr_sampleCallback,0,1);this.AVGLObj=o.setupCanvas(this.CanvasObj,{preserveDrawingBuffer:!1}),this.workerFetch.postMessage({cmd:"start",data:e,msg:"start"}),0===f.H265WEBJS_COMPILE_MULTI_THREAD_SHAREDBUFFER&&this._decode()}}},function(e,t,i){const n=window.AudioContext||window.webkitAudioContext,s=i(5),r=i(10);e.exports=()=>{let a={options:{sampleRate:s.DEFAULT_SAMPLERATE,appendType:s.APPEND_TYPE_FRAME,playMode:s.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new n({latencyHint:"interactive",sampleRate:s.DEFAULT_SAMPLERATE}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,isLIVE:!1,voice:1,onLoadCache:null,resetStartParam:()=>{a.playTimestamp=0,a.playStartTime=0},setOnLoadCache:e=>{a.onLoadCache=e},setDurationMs:(e=-1)=>{a.durationMs=e},setVoice:(e=1)=>{a.voice=e,a.gainNode.gain.value=e},getAlignVPTS:()=>a.playTimestamp+(r.GetMsTime()-a.playStartTime)/1e3,swapSource:(e=-1,t=-1)=>
10{if(0==a.startStatus)return null;if(e<0||e>=a.sourceList.length)return null;if(t<0||t>=a.sourceList.length)return null;try{a.sourceChannel===e&&null!==a.sourceList[e]&&(a.sourceList[e].disconnect(a.gainNode),a.sourceList[e]=null)}catch(e){}a.sourceChannel=t;t=a.decodeSample(t,e);-2==t&&a.isLIVE&&(a.getAlignVPTS()>=a.durationMs/1e3-.04?a.pause():null!==a.onLoadCache&&a.onLoadCache())},addSample:(e=null)=>!(null==e||!e||null==e||(0==a.sampleQueue.length&&(a.seekPos=e.pts),a.sampleQueue.push(e),0)),runNextBuffer:()=>{window.setInterval(()=>{if(!(null!=a.nextBuffer||a.sampleQueue.length<s.DEFAULT_CONSU_SAMPLE_LEN)){var t;a.nextBuffer={data:null,pts:-1};for(let e=0;e<s.DEFAULT_CONSU_SAMPLE_LEN;e++){t=a.sampleQueue.shift();let e=null;if(e=a.options.appendType==s.APPEND_TYPE_STREAM?t:t.data,a.nextBuffer.pts<0&&(a.nextBuffer.pts=t.pts),null==a.nextBuffer.data?a.nextBuffer.data=new Float32Array(e):((t=new Float32Array(e.length+a.nextBuffer.data.length)).set(a.nextBuffer.data,0),t.set(e,a.nextBuffer.data.length),a.nextBuffer.data=t),a.sampleQueue.length<=0)break;0}a.nextBuffer.data.length}},10)},decodeSample:(e=-1,t=-1)=>{if(e<0||e>=a.sourceList.length)return-1;if(null!=a.sourceList[e]&&null!=a.sourceList[e]&&a.sourceList[e]||(a.sourceList[e]=a.audioCtx.createBufferSource(),a.sourceList[e].onended=function(){a.swapSource(e,t)}),0==a.sampleQueue.length)return a.isLIVE?(a.sourceList[e].connect(a.gainNode),a.sourceList[e].start(),a.sourceList[e].onended=function(){a.swapSource(e,t)},a.sourceList[e].stop(),0):-2;if(a.sourceList[e].buffer)a.swapSource(e,t);else{if(null==a.nextBuffer||a.nextBuffer.data.length<1)return a.sourceList[e].connect(a.gainNode),a.sourceList[e].start(),a.sourceList[e].startState=!0,a.sourceList[e].stop(),1;var i=a.nextBuffer.data;a.playTimestamp=a.nextBuffer.pts,a.playStartTime=r.GetMsTime();try{var n=a.audioCtx.createBuffer(1,i.length,a.options.sampleRate);n.copyToChannel(i,0),null!==a.sourceList[e]&&(a.sourceList[e].buffer=n,a.sourceList[e].connect(a.gainNode),a.sourceList[e].start(),a.sourceList[e].startState=!0)}catch(e){return a.nextBuffer=null,-3}a.nextBuffer=null}return 0},decodeWholeSamples:(e=-1)=>{if((a.sourceChannel=e)<0||e>=a.sourceList.length)return-1;if(null!=a.sourceList[e]&&null!=a.sourceList[e]&&a.sourceList[e]||(a.sourceList[e]=a.audioCtx.createBufferSource(),a.sourceList[e].onended=function(){}),0==a.sampleQueue.length)return-2;let t=null;var i;for(let e=0;e<a.sampleQueue.length;e++){i=a.sampleQueue.shift();let e=null;if(e=a.options.appendType==s.APPEND_TYPE_STREAM?i:i.data,t=null==t?new Uint8Array(e):((i=new Uint8Array(e.length+t.length)).set(t,0),i.set(e,t.length),i),a.sampleQueue.length<=0)break;0}var n=t;if(null==n||n.length<1)return a.sourceList[e].connect(a.gainNode),a.sourceList[e].start(),a.sourceList[e].stop(),1;n=n.buffer;try{var r=a.audioCtx.createBuffer(1,n.byteLength,a.options.sampleRate);r.copyToChannel(n,0),a.sourceList[e].buffer=r,a.sourceList[e].connect(a.gainNode),a.sourceList[e].start(),a.sourceList[e].startState=!0}catch(e){return alert("Crash[brower]! Please refresh your page"),-3}return 0},play:()=>{if(0==a.startStatus){a.startStatus=!0;let e=0;-2==(e=a.options.playMode==s.AUDIO_MODE_ONCE?a.decodeWholeSamples(0):a.swapSource(0,1))&&a.pause()}},pause:()=>{a.startStatus=!1;for(let e=0;e<a.sourceList.length;e++)if(void 0!==a.sourceList[e]&&null!==a.sourceList[e])try{void 0!==a.sourceList[e].buffer&&null!==a.sourceList[e].buffer&&(a.sourceList[e].stop(),a.sourceList[e].disconnect(a.gainNode)),a.sourceList[e]=null}catch(e){}},stop:()=>{a.pause(),a.cleanQueue(),a.nextBuffer=null,a.sourceChannel=-1},cleanQueue:()=>{for(let e=a.sampleQueue.length=0;e<a.sourceList.length;e++)try{void 0!==a.sourceList[e].buffer&&null!==a.sourceList[e].buffer&&(a.sourceList[e].stop(),a.sourceList[e].disconnect(a.gainNode)),a.sourceList[e]=null}catch(e){}}};return a.sourceList.push(a.audioCtx.createBufferSource()),a.sourceList.push(a.audioCtx.createBufferSource()),a.sourceList[0].onended=function(){a.swapSource(0,1)},a.sourceList[1].onended=function(){a.swapSource(1,0)},a.gainNode=a.audioCtx.createGain(),a.gainNode.gain.value=a.voice,a.gainNode.connect(a.audioCtx.destination),a.runNextBuffer(),a}},function(e,t,i){i(37),i(26),i(34),i(35);const a=i(36),s=i(10);i(57);const f=i(46),p=i(5);i(25);t.CWsLiveCore=class{constructor(e){this.config={width:e.width||p.DEFAULT_WIDTH,height:e.height||p.DEFAULT_HEIGHT,fps:e.fps||p.DEFAULT_FPS,sampleRate:e.sampleRate||p.DEFAULT_SAMPLERATE,playerId:e.playerId||p.DEFAILT_WEBGL_PLAY_ID,token:e.token||null,probeSize:e.probeSize||4096,ignoreAudio:e.ignoreAudio||0,autoPlay:e.autoPlay||!1},alert("this.config.probeSize"+this.config.probeSize+" ignoreAudio:"+this.config.ignoreAudio),this.mediaInfo={noFPS:!1,fps:p.DEFAULT_FPS,width:this.config.width,height:this.config.height,sampleRate:this.config.sampleRate,size:{width:-1,height:-1},audioNone:!1},this.duration=-1,this.vCodecID=p.V_CODEC_NAME_HEVC,this.corePtr=null,this.AVGetInterval=null,this.readyShowDone=!1,this.readyKeyFrame=!1,this.cache_status=!1,this.download_length=0,this.AVGLObj=null,this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.CanvasObj=null,this.CanvasObj=document.createElement("canvas"),this.CanvasObj.style.width=this.canvasBox.clientWidth+"px",this.CanvasObj.style.height=this.canvasBox.clientHeight+"px",this.CanvasObj.style.top="0px",this.CanvasObj.style.left="0px",this.canvasBox.appendChild(this.CanvasObj),this.audioWAudio=null,this.audioVoice=1,this.frameTime=1e3/this.config.fps,this.NaluBuf=[],this.YuvBuf=[],this.getPackageTimeMS=0,this.workerFetch=null,this.playInterval=null,this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null;this.totalLen=0,this.pushPkg=0,this.showScreen=!1,this.onProbeFinish=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onRender=null,this.onReadyShowDone=null,this.onError=null;this.corePtr=Module.cwrap("AVSniffHttpFlvInit","number",["string","string"])("base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1","0.0.0")}_workerFetch_onmessage(e,n){var r=e.data;let a=null;switch(a=void 0===r.cmd||null===r.cmd?"":r.cmd){case"fetch-chunk":let t=r.data,i=void(n.download_length+=t.length);setTimeout(function(){var e=Module._malloc(t.length);Module.HEAP8.set(t,e),i=Module.cwrap("pushSniffHttpFlvData","number",["number","number","number","number"])(n.corePtr,e,t.length,n.config.probeSize),Module._free(e)},0),n.totalLen+=t.length,0<t.length&&(n.getPackageTimeMS=s.GetMsTime()),n.pushPkg++,void 0!==n.AVGetInterval&&null!==n.AVGetInterval||(n.AVGetInterval=window.setInterval(function(){Module.cwrap("getBufferLengthApi","number",["number"])(n.corePtr)>
10n.config.probeSize&&(Module.cwrap("getSniffHttpFlvPkg","number",["number"])(n.corePtr),--n.pushPkg)},5));break;case"close":n.AVGetInterval&&clearInterval(n.AVGetInterval),n.AVGetInterval=null;case"fetch-fin":break;case"fetch-error":n.onError&&n.onError(r.data)}}_checkDisplaySize(e,t,i){var e=this.config.width+Math.ceil((t-e)/2),n=t/this.config.width>i/this.config.height,r=(e/t).toFixed(2),a=(this.config.height/i).toFixed(2),n=n?r:a,r=this.config.fixed,a=r?e:parseInt(t*n),e=r?this.config.height:parseInt(i*n);return this.CanvasObj.offsetWidth==a&&this.CanvasObj.offsetHeight==e||(t=parseInt((this.canvasBox.offsetHeight-e)/2),r=(r=parseInt((this.canvasBox.offsetWidth-a)/2))<0?0:r,this.CanvasObj.style.marginTop=(t=t<0?0:t)+"px",this.CanvasObj.style.marginLeft=r+"px",this.CanvasObj.style.width=a+"px",this.CanvasObj.style.height=e+"px"),this.isCheckDisplay=!0,[a,e]}_ptsFixed2(e){return Math.ceil(100*e)/100}_callbackProbe(e,t,i,n,r,a,s,o,l){var u=Module.HEAPU8.subarray(l,l+10);let h="";for(let e=0;e<u.length;e++){var d=String.fromCharCode(u[e]);h+=d}let c=n;100<n&&(c=p.DEFAULT_FPS,this.mediaInfo.noFPS=!0),this.vCodecID=o,this.config.fps=c,this.mediaInfo.fps=c,this.mediaInfo.size.width=t,this.mediaInfo.size.height=i,this.frameTime=Math.floor(1e3/(this.mediaInfo.fps+2)),this.CanvasObj.width==t&&this.CanvasObj.height==i||(this.CanvasObj.width=t,this.CanvasObj.height=i,this.isCheckDisplay)||this._checkDisplaySize(t,t,i),0<=r&&!1===this.mediaInfo.noFPS&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.config.sampleRate=a,this.mediaInfo.sampleRate=a,this.audioWAudio=f({sampleRate:this.mediaInfo.sampleRate,appendType:p.APPEND_TYPE_FRAME}),this.audioWAudio.isLIVE=!0):this.mediaInfo.audioNone=!0,this.onProbeFinish&&this.onProbeFinish()}_callbackYUV(e,t,i,n,r,a,s,o,l){var e=Module.HEAPU8.subarray(e,e+n*o),u=new Uint8Array(e),t=Module.HEAPU8.subarray(t,t+r*o/2),r=new Uint8Array(t),i=Module.HEAPU8.subarray(i,i+a*o/2),a=new Uint8Array(i);this.YuvBuf.push({bufY:u,bufU:r,bufV:a,line_y:n,h:o,pts:l}),this.checkCacheState(),Module._free(e),Module._free(t),Module._free(i),!1===this.readyShowDone&&!0===this.playYUV()&&(this.readyShowDone=!0,this.onReadyShowDone&&this.onReadyShowDone(),this.audioWAudio||this.play())}_callbackNALU(e,t,i,n,r,a,s){if(!1===this.readyKeyFrame){if(i<=0)return;this.readyKeyFrame=!0}var e=Module.HEAPU8.subarray(e,e+t),o=new Uint8Array(e);this.NaluBuf.push({bufData:o,len:t,isKey:i,w:n,h:r,pts:1e3*a,dts:1e3*s}),Module._free(e)}_callbackPCM(e){}_callbackAAC(e,t,i,n){n=this._ptsFixed2(n);this.audioWAudio&&(e=Module.HEAPU8.subarray(e,e+t),t=new Uint8Array(e),this.audioWAudio.addSample({pts:n,data:t}),this.checkCacheState())}_decode(){let i=this;setTimeout(()=>{var e,t;null!==i.workerFetch&&(null!=(e=i.NaluBuf.shift())&&(t=Module._malloc(e.bufData.length),Module.HEAP8.set(e.bufData,t),Module.cwrap("decodeHttpFlvVideoFrame","number",["number","number","number","number","number"])(i.corePtr,t,e.bufData.length,e.pts,e.dts,0),Module._free(t),t=null),i._decode())},1)}setScreen(e=!1){this.showScreen=e}checkCacheState(){var e=25<=this.YuvBuf.length&&(!0===this.mediaInfo.audioNone||this.audioWAudio&&50<=this.audioWAudio.sampleQueue.length);return!1===this.cache_status&&e&&(this.playInterval&&this.audioWAudio&&this.audioWAudio.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.cache_status=!0),e}setVoice(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}_removeBindFuncPtr(){null!==this._ptr_probeCallback&&Module.removeFunction(this._ptr_probeCallback),null!==this._ptr_frameCallback&&Module.removeFunction(this._ptr_frameCallback),null!==this._ptr_naluCallback&&Module.removeFunction(this._ptr_naluCallback),null!==this._ptr_sampleCallback&&Module.removeFunction(this._ptr_sampleCallback),null!==this._ptr_aacCallback&&Module.removeFunction(this._ptr_aacCallback),this._ptr_probeCallback=null,this._ptr_frameCallback=null,this._ptr_naluCallback=null,this._ptr_sampleCallback=null,this._ptr_aacCallback=null}release(){return this.pause(),this.NaluBuf.length=0,void(this.YuvBuf.length=0)!==this.workerFetch&&null!==this.workerFetch&&this.workerFetch.postMessage({cmd:"stop",data:"stop",msg:"stop"}),this.workerFetch=null,this.AVGetInterval&&clearInterval(this.AVGetInterval),this.AVGetInterval=null,this._removeBindFuncPtr(),void 0!==this.corePtr&&null!==this.corePtr&&Module.cwrap("releaseHttpFLV","number",["number"])(this.corePtr),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null,void 0!==this.AVGLObj&&null!==this.AVGLObj&&(a.releaseContext(this.AVGLObj),this.AVGLObj=null),this.CanvasObj&&this.CanvasObj.remove(),this.CanvasObj=null,window.onclick=document.body.onclick=null,0}isPlayingState(){return null!==this.playInterval&&void 0!==this.playInterval}pause(){this.audioWAudio&&this.audioWAudio.pause(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null}playYUV(){var e;return 0<this.YuvBuf.length&&(e=this.YuvBuf.shift(),this.onRender&&this.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),a.renderFrame(this.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),!0)}play(){let r=this;if(!1===this.checkCacheState())return this.onLoadCache&&this.onLoadCache(),setTimeout(()=>{this.play()},100),!1;if(void 0===this.playInterval||null===this.playInterval){let e=0,i,n=0;!1===this.mediaInfo.audioNone&&this.audioWAudio&&!1===this.mediaInfo.noFPS?(this.playInterval=setInterval(function(){if(i=s.GetMsTime(),r.cache_status){if(i-e>=r.frameTime-n){var t=r.YuvBuf.shift();if(null!=t&&null!==t){let e=0;null!==r.audioWAudio&&void 0!==r.audioWAudio&&(e=1e3*(t.pts-r.audioWAudio.getAlignVPTS())),n=!r.audioWAudio||e<0&&-1*e<=r.frameTime||0<=e?s.GetMsTime()-i+1:r.frameTime,r.showScreen&&r.onRender&&r.onRender(t.line_y,t.h,t.bufY,t.bufU,t.bufV),a.renderFrame(r.AVGLObj,t.bufY,t.bufU,t.bufV,t.line_y,t.h)}(r.YuvBuf.length<=0||r.audioWAudio&&r.audioWAudio.sampleQueue.length<=0)&&(r.cache_status=!1,r.onLoadCache&&r.onLoadCache(),r.audioWAudio)&&r.audioWAudio.pause(),e=i}}else n=r.frameTime},1),this.audioWAudio&&this.audioWAudio.play()):this.playInterval=setInterval(function(){var e=r.YuvBuf.shift();null!=e&&null!==e&&(r.showScreen&&r.onRender&&r.onRender(e.line_y,e.h,e.bufY,e.bufU,e.bufV),a.renderFrame(r.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h)),r.YuvBuf.length<=0&&(r.cache_status=!1)},r.frameTime)}}start(e){let t=this;this.workerFetch=new Worker(s.GetScriptPath(function(){var r=null;self;self.onmessage=e=>{var t=e.data;let i=null;switch(i=void 0===t.cmd||null===t.cmd?"":t.cmd){case"start":var n=t.data;(r=new WebSocket(n)).binaryType="arraybuffer",r.onopen=function(e){r.send("Hello WebSockets!")},r.onmessage=function(e){e.data instanceof ArrayBuffer&&0<(e=e.data).byteLength&&postMessage({cmd:"fetch-chunk",data:new Uint8Array(e),msg:"fetch-chunk"})},r.onclose=function(e){};break;case"stop":r&&r.close(),self.close(),self.postMessage({cmd:"close",data:"close",msg:"close"})}}})),this.workerFetch.onmessage=function(e){t._workerFetch_onmessage(e,t)},this._ptr_probeCallback=Module.addFunction(this._callbackProbe.bind(this),"vdiidiiiiii"),this._ptr_yuvCallback=Module.addFunction(this._callbackYUV.bind(this),"vi"),this._ptr_naluCallback=Module.addFunction(this._callbackNALU.bind(this),"vi"),this._ptr_sampleCallback=Module.addFunction(this._callbackPCM.bind(this),"vi"),this._ptr_aacCallback=Module.addFunction(this._callbackAAC.bind(this),"vi");Module.cwrap("initializeSniffHttpFlvModule","number",["number","number","number","number","number","number"])(this.corePtr,this._ptr_probeCallback,this._ptr_yuvCallback,this._ptr_naluCallback,this._ptr_sampleCallback,this._ptr_aacCallback);this.AVGLObj=a.setupCanvas(this.CanvasObj,{preserveDrawingBuffer:!1}),this.workerFetch.postMessage({cmd:"start",data:e,msg:"start"}),this._decode()}}},function(e,t,i){"use strict";i.r(t),i.d(t,"NvHLSjsCore",function(){return n});var s=i(14);
10const o=i(5),l=i(162);i(56);var n=class{constructor(e){this.configFormat={probeDurationMS:e.probeDurationMS,width:e.width||o.DEFAULT_WIDTH,height:e.height||o.DEFAULT_HEIGHT,playerId:e.playerId||o.DEFAILT_WEBGL_PLAY_ID,ignoreAudio:e.ignoreAudio,autoPlay:e.autoPlay||!1,repeatPlay:e.repeat||!1,danmaku:e.danmaku,authToken:e.authToken,openToken:e.openToken,maxBufferLength:e.maxBufferLength},this.audioVoice=1,this.myPlayerID=this.configFormat.playerId+"-vjs",this.myPlayer=null,this.videoContaner=null,this.videoTag=null,this.duration=-1,this.vCodecID=o.V_CODEC_NAME_AVC,this.audioNone=!1,this.metadata={},this.showScreen=!1,this.playPTS=0,this.loadSuccess=!1,this.bufferInterval=null,this.bootInterval=null,this.qualityList=[],this.manualLevel=-1,this.onMakeItReady=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onPlayState=null,this.onCacheProcess=null,this.onQualityLevels=null,this.onError=null,this.onLevelUpdates=null,this.seekResult=null}makeIt(i){let r=this;this.configFormat.width,this.configFormat.height,this.configFormat.autoPlay;var e,t,n=document.querySelector("#"+this.configFormat.playerId),a=document.createElement("video");a.id=this.myPlayerID,this.videoTag=a,l.isSupported()?(this.configFormat.repeatPlay&&a.setAttribute("loop","loop"),n.appendChild(a),!0===this.configFormat.autoPlay&&(this.videoTag.muted="muted",window.onclick=document.body.onclick=function(e){r.videoTag.muted=!1,window.onclick=document.body.onclick=null}),this.videoTag.onplay=function(){var e=r.isPlayingState();r.onPlayState&&r.onPlayState(e)},this.videoTag.onpause=function(){var e=r.isPlayingState();r.onPlayState&&r.onPlayState(e)},this.videoTag.ontimeupdate=()=>{r.onPlayingTime&&r.onPlayingTime(r.videoTag.currentTime)},this.videoTag.onended=()=>{r.onPlayingFinish&&r.onPlayingFinish()},this.videoTag.onseeked=function(){r.onSeekFinish&&r.onSeekFinish(r.seekResult)},n=this.configFormat.maxBufferLength,t={},t=this.configFormat.authToken&&this.configFormat.authToken[i]||this.configFormat.openToken?(e=this.configFormat.authToken[i],n?{token:e,maxBufferLength:n}:{token:e}):n?{maxBufferLength:n}:{},r.myPlayer=new l(t),r.myPlayer.attachMedia(a),r.myPlayer.on(l.Events.MEDIA_ATTACHED,function(e,t){r.myPlayer.loadSource(i)}),r.myPlayer.on(l.Events.LEVEL_LOADED,function(e,t){r.duration=t.details.totalduration}),r.myPlayer.on(l.Events.LEVEL_UPDATED,function(e){r.onLevelUpdates(r.getCurrentLevel())}),r.myPlayer.on(l.Events.BUFFER_APPENDING,function(e,t){}),r.myPlayer.on(l.Events.BUFFER_CODECS,function(e,t){r.metadata=t.video.metadata,t.video.codec&&"hev1.1.6.L93.B0"===t.video.codec&&(r.vCodecID=o.V_CODEC_NAME_HEVC);var i,t=document.querySelector("#"+r.configFormat.playerId);t.getElementsByTagName("video")[0]||(i=t.getElementsByTagName("div"),t.insertBefore(r.videoTag,i[0])),!0!==r.loadSuccess&&(r.onLoadFinish&&r.onLoadFinish(),r.onReadyShowDone&&r.onReadyShowDone(),r.loadSuccess=!0)}),r.myPlayer.on(l.Events.MANIFEST_PARSED,function(e,t){var i=t["levels"];if(r.qualityList=[],1<i.length){t={id:-1,label:"èªå¨",index:0,selected:-1===r.manualLevel};r.qualityList.push(t);for(let e=0;e<i.length;e++){var n=i[e],n={id:e,label:n.height+"P",index:e+1,selected:e===r.manualLevel,with:n.width,height:n.height,bitrate:n.bitrate};r.qualityList.push(n)}r.onQualityLevels&&r.onQualityLevels(r.qualityList)}}),r.myPlayer.on(l.Events.ERROR,(e,t)=>{if(t.fatal)switch(t.type){case l.ErrorTypes.NETWORK_ERROR:r.onError({msg:t.response,event:t.details,url:t.url,type:t.type});break;case l.ErrorTypes.MEDIA_ERROR:case l.ErrorTypes.MUX_ERROR:r.onError({msg:t,url:t.url,type:t.type});break;default:l.ErrorTypes.OTHER_ERROR;r.onError({msg:t,url:t.url,type:s.ErrorTypes.OTHER})}else r.onError({msg:t,url:t.url,type:s.ErrorTypes.OTHER})}),r.onMakeItReady&&r.onMakeItReady()):(e=this.videoTag.canPlayType("application/vnd.apple.mpegurl"),this.release(),r.onError({url:i,msg:s.ErrorDetails.NOT_SUPPORT_DETAIL,errorType:s.ErrorTypes.NOT_SUPPORT,isAppleMpegurl:e}))}_refreshVideoTagEvent(){this.videoTag=document.getElementById(this.myPlayerID).querySelector("video")}setPlaybackRate(e=1){return!(e<=0||void 0===this.videoTag||null===this.videoTag||(this.videoTag.playbackRate=e,0))}getPlaybackRate(){return void 0===this.videoTag||null===this.videoTag?0:this.videoTag.playbackRate}getSize(){return{width:this.videoTag.videoWidth||this.metadata.width,height:this.videoTag.videoHeight||this.metadata.height}}play(){let t=this;this.videoTag.play(),t.videoTag.ontimeupdate=function(){var e;t.videoTag&&((e=t.videoTag.buffered.end(t.videoTag.buffered.length-1))>=t.duration-.04?t.onCacheProcess&&t.onCacheProcess(t.duration):t.onCacheProcess&&t.onCacheProcess(e),t.onPlayingTime&&t.onPlayingTime(t.videoTag.currentTime),t.seekReadyPts)&&e>t.seekReadyPts&&(e=t.seek(t.seekReadyPts),t.seekResult=e,t.seekReadyPts=null)}}seek(e){this.videoTag.currentTime=e;var t=this.videoTag.buffered,i=t.length-1;return t.end(i)<e?(this.seekReadyPts=e,!1):this.seekResult=!0}pause(){this.videoTag&&this.videoTag.pause()}setVoice(e){this.videoTag.volume=e}isPlayingState(){return!this.videoTag.paused}
10changeHlsQuality(t){var e=this.qualityList.find(e=>e.index===t);e&&this.manualLevel!==e.id&&(this.manualLevel=e.id,this.myPlayer.nextLevel=e.id)}getCurrentLevel(){if(0==this.qualityList.length)return!1;const t=this.myPlayer&&this.myPlayer.loadLevel;return this.qualityList.find(e=>t==e.id)}release(){this.loadSuccess=!1,void 0!==this.bootInterval&&null!==this.bootInterval&&(window.clearInterval(this.bootInterval),this.bootInterval=null),this.myPlayer&&this.myPlayer.destroy(),this.myPlayerID=null,this.myPlayer=null,this.videoContaner=null,this.videoTag=null,this.qualityList=[],this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onPlayState=null,(this.onQualityLevels=null)!==this.bufferInterval&&(window.clearInterval(this.bufferInterval),this.bufferInterval=null),window.onclick=document.body.onclick=null}}},function(e,t,i){!function Wo(Qo){e.exports=function(){"use strict";function C(t,e){var i,n=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)),n}function m(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach(function(e){var t=n,i=r[e];(e=F(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}function R(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F(n.key),n)}}function r(e,t,i){t&&R(e.prototype,t),i&&R(e,i),Object.defineProperty(e,"prototype",{writable:!1})}function $(){return($=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i,n=arguments[t];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function e(e,t){e.prototype=Object.create(t.prototype),P(e.prototype.constructor=e,t)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t,i){return(x=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),1}catch(e){}}}()?Reflect.construct.bind():function(e,t,i){var n=[null],t=(n.push.apply(n,t),new(Function.bind.apply(e,n)));return i&&P(t,i.prototype),t}).apply(null,arguments)}function D(e){var i="function"==typeof Map?new Map:void 0;return(D=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(e))return i.get(e);i.set(e,t)}function t(){return x(e,arguments,I(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),P(t,e)})(e)}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function B(e,t){var i,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e){var t;if(e)return"string"==typeof e?M(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(e,void 0):void 0}(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),i=0,function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(e){e=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);t=t.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:String(e)}
10function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}U=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,N=/^(?=([^\/?#]*))\1([^]*)$/,j=/(?:\/|^)\.(?=\/)/g,H=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,Y={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=Y.parseURL(e);if(n)return n.path=Y.normalizePath(n.path),Y.buildURLFromParts(n);throw new Error("Error trying to parse base URL.")}n=Y.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return i.alwaysNormalize?(n.path=Y.normalizePath(n.path),Y.buildURLFromParts(n)):t;t=Y.parseURL(e);if(!t)throw new Error("Error trying to parse base URL.");!t.netLoc&&t.path&&"/"!==t.path[0]&&(e=N.exec(t.path),t.netLoc=e[1],t.path=e[2]),t.netLoc&&!t.path&&(t.path="/");var r,e={scheme:t.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};return n.netLoc||(e.netLoc=t.netLoc,"/"===n.path[0])||(n.path?(r=(r=t.path).substring(0,r.lastIndexOf("/")+1)+n.path,e.path=Y.normalizePath(r)):(e.path=t.path,n.params||(e.params=t.params,n.query)||(e.query=t.query))),null===e.path&&(e.path=i.alwaysNormalize?Y.normalizePath(n.path):n.path),Y.buildURLFromParts(e)},parseURL:function(e){e=U.exec(e);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(j,"");e.length!==(e=e.replace(H,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};var U,N,j,H,Y,z=Y,G=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},ee=((t={}
10).MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached",t.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",t),te=((t={}).NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError",t),ie=((t={}).KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",t.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",t.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",t.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",t.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_PARSING_ERROR="levelParsingError",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.FRAG_GAP="fragGap",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown",t),W=function(){},Q={trace:W,debug:W,log:W,warn:W,info:W,error:W},K=Q;function J(i){for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];t.forEach(function(e){var t;K[e]=i[e]?i[e].bind(i):(t=self.console[e])?t.bind(self.console,"["+e+"] >"):W})}function q(e,t){if(self.console&&!0===e||"object"==typeof e){J(e,"debug","log","info","warn","error");
10try{K.log('Debug logs enabled for "'+t+'" in hls.js version '+void 0)}catch(e){K=Q}}else K=Q}var ne=K,X=/^(\d+)x(\d+)$/,Z=/(.+?)=(".*?"|.*?)(?:,|$)/g,V=((t=ae.prototype).decimalInteger=function(e){e=parseInt(this[e],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.hexadecimalInteger=function(e){if(this[e]){for(var t=(1&(t=(this[e]||"0x").slice(2)).length?"0":"")+t,i=new Uint8Array(t.length/2),n=0;n<t.length/2;n++)i[n]=parseInt(t.slice(2*n,2*n+2),16);return i}return null},t.hexadecimalIntegerAsNumber=function(e){e=parseInt(this[e],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){e=this[e];return e?parseFloat(e):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){e=X.exec(this[e]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},ae.parseAttrList=function(e){var t,i={};for(Z.lastIndex=0;null!==(t=Z.exec(e));){var n=t[2];0===n.indexOf('"')&&n.lastIndexOf('"')===n.length-1&&(n=n.slice(1,-1)),i[t[1].trim()]=n}return i},ae);function ae(e){for(var t in e="string"==typeof e?ae.parseAttrList(e):e)e.hasOwnProperty(t)&&("X-"===t.substring(0,2)&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(t)),this[t]=e[t])}r(ve,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){var e;return this._endDate||(null!==(e=this.duration)?new Date(this._startDate.getTime()+1e3*e):null)}},{key:"duration",get:function(){if("DURATION"in this.attr){var e=this.attr.decimalFloatingPoint("DURATION");if(G(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&G(this.startDate.getTime())&&(null===this.duration||0<=this.duration)&&(!this.endOnNext||!!this.class)}}]);var se,oe,le=ve,ue=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},A="audio",he="video",de="audiovideo",t=(ye.prototype.setByteRange=function(e,t){var e=e.split("@",2),i=[];1===e.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(e[1]),i[1]=parseInt(e[0])+i[0],this._byteRange=i},r(ye,[{key:"byteRange",get:function(){return this._byteRange||[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=z.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),ye),ce=(e(_e,oe=t),(i=_e.prototype).setKeyFormat=function(e){this.levelkeys&&(e=this.levelkeys[e])&&!this._decryptdata&&(this._decryptdata=e.getDecryptData(this.sn))},i.abortRequests=function(){var e;null!=(e=this.loader)&&e.abort(),null!=(e=this.keyLoader)&&e.abort()},i.setElementaryStreamInfo=function(e,t,i,n,r,a){void 0===a&&(a=!1);var s=this.elementaryStreams,o=s[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,i),o.startDTS=Math.min(o.startDTS,n),o.endDTS=Math.max(o.endDTS,r)):s[e]={startPTS:t,endPTS:i,startDTS:n,endDTS:r,partial:a}},i.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[A]=null,e[he]=null,e[de]=null},r(_e,[{key:"decryptdata",get:function(){if(!this.levelkeys&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){var e;return null!==this.programDateTime&&G(this.programDateTime)?(e=G(this.duration)?this.duration:0,this.programDateTime+1e3*e):null}},{key:"encrypted",get:function(){if(null!=(e=this._decryptdata)&&e.encrypted)return!0;
10if(this.levelkeys){var e=Object.keys(this.levelkeys),t=e.length;if(1<t||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}}]),_e),fe=(e(ge,se=t),r(ge,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),ge),pe=(me.prototype.reloaded=function(e){var t,i;e?(t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex,this.updated=this.endSN!==e.endSN||!!i||!!t,this.advanced=this.endSN>e.endSN||0<t||0==t&&0<i,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay):(this.advanced=!0,this.updated=!0)},r(me,[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&G(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.drift
10StartTime;return 0<e?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),me);function me(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}function ge(e,t,i,n,r){(i=se.call(this,i)||this).fragOffset=0,i.duration=0,i.gap=!1,i.independent=!1,i.relurl=void 0,i.fragment=void 0,i.index=void 0,i.stats=new ue,i.duration=e.decimalFloatingPoint("DURATION"),i.gap=e.bool("GAP"),i.independent=e.bool("INDEPENDENT"),i.relurl=e.enumeratedString("URI"),i.fragment=t,i.index=n;t=e.enumeratedString("BYTERANGE");return t&&i.setByteRange(t,r),r&&(i.fragOffset=r.fragOffset+r.duration),i}function _e(e,t){return(t=oe.call(this,t)||this)._decryptdata=null,t.rawProgramDateTime=null,t.programDateTime=null,t.tagList=[],t.duration=0,t.sn=0,t.levelkeys=void 0,t.type=void 0,t.loader=null,t.keyLoader=null,t.level=-1,t.cc=0,t.startPTS=void 0,t.endPTS=void 0,t.startDTS=void 0,t.endDTS=void 0,t.start=0,t.deltaPTS=void 0,t.maxStartPTS=void 0,t.minEndPTS=void 0,t.stats=new ue,t.urlId=0,t.data=void 0,t.bitrateTest=!1,t.title=null,t.initSegment=null,t.endList=void 0,t.gap=void 0,t.type=e,t}function ye(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[A]=null,t[he]=null,t[de]=null,t),this.baseurl=e}function ve(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var i,n=t.attr;for(i in n)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==n[i]){ne.warn('DATERANGE tag attribute: "'+i+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=i;break}e=$(new V({}),n,e)}this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr&&(t=new Date(this.attr["END-DATE"]),G(t.getTime()))&&(this._endDate=t)}function Ae(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})}function Ee(e){return Uint8Array.from(unescape(encodeURIComponent(e)),function(e){return e.charCodeAt(0)})}var g={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},be="org.w3.clearkey",we="com.apple.streamingkeydelivery",Se="com.microsoft.playready",Te="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Le(e){switch(e){case we:return g.FAIRPLAY;case Se:return g.PLAYREADY;case Te:return g.WIDEVINE;case be:return g.CLEARKEY}}var ke="edef8ba979d64acea3c827dcd51d21ed";function Ce(e){switch(e){case g.FAIRPLAY:return we;case g.PLAYREADY:return Se;case g.WIDEVINE:return Te;case g.CLEARKEY:return be}}function Re(e){var t=e.drmSystems,e=e.widevineLicenseUrl,i=t?[g.FAIRPLAY,g.WIDEVINE,g.PLAYREADY,g.CLEARKEY].filter(function(e){return!!t[e]}):[];return!i[g.WIDEVINE]&&e&&i.push(g.WIDEVINE),i}var Ie="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function Pe(e,t,i){return Uint8Array.prototype.slice?e.slice(t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))}function xe(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function De(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Me(e,t){for(var i=t,n=0;xe(e,t);)n=(n+=10)+Ne(e,t+6),De(e,t+10)&&(n+=10),t+=n;
10if(0<n)return e.subarray(i,i+n)}function Be(e){for(var t=Oe(e),i=0;i<t.length;i++){var n=t[i];if(Fe(n)){if(8===n.data.byteLength){var n=new Uint8Array(n.data),r=1&n[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7];return n/=45,r&&(n+=47721858.84),Math.round(n)}return}}}function Fe(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info}function Oe(e){for(var t,i=0,n=[];xe(e,i);){for(var r=Ne(e,i+6),a=(i+=10)+r;i+8<a;){t=e.subarray(i),o=s=void 0,s=String.fromCharCode(t[0],t[1],t[2],t[3]),o=Ne(t,4);var s={type:s,size:o,data:t.subarray(10,10+o)},o=("PRIV"===(t=s).type?je:"W"===t.type[0]?Ve:Ge)(t);o&&n.push(o),i+=s.size+10}De(e,i)&&(i+=10)}return n}var Ue,Ne=function(e,t){var i=0,i=(127&e[t])<<21;return(i=(i|=(127&e[t+1])<<14)|(127&e[t+2])<<7)|127&e[t+3]},je=function(e){var t,i;if(!(e.size<2))return t=He(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1)),{key:e.type,info:t,data:i.buffer}},Ge=function(e){var t,i;if(!(e.size<2))return"TXXX"===e.type?(t=1,t+=(i=He(e.data.subarray(1),!0)).length+1,t=He(e.data.subarray(t)),{key:e.type,info:i,data:t}):(i=He(e.data.subarray(1)),{key:e.type,data:i})},Ve=function(e){var t,i;return"WXXX"===e.type?e.size<2?void 0:(t=1,t+=(i=He(e.data.subarray(1),!0)).length+1,t=He(e.data.subarray(t)),{key:e.type,info:i,data:t}):(i=He(e.data),{key:e.type,data:i})},He=function(e,t){void 0===t&&(t=!1);var i,n;Ue=Ue||void 0===self.TextDecoder?Ue:new self.TextDecoder("utf-8");if(Ue)return i=Ue.decode(e),t?-1!==(n=i.indexOf("\0"))?i.substring(0,n):i:i.replace(/\0/g,"");for(var r,a,s,o=e.length,l="",u=0;u<o;){if(0===(r=e[u++])&&t)return l;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(r);break;case 12:case 13:a=e[u++],l+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[u++],s=e[u++],l+=String.fromCharCode((15&r)<<12|(63&a)<<6|(63&s)<<0)}}return l};function Ye(e){for(var t="",i=0;i<e.length;i++){var n=e[i].toString(16);t+=n=n.length<2?"0"+n:n}return t}var ze=Math.pow(2,32)-1,We=[].push,Qe={video:1,audio:2,id3:3,text:4};function v(e){return String.fromCharCode.apply(null,e)}function Ke(e,t){e=e[t]<<8|e[t+1];return e<0?65536+e:e}function L(e,t){e=Je(e,t);return e<0?4294967296+e:e}function Je(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function qe(e,t,i){e[t]=i>>24,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function k(e,t){var i=[];if(t.length)for(var n=e.byteLength,r=0;r<n;){var a,s=L(e,r),s=1<s?r+s:n;v(e.subarray(r+4,r+8))===t[0]&&(1===t.length?i.push(e.subarray(r+8,s)):(a=k(e.subarray(r+8,s),t.slice(1))).length&&We.apply(i,a)),r=s}return i}function Xe(e){for(var i=[],t=k(e,["moov","trak"]),n=0;n<t.length;n++){var r,a,s=t[n],o=k(s,["tkhd"])[0];o&&(o=L(o,0===o[0]?12:20),r=k(s,["mdia","mdhd"])[0])&&(r=L(r,0===r[0]?12:20),a=k(s,["mdia","hdlr"])[0])&&(a=v(a.subarray(8,12)),a={soun:A,vide:he}[a])&&(s=function(e){var t=e.subarray(8),i=t.subarray(86),n=v(t.subarray(4,8)),r=n,a="enca"===n||"encv"===n;{var s;a&&(s=k(t,[n])[0],k(s.subarray("enca"===n?28:78),["sinf"]).forEach(function(e){var t=k(e,["schm"])[0];!t||"cbcs"!==(t=v(t.subarray(4,8)))&&"cenc"!==t||(t=k(e,["frma"])[0])&&(r=v(t))}))}switch(r){case"avc1":case"avc2":case"avc3":case"avc4":r+="."+Ze(e[111])+Ze(e[112])+Ze(e[113]);break;case"mp4a":var o=k(t,[n])[0],o=k(o.subarray(28),["esds"])[0];o&&12<o.length&&0!==o[11]&&(r=(r+="."+Ze(o[11]))+("."+(o[12]>>>2&63).toString(16).toUpperCase()));break;case"hvc1":case"hev1":var o=k(i,["hvcC"])[0],l=o[1],u=["","A","B","C"][l>>6],h=31&l,d=L(o,2),l=(32&l)>>5?"H":"L",c=o[12],f=o.subarray(6,12);r=(r=(r+="."+u+h)+("."+d.toString(16).toUpperCase()))+("."+l+c);for(var p="",m=f.length;m--;){var g=f[m];(g||p)&&(p="."+g.toString(16).toUpperCase()+p)}r+=p;break;case"dvh1":case"dvhe":o=k(i,["dvcC"])[0],u=o[2]>>1&127,h=o[2]<<5&32|o[3]>>3&31;r+="."+$e(u)+"."+$e(h);break;case"vp09":d=k(i,["vpcC"])[0],l=d[4],c=d[5],o=d[6]>>4&15;r+="."+$e(l)+"."+$e(c)+"."+$e(o);break;case"av01":var u=k(i,["av1C"])[0],h=u[1]>>>3,d=31&u[1],l=u[2]>>>7?"H":"M",c=(64&u[2])>>6,o=(32&u[2])>>5,o=2==h&&c?o?12:10:c?10:8,c=(16&u[2])>>4,_=(8&u[2])>>3,y=(4&u[2])>>2,u=3&u[2];r+="."+h+"."+$e(d)+l+"."+$e(o)+"."+c+"."+_+y+u}return{codec:r,encrypted:a}}(k(s,["mdia","minf","stbl","stsd"])[0]),i[o]={timescale:r,type:a},i[a]=m({timescale:r,id:o},s))}
10return k(e,["moov","mvex","trex"]).forEach(function(e){var t=L(e,4),t=i[t];t&&(t.default={duration:L(e,12),flags:L(e,20)})}),i}function Ze(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function $e(e){return(e<10?"0":"")+e}function et(e){var t=k(e,["schm"])[0];if(t){t=v(t.subarray(4,8));if("cbcs"===t||"cenc"===t)return k(e,["schi","tenc"])[0]}return ne.error("[eme] missing 'schm' box"),null}function tt(e,t){var i=new Uint8Array(e.length+t.length);return i.set(e),i.set(t,e.length),i}function it(A,E){var b=[],w=E.samples,S=E.timescale,a=E.id,T=!1;return k(w,["moof"]).map(function(e){var v=e.byteOffset-8;k(e,["traf"]).map(function(r){var e=k(r,["tfdt"]).map(function(e){var t=e[0],i=L(e,4);return(i=1===t?(i*=Math.pow(2,32))+L(e,8):i)/S})[0];return void 0!==e&&(A=e),k(r,["tfhd"]).map(function(e){var t=L(e,4),i=16777215&L(e,0),_=0,y=0,n=8;t===a&&(0!=(1&i)&&(n+=8),0!=(2&i)&&(n+=4),0!=(8&i)&&(_=L(e,n),n+=4),0!=(16&i)&&(y=L(e,n),n+=4),0!=(32&i)&&(n+=4),"video"===E.type&&(t=E.codec,T=!!t&&("hvc1"===(t=(e=t.indexOf("."))<0?t:t.substring(0,e))||"hev1"===t||"dvh1"===t||"dvhe"===t)),k(r,["trun"]).map(function(e){var t=e[0],i=16777215&L(e,0),n=0,r=0!=(256&i),a=0,s=0!=(512&i),o=0,l=0!=(1024&i),u=0!=(2048&i),h=0,d=L(e,4),c=8;0!=(1&i)&&(n=L(e,c),c+=4),0!=(4&i)&&(c+=4);for(var f=n+v,p=0;p<d;p++){if(r?(a=L(e,c),c+=4):a=_,s?(o=L(e,c),c+=4):o=y,l&&(c+=4),u&&(h=(0===t?L:Je)(e,c),c+=4),E.type===he)for(var m=0;m<o;){var g=L(w,f);!function(e,t){if(e)return 39==(e=t>>1&63)||40==e;return 6==(31&t)}(T,w[f+=4])||nt(w.subarray(f,f+g),T?2:1,A+h/S,b),f+=g,m+=g+4}A+=a/S}}))})})}),b}function nt(e,t,i,n){var r=rt(e),a=0;a+=t;for(var s=0,o=0,l=!1,u=0;a<r.length;){for(s=0;!(a>=r.length)&&(s+=u=r[a++],255===u););for(o=0;!(a>=r.length)&&(o+=u=r[a++],255===u););var h=r.length-a;if(!l&&4===s&&a<r.length){if(l=!0,181===r[a++]){var d=Ke(r,a);if(a+=2,49===d){d=L(r,a);if(a+=4,1195456820===d){d=r[a++];if(3===d){var c=r[a++],f=64&c,p=f?2+3*(31&c):0,m=new Uint8Array(p);if(f){m[0]=c;for(var g=1;g<p;g++)m[g]=r[a++]}n.push({type:d,payloadType:s,pts:i,bytes:m})}}}}}else if(5===s&&o<h){if(l=!0,16<o){for(var _=[],y=0;y<16;y++){var v=r[a++].toString(16);_.push(1==v.length?"0"+v:v),3!==y&&5!==y&&7!==y&&9!==y||_.push("-")}for(var A=o-16,E=new Uint8Array(A),b=0;b<A;b++)E[b]=r[a++];n.push({payloadType:s,pts:i,uuid:_.join(""),userData:He(E),userDataBytes:E})}}else if(o<h)a+=o;else if(h<o)break}}function rt(e){for(var t=e.byteLength,i=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(i.push(n+2),n+=2):n++;if(0===i.length)return e;for(var r=t-i.length,a=new Uint8Array(r),s=0,n=0;n<r;s++,n++)s===i[0]&&(s++,i.shift()),a[n]=e[s];return a}var at={},st=(lt.clearKeyUriToKeyIdMap=function(){at={}},(i=lt.prototype).isSupported=function(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case we:case Te:case Se:case be:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1},i.getDecryptData=function(e){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv)return"number"!=typeof e&&("AES-128"!==this.method||this.iv||ne.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),e=0),e=function(e){for(var t=new Uint8Array(16),i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t}(e),new lt(this.method,this.uri,"identity",this.keyFormatVersions,e);e=(e=this.uri).split(":"),t=null,"data"===e[0]&&2===e.length&&2===(n=(e=e[1].split(";"))[e.length-1].split(",")).length&&(i="base64"===n[0],n=n[1],t=i?(e.splice(-1,1),Ae(n)):(i=Ee(n).subarray(0,16),(e=new Uint8Array(16)).set(i,16-i.length),e));var t,i,n,r=t;if(r)switch(this.keyFormat){case Te:22<=(this.pssh=r).length&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case Se:var a=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),a=(this.pssh=function(e,t,i){if(16!==e.byteLength)throw new RangeError("Invalid system id");var n;if(t)for(var r=1,a=new Uint8Array(16*t.length),s=0;s<t.length;s++){var o=t[s];if(16!==o.byteLength)throw new RangeError("Invalid key");a.set(o,16*s)}else r=0,a=new Uint8Array;0<r?(n=new Uint8Array(4),0<t.length&&new DataView(n.buffer).setUint32(0,t.length,!1)):n=new Uint8Array;var l=new Uint8Array(4);return i&&0<i.byteLength&&new DataView(l.buffer).setUint32(0,i.byteLength,!1),function(e){for(var t=arguments.length,i=new Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];for(var r=i.length,a=8,s=r;s--;)a+=i[s].byteLength;var o=new Uint8Array(a);for(o[0]=a>>24&255,o[1]=a>>16&255,o[2]=a>>8&255,o[3]=255&a,o.set(e,4),s=0,a=8;s<r;s++)o.set(i[s],a),a+=i[s].byteLength;return o}([112,115,115,104],new Uint8Array([r,0,0,0]),e,n,a,l,i||new Uint8Array)}(a,null,r),new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2)),a=String.fromCharCode.apply(null,Array.from(a)),a=a.substring(a.indexOf("<"),a.length),a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("KID")[0];a&&(a=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE"))&&(a=Ae(a).subarray(0,16),o(s=a,0,3),o(s,1,2),o(s,4,5),o(s,6,7),this.keyId=a);break;default:var s=r.subarray(0,16);16!==s.length&&((a=new Uint8Array(16)).set(s,16-s.length),s=a),this.keyId=s}function o(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}return this.keyId&&16===this.keyId.byteLength||((n=at[this.uri])||
10(i=Object.keys(at).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,i),at[this.uri]=n),this.keyId=n),this},lt),ot=/\{\$([a-zA-Z0-9-_]+)\}/g;function lt(e,t,i,n,r,a){void 0===n&&(n=[1]),void 0===r&&(r=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.token=void 0,this.method=e,this.uri=t,this.keyFormat=i,this.keyFormatVersions=n,this.iv=r,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e,this.token=a,"media-drm-player-binding"===this.keyFormat&&(this.uri=this.uri+"&playerId=pid-1-5-1"),"media-drm-token"===this.keyFormat&&this.token&&(this.uri=this.uri+"&playerId=pid-1-5-1&token="+this.token),!this.keyFormat&&this.token&&(this.uri=this.uri+"&token="+this.token)}function ut(e){return ot.test(e)}function ht(e,t,i){if(null!==e.variableList||e.hasVariableRefs)for(var n=i.length;n--;){var r=i[n],a=t[r];a&&(t[r]=dt(e,a))}}function dt(n,e){var r;return null!==n.variableList||n.hasVariableRefs?(r=n.variableList,e.replace(ot,function(e){var t=e.substring(2,e.length-1),i=null==r?void 0:r[t];return void 0===i?(n.playlistParsingError||(n.playlistParsingError=new Error('Missing preceding EXT-X-DEFINE tag for Variable Reference: "'+t+'"')),e):i})):e}function ct(e,t,i){var n,r,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){n=t.QUERYPARAM;try{var s=new self.URL(i).searchParams;if(!s.has(n))throw new Error('"'+n+'" does not match any query parameter in URI: "'+i+'"');r=s.get(n)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: "+t.message))}}else n=t.NAME,r=t.VALUE;n in a?e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE duplicate Variable Name declarations: "'+n+'"')):a[n]=r||""}function ft(){if("undefined"!=typeof self)return self.MediaSource||self.WebKitMediaSource}var pt={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,fLaC:!0,flac:!0,FLAC:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},mt=ft();function gt(e,t){return!e.split(",").some(function(e){return!_t(e,t)})}function _t(e,t){return null!=(t=null==mt?void 0:mt.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"'))&&t}var yt={},vt=/flac|opus/i;function At(e){return e.replace(vt,function(e){var t=e.toLowerCase();if(yt[t])return yt[t];for(var i={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[t],n=0;n<i.length;n++)if(_t(i[n],"audio"))return yt[t]=i[n],i[n];return t})}var Et=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,bt=/#EXT-X-MEDIA:(.*)/g,wt=/^#EXT(?:INF|-X-TARGETDURATION):/m,St=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Tt=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),Lt=(kt.findGroup=function(e,t){for(var i=0;i<e.length;i++){var n=e[i];if(n.id===t)return n}},kt.convertAVC1ToAVCOTI=function(e){var t,i=e.split(".");return 2<i.length?(t=i.shift()+".",(t+=parseInt(i.shift()).toString(16))+("000"+parseInt(i.shift()).toString(16)).slice(-4)):e},kt.resolve=function(e,t){return z.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},kt.isMediaPlaylist=function(e){return wt.test(e)},kt.parseMasterPlaylist=function(e,t){var i,n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:ut(e)},r=[];for(Et.lastIndex=0;null!=(i=Et.exec(e));)if(i[1]){var a=new V(i[1]),s=(ht(n,a,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]),dt(n,i[2])),s={attrs:a,bitrate:a.decimalInteger("BANDWIDTH")||a.decimalInteger("AVERAGE-BANDWIDTH"),name:a.NAME,url:kt.resolve(s,t)},o=a.decimalResolution("RESOLUTION");o&&(s.width=o.width,s.height=o.height),function(e,n){["video","audio","text"].forEach(function(i){var t=e.filter(function(e){return e=e,!!(t=pt[i])&&!0===t[e.slice(0,4)];var t});t.length&&(n[i+"Codec"]=t.join(","),e=e.filter(function(e){return-1===t.indexOf(e)}))}),n.unknownCodecs=e}((a.CODECS||"").split(/[ ,]+/).filter(function(e){return e}),s),s.videoCodec&&-1!==s.videoCodec.indexOf("avc1")&&(s.videoCodec=kt.convertAVC1ToAVCOTI(s.videoCodec)),null!=(o=s.unknownCodecs)&&o.length||r.push(s),n.levels.push(s)}else if(i[3]){var a=i[3],l=i[4];switch(a){case"SESSION-DATA":var u=new V(l),h=(ht(n,u,["DATA-ID","LANGUAGE","VALUE","URI"]),u["DATA-ID"]);h&&(null===n.sessionData&&(n.sessionData={}),n.sessionData[h]=u);break;case"SESSION-KEY":h=Ct(l,t,n);h.encrypted&&h.isSupported()?(null===n.sessionKeys&&(n.sessionKeys=[]),n.sessionKeys.push(h)):ne.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+l+'"');break;case"DEFINE":u=new V(l);ht(n,u,["NAME","VALUE","QUERYPARAM"]),ct(n,u,t);break;case"CONTENT-STEERING":var d=new V(l);ht(n,d,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:kt.resolve(d["SERVER-URI"],t),pathwayId:d["PATHWAY-ID"]||"."};break;case"START":n.startTimeOffset=Rt(l)}}var c=0<r.length&&r.length<n.levels.length;return n.levels=c?r:n.levels,0===n.levels.length&&(n.playlistParsingError=new Error("no levels found in manifest")),n},kt.parseMasterPlaylistMedia=function(e,t,i){var n={},r=i.levels,a={AUDIO:r.map(function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}}),SUBTITLES:r.map(function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}}),"CLOSED-CAPTIONS":[]},s=0;for(bt.lastIndex=0;null!==(u=bt.exec(e));){var o,l,u=new V(u[1]),h=u.TYPE;h&&(o=a[h],l=n[h]||[],n[h]=l,ht(i,u,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]),h={attrs:u,bitrate:0,id:s++,groupId:u["GROUP-ID"]||"",instreamId:u["INSTREAM-ID"],name:u.NAME||u.LANGUAGE||"",type:h,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:u.LANGUAGE,url:u.URI?kt.resolve(u.URI,t):""},null!=o&&o.length&&(It(h,u=kt.findGroup(o,h.groupId)||o[0],"audioCodec"),It(h,u,"textCodec")),l.push(h))}return n},kt.parseLevelPlaylist=function(e,t,i,n,F,O,U){var r,a,s,o=new pe(t),l=o.fragments,u=null,h=0,d=0,c=0,f=0,p=null,m=new ce(n,t),g=-1,_=!1;for(St.lastIndex=0,o.m3u8=e,o.hasVariableRefs=ut(e);null!==(r=St.exec(e));){_&&(_=!1,(m=new ce(n,t)).start=c,m.sn=h,m.cc=f,m.level=i,u)&&(m.initSegment=u,m.rawProgramDateTime=u.rawProgramDateTime,u.rawProgramDateTime=null);var y=r[1];if(y){m.duration=parseFloat(y);var v=(" "+r[2]).slice(1);m.title=v||null,m.tagList.push(v?["INF",y,v]:["INF",y])}else if(r[3])G(m.duration)&&(m.start=c,s&&Dt(m,s,o),m.sn=h,m.level=i,m.cc=f,m.urlId=F,l.push(m),v=(" "+r[3]).slice(1),m.relurl=dt(o,v),Pt(m,p),c+=(p=m).duration,h++,_=!(d=0));else if(r[4]){y=(" "+r[4]).slice(1);p?m.setByteRange(y,p):m.setByteRange(y)}else if(r[5])m.rawProgramDateTime=(" "+r[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),-1===g&&(g=l.length);else if(r=r[0].match(Tt)){for(a=1;a<r.length&&void 0===r[a];a++);var A=(" "+r[a]).slice(1),E=(" "+r[a+1]).slice(1),b=r[a+2]?(" "+r[a+2]).slice(1):"";switch(A){case"PLAYLIST-TYPE":o.type=E.toUpperCase();break;case"MEDIA-SEQUENCE":h=o.startSN=parseInt(E);break;case"SKIP":var w=new V(E),S=(ht(o,w,["RECENTLY-REMOVED-DATERANGES"]),w.decimalInteger("SKIPPED-SEGMENTS"));if(G(S)){for(var N=o.skippedSegments=S;N--;)l.unshift(null);h+=S}S=w.enumeratedString("RECENTLY-REMOVED-DATERANGES");S&&(o.recentlyRemovedDateranges=S.split("\t"));break;case"TARGETDURATION":o.targetduration=Math.max(parseInt(E),1);break;case"VERSION":o.version=parseInt(E);break;case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(E||b)&&m.tagList.push(b?[E,b]:[E]);break;case"DISCONTINUITY":f++,m.tagList.push(["DIS"]);break;case"GAP":m.gap=!0,m.tagList.push([A]);break;case"BITRATE":m.tagList.push([A,E]);break;case"DATERANGE":w=new V(E),S=(ht(o,w,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),ht(o,w,w.clientAttrs),new le(w,o.dateRanges[w.ID]));S.isValid||o.skippedSegments?o.dateRanges[S.id]=S:ne.warn('Ignoring invalid DATERANGE tag: "'+E+'"'),m.tagList.push(["EXT-X-DATERANGE",E]);break;case"DEFINE":var T=new V(E);ht(o,T,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in T?(k=o,C=O,L=void 0,R=(R=T).IMPORT,C&&R in C?((L=k.variableList)||(k.variableList=L={}),L[R]=C[R]):k.playlistParsingError||(k.playlistParsingError=new Error('EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "'+R+'"'))):ct(o,T,t);break;case"DISCONTINUITY-SEQUENCE":f=parseInt(E);break;case"KEY":var L=Ct(E,t,o,U);
10if(L.isSupported()){if("NONE"===L.method){s=void 0;break}(s=(s=s||{})[L.keyFormat]?$({},s):s)[L.keyFormat]=L}else ne.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+E+'"');break;case"START":o.startTimeOffset=Rt(E);break;case"MAP":var k,C=new V(E);ht(o,C,["BYTERANGE","URI"]),m.duration?(xt(k=new ce(n,t),C,i,s),(m.initSegment=u=k).rawProgramDateTime&&!m.rawProgramDateTime&&(m.rawProgramDateTime=u.rawProgramDateTime)):(xt(m,C,i,s),u=m,_=!0);break;case"SERVER-CONTROL":var R=new V(E);o.canBlockReload=R.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=R.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=0<o.canSkipUntil&&R.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=R.optionalFloat("PART-HOLD-BACK",0),o.holdBack=R.optionalFloat("HOLD-BACK",0);break;case"PART-INF":T=new V(E);o.partTarget=T.decimalFloatingPoint("PART-TARGET");break;case"PART":var I=(I=o.partList)||(o.partList=[]),P=0<d?I[I.length-1]:void 0,x=d++,D=new V(E),D=(ht(o,D,["BYTERANGE","URI"]),new fe(D,m,t,x,P));I.push(D),m.duration+=D.duration;break;case"PRELOAD-HINT":x=new V(E);ht(o,x,["URI"]),o.preloadHint=x;break;case"RENDITION-REPORT":P=new V(E);ht(o,P,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(P);break;default:ne.warn("line parsed but not handled: "+r)}}else ne.warn("No matches on slow regex match for level playlist!")}p&&!p.relurl?(l.pop(),c-=p.duration,o.partList&&(o.fragmentHint=p)):o.partList&&(Pt(m,p),m.cc=f,o.fragmentHint=m,s)&&Dt(m,s,o);var M=l.length,j=l[0],B=l[M-1];return 0<(c+=o.skippedSegments*o.targetduration)&&M&&B?(o.averagetargetduration=c/M,M=B.sn,o.endSN="initSegment"!==M?M:0,o.live||(B.endList=!0),j&&(o.startCC=j.cc)):(o.endSN=0,o.startCC=0),o.fragmentHint&&(c+=o.fragmentHint.duration),o.totalduration=c,o.endCC=f,0<g&&function(e,t){for(var i=e[t],n=t;n--;){var r=e[n];if(!r)return;r.programDateTime=i.programDateTime-1e3*r.duration,i=r}}(l,g),o},kt);function kt(){}function Ct(e,t,i,n){var e=new V(e),i=(ht(i,e,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]),null!=(i=e.METHOD)?i:""),r=e.URI,a=e.hexadecimalInteger("IV"),s=e.KEYFORMATVERSIONS,o=null!=(o=e.KEYFORMAT)?o:"identity",e=(r&&e.IV&&!a&&ne.error("Invalid IV: "+e.IV),r?Lt.resolve(r,t):""),r=(s||"1").split("/").map(Number).filter(Number.isFinite);return new st(i,e,o,r,a,n.token)}function Rt(e){e=new V(e).decimalFloatingPoint("TIME-OFFSET");return G(e)?e:null}function It(e,t,i){t=t[i];t&&(e[i]=t)}function Pt(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),G(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function xt(e,t,i,n){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",n&&(e.levelkeys=n),e.initSegment=null}function Dt(e,t,i){e.levelkeys=t;i=i.encryptedFragments;i.length&&i[i.length-1].levelkeys===t||!Object.keys(t).some(function(e){return t[e].isCommonEncryption})||i.push(e)}var Mt="manifest",Bt="level",Ft="audioTrack",Ot="subtitleTrack",_="main",Ut="audio",Nt="subtitle";function jt(e){switch(e.type){case Ft:return Ut;case Ot:return Nt;default:return _}}function Gt(e,t){e=e.url;return e=void 0!==e&&0!==e.indexOf("data:")?e:t.url}(t=Ht.prototype).startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.LEVEL_LOADING,this.onLevelLoading,this),e.on(ee.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(ee.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.LEVEL_LOADING,this.onLevelLoading,this),e.off(ee.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(ee.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,i=t.pLoader,n=t.loader,i=new(i||n)(t);return this.loaders[e.type]=i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){t=t.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:Mt,url:t,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var i=t.id,n=t.level,r=t.url,t=t.deliveryDirectives;this.load({id:i,level:n,responseType:"text",type:Bt,url:r,deliveryDirectives:t})},t.onAudioTrackLoading=function(e,t){var i=t.id,n=t.groupId,r=t.url,t=t.deliveryDirectives;this.load({id:i,groupId:n,level:null,responseType:"text",type:Ft,url:r,deliveryDirectives:t})},t.onSubtitleTrackLoading=function(e,t){var i=t.id,n=t.groupId,r=t.url,t=t.deliveryDirectives;this.load({id:i,groupId:n,level:null,responseType:"text",type:Ot,url:r,deliveryDirectives:t})},t.load=function(e){var s=this,t=this.hls.config,i=this.getInternalLoader(e);if(i){var n=i.context;if(n&&n.url===e.url)return void ne.trace("[playlist-loader]: playlist request ongoing");ne.log("[playlist-loader]: aborting previous loader for type: "+e.type),i.abort()}n=e.type===Mt?t.manifestLoadPolicy.default:$({},t.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),G(null==(t=e.deliveryDirectives)?void 0:t.part)&&(e.type===Bt&&null!==e.level?r=this.hls.levels[e.level].details:e.type===Ft&&null!==e.id?r=this.hls.audioTracks[e.id].details:e.type===Ot&&null!==e.id&&(r=this.hls.subtitleTracks[e.id].details),r)&&(t=r.partTarget,r=r.targetduration,t&&r&&(t=1e3*Math.max(3*t,.8*r),n=$({},n,{maxTimeToFirstByteMs:Math.min(t,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,n.maxTimeToFirstByteMs)})));var r=n.errorRetry||n.timeoutRetry||{},t={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:r.maxNumRetry||0,retryDelay:r.retryDelayMs||0,maxRetryDelay:r.maxRetryDelayMs||0};i.load(e,t,{onSuccess:function(e,t,i,n){var r=s.getInternalLoader(i),a=(s.resetInternalLoader(i.type),e.data);0===a.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),Lt.isMediaPlaylist(a)?s.handleTrackOrLevelPlaylist(e,t,i,n||null,r):s.handleMasterPlaylist(e,t,i,n)):s.handleManifestParsingError(e,i,new Error("no EXTM3U delimiter"),n||null,t)},onError:function(e,t,i,n){s.handleNetworkError(t,i,!1,e,n)},onTimeout:function(e,t,i){s.handleNetworkError(t,i,!0,void 0,e)}})},t.handleMasterPlaylist=function(e,t,i,n){var r,a,s,o,l,u=this.hls,h=e.data,d=Gt(e,i),c=Lt.parseMasterPlaylist(h,d);c.playlistParsingError?this.handleManifestParsingError(e,i,c.playlistParsingError,n,t):(e=c.contentSteering,i=c.levels,r=c.sessionData,a=c.sessionKeys,s=c.startTimeOffset,o=c.variableList,this.variableList=o,c=(h=Lt.parseMasterPlaylistMedia(h,d,c)).AUDIO,l=h.SUBTITLES,h=h["CLOSED-CAPTIONS"],(c=void 0===c?[]:c).length&&!c.some(function(e){return!e.url})&&i[0].audioCodec&&!i[0].attrs.AUDIO&&(ne.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),c.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new V({}),bitrate:0,url:""})),u.trigger(ee.MANIFEST_LOADED,{levels:i,audioTracks:c,subtitles:l,captions:h,contentSteering:e,url:d,stats:t,networkDetails:n,sessionData:r,sessionKeys:a,startTimeOffset:s,variableList:o}))},t.handleTrackOrLevelPlaylist=function(e,t,i,n,r){var a=this.hls,s=i.id,o=i.level,l=i.type,u=Gt(e,i),s=G(s)?s:0,o=G(o)?o:s,h=jt(i),o=Lt.parseLevelPlaylist(e.data,u,o,h,s,this.variableList,a.config);l===Mt&&(h={attrs:new V({}),bitrate:0,details:o,name:"",url:u},a.trigger(ee.MANIFEST_LOADED,{levels:[h],audioTracks:[],url:u,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})),t.parsing.end=performance.now(),i.levelDetails=o,this.handlePlaylistLoaded(o,e,t,i,n,r)},t.handleManifestParsingError=function(e,t,i,n,r){this.hls.trigger(ee.ERROR,{type:te.NETWORK_E
10RROR,details:ie.MANIFEST_PARSING_ERROR,fatal:t.type===Mt,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:n,stats:r})},t.handleNetworkError=function(e,t,i,n,r){var a="A network "+((i=void 0===i?!1:i)?"timeout":"error"+(n?" (status "+n.code+")":""))+" occurred while loading "+e.type,s=(e.type===Bt?a+=": "+e.level+" id: "+e.id:e.type!==Ft&&e.type!==Ot||(a+=" id: "+e.id+' group-id: "'+e.groupId+'"'),new Error(a)),o=(ne.warn("[playlist-loader]: "+a),ie.UNKNOWN),l=!1,a=this.getInternalLoader(e);switch(e.type){case Mt:o=i?ie.MANIFEST_LOAD_TIMEOUT:ie.MANIFEST_LOAD_ERROR,l=!0;break;case Bt:o=i?ie.LEVEL_LOAD_TIMEOUT:ie.LEVEL_LOAD_ERROR,l=!1;break;case Ft:o=i?ie.AUDIO_TRACK_LOAD_TIMEOUT:ie.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case Ot:o=i?ie.SUBTITLE_TRACK_LOAD_TIMEOUT:ie.SUBTITLE_LOAD_ERROR,l=!1}a&&this.resetInternalLoader(e.type);a={type:te.NETWORK_ERROR,details:o,fatal:l,url:e.url,loader:a,context:e,error:s,networkDetails:t,stats:r};n&&(s=(null==t?void 0:t.url)||e.url,a.response=m({url:s,data:void 0},n)),this.hls.trigger(ee.ERROR,a)},t.handlePlaylistLoaded=function(e,t,i,n,r,a){var s=this.hls,o=n.type,l=n.level,u=n.id,h=n.groupId,d=n.deliveryDirectives,c=Gt(t,n),f=jt(n),p="number"==typeof n.level&&f===_?l:void 0;if(e.fragments.length){e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));l=e.playlistParsingError;if(l)s.trigger(ee.ERROR,{type:te.NETWORK_ERROR,details:ie.LEVEL_PARSING_ERROR,fatal:!1,url:c,error:l,reason:l.message,response:t,context:n,level:p,parent:f,networkDetails:r,stats:i});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),o){case Mt:case Bt:s.trigger(ee.LEVEL_LOADED,{details:e,level:p||0,id:u||0,stats:i,networkDetails:r,deliveryDirectives:d});break;case Ft:s.trigger(ee.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:d});break;case Ot:s.trigger(ee.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:d})}}else{l=new Error("No Segments found in Playlist");s.trigger(ee.ERROR,{type:te.NETWORK_ERROR,details:ie.LEVEL_EMPTY_ERROR,fatal:!1,url:c,error:l,reason:l.message,response:t,context:n,level:p,parent:f,networkDetails:r,stats:i})}};var Vt=Ht;function Ht(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}function Yt(e,t){var i;try{i=new Event("addtrack")}catch(e){(i=document.createEvent("Event")).initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function zt(e,t){var i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(i){ne.debug("[texttrack-utils]: "+i);try{var n=new self.TextTrackCue(t.startTime,t.endTime,t.text);n.id=t.id,e.addCue(n)}catch(e){ne.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: "+e)}}"disabled"===i&&(e.mode=i)}function Wt(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var i=e.cues.length;i--;)e.removeCue(e.cues[i]);"disabled"===t&&(e.mode=t)}function Qt(e,t,i,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&0<e.cues.length)for(var a=function(e,t,i){var n=[],r=function(e,t){if(t<e[0].startTime)return 0;var i=e.length-1;if(t>e[i].endTime)return-1;for(var n=0,r=i;n<=r;){var a=Math.floor((r+n)/2);if(t<e[a].startTime)r=a-1;else{if(!(t>e[a].startTime&&n<i))return a;n=a+1}}return e[n].startTime-t<t-e[r].startTime?n:r}(e,t);if(-1<r)for(var a=r,s=e.length;a<s;a++){var o=e[a];if(o.startTime>=t&&o.endTime<=i)n.push(o);else if(o.startTime>i)return n}return n}(e.cues,t,i),s=0;s<a.length;s++)n&&!n(a[s])||e.removeCue(a[s]);"disabled"===r&&(e.mode=r)}var Kt="org.id3",Jt="https://aomedia.org/emsg/ID3";function qt(){if("undefined"!=typeof self)return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var Xt=function(){var e=qt();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function Zt(e,t){return e.getTime()/1e3-t}(i=oi.prototype).destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},i._registerListeners=function(){var e=this.hls;
10e.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(ee.LEVEL_UPDATED,this.onLevelUpdated,this)},i._unregisterListeners=function(){var e=this.hls;e.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(ee.LEVEL_UPDATED,this.onLevelUpdated,this)},i.onMediaAttached=function(e,t){this.media=t.media},i.onMediaDetaching=function(){this.id3Track&&(Wt(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},i.onManifestLoading=function(){this.dateRangeCuesAppended={}},i.createTrack=function(e){e=this.getID3Track(e.textTracks);return e.mode="hidden",e},i.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var i=e[t];if("metadata"===i.kind&&"id3"===i.label)return Yt(i,this.media),i}return this.media.addTextTrack("metadata","id3")}},i.onFragParsingMetadata=function(e,t){if(this.media){var i=this.hls.config,n=i.enableEmsgMetadataCues,r=i.enableID3MetadataCues;if(n||r){var a=t.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var s=qt(),o=0;o<a.length;o++){var l=a[o].type;if((l!==Jt||n)&&r){var u=Oe(a[o].data);if(u){var h=a[o].pts,d=h+a[o].duration;(d=Xt<d?Xt:d)-h<=0&&(d=h+.25);for(var c=0;c<u.length;c++){var f,p=u[c];Fe(p)||(this.updateId3CueEnds(h,l),(f=new s(h,d,"")).value=p,l&&(f.type=l),this.id3Track.addCue(f))}}}}}}},i.updateId3CueEnds=function(e,t){var i,n=null==(i=this.id3Track)?void 0:i.cues;if(n)for(var r=n.length;r--;){var a=n[r];a.type===t&&a.startTime<e&&a.endTime===Xt&&(a.endTime=e)}},i.onBufferFlushing=function(e,t){var i,n,r=t.startOffset,a=t.endOffset,t=t.type,s=this.id3Track,o=this.hls;o&&(o=o.config,i=o.enableEmsgMetadataCues,n=o.enableID3MetadataCues,s)&&(i||n)&&Qt(s,r,a,"audio"===t?function(e){return e.type===Kt&&n}:"video"===t?function(e){return e.type===Jt&&i}:function(e){return e.type===Kt&&n||e.type===Jt&&i})},i.onLevelUpdated=function(e,t){var p=this,t=t.details;if(this.media&&t.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var m=this.dateRangeCuesAppended,i=this.id3Track,g=t.dateRanges,_=Object.keys(g);if(i)for(var n=Object.keys(m).filter(function(e){return!_.includes(e)}),r=n.length;r--;)!function(){var t=n[r];Object.keys(m[t].cues).forEach(function(e){i.removeCue(m[t].cues[e])}),delete m[t]}();t=t.fragments[t.fragments.length-1];if(0!==_.length&&G(null==t?void 0:t.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var y=t.programDateTime/1e3-t.start,v=qt(),A=0;A<_.length;A++)!function(){var e=_[A],n=g[e],t=m[e],i=(null==t?void 0:t.cues)||{},r=(null==t?void 0:t.durationKnown)||!1,a=Zt(n.startDate,y),s=Xt,o=n.endDate;o?(s=Zt(o,y),r=!0):n.endOnNext&&!r&&(o=_.reduce(function(e,t){var i=g[t];return i.class===n.class&&i.id!==t&&i.startDate>n.startDate&&e.push(i),e},[]).sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()})[0])&&(s=Zt(o.startDate,y),r=!0);for(var l,u=Object.keys(n.attr),h=0;h<u.length;h++){var d,c,f=u[h];"ID"!==f&&"CLASS"!==f&&"START-DATE"!==f&&"DURATION"!==f&&"END-DATE"!==f&&"END-ON-NEXT"!==f&&((c=i[f])?r&&!t.durationKnown&&(c.endTime=s):(d=n.attr[f],c=new v(a,s,""),"SCTE35-OUT"!==(l=f)&&"SCTE35-IN"!==l||(l=d,d=Uint8Array.from(l.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer),c.value={key:f,data:d},c.type="com.apple.quicktime.HLS",c.id=e,p.id3Track.addCue(c),i[f]=c))}m[e]={cues:i,dateRange:n,durationKnown:r}}()}}};var $t=oi,ei=((t=si.prototype).destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},t.registerListeners=function(){this.hls.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(ee.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(ee.ERROR,this.onError,this)}
10,t.unregisterListeners=function(){this.hls.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(ee.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(ee.ERROR,this.onError,this)},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},t.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},t.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},t.onLevelUpdated=function(e,t){t=t.details;(this.levelDetails=t).advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},t.onError=function(e,t){t.details===ie.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(t=this.levelDetails))&&t.live&&ne.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},t.timeupdate=function(){var e,t,i,n=this.media,r=this.levelDetails;n&&r&&(this.currentTime=n.currentTime,null!==(t=this.computeLatency()))&&(this._latency=t,i=(e=this.config).lowLatencyMode,e=e.maxLiveSyncPlaybackRate,i)&&1!==e&&null!==(i=this.targetLatency)&&(i=(t=t-i)<Math.min(this.maxLatency,i+r.targetduration),r.live&&i&&.05<t&&1<this.forwardBufferLength?(r=Math.min(2,Math.max(1,e)),i=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20,n.playbackRate=Math.min(r,Math.max(1,i))):1!==n.playbackRate&&0!==n.playbackRate&&(n.playbackRate=1))},t.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},t.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},r(si,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e,t,i,n,r,a=this.levelDetails;return null===a?null:(e=a.holdBack,n=a.partHoldBack,a=a.targetduration,t=(r=this.config).liveSyncDuration,i=r.liveSyncDurationCount,r=r.lowLatencyMode&&n||e,(r=(n=this.hls.userConfig).liveSyncDuration||n.liveSyncDurationCount||0===r?void 0!==t?t:i*a:r)+Math.min(+this.stallCount,a))}},{key:"liveSyncPosition",get:function(){var e,t=this.estimateLiveEdge(),i=this.targetLatency,n=this.levelDetails;return null===t||null===i||null===n?null:(e=n.edge,t=t-i-this.edgeStalled,i=e-n.totalduration,e=e-(this.config.lowLatencyMode&&n.partTarget||n.targetduration),Math.min(Math.max(i,t),e))}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e,t=this.levelDetails;return null===t?0:(e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration),Math.max(t.age-e,0))}},{key:"forwardBufferLength",get:function(){var e,t=this.media,i=this.levelDetails;return t&&i?((e=t.buffered.length)?t.buffered.end(e-1):i.edge)-this.currentTime:0}}]),si),ti=["NONE","TYPE-0","TYPE-1",null],ii=(ai.prototype.addDirectives=function(e){e=new self.URL(e);return void 0!==this.msn&&e.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.href},ai),ni=(ri.prototype.addFallback=function(e){this.url.push(e.url),this._attrs.push(e.attrs)},r(ri,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"averageBitrate",get:function(){return this._avgBitrate||this.realBitrate||this.bitrate}},{key:"attrs",get:function(){return this._attrs[this._urlId]}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){e%=this.url.length;this._urlId!==e&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=e)}},{key:"audioGroupId",get:function(){var e;return null==(e=this.audioGroupIds)?void 0:e[this.urlId]}},{key:"textGroupId",get:function(){var e;return null==(e=this.textGroupIds)?void 0:e[this.urlId]}}]),ri);function ri(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this._avgBitrate=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this._avgBitrate=this.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter(function(e){return e}).join(",").replace(/\.[^.,]+/g,"")}function ai(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}function si(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}function oi(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}function li(e,t,i){i&&("audio"===t?(e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds[e.url.length-1]=i):"text"===t&&(e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds[e.url.length-1]=i))}function ui(e,t){var i,n=t.startPTS;G(n)?(i=0,(n=t.sn>e.sn?(i=n-e.start,e):(i=e.start-n,t)).duration!==i&&(n.duration=i)):t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}
10function hi(e,t,i,n,r,a){n-i<=0&&(ne.warn("Fragment should have a positive duration",t),n=i+t.duration,a=r+t.duration);var s=i,o=n,l=t.startPTS,u=t.endPTS,h=(G(l)&&(h=Math.abs(l-i),G(t.deltaPTS)?t.deltaPTS=Math.max(h,t.deltaPTS):t.deltaPTS=h,s=Math.max(i,l),i=Math.min(i,l),r=Math.min(r,t.startDTS),o=Math.min(n,u),n=Math.max(n,u),a=Math.max(a,t.endDTS)),i-t.start);0!==t.start&&(t.start=i),t.duration=n-t.start,t.startPTS=i,t.maxStartPTS=s,t.startDTS=r,t.endPTS=n,t.minEndPTS=o,t.endDTS=a;var d,l=t.sn;if(!e||l<e.startSN||l>e.endSN)return 0;var u=l-e.startSN,c=e.fragments;for(c[u]=t,d=u;0<d;d--)ui(c[d],c[d-1]);for(d=u;d<c.length-1;d++)ui(c[d],c[d+1]);return e.fragmentHint&&ui(c[c.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function di(e,t){for(var i=null,n=e.fragments,r=n.length-1;0<=r;r--){var a=n[r].initSegment;if(a){i=a;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;for(var s,o,l,u=0,h=e,d=t,c=d.skippedSegments,f=Math.max(h.startSN,d.startSN)-d.startSN,p=(h.fragmentHint?1:0)+(c?d.endSN:Math.min(h.endSN,d.endSN))-d.startSN,m=d.startSN-h.startSN,g=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,_=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments,y=f;y<=p;y++){var v=_[m+y],A=g[y];c&&!A&&y<c&&(A=d.fragments[y]=v),v&&A&&(A=A,(v=v).relurl&&(u=v.cc-A.cc),G(v.startPTS)&&G(v.endPTS)&&(A.start=A.startPTS=v.startPTS,A.startDTS=v.startDTS,A.maxStartPTS=v.maxStartPTS,A.endPTS=v.endPTS,A.endDTS=v.endDTS,A.minEndPTS=v.minEndPTS,A.duration=v.endPTS-v.startPTS,A.duration&&(s=A),t.PTSKnown=t.alignedSliding=!0),A.elementaryStreams=v.elementaryStreams,A.loader=v.loader,A.stats=v.stats,A.urlId=v.urlId,v.initSegment)&&(A.initSegment=v.initSegment,i=v.initSegment)}if(i&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach(function(e){e.initSegment&&e.initSegment.relurl!==(null==i?void 0:i.relurl)||(e.initSegment=i)}),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some(function(e){return!e}),t.deltaUpdateFailed){ne.warn("[level-helper] Previous playlist missing segments ski
10pped in delta playlist");for(var E=t.skippedSegments;E--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=(h=e.dateRanges,o=t.dateRanges,f=t.recentlyRemovedDateranges,l=$({},h),f&&f.forEach(function(e){delete l[e]}),Object.keys(o).forEach(function(e){var t=new le(o[e].attr,l[e]);t.isValid?l[e]=t:ne.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(o[e].attr)+'"')}),l));var b=t.fragments;if(u){ne.warn("discontinuity sliding from playlist, take drift into account");for(var w=0;w<b.length;w++)b[w].cc+=u}t.skippedSegments&&(t.startCC=t.fragments[0].cc);var S=e.partList,T=t.partList;if(S&&T)for(var L=0,k=0,C=S.length;k<=C;k++){var R=S[k],I=T[k+L];R&&I&&R.index===I.index&&R.fragment.sn===I.fragment.sn?(R=R,(I=I).elementaryStreams=R.elementaryStreams,I.stats=R.stats):L--}s?hi(t,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS):ci(e,t),b.length&&(t.totalduration=t.edge-b[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;h=t.advancedDateTime;t.advanced&&h?(f=t.edge,t.driftStart||(t.driftStartTime=h,t.driftStart=f),t.driftEndTime=h,t.driftEnd=f):(t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime)}function ci(e,t){var i=t.startSN+t.skippedSegments-e.startSN,e=e.fragments;i<0||i>=e.length||fi(t,e[i].start)}function fi(e,t){if(t){for(var i=e.fragments,n=e.skippedSegments;n<i.length;n++)i[n].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function pi(e,t,i){return null!=e&&e.details?mi(null==(e=e.details)?void 0:e.partList,t,i):null}function mi(e,t,i){if(e)for(var n=e.length;n--;){var r=e[n];if(r.index===i&&r.fragment.sn===t)return r}return null}function gi(e){switch(e.details){case ie.FRAG_LOAD_TIMEOUT:case ie.KEY_LOAD_TIMEOUT:case ie.LEVEL_LOAD_TIMEOUT:case ie.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function _i(e,t){t=gi(t);return e.default[(t?"timeout":"error")+"Retry"]}function yi(e,t){t="linear"===e.backoff?1:Math.pow(2,t);return Math.min(t*e.retryDelayMs,e.maxRetryDelayMs)}function vi(e){return m(m({},e),{errorRetry:null,timeoutRetry:null})}function Ai(e,t,i,n){return e&&t<e.maxNumRetry&&(0===n&&!1===navigator.onLine||n&&(n<400||499<n)||i)}var Ei=function(e,t){for(var i,n,r=0,a=e.length-1;r<=a;){var s=t(n=e[i=(r+a)/2|0]);if(0<s)r=1+i;else{if(!(s<0))return n;a=i-1}}return null};function bi(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=null;return e?r=t[e.sn-t[0].sn+1]||null:0===i&&0===t[0].start&&(r=t[0]),r&&0===wi(i,n,r)||!(t=Ei(t,wi.bind(null,i,n)))||t===e&&r?r:t}function wi(e,t,i){return void 0===t&&(t=0),i.start<=(e=void 0===e?0:e)&&i.start+i.duration>e?0:(t=Math.min(t,i.duration+(i.deltaPTS||0)),i.start+i.duration-t<=e?1:i.start-t>e&&i.start?-1:0)}(i=Fi.prototype).registerListeners=function(){var e=this.hls;e.on(ee.ERROR,this.onError,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.LEVEL_UPDATED,this.onLevelUpdated,this)},i.unregisterListeners=function(){var e=this.hls;e&&(e.off(ee.ERROR,this.onError,this),e.off(ee.ERROR,this.onErrorOut,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.LEVEL_UPDATED,this.onLevelUpdated,this))},i.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},i.startLoad=function(e){},i.stopLoad=function(){this.playlistError=0},i.getVariantLevelIndex=function(e){return(null==e?void 0:e.type)===_?e.level:this.hls.loadLevel},i.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},i.onLevelUpdated=function(){this.playlistError=0},i.onError=function(e,t){if(!t.fatal){var i,n=this.hls,r=t.context;switch(t.details){case ie.FRAG_LOAD_ERROR:case ie.FRAG_LOAD_TIMEOUT:case ie.KEY_LOAD_ERROR:case ie.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case ie.FRAG_PARSING_ERROR:if(null!=(a=t.frag)&&a.gap)return void(t.errorAction={action:0,flags:0});case ie.FRAG_GAP:case ie.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=2);case ie.LEVEL_EMPTY_ERROR:case ie.LEVEL_PARSING_ERROR:var a=t.parent===_?t.level:n.loadLevel;return void(t.details===ie.LEVEL_EMPTY_ERROR&&null!=(s=t.context)&&null!=(s=s.levelDetails)&&s.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,a)));case ie.LEVEL_LOAD_ERROR:case ie.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==r?void 0:r.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level)));case ie.AUDIO_TRACK_LOAD_ERROR:case ie.AUDIO_TRACK_LOAD_TIMEOUT:case ie.SUBTITLE_LOAD_ERROR:case ie.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){var s=n.levels[n.loadLevel];if(s&&(r.type===Ft&&r.groupId===s.audioGroupId||r.type===Ot&&r.groupId===s.textGroupId))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=2,void(t.errorAction.flags=1)}return;case ie.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var a=n.levels[n.loadLevel],s=null==a?void 0:a.attrs["HDCP-LEVEL"];return void(s&&(t.errorAction={action:2,flags:2,hdcpLevel:s}));
10case ie.BUFFER_ADD_CODEC_ERROR:case ie.REMUX_ALLOC_ERROR:case ie.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(a=t.level)?a:n.loadLevel));case ie.INTERNAL_EXCEPTION:case ie.BUFFER_APPENDING_ERROR:case ie.BUFFER_FULL_ERROR:case ie.LEVEL_SWITCH_ERROR:case ie.BUFFER_STALLED_ERROR:case ie.BUFFER_SEEK_OVER_HOLE:case ie.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:0,flags:0})}t.type===te.KEY_SYSTEM_ERROR&&(i=this.getVariantLevelIndex(t.frag),t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,i))}},i.getPlaylistRetryOrSwitchAction=function(e,t){var i=_i(this.hls.config.playlistLoadPolicy,e),n=this.playlistError++,r=null==(r=e.response)?void 0:r.code;return Ai(i,n,gi(e),r)?{action:5,flags:0,retryConfig:i,retryCount:n}:(r=this.getLevelSwitchAction(e,t),i&&(r.retryConfig=i,r.retryCount=n),r)},i.getFragRetryOrSwitchAction=function(e){var t=this.hls,i=this.getVariantLevelIndex(e.frag),n=t.levels[i],r=t.config,a=r.fragLoadPolicy,r=r.keyLoadPolicy,r=_i(e.details.startsWith("key")?r:a,e),a=t.levels.reduce(function(e,t){return e+t.fragmentError},0);if(n){e.details!==ie.FRAG_GAP&&n.fragmentError++;n=null==(t=e.response)?void 0:t.code;if(Ai(r,a,gi(e),n))return{action:5,flags:0,retryConfig:r,retryCount:a}}t=this.getLevelSwitchAction(e,i);return r&&(t.retryConfig=r,t.retryCount=a),t},i.getLevelSwitchAction=function(e,t){var i=this.hls,n=(null==t&&(t=i.loadLevel),this.hls.levels[t]);if(n&&(n.loadError++,i.autoLevelEnabled)){for(var r=-1,a=i.levels,s=i.loadLevel,o=i.minAutoLevel,l=i.maxAutoLevel,u=null==(t=e.frag)?void 0:t.type,t=null!=(t=e.context)?t:{},h=t.type,d=t.groupId,c=a.length;c--;){var f=(c+s)%a.length;if(f!==s&&o<=f&&f<=l&&0===a[f].loadError){var p=a[f];if(e.details===ie.FRAG_GAP&&e.frag){var m=a[f].details;if(m){m=bi(e.frag,m.fragments,e.frag.start);if(null!=m&&m.gap)continue}}else{if(h===Ft&&d===p.audioGroupId||h===Ot&&d===p.textGroupId)continue;if(u===Ut&&n.audioGroupId===p.audioGroupId||u===Nt&&n.textGroupId===p.textGroupId)continue}r=f;break}}if(-1<r&&i.loadLevel!==r)return e.levelRetry=!0,{action:2,flags:this.playlistError=0,nextAutoLevel:r}}return{action:2,flags:1}},i.onErrorOut=function(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case 0:break;case 2:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===ie.FRAG_GAP||(t.fatal=!0)}t.fatal&&this.hls.stopLoad()},i.sendAlternateToPenaltyBox=function(e){var t=this.hls,i=e.errorAction;if(i){var n=i.flags,r=i.hdcpLevel,a=i.nextAutoLevel;switch(n){case 0:this.switchLevel(e,a);break;case 1:i.resolved||(i.resolved=this.redundantFailover(e));break;case 2:r&&(t.maxHdcpLevel=ti[ti.indexOf(r)-1],i.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+t.maxHdcpLevel+'" or lower')}i.resolved||this.switchLevel(e,a)}},i.switchLevel=function(e,t){void 0!==t&&e.errorAction&&(this.warn("switching to level "+t+" after "+e.details),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)},i.redundantFailover=function(i){var n=this,r=this.hls,a=this.penalizedRenditions,s=i.parent===_?i.level||0:r.loadLevel,o=r.levels[s],l=o.url.length,u=(i.frag||o).urlId;o.urlId!==u||i.frag&&!o.details||this.penalizeRendition(o,i);for(var e,h=1;h<l;h++)if(e=function(){var t=(u+h)%l,e=a[t];if(!e||function(e,t,i){if(3e5<performance.now()-e.lastErrorPerfMs)return 1;var n=e.details;if(t.details===ie.FRAG_GAP&&n&&t.frag){var r=t.frag.start,r=bi(null,n.fragments,r);if(r&&!r.gap)return 1}if(i&&e.errors.length<i.errors.length){r=e.errors[e.errors.length-1];if(n&&r.frag&&t.frag&&Math.abs(r.frag.start-t.frag.start)>3*n.targetduration)return 1}}(e,i,a[u]))return n.warn("Switching to Redundant Stream "+(1+t)+"/"+l+': "'+o.url[t]+'" after '+i.details),n.playlistError=0,r.levels.forEach(function(e){e.urlId=t}),r.nextLoadLevel=s,{v:!0}}())return e.v;return!1},i.penalizeRendition=function(e,t){var i=this.penalizedRenditions,n=i[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};n.lastErrorPerfMs=performance.now(),n.errors.push(t),n.details=e.details,i[e.urlId]=n};var t=Fi,i=((i=Bi.prototype).destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.clearTimer=function(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)},i.startLoad=function(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(e,t){var i=null==t?void 0:t.renditionReports;if(i){for(var n,r,a,s=-1,o=0;o<i.length;o++){var l=i[o],u=void 0;
10try{u=new self.URL(l.URI,t.url).href}catch(e){ne.warn("Could not construct new URL for Rendition Report: "+e),u=l.URI||""}if(u===e){s=o;break}u===e.substring(0,u.length)&&(s=o)}if(-1!==s)return r=i[s],n=parseInt(r["LAST-MSN"])||(null==t?void 0:t.lastPartSn),r=parseInt(r["LAST-PART"])||(null==t?void 0:t.lastPartIndex),this.hls.config.lowLatencyMode&&(a=Math.min(t.age-t.partTarget,t.targetduration),0<=r)&&a>t.partTarget&&(r+=1),new ii(n,0<=r?r:void 0,"")}},i.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},i.shouldLoadPlaylist=function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)},i.shouldReloadPlaylist=function(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)},i.playlistLoaded=function(e,t,i){var n=this,r=t.details,a=t.stats,s=self.performance.now(),o=a.loading.first?Math.max(0,s-a.loading.first):0;if(r.advancedDateTime=Date.now()-o,r.live||null!=i&&i.live){if(r.reloaded(i),i&&this.log("live playlist "+e+" "+(r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:"MISSED")),i&&0<r.fragments.length&&di(i,r),this.canLoad&&r.live){var l,o=void 0,u=void 0;if(r.canBlockReload&&r.endSN&&r.advanced){var h=this.hls.config.lowLatencyMode,d=r.lastPartSn,c=r.endSN,f=r.lastPartIndex,p=d===c,d=(-1!==f?(o=p?c+1:d,u=p?h?0:f:f+1):o=c+1,r.age),f=d+r.ageHeader,c=Math.min(f-r.partTarget,1.5*r.targetduration);if(0<c&&(i&&c>i.tuneInGoal?(this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+c+" with playlist age: "+r.age),c=0):(o+=f=Math.floor(c/r.targetduration),void 0!==u&&(u+=Math.round(c%r.targetduration/r.partTarget)),this.log("CDN Tune-in age: "+r.ageHeader+"s last advanced "+d.toFixed(2)+"s goal: "+c+" skip sn "+f+" to part "+u)),r.tuneInGoal=c),l=this.getDeliveryDirectives(r,t.deliveryDirectives,o,u),h||!p)return void this.loadPlaylist(l)}else r.canBlockReload&&(l=this.getDeliveryDirectives(r,t.deliveryDirectives,o,u));i=this.hls.mainForwardBufferInfo,d=i?i.end-i.len:0,p=(void 0===(f=1e3*(r.edge-d))&&(f=1/0),c=1e3*r.targetduration,r.updated?(h=r.fragments).length&&f<4*c&&(f=1e3*h[h.length-1].duration)<c&&(c=f):c/=2,Math.round(c)),t=(r.updated&&s>this.requestScheduled+p&&(this.requestScheduled=a.loading.start),void 0!==o&&r.canBlockReload?this.requestScheduled=a.loading.first+p-(1e3*r.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+p<s?this.requestScheduled=s:this.requestScheduled-s<=0&&(this.requestScheduled+=p),this.requestScheduled-s),t=Math.max(0,t);this.log("reload live playlist "+e+" in "+Math.round(t)+" ms"),this.timer=self.setTimeout(function(){return n.loadPlaylist(l)},t)}}else this.clearTimer()},i.getDeliveryDirectives=function(e,t,i,n){o=i,r=e.canSkipUntil,a=e.canSkipDateRanges,s=e.endSN;var r,a,s,o=r&&(void 0!==o?o-s:0)<r?a?"v2":"YES":"";return null!=t&&t.skip&&e.deltaUpdateFailed&&(i=t.msn,n=t.part,o=""),new ii(i,n,o)},i.checkRetry=function(e){var t=this,i=e.details,n=gi(e),r=e.errorAction,a=r||{},s=a.action,o=a.retryCount,o=void 0===o?0:o,a=a.retryConfig,s=!!r&&!!a&&(5===s||!r.resolved&&2===s);if(s){if(this.requestScheduled=-1,o>=a.maxNumRetry)return!1;n&&null!=(n=e.context)&&n.deliveryDirectives?(this.warn("Retrying playlist loading "+(o+1)+"/"+a.maxNumRetry+' after "'+i+'" without delivery-directives'),this.loadPlaylist()):(n=yi(a,o),this.timer=self.setTimeout(function(){return t.loadPlaylist()},n),this.warn("Retrying playlist loading "+(o+1)+"/"+a.maxNumRetry+' after "'+i+'" in '+n+"ms")),e.levelRetry=!0,r.resolved=!0}return s},Bi),Si=((n=Mi.prototype).sample=function(e,t){var i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e},n.getTotalWeight=function(){return this.totalWeight_},n.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},Mi),Ti=((n=Di.prototype).update=function(e,t){var i=this.slow_,n=this.fast_,r=this.ttfb_;i.halfLife!==e&&(this.slow_=new Si(e,i.getEstimate(),i.getTotalWeight())),n.halfLife!==t&&(this.fast_=new Si(t,n.getEstimate(),n.getTotalWeight(
10))),r.halfLife!==e&&(this.ttfb_=new Si(e,r.getEstimate(),r.getTotalWeight()))},n.sample=function(e,t){e=(e=Math.max(e,this.minDelayMs_))/1e3,t=8*t/e;this.fast_.sample(e,t),this.slow_.sample(e,t)},n.sampleTTFB=function(e){var t=e/1e3,t=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(t,Math.max(e,5))},n.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},n.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},n.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},n.destroy=function(){},Di),n=((n=xi.prototype).resetEstimator=function(e){e&&(ne.log("setting initial bwe to "+e),this.hls.config.abrEwmaDefaultEstimate=e),this.bwEstimator=this.initEstimator()},n.initEstimator=function(){var e=this.hls.config;return new Ti(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)},n.registerListeners=function(){var e=this.hls;e.on(ee.FRAG_LOADING,this.onFragLoading,this),e.on(ee.FRAG_LOADED,this.onFragLoaded,this),e.on(ee.FRAG_BUFFERED,this.onFragBuffered,this),e.on(ee.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(ee.LEVEL_LOADED,this.onLevelLoaded,this)},n.unregisterListeners=function(){var e=this.hls;e.off(ee.FRAG_LOADING,this.onFragLoading,this),e.off(ee.FRAG_LOADED,this.onFragLoaded,this),e.off(ee.FRAG_BUFFERED,this.onFragBuffered,this),e.off(ee.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(ee.LEVEL_LOADED,this.onLevelLoaded,this)},n.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},n.onFragLoading=function(e,t){var i=t.frag;this.ignoreFragment(i)||(this.fragCurrent=i,this.partCurrent=null!=(i=t.part)?i:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))},n.onLevelSwitching=function(e,t){this.clearTimer()},n.getTimeToLoadFrag=function(e,t,i,n){return e+i/t+(n?this.lastLevelLoadSec:0)},n.onLevelLoaded=function(e,t){var i=this.hls.config,n=t.stats,r=n.total,n=n.bwEstimate;G(r)&&G(n)&&(this.lastLevelLoadSec=8*r/n),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)},n._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,i=this.hls,n=i.autoLevelEnabled,r=i.media;if(e&&r){var a=performance.now(),s=(t||e).stats,o=(t||e).duration,a=a-s.loading.start;if(s.aborted||s.loaded&&s.loaded===s.total||0===e.level)this.clearTimer(),this._nextAutoLevel=-1;else if(n&&!r.paused&&r.playbackRate&&r.readyState){n=i.mainForwardBufferInfo;if(null!==n){var l=this.bwEstimator.getEstimateTTFB(),r=Math.abs(r.playbackRate);if(!(a<=Math.max(l,o/(2*r)*1e3))){var u=n.len/r;if(!(2*o/r<=u)){var n=s.loading.first?s.loading.first-s.loading.start:-1,r=s.loaded&&-1<n,h=this.getBwEstimate(),d=i.levels,c=i.minAutoLevel,f=d[e.level],f=s.total||Math.max(s.loaded,Math.round(o*f.maxBitrate/8)),p=a-n,p=(p<1&&r&&(p=Math.min(a,8*s.loaded/h)),r?1e3*s.loaded/p:0),f=p?(f-s.loaded)/p:8*f/h+l/1e3;if(!(f<=u)){for(var m=p?8*p:h,g=Number.POSITIVE_INFINITY,_=e.level-1;c<_;_--){var y=d[_].maxBitrate;if((g=this.getTimeToLoadFrag(l/1e3,m,o*y,!d[_].details))<u)break}f<=g||10*o<g||(i.nextLoadLevel=_,r?this.bwEstimator.sample(a-Math.min(l,n),s.loaded):this.bwEstimator.sampleTTFB(a),this.clearTimer(),ne.warn("[abr] Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly;\n Time to underbuffer: "+u.toFixed(3)+" s\n Estimated load time for current fragment: "+f.toFixed(3)+" s\n Estimated load time for down switch fragment: "+g.toFixed(3)+" s\n TTFB estimate: "+n+"\n Current BW estimate: "+(G(h)?(h/1024).toFixed(3):"Unknown")+" Kb/s\n New BW estimate: "+(this.bwEstimator.getEstimate()/1024).toFixed(3)+" Kb/s\n Aborting and switching to level "+_),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),i.trigger(ee.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:s}))}}}}}}},n.onFragLoaded=function(e,t){var i,n,r,a=t.frag,t=t.part,s=(t||a).stats;a.type===_&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),this.ignoreFragment(a)||(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate&&(n=(t||a).duration,i=((r=this.hls.levels[a.level]).loaded?r.loaded.bytes:0)+s.loaded,n=(r.loaded?r.loaded.duration:0)+n,r.loaded={bytes:i,duration:n},r.realBitrate=Math.round(8*i/n)),a.bitrateTest&&(r={stats:s,frag:a,part:t,id:a.type},this.onFragBuffered(ee.FRAG_BUFFERED,r),a.bitrateTest=!1))},n.onFragBuffered=function(e,t){var i,n=t.frag,t=t.part,t=(null!=t&&t.stats.loaded?t:n).stats;t.aborted||this.ignoreFragment(n)||(i=t.parsing.end-t.loading.start-Math.min(t.loading.first-t.loading.start,this.bwEstimator.getEstimateTTFB()),this.bwEstimator.sample(i,t.loaded),t.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0)},n.ignoreFragment=function(e){return e.type!==_||"initSegment"===e.sn},n.clearTimer=function(){self.clearInterval(this.timer)},n.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,i=this.hls,n=i.maxAutoLevel,r=i.config,a=i.minAutoLevel,s=i.media,t=t?t.duration:e?e.duration:0,e=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,s=this.getBwEstimate(),i=i.mainForwardBufferInfo,i=(i?i.len:0)/e,e=this.findBestLevel(s,a,n,i,r.abrBandWidthFactor,r.abrBandWidthUpFactor);if(0<=e)return e;ne.trace("[abr] "+(i?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var o,l=t?Math.min(t,r.maxStarvationDelay):r.maxStarvationDelay,u=r.abrBandWidthFactor,h=r.abrBandWidthUpFactor;
10return i||(o=this.bitrateTestDelay)&&(l=(t?Math.min(t,r.maxLoadingDelay):r.maxLoadingDelay)-o,ne.trace("[abr] bitrate test took "+Math.round(1e3*o)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*l)+" ms"),u=h=1),e=this.findBestLevel(s,a,n,i+l,u,h),Math.max(e,0)},n.getBwEstimate=function(){return this.bwEstimator?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate},n.findBestLevel=function(e,t,i,n,r,a){for(var s,o=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],c=!(null==d||null==(s=d.details)||!s.live),f=null==d?void 0:d.codecSet,p=l?l.duration:o?o.duration:0,m=this.bwEstimator.getEstimateTTFB()/1e3,g=t,_=-1,y=i;t<=y;y--){var v=h[y];if(!v||f&&v.codecSet!==f)v&&(g=Math.min(y,g),_=Math.max(y,_));else{-1!==_&&ne.trace("[abr] Skipped level(s) "+g+"-"+_+' with CODECS:"'+h[_].attrs.CODECS+'"; not compatible with "'+d.attrs.CODECS+'"');var A,v=v.details,E=(l?null==v?void 0:v.partTarget:null==v?void 0:v.averagetargetduration)||p,b=h[y].maxBitrate,v=this.getTimeToLoadFrag(m,A=y<=u?r*e:a*e,b*E,void 0===v);if(ne.trace("[abr] level:"+y+" adjustedbw-bitrate:"+Math.round(A-b)+" avgDuration:"+E.toFixed(1)+" maxFetchDuration:"+n.toFixed(1)+" fetchDuration:"+v.toFixed(1)),b<A&&(v<=m||!G(v)||c&&!this.bitrateTestDelay||v<n))return y}}return-1},r(xi,[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;t=this.getNextABRAutoLevel();if(-1!==e){var i=this.hls.levels;if(i.length>Math.max(e,t)&&i[e].loadError<=i[t].loadError)return e}return t=-1!==e?Math.min(e,t):t},set:function(e){this._nextAutoLevel=e}}]),xi),Li=((Li=Pi.prototype).destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},Li.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},Li.onHandlerDestroyed=function(){},Li.hasInterval=function(){return!!this._tickInterval},Li.hasNextTick=function(){return!!this._tickTimer},Li.setInterval=function(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)},Li.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),!(this._tickInterval=null))},Li.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),!(this._tickTimer=null))},Li.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),1<this._tickCallCount&&this.tickImmediate(),this._tickCallCount=0)},Li.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},Li.doTick=function(){},Pi),ki="NOT_LOADED",Ci="PARTIAL",Ri=((a=Ii.prototype)._registerListeners=function(){var e=this.hls;e.on(ee.BUFFER_APPENDED,this.onBufferAppended,this),e.on(ee.FRAG_BUFFERED,this.onFragBuffered,this),e.on(ee.FRAG_LOADED,this.onFragLoaded,this)},a._unregisterListeners=function(){var e=this.hls;e.off(ee.BUFFER_APPENDED,this.onBufferAppended,this),e.off(ee.FRAG_BUFFERED,this.onFragBuffered,this),e.off(ee.FRAG_LOADED,this.onFragLoaded,this)},a.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},a.getAppendedFrag=function(e,t){var i=this.activePartLists[t];if(i)for(var n=i.length;n--;){var r=i[n];if(!r)break;var a=r.end;if(r.start<=e&&null!==a&&e<=a)return r}return this.getBufferedFrag(e,t)},a.getBufferedFrag=function(e,t){for(var i=this.fragments,n=Object.keys(i),r=n.length;r--;){var a=i[n[r]];if((null==a?void 0:a.body.type)===t&&a.buffered){a=a.body;if(a.start<=e&&e<=a.end)return a}}return null},a.detectEvictedFragments=function(i,n,r,e){var a=this,s=(this.timeRanges&&(this.timeRanges[i]=n),(null==e?void 0:e.fragment.sn)||-1);Object.keys(this.fragments).forEach(function(e){var t=a.fragments[e];!t||s>=t.body.sn||(t.buffered||t.loaded?(e=t.range[i])&&e.time.some(function(e){e=!a.isTimeBuffered(e.startPTS,e.endPTS,n);return e&&a.removeFragment(t.body),e}):t.body.type===r&&a.removeFragment(t.body))})},a.detectPartialFragments=function(e){var n,r,a=this,s=this.timeRanges,o=e.frag,l=e.part;s&&"initSegment"!==o.sn&&(e=Ui(o),!(n=this.fragments[e])||n.buffered&&o.gap||(r=!o.relurl,Object.keys(s).forEac
10h(function(e){var t,i=o.elementaryStreams[e];i&&(t=s[e],i=r||!0===i.partial,n.range[e]=a.getBufferedTimes(o,l,i,t))}),n.loaded=null,Object.keys(n.range).length?(n.buffered=!0,n.body.endList&&(this.endListFragments[n.body.type]=n),Oi(n)||this.removeParts(o.sn-1,o.type)):this.removeFragment(n.body)))},a.removeParts=function(t,e){var i=this.activePartLists[e];i&&(this.activePartLists[e]=i.filter(function(e){return e.fragment.sn>=t}))},a.fragBuffered=function(e,t){var i=Ui(e),n=this.fragments[i];!n&&t&&(n=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap)&&(this.hasGaps=!0),n&&(n.loaded=null,n.buffered=!0)},a.getBufferedTimes=function(e,t,i,n){for(var r={time:[],partial:i},a=e.start,s=e.end,o=e.minEndPTS||s,l=e.maxStartPTS||a,u=0;u<n.length;u++){var h=n.start(u)-this.bufferPadding,d=n.end(u)+this.bufferPadding;if(h<=l&&o<=d){r.time.push({startPTS:Math.max(a,n.start(u)),endPTS:Math.min(s,n.end(u))});break}if(a<d&&h<s)r.partial=!0,r.time.push({startPTS:Math.max(a,n.start(u)),endPTS:Math.min(s,n.end(u))});else if(s<=h)break}return r},a.getPartialFragment=function(t){var i,n,r=null,a=0,s=this.bufferPadding,o=this.fragments;return Object.keys(o).forEach(function(e){e=o[e];e&&Oi(e)&&(i=e.body.start-s,n=e.body.end+s,i<=t)&&t<=n&&(i=Math.min(t-i,n-t),a<=i)&&(r=e.body,a=i)}),r},a.isEndListAppended=function(e){e=this.endListFragments[e];return void 0!==e&&(e.buffered||Oi(e))},a.getState=function(e){e=Ui(e),e=this.fragments[e];return e?e.buffered?Oi(e)?Ci:"OK":"APPENDING":ki},a.isTimeBuffered=function(e,t,i){for(var n,r,a=0;a<i.length;a++){if(n=i.start(a)-this.bufferPadding,r=i.end(a)+this.bufferPadding,n<=e&&t<=r)return!0;if(t<=n)return!1}return!1},a.onFragLoaded=function(e,t){var i,n=t.frag,r=t.part;"initSegment"===n.sn||n.bitrateTest||(i=Ui(n),this.fragments[i]={body:n,appendedPTS:null,loaded:r?null:t,buffered:!1,range:Object.create(null)})},a.onBufferAppended=function(e,t){var i,n=this,r=t.frag,a=t.part,s=t.timeRanges;"initSegment"!==r.sn&&(i=r.type,a&&((t=this.activePartLists[i])||(this.activePartLists[i]=t=[]),t.push(a)),this.timeRanges=s,Object.keys(s).forEach(function(e){var t=s[e];n.detectEvictedFragments(e,t,i,a)}))},a.onFragBuffered=function(e,t){this.detectPartialFragments(t)},a.hasFragment=function(e){e=Ui(e);return!!this.fragments[e]},a.hasParts=function(e){return!(null==(e=this.activePartLists[e])||!e.length)},a.removeFragmentsInRange=function(i,n,r,a,s){var o=this;a&&!this.hasGaps||Object.keys(this.fragments).forEach(function(e){var t,e=o.fragments[e];!e||(t=e.body).type!==r||a&&!t.gap||t.start<n&&t.end>i&&(e.buffered||s)&&o.removeFragment(t)})},a.removeFragment=function(e){var t,i=Ui(e),n=(e.stats.loaded=0,e.clearElementaryStreamInfo(),this.activePartLists[e.type]);n&&(t=e.sn,this.activePartLists[e.type]=n.filter(function(e){return e.fragment.sn!==t})),delete this.fragments[i],e.endList&&delete this.endListFragments[e.type]},a.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1},Ii);function Ii(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}function Pi(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}function xi(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}function Di(e,t,i,n){void 0===n&&(n=100),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_
10=new Si(e),this.fast_=new Si(t),this.defaultTTFB_=n,this.ttfb_=new Si(e)}function Mi(e,t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}function Bi(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=ne.log.bind(ne,t+":"),this.warn=ne.warn.bind(ne,t+":"),this.hls=e}function Fi(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=ne.log.bind(ne,"[info]:"),this.warn=ne.warn.bind(ne,"[warning]:"),this.error=ne.error.bind(ne,"[error]:"),this.registerListeners()}function Oi(e){var t;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(t=e.range.audio)?void 0:t.partial)||(null==(t=e.range.audiovideo)?void 0:t.partial))}function Ui(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}function Ni(e,t,i,n,r,a){void 0===n&&(n=0),void 0===r&&(r=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=i,this.size=n,this.part=r,this.partial=a}var ji={length:0,start:function(){return 0},end:function(){return 0}},y=(Gi.isBuffered=function(e,t){try{if(e)for(var i=Gi.getBuffered(e),n=0;n<i.length;n++)if(t>=i.start(n)&&t<=i.end(n))return!0}catch(e){}return!1},Gi.bufferInfo=function(e,t,i){try{if(e){for(var n=Gi.getBuffered(e),r=[],a=0;a<n.length;a++)r.push({start:n.start(a),end:n.end(a)});return this.bufferedInfo(r,t,i)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},Gi.bufferedInfo=function(e,t,i){t=Math.max(0,t),e.sort(function(e,t){return e.start-t.start||t.end-e.end});var n=[];if(i)for(var r=0;r<e.length;r++){var a,s=n.length;s&&(a=n[s-1].end,e[r].start-a<i)?e[r].end>a&&(n[s-1].end=e[r].end):n.push(e[r])}else n=e;for(var o,l=0,u=t,h=t,d=0;d<n.length;d++){var c=n[d].start,f=n[d].end;if(c<=t+i&&t<f)u=c,l=(h=f)-t;else if(t+i<c){o=c;break}}return{len:l,start:u||0,end:h||0,nextStart:o}},Gi.getBuffered=function(e){try{return e.buffered}catch(e){return ne.log("failed to get media.buffered",e),ji}},Gi);function Gi(){}function Vi(e,t){for(var i,n=0,r=e.length;n<r;n++)if((null==(i=e[n])?void 0:i.cc)===t)return e[n];return null}function Hi(e,t){e&&(t=e.start+t,e.start=e.startPTS=t,e.endPTS=t+e.duration)}function Yi(e,t){for(var i=t.fragments,n=0,r=i.length;n<r;n++)Hi(i[n],e);t.fragmentHint&&Hi(t.fragmentHint,e),t.alignedSliding=!0}function zi(e,t){var i,n,r,a,s;e.hasProgramDateTime&&t.hasProgramDateTime&&(i=e.fragments,n=t.fragments,i.length)&&n.length&&(s=Math.min(t.endCC,e.endCC),t.startCC<s&&e.startCC<s&&(r=Vi(n,s),a=Vi(i,s)),r&&a||(a=Vi(i,(r=n[Math.floor(n.length/2)]).cc)||i[Math.floor(i.length/2)]),t=r.programDateTime,s=a.programDateTime,t)&&s&&Yi((s-t)/1e3-(a.start-r.start),e)}var Wi=Math.pow(2,17),Qi=((a=Ki.prototype).destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(o,l){var u=this,h=o.url;if(!h)return Promise.reject(new $i({type:te.NETWORK_ERROR,details:ie.FRAG_LOAD_ERROR,fatal:!1,frag:o,error:new Error("Fragment does not have a "+(h?"part list":"url")),networkDetails:null}));this.abort();var i=this.config,d=i.fLoader,c=i.loader;return new Promise(function(r,a){if(u.loader&&u.loader.destroy(),o.gap){if(o.tagList.some(function(e){return"GAP"===e[0]}))return void a(qi(o));o.gap=!1}var s=u.loader=o.loader=new(d||c)(i),e=Ji(o),t=vi(i.fragLoadPolicy.default),n={loadPolicy:t,timeout:t.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===o.sn?1/0:Wi};o.stats=s.stats,s.load(e,n,{onSuccess:function(e,t,i,n){u.resetLoader(o,s);e=e.data;i.resetIV&&o.decryptdata&&(o.decryptdata.iv=new Uint8Array(e.slice(0,16)),e=e.slice(16)),r({frag:o,part:null,payload:e,networkDetails:n})},onError:function(e,t,i,n){u.resetLoader(o,s),a(new $i({type:te.NETWORK_E
10RROR,details:ie.FRAG_LOAD_ERROR,fatal:!1,frag:o,response:m({url:h,data:void 0},e),error:new Error("HTTP Error "+e.code+" "+e.text),networkDetails:i,stats:n}))},onAbort:function(e,t,i){u.resetLoader(o,s),a(new $i({type:te.NETWORK_ERROR,details:ie.INTERNAL_ABORTED,fatal:!1,frag:o,error:new Error("Aborted"),networkDetails:i,stats:e}))},onTimeout:function(e,t,i){u.resetLoader(o,s),a(new $i({type:te.NETWORK_ERROR,details:ie.FRAG_LOAD_TIMEOUT,fatal:!1,frag:o,error:new Error("Timeout after "+n.timeout+"ms"),networkDetails:i,stats:e}))},onProgress:function(e,t,i,n){l&&l({frag:o,part:null,payload:i,networkDetails:n})}})})},a.loadPart=function(l,u,h){var d=this,t=(this.abort(),this.config),i=t.fLoader,c=t.loader;return new Promise(function(r,a){var s,o,e,n;d.loader&&d.loader.destroy(),l.gap||u.gap?a(qi(l,u)):(s=d.loader=l.loader=new(i||c)(t),o=Ji(l,u),e=vi(t.fragLoadPolicy.default),n={loadPolicy:e,timeout:e.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Wi},u.stats=s.stats,s.load(o,n,{onSuccess:function(e,t,i,n){d.resetLoader(l,s),d.updateStatsFromPart(l,u);e={frag:l,part:u,payload:e.data,networkDetails:n};h(e),r(e)},onError:function(e,t,i,n){d.resetLoader(l,s),a(new $i({type:te.NETWORK_ERROR,details:ie.FRAG_LOAD_ERROR,fatal:!1,frag:l,part:u,response:m({url:o.url,data:void 0},e),error:new Error("HTTP Error "+e.code+" "+e.text),networkDetails:i,stats:n}))},onAbort:function(e,t,i){l.stats.aborted=u.stats.aborted,d.resetLoader(l,s),a(new $i({type:te.NETWORK_ERROR,details:ie.INTERNAL_ABORTED,fatal:!1,frag:l,part:u,error:new Error("Aborted"),networkDetails:i,stats:e}))},onTimeout:function(e,t,i){d.resetLoader(l,s),a(new $i({type:te.NETWORK_ERROR,details:ie.FRAG_LOAD_TIMEOUT,fatal:!1,frag:l,part:u,error:new Error("Timeout after "+n.timeout+"ms"),networkDetails:i,stats:e}))}}))})},a.updateStatsFromPart=function(e,t){var i=e.stats,n=t.stats,r=n.total,e=(i.loaded+=n.loaded,r?(r=((e=Math.round(e.duration/t.duration))-(t=Math.min(Math.round(i.loaded/r),e)))*Math.round(i.loaded/t),i.total=i.loaded+r):i.total=Math.max(i.loaded,i.total),i.loading),t=n.loading;e.start?e.first+=t.first-t.start:(e.start=t.start,e.first=t.first),e.end=t.end},a.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},Ki);function Ki(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}function Ji(e,t){var i,n,r=(t=void 0===t?null:t)||e,t={frag:e,part:t,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},a=r.byteRangeStartOffset,r=r.byteRangeEndOffset;return G(a)&&G(r)&&(i=a,n=r,"initSegment"===e.sn&&"AES-128"===(null==(e=e.decryptdata)?void 0:e.method)&&((e=r-a)%16&&(n=r+(16-e%16)),0!==a)&&(t.resetIV=!0,i=a-16),t.rangeStart=i,t.rangeEnd=n),t}function qi(e,t){var i=new Error("GAP "+(e.gap?"tag":"attribute")+" found"),i={type:te.MEDIA_ERROR,details:ie.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(i.part=t),(t||e).stats.aborted=!0,new $i(i)}e(wn,Zi=D(Error));var Xi,Zi,$i=wn,en=(bn.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},bn),tn=(En.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},En),nn=((a=An.prototype).uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),i=new Uint32Array(4),n=0;n<4;n++)i[n]=t.getUint32(4*n);return i},a.initTable=function(){for(var e=this.sBox,t=this.invSBox,i=this.subMix,n=i[0],r=i[1],a=i[2],s=i[3],i=this.invSubMix,o=i[0],l=i[1],u=i[2],h=i[3],d=new Uint32Array(256),c=0,f=0,p=0,p=0;p<256;p++)d[p]=p<128?p<<1:p<<1^283;for(p=0;p<256;p++){var m=f^f<<1^f<<2^f<<3^f<<4,g=(e[c]=m=m>>>8^255&m^99,d[t[m]=c]),_=d[g],y=d[_],v=257*d[m]^16843008*m;n[c]=v<<24|v>>>8,r[c]=v<<16|v>>>16,a[c]=v<<8|v>>>24,s[c]=v,o[m]=(v=16843009*y^65537*_^257*g^16843008*c)<<24|v>>>8,l[m]=v<<16|v>>>16,u[m]=v<<8|v>>>24,h[m]=v,c?(c=g^d[d[d[y^g]]],f^=d[d[f]]):c=f=1}},a.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),i=!0,n=0;n<t.length&&i;)i=t[n]===this.key[n],n++;if(!i){this.key=t;var r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);for(var a,s,o,l=this.ksRows=4*(r+6+1),u=this.keySchedule=new Uint32Array(l),h=this.invKeySchedule=new Uint32Array(l),d=this.sBox,c=this.rcon,e=this.invSubMix,f=e[0],p=e[1],m=e[2],g=e[3],_=0;_<l;_++)_<r?s=u[_]=t[_]:(o=s,_%r==0?(o=d[(o=o<<8|o>>>24)>>>24]<<24|d[o>>>16&255]<<16|d[o>>>8&255]<<8|d[255&o],o^=c[_/r|0]<<24):6<r&&_%r==4&&(o=d[o>>>24]<<24|d[o>>>16&255]<<16|d[o>>>8&255]<<8|d[255&o]),u[_]=s=(u[_-r]^o)>>>0);for(a=0;a<l;a++)_=l-a,o=3&a?u[_]:u[_-4],h[a]=a<4||_<=4?o:f[d[o>>>24]]^p[d[o>>>16&255]]^m[d[o>>>8&255]]^g[d[255&o]],h[a]=h[a]>>>0}},a.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},a.decrypt=function(e,t,i){for(var n,r,a,s,o,l,u,h,d,c,f,p,m,g,_=this.keySize+6,y=this.invKeySchedule,v=this.invSBox,A=this.invSubMix,E=A[0],b=A[1],w=A[2],S=A[3],A=this.uint8ArrayToUint32Array_(i),T=A[0],L=A[1],k=A[2],C=A[3],R=new Int32Array(e),I=new Int32Array(R.length),P=this.networkToHostOrderSwap;t<R.length;){for(d=P(R[t]),c=P(R[t+1]),f=P(R[t+2]),p=P(R[t+3]),o=d^y[0],l=p^y[1],u=f^y[2],h=c^y[3],m=4,g=1;g<_;g++)n=E[o>>>24]^b[l>>16&255]^w[u>>8&255]^S[255&h]^y[m],r=E[l>>>24]^b[u>>16&255]^w[h>>8&255]^S[255&o]^y[m+1],a=E[u>>>24]^b[h>>16&255]^w[o>>8&255]^S[255&l]^y[m+2],s=E[h>>>24]^b[o>>16&255]^w[l>>8&255]^S[255&u]^y[m+3],o=n,l=r,u=a,h=s,m+=4;n=v[o>>>24]<<24^v[l>>16&255]<<16^v[u>>8&255]<<8^v[255&h]^y[m],r=v[l>>>24]<<24^v[u>>16&255]<<16^v[h>>8&255]<<8^v[255&o]^y[m+1],a=v[u>>>24]<<24^v[h>>16&255]<<16^v[o>>8&255]<<8^v[255&l]^y[m+2],s=v[h>>>24]<<24^v[o>>16&255]<<16^v[l>>8&255]<<8^v[255&u]^y[m+3],I[t]=P(n^T),I[t+1]=P(s^L),I[t+2]=P(a^k),I[t+3]=P(r^C),T=d,L=c,k=f,C=p,t+=4}return I.buffer},An),rn=((a=vn.prototype).destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},a.isSync=function(){return this.useSoftware},a.flush=function(){var e,t,i=this.currentResult,n=this.remainderData;return!i||n?(this.reset(),null):(n=new Uint8Array(i),this.reset(),this.removePKCS7Padding?(t=(e=(i=n).byteLength)&&new DataView(i.buffer).getUint8(e-1))?Pe(i,0,e-t):i:n)},a.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},a.decrypt=function(n,r,a){var s=this;return this.useSoftware?new Promise(function(e,t){s.softwareDecrypt(new
10Uint8Array(n),r,a);var i=s.flush();i?e(i.buffer):t(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(n),r,a)},a.softwareDecrypt=function(e,t,i){var n=this.currentIV,r=this.currentResult,a=this.remainderData,a=(this.logOnce("JS AES decrypt"),a&&(e=tt(a,e),this.remainderData=null),this.getValidChunk(e));if(!a.length)return null;n&&(i=n);e=this.softwareDecrypter,(e=e||(this.softwareDecrypter=new nn)).expandKey(t),n=r;return this.currentResult=e.decrypt(a.buffer,0,i),this.currentIV=Pe(a,-16).buffer,n||null},a.webCryptoDecrypt=function(t,i,n){var r=this,a=this.subtle;return this.key===i&&this.fastAesKey||(this.key=i,this.fastAesKey=new tn(a,i)),this.fastAesKey.expandKey().then(function(e){return a?(r.logOnce("WebCrypto AES decrypt"),new en(a,new Uint8Array(n)).decrypt(t.buffer,e)):Promise.reject(new Error("web crypto not initialized"))}).catch(function(e){return ne.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+e.name+": "+e.message),r.onWebCryptoError(t,i,n)})},a.onWebCryptoError=function(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);e=this.flush();if(e)return e.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},a.getValidChunk=function(e){var t=e,i=e.length-e.length%16;return i!==e.length&&(t=Pe(e,0,i),this.remainderData=Pe(e,i)),t},a.logOnce=function(e){this.logEnabled&&(ne.log("[decrypter]: "+e),this.logEnabled=!1)},vn),an="STOPPED",d="IDLE",sn="KEY_LOADING",on="FRAG_LOADING",ln="FRAG_LOADING_WAITING_RETRY",un="WAITING_TRACK",hn="PARSING",dn="PARSED",cn="ENDED",fn="ERROR",pn="WAITING_INIT_PTS",mn="WAITING_LEVEL",Li=(e(yn,Xi=Li),(a=yn.prototype).doTick=function(){this.onTickEnd()},a.onTickEnd=function(){},a.startLoad=function(e){},a.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=an},a._streamEnded=function(e,t){return!(t.live||e.nextStart||!e.end||!this.media)&&(null!=(e=t.partList)&&e.length?(e=e[e.length-1],y.isBuffered(this.media,e.start+e.duration/2)):(e=t.fragments[t.fragments.length-1].type,this.fragmentTracker.isEndListAppended(e)))},a.getLevelDetails=function(){var e;return!this.levels||null===this.levelLastLoaded||null==(e=this.levels[this.levelLastLoaded])?void 0:e.details},a.onMediaAttached=function(e,t){t=this.media=this.mediaBuffer=t.media,this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended),t=this.config;this.levels&&t.autoStartLoad&&this.state===an&&this.startLoad(t.startPosition)},a.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},a.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,i=this.media,n=this.mediaBuffer,r=this.state,a=i?i.currentTime:0,n=y.bufferInfo(n||i,a,e.maxBufferHole);this.log("media seeking to "+(G(a)?a.toFixed(3):a)+", state: "+r),this.state===cn?this.resetLoadingState():t&&(r=e.maxFragLookUpTolerance,e=t.start-r,r=t.start+t.duration+r,!n.len||r<n.start||e>n.end)&&(r=r<a,a<e||r)&&(r&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null),i&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),this.loadedmetadata||n.len||(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()},a.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a.onManifestLoaded=function(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]},a.onHandlerDestroying=function(){this.stopLoad(),Xi.prototype.onHandlerDestroying.call(this)},a.onHandlerDestroyed=function(){this.state=an,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,Xi.prototype.onHandlerDestroyed.call(this)},a.loadFragment=function(e,t,i){this._loadFragForPlayback(e,t,i)},a._loadFragForPlayback=function(i,e,t){var n=this;this._doFragLoad(i,e,t,function(e){n.fragContextChanged(i)?(n.warn("Fragment "+i.sn+(e.part?" p: "+e.part.index:"")+" of level "+i.level+" was dropped during download."),n.fragmentTracker.removeFragment(i)):(i.stats.chunkCount++,n._handleFragmentLoadProgress(e))}).then(function(e){var t;e&&(t=n.state,n.fragContextChanged(i)?t!==on&&(n.fragCurrent||t!==hn)||(n.fragmentTracker.removeFragment(i),n.state=d):("payload"in e&&(n.log("Loaded fragment "+i.sn+" of level "+i.level),n.hls.trigger(ee.FRAG_LOADED,e)),n._handleFragmentLoadComplete(e)))}).catch(function(e){n.state!==an&&n.state!==fn&&(n.warn(e),n.resetFragmentLoading(i))})},a.clearTrackerIfNeeded=function(e){var t,i=this.fragmentTracker;"APPENDING"===i.getState(e)?(t=e.type,t=this.getFwdBufferInfo(this.mediaBuffer,t),t=Math.max(e.duration,t?t.len:this.config.maxBufferLength),this.reduceMaxBufferLength(t)&&i.removeFragment(e)):0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===Ci)&&i.removeFragment(e)},a.flushMainBuffer=function(e,t,i){void 0===i&&(i=null),e-t&&this.hls.trigger(ee.BUFFER_FLUSHING,{startOffset:e,endOffset:t,type:i})},a._loadInitSegment=function(a,i){var s=this;this._doFragLoad(a,i).then(function(e){if(e&&!s.fragContextChanged(a)&&s.levels)return e;throw new Error("init load aborted")}).then(function(i){var n,r=s.hls,e=i.payload,t=a.decryptdata;return e&&0<e.byteLength&&t&&t.key&&t.iv&&"AES-128"===t.method?(n=self.performance.now(),s.decrypter.decrypt(new
10Uint8Array(e),t.key.buffer,t.iv.buffer).catch(function(e){throw r.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:a}),e}).then(function(e){var t=self.performance.now();return r.trigger(ee.FRAG_DECRYPTED,{frag:a,payload:e,stats:{tstart:n,tdecrypt:t}}),i.payload=e,i})):i}).then(function(e){if(!s.levels)throw new Error("init load aborted, missing levels");var t=a.stats;s.state=d,i.fragmentError=0,a.data=new Uint8Array(e.payload),t.parsing.start=t.buffering.start=self.performance.now(),t.parsing.end=t.buffering.end=self.performance.now(),s.tick()}).catch(function(e){s.state!==an&&s.state!==fn&&(s.warn(e),s.resetFragmentLoading(a))})},a.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},a.fragBufferedComplete=function(e,t){var i=this.mediaBuffer||this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+(this.playlistType===_?"level":"track")+" "+e.level+" (frag:["+(null!=(t=e.startPTS)?t:NaN).toFixed(3)+"-"+(null!=(t=e.endPTS)?t:NaN).toFixed(3)+"] > buffer:"+(i?function(e){for(var t="",i=e.length,n=0;n<i;n++)t+="["+e.start(n).toFixed(3)+"-"+e.end(n).toFixed(3)+"]";return t}(y.getBuffered(i)):"(detached)")+")"),this.state=d,i&&(!this.loadedmetadata&&e.type==_&&i.buffered.length&&(null==(t=this.fragCurrent)?void 0:t.sn)===(null==(e=this.fragPrevious)?void 0:e.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},a.seekToStartPos=function(){},a._handleFragmentLoadComplete=function(e){var t,i,n=this.transmuxer;n&&(i=e.frag,t=e.part,e=!(e=e.partsLoaded)||0===e.length||e.some(function(e){return!e}),i=new Ni(i.level,i.sn,i.stats.chunkCount+1,0,t?t.index:-1,!e),n.flush(i))},a._handleFragmentLoadProgress=function(e){},a._doFragLoad=function(t,i,e,n){var r=this,a=(void 0===e&&(e=null),null==i?void 0:i.details);if(!this.levels||!a)throw new Error("frag load aborted, missing level"+(a?"":" detail")+"s");var s=null;if(!t.encrypted||null!=(o=t.decryptdata)&&o.key?!t.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(t,a.encryptedFragments):(this.log("Loading key for "+t.sn+" of ["+a.startSN+"-"+a.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level),this.state=sn,this.fragCurrent=t,s=this.keyLoader.load(t).then(function(e){if(!r.fragContextChanged(e.frag))return r.hls.trigger(ee.KEY_LOADED,e),r.state===sn&&(r.state=d),e}),this.hls.trigger(ee.KEY_LOADING,{frag:t}),null===this.fragCurrent&&(s=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),e=Math.max(t.start,e||0),this.config.lowLatencyMode&&"initSegment"!==t.sn){var o=a.partList;if(o&&n){e>t.end&&a.fragmentHint&&(t=a.fragmentHint);var l,u=this.getNextPart(o,t,e);if(-1<u)return l=o[u],this.log("Loading part sn: "+t.sn+" p: "+l.index+" cc: "+t.cc+" of playlist ["+a.startSN+"-"+a.endSN+"] parts [0-"+u+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(e.toFixed(3))),this.nextLoadPosition=l.start+l.duration,this.state=on,u=s?s.then(function(e){return!e||r.fragContextChanged(e.frag)?null:r.doFragPartsLoad(t,l,i,n)}).catch(function(e){return r.handleFragLoadError(e)}):this.doFragPartsLoad(t,l,i,n).catch(function(e){return r.handleFragLoadError(e)}),this.hls.trigger(ee.FRAG_LOADING,{frag:t,part:l,targetBufferTime:e}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):u;if(!t.url||this.loadedEndOfParts(o,e))return Promise.resolve(null)}}this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(a?"of ["+a.startSN+"-"+a.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(e.toFixed(3))),G(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=on;var h=this.config.progressive,u=h&&s?s.then(function(e){return!e||r.fragContextChanged(null==e?void 0:e.frag)?null:r.fragmentLoader.load(t,n)}).catch(function(e){return r.handleFragLoadError(e)}):Promise.all([this.fragmentLoader.load(t,h?n:void 0),s]).then(function(e){e=e[0];return!h&&e&&n&&n(e),e}).catch(function(e){return r.handleFragLoadError(e)});return this.hls.trigger(ee.FRAG_LOADING,{frag:t,targetBufferTime:e}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):u},a.doFragPartsLoad=function(o,i,l,u){var h=this;return new Promise(function(r,e){var t,a=[],s=null==(t=l.details)?void 0:t.partList;!function i(n){h.fragmentLoader.loadPart(o,n,u).then(function(e){var t=(a[n.index]=e).part,e=(h.hls.trigger(ee.FRAG_LOADED,e),pi(l,o.sn,n.index+1)||mi(s,o.sn,n.index+1));if(!e)return r({frag:o,part:t,partsLoaded:a});i(e)}).catch(e)}(i)})},a.handleFragLoadError=function(e){var t;return"data"in e?(t=e.data,e.data&&t.details===ie.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(ee.ERROR,t)):this.hls.trigger(ee.ERROR,{type:te.OTHER_ERROR,details:ie.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0}),null},a._handleTransmuxerFlush=function(e){var t,i,n,r=this.getCurrentContext(e);r&&this.state===hn?(t=r.frag,i=r.part,r=r.level,n=self.performance.now(),t.stats.parsing.end=n,i&&(i.stats.parsing.end=n),this.updateLevelTiming(t,i,r,e.partial)):this.fragCurrent||this.state===an||this.state===fn||(this.state=d)},a.getCurrentContext=function(e){var t,i,n=this.levels,r=this.fragCurrent,a=e.level,s=e.sn,e=e.part;return null!=n&&n[a]?(n=n[a],(i=(e=-1<e?pi(n,s,e):null)?e.fragment:null!=n&&n.details?(t=n.details).fragments[s-t.startSN]||((i=t.fragmentHint)&&i.sn===s?i:s<t.startSN&&r&&r.sn===s?r:null):null)?(r&&r!==i&&(i.stats=r.stats),{frag:i,part:e,level:n}):null):(this.warn("Levels object was unset while buffering fragment "+s+" of level "+a+". The current chunk will not be buffered."),null)},a.bufferFragmentData=function(e,t,i,n,r){var a,s,o;e&&this.state===hn&&(o=e.data1,a=e.data2,null!=(s=(s=o)&&a?tt(o,a):s))&&s.length&&(o={type:e.type,frag:t,part:i,chunkMeta:n,parent:t.type,data:s},this.hls.trigger(ee.BUFFER_APPENDING,o),e.dropped)&&e.independent&&!i&&!r&&this.flushBufferGap(t)},a.flushBufferGap=function(e){var t,i,n=this.media;n&&(y.isBuffered(n,n.currentTime)?(t=n.currentTime,n=y.bufferInfo(n,t,0),i=e.duration,i=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),n=Math.max(Math.min(e.start-i,n.end-i),t+i),e.start-n>i&&this.flushMainBuffer(n,e.start)):this.flushMainBuffer(0,e.start))},a.getFwdBufferInfo=function(e,t){var i=this.getLoadPosition();return G(i)?this.getFwdBufferInfoAtPos(e,i,t):null},a.getFwdBufferInfoAtPos=function(e,t,i){var n=this.config.maxBufferHole,r=y.bufferInfo(e,t,n);if(0===r.len&&void 0!==r.nextStart){i=this.fragmentTracker.getBufferedFrag(t,i);
10if(i&&r.nextStart<i.end)return y.bufferInfo(e,t,Math.max(r.nextStart,n))}return r},a.getMaxBufferLength=function(e){var t=this.config,e=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength;return Math.min(e,t.maxMaxBufferLength)},a.reduceMaxBufferLength=function(e){var t=this.config,e=e||t.maxBufferLength;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},a.getAppendedFrag=function(e,t){e=this.fragmentTracker.getAppendedFrag(e,_);return e&&"fragment"in e?e.fragment:e},a.getNextFragment=function(e,t){var i=t.fragments,n=i.length;if(!n)return null;var r,a=this.config,s=i[0].start;if(t.live){var o=a.initialLiveManifestSize;if(n<o)return this.warn("Not enough fragments to start playback (have: "+n+", need: "+o+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(r=this.getInitialLiveFragment(t,i),this.startPosition=r?this.hls.liveSyncPosition||r.start:e)}else e<=s&&(r=i[0]);return r||(n=a.lowLatencyMode?t.partEnd:t.fragmentEnd,r=this.getFragmentAtPosition(e,n,t)),this.mapToInitFragWhenRequired(r)},a.isLoopLoading=function(e,t){var i=this.fragmentTracker.getState(e);return("OK"===i||i===Ci&&!!e.gap)&&this.nextLoadPosition>t},a.getNextFragmentLoopLoading=function(e,t,i,n,r){var a=e.gap,t=this.getNextFragment(this.nextLoadPosition,t);if(null===t)return t;if(e=t,a&&e&&!e.gap&&i.nextStart){t=this.getFwdBufferInfoAtPos(this.mediaBuffer||this.media,i.nextStart,n);if(null!==t&&i.len+t.len>=r)return this.log('buffer full after gaps in "'+n+'" playlist starting at sn: '+e.sn),null}return e},a.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},a.getNextPart=function(e,t,i){for(var n=-1,r=!1,a=!0,s=0,o=e.length;s<o;s++){var l=e[s],a=a&&!l.independent;if(-1<n&&i<l.start)break;var u=l.loaded;u?n=-1:(r||l.independent||a)&&l.fragment===t&&(n=s),r=u}return n},a.loadedEndOfParts=function(e,t){e=e[e.length-1];return e&&t>e.start&&e.loaded},a.getInitialLiveFragment=function(e,t){var i,n,r=this.fragPrevious,a=null;return r?(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),a=function(e,t,i){if(null!==t&&Array.isArray(e)&&e.length&&G(t)&&!(t<(e[0].programDateTime||0)||t>=(e[e.length-1].endProgramDateTime||0))){i=i||0;for(var n,r,a,s=0;s<e.length;++s){var o=e[s];if(n=t,r=i,a=o,r=1e3*Math.min(i,a.duration+(a.deltaPTS||0)),(a.endProgramDateTime||0)-r>n)return o}}return null}(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),a||((i=r.sn+1)>=e.startSN&&i<=e.endSN&&(i=t[i-e.startSN],r.cc===i.cc)&&this.log("Live playlist, switching playlist, load frag with next SN: "+(a=i).sn),!a&&(n=r.cc,a=Ei(t,function(e){return e.cc<n?1:e.cc>n?-1:0}))&&this.log("Live playlist, switching playlist, load frag with same CC: "+a.sn))):null!==(i=this.hls.liveSyncPosition)&&(a=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e)),a},a.getFragmentAtPosition=function(e,t,i){var n=this.config,r=this.fragPrevious,a=i.fragments,s=i.endSN,o=i.fragmentHint,l=n.maxFragLookUpTolerance,u=i.partList,n=!!(n.lowLatencyMode&&null!=u&&u.length&&o);return n&&o&&!this.bitrateTest&&(a=a.concat(o),s=o.sn),(o=e<t?bi(r,a,e,t-l<e?0:l):a[a.length-1])&&(t=o.sn-i.startSN,r="OK"===(e=this.fragmentTracker.getState(o))||e===Ci&&o.gap?o:r)&&o.sn===r.sn&&(!n||u[0].fragment.sn>o.sn)&&r&&o.level===r.level&&(l=a[1+t],o=o.sn<s&&"OK"!==this.fragmentTracker.getState(l)?l:null),o},a.synchronizeToLiveEdge=function(e){var t,i,n,r,a=this.config,s=this.media;s&&(t=this.hls.liveSyncPosition,i=s.currentTime,r=e.fragments[0].start,n=e.edge,r=i>=r-a.maxFragLookUpTolerance&&i<=n,null!==t)&&s.duration>t&&(i<t||!r)&&(a=void 0!==a.liveMaxLatencyDuration?a.liveMaxLatencyDuration:a.liveMaxLatencyDurationCount*e.targetduration,!r&&s.readyState<4||i<n-a)&&(this.loadedmetadata||(this.nextLoadPosition=t),s.readyState)&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+n+", reset currentTime to : "+t.toFixed(3)),s.currentTime=t)},a.alignPlaylists=function(e,t){var i,n,r,a,s,o=this.levels,l=this.levelLastLoaded,u=this.fragPrevious,o=null!==l?o[l]:null,l=e.fragments.length;return l?(i=e.fragments[0].start,n=!t,r=e.alignedSliding&&G(i),n||!r&&!i?(n=u,r=e,(o=o)&&(n=n,a=r,(s=o).details&&(a.endCC>a.startCC||n&&n.cc<a.startCC)&&(n=function(){var e=s.details.fragments,t=a.fragments;if(t.length&&e.length){e=Vi(e,t[0].cc);
10if(e&&(!e||e.startPTS))return e;ne.log("No frag in previous level to align on")}else ne.log("No fragments to align")}())&&G(n.start)&&(ne.log("Adjusting PTS using last level due to CC increase within current level "+a.url),Yi(n.start,a)),!r.alignedSliding&&o.details&&zi(r,o.details),r.alignedSliding||!o.details||r.skippedSegments||ci(o.details,r)),n=e.fragments[0].start,this.log("Live playlist sliding: "+n.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(u?u.sn:"na")+" fragments: "+l),n):i):(this.warn("No fragments in live playlist"),0)},a.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},a.setStartPosition=function(e,t){var i,n,r=this.startPosition;-1!==(r=r<t?-1:r)&&-1!==this.lastCurrentTime||(null!==(n=((i=null!==this.startTimeOffset)?this:e).startTimeOffset)&&G(n)?(r=t+n,n<0&&(r+=e.totalduration),r=Math.min(Math.max(t,r),t+e.totalduration),this.log("Start time offset "+n+" found in "+(i?"multivariant":"media")+" playlist, adjust startPosition to "+r),this.startPosition=r):e.live?r=this.hls.liveSyncPosition||t:this.startPosition=r=0,this.lastCurrentTime=r),this.nextLoadPosition=r},a.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},a.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},a.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===ln)||(this.state=d)},a.onFragmentOrKeyLoadError=function(e,t){t.chunkMeta&&!t.frag&&(i=this.getCurrentContext(t.chunkMeta))&&(t.frag=i.frag);var i=t.frag;if(i&&i.type===e&&this.levels)if(this.fragContextChanged(i))this.warn("Frag load error must match current frag to retry "+i.url+" > "+(null==(n=this.fragCurrent)?void 0:n.url));else{var n=t.details===ie.FRAG_GAP,r=(n&&this.fragmentTracker.fragBuffered(i,!0),t.errorAction),a=r||{},s=a.action,o=a.retryCount,o=void 0===o?0:o,a=a.retryConfig;if(r&&5===s&&a){this.resetStartWhenNotLoaded(null!=(l=this.levelLastLoaded)?l:i.level);var l=yi(a,o);this.warn("Fragment "+i.sn+" of "+e+" "+i.level+" errored with "+t.details+", retrying loading "+(o+1)+"/"+a.maxNumRetry+" in "+l+"ms"),r.resolved=!0,this.retryDate=self.performance.now()+l,this.state=ln}else if(a&&r){if(this.resetFragmentErrors(e),!(o<a.maxNumRetry))return void ne.warn(t.details+" reached or exceeded max retry ("+o+")");n||3===s||(r.resolved=!0)}else 2===(null==r?void 0:r.action)?this.state=mn:this.state=fn;this.tickImmediate()}},a.reduceLengthAndFlushBuffer=function(e){var t,i,n;return(this.state===hn||this.state===dn)&&(t=e.parent,(i=(n=this.getFwdBufferInfo(this.mediaBuffer,t))&&.5<n.len)&&this.reduceMaxBufferLength(n.len),(n=!i)&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+t+" buffer"),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),n)},a.resetFragmentErrors=function(e){e===Ut&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==an&&(this.state=d)},a.afterBufferFlushed=function(e,t,i){e&&(e=y.getBuffered(e),this.fragmentTracker.detectEvictedFragments(t,e,i),this.state===cn)&&this.resetLoadingState()},a.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=d},a.resetStartWhenNotLoaded=function(e){this.loadedmetadata||(this.startFragRequested=!1,null!=(e=this.levels?this.levels[e].details:null)&&e.live?(this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition)},a.resetWhenMissingContext=function(e){var t;this.warn("The loading context changed while buffering fragment "+e.sn+" of level "+e.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(null!=(t=this.levelLastLoaded)?t:e.level),this.resetLoadingState()},a.removeUnbufferedFrags=function(e){this.fragmentTracker.removeFragmentsInRange(e=void 0===e?0:e,1/0,this.playlistType,!1,!0)},a.updateLevelTiming=function(r,e,a,s){var o=this,l=a.details;if(l){if(Object.keys(r.elementaryStreams).reduce(function(e,t){var i,n=r.elementaryStreams[t];return n?(i=n.endPTS-n.startPTS)<=0?(o.warn("Could not parse fragment "+r.sn+" "+t+" duration reliably ("+i+")"),e||!1):(i=s?0:hi(l,r,n.startPTS,n.endPTS,n.startDTS,n.endDTS),o.hls.trigger(ee.LEVEL_PTS_UPDATED,{details:l,level:a,drift:i,type:t,frag:r,start:n.startPTS,end:n.endPTS}),!0):e},!1))a.fragmentError=0;else if(null===(null==(t=this.transmuxer)?void 0:t.error)){var t=new Error("Found no media in fragment "+r.sn+" of level "+r.level
10+" resetting transmuxer to fallback to playlist timing");if(0===a.fragmentError&&(a.fragmentError++,r.gap=!0,this.fragmentTracker.removeFragment(r),this.fragmentTracker.fragBuffered(r,!0)),this.warn(t.message),this.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:r,reason:"Found no media in msn "+r.sn+' of level "'+a.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=dn,this.hls.trigger(ee.FRAG_PARSED,{frag:r,part:e})}else this.warn("level.details undefined")},a.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},a.recoverWorkerError=function(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(null!=(e=null!=(e=this.levelLastLoaded)?e:null==(e=this.fragCurrent)?void 0:e.level)?e:0),this.resetLoadingState())},r(yn,[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}]),yn),gn=((a=_n.prototype).push=function(e){this.chunks.push(e),this.dataLength+=e.length},a.flush=function(){var e=this.chunks,a=this.dataLength;return e.length?(e=1===e.length?e[0]:function(e){for(var t=new Uint8Array(a),i=0,n=0;n<e.length;n++){var r=e[n];t.set(r,i),i+=r.length}return t}(e),this.reset(),e):new Uint8Array(0)},a.reset=function(){this.chunks.length=0,this.dataLength=0},_n);function _n(){this.chunks=[],this.dataLength=0}function yn(e,t,i,n,r){var a;return(a=Xi.call(this)||this).hls=void 0,a.fragPrevious=null,a.fragCurrent=null,a.fragmentTracker=void 0,a.transmuxer=null,a._state=an,a.playlistType=void 0,a.media=null,a.mediaBuffer=null,a.config=void 0,a.bitrateTest=!1,a.lastCurrentTime=0,a.nextLoadPosition=0,a.startPosition=0,a.startTimeOffset=null,a.loadedmetadata=!1,a.retryDate=0,a.levels=null,a.fragmentLoader=void 0,a.keyLoader=void 0,a.levelLastLoaded=null,a.startFragRequested=!1,a.decrypter=void 0,a.initPTS=[],a.onvseeking=null,a.onvended=null,a.logPrefix="",a.log=void 0,a.warn=void 0,a.playlistType=r,a.logPrefix=n,a.log=ne.log.bind(ne,n+":"),a.warn=ne.warn.bind(ne,n+":"),a.hls=e,a.fragmentLoader=new Qi(e.config),a.keyLoader=i,a.fragmentTracker=t,a.config=e.config,a.decrypter=new rn(e.config),e.on(ee.MANIFEST_LOADED,a.onManifestLoaded,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a)),a}function vn(e,t){t=(void 0===t?{}:t).removePKCS7Padding,t=void 0===t||t;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}function An(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}function En(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}function bn(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}function wn(e){var t;return(t=Zi.call(this,e.error.message)||this).data=void 0,t.data=e,t}function Sn(e,t){return{type:e=void 0===e?"":e,id:-1,pid:-1,inputTimeScale:t=void 0===t?9e4:t,sequenceNumber:-1,samples:[],dropped:0}}(a=Ln.prototype).resetInitSegment=function(e,t,i,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},a.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},a.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},a.canParse=function(e,t){return!1},a.appendFrame=function(e,t,i){},a.demux=function(e,t){this.cachedData&&(e=tt(this.cachedData,e),this.cachedData=null);var i,n,r,a=Me(e,0),s=a?a.length:0,o=this._audioTrack,l=this._id3Track,u=a?Be(a):void 0,h=e.length;for((null===this.basePTS||0===this.frameIndex&&G(u))&&(this.basePTS=Tn(u,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),a&&0<a.length&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:a,type:Kt,duration:Number.POSITIVE_INFINITY});s<h;)this.canParse(e,s)?(n=this.appendFrame(o,e,s))?(this.frameIndex++,this.lastPTS=n.sample.pts,i=s+=n.length):s=h:xe(n=e,r=s)&&Ne(n,r+6)+10<=n.length-r?(a=Me(e,s),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:a,type:Kt,duration:Number.POSITIVE_INFINITY}),i=s+=a.length):s++,s===h&&i!==h&&(r=Pe(e,i),this.cachedData?this.cachedData=tt(this.cachedData,r):this.cachedData=r);return{audioTrack:o,videoTrack:Sn(),id3Track:l,textTrack:Sn()}},a.demuxSampleAes=function(e,t,i){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},a.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Sn(),id3Track:this._id3Track,textTrack:Sn()}},a.destroy=function(){};var a=Ln,Tn=function(e,t,i){return G(e)?90*e:9e4*t+(i?9e4*i.baseTime/i.timescale:0)};function Ln(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}function kn(e,t){return 255===e[t]&&240==(246&e[t+1])}function Cn(e,t){return 1&e[t+1]?7:9}function Rn(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function In(e,t){return t+1<e.length&&kn(e,t)}function Pn(e,t,i,n,r){var a,s,o,l,u,h;!e.samplerate&&(t=t,i=i,n=n,r=r,s=navigator.userAgent.toLowerCase(),o=r,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],u=1+((192&i[n+2])>>>6),h=(60&i[n+2])>>>2,n=l.length-1<h?void t.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+h}):(t=(1&i[n+2])<<2,t|=(192&i[n+3])>>>6,ne.log("manifest codec:"+r+", ADTS type:"+u+", samplingIndex:"+h),i=/firefox/i.test(s)?6<=h?(u=5,a=new Array(4),h-3):(u=2,a=new Array(2),h):-1!==s.indexOf("android")?(u=2,a=new Array(2),h):(u=5,a=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&6<=h?h-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(6<=h&&1==t||/vivaldi/i.test(s))||!r&&1==t)&&(u=2,a=new Array(2)),h)),a[0]=u<<3,a[0]|=(14&h)>>1,a[1]|=(1&h)<<7,a[1]|=t<<3,5===u&&(a[1]|=(14&i)>>1,a[2]=(1&i)<<7,a[2]|=8,a[3]=0),{config:a,samplerate:l[h],channelCount:t,codec:"mp4a.40."+u,manifestCodec:o}))&&(e.config=n.config,e.samplerate=n.samplerate,e.channelCount=n.channelCount,e.codec=n.codec,e.manifestCodec=n.manifestCodec,ne.log("parsed codec:"+e.codec+", rate:"+n.samplerate+", channels:"+n.channelCount))}function xn(e){return 9216e4/e}function Dn(e,i,n,t,r){var a,s,o,t=t+r*xn(e.samplerate),r=function(){var e=Cn(i,n);if(n+e<=i.length){var t=Rn(i,n)-e;if(0<t)return{headerLength:e,frameLength:t}}}();return r?(s=r.frameLength,s=(r=r.headerLength)+s,(o=Math.max(0,n+s-i.length))?(a=new Uint8Array(s-r)).set(i.subarray(n+r,i.length),0):a=i.subarray(n+r,n+s),r={unit:a,pts:t},o||e.samples.push(r),{sample:r,length:s,missing:o}):(e=i.length-n,(a=new Uint8Array(e)).set(i.subarray(n,i.length),0),{sample:{unit:a,pts:t},length:e,missing:-1})}e(Vn,Mn=a),(s=Vn.prototype).resetInitSegment=function(e,t,i,n){Mn.prototype.resetInitSegment.call(this,e,t,i,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}},Vn.probe=function(e){if(e)for(var t,i,n,r,a=(Me(e,0)||[]).length,s=e.length;a<s;a++)if(r=n=void 0,!In(t=e,i=a)||i+(r=Cn(t,i))>=t.length?void 0:!((n=Rn(t,i))<=r)&&((r=i+n)===t.length||In(t,r)))return ne.log("ADTS sync word found !"),!0;return!1},s.canParse=function(e,t){return(t=t)+5<(e=e).length&&kn(e,t)&&Rn(e,t)<=e.length-t},s.appendFrame=function(e,t,i){Pn(e,this.observer,t,i,e.manifestCodec);e=Dn(e,t,i,this.basePTS,this.frameIndex);if(e&&0===e.missing)return e};var Mn,s=Vn,Bn=/\/emsg[-/]ID3/i,o=((o=Gn.prototype).resetTimeStamp=function(){},o.resetInitSegment=function(e,t,i,n){var r,a,s,o=this.videoTrack=Sn("video",1),l=this.audioTrack=Sn("audio",1),u=this.txtTrack=Sn("text",1);this.id3Track=Sn("id3",1),this.timeOffset=0,null!=e&&e.byteLength&&((e=Xe(e)).video&&(r=(s=e.video).id,a=s.timescale,s=s.codec,o.id=r,o.timescale=u.timescale=a,o.codec=s),e.audio&&(a=(r=e.audio).id,s=r.timescale,e=r.codec,l.id=a,l.timescale=s,l.codec=e),u.
10id=Qe.text,o.sampleDuration=0,o.duration=l.duration=n)},o.resetContiguity=function(){this.remainderData=null},Gn.probe=function(e){return 0<k(e=16384<e.length?e.subarray(0,16384):e,["moof"]).length},o.demux=function(e,t){this.timeOffset=t;var i,n=e,r=this.videoTrack,a=this.txtTrack,s=(this.config.progressive?(this.remainderData&&(n=tt(this.remainderData,e)),e={valid:null,remainder:null},(s=k(i=n,["moof"]))&&(s.length<2?e.remainder=i:(s=s[s.length-1],e.valid=Pe(i,0,s.byteOffset-8),e.remainder=Pe(i,s.byteOffset-8))),i=e,this.remainderData=i.remainder,r.samples=i.valid||new Uint8Array):r.samples=n,this.extractID3Track(r,t));return a.samples=it(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}},o.flush=function(){var e=this.timeOffset,t=this.videoTrack,i=this.txtTrack,n=(t.samples=this.remainderData||new Uint8Array,this.remainderData=null,this.extractID3Track(t,this.timeOffset));return i.samples=it(e,t),{videoTrack:t,audioTrack:Sn(),id3Track:n,textTrack:Sn()}},o.extractID3Track=function(e,n){var r=this.id3Track;return e.samples.length&&(e=k(e.samples,["emsg"]))&&e.forEach(function(e){var t,i,e=function(e){var t=e[0],i="",n="",r=0,a=0,s=0,o=0,l=0,u=0;if(0===t){for(;"\0"!==v(e.subarray(u,u+1));)i+=v(e.subarray(u,u+1)),u+=1;for(i+=v(e.subarray(u,u+1)),u+=1;"\0"!==v(e.subarray(u,u+1));)n+=v(e.subarray(u,u+1)),u+=1;n+=v(e.subarray(u,u+1)),u+=1,r=L(e,12),a=L(e,16),o=L(e,20),l=L(e,24),u=28}else if(1===t){var r=L(e,u+=4),t=L(e,u+=4),h=L(e,u+=4);for(u+=4,s=Math.pow(2,32)*t+h,Number.isSafeInteger(s)||(s=Number.MAX_SAFE_INTEGER,ne.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=L(e,u),l=L(e,u+=4),u+=4;"\0"!==v(e.subarray(u,u+1));)i+=v(e.subarray(u,u+1)),u+=1;for(i+=v(e.subarray(u,u+1)),u+=1;"\0"!==v(e.subarray(u,u+1));)n+=v(e.subarray(u,u+1)),u+=1;n+=v(e.subarray(u,u+1)),u+=1}return{schemeIdUri:i,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:a,eventDuration:o,id:l,payload:e.subarray(u,e.byteLength)}}(e);Bn.test(e.schemeIdUri)&&(t=G(e.presentationTime)?e.presentationTime/e.timeScale:n+e.presentationTimeDelta/e.timeScale,(i=4294967295===e.eventDuration?Number.POSITIVE_INFINITY:e.eventDuration/e.timeScale)<=.001&&(i=Number.POSITIVE_INFINITY),e=e.payload,r.samples.push({data:e,len:e.byteLength,dts:t,pts:t,type:Jt,duration:i}))}),r},o.demuxSampleAes=function(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},o.destroy=function(){},Gn),Fn=null,On=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Un=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Nn=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],jn=[0,1,1,4];function Gn(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}function Vn(e,t){var i;return(i=Mn.call(this)||this).observer=void 0,i.config=void 0,i.observer=e,i.config=t,i}function Hn(e,t,i,n,r){if(!(i+24>t.length)){var a=Yn(t,i);if(a&&i+a.frameLength<=t.length)return n=n+r*(9e4*a.samplesPerFrame/a.sampleRate),r={unit:t.subarray(i,i+a.frameLength),pts:n,dts:n},e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(r),{sample:r,length:a.frameLength,missing:0}}}function Yn(e,t){var i,n,r,a,s,o=e[t+1]>>3&3,l=e[t+1]>>1&3,u=e[t+2]>>4&15,h=e[t+2]>>2&3;if(1!=o&&0!=u&&15!=u&&3!=h)return s=e[t+2]>>1&1,i=e[t+3]>>6,u=1e3*On[14*(3==o?3-l:3==l?3:4)+u-1],h=Un[3*(3==o?0:2==o?1:2)+h],n=3==i?1:2,a=8*(o=Nn[o][l])*(r=jn[l]),o=Math.floor(o*u/h+s)*r,null===Fn&&(s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i),Fn=s?parseInt(s[1]):0),Fn&&Fn<=87&&2==l&&224e3<=u&&0==i&&(e[t+3]=128|e[t+3]),{sampleRate:h,channelCount:n,frameLength:o,samplesPerFrame:a}}function zn(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function Wn(e,t){return t+1<e.length&&zn(e,t)}function Qn(e,t){var i=0,n=5;t+=n;
10for(var r=new Uint32Array(1),a=new Uint32Array(1),s=new Uint8Array(1);0<n;){s[0]=e[t];var o=Math.min(n,8),l=8-o;a[0]=4278190080>>>24+l<<l,r[0]=(s[0]&a[0])>>l,i=i?i<<o|r[0]:r[0],t+=1,n-=o}return i}e(qn,Kn=a),(Jn=qn.prototype).resetInitSegment=function(e,t,i,n){Kn.prototype.resetInitSegment.call(this,e,t,i,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}},Jn.canParse=function(e,t){return t+64<e.length},Jn.appendFrame=function(e,t,i){t=Xn(e,t,i,this.basePTS,this.frameIndex);if(-1!==t)return{sample:e.samples[e.samples.length-1],length:t,missing:0}},qn.probe=function(e){var t,i;return!!e&&!!(t=Me(e,0))&&11===e[i=t.length]&&119===e[i+1]&&void 0!==Be(t)&&Qn(e,i)<16};var Kn,Jn=qn;function qn(e){var t;return(t=Kn.call(this)||this).observer=void 0,t.observer=e,t}function Xn(e,t,i,n,r){var a,s,o,l,u,h,d,c,f;return i+8>t.length||11!==t[i]||119!==t[i+1]||3<=(d=t[i+4]>>6)||(a=[48e3,44100,32e3][d],i+(o=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*(s=63&t[i+4])+d])>t.length)?-1:(u=0,(2==(l=t[i+6]>>5)||(1&l&&1!=l&&(u+=2),4&l))&&(u+=2),u=(t[i+6]<<8|t[i+7])>>12-u&1,h=[2,1,2,3,3,4,4,5][l]+u,c=t[i+5]>>3,f=7&t[i+5],d=new Uint8Array([d<<6|c<<1|f>>2,(3&f)<<6|l<<3|u<<2|s>>4,s<<4&224]),c=n+r*(1536/a*9e4),f=t.subarray(i,i+o),e.config=d,e.channelCount=h,e.samplerate=a,e.samples.push({unit:f,pts:c}),o)}(l=dr.prototype).createVideoSample=function(e,t,i,n){return{key:e,frame:!1,pts:t,dts:i,units:[],debug:n,length:0}},l.getLastNalUnit=function(e){var t,i=this.VideoSample;return t=null!=(i=i&&0!==i.units.length?i:e[e.length-1])&&i.units?(e=i.units)[e.length-1]:t},l.pushAccessUnit=function(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var i=t.samples,n=i.length;if(!n)return void t.dropped++;i=i[n-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&ne.log(e.pts+"/"+e.dts+":"+e.debug)};var Zn,$n,l=dr,er=((u=hr.prototype).loadWord=function(){var e=this.data,t=this.bytesAvailable,i=e.byteLength-t,n=new Uint8Array(4),t=Math.min(4,t);if(0===t)throw new Error("no bytes available");n.set(e.subarray(i,i+t)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=8*t,this.bytesAvailable-=t},u.skipBits=function(e){var t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e||(e=(e-=this.bitsAvailable)-((t=e>>3)<<3),this.bytesAvailable-=t,this.loadWord()),this.word<<=e,this.bitsAvailable-=e},u.readBits=function(e){var t=Math.min(this.bitsAvailable,e),i=this.word>>>32-t;if(32<e&&ne.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,0<this.bitsAvailable)this.word<<=t;else{if(!(0<this.bytesAvailable))throw new Error("no bits available");this.loadWord()}return 0<(t=e-t)&&this.bitsAvailable?i<<t|this.readBits(t):i},u.skipLZ=function(){for(var e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},u.skipUEG=function(){this.skipBits(1+this.skipLZ())},u.skipEG=function(){this.skipBits(1+this.skipLZ())},u.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},u.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},u.readBoolean=function(){return 1===this.readBits(1)},u.readUByte=function(){return this.readBits(8)},u.readUShort=function(){return this.readBits(16)},u.readUInt=function(){return this.readBits(32)},u.skipScalingList=function(e){for(var t=8,i=8,n=0;n<e;n++)t=0===(i=0!==i?(t+this.readEG()+256)%256:i)?t:i},u.readSPS=function(){var e,t,i,n=0,r=0,a=0,s=0,o=this.readUByte.bind(this),l=this.readBits.bind(this),u=this.readUEG.bind(this),h=this.readBoolean.bind(this),d=this.skipBits.bind(this),c=this.skipEG.bind(this),f=this.skipUEG.bind(this),p=this.skipScalingList.bind(this),m=(o(),o());if(l(5),d(3),o(),f(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){m=u();if(3===m&&d(1),f(),f(),d(1),h())for(t=3!==m?8:12,i=0;i<t;i++)h()&&p(i<6?16:64)}f();m=u();if(0===m)u();else if(1===m)for(d(1),c(),c(),e=u(),i=0;i<e;i++)c();f(),d(1);var m=u(),f=u(),l=l(1),g=(0===l&&d(1),d(1),h()&&(n=u(),r=u(),a=u(),s=u()),[1,1]);if(h()&&h())switch(o()){case 1:g=[1,1];break;case 2:g=[12,11];break;case 3:g=[10,11];break;case 4:g=[16,11];break;case 5:g=[40,33];break;
10case 6:g=[24,11];break;case 7:g=[20,11];break;case 8:g=[32,11];break;case 9:g=[80,33];break;case 10:g=[18,11];break;case 11:g=[15,11];break;case 12:g=[64,33];break;case 13:g=[160,99];break;case 14:g=[4,3];break;case 15:g=[3,2];break;case 16:g=[2,1];break;case 255:g=[o()<<8|o(),o()<<8|o()]}return{width:Math.ceil(16*(m+1)-2*n-2*r),height:(2-l)*(f+1)*16-(l?2:4)*(a+s),pixelRatio:g}},u.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},u.destroy=function(){this.data=null},hr),tr=(e(ur,$n=l),(u=ur.prototype).parseAVCPES=function(o,l,u,e,h){var d,c=this,t=this.parseAVCNALu(o,u.data),f=this.VideoSample,p=!1;u.data=null,f&&t.length&&!o.audFound&&(this.pushAccessUnit(f,o),f=this.VideoSample=this.createVideoSample(!1,u.pts,u.dts,"")),t.forEach(function(e){switch(e.type){case 1:var t=!1;d=!0;var i=e.data;p&&4<i.length&&(2!==(i=new er(i).readSliceType())&&4!==i&&7!==i&&9!==i||(t=!0)),t&&null!=f&&f.frame&&!f.key&&(c.pushAccessUnit(f,o),f=c.VideoSample=null),(f=f||(c.VideoSample=c.createVideoSample(!0,u.pts,u.dts,""))).frame=!0,f.key=t;break;case 5:d=!0,null!=f&&f.frame&&!f.key&&(c.pushAccessUnit(f,o),f=c.VideoSample=null),(f=f||(c.VideoSample=c.createVideoSample(!0,u.pts,u.dts,""))).key=!0,f.frame=!0;break;case 6:d=!0,nt(e.data,1,u.pts,l.samples);break;case 7:if(p=d=!0,!o.sps){i=e.data,t=new er(i).readSPS();o.width=t.width,o.height=t.height,o.pixelRatio=t.pixelRatio,o.sps=[i],o.duration=h;for(var n=i.subarray(1,4),r="avc1.",a=0;a<3;a++){var s=n[a].toString(16);r+=s=s.length<2?"0"+s:s}o.codec=r}break;case 8:d=!0,o.pps||(o.pps=[e.data]);break;case 9:d=!0,o.audFound=!0,f&&c.pushAccessUnit(f,o),f=c.VideoSample=c.createVideoSample(!1,u.pts,u.dts,"");break;case 12:d=!0;break;default:d=!1,f&&(f.debug+="unknown NAL "+e.type+" ")}f&&d&&f.units.push(e)}),e&&f&&(this.pushAccessUnit(f,o),this.VideoSample=null)},u.parseAVCNALu=function(e,t){var i,n,r,a,s=t.byteLength,o=e.naluState||0,l=o,u=[],h=0,d=-1,c=0;for(-1===o&&(c=31&t[d=0],o=0,h=1);h<s;)i=t[h++],o=o?1!==o?i?1===i?(r=h-o-1,0<=d?(n={data:t.subarray(d,r),type:c},u.push(n)):(n=this.getLastNalUnit(e.samples))&&(l&&h<=4-l&&n.state&&(n.data=n.data.subarray(0,n.data.byteLength-l)),0<r)&&(n.data=tt(n.data,t.subarray(0,r)),n.state=0),h<s?(c=31&t[d=h],0):-1):0:3:i?0:2:i?0:1;return 0<=d&&0<=o&&(a={data:t.subarray(d,s),type:c,state:o},u.push(a)),0===u.length&&(a=this.getLastNalUnit(e.samples))&&(a.data=tt(a.data,t)),e.naluState=o,u},ur),ir=(lr._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,a=0;a<i;a++)2<=a&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(n[r]=t[a],r++);return new Uint8Array(n.buffer,0,r)},lr.parseVPS=function(e){e=lr._ebsp2rbsp(e),e=new er(e);return e.readUByte(),e.readUByte(),e.readBits(4),e.readBits(2),e.readBits(6),{num_temporal_layers:e.readBits(3)+1,temporal_id_nested:e.readBoolean()}},lr.parseSPS=function(e){var e=lr._ebsp2rbsp(e),t=new er(e),e=(t.readUByte(),t.readUByte(),0),i=0,n=0,r=0,a=(t.readBits(4),t.readBits(3));t.readBoolean();for(var F=t.readBits(2),O=t.readBoolean(),s=t.readBits(5),U=t.readUByte(),N=t.readUByte(),j=t.readUByte(),G=t.readUByte(),V=t.readUByte(),H=t.readUByte(),Y=t.readUByte(),z=t.readUByte(),W=t.readUByte(),Q=t.readUByte(),o=t.readUByte(),l=[],u=[],h=0;h<a;h++)l.push(t.readBoolean()),u.push(t.readBoolean());if(0<a)for(var d=a;d<8;d++)t.readBits(2);for(var c=0;c<a;c++)l[c]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),u[c]&&t.readUByte();t.readUEG();var f=t.readUEG(),p=(3==f&&t.readBits(1),t.readUEG()),K=t.readUEG();t.readBoolean()&&(e+=t.readUEG(),i+=t.readUEG(),n+=t.readUEG(),r+=t.readUEG());for(var m=t.readUEG(),J=t.readUEG(),q=t.readUEG(),g=t.readBoolean()?0:a;g<=a;g++)t.readUEG(),t.readUEG(),t.readUEG();if(t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readBoolean()&&t.readBoolean())for(var _=0;_<4;_++)for(var y=0;y<(3===_?2:6);y++)if(t.readBoolean()){var X=Math.min(64,1<<4+(_<<1));1<_&&t.readEG();for(var v=0;v<X;v++)t.readEG()}else t.readUEG();t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUEG(),t.readUEG(),t.readBoolean());for(var A=t.readUEG(),E=0,b=0;b<A;b++){var w=!1;if(w=0!==b?t.readBoolean():w){b===A&&t.readUEG(),t.readBoolean(),t.readUEG();for(var S=0,T=0;T<=E;T++){var L=t.readBoolean(),k=!1;L||(k=t.readBoolean()),(L||k)&&S++}E=S}else{for(var C=t.readUEG(),Z=t.readUEG(),E=C+Z,$=0;$<C;$++)t.readUEG(),t.readBoolean();for(var ee=0;ee<Z;ee++)t.readUEG(),t.readBoolean()}}if(t.readBoolean())for(var te=t.readUEG(),ie=0;ie<te;ie++){for(var ne=0;ne<q+4;ne++)t.readBits(1);t.readBits(1)}var re=0,R=1,I=1,ae=!1,P=1,x=1;if(t.readBoolean(),t.readBoolean(),t.readBoolean()){if(t.readBoolean()&&(0<(B=t.readUByte())&&B<=16?(R=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][B-1],I=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][B-1]):255===B&&(R=t.readBits(16),I=t.readBits(16))),t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean())&&(t.readUByte(),t.readUByte(),t.readUByte()),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG()),t.readBoolean()&&(P=t.readBits(32),x=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){var D=!1,se=t.readBoolean(),oe=t.readBoolean();(se||oe)&&((D=t.readBoolean())&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),D&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(var le=0;le<=a;le++){var ue=t.readBoolean(),ae=ue,he=!0,M=1,de=!1;if((he=ue?he:t.readBoolean())?t.readUEG():de=t.readBoolean(),de||(M=t.readUEG()+1),se){for(var ce=0;ce<M;ce++)t.readUEG(),t.readUEG(),D&&(t.readUEG(),t.readUEG());t.readBoolean()}if(oe){for(var fe=0;fe<M;fe++)t.readUEG(),t.readUEG(),D&&(t.readUEG(),t.readUEG());t.readBoolean()}}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),re=t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG())}t.readBoolean();var B="hvc1."+s+".1.L"+o+".B0",p=p-(e+i)*(1===f||2===f?2:1),e=K-(n+r)*(1===f?2:1),i=1!==R&&1!==I?R/I:1;return t.destroy(),t=null,{codec_mimetype:B,level_string:lr.getLevelString(o),profile_idc:s,bit_depth:m+8,ref_frames:1,chroma_format:f,chroma_format_string:lr.getChromaFormatString(f),general_level_idc:o,general_profile_space:F,general_tier_flag:O,general_profile_idc:s,general_profile_compatibility_flags_1:U,general_profile_compatibility_flags_2:N,general_profile_compatibility_flags_3:j,general_profile_compatibility_flags_4:G,general_constraint_indicator_flags_1:V,general_constraint_indicator_flags_2:H,general_constraint_indicator_flags_3:Y,general_constraint_indicator_flags_4:z,general_constraint_indicator_flags_5:W,general_constraint_indicator_flags_6:Q,min_spatial_segmentation_idc:re,constant_frame_rate:0,chroma_format_idc:f,bit_depth_luma_minus8:m,bit_depth_chroma_minus8:J,frame_rate:{fixed:ae,fps:x/P,fps_den:P,fps_num:x},sar_ratio:{width:R,height:I},codec_size:{width:p,height:e}
10,present_size:{width:p*i,height:e}}},lr.parsePPS=function(e){var e=lr._ebsp2rbsp(e),e=new er(e),t=(e.readUByte(),e.readUByte(),e.readUEG(),e.readUEG(),e.readBoolean(),e.readBoolean(),e.readBits(3),e.readBoolean(),e.readBoolean(),e.readUEG(),e.readUEG(),e.readEG(),e.readBoolean(),e.readBoolean(),e.readBoolean()&&e.readUEG(),e.readEG(),e.readEG(),e.readBoolean(),e.readBoolean(),e.readBoolean(),e.readBoolean(),e.readBoolean()),e=e.readBoolean(),i=1;return e&&t?i=0:e?i=3:t&&(i=2),{parallelismType:i}},lr.getChromaFormatString=function(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},lr.getProfileString=function(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},lr.getLevelString=function(e){return(e/30).toFixed(1)},lr),nr=(e(or,Zn=l),(u=or.prototype).parseAVCPES=function(n,r,a,e,s){var o,l=this,t=this.parseAVCNALu(n,a.data),u=this.VideoSample;a.data=null,u&&t.length&&!n.audFound&&(this.pushAccessUnit(u,n),u=this.VideoSample=this.createVideoSample(!1,a.pts,a.dts,"")),t.forEach(function(e){switch(e.type){case 0:case 1:o=!0,(u=u||(l.VideoSample=l.createVideoSample(!0,a.pts,a.dts,""))).frame=!0;break;case 19:case 20:case 21:o=!0,(u=u||(l.VideoSample=l.createVideoSample(!0,a.pts,a.dts,""))).key=!0,u.frame=!0;break;case 32:o=!0,n.vps||(n.vps=[e.data]);break;case 33:var t;o=!0,n.sps||(i=e.data,t=ir.parseSPS(i),n.width=t.codec_size.width,n.height=t.codec_size.height,n.pixelRatio=[t.sar_ratio.width,t.sar_ratio.height],n.sps=[i],n.duration=s,n.codec=t.codec_mimetype,n.details=m(m({},n.details),t));break;case 34:var i;o=!0,n.pps||(n.pps=[e.data],i=ir.parsePPS(e.data),n.details=m(m({},n.details),i));break;case 35:o=!1,n.audFound=!0,u&&l.pushAccessUnit(u,n),u=l.VideoSample=l.createVideoSample(!1,a.pts,a.dts,"");break;case 39:o=!0,nt(e.data,1,a.pts,r.samples);break;default:o=!0}u&&o&&u.units.push(e)}),e&&u&&(this.pushAccessUnit(u,n),this.VideoSample=null)},u.parseAVCNALu=function(e,t){var i,n,r,a,s=t.byteLength,o=e.naluState||0,l=o,u=[],h=0,d=-1,c=0;for(-1===o&&(c=t[d=0]>>1&63,o=0,h=1);h<s;)i=t[h++],o=o?1!==o?i?1===i?(r=h-o-1,0<=d?(n={data:t.subarray(d,r),type:c},u.push(n)):(n=this.getLastNalUnit(e.samples))&&(l&&h<=4-l&&n.state&&(n.data=n.data.subarray(0,n.data.byteLength-l)),0<r)&&(n.data=tt(n.data,t.subarray(0,r)),n.state=0),h<s?(c=t[d=h]>>1&63,0):-1):0:3:i?0:2:i?0:1;return 0<=d&&0<=o&&(a={data:t.subarray(d,s),type:c,state:o},u.push(a)),0===u.length&&(a=this.getLastNalUnit(e.samples))&&(a.data=tt(a.data,t)),e.naluState=o,u},or),rr=((l=sr.prototype).decryptBuffer=function(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)},l.decryptAacSample=function(t,i,n){var e,r=this,a=t[i].unit;a.length<=16||(e=(e=a.subarray(16,a.length-a.length%16)).buffer.slice(e.byteOffset,e.byteOffset+e.length),this.decryptBuffer(e).then(function(e){e=new Uint8Array(e);a.set(e,16),r.decrypter.isSync()||r.decryptAacSamples(t,i+1,n)}))},l.decryptAacSamples=function(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,i),this.decrypter.isSync())))return}},l.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t),n=0,r=32;r<e.length-16;r+=160,n+=16)i.set(e.subarray(r,r+16),n);return i},l.getAvcDecryptedUnit=function(e,t){for(var i=new Uint8Array(t),n=0,r=32;r<e.length-16;r+=160,n+=16)e.set(i.subarray(n,n+16),r);return e},l.decryptAvcSample=function(t,i,n,r,a){var s=this,o=rt(a.data),e=this.getAvcEncryptedData(o);this.decryptBuffer(e.buffer).then(function(e){a.data=s.getAvcDecryptedUnit(o,e),s.decrypter.isSync()||s.decryptAvcSamples(t,i,n+1,r)})},l.decryptAvcSamples=function(e,t,i,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void n();for(var r=e[t].units;!(i>=r.length);i++){var a=r[i];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,i,n,a),this.decrypter.isSync())))return}}},sr),l=(ar.probe=function(e){e=ar.syncOffset(e);
10return 0<e&&ne.warn("MPEG2-TS detected but first sync word found @ offset "+e),-1!==e},ar.syncOffset=function(e){for(var t=e.length,i=Math.min(940,e.length-188)+1,n=0;n<i;){for(var r=!1,a=-1,s=0,o=n;o<t;o+=188){if(71!==e[o]){if(s)return-1;break}if(s++,-1===a&&0!==(a=o)&&(i=Math.min(a+18612,e.length-188)+1),(r=r||0===cr(e,o))&&1<s&&(0===a&&2<s||i<o+188))return a}n++}return-1},ar.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:Qe[e],pid:-1,segmentVideoCodec:"",inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}},(u=ar.prototype).resetInitSegment=function(e,t,i,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=ar.createTrack("video"),this._audioTrack=ar.createTrack("audio",n),this._id3Track=ar.createTrack("id3"),this._txtTrack=ar.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=n},u.resetTimeStamp=function(){},u.resetContiguity=function(){var e=this._audioTrack,t=this._videoTrack,i=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.remainderData=null},u.parseVideoAVCPES=function(e,t,i,n,r){"avc"===e.segmentCodec&&this.videoParser.parseAVCPES(e,t,i,n,r),"hevc"===e.segmentCodec&&this.hevcVideoParser.parseAVCPES(e,t,i,n,r)},u.demux=function(e,t,i,n){void 0===n&&(n=!1),(i=void 0===i?!1:i)||(this.sampleAes=null);var r,a=this._videoTrack,s=this._audioTrack,o=this._id3Track,l=this._txtTrack,u=a.pid,h=a.pesData,d=s.pid,c=o.pid,f=s.pesData,p=o.pesData,m=null,g=this.pmtParsed,_=this._pmtId,y=e.length;if(this.remainderData&&(y=(e=tt(this.remainderData,e)).length,this.remainderData=null),y<188&&!n)return this.remainderData=e,{audioTrack:s,videoTrack:a,id3Track:o,textTrack:l};var v=Math.max(0,ar.syncOffset(e));(y-=(y-v)%188)<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,y,e.buffer.byteLength-y));for(var A,E=0,b=v;b<y;b+=188)if(71===e[b]){var w=!!(64&e[b+1]),S=cr(e,b),T=void 0;if(1<(48&e[b+3])>>4){if((T=b+5+e[b+4])===b+188)continue}else T=b+4;switch(S){case u:w&&(h&&(r=pr(h))&&this.parseVideoAVCPES(a,l,r,!1,this._duration),h={data:[],size:0}),h&&(h.data.push(e.subarray(T,b+188)),h.size+=b+188-T);break;case d:if(w){if(f&&(r=pr(f)))switch(s.segmentCodec){case"aac":this.parseAACPES(s,r);break;case"mp3":this.parseMPEGPES(s,r);break;case"ac3":this.parseAC3PES(s,r)}f={data:[],size:0}}f&&(f.data.push(e.subarray(T,b+188)),f.size+=b+188-T);break;case c:w&&(p&&(r=pr(p))&&this.parseID3PES(o,r),p={data:[],size:0}),p&&(p.data.push(e.subarray(T,b+188)),p.size+=b+188-T);break;case 0:w&&(T+=e[T]+1),_=this._pmtId=(31&(L=e)[(A=T)+10])<<8|L[A+11];break;case _:w&&(T+=e[T]+1);var L=function(e,t,i,n){var r={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){var s=cr(e,t),o=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!n){fr("ADTS AAC");break}case 15:-1===r.audioPid&&(r.audioPid=s);break;case 21:-1===r.id3Pid&&(r.id3Pid=s);break;case 219:if(!n){fr("H.264");break}case 27:-1===r.videoPid&&(r.videoPid=s,r.segmentVideoCodec="avc");break;case 3:case 4:i.mpeg||i.mp3?-1===r.audioPid&&(r.audioPid=s,r.segmentAudioCodec="mp3"):ne.log("MPEG audio found, not supported in this browser");break;case 193:if(!n){fr("AC-3");break}case 129:i.ac3?-1===r.audioPid&&(r.audioPid=s,r.segmentAudioCodec="ac3"):ne.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===r.audioPid&&0<o)for(var l=t+5,u=o;2<u;){106===e[l]&&(!0!==i.ac3?ne.log("AC-3 audio found, not supported in this browser for now"):(r.audioPid=s,r.segmentAudioCodec="ac3"));var h=e[l+1]+2;l+=h,u-=h}break;case 194:case 135:ne.warn("Unsupported EC-3 in M2TS found");break;case 36:-1===r.videoPid&&(r.videoPid=s,r.segmentVideoCodec="hevc")}t+=5+o}return r}(e,T,this.typeSupported,i);0<(u=L.videoPid)&&(a.pid=u,a.segmentCodec=L.segmentVideoCodec),0<(d=L.audioPid)&&(s.pid=d,s.segmentCodec=L.segmentAudioCodec),0<(c=L.id3Pid)&&(o.pid=c),null===m||g||(ne.warn("MPEG-TS PMT found at "+b+" after unknown PID '"+m+"'. Backtracking to sync byte @"+v+" to parse all TS packets."),m=null,b=v-188),g=this.pmtParsed=!0;break;case 17:case 8191:break;default:m=S}}else E++;0<E&&(k=new Error("Found "+E+" TS packet/s that do not start with 0x47"),this.observer.emit(ee.ERROR,ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,fatal:!1,error:k,reason:k.message})),a.pesData=h,s.pesData=f,o.pesData=p;var k={audioTrack:s,videoTrack:a,id3Track:o,textTrack:l};return n&&this.extractRemainingSamples(k),k},u.flush=function(){var e=this.remainderData;return this.remainderData=null,e=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},u.extractRemainingSamples=function(e){var t,i=e.audioTrack,n=e.videoTrack,r=e.id3Track,e=e.textTrack,a=n.pesData,s=i.pesData,o=r.pesData;
10if(a&&(t=pr(a))?(this.parseVideoAVCPES(n,e,t,!0,this._duration),n.pesData=null):n.pesData=a,s&&(t=pr(s))){switch(i.segmentCodec){case"aac":this.parseAACPES(i,t);break;case"mp3":this.parseMPEGPES(i,t);break;case"ac3":this.parseAC3PES(i,t)}i.pesData=null}else null!=s&&s.size&&ne.log("last AAC PES packet truncated,might overlap between fragments"),i.pesData=s;o&&(t=pr(o))?(this.parseID3PES(r,t),r.pesData=null):r.pesData=o},u.demuxSampleAes=function(e,t,i){e=this.demux(e,i,!0,!this.config.progressive),i=this.sampleAes=new rr(this.observer,this.config,t);return this.decrypt(e,i)},u.decrypt=function(n,r){return new Promise(function(e){var t=n.audioTrack,i=n.videoTrack;t.samples&&"aac"===t.segmentCodec?r.decryptAacSamples(t.samples,0,function(){i.samples?r.decryptAvcSamples(i.samples,0,0,function(){e(n)}):e(n)}):i.samples&&r.decryptAvcSamples(i.samples,0,0,function(){e(n)})})},u.destroy=function(){this._duration=0},u.parseAACPES=function(e,t){var i,n,r=0,a=this.aacOverFlow,s=t.data;for(a&&(this.aacOverFlow=null,o=a.missing,l=a.sample.unit.byteLength,-1===o?s=tt(a.sample.unit,s):(l=l-o,a.sample.unit.set(s.subarray(0,o),l),e.samples.push(a.sample),r=a.missing)),i=r,n=s.length;i<n-1&&!In(s,i);i++);if(i!==r){var o=i<n-1,l=o?"AAC PES did not start with ADTS header,offset:"+i:"No ADTS header found in AAC PES",r=new Error(l);if(ne.warn("parsing error: "+l),this.observer.emit(ee.ERROR,ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,fatal:!1,levelRetry:o,error:r,reason:l}),!o)return}if(Pn(e,this.observer,s,i,this.audioCodec),void 0!==t.pts)u=t.pts;else{if(!a)return void ne.warn("[tsdemuxer]: AAC PES unknown PTS");var r=xn(e.samplerate),u=a.sample.pts+r}for(var h,d=0;i<n;){if(i+=(h=Dn(e,s,i,u,d)).length,h.missing){this.aacOverFlow=h;break}for(d++;i<n-1&&!In(s,i);i++);}},u.parseMPEGPES=function(e,t){var i=t.data,n=i.length,r=0,a=0,s=t.pts;if(void 0!==s)for(;a<n;)if(Wn(i,a)){var o=Hn(e,i,a,s,r);if(!o)break;a+=o.length,r++}else a++;else ne.warn("[tsdemuxer]: MPEG PES unknown PTS")},u.parseAC3PES=function(e,t){var i=t.data,n=t.pts;if(void 0!==n)for(var r,a=i.length,s=0,o=0;o<a&&0<(r=Xn(e,i,o,n,s++));)o+=r;else ne.warn("[tsdemuxer]: AC3 PES unknown PTS")},u.parseID3PES=function(e,t){void 0!==t.pts?(t=$({},t,{type:this._videoTrack?Jt:Kt,duration:Number.POSITIVE_INFINITY}),e.samples.push(t)):ne.warn("[tsdemuxer]: ID3 PES unknown PTS")},ar);function ar(e,t,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.hevcVideoParser=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.videoParser=new tr,this.hevcVideoParser=new nr}function sr(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new rn(t,{removePKCS7Padding:!1})}function or(){return Zn.apply(this,arguments)||this}function lr(){}function ur(){return $n.apply(this,arguments)||this}function hr(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}function dr(){this.VideoSample=null}function cr(e,t){return((31&e[t+1])<<8)+e[t+2]}function fr(e){ne.log(e+" with AES-128-CBC encryption found in unencrypted stream")}function pr(e){var t,i,n,r,a=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&1<s.length;)s[0]=tt(s[0],s[1]),s.splice(1,1);if(1!==((t=s[0])[0]<<16)+(t[1]<<8)+t[2])return null;if((i=(t[4]<<8)+t[5])&&i>e.size-6)return null;var o=t[7],l=(192&o&&(n=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&o?54e5<n-(r=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)&&(ne.warn(Math.round((n-r)/9e4)+"s delta between PTS and DTS, align them"),n=r):r=n),(o=t[8])+9);if(e.size<=l)return null;e.size-=l;for(var u=new Uint8Array(e.size),h=0,d=s.length;h<d;h++){var c=(t=s[h]).byteLength;if(l){if(c<l){l-=c;continue}t=t.subarray(l),c-=l,l=0}u.set(t,a),a+=c}return i&&(i-=o+3),{data:u,pts:n,dts:r,len:i}}e(Er,mr=a),(u=Er.prototype).resetInitSegment=function(e,t,i,n){mr.prototype.resetInitSegment.call(this,e,t,i,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}},Er.probe=function(e){if(e){var t=Me(e,0),i=(null==t?void 0:t.length)||0;
10if(!(t&&11===e[i]&&119===e[i+1]&&void 0!==Be(t)&&Qn(e,i)<=16))for(var n=e.length;i<n;i++)if(function(e,t){var i;if(t+1<e.length&&zn(e,t))return i=4,(t=t+(i=null!=(t=Yn(e,t))&&t.frameLength?t.frameLength:i))===e.length||Wn(e,t)}(e,i))return ne.log("MPEG Audio sync word found !"),!0}return!1},u.canParse=function(e,t){return zn(e,t)&&4<=e.length-t},u.appendFrame=function(e,t,i){if(null!==this.basePTS)return Hn(e,t,i,this.basePTS,this.frameIndex)};var mr,a=Er,gr=(Ar.getSilentFrame=function(e,t){return"mp4a.40.2"===e?1===t?new Uint8Array([0,200,0,128,35,128]):2===t?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===t?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]):void 0:1===t?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]):2===t||3===t?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]):void 0},Ar),_r=(vr.prototype.getData=function(){return this.data},vr),yr=Math.pow(2,32)-1,re=(c.init=function(){for(var e in c.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]})c.types.hasOwnProperty(e)&&(c.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var t=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=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]),t=(c.HDLR_TYPES={video:t,audio:i},new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),i=new Uint8Array([0,0,0,0,0,0,0,0]),i=(c.STTS=c.STSC=c.STCO=i,c.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),c.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),c.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),c.STSD=new Uint8Array([0,0,0,0,0,0,0,1]),new Uint8Array([105,115,111,109])),n=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);c.FTYP=c.box(c.types.ftyp,i,r,i,n),c.DINF=c.box(c.types.dinf,c.box(c.types.dref,t))},c.box=function(e){for(var t=8,i=arguments.length,n=new Array(1<i?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(var a=n.length,s=a;a--;)t+=n[a].byteLength;var o=new Uint8Array(t);for(o[0]=t>>24&255,o[1]=t>>16&255,o[2]=t>>8&255,o[3]=255&t,o.set(e,4),a=0,t=8;a<s;a++)o.set(n[a],t),t+=n[a].byteLength;return o},c.hdlr=function(e){return c.box(c.types.hdlr,c.HDLR_TYPES[e])},c.mdat=function(e){return c.box(c.types.mdat,e)},c.mdhd=function(e,t){t*=e;var i=Math.floor(t/(1+yr)),t=Math.floor(t%(1+yr));return c.box(c.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,t>>24,t>>16&255,t>>8&255,255&t,85,196,0,0]))},c.mdia=function(e){return c.box(c.types.mdia,c.mdhd(e.timescale,e.duration),c.hdlr(e.type),c.minf(e))},c.mfhd=function(e){return c.box(c.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},c.minf=function(e){return"audio"===e.type?c.box(c.types.minf,c.box(c.types.smhd,c.SMHD),c.DINF,c.stbl(e)):c.box(c.types.minf,c.box(c.types.vmhd,c.VMHD),c.DINF,c.stbl(e))},c.moof=function(e,t,i){return c.box(c.types.moof,c.mfhd(e),c.traf(i,t))},c.moov=function(e){for(var t=e.length,i=[];t--;)i[t]=c.trak(e[t]);return c.box.apply(null,[c.types.moov,c.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(c.mvex(e)))},c.mvex=function(e){for(var t=e.length,i=[];t--;)i[t]=c.trex(e[t]);return c.box.apply(null,[c.types.mvex].concat(i))},c.mvhd=function(e,t){t*=e;var i=Math.floor(t/(1+yr)),t=Math.floor(t%(1+yr)),e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,t>>24,t>>16&255,t>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return c.box(c.types.mvhd,e)},c.sdtp=function(e){for(var t,i=e.samples||[],n=new Uint8Array(4+i.length),r=0;r<i.length;r++)t=i[r].flags,n[r+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return c.box(c.types.sdtp,n)},c.stbl=function(e){return c.box(c.types.stbl,c.stsd(e),c.box(c.types.stts,c.STTS),c.box(c.types.stsc,c.STSC),c.box(c.types.stsz,c.STSZ),c.box(c.types.stco,c.STCO))},c.avc1=function(e){for(var t,i,n=[],r=[],a=0;a<e.sps.length;a++)i=(t=e.sps[a]).byteLength,n.push(i>
10>>8&255),n.push(255&i),n=n.concat(Array.prototype.slice.call(t));for(a=0;a<e.pps.length;a++)i=(t=e.pps[a]).byteLength,r.push(i>>>8&255),r.push(255&i),r=r.concat(Array.prototype.slice.call(t));var s=c.box(c.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(r))),o=e.width,l=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return c.box(c.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,c.box(c.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),c.box(c.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},c.hvc1=function(e){for(var t=new Uint8Array,i=new Uint8Array,n=new Uint8Array,r=e.width,a=e.height,r=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,r>>>8&255,255&r,a>>>8&255,255&a,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]),s=0;s<e.vps.length;s++){var o=e.vps[s],l=new Uint8Array(t.length+o.length);l.set(t),l.set(o,t.length),t=l}for(s=0;s<e.sps.length;s++){o=e.sps[s];var u=new Uint8Array(i.length+o.length);u.set(i),u.set(o,i.length),i=u}for(s=0;s<e.pps.length;s++){o=e.pps[s];var h=new Uint8Array(n.length+o.length);h.set(n),h.set(o,n.length),n=h}a=new _r(t,i,n,e.details);return c.box(c.types.hvc1,r,c.box(c.types.hvcC,a.getData()))},c.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},c.audioStsd=function(e){var t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])},c.mp4a=function(e){return c.box(c.types.mp4a,c.audioStsd(e),c.box(c.types.esds,c.esds(e)))},c.mp3=function(e){return c.box(c.types[".mp3"],c.audioStsd(e))},c.ac3=function(e){return c.box(c.types["ac-3"],c.audioStsd(e),c.box(c.types.dac3,e.config))},c.stsd=function(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?c.box(c.types.stsd,c.STSD,c.mp3(e)):"ac3"===e.segmentCodec?c.box(c.types.stsd,c.STSD,c.ac3(e)):c.box(c.types.stsd,c.STSD,c.mp4a(e)):"video"===e.type&&e.codec.startsWith("hvc1")?c.box(c.types.stsd,c.STSD,c.hvc1(e)):c.box(c.types.stsd,c.STSD,c.avc1(e))},c.tkhd=function(e){var t=e.id,i=e.duration*e.timescale,n=e.width,e=e.height,r=Math.floor(i/(1+yr)),i=Math.floor(i%(1+yr));return c.box(c.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,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,n>>8&255,255&n,0,0,e>>8&255,255&e,0,0]))},c.traf=function(e,t){var i=c.sdtp(e),n=e.id,r=Math.floor(t/(1+yr)),t=Math.floor(t%(1+yr));return c.box(c.types.traf,c.box(c.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),c.box(c.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t])),c.trun(e,i.length+16+20+8+16+8+8),i)},c.trak=function(e){return e.duration=e.duration||4294967295,c.box(c.types.trak,c.tkhd(e),c.mdia(e))},c.trex=function(e){e=e.id;return c.box(c.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},c.trun=function(e,t){var i,n,r,a,s,o=e.samples||[],l=o.length,u=12+16*l,h=new Uint8Array(u);for(h.set(["video"===e.type?1:0,0,15,1,l>>>24&255,l>>>16&255,l>>>8&255,255&l,(t+=8+u)>>>24&255,t>>>16&255,t>>>8&255,255&t],0),i=0;i<l;i++)n=(s=o[i]).duration,r=s.size,a=s.flags,s=s.cts,h.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,s>>>24&255,s>>>16&255,s>>>8&255,255&s],12+16*i);return c.box(c.types.trun,h)},c.initSegment=function(e){c.types||c.init();e=c.moov(e);return tt(c.FTYP,e)},c);function c(){}function vr(e,t,i,n){this.data=void 0;var r=23+(5+e.byteLength)+(5+t.byteLength)+(5+i.byteLength),r=this.data=new Uint8Array(r);r[0]=1,r[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,r[2]=n.general_profile_compatibility_flags_1,r[3]=n.general_profile_compatibility_flags_2,r[4]=n.general_profile_compatibility_flags_3,r[5]=n.general_profile_compatibility_flags_4,r[6]=n.general_constraint_indicator_flags_1,r[7]=n.general_constraint_indicator_flags_2,r[8]=n.general_constraint_indicator_flags_3,r[9]=n.general_constraint_indicator_flags_4,r[10]=n.general_constraint_indicator_flags_5,r[11]=n.general_constraint_indicator_flags_6,r[12]=n.general_level_idc,r[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,r[14]=255&n.min_spatial_segmentation_idc,r[15]=252|3&n.parallelismType,r[16]=252|3&n.chroma_format_idc,r[17]=248|7&n.bit_depth_luma_minus8,r[18]=248|7&n.bit_depth_chroma_minus8,r[19]=0,r[20]=0,r[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(65280&e.byteLength)>>8,r[27]=(255&e.byteLength)>>0,r.set(e,28),r[23+(5+e.byteLength)+0]=161,r[23+(5+e.byteLength)+1]=0,r[23+(5+e.byteLength)+2]=1,r[23+(5+e.byteLength)+3]=(65280&t.byteLength)>>8,r[23+(5+e.byteLength)+4]=(255&t.byteLength)>>0,r.set(t,23+(5+e.byteLength)+5),r[23+(5+e.byteLength+5+t.byteLength)+0]=162,r[23+(5+e.byteLength+5+t.byteLength)+1]=0,r[23+(5+e.byteLength+5+t.byteLength)+2]=1,r[23+(5+e.byteLength+5+t.byteLength)+3]=(65280&i.byteLength)>>8,r[23+(5+e.byteLength+5+t.byteLength)+4]=(255&i.byteLength)>>0,r.set(i,23+(5+e.byteLength+5+t.byteLength)+5)}function Ar(){}function Er(){return mr.apply(this,arguments)||this}re.types=void 0,re.HDLR_TYPES=void 0,re.STTS=void 0,re.STSC=void 0,re.STCO=void 0,re.STSZ=void 0,re.VMHD=void 0,re.SMHD=void 0,re.STSD=void 0,re.FTYP=void 0,re.DINF=void 0;function br(e,t,i,n){e=e*t*(i=void 0===i?1:i);return(n=void 0===n?!1:n)?Math.round(e):e}function wr(e,t){return br(e,1e3,1/9e4,t=void 0===t?!1:t)}var Sr=null,Tr=null,u=((u=Lr.prototype).destroy=function(){},u.resetTimeStamp=function(e){ne.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},u.resetNextTimestamp=function(){ne.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},u.resetInitSegment=function(){ne.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},u.getVideoStartPts=function(e){var n=!1,e=e.reduce(function(e,t){var i=t.pts-e;return i<-4294967296?(n=!0,kr(e,t.pts)):0<i?e:t.pts},e[0].pts);return n&&ne.debug("PTS rollover detected"),e},u.remux=function(e,t,i,n,r,a,s,o){var l,u,h,d,c,f,p,m=r,g=r,_=-1<e.pid,y=-1<t.pid,v=t.samples.length,A=0<e.samples.length,E=s&&
100<v||1<v;return(_&&!A||y&&!E)&&!this.ISGenerated&&!s||(this.ISGenerated||(h=this.generateIS(e,t,r,a)),_=this.isVideoContiguous,s=-1,E&&(s=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!_)&&this.config.forceKeyFrameOnDiscontinuity&&(f=!0,0<s?(ne.warn("[mp4-remuxer]: Dropped "+s+" out of "+v+" video samples due to a missing keyframe"),p=this.getVideoStartPts(t.samples),t.samples=t.samples.slice(s),t.dropped+=s,p=g+=(t.samples[0].pts-p)/t.inputTimeScale):-1===s&&(ne.warn("[mp4-remuxer]: No keyframe found out of "+v+" video samples"),f=!1)),this.ISGenerated&&(A&&E&&(v=this.getVideoStartPts(t.samples),v=(kr(e.samples[0].pts,v)-v)/t.inputTimeScale,m+=Math.max(0,v),g+=Math.max(0,-v)),A?(e.samplerate||(ne.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,r,a)),u=this.remuxAudio(e,m,this.isAudioContiguous,a,y||E||o===Ut?g:void 0),E&&(v=u?u.endPTS-u.startPTS:0,t.inputTimeScale||(ne.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,r,a)),l=this.remuxVideo(t,g,_,v))):E&&(l=this.remuxVideo(t,g,_,0)),l)&&(l.firstKeyFrame=s,l.independent=-1!==s,l.firstKeyFramePTS=p)),{audio:u,video:l,initSegment:h,independent:f,text:d=this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(c=Cr(i,r,this._initPTS,this._initDTS)),n.samples.length)?Rr(n,r,this._initPTS):d,id3:c}},u.generateIS=function(e,t,i,n){var r,a,s,o=e.samples,l=t.samples,u=this.typeSupported,h={},d=this._initPTS,n=!d||n,c="audio/mp4";if(n&&(s=a=1/0),e.config&&o.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(c="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}h.audio={id:"audio",container:c,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&u.mpeg?new Uint8Array(0):re.initSegment([e]),metadata:{channelCount:e.channelCount,samplerate:e.samplerate,segmentCodec:e.segmentCodec}},n&&(r=e.inputTimeScale,d&&r===d.timescale?n=!1:s=a=o[0].pts-Math.round(r*i))}if(t.sps&&t.pps&&l.length&&(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:re.initSegment([t]),metadata:{width:t.width,height:t.height}},n)&&(r=t.inputTimeScale,d&&r===d.timescale?n=!1:(o=this.getVideoStartPts(l),t=Math.round(r*i),a=Math.min(a,kr(l[0].dts,o)-t),s=Math.min(s,o-t))),Object.keys(h).length)return this.ISGenerated=!0,n?(this._initPTS={baseTime:s,timescale:r},this._initDTS={baseTime:a,timescale:r}):s=r=void 0,{tracks:h,initPTS:s,timescale:r}},u.remuxVideo=function(e,t,i,n){var r=e.inputTimeScale,a=e.samples,s=[],o=a.length,l=this._initPTS,u=this.nextAvcDts,h=8,d=this.videoSampleDuration,c=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,p=!1;i&&null!==u||(u=t*r-(a[0].pts-kr(a[0].dts,a[0].pts)));for(var m=l.baseTime*r/l.timescale,g=0;g<o;g++){var _=a[g];_.pts=kr(_.pts-m,u),_.dts=kr(_.dts-m,u),_.dts<a[0<g?g-1:g].dts&&(p=!0)}p&&a.sort(function(e,t){var i=e.dts-t.dts,e=e.pts-t.pts;return i||e}),t=a[0].dts;var l=a[a.length-1].dts-t,y=l?Math.round(l/(o-1)):d||e.inputTimeScale/30;i&&(i=(l=t-u)<-1,(T=y<l)||i)&&(T?ne.warn("AVC: "+wr(l,!0)+" ms ("+l+"dts) hole between fragments detected, filling it"):ne.warn("AVC: "+wr(-l,!0)+" ms ("+l+"dts) overlapping between fragments detected"),!i||u>=a[0].pts)&&(t=u,T=a[0].pts-l,a[0].dts=t,a[0].pts=T,ne.log("Video: First PTS/DTS adjusted: "+wr(T,!0)+"/"+wr(t,!0)+", delta: "+wr(l,!0)+" ms"));for(var v=0,F=0,O=t=Math.max(0,t),A=0;A<o;A++){for(var E=a[A],U=E.units,N=U.length,b=0,w=0;w<N;w++)b+=U[w].data.length;F+=b,v+=N,E.length=b,E.dts=E.dts<O?O++:E.dts,c=Math.min(E.pts,c),f=Math.max(E.pts,f)}var S,i=a[o-1].dts,T=F+4*v+8;try{S=new Uint8Array(T)}catch(e){return void this.observer.emit(ee.ERROR,ee.ERROR,{type:te.MUX_ERROR,details:ie.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:T,reason:"fail allocating video mdat "+T})}var j=new DataView(S.buffer);j.setUint32(0,T),S.set(re.types.mdat,4);for(var G=!1,V=Number.POSITIVE_INFINITY,H=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,Y=Number.NEGATIVE_INFINITY,k=0;k<o;k++){for(var C=a[k],z=C.units,W=0,R=0,Q=z.length;R<Q;R++){var I=z[R],K=I.data,I=I.data.byteLength;j.setUint32(h,I),h+=4,S.set(K,h),h+=I,W+=4+I}var P,x=void 0,D=(k<o-1?(d=a[k+1].dts-C.dts,x=a[k+1].pts-C.pts):(D=this.config,P=0<k?C.dts-a[k-1].dts:y,x=0<k?C.pts-a[k-1].pts:y,D.stretchShortVideoTrack&&null!==this.nextAudioPts&&Math.floor(D.maxBufferHole*r)<(D=(n?c+n*r:this.nextAudioPts)-C.pts)?((d=D-P)<0?d=P:G=!0,ne.log("[mp4-remuxer]: It is approximately "+D/90+" ms to the next segment; using duration "+d/90+" ms for the last video frame.")):d=P),Math.round(C.pts-C.dts)),V=Math.min(V,d),L=Math.max(L,d),H=Math.min(H,x),Y=Math.max(Y,x);s.push(new Pr(C.key,d,W,D))}if(s.length)if(Sr)Sr<70&&((l=s[0].flags).dependsOn=2,l.isNonSync=0);else if(Tr&&Y-H<L-V&&y/L<.025&&0===s[0].cts){ne.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var M=t,B=0,J=s.length;B<J;B++){var q,X=M+s[B].duration,Z=M+s[B].cts;B<J-1?(q=X+s[B+1].cts,s[B].duration=q-Z):s[B].duration=B?s[B-1].duration:y,s[B].cts=0,M=X}}
10this.nextAvcDts=u=i+(d=G||!d?y:d),this.videoSampleDuration=d,this.isVideoContiguous=!0;T={data1:re.moof(e.sequenceNumber++,t,$({},e,{samples:s})),data2:S,startPTS:c/r,endPTS:(f+d)/r,startDTS:t/r,endDTS:u/r,type:"video",hasAudio:!1,hasVideo:!0,nb:s.length,dropped:e.dropped};return e.samples=[],e.dropped=0,T},u.getSamplesPerFrame=function(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}},u.remuxAudio=function(e,t,i,n,r){var a=e.inputTimeScale,s=a/(e.samplerate||a),o=this.getSamplesPerFrame(e),l=o*s,u=this._initPTS,h="mp3"===e.segmentCodec&&this.typeSupported.mpeg,d=[],c=void 0!==r,f=e.samples,p=h?0:8,m=this.nextAudioPts||-1,g=t*a,_=u.baseTime*a/u.timescale;if(this.isAudioContiguous=i=i||f.length&&0<m&&(n&&Math.abs(g-m)<9e3||Math.abs(kr(f[0].pts-_,g)-m)<20*l),f.forEach(function(e){e.pts=kr(e.pts-_,g)}),!i||m<0){if(!(f=f.filter(function(e){return 0<=e.pts})).length)return;m=0===r?0:n&&!c?Math.max(0,g):f[0].pts}if("aac"===e.segmentCodec)for(var y=this.config.maxAudioFramesDrift,v=0,A=m;v<f.length;v++){var E=f[v],b=E.pts,w=b-A,S=Math.abs(1e3*w/a);if(w<=-y*l&&c)0===v&&(ne.warn("Audio frame @ "+(b/a).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*w/a)+" ms."),this.nextAudioPts=m=A=b);else if(y*l<=w&&S<1e4&&c){var T=Math.round(w/l);(A=b-T*l)<0&&(T--,A+=l),0===v&&(this.nextAudioPts=m=A),ne.warn("[mp4-remuxer]: Injecting "+T+" audio frame @ "+(A/a).toFixed(3)+"s due to "+Math.round(1e3*w/a)+" ms gap.");for(var L=0;L<T;L++)gr.getSilentFrame(e.manifestCodec||e.codec,e.channelCount)||(ne.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),E.unit.subarray()),A+=l,v++}E.pts=A,A+=l}for(var k,C=null,R=null,I=0,P=f.length;P--;)I+=f[P].unit.byteLength;for(var x=0,D=f.length;x<D;x++){var M=f[x],B=M.unit,M=M.pts;if(null!==R)d[x-1].duration=Math.round((M-R)/s);else{if(C=M=i&&"aac"===e.segmentCodec?m:M,!(0<I))return;I+=p;try{k=new Uint8Array(I)}catch(e){return void this.observer.emit(ee.ERROR,ee.ERROR,{type:te.MUX_ERROR,details:ie.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:I,reason:"fail allocating audio mdat "+I})}h||(new DataView(k.buffer).setUint32(0,I),k.set(re.types.mdat,4))}k.set(B,p);B=B.byteLength;p+=B,d.push(new Pr(!0,o,B,0)),R=M}t=d.length;if(t)return this.nextAudioPts=m=R+s*d[d.length-1].duration,n={data1:h?new Uint8Array(0):re.moof(e.sequenceNumber++,C/s,$({},e,{samples:d})),data2:k,startPTS:u=C/a,endPTS:r=m/a,startDTS:u,endDTS:r,type:"audio",hasAudio:!0,hasVideo:!(e.samples=[]),nb:t},this.isAudioContiguous=!0,n},u.remuxEmptyAudio=function(e,t,i,n){var r=e.inputTimeScale,a=r/(e.samplerate||r),s=this.nextAudioPts,o=this._initDTS,o=9e4*o.baseTime/o.timescale,l=(null!==s?s:n.startDTS*r)+o,s=n.endDTS*r+o,u=1024*a,h=Math.ceil((s-l)/u),d=gr.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(ne.warn("[mp4-remuxer]: remux empty Audio"),d){for(var c=[],f=0;f<h;f++){var p=l+f*u;c.push({unit:d,pts:p,dts:p})}return e.samples=c,this.remuxAudio(e,t,i,!1)}ne.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},Lr);function Lr(e,t,i,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,null===Sr&&(e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i),Sr=e?parseInt(e[1]):0),null===Tr&&(t=navigator.userAgent.match(/Safari\/(\d+)/i),Tr=t?parseInt(t[1]):0)}function kr(e,t){var i;if(null!==t)for(i=t<e?-8589934592:8589934592;4294967296<Math.abs(e-t);)e+=i;return e}function Cr(e,t,i,n){var r=e.samples.length;if(r){for(var a=e.inputTimeScale,s=0;s<r;s++){var o=e.samples[s];o.pts=kr(o.pts-i.baseTime*a/i.timescale,t*a)/a,o.dts=kr(o.dts-n.baseTime*a/n.timescale,t*a)/a}var l=e.samples;return e.samples=[],{samples:l}}}function Rr(e,t,i){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,a=0;a<n;a++){var s=e.samples[a];s.pts=kr(s.pts-i.baseTime*r/i.timescale,t*r)/r}e.samples.sort(function(e,t){return e.pts-t.pts});var o=e.samples;return e.samples=[],{samples:o}}}var Ir,Pr=function(e,t,i,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=n,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}},h=((h=xr.prototype).destroy=function(){},h.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},h.resetNextTimestamp=function(){this.lastEndTime=null},h.resetInitSegment=function(e,t,i,n){var r;this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(((t=e)&&n&&(r=n.keyId)&&n.isCommonEncryption&&k(t,["moov","trak"]).forEac
10h(function(e){var e=k(e,["mdia","minf","stbl","stsd"])[0].subarray(8),t=k(e,["enca"]),i=0<t.length;(t=i?t:k(e,["encv"])).forEach(function(e){k(i?e.subarray(28):e.subarray(78),["sinf"]).forEach(function(e){var t,e=et(e);e&&!(t=e.subarray(8,24)).some(function(e){return 0!==e})&&(ne.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+Ye(t)+" -> "+Ye(r)),e.set(r,8))})})}),t)),this.emitInitSegment=!0},h.generateInitSegment=function(e){var t,i,n=this.audioCodec,r=this.videoCodec;null!=e&&e.byteLength?((t=this.initData=Xe(e)).audio&&(n=Dr(t.audio,A)),t.video&&(r=Dr(t.video,he)),i={},t.audio&&t.video?i.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:e,id:"main"}:t.audio?i.audio={container:"audio/mp4",codec:n,initSegment:e,id:"audio"}:t.video?i.video={container:"video/mp4",codec:r,initSegment:e,id:"main"}:ne.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i):(this.initTracks=void 0,this.initData=void 0)},h.remux=function(e,t,i,n,r,a){var s,o,l,u,h,d,c,f,p,m,g,_=this.initPTS,y=this.lastEndTime,v={audio:void 0,video:void 0,text:n,id3:i,initSegment:void 0},t=(G(y)||(y=this.lastEndTime=r||0),t.samples);return null!=t&&t.length&&(s={initPTS:void 0,timescale:1},null!=(o=this.initData)&&o.length||(this.generateInitSegment(t),o=this.initData),null!=o&&o.length?(this.emitInitSegment&&(s.tracks=this.initTracks,this.emitInitSegment=!1),l=function(e,t){for(var i=0,n=0,r=0,a=k(e,["moof","traf"]),s=0;s<a.length;s++){var o=a[s],l=k(o,["tfhd"])[0],u=t[L(l,4)];if(u){var h=u.default,d=L(l,0)|(null==h?void 0:h.flags),c=null==h?void 0:h.duration;8&d&&(c=L(l,2&d?12:8));for(var f=u.timescale||9e4,p=k(o,["trun"]),m=0;m<p.length;m++)!(i=function(e){var t=L(e,0),i=8;1&t&&(i+=4),4&t&&(i+=4);for(var n=0,r=L(e,4),a=0;a<r;a++)256&t&&(n+=L(e,i),i+=4),512&t&&(i+=4),1024&t&&(i+=4),2048&t&&(i+=4);return n}(p[m]))&&c&&(i=c*L(p[m],4)),u.type===he?n+=i/f:u.type===A&&(r+=i/f)}}if(0!==n||0!==r)return n||r;for(var g=0,_=k(e,["sidx"]),y=0;y<_.length;y++){var v=function(e){var t=[],i=e[0],n=8,r=L(e,n),a=e.length+0,s=Ke(e,n=(n+=4)+(0===i?8:16)+2);n+=2;for(var o=0;o<s;o++){var l=n,u=L(e,l),h=(l+=4,2147483647&u);if(1==(2147483648&u)>>>31)return ne.warn("SIDX has hierarchical references (not supported)"),null;u=L(e,l);l+=4,t.push({referenceSize:h,subsegmentDuration:u,info:{duration:u/r,start:a,end:a+h-1}}),a+=h,n=l+=4}return{earliestPresentationTime:0,timescale:r,version:i,referencesCount:s,references:t}}(_[y]);null!=v&&v.references&&(g+=v.references.reduce(function(e,t){return e+t.info.duration||0},0))}return g}(t,o),h=o,u=k(t,["moof","traf"]).reduce(function(e,t){var n=k(t,["tfdt"])[0],r=n[0],t=k(t,["tfhd"]).reduce(function(e,t){t=L(t,4),t=h[t];if(t){var i=L(n,4);if(1===r){if(i===ze)return ne.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),e;i=i*(1+ze)+L(n,8)}i=i/(t.timescale||9e4);if(isFinite(i)&&(null===e||i<e))return i}return e},null);return null!==t&&isFinite(t)&&(null===e||t<e)?t:e},null),c=u=null===u?r:u,g=r,(null===(d=_)||(m=Math.max(l,1),c=c-d.baseTime/d.timescale,Math.abs(c-g)>m)||s.timescale!==_.timescale&&a)&&(s.initPTS=u-r,_&&1===_.timescale&&ne.warn("Adjusting initPTS by "+(s.initPTS-_.baseTime)),this.initPTS=_={baseTime:s.initPTS,timescale:1}),c=(d=e?u-_.baseTime/_.timescale:y)+l,f=o,p=_.baseTime/_.timescale,k(t,["moof","traf"]).forEach(function(t){k(t,["tfhd"]).forEach(function(e){var n,e=L(e,4),e=f[e];e&&(n=e.timescale||9e4,k(t,["tfdt"]).forEach(function(e){var t=e[0],i=L(e,4);0===t?(i-=p*n,qe(e,4,i=Math.max(i,0))):(i=(i=(i*=Math.pow(2,32))+L(e,8))-p*n,i=Math.max(i,0),t=Math.floor(i/(1+ze)),i=Math.floor(i%(1+ze)),qe(e,4,t),qe(e,8,i))}))})}),0<l?this.lastEndTime=c:(ne.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp()),g="",(m=!!o.audio)&&(g+="audio"),(a=!!o.video)&&(g+="video"),v.audio="audio"===(e={data1:t,startPTS:d,startDTS:d,endPTS:c,endDTS:c,type:g,hasAudio:m,hasVideo:a,nb:1,dropped:0}).type?e:void 0,v.video="audio"!==e.type?e:void 0,v.initSegment=s,v.id3=Cr(i,r,_,_),n.samples.length&&(v.text=Rr(n,r,_))):ne.warn("[passthrough-remuxer.ts]: Failed to generate initSegment.")),v},xr);function xr(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}function Dr(e,t){e=null==e?void 0:e.codec;return e&&4<e.length?e:t===A?"ec-3"===e||"ac-3"===e||"alac"===e?e:"fLaC"===e||"Opus"===e?At(e):(ne.warn('Unhandled audio codec "'+e+'" or audio object type'),"mp4a.40.5"):(ne.warn('Unhandled video codec "'+e+'"'),"hvc1"===e||"hev1"===e?"hvc1.1.6.L120.90":"av01"===e?"av01.0.04M.08":"avc1.42e01e")}try{Ir=self.performance.now.bind(self.performance)}catch(e){ne.debug("Unable to use Performance API on this environment"),Ir="undefined"!=typeof self&&self.Date.now}var Mr=[{demux:o,remux:h},{demux:l,remux:u},{demux:s,remux:u},{demux:a,remux:u}],Br=(Mr.splice(2,0,{demux:Jn,remux:u}),(o=Or.prototype).configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},o.push=function(e,t,i,n){var r=this,a=i.transmuxing,e=(a.executeStart=Ir(),new Uint8Array(e)),s=this.currentTransmuxState,o=this.transmuxConfig,n=(n&&(this.currentTransmuxState=n),n||s),s=n.contiguous,l=n.discontinuity,u=n.trackSwitch,h=n.accurateTimeOff
10set,d=n.timeOffset,n=n.initSegmentChange,c=o.audioCodec,f=o.videoCodec,p=o.defaultInitPts,m=o.duration,o=o.initSegmentData,g=(g=null,g=0<e.byteLength&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method?t:g);if(g&&"AES-128"===g.method){var _=this.getDecrypter();if(!_.isSync())return this.decryptionPromise=_.webCryptoDecrypt(e,g.key.buffer,g.iv.buffer).then(function(e){e=r.push(e,null,i);return r.decryptionPromise=null,e}),this.decryptionPromise;var y=_.softwareDecrypt(e,g.key.buffer,g.iv.buffer);if(!(y=-1<i.part?_.flush():y))return a.executeEnd=Ir(),Fr(i);e=new Uint8Array(y)}_=this.needsProbing(l,u);if(_){y=this.configureTransmuxer(e);if(y)return ne.warn("[transmuxer] "+y.message),this.observer.emit(ee.ERROR,ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,fatal:!1,error:y,reason:y.message}),a.executeEnd=Ir(),Fr(i)}(l||u||n||_)&&this.resetInitSegment(o,c,f,m,t),(l||n||_)&&this.resetInitialTimestamp(p),s||this.resetContiguity();y=this.transmux(e,g,d,h,i),u=this.currentTransmuxState;return u.contiguous=!0,u.discontinuity=!1,u.trackSwitch=!1,a.executeEnd=Ir(),y},o.flush=function(t){var i,n=this,e=t.transmuxing,r=(e.executeStart=Ir(),this.decrypter),a=this.currentTransmuxState,s=this.decryptionPromise;return s?s.then(function(){return n.flush(t)}):(i=[],s=a.timeOffset,r&&(a=r.flush())&&i.push(this.push(a,null,t)),r=this.demuxer,a=this.remuxer,r&&a?Ur(a=r.flush(s))?a.then(function(e){return n.flushRemux(i,e,t),i}):(this.flushRemux(i,a,t),i):(e.executeEnd=Ir(),[Fr(t)]))},o.flushRemux=function(e,t,i){var n=t.audioTrack,r=t.videoTrack,a=t.id3Track,t=t.textTrack,s=this.currentTransmuxState,o=s.accurateTimeOffset,s=s.timeOffset,n=(ne.log("[transmuxer.ts]: Flushed fragment "+i.sn+(-1<i.part?" p: "+i.part:"")+" of level "+i.level),this.remuxer.remux(n,r,a,t,s,o,!0,this.id));e.push({remuxResult:n,chunkMeta:i}),i.transmuxing.executeEnd=Ir()},o.resetInitialTimestamp=function(e){var t=this.demuxer,i=this.remuxer;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))},o.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},o.resetInitSegment=function(e,t,i,n,r){var a=this.demuxer,s=this.remuxer;a&&s&&(a.resetInitSegment(e,t,i,n),s.resetInitSegment(e,t,i,r))},o.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},o.transmux=function(e,t,i,n,r){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,n,r):this.transmuxUnencrypted(e,i,n,r)},o.transmuxUnencrypted=function(e,t,i,n){var e=this.demuxer.demux(e,t,!1,!this.config.progressive),r=e.audioTrack,a=e.videoTrack,s=e.id3Track,e=e.textTrack;return{remuxResult:this.remuxer.remux(r,a,s,e,t,i,!1,this.id),chunkMeta:n}},o.transmuxSampleAes=function(e,t,i,n,r){var a=this;return this.demuxer.demuxSampleAes(e,t,i).then(function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,n,!1,a.id),chunkMeta:r}})},o.configureTransmuxer=function(e){for(var t,i,n=this.config,r=this.observer,a=this.typeSupported,s=this.vendor,o=0,l=Mr.length;o<l;o++)if(null!=(i=Mr[o].demux)&&i.probe(e)){t=Mr[o];break}if(!t)return new Error("Failed to find demuxer by probing fragment data");var u=this.demuxer,h=this.remuxer,d=t.remux,c=t.demux;h&&h instanceof d||(this.remuxer=new d(r,n,a,s)),u&&u instanceof c||(this.demuxer=new c(r,n,a),this.probe=c.probe)},o.needsProbing=function(e,t){return!this.demuxer||!this.remuxer||e||t},o.getDecrypter=function(){return this.decrypter||(this.decrypter=new rn(this.config))},Or),Fr=function(e){return{remuxResult:{},chunkMeta:e}};function Or(e,t,i,n,r){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=i,this.vendor=n,this.id=r}function Ur(e){return"then"in e&&e.then instanceof Function}function Nr(e,t,i,n,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=n,this.defaultInitPts=r||null}function jr(e,t,i,n,r,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOff
10set=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=n,this.timeOffset=r,this.initSegmentChange=a}var Gr,f,h={exports:{}};function Vr(){}function Hr(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function Yr(e,t,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new Hr(i,n||e,r),n=f?f+t:t;return e._events[n]?e._events[n].fn?e._events[n]=[e._events[n],i]:e._events[n].push(i):(e._events[n]=i,e._eventsCount++),e}function zr(e,t){0==--e._eventsCount?e._events=new Vr:delete e._events[t]}function Wr(){this._events=new Vr,this._eventsCount=0}l=h,Gr=Object.prototype.hasOwnProperty,f="~",Object.create&&(Vr.prototype=Object.create(null),(new Vr).__proto__||(f=!1)),Wr.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)Gr.call(e,t)&&i.push(f?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},Wr.prototype.listeners=function(e){var e=f?f+e:e,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var i=0,n=t.length,r=new Array(n);i<n;i++)r[i]=t[i].fn;return r},Wr.prototype.listenerCount=function(e){e=f?f+e:e,e=this._events[e];return e?e.fn?1:e.length:0},Wr.prototype.emit=function(e,t,i,n,r,a){var s=f?f+e:e;if(!this._events[s])return!1;var o,l=this._events[s],u=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,i),!0;case 4:return l.fn.call(l.context,t,i,n),!0;case 5:return l.fn.call(l.context,t,i,n,r),!0;case 6:return l.fn.call(l.context,t,i,n,r,a),!0}for(c=1,o=new Array(u-1);c<u;c++)o[c-1]=arguments[c];l.fn.apply(l.context,o)}else for(var h,d=l.length,c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),u){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,i);break;case 4:l[c].fn.call(l[c].context,t,i,n);break;default:if(!o)for(h=1,o=new Array(u-1);h<u;h++)o[h-1]=arguments[h];l[c].fn.apply(l[c].context,o)}return!0},Wr.prototype.on=function(e,t,i){return Yr(this,e,t,i,!1)},Wr.prototype.once=function(e,t,i){return Yr(this,e,t,i,!0)},Wr.prototype.removeListener=function(e,t,i,n){e=f?f+e:e;if(this._events[e])if(t){var r=this._events[e];if(r.fn)r.fn!==t||n&&!r.once||i&&r.context!==i||zr(this,e);else{for(var a=0,s=[],o=r.length;a<o;a++)(r[a].fn!==t||n&&!r[a].once||i&&r[a].context!==i)&&s.push(r[a]);s.length?this._events[e]=1===s.length?s[0]:s:zr(this,e)}}else zr(this,e);return this},Wr.prototype.removeAllListeners=function(e){return e?(e=f?f+e:e,this._events[e]&&zr(this,e)):(this._events=new Vr,this._eventsCount=0),this},Wr.prototype.off=Wr.prototype.removeListener,Wr.prototype.addListener=Wr.prototype.on,Wr.prefixed=f,l.exports=Wr.EventEmitter=Wr;var Qr=O(h.exports);function Kr(e,t){var i,n,r;return!!((i=t.remuxResult).audio||i.video||i.text||i.id3||i.initSegment)&&(i=[],n=(r=t.remuxResult).audio,r=r.video,n&&Jr(i,n),r&&Jr(i,r),e.postMessage({event:"transmuxComplete",data:t},i),!0)}function Jr(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function qr(i,e,t){e.reduce(function(e,t){return Kr(i,t)||e},!1)||i.postMessage({event:"transmuxComplete",data:e[0]}),i.postMessage({event:"flush",data:t})}{function Xr(){for(var e in ne)!function(t){ne[t]=function(e){ea("workerLog",{logType:t,message:e})}}(e)}var Zr,$r,ea;void 0!==Qo&&Qo&&(Zr=self,$r=new Qr,ea=function(e,t){Zr.postMessage({event:e,data:t})},$r.on(ee.FRAG_DECRYPTED,ea),$r.on(ee.ERROR,ea),Zr.addEventListener("message",function(e){var t=e.data;switch(t.cmd){case"init":var i=JSON.parse(t.config);Zr.transmuxer=new Br($r,t.typeSupported,i,t.vendor,t.id),q(i.debug,t.id),Xr(),ea("init",null);break;case"configure":Zr.transmuxer.configure(t.config);break;case"demux":i=Zr.transmuxer.push(t.data,t.decryptdata,t.chunkMeta,t.state);Ur(i)?(Zr.transmuxer.async=!0,i.then(function(e){Kr(Zr,e)}).catch(function(e){ea(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,chunkMeta:t.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"})})):(Zr.transmuxer.async=!1,Kr(Zr,i));break;case"flush":var n=t.chunkMeta,i=Zr.transmuxer.flush(n);Ur(i)||Zr.transmuxer.async?(i=Ur(i)?i:Promise.resolve(i)).then(function(e){qr(Zr,e,n)}).catch(function(e){ea(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,chunkMeta:t.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"})}):qr(Zr,i,n)}}))}
10var ta,ia,na=ft()||{isTypeSupported:function(){return!1}},ra=((s=oa.prototype).resetWorker=function(){var e,t;this.workerContext&&(e=(t=this.workerContext).worker,(t=t.objectURL)&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null)},s.destroy=function(){this.workerContext?(this.resetWorker(),this.onwmsg=void 0):(e=this.transmuxer)&&(e.destroy(),this.transmuxer=null);var e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},s.push=function(e,t,i,n,r,a,s,o,l,u){var h=this,d=(l.transmuxing.start=self.performance.now(),this.transmuxer),c=(a||r).start,f=r.decryptdata,p=this.frag,m=!(p&&r.cc===p.cc),g=!(p&&l.level===p.level),_=p?l.sn-p.sn:-1,y=this.part?l.part-this.part.index:-1,v=0==_&&1<l.id&&l.id===(null==p?void 0:p.stats.chunkCount),v=!g&&(1==_||0==_&&(1==y||v&&y<=0)),A=self.performance.now(),A=((g||_||0===r.stats.parsing.start)&&(r.stats.parsing.start=A),!a||!y&&v||(a.stats.parsing.start=A),!(p&&(null==(_=r.initSegment)?void 0:_.url)===(null==(y=p.initSegment)?void 0:y.url))),_=new jr(m,v,o,g,c,A);v&&!m&&!A||(ne.log("[transmuxer-interface, "+r.type+"]: Starting new transmux session for sn: "+l.sn+" p: "+l.part+" level: "+l.level+" id: "+l.id+"\n discontinuity: "+m+"\n trackSwitch: "+g+"\n contiguous: "+v+"\n accurateTimeOffset: "+o+"\n timeOffset: "+c+"\n initSegmentChange: "+A),p=new Nr(i,n,t,s,u),this.configureTransmuxer(p)),this.frag=r,this.part=a,this.workerContext?this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:_},e instanceof ArrayBuffer?[e]:[]):d&&(Ur(y=d.push(e,f,l,_))?(d.async=!0,y.then(function(e){h.handleTransmuxComplete(e)}).catch(function(e){h.transmuxerError(e,l,"transmuxer-interface push error")})):(d.async=!1,this.handleTransmuxComplete(y)))},s.flush=function(t){var e,i=this,n=(t.transmuxing.start=self.performance.now(),this.transmuxer);this.workerContext?this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:t}):n&&(Ur(e=n.flush(t))||n.async?(e=Ur(e)?e:Promise.resolve(e)).then(function(e){i.handleFlushResult(e,t)}).catch(function(e){i.transmuxerError(e,t,"transmuxer-interface flush error")}):this.handleFlushResult(e,t))},s.transmuxerError=function(e,t,i){this.hls&&(this.error=e,this.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))},s.handleFlushResult=function(e,t){var i=this;e.forEach(function(e){i.handleTransmuxComplete(e)}),this.onFlush(t)},s.onWorkerMessage=function(e){var t=e.data,i=this.hls;switch(t.event){case"init":var n=null==(n=this.workerContext)?void 0:n.objectURL;n&&self.URL.revokeObjectURL(n);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":ne[t.data.logType]&&ne[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data)}},s.configureTransmuxer=function(e){var t=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)},s.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},oa),Jn=(e(sa,ia=Li),(a=sa.prototype).onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null},a._registerListeners=function(){var e=this.hls;e.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ee.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(ee.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(ee.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(ee.ERROR,this.onError,this),e.on(ee.BUFFER_RESET,this.onBufferReset,this),e.on(ee.BUFFER_CREATED,this.onBufferCreated,this),e.on(ee.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(ee.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(ee.FRAG_BUFFERED,this.onFragBuffered,this)},a._unregisterListeners=function(){var e=this.hls;
10e.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ee.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(ee.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(ee.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(ee.ERROR,this.onError,this),e.off(ee.BUFFER_RESET,this.onBufferReset,this),e.off(ee.BUFFER_CREATED,this.onBufferCreated,this),e.off(ee.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(ee.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(ee.FRAG_BUFFERED,this.onFragBuffered,this)},a.onInitPtsFound=function(e,t){var i=t.frag,n=t.id,r=t.initPTS,t=t.timescale;"main"===n&&(n=i.cc,this.initPTS[i.cc]={baseTime:r,timescale:t},this.log("InitPTS for cc: "+n+" found from main: "+r),this.videoTrackCC=n,this.state===pn)&&this.tick()},a.startLoad=function(e){var t;this.levels?(t=this.lastCurrentTime,this.stopLoad(),this.setInterval(100),0<t&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=d):(this.loadedmetadata=!1,this.state=un),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()):(this.startPosition=e,this.state=an)},a.doTick=function(){switch(this.state){case d:this.doTickIdle();break;case un:var e=this.levels,t=this.trackId,t=null==e||null==(e=e[t])?void 0:e.details;if(t){if(this.waitForCdnTuneIn(t))break;this.state=pn}break;case ln:e=performance.now(),t=this.retryDate;(!t||t<=e||null!=(t=this.media)&&t.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=d);break;case pn:var i,n,e=this.waitingData;e?(t=e.frag,i=e.part,n=e.cache,e=e.complete,void 0!==this.initPTS[t.cc]?(this.waitingData=null,this.waitingVideoCC=-1,this.state=on,i={frag:t,part:i,payload:n.flush(),networkDetails:null},this._handleFragmentLoadProgress(i),e&&ia.prototype._handleFragmentLoadComplete.call(this,i)):this.videoTrackCC!==this.waitingVideoCC?(this.log("Waiting fragment cc ("+t.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment()):(n=this.getLoadPosition(),wi((e=y.bufferInfo(this.mediaBuffer,n,this.config.maxBufferHole)).end,this.config.maxFragLookUpTolerance,t)<0&&(this.log("Waiting fragment cc ("+t.cc+") @ "+t.start+" cancelled because another fragment at "+e.end+" is needed"),this.clearWaitingFragment()))):this.state=d}this.onTickEnd()},a.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=d)},a.resetLoadingState=function(){this.clearWaitingFragment(),ia.prototype.resetLoadingState.call(this)},a.onTickEnd=function(){var e=this.media;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},a.doTickIdle=function(){var e=this.hls,t=this.levels,i=this.media,n=this.trackId,r=e.config;if(null!=t&&t[n]&&(i||!this.startFragRequested&&r.startFragPrefetch)){r=t[n],t=r.details;if(!t||t.live&&this.levelLastLoaded!==n||this.waitForCdnTuneIn(t))this.state=un;else{n=this.mediaBuffer||this.media,n=(this.bufferFlushed&&n&&(this.bufferFlushed=!1,this.afterBufferFlushed(n,A,Ut)),this.getFwdBufferInfo(n,Ut));if(null!==n){var a=this.bufferedTrack,s=this.switchingTrack;if(!s&&this._streamEnded(n,t))e.trigger(ee.BUFFER_EOS,{type:"audio"}),this.state=cn;else{var e=this.getFwdBufferInfo(this.videoBuffer||this.media,_),o=n.len,l=this.getMaxBufferLength(null==e?void 0:e.len),u=t.fragments,h=u[0].start,d=n.end;if(s&&i&&(c=this.getLoadPosition(),a&&s.attrs!==a.attrs&&(d=c),t.PTSKnown)&&c<h&&(n.end>h||n.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=h+.05),!(l<=o&&!s&&d<u[u.length-1].start)){var a=this.getNextFragment(d,t),c=!1;if(a&&this.isLoopLoading(a,d)&&(c=!!a.gap,a=this.getNextFragmentLoopLoading(a,t,n,_,l)),a){i=e&&a.start>e.end+t.targetduration;if(i||(null==e||!e.len)&&n.len){h=this.getAppendedFrag(a.start,_);if(null===h)return;if(c=c||!!h.gap||!!i&&0===e.len,i&&!c||c&&n.nextStart&&n.nextStart<h.end)return}this.loadFragment(a,r,d)}else this.bufferFlushed=!0}}}}}},a.getMaxBufferLength=function(e){var t=ia.prototype.getMaxBufferLength.call(this);
10return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t},a.onMediaDetaching=function(){this.videoBuffer=null,ia.prototype.onMediaDetaching.call(this)},a.onAudioTracksUpdated=function(e,t){t=t.audioTracks;this.resetTransmuxer(),this.levels=t.map(function(e){return new ni(e)})},a.onAudioTrackSwitching=function(e,t){var i=!!t.url,n=(this.trackId=t.id,this.fragCurrent);n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=d,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=an),this.tick()},a.onManifestLoading=function(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1},a.onLevelLoaded=function(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(ee.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},a.onAudioTrackLoaded=function(e,t){if(null!=this.mainDetails){var i=this.levels,n=t.details,r=t.id;if(i){this.log("Track "+r+" loaded ["+n.startSN+","+n.endSN+"]"+(n.lastPartSn?"[part-"+n.lastPartSn+"-"+n.lastPartIndex+"]":"")+",duration:"+n.totalduration);var i=i[r],a=0;if(n.live||null!=(s=i.details)&&s.live){var s=this.mainDetails;if(n.fragments[0]||(n.deltaUpdateFailed=!0),n.deltaUpdateFailed||!s)return;a=!i.details&&n.hasProgramDateTime&&s.hasProgramDateTime?(zi(n,s),n.fragments[0].start):this.alignPlaylists(n,i.details)}i.details=n,this.levelLastLoaded=r,this.startFragRequested||!this.mainDetails&&n.live||this.setStartPosition(i.details,a),this.state!==un||this.waitForCdnTuneIn(n)||(this.state=d),this.tick()}else this.warn("Audio tracks were reset while loading level "+r)}else this.cachedTrackLoadedData=t},a._handleFragmentLoadProgress=function(e){var t,i,n,r,a=e.frag,s=e.part,e=e.payload,o=this.config,l=this.trackId,u=this.levels;u?(u=u[l])?(t=u.details)?(o=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",u=(u=this.transmuxer)||(this.transmuxer=new ra(this.hls,Ut,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this))),i=this.initPTS[a.cc],n=null==(n=a.initSegment)?void 0:n.data,void 0!==i?(r=s?s.index:-1,r=new Ni(a.level,a.sn,a.stats.chunkCount,e.byteLength,r,-1!==r),u.push(e,n,o,"",a,s,t.totalduration,!1,r,i)):(this.log("Unknown video PTS for cc "+a.cc+", waiting for video PTS before demuxing audio frag "+a.sn+" of ["+t.startSN+" ,"+t.endSN+"],track "+l),(this.waitingData=this.waitingData||{frag:a,part:s,cache:new gn,complete:!1}).cache.push(new Uint8Array(e)),this.waitingVideoCC=this.videoTrackCC,this.state=pn)):(this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(a.start)):this.warn("Audio track is undefined on fragment load progress"):this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+a.sn+" of level "+a.level+" will not be buffered")},a._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:ia.prototype._handleFragmentLoadComplete.call(this,e)},a.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},a.onBufferCreated=function(e,t){var i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)},a.onFragBuffered=function(e,t){var i,n=t.frag,t=t.part;n.type===Ut?this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(t?" p: "+t.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+(this.switchingTrack?this.switchingTrack.name:"false")):("initSegment"!==n.sn&&(this.fragPrevious=n,i=this.switchingTrack)&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(ee.AUDIO_TRACK_SWITCHED,m({},i))),this.fragBufferedComplete(n,t)):this.loadedmetadata||n.type!==_||(i=this.videoBuffer||this.media)&&y.getBuffered(i).length&&(this.loadedmetadata=!0)},a.onError=function(e,t){var i;if(t.fatal)this.state=fn;else switch(t.details){case ie.FRAG_GAP:case ie.FRAG_PARSING_ERROR:case ie.FRAG_DECRYPT_ERROR:case ie.FRAG_LOAD_ERROR:case ie.FRAG_LOAD_TIMEOUT:case ie.KEY_LOAD_ERROR:case ie.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ut,t);break;case ie.AUDIO_TRACK_LOAD_ERROR:case ie.AUDIO_TRACK_LOAD_TIMEOUT:case ie.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==un||(null==(i=t.context)?void 0:i.type)!==Ft||(this.state=d);break;case ie.BUFFER_APPEND_ERROR:case ie.BUFFER_FULL_ERROR:t.parent&&"audio"===t.parent&&(t.details===ie.BUFFER_APPEND_ERROR?this.resetLoadingState():this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,ia.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")));break;case ie.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}},a.onBufferFlushed=function(e,t){var i,t=t.type;t===A&&(this.bufferFlushed=!0,this.state===cn&&(this.state=d),i=this.mediaBuffer||this.media)&&(this.afterBufferFlushed(i,t,Ut),this.tick())},a._handleTransmuxComplete=function(e){var t,i,n,r,a,s,o,l,u=this.hls,h=e.remuxResult,e=e.chunkMeta,d=this.getCurrentContext(e);d?(t=d.frag,i=d.part,n=(d=d.level).details,r=h.audio,a=h.text,s=h.id3,h=h.initSegment,!this.fragContextChanged(t)&&n?(this.state=hn,this.switchingTrack&&r&&this.completeAudioSwitch(this.switchingTrack),null!=h&&h.tracks&&(l=t.initSegment||t,this._bufferInitSegment(d,h.tracks,l,e),u.trigger(ee.FRAG_PARSING_INIT_SEGMENT,{frag:l,id:"audio",tracks:h.tracks}
10)),r&&(d=r.startPTS,l=r.endPTS,h=r.startDTS,o=r.endDTS,i&&(i.elementaryStreams[A]={startPTS:d,endPTS:l,startDTS:h,endDTS:o}),t.setElementaryStreamInfo(A,d,l,h,o),this.bufferFragmentData(r,t,i,e)),null!=s&&null!=(d=s.samples)&&d.length&&(l=$({id:"audio",frag:t,details:n},s),u.trigger(ee.FRAG_PARSING_METADATA,l)),a&&(h=$({id:"audio",frag:t,details:n},a),u.trigger(ee.FRAG_PARSING_USERDATA,h))):this.fragmentTracker.removeFragment(t)):this.resetWhenMissingContext(e)},a._bufferInitSegment=function(e,t,i,n){var r;this.state===hn&&(t.video&&delete t.video,r=t.audio)&&(r.id="audio",e=e.audioCodec,this.log("Init audio buffer, container:"+r.container+", codecs[level/parsed]=["+e+"/"+r.codec+"]"),e&&1===e.split(",").length&&(r.levelCodec=e),this.hls.trigger(ee.BUFFER_CODECS,t),null!=(e=r.initSegment)&&e.byteLength&&(t={type:"audio",frag:i,part:null,chunkMeta:n,parent:i.type,data:e},this.hls.trigger(ee.BUFFER_APPENDING,t)),this.tickImmediate())},a.loadFragment=function(e,t,i){var n=this.fragmentTracker.getState(e);this.fragCurrent=e,this.switchingTrack||n===ki||n===Ci?"initSegment"===e.sn?this._loadInitSegment(e,t):null!=(n=t.details)&&n.live&&!this.initPTS[e.cc]?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=pn,(n=this.mainDetails)&&n.fragments[0].start!==t.details.fragments[0].start&&zi(t.details,n)):(this.startFragRequested=!0,ia.prototype.loadFragment.call(this,e,t,i)):this.clearTrackerIfNeeded(e)},a.flushAudioIfNeeded=function(e){var t=this.media,i=this.bufferedTrack,i=null==i?void 0:i.attrs,e=e.attrs;t&&i&&(i.CHANNELS!==e.CHANNELS||i.NAME!==e.NAME||i.LANGUAGE!==e.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),ia.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)},a.completeAudioSwitch=function(e){var t=this.hls;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(ee.AUDIO_TRACK_SWITCHED,m({},e))},sa),o=(e(aa,ta=i),(u=aa.prototype).registerListeners=function(){var e=this.hls;e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ee.LEVEL_LOADING,this.onLevelLoading,this),e.on(ee.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(ee.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(ee.ERROR,this.onError,this)},u.unregisterListeners=function(){var e=this.hls;e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ee.LEVEL_LOADING,this.onLevelLoading,this),e.off(ee.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(ee.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(ee.ERROR,this.onError,this)},u.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,ta.prototype.destroy.call(this)},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0},u.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},u.onAudioTrackLoaded=function(e,t){var i,n=t.id,r=t.groupId,a=t.details,s=this.tracksInGroup[n];s&&s.groupId===r?(i=s.details,s.details=t.details,this.log("audio-track "+n+' "'+s.name+'" lang:'+s.lang+" group:"+r+" loaded ["+a.startSN+"-"+a.endSN+"]"),n===this.trackId&&this.playlistLoaded(n,t,i)):this.warn("Track with id:"+n+" and group:"+r+" not found in active group "+s.groupId)},u.onLevelLoading=function(e,t){this.switchLevel(t.level)},u.onLevelSwitching=function(e,t){this.switchLevel(t.level)},u.switchLevel=function(e){var t,i,e=this.hls.levels[e];null!=e&&e.audioGroupIds&&(t=e.audioGroupIds[e.urlId],this.groupId!==t?(this.groupId=t||null,e=this.tracks.filter(function(e){return!t||e.groupId===t}),this.selectDefaultTrack&&!e.some(function(e){return e.default})&&(this.selectDefaultTrack=!1),i={audioTracks:this.tracksInGroup=e},this.log("Updating audio tracks, "+e.length+" track(s) found in group:"+t),this.hls.trigger(ee.AUDIO_TRACKS_UPDATED,i),this.selectInitialTrack()):this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId))},u.onError=function(e,t){!t.fatal&&t.context&&t.context.type===Ft&&t.context.
10id===this.trackId&&t.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(t))},u.setAudioTrack=function(e){var t,i,n,r=this.tracksInGroup;e<0||e>=r.length?this.warn("Invalid id passed to audio-track controller"):(this.clearTimer(),t=this.currentTrack,r[this.trackId],i=(r=r[e]).groupId,n=r.name,this.log("Switching to audio-track "+e+' "'+n+'" lang:'+r.lang+" group:"+i),this.trackId=e,this.currentTrack=r,this.selectDefaultTrack=!1,this.hls.trigger(ee.AUDIO_TRACK_SWITCHING,m({},r)),r.details&&!r.details.live||(n=this.switchParams(r.url,null==t?void 0:t.details),this.loadPlaylist(n)))},u.selectInitialTrack=function(){var e=this.tracksInGroup,t=this.findTrackId(this.currentTrack);-1!==(t=-1===t?this.findTrackId(null):t)?this.setAudioTrack(t):(t=new Error("No track found for running audio group-ID: "+this.groupId+" track count: "+e.length),this.warn(t.message),this.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t}))},u.findTrackId=function(e){for(var t=this.tracksInGroup,i=0;i<t.length;i++){var n=t[i];if(!this.selectDefaultTrack||n.default){if(!e||void 0!==e.attrs["STABLE-RENDITION-ID"]&&e.attrs["STABLE-RENDITION-ID"]===n.attrs["STABLE-RENDITION-ID"])return n.id;if(e.name===n.name&&e.lang===n.lang)return n.id}}return-1},u.loadPlaylist=function(e){ta.prototype.loadPlaylist.call(this);var t=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(t)){var i=t.id,n=t.groupId,r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist "+i+' "'+t.name+'" lang:'+t.lang+" group:"+n),this.clearTimer(),this.hls.trigger(ee.AUDIO_TRACK_LOADING,{url:r,id:i,groupId:n,deliveryDirectives:e||null})}},r(aa,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}]),aa);function aa(e){return(e=ta.call(this,e,"[audio-track-controller]")||this).tracks=[],e.groupId=null,e.tracksInGroup=[],e.trackId=-1,e.currentTrack=null,e.selectDefaultTrack=!0,e.registerListeners(),e}function sa(e,t,i){return(e=ia.call(this,e,t,i,"[audio-stream-controller]",Ut)||this).videoBuffer=null,e.videoTrackCC=-1,e.waitingVideoCC=-1,e.bufferedTrack=null,e.switchingTrack=null,e.trackId=-1,e.waitingData=null,e.mainDetails=null,e.bufferFlushed=!1,e.cachedTrackLoadedData=null,e._registerListeners(),e}function oa(t,i,n,e){function r(e,t){(t=t||{}).frag=a.frag,t.id=a.id,e===ee.ERROR&&(a.error=t.error),a.hls.trigger(e,t)}var a=this,s=(this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,t.config);this.hls=t,this.id=i,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=n,this.onFlush=e;this.observer=new Qr,this.observer.on(ee.FRAG_DECRYPTED,r),this.observer.on(ee.ERROR,r);var o,l,u,h,t={mpeg:na.isTypeSupported("audio/mpeg"),mp3:na.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:na.isTypeSupported('audio/mp4; codecs="ac-3"')},n=navigator.vendor;if(!this.useWorker||"undefined"==typeof Worker||(s.workerPath,0))this.transmuxer=new Br(this.observer,t,s,n,i);else try{s.workerPath?(ne.log("loading Web Worker "+s.workerPath+' for "'+i+'"'),this.workerContext=(u=s.workerPath,h=new self.URL(u,self.location.href).href,{worker:new self.Worker(h),scriptURL:h})):(ne.log('injecting Web Worker for "'+i+'"'),this.workerContext=(o=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+Wo.toString()+")(true);"],{type:"text/javascript"}),l=self.URL.createObjectURL(o),{worker:new self.Worker(l),objectURL:l})),this.onwmsg=function(e){return a.onWorkerMessage(e)};var d=this.workerContext.worker;d.addEventListener("message",this.onwmsg),d.onerror=function(e){e=new Error(e.message+" ("+e.filename+":"+e.lineno+")");s.enableWorker=!1,ne.warn('Error in "'+i+'" Web Worker, fallback to inline'),a.hls.trigger(ee.ERROR,{type:te.OTHER_ERROR,details:ie.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:e})}
10,d.postMessage({cmd:"init",typeSupported:t,vendor:n,id:i,config:JSON.stringify(s)})}catch(e){ne.warn('Error setting up "'+i+'" Web Worker, fallback to inline',e),this.resetWorker(),this.error=null,this.transmuxer=new Br(this.observer,t,s,n,i)}}function la(e,t){if(e.length===t.length){for(var i=0;i<e.length;i++)if(!function(t,i){var e=t["STABLE-RENDITION-ID"];return e?e===i["STABLE-RENDITION-ID"]:!["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED"].some(function(e){return t[e]!==i[e]})}(e[i].attrs,t[i].attrs))return;return 1}}e(fa,ha=Li),(l=fa.prototype).onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},l._registerListeners=function(){var e=this.hls;e.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ee.ERROR,this.onError,this),e.on(ee.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(ee.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(ee.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(ee.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(ee.FRAG_BUFFERED,this.onFragBuffered,this)},l._unregisterListeners=function(){var e=this.hls;e.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ee.ERROR,this.onError,this),e.off(ee.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(ee.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(ee.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(ee.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(ee.FRAG_BUFFERED,this.onFragBuffered,this)},l.startLoad=function(e){this.stopLoad(),this.state=d,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},l.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},l.onMediaDetaching=function(){this.tracksBuffered=[],ha.prototype.onMediaDetaching.call(this)},l.onLevelLoaded=function(e,t){this.mainDetails=t.details},l.onSubtitleFragProcessed=function(e,t){var i=t.frag,t=t.success;if(this.fragPrevious=i,this.state=d,t){var n=this.tracksBuffered[this.currentTrackId];if(n){for(var r,a=i.start,s=0;s<n.length;s++)if(a>=n[s].start&&a<=n[s].end){r=n[s];break}t=i.start+i.duration;r?r.end=t:n.push(r={start:a,end:t}),this.fragmentTracker.fragBuffered(i)}}},l.onBufferFlushing=function(e,t){var i,n=t.startOffset,r=t.endOffset;0!==n||r===Number.POSITIVE_INFINITY||(i=r-1)<=0||(t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(function(e){for(var t=0;t<e.length;)if(e[t].end<=i)e.shift();else{if(!(e[t].start<i))break;e[t].start=i,t++}}),this.fragmentTracker.removeFragmentsInRange(n,i,Nt))},l.onFragBuffered=function(e,t){this.loadedmetadata||t.frag.type!==_||null!=(t=this.media)&&t.buffered.length&&(this.loadedmetadata=!0)},l.onError=function(e,t){t=t.frag;(null==t?void 0:t.type)===Nt&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==an)&&(this.state=d)},l.onSubtitleTracksUpdated=function(e,t){var i=this,t=t.subtitleTracks;la(this.levels,t)?this.levels=t.map(function(e){return new ni(e)}):(this.tracksBuffered=[],this.levels=t.map(function(e){e=new ni(e);return i.tracksBuffered[e.id]=[],e}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Nt),this.fragPrevious=null,this.mediaBuffer=null)},l.onSubtitleTrackSwitch=function(e,t){this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId?(null!=(t=this.levels[this.currentTrackId])&&t.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,t&&this.setInterval(500)):this.clearInterval()},l.onSubtitleTrackLoaded=function(e,t){var i=t.details,t=t.id,n=this.currentTrackId,r=this.levels;if(r.length){var a=r[n];if(!(t>=r.length||t!==n)&&a){this.mediaBuffer=this.mediaBufferTimeRanges;r=0;if(i.live||null!=(n=a.details)&&n.live){n=this.mainDetails;if(i.deltaUpdateFailed||!n)return;var s=n.fragments[0];a.details?0===(r=this.alignPlaylists(i,a.details))&&s&&fi(i,r=s.start):i.hasProgramDateTime&&n.hasProgramDateTime?(zi(i,n),r=i.fragments[0].start):s&&fi(i,r=s.start)}a.details=i,this.levelLastLoaded=t,this.startFragRequested||!this.mainDetails&&i.live||this.setStartPosition(a.details,r),this.tick(),!i.live||this.fragCurrent||!this.media||this.state!==d||bi(null,i.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),a.details=void 0)}}},l._handleFragmentLoadComplete=function(e){var i,t=this,n=e.frag,e=e.payload,r=n.decryptdata,a=this.hls;!this.fragContextChanged(n)&&e&&0<e.byteLength&&r&&r.key&&r.iv&&"AES-128"===r.method&&(i=performance.now(),this.decrypter.decrypt(new
10Uint8Array(e),r.key.buffer,r.iv.buffer).catch(function(e){throw a.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:n}),e}).then(function(e){var t=performance.now();a.trigger(ee.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:i,tdecrypt:t}})}).catch(function(e){t.warn(e.name+": "+e.message),t.state=d}))},l.doTick=function(){var e,t,i,n,r,a,s,o,l;this.media?this.state===d&&(e=this.currentTrackId,e=(o=this.levels)[e],o.length)&&e&&e.details&&(o=this.config,n=this.getLoadPosition(),t=(n=y.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,o.maxBufferHole)).end,n=n.len,r=this.getFwdBufferInfo(this.media,_),i=e.details,n>this.getMaxBufferLength(null==r?void 0:r.len)+i.levelTargetDuration||(r=(n=i.fragments).length,l=i.edge,a=null,s=this.fragPrevious,t<l?(o=l-(l=o.maxFragLookUpTolerance)<t?0:l,!(a=bi(s,n,Math.max(n[0].start,t),o))&&s&&s.start<n[0].start&&(a=n[0])):a=n[r-1],a&&("initSegment"!==(a=this.mapToInitFragWhenRequired(a)).sn&&(l=n[a.sn-i.startSN-1])&&l.cc===a.cc&&this.fragmentTracker.getState(l)===ki&&(a=l),this.fragmentTracker.getState(a)===ki)&&this.loadFragment(a,e,t))):this.state=d},l.getMaxBufferLength=function(e){var t=ha.prototype.getMaxBufferLength.call(this);return e?Math.max(t,e):t},l.loadFragment=function(e,t,i){"initSegment"===(this.fragCurrent=e).sn?this._loadInitSegment(e,t):(this.startFragRequested=!0,ha.prototype.loadFragment.call(this,e,t,i))},r(fa,[{key:"mediaBufferTimeRanges",get:function(){return new da(this.tracksBuffered[this.currentTrackId]||[])}}]);var ua,ha,h=fa,da=function(n){this.buffered=void 0;function t(e,t,i){if((t>>>=0)>i-1)throw new DOMException("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is greater than the maximum bound ("+i+")");return n[t][e]}this.buffered={get length(){return n.length},end:function(e){return t("end",e,n.length)},start:function(e){return t("start",e,n.length)}}},a=(e(ca,ua=i),(s=ca.prototype).destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,ua.prototype.destroy.call(this)},s.registerListeners=function(){var e=this.hls;e.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ee.LEVEL_LOADING,this.onLevelLoading,this),e.on(ee.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(ee.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(ee.ERROR,this.onError,this)},s.unregisterListeners=function(){var e=this.hls;e.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ee.LEVEL_LOADING,this.onLevelLoading,this),e.off(ee.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(ee.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(ee.ERROR,this.onError,this)},s.onMediaAttached=function(e,t){this.media=t.media,this.media&&(-1<this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},s.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},s.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),-1<this.trackId&&(this.queuedDefaultTrack=this.trackId),pa(this.media.textTracks).forEac
10h(function(e){Wt(e)}),this.subtitleTrack=-1,this.media=null)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},s.onSubtitleTrackLoaded=function(e,t){var i,n=t.id,r=t.details,a=this.trackId,a=this.tracksInGroup[a];a?(i=a.details,a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&this.playlistLoaded(n,t,i)):this.warn("Invalid subtitle track id "+n)},s.onLevelLoading=function(e,t){this.switchLevel(t.level)},s.onLevelSwitching=function(e,t){this.switchLevel(t.level)},s.switchLevel=function(e){var t,i,n,r,e=this.hls.levels[e];null!=e&&e.textGroupIds&&(t=e.textGroupIds[e.urlId],e=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,this.groupId!==t?(i=this.tracks.filter(function(e){return!t||e.groupId===t}),this.tracksInGroup=i,n=this.findTrackId(null==e?void 0:e.name)||this.findTrackId(),this.groupId=t||null,r={subtitleTracks:i},this.log("Updating subtitle tracks, "+i.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(ee.SUBTITLE_TRACKS_UPDATED,r),-1!==n&&this.setSubtitleTrack(n,e)):this.shouldReloadPlaylist(e)&&this.setSubtitleTrack(this.trackId,e))},s.findTrackId=function(e){for(var t=this.tracksInGroup,i=0;i<t.length;i++){var n=t[i];if((!this.selectDefaultTrack||n.default)&&(!e||e===n.name))return n.id}return-1},s.onError=function(e,t){!t.fatal&&t.context&&t.context.type===Ot&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.checkRetry(t)},s.loadPlaylist=function(e){ua.prototype.loadPlaylist.call(this);var t=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(t)){var i=t.id,n=t.groupId,t=t.url;if(e)try{t=e.addDirectives(t)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(ee.SUBTITLE_TRACK_LOADING,{url:t,id:i,groupId:n,deliveryDirectives:e||null})}},s.toggleTrackModes=function(e){var t,i=this,n=this.media,r=this.trackId;n&&(t=(n=pa(n.textTracks)).filter(function(e){return e.groupId===i.groupId}),-1===e?[].slice.call(n).forEach(function(e){e.mode="disabled"}):(n=t[r])&&(n.mode="disabled"),r=t[e])&&(r.mode=this.subtitleDisplay?"showing":"hidden")},s.setSubtitleTrack=function(e,t){var i,n,r,a,s,o=this.tracksInGroup;this.media?(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(-1===e||null!=(i=o[e])&&i.details)||e<-1||e>=o.length||(this.clearTimer(),i=o[e],this.log("Switching to subtitle-track "+e+(i?' "'+i.name+'" lang:'+i.lang+" group:"+i.groupId:"")),this.trackId=e,i?(o=i.id,n=i.groupId,r=i.name,a=i.type,s=i.url,this.hls.trigger(ee.SUBTITLE_TRACK_SWITCH,{id:o,groupId:void 0===n?"":n,name:r,type:a,url:s}),o=this.switchParams(i.url,null==t?void 0:t.details),this.loadPlaylist(o)):this.hls.trigger(ee.SUBTITLE_TRACK_SWITCH,{id:e}))):this.queuedDefaultTrack=e},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=pa(this.media.textTracks),i=0;i<t.length;i++)if("hidden"===t[i].mode)e=i;else if("showing"===t[i].mode){e=i;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},r(ca,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,-1<this.trackId&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}]),ca);function ca(e){var t;return(t=ua.call(this,e,"[subtitle-track-controller]")||this).media=null,t.tracks=[],t.groupId=null,t.tracksInGroup=[],t.trackId=-1,t.selectDefaultTrack=!0,t.queuedDefaultTrack=-1,t.trackChangeListener=function(){return t.onTextTracksChanged()},t.asyncPollTrackChange=function(){return t.pollTrackChange(0)},t.useTextTrackPolling=!1,t.subtitlePollingInterval=-1,t._subtitleDisplay=!0,t.registerListeners(),t}function fa(e,t,i){return(e=ha.call(this,e,t,i,"[subtitle-stream-controller]",Nt)||this).levels=[],e.currentTrackId=-1,e.tracksBuffered=[],e.mainDetails=null,e._registerListeners(),e}function pa(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];"subtitles"!==n.kind&&"captions"!==n.kind||!n.label||t.push(e[i])}return t}function ma(e){var t=e;return Aa.hasOwnProperty(e)&&(t=Aa[e]),String.fromCharCode(t)}function ga(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].toString(16));return t}(u=Ha.prototype).append=function(e,t,i){var n=this.queues[t];n.push(e),1!==n.length||i||this.executeNext(t)},u.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},u.appendBlocker=function(e){var t,i=new Promise(function(e){t=e}),n={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(n,e),i},u.executeNext=function(e){var t=this.queues[e];if(t.length){var i=t[0];try{i.execute()}catch(t){ne.warn('[buffer-operation-queue]: Exception executing "'+e+'" SourceBuffer operation: '+t),i.onError(t);i=this.buffers[e];null!=i&&i.updating||this.shiftAndExecuteNext(e)}}},u.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},u.current=function(e){return this.queues[e][0]};var _a=Ha,ya=ft(),va=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,s=((l=Va.prototype).hasSourceTypes=function(){return 0<this.getSourceBufferTypes().length||0<Object.keys(this.pendingTracks).length},l.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},l.registerListeners=function(){var e=this.hls;
10e.on(ee.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ee.BUFFER_RESET,this.onBufferReset,this),e.on(ee.BUFFER_APPENDING,this.onBufferAppending,this),e.on(ee.BUFFER_CODECS,this.onBufferCodecs,this),e.on(ee.BUFFER_EOS,this.onBufferEos,this),e.on(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(ee.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(ee.FRAG_PARSED,this.onFragParsed,this),e.on(ee.FRAG_CHANGED,this.onFragChanged,this)},l.unregisterListeners=function(){var e=this.hls;e.off(ee.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ee.BUFFER_RESET,this.onBufferReset,this),e.off(ee.BUFFER_APPENDING,this.onBufferAppending,this),e.off(ee.BUFFER_CODECS,this.onBufferCodecs,this),e.off(ee.BUFFER_EOS,this.onBufferEos,this),e.off(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(ee.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(ee.FRAG_PARSED,this.onFragParsed,this),e.off(ee.FRAG_CHANGED,this.onFragChanged,this)},l._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new _a(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},l.onManifestLoading=function(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null},l.onManifestParsed=function(e,t){var i=2;(!t.audio||t.video)&&t.altAudio||(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},l.onMediaAttaching=function(e,t){var i,t=this.media=t.media;t&&ya&&((i=this.mediaSource=new ya).addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(i),this._objectUrl=t.src,t.addEventListener("emptied",this._onMediaEmptied))},l.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,i=this._objectUrl;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){this.warn("onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),e.src===i?(e.removeAttribute("src"),e.load()):this.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(ee.MEDIA_DETACHED,void 0)},l.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(e){var t=i.sourceBuffer[e];try{t&&(i.removeBufferListeners(e),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[e]=void 0)}catch(t){i.warn("Failed to reset the "+e+" buffer",t)}}),this._initSourceBuffer()},l.onBufferCodecs=function(e,h){var d=this,c=this.getSourceBufferTypes().length;Object.keys(h).forEach(function(e){var t,i,n,r,a,s,o,l,u;c?(t=d.tracks[e])&&"function"==typeof t.buffer.changeType&&(i=(s=h[e]).id,n=s.codec,r=s.levelCodec,a=s.container,s=s.metadata,(o=(t.levelCodec||t.codec).replace(va,"$1"))!==(l=(r||n).replace(va,"$1")))&&(u=r||n,u=a+";codecs="+(u="audio"===e.slice(0,5)?At(u):u),d.appendChangeType(e,u),d.log("switching codec "+o+" to "+l),d.tracks[e]={buffer:t.buffer,codec:n,container:a,levelCodec:r,metadata:s,id:i}):d.pendingTracks[e]=h[e]}),c||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},l.appendChangeType=function(t,i){var n=this,r=this.operationQueue;r.append({execute:function(){var e=n.sourceBuffer[t];e&&(n.log("changing "+t+" sourceBuffer type to "+i),e.changeType(i)),r.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){n.warn("Failed to change "+t+" SourceBuffer type",e)}},t,!!this.pendingTracks[t])},l.onBufferAppending=function(e,t){var r=this,i=this.hls,n=this.operationQueue,a=this.tracks,s=t.data,o=t.type,l=t.frag,u=t.part,h=t.chunkMeta,d=h.buffering[o],t=self.performance.now(),c=(d.start=t,l.stats.buffering),f=u?u.stats.buffering:null,t=(0===c.start&&(c.start=t),f&&0===f.start&&(f.start=t),a.audio),p=!1,m=("audio"===o&&"audio/mpeg"===(null==t?void 0:t.container)&&(p=!this.lastMpegAudioChunk||1===h.id||this.lastMpegAudioChunk.sn!==h.sn,this.lastMpegAudioChunk=h),l.start);n.append({execute:function(){var e,t;d.executeStart=self.performance.now(),p&&(e=r.sourceBuffer[o])&&(t=m-e.timestampOffset,.1<=Math.abs(t))&&(r.log("Updating audio SourceBuffer timestampOffset to "+m+" (delta: "+t+") sn: "+l.sn+")"),e.timestampOffset=m),r.appendExecutor(s,o)},onStart:function(){},onComplete:function(){var e,t=self.performance.now(),i=(d.executeEnd=d.end=t,0===c.first&&(c.first=t),f&&0===f.first&&(f.first=t),r.sourceBuffer),n={};for(e in i)n[e]=y.getBuffered(i[e]);r.appendErrors[o]=0,r.hls.trigger(ee.BUFFER_APPENDED,{type:o,frag:l,part:u,chunkMeta:h,parent:l.type,timeRanges:n})},onError:function(e){var t={type:te.MEDIA_ERROR,parent:l.type,details:ie.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:l,part:u,chunkMeta:h,error:e,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=ie.BUFFER_FULL_ERROR:(e=++r.appendErrors[o],t.details=ie.BUFFER_APPEND_ERROR,r.w
10arn("Failed "+e+"/"+i.config.appendErrorMaxRetry+' times to append segment in "'+o+'" sourceBuffer'),e>i.config.appendErrorMaxRetry&&(t.fatal=!0)),i.trigger(ee.ERROR,t)}},o,!!this.pendingTracks[o])},l.onBufferFlushing=function(e,i){function t(t){return{execute:n.removeExecutor.bind(n,t,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(ee.BUFFER_FLUSHED,{type:t})},onError:function(e){n.warn("Failed to remove from "+t+" SourceBuffer",e)}}}var n=this,r=this.operationQueue;i.type?r.append(t(i.type),i.type):this.getSourceBufferTypes().forEach(function(e){r.append(t(e),e)})},l.onFragParsed=function(e,t){var i=this,n=t.frag,r=t.part,t=[],a=(r||n).elementaryStreams;a[de]?t.push("audiovideo"):(a[A]&&t.push("audio"),a[he]&&t.push("video")),0===t.length&&this.warn("Fragments must have at least one ElementaryStreamType set. type: "+n.type+" level: "+n.level+" sn: "+n.sn),this.blockBuffers(function(){var e=self.performance.now(),e=(n.stats.buffering.end=e,r&&(r.stats.buffering.end=e),(r||n).stats);i.hls.trigger(ee.FRAG_BUFFERED,{frag:n,part:r,stats:e,id:n.type})},t)},l.onFragChanged=function(e,t){this.flushBackBuffer()},l.onBufferEos=function(e,n){var r=this;this.getSourceBufferTypes().reduce(function(e,t){var i=r.sourceBuffer[t];return!i||n.type&&n.type!==t||(i.ending=!0,i.ended)||(i.ended=!0,r.log(t+" sourceBuffer now EOS")),e&&!(i&&!i.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){r.getSourceBufferTypes().forEach(function(e){e=r.sourceBuffer[e];e&&(e.ending=!1)});var e=r.mediaSource;e&&"open"===e.readyState?(r.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&r.log("Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)}))},l.onLevelUpdated=function(e,t){t=t.details;t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},l.flushBackBuffer=function(){var e,t,n,r,a,s=this,o=this.hls,l=this.details,i=this.media,u=this.sourceBuffer;i&&null!==l&&(e=this.getSourceBufferTypes()).length&&(t=l.live&&null!==o.config.liveBackBufferLength?o.config.liveBackBufferLength:o.config.backBufferLength,!G(t)||t<0||(n=i.currentTime,r=l.levelTargetDuration,i=Math.max(t,r),a=Math.floor(n/r)*r-i,e.forEach(function(e){var t=u[e];if(t){var i=y.getBuffered(t);if(0<i.length&&a>i.start(0)){if(o.trigger(ee.BACK_BUFFER_REACHED,{bufferEnd:a}),l.live)o.trigger(ee.LIVE_BACK_BUFFER_REACHED,{bufferEnd:a});else if(t.ended&&i.end(i.length-1)-n<2*r)return void s.log("Cannot flush "+e+" back buffer while SourceBuffer is in ended state");o.trigger(ee.BUFFER_FLUSHING,{startOffset:0,endOffset:a,type:e})}}})))},l.updateMediaElementDuration=function(){var e,t,i,n,r,a;this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState&&(e=this.details,t=this.hls,r=this.media,i=this.mediaSource,n=e.fragments[0].start+e.totalduration,r=r.duration,a=G(i.duration)?i.duration:0,e.live&&t.config.liveDurationInfinity?(i.duration=1/0,this.updateSeekableRange(e)):(a<n&&r<n||!G(r))&&(this.log("Updating Media Source duration to "+n.toFixed(3)),i.duration=n))},l.updateSeekableRange=function(e){var t=this.mediaSource,i=e.fragments;i.length&&e.live&&null!=t&&t.setLiveSeekableRange&&(i=Math.max(0,i[0].start),e=Math.max(i,i+e.totalduration),this.log("Media Source duration is set to "+t.duration+". Setting seekable range to "+i+"-"+e+"."),t.setLiveSeekableRange(i,e))},l.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,i=this.pendingTracks,n=Object.keys(i).length;(n&&!e||2===n)&&(this.createSourceBuffers(i),this.pendingTracks={},(e=this.getSourceBufferTypes()).length?(this.hls.trigger(ee.BUFFER_CREATED,{tracks:this.tracks}),e.forEach(function(e){t.executeNext(e)})):(n=new Error("could not create source buffer for media codec(s)"),this.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:n,reason:n.message})))},l.createSourceBuffers=function(e){var t,i=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(t in e)if(!i[t]){var r=e[t];if(!r)throw Error("source buffer exists for track "+t+", however track does not");var a=r.levelCodec||r.codec,s=(a&&"audio"===t.slice(0,5)&&(a=At(a)),r.container+";codecs="+a);this.log("creating sourceBuffer("+s+")");try{var o=i[t]=n.addSourceBuffer(s),l=t;this.addBufferListener(l,"updatestart",this._onSBUpdateStart),this.addBufferListener(l,"updateend",this._onSBUpdateEnd),this.addBufferListener(l,"error",this._onSBUpdateError),this.tracks[t]={buffer:o,codec:a,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(e){this.error("error while trying to add sourceBuffer: "+e.message),this.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:t,mimeType:s})}}},l._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},l._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},l._onSBUpdateError=function(e,t){var i=new Error(e+" SourceBuffer error"),i=(this.error(""+i,t),this.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1}),this.operationQueue.current(e));i&&i.onError(t)},l.removeExecutor=function(e,t,i){var n=this.media,r=this.mediaSource,a=this.operationQueue,s=this.sourceBuffer[e];n&&r&&s?(n=G(n.duration)?n.duration:1/0,r=G(r.duration)?r.duration:1/0,(t=Math.max(0,t))<(i=Math.min(i,n,r))&&(!s.ending||s.ended)?(s.ended=!1,this.log("Removing ["+t+","+i+"] from the "+e+" SourceBuffer"),s.remove(t,i)):a.shiftAndExecuteNext(e)):(this.warn("Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(e))},l.appendExecutor=function(e,t){var i=this.sourceBuffer[t];if(i)i.ended=!1,i.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error("Attempting to append to the "+t+" SourceBuffer, but it does not exist")},l.blockBuffers=function(e,t){var i,n,r=this;
10(t=void 0===t?this.getSourceBufferTypes():t).length?(i=this.operationQueue,n=t.map(function(e){return i.appendBlocker(e)}),Promise.all(n).then(function(){e(),t.forEach(function(e){var t=r.sourceBuffer[e];null!=t&&t.updating||i.shiftAndExecuteNext(e)})})):(this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e))},l.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},l.addBufferListener=function(e,t,i){var n=this.sourceBuffer[e];n&&(i=i.bind(this,e),this.listeners[e].push({event:t,listener:i}),n.addEventListener(t,i))},l.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach(function(e){t.removeEventListener(e.event,e.listener)})},Va),Aa={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Ea=15,ba=100,wa={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Sa={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ta={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},La={25:2,26:4,29:6,30:8,31:10,27:13,28:15},ka=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Ca=(Ga.prototype.log=function(e,t){this.verboseLevel>=e&&(t="function"==typeof t?t():t,ne.log(this.time+" ["+e+"] "+t))},Ga),Ra=((u=ja.prototype).reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},u.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],i=0;i<t.length;i++){var n=t[i];e.hasOwnProperty(n)&&(this[n]=e[n])}},u.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},u.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},u.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},u.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},ja),Ia=((l=Na.prototype).reset=function(){this.uchar=" ",this.penState.reset()},l.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},l.setPenState=function(e){this.penState.copy(e)},l.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},l.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},l.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},Na),Pa=((u=Ua.prototype).equals=function(e){for(var t=0;t<ba;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0},u.copy=function(e){for(var t=0;t<ba;t++)this.chars[t].copy(e.chars[t])},u.isEmpty=function(){for(var e=!0,t=0;t<ba;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},u.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>ba&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ba)},u.moveCursor=function(e){var t=this.pos+e;if(1<e)for(var i=this.pos+1;i<t+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(t)},u.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},u.insertChar=function(e){var t=this,i=(144<=e&&this.backSpace(),ma(e));this.pos>=ba?this.logger.log(0,function(){return"Cannot insert "+e.toString(16)+" ("+i+") at position "+t.pos+". Skipping it!"}):(this.chars[this.pos].setChar(i,this.currPenState),this.moveCursor(1))},u.clearFromPos=function(e){for(var t=e;t<ba;t++)this.chars[t].reset()},u.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},u.clearToEndOfRow=function(){this.clearFromPos(this.pos)},u.getTextString=function(){for(var e=[],t=!0,i=0;i<ba;i++){var n=this.chars[i].uchar;" "!==n&&(t=!1),e.push(n)}return t?"":e.join("")},u.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},Ua),xa=((l=Oa.prototype).reset=function(){for(var e=0;e<Ea;e++)this.rows[e].clear();this.currRow=14},l.equals=function(e){for(var t=!0,i=0;i<Ea;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t},l.copy=function(e){for(var t=0;t<Ea;t++)this.rows[t].copy(e.rows[t])},l.isEmpty=function(){for(var e=!0,t=0;t<Ea;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},l.backSpace=function(){this.rows[this.currRow].backSpace()},l.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},l.insertChar=function(e){this.rows[this.currRow].insertChar(e)},l.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},l.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},l.setCursor=function(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},l.setPAC=function(e){this.logger.log(2,function(){return"pacData = "+JSON.stringify(e)});var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var i=0;i<Ea;i++)this.rows[i].clear();var n=this.currRow+1-this.nrRollUpRows,r=this.lastOutputScreen;if(r){var a=r.rows[n].cueStartTime,s=this.logger.time;if(null!==a&&null!==s&&a<s)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(r.rows[n+o])}}this.currRow=t;a=this.rows[this.currRow],null!==e.indent&&(s=e.indent,s=Math.max(s-1,0),a.setCursor(e.indent),e.color=a.chars[s].penState.foreground),a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},l.setBkgData=function(e){this.logger.log(2,function(){return"bkgData = "+JSON.stringify(e)}),this.backSpace(),this.setPen(e),this.insertChar(32)},l.setRollUpRows=function(e){this.nrRollUpRows=e},l.rollUp=function(){var e,t=this;null!==this.nrRollUpRows?(this.logger.log(1,function(){return t.getDisplayText()}),e=this.currRow+1-this.nrRollUpRows,(e=this.rows.splice(e,1)[0]).clear(),this.rows.splice(this.currRow,0,e),this.logger.log(2,"Rolling up")):this.logger.log(3,"roll_up but nrRollUpRows not set yet")},l.getDisplayText=function(e){e=e||!1;for(var t=[],i="",n=0;n<Ea;n++){var r=this.rows[n].getTextString();r&&t.push(e?"Row "+(n+1)+": '"+r+"'":r.trim())}return i=0<t.length?e?"["+t.join(" | ")+"]":t.join("\n"):i},l.getTextAndFormat=function(){return this.rows},Oa),Da=((u=Fa.prototype).reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},u.getHandler=function(){return this.outputFilter},u.setHandler=function(e){this.outputFilter=e},u.setPAC=function(e){this.writeScreen.setPAC(e)},u.setBkgData=function(e){this.writeScreen.setBkgData(e)},u.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(2,function(){return"MODE="+e}),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},u.insertChars=function(e){for(var t=this,i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,function(){return n+": "+t.writeScreen.getDisplayText(!0)}),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)}),this.outputDataUpdate())},u.ccRCL=function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},u.ccBS=function(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory)&&this.outputDataUpdate()},u.ccAOF=function(){},u.ccAON=function(){},u.ccDER=function(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},u.ccRU=function(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},u.ccFON=function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}
10,u.ccRDC=function(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},u.ccTR=function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")},u.ccRTD=function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")},u.ccEDM=function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},u.ccCR=function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},u.ccENM=function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},u.ccEOC=function(){var e,t=this;this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode&&(e=this.displayedMemory,this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,function(){return"DISP: "+t.displayedMemory.getDisplayText()})),this.outputDataUpdate(!0)},u.ccTO=function(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},u.ccMIDROW=function(e){var t={flash:!1};t.underline=e%2==1,t.italics=46<=e,t.italics?t.foreground="white":(e=Math.floor(e/2)-16,t.foreground=["white","green","blue","cyan","red","yellow","magenta"][e]),this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},u.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},u.cueSplitAtTime=function(e){!this.outputFilter||this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e)},Fa),Ma=((l=Ba.prototype).getHandler=function(e){return this.channels[e].getHandler()},l.setHandler=function(e,t){this.channels[e].setHandler(t)},l.addData=function(e,t){var i,n=!1;this.logger.time=e;for(var r=0;r<t.length;r+=2){var a,s=127&t[r],o=127&t[r+1];0==s&&0==o||(this.logger.log(3,"["+ga([t[r],t[r+1]])+"] -> ("+ga([s,o])+")"),!(i=(i=(i=(i=this.parseCmd(s,o))||this.parseMidrow(s,o))||this.parsePAC(s,o))||this.parseBackgroundAttributes(s,o))&&(n=this.parseChars(s,o))&&((a=this.currentChannel)&&0<a?this.channels[a].insertChars(n):this.logger.log(2,"No channel found yet. TEXT-MODE?")),i)||n||this.logger.log(2,"Couldn't parse cleaned data "+ga([s,o])+" orig: "+ga([t[r],t[r+1]]))}},l.parseCmd=function(e,t){var i,n,r=this.cmdHistory;return((20===e||28===e||21===e||29===e)&&32<=t&&t<=47||(23===e||31===e)&&33<=t&&t<=35)&&(za(e,t,r)?(Ya(null,null,r),this.logger.log(3,"Repeated command ("+ga([e,t])+") is dropped")):(n=this.channels[i=20===e||21===e||23===e?1:2],20===e||21===e||28===e||29===e?32===t?n.ccRCL():33===t?n.ccBS():34===t?n.ccAOF():35===t?n.ccAON():36===t?n.ccDER():37===t?n.ccRU(2):38===t?n.ccRU(3):39===t?n.ccRU(4):40===t?n.ccFON():41===t?n.ccRDC():42===t?n.ccTR():43===t?n.ccRTD():44===t?n.ccEDM():45===t?n.ccCR():46===t?n.ccENM():47===t&&n.ccEOC():n.ccTO(t-32),Ya(e,t,r),this.currentChannel=i),!0)},l.parseMidrow=function(e,t){var i;return(17===e||25===e)&&32<=t&&t<=47&&((i=17===e?1:2)!==this.currentChannel?(this.logger.log(0,"Mismatch channel in midrow parsing"),!1):!!(i=this.channels[i])&&(i.ccMIDROW(t),this.logger.log(3,"MIDROW ("+ga([e,t])+")"),!0))},l.parsePAC=function(e,t){var i,n,r=this.cmdHistory;return((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127||(16===e||24===e)&&64<=t&&t<=95)&&(za(e,t,r)?(Ya(null,null,r),!0):!!(n=this.channels[i=e<=23?1:2])&&(n.setPAC(this.interpretPAC((64<=t&&t<=95?1==i?wa:Ta:1==i?Sa:La)[e],t)),Ya(e,t,r),this.currentChannel=i,!0))},l.interpretPAC=function(e,t){e={color:null,italics:!1,indent:null,underline:!1,row:e},t=95<t?t-96:t-64;return e.underline=1==(1&t),t<=13?e.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(t/2)]:t<=15?(e.italics=!0,e.color="white"):e.indent=4*Math.floor((t-16)/2),e},l.parseChars=function(e,t){var i,n=null,r=null;return 17<=(r=25<=e?(i=2,e-8):(i=1,e))&&r<=19?(this.logger.log(2,"Special char '"+ma(r=17===r?t+80:18===r?t+112:t+144)+"' in channel "+i),n=[r]):32<=e&&e<=127&&(n=0===t?[e]:[e,t]),n&&(i=ga(n),this.logger.log(3,"Char codes = "+i.join(",")),Ya(e,t,this.cmdHistory)
10),n},l.parseBackgroundAttributes=function(e,t){var i,n;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(n={},16===e||24===e?(i=Math.floor((t-32)/2),n.background=ka[i],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),this.channels[e<=23?1:2].setBkgData(n),Ya(e,t,this.cmdHistory),!0)},l.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},l.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var i=this.channels[t];i&&i.cueSplitAtTime(e)}},Ba);function Ba(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;var n=this.logger=new Ca;this.channels=[null,new Da(e,t,n),new Da(e+1,i,n)]}function Fa(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new xa(i),this.nonDisplayedMemory=new xa(i),this.lastOutputScreen=new xa(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}function Oa(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(var t=0;t<Ea;t++)this.rows.push(new Pa(e));this.logger=e}function Ua(e){this.chars=[],this.pos=0,this.currPenState=new Ra,this.cueStartTime=null,this.logger=void 0;for(var t=0;t<ba;t++)this.chars.push(new Ia);this.logger=e}function Na(){this.uchar=" ",this.penState=new Ra}function ja(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}function Ga(){this.time=null,this.verboseLevel=0}function Va(e){var i=this,e=(this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onMediaSourceOpen=function(){var e=i.media,t=i.mediaSource;i.log("Media source opened"),e&&(e.removeEventListener("emptied",i._onMediaEmptied),i.updateMediaElementDuration(),i.hls.trigger(ee.MEDIA_ATTACHED,{media:e})),t&&t.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){i.log("Media source closed")},this._onMediaSourceEnded=function(){i.log("Media source ended")},this._onMediaEmptied=function(){var e=i.media,t=i._objectUrl;e&&e.src!==t&&i.error("Media element src was set while attaching MediaSource ("+t+" > "+e.src+")")},this.hls=e,"[buffer-controller]");this.log=ne.log.bind(ne,e),this.warn=ne.warn.bind(ne,e),this.error=ne.error.bind(ne,e),this._initSourceBuffer(),this.registerListeners()}function Ha(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}function Ya(e,t,i){i.a=e,i.b=t}function za(e,t,i){return i.a===e&&i.b===t}(u=is.prototype).dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},u.newCue=function(e,t,i){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},u.reset=function(){this.cueRanges=[],this.startTime=null};var Wa,Qa,Ka=is,Ja="undefined"!=typeof self&&self.VTTCue?self.VTTCue:(Wa=["","lr","rl"],Qa=["start","middle","end","left","right"],ts.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},ts),qa=(Xa.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},Xa);function Xa(){}function Za(e,t){return"string"==typeof t&&!!Array.isArray(e)&&(t=t.toLowerCase(),!!~e.indexOf(t))&&t}function $a(e){return Za(Qa,e)}function es(e){for(var t=arguments.length,i=new Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];for(var r=1;r<arguments.length;r++){var a,s=arguments[r];for(a in s)e[a]=s[a]}return e}function ts(e,t,i){var n=this,r={enumerable:!0},a=(n.hasBeenReset=!1,""),s=!1,o=e,l=t,u=i,h=null,d="",c=!0,f="auto",p="start",m=50,g="middle",_=50,y="middle";Object.defineProperty(n,"id",es({},r,{get:function(){return a}
10,set:function(e){a=""+e}})),Object.defineProperty(n,"pauseOnExit",es({},r,{get:function(){return s},set:function(e){s=!!e}})),Object.defineProperty(n,"startTime",es({},r,{get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",es({},r,{get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",es({},r,{get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",es({},r,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",es({},r,{get:function(){return d},set:function(e){e=Za(Wa,e);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",es({},r,{get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",es({},r,{get:function(){return f},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",es({},r,{get:function(){return p},set:function(e){e=$a(e);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",es({},r,{get:function(){return m},set:function(e){if(e<0||100<e)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",es({},r,{get:function(){return g},set:function(e){e=$a(e);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",es({},r,{get:function(){return _},set:function(e){if(e<0||100<e)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",es({},r,{get:function(){return y},set:function(e){e=$a(e);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}})),n.displayState=void 0}function is(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}function ns(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(n||0)}e=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return e?59<parseFloat(e[2])?t(e[2],e[3],0,e[4]):t(e[1],e[2],e[3],e[4]):null}(l=as.prototype).set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},l.get=function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},l.has=function(e){return e in this.values},l.alt=function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},l.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},l.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){t=parseFloat(t);if(0<=t&&t<=100)return this.set(e,t),!0}return!1};var rs=as;function as(){this.values=Object.create(null)}function ss(e,t,i,n){var r,a,s=n?e.split(n):[e];for(r in s)"string"==typeof s[r]&&2===(a=s[r].split(i)).length&&t(a[0],a[1])}var os=new Ja(0,0,""),ls="middle"===os.align?"middle":"center";function us(e){return e.replace(/<br(?: \/)?>/gi,"\n")}function hs(e,t,i){return e.slice(i=void 0===i?0:i,i+t.length)===t}(u=ps.prototype).parse=function(e){var n=this;function t(){for(var e=0,t=us(t=n.buffer);e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var i=t.slice(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,n.buffer=t.slice(e),i}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var i="";if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var r=(i=t()).match(/^()?WEBVTT([ \t].*)?$/);if(null==r||!r[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(a?a=!1:i=t(),n.state){case"HEADER":/:/.test(i)?ss(i,function(e,t){},/:/):i||(n.state="ID");continue;case"NOTE":i||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){n.state="NOTE";break}if(!i)continue;if(n.cue=new Ja(0,0,""),n.state="CUE",-1===i.indexOf("--\x3e")){n.cue.id=i;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{!function(t,e,r){var i,a,n=t;function s(){var e=ns(t);if(null===e)throw new Error("Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function o(){t=t.replace(/^\s+/,"")}if(o(),e.startTime=s(),o(),"--\x3e"!==t.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);t=t.slice(3),o(),e.endTime=s(),o(),i=t,e=e,a=new rs,ss(i,function(e,t){var i;switch(e){case"region":for(var n=r.length-1;0<=n;n--)if(r[n].id===t){a.set(e,r[n].region);break}break;case"vertical":a.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),a.integer(e,i[0]),a.percent(e,i[0])&&a.set("snapToLines",!1),a.alt(e,i[0],["auto"]),2===i.length&&a.alt("lineAlign",i[1],["start",ls,"end"]);break;case"position":i=t.split(","),a.percent(e,i[0]),2===i.length&&a.alt("positionAlign",i[1],["start",ls,"end","line-left","line-right","auto"]);break;case"size":a.percent(e,t);break;case"align":a.alt(e,t,["start",ls,"end","left","right"])}}
10,/:/,/\s/),e.region=a.get("region",null),e.vertical=a.get("vertical",""),"auto"===(i=a.get("line","auto"))&&-1===os.line&&(i=-1),e.line=i,e.lineAlign=a.get("lineAlign","start"),e.snapToLines=a.get("snapToLines",!0),e.size=a.get("size",100),e.align=a.get("align",ls),"auto"===(i=a.get("position","auto"))&&50===os.position&&(i="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=i}(i,n.cue,n.regionList)}catch(e){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(a=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(null===n.cue)continue;n.cue.text&&(n.cue.text+="\n"),n.cue.text+=i;continue;case"BADCUE":i||(n.state="ID")}}}catch(e){"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},u.flush=function(){var t=this;try{if(!t.cue&&"HEADER"!==t.state||(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state||"BADWEBVTT"===t.state)throw new Error("Malformed WebVTT signature.")}catch(e){t.onparsingerror&&t.onparsingerror(e)}return t.onflush&&t.onflush(),this};var ds=ps,cs=/\r\n|\n\r|\n|\r/g,fs=function(e){for(var t=5381,i=e.length;i;)t=33*t^e.charCodeAt(--i);return(t>>>0).toString()};function ps(){this.state="INITIAL",this.buffer="",this.decoder=new qa,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}function ms(e,t,i){return fs(e.toString())+fs(t.toString())+fs(i)}var gs="stpp.ttml.im1t",_s=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ys=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,vs={left:"start",center:"center",right:"end",start:"start",end:"end"};function As(e,t,i,n){var r=k(new Uint8Array(e),["mdat"]);if(0!==r.length){var a,r=r.map(function(e){return He(e)}),s=br(t.baseTime,1,1/(t=void 0===(t=t.timescale)?1:t),a=void 0===a?!1:a);try{r.forEach(function(e){return i(function(e,u){var i,h,d,c,f,n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(n)return i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},h=Object.keys(i).reduce(function(e,t){return e[t]=n.getAttribute("ttp:"+t)||i[t],e},{}),d="preserve"!==n.getAttribute("xml:space"),c=bs(Es(n,"styling","style")),f=bs(Es(n,"layout","region")),e=Es(n,"body","[begin]"),[].map.call(e,function(e){var t=function n(e,r){return[].slice.call(e.childNodes).reduce(function(e,t,i){return"br"===t.nodeName&&i?e+"\n":null!=(i=t.childNodes)&&i.length?n(t,r):r?e+t.textContent.trim().replace(/\s+/g," "):e+t.textContent},"")}(e,d);if(!t||!e.hasAttribute("begin"))return null;var i=Ts(e.getAttribute("begin"),h),n=Ts(e.getAttribute("dur"),h),r=Ts(e.getAttribute("end"),h);if(null===i)throw Ss(e);if(null===r){if(null===n)throw Ss(e);r=i+n}var a,s,o,l,n=new Ja(i-u,r-u,t),t=(n.id=ms(n.startTime,n.endTime,n.text),a=f[e.getAttribute("region")],s=c[e.getAttribute("style")],i=c,o="http://www.w3.org/ns/ttml#styling",(r=(l=null)!=a&&a.hasAttribute("style")?a.getAttribute("style"):null)&&i.hasOwnProperty(r)&&(l=i[r]),["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce(function(e,t){var i=ws(s,o,t)||ws(a,o,t)||ws(l,o,t);return i&&(e[t]=i),e},{})),e=t.textAlign;return e&&((i=vs[e])&&(n.lineAlign=i),n.align=e),$(n,t),n}).filter(function(e){return null!==e});throw new Error("Invalid ttml")}(e,s))})}catch(e){n(e)}}else n(new Error("Could not parse IMSC1 mdat"))}function Es(e,t,i){e=e.getElementsByTagName(t)[0];return e?[].slice.call(e.querySelectorAll(i)):[]}function bs(e){return e.reduce(function(e,t){var i=t.getAttribute("xml:id");return i&&(e[i]=t),e},{})}function ws(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function Ss(e){return new Error("Could not parse ttml timestamp "+e)}function Ts(n,e){var t,i,r,a;return n?(null===(t=ns(n))&&(_s.test(n)?(i=e,r=_s.exec(n),a=(0|r[4])+(0|r[5])/i.subFrameRate,t=3600*(0|r[1])+60*(0|r[2])+(0|r[3])+a/i.frameRate):ys.test(n)&&(t=function(e){var t=ys.exec(n),i=Number(t[1]);switch(t[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}(e))),t):null}(l=Ls.prototype).destroy=function(){var e=this.hls;
10e.off(ee.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ee.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(ee.FRAG_LOADING,this.onFragLoading,this),e.off(ee.FRAG_LOADED,this.onFragLoaded,this),e.off(ee.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(ee.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(ee.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(ee.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(ee.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.lazyInit608=function(){var e,t,i,n;!this.config.enableCEA708Captions||this.cea608Parser1&&this.cea608Parser2||(e=new Ka(this,"textTrack1"),t=new Ka(this,"textTrack2"),i=new Ka(this,"textTrack3"),n=new Ka(this,"textTrack4"),this.cea608Parser1=new Ma(1,e,t),this.cea608Parser2=new Ma(3,i,n))},l.addCues=function(e,t,i,n,r){for(var a,s,o,l=!1,u=r.length;u--;){var h=r[u],d=(a=h[0],d=h[1],s=t,Math.min(d,i)-Math.max(a,s));if(0<=d&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],i),l=!0,.5<d/(i-t)))return}l||r.push([t,i]),this.config.renderTextTracksNatively?(o=this.captionsTracks[e],this.Cues.newCue(o,t,i,n)):(o=this.Cues.newCue(null,t,i,n),this.hls.trigger(ee.CUES_PARSED,{type:"captions",cues:o,track:e}))},l.onInitPtsFound=function(e,t){var i=this,n=t.frag,r=t.id,a=t.initPTS,t=t.timescale,s=this.unparsedVttFrags;"main"===r&&(this.initPTS[n.cc]={baseTime:a,timescale:t}),s.length&&(this.unparsedVttFrags=[],s.forEach(function(e){i.onFragLoaded(ee.FRAG_LOADED,e)}))},l.getExistingTrack=function(e){var t=this.media;if(t)for(var i=0;i<t.textTracks.length;i++){var n=t.textTracks[i];if(n[e])return n}return null},l.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},l.createNativeTrack=function(e){var t,i,n,r,a;this.captionsTracks[e]||(r=this.captionsProperties,t=this.captionsTracks,i=this.media,n=(r=r[e]).label,r=r.languageCode,(a=this.getExistingTrack(e))?(t[e]=a,Wt(t[e]),Yt(t[e],i)):(a=this.createTextTrack("captions",n,r))&&(a[e]=!0,t[e]=a))},l.createNonNativeTrack=function(e){var t;this.nonNativeCaptionsTracks[e]||(t=this.captionsProperties[e])&&(t={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media},this.nonNativeCaptionsTracks[e]=t,this.hls.trigger(ee.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[t]}))},l.createTextTrack=function(e,t,i){var n=this.media;if(n)return n.addTextTrack(e,t,i)},l.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},l.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(e){Wt(t[e]),delete t[e]}),this.nonNativeCaptionsTracks={}},l.onManifestLoading=function(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},l._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var i=0;i<t.length;i++)Wt(t[i])}},l.onSubtitleTracksUpdated=function(e,t){var o,l=this,t=t.subtitleTracks||[],i=t.some(function(e){return e.textCodec===gs});(this.config.enableWebVTT||i&&this.config.enableIMSC1)&&(la(this.tracks,t)?this.tracks=t:(this.textTracks=[],this.tracks=t,this.config.renderTextTracksNatively?(o=this.media?this.media.textTracks:null,this.tracks.forEach(function(e,t){var i,n,r;if(o&&t<o.length){for(var a=null,s=0;s<o.length;s++)if(n=o[s],r=e,n&&n.label===r.name&&!n.textTrack1&&!n.textTrack2){a=o[s];break}a&&(i=a)}i?Wt(i):(t=l._captionsOrSubtitlesFromCharacteristics(e),(i=l.createTextTrack(t,e.name,e.lang))&&(i.mode="disabled")),i&&(i.groupId=e.groupId,l.textTracks.push(i))})):this.tracks.length&&(i=this.tracks.map(function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subt
10itleTrack:e}}),this.hls.trigger(ee.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:i}))))},l._captionsOrSubtitlesFromCharacteristics=function(e){return e.attrs.CHARACTERISTICS&&/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS)&&/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS)?"captions":"subtitles"},l.onManifestLoaded=function(e,t){var i=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);t&&(t="textTrack"+t[1],t=i.captionsProperties[t])&&(t.label=e.name,e.lang&&(t.languageCode=e.lang),t.media=e)})},l.closedCaptionsForLevel=function(e){e=this.hls.levels[e.level];return null==e?void 0:e.attrs["CLOSED-CAPTIONS"]},l.onFragLoading=function(e,t){var i,n,r=this.cea608Parser1,a=this.cea608Parser2,s=this.lastCc,o=this.lastSn,l=this.lastPartIndex;this.enabled&&r&&a&&t.frag.type===_&&(i=(n=t.frag).cc,n=n.sn,t=null!=(t=null==t||null==(t=t.part)?void 0:t.index)?t:-1,n===o+1||n===o&&t===l+1||i===s||(r.reset(),a.reset()),this.lastCc=i,this.lastSn=n,this.lastPartIndex=t)},l.onFragLoaded=function(e,t){var i,n,r=t.frag,a=t.payload;r.type===Nt&&(a.byteLength?(i=r.decryptdata,n="stats"in t,null!=i&&i.encrypted&&!n||(i=this.tracks[r.level],(n=this.vttCCs)[r.cc]||(n[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),i&&i.textCodec===gs?this._parseIMSC1(r,a):this._parseVTTs(t))):this.hls.trigger(ee.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")}))},l._parseIMSC1=function(t,e){var i=this,n=this.hls;As(e,this.initPTS[t.cc],function(e){i._appendCues(e,t.level),n.trigger(ee.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(e){ne.log("Failed to parse IMSC1: "+e),n.trigger(ee.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:e})})},l._parseVTTs=function(i){var n,r,a,s,o,e,t,l,u,h,d,c,f,p,m,g,_=this,y=i.frag,v=i.payload,A=this.initPTS,E=this.unparsedVttFrags,b=A.length-1;A[y.cc]||-1!=b?(n=this.hls,A=null!=(A=y.initSegment)&&A.data?tt(y.initSegment.data,new Uint8Array(v)):v,r=this.initPTS[y.cc],a=this.vttCCs,s=y.cc,o=y.start,e=function(e){_._appendCues(e,y.level),n.trigger(ee.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:y})},t=function(e){var t="Missing initPTS for VTT MPEGTS"===e.message;t?E.push(i):_._fallbackToIMSC1(y,v),ne.log("Failed to parse VTT cue: "+e),t&&b>y.cc||n.trigger(ee.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:e})},h=new ds,A=He(new Uint8Array(A)).trim().replace(cs,"\n").split("\n"),d=[],c=r?br(r.baseTime,9e4,1/(l=void 0===(l=r.timescale)?1:l)):0,f="00:00.000",g=!(m=p=0),h.oncue=function(e){var t=a[s],i=a.ccOffset,n=(p-c)/9e4;if(null!=t&&t.new&&(void 0!==m?i=a.ccOffset=t.start:function(e,t){var i=e[s],n=e[i.prevCC];if(!n||!n.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,i.new=!1;for(;null!=n&&n.new;)e.ccOffset+=i.start-n.start,i.new=!1,n=e[(i=n).prevCC];e.presentationOffset=t}(a,n)),n){if(!r)return void(u=new Error("Missing initPTS for VTT MPEGTS"));i=n-a.presentationOffset}t=e.endTime-e.startTime,n=kr(9e4*(e.startTime+i-m),9e4*o)/9e4,e.startTime=Math.max(n,0),e.endTime=Math.max(n+t,0),i=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(i)),e.id||(e.id=ms(e.startTime,e.endTime,i)),0<e.endTime&&d.push(e)},h.onparsingerror=function(e){u=e},h.onflush=function(){u?t(u):e(d)},A.forEach(function(e){if(g){if(hs(e,"X-TIMESTAMP-MAP=")){g=!1,e.slice(16).split(",").forEach(function(e){hs(e,"LOCAL:")?f=e.slice(6):hs(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))});try{m=function(e){var t=parseInt(e.slice(-3)),i=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),r=9<e.length?parseInt(e.substring(0,e.indexOf(":"))):0;if(G(t)&&G(i)&&G(n)&&G(r))return t+1e3*i+6e4*n+36e5*r;throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e)}(f)/1e3}catch(e){u=e}return}""===e&&(g=!1)}h.parse(e+"\n")}),h.flush()):E.push(i)},l._fallbackToIMSC1=function(e,t){var i=this,n=this.tracks[e.level];n.textCodec||As(t,this.initPTS[e.cc],function(){n.textCodec=gs,i._parseIMSC1(e,t)},function(){n.textCodec="wvtt"})},l._appendCues=function(e,t){var i,n,r=this.hls;this.config.renderTextTracksNatively?(i=this.textTracks[t])&&"disabled"!==i.mode&&e.forEach(function(e){return zt(i,e)}):(n=this.tracks[t])&&(n=n.default?"default":"subtitles"+t,r.trigger(ee.CUES_PARSED,{type:"subtitles",cues:e,track:n}))},l.onFragDecrypted=function(e,t){t.frag.type===Nt&&this.onFragLoaded(ee.FRAG_LOADED,t)},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(e,t){if(this.enabled){var i=t.frag,n=t.samples;if(i.type!==_||"NONE"!==this.closedCaptionsForLevel(i)){this.lazyInit608();var r=this.cea608Parser1,a=this.cea608Parser2;if(r&&a)for(var s=0;s<n.length;s++){var o=n[s].bytes;o&&(o=this.extractCea608Data(o),r.addData(n[s].pts,o[0]),a.addData(n[s].pts,o[1]))}}}},l.onBufferFlushing=function(e,t){var i,n,r=t.startOffset,a=t.endOffset,s=t.endOffsetSubtitles,t=t.type,o=this.media;!o||o.currentTime<a||(t&&"video"!==t||(i=this.captionsTracks,Object.keys(i).forEac
10h(function(e){return Qt(i[e],r,a)})),this.config.renderTextTracksNatively&&0===r&&void 0!==s&&(n=this.textTracks,Object.keys(n).forEach(function(e){return Qt(n[e],r,s)})))},l.extractCea608Data=function(e){for(var t=[[],[]],i=31&e[0],n=2,r=0;r<i;r++){var a=e[n++],s=127&e[n++],o=127&e[n++];0==s&&0==o||0==(4&a)||0!=(a=3&a)&&1!=a||(t[a].push(s),t[a].push(o))}return t};u=Ls;function Ls(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(ee.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ee.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(ee.FRAG_LOADING,this.onFragLoading,this),e.on(ee.FRAG_LOADED,this.onFragLoaded,this),e.on(ee.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(ee.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(ee.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(ee.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(ee.BUFFER_FLUSHING,this.onBufferFlushing,this)}(l=Is.prototype).setStreamController=function(e){this.streamController=e},l.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},l.registerListeners=function(){var e=this.hls;e.on(ee.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(ee.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ee.BUFFER_CODECS,this.onBufferCodecs,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this)},l.unregisterListener=function(){var e=this.hls;e.off(ee.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(ee.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ee.BUFFER_CODECS,this.onBufferCodecs,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this)},l.onFpsDropLevelCapping=function(e,t){t=this.hls.levels[t.droppedLevel];this.isLevelAllowed(t)&&this.restrictedLevels.push({bitrate:t.bitrate,height:t.height,width:t.width})},l.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null},l.onManifestParsed=function(e,t){var i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()},l.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},l.onMediaDetaching=function(){this.stopCapping()},l.detectPlayerSize=function(){var e,t,i;this.media&&(this.mediaHeight<=0||this.mediaWidth<=0?this.clientRect=null:(e=this.hls.levels).length&&(t=this.hls,(i=this.getMaxLevel(e.length-1))!==this.autoLevelCapping&&ne.log("Setting autoLevelCapping to "+i+": "+e[i].height+"p@"+e[i].bitrate+" for media "+this.mediaWidth+"x"+this.mediaHeight),t.autoLevelCapping=i,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping))},l.getMaxLevel=function(i){var n=this,e=this.hls.levels;return e.length?(e=e.filter(function(e,t){return n.isLevelAllowed(e)&&t<=i}),this.clientRect=null,Is.getMaxLevelByMediaSize(e,this.mediaWidth,this.mediaHeight)):-1},l.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},l.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},l.getDimensions=function(){var e,t,i;return this.clientRect||(t={width:0,height:0},(e=this.media)&&(i=e.getBoundingClientRect(),t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.
10width||0,t.height=i.bottom-i.top||e.height||0)),this.clientRect=t)},l.isLevelAllowed=function(t){return!this.restrictedLevels.some(function(e){return t.bitrate===e.bitrate&&t.width===e.width&&t.height===e.height})},Is.getMaxLevelByMediaSize=function(e,t,i){if(null==e||!e.length)return-1;for(var n,r=e.length-1,a=Math.max(t,i),s=0;s<e.length;s+=1){var o=e[s];if((o.width>=a||o.height>=a)&&(!(n=e[s+1])||o.width!==n.width||o.height!==n.height)){r=s;break}}return r},r(Is,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}}]);var l=Is,p=((p=Rs.prototype).setStreamController=function(e){this.streamController=e},p.registerListeners=function(){this.hls.on(ee.MEDIA_ATTACHING,this.onMediaAttaching,this)},p.unregisterListeners=function(){this.hls.off(ee.MEDIA_ATTACHING,this.onMediaAttaching,this)},p.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},p.onMediaAttaching=function(e,t){var i=this.hls.config;i.capLevelOnFPSDrop&&(t=t.media instanceof self.HTMLVideoElement?t.media:null,(this.media=t)&&"function"==typeof t.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod))},p.checkFPS=function(e,t,i){var n,r,a,s,o=performance.now();t&&(this.lastTime&&(s=o-this.lastTime,n=i-this.lastDroppedFrames,r=t-this.lastDecodedFrames,s=1e3*n/s,(a=this.hls).trigger(ee.FPS_DROP,{currentDropped:n,currentDecoded:r,totalDroppedFrames:i}),0<s)&&n>a.config.fpsDroppedMonitoringThreshold*r&&(s=a.currentLevel,ne.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),0<s)&&(-1===a.autoLevelCapping||a.autoLevelCapping>=s)&&(a.trigger(ee.FPS_DROP_LEVEL_CAPPING,{level:--s,droppedLevel:a.currentLevel}),a.autoLevelCapping=s,this.streamController.nextLevelSwitch()),this.lastTime=o,this.lastDroppedFrames=i,this.lastDecodedFrames=t)},p.checkFPSInterval=function(){var e,t=this.media;t&&(this.isVideoPlaybackQualityAvailable?(e=t.getVideoPlaybackQuality(),this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)):this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount))},Rs),ks="[eme]",E=((E=Cs.prototype).destroy=function(){this.unregisterListeners(),this.onMediaDetached();var e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null},E.registerListeners=function(){this.hls.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(ee.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(ee.MANIFEST_LOADED,this.onManifestLoaded,this)},E.unregisterListeners=function(){this.hls.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(ee.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(ee.MANIFEST_LOADED,this.onManifestLoaded,this)},E.getLicenseServerUrl=function(e){var t=this.config,i=t.drmSystems,t=t.widevineLicenseUrl,i=i[e];if(i)return i.licenseUrl;if(e===g.WIDEVINE&&t)return t;throw new Error('no license server URL configured for key-system "'+e+'"')},E.getServerCertificateUrl=function(e){var t=this.config.drmSystems[e];if(t)return t.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},E.attemptKeySystemAccess=function(e){function t(e,t,i){return!!e&&i.indexOf(e)===t}var s=this,i=this.hls.levels,o=i.map(function(e){return e.audioCodec}).filter(t),l=i.map(function(e){return e.videoCodec}).filter(t);return o.length+l.length===0&&l.push("avc1.42e01e"),new Promise(function(r,a){!function t(i){var n=i.shift();s.getMediaKeysPromise(n,o,l).then(function(e){return r({keySystem:n,mediaKeys:e})}).catch(function(e){i.length?t(i):a(e instanceof xs?e:new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_NO_ACCESS,error:e,fatal:!0},e.message))})}(e)})},E.requestMediaKeySystemAccess=function(e,t){var i,n=this.config.requestMediaKeySystemAccessFunc;return"function"!=typeof n?(i="Configured requestMediaKeySystemAccess is not a function "+n,null===Ie&&"http:"===self.location.protocol&&(i="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(i))):n(e,t)},E.getMediaKeysPromise=function(n,e,t){var r,a=this,e=function(e,t,i,n){var r,a;switch(e){case g.FAIRPLAY:r=["cenc","sinf"];break;case g.WIDEVINE:case g.PLAYREADY:r=["cenc"];break;case g.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return i=i,[{initDataTypes:r,persistentState:(a=n).persistentState||"not-allowed",distinctiveIdentifier:a.distinctiveIdentifier||"not-allowed",sessionTypes:a.sessionTypes||[a.sessionType||"temporary"],audioCapabilities:t.map(function(e){return{contentType:'audio/mp4; codecs="'+e+'"',robustness:a.audioRobustness||"",encryptionScheme:a.audioEncryptionScheme||null}}),videoCapabilities:i.map(function(e){return{contentType:'video/mp4; codecs="'+e+'"',robustness:a.videoRobustness||"",encryptionScheme:a.videoEncryptionScheme||null}})}]}(n,e,t,this.config.drmSystemOptions),i=this.keySystemAccessPromises[n],t=null==i?void 0:i.keySystemAccess;return t?t.then(function(){return i.mediaKeys}):(this.log('Requesting encrypted media "'+n+'" key-system access with config: '+JSON.stringify(e)),t=this.requestMediaKeySystemAccess(n,e),r=this.keySystemAccessPromises[n]={keySystemAccess:t},t.catch(function(e){a.log('Failed to obtain access to key-system "'+n+'": '+e)}
10),t.then(function(e){a.log('Access for key-system "'+e.keySystem+'" obtained');var i=a.fetchServerCertificate(n);return a.log('Create media-keys for "'+n+'"'),r.mediaKeys=e.createMediaKeys().then(function(t){return a.log('Media-keys created for "'+n+'"'),i.then(function(e){return e?a.setMediaKeysServerCertificate(t,n,e):t})}),r.mediaKeys.catch(function(e){a.error('Failed to create media-keys for "'+n+'"}: '+e)}),r.mediaKeys}))},E.createMediaKeySessionContext=function(e){var t=e.decryptdata,i=e.keySystem,e=e.mediaKeys,n=(this.log('Creating key-system session "'+i+'" keyId: '+Ye(t.keyId||[])),e.createSession()),t={decryptdata:t,keySystem:i,mediaKeys:e,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(t),t},E.renewKeySession=function(e){var t,i,n=e.decryptdata;n.pssh?(t=this.createMediaKeySessionContext(e),i=this.getKeyIdString(n),this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(t,"cenc",n.pssh,"expired")):this.warn("Could not renew expired session. Missing pssh initData."),this.removeSession(e)},E.getKeyIdString=function(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return Ye(e.keyId)},E.updateKeySession=function(e,t){var i=e.mediaKeysSession;return this.log('Updating key-session "'+i.sessionId+'" for keyID '+Ye((null==(e=e.decryptdata)?void 0:e.keyId)||[])+"\n } (data length: "+(t&&t.byteLength)+")"),i.update(t)},E.selectKeySystemFormat=function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},E.getKeyFormatPromise=function(r){var a=this;return new Promise(function(i,n){var t=Re(a.config),e=r.map(Le).filter(function(e){return!!e&&-1!==t.indexOf(e)});return a.getKeySystemSelectionPromise(e).then(function(e){var e=e.keySystem,t=Ce(e);t?i(t):n(new Error('Unable to find format for key-system "'+e+'"'))}).catch(n)})},E.loadKey=function(n){var r=this,a=n.keyInfo.decryptdata,e=this.getKeyIdString(a),s="(keyId: "+e+' format: "'+a.keyFormat+'" method: '+a.method+" uri: "+a.uri+")",t=(this.log("Starting session for key "+s),this.keyIdToKeySessionPromise[e]);return t||(t=this.keyIdToKeySessionPromise[e]=this.getKeySystemForKeyPromise(a).then(function(e){var t=e.keySystem,i=e.mediaKeys;return r.throwIfDestroyed(),r.log("Handle encrypted media sn: "+n.frag.sn+" "+n.frag.type+": "+n.frag.level+" using key "+s),r.attemptSetMediaKeys(t,i).then(function(){r.throwIfDestroyed();var e=r.createMediaKeySessionContext({keySystem:t,mediaKeys:i,decryptdata:a});return r.generateRequestWithPreferredKeySession(e,"cenc",a.pssh,"playlist-key")})})).catch(function(e){return r.handleError(e)}),t},E.throwIfDestroyed=function(e){if(!this.hls)throw new Error("invalid state")},E.handleError=function(e){this.hls&&(this.error(e.message),e instanceof xs?this.hls.trigger(ee.ERROR,e.data):this.hls.trigger(ee.ERROR,{type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))},E.getKeySystemForKeyPromise=function(e){var t=this.getKeyIdString(e),t=this.keyIdToKeySessionPromise[t];return t||(e=(t=Le(e.keyFormat))?[t]:Re(this.config),this.attemptKeySystemAccess(e))},E.getKeySystemSelectionPromise=function(e){if(0===(e=e.length?e:Re(this.config)).length)throw new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},E._onMediaEncrypted=function(e){var r,t,a=this,s=e.initDataType,o=e.initData;if(this.debug('"'+e.type+'" event: init data type: "'+s+'"'),null!==o){if("sinf"===s&&this.config.drmSystems[g.FAIRPLAY]){var i=v(new Uint8Array(o));try{var n=Ae(JSON.parse(i).sinf),l=et(new Uint8Array(n));if(!l)return;r=l.subarray(8,24),t=g.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{var u=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;var t={version:0,systemId:"",kids:null,data:null},i=new DataView(e),n=i.getUint32(0);if(e.byteLength!==n&&44<n)return null;if(1886614376!==i.getUint32(4))return null;if(t.version=i.getUint32(8)>>>24,1<t.version)return null;t.systemId=Ye(new Uint8Array(e,12,16));var r=i.getUint32(28);if(0===t.version){if(n-32<r)return null;t.data=new Uint8Array(e,32,r)}else if(1===t.version){t.kids=[];for(var a=0;a<r;a++)t.kids.push(new Uint8Array(e,32+16*a,16))}return t}(o);if(null===u)return;0===u.version&&u.systemId===ke&&u.data&&(r=u.data.subarray(8,24)),t=function(){if(u.systemId===ke)return g.WIDEVINE}()}if(t&&r){for(var h,d=Ye(r),c=this.keyIdToKeySessionPromise,f=this.mediaKeySessions,p=c[d],m=0;m<f.length&&(0===(h=function(){var e,t=f[m],i=t.decryptdata;return i.pssh||!i.keyId?0:(e=Ye(i.keyId),d===e||-1!==i.uri.replace(/-/g,"").indexOf(d)?(p=c[e],delete c[e],i.pssh=new Uint8Array(o),i.keyId=r,p=c[d]=p.then(function(){return a.generateRequestWithPreferredKeySession(t,s,o,"encrypted-event-key-match")}),1):void 0)}())||1!==h);m++);(p=p||(c[d]=this.getKeySystemSelectionPromise([t]).then(function(e){var t=e.keySystem,i=e.mediaKeys,n=(a.throwIfDestroyed(),new st("ISO-23001-7",d,null!=(e=Ce(t))?e:""));return n.pssh=new Uint8Array(o),n.keyId=r,a.attemptSetMediaKeys(t,i).then(function(){a.throwIfDestroyed();var e=a.createMediaKeySessionContext({decryptdata:n,keySystem:t,mediaKeys:i});return a.generateRequestWithPreferredKeySession(e,s,o,"encrypted-event-no-match")})}))).catch(function(e){return a.handleError(e)})}}},E._onWaitingForKey=function(e){this.log('"'+e.type+'" event')},E.attemptSetMediaKeys=function(e,t){var i=this,n=this.setMediaKeysQueue.slice(),r=(this.log('Setting media-keys for "'+e+'"'),Promise.all(n).then(function(){if(i.media)return i.media.setMediaKeys(t);throw new Error("Attempted to set mediaKeys without media element attached")}));return this.setMediaKeysQueue.push(r),r.then(function(){i.log('Media-keys set for "'+e+'"'),n.push(r),i.setMediaKeysQueue=i.setMediaKeysQueue.filter(function(e){return-1===n.indexOf(e)})})},E.generateRequestWithPreferredKeySession=function(n,e,t,i){var r,a,s,o=this,l=null==(l=this.config.drmSystems)||null==(l=l[n.keySystem])?void 0:l.generateRequest;if(l)try{var u=l.call(this.hls,e,t,n);if(!u)throw new Error("Invalid response from configured generateRequest filter");e=u.initDataType,t=n.decryptdata.pssh=u.initData?new Uint8Array(u.initData):null}catch(n){if(this.warn(n.message),null!=(l=this.hls)&&l.config.debug)throw n}return null===t?(this.log('Skipping key-session request for "'+i+'" (no initData)'),Promise.resolve(n)):(r=this.getKeyIdString(n.decryptdata),this.log('Generating key-session request for "'+i+'": '+r+" (init data type: "+e+" length: "+(t?t.byteLength:null)+")"),a=new Qr,n.mediaKeysSession.onmessage=function(e){var t,i=n.mediaKeysSession;i?(t=e.messageType,e=e.message,o.log('"'+t+'" message event for session "'+i.sessionId+'" message size: '+e.byteLength),"license-request"===t||"license-renewal"===t?o.renewLicense(n,e).cat
10ch(function(e){o.handleError(e),a.emit("error",e)}):"license-release"===t?n.keySystem===g.FAIRPLAY&&(o.updateKeySession(n,Ee("acknowledged")),o.removeSession(n)):o.warn('unhandled media key message type "'+t+'"')):a.emit("error",new Error("invalid state"))},n.mediaKeysSession.onkeystatuseschange=function(e){var t;n.mediaKeysSession?(o.onKeyStatusChange(n),t=n.keyStatus,a.emit("keyStatus",t),"expired"===t&&(o.warn(n.keySystem+" expired for key "+r),o.renewKeySession(n))):a.emit("error",new Error("invalid state"))},s=new Promise(function(t,i){a.on("error",i),a.on("keyStatus",function(e){e.startsWith("usable")?t():"output-restricted"===e?i(new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===e?i(new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+e+'"')):"expired"===e?i(new Error("key expired while generating request")):o.warn('unhandled key status change "'+e+'"')})}),n.mediaKeysSession.generateRequest(e,t).then(function(){var e;o.log('Request generated for key-session "'+(null==(e=n.mediaKeysSession)?void 0:e.sessionId)+'" keyId: '+r)}).catch(function(e){throw new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)}).then(function(){return s}).catch(function(e){throw a.removeAllListeners(),o.removeSession(n),e}).then(function(){return a.removeAllListeners(),n}))},E.onKeyStatusChange=function(i){var n=this;i.mediaKeysSession.keyStatuses.forEach(function(e,t){n.log('key status change "'+e+'" for keyStatuses keyId: '+Ye("buffer"in t?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t))+" session keyId: "+Ye(new Uint8Array(i.decryptdata.keyId||[]))+" uri: "+i.decryptdata.uri),i.keyStatus=e})},E.fetchServerCertificate=function(o){var t=this.config,i=new t.loader(t),l=this.getServerCertificateUrl(o);return l?(this.log('Fetching serverCertificate for "'+o+'"'),new Promise(function(r,a){var s={responseType:"arraybuffer",url:l},e=t.certLoadPolicy.default,e={loadPolicy:e,timeout:e.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0};i.load(s,e,{onSuccess:function(e,t,i,n){r(e.data)},onError:function(e,t,i,n){a(new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:i,response:m({url:s.url,data:void 0},e)},'"'+o+'" certificate request failed ('+l+"). Status: "+e.code+" ("+e.text+")"))},onTimeout:function(e,t,i){a(new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:i,response:{url:s.url,data:void 0}},'"'+o+'" certificate request timed out ('+l+")"))},onAbort:function(e,t,i){a(new Error("aborted"))}})})):Promise.resolve()},E.setMediaKeysServerCertificate=function(n,r,a){var s=this;return new Promise(function(t,i){n.setServerCertificate(a).then(function(e){s.log("setServerCertificate "+(e?"success":"not supported by CDM")+" ("+(null==a?void 0:a.byteLength)+') on "'+r+'"'),t(n)}).catch(function(e){i(new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))})})},E.renewLicense=function(t,e){var i=this;return this.requestLicense(t,new Uint8Array(e)).then(function(e){return i.updateKeySession(t,new Uint8Array(e)).catch(function(e){throw new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)})})},E.setupLicenseXHR=function(t,i,n,r){var a=this,s=this.config.licenseXhrSetup;return s?Promise.resolve().then(function(){if(n.decryptdata)return s.call(a.hls,t,i,n,r);throw new Error("Key removed")}).catch(function(e){if(n.decryptdata)return t.open("POST",i,!0),s.call(a.hls,t,i,n,r);throw e}).then(function(e){return t.readyState||t.open("POST",i,!0),{xhr:t,licenseChallenge:e||r}}):(t.open("POST",i,!0),Promise.resolve({xhr:t,licenseChallenge:r}))},E.requestLicense=function(s,o){var l=this,u=this.config.keyLoadPolicy.default;return new Promise(function(i,n){var r=l.getLicenseServerUrl(s.keySystem),a=(l.log("Sending license request to URL: "+r),new XMLHttpRequest);a.responseType="arraybuffer",a.onreadystatechange=function(){if(!l.hls||!s.mediaKeysSession)return n(new Error("invalid state"));if(4===a.readyState)if(200===a.status){l._requestLicenseFailureCount=0;var e=a.response,t=(l.log("License received "+(e instanceof ArrayBuffer?e.byteLength:e)),l.config.licenseResponseCallback);if(t)try{e=t.call(l.hls,a,r,s)}catch(e){l.error(e)}i(e)}else{var t=u.errorRetry,e=t?t.maxNumRetry:0;l._requestLicenseFailureCount++,l._requestLicenseFailureCount>e||400<=a.status&&a.status<500?n(new xs({type:te.KEY_SYSTEM_ERROR,details:ie.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:r,data:void 0,code:a.status,text:a.statusText}},"License Request XHR failed ("+r+"). Status: "+a.status+" ("+a.statusText+")")):(t=e-l._requestLicenseFailureCount+1,l.warn("Retrying license request, "+t+" attempts left"),l.requestLicense(s,o).then(i,n))}},s.licenseXhr&&s.licenseXhr.readyState!==XMLHttpRequest.DONE&&s.licenseXhr.abort(),s.licenseXhr=a,l.setupLicenseXHR(a,r,s,o).then(function(e){var t=e.xhr,e=e.licenseChallenge;t.send(e)})})},E.onMediaAttached=function(e,t){this.config.emeEnabled&&(t=t.media,(this.media=t).addEventListener("encrypted",this.onMediaEncrypted),t.addEventListener("waitingforkey",this.onWaitingForKey))},E.onMediaDetached=function(){var t=this,i=this.media,e=this.mediaKeySessions,n=(i&&(i.removeEventListener("encrypted",this.onMediaEncrypted),i.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},st.clearKeyUriToKeyIdMap(),e.length);Cs.CDMCleanupPromise=Promise.all(e.map(function(e){return t.removeSession(e)}
10).concat(null==i?void 0:i.setMediaKeys(null).catch(function(e){t.log("Could not clear media keys: "+e+". media.src: "+(null==i?void 0:i.src))}))).then(function(){n&&(t.log("finished closing key sessions and clearing media keys"),e.length=0)}).catch(function(e){t.log("Could not close sessions and clear media keys: "+e+". media.src: "+(null==i?void 0:i.src))})},E.onManifestLoading=function(){this.keyFormatPromise=null},E.onManifestLoaded=function(e,t){var t=t.sessionKeys;t&&this.config.emeEnabled&&!this.keyFormatPromise&&(t=t.reduce(function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e},[]),this.log("Selecting key-system from session-keys "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t))},E.removeSession=function(e){var t=this,i=e.mediaKeysSession,n=e.licenseXhr;if(i)return this.log("Remove licenses and keys and close session "+i.sessionId),i.onmessage=null,i.onkeystatuseschange=null,n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0,-1<(n=this.mediaKeySessions.indexOf(e))&&this.mediaKeySessions.splice(n,1),i.remove().catch(function(e){t.log("Could not remove session: "+e)}).then(function(){return i.close()}).catch(function(e){t.log("Could not close session: "+e)})},Cs);function Cs(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=Cs.CDMCleanupPromise?[Cs.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=ne.debug.bind(ne,ks),this.log=ne.log.bind(ne,ks),this.warn=ne.warn.bind(ne,ks),this.error=ne.error.bind(ne,ks),this.hls=e,this.config=e.config,this.registerListeners()}function Rs(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}function Is(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}E.CDMCleanupPromise=void 0;e(js,Ps=D(Error));var Ps,xs=js,Ds="m",Ms="a",Bs="v",Fs="av",Os=((Os=Ns.prototype).registerListeners=function(){var e=this.hls;e.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ee.MEDIA_DETACHED,this.onMediaDetached,this),e.on(ee.BUFFER_CREATED,this.onBufferCreated,this)},Os.unregisterListeners=function(){var e=this.hls;e.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ee.MEDIA_DETACHED,this.onMediaDetached,this),e.off(ee.BUFFER_CREATED,this.onBufferCreated,this)},Os.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},Os.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},Os.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},Os.onBufferCreated=function(e,t){var i;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(i=t.tracks.video)?void 0:i.buffer},Os.createData=function(){var e;return{v:1,sf:"h",sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},Os.apply=function(e,t){$(t=void 0===t?{}:t,this.createData());var i="i"===t.ot||t.ot===Bs||t.ot===Fs;this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering),this.useHeaders?(i=Ns.toHeaders(t),Object.keys(i).length&&(e.headers||(e.headers={}),$(e.headers,i))):(i=Ns.toQuery(t))&&(e.url=Ns.appendQueryToUri(e.url,i))},Os.getObjectType=function(e){var t=e.type;return"subtitle"===t?"tt":"initSegment"===e.sn?"i":"audio"===t?Ms:"main"===t?this.hls.audioTracks.length?Bs:Fs:void 0},Os.getTopBandwidth=function(e){for(var t=0,i=this.hls,n=B(e===Ms?i.audioTracks:(e=-1<(e=i.maxAutoLevel)?e+1:i.levels.length,i.levels.slice(0,e)));!(r=n()).done;){var r=r.value;r.bitrate>t&&(t=r.bitrate)}return 0<t?t:NaN},Os.getBufferLength=function(e){var t=this.hls.media,e=e===Ms?this.audioBuffer:this.videoBuffer;return e&&t?1e3*y.bufferInfo(e,t.currentTime,this.config.maxBufferHole).len:NaN},Os.createPlaylistLoader=function(){var e=this.config.pLoader,n=this.applyPlaylistData,t=e||this.config.loader;return(e=i.prototype).destroy=function(){this.loader.destroy()},e.abort=function(){this.loader.abort()},e.load=function(e,t,i){n(e),this.loader.load(e,t,i)},r(i,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),i;function i(e){this.loader=void 0,this.loader=new t(e)}}
10,Os.createFragmentLoader=function(){var e=this.config.fLoader,n=this.applyFragmentData,t=e||this.config.loader;return(e=i.prototype).destroy=function(){this.loader.destroy()},e.abort=function(){this.loader.abort()},e.load=function(e,t,i){n(e),this.loader.load(e,t,i)},r(i,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),i;function i(e){this.loader=void 0,this.loader=new t(e)}},Ns.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)},Ns.serialize=function(e){for(var t=[],i=function(e){return Math.round(e)},n=function(e){return 100*i(e/100)},r={br:i,d:i,bl:n,dl:n,mtp:n,nor:function(e){return encodeURIComponent(e)},rtp:n,tb:i},a=B(Object.keys(e||{}).sort());!(l=a()).done;){var s,o,l=l.value,u=e[l];s=u,Number.isNaN(s)||null==s||""===s||!1===s||"v"===l&&1===u||"pr"==l&&1===u||(s=typeof(u=(s=r[l])?s(u):u),o=void 0,o="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"==s?l:"number"==s?l+"="+u:l+"="+JSON.stringify(u),t.push(o))}return t.join(",")},Ns.toHeaders=function(e){for(var t={},i=["Object","Request","Session","Status"],n=[{},{},{},{}],r={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},a=0,s=Object.keys(e);a<s.length;a++){var o=s[a];n[null!=r[o]?r[o]:1][o]=e[o]}for(var l=0;l<n.length;l++){var u=Ns.serialize(n[l]);u&&(t["CMCD-"+i[l]]=u)}return t},Ns.toQuery=function(e){return"CMCD="+encodeURIComponent(Ns.serialize(e))},Ns.appendQueryToUri=function(e,t){var i;return t?(i=e.includes("?")?"&":"?",e+i+t):e},Ns),b=((b=Us.prototype).registerListeners=function(){var e=this.hls;e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ee.ERROR,this.onError,this)},b.unregisterListeners=function(){var e=this.hls;e&&(e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ee.ERROR,this.onError,this))},b.startLoad=function(){var e;this.started=!0,this.clearTimeout(),this.enabled&&this.uri&&(this.updated?(e=Math.max(1e3*this.timeToLoad-(performance.now()-this.updated),0),this.scheduleRefresh(this.uri,e)):this.loadSteeringManifest(this.uri))},b.stopLoad=function(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()},b.clearTimeout=function(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)},b.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null},b.removeLevel=function(t){var e=this.levels;e&&(this.levels=e.filter(function(e){return e!==t}))},b.onManifestLoading=function(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null},b.onManifestLoaded=function(e,t){t=t.contentSteering;null!==t&&(this.pathwayId=t.pathwayId,this.uri=t.uri,this.started)&&this.startLoad()},b.onManifestParsed=function(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks},b.onError=function(e,t){var i,n,t=t.errorAction;2===(null==t?void 0:t.action)&&1===t.flags&&(i=this.pathwayPriority,n=this.pathwayId,this.penalizedPathways[n]||(this.penalizedPathways[n]=performance.now()),i=!i&&this.levels?this.levels.reduce(function(e,t){return-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e},[]):i)&&1<i.length&&(this.updatePathwayPriority(i),t.resolved=this.pathwayId!==n)},b.filterParsedLevels=function(e){this.levels=e;var t,i=this.getLevelsForPathway(this.pathwayId);return 0===i.length&&(t=e[0].pathwayId,this.log("No levels found in Pathway "+this.pathwayId+'. Setting initial Pathway to "'+t+'"'),i=this.getLevelsForPathway(t),this.pathwayId=t),i.length!==e.length?(this.log("Found "+i.length+"/"+e.length+' levels in Pathway "'+this.pathwayId+'"'),i):e},b.getLevelsForPathway=function(t){return null===this.levels?[]:this.levels.filter(function(e){return t===e.pathwayId})},b.updatePathwayPriority=function(e){this.pathwayPriority=e;var t,i=this.penalizedPathways,n=performance.now();
10Object.keys(i).forEach(function(e){3e5<n-i[e]&&delete i[e]});for(var r=0;r<e.length;r++){var a=e[r];if(!i[a]){if(a===this.pathwayId)return;var s=this.hls.nextLoadLevel,o=this.hls.levels[s];if(0<(t=this.getLevelsForPathway(a)).length){this.log('Setting Pathway to "'+a+'"'),this.pathwayId=a,this.hls.trigger(ee.LEVELS_UPDATED,{levels:t});a=this.hls.levels[s];o&&a&&this.levels&&(a.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&a.bitrate!==o.bitrate&&this.log("Unstable Pathways change from bitrate "+o.bitrate+" to "+a.bitrate),this.hls.nextLoadLevel=s);break}}}},b.clonePathways=function(e){var s,o,i=this,n=this.levels;n&&(s={},o={},e.forEach(function(e){var r=e.ID,t=e["BASE-ID"],a=e["URI-REPLACEMENT"];n.some(function(e){return e.pathwayId===r})||(e=i.getLevelsForPathway(t).map(function(e){var t=$({},e),e=(t.details=void 0,t.url=Vs(e.uri,e.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",a),new V(e.attrs)),i=(e["PATHWAY-ID"]=r,e.AUDIO&&e.AUDIO+"_clone_"+r),n=e.SUBTITLES&&e.SUBTITLES+"_clone_"+r,e=(i&&(s[e.AUDIO]=i,e.AUDIO=i),n&&(o[e.SUBTITLES]=n,e.SUBTITLES=n),t.attrs=e,new ni(t));return li(e,"audio",i),li(e,"text",n),e}),n.push.apply(n,e),Gs(i.audioTracks,s,a,r),Gs(i.subtitleTracks,o,a,r))}))},b.loadSteeringManifest=function(e){var l,u=this,t=this.hls.config,i=t.loader;this.loader&&this.loader.destroy(),this.loader=new i(t);try{l=new self.URL(e)}catch(l){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: "+e)}"data:"!==l.protocol&&(i=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate),l.searchParams.set("_HLS_pathway",this.pathwayId),l.searchParams.set("_HLS_throughput",""+i));e={responseType:"json",url:l.href},i=t.steeringManifestLoadPolicy.default,t=i.errorRetry||i.timeoutRetry||{},i={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:t.maxNumRetry||0,retryDelay:t.retryDelayMs||0,maxRetryDelay:t.maxRetryDelayMs||0},t={onSuccess:function(e,t,i,n){u.log('Loaded steering manifest: "'+l+'"');var r=e.data;if(1===r.VERSION){u.updated=performance.now(),u.timeToLoad=r.TTL;var a=r["RELOAD-URI"],s=r["PATHWAY-CLONES"],o=r["PATHWAY-PRIORITY"];if(a)try{u.uri=new self.URL(a,l).href}catch(e){return u.enabled=!1,void u.log("Failed to parse Steering Manifest RELOAD-URI: "+a)}u.scheduleRefresh(u.uri||i.url),s&&u.clonePathways(s);a={steeringManifest:r,url:l.toString()};u.hls.trigger(ee.STEERING_MANIFEST_LOADED,a),o&&u.updatePathwayPriority(o)}else u.log("Steering VERSION "+r.VERSION+" not supported!")},onError:function(e,t,i,n){var r;u.log("Error loading steering manifest: "+e.code+" "+e.text+" ("+t.url+")"),u.stopLoad(),410===e.code?(u.enabled=!1,u.log("Steering manifest "+t.url+" no longer available")):(r=1e3*u.timeToLoad,429!==e.code?u.scheduleRefresh(u.uri||t.url,r):("function"==typeof(null==(e=u.loader)?void 0:e.getResponseHeader)&&(e=e.getResponseHeader("Retry-After"))&&(r=1e3*parseFloat(e)),u.log("Steering manifest "+t.url+" rate limited")))},onTimeout:function(e,t,i){u.log("Timeout loading steering manifest ("+t.url+")"),u.scheduleRefresh(u.uri||t.url)}};this.log("Requesting steering manifest: "+l),this.loader.load(e,i,t)},b.scheduleRefresh=function(e,t){var i=this;void 0===t&&(t=1e3*this.timeToLoad),this.clearTimeout(),this.reloadTimer=self.setTimeout(function(){i.loadSteeringManifest(e)},t)},Us);function Us(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=ne.log.bind(ne,"[content-steering]:"),this.registerListeners()}function Ns(e){var a=this,e=(this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(e){try{a.apply(e,{ot:Ds,su:!a.initialized})}catch(e){ne.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,i=a.hls.levels[t.level],n=a.getObjectType(t),r={d:1e3*t.duration,ot:n};n!==Bs&&n!==Ms&&n!=Fs||(r.br=i.bitrate/1e3,r.tb=a.getTopBandwidth(n)/1e3,r.bl=a.getBufferLength(n)),a.apply(e,r)}catch(e){ne.warn("Could not generate segment CMCD data.",e)}},this.hls=e,this.config=e.config),t=e.cmcd;null!=t&&(e.pLoader=this.createPlaylistLoader(),e.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||Ns.uuid(),this.cid=t.contentId,this.useHeaders=!0===t.useHeaders,this.registerListeners())}function js(e,t){var i;return(i=Ps.call(this,t)||this).data=void 0,e.error||(e.error=new Error(t)),(i.data=e).err=e.error,i}
10function Gs(t,n,r,a){t&&Object.keys(n).forEach(function(i){var e=t.filter(function(e){return e.groupId===i}).map(function(e){var t=$({},e);return t.details=void 0,t.attrs=new V(t.attrs),t.url=t.attrs.URI=Vs(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",r),t.groupId=t.attrs["GROUP-ID"]=n[i],t.attrs["PATHWAY-ID"]=a,t});t.push.apply(t,e)})}function Vs(e,t,i,n){var r,a=n.HOST,s=n.PARAMS,n=n[i],o=(t&&(r=null==n?void 0:n[t])&&(e=r),new self.URL(e));return a&&!r&&(o.host=a),s&&Object.keys(s).sort().forEach(function(e){e&&o.searchParams.set(e,s[e])}),o.href}var Hs=/^age:\s*[\d.]+\s*$/im,Ys=((w=Ks.prototype).destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null,this.stats=null},w.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState)&&(this.stats.aborted=!0,e.abort())},w.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},w.load=function(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()},w.loadInternal=function(){var t,i,n,r=this,e=this.config,a=this.context;e&&a&&(t=this.loader=new self.XMLHttpRequest,(i=this.stats).loading.first=0,i.loaded=0,i.aborted=!1,(n=this.xhrSetup)?Promise.resolve().then(function(){if(!r.stats.aborted)return n(t,a.url)}).catch(function(e){return t.open("GET",a.url,!0),n(t,a.url)}).then(function(){r.stats.aborted||r.openAndSendXhr(t,a,e)}).catch(function(e){r.callbacks.onError({code:t.status,text:e.message},a,t,i)}):this.openAndSendXhr(t,a,e))},w.openAndSendXhr=function(e,t,i){e.readyState||e.open("GET",t.url,!0),t.url.includes("playerId")&&(t.responseType="text");var n=t.headers,r=i.loadPolicy,a=r.maxTimeToFirstByteMs,r=r.maxLoadTimeMs;if(n)for(var s in n)e.setRequestHeader(s,n[s]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=a&&G(a)?a:r,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()},w.readystatechange=function(){var e,t,i,n,r=this.context,a=this.loader,s=this.stats;r&&a&&(t=a.readyState,e=this.config,!s.aborted)&&2<=t&&(0===s.loading.first&&(s.loading.first=Math.max(self.performance.now(),s.loading.start),e.timeout!==e.loadPolicy.maxLoadTimeMs)&&(self.clearTimeout(this.requestTimeout),e.timeout=e.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.loadPolicy.maxLoadTimeMs-(s.loading.first-s.loading.start))),4===t)&&(self.clearTimeout(this.requestTimeout),a.onreadystatechange=null,a.onprogress=null,t=a.status,n="text"!==a.responseType,200<=t&&t<300&&(n&&a.response||null!==a.responseText)?(s.loading.end=Math.max(self.performance.now(),s.loading.first),n=n?a.response:a.responseText,i="arraybuffer"===a.responseType?n.byteLength:n.length,s.loaded=s.total=i,s.bwEstimate=8e3*s.total/(s.loading.end-s.loading.first),this.callbacks&&((i=this.callbacks.onProgress)&&i(s,r,n,a),this.callbacks)&&(i={url:a.responseURL,data:n,code:t},this.callbacks.onSuccess(i,s,r,a))):Ai(n=e.loadPolicy.errorRetry,s.retry,!1,t)?this.retry(n):(ne.error(t+" while loading "+r.url),this.callbacks.onError({code:t,text:a.statusText},r,a,s)))},w.loadtimeout=function(){var e=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;Ai(e,this.stats.retry,!0)?this.retry(e):(ne.warn("timeout while loading "+(null==(e=this.context)?void 0:e.url)),(e=this.callbacks)&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader)))},w.retry=function(e){var t=this.context,i=this.stats;this.retryDelay=yi(e,i.retry),i.retry++,ne.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+(null==t?void 0:t.url)+", retrying "+i.retry+"/"+e.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},w.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},w.getCacheAge=function(){var e,t=null;return t=this.loader&&Hs.test(this.loader.getAllResponseHeaders())?(e=this.loader.getResponseHeader("age"))?parseFloat(e):null:t},w.getResponseHeader=function(e){return this.loader&&new RegExp("^"+e+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null},Ks),zs=/(\d+)-(\d+)\/(\d+)/,Ws=((w=Qs.prototype).destroy=function(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null},w.abortInternal=function(){var e=this.response;!this.controller||null!=e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},w.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},w.load=function(n,r,a){var s=this,o=this.stats;if(o.loading.start)throw new Error("Loader can only be used once.");o.loading.start=self.performance.now();var e=function(e,t){t={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers($({},e.headers))};return e.rangeEnd&&t.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),t}(n,this.controller.signal),l=a.onProgress,u="arraybuffer"===n.responseType,h=u?"byteLength":"length",t=r.loadPolicy,i=t.maxTimeToFirstByteMs,d=t.maxLoadTimeMs;this.context=n,this.config=r,this.callbacks=a,this.request=this.fetchSetup(n,e),self.clearTimeout(this.requestTimeout),r.timeout=i&&G(i)?i:d,this.requestTimeout=self.setTimeout(function(){s.abortInternal(),a.onTimeout(o,n,s.response)},r.timeout),self.fetch(this.request).then(function(e){s.response=s.loader=e;var t,i=Math.max(self.performance.now(),o.loading.start);
10if(self.clearTimeout(s.requestTimeout),r.timeout=d,s.requestTimeout=self.setTimeout(function(){s.abortInternal(),a.onTimeout(o,n,s.response)},d-(i-o.loading.start)),e.ok)return o.loading.first=i,o.total=function(e){var t=e.get("Content-Range");if(t){var i=function(){var e=zs.exec(t);if(e)return parseInt(e[2])-parseInt(e[1])+1}();if(G(i))return i}i=e.get("Content-Length");if(i)return parseInt(i)}(e.headers)||o.total,l&&G(r.highWaterMark)?s.loadProgressively(e,o,n,r.highWaterMark,l):u?e.arrayBuffer():"json"===n.responseType?e.json():e.text();throw i=e.status,t=e.statusText,new Zs(t||"fetch, bad network response",i,e)}).then(function(e){var t=s.response;if(!t)throw new Error("loader destroyed");self.clearTimeout(s.requestTimeout),o.loading.end=Math.max(self.performance.now(),o.loading.first);var i=e[h],i=(i&&(o.loaded=o.total=i),{url:t.url,data:e,code:t.status});l&&!G(r.highWaterMark)&&l(o,n,e,t),a.onSuccess(i,o,n,t)}).catch(function(e){var t,i;self.clearTimeout(s.requestTimeout),o.aborted||(t=e&&e.code||0,i=e?e.message:null,a.onError({code:t,text:i},n,e?e.details:null,o))})},w.getCacheAge=function(){var e,t=null;return t=this.response?(e=this.response.headers.get("age"))?parseFloat(e):null:t},w.getResponseHeader=function(e){return this.response?this.response.headers.get(e):null},w.loadProgressively=function(n,r,a,s,o){void 0===s&&(s=0);var l=new gn,e=n.body.getReader();return function i(){return e.read().then(function(e){var t;return e.done?(l.dataLength&&o(r,a,l.flush(),n),Promise.resolve(new ArrayBuffer(0))):(t=(e=e.value).length,r.loaded+=t,t<s||l.dataLength?(l.push(e),l.dataLength>=s&&o(r,a,l.flush(),n)):o(r,a,e,n),i())}).catch(function(){return Promise.reject()})}()},Qs);function Qs(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||Js,this.controller=new self.AbortController,this.stats=new ue}function Ks(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new ue,this.retryDelay=0}function Js(e,t){return new self.Request(e.url,t)}e(to,Xs=D(Error));var qs,Xs,Zs=to,$s=/\s/,eo=m(m({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Ys,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:n,bufferController:s,capLevelController:l,errorController:t,fpsController:p,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Ie,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3}
10,{cueHandler:{newCue:function(t,e,i,n){for(var r,a,s,o,l=[],u=self.VTTCue||self.TextTrackCue,h=0;h<n.rows.length;h++)if(a=!0,s=0,o="",!(r=n.rows[h]).isEmpty()){for(var d,c=0;c<r.chars.length;c++)$s.test(r.chars[c].uchar)&&a?s++:(o+=r.chars[c].uchar,a=!1);(r.cueStartTime=e)===i&&(i+=1e-4),16<=s?s--:s++;var f=us(o.trim()),p=ms(e,i,f);null!=t&&null!=(d=t.cues)&&d.getCueById(p)||((d=new u(e,i,f)).id=p,d.line=h+1,d.align="left",d.position=10+Math.min(80,10*Math.floor(8*s/32)),l.push(d))}return t&&l.length&&(l.sort(function(e,t){return"auto"===e.line||"auto"===t.line?0:8<e.line&&8<t.line?t.line-e.line:e.line-t.line}),l.forEach(function(e){return zt(t,e)})),l}},enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:h,subtitleTrackController:a,timelineController:u,audioStreamController:Jn,audioTrackController:o,emeController:E,cmcdController:Os,contentSteeringController:b});function to(e,t,i){return(e=Xs.call(this,e)||this).code=void 0,e.details=void 0,e.code=t,e.details=i,e}function io(i){return i&&"object"==typeof i?Array.isArray(i)?i.map(io):Object.keys(i).reduce(function(e,t){return e[t]=io(i[t]),e},{}):i}e(ao,no=i),(w=ao.prototype)._registerListeners=function(){var e=this.hls;e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ee.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(ee.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(ee.FRAG_LOADED,this.onFragLoaded,this),e.on(ee.ERROR,this.onError,this)},w._unregisterListeners=function(){var e=this.hls;e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ee.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(ee.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(ee.FRAG_LOADED,this.onFragLoaded,this),e.off(ee.ERROR,this.onError,this)},w.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),no.prototype.destroy.call(this)},w.stopLoad=function(){this._levels.forEach(function(e){e.loadError=0,e.fragmentError=0}),no.prototype.stopLoad.call(this)},w.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]},w.onManifestLoading=function(e,t){this.resetLevels()},w.onManifestLoaded=function(e,t){var o,l=[],u={};t.levels.forEach(function(e){var t=e.attrs,i=(-1!==(null==(i=e.audioCodec)?void 0:i.indexOf("mp4a.40.34"))&&(qs=qs||/chrome|firefox/i.test(navigator.userAgent))&&(e.audioCodec=void 0),e.audioCodec&&(e.audioCodec=At(e.audioCodec)),t.AUDIO),n=t.CODECS,r=t["FRAME-RATE"],a=t["PATHWAY-ID"],s=t.RESOLUTION,t=t.SUBTITLES,a=(a||".")+"-"+e.bitrate+"-"+s+"-"+r+"-"+n;(o=u[a])?o.addFallback(e):(o=new ni(e),u[a]=o,l.push(o)),li(o,"audio",i),li(o,"text",t)}),this.filterAndSortMediaOptions(l,t)},w.filterAndSortMediaOptions=function(t,i){var n=this,e=[],r=[],a=!1,s=!1,o=!1,l=t.filter(function(e){var t=e.audioCodec,i=e.videoCodec,n=e.width,r=e.height,e=e.unknownCodecs;return a=a||!(!n||!r),s=s||!!i,o=o||!!t,!(null!=e&&e.length)&&(!t||gt(t,"audio"))&&(!i||gt(i,"video"))});if(0!==(l=(a||s)&&o?l.filter(function(e){var t=e.videoCodec,i=e.width,e=e.height;return!!t||!(!i||!e)}):l).length){i.audioTracks&&so(e=i.audioTracks.filter(function(e){return!e.audioCodec||gt(e.audioCodec,"audio")})),i.subtitles&&so(r=i.subtitles);var u=l.slice(0),h=(l.sort(function(e,t){return e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs["FRAME-RATE"]!==t.attrs["FRAME-RATE"]?e.attrs.decimalFloatingPoint("FRAME-RATE")-t.attrs.decimalFloatingPoint("FRAME-RATE"):e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):a&&e.height!==t.height?e.height-t.height:0}),u[0]);if(this.steering&&(l=this.steering.filterParsedLevels(l)).length!==u.length)for(var d=0;d<u.length;d++)if(u[d].pathwayId===l[0].pathwayId){h=u[d];break}this._levels=l;for(var c=0;c<l.length;c++)if(l[c]===h){this._firstLevel=c;var f,p=h.bitrate,m=this.hls.bandwidthEstimate;this.log("manifest loaded, "+l.length+" level(s) found, first bitrate: "+p),void 0===(null==(f=this.hls.userConfig)?void 0:f.abrEwmaDefaultEstimate)&&m<(f=Math.min(p,this.hls.config.abrEwmaDefaultEstimateMax))&&m===eo.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=f);break}var g=o&&!s,r={levels:l,audioTracks:e,subtitleTracks:r,sessionData:i.sessionData,sessionKeys:i.sessionKeys,firstLevel:this._firstLevel,stats:i.stats,audio:o,video:s,altAudio:!g&&e.some(function(e){return!!e.url})};this.hls.trigger(ee.MANIFEST_PARSED,r),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else Promise.resolve().then(function(){var e;n.hls&&(t.length&&n.warn('One or more CODECS in variant not supported: "'+t[0].attrs.CODECS+'"'),e=new Error("no level with compatible codecs found in manifest"),n.hls.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:i.url,error:e,reason:e.message}))})},w.onError=function(e,t){!t.fatal&&t.context&&t.context.type===Bt&&t.context.level===this.level&&this.checkRetry(t)},w.onFragLoaded=function(e,t){var t=t.frag;void 0!==t&&t.type===_&&void 0!==(t=this._levels[t.level])&&(t.loadError=0)},w.onLevelLoaded=function(e,t){var i=t.level,n=t.details,r=this._levels[i];r?i===this.currentLevelIndex?(0===r.fragmentError&&(r.loadError=0),this.playlistLoaded(i,t,r.details)):null!=(r=t.deliveryDirectives)&&r.skip&&(n.deltaUpdateFailed=!0):(this.warn("Invalid level index "+i),null!=(r=t.deliveryDirectives)&&r.skip&&(n.deltaUpdateFailed=!0))},w.onAudioTrackSwitched=function(e,t){var i=this.currentLevel;if(i){var n=this.hls.audioTracks[t.id].groupId;if(i.audioGroupIds&&i.audioGroupId!==n){for(var r=-1,a=0;a<i.audioGroupIds.length;a++)if(i.audioGroupIds[a]===n){r=a;break}-1!==r&&r!==i.urlId&&(i.urlId=r,this.canLoad)&&this.startLoad()}}},w.loadPlaylist=function(e){no.prototype.loadPlaylist.call(this);var t=this.currentLevelIndex,i=this.currentLevel;if(i&&this.shouldLoadPlaylist(i)){var n=i.urlId,r=i.uri;if(e)try{r=e.addDirectives(r)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}var a=i.attrs["PATHWAY-ID"];this.log("Loading level index "+t+(void 0!==(null==e?void 0:e.msn)?" at sn "+e.msn+" part "+e.part:"")+" with"+(a?" Pathway "+a:"")+" URI "+(n+1)+"/"+i.url.length+" "+r),this.clearTimer(),this.hls.trigger(ee.LEVEL_LOADING,{url:r,level:t,id:n,deliveryDirectives:e||null})}},w.removeLevel=function(i,n){function r(e,t){return t!==n}var a=this,e=this._levels.filter(function(e,t){return t!==i||(1<e.url.length&&void 0!==n?(e.url=e.url.filter(r),e.audioGroupIds&&(e.audioGroupIds=e.audioGroupIds.filter(r)),e.textGroupIds&&(e.textGroupIds=e.textGroupIds.filter(r)),!(e.urlId=0)):(a.steering&&a.steering.removeLevel(e),!1))});this.hls.trigger(ee.LEVELS_UPDATED,{levels:e})},w.onLevelsUpdated=function(e,t){t=t.levels;t.forEach(function(e,t){e=e.details;
10null!=e&&e.fragments&&e.fragments.forEach(function(e){e.level=t})}),this._levels=t},r(ao,[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;if(0!==t.length){if(e<0||e>=t.length){var i=new Error("invalid level idx"),n=e<0;if(this.hls.trigger(ee.ERROR,{type:te.OTHER_ERROR,details:ie.LEVEL_SWITCH_ERROR,level:e,fatal:n,error:i,reason:i.message}),n)return;e=Math.min(e,t.length-1)}var i=this.currentLevelIndex,n=this.currentLevel,r=n?n.attrs["PATHWAY-ID"]:void 0,t=t[e],a=t.attrs["PATHWAY-ID"];this.currentLevelIndex=e,this.currentLevel=t,i===e&&t.details&&n&&r===a||(this.log("Switching to level "+e+(a?" with Pathway "+a:"")+" from level "+i+(r?" with Pathway "+r:"")),delete(a=$({},t,{level:e,maxBitrate:t.maxBitrate,attrs:t.attrs,uri:t.uri,urlId:t.urlId}))._attrs,delete a._urlId,delete a._avgBitrate,this.hls.trigger(ee.LEVEL_SWITCHING,a),(i=t.details)&&!i.live)||(r=this.switchParams(t.uri,null==n?void 0:n.details),this.loadPlaylist(r))}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){var e;return void 0===this._startLevel?void 0!==(e=this.hls.config.startLevel)?e:this._firstLevel:this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}]);var no,w,ro=ao;function ao(e,t){return(e=no.call(this,e,"[level-controller]")||this)._levels=[],e._firstLevel=-1,e._startLevel=void 0,e.currentLevel=null,e.currentLevelIndex=-1,e.manualLevelIndex=-1,e.steering=void 0,e.onParsedComplete=void 0,e.steering=t,e._registerListeners(),e}function so(e){var i={};e.forEach(function(e){var t=e.groupId||"";e.id=i[t]=i[t]||0,i[t]++})}var oo,lo,uo,ho,co,fo,po,mo,go,_o,yo,vo,Ao,Eo,bo,wo,So,To,Lo,ko,Co,Ro,Io,Po,n={exports:{}}; 11/*! MIT License. Copyright 2015-2018 Richard Moore <[email protected]>. See LICENSE.txt. */function xo(e){return parseInt(e)===e}function Do(e){if(xo(e.length)){for(var t=0;t<e.length;t++)if(!xo(e[t])||e[t]<0||255<e[t])return;return 1}}function S(e,t){if(e.buffer&&"Uint8Array"===e.name)return e=t?e.slice?e.slice():Array.prototype.slice.call(e):e;if(Array.isArray(e)){if(Do(e))return new Uint8Array(e);throw new Error("Array contains invalid value: "+e)}if(xo(e.length)&&Do(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function T(e){return new Uint8Array(e)}function Mo(e,t,i,n,r){null==n&&null==r||(e=e.slice?e.slice(n,r):Array.prototype.slice.call(e,n,r)),t.set(e,i)}function Bo(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}s=n,l={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var n=e.charCodeAt(i++);37===n?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(n)}return S(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var n=e[i];n<128?(t.push(String.fromCharCode(n)),i++):191<n&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},oo="0123456789abcdef",t={toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(oo[(240&n)>>4]+oo[15&n])}return t.join("")}},lo={16:10,24:12,32:14},uo=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ho=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,23
111,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],co=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],fo=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,16733
1113503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],po=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],mo=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389
11623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],go=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],_o=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,
11632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],yo=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],vo=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,12974
1103050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Ao=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,60
117398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Eo=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],bo=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,12
1101765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],wo=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],So=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861
vendor: 4,886 bytes, line 11
11748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925],(To=function(e){if(!(this instanceof To))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:S(e,!0)}),this._prepare()}).prototype._prepare=function(){var e=lo[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var i,n=4*(e+1),r=this.key.length/4,a=Bo(this.key),t=0;t<r;t++)this._Ke[i=t>>2][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var s,o=0,l=r;l<n;){if(s=a[r-1],a[0]^=ho[s>>16&255]<<24^ho[s>>8&255]<<16^ho[255&s]<<8^ho[s>>24&255]^uo[o]<<24,o+=1,8!=r)for(t=1;t<r;t++)a[t]^=a[t-1];else{for(t=1;t<r/2;t++)a[t]^=a[t-1];for(s=a[r/2-1],a[r/2]^=ho[255&s]^ho[s>>8&255]<<8^ho[s>>16&255]<<16^ho[s>>24&255]<<24,t=r/2+1;t<r;t++)a[t]^=a[t-1]}for(t=0;t<r&&l<n;)this._Ke[u=l>>2][h=l%4]=a[t],this._Kd[e-u][h]=a[t++],l++}for(var u=1;u<e;u++)for(var h=0;h<4;h++)s=this._Kd[u][h],this._Kd[u][h]=Eo[s>>24&255]^bo[s>>16&255]^wo[s>>8&255]^So[255&s]},To.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],n=Bo(e),r=0;r<4;r++)n[r]^=this._Ke[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=fo[n[r]>>24&255]^po[n[(r+1)%4]>>16&255]^mo[n[(r+2)%4]>>8&255]^go[255&n[(r+3)%4]]^this._Ke[a][r];n=i.slice()}for(var s,o=T(16),r=0;r<4;r++)s=this._Ke[t][r],o[4*r]=255&(ho[n[r]>>24&255]^s>>24),o[4*r+1]=255&(ho[n[(r+1)%4]>>16&255]^s>>16),o[4*r+2]=255&(ho[n[(r+2)%4]>>8&255]^s>>8),o[4*r+3]=255&(ho[255&n[(r+3)%4]]^s);return o},To.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],n=Bo(e),r=0;r<4;r++)n[r]^=this._Kd[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=_o[n[r]>>24&255]^yo[n[(r+3)%4]>>16&255]^vo[n[(r+2)%4]>>8&255]^Ao[255&n[(r+1)%4]]^this._Kd[a][r];n=i.slice()}for(var s,o=T(16),r=0;r<4;r++)s=this._Kd[t][r],o[4*r]=255&(co[n[r]>>24&255]^s>>24),o[4*r+1]=255&(co[n[(r+3)%4]>>16&255]^s>>16),o[4*r+2]=255&(co[n[(r+2)%4]>>8&255]^s>>8),o[4*r+3]=255&(co[255&n[(r+1)%4]]^s);return o},(Lo=function(e){if(!(this instanceof Lo))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new To(e)}).prototype.encrypt=function(e){if((e=S(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=T(e.length),i=T(16),n=0;n<e.length;
11n+=16)Mo(e,i,0,n,n+16),Mo(i=this._aes.encrypt(i),t,n);return t},Lo.prototype.decrypt=function(e){if((e=S(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=T(e.length),i=T(16),n=0;n<e.length;n+=16)Mo(e,i,0,n,n+16),Mo(i=this._aes.decrypt(i),t,n);return t},(ko=function(e,t){if(!(this instanceof ko))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=T(16);this._lastCipherblock=S(t,!0),this._aes=new To(e)}).prototype.encrypt=function(e){if((e=S(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=T(e.length),i=T(16),n=0;n<e.length;n+=16){Mo(e,i,0,n,n+16);for(var r=0;r<16;r++)i[r]^=this._lastCipherblock[r];this._lastCipherblock=this._aes.encrypt(i),Mo(this._lastCipherblock,t,n)}return t},ko.prototype.decrypt=function(e){if((e=S(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=T(e.length),i=T(16),n=0;n<e.length;n+=16){Mo(e,i,0,n,n+16);for(var i=this._aes.decrypt(i),r=0;r<16;r++)t[n+r]=i[r]^this._lastCipherblock[r];Mo(e,this._lastCipherblock,0,n,n+16)}return t},(Co=function(e,t,i){if(!(this instanceof Co))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=T(16);this.segmentSize=i=i||1,this._shiftRegister=S(t,!0),this._aes=new To(e)}).prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t=S(e,!0),i=0;i<t.length;i+=this.segmentSize){for(var n=this._aes.encrypt(this._shiftRegister),r=0;r<this.segmentSize;r++)t[i+r]^=n[r];Mo(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Mo(t,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return t},Co.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t=S(e,!0),i=0;i<t.length;i+=this.segmentSize){for(var n=this._aes.encrypt(this._shiftRegister),r=0;r<this.segmentSize;r++)t[i+r]^=n[r];Mo(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Mo(e,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return t},(Ro=function(e,t){if(!(this instanceof Ro))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=T(16);this._lastPrecipher=S(t,!0),this._lastPrecipherIndex=16,this._aes=new To(e)}).prototype.encrypt=function(e){for(var t=S(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},Ro.prototype.decrypt=Ro.prototype.encrypt,(Io=function(e){if(!(this instanceof Io))throw Error("Counter must be instanitated with `new`");"number"==typeof(e=0!==e?e||1:e)?(this._counter=T(16),this.setValue(e)):this.setBytes(e)}).prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;0<=t;--t)this._counter[t]=e%256,e=parseInt(e/256)},Io.prototype.setBytes=function(e){if(16!=(e=S(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Io.prototype.increment=function(){for(var e=15;0<=e;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}},(Po=function(e,t){if(!(this instanceof Po))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Io||(t=new Io(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new To(e)}).prototype.encrypt=function(e){for(var t=S(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt
11(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},Po.prototype.decrypt=Po.prototype.encrypt,s.exports={AES:To,Counter:Io,ModeOfOperation:{ecb:Lo,cbc:ko,cfb:Co,ofb:Ro,ctr:Po},utils:{hex:t,utf8:l},padding:{pkcs7:{pad:function(e){var t=16-(e=S(e,!0)).length%16,i=T(e.length+t);Mo(e,i);for(var n=e.length;n<i.length;n++)i[n]=t;return i},strip:function(e){if((e=S(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(16<t)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,n=0;n<t;n++)if(e[i+n]!==t)throw new Error("PKCS#7 invalid padding byte");var r=T(i);return Mo(e,r,0,0,i),r}}},_arrayTest:{coerceArray:S,createArray:T,copyArray:Mo}};var Fo=O(n.exports),Oo=((p=Uo.prototype).abort=function(e){for(var t in this.keyUriToKeyInfo){var i,t=this.keyUriToKeyInfo[t].loader;if(t){if(e&&e!==(null==(i=t.context)?void 0:i.frag.type))return;t.abort()}}},p.detach=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}},p.destroy=function(){for(var e in this.detach(),this.keyUriToKeyInfo){e=this.keyUriToKeyInfo[e].loader;e&&e.destroy()}this.keyUriToKeyInfo={}},p.createKeyLoadError=function(e,t,i,n,r){return void 0===t&&(t=ie.KEY_LOAD_ERROR),new $i({type:te.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:i,networkDetails:n})},p.loadClear=function(e,i){var n=this;if(this.emeController&&this.config.emeEnabled)for(var r=e.sn,a=e.cc,s=0;s<i.length&&!function(){var t=i[s];if(a<=t.cc&&("initSegment"===r||"initSegment"===t.sn||r<t.sn))return n.emeController.selectKeySystemFormat(t).then(function(e){t.setKeyFormat(e)}),1}();s++);},p.load=function(t){var i=this;return!t.decryptdata&&t.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(t).then(function(e){return i.loadInternal(t,e)}):this.loadInternal(t)},p.loadInternal=function(t,e){e&&t.setKeyFormat(e);var i=t.decryptdata;if(!i)return e=new Error(e?"Expected frag.decryptdata to be defined after setting format "+e:"Missing decryption data on fragment in onKeyLoading"),Promise.reject(this.createKeyLoadError(t,ie.KEY_LOAD_ERROR,e));e=i.uri;if(!e)return Promise.reject(this.createKeyLoadError(t,ie.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+e+'"')));var n,r=this.keyUriToKeyInfo[e];if(null!=r&&r.decryptdata.key)return i.key=r.decryptdata.key,Promise.resolve({frag:t,keyInfo:r});if(null!=r&&r.keyLoadPromise)switch(null==(n=r.mediaKeySessionContext)?void 0:n.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return r.keyLoadPromise.then(function(e){return i.key=e.keyInfo.decryptdata.key,{frag:t,keyInfo:r}})}switch(r=this.keyUriToKeyInfo[e]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===i.keyFormat?this.loadKeyHTTP(r,t):this.loadKeyEME(r,t);case"AES-128":return this.loadKeyHTTP(r,t);default:return Promise.reject(this.createKeyLoadError(t,ie.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'+i.method+'"')))}},p.loadKeyEME=function(t,e){var i={frag:e,keyInfo:t};if(this.emeController&&this.config.emeEnabled){e=this.emeController.loadKey(i);if(e)return(t.keyLoadPromise=e.then(function(e){return t.mediaKeySessionContext=e,i})).catch(function(e){throw t.keyLoadPromise=null,e})}return Promise.resolve(i)},p.loadKeyHTTP=function(t,a){var p=this,i=this.config,n=new i.loader(i);return a.keyLoader=t.loader=n,t.keyLoadPromise=new Promise(function(c,f){var r={keyInfo:t,frag:a,responseType:"arraybuffer",url:t.decryptdata.uri},e=i.keyLoadPolicy.default,e={loadPolicy:e,timeout:e.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0};n.load(r,e,{onSuccess:function(e,t,i,n){var r=i.frag,a=i.keyInfo,i=i.url;if(!r.decryptdata||a!==p.keyUriToKeyInfo[i])return f(p.createKeyLoadError(r,ie.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),n));if(i.includes("playerId")){for(var s=JSON.parse(e.data).encryptedVideoKey,n=Fo.utils.utf8.toBytes("72Fhskjglp8qjpqx"),i=new Fo.ModeOfOperation.ecb(n),o=[],l=0;l<s.length;l+=2)o.push(parseInt(s[l]+s[l+1],16));for(var n=i.decrypt(o),u=Fo.utils.utf8.fromBytes(n),i=new ArrayBuffer(u.length),h=new Uint8Array(i),d=(l=0,u.length);l<d;l++)h[l]=u.charCodeAt(l);a.decryptdata.key=h}else a.decryptdata.key=r.decryptdata.key=new Uint8Array(e.data);r.keyLoader=null,a.loader=null,c({frag:r,keyInfo:a})},onError:function(e,t,i,n){p.resetLoader(t),f(p.createKeyLoadError(a,ie.KEY_LOAD_ERROR,new Error("HTTP Error "+e.code+" loading key "+e.text),i,m({url:r.url,data:void 0},e)))},onTimeout:function(e,t,i){p.resetLoader(t),f(p.createKeyLoadError(a,ie.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:function(e,t,i){p.resetLoader(t),f(p.createKeyLoadError(a,ie.INTERNAL_ABORTED,new Error("key loading aborted"),i))}})})},p.resetLoader=function(e){var t=e.frag,i=e.keyInfo,e=e.url,n=i.loader;t.keyLoader===n&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[e],n&&n.destroy()},Uo);function Uo(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}function No(){return self.SourceBuffer||self.WebKitSourceBuffer}(h=zo.prototype).destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},h.poll=function(e,t){var i=this.config,n=this.media,r=this.stalled;if(null!==n){var a=n.currentTime,s=n.seeking,o=this.seeking&&!s,l=!this.seeking&&s;if(this.seeking=s,a===e){if(l||o)this.stalled=null;else if(!(n.paused&&!s||n.ended||0===n.playbackRate)&&y.getBuffered(n).length){e=y.bufferInfo(n,a,0),l=0<e.len,o=e.nextStart||0;if(l||o){if(s){l=2<e.len,t=!o||t&&t.start<=a||2<o-a&&!this.fragmentTracker.getPartialFragment(a);if(l||t)return;this.moved=!1}
11if(!this.moved&&null!==this.stalled){l=Math.max(o,e.start||0)-a,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,o=null!=t&&null!=(o=t.details)&&o.live?2*t.details.targetduration:2,t=this.fragmentTracker.getPartialFragment(a);if(0<l&&(l<=o||t))return void(n.paused||this._trySkipBufferHole(t))}l=self.performance.now();null!==r?(o=l-r,!s&&250<=o&&(this._reportStall(e),!this.media)||(t=y.bufferInfo(n,a,i.maxBufferHole),this._tryFixBufferStall(t,o))):this.stalled=l}}}else this.moved=!0,null!==r&&(this.stallReported&&(s=self.performance.now()-r,ne.warn("playback not stuck anymore @"+a+", after "+Math.round(s)+"ms"),this.stallReported=!1),this.stalled=null,this.nudgeRetry=0)}},h._tryFixBufferStall=function(e,t){var i=this.config,n=this.fragmentTracker,r=this.media;null!==r&&(r=r.currentTime,!(n=n.getPartialFragment(r))||!this._trySkipBufferHole(n)&&this.media)&&(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-r<i.maxBufferHole)&&t>1e3*i.highBufferWatchdogPeriod&&(ne.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(e){var t=this.hls,i=this.media;!this.stallReported&&i&&(this.stallReported=!0,i=new Error("Playback stalling at @"+i.currentTime+" due to low buffer ("+JSON.stringify(e)+")"),ne.warn(i.message),t.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len}))},h._trySkipBufferHole=function(e){var t=this.config,i=this.hls,n=this.media;if(null!==n){var r=n.currentTime,a=y.bufferInfo(n,r,0),s=r<a.start?a.start:a.nextStart;if(s){var o=a.len<=t.maxBufferHole,a=0<a.len&&a.len<1&&n.readyState<3,l=s-r;if(0<l&&(o||a)){if(l>t.maxBufferHole){var u=this.fragmentTracker,o=!1;if(!(o=0===r&&(a=u.getAppendedFrag(0,_))&&s<a.end?!0:o)){l=e||u.getAppendedFrag(r,_);if(l){for(var h=!1,d=l.end;d<s;){var c=u.getPartialFragment(d);if(!c){h=!0;break}d+=c.duration}if(h)return 0}}}t=Math.max(s+.05,r+.1);return ne.warn("skipping hole, adjusting currentTime from "+r+" to "+t),this.moved=!0,this.stalled=null,n.currentTime=t,e&&!e.gap&&(a=new Error("fragment loaded with buffer holes, seeking from "+r+" to "+t),i.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:a,reason:a.message,frag:e})),t}}}return 0},h._tryNudgeBuffer=function(){var e,t,i=this.config,n=this.hls,r=this.media,a=this.nudgeRetry;null!==r&&(e=r.currentTime,this.nudgeRetry++,a<i.nudgeMaxRetry?(a=e+(a+1)*i.nudgeOffset,t=new Error("Nudging 'currentTime' from "+e+" to "+a),ne.warn(t.message),r.currentTime=a,n.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_NUDGE_ON_STALL,error:t,fatal:!1})):(r=new Error("Playhead still not moving while enough data buffered @"+e+" after "+i.nudgeMaxRetry+" nudges"),ne.error(r.message),n.trigger(ee.ERROR,{type:te.MEDIA_ERROR,details:ie.BUFFER_STALLED_ERROR,error:r,fatal:!0})))};var jo,Go=zo,Vo=(e(Yo,jo=Li),(a=Yo.prototype)._registerListeners=function(){var e=this.hls;e.on(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ee.LEVEL_LOADING,this.onLevelLoading,this),e.on(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ee.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(ee.ERROR,this.onError,this),e.on(ee.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(ee.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(ee.BUFFER_CREATED,this.onBufferCreated,this),e.on(ee.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(ee.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(ee.FRAG_BUFFERED,this.onFragBuffered,this)},a._unregisterListeners=function(){var e=this.hls;e.off(ee.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ee.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ee.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ee.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ee.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ee.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(ee.ERROR,this.onError,this),e.off(ee.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(ee.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(ee.BUFFER_CREATED,this.onBufferCreated,this),e.off(ee.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(ee.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(ee.FRAG_BUFFERED,this.onFragBuffered,this)},a.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},a.startLoad=function(e){var t,i,n;this.levels?(t=this.lastCurrentTime,i=this.hls,this.stopLoad(),this.setInterval(100),this.level=-1,this.startFragRequested||(-1===(n=i.startLevel)&&(i.config.testBandwidth&&1<this.levels.length?this.bitrateTest=!(n=0):n=i.nextAutoLevel),this.level=i.nextLoadLevel=n,this.loadedmetadata=!1),0<t&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=d,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()):(this._forceStartLoad=!0,this.state=an)},a.stopLoad=function(){this._forceStartLoad=!1,jo.prototype.stopLoad.c
11all(this)},a.doTick=function(){switch(this.state){case mn:var e=this.levels,t=this.level,t=null==e||null==(e=e[t])?void 0:e.details;if(!t||t.live&&this.levelLastLoaded!==this.level)this.hls.nextLoadLevel!==this.level&&(this.state=d);else{if(this.waitForCdnTuneIn(t))break;this.state=d}break;case ln:e=self.performance.now(),t=this.retryDate;(!t||t<=e||null!=(t=this.media)&&t.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=d)}this.state===d&&this.doTickIdle(),this.onTickEnd()},a.onTickEnd=function(){jo.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},a.doTickIdle=function(){var e,t,i=this.hls,n=this.levelLastLoaded,r=this.levels,a=this.media,s=i.config,o=i.nextLoadLevel;null===n||!(a||!this.startFragRequested&&s.startFragPrefetch)||this.altAudio&&this.audioOnly||null==r||!r[o]||(n=r[o],null!==(a=this.getMainFwdBufferInfo())&&((s=this.getLevelDetails())&&this._streamEnded(a,s)?(r={},this.altAudio&&(r.type="video"),this.hls.trigger(ee.BUFFER_EOS,r),this.state=cn):(i.loadLevel!==o&&-1===i.manualLevel&&this.log("Adapting to level "+o+" from level "+this.level),this.level=i.nextLoadLevel=o,!(s=n.details)||this.state===mn||s.live&&this.levelLastLoaded!==o?(this.level=o,this.state=mn):(r=a.len,(i=this.getMaxBufferLength(n.maxBitrate))<=r||(this.backtrackFragment&&this.backtrackFragment.start>a.end&&(this.backtrackFragment=null),o=this.backtrackFragment?this.backtrackFragment.start:a.end,r=this.getNextFragment(o,s),this.couldBacktrack&&!this.fragPrevious&&r&&"initSegment"!==r.sn&&"OK"!==this.fragmentTracker.getState(r)?(e=(null!=(e=this.backtrackFragment)?e:r).sn-s.startSN,(e=s.fragments[e-1])&&r.cc===e.cc&&this.fragmentTracker.removeFragment(r=e)):this.backtrackFragment&&a.len&&(this.backtrackFragment=null),r&&this.isLoopLoading(r,o)&&(r.gap||(t=((e=this.audioOnly&&!this.altAudio?A:he)===he?this.videoBuffer:this.mediaBuffer)||this.media)&&this.afterBufferFlushed(t,e,_),r=this.getNextFragmentLoopLoading(r,s,a,_,i)),r&&(!r.initSegment||r.initSegment.data||this.bitrateTest||(r=r.initSegment),this.loadFragment(r,n,o)))))))},a.loadFragment=function(e,t,i){var n=this.fragmentTracker.getState(e);this.fragCurrent=e,n===ki||n===Ci?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,jo.prototype.loadFragment.call(this,e,t,i)):this.clearTrackerIfNeeded(e)},a.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,_)},a.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},a.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},a.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var i=this.getAppendedFrag(t.currentTime),i=(i&&1<i.start&&this.flushMainBuffer(0,i.start-1),this.getLevelDetails());if(null!=i&&i.live){var n=this.getMainFwdBufferInfo();if(!n||n.len<2*i.targetduration)return}e=!t.paused&&e&&(n=e[this.hls.nextLoadLevel],i=this.fragLastKbps)&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*i)+1:0;n=this.getBufferedFrag(t.currentTime+e);n&&(i=this.followingBufferedFrag(n))&&(this.abortCurrentFrag(),t=i.maxStartPTS||i.start,e=i.duration,i=Math.max(n.end,t+Math.min(Math.max(e-this.config.maxFragLookUpTolerance,.5*e),.75*e)),this.flushMainBuffer(i,Number.POSITIVE_INFINITY))}},a.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case sn:case on:case ln:case hn:case dn:this.state=d}this.nextLoadPosition=this.getLoadPosition()},a.flushMainBuffer=function(e,t){jo.prototype.flushMainBuffer.call(this,e,t,this.altAudio?"video":null)},a.onMediaAttached=function(e,t){jo.prototype.onMediaAttached.call(this,e,t);e=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),e.addEventListener("playing",this.onvplaying),e.addEventListener("seeked",this.onvseeked),this.gapController=new Go(this.config,e,this.fragmentTracker,this.hls)},a.onMediaDetaching=function(){var e=this.media;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),jo.prototype.onMediaDetaching.call(this)},a.onMediaPlaying=function(){this.tick()},a.onMediaSeeked=function(){var e=this.media,e=e?e.currentTime:null,e=(G(e)&&this.log("Media seeked to "+e.toFixed(3)),this.getMainFwdBufferInfo());null!==e&&0!==e.len?this.tick():this.warn('Main forward buffer length on "seeked" event '+(e?e.len:"empty")+")")},a.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(ee.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1},a.onManifestParsed=function(e,t){var i,n,r=!1,a=!1;
11t.levels.forEach(function(e){(i=e.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(r=!0),-1!==i.indexOf("mp4a.40.5"))&&(a=!0)}),this.audioCodecSwitch=r&&a&&!("function"==typeof(null==(n=No())||null==(n=n.prototype)?void 0:n.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},a.onLevelLoading=function(e,t){var i=this.levels;i&&this.state===d&&(!(i=i[t.level]).details||i.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(i.details))&&(this.state=mn)},a.onLevelLoaded=function(e,t){var i=this.levels,n=t.level,r=t.details,a=r.totalduration;if(i){this.log("Level "+n+" loaded ["+r.startSN+","+r.endSN+"]"+(r.lastPartSn?"[part-"+r.lastPartSn+"-"+r.lastPartIndex+"]":"")+", cc ["+r.startCC+", "+r.endCC+"] duration:"+a);var a=i[n],i=this.fragCurrent,t=(!i||this.state!==on&&this.state!==ln||i.level===t.level&&i.urlId===a.urlId||!i.loader||this.abortCurrentFrag(),0);if(r.live||null!=(i=a.details)&&i.live){if(r.fragments[0]||(r.deltaUpdateFailed=!0),r.deltaUpdateFailed)return;t=this.alignPlaylists(r,a.details)}if(a.details=r,this.levelLastLoaded=n,this.hls.trigger(ee.LEVEL_UPDATED,{details:r,level:n}),this.state===mn){if(this.waitForCdnTuneIn(r))return;this.state=d}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,t),this.tick()}else this.warn("Levels were reset while loading level "+n)},a._handleFragmentLoadProgress=function(e){var t,i,n,r,a,s,o,l=e.frag,u=e.part,e=e.payload,h=this.levels;h?(t=(h=h[l.level]).details)?(i=h.videoCodec,n=t.PTSKnown||!t.live,r=null==(r=l.initSegment)?void 0:r.data,h=this._getAudioCodec(h),a=this.transmuxer=this.transmuxer||new ra(this.hls,_,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),s=u?u.index:-1,s=new Ni(l.level,l.sn,l.stats.chunkCount,e.byteLength,s,-1!==s),o=this.initPTS[l.cc],a.push(e,r,h,i,l,u,t.totalduration,n,s,o)):(this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset"),this.fragmentTracker.removeFragment(l)):this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered")},a.onAudioTrackSwitching=function(e,t){var i,n=this.altAudio;t.url||(this.mediaBuffer!==this.media?(this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media,(i=this.fragCurrent)&&(this.log("Switching to main audio track, cancel main fragment load"),i.abortRequests(),this.fragmentTracker.removeFragment(i)),this.resetTransmuxer(),this.resetLoadingState()):this.audioOnly&&this.resetTransmuxer(),i=this.hls,n&&(i.trigger(ee.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(ee.AUDIO_TRACK_SWITCHED,t))},a.onAudioTrackSwitched=function(e,t){var i,t=t.id,t=!!this.hls.audioTracks[t].url;t&&(i=this.videoBuffer)&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i),this.altAudio=t,this.tick()},a.onBufferCreated=function(e,t){var i,n=t.tracks,r=!1;for(i in n){var a,s,o=n[i];"main"===o.id?(s=o,"video"===(a=i)&&(o=n[i])&&(this.videoBuffer=o.buffer)):r=!0}r&&s?(this.log("Alternate track found, use "+a+".buffered to schedule main fragment loading"),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media},a.onFragBuffered=function(e,t){var i,n=t.frag,t=t.part;n&&n.type!==_||(this.fragContextChanged(n)?(this.warn("Fragment "+n.sn+(t?" p: "+t.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),this.state===dn&&(this.state=d)):(i=(t||n).stats,this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,t)))},a.onError=function(e,t){var i;if(t.fatal)this.state=fn;else switch(t.details){case ie.FRAG_GAP:case ie.FRAG_PARSING_ERROR:case ie.FRAG_DECRYPT_ERROR:case ie.FRAG_LOAD_ERROR:case ie.FRAG_LOAD_TIMEOUT:case ie.KEY_LOAD_ERROR:case ie.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(_,t);break;case ie.LEVEL_LOAD_ERROR:case ie.LEVEL_LOAD_TIMEOUT:case ie.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==mn||(null==(i=t.context)?void 0:i.type)!==Bt||(this.state=d);break;case ie.BUFFER_APPEND_ERROR:case ie.BUFFER_FULL_ERROR:t.parent&&"main"===t.parent&&(t.details===ie.BUFFER_APPEND_ERROR?this.resetLoadingState():this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case ie.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}},a.checkBuffer=function(){var e,t=this.media,i=this.gapController;t&&i&&t.readyState&&(!this.loadedmetadata&&y.getBuffered(t).length||(e=this.state!==d?this.fragCurrent:null,i.poll(this.lastCurrentTime,e)),this.lastCurrentTime=t.currentTime)},a.onFragLoadEmergencyAborted=function(){this.state=d,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},a.onBufferFlushed=function(e,t){var i,t=t.type;(t!==A||this.audioOnly&&!this.altAudio)&&(i=(t===he?this.videoBuffer:this.mediaBuffer)||this.media,this.afterBufferFlushed(i,t,_),this.tick())},a.onLevelsUpdated=function(e,t){this.levels=t.levels},a.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},a.seekToStartPos=function(){var e,t,i,n=this.media;n&&(e=n.currentTime,0<=(t=this.startPosition))&&e<t&&(n.seeking?this.log("could not seek to "+t+", already seeking at "+e):(0<(i=((i=y.getBuffered(n)).length?i.start(0):0)-t)&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+i+" to match buffer start"),this.startPosition=t+=i),this.log("seek to target start position "+t+" from current time "+e),n.currentTime=t))},a._getAudioCodec=function(e){e=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&e&&(this.log("Swapping audio codec"),e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),e},a._loadBitrateTestFrag=function(n,r){var a=this;n.bitrateTest=!0,this._doFragLoad(n,r).then(function(e){var t,i=a.hls;e&&!a.fragContextChanged(n)&&(r.fragmentError=0,a.state=d,a.startFragRequested=!1,a.bitrateTest=!1,(t=n.stats).parsing.start=t.parsing.end=t.buffering.start=t.buffering.end=self.performance.now(),i.trigger(ee.FRAG_LOADED,e),n.bitrateTest=!1)})},a._handleTransmuxComplete=function(e){var t="main",i=this.hls,n=e.remuxResult,e=e.chunkMeta,r=this.getCurrentContext(e);if(r){var a=r.frag,s=r.part,r=r.level,o=n.video,l=n.text,u=n.id3,h=n.initSegment,d=r.details,c=this.altAudio?void 0:n.audio;if(this.fragContextChanged(a))this.fragmentTracker.removeFragment(a);else{if(this.state=hn,h&&(null!=h&&h.tracks&&(f=a.initSegment||a,this._bufferInitSegment(r,h.tracks,f,e),i.trigger(ee.FRAG_PARSING_INIT_SEGMENT,{frag:f,id:t,tracks:h.tracks})),r=h.initPTS,f=h.timescale,G(r))&&(this.initPTS[a.cc]={baseTime:r,timescale:f},i.trigger(ee.INIT_PTS_FOUND,{frag:a,id:t,initPTS:r,timescale:f})),o&&d&&"initSegment"!==a.sn){var h=d.fragments[a.sn-1-d.startSN],r=a.sn===d.startSN,f=!h||a.cc>h.cc;if(!1!==n.independent){var h=o.startPTS,n=o.endPTS,p=o.startDTS,m=o.endDTS;if(s)s.elementaryStreams[o.type]={startPTS:h,endPTS:n,startDTS:p,endDTS:m};else if(o.firstKeyFrame&&o.independent&&1===e.id&&!f&&(this.couldBacktrack=!0),o.dropped&&o.independent){var g=this.getMainFwdBufferInfo(),g=(g?g.end:this.getLoadPosition())+this.config.maxBufferHole,_=o.firstKeyFramePTS||h;if(!r&&g<_-this.config.maxBufferHole&&!f)return void this.backtrack(a);f&&(a.gap=!0),a.setElementaryStreamInfo(o.type,a.start,n,a.start,m,!0)}a.setElementaryStreamInfo(o.type,h,n,p,m),this.backtrackFragment&&(this.backtrackFragment=a),this.bufferFragmentData(o,a,s,e,r||f)}else{if(!r&&!f)return void this.backtrack(a);a.gap=!0}}c&&(g=c.startPTS,_=c.endPTS,h=c.startDTS,n=c.endDTS,s&&(s.elementaryStreams[A]={startPTS:g,endPTS:_,startDTS:h,endDTS:n}),a.setElementaryStreamInfo(A,g,_,h,n),this.bufferFragmentData(c,a,s,e)),d&&null!=u&&null!=(p=u.samples)&&p.length&&(m={id:t,frag:a,details:d,samples:u.samples},i.trigger(ee.FRAG_PARSING_METADATA,m)),d&&l&&(o={id:t,frag:a,details:d,samples:l.samples},i.trigger(ee.FRAG_PARSING_USERDATA,o))}}else this.resetWhenMissingContext(e)},a._bufferInitSegment=function(e,i,n,r){var t,a,s,o,l,u=this;this.state===hn&&(this.audioOnly=!!i.audio&&!i.video,this.altAudio&&!this.audioOnly&&delete i.audio,t=i.audio,a=i.video,s=i.audiovideo,t&&(o=e.audioCodec,l=navigator.userAgent.toLowerCase(),(o=this.audioCodecSwitch&&(o=o&&(-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),
111!==t.metadata.channelCount)&&-1===l.indexOf("firefox")?"mp4a.40.5":o)&&-1!==o.indexOf("mp4a.40.5")&&-1!==l.indexOf("android")&&"audio/mpeg"!==t.container&&this.log("Android: force audio codec to "+(o="mp4a.40.2")),e.audioCodec&&e.audioCodec!==o&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+o+'"'),t.levelCodec=o,t.id="main",this.log("Init audio buffer, container:"+t.container+", codecs[selected/level/parsed]=["+(o||"")+"/"+(e.audioCodec||"")+"/"+t.codec+"]")),a&&(a.levelCodec=e.videoCodec,a.id="main",this.log("Init video buffer, container:"+a.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+a.codec+"]")),s&&this.log("Init audiovideo buffer, container:"+s.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+s.codec+"]"),this.hls.trigger(ee.BUFFER_CODECS,i),Object.keys(i).forEach(function(e){var t=i[e].initSegment;null!=t&&t.byteLength&&u.hls.trigger(ee.BUFFER_APPENDING,{type:e,data:t,frag:n,part:null,chunkMeta:r,parent:n.type})}),this.tickImmediate())},a.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer||this.media,_)},a.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=d},a.checkFragmentChanged=function(){var e,t=this.media,i=null;t&&1<t.readyState&&!1===t.seeking&&(e=t.currentTime,y.isBuffered(t,e)?i=this.getAppendedFrag(e):y.isBuffered(t,e+.1)&&(i=this.getAppendedFrag(e+.1)),i)&&(this.backtrackFragment=null,t=this.fragPlaying,e=i.level,t&&i.sn===t.sn&&t.level===e&&i.urlId===t.urlId||(this.fragPlaying=i,this.hls.trigger(ee.FRAG_CHANGED,{frag:i}),t&&t.level===e)||this.hls.trigger(ee.LEVEL_SWITCHED,{level:e}))},r(Yo,[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var e=e.currentTime,t=this.currentFrag;if(t&&G(e)&&G(t.programDateTime))return e=t.programDateTime+1e3*(e-t.start),new Date(e)}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),Yo),Jn=(Ho.isSupported=function(){return!!(t=ft())&&(e=No(),t=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),e=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove,!!t)&&!!e;var e,t},(u=Ho.prototype).createController=function(e,t){return e?(e=new e(this),t&&t.push(e),e):null},u.on=function(e,t,i){this._emitter.on(e,t,i=void 0===i?this:i)},u.once=function(e,t,i){this._emitter.once(e,t,i=void 0===i?this:i)},u.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},u.off=function(e,t,i,n){this._emitter.off(e,t,i=void 0===i?this:i,n)},u.listeners=function(e){return this._emitter.listeners(e)},u.emit=function(e,t,i){return this._emitter.emit(e,t,i)},u.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){var i;ne.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.triggeringException||(this.triggeringException=!0,i=e===ee.ERROR,this.trigger(ee.ERROR,{type:te.OTHER_ERROR,details:ie.INTERNAL_EXCEPTION,fatal:i,event:e,error:t}),this.triggeringException=!1)}return!1},u.listenerCount=function(e){return this._emitter.listenerCount(e)},u.destroy=function(){ne.log("destroy"),this.trigger(ee.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(e){return e.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(e){return e.destroy()}),this.coreComponents.length=0;var e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null},u.attachMedia=function(e){ne.log("attachMedia"),this._media=e,this.trigger(ee.MEDIA_ATTA
11CHING,{media:e})},u.detachMedia=function(){ne.log("detachMedia"),this.trigger(ee.MEDIA_DETACHING,void 0),this._media=null},u.loadSource=function(e){this.stopLoad();var t=this.media,i=this.url,n=this.url=z.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});ne.log("loadSource:"+n),t&&i&&(i!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(ee.MANIFEST_LOADING,{url:e})},u.startLoad=function(t){void 0===t&&(t=-1),ne.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},u.stopLoad=function(){ne.log("stopLoad"),this.networkControllers.forEach(function(e){e.stopLoad()})},u.swapAudioCodec=function(){ne.log("swapAudioCodec"),this.streamController.swapAudioCodec()},u.recoverMediaError=function(){ne.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},u.removeLevel=function(e,t){this.levelController.removeLevel(e,t=void 0===t?0:t)},r(Ho,[{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){ne.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){ne.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){ne.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){ne.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){ne.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){e=!!e;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(ne.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN},set:function(e){this.abrController.resetEstimator(e)}},{key:"ttfbEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){-1<ti.indexOf(e)&&(this._maxHdcpLevel=e)}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(e)for(var i=e.length,n=0;n<i;n++)if(e[n].maxBitrate>=t)return n;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping,i=this.maxHdcpLevel,t=-1===t&&e&&e.length?e.length-1:t;if(i)for(var n=t;n--;){var r=e[n].attrs["HDCP-LEVEL"];if(r&&r<=i)return n}return t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}
11,set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){}},{key:"Events",get:function(){return ee}},{key:"ErrorTypes",get:function(){return te}},{key:"ErrorDetails",get:function(){return ie}},{key:"DefaultConfig",get:function(){return Ho.defaultConfig||eo},set:function(e){Ho.defaultConfig=e}}]),Ho);function Ho(e){void 0===e&&(e={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Qr,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,q(e.debug||!1,"Hls instance");var t=this.config=function(e,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==l.liveMaxLatencyDurationCount&&(void 0===l.liveSyncDurationCount||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==l.liveMaxLatencyDuration&&(void 0===l.liveSyncDuration||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var u=io(e),t=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach(function(r){var a=("level"===r?"playlist":r)+"LoadPolicy",s=void 0===l[a],o=[];t.forEach(function(e){var t=r+"Loading"+e,i=l[t];if(void 0!==i&&s){o.push(t);var n=u[a].default;switch(l[a]={default:n},e){case"TimeOut":n.maxLoadTimeMs=i,n.maxTimeToFirstByteMs=i;break;case"MaxRetry":n.errorRetry.maxNumRetry=i,n.timeoutRetry.maxNumRetry=i;break;case"RetryDelay":n.errorRetry.retryDelayMs=i,n.timeoutRetry.retryDelayMs=i;break;case"MaxRetryTimeout":n.errorRetry.maxRetryDelayMs=i,n.timeoutRetry.maxRetryDelayMs=i}}}),o.length&&ne.warn('hls.js config: "'+o.join('", "')+'" setting(s) are deprecated, use "'+a+'": '+JSON.stringify(l[a]))}),m(m({},u),l)}(Ho.DefaultConfig,e),i=(this.userConfig=e,this._autoLevelCapping=-1,t.progressive&&((i=(e=t).loader)!==Ws&&i!==Ys?(ne.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),1}catch(e){}}()&&(e.loader=Ws,e.progressive=!0,e.enableSoftwareAES=!0,ne.log("[config]: Progressive streaming enabled, using FetchLoader"))),t.abrController),e=t.bufferController,n=t.capLevelController,r=t.errorController,a=t.fpsController,r=new r(this),s=this.abrController=new i(this),e=this.bufferController=new e(this),n=this.capLevelController=new n(this),a=new a(this),o=new Vt(this),l=new $t(this),u=t.contentSteeringController,u=u?new u(this):null,h=this.levelController=new ro(this,u),d=new Ri(this),c=new Oo(this.config),f=this.streamController=new Vo(this,d,c),o=(n.setStreamController(f),a.setStreamController(f),[o,h,f]),h=(u&&o.splice(1,0,u),this.networkControllers=o,[s,e,n,a,l,d]),f=(this.audioTrackController=this.createController(t.audioTrackController,o),t.audioStreamController),u=(f&&o.push(new f(this,d,c)),this.subtitleTrackController=this.createController(t.subtitleTrackController,o),t.subtitleStreamController),s=(u&&o.push(new u(this,d,c)),this.createController(t.timelineController,h),c.emeController=this.emeController=this.createController(t.emeController,h),this.cmcdController=this.createController(t.cmcdController,h),this.latencyController=this.createController(ei,h),this.coreComponents=h,o.push(r),r.onErrorOut);"function"==typeof s&&this.on(ee.ERROR,s,r)}function Yo(e,t,i){return(e=jo.call(this,e,t,i,"[stream-controller]",_)||this).audioCodecSwap=!1,e.gapController=null,e.level=-1,e._forceStartLoad=!1,e.altAudio=!1,e.audioOnly=!1,e.fragPlaying=null,e.onvplaying=null,e.onvseeked=null,e.fragLastKbps=0,e.couldBacktrack=!1,e.backtrackFragment=null,e.audioCodecSwitch=!1,e.videoBuffer=null,e._registerListeners(),e}function zo(e,t,i,n){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=i,this.hls=n}return Jn.defaultConfig=void 0,Jn}()}(!1)},function(e,t,i){"use strict";i.r(t),i.d(t,"NvFlvjsCore",function(){return r});var s=i(14);const n=i(5);i(25);var o=i(164);const l=i(10);var r=class{constructor(e){this.configFormat={width:e.width||n.DEFAULT_WIDTH,height:e.height||n.DEFAULT_HEIGHT,playerId:e.playerId||n.DEFAILT_WEBGL_PLAY_ID,ignoreAudio:e.ignoreAudio,duration:e.duration,autoPlay:e.autoPlay||!1,repeatPlay:e.repeat||!1,audioNone:e.audioNone},this.audioVoice=1,this.myPlayerID=this.configFormat.playerId+"-flv-hevc",this.myPlayer=null,this.videoContaner=null,this.videoTag=null,this.duration=-1,this.width=-1,this.height=-1,this.isPlaying=!1,this.vCodecID=n.V_CODEC_NAME_AVC,this.audioNone=!1,this.showScreen=!1,this.playPTS=0,this.vCachePTS=0,this.aCachePTS=0,this.isInitDecodeFrames=!1,this.lastDecodedFrame=0,this.lastDecodedFrameTime=-1,this.checkStartIntervalCount=0,this.checkStartInterval=null,this.checkPicBlockInterval=null,this.bufferInterval=null,this.onPlayState=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onCacheProcess=null,this.isReBuildTime=3,this.onError=null,this.seekResult=null}_reBuildFlvjs(e,t){0==this.isReBuildTime?(this.onError&&this.onError({msg:s.ErrorDetails.RECONNECT_ERROR_DETAIL,event:s.ErrorEvent.TIMEOUT,url:e,errorType:s.ErrorTypes.NETWORK_E
11RROR}),this.release()):(this._releaseFlvjs(),this.makeIt(e,t))}_checkPicBlock(e){let t=this;this.checkPicBlockInterval=window.setInterval(function(){0<t.lastDecodedFrameTime&&1e4<l.GetMsTime()-t.lastDecodedFrameTime&&t.isPlayingState()&&(window.clearInterval(t.checkPicBlockInterval),t.checkPicBlockInterval=null,t._reBuildFlvjs(e))},1e3)}_checkLoadState(e){let t=this;this.checkStartIntervalCount=0,this.isReBuildTime--,this.checkStartInterval=window.setInterval(function(){!1!==t.isInitDecodeFrames?(t.checkStartIntervalCount=0,window.clearInterval(t.checkStartInterval),t.checkStartInterval=null):(t.checkStartIntervalCount+=1,20<t.checkStartIntervalCount&&(window.clearInterval(t.checkStartInterval),t.checkStartIntervalCount=0,t.checkStartInterval=null,!1===t.isInitDecodeFrames)&&t._reBuildFlvjs(e))},500)}makeIt(n,e){let r=this;var t,i,a;o.isSupported()?(a=document.querySelector("#"+this.configFormat.playerId),this.videoTag=document.createElement("video"),this.videoTag.id=this.myPlayerID,this.configFormat.repeatPlay&&this.videoTag.setAttribute("loop","loop"),this.videoTag.style.width=this.configFormat.width+"px",this.videoTag.style.height=this.configFormat.height+"px",(t=a.getElementsByTagName("video")[0])&&(i=a.getElementsByTagName("div"),a.insertBefore(t,i[0])),!0===this.configFormat.autoPlay&&(window.onclick=document.body.onclick=function(e){r.videoTag.muted=!1,window.onclick=document.body.onclick=null}),this.videoTag.onplay=function(){var e=r.isPlayingState();r.onPlayState&&r.onPlayState(e)},this.videoTag.onpause=function(){var e=r.isPlayingState();r.onPlayState&&r.onPlayState(e)},this.videoTag.ontimeupdate=()=>{r.videoTag&&r.onPlayingTime&&r.onPlayingTime(r.videoTag.currentTime)},this.videoTag.onseeked=()=>{r.onSeekFinish&&r.onSeekFinish(r.seekResult)},a={hasVideo:!0,hasAudio:!(!0===this.configFormat.audioNone),type:"flv",url:n,withCredentials:!1},this.options=e||a,this.options=Object.assign(this.options),this.myPlayer=o.createPlayer(this.options),this.myPlayer.attachMediaElement(this.videoTag),this.myPlayer.on(o.Events.MEDIA_INFO,function(e){var t;!1===r.isInitDecodeFrames&&(r.isInitDecodeFrames=!0,r.width=Math.max(r.videoTag.videoWidth,e.width),r.height=Math.max(r.videoTag.videoHeight,e.height),r.duration=r.videoTag.duration||e.duration/1e3,(e=document.querySelector("#"+r.configFormat.playerId)).getElementsByTagName("video")[0]||(t=e.getElementsByTagName("div"),e.insertBefore(r.videoTag,t[0])),r.onLoadFinish&&r.onLoadFinish(),r.onReadyShowDone&&r.onReadyShowDone(),r._loopBufferState(),r.videoTag.ontimeupdate=()=>{r.onPlayingTime&&r.onPlayingTime(r.videoTag.currentTime,window.startPts)},r.duration!==1/0&&0<r.duration?r.videoTag.onended=()=>{r.onPlayingFinish&&r.onPlayingFinish()}:r.videoTag.onended=()=>{r._reBuildFlvjs&&r._reBuildFlvjs(r.options.url)})}),this.myPlayer.on(o.Events.STATISTICS_INFO,function(e){var t,i;!1===r.isInitDecodeFrames&&0<r.videoTag.videoWidth&&0<r.videoTag.videoHeight&&(r.isInitDecodeFrames=!0,r.width=r.videoTag.videoWidth,r.height=r.videoTag.videoHeight,r.duration=r.videoTag.duration,(t=document.querySelector("#"+r.configFormat.playerId)).getElementsByTagName("video")[0]||(i=t.getElementsByTagName("div"),t.insertBefore(r.videoTag,i[0])),r.onLoadFinish&&r.onLoadFinish(),r.onReadyShowDone&&r.onReadyShowDone(),r._loopBufferState(),r.videoTag.ontimeupdate=()=>{r.onPlayingTime&&r.onPlayingTime(r.videoTag.currentTime)},r.duration!==1/0)&&(r.videoTag.onended=()=>{r.onPlayingFinish&&r.onPlayingFinish()}),r.lastDecodedFrame=e.decodedFrames,r.lastDecodedFrameTime=l.GetMsTime()}),this.myPlayer.on(o.Events.SCRIPTDATA_ARRIVED,function(e){}),this.myPlayer.on(o.Events.METADATA_ARRIVED,function(e){e.detectAudio||r.options.hasAudio===e.detectAudio||(e={hasVideo:!0,hasAudio:e.detectAudio,type:"flv",url:r.options.url,withCredentials:!1},r._reBuildFlvjs(r.options.url,e))}),this.myPlayer.on(o.Events.ERROR,function(e,t,i){9===i.code?r.onError&&r.onError({msg:i,event:e,url:n,errorType:e}):r.myPlayer&&r._reBuildFlvjs(n)}),this.myPlayer.load(),this._checkLoadState(n)):r.onError&&r.onError({msg:s.ErrorDetails.NOT_SUPPORT_DETAIL,errorType:s.ErrorTypes.NOT_SUPPORT,event:s.ErrorEvent.ERROR,url:n})}setPlaybackRate(e=1){return!(e<=0||null==this.videoTag||null===this.videoTag||(this.videoTag.playbackRate=e,0))}getPlaybackRate(){return null==this.videoTag||null===this.videoTag?0:this.videoTag.playbackRate}getSize(){return{width:0<this.videoTag.videoWidth?this.videoTag.videoWidth:this.width,height:0<this.videoTag.videoHeight?this.videoTag.videoHeight:this.height}}play(){this.myPlayer.play(),this.lastDecodedFrameTime=l.GetMsTime()}seek(e){var t=this.videoTag.buffered,i=t.length-1;return t.end(i)<e?(this.seekReadyPts=e,!1):(this.videoTag.currentTime=e,this.seekResult=!0)}pause(){this.myPlayer&&this.myPlayer.pause()}setVoice(e){this.myPlayer.volume=e}isPlayingState(){return!this.videoTag.paused}_loopBufferState(){let i=this;i.duration<=0&&(i.duration=i.videoTag.duration),null!==i.bufferInterval&&(window.clearInterval(i.bufferInterval),i.bufferInterval=null),i.bufferInterval=window.setInterval(function(){if(!i.duration||i.duration<0)window.clearInterval(i.bufferInterval);else{let e=null;if(i.videoTag.buffered){try{e=i.videoTag.buffered.end(i.videoTag.buffered.length-1)}catch(e){}var t;e>=i.duration-.04?(i.onCacheProcess&&i.onCacheProcess(i.duration),window.clearInterval(i.bufferInterval)):(i.onCacheProcess&&i.onCacheProcess(e),i.seekReadyPts&&e>i.seekReadyPts&&(t=i.seek(i.seekReadyPts),i.seekResult=t,i.seekReadyPts=null))}}},200)}_releaseFlvjs(){this.myPlayer&&(this.myPlayer.pause(),this.myPlayer.unload(),this.myPlayer.detachMediaElement(),this.myPlayer.destroy(),this.myPlayer=null),this.videoTag&&(this.videoTag.remove(),this.videoTag=null),null!==this.checkStartInterval&&(this.checkStartIntervalCount=0,window.clearInterval(this.checkStartInterval),this.checkStartInterval=null),null!==this.checkPicBlockInterval&&(window.clearInterval(this.checkPicBlockInterval),this.checkPicBlockInterval=null),this.isInitDecodeFrames=!1,this.lastDecodedFrame=0,this.lastDecodedFrameTime=-1}release(){null!==this.checkStartInterval&&(this.checkStartIntervalCount=0,window.clearInterval(this.checkStartInterval),this.checkStartInterval=null),null!==this.checkPicBlockInterval&&(window.clearInterval(this.checkPicBlockInterval),this.checkPicBlockInterval=null),null!==this.bufferInterval&&(window.clearInterval(this.bufferInterval),this.bufferInterval=null),this._releaseFlvjs(),this.myPlayerID=null,this.videoContaner=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onPlayState=null,this.onError=null,this.isReBuildTime=3,window.onclick=document.body.onclick=null}}}
11,function(t,e,i){!function(re){var e;self,e=function(){return i={
vendor: 7,423 bytes, lines 11-23
11"./node_modules/es6-promise/dist/es6-promise.js": 12/*!******************************************************!*\ 13 !*** ./node_modules/es6-promise/dist/es6-promise.js ***! 14 \******************************************************/ 15function(e,t,ne){ 16/*! 17 * @overview es6-promise - a tiny implementation of Promises/A+. 18 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) 19 * @license Licensed under MIT license 20 * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE 21 * @version v4.2.8+1e68dce6 22 */ 23e.exports=function(){"use strict";function n(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}function l(e){return typeof e==="function"}var e=void 0;if(Array.isArray)e=Array.isArray;else e=function(e){return Object.prototype.toString.call(e)==="[object Array]"};var i=e,r=0,t=void 0,a=void 0,s=function e(t,i){g[r]=t;g[r+1]=i;r+=2;if(r===2)if(a)a(_);else y()};function o(e){a=e}function u(e){s=e}var h=typeof window!=="undefined"?window:undefined,d=h||{},c=d.MutationObserver||d.WebKitMutationObserver,f=typeof self==="undefined"&&typeof re!=="undefined"&&{}.toString.call(re)==="[object process]",p=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function F(){return function(){return re.nextTick(_)}}function O(){if(typeof t!=="undefined")return function(){t(_)};return m()}function U(){var e=0;var t=new c(_);var i=document.createTextNode("");t.observe(i,{characterData:true});return function(){i.data=e=++e%2}}function N(){var e=new MessageChannel;e.port1.onmessage=_;return function(){return e.port2.postMessage(0)}}function m(){var e=setTimeout;return function(){return e(_,1)}}var g=new Array(1e3);function _(){for(var e=0;e<r;e+=2){var t=g[e];var i=g[e+1];t(i);g[e]=undefined;g[e+1]=undefined}r=0}function j(){try{var e=Function("return this")().require("vertx");t=e.runOnLoop||e.runOnContext;return O()}catch(e){return m()}}var y=void 0;if(f)y=F();else if(c)y=U();else if(p)y=N();else if(h===undefined&&"function"==="function")y=j();else y=m();function v(e,t){var i=this;var n=new this.constructor(b);if(n[E]===undefined)M(n);var r=i._state;if(r){var a=arguments[r-1];s(function(){return x(r,n,a,i._result)})}else I(i,n,e,t);return n}function A(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t)return e;var i=new t(b);k(i,e);return i}var E=Math.random().toString(36).substring(2);function b(){}var w=void 0,S=1,T=2;function G(){return new TypeError("You cannot resolve a promise with itself")}function V(){return new TypeError("A promises callback cannot return that same promise.")}function H(e,t,i,n){try{e.call(t,i,n)}catch(e){return e}}function Y(e,n,r){s(function(t){var i=false;var e=H(r,n,function(e){if(i)return;i=true;if(n!==e)k(t,e);else C(t,e)},function(e){if(i)return;i=true;R(t,e)},"Settle: "+(t._label||" unknown promise"));if(!i&&e){i=true;R(t,e)}},e)}function z(t,e){if(e._state===S)C(t,e._result);else if(e._state===T)R(t,e._result);else I(e,undefined,function(e){return k(t,e)},function(e){return R(t,e)})}function L(e,t,i){if(t.constructor===e.constructor&&i===v&&t.constructor.resolve===A)z(e,t);else if(i===undefined)C(e,t);else if(l(i))Y(e,t,i);else C(e,t)}function k(t,e){if(t===e)R(t,G());else if(n(e)){var i=void 0;try{i=e.then}catch(e){R(t,e);return}L(t,e,i)}else C(t,e)}function W(e){if(e._onerror)e._onerror(e._result);P(e)}function C(e,t){if(e._state!==w)return;e._result=t;e._state=S;if(e._subscribers.length!==0)s(P,e)}function R(e,t){if(e._state!==w)return;e._state=T;e._result=t;s(W,e)}function I(e,t,i,n){var r=e._subscribers;var a=r.length;e._onerror=null;r[a]=t;r[a+S]=i;r[a+T]=n;if(a===0&&e._state)s(P,e)}function P(e){var t=e._subscribers;var i=e._state;if(t.length===0)return;var n=void 0,r=void 0,a=e._result;for(var s=0;s<t.length;s+=3){n=t[s];r=t[s+i];if(n)x(i,n,r,a);else r(a)}e._subscribers.length=0}function x(e,t,i,n){var r=l(i),a=void 0,s=void 0,o=true;if(r){try{a=i(n)}catch(e){o=false;s=e}if(t===a){R(t,V());return}}else a=n;if(t._state!==w);else if(r&&o)k(t,a);else if(o===false)R(t,s);else if(e===S)C(t,a);else if(e===T)R(t,a)}function Q(i,e){try{e(function e(t){k(i,t)},function e(t){R(i,t)})}catch(e){R(i,e)}}var D=0;function K(){return D++}function M(e){e[E]=D++;e._state=undefined;e._result=undefined;e._subscribers=[]}function J(){return new Error("Array Methods must be provided an Array")}var q=function(){function e(e,t){this._instanceConstructor=e;this.promise=new e(b);if(!this.promise[E])M(this.promise);if(i(t)){this.length=t.length;this._remaining=t.length;this._result=new Array(this.length);if(this.length===0)C(this.promise,this._result);else{this.length=this.length||0;this._enumerate(t);if(this._remaining===0)C(this.promise,this._result)}}else R(this.promise,J())}e.prototype._enumerate=function e(t){for(var i=0;this._state===w&&i<t.length;i++)this._eachEntry(t[i],i)};e.prototype._eachEntry=function e(t,i){var n=this._instanceConstructor;var r=n.resolve;if(r===A){var a=void 0;var s=void 0;var o=false;try{a=t.then}catch(e){o=true;s=e}if(a===v&&t._state!==w)this._settledAt(t._state,i,t._result);else if(typeof a!=="function"){this._remaining--;this._result[i]=t}else if(n===B){var l=new n(b);if(o)R(l,s);else L(l,t,a);this._willSettleAt(l,i)}else this._willSettleAt(new n(function(e){return e(t)}),i)}else this._willSettleAt(r(t),i)};e.prototype._settledAt=function e(t,i,n){var r=this.promise;if(r._state===w){this._remaining--;if(t===T)R(r,n);else this._result[i]=n}if(this._remaining===0)C(r,this._result)};e.prototype._willSettleAt=function e(t,i){var n=this;I(t,undefined,function(e){return n._settledAt(S,i,e)},function(e){return n._settledAt(T,i,e)})};return e}();function X(e){return new q(this,e).promise}function Z(r){var a=this;if(!i(r))return new a(function(e,t){return t(new TypeError("You must pass an array to race."))});else return new a(function(e,t){var i=r.length;for(var n=0;n<i;n++)a.resolve(r[n]).then(e,t)})}function $(e){var t=this;var i=new t(b);R(i,e);return i}function ee(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function te(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var B=function(){function t(e){this[E]=K();this._result=this._state=undefined;this._subscribers=[];if(b!==e){typeof e!=="function"&&ee();this instanceof t?Q(this,e):te()}}t.prototype.catch=function e(t){return this.then(null,t)};t.prototype.finally=function e(t){var i=this;var n=i.constructor;if(l(t))return i.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})});return i.then(t,t)};return t}();function ie(){var e=void 0;if(typeof ne.g!=="undefined")e=ne.g;else if(typeof self!=="undefined")e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if(i==="[object Promise]"&&!t.cast)return}e.Promise=B}return B.prototype.then=v,B.all=X,B.race=Z,B.resolve=A,B.reject=$,B._setScheduler=o,B._setAsap=u,B._asap=s,B.polyfill=ie,B.Promise=B}()},
vendor: 6,027 bytes, lines 23-27
23"./node_modules/events/events.js": 24/*!***************************************!*\ 25 !*** ./node_modules/events/events.js ***! 26 \***************************************/ 27function(e){"use strict";var t="object"==typeof Reflect?Reflect:null,l=t&&"function"==typeof t.apply?t.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};var i=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},n=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(o,l){return new Promise(function(e,t){function i(e){o.removeListener(l,n),t(e)}function n(){"function"==typeof o.removeListener&&o.removeListener("error",i),e([].slice.call(arguments))}var r,a,s;p(o,l,n,{once:!0}),"error"!==l&&(a=i,s={once:!0},"function"==typeof(r=o).on)&&p(r,"error",a,s)})},(r.EventEmitter=r).prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function o(e,t,i,n){var r,a;return u(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener||i),r=e._events),a=r[t]),void 0===a?(a=r[t]=i,++e._eventsCount):("function"==typeof a?a=r[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),0<(r=s(e))&&a.length>r&&!a.warned&&(a.warned=!0,(n=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=a.length,console)&&console.warn),e}function h(e,t,i){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},t=function(){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)}.bind(e);return t.listener=i,e.wrapFn=t}function d(e,t,i){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return i?[e.listener||e]:[e];if(i){for(var n=e,r=new Array(n.length),a=0;a<r.length;++a)r[a]=n[a].listener||n[a];return r}return f(e,e.length)}function c(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function f(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function p(i,n,r,a){if("function"==typeof i.on)a.once?i.once(n,r):i.on(n,r);else{if("function"!=typeof i.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i);i.addEventListener(n,function e(t){a.once&&i.removeEventListener(n,e),r(t)})}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return s(this)},r.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){if((a=0<t.length?t[0]:a)instanceof Error)throw a;n=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw n.context=a,n}var a=r[e];if(void 0===a)return!1;if("function"==typeof a)l(a,this,t);else for(var s=a.length,o=f(a,s),i=0;i<s;++i)l(o[i],this,t);return!0},r.prototype.on=r.prototype.addListener=function(e,t){return o(this,e,t,!1)},r.prototype.prependListener=function(e,t){return o(this,e,t,!0)},r.prototype.once=function(e,t){return u(t),this.on(e,h(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,h(this,e,t)),this},r.prototype.off=r.prototype.removeListener=function(e,t){var i,n,r,a,s;if(u(t),void 0!==(n=this._events)&&void 0!==(i=n[e]))if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,a=i.length-1;0<=a;a--)if(i[a]===t||i[a].listener===t){s=i[a].listener,r=a;break}if(r<0)return this;if(0===r)i.shift();else{for(var o=i,l=r;l+1<o.length;l++)o[l]=o[l+1];o.pop()}1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},r.prototype.removeAllListeners=function(e){var t,i=this._events;if(void 0!==i)if(void 0===i.removeListener)0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]);else if(0===arguments.length){for(var n,r=Object.keys(i),a=0;a<r.length;++a)"removeListener"!==(n=r[a])&&this.removeAllListeners(n);this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0}else if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;0<=a;a--)this.removeListener(e,t[a]);return this},r.prototype.listeners=function(e){return d(this,e,!0)},r.prototype.rawListeners=function(e){return d(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):c.call(e,t)},r.prototype.listenerCount=c,r.prototype.eventNames=function(){return 0<this._eventsCount?i(this._events):[]}},
vendor: 2,773 bytes, lines 27-31
27"./node_modules/webworkify-webpack/index.js": 28/*!**************************************************!*\ 29 !*** ./node_modules/webworkify-webpack/index.js ***! 30 \**************************************************/ 31function(e,t,d){function a(i){var n={};function r(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}r.m=i,r.c=n,r.i=function(e){return e},r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw e};var e=r(r.s=ENTRY_MODULE);return e.default||e}var c="[\\.|\\-|\\+|\\w|/|@]+",f="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+c+").*?\\)";function p(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function m(e,t,i){var n={},r=(n[i]=[],t.toString()),t=r.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(t){for(var a,t=t[1],s=new RegExp("(\\\\n|\\W)"+p(t)+f,"g");a=s.exec(r);)"dll-reference"!==a[3]&&n[i].push(a[3]);for(s=new RegExp("\\("+p(t)+'\\("(dll-reference\\s('+c+'))"\\)\\)'+f,"g");a=s.exec(r);)e[a[2]]||(n[i].push(a[1]),e[a[2]]=d(a[1]).m),n[a[2]]=n[a[2]]||[],n[a[2]].push(a[4]);for(var o,l=Object.keys(n),u=0;u<l.length;u++)for(var h=0;h<n[l[u]].length;h++)o=n[l[u]][h],isNaN(+o)||(n[l[u]][h]=+n[l[u]][h])}return n}function s(e,t){for(var i={main:[t]},n={main:[]},r={main:{}};function(i){return Object.keys(i).reduce(function(e,t){return e||0<i[t].length},!1)}(i);)for(var a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],l=i[o].pop();if(r[o]=r[o]||{},!r[o][l]&&e[o][l]){r[o][l]=!0,n[o]=n[o]||[],n[o].push(l);for(var u=m(e,e[o][l],o),h=Object.keys(u),d=0;d<h.length;d++)i[h[d]]=i[h[d]]||[],i[h[d]]=i[h[d]].concat(u[h[d]])}}return n}e.exports=function(e,t){var i={main:d.m},n=(t=t||{}).all?{main:Object.keys(i.main)}:s(i,e),r="",e=(Object.keys(n).filter(function(e){return"main"!==e}).forEach(function(t){for(var e=0;n[t][e];)e++;n[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",r=r+"var "+t+" = ("+a.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+n[t].map(function(e){return JSON.stringify(e)+": "+i[t][e].toString()}).join(",")+"});\n"}),r=r+"new (("+a.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+n.main.map(function(e){return JSON.stringify(e)+": "+i.main[e].toString()}).join(",")+"}))(self);",new window.Blob([r],{type:"text/javascript"}));return t.bare||(t=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(e),(e=new window.Worker(t)).objectURL=t),e}},
31"./src/config.js": 32/*!***********************!*\ 33 !*** ./src/config.js ***! 34 \***********************/ 35function(e,t,i){"use strict";i.r(t),i.d(t,{defaultConfig:function(){return n},createDefaultConfig:function(){return r}});var n={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function r(){return Object.assign({},n)}},
35"./src/core/features.js": 36/*!******************************!*\ 37 !*** ./src/core/features.js ***! 38 \******************************/ 39function(e,t,i){"use strict";i.r(t);var n=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),r=i(/*! ../config.js */"./src/config.js");function a(){}a.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},a.supportNetworkStreamIO=function(){var e=new n.default({},(0,r.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t},a.getNetworkLoaderTypeName=function(){var e=new n.default({},(0,r.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t},a.supportNativeMediaPlayback=function(e){e=(a.videoElement=null==a.videoElement?window.document.createElement("video"):a.videoElement).canPlayType(e);return"probably"===e||"maybe"==e},a.getFeatureList=function(){var e={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.mseFlvPlayback=a.supportMSEH264Playback(),e.networkStreamIO=a.supportNetworkStreamIO(),e.networkLoaderName=a.getNetworkLoaderTypeName(),e.mseLiveFlvPlayback=e.mseFlvPlayback&&e.networkStreamIO,e.nativeMP4H264Playback=a.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeMP4H265Playback=a.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),e.nativeWebmVP8Playback=a.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=a.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e},t.default=a},
39"./src/core/media-info.js": 40/*!********************************!*\ 41 !*** ./src/core/media-info.js ***! 42 \********************************/ 43function(e,t,i){"use strict";function n(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}i.r(t),n.prototype.isComplete=function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t},n.prototype.isSeekable=function(){return!0===this.hasKeyframesIndex},n.prototype.getNearestKeyframe=function(e){var t;return null==this.keyframesIndex?null:(t=this.keyframesIndex,{index:e=this._search(t.times,e),milliseconds:t.times[e],fileposition:t.filepositions[e]})},n.prototype._search=function(e,t){var i,n=0,r=e.length-1,a=0,s=r;for(t<e[0]&&(n=0,a=s+1);a<=s;){if((i=a+Math.floor((s-a)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?a=i+1:s=i-1}return n},t.default=n},
43"./src/core/media-segment-info.js": 44/*!****************************************!*\ 45 !*** ./src/core/media-segment-info.js ***! 46 \****************************************/ 47function(e,t,i){"use strict";i.r(t),i.d(t,{SampleInfo:function(){return n},MediaSegmentInfo:function(){return r},IDRSampleList:function(){return s},MediaSegmentInfoList:function(){return l}});var n=function(e,t,i,n,r){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=r,this.fileposition=null},r=(a.prototype.appendSyncPoint=function(e){e.isSyncPoint=!0,this.syncPoints.push(e)},a);function a(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}o.prototype.clear=function(){this._list=[]},o.prototype.appendArray=function(e){var t=this._list;0!==e.length&&(0<t.length&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))},o.prototype.getLastSyncPointBeforeDts=function(e){if(0==this._list.length)return null;var t,i=this._list,n=0,r=i.length-1,a=0,s=r;for(e<i[0].dts&&(n=0,a=s+1);a<=s;){if((t=a+Math.floor((s-a)/2))===r||e>=i[t].dts&&e<i[t+1].dts){n=t;break}i[t].dts<e?a=t+1:s=t-1}return this._list[n]};var s=o;function o(){this._list=[]}Object.defineProperty(u.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),u.prototype.isEmpty=function(){return 0===this._list.length},u.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},u.prototype._searchNearestSegmentBefore=function(e){var t=this._list;if(0===t.length)return-2;var i,n=t.length-1,r=0,a=n,s=0;if(e<t[0].originalBeginDts)return s=-1;for(;r<=a;){if((i=r+Math.floor((a-r)/2))===n||e>t[i].lastSample.originalDts&&e<t[i+1].originalBeginDts){s=i;break}t[i].originalBeginDts<e?r=i+1:a=i-1}return s},u.prototype._searchNearestSegmentAfter=function(e){return this._searchNearestSegmentBefore(e)+1},u.prototype.append=function(e){var t=this._list,i=this._lastAppendLocation,n=0;-1!==i&&i<t.length&&e.originalBeginDts>=t[i].lastSample.originalDts&&(i===t.length-1||i<t.length-1&&e.originalBeginDts<t[i+1].originalBeginDts)?n=i+1:0<t.length&&(n=this._searchNearestSegmentBefore(e.originalBeginDts)+1),this._lastAppendLocation=n,this._list.splice(n,0,e)},u.prototype.getLastSegmentBefore=function(e){e=this._searchNearestSegmentBefore(e);return 0<=e?this._list[e]:null},u.prototype.getLastSampleBefore=function(e){e=this.getLastSegmentBefore(e);return null!=e?e.lastSample:null},u.prototype.getLastSyncPointBefore=function(e){for(var t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;0===i.length&&0<t;)i=this._list[--t].syncPoints;return 0<i.length?i[i.length-1]:null};var l=u;function u(e){this._type=e,this._list=[],this._lastAppendLocation=-1}},
47"./src/core/mse-controller.js": 48/*!************************************!*\ 49 !*** ./src/core/mse-controller.js ***! 50 \************************************/ 51function(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"),l=i(/*! ../utils/browser.js */"./src/utils/browser.js"),s=i(/*! ./mse-events.js */"./src/core/mse-events.js"),a=i(/*! ./media-segment-info.js */"./src/core/media-segment-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js");function h(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 a.IDRSampleList}h.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},h.prototype.on=function(e,t){this._emitter.addListener(e,t)},h.prototype.off=function(e,t){this._emitter.removeListener(e,t)},h.prototype.attachMediaElement=function(e){if(this._mediaSource)throw new u.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},h.prototype.detachMediaElement=function(){if(this._mediaSource){var e,t=this._mediaSource;for(e in this._sourceBuffers){var i=this._pendingSegments[e],i=(i.splice(0,i.length),this._pendingSegments[e]=null,this._pendingRemoveRanges[e]=null,this._lastInitSegments[e]=null,this._sourceBuffers[e]);if(i){if("closed"!==t.readyState){try{t.removeSourceBuffer(i)}catch(e){o.default.e(this.TAG,e.message)}i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[e]=null,this._sourceBuffers[e]=null}}if("open"===t.readyState)try{t.endOfStream()}catch(e){o.default.e(this.TAG,e.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},h.prototype.appendInitSegment=function(e,t){if(this._mediaSource&&"open"===this._mediaSource.readyState){var i=e,n=""+i.container,r=(i.codec&&0<i.codec.length&&(n+=";codecs="+i.codec),!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 a=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return o.default.e(this.TAG,e.message),void this._emitter.emit(s.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(),l.default.safari&&"audio/mpeg"===i.container&&0<i.mediaDuration&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())}else this._pendingSourceBufferInit.push(e),this._pendingSegments[e.type].push(e)},h.prototype.appendMediaSegment=function(e){this._pendingSegments[e.type].push(e),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer(),e=this._sourceBuffers[e.type];!e||e.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},h.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();
51var n=this._pendingSegments[t];if(n.splice(0,n.length),"closed"!==this._mediaSource.readyState){for(var r=0;r<i.buffered.length;r++){var a=i.buffered.start(r),s=i.buffered.end(r);this._pendingRemoveRanges[t].push({start:a,end:s})}i.updating||this._doRemoveRanges(),l.default.safari&&(n=this._lastInitSegments[t])&&(this._pendingSegments[t].push(n),i.updating||this._doAppendSegments())}}},h.prototype.endOfStream=function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},h.prototype.getNearestKeyframe=function(e){return this._idrList.getLastSyncPointBeforeDts(e)},h.prototype._needCleanupSourceBuffer=function(){if(this._config.autoCleanupSourceBuffer){var e,t=this._mediaElement.currentTime;for(e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){i=i.buffered;if(1<=i.length&&t-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}}return!1},h.prototype._doCleanupSourceBuffer=function(){var e,t=this._mediaElement.currentTime;for(e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){for(var n=i.buffered,r=!1,a=0;a<n.length;a++){var s,o=n.start(a),l=n.end(a);o<=t&&t<l+3?t-o>=this._config.autoCleanupMaxBackwardDuration&&(r=!0,s=t-this._config.autoCleanupMinBackwardDuration,this._pendingRemoveRanges[e].push({start:o,end:s})):l<t&&(r=!0,this._pendingRemoveRanges[e].push({start:o,end:l}))}r&&!i.updating&&this._doRemoveRanges()}}},h.prototype._updateMediaSourceDuration=function(){var e,t=this._sourceBuffers;0===this._mediaElement.readyState||"open"!==this._mediaSource.readyState||t.video&&t.video.updating||t.audio&&t.audio.updating||(t=this._mediaSource.duration,0<(e=this._pendingMediaDuration)&&(isNaN(t)||t<e)&&(o.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+e),this._mediaSource.duration=e),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0)},h.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)}},h.prototype._doAppendSegments=function(){var t,e=this._pendingSegments;for(t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&0<e[t].length){var i,n,r=e[t].shift();if(r.timestampOffset&&(i=this._sourceBuffers[t].timestampOffset,n=r.timestampOffset/1e3,.1<Math.abs(i-n)&&(o.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+n),this._sourceBuffers[t].timestampOffset=n),delete r.timestampOffset),r.data&&0!==r.data.byteLength)try{this._sourceBuffers[t].appendBuffer(r.data),this._isBufferFull=!1,"video"===t&&r.hasOwnProperty("info")&&this._idrList.appendArray(r.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(r),22===e.code?(this._isBufferFull||this._emitter.emit(s.default.BUFFER_FULL),this._isBufferFull=!0):(o.default.e(this.TAG,t,e.message),this._emitter.emit(s.default.ERROR,{code:e.code,msg:e.message}))}}},h.prototype._onSourceOpen=function(){if(o.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),0<this._pendingSourceBufferInit.length)for(var e=this._pe
51ndingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(s.default.SOURCE_OPEN)},h.prototype._onSourceEnded=function(){o.default.v(this.TAG,"MediaSource onSourceEnded")},h.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))},h.prototype._hasPendingSegments=function(){var e=this._pendingSegments;return 0<(e.video&&e.video.length)||e.audio&&0<e.audio.length},h.prototype._hasPendingRemoveRanges=function(){var e=this._pendingRemoveRanges;return 0<(e.video&&e.video.length)||e.audio&&0<e.audio.length},h.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(s.default.UPDATE_END)},h.prototype._onSourceBufferError=function(e){o.default.e(this.TAG,"SourceBuffer Error: "+e)},t.default=h},
51"./src/core/mse-events.js": 52/*!********************************!*\ 53 !*** ./src/core/mse-events.js ***! 54 \********************************/ 55function(e,t,i){"use strict";i.r(t);t.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"}},
55"./src/core/transmuxer.js": 56/*!********************************!*\ 57 !*** ./src/core/transmuxer.js ***! 58 \********************************/ 59function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),n=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),a=i.n(n),s=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),l=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),u=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),h=i(/*! ./media-info.js */"./src/core/media-info.js");function d(t,i){if(this.TAG="Transmuxer",this._emitter=new(r()),i.enableWorker&&"undefined"!=typeof Worker)try{this._worker=a()(/*! ./transmuxing-worker */"./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},o.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:o.default.getConfig()})}catch(e){s.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new l.default(t,i)}else this._controller=new l.default(t,i);this._controller&&((t=this._controller).on(u.default.IO_ERROR,this._onIOError.bind(this)),t.on(u.default.DEMUX_ERROR,this._onDemuxError.bind(this)),t.on(u.default.INIT_SEGMENT,this._onInitSegment.bind(this)),t.on(u.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),t.on(u.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),t.on(u.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),t.on(u.default.MEDIA_INFO,this._onMediaInfo.bind(this)),t.on(u.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),t.on(u.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),t.on(u.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),t.on(u.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this)))}d.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),o.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},d.prototype.on=function(e,t){this._emitter.addListener(e,t)},d.prototype.off=function(e,t){this._emitter.removeListener(e,t)},d.prototype.hasWorker=function(){return null!=this._worker},d.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},d.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},d.prototype.seek=function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)},d.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},d.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},d.prototype._onInitSegment=function(e,t){var i=this;Promise.resolve().then(function(){try{i._emitter.emit(u.default.INIT_SEGMENT,e,t)}catch(e){}})},d.prototype._onMediaSegment=function(e,t){var i=this;Promise.resolve().then(function(){try{i._emitter.emit(u.default.MEDIA_SEGMENT,e,t)}catch(e){}})},d.prototype._onLoadingComplete=function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(u.default.LOADING_COMPLETE)})},d.prototype._onRecoveredEarlyEof=function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(u.default.RECOVERED_EARLY_EOF)})},d.prototype._onMediaInfo=function(e){var t=this;Promise.resolve().then(function(){try{t._emitter.emit(u.default.MEDIA_INFO,e)}catch(e){}})},d.prototype._onMetaDataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(u.default.METADATA_ARRIVED,e)})},d.prototype._onScriptDataArrived=function(e){var t=this;Promise.resolve().then(function(){try{t._emitter.emit(u.default.SCRIPTDATA_ARRIVED,e)}catch(e){}})},d.prototype._onStatisticsInfo=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(u.default.STATISTICS_INFO,e)})},d.prototype._onIOError=function(e,t){var i=this;Promise.resolve().then(function(){i._emitter.emit(u.default.IO_ERROR,e,t)})},d.prototype._onDemuxError=function(e,t){var i=this;Promise.resolve().then(function(){i._emitter.emit(u.default.DEMUX_ERROR,e,t)})},d.prototype._onRecommendSeekpoint=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(u.default.RECOMMEND_SEEKPOINT,e)})},d.prototype._onLoggingConfigChanged=function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})},d.prototype._onWorkerMessage=function(e){var t=e.data,i=t.data;if("destroyed"===t.msg||this._workerDestroying)this._workerDestroying=!1,this._worker.terminate(),this._worker=null;else switch(t.msg){case u.default.INIT_SEGMENT:case u.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case u.default.LOADING_COMPLETE:case u.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case u.default.MEDIA_INFO:Object.setPrototypeOf(i,h.default.prototype),this._emitter.emit(t.msg,i);break;case u.default.METADATA_ARRIVED:case u.default.SCRIPTDATA_ARRIVED:case u.default.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case u.default.IO_ERROR:case u.default.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case u.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":s.default.emitter.emit("log",i.type,i.logcat)}},t.default=d},
59"./src/core/transmuxing-controller.js": 60/*!********************************************!*\ 61 !*** ./src/core/transmuxing-controller.js ***! 62 \********************************************/ 63function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ./media-info.js */"./src/core/media-info.js"),l=i(/*! ../demux/flv-demuxer.js */"./src/demux/flv-demuxer.js"),u=i(/*! ../remux/mp4-remuxer.js */"./src/remux/mp4-remuxer.js"),h=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),d=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),c=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js");function f(t,i){this.TAG="TransmuxingController",this._emitter=new(r()),this._config=i,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t;var n=this._currentSegmentIndex=0;this._mediaDataSource.segments.forEach(function(e){e.timestampBase=n,n+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,i.referrerPolicy&&(e.referrerPolicy=i.referrerPolicy)}),isNaN(n)||this._mediaDataSource.duration===n||(this._mediaDataSource.duration=n),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}f.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},f.prototype.on=function(e,t){this._emitter.addListener(e,t)},f.prototype.off=function(e,t){this._emitter.removeListener(e,t)},f.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},f.prototype._loadSegment=function(e,t){this._currentSegmentIndex=e;var i=this._mediaDataSource.segments[e],i=this._ioctl=new d.default(i,this._config,e);i.onError=this._onIOException.bind(this),i.onSeeked=this._onIOSeeked.bind(this),i.onComplete=this._onIOComplete.bind(this),i.onRedirect=this._onIORedirect.bind(this),i.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):i.onDataArrival=this._onInitChunkArrival.bind(this),i.open(t)},f.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},f.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},f.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},f.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},f.prototype.seek=function(e){var t,i,n;null!=this._mediaInfo&&this._mediaInfo.isSeekable()&&((t=this._searchSegmentIndexContains(e))===this._currentSegmentIndex?null==(i=this._mediaInfo.segments[t])?this._pendingSeekTime=e:(n=i.getNearestKeyframe(e),this._remuxer.seek(n.milliseconds),this._ioctl.seek(n.fileposition),this._pendingResolveSeekPoint=n.milliseconds):null==(i=this._mediaInfo.segments[t])?(this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t)):(n=i.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())},f.prototype._searchSegmentIndexContains=function(e){for(var t=this._mediaDataSource.segments,i=t.length-1,n=0;n<t.length;n++)if(e<t[n].timestampBase){i=n-1;break}return i},f.prototype._onInitChunkArrival=function(e,t){var i,n=this;return 0<t?(this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,this._demuxer.parseChunks(e,t)):(i=l.default.probe(e)).match?(this._demuxer=new l.default(i,this._config),this._remuxer||(this._remuxer=new u.default(this._config)),null==(i=this._mediaDataSource).duration||isNaN(i.duration)||(this._demuxer.overridedDuration=i.duration),"boolean"==typeof i.hasAudio&&(this._demuxer.overridedHasAudio=i.hasAudio),"boolean"==typeof i.hasVideo&&(this._demuxer.overridedHasVideo=i.hasVideo),this._demuxer.timestampBase=i.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),this._demuxer.parseChunks(e,t)):(a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(c.default.DEMUX_ERROR,h.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),0)},f.prototype._onMediaInfo=function(e){var t=this,e=(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,o.default.prototype)),Object.assign({},e));Object.setPrototypeOf(e,o.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=e,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pe
63ndingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})},f.prototype._onMetaDataArrived=function(e){this._emitter.emit(c.default.METADATA_ARRIVED,e)},f.prototype._onScriptDataArrived=function(e){this._emitter.emit(c.default.SCRIPTDATA_ARRIVED,e)},f.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},f.prototype._onIOComplete=function(e){e+=1;e<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(e)):(this._remuxer.flushStashedSamples(),this._emitter.emit(c.default.LOADING_COMPLETE),this._disableStatisticsReporter())},f.prototype._onIORedirect=function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e},f.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(c.default.RECOVERED_EARLY_EOF)},f.prototype._onIOException=function(e,t){a.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(c.default.IO_ERROR,e,t),this._disableStatisticsReporter()},f.prototype._onDemuxException=function(e,t){a.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(c.default.DEMUX_ERROR,e,t)},f.prototype._onRemuxerInitSegmentArrival=function(e,t){this._emitter.emit(c.default.INIT_SEGMENT,e,t)},f.prototype._onRemuxerMediaSegmentArrival=function(e,t){null==this._pendingSeekTime&&(this._emitter.emit(c.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint)&&"video"===e&&(e=t.info.syncPoints,t=this._pendingResolveSeekPoint,this._pendingResolveSeekPoint=null,s.default.safari&&0<e.length&&e[0].originalDts===t&&(t=e[0].pts),this._emitter.emit(c.default.RECOMMEND_SEEKPOINT,t))},f.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},f.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},f.prototype._reportSegmentMediaInfo=function(e){e=this._mediaInfo.segments[e],e=Object.assign({},e);e.duration=this._mediaInfo.duration,e.segmentCount=this._mediaInfo.segmentCount,delete e.segments,delete e.keyframesIndex,this._emitter.emit(c.default.MEDIA_INFO,e)},f.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(c.default.STATISTICS_INFO,e)},t.default=f},
63"./src/core/transmuxing-events.js": 64/*!****************************************!*\ 65 !*** ./src/core/transmuxing-events.js ***! 66 \****************************************/ 67function(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"}},
67"./src/core/transmuxing-worker.js": 68/*!****************************************!*\ 69 !*** ./src/core/transmuxing-worker.js ***! 70 \****************************************/ 71function(e,t,i){"use strict";i.r(t);var a=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),s=i(/*! ../utils/polyfill.js */"./src/utils/polyfill.js"),o=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),l=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js");t.default=function(i){var n=null,r=function(e,t){i.postMessage({msg:"logcat_callback",data:{type:e,logcat:t}})}.bind(this);s.default.install(),i.addEventListener("message",function(e){switch(e.data.cmd){case"init":(n=new o.default(e.data.param[0],e.data.param[1])).on(l.default.IO_ERROR,function(e,t){i.postMessage({msg:l.default.IO_ERROR,data:{type:e,info:t}})}.bind(this)),n.on(l.default.DEMUX_ERROR,function(e,t){i.postMessage({msg:l.default.DEMUX_ERROR,data:{type:e,info:t}})}.bind(this)),n.on(l.default.INIT_SEGMENT,function(e,t){e={msg:l.default.INIT_SEGMENT,data:{type:e,data:t}};i.postMessage(e,[t.data])}.bind(this)),n.on(l.default.MEDIA_SEGMENT,function(e,t){e={msg:l.default.MEDIA_SEGMENT,data:{type:e,data:t}};i.postMessage(e,[t.data])}.bind(this)),n.on(l.default.LOADING_COMPLETE,function(){var e={msg:l.default.LOADING_COMPLETE};i.postMessage(e)}.bind(this)),n.on(l.default.RECOVERED_EARLY_EOF,function(){var e={msg:l.default.RECOVERED_EARLY_EOF};i.postMessage(e)}.bind(this)),n.on(l.default.MEDIA_INFO,function(e){e={msg:l.default.MEDIA_INFO,data:e};i.postMessage(e)}.bind(this)),n.on(l.default.METADATA_ARRIVED,function(e){e={msg:l.default.METADATA_ARRIVED,data:e};i.postMessage(e)}.bind(this)),n.on(l.default.SCRIPTDATA_ARRIVED,function(e){e={msg:l.default.SCRIPTDATA_ARRIVED,data:e};i.postMessage(e)}.bind(this)),n.on(l.default.STATISTICS_INFO,function(e){e={msg:l.default.STATISTICS_INFO,data:e};i.postMessage(e)}.bind(this)),n.on(l.default.RECOMMEND_SEEKPOINT,function(e){i.postMessage({msg:l.default.RECOMMEND_SEEKPOINT,data:e})}.bind(this));break;case"destroy":n&&(n.destroy(),n=null),i.postMessage({msg:"destroyed"});break;case"start":n.start();break;case"stop":n.stop();break;case"seek":n.seek(e.data.param);break;case"pause":n.pause();break;case"resume":n.resume();break;case"logging_config":var t=e.data.param;a.default.applyConfig(t),!0===t.enableCallback?a.default.addLogListener(r):a.default.removeLogListener(r)}})}},
71"./src/demux/amf-parser.js": 72/*!*********************************!*\ 73 !*** ./src/demux/amf-parser.js ***! 74 \*********************************/ 75function(e,t,i){"use strict";i.r(t);var _=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ../utils/utf8-conv.js */"./src/utils/utf8-conv.js"),y=i(/*! ../utils/exception.js */"./src/utils/exception.js"),v=(i=new ArrayBuffer(2),new DataView(i).setInt16(0,256,!0),256===new Int16Array(i)[0]);function A(){}A.parseScriptData=function(e,t,i){var n={};try{var r=A.parseValue(e,t,i),a=A.parseValue(e,t+r.size,i-r.size);n[r.data]=a.data}catch(e){_.default.e("AMF",e.toString())}return n},A.parseObject=function(e,t,i){if(i<3)throw new y.IllegalStateException("Data not enough when parse ScriptDataObject");var n=A.parseString(e,t,i),e=A.parseValue(e,t+n.size,i-n.size),t=e.objectEnd;return{data:{name:n.data,value:e.data},size:n.size+e.size,objectEnd:t}},A.parseVariable=function(e,t,i){return A.parseObject(e,t,i)},A.parseString=function(e,t,i){if(i<2)throw new y.IllegalStateException("Data not enough when parse String");i=new DataView(e,t,i).getUint16(0,!v),e=0<i?(0,n.default)(new Uint8Array(e,t+2,i)):"";return{data:e,size:2+i}},A.parseLongString=function(e,t,i){if(i<4)throw new y.IllegalStateException("Data not enough when parse LongString");i=new DataView(e,t,i).getUint32(0,!v),e=0<i?(0,n.default)(new Uint8Array(e,t+4,i)):"";return{data:e,size:4+i}},A.parseDate=function(e,t,i){if(i<10)throw new y.IllegalStateException("Data size invalid when parse Date");e=new DataView(e,t,i),t=e.getFloat64(0,!v);return t+=60*e.getInt16(8,!v)*1e3,{data:new Date(t),size:10}},A.parseValue=function(e,t,i){if(i<1)throw new y.IllegalStateException("Data not enough when parse Value");var n=new DataView(e,t,i),r=1,a=n.getUint8(0),s=!1;try{switch(a){case 0:o=n.getFloat64(1,!v),r+=8;break;case 1:var o=!!n.getUint8(1);r+=1;break;case 2:var l=A.parseString(e,t+1,i-1);o=l.data,r+=l.size;break;case 3:o={};var u=0;for(9==(16777215&n.getUint32(i-4,!v))&&(u=3);r<i-4;){var h=A.parseObject(e,t+r,i-r-u);if(h.objectEnd)break;o[h.data.name]=h.data.value,r+=h.size}r<=i-3&&9===(16777215&n.getUint32(r-1,!v))&&(r+=3);break;case 8:o={},r+=4;u=0;for(9==(16777215&n.getUint32(i-4,!v))&&(u=3);r<i-8;){var d=A.parseVariable(e,t+r,i-r-u);if(d.objectEnd)break;o[d.data.name]=d.data.value,r+=d.size}r<=i-3&&9===(16777215&n.getUint32(r-1,!v))&&(r+=3);break;case 9:r=1,s=!(o=void 0);break;case 10:o=[];var c=n.getUint32(1,!v);r+=4;for(var f=0;f<c;f++){var p=A.parseValue(e,t+r,i-r);o.push(p.data),r+=p.size}break;case 11:var m=A.parseDate(e,t+1,i-1);o=m.data,r+=m.size;break;case 12:var g=A.parseString(e,t+1,i-1);o=g.data,r+=g.size;break;default:r=i,_.default.w("AMF","Unsupported AMF value type "+a)}}catch(e){_.default.e("AMF",e.toString())}return{data:o,size:r,objectEnd:s}},t.default=A},
75"./src/demux/demux-errors.js": 76/*!***********************************!*\ 77 !*** ./src/demux/demux-errors.js ***! 78 \***********************************/ 79function(e,t,i){"use strict";i.r(t);t.default={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},
79"./src/demux/exp-golomb.js": 80/*!*********************************!*\ 81 !*** ./src/demux/exp-golomb.js ***! 82 \*********************************/ 83function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/exception.js */"./src/utils/exception.js");function r(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}r.prototype.destroy=function(){this._buffer=null},r.prototype._fillCurrentWord=function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new n.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var e=Math.min(4,e),t=new Uint8Array(4);t.set(this._buffer.subarray(this._buffer_index,this._buffer_index+e)),this._current_word=new DataView(t.buffer).getUint32(0,!1),this._buffer_index+=e,this._current_word_bits_left=8*e},r.prototype.readBits=function(e){if(32<e)throw new n.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");var t,i;return e<=this._current_word_bits_left?(t=this._current_word>>>32-e,this._current_word<<=e,this._current_word_bits_left-=e,t):(t=this._current_word_bits_left?this._current_word:0,t>>>=32-this._current_word_bits_left,e=e-this._current_word_bits_left,this._fillCurrentWord(),e=Math.min(e,this._current_word_bits_left),i=this._current_word>>>32-e,this._current_word<<=e,this._current_word_bits_left-=e,t<<e|i)},r.prototype.readBool=function(){return 1===this.readBits(1)},r.prototype.readByte=function(){return this.readBits(8)},r.prototype._skipLeadingZero=function(){for(var e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},r.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},r.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},t.default=r},
83"./src/demux/flv-demuxer.js": 84/*!**********************************!*\ 85 !*** ./src/demux/flv-demuxer.js ***! 86 \**********************************/ 87function(e,t,i){"use strict";i.r(t);var E=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./amf-parser.js */"./src/demux/amf-parser.js"),b=i(/*! ./sps-parser.js */"./src/demux/sps-parser.js"),w=i(/*! ./hevc-sps-parser.js */"./src/demux/hevc-sps-parser.js"),S=i(/*! ./demux-errors.js */"./src/demux/demux-errors.js"),n=i(/*! ../core/media-info.js */"./src/core/media-info.js"),d=i(/*! ../utils/exception.js */"./src/utils/exception.js");function c(e,t){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 n.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=(t=new ArrayBuffer(2),new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0])}c.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},c.probe=function(e){var t,i,n,e=new Uint8Array(e),r={match:!1};return 70!==e[0]||76!==e[1]||86!==e[2]||1!==e[3]||(t=(4&e[4])>>>2!=0,i=0!=(1&e[4]),(e=e[n=5]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3])<9)?r:{match:!0,consumed:e,dataOffset:e,hasAudioTrack:t,hasVideoTrack:i}},c.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(c.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}
87,enumerable:!1,configurable:!0}),Object.defineProperty(c.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(c.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),c.prototype.resetMediaInfo=function(){this._mediaInfo=new n.default},c.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},c.prototype.parseChunks=function(e,t){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new d.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0,n=this._littleEndian;if(0===t){if(!(13<e.byteLength))return 0;i=c.probe(e).dataOffset}for(this._firstParse&&(this._firstParse=!1,t+i!==this._dataOffset&&E.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==(r=new DataView(e,i)).getUint32(0,!n)&&E.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4);i<e.byteLength;){this._dispatch=!0;var r=new DataView(e,i);if(i+11+4>e.byteLength)break;var a=r.getUint8(0),s=16777215&r.getUint32(0,!n);if(i+11+s+4>e.byteLength)break;if(8!==a&&9!==a&&18!==a)E.default.w(this.TAG,"Unsupported tag type "+a+", skipped");else{var o=r.getUint8(4),l=r.getUint8(5),u=r.getUint8(6)|l<<8|o<<16|r.getUint8(7)<<24,h=(0!=(16777215&r.getUint32(7,!n))&&E.default.w(this.TAG,"Meet tag which has StreamID != 0!"),i+11);switch(a){case 8:this._parseAudioData(e,h,s,u);break;case 9:this._parseVideoData(e,h,s,u,t+i);break;case 18:this._parseScriptData(e,h,s)}l=r.getUint32(11+s,!n);l!==11+s&&E.default.w(this.TAG,"Invalid PrevTagSize "+l)}i+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i},c.prototype._parseScriptData=function(e,t,i){e=r.default.parseScriptData(e,t,i);if(e.hasOwnProperty("onMetaData")){if(null==e.onMetaData||"object"!=typeof e.onMetaData)return void E.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&E.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=e;var n,t=this._metadata.onMetaData;this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},t)),"boolean"==typeof t.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=t.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof t.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=t.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof t.audiodatarate&&(this._mediaInfo.audioDataRate=t.audiodatarate),"number"==typeof t.videodatarate&&(this._mediaInfo.videoDataRate=t.videodatarate),"number"==typeof t.width&&(this._mediaInfo.width=t.width),"number"==typeof t.height&&(this._mediaInfo.height=t.height),"number"==typeof t.duration?this._durationOverrided||(i=Math.floor(t.duration*this._timescale),this._duration=i,this._mediaInfo.duration=i):this._mediaInfo.duration=0,"number"==typeof t.framerate&&0<(i=Math.floor(1e3*t.framerate))&&(n=i/1e3,this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=n,this._referenceFrameRate.fps_num=i,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=n),"object"==typeof t.keyframes?(this._mediaInfo.hasKeyframesIndex=!0,i=t.keyframes,this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(i),t.keyframes=null):this._mediaInfo.hasKeyframesIndex=!1,this._dispatch=!1,this._mediaInfo.metadata=t,E.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}0<Object.keys(e).length&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},e))},c.prototype._parseKeyframesIndex=function(e){for(var t=[],i=[],n=1;n<e.times.length;n++){var r=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(r),i.push(e.filepositions[n])}return{times:t,filepositions:i}},c.prototype._parseAudioData=function(e,t,i,n){if(i<=1)E.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var r=new DataView(e,t,i).getUint8(0),a=r>>>4;if(2!=a&&10!=a)this._onError(S.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a);else{var s=0,o=(12&r)>>>2;if(0<=o&&o<=4){var s=this._flvSoundRateTable[o],r=1&r,l=this._audioMetadata,u=this._audioTrack;if(l||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(l=this._audioMetadata={type:"audio"}).id=u.id,l.timescale=this._timescale,l.duration=this._duration,l.audioSampleRate=s,l.channelCount=0==r?1:2),10==a){var h,d,s=this._parseAACAudioData(e,t+1,i-1);null!=s&&(0===s.packetType?(l.config&&E.default.w(this.TAG,"Found another AudioSpecificConfig!"),h=s.data,l.audioSampleRate=h.samplingRate,l.channelCount=h.channelCount,l.codec=h.codec,l.originalCodec=h.originalCodec,l.config=h.config,l.refSampleDuration=1024/l.audioSampleRate*l.timescale,E.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",l),(d=this._mediaInfo).audioCodec=l.originalCodec,d.audioSampleRate=l.audioSampleRate,d.audioChannelCount=l.channelCount,d.hasVideo?null!=d.videoCodec&&(d.mimeType='video/x-flv; codecs="'+d.videoCodec+","+d.audioCodec+'"'):d.mimeType='video/x-flv; codecs="'+d.audioCodec+'"',d.isComplete()&&this._onMediaInfo(d)):1===s.packetType?(c=this._timestampBase+n,r={unit:s.data,length:s.data.byteLength,dts:c,pts:c},u.samples.push(r),u.length+=s.data.length):E.default.e(this.TAG,"Flv: Unsupported AAC data type "+s.packetType))}
87else if(2==a){if(!l.codec){if(null==(h=this._parseMP3AudioData(e,t+1,i-1,!0)))return;l.audioSampleRate=h.samplingRate,l.channelCount=h.channelCount,l.codec=h.codec,l.originalCodec=h.originalCodec,l.refSampleDuration=1152/l.audioSampleRate*l.timescale,E.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",l),(d=this._mediaInfo).audioCodec=l.codec,d.audioSampleRate=l.audioSampleRate,d.audioChannelCount=l.channelCount,d.audioDataRate=h.bitRate,d.hasVideo?null!=d.videoCodec&&(d.mimeType='video/x-flv; codecs="'+d.videoCodec+","+d.audioCodec+'"'):d.mimeType='video/x-flv; codecs="'+d.audioCodec+'"',d.isComplete()&&this._onMediaInfo(d)}var c,r=this._parseMP3AudioData(e,t+1,i-1,!1);null!=r&&(c=this._timestampBase+n,s={unit:r,length:r.byteLength,dts:c,pts:c},u.samples.push(s),u.length+=r.length)}}else this._onError(S.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+o)}}},c.prototype._parseAACAudioData=function(e,t,i){var n,r;if(!(i<=1))return n={},r=new Uint8Array(e,t,i),n.packetType=r[0],0===r[0]?n.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):n.data=r.subarray(1),n;E.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},c.prototype._parseAACAudioSpecificConfig=function(e,t,i){var n,r,e=new Uint8Array(e,t,i),t=null,i=0,a=null,i=n=e[0]>>>3;if((r=(7&e[0])<<1|e[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(S.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var s=this._mpegSamplingRates[r],o=(120&e[1])>>>3;if(!(o<0||8<=o))return 5===i&&(a=(7&e[1])<<1|e[2]>>>7,e[2]),-1!==(e=self.navigator.userAgent.toLowerCase()).indexOf("firefox")?a=6<=r?(i=5,t=new Array(4),r-3):(i=2,t=new Array(2),r):-1!==e.indexOf("android")?(i=2,t=new Array(2),a=r):(i=5,a=r,t=new Array(4),6<=r?a=r-3:1==o&&(i=2,t=new Array(2),a=r)),t[0]=i<<3,t[0]|=(15&r)>>>1,t[1]=(15&r)<<7,t[1]|=(15&o)<<3,5===i&&(t[1]|=(15&a)>>>1,t[2]=(1&a)<<7,t[2]|=8,t[3]=0),{config:t,samplingRate:s,channelCount:o,codec:"mp4a.40."+i,originalCodec:"mp4a.40."+n};this._onError(S.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},c.prototype._parseMP3AudioData=function(e,t,i,n){if(!(i<4)){this._littleEndian;
87e=new Uint8Array(e,t,i),t=null;if(n){if(255!==e[0])return;var i=e[1]>>>3&3,n=(6&e[1])>>1,r=(240&e[2])>>>4,a=(12&e[2])>>>2,s=3!=(e[3]>>>6&3)?2:1,o=0,l=0;switch(i){case 0:o=this._mpegAudioV25SampleRateTable[a];break;case 2:o=this._mpegAudioV20SampleRateTable[a];break;case 3:o=this._mpegAudioV10SampleRateTable[a]}switch(n){case 1:r<this._mpegAudioL3BitRateTable.length&&(l=this._mpegAudioL3BitRateTable[r]);break;case 2:r<this._mpegAudioL2BitRateTable.length&&(l=this._mpegAudioL2BitRateTable[r]);break;case 3:r<this._mpegAudioL1BitRateTable.length&&(l=this._mpegAudioL1BitRateTable[r])}t={bitRate:l,samplingRate:o,channelCount:s,codec:"mp3",originalCodec:"mp3"}}else t=e;return t}E.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},c.prototype._parseVideoData=function(e,t,i,n,r){var a,s;i<=1?E.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!"):!0===this._hasVideoFlagOverrided&&!1===this._hasVideo||(a=(240&(s=new Uint8Array(e,t,i)[0]))>>>4,7!=(s=15&s)&&12!=s?this._onError(S.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+s):7==s?this._parseAVCVideoPacket(e,t+1,i-1,n,r,a):12==s&&this._parseHVCVideoPacket(e,t+1,i-1,n,r,a))},c.prototype._parseAVCVideoPacket=function(e,t,i,n,r,a){var s,o,l;i<4?E.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime"):(s=this._littleEndian,o=(l=new DataView(e,t,i)).getUint8(0),l=(16777215&l.getUint32(0,!s))<<8>>8,0===o?this._parseAVCDecoderConfigurationRecord(e,t+4,i-4):1===o?this._parseAVCVideoData(e,t+4,i-4,n,r,a,l):2!==o&&this._onError(S.default.FORMAT_ERROR,"Flv: Invalid video packet type "+o))},c.prototype._parseAVCDecoderConfigurationRecord=function(e,t,i){if(i<7)E.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,r=this._videoTrack,a=this._littleEndian,s=new DataView(e,t,i),r=(n?void 0!==n.avcc&&E.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={type:"video"}).id=r.id,n.timescale=this._timescale,n.duration=this._duration),s.getUint8(0)),o=s.getUint8(1);s.getUint8(2),s.getUint8(3);if(1!==r||0===o)this._onError(S.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");else if(this._naluLengthSize=1+(3&s.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)this._onError(S.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else{var l=31&s.getUint8(5);if(0==l)this._onError(S.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");else{1<l&&E.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+l);for(var u=6,h=0;h<l;h++){var d=s.getUint16(u,!a);if(u+=2,0!==d){var c=new Uint8Array(e,t+u,d),f=(u+=d,b.default.parseSPS(c));if(0===h){n.codecWidth=f.codec_size.width,n.codecHeight=f.codec_size.height,n.presentWidth=f.present_size.width,n.presentHeight=f.present_size.height,n.profile=f.profile_string,n.level=f.level_string,n.bitDepth=f.bit_depth,n.chromaFormat=f.chroma_format,n.sarRatio=f.sar_ratio,n.frameRate=f.frame_rate,!1!==f.frame_rate.fixed&&0!==f.frame_rate.fps_num&&0!==f.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate);for(var p=n.frameRate.fps_den,m=n.frameRate.fps_num,g=(n.refSampleDuration=n.timescale*(p/m),c.subarray(1,4)),_="avc1.",y=0;y<3;y++){var v=g[y].toString(16);_+=v=v.length<2?"0"+v:v}n.codec=_;p=this._mediaInfo;p.width=n.codecWidth,p.height=n.codecHeight,p.fps=n.frameRate.fps,p.profile=n.profile,p.level=n.level,p.refFrames=f.ref_frames,p.chromaFormat=f.chroma_format_string,p.sarNum=n.sarRatio.width,p.sarDen=n.sarRatio.height,p.videoCodec=_,p.hasAudio?null!=p.audioCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.videoCodec+'"',p.isComplete()&&this._onMediaInfo(p)}}}var A=s.getUint8(u);if(0===A)this._onError(S.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");else{1<A&&E.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+A),u++;for(h=0;h<A;h++){d=s.getUint16(u,!a);u+=2,0!==d&&(u+=d)}n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(e,t,i),0),E.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}}}}},c.prototype._parseAVCVideoData=function(e,t,i,n,r,a,s){for(var o=this._littleEndian,l=new DataView(e,t,i),u=[],h=0,d=0,c=this._naluLengthSize,f=this._timestampBase+n,p=1===a;d<i;){if(i<=d+4){E.default.w(this.TAG,"Malformed Nalu near timestamp "+f+", offset = "+d+", dataSize = "+i);break}var m=l.getUint32(d,!o);if(3===c&&(m>>>=8),i-c<m)return void E.default.w(this.TAG,"Malformed Nalus near timestamp "+f+", NaluSize > DataSize!");var g=31&l.getUint8(d+c),_=(5==g&&(p=!0),window.startPts||(window.startPts=(f+s)/1e3),new Uint8Array(e,t+d,c+m));u.push({type:g,data:_}),h+=_.byteLength,d+=c+m}u.length&&(n=this._videoTrack,a={units:u,length:h,isKeyframe:p,dts:f,cts:s,pts:f+s},p&&(a.fileposition=r),n.samples.push(a),n.length+=h)},c.prototype._parseHVCVideoPacket=function(e,t,i,n,r,a){var s,o,l;i<4?E.default.w(this.TAG,"Flv: Invalid HVC packet, missing HVCPacketType or/and CompositionTime"):(s=this._littleEndian,o=(l=new DataView(e,t,i)).getUint8(0),l=(16777215&l.getUint32(0,!s))<<8>>8,0===o?this._parseHVCDecoderConfigurationRecord(e,t+4,i-4):1===o?this._parseHVCVideoData(e,t+4,i-4,n,r,a,l):2!==o&&this._onError(S.default.FORMAT_ERROR,"Flv: Invalid video packet type "+o
87))},c.prototype._parseHVCDecoderConfigurationRecord=function(e,t,i){if(i<23)E.default.w(this.TAG,"Flv: Invalid HVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,r=this._videoTrack,a=this._littleEndian,s=new DataView(e,t,i);if(n?void 0!==n.avcc&&E.default.w(this.TAG,"Found another HVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={type:"video"}).id=r.id,n.timescale=this._timescale,n.duration=this._duration),1!==s.getUint8(0))this._onError(S.default.FORMAT_ERROR,"Flv: Invalid HVCDecoderConfigurationRecord");else if(this._naluLengthSize=1+(3&s.getUint8(21)),3!==this._naluLengthSize&&4!==this._naluLengthSize)this._onError(S.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else{for(var o,l,u,h,d,c=s.getUint8(22),f=23,p=[],m=0;m<c;m++){var g=63&s.getUint8(f++),_=s.getUint16(f,!a);if(f+=2,0!==_){switch(g){case 32:o+=_;break;case 33:l+=_;break;case 34:u+=_}for(var y=0;y<_;y++){var v,A=s.getUint16(f,!a);f+=2,0!==A&&(33==g&&(v=new Uint8Array(e,t+f,A),p.push(v)),f+=A)}}}0===o?this._onError(S.default.FORMAT_ERROR,"Flv: Invalid HVCDecoderConfigurationRecord: No VPS"):(1<o&&E.default.w(this.TAG,"Flv: Strange HVCDecoderConfigurationRecord: VPS Count = "+o),0===l?this._onError(S.default.FORMAT_ERROR,"Flv: Invalid HVCDecoderConfigurationRecord: No SPS"):(1<l&&E.default.w(this.TAG,"Flv: Strange HVCDecoderConfigurationRecord: SPS Count = "+l),0===u?this._onError(S.default.FORMAT_ERROR,"Flv: Invalid HVCDecoderConfigurationRecord: No PPS"):(1<u&&E.default.w(this.TAG,"Flv: Strange HVCDecoderConfigurationRecord: PPS Count = "+l),r=w.default.parseSPS(p[0]),n.codecWidth=r.codec_size.width,n.codecHeight=r.codec_size.height,n.presentWidth=r.present_size.width,n.presentHeight=r.present_size.height,n.profile=r.profile_string,n.level=r.level_string,n.profile_idc=r.profile_idc,n.level_idc=r.level_idc,n.bitDepth=r.bit_depth,n.chromaFormat=r.chroma_format,n.sarRatio=r.sar_ratio,n.frameRate=r.frame_rate,!1!==r.frame_rate.fixed&&0!==r.frame_rate.fps_num&&0!==r.frame_rate.fps_den&&r.frame_rate.fixed||(n.frameRate=this._referenceFrameRate),h=n.frameRate.fps_den,d=n.frameRate.fps_num,n.refSampleDuration=n.timescale*(h/d),h="hvc1."+n.profile_idc+".1.L"+n.level_idc+".B0",n.codec=h,(d=this._mediaInfo).width=n.codecWidth,d.height=n.codecHeight,d.fps=n.frameRate.fps,d.profile=n.profile,d.level=n.level,d.refFrames=r.ref_frames,d.chromaFormat=r.chroma_format_string,d.sarNum=n.sarRatio.width,d.sarDen=n.sarRatio.height,d.videoCodec=h,d.hasAudio?null!=d.audioCodec&&(d.mimeType='video/x-flv; codecs="'+d.videoCodec+","+d.audioCodec+'"'):d.mimeType='video/x-flv; codecs="'+d.videoCodec+'"',d.isComplete()&&this._onMediaInfo(d),n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(e,t,i),0),E.default.v(this.TAG,"Parsed HVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n))))}}},c.prototype._parseHVCVideoData=function(e,t,i,n,r,a,s){for(var o=this._littleEndian,l=new DataView(e,t,i),u=[],h=0,d=0,c=this._naluLengthSize,f=this._timestampBase+n,p=1===a;d<i;){if(i<=d+4){E.default.w(this.TAG,"Malformed Nalu near timestamp "+f+", offset = "+d+", dataSize = "+i);break}var m=l.getUint32(d,!o);if(3===c&&(m>>>=8),i-c<m)return void E.default.w(this.TAG,"Malformed Nalus near timestamp "+f+", NaluSize > DataSize!");var g=l.getUint8(d+c)>>1&63,_=(16<=g&&g<=23&&(p=!0),new Uint8Array(e,t+d,c+m));u.push({type:g,data:_}),h+=_.byteLength,d+=c+m}u.length&&(n=this._videoTrack,a={units:u,length:h,isKeyframe:p,dts:f,cts:s,pts:f+s},p&&(a.fileposition=r),n.samples.push(a),n.length+=h)},t.default=c},
87"./src/demux/hevc-sps-parser.js": 88/*!**************************************!*\ 89 !*** ./src/demux/hevc-sps-parser.js ***! 90 \**************************************/ 91function(e,t,i){"use strict";i.r(t);var E=i(/*! ./exp-golomb.js */"./src/demux/exp-golomb.js"),b=i(/*! ./sps-parser.js */"./src/demux/sps-parser.js");function w(){}w.parseSPS=function(e){for(var e=b.default._ebsp2rbsp(e),t=new E.default(e),e={},i=(t.readBits(16),t.readBits(4),t.readBits(3)),n=(t.readBits(1),w._hvcc_parse_ptl(t,e,i),t.readUEG(),0),r=t.readUEG(),a=(3==r&&(n=t.readBits(1)),e.sar_width=e.sar_height=1,e.conf_win_left_offset=e.conf_win_right_offset=e.conf_win_top_offset=e.conf_win_bottom_offset=0,e.def_disp_win_left_offset=e.def_disp_win_right_offset=e.def_disp_win_top_offset=e.def_disp_win_bottom_offset=0,t.readUEG()),s=t.readUEG(),o=(t.readBits(1)&&(e.conf_win_left_offset=t.readUEG(),e.conf_win_right_offset=t.readUEG(),e.conf_win_top_offset=t.readUEG(),e.conf_win_bottom_offset=t.readUEG(),1===e.default_display_window_flag)&&(e.conf_win_left_offset,e.def_disp_win_left_offset,e.conf_win_right_offset,e.def_disp_win_right_offset,e.conf_win_top_offset,e.def_disp_win_top_offset,e.conf_win_bottom_offset,e.def_disp_win_bottom_offset),t.readUEG()+8),l=(t.readUEG(),t.readUEG()),u=t.readBits(1)?0:i;u<=i;u++)w._skip_sub_layer_ordering_info(t);t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readBits(1)&&t.readBits(1)&&w._skip_scaling_list_data(t),t.readBits(1),t.readBits(1),t.readBits(1)&&(t.readBits(4),t.readBits(4),t.readUEG(),t.readUEG(),t.readBits(1));var h=[],d=t.readUEG();for(u=0;u<d;u++){var c=w._parse_rps(t,u,d,h);if(c<0)return c}if(t.readBits(1))for(var f=t.readUEG(),u=0;u<f;u++){var p=Math.min(l+4,16);if(32<p){for(var m=p/32,g=p%32,_=0;_<m;_++)t.readBits(32);t.readBits(g)}else t.readBits(p);t.readBits(1)}t.readBits(1),t.readBits(1),t.readBits(1)&&w._hvcc_parse_vui(t,e,i);var y=w.getProfileString(e.profile_idc),v=w.getLevelString(e.level_idc),A=1,n=(1===e.sar_width&&1===e.sar_height||(A=e.sar_width/e.sar_height),a-=(1!==r&&2!=r||0!==n?1:2)*(e.conf_win_left_offset+e.conf_win_right_offset),s-=(1===r&&0===n?2:1)*(e.conf_win_top_offset+e.conf_win_bottom_offset),Math.ceil(a*A));return t.destroy(),t=null,{profile_string:y,level_string:v,profile_idc:e.profile_idc,level_idc:e.level_idc,bit_depth:o,ref_frames:1,chroma_format:r,chroma_format_string:w.getChromaFormatString(r),frame_rate:{fixed:e.fps_fixed,fps:e.fps,fps_den:e.fps_den,fps_num:e.fps_num},sar_ratio:{width:e.sar_width,height:e.sar_height},codec_size:{width:a,height:s},present_size:{width:n,height:s}}},w._hvcc_parse_ptl=function(e,t,i){e.readBits(2);for(var n=e.readBits(1),r=e.readBits(5),a=(e.readBits(32),e.readBits(32),e.readBits(16),e.readByte()),s=(void 0===t.tier_flag||void 0===t.level_idc||t.tier_flag<n?t.level_idc=a:t.level_idc=Math.max(t.level_idc,a),t.profile_idc=Math.max(void 0===t.profile_idc?0:t.profile_idc,r),[]),o=[],l=0;l<i;l++)s.push(e.readBits(1)),o.push(e.readBits(1));if(0<i)for(l=i;l<8;l++)e.readBits(2);for(l=0;l<i;l++)s[l]&&(e.readBits(32),e.readBits(32),e.readBits(24)),o[l]&&e.readByte()},w._parse_rps=function(e,t,i,n){if(t&&e.readBits(1)){if(i<=t)return-1;e.readBits(1),e.readUEG();for(var r=n[t]=0;r<=n[t-1];r++){var a=0,s=e.readBits(1);s||(a=e.readBits(1)),(s||a)&&n[t]++}}else{var o=e.readUEG(),l=e.readUEG();n[t]=o+l;for(r=0;r<o;r++)e.readUEG(),e.readBits(1);for(r=0;r<l;r++)e.readUEG(),e.readBits(1)}return 0},w._hvcc_parse_vui=function(e,t,i){e.readBits(1)&&255==e.readByte()&&(t.sar_width=e.readBits(16),t.sar_height=e.readBits(16)),e.readBits(1)&&e.readBits(1),e.readBits(1)&&(e.readBits(4),e.readBits(1))&&e.readBits(24),e.readBits(1)&&(e.readUEG(),e.readUEG()),e.readBits(3),t.default_display_window_flag=e.readBits(1),t.default_display_window_flag&&(t.def_disp_win_left_offset=e.readUEG(),t.def_disp_win_right_offset=e.readUEG(),t.def_disp_win_top_offset=e.readUEG(),t.def_disp_win_bottom_offset=e.readUEG()),e.readBits(1)&&(w._skip_timing_info(e,t),e.readBits(1))&&w._skip_hrd_parameters(e,t,1,i),e.readBits(1)&&(e.readBits(3),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG())},w._skip_sub_layer_ordering_info=function(e,t){e.readUEG(),e.readUEG(),e.readUEG()},w._skip_scaling_list_data=function(e){for(var t=0;t<4;t++)for(var i=0;i<(3==t?2:6);i++)if(e.readBits(1)){var n=Math.min(64,1<<4+(t<<1));1<t&&e.readSEG();for(var r=0;r<n;r++)e.readSEG()}else e.readUEG()},w._skip_sub_layer_hrd_parameters=function(e,t,i){for(var n=0;n<=t;n++)e.readUEG(),e.readUEG(),i&&(e.readUEG(),e.readUEG()),e.readBits(1)},w._skip_timing_info=function(e,t){t.fps_den=e.readBits(32),t.fps_num=e.readBits(32),0<t.fps_den&&(t.fps=t.fps_num/t.fps_den);
91e.readBits(1)&&0<=(e=e.readUEG())&&(t.fps/=e+1)},w._skip_hrd_parameters=function(e,t,i){var n=0,r=0;t&&(n=e.readBits(1),r=e.readBits(1),n||r)&&((t=e.readBits(1))&&e.readBits(19),e.readByte(),t&&e.readBits(4),e.readBits(15));for(var a=0;a<=i;a++){var s=0,o=0,l=0,u=e.readBits(1);(l=(hvcc.fps_fixed=u)?l:e.readBits(1))?e.readUEG():o=e.readBits(1),o||(s=e.readUEG(e)),n&&w._skip_sub_layer_hrd_parameters(e,s,0),r&&w._skip_sub_layer_hrd_parameters(e,s,0)}},w.getProfileString=function(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},w.getLevelString=function(e){return(e/30).toFixed(1)},w.getChromaFormatString=function(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},t.default=w},
91"./src/demux/sps-parser.js": 92/*!*********************************!*\ 93 !*** ./src/demux/sps-parser.js ***! 94 \*********************************/ 95function(e,t,i){"use strict";i.r(t);var L=i(/*! ./exp-golomb.js */"./src/demux/exp-golomb.js");function k(){}k._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,a=0;a<i;a++)2<=a&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(n[r]=t[a],r++);return new Uint8Array(n.buffer,0,r)},k.parseSPS=function(e){var e=k._ebsp2rbsp(e),t=new L.default(e),e=(t.readByte(),t.readByte()),i=(t.readByte(),t.readByte()),n=(t.readUEG(),k.getProfileString(e)),i=k.getLevelString(i),r=1,a=420,s=8;if((100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e||138===e||144===e)&&(3===(r=t.readUEG())&&t.readBits(1),r<=3&&(a=[0,420,422,444][r]),s=t.readUEG()+8,t.readUEG(),t.readBits(1),t.readBool()))for(var o=3!==r?8:12,l=0;l<o;l++)t.readBool()&&k._skipScalingList(t,l<6?16:64);t.readUEG();e=t.readUEG();if(0===e)t.readUEG();else if(1===e){t.readBits(1),t.readSEG(),t.readSEG();for(var u=t.readUEG(),l=0;l<u;l++)t.readSEG()}var e=t.readUEG(),h=(t.readBits(1),t.readUEG()),d=t.readUEG(),c=t.readBits(1),f=(0===c&&t.readBits(1),t.readBits(1),0),p=0,m=0,g=0,_=(t.readBool()&&(f=t.readUEG(),p=t.readUEG(),m=t.readUEG(),g=t.readUEG()),1),y=1,v=0,A=!0,E=0,b=0,w=(t.readBool()&&(t.readBool()&&(0<(S=t.readByte())&&S<16?(_=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][S-1],y=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][S-1]):255===S&&(_=t.readByte()<<8|t.readByte(),y=t.readByte()<<8|t.readByte())),t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool())&&t.readBits(24),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool())&&(S=t.readBits(32),w=t.readBits(32),A=t.readBool(),v=(E=w)/(b=2*S)),1),S=(1===_&&1===y||(w=_/y),0),T=0,r=(T=0===r?(S=1,2-c):(S=3===r?1:2,(1===r?2:1)*(2-c)),16*(h+1)),h=16*(d+1)*(2-c),d=(r-=(f+p)*S,h-=(m+g)*T,Math.ceil(r*w));return t.destroy(),t=null,{profile_string:n,level_string:i,bit_depth:s,ref_frames:e,chroma_format:a,chroma_format_string:k.getChromaFormatString(a),frame_rate:{fixed:A,fps:v,fps_den:b,fps_num:E},sar_ratio:{width:_,height:y},codec_size:{width:r,height:h},present_size:{width:d,height:h}}},k._skipScalingList=function(e,t){for(var i=8,n=8,r=0;r<t;r++)i=0===(n=0!==n?(i+e.readSEG()+256)%256:n)?i:n},k.getProfileString=function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},k.getLevelString=function(e){return(e/10).toFixed(1)},k.getChromaFormatString=function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},t.default=k},
95"./src/flv.js": 96/*!********************!*\ 97 !*** ./src/flv.js ***! 98 \********************/ 99function(e,t,i){"use strict";i.r(t);var n=i(/*! ./utils/polyfill.js */"./src/utils/polyfill.js"),r=i(/*! ./core/features.js */"./src/core/features.js"),a=i(/*! ./io/loader.js */"./src/io/loader.js"),s=i(/*! ./player/flv-player.js */"./src/player/flv-player.js"),o=i(/*! ./player/native-player.js */"./src/player/native-player.js"),l=i(/*! ./player/player-events.js */"./src/player/player-events.js"),u=i(/*! ./player/player-errors.js */"./src/player/player-errors.js"),h=i(/*! ./utils/logging-control.js */"./src/utils/logging-control.js"),d=i(/*! ./utils/exception.js */"./src/utils/exception.js");n.default.install();i={createPlayer:function(e,t){if(null==e||"object"!=typeof e)throw new d.InvalidArgumentException("MediaDataSource must be an javascript object!");if(e.hasOwnProperty("type"))return new("flv"!==e.type?o:s).default(e,t);throw new d.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!")},isSupported:function(){return r.default.supportMSEH264Playback()},getFeatureList:function(){return r.default.getFeatureList()}};i.BaseLoader=a.BaseLoader,i.LoaderStatus=a.LoaderStatus,i.LoaderErrors=a.LoaderErrors,i.Events=l.default,i.ErrorTypes=u.ErrorTypes,i.ErrorDetails=u.ErrorDetails,i.FlvPlayer=s.default,i.NativePlayer=o.default,i.LoggingControl=h.default,Object.defineProperty(i,"version",{enumerable:!0,get:function(){return"1.7.0"}}),t.default=i},
99"./src/index.js": 100/*!**********************!*\ 101 !*** ./src/index.js ***! 102 \**********************/ 103function(e,t,i){e.exports=i(/*! ./flv.js */"./src/flv.js").default},
103"./src/io/fetch-stream-loader.js": 104/*!***************************************!*\ 105 !*** ./src/io/fetch-stream-loader.js ***! 106 \***************************************/ 107function(e,t,i){"use strict";i.r(t);var n,r,a=i(/*! ../utils/browser.js */"./src/utils/browser.js"),l=i(/*! ./loader.js */"./src/io/loader.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),i=(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)}),i=(r=l.BaseLoader,i(s,r),s.isSupported=function(){try{var e=a.default.msedge&&15048<=a.default.version.minor,t=!a.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}},s.prototype.destroy=function(){this.isWorking()&&this.abort(),r.prototype.destroy.call(this)},s.prototype.open=function(e,t){var i=this,n=(this._dataSource=e,this._range=t,e.url),r=(this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL),this._seekHandler.getConfig(n,t)),a=new self.Headers;if("object"==typeof r.headers){var s=r.headers;for(o in s)s.hasOwnProperty(o)&&a.append(o,s[o])}n={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var o in this._config.headers)a.append(o,this._config.headers[o]);!1===e.cors&&(n.mode="same-origin"),e.withCredentials&&(n.credentials="include"),e.referrerPolicy&&(n.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,n.signal=this._abortController.signal),this._status=l.LoaderStatus.kConnecting,self.fetch(r.url,n).then(function(e){if(i._requestAbort)i._status=l.LoaderStatus.kIdle,e.body.cancel();else{var t;if(e.ok&&200<=e.status&&e.status<=299)return e.url!==r.url&&i._onURLRedirect&&(t=i._seekHandler.removeURLParameters(e.url),i._onURLRedirect(t)),null!=(t=e.headers.get("Content-Length"))?(i._contentLength=parseInt(t),0!==i._contentLength&&i._onContentLengthKnown&&i._onContentLengthKnown(i._contentLength),i._isLive=!1):i._isLive=!0,i._pump.call(i,e.body.getReader());if(i._status=l.LoaderStatus.kError,!i._onError)throw new u.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);i._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}}).catch(function(e){if(!i._abortController||!i._abortController.signal.aborted){if(i._status=l.LoaderStatus.kError,!i._onError)throw e;i._onError(l.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}})},s.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==l.LoaderStatus.kBuffering||!a.default.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},s.prototype._pump=function(n){var r=this;return n.read().then(function(e){if(e.done)if(null!==r._contentLength&&r._receivedLength<r._contentLength){r._status=l.LoaderStatus.kError;var t=l.LoaderErrors.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!r._onError)throw new u.RuntimeException(i.msg);r._onError(t,i)}else r._status=l.LoaderStatus.kComplete,r._onComplete&&r._onComplete(r._range.from,r._range.from+r._receivedLength-1);else if(r._abortController&&r._abortController.signal.aborted)r._status=l.LoaderStatus.kComplete;else{if(!0===r._requestAbort)return r._status=l.LoaderStatus.kComplete,n.cancel();r._status=l.LoaderStatus.kBuffering;t=e.value.buffer,i=r._range.from+r._receivedLength;r._receivedLength+=t.byteLength,r._onDataArrival&&r._onDataArrival(t,i,r._receivedLength),r._pump(n)}}).catch(function(e){if(r._abortController&&r._abortController.signal.aborted)r._status=l.LoaderStatus.kComplete;else if(11!==e.code||!a.default.msedge){r._status=l.LoaderStatus.kError;var t=0,i=null,i=19!==e.code&&"network error"!==e.message||!(null===r._contentLength||null!==r._contentLength&&r._receivedLength<r._contentLength)?(t=l.LoaderErrors.EXCEPTION,{co
107de:e.code,msg:e.message}):(t=l.LoaderErrors.EARLY_EOF,{code:e.code,msg:"Fetch stream meet Early-EOF"});if(!r._onError)throw new u.RuntimeException(i.msg);r._onError(t,i)}})},s);function s(e,t){var i=r.call(this,"fetch-stream-loader")||this;return i.TAG="FetchStreamLoader",i._seekHandler=e,i._config=t,i._needStash=!0,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i._isLive=null,i}t.default=i},
107"./src/io/io-controller.js": 108/*!*********************************!*\ 109 !*** ./src/io/io-controller.js ***! 110 \*********************************/ 111function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),a=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ./fetch-stream-loader.js */"./src/io/fetch-stream-loader.js"),o=i(/*! ./xhr-moz-chunked-loader.js */"./src/io/xhr-moz-chunked-loader.js"),l=i(/*! ./xhr-range-loader.js */"./src/io/xhr-range-loader.js"),u=i(/*! ./websocket-loader.js */"./src/io/websocket-loader.js"),h=i(/*! ./range-seek-handler.js */"./src/io/range-seek-handler.js"),d=i(/*! ./param-seek-handler.js */"./src/io/param-seek-handler.js"),c=i(/*! ../utils/exception.js */"./src/utils/exception.js");function f(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,null!=t.stashInitialSize&&0<t.stashInitialSize&&(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)===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||null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new n.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()}f.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},f.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},f.prototype.isPaused=function(){return this._paused},Object.defineProperty(f.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL}
111,enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentSpeed",{get:function(){return this._loaderClass===l.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),f.prototype._selectSeekHandler=function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new h.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new d.default(t,i)}else{if("custom"!==e.seekType)throw new c.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new c.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}},f.prototype._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=u.default;else if(s.default.isSupported())this._loaderClass=s.default;else if(o.default.isSupported())this._loaderClass=o.default;else{if(!l.default.isSupported())throw new c.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=l.default}},f.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)},f.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))},f.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},f.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)},f.prototype.resume=function(){var e;this._paused&&(this._paused=!1,e=this._resumeFrom,this._resumeFrom=0,this._internalSeek(e,!0))},f.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},f.prototype._internalSeek=function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;t={from:e,to:-1};this._currentRange={from:t.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,t),this._onSeeked&&this._onSeeked()},f.prototype.updateUrl=function(e){if(!e||"string"!=typeof e||0===e.length)throw new c.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e},f.prototype._expandBuffer=function(e){for(var t,i,n=this._stashSize;n+1048576<e;)n*=2;(n+=1048576)!==this._bufferSize&&(t=new ArrayBuffer(n),0<this._stashUsed&&(i=new Uint8Array(this._stashBuffer,0,this._stashUsed),new Uint8Array(t,0,n).set(i,0)),this._stashBuffer=t,this._bufferSize=n)},f.prototype._normalizeSpeed=function(e){var t,i=this._speedNormalizeList,n=i.length-1,r=0,a=n;if(e<i[0])return i[0];for(;r<=a;){if((t=r+Math.floor((a-r)/2))===n||e>=i[t]&&e<i[t+1])return i[t];i[t]<e?r=t+1:a=t-1}},f.prototype._adjustStashSize=function(e){var t=0,e=1024*(t=8192<(t=this._config.isLive||e<512?e:512<=e&&e<=1024?Math.floor(1.5*e):2*e)?8192:t)+1048576;this._bufferSize<e&&this._expandBuffer(e),this._stashSize=1024*t},f.prototype._dispatchChunks=function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)},f.prototype._onURLRedirect=function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)},f.prototype._onContentLengthKnown=function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)},f.prototype._onLoaderChunkArrival=function(e,t,i){if(!this._onDataArrival)throw new c.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");var n,r,a,s,o;this._paused||(this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof)&&this._onRecoveredEarlyEof(),this._speedSampler.addBytes(e.byteLength),0!==(n=this._speedSampler.lastSecondKBps)&&(n=this._normalizeSpeed(n),this._speedNormalized!==n)&&(this._speedNormalized=n,this._adjustStashSize(n)),this._enableStash?(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize?((a=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength):(a=new Uint8Array(this._stashBuffer,0,this._bufferSize),0<this._stashUsed?(n=this._stashBuffer.slice(0,this._stashUsed),(s=this._dispatchChunks(n,this._stashByteStart))<n.byteLength?0<s&&(o=new Uint8Array(n,s),a.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=s):(this._stashUsed=0,this._stashByteStart+=s),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):(s=this._dispatchChunks(e,t))<e.byteLength&&((r=e.byteLength-s)>this._bufferSize&&(this._expandBuffer(r),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,s),0),this._stashUsed+=r,this._stashByteStart=t+s))):0===this._stashUsed?(s=this._dispatchChunks(e,t))<e.byteLength&&((r=e.byteLength-s)>this._bufferSize&&this._expandBuffer(r),(a=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e,s),0),this._stashUsed+=r,this._stashByteStart=t+s):(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,(s=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&0<s&&(o=new Uint8Array(this._stashBuffer,s),a.set(o,0)),this._stashUsed-=s,this._stashByteStart+=s))},f.prototype._flushStashBuffer=function(e){if(0<this._stashUsed){var t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),n=t.byteLength-i;if(i<t.byteLength){if(!e)return 0<i&&(e=new Uint8Array(this._stashBuffer,0,this._bufferSize),t=new Uint8Array(t,i),e.set(t,0),this._stashUsed=t.byteLength,this._stashByteStart+=i),0;r.default.w(this.TAG,n+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,n}return 0},f.prototype._onLoaderComplete=function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},f.prototype._onLoaderError=function(e,t){switch(r.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=a.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case a.LoaderErrors.EARLY_EOF:var i;if(!this._config.isLive)if(this._totalLength)return void((i=this._currentRange.to+1)<this._totalLength&&(r.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(i,
111!1)));e=a.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case a.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case a.LoaderErrors.CONNECTING_TIMEOUT:case a.LoaderErrors.HTTP_STATUS_CODE_INVALID:case a.LoaderErrors.EXCEPTION:}if(!this._onError)throw new c.RuntimeException("IOException: "+t.msg);this._onError(e,t)},t.default=f},
111"./src/io/loader.js": 112/*!**************************!*\ 113 !*** ./src/io/loader.js ***! 114 \**************************/ 115function(e,t,i){"use strict";i.r(t),i.d(t,{LoaderStatus:function(){return r},LoaderErrors:function(){return a},BaseLoader:function(){return s}});var n=i(/*! ../utils/exception.js */"./src/utils/exception.js"),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},a={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},s=(o.prototype.destroy=function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},o.prototype.isWorking=function(){return this._status===r.kConnecting||this._status===r.kBuffering},Object.defineProperty(o.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),o.prototype.open=function(e,t){throw new n.NotImplementedException("Unimplemented abstract function!")},o.prototype.abort=function(){throw new n.NotImplementedException("Unimplemented abstract function!")},o);function o(e){this._type=e||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},
115"./src/io/param-seek-handler.js": 116/*!**************************************!*\ 117 !*** ./src/io/param-seek-handler.js ***! 118 \**************************************/ 119function(e,t,i){"use strict";function n(e,t){this._startName=e,this._endName=t}i.r(t),n.prototype.getConfig=function(e,t){var i;return 0===t.from&&-1===t.to||(i=!0,-1===e.indexOf("?")&&(e+="?",i=!1),i&&(e+="&"),e+=this._startName+"="+t.from.toString(),-1!==t.to&&(e+="&"+this._endName+"="+t.to.toString())),{url:e,headers:{}}},n.prototype.removeURLParameters=function(e){var t=e.split("?")[0],i=void 0,n=e.indexOf("?"),r="";if(null!=(i=-1!==n?e.substring(n+1):i)&&0<i.length)for(var a=i.split("&"),s=0;s<a.length;s++){var o=a[s].split("=");o[0]!==this._startName&&o[0]!==this._endName&&(0<s&&(r+="&"),r+=a[s])}return 0===r.length?t:t+"?"+r},t.default=n},
119"./src/io/range-seek-handler.js": 120/*!**************************************!*\ 121 !*** ./src/io/range-seek-handler.js ***! 122 \**************************************/ 123function(e,t,i){"use strict";function n(e){this._zeroStart=e||!1}i.r(t),n.prototype.getConfig=function(e,t){var i,n={};return 0!==t.from||-1!==t.to?(i=void 0,i=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",n.Range=i):this._zeroStart&&(n.Range="bytes=0-"),{url:e,headers:n}},n.prototype.removeURLParameters=function(e){return e},t.default=n},
123"./src/io/speed-sampler.js": 124/*!*********************************!*\ 125 !*** ./src/io/speed-sampler.js ***! 126 \*********************************/ 127function(e,t,i){"use strict";function n(){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}i.r(t),n.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},n.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(n.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return this._intervalBytes/(e=0==e?1:e)/1024},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:500<=this._now()-this._lastCheckpoint?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),t.default=n},
127"./src/io/websocket-loader.js": 128/*!************************************!*\ 129 !*** ./src/io/websocket-loader.js ***! 130 \************************************/ 131function(e,t,i){"use strict";i.r(t);var n,r,a=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),i=(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)}),i=(r=a.BaseLoader,i(o,r),o.isSupported=function(){try{return void 0!==self.WebSocket}catch(e){return!1}},o.prototype.destroy=function(){this._ws&&this.abort(),r.prototype.destroy.call(this)},o.prototype.open=function(t){try{var e=this._ws=new self.WebSocket(t.url);e.binaryType="arraybuffer",e.onopen=this._onWebSocketOpen.bind(this),e.onclose=this._onWebSocketClose.bind(this),e.onmessage=this._onWebSocketMessage.bind(this),e.onerror=this._onWebSocketError.bind(this),this._status=a.LoaderStatus.kConnecting}catch(e){this._status=a.LoaderStatus.kError;t={code:e.code,msg:e.message};if(!this._onError)throw new s.RuntimeException(t.msg);this._onError(a.LoaderErrors.EXCEPTION,t)}},o.prototype.abort=function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=a.LoaderStatus.kComplete},o.prototype._onWebSocketOpen=function(e){this._status=a.LoaderStatus.kBuffering},o.prototype._onWebSocketClose=function(e){!0===this._requestAbort?this._requestAbort=!1:(this._status=a.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1))},o.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=a.LoaderStatus.kError;e={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new s.RuntimeException(e.msg);this._onError(a.LoaderErrors.EXCEPTION,e)}},o.prototype._dispatchArrayBuffer=function(e){var t=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,t,this._receivedLength)},o.prototype._onWebSocketError=function(e){this._status=a.LoaderStatus.kError;e={code:e.code,msg:e.message};if(!this._onError)throw new s.RuntimeException(e.msg);this._onError(a.LoaderErrors.EXCEPTION,e)},o);function o(){var e=r.call(this,"websocket-loader")||this;return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}t.default=i},
131"./src/io/xhr-moz-chunked-loader.js": 132/*!******************************************!*\ 133 !*** ./src/io/xhr-moz-chunked-loader.js ***! 134 \******************************************/ 135function(e,t,i){"use strict";i.r(t);var n,r,a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ./loader.js */"./src/io/loader.js"),o=i(/*! ../utils/exception.js */"./src/utils/exception.js"),i=(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)}),i=(r=s.BaseLoader,i(l,r),l.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),(e.responseType="moz-chunked-arraybuffer")===e.responseType}catch(e){return a.default.w("MozChunkedLoader",e.message),!1}},l.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),r.prototype.destroy.call(this)},l.prototype.open=function(e,t){this._dataSource=e,this._range=t;var i,n,r=e.url,r=(this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL),this._seekHandler.getConfig(r,t)),a=(this._requestURL=r.url,this._xhr=new XMLHttpRequest);if(a.open("GET",r.url,!0),a.responseType="moz-chunked-arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onloadend=this._onLoadEnd.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"==typeof r.headers)for(n in i=r.headers)i.hasOwnProperty(n)&&a.setRequestHeader(n,i[n]);if("object"==typeof this._config.headers)for(n in i=this._config.headers)i.hasOwnProperty(n)&&a.setRequestHeader(n,i[n]);this._status=s.LoaderStatus.kConnecting,a.send()},l.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=s.LoaderStatus.kComplete},l.prototype._onReadyStateChange=function(e){var t,e=e.target;if(2===e.readyState)if(null!=e.responseURL&&e.responseURL!==this._requestURL&&this._onURLRedirect&&(t=this._seekHandler.removeURLParameters(e.responseURL),this._onURLRedirect(t)),0!==e.status&&(e.status<200||299<e.status)){if(this._status=s.LoaderStatus.kError,!this._onError)throw new o.RuntimeException("MozChunkedLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}else this._status=s.LoaderStatus.kBuffering},l.prototype._onProgress=function(e){var t;this._status!==s.LoaderStatus.kError&&(null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown)&&this._onContentLengthKnown(this._contentLength),e=e.target.response,t=this._range.from+this._receivedLength,this._receivedLength+=e.byteLength,this._onDataArrival)&&this._onDataArrival(e,t,this._receivedLength)},l.prototype._onLoadEnd=function(e){!0===this._requestAbort?this._requestAbort=!1:this._status!==s.LoaderStatus.kError&&(this._status=s.LoaderStatus.kComplete,this._onComplete)&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)},l.prototype._onXhrError=function(e){this._status=s.LoaderStatus.kError;var t=0,i=null,i=this._contentLength&&e.loaded<this._contentLength?(t=s.LoaderErrors.EARLY_EOF,{code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=s.LoaderErrors.EXCEPTION,{code:-1,msg:e.constructor.name+" "+e.type});if(!this._onError)throw new o.RuntimeException(i.msg);this._onError(t,i)},l);function l(e,t){var i=r.call(this,"xhr-moz-chunked-loader")||this;return i.TAG="MozChunkedLoader",i._seekHandler=e,i._config=t,i._needStash=!0,i._xhr=null,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}t.default=i},
135"./src/io/xhr-range-loader.js": 136/*!************************************!*\ 137 !*** ./src/io/xhr-range-loader.js ***! 138 \************************************/ 139function(e,t,i){"use strict";i.r(t);var n,r,a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),o=i(/*! ./loader.js */"./src/io/loader.js"),l=i(/*! ../utils/exception.js */"./src/utils/exception.js"),i=(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)}),i=(r=o.BaseLoader,i(u,r),u.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),(e.responseType="arraybuffer")===e.responseType}catch(e){return a.default.w("RangeLoader",e.message),!1}},u.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),r.prototype.destroy.call(this)},Object.defineProperty(u.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),u.prototype.open=function(e,t){this._dataSource=e,this._range=t,this._status=o.LoaderStatus.kConnecting;e=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(e=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||e?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},u.prototype._openSubRange=function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,e=t+e;null!=this._contentLength&&e-this._range.from>=this._contentLength&&(e=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:e},this._internalOpen(this._dataSource,this._currentRequestRange)},u.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var i,n,r=e.url,r=(this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?r=this._currentRedirectedURL:null!=e.redirectedURL&&(r=e.redirectedURL)),this._seekHandler.getConfig(r,t)),a=(this._currentRequestURL=r.url,this._xhr=new XMLHttpRequest);if(a.open("GET",r.url,!0),a.responseType="arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onload=this._onLoad.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"==typeof r.headers)for(n in i=r.headers)i.hasOwnProperty(n)&&a.setRequestHeader(n,i[n]);if("object"==typeof this._config.headers)for(n in i=this._config.headers)i.hasOwnProperty(n)&&a.setRequestHeader(n,i[n]);a.send()},u.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=o.LoaderStatus.kComplete},u.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)},u.prototype._onReadyStateChange=function(e){var t,e=e.target;if(2===e.readyState)if(null!=e.responseURL&&(t=this._seekHandler.removeURLParameters(e.responseURL),e.responseURL!==this._currentRequestURL)&&t!==this._currentRedirectedURL&&(this._currentRedirectedURL=t,this._onURLRedirect)&&this._onURLRedirect(t),200<=e.status&&e.status<=299)this._waitForTotalLength||(this._status=o.LoaderStatus.kBuffering);else{if(this._status=o.LoaderStatus.kError,!this._onError)throw new l.RuntimeException("RangeLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}},u.prototype._onProgress=function(e){if(this._status!==o.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength&&(this._waitForTotalLength=!1,t=this._totalLengthReceived=!0,i=e.total,this._internalAbort(),null!=i&0!==i)&&(this._totalLength=i),-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 i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}},u.prototype._normalizeSpeed=function(e){var t,i=this._chunkSizeKBList,n=i.length-1,r=0,a=n;if(e<i[0])return i[0];for(;r<=a;){if((t=r+Math.floor((a-r)/2))===n||e>=i[t]&&e<i[t+1])return i[t];i[t]<e?r=t+1:a=t-1}},u.prototype._onLoad=function(e){var t,i;this._status!==o.LoaderStatus.kError&&(this._waitForTotalLength?this._waitForTotalLength=!1:((this._lastTimeLoaded=0)!==(t=0===(t=this._speedSampler.lastSecondKBps)&&(this._zeroSpeedChunkCount++,3<=this._zeroSpeedChunkCount)?this._speedSampler.currentKBps:t)&&(t=this._normalizeSpeed(t),this._currentSpeedNormalized!==t)&&(this._currentSpeedNormalized=t,this._currentChunkSizeKB=t),t=e.target.response,e=this._range.from+this._receivedLength,this._receivedLength+=t.byteLength,i=!1,null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():i=!0,this._onDataArrival&&this._onDataArrival(t,e,this._receivedLength),i&&(this._status=o.Lo
139aderStatus.kComplete,this._onComplete)&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)))},u.prototype._onXhrError=function(e){this._status=o.LoaderStatus.kError;var t=0,i=null,i=this._contentLength&&0<this._receivedLength&&this._receivedLength<this._contentLength?(t=o.LoaderErrors.EARLY_EOF,{code:-1,msg:"RangeLoader meet Early-Eof"}):(t=o.LoaderErrors.EXCEPTION,{code:-1,msg:e.constructor.name+" "+e.type});if(!this._onError)throw new l.RuntimeException(i.msg);this._onError(t,i)},u);function u(e,t){var i=r.call(this,"xhr-range-loader")||this;return i.TAG="RangeLoader",i._seekHandler=e,i._config=t,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new s.default,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}t.default=i},
139"./src/player/flv-player.js": 140/*!**********************************!*\ 141 !*** ./src/player/flv-player.js ***! 142 \**********************************/ 143function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),s=i(/*! ../utils/logger.js */"./src/utils/logger.js"),a=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ./player-events.js */"./src/player/player-events.js"),l=i(/*! ../core/transmuxer.js */"./src/core/transmuxer.js"),u=i(/*! ../core/transmuxing-events.js */"./src/core/transmuxing-events.js"),h=i(/*! ../core/mse-controller.js */"./src/core/mse-controller.js"),d=i(/*! ../core/mse-events.js */"./src/core/mse-events.js"),c=i(/*! ./player-errors.js */"./src/player/player-errors.js"),f=i(/*! ../config.js */"./src/config.js"),p=i(/*! ../utils/exception.js */"./src/utils/exception.js");function m(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(r()),this._config=(0,f.createDefaultConfig)(),"object"==typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new p.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;t=a.default.chrome&&(a.default.version.major<50||50===a.default.version.major&&a.default.version.build<2661);this._alwaysSeekKeyframe=!!(t||a.default.msedge||a.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1),this.needResumeTime=0,this.isChrome=navigator.userAgent.toLowerCase().match(/chrome/)}m.prototype.destroy=function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},m.prototype.on=function(e,t){var i=this;e===o.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(function(){i._emitter.emit(o.default.MEDIA_INFO,i.mediaInfo)}):e===o.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(function(){i._emitter.emit(o.default.STATISTICS_INFO,i.statisticsInfo)}),this._emitter.addListener(e,t)},m.prototype.off=function(e,t){this._emitter.removeListener(e,t)},m.prototype.attachMediaElement=function(e){var t=this;if((this._mediaElement=e).addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new h.default(this._config),this._msectl.on(d.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(d.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(d.default.SOURCE_OPEN,function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())}),this._msectl.on(d.default.ERROR,function(e){t._emitter.emit(o.default.ERROR,c.ErrorTypes.MEDIA_ERROR,c.ErrorDetails.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},m.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},m.prototype.load=function(){var n=this;if(!this._mediaElement)throw new p.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new p.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(0<this._mediaElement.readyState&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new l.default(this._mediaDataSource,this._config),this._transmuxer.on(u.default.INIT_SEGMENT,function(e,t){n._msectl.appendInitSegment(t)}),this._transmuxer.on(u.default.MEDIA_SEGMENT,function(e,t){var i;n._msectl.appendMediaSegment(t),n._config.lazyLoad&&!n._config.isLive&&(i=n._mediaElement.currentTime,t.info.endDts>=1e3*(i+n._config.lazyLoadMaxDuration))&&null==n._progressChecker&&(s.default.v(n.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),n._suspendTransmuxer())}),this._transmuxer.on(u.default.LOADING_COMPLETE,function(){n._msectl.endOfStream(),n._emitter.emit(o.default.LOADING_COMPLETE)}),this._transmuxer.on(u.default.RECOVERED_EARLY_EOF,function(){n._emitter.emit(o.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(u.default.IO_ERROR,function(e,t){n._emitter.emit(o.default.ERROR,c.ErrorTypes.NETWORK_E
143RROR,e,t)}),this._transmuxer.on(u.default.DEMUX_ERROR,function(e,t){n._emitter.emit(o.default.ERROR,c.ErrorTypes.MEDIA_ERROR,e,{code:-1,msg:t})}),this._transmuxer.on(u.default.MEDIA_INFO,function(e){n._mediaInfo=e,n._emitter.emit(o.default.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(u.default.METADATA_ARRIVED,function(e){n._emitter.emit(o.default.METADATA_ARRIVED,e)}),this._transmuxer.on(u.default.SCRIPTDATA_ARRIVED,function(e){n._emitter.emit(o.default.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(u.default.STATISTICS_INFO,function(e){n._statisticsInfo=n._fillStatisticsInfo(e),n._emitter.emit(o.default.STATISTICS_INFO,Object.assign({},n._statisticsInfo))}),this._transmuxer.on(u.default.RECOMMEND_SEEKPOINT,function(e){n._mediaElement&&!n._config.accurateSeek&&(n._requestSetTime=!0,n._mediaElement.currentTime=e/1e3)}),this._transmuxer.open()))},m.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)},m.prototype.play=function(){return this._mediaElement.play()},m.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(m.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(m.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(m.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"statisticsInfo",{get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),m.prototype._fillStatisticsInfo=function(e){var t,i,n,r;return e.playerType=this._type,this._mediaElement instanceof HTMLVideoElement&&(t=!0,r=n=0,this._mediaElement.getVideoPlaybackQuality?(n=(i=this._mediaElement.getVideoPlaybackQuality()).totalVideoFrames,r=i.droppedVideoFrames):null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1,t)&&(e.decodedFrames=n,e.droppedFrames=r),e},m.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<e.length;n++){var r=e.start(n),a=e.end(n);if(r<=t&&t<a){i=a;break}}i>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(s.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},m.prototype._onmseBufferFull=function(){s.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this.isChrome&&this._transmuxer&&this._transmuxer.pause(),null==this._progressChecker&&this._suspendTransmuxer()},m.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker)&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3))},m.prototype._progressCheckers=function(){null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3))},m.prototype._checkProgressAndResume=function(){if(this._transmuxer._controller._ioctl._loader._isLive)this._config.isLive=!0;else{for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,i=!1,n=0;n<t.length;n++){var r=t.start(n),a=t.end(n);if(r<=e&&e<a){e>=a-this._config.lazyLoadRecoverDuration&&(!this.isChrome||this._transmuxer._controller._ioctl._paused?i=!0:(this.needResumeTime++,10==this.needResumeTime&&this._transmuxer&&(this._transmuxer.pause(),i=!(this.needResumeTime=0))));break}}i&&(this.isChrome||(window.clearInterval(this._progressChecker),this._progressChecker=null),i)&&(s.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume())}},m.prototype._isTimepointBuffered=function(e){for(var t=this._mediaElement.buffered,i=0;i<t.length;i++){var n=t.start(i),r=t.end(i);if(n<=e&&e<r)return!0}return!1},m.prototype._internalSeek=function(e){var t,i=this._isTimepointBuffered(e),n=!1,r=0;e<1&&0<this._mediaElement.buffered.length&&((t=this._mediaElement.buffered.start(0))<1&&e<t||a.default.safari)&&(n=!0,r=a.default.safari?.1:t),n?(this._requestSetTime=!0,this._mediaElement.currentTime=r):i?(this._alwaysSeekKeyframe?(t=this._msectl.getNearestKeyframe(Math.floor(1e3*e)),this._requestSetTime=!0,this._mediaElement.currentTime=null!=t?t.dts/1e3:e):(this._requestSetTime=!0,this._mediaElement.currentTime=e),null!=this._progressChecker&&this._checkProgressAndResume()):(null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))},m.prototype._checkAndApplyUnbufferedSeekpoint=function(){var e;this._seekpointRecord&&(this._seekpointRecord.recordTime<=this._now()-100?(e=this._mediaElement.currentTime,this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))):window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50))},m.prototype._checkAndResumeStuckPlayback=function(e){var t=this._mediaElement;e||!this._receivedCanPlay||t.readyState<2?0<(e=t.buffered).length&&t.currentTime<e.start(0)&&(s.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+e.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=e.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress)):this._mediaElement.removeEventListener("progress",this.e.onvProgress)},m.prototype._onvLoadedMetadata=function(e){this.isChrome&&this._progressCheckers(),null!=this._pe
143ndingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},m.prototype._onvSeeking=function(e){var t=this._mediaElement.currentTime,i=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&0<i.length){var i=i.start(0);if(i<1&&t<i||a.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=a.default.safari?.1:i)}this._isTimepointBuffered(t)?(this._alwaysSeekKeyframe&&null!=(i=this._msectl.getNearestKeyframe(Math.floor(1e3*t)))&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3),null!=this._progressChecker&&this._checkProgressAndResume()):(this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50))}},m.prototype._onvCanPlay=function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},m.prototype._onvStalled=function(e){this._checkAndResumeStuckPlayback(!0)},m.prototype._onvProgress=function(e){this._checkAndResumeStuckPlayback()},t.default=m},
143"./src/player/native-player.js": 144/*!*************************************!*\ 145 !*** ./src/player/native-player.js ***! 146 \*************************************/ 147function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ./player-events.js */"./src/player/player-events.js"),s=i(/*! ../config.js */"./src/config.js"),o=i(/*! ../utils/exception.js */"./src/utils/exception.js"),n=(l.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},l.prototype.on=function(e,t){var i=this;e===a.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){i._emitter.emit(a.default.MEDIA_INFO,i.mediaInfo)}):e===a.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){i._emitter.emit(a.default.STATISTICS_INFO,i.statisticsInfo)}),this._emitter.addListener(e,t)},l.prototype.off=function(e,t){this._emitter.removeListener(e,t)},l.prototype.attachMediaElement=function(e){if((this._mediaElement=e).addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},l.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},l.prototype.load=function(){if(!this._mediaElement)throw new o.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,0<this._mediaElement.readyState&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},l.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},l.prototype.play=function(){return this._mediaElement.play()},l.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(l.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(l.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(l.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(l.prototype,"statisticsInfo",{get:function(){var e,t,i,n,r={playerType:this._type,url:this._mediaDataSource.url};return this._mediaElement instanceof HTMLVideoElement&&(e=!0,n=i=0,this._mediaElement.getVideoPlaybackQuality?(i=(t=this._mediaElement.getVideoPlaybackQuality()).totalVideoFrames,n=t.droppedVideoFrames):null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):e=!1,e)&&(r.decodedFrames=i,r.droppedFrames=n),r}
147,enumerable:!1,configurable:!0}),l.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(a.default.MEDIA_INFO,this.mediaInfo)},l.prototype._reportStatisticsInfo=function(){this._emitter.emit(a.default.STATISTICS_INFO,this.statisticsInfo)},l);function l(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(r()),this._config=(0,s.createDefaultConfig)(),"object"==typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new o.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new o.InvalidArgumentException("NativePlayer("+e.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}t.default=n},
147"./src/player/player-errors.js": 148/*!*************************************!*\ 149 !*** ./src/player/player-errors.js ***! 150 \*************************************/ 151function(e,t,i){"use strict";i.r(t),i.d(t,{ErrorTypes:function(){return n},ErrorDetails:function(){return r}});var t=i(/*! ../io/loader.js */"./src/io/loader.js"),i=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),n={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},r={NETWORK_EXCEPTION:t.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:t.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:t.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:t.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:i.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:i.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:i.default.CODEC_UNSUPPORTED}},
151"./src/player/player-events.js": 152/*!*************************************!*\ 153 !*** ./src/player/player-events.js ***! 154 \*************************************/ 155function(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"}},
155"./src/remux/aac-silent.js": 156/*!*********************************!*\ 157 !*** ./src/remux/aac-silent.js ***! 158 \*********************************/ 159function(e,t,i){"use strict";function n(){}i.r(t),n.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},t.default=n},
vendor: 6,268 bytes, lines 159-163
159"./src/remux/mp4-generator.js": 160/*!************************************!*\ 161 !*** ./src/remux/mp4-generator.js ***! 162 \************************************/ 163function(e,t,i){"use strict";i.r(t);h.init=function(){for(var e in h.types={hvc1:[],hvcC:[],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:[],pasp:[],".mp3":[]})h.types.hasOwnProperty(e)&&(h.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var t=h.constants={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSC=t.STCO=t.STTS,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.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]),t.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]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},h.box=function(e){for(var t=8,i=null,n=Array.prototype.slice.call(arguments,1),r=n.length,a=0;a<r;a++)t+=n[a].byteLength;(i=new Uint8Array(t))[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);for(var s=8,a=0;a<r;a++)i.set(n[a],s),s+=n[a].byteLength;return i},h.generateInitSegment=function(e){var t=h.box(h.types.ftyp,h.constants.FTYP),e=h.moov(e),i=new Uint8Array(t.byteLength+e.byteLength);return i.set(t,0),i.set(e,t.byteLength),i},h.moov=function(e){var t=h.mvhd(e.timescale,e.duration),i=h.trak(e),e=h.mvex(e);return h.box(h.types.moov,t,i,e)},h.mvhd=function(e,t){return h.box(h.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},h.trak=function(e){return h.box(h.types.trak,h.tkhd(e),h.mdia(e))},h.tkhd=function(e){var t=e.id,i=e.duration,n=e.presentWidth,e=e.presentHeight;return h.box(h.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,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,n>>>8&255,255&n,0,0,e>>>8&255,255&e,0,0]))},h.mdia=function(e){return h.box(h.types.mdia,h.mdhd(e),h.hdlr(e),h.minf(e))},h.mdhd=function(e){var t=e.timescale,e=e.duration;return h.box(h.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,85,196,0,0]))},h.hdlr=function(e){var t=null,t="audio"===e.type?h.constants.HDLR_AUDIO:h.constants.HDLR_VIDEO;return h.box(h.types.hdlr,t)},h.minf=function(e){var t=null,t="audio"===e.type?h.box(h.types.smhd,h.constants.SMHD):h.box(h.types.vmhd,h.constants.VMHD);return h.box(h.types.minf,t,h.dinf(),h.stbl(e))},h.dinf=function(){return h.box(h.types.dinf,h.box(h.types.dref,h.constants.DREF))},h.stbl=function(e){return h.box(h.types.stbl,h.stsd(e),h.box(h.types.stts,h.constants.STTS),h.box(h.types.stsc,h.constants.STSC),h.box(h.types.stsz,h.constants.STSZ),h.box(h.types.stco,h.constants.STCO))},h.stsd=function(e){return"audio"===e.type?"mp3"===e.codec?h.box(h.types.stsd,h.constants.STSD_PREFIX,h.mp3(e)):h.box(h.types.stsd,h.constants.STSD_PREFIX,h.mp4a(e)):h.box(h.types.stsd,h.constants.STSD_PREFIX,h.avc1(e))},h.mp3=function(e){var t=e.channelCount,e=e.audioSampleRate,t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return h.box(h.types[".mp3"],t)},h.mp4a=function(e){var t=e.channelCount,i=e.audioSampleRate,t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return h.box(h.types.mp4a,t,h.esds(e))},h.esds=function(e){var e=e.config||[],t=e.length,t=new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e).concat([6,1,2]));return h.box(h.types.esds,t)},h.avc1=function(e){var t=e.avcc,i=e.codecWidth,n=e.codecHeight,i=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,i>>>8&255,255&i,n>>>8&255,255&n,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 0<=e.codec.indexOf("avc1")?h.box(h.types.avc1,i,h.box(h.types.avcC,t)):h.box(h.types.hvc1,i,h.box(h.types.hvcC,t))},h.mvex=function(e){return h.box(h.types.mvex,h.trex(e))},h.trex=function(e){e=e.id,e=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.box(h.types.trex,e)},h.moof=function(e,t){return h.box(h.types.moof,h.mfhd(e.sequenceNumber),h.traf(e,t))},h.mfhd=function(e){e=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return h.box(h.types.mfhd,e)},h.traf=function(e,t){var i=e.id,i=h.box(h.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),t=h.box(h.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),n=h.sdtp(e),e=h.trun(e,n.byteLength+16+16+8+16+8+8);return h.box(h.types.traf,i,t,e,n)},h.sdtp=function(e){for(var t=e.samples||[],i=t.length,n=new Uint8Array(4+i),r=0;r<i;r++){var a=t[r].flags;n[r+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return h.box(h.types.sdtp,n)},h.trun=function(e,t){var i=e.samples||[],n=i.length,e=12+16*n,r=new Uint8Array(e);r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,(t+=8+e)>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(var a=0;a<n;a++){var s=i[a].duration,o=i[a].size,l=i[a].flags,u=i[a].cts;r.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.isNonSync,0,0,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*a)}return h.box(h.types.trun,r)},h.mdat=function(e){return h.box(h.types.mdat,e)};i=h;function h(){}i.init(),t.default=i},
163"./src/remux/mp4-remuxer.js": 164/*!**********************************!*\ 165 !*** ./src/remux/mp4-remuxer.js ***! 166 \**********************************/ 167function(e,t,i){"use strict";i.r(t);var I=i(/*! ../utils/logger.js */"./src/utils/logger.js"),P=i(/*! ./mp4-generator.js */"./src/remux/mp4-generator.js"),x=i(/*! ./aac-silent.js */"./src/remux/aac-silent.js"),D=i(/*! ../utils/browser.js */"./src/utils/browser.js"),M=i(/*! ../core/media-segment-info.js */"./src/core/media-segment-info.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js");function n(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 M.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new M.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!D.default.chrome||!(D.default.version.major<50||50===D.default.version.major&&D.default.version.build<2661)),this._fillSilentAfterSeek=D.default.msedge||D.default.msie,this._mp3UseMpegAudio=!D.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}n.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},n.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(n.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),n.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},n.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},n.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new a.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)},n.prototype._onTrackMetadataReceived=function(e,t){var i=null,n="mp4",r=t.codec;if("audio"===e)i="mp3"===(this._audioMeta=t).codec&&this._mp3UseMpegAudio?(n="mpeg",r="",new Uint8Array):P.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=P.default.generateInitSegment(t)}if(!this._onInitSegment)throw new a.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:r,container:e+"/"+n,mediaDuration:t.duration})},n.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)},n.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0},e=(null!=e&&(i.samples.push(e),i.length=e.length),{type:"audio",id:2,sequenceNumber:0,samples:[],length:0});null!=t&&(e.samples.push(t),e.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(e,!0)},n.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var i=e.samples,n=void 0,r=-1,a=this._audioMeta.refSampleDuration,s="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,o=this._dtsBaseInited&&void 0===this._audioNextDts,l=!1;if(i&&0!==i.length&&(1!==i.length||t)){for(var u=0,h=null,d=0,d=s?(u=0,e.length):(u=8)+e.length,c=null,t=(1<i.length&&(d-=(c=i.pop()).length),null!=this._audioStashedLastSample&&(m=this._audioStashedLastSample,this._audioStashedLastSample=null,i.unshift(m),d+=m.length),null!=c&&(this._audioStashedLastSample=c),i[0].dts-this._dtsBase),f=(this._audioNextDts?n=t-this._audioNextDts:this._audioSegmentInfoList.isEmpty()?(n=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(l=!0)):n=null!=(C=this._audioSegmentInfoList.getLastSampleBefore(t))?(R=t-(C.originalDts+C.duration),t-(C.dts+C.duration+(R=R<=3?0:R))):0,l&&(C=t-n,null!=(R=this._videoSegmentInfoList.getLastSegmentBefore(t))&&R.beginDts<C?(w=x.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(y=R.beginDts,t=C-R.beginDts,I.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+y+", duration: "+t),i.unshift({unit:w,dts:y,pts:y}),d+=w.byteLength):l=!1),[]),p=0;p<i.length;p++){var m,g=(m=i[p]).unit,_=m.dts-this._dtsBase,y=_,v=!1,A=null,E=0;if(!(_<-.001)){if("mp3"!==this._audioMeta.codec){var b=_;if((n=_-(b=this._audioNextDts?this._audioNextDts:b))<=-3*a){I.default.w(this.TAG,"Dropping 1 audio frame (originalDts: "+_+" ms ,curRefDts: "+b+" ms) due to dtsCorrection: "+n+" ms overlap.");continue}if(3*a<=n&&this._fillAudioTimestampGap&&!D.default.safari){var w,v=!0,S=Math.floor(n/a);I.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+_+" ms, curRefDts: "+b+" ms, dtsCorrection: "+Math.round(n)+" ms, generate: "+S+" frames"),y=Math.floor(b),E=Math.floor(b+a)-y,null==(w=x.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(I.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),w=g);for(var A=[],T=0;T<S;T++){b+=a;var L=Math.floor(b),k=Math.floor(b+a)-L,L={dts:L,pts:L,cts:0,unit:w,size:w.byteLength,duration:k,originalDts:_,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};A.push(L),d+=L.size}}else y=Math.floor(b),E=Math.floor(b+a)-y;this._audioNextDts=b+a}else y=_-n,E=p!==i.length-1?i[p+1].dts-this._dtsBase-n-y:null!=c?c.dts-this._dtsBase-n-y:1<=f.length?f[f.length-1].duration:Math.floor(a),this._audioNextDts=y+E;-1===r&&(r=y),f.push({dts:y,pts:y,cts:0,unit:m.unit,size:m.unit.byteLength,duration:E,originalDts:_,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}
167),v&&f.push.apply(f,A)}}if(0===f.length)e.samples=[],e.length=0;else{s?h=new Uint8Array(d):((h=new Uint8Array(d))[0]=d>>>24&255,h[1]=d>>>16&255,h[2]=d>>>8&255,h[3]=255&d,h.set(P.default.types.mdat,4));for(p=0;p<f.length;p++){g=f[p].unit;h.set(g,u),u+=g.byteLength}var C=f[f.length-1],R=C.dts+C.duration,t=new M.MediaSegmentInfo,l=(t.beginDts=r,t.endDts=R,t.beginPts=r,t.endPts=R,t.originalBeginDts=f[0].originalDts,t.originalEndDts=C.originalDts+C.duration,t.firstSample=new M.SampleInfo(f[0].dts,f[0].pts,f[0].duration,f[0].originalDts,!1),t.lastSample=new M.SampleInfo(C.dts,C.pts,C.duration,C.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(t),e.samples=f,e.sequenceNumber++,null),l=s?new Uint8Array:P.default.moof(e,r),R=(e.samples=[],e.length=0,{type:"audio",data:this._mergeBoxes(l,h).buffer,sampleCount:f.length,info:t});s&&o&&(R.timestampOffset=r),this._onMediaSegment("audio",R)}}}},n.prototype._remuxVideo=function(e,t){if(null!=this._videoMeta){var i=e,n=i.samples,r=void 0,a=-1,s=-1;if(n&&0!==n.length&&(1!==n.length||t)){for(var o=8,l=null,t=8+e.length,u=null,e=(1<n.length&&(t-=(u=n.pop()).length),null!=this._videoStashedLastSample&&(f=this._videoStashedLastSample,this._videoStashedLastSample=null,n.unshift(f),t+=f.length),null!=u&&(this._videoStashedLastSample=u),n[0].dts-this._dtsBase),h=(r=this._videoNextDts?e-this._videoNextDts:!this._videoSegmentInfoList.isEmpty()&&null!=(w=this._videoSegmentInfoList.getLastSampleBefore(e))?(S=e-(w.originalDts+w.duration),e-(w.dts+w.duration+(S=S<=3?0:S))):0,new M.MediaSegmentInfo),d=[],c=0;c<n.length;c++){var f,p,m=(f=n[c]).dts-this._dtsBase,g=f.isKeyframe,_=m-r,y=f.cts,v=_+y,A=(-1===a&&(a=_,s=v),0);A=c!==n.length-1?n[c+1].dts-this._dtsBase-r-_:null!=u?u.dts-this._dtsBase-r-_:1<=d.length?d[d.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),g&&((p=new M.SampleInfo(_,v,A,f.dts,!0)).fileposition=f.fileposition,h.appendSyncPoint(p)),d.push({dts:_,pts:v,cts:y,units:f.units,size:f.length,isKeyframe:g,duration:A,originalDts:m,flags:{isLeading:0,dependsOn:g?2:1,isDependedOn:g?1:0,hasRedundancy:0,isNonSync:g?0:1}})}(l=new Uint8Array(t))[0]=t>>>24&255,l[1]=t>>>16&255,l[2]=t>>>8&255,l[3]=255&t,l.set(P.default.types.mdat,4);for(c=0;c<d.length;c++)for(var E=d[c].units;E.length;){var b=E.shift().data;l.set(b,o),o+=b.byteLength}var e=d[d.length-1],w=e.dts+e.duration,S=e.pts+e.duration,w=(this._videoNextDts=w,h.beginDts=a,h.endDts=w,h.beginPts=s,h.endPts=S,h.originalBeginDts=d[0].originalDts,h.originalEndDts=e.originalDts+e.duration,h.firstSample=new M.SampleInfo(d[0].dts,d[0].pts,d[0].duration,d[0].originalDts,d[0].isKeyframe),h.lastSample=new M.SampleInfo(e.dts,e.pts,e.duration,e.originalDts,e.isKeyframe),this._isLive||this._videoSegmentInfoList.append(h),i.samples=d,i.sequenceNumber++,this._forceFirstIDR&&((t=d[0].flags).dependsOn=2,t.isNonSync=0),P.default.moof(i,a));i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(w,l).buffer,sampleCount:d.length,info:h})}}},n.prototype._mergeBoxes=function(e,t){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i},t.default=n},
167"./src/utils/browser.js": 168/*!******************************!*\ 169 !*** ./src/utils/browser.js ***! 170 \******************************/ 171function(e,t,i){"use strict";i.r(t);var n={};var r,a,i=self.navigator.userAgent.toLowerCase(),s=/(edge)\/([\w.]+)/.exec(i)||/(opr)[\/]([\w.]+)/.exec(i)||/(chrome)[ \/]([\w.]+)/.exec(i)||/(iemobile)[\/]([\w.]+)/.exec(i)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(i)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(i)||/(webkit)[ \/]([\w.]+)/.exec(i)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(i)||/(msie) ([\w.]+)/.exec(i)||0<=i.indexOf("trident")&&/(rv)(?::| )([\w.]+)/.exec(i)||i.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(i)||[],i=/(ipad)/.exec(i)||/(ipod)/.exec(i)||/(windows phone)/.exec(i)||/(iphone)/.exec(i)||/(kindle)/.exec(i)||/(android)/.exec(i)||/(windows)/.exec(i)||/(mac)/.exec(i)||/(linux)/.exec(i)||/(cros)/.exec(i)||[],s={browser:s[5]||s[3]||s[1]||"",version:s[2]||s[4]||"0",majorVersion:s[4]||s[2]||"0",platform:i[0]||""},i={};for(a in s.browser&&(i[s.browser]=!0,r=s.majorVersion.split("."),i.version={major:parseInt(s.majorVersion,10),string:s.version},1<r.length&&(i.version.minor=parseInt(r[1],10)),2<r.length)&&(i.version.build=parseInt(r[2],10)),s.platform&&(i[s.platform]=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),(i.rv||i.iemobile)&&(i.rv&&delete i.rv,s.browser="msie",i.msie=!0),i.edge&&(delete i.edge,s.browser="msedge",i.msedge=!0),i.opr&&(s.browser="opera",i.opera=!0),i.safari&&i.android&&(s.browser="android",i.android=!0),i.name=s.browser,i.platform=s.platform,n)n.hasOwnProperty(a)&&delete n[a];Object.assign(n,i),t.default=n},
171"./src/utils/exception.js": 172/*!********************************!*\ 173 !*** ./src/utils/exception.js ***! 174 \********************************/ 175function(e,t,i){"use strict";i.r(t),i.d(t,{RuntimeException:function(){return r},IllegalStateException:function(){return o},InvalidArgumentException:function(){return h},NotImplementedException:function(){return f}});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)};var n,i=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)},r=(Object.defineProperty(a.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),a.prototype.toString=function(){return this.name+": "+this.message},a);function a(e){this._message=e}i(l,s=r),Object.defineProperty(l.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0});var s,o=l;function l(e){return s.call(this,e)||this}i(d,u=r),Object.defineProperty(d.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0});var u,h=d;function d(e){return u.call(this,e)||this}i(p,c=r),Object.defineProperty(p.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0});var c,f=p;function p(e){return c.call(this,e)||this}},
175"./src/utils/logger.js": 176/*!*****************************!*\ 177 !*** ./src/utils/logger.js ***! 178 \*****************************/ 179function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),i=i.n(n),n=(r.e=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","error",e),r.ENABLE_ERROR&&!console.error&&console.warn},r.i=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","info",e),r.ENABLE_INFO&&console.info},r.w=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","warn",e),r.ENABLE_WARN&&console.warn},r.d=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","debug",e),r.ENABLE_DEBUG&&console.debug},r.v=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","verbose",e)},r);function r(){}n.GLOBAL_TAG="flv.js",n.FORCE_GLOBAL_TAG=!1,n.ENABLE_ERROR=!0,n.ENABLE_INFO=!0,n.ENABLE_WARN=!0,n.ENABLE_DEBUG=!0,n.ENABLE_VERBOSE=!0,n.ENABLE_CALLBACK=!1,n.emitter=new(i()),t.default=n},
179"./src/utils/logging-control.js": 180/*!**************************************!*\ 181 !*** ./src/utils/logging-control.js ***! 182 \**************************************/ 183function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),n=i.n(n),r=i(/*! ./logger.js */"./src/utils/logger.js"),i=(Object.defineProperty(a,"forceGlobalTag",{get:function(){return r.default.FORCE_GLOBAL_TAG},set:function(e){r.default.FORCE_GLOBAL_TAG=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"globalTag",{get:function(){return r.default.GLOBAL_TAG},set:function(e){r.default.GLOBAL_TAG=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableAll",{get:function(){return r.default.ENABLE_VERBOSE&&r.default.ENABLE_DEBUG&&r.default.ENABLE_INFO&&r.default.ENABLE_WARN&&r.default.ENABLE_ERROR},set:function(e){r.default.ENABLE_VERBOSE=e,r.default.ENABLE_DEBUG=e,r.default.ENABLE_INFO=e,r.default.ENABLE_WARN=e,r.default.ENABLE_ERROR=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableDebug",{get:function(){return r.default.ENABLE_DEBUG},set:function(e){r.default.ENABLE_DEBUG=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableVerbose",{get:function(){return r.default.ENABLE_VERBOSE},set:function(e){r.default.ENABLE_VERBOSE=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableInfo",{get:function(){return r.default.ENABLE_INFO},set:function(e){r.default.ENABLE_INFO=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableWarn",{get:function(){return r.default.ENABLE_WARN},set:function(e){r.default.ENABLE_WARN=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableError",{get:function(){return r.default.ENABLE_ERROR},set:function(e){r.default.ENABLE_ERROR=e,a._notifyChange()},enumerable:!1,configurable:!0}),a.getConfig=function(){return{globalTag:r.default.GLOBAL_TAG,forceGlobalTag:r.default.FORCE_GLOBAL_TAG,enableVerbose:r.default.ENABLE_VERBOSE,enableDebug:r.default.ENABLE_DEBUG,enableInfo:r.default.ENABLE_INFO,enableWarn:r.default.ENABLE_WARN,enableError:r.default.ENABLE_ERROR,enableCallback:r.default.ENABLE_CALLBACK}},a.applyConfig=function(e){r.default.GLOBAL_TAG=e.globalTag,r.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,r.default.ENABLE_VERBOSE=e.enableVerbose,r.default.ENABLE_DEBUG=e.enableDebug,r.default.ENABLE_INFO=e.enableInfo,r.default.ENABLE_WARN=e.enableWarn,r.default.ENABLE_ERROR=e.enableError,r.default.ENABLE_CALLBACK=e.enableCallback},a._notifyChange=function(){var e,t=a.emitter;0<t.listenerCount("change")&&(e=a.getConfig(),t.emit("change",e))},a.registerListener=function(e){a.emitter.addListener("change",e)},a.removeListener=function(e){a.emitter.removeListener("change",e)},a.addLogListener=function(e){r.default.emitter.addListener("log",e),0<r.default.emitter.listenerCount("log")&&(r.default.ENABLE_CALLBACK=!0,a._notifyChange())},a.removeLogListener=function(e){r.default.emitter.removeListener("log",e),0===r.default.emitter.listenerCount("log")&&(r.default.ENABLE_CALLBACK=!1,a._notifyChange())},a);function a(){}i.emitter=new(n()),t.default=i},
183"./src/utils/polyfill.js": 184/*!*******************************!*\ 185 !*** ./src/utils/polyfill.js ***! 186 \*******************************/ 187function(e,t,i){"use strict";i.r(t);r.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<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t},"function"!=typeof self.Promise&&i(/*! es6-promise */"./node_modules/es6-promise/dist/es6-promise.js").polyfill()};var n=r;function r(){}n.install(),t.default=n},
187"./src/utils/utf8-conv.js": 188/*!********************************!*\ 189 !*** ./src/utils/utf8-conv.js ***! 190 \********************************/ 191function(e,t,i){"use strict";function s(e,t,i){var n=e;if(t+i<n.length){for(;i--;)if(128!=(192&n[++t]))return;return 1}}i.r(t),t.default=function(e){for(var t,i=[],n=e,r=0,a=e.length;r<a;){if(n[r]<128)i.push(String.fromCharCode(n[r]));else{if(!(n[r]<192))if(n[r]<224){if(s(n,r,1))if(128<=(t=(31&n[r])<<6|63&n[r+1])){i.push(String.fromCharCode(65535&t)),r+=2;continue}}else if(n[r]<240){if(s(n,r,2))if(2048<=(t=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2])&&55296!=(63488&t)){i.push(String.fromCharCode(65535&t)),r+=3;continue}}else if(n[r]<248)if(s(n,r,3))if(65536<(t=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3])&&t<1114112){t-=65536,i.push(String.fromCharCode(t>>>10|55296)),i.push(String.fromCharCode(1023&t|56320)),r+=4;continue}i.push(String.fromCharCode(65533))}++r}return i.join("")}}
191},r={},n.m=i,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.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");function n(e){var t=r[e];return void 0!==t||(t=r[e]={exports:{}},i[e].call(t.exports,t,t.exports,n)),t.exports}var i,r},t.exports=e()}.call(this,i(130))},function(e,t,i){const n=i(5);i(25);const a=i(166),r=i(10);t.NvMpegTsCore=class{constructor(e){this.configFormat={width:e.width||n.DEFAULT_WIDTH,height:e.height||n.DEFAULT_HEIGHT,playerId:e.playerId||n.DEFAILT_WEBGL_PLAY_ID,ignoreAudio:e.ignoreAudio,duration:e.duration,autoPlay:e.autoPlay||!1,repeatPlay:e.repeat||!1,audioNone:e.audioNone},this.audioVoice=1,this.myPlayerID=this.configFormat.playerId+"-jsmpegts",this.myPlayer=null,this.videoContaner=null,this.videoTag=null,this.duration=this.configFormat.duration/1e3||-1,this.width=-1,this.height=-1,this.isPlaying=!1,this.vCodecID=n.V_CODEC_NAME_AVC,this.audioNone=!1,this.showScreen=!1,this.playPTS=0,this.vCachePTS=0,this.aCachePTS=0,this.isInitDecodeFrames=!1,this.reset_player=!1,this.lastDecodedFrame=0,this.lastDecodedFrameTime=-1,this.checkStartIntervalCount=0,this.checkStartInterval=null,this.checkPicBlockInterval=null,this.bufferInterval=null,this.onPlayState=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onReadyShowDone=null,this.onCacheProcess=null,this.seekResult=null}_reBuildMpegTsjs(e){this._releaseMpegTsjs(),this.makeIt(e)}_checkPicBlock(e){let t=this;this.checkPicBlockInterval=window.setInterval(function(){0<t.lastDecodedFrameTime&&1e4<r.GetMsTime()-t.lastDecodedFrameTime&&(window.clearInterval(t.checkPicBlockInterval),t.checkPicBlockInterval=null,t._reBuildMpegTsjs(e))},1e3)}_checkLoadState(e){let t=this;this.checkStartIntervalCount=0,this.checkStartInterval=window.setInterval(function(){!1!==t.isInitDecodeFrames?(t.checkStartIntervalCount=0,window.clearInterval(t.checkStartInterval),t.checkStartInterval=null):(t.checkStartIntervalCount+=1,20<t.checkStartIntervalCount&&(window.clearInterval(t.checkStartInterval),t.checkStartIntervalCount=0,t.checkStartInterval=null,!1===t.isInitDecodeFrames)&&t._reBuildMpegTsjs(e))},500)}init_player(n,e){let r=this;var t={type:"mpegts",url:n,duration:this.configFormat.duration,isLive:!1},i={hasVideo:!0,hasAudio:!(!0===this.configFormat.audioNone),isLive:this.configFormat.duration<=0,withCredentials:!1,seekType:"range",cors:!0,stashInitialSize:3145728};this.myPlayer=a.createPlayer(t,i),this.myPlayer.attachMediaElement(this.videoTag),this.myPlayer.on(a.Events.MEDIA_INFO,function(e){var t;!1===r.isInitDecodeFrames&&(r.isInitDecodeFrames=!0,r.width=Math.max(r.videoTag.videoWidth,e.width),r.height=Math.max(r.videoTag.videoHeight,e.height),r.videoTag.duration&&e.duration?r.videoTag.duration?r.duration=r.videoTag.duration:e.duration&&(r.duration=e.duration):r.duration=r.configFormat.duration/1e3,(e=document.querySelector("#"+r.configFormat.playerId)).getElementsByTagName("video")[0]||(t=e.getElementsByTagName("div"),e.insertBefore(r.videoTag,t[0])),r.onLoadFinish&&r.onLoadFinish(),!1===r.reset_player&&r.onReadyShowDone&&r.onReadyShowDone(),r._loopBufferState(),r.videoTag.onplay=function(){var e=r.isPlayingState();r.onPlayState&&r.onPlayState(e)},r.videoTag.ontimeupdate=()=>{var e=r.seekReadyPts||r.myPlayer.currentTime;r.onPlayingTime&&r.onPlayingTime(e)},r.videoTag.onpause=function(){var e=r.isPlayingState();!1===r.reset_player&&r.onPlayState&&r.onPlayState(e)},r.duration!==1/0&&0<r.duration&&(r.videoTag.onended=()=>{r.onPlayingFinish&&r.onPlayingFinish()}),r.videoTag.onseeked=function(){r.onSeekFinish&&r.onSeekFinish(r.
191seekResult)})}),this.myPlayer.on(a.Events.SCRIPTDATA_ARRIVED,function(e){}),this.myPlayer.on(a.Events.ERROR,function(e,t,i){r.myPlayer&&416!=i.code&&r._reBuildMpegTsjs(n)}),this.myPlayer.load(),e&&(this.pause(),this.seekReadyPts=e)}makeIt(e){let i=this;var t,n,r;this.url=e,a.isSupported()&&(t=document.querySelector("#"+this.configFormat.playerId),this.videoTag=document.createElement("video"),this.videoTag.id=this.myPlayerID,this.videoTag.style.width=this.configFormat.width+"px",this.videoTag.style.height=this.configFormat.height+"px",n=t.getElementsByTagName("video")[0],r=t.getElementsByTagName("div"),this.configFormat.repeatPlay&&(this.videoTag.setAttribute("loop","loop"),n)&&n.setAttribute("loop","loop"),n?t.insertBefore(n,r[0]):r[0]&&t.insertBefore(this.videoTag,r[0]),!0===this.configFormat.autoPlay&&(window.onclick=document.body.onclick=function(e){i.videoTag.muted=!1,window.onclick=document.body.onclick=null}),this.videoTag.oncanplay=function(){var e,t;!1===i.isInitDecodeFrames&&(i.isInitDecodeFrames=!0,(e=document.querySelector("#"+i.configFormat.playerId)).getElementsByTagName("video")[0]||(t=e.getElementsByTagName("div"),e.insertBefore(i.videoTag,t[0])),i.onLoadFinish&&i.onLoadFinish(),i.onReadyShowDone&&i.onReadyShowDone(),i._loopBufferState(),i.videoTag.ontimeupdate=()=>{i.onPlayingTime&&i.onPlayingTime(i.myPlayer.currentTime)},i.duration!==1/0)&&0<i.duration&&(i.videoTag.onended=()=>{i.onPlayingFinish&&i.onPlayingFinish()})},this.seekReadyPts?this.init_player(e,this.seekReadyPts):this.init_player(e),this._checkLoadState(e),this._checkPicBlock(e),i.onMakeItReady)&&i.onMakeItReady()}setPlaybackRate(e=1){return!(e<=0||null==this.videoTag||null===this.videoTag||(this.videoTag.playbackRate=e,0))}getPlaybackRate(){return null==this.videoTag||null===this.videoTag?0:this.videoTag.playbackRate}getSize(){return{width:0<this.videoTag.videoWidth?this.videoTag.videoWidth:this.width,height:0<this.videoTag.videoHeight?this.videoTag.videoHeight:this.height}}play(){this.myPlayer.play()}reload_mpegts(e){this.reset_player=!0,this.myPlayer.unload(),this.myPlayer.load(),this.onLoadFinish&&this.onLoadFinish(!1),this.pause(),this.seekReadyPts=e}seek(e){var t,i,n=this.videoTag.buffered;return n.length?(t=n.length-1,i=n.end(t),n=n.start(t),i-1<=e?(this.seekReadyPts||(this.seekReadyPts=e),this.myPlayer.currentTime=parseFloat(i-.1),!(this.seekResult=!0)):n<=e?(this.onPlayingTime&&this.onPlayingTime(e-.1),this.myPlayer.currentTime=parseFloat(e),this.seekReadyPts&&this.seekReadyPts!==e&&(this.seekReadyPts=e),this.seekResult=!0):0==e&&0<=n?(this.myPlayer.currentTime=parseFloat(e),this.seekResult=!0):(this.reset_player||this.reload_mpegts(e),!1)):(this.reset_player||this.reload_mpegts(e),!1)}pause(){this.myPlayer&&this.myPlayer.pause()}setVoice(e){this.videoTag.volume=e}isPlayingState(){return!this.videoTag.paused}_loopBufferState(){let r=this;r.duration<=0&&r.videoTag.duration&&(r.duration=r.videoTag.duration),null!==r.bufferInterval&&(window.clearInterval(r.bufferInterval),r.bufferInterval=null),r.bufferInterval=window.setInterval(function(){if(r.configFormat.duration<=0)window.clearInterval(r.bufferInterval);else{var t,i=r.videoTag.buffered.length,n=r.videoTag.buffered.end.length,i=n<i?i:n;let e;(e=r.videoTag.buffered.length?r.videoTag.buffered.end(i-1):e)>=r.duration-.04&&(r.onCacheProcess&&r.onCacheProcess(r.duration),r.cacheCompleted=!0,window.clearInterval(r.bufferInterval)),r.onCacheProcess&&r.onCacheProcess(e),r.seekReadyPts&&e>r.seekReadyPts?(t=r.seek(r.seekReadyPts),(r.seekResult=t)&&(r.videoTag.paused&&(r.play(),r.videoTag.muted&&(r.videoTag.muted=!1),r.reset_player=!1),r.seekReadyPts=null)):r.seekReadyPts&&e<=r.seekReadyPts&&(t=r.seek(e-.1),r.seekResult=t)}},200)}_releaseMpegTsjs(){this.myPlayer.pause(),this.myPlayer.unload(),this.myPlayer.detachMediaElement(),this.myPlayer.destroy(),this.myPlayer=null,this.videoTag.remove(),(this.videoTag=null)!==this.checkStartInterval&&(this.checkStartIntervalCount=0,window.clearInterval(this.checkStartInterval),this.checkStartInterval=null),null!==this.checkPicBlockInterval&&(window.clearInterval(this.checkPicBlockInterval),this.checkPicBlockInterval=null),this.isInitDecodeFrames=!1,this.lastDecodedFrame=0,this.lastDecodedFrameTime=-1}release(){null!==this.checkStartInterval&&(this.checkStartIntervalCount=0,window.clearInterval(this.checkStartInterval),this.checkStartInterval=null),null!==this.checkPicBlockInterval&&(window.clearInterval(this.checkPicBlockInterval),this.checkPicBlockInterval=null),null!==this.bufferInterval&&(window.clearInterval(this.bufferInterval),this.bufferInterval=null),this._releaseMpegTsjs(),this.myPlayerID=null,this.videoContaner=null,this.onLoadFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onReadyShowDone=null,this.onPlayState=null,window.onclick=document.body.onclick=null}}},function(e,t,i){function r(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}var n,a;window,e.exports=(n=[function(e,t,i){"use strict";var n=i(6),i=i.n(n),n=(r.e=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","error",e),r.ENABLE_ERROR&&!console.error&&console.warn},r.i=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","info",e),r.ENABLE_INFO&&console.info},r.w=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","warn",e),r.ENABLE_WARN&&console.warn},r.d=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","debug",e),r.ENABLE_DEBUG&&console.debug},r.v=function(e,t){e="["+(e=e&&!r.FORCE_GLOBAL_TAG?e:r.GLOBAL_TAG)+"] > "+t;r.ENABLE_CALLBACK&&r.emitter.emit("log","verbose",e)},r);function r(){}n.GLOBAL_TAG="mpegts.js",n.FORCE_GLOBAL_TAG=!1,n.ENABLE_ERROR=!0,n.ENABLE_INFO=!0,n.ENABLE_WARN=!0,n.ENABLE_DEBUG=!0,n.ENABLE_VERBOSE=!0,n.ENABLE_CALLBACK=!1,n.emitter=new i.a,t.a=n},function(e,t,i){"use strict";t.a={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",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},function(e,t,i){"use strict";i.d(t,"c",function(){return r}),i.d(t,"b",function(){return a}),i.d(t,"a",function(){return s});var n=i(3),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},a={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},s=(o.prototype.destroy=function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},o.prototype.isWorking=function(){return this._status===r.kConnecting||this._status===r.kBuffering},Object.defineProperty(o.prototype,"type",{get:function(){return this._type}
191,enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),o.prototype.open=function(e,t){throw new n.c("Unimplemented abstract function!")},o.prototype.abort=function(){throw new n.c("Unimplemented abstract function!")},o);function o(e){this._type=e||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},function(e,t,i){"use strict";i.d(t,"d",function(){return l}),i.d(t,"a",function(){return u}),i.d(t,"b",function(){return h}),i.d(t,"c",function(){return d});function n(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};Object.defineProperty(m.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),m.prototype.toString=function(){return this.name+": "+this.message};var r,a,s,o,l=m,u=(n(p,o=l),Object.defineProperty(p.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),p),h=(n(f,s=l),Object.defineProperty(f.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),f),d=(n(c,a=l),Object.defineProperty(c.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),c);function c(e){return a.call(this,e)||this}function f(e){return s.call(this,e)||this}function p(e){return o.call(this,e)||this}function m(e){this._message=e}},function(e,t,i){"use strict";var n,r,a={},s=self.navigator.userAgent.toLowerCase(),o=/(edge)\/([\w.]+)/.exec(s)||/(opr)[\/]([\w.]+)/.exec(s)||/(chrome)[ \/]([\w.]+)/.exec(s)||/(iemobile)[\/]([\w.]+)/.exec(s)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(s)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(s)||/(webkit)[ \/]([\w.]+)/.exec(s)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(s)||/(msie) ([\w.]+)/.exec(s)||0<=s.indexOf("trident")&&/(rv)(?::| )([\w.]+)/.exec(s)||s.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(s)||[],s=/(ipad)/.exec(s)||/(ipod)/.exec(s)||/(windows phone)/.exec(s)||/(iphone)/.exec(s)||/(kindle)/.exec(s)||/(android)/.exec(s)||/(windows)/.exec(s)||/(mac)/.exec(s)||/(linux)/.exec(s)||/(cros)/.exec(s)||[],o={browser:o[5]||o[3]||o[1]||"",version:o[2]||o[4]||"0",majorVersion:o[4]||o[2]||"0",platform:s[0]||""},s={};for(r in o.browser&&(s[o.browser]=!0,n=o.majorVersion.split("."),s.version={major:parseInt(o.majorVersion,10),string:o.version},1<n.length&&(s.version.minor=parseInt(n[1],10)),2<n.length)&&(s.version.build=parseInt(n[2],10)),o.platform&&(s[o.platform]=!0),(s.chrome||s.opr||s.safari)&&(s.webkit=!0),(s.rv||s.iemobile)&&(s.rv&&delete s.rv,o.browser="msie",s.msie=!0),s.edge&&(delete s.edge,o.browser="msedge",s.msedge=!0),s.opr&&(o.browser="opera",s.opera=!0),s.safari&&s.android&&(o.browser="android",s.android=!0),s.name=o.browser,s.platform=o.platform,a)a.hasOwnProperty(r)&&delete a[r];Object.assign(a,s),t.a=a},function(e,t,i){"use strict";t.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"Co
191decUnsupported"}},function(e,t,i){"use strict";var n="object"==typeof Reflect?Reflect:null,l=n&&"function"==typeof n.apply?n.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)},r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(r,a){return new Promise(function(e,t){function i(e){r.removeListener(a,n),t(e)}function n(){"function"==typeof r.removeListener&&r.removeListener("error",i),e([].slice.call(arguments))}g(r,a,n,{once:!0}),"error"!==a&&"function"==typeof r.on&&g(r,"error",i,{once:!0})})},(s.EventEmitter=s).prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,a;return u(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener||i),r=e._events),a=r[t]),void 0===a?(a=r[t]=i,++e._eventsCount):("function"==typeof a?a=r[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),0<(r=h(e))&&a.length>r&&!a.warned&&(a.warned=!0,(n=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=a.length,console)&&console.warn),e}function c(e,t,i){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},t=function(){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)}.bind(e);return t.listener=i,e.wrapFn=t}function f(e,t,i){e=e._events;if(void 0===e)return[];e=e[t];{if(void 0===e)return[];if("function"==typeof e)return i?[e.listener||e]:[e];if(i){for(var n=e,r=new Array(n.length),a=0;a<r.length;++a)r[a]=n[a].listener||n[a];return r}return m(e,e.length)}}function p(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function m(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function g(i,n,r,a){if("function"==typeof i.on)a.once?i.once(n,r):i.on(n,r);else{if("function"!=typeof i.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i);i.addEventListener(n,function e(t){a.once&&i.removeEventListener(n,e),r(t)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return h(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){if((a=0<t.length?t[0]:a)instanceof Error)throw a;n=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw n.context=a,n}var a=r[e];if(void 0===a)return!1;if("function"==typeof a)l(a,this,t);else for(var s=a.length,o=m(a,s),i=0;i<s;++i)l(o[i],this,t);return!0},s.prototype.on=s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,c(this,e,t)),this},s.prototype.off=s.prototype.removeListener=function(e,t){var i,n,r,a,s;if(u(t),void 0!==(n=this._events)&&void 0!==(i=n[e]))if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
191("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,a=i.length-1;0<=a;a--)if(i[a]===t||i[a].listener===t){s=i[a].listener,r=a;break}if(r<0)return this;if(0===r)i.shift();else{var o=i;var l=r;for(;l+1<o.length;l++)o[l]=o[l+1];o.pop()}1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.removeAllListeners=function(e){var t,i;if(void 0!==(i=this._events))if(void 0===i.removeListener)0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]);else if(0===arguments.length){for(var n,r=Object.keys(i),a=0;a<r.length;++a)"removeListener"!==(n=r[a])&&this.removeAllListeners(n);this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0}else if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;0<=a;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return 0<this._eventsCount?r(this._events):[]}},function(e,t,i){"use strict";i.d(t,"d",function(){return n}),i.d(t,"b",function(){return r}),i.d(t,"a",function(){return a}),i.d(t,"c",function(){return s});var n=function(e,t,i,n,r){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=r,this.fileposition=null},r=(u.prototype.appendSyncPoint=function(e){e.isSyncPoint=!0,this.syncPoints.push(e)},u),a=(l.prototype.clear=function(){this._list=[]},l.prototype.appendArray=function(e){var t=this._list;0!==e.length&&(0<t.length&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))},l.prototype.getLastSyncPointBeforeDts=function(e){if(0==this._list.length)return null;var t,i=this._list,n=0,r=i.length-1,a=0,s=r;for(e<i[0].dts&&(n=0,a=s+1);a<=s;){if((t=a+Math.floor((s-a)/2))===r||e>=i[t].dts&&e<i[t+1].dts){n=t;break}i[t].dts<e?a=t+1:s=t-1}return this._list[n]},l),s=(Object.defineProperty(o.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),o.prototype.isEmpty=function(){return 0===this._list.length},o.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},o.prototype._searchNearestSegmentBefore=function(e){var t=this._list;if(0===t.length)return-2;var i,n=t.length-1,r=0,a=n,s=0;if(e<t[0].originalBeginDts)return-1;for(;r<=a;){if((i=r+Math.floor((a-r)/2))===n||e>t[i].lastSample.originalDts&&e<t[i+1].originalBeginDts){s=i;break}t[i].originalBeginDts<e?r=i+1:a=i-1}return s},o.prototype._searchNearestSegmentAfter=function(e){return this._searchNearestSegmentBefore(e)+1},o.prototype.append=function(e){var t=this._list,i=this._lastAppendLocation,n=0;-1!==i&&i<t.length&&e.originalBeginDts>=t[i].lastSample.originalDts&&(i===t.length-1||i<t.length-1&&e.originalBeginDts<t[i+1].originalBeginDts)?n=i+1:0<t.length&&(n=this._searchNearestSegmentBefore(e.originalBeginDts)+1),this._lastAppendLocation=n,this._list.splice(n,0,e)},o.prototype.getLastSegmentBefore=function(e){e=this._searchNearestSegmentBefore(e);return 0<=e?this._list[e]:null},o.prototype.getLastSampleBefore=function(e){e=this.getLastSegmentBefore(e);return null!=e?e.lastSample:null},o.prototype.getLastSyncPointBefore=function(e){for(var t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;0===i.length&&0<t;)i=this._list[--t].syncPoints;return 0<i.length?i[i.length-1]:null},o);function o(e){this._type=e,this._list=[],this._lastAppendLocation=-1}function l(){this._list=[]}function u(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}},function(e,t,i){"use strict";function n(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}n.prototype.isComplete=function(){var e=null!==this.hasAudio||!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!==this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&e&&t},n.prototype.isSeekable=function(){return!0===this.hasKeyframesIndex},n.prototype.getNearestKeyframe=function(e){var t;return null==this.keyframesIndex?null:(t=this.keyframesIndex,{index:e=this._search(t.times,e),milliseconds:t.times[e],fileposition:t.filepositions[e]})},n.prototype._search=function(e,t){var i,n=0,r=e.length-1,a=0,s=r;for(t<e[0]&&(n=0,a=s+1);a<=s;){if((i=a+Math.floor((s-a)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?a=i+1:s=i-1}return n},t.a=n},function(e,t,i){"use strict";var n=i(6),n=i.n(n),r=i(0),i=(Object.defineProperty(a,"forceGlobalTag",{get:function(){return r.a.FORCE_GLOBAL_TAG},set:function(e){r.a.FORCE_GLOBAL_TAG=e,a._notifyChange()}
191,enumerable:!1,configurable:!0}),Object.defineProperty(a,"globalTag",{get:function(){return r.a.GLOBAL_TAG},set:function(e){r.a.GLOBAL_TAG=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableAll",{get:function(){return r.a.ENABLE_VERBOSE&&r.a.ENABLE_DEBUG&&r.a.ENABLE_INFO&&r.a.ENABLE_WARN&&r.a.ENABLE_ERROR},set:function(e){r.a.ENABLE_VERBOSE=e,r.a.ENABLE_DEBUG=e,r.a.ENABLE_INFO=e,r.a.ENABLE_WARN=e,r.a.ENABLE_ERROR=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableDebug",{get:function(){return r.a.ENABLE_DEBUG},set:function(e){r.a.ENABLE_DEBUG=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableVerbose",{get:function(){return r.a.ENABLE_VERBOSE},set:function(e){r.a.ENABLE_VERBOSE=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableInfo",{get:function(){return r.a.ENABLE_INFO},set:function(e){r.a.ENABLE_INFO=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableWarn",{get:function(){return r.a.ENABLE_WARN},set:function(e){r.a.ENABLE_WARN=e,a._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"enableError",{get:function(){return r.a.ENABLE_ERROR},set:function(e){r.a.ENABLE_ERROR=e,a._notifyChange()},enumerable:!1,configurable:!0}),a.getConfig=function(){return{globalTag:r.a.GLOBAL_TAG,forceGlobalTag:r.a.FORCE_GLOBAL_TAG,enableVerbose:r.a.ENABLE_VERBOSE,enableDebug:r.a.ENABLE_DEBUG,enableInfo:r.a.ENABLE_INFO,enableWarn:r.a.ENABLE_WARN,enableError:r.a.ENABLE_ERROR,enableCallback:r.a.ENABLE_CALLBACK}},a.applyConfig=function(e){r.a.GLOBAL_TAG=e.globalTag,r.a.FORCE_GLOBAL_TAG=e.forceGlobalTag,r.a.ENABLE_VERBOSE=e.enableVerbose,r.a.ENABLE_DEBUG=e.enableDebug,r.a.ENABLE_INFO=e.enableInfo,r.a.ENABLE_WARN=e.enableWarn,r.a.ENABLE_ERROR=e.enableError,r.a.ENABLE_CALLBACK=e.enableCallback},a._notifyChange=function(){var e,t=a.emitter;0<t.listenerCount("change")&&(e=a.getConfig(),t.emit("change",e))},a.registerListener=function(e){a.emitter.addListener("change",e)},a.removeListener=function(e){a.emitter.removeListener("change",e)},a.addLogListener=function(e){r.a.emitter.addListener("log",e),0<r.a.emitter.listenerCount("log")&&(r.a.ENABLE_CALLBACK=!0,a._notifyChange())},a.removeLogListener=function(e){r.a.emitter.removeListener("log",e),0===r.a.emitter.listenerCount("log")&&(r.a.ENABLE_CALLBACK=!1,a._notifyChange())},a);function a(){}i.emitter=new n.a,t.a=i},function(R,B,e){"use strict";var t=e(6),F=e.n(t),I=e(0),P=e(4),n=e(8);function s(e,t,i){var n=e;if(t+i<n.length){for(;i--;)if(128!=(192&n[++t]))return;return 1}}function O(e){for(var t,i=[],n=e,r=0,a=e.length;r<a;){if(n[r]<128)i.push(String.fromCharCode(n[r]));else{if(!(n[r]<192))if(n[r]<224){if(s(n,r,1)&&128<=(t=(31&n[r])<<6|63&n[r+1])){i.push(String.fromCharCode(65535&t)),r+=2;continue}}else if(n[r]<240){if(s(n,r,2)&&2048<=(t=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2])&&55296!=(63488&t)){i.push(String.fromCharCode(65535&t)),r+=3;continue}}else if(n[r]<248)if(s(n,r,3)&&65536<(t=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3])&&t<1114112){t-=65536,i.push(String.fromCharCode(t>>>10|55296)),i.push(String.fromCharCode(1023&t|56320)),r+=4;continue}i.push(String.fromCharCode(65533))}++r}return i.join("")}var _=e(3),y=(t=new ArrayBuffer(2),new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]),U=(A.parseScriptData=function(e,t,i){var n={};try{var r=A.parseValue(e,t,i),a=A.parseValue(e,t+r.size,i-r.size);n[r.data]=a.data}catch(e){I.a.e("AMF",e.toString())}return n},A.parseObject=function(e,t,i){if(i<3)throw new _.a("Data not enough when parse ScriptDataObject");var n=A.parseString(e,t,i),e=A.parseValue(e,t+n.size,i-n.size),t=e.objectEnd;return{data:{name:n.data,value:e.data},size:n.size+e.size,objectEnd:t}},A.parseVariable=function(e,t,i){return A.parseObject(e,t,i)},A.parseString=function(e,t,i){if(i<2)throw new _.a("Data not enough when parse String");i=new DataView(e,t,i).getUint16(0,!y);return{data:0<i?O(new Uint8Array(e,t+2,i)):"",size:2+i}},A.parseLongString=function(e,t,i){if(i<4)throw new _.a("Data not enough when parse LongString");i=new DataView(e,t,i).getUint32(0,!y);return{data:0<i?O(new Uint8Array(e,t+4,i)):"",size:4+i}},A.parseDate=function(e,t,i){if(i<10)throw new _.a("Data size invalid when parse Date");e=new DataView(e,t,i),t=e.getFloat64(0,!y),i=e.getInt16(8,!y);return{data:new Date(t+=60*i*1e3),size:10}},A.parseValue=function(e,t,i){if(i<1)throw new _.a("Data not enough when parse Value");var n=new DataView(e,t,i),r=1,a=n.getUint8(0),s=!1;
191try{switch(a){case 0:l=n.getFloat64(1,!y),r+=8;break;case 1:l=!!n.getUint8(1),r+=1;break;case 2:var o=A.parseString(e,t+1,i-1),l=o.data;r+=o.size;break;case 3:l={};var u=0;for(9==(16777215&n.getUint32(i-4,!y))&&(u=3);r<i-4;){var h=A.parseObject(e,t+r,i-r-u);if(h.objectEnd)break;l[h.data.name]=h.data.value,r+=h.size}r<=i-3&&9==(16777215&n.getUint32(r-1,!y))&&(r+=3);break;case 8:for(l={},r+=4,u=0,9==(16777215&n.getUint32(i-4,!y))&&(u=3);r<i-8;){var d=A.parseVariable(e,t+r,i-r-u);if(d.objectEnd)break;l[d.data.name]=d.data.value,r+=d.size}r<=i-3&&9==(16777215&n.getUint32(r-1,!y))&&(r+=3);break;case 9:r=1,s=!(l=void 0);break;case 10:l=[];var c=n.getUint32(1,!y);r+=4;for(var f=0;f<c;f++){var p=A.parseValue(e,t+r,i-r);l.push(p.data),r+=p.size}break;case 11:var m=A.parseDate(e,t+1,i-1);l=m.data,r+=m.size;break;case 12:var g=A.parseString(e,t+1,i-1);l=g.data,r+=g.size;break;default:r=i,I.a.w("AMF","Unsupported AMF value type "+a)}}catch(e){I.a.e("AMF",e.toString())}return{data:l,size:r,objectEnd:s}},A),ie=(i.prototype.destroy=function(){this._buffer=null},i.prototype._fillCurrentWord=function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new _.a("ExpGolomb: _fillCurrentWord() but no bytes available");var e=Math.min(4,e),t=new Uint8Array(4);t.set(this._buffer.subarray(this._buffer_index,this._buffer_index+e)),this._current_word=new DataView(t.buffer).getUint32(0,!1),this._buffer_index+=e,this._current_word_bits_left=8*e},i.prototype.readBits=function(e){if(32<e)throw new _.b("ExpGolomb: readBits() bits exceeded max 32bits!");var t,i;return e<=this._current_word_bits_left?(t=this._current_word>>>32-e,this._current_word<<=e,this._current_word_bits_left-=e,t):(t=this._current_word_bits_left?this._current_word:0,t>>>=32-this._current_word_bits_left,e=e-this._current_word_bits_left,this._fillCurrentWord(),e=Math.min(e,this._current_word_bits_left),i=this._current_word>>>32-e,this._current_word<<=e,this._current_word_bits_left-=e,t<<e|i)},i.prototype.readBool=function(){return 1===this.readBits(1)},i.prototype.readByte=function(){return this.readBits(8)},i.prototype._skipLeadingZero=function(){for(var e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},i.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},i.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},i),N=(D._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,a=0;a<i;a++)2<=a&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(n[r]=t[a],r++);return new Uint8Array(n.buffer,0,r)},D.parseSPS=function(e){for(var t=e.subarray(1,4),i="avc1.",n=0;n<3;n++){var r=t[n].toString(16);i+=r=r.length<2?"0"+r:r}var e=D._ebsp2rbsp(e),a=new ie(e),e=(a.readByte(),a.readByte()),s=(a.readByte(),a.readByte()),o=(a.readUEG(),D.getProfileString(e)),l=D.getLevelString(s),u=1,h=420,d=8,c=8;if((100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e||138===e||144===e)&&(3===(u=a.readUEG())&&a.readBits(1),u<=3&&(h=[0,420,422,444][u]),d=a.readUEG()+8,c=a.readUEG()+8,a.readBits(1),a.readBool()))for(var f=3!==u?8:12,p=0;p<f;p++)a.readBool()&&D._skipScalingList(a,p<6?16:64);a.readUEG();var m=a.readUEG();if(0===m)a.readUEG();else if(1===m){a.readBits(1),a.readSEG(),a.readSEG();for(var g=a.readUEG(),p=0;p<g;p++)a.readSEG()}var m=a.readUEG(),_=(a.readBits(1),a.readUEG()),y=a.readUEG(),v=a.readBits(1),A=(0===v&&a.readBits(1),a.readBits(1),0),E=0,b=0,w=0,S=(a.readBool()&&(A=a.readUEG(),E=a.readUEG(),b=a.readUEG(),w=a.readUEG()),1),T=1,L=0,k=!0,C=0,R=0,I=(a.readBool()&&(a.readBool()&&(0<(P=a.readByte())&&P<16?(S=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][P-1],T=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][P-1]):255===P&&(S=a.readByte()<<8|a.readByte(),T=a.readByte()<<8|a.readByte())),a.readBool()&&a.readBool(),a.readBool()&&(a.readBits(4),a.readBool())&&a.readBits(24),a.readBool()&&(a.readUEG(),a.readUEG()),a.readBool())&&(P=a.readBits(32),I=a.readBits(32),k=a.readBool(),L=(C=I)/(R=2*P)),1
191),P=(1===S&&1===T||(I=S/T),0),x=0,x=0===u?(P=1,2-v):(P=3===u?1:2,(1===u?2:1)*(2-v)),_=16*(_+1),y=16*(y+1)*(2-v),v=(_-=(A+E)*P,y-=(b+w)*x,Math.ceil(_*I));return a.destroy(),a=null,{codec_mimetype:i,profile_idc:e,level_idc:s,profile_string:o,level_string:l,chroma_format_idc:u,bit_depth:d,bit_depth_luma:d,bit_depth_chroma:c,ref_frames:m,chroma_format:h,chroma_format_string:D.getChromaFormatString(h),frame_rate:{fixed:k,fps:L,fps_den:R,fps_num:C},sar_ratio:{width:S,height:T},codec_size:{width:_,height:y},present_size:{width:v,height:y}}},D._skipScalingList=function(e,t){for(var i=8,n=8,r=0;r<t;r++)i=0===(n=0!==n?(i+e.readSEG()+256)%256:n)?i:n},D.getProfileString=function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},D.getLevelString=function(e){return(e/10).toFixed(1)},D.getChromaFormatString=function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},D),E=e(5),v=(ne._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,a=0;a<i;a++)2<=a&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(n[r]=t[a],r++);return new Uint8Array(n.buffer,0,r)},ne.parseVPS=function(e){e=ne._ebsp2rbsp(e),e=new ie(e);return e.readByte(),e.readByte(),e.readBits(4),e.readBits(2),e.readBits(6),{num_temporal_layers:e.readBits(3)+1,temporal_id_nested:e.readBool()}},ne.parseSPS=function(e){var e=ne._ebsp2rbsp(e),t=new ie(e);t.readByte(),t.readByte();for(var e=0,i=0,n=0,r=0,a=(t.readBits(4),t.readBits(3)),F=(t.readBool(),t.readBits(2)),O=t.readBool(),s=t.readBits(5),U=t.readByte(),N=t.readByte(),j=t.readByte(),G=t.readByte(),V=t.readByte(),H=t.readByte(),Y=t.readByte(),z=t.readByte(),W=t.readByte(),Q=t.readByte(),o=t.readByte(),l=[],u=[],h=0;h<a;h++)l.push(t.readBool()),u.push(t.readBool());if(0<a)for(h=a;h<8;h++)t.readBits(2);for(h=0;h<a;h++)l[h]&&(t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte()),u[h]&&t.readByte();t.readUEG();var d=t.readUEG(),c=(3==d&&t.readBits(1),t.readUEG()),K=t.readUEG(),f=(t.readBool()&&(e+=t.readUEG(),i+=t.readUEG(),n+=t.readUEG(),r+=t.readUEG()),t.readUEG()),J=t.readUEG(),q=t.readUEG();for(h=t.readBool()?0:a;h<=a;h++)t.readUEG(),t.readUEG(),t.readUEG();if(t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readBool()&&t.readBool())for(var p=0;p<4;p++)for(var m=0;m<(3===p?2:6);m++)if(t.readBool()){var X=Math.min(64,1<<4+(p<<1));for(1<p&&t.readSEG(),h=0;h<X;h++)t.readSEG()}else t.readUEG();t.readBool(),t.readBool(),t.readBool()&&(t.readByte(),t.readUEG(),t.readUEG(),t.readBool());var g=t.readUEG(),_=0;for(h=0;h<g;h++){var y=!1;if(y=0!==h?t.readBool():y){h===g&&t.readUEG(),t.readBool(),t.readUEG();for(var v=0,A=0;A<=_;A++){var E=t.readBool(),b=!1;E||(b=t.readBool()),(E||b)&&v++}_=v}else{for(var w=t.readUEG(),S=t.readUEG(),_=w+S,A=0;A<w;A++)t.readUEG(),t.readBool();for(A=0;A<S;A++)t.readUEG(),t.readBool()}}if(t.readBool())for(var Z=t.readUEG(),h=0;h<Z;h++){for(A=0;A<q+4;A++)t.readBits(1);t.readBits(1)}var T=0,L=1,k=1,$=!1,C=1,R=1;if(t.readBool(),t.readBool(),t.readBool()){if(t.readBool()&&(0<(B=t.readByte())&&B<=16?(L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][B-1],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][B-1]):255===B&&(L=t.readBits(16),k=t.readBits(16))),t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(3),t.readBool(),t.readBool())&&(t.readByte(),t.readByte(),t.readByte()),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool(),t.readBool(),t.readBool(),t.readBool()&&(t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG()),t.readBool()&&(C=t.readBits(32),R=t.readBits(32),t.readBool())&&(t.readUEG(),t.readBool())){var I=!1,P=t.readBool(),x=t.readBool();for((P||x)&&((I=t.readBool())&&(t.readByte(),t.readBits(5),t.readBool(),t.readBits(5)),t.readBits(4),t.readBits(4),I&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5)),h=0;h<=a;h++){var D=t.readBool(),$=D,ee=!1,M=1,te=!1;if((ee=D?ee:t.readBool())?t.readSEG():te=t.readBool(),te||(M=t.readUEG()+1),P)for(A=0;A<M;A++)t.readUEG(),t.readUEG(),I&&(t.readUEG(),t.readUEG());if(x)for(A=0;A<M;A++)t.readUEG(),t.readUEG(),I&&(t.readUEG(),t.readUEG())}}t.readBool()&&(t.readBool(),t.readBool(),t.readBool(),T=t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG(),t.readUEG())}t.readBool();var B="hvc1."+s+".1.L"+o+".B0",c=c-(e+i)*(1===d||2===d?2:1),e=K-(n+r)*(1===d?2:1),i=1!==L&&1!==k?L/k:1;return t.destroy(),t=null,{codec_mimetype:B,level_string:ne.getLevelString(o),profile_idc:s,bit_depth:f+8,ref_frames:1,chroma_format:d,chroma_format_string:ne.getChromaFormatString(d),general_level_idc:o,general_profile_space:F,general_tier_flag:O,general_profile_idc:s,general_profile_compatibility_flags_1:U,general_profile_compatibility_flags_2:N,general_profile_compatibility_flags_3:j,general_profile_compatibility_flags_4:G,general_constraint_indicator_flags_1:V,general_constraint_indicator_flags_2:H,general_constraint_indicator_flags_3:Y,general_constraint_indicator_flags_4:z,general_constraint_indicator_flags_5:W,general_constraint_indicator_flags_6:Q,min_spatial_segmentation_idc:T,constant_frame_rate:0,chroma_format_idc:d,bit_depth_luma_minus8:f,bit_depth_chroma_minus8:J,frame_rate:{fixed:$,fps:R/C,fps_den:C,fps_num:R},sar_ratio:{width:L,height:k},codec_size:{width:c,height:e}
191,present_size:{width:c*i,height:e}}},ne.parsePPS=function(e){var e=ne._ebsp2rbsp(e),e=new ie(e),t=(e.readByte(),e.readByte(),e.readUEG(),e.readUEG(),e.readBool(),e.readBool(),e.readBits(3),e.readBool(),e.readBool(),e.readUEG(),e.readUEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool()&&e.readUEG(),e.readSEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool(),e.readBool(),e.readBool()),e=e.readBool(),i=1;return e&&t?i=0:e?i=3:t&&(i=2),{parallelismType:i}},ne.getChromaFormatString=function(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},ne.getProfileString=function(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},ne.getLevelString=function(e){return(e/30).toFixed(1)},ne);function ne(){}function D(){}function i(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}function A(){}function j(e){return e.byteOffset%2==0&&e.byteLength%2==0}function G(e){return e.byteOffset%4==0&&e.byteLength%4==0}function r(e,t){for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function b(e,t){return e.byteLength===t.byteLength&&(G(e)&&G(t)?(i=t,r(new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4),new Uint32Array(i.buffer,i.byteOffset,i.byteLength/4))):j(e)&&j(t)?(i=t,r(new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2))):r(e,t));var i}function V(){this.program_pmt_pid={}}d.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},d.probe=function(e){var t,i,n,e=new Uint8Array(e);return e.byteLength<9?{needMoreData:!0}:(t={match:!1},70!==e[0]||76!==e[1]||86!==e[2]||1!==e[3]||(i=(4&e[4])>>>2!=0,n=0!=(1&e[4]),(e=e[5]<<24|e[6]<<16|e[7]<<8|e[8])<9)?t:{match:!0,consumed:e,dataOffset:e,hasAudioTrack:i,hasVideoTrack:n})},d.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(d.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.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(d.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),d.prototype.resetMediaInfo=function(){this._mediaInfo=new n.a},d.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},d.prototype.parseChunks=function(e,t){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new _.a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0,n=this._littleEndian;if(0===t){if(!(13<e.byteLength))return 0;i=d.probe(e).dataOffset}for(this._firstParse&&(this._firstParse=!1,t+i!==this._dataOffset&&I.a.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==(r=new DataView(e,i)).getUint32(0,!n)&&I.a.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4);i<e.byteLength;){this._dispatch=!0;var r=new DataView(e,i);if(i+11+4>e.byteLength)break;var a=r.getUint8(0),s=16777215&r.getUint32(0,!n);if(i+11+s+4>e.byteLength)break;if(8===a||9===a||18===a){var o=r.getUint8(4),l=r.getUint8(5),u=r.getUint8(6)|l<<8|o<<16|r.getUint8(7)<<24,h=(0!=(16777215&r.getUint32(7,!n))&&I.a.w(this.TAG,"Meet tag which has StreamID != 0!"),i+11);switch(a){case 8:this._parseAudioData(e,h,s,u);break;case 9:this._parseVideoData(e,h,s,u,t+i);break;case 18:this._parseScriptData(e,h,s)}l=r.getUint32(11+s,!n);l!==11+s&&I.a.w(this.TAG,"Invalid PrevTagSize "+l)}else I.a.w(this.TAG,"Unsupported tag type "+a+", skipped");i+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i},d.prototype._parseScriptData=function(e,t,i){e=U.parseScriptData(e,t,i);if(e.hasOwnProperty("onMetaData")){if(null==e.onMetaData||"object"!=typeof e.onMetaData)return void I.a.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&I.a.w(this.TAG,"Found another onMetaData tag!"),this._metadata=e;var n,t=this._metadata.onMetaData;this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},t)),"boolean"==typeof t.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=t.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof t.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=t.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof t.audiodatarate&&(this._mediaInfo.audioDataRate=t.audiodatarate),"number"==typeof t.videodatarate&&(this._mediaInfo.videoDataRate=t.videodatarate),"number"==typeof t.width&&(this._mediaInfo.width=t.width),"number"==typeof t.height&&(this._mediaInfo.height=t.height),"number"==typeof t.duration?this._durationOverrided||(i=Math.floor(t.duration*this._timescale),this._duration=i,this._mediaInfo.duration=i):this._mediaInfo.duration=0,"number"==typeof t.framerate&&0<(i=Math.floor(1e3*t.framerate))&&(n=i/1e3,this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=n,this._referenceFrameRate.fps_num=i,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=n),"object"==typeof t.keyframes?(this._mediaInfo.hasKeyframesIndex=!0,i=t.keyframes,this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(i),t.keyframes=null):this._mediaInfo.hasKeyframesIndex=!1,this._dispatch=!1,this._mediaInfo.metadata=t,I.a.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}0<Object.keys(e).length&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},e))},d.prototype._parseKeyframesIndex=function(e){for(var t=[],i=[],n=1;n<e.times.length;n++){var r=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(r),i.push(e.filepositions[n])}return{times:t,filepositions:i}},d.prototype._parseAudioData=function(e,t,i,n){if(i<=1)I.a.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var r=new DataView(e,t,i).getUint8(0),a=r>>>4;if(2==a||10==a){var s=(12&r)>>>2;if(0<=s&&s<=4){var o,l=this._flvSoundRateTable[s],r=1&r,u=this._audioMetadata,h=this._audioTrack;if(u||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(u=this._audioMetadata={}).type="audio",u.id=h.id,u.timescale=this._timescale,u.duration=this._duration,u.audioSampleRate=l,u.channelCount=0==r?1:2),10==a){l=this._parseAACAudioData(e,t+1,i-1);if(null!=l)if(0===l.packetType){if(u.config){if(b(l.data.config,u.config))return;I.a.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var d=l.data;u.audioSampleRate=d.samplingRate,u.channelCount=d.channelCount,u.codec=d.codec,u.originalCodec=d.originalCodec,u.config=d.config,u.refSampleDuration=1024/u.audioSampleRate*u.timescale,I.a.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",u),(o=this._mediaInfo).audioCodec=u.originalCodec,o.audioSampleRate=u.audioSampleRate,o.audioChannelCount=u.channelCount,o.hasVideo?null!=o.videoCodec&&(o.mimeType='video/x-flv; codecs="'+o.videoCodec+","+o.audioCodec+'"'):o.mimeType='video/x-flv; codecs="'+o.audioCodec+'"',o.isComplete()&&this._onMediaInfo(o)}else 1===l.packetType?(c=this._timestampBase+n,r={unit:l.data,length:l.data.byteLength,dts:c,pts:c},h.samples.push(r),h.length+=l.data.length):I.a.e(this.TAG,"Flv: Unsupported AAC data type "+l.packetType)}
191else if(2==a){if(!u.codec){if(null==(d=this._parseMP3AudioData(e,t+1,i-1,!0)))return;u.audioSampleRate=d.samplingRate,u.channelCount=d.channelCount,u.codec=d.codec,u.originalCodec=d.originalCodec,u.refSampleDuration=1152/u.audioSampleRate*u.timescale,I.a.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",u),(o=this._mediaInfo).audioCodec=u.codec,o.audioSampleRate=u.audioSampleRate,o.audioChannelCount=u.channelCount,o.audioDataRate=d.bitRate,o.hasVideo?null!=o.videoCodec&&(o.mimeType='video/x-flv; codecs="'+o.videoCodec+","+o.audioCodec+'"'):o.mimeType='video/x-flv; codecs="'+o.audioCodec+'"',o.isComplete()&&this._onMediaInfo(o)}var c,r=this._parseMP3AudioData(e,t+1,i-1,!1);null!=r&&(c=this._timestampBase+n,l={unit:r,length:r.byteLength,dts:c,pts:c},h.samples.push(l),h.length+=r.length)}}else this._onError(E.a.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+s)}else this._onError(E.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}},d.prototype._parseAACAudioData=function(e,t,i){var n,r;if(!(i<=1))return n={},r=new Uint8Array(e,t,i),n.packetType=r[0],0===r[0]?n.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):n.data=r.subarray(1),n;I.a.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},d.prototype._parseAACAudioSpecificConfig=function(e,t,i){var n,r,e=new Uint8Array(e,t,i),t=null,i=0,a=null,i=n=e[0]>>>3;if((r=(7&e[0])<<1|e[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(E.a.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var s=this._mpegSamplingRates[r],o=(120&e[1])>>>3;if(!(o<0||8<=o))return 5===i&&(a=(7&e[1])<<1|e[2]>>>7,e[2]),-1!==(e=self.navigator.userAgent.toLowerCase()).indexOf("firefox")?a=6<=r?(i=5,t=new Array(4),r-3):(i=2,t=new Array(2),r):-1!==e.indexOf("android")?(i=2,t=new Array(2),a=r):(i=5,a=r,t=new Array(4),6<=r?a=r-3:1==o&&(i=2,t=new Array(2),a=r)),t[0]=i<<3,t[0]|=(15&r)>>>1,t[1]=(15&r)<<7,t[1]|=(15&o)<<3,5===i&&(t[1]|=(15&a)>>>1,t[2]=(1&a)<<7,t[2]|=8,t[3]=0),{config:t,samplingRate:s,channelCount:o,codec:"mp4a.40."+i,originalCodec:"mp4a.40."+n};this._onError(E.a.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},d.prototype._parseMP3AudioData=function(e,t,i,n){if(!(i<4)){this._littleEndian;
191e=new Uint8Array(e,t,i),t=null;if(n){if(255!==e[0])return;var i=e[1]>>>3&3,n=(6&e[1])>>1,r=(240&e[2])>>>4,a=(12&e[2])>>>2,s=3!=(e[3]>>>6&3)?2:1,o=0,l=0;switch(i){case 0:o=this._mpegAudioV25SampleRateTable[a];break;case 2:o=this._mpegAudioV20SampleRateTable[a];break;case 3:o=this._mpegAudioV10SampleRateTable[a]}switch(n){case 1:r<this._mpegAudioL3BitRateTable.length&&(l=this._mpegAudioL3BitRateTable[r]);break;case 2:r<this._mpegAudioL2BitRateTable.length&&(l=this._mpegAudioL2BitRateTable[r]);break;case 3:r<this._mpegAudioL1BitRateTable.length&&(l=this._mpegAudioL1BitRateTable[r])}t={bitRate:l,samplingRate:o,channelCount:s,codec:"mp3",originalCodec:"mp3"}}else t=e;return t}I.a.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},d.prototype._parseVideoData=function(e,t,i,n,r){var a,s,o,l;i<=1?I.a.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!"):!0===this._hasVideoFlagOverrided&&!1===this._hasVideo||(s=(112&(a=new Uint8Array(e,t,i)[0]))>>>4,0!=(128&a)?(o=15&a,"hvc1"!==(l=String.fromCharCode.apply(String,new Uint8Array(e,t,i).slice(1,5)))?this._onError(E.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+l):this._parseEnhancedHEVCVideoPacket(e,t+5,i-5,n,r,s,o)):7==(l=15&a)?this._parseAVCVideoPacket(e,t+1,i-1,n,r,s):12!=l?this._onError(E.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+l):this._parseHEVCVideoPacket(e,t+1,i-1,n,r,s))},d.prototype._parseAVCVideoPacket=function(e,t,i,n,r,a){if(i<4)I.a.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var s=this._littleEndian,o=new DataView(e,t,i),l=o.getUint8(0),o=(16777215&o.getUint32(0,!s))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===l)this._parseAVCVideoData(e,t+4,i-4,n,r,a,o);else if(2!==l)return void this._onError(E.a.FORMAT_ERROR,"Flv: Invalid video packet type "+l)}},d.prototype._parseHEVCVideoPacket=function(e,t,i,n,r,a){if(i<4)I.a.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var s=this._littleEndian,o=new DataView(e,t,i),l=o.getUint8(0),o=(16777215&o.getUint32(0,!s))<<8>>8;if(0===l)this._parseHEVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===l)this._parseHEVCVideoData(e,t+4,i-4,n,r,a,o);else if(2!==l)return void this._onError(E.a.FORMAT_ERROR,"Flv: Invalid video packet type "+l)}},d.prototype._parseEnhancedHEVCVideoPacket=function(e,t,i,n,r,a,s){if(i<4)I.a.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var o=this._littleEndian,l=new DataView(e,t,i);if(0===s)this._parseHEVCDecoderConfigurationRecord(e,t,i);else if(1===s){l=(4294967040&l.getUint32(0,!o))>>8;this._parseHEVCVideoData(e,t+3,i-3,n,r,a,l)}else if(3===s)this._parseHEVCVideoData(e,t,i,n,r,a,0);else if(2!==s)return void this._onError(E.a.FORMAT_ERROR,"Flv: Invalid video packet type "+s)}},d.prototype._parseAVCDecoderConfigurationRecord=function(e,t,i){if(i<7)I.a.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,r=this._videoTrack,a=this._littleEndian,s=new DataView(e,t,i);if(n){if(void 0!==n.avcc){var o=new Uint8Array(e,t,i);if(b(o,n.avcc))return;I.a.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=r.id,n.timescale=this._timescale,n.duration=this._duration;o=s.getUint8(0),r=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),1===o&&0!==r)if(this._naluLengthSize=1+(3&s.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var l=31&s.getUint8(5);if(0!=l){1<l&&I.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+l);for(var u=6,h=0;h<l;h++){var d=s.getUint16(u,!a);if(u+=2,0!==d){var c=new Uint8Array(e,t+u,d),f=(u+=d,N.parseSPS(c));if(0===h){n.codecWidth=f.codec_size.width,n.codecHeight=f.codec_size.height,n.presentWidth=f.present_size.width,n.presentHeight=f.present_size.height,n.profile=f.profile_string,n.level=f.level_string,n.bitDepth=f.bit_depth,n.chromaFormat=f.chroma_format,n.sarRatio=f.sar_ratio,n.frameRate=f.frame_rate,!1!==f.frame_rate.fixed&&0!==f.frame_rate.fps_num&&0!==f.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate);var p=n.frameRate.fps_den,m=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(p/m);for(var g=c.subarray(1,4),_="avc1.",y=0;y<3;y++){var v=g[y].toString(16);_+=v=v.length<2?"0"+v:v}n.codec=_;p=this._mediaInfo;p.width=n.codecWidth,p.height=n.codecHeight,p.fps=n.frameRate.fps,p.profile=n.profile,p.level=n.level,p.refFrames=f.ref_frames,p.chromaFormat=f.chroma_format_string,p.sarNum=n.sarRatio.width,p.sarDen=n.sarRatio.height,p.videoCodec=_,p.hasAudio?null!=p.audioCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.videoCodec+'"',p.isComplete()&&this._onMediaInfo(p)}}}var A=s.getUint8(u);if(0!==A){for(1<A&&I.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+A),u++,h=0;h<A;h++)d=s.getUint16(u,!a),u+=2,0!==d&&(u+=d);n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(e,t,i),0),I.a.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(E.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(E.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(E.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(E.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},d.prototype._parseHEVCDecoderConfigurationRecord=function(e,t,i){if(i<22)I.a.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,r=this._videoTrack,a=this._littleEndian,s=new DataView(e,t,i);if(n){if(void 0!==n.hvcc){var o=new Uint8Array(e,t,i);if(b(o,n.hvcc))return;I.a.w(this.TAG,"HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=r.id,n.timescale=this._timescale,n.duration=this._duration;o=s.getUint8(0),r=31&s.getUint8(1);if(1===o&&0!=r)if(this._naluLengthSize=1+(3&s.getUint8(21)),3===this._naluLengthSize||4===this._naluLengthSize){for(var l=s.getUint8(22),u=0,h=23;u<l;u++){var d=63&s.getUint8(h+0),c=s.getUint16(h+1,!a);h+=3;for(var f=0;f<c;f++){var p,m,g,_=s.getUint16(h+0,!a);0===f&&33==d?(h+=2,p=new Uint8Array(e,t+h,_),p=v.parseSPS(p),n.codecWidth=p.codec_size.width,n.codecHeight=p.codec_size.height,n.presentWidth=p.present_size.width,n.presentHeight=p.present_size.height,n.profile=p.profile_string,n.level=p.level_string,n.bitDepth=p.bit_depth,n.chromaFormat=p.chroma_format,n.sarRatio=p.sar_ratio,n.frameRate=p.frame_rate,!1!==p.frame_rate.fixed&&0!==p.frame_rate.fps_num&&0!==p.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate),g=n.frameRate.fps_den,m=n.frameRate.fps_num,n.refSampleDuration=n.timescale*(g/m),n.codec=p.codec_mimetype,(g=this._mediaInfo).width=n.codecWidth,g.height=n.codecHeight,g.fps=n.frameRate.fps,g.profile=n.profile,g.level=n.level,g.refFrames=p.ref_frames,g.chromaFormat=p.chroma_format_string,g.sarNum=n.sarRatio.width,g.sarDen=n.sarRatio.height,g.videoCodec=p.codec_mimetype,g.hasAudio?null!=g.audioCodec&&(g.mimeType='video/x-flv; codecs="'+g.videoCodec+","+g.audioCodec+'"'):g.mimeType='video/x-flv; codecs="'+g.videoCodec+'"',g.isComplete()&&this._onMediaInfo(g),h+=_):h+=2+_}}n.hvcc=new Uint8Array(i),n.hvcc.set(new Uint8Array(e,t,i),0),I.a.v(this.TAG,"Parsed HEVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(E.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(E.a.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord")}},d.prototype._parseAVCVideoData=function(e,t,i,n,r,a,s){for(var o=this._littleEndian,l=new DataView(e,t,i),u=[],h=0,d=0,c=this._naluLengthSize,f=this._timestampBase+n,p=1===a;d<i;){if(i<=d+4){I.a.w(this.TAG,"Malformed Nalu near timestamp "+f+", offset = "+d+", dataSize = "+i);break}var m=l.getUint32(d,!o);if(3===c&&(m>>>=8),i-c<m)return void I.a.w(this.TAG,"Malformed Nalus near timestamp "+f+", NaluSize > DataSize!");var g=31&l.getUint8(d+c),_=(5==g&&(p=!0),new Uint8Array(e,t+d,c+m));u.push({type:g,data:_}),h+=_.byteLength,d+=c+m}u.length&&(n=this._videoTrack,a={units:u,length:h,isKeyframe:p,dts:f,cts:s,pts:f+s},p&&(a.fileposition=r),n.samples.push(a),n.length+=h)},d.prototype._parseHEVCVideoData=function(e,t,i,n,r,a,s){for(var o=this._littleEndian,l=new DataView(e,t,i),u=[],h=0,d=0,c=this._naluLengthSize,f=this._timestampBase+n,p=1===a;d<i;){if(i<=d+4){I.a.w(this.TAG,"Malformed Nalu near timestamp "+f+", offset = "+d+", dataSize = "+i);break}var m=l.getUint32(d,!o);if(3===c&&(m>>>=8),i-c<m)return void I.a.w(this.TAG,"Malformed Nalus near timestamp "+f+", NaluSize > DataSize!");var g=31&l.getUint8(d+c),_=(19!=g&&20!=g||(p=!0),new Uint8Array(e,t+d,c+m));u.push({type:g,data:_}),h+=_.byteLength,d+=c+m}u.length&&(n=this._videoTrack,a={units:u,length:h,isKeyframe:p,dts:f,cts:s,pts:f+s},p&&(a.fileposition=r),n.samples.push(a),n.length+=h)};var w,H=d,t=(Y.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},Y);function Y(){}function d(e,t){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 n.a,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=(t=new ArrayBuffer(2),new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0])}(u=w=w||{})[u.kMPEG1Audio=3]="kMPEG1Audio",u[u.kMPEG2Audio=4]="kMPEG2Audio",u[u.kPESPrivateData=6]="kPESPrivateData",u[u.kADTSAAC=15]="kADTSAAC",u[u.kLOASAAC=17]="kLOASAAC",u[u.kAC3=129]="kAC3",u[u.kID3=21]="kID3",u[u.kSCTE35=134]="kSCTE35",u[u.kH264=27]="kH264",u[u.kH265=36]="kH265";function z(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.scte_35_pids={},this.smpte2038_pids={}}function W(){}function Q(){}
191function K(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0}var c;(u=c=c||{})[u.kUnspecified=0]="kUnspecified",u[u.kSliceNonIDR=1]="kSliceNonIDR",u[u.kSliceDPA=2]="kSliceDPA",u[u.kSliceDPB=3]="kSliceDPB",u[u.kSliceDPC=4]="kSliceDPC",u[u.kSliceIDR=5]="kSliceIDR",u[u.kSliceSEI=6]="kSliceSEI",u[u.kSliceSPS=7]="kSliceSPS",u[u.kSlicePPS=8]="kSlicePPS",u[u.kSliceAUD=9]="kSliceAUD",u[u.kEndOfSequence=10]="kEndOfSequence",u[u.kEndOfStream=11]="kEndOfStream",u[u.kFiller=12]="kFiller",u[u.kSPSExt=13]="kSPSExt",u[u.kReserved0=14]="kReserved0";function J(){}function q(e){var t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}a.prototype.findNextStartCodeOffset=function(e){for(var t=e,i=this.data_;;){if(t+3>=i.byteLength)return this.eof_flag_=!0,i.byteLength;var n=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],r=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1==n||1==r)return t;t++}},a.prototype.readNextNaluPayload=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var i=this.current_startcode_offset_,n=31&e[i+=1==(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3],r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.current_startcode_offset_=a,n>=c.kReserved0||0!=r||(r=e.subarray(i,a),(t=new J).type=n,t.data=r)}return t};var X=a,Z=($.prototype.getData=function(){return this.data},$);function $(e,t,i){var n=8+e.byteLength+1+2+t.byteLength,r=!1,n=(66!==e[3]&&77!==e[3]&&88!==e[3]&&(r=!0,n+=4),this.data=new Uint8Array(n)),a=(n[0]=1,n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=255,n[5]=225,e.byteLength),s=(n[6]=a>>>8,n[7]=255&a,8),e=(n.set(e,8),n[s+=a]=1,t.byteLength);n[s+1]=e>>>8,n[s+2]=255&e,n.set(t,s+3),s+=3+e,r&&(n[s]=252|i.chroma_format_idc,n[s+1]=248|i.bit_depth_luma-8,n[s+2]=248|i.bit_depth_chroma-8,n[s+3]=0)}function a(e){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=e,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&I.a.e(this.TAG,"Could not find H264 startcode until payload end!")}function ee(){}function te(e){var t=null,i=e.audio_object_type,n=e.audio_object_type,r=e.sampling_freq_index,e=e.channel_config,a=0,s=navigator.userAgent.toLowerCase();-1!==s.indexOf("firefox")?a=6<=r?(n=5,t=new Array(4),r-3):(n=2,t=new Array(2),r):-1!==s.indexOf("android")?(n=2,t=new Array(2),a=r):(n=5,a=r,t=new Array(4),6<=r?a=r-3:1===e&&(n=2,t=new Array(2),a=r)),t[0]=n<<3,t[0]|=(15&r)>>>1,t[1]=(15&r)<<7,t[1]|=(15&e)<<3,5===n&&(t[1]|=(15&a)>>>1,t[2]=(1&a)<<7,t[2]|=8,t[3]=0),this.config=t,this.sampling_rate=T[r],this.channel_count=e,this.codec_mimetype="mp4a.40."+n,this.original_codec_mimetype="mp4a.40."+i}function re(){}function ae(){}var S,se,oe,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],le=(function(e,t){return(Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)}(oe=de,u=se=ee),oe.prototype=null===u?Object.create(u):(ce.prototype=u.prototype,new ce),de),ue=(l.prototype.findNextSyncwordOffset=function(e){for(var t=e,i=this.data_;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(4095==(i[t+0]<<8|i[t+1])>>>4)return t;t++}},l.prototype.readNextAACFrame=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var i=this.current_syncword_offset_,n=(8&e[i+1])>>>3,r=(6&e[i+1])>>>1,a=1&e[i+1],s=(192&e[i+2])>>>6,o=(60&e[i+2])>>>2,l=(1&e[i+2])<<2|(192&e[i+3])>>>6,u=(3&e[i+3])<<11|e[i+4]<<3|(224&e[i+5])>>>5;if(e[i+6],i+u>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var a=1==a?7:9,u=u-a,a=(i+=a,this.findNextSyncwordOffset(i+u));this.current_syncword_offset_=a,0!=n&&1!=n||0!=r||(a=e.subarray(i,i+u),(t=new ee).audio_object_type=1+s,t.sampling_freq_index=o,t.sampling_frequency=T[o],t.channel_config=l,t.data=a)}return t},l.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},l.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},l),he=(o.prototype.findNextSyncwordOffset=function(e){for(var t=e,i=this.data_;;){if(t+1>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(695==(i[t+0]<<3|i[t+1]>>>5))return t;t++}},o.prototype.getLATMValue=function(e){for(var t=e.readBits(2),i=0,n=0;n<=t;n++)i=(i<<=8)|e.readByte();return i},o.prototype.readNextAACFrame=function(e){for(var t=this.data_,i=null;null==i&&!this.eof_flag_;){var n=this.current_syncword_offset_,r=(31&t[n+1])<<8|t[n+2];if(n+3+r>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var a=new ie(t.subarray(n+3,n+3+r)),s=null;if(a.readBool()){if(null==e){I.a.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+r),a.destroy();continue}s=e}else{var o=a.readBool();if(o&&a.readBool()){I.a.e(this.TAG,"audioMuxVersionA is Not Supported"),a.destroy();break}if(o&&this.getLATMValue(a),!a.readBool()){I.a.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),a.destroy();break}if(0!==a.readBits(6)){I.a.e(this.TAG,"more than 2 numSubFrames Not Supported"),a.destroy();break}if(0!==a.readBits(4)){I.a.e(this.TAG,"more than 2 numProgram Not Supported"),a.destroy();break}if(0!==a.readBits(3)){I.a.e(this.TAG,"more than 2 numLayer Not Supported"),a.destroy();break}var l=o?this.getLATMValue(a):0,u=a.readBits(5),h=(l-=5,a.readBits(4)),d=(l-=4,a.readBits(4)),l=(l-=4,a.readBits(3),0<(l-=3)&&a.readBits(l),a.readBits(3));if(0!==l){I.a.e(this.TAG,"frameLengthType = "+l+". Only frameLengthType = 0 Supp
191orted"),a.destroy();break}a.readByte();l=a.readBool();if(l)if(o)this.getLATMValue(a);else for(;;){0;var c=a.readBool();if(a.readByte(),!c)break}a.readBool()&&a.readByte(),(s=new le).audio_object_type=u,s.sampling_freq_index=h,s.sampling_frequency=T[s.sampling_freq_index],s.channel_config=d,s.other_data_present=l}for(var f=0;;){var p=a.readByte();if(f+=p,255!==p)break}for(var m=new Uint8Array(f),g=0;g<f;g++)m[g]=a.readByte();(i=new le).audio_object_type=s.audio_object_type,i.sampling_freq_index=s.sampling_freq_index,i.sampling_frequency=T[s.sampling_freq_index],i.channel_config=s.channel_config,i.other_data_present=s.other_data_present,i.data=m,this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+r)}return i},o.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},o.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},o);function o(e){this.TAG="AACLOASParser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&I.a.e(this.TAG,"Could not found LOAS syncword until payload end")}function l(e){this.TAG="AACADTSParser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&I.a.e(this.TAG,"Could not found ADTS syncword until payload end")}function de(){return null!==se&&se.apply(this,arguments)||this}function ce(){this.constructor=oe}(u=S=S||{})[u.kSpliceNull=0]="kSpliceNull",u[u.kSpliceSchedule=4]="kSpliceSchedule",u[u.kSpliceInsert=5]="kSpliceInsert",u[u.kTimeSignal=6]="kTimeSignal",u[u.kBandwidthReservation=7]="kBandwidthReservation",u[u.kPrivateCommand=255]="kPrivateCommand";function fe(e){var t=new ie(e),i=t.readBits(8),n=t.readBool(),r=t.readBool(),a=(t.readBits(2),t.readBits(12)),s=t.readBits(8),o=t.readBool(),l=t.readBits(6),u=4*t.readBits(31)+t.readBits(2),h=t.readBits(8),d=t.readBits(12),c=t.readBits(12),f=t.readBits(8),p=null;f===S.kSpliceNull?p={}:f===S.kSpliceSchedule?p=function(e){for(var t=e.readBits(8),i=[],n=0;n<t;n++)i.push(function(e){var t=e.readBits(32),i=e.readBool(),n=(e.readBits(7),{splice_event_id:t,splice_event_cancel_indicator:i});if(!i){if(n.out_of_network_indicator=e.readBool(),n.program_splice_flag=e.readBool(),n.duration_flag=e.readBool(),e.readBits(5),n.program_splice_flag)n.utc_splice_time=e.readBits(32);else{n.component_count=e.readBits(8),n.components=[];for(var r=0;r<n.component_count;r++)n.components.push(be(e))}n.duration_flag&&(n.break_duration=Ee(e)),n.unique_program_id=e.readBits(16),n.avail_num=e.readBits(8),n.avails_expected=e.readBits(8)}return n}(e));return{splice_count:t,events:i}}(t):f===S.kSpliceInsert?p=function(e){var t,i,n,r=e.readBits(32),a=e.readBool(),s=(e.readBits(7),{splice_event_id:r,splice_event_cancel_indicator:a});if(!a){if(s.out_of_network_indicator=e.readBool(),s.program_splice_flag=e.readBool(),s.duration_flag=e.readBool(),s.splice_immediate_flag=e.readBool(),e.readBits(4),s.program_splice_flag&&!s.splice_immediate_flag&&(s.splice_time=Ae(e)),!s.program_splice_flag){s.component_count=e.readBits(8),s.components=[];for(var o=0;o<s.component_count;o++)s.components.push((t=s.splice_immediate_flag,n=void 0,n=(i=e).readBits(8),t?{component_tag:n}:{component_tag:n,splice_time:Ae(i)}))}s.duration_flag&&(s.break_duration=Ee(e)),s.unique_program_id=e.readBits(16),s.avail_num=e.readBits(8),s.avails_expected=e.readBits(8)}return s}(t):f===S.kTimeSignal?p={splice_time:Ae(t)}:f===S.kBandwidthReservation?p={}:f===S.kPrivateCommand?p=function(e,t){for(var i=String.fromCharCode(t.readBits(8),t.readBits(8),t.readBits(8),t.readBits(8)),n=new Uint8Array(e-4),r=0;r<e-4;r++)n[r]=t.readBits(8);return{identifier:i,private_data:n.buffer}}(c,t):t.readBits(8*c);for(var m,g=[],_=t.readBits(16),y=0;y<_;){var v=t.readBits(8),A=t.readBits(8),E=String.fromCharCode(t.readBits(8),t.readBits(8),t.readBits(8),t.readBits(8));0===v?g.push({descriptor_tag:v,descriptor_length:A,identifier:E,provider_avail_id:t.readBits(32)}):1===v?g.push(function(e,t,i,n){var r=n.readBits(8),a=n.readBits(3);n.readBits(5);for(var s="",o=0;o<a;o++)s+=String.fromCharCode(n.readBits(8));return{descriptor_tag:e,descriptor_length:t,identifier:i,preroll:r,dtmf_count:a,DTMF_char:s}}(v,A,E,t)):2===v?g.push(function(e,t,i,n){var r=n.readBits(32),a=n.readBool(),s=(n.readBits(7),{descriptor_tag:e,descriptor_length:t,identifier:i,segmentation_event_id:r,segmentation_event_cancel_indicator:a});if(!a){if(s.program_segmentation_flag=n.readBool(),s.segmentation_duration_flag=n.readBool(),s.delivery_not_restricted_flag=n.readBool(),s.delivery_not_restricted_flag?n.readBits(5):(s.web_delivery_allowed_flag=n.readBool(),s.no_regional_blackout_flag=n.readBool(),s.archive_allowed_flag=n.readBool(),s.device_restrictions=n.readBits(2)),!s.program_segmentation_flag){s.component_count=n.readBits(8),s.components=[];for(var o=0;o<s.component_count;o++)s.components.push(we(n))}s.segmentation_duration_flag&&(s.segmentation_duration=n.readBits(40)),s.segmentation_upid_type=n.readBits(8),s.segmentation_upid_length=n.readBits(8);for(var l=new Uint8Array(s.segmentation_upid_length),o=0;o<s.segmentation_upid_length;o++)l[o]=n.readBits(8);s.segmentation_upid=l.buffer,s.segmentation_type_id=n.readBits(8),s.segment_num=n.readBits(8),s.segments_expected=n.readBits(8),52!==s.segmentation_type_id&&54!==s.segmentation_type_id&&56!==s.segmentation_type_id&&58!==s.segmentation_type_id||(s.sub_segment_num=n.readBits(8),s.sub_segments_expected=n.readBits(8))}return s}(v,A,E,t)):3===v?g.push({descriptor_tag:v,descriptor_length:A,identifier:E,TAI_seconds:(m=t).readBits(48),TAI_ns:m.readBits(32),UTC_offset:m.readBits(16)}):4===v?g.push(function(e,t,i,n){for(var r=n.readBits(4),a=[],s=0;s<r;s++)a.push(Se(n));return{descriptor_tag:e,descriptor_length:t,identifier:i,audio_count:r,components:a}}(v,A,E,t)):t.readBits(8*(A-4)),y+=2+A}var b,w,i={table_id:i,section_syntax_indicator:n,private_indicator:r,section_length:a,protocol_version:s,encrypted_packet:o,encryption_algorithm:l,pts_adjustment:u,cw_index:h,tier:d,splice_command_length:c,splice_command_type:f,splice_command:p,descriptor_loop_length:_,splice_descriptors:g,E_CRC32:o?t.readBits(32):void 0,CRC32:t.readBits(32)};return f===S.kSpliceInsert?(n=p).splice_event_cancel_indicator?{splice_command_type:f,detail
191:i,data:e}:n.program_splice_flag&&!n.splice_immediate_flag?(b=n.duration_flag?n.break_duration.auto_return:void 0,w=n.duration_flag?n.break_duration.duration/90:void 0,n.splice_time.time_specified_flag?{splice_command_type:f,pts:(u+n.splice_time.pts_time)%Math.pow(2,33),auto_return:b,duraiton:w,detail:i,data:e}:{splice_command_type:f,auto_return:b,duraiton:w,detail:i,data:e}):{splice_command_type:f,auto_return:b=n.duration_flag?n.break_duration.auto_return:void 0,duraiton:w=n.duration_flag?n.break_duration.duration/90:void 0,detail:i,data:e}:f===S.kTimeSignal&&(r=p).splice_time.time_specified_flag?{splice_command_type:f,pts:(u+r.splice_time.pts_time)%Math.pow(2,33),detail:i,data:e}:{splice_command_type:f,detail:i,data:e}}function pe(){}function me(e){var t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}function ge(){}function _e(){}function ye(){}function ve(e){var t=[e.sampling_rate_code<<6|e.bit_stream_identification<<1|e.bit_stream_mode>>2,(3&e.bit_stream_mode)<<6|e.channel_mode<<3|e.low_frequency_effects_channel_on<<2|e.frame_size_code>>4,e.frame_size_code<<4&224];this.config=t,this.sampling_rate=e.sampling_frequency,this.bit_stream_identification=e.bit_stream_identification,this.bit_stream_mode=e.bit_stream_mode,this.low_frequency_effects_channel_on=e.low_frequency_effects_channel_on,this.channel_count=e.channel_count,this.channel_mode=e.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"}var f,Ae=function(e){var t=e.readBool();return t?(e.readBits(6),{time_specified_flag:t,pts_time:4*e.readBits(31)+e.readBits(2)}):(e.readBits(7),{time_specified_flag:t})},Ee=function(e){var t=e.readBool();return e.readBits(6),{auto_return:t,duration:4*e.readBits(31)+e.readBits(2)}},be=function(e){return{component_tag:e.readBits(8),utc_splice_time:e.readBits(32)}},we=function(e){var t=e.readBits(8);return e.readBits(7),{component_tag:t,pts_offset:4*e.readBits(31)+e.readBits(2)}},Se=function(e){return{component_tag:e.readBits(8),ISO_code:String.fromCharCode(e.readBits(8),e.readBits(8),e.readBits(8)),Bit_Stream_Mode:e.readBits(3),Num_Channels:e.readBits(4),Full_Srvc_Audio:e.readBool()}},Te=((u=f=f||{})[u.kSliceIDR_W_RADL=19]="kSliceIDR_W_RADL",u[u.kSliceIDR_N_LP=20]="kSliceIDR_N_LP",u[u.kSliceCRA_NUT=21]="kSliceCRA_NUT",u[u.kSliceVPS=32]="kSliceVPS",u[u.kSliceSPS=33]="kSliceSPS",u[u.kSlicePPS=34]="kSlicePPS",u[u.kSliceAUD=35]="kSliceAUD",De.prototype.findNextStartCodeOffset=function(e){for(var t=e,i=this.data_;;){if(t+3>=i.byteLength)return this.eof_flag_=!0,i.byteLength;var n=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],r=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1==n||1==r)return t;t++}},De.prototype.readNextNaluPayload=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var i=this.current_startcode_offset_,n=e[i+=1==(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3]>>1&63,r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.current_startcode_offset_=a,0==r&&(r=e.subarray(i,a),(t=new pe).type=n,t.data=r)}return t},De),Le=(xe.prototype.getData=function(){return this.data},xe),ke=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],Ce=(g.prototype.findNextSyncwordOffset=function(e){for(var t=e,i=this.data_;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(2935==(i[t+0]<<8|i[t+1]<<0))return t;t++}},g.prototype.readNextAC3Frame=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var i=this.current_syncword_offset_,n=e[i+4]>>6,r=[48e3,44200,33e3][n],a=63&e[i+4],n=2*ke[n][a];if(i+n>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var s=this.findNextSyncwordOffset(i+n),s=(this.current_syncword_offset_=s,e[i+5]>>3),o=7&e[i+5],l=e[i+6]>>5,u=0,u=(0!=(1&l)&&1!=l&&(u+=2),0!=(4&l)&&(u+=2),2==l&&(u+=2),(e[i+6]<<8|e[i+7]<<0)>>12-u&1),h=[2,1,2,3,3,4,4,5][l]+u;
191(t=new ye).sampling_frequency=r,t.channel_count=h,t.channel_mode=l,t.bit_stream_identification=s,t.low_frequency_effects_channel_on=u,t.bit_stream_mode=o,t.frame_size_code=a,t.data=e.subarray(i,i+n)}return t},g.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},g.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},g);Ie=function(e,t){return(Ie=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Re,Ie,p=function(){return(p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},Pe=(function(e,t){function i(){this.constructor=e}Ie(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(m,Re=t),m.prototype.destroy=function(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,Re.prototype.destroy.call(this)},m.probe=function(e){var t=new Uint8Array(e),i=-1,n=188;if(t.byteLength<=3*n)return{needMoreData:!0};for(;-1===i;){for(var r=Math.min(1e3,t.byteLength-3*n),a=0;a<r;){if(71===t[a]&&71===t[a+n]&&71===t[a+2*n]){i=a;break}a++}if(-1===i)if(188===n)n=192;else{if(192!==n)break;n=204}}return-1===i?{match:!1}:(192===n&&4<=i?(I.a.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),i-=4):204===n&&I.a.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:n,sync_offset:i})},m.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},m.prototype.resetMediaInfo=function(){this.media_info_=new n.a},m.prototype.parseChunks=function(e,t){if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new _.a("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0;for(this.first_parse_&&(this.first_parse_=!1,i=this.sync_offset_);i+this.ts_packet_size_<=e.byteLength;){var n=t+i,r=(192===this.ts_packet_size_&&(i+=4),new Uint8Array(e,i,188)),a=r[0];if(71!==a){I.a.e(this.TAG,"sync_byte = "+a+", not 0x47");break}var s,a=(64&r[1])>>>6,o=(r[1],(31&r[1])<<8|r[2]),l=(48&r[3])>>>4,u=15&r[3],h={},d=4;if(2==l||3==l){var r=r[4];if(5+r===188){i+=188,204===this.ts_packet_size_&&(i+=16);continue}0<r&&(h=this.parseAdaptationField(e,i+4,1+r)),d=5+r}1!=l&&3!=l||(0==o||o===this.current_pmt_pid_||null!=this.pmt_&&this.pmt_.pid_stream_type[o]===w.kSCTE35?this.handleSectionSlice(e,i+d,s=188-d,{pid:o,file_position:n,payload_unit_start_indicator:a,continuity_conunter:u,random_access_indicator:h.random_access_indicator}):null!=this.pmt_&&null!=this.pmt_.pid_stream_type[o]&&(s=188-d,r=this.pmt_.pid_stream_type[o],o!==this.pmt_.common_pids.h264&&o!==this.pmt_.common_pids.h265&&o!==this.pmt_.common_pids.adts_aac&&o!==this.pmt_.common_pids.loas_aac&&o!==this.pmt_.common_pids.ac3&&o!==this.pmt_.common_pids.opus&&o!==this.pmt_.common_pids.mp3&&!0!==this.pmt_.pes_private_data_pids[o]&&!0!==this.pmt_.timed_id3_pids[o]||this.handlePESSlice(e,i+d,s,{pid:o,stream_type:r,file_position:n,payload_unit_start_indicator:a,continuity_conunter:u,random_access_indicator:h.random_access_indicator}))),i+=188,204===this.ts_packet_size_&&(i+=16)}return this.dispatchAudioVideoMediaSegment(),i},m.prototype.parseAdaptationField=function(e,t,i){e=new Uint8Array(e,t,i),t=e[0];return 0<t?183<t?(I.a.w(this.TAG,"Illegal adaptation_field_length: "+t),{}):{discontinuity_indicator:(128&e[1])>>>7,random_access_indicator:(64&e[1])>>>6,elementary_stream_priority_indicator:(32&e[1])>>>5}:{}},m.prototype.handleSectionSlice=function(e,t,i,n){var r=new Uint8Array(e,t,i),a=this.section_slice_queues_[n.pid];if(n.payload_unit_start_indicator){var s,o=r[0];null!=a&&0!==a.total_length&&(s=new Uint8Array(e,t+1,Math.min(i,o)),a.slices.push(s),a.total_length+=s.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,n):this.clearSlices(a,n)
191);for(var l=1+o;l<r.byteLength&&255!==r[l+0];){var u=(15&r[l+1])<<8|r[l+2];this.section_slice_queues_[n.pid]=new K,(a=this.section_slice_queues_[n.pid]).expected_length=3+u,a.file_position=n.file_position,a.random_access_indicator=n.random_access_indicator,s=new Uint8Array(e,t+l,Math.min(i-l,a.expected_length-a.total_length)),a.slices.push(s),a.total_length+=s.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,n):a.total_length>=a.expected_length&&this.clearSlices(a,n),l+=s.byteLength}}else null!=a&&0!==a.total_length&&(s=new Uint8Array(e,t,Math.min(i,a.expected_length-a.total_length)),a.slices.push(s),a.total_length+=s.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,n):a.total_length>=a.expected_length&&this.clearSlices(a,n))},m.prototype.handlePESSlice=function(e,t,i,n){var e=new Uint8Array(e,t,i),t=e[0]<<16|e[1]<<8|e[2],i=(e[3],e[4]<<8|e[5]);if(n.payload_unit_start_indicator){if(1!=t)return void I.a.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value "+t);t=this.pes_slice_queues_[n.pid];t&&(0===t.expected_length||t.expected_length===t.total_length?this.emitPESSlices(t,n):this.clearSlices(t,n)),this.pes_slice_queues_[n.pid]=new K,this.pes_slice_queues_[n.pid].file_position=n.file_position,this.pes_slice_queues_[n.pid].random_access_indicator=n.random_access_indicator}null!=this.pes_slice_queues_[n.pid]&&((t=this.pes_slice_queues_[n.pid]).slices.push(e),n.payload_unit_start_indicator&&(t.expected_length=0==i?0:6+i),t.total_length+=e.byteLength,0<t.expected_length&&t.expected_length===t.total_length?this.emitPESSlices(t,n):0<t.expected_length&&t.expected_length<t.total_length&&this.clearSlices(t,n))},m.prototype.emitSectionSlices=function(e,t){for(var i=new Uint8Array(e.total_length),n=0,r=0;n<e.slices.length;n++){var a=e.slices[n];i.set(a,r),r+=a.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;var s=new Q;s.pid=t.pid,s.data=i,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parseSection(s)},m.prototype.emitPESSlices=function(e,t){for(var i=new Uint8Array(e.total_length),n=0,r=0;n<e.slices.length;n++){var a=e.slices[n];i.set(a,r),r+=a.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;var s=new W;s.pid=t.pid,s.data=i,s.stream_type=t.stream_type,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parsePES(s)},m.prototype.clearSlices=function(e,t){e.slices=[],e.expected_length=-1,e.total_length=0},m.prototype.parseSection=function(e){var t=e.data,e=e.pid;0===e?this.parsePAT(t):e===this.current_pmt_pid_?this.parsePMT(t):null!=this.pmt_&&this.pmt_.scte_35_pids[e]&&this.parseSCTE35(t)},m.prototype.parsePES=function(e){var t=e.data,i=t[0]<<16|t[1]<<8|t[2],n=t[3],r=t[4]<<8|t[5];if(1==i)if(188!==n&&190!==n&&191!==n&&240!==n&&241!==n&&255!==n&&242!==n&&248!==n){t[6];var a=(192&t[7])>>>6,s=t[8],o=void 0,l=void 0,a=(2!=a&&3!=a||(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,l=3==a?536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2:o),9+s),u=void 0;if(0!=r){if(r<3+s)return void I.a.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");u=r-3-s}else u=t.byteLength-a;var h=t.subarray(a,a+u);switch(e.stream_type){case w.kMPEG1Audio:case w.kMPEG2Audio:this.parseMP3Payload(h,o);break;case w.kPESPrivateData:this.pmt_.common_pids.opus===e.pid?this.parseOpusPayload(h,o):this.pmt_.common_pids.ac3===e.pid?this.parseAC3Payload(h,o):this.pmt_.smpte2038_pids[e.pid]?this.parseSMPTE2038MetadataPayload(h,o,l,e.pid,n):this.parsePESPrivateDataPayload(h,o,l,e.pid,n);break;case w.kADTSAAC:this.parseADTSAACPayload(h,o);break;case w.kLOASAAC:this.parseLOASAACPayload(h,o);break;case w.kAC3:this.parseAC3Payload(h,o);break;case w.kID3:this.parseTimedID3MetadataPayload(h,o,l,e.pid,n);break;case w.kH264:this.parseH264Payload(h,o,l,e.file_position,e.random_access_indicator);break;case w.kH265:this.parseH265Payload(h,o,l,e.file_position,e.random_access_indicator)}}else 188!==n&&191!==n&&240!==n&&241!==n&&255!==n&&242!==n&&248!==n||e.stream_type!==w.kPESPrivateData||(a=6,u=void 0,u=0!=r?r:t.byteLength-a,h=t.subarray(a,a+u),this.parsePESPrivateDataPayload(h,void 0,void 0,e.pid,n));else I.a.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value "+i)},m.prototype.parsePAT=function(e){var t=e[0];if(0===t){var i=(15&e[1])<<8|e[2],n=(e[3],e[4],(62&e[5])>>>1),r=1&e[5],a=e[6],s=(e[7],null);if(1==r&&0===a)(s=new V).version_number=n;else if(null==(s=this.pat_))return;for(var o=i-5-4,l=-1,u=-1,h=8;h<8+o;h+=4){var d=e[h]<<8|e[h+1],c=(31&e[h+2])<<8|e[h+3];0==d?s.network_pid=c:(s.program_pmt_pid[d]=c,-1===l&&(l=d),-1===u&&(u=c))}1==r&&0===a&&(null==this.pat_&&I.a.v(this.TAG,"Parsed first PAT: "+JSON.stringify(s)),this.pat_=s,this.current_program_=l,this.current_pmt_pid_=u)}else I.a.e(this.TAG,"parsePAT: table_id "+t+" is not corresponded to PAT!")},m.prototype.parsePMT=function(e){var t=e[0];if(2===t){var i=(15&e[1])<<8|e[2],n=e[3]<<8|e[4],r=(62&e[5])>>>1,a=1&e[5],s=e[6],o=(e[7],null);if(1==a&&0===s)(o=new z).program_number=n,o.version_number=r,this.program_pmt_map_[n]=o;else if(null==(o=this.program_pmt_map_[n]))return;e[8],e[9];for(var a=(15&e[10])<<8|e[11],l=12+a,u=i-9-a-4,h=l;h<l+u;){var d=e[h],c=(31&e[h+1])<<8|e[h+2],f=(15&e[h+3])<<8|e[h+4],p=(o.pid_stream_type[c]=d,o.common_pids.h264||o.common_pids.h265),m=o.common_pids.adts_aac||o.common_pids.loas_aac||o.common_pids.ac3||o.common_pids.opus||o.common_pids.mp3;if(d!==w.kH264||p)if(d!==w.kH265||p)if(d!==w.kADTSAAC||m)if(d!==w.kLOASAAC||m)if(d!==w.kAC3||m)if(d!==w.kMPEG1Audio&&d!==w.kMPEG2Audio||m)if(d===w.kPESPrivateData){if(o.pe
191s_private_data_pids[c]=!0,0<f){for(var g=h+5;g<h+5+f;){var _=e[g+0],y=e[g+1];if(5===_){var v=String.fromCharCode.apply(String,Array.from(e.subarray(g+2,g+2+y)));"VANC"===v?o.smpte2038_pids[c]=!0:"Opus"===v&&(o.common_pids.opus=c)}else if(127===_&&c===o.common_pids.opus){v=null;if(null==(v=128===e[g+2]?e[g+3]:v)){I.a.e(this.TAG,"Not Supported Opus channel count.");continue}var _={codec:"opus",channel_count:0==(15&v)?2:15&v,channel_config_code:v,sample_rate:48e3},A={codec:"opus",meta:_};0==this.audio_init_segment_dispatched_?(this.audio_metadata_=_,this.dispatchAudioInitSegment(A)):this.detectAudioMetadataChange(A)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(A))}g+=2+y}p=e.subarray(h+5,h+5+f);this.dispatchPESPrivateDataDescriptor(c,d,p)}}else d===w.kID3?o.timed_id3_pids[c]=!0:d===w.kSCTE35&&(o.scte_35_pids[c]=!0);else o.common_pids.mp3=c;else o.common_pids.ac3=c;else o.common_pids.loas_aac=c;else o.common_pids.adts_aac=c;else o.common_pids.h265=c;else o.common_pids.h264=c;h+=5+f}n===this.current_program_&&(null==this.pmt_&&I.a.v(this.TAG,"Parsed first PMT: "+JSON.stringify(o)),((this.pmt_=o).common_pids.h264||o.common_pids.h265)&&(this.has_video_=!0),o.common_pids.adts_aac||o.common_pids.loas_aac||o.common_pids.ac3||o.common_pids.opus||o.common_pids.mp3)&&(this.has_audio_=!0)}else I.a.e(this.TAG,"parsePMT: table_id "+t+" is not corresponded to PMT!")},m.prototype.parseSCTE35=function(e){var t,e=fe(e);null!=e.pts?(t=Math.floor(e.pts/this.timescale_),e.pts=t):e.nearest_pts=this.aac_last_sample_pts_,this.onSCTE35Metadata&&this.onSCTE35Metadata(e)},m.prototype.parseH264Payload=function(e,t,i,n,r){for(var a=new X(e),s=[],o=0,l=!1;null!=(u=a.readNextNaluPayload());){var u,h=new q(u);h.type===c.kSliceSPS?(u=N.parseSPS(u.data),this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(h,u)&&(I.a.v(this.TAG,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:h,pps:void 0,details:u}):(this.video_metadata_.sps=h,this.video_metadata_.details=u)):h.type===c.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_.pps=h,this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(h.type===c.kSliceIDR||h.type===c.kSliceNonIDR&&1===r)&&(l=!0),this.video_init_segment_dispatched_&&(s.push(h),o+=h.data.byteLength)}e=Math.floor(t/this.timescale_),t=Math.floor(i/this.timescale_);s.length&&((i=this.video_track_).samples.push({units:s,length:o,isKeyframe:l,dts:t,pts:e,cts:e-t,file_position:n}),i.length+=o)},m.prototype.parseH265Payload=function(e,t,i,n,r){for(var a,s=new Te(e),o=[],l=0,u=!1;null!=(a=s.readNextNaluPayload());){var h,d=new me(a);d.type===f.kSliceVPS?this.video_init_segment_dispatched_||(h=v.parseVPS(a.data),this.video_metadata_.vps=d,this.video_metadata_.details=p(p({},this.video_metadata_.details),h)):d.type===f.kSliceSPS?(h=v.parseSPS(a.data),this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(d,h)&&(I.a.v(this.TAG,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:d,pps:void 0,details:h}):(this.video_metadata_.sps=d,this.video_metadata_.details=p(p({},this.video_metadata_.details),h))):d.type===f.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(h=v.parsePPS(a.data),this.video_metadata_.pps=d,this.video_metadata_.details=p(p({},this.video_metadata_.details),h),this.video_metadata_.vps&&this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):d.type!==f.kSliceIDR_W_RADL&&d.type!==f.kSliceIDR_N_LP&&d.type!==f.kSliceCRA_NUT||(u=!0),this.video_init_segment_dispatched_&&(o.push(d),l+=d.data.byteLength)}e=Math.floor(t/this.timescale_),t=Math.floor(i/this.timescale_);o.length&&((i=this.video_track_).samples.push({units:o,length:l,isKeyframe:u,dts:t,pts:e,cts:e-t,file_position:n}),i.length+=l)},m.prototype.detectVideoMetadataChange=function(e,t){var i,n;return t.codec_mimetype!==this.video_metadata_.details.codec_mimetype?(I.a.v(this.TAG,"Video: Codec mimeType changed from "+this.video_metadata_.details.codec_mimetype+" to "+t.codec_mimetype),!0):t.codec_size.width!==this.video_metadata_.details.codec_size.width||t.codec_size.height!==this.video_metadata_.details.codec_size.height?(i=this.video_metadata_.details.codec_size,n=t.codec_size,I.a.v(this.TAG,"Video: Coded Resolution changed from "+i.width+"x"+i.height+" to "+n.width+"x"+n.height),!0):t.present_size.width!==this.video_metadata_.details.present_size.width&&(I.a.v(this.TAG,"Video: Present resolution width changed from "+this.video_metadata_.details.present_size.width+" to "+t.present_size.width),!0)},m.prototype.isInitSegmentDispatched=function(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_},m.prototype.dispatchVideoInitSegment=function(){var e,t,i=this.video_metadata_.details,n={type:"video"},r=(n.id=this.video_track_.id,n.timescale=1e3,n.duration=this.duration_,n.codecWidth=i.co
191dec_size.width,n.codecHeight=i.codec_size.height,n.presentWidth=i.present_size.width,n.presentHeight=i.present_size.height,n.profile=i.profile_string,n.level=i.level_string,n.bitDepth=i.bit_depth,n.chromaFormat=i.chroma_format,n.sarRatio=i.sar_ratio,n.frameRate=i.frame_rate,n.frameRate.fps_den),a=n.frameRate.fps_num,a=(n.refSampleDuration=r/a*1e3,n.codec=i.codec_mimetype,this.video_metadata_.vps?(r=this.video_metadata_.vps.data.subarray(4),e=this.video_metadata_.sps.data.subarray(4),t=this.video_metadata_.pps.data.subarray(4),a=new Le(r,e,t,i),n.hvcc=a.getData(),0==this.video_init_segment_dispatched_&&I.a.v(this.TAG,"Generated first HEVCDecoderConfigurationRecord for mimeType: "+n.codec)):(e=this.video_metadata_.sps.data.subarray(4),t=this.video_metadata_.pps.data.subarray(4),r=new Z(e,t,i),n.avcc=r.getData(),0==this.video_init_segment_dispatched_&&I.a.v(this.TAG,"Generated first AVCDecoderConfigurationRecord for mimeType: "+n.codec)),this.onTrackMetadata("video",n),this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1,this.media_info_);a.hasVideo=!0,a.width=n.codecWidth,a.height=n.codecHeight,a.fps=n.frameRate.fps,a.profile=n.profile,a.level=n.level,a.refFrames=i.ref_frames,a.chromaFormat=i.chroma_format_string,a.sarNum=n.sarRatio.width,a.sarDen=n.sarRatio.height,a.videoCodec=n.codec,a.hasAudio&&a.audioCodec?a.mimeType='video/mp2t; codecs="'+a.videoCodec+","+a.audioCodec+'"':a.mimeType='video/mp2t; codecs="'+a.videoCodec+'"',a.isComplete()&&this.onMediaInfo(a)},m.prototype.dispatchVideoMediaSegment=function(){this.isInitSegmentDispatched()&&this.video_track_.length&&this.onDataAvailable(null,this.video_track_)},m.prototype.dispatchAudioMediaSegment=function(){this.isInitSegmentDispatched()&&this.audio_track_.length&&this.onDataAvailable(this.audio_track_,null)},m.prototype.dispatchAudioVideoMediaSegment=function(){this.isInitSegmentDispatched()&&(this.audio_track_.length||this.video_track_.length)&&this.onDataAvailable(this.audio_track_,this.video_track_)},m.prototype.parseADTSAACPayload=function(e,t){if(!this.has_video_||this.video_init_segment_dispatched_){var i,n,r;if(this.aac_last_incomplete_data_&&((r=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength)).set(this.aac_last_incomplete_data_,0),r.set(e,this.aac_last_incomplete_data_.byteLength),e=r),null!=t&&(i=t/this.timescale_),"aac"===this.audio_metadata_.codec){if
191(null==t&&null!=this.aac_last_sample_pts_)n=1024/this.audio_metadata_.sampling_frequency*1e3,i=this.aac_last_sample_pts_+n;else if(null==t)return void I.a.w(this.TAG,"AAC: Unknown pts");this.aac_last_incomplete_data_&&this.aac_last_sample_pts_&&(n=1024/this.audio_metadata_.sampling_frequency*1e3,r=this.aac_last_sample_pts_+n,1<Math.abs(r-i))&&(I.a.w(this.TAG,"AAC: Detected pts overlapped, expected: "+r+"ms, PES pts: "+i+"ms"),i=r)}for(var a,s,o=new ue(e),l=i;null!=(s=o.readNextAACFrame());){n=1024/s.sampling_frequency*1e3;var u={codec:"aac",data:s},u=(0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:s.audio_object_type,sampling_freq_index:s.sampling_freq_index,sampling_frequency:s.sampling_frequency,channel_config:s.channel_config},this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u)),a=l,Math.floor(l)),u={unit:s.data,length:s.data.byteLength,pts:u,dts:u};this.audio_track_.samples.push(u),this.audio_track_.length+=s.data.byteLength,l+=n}o.hasIncompleteData()&&(this.aac_last_incomplete_data_=o.getIncompleteData()),a&&(this.aac_last_sample_pts_=a)}},m.prototype.parseLOASAACPayload=function(e,t){var i,n,r;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_&&((r=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength)).set(this.aac_last_incomplete_data_,0),r.set(e,this.aac_last_incomplete_data_.byteLength),e=r),null!=t&&(i=t/this.timescale_),"aac"===this.audio_metadata_.codec){if
191(null==t&&null!=this.aac_last_sample_pts_)n=1024/this.audio_metadata_.sampling_frequency*1e3,i=this.aac_last_sample_pts_+n;else if(null==t)return void I.a.w(this.TAG,"AAC: Unknown pts");this.aac_last_incomplete_data_&&this.aac_last_sample_pts_&&(n=1024/this.audio_metadata_.sampling_frequency*1e3,r=this.aac_last_sample_pts_+n,1<Math.abs(r-i))&&(I.a.w(this.TAG,"AAC: Detected pts overlapped, expected: "+r+"ms, PES pts: "+i+"ms"),i=r)}for(var a,s,o=new he(e),l=i;null!=(s=o.readNextAACFrame(null!=(s=this.loas_previous_frame)?s:void 0));){n=1024/(this.loas_previous_frame=s).sampling_frequency*1e3;var u={codec:"aac",data:s},u=(0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:s.audio_object_type,sampling_freq_index:s.sampling_freq_index,sampling_frequency:s.sampling_frequency,channel_config:s.channel_config},this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u)),a=l,Math.floor(l)),u={unit:s.data,length:s.data.byteLength,pts:u,dts:u};this.audio_track_.samples.push(u),this.audio_track_.length+=s.data.byteLength,l+=n}o.hasIncompleteData()&&(this.aac_last_incomplete_data_=o.getIncompleteData()),a&&(this.aac_last_sample_pts_=a)}},m.prototype.parseAC3Payload=function(e,t){if(!this.has_video_||this.video_init_segment_dispatched_){var i;if(null!=t&&(i=t/this.timescale_),"ac-3"===this.audio_metadata_.codec)if(null==t&&null!=this.aac_last_sample_pts_)o=1536/this.audio_metadata_.sampling_frequency*1e3,i=this.aac_last_sample_pts_+o;else if(null==t)return void I.a.w(this.TAG,"Opus: Unknown pts");for(var n,r,a=new Ce(e),s=i;null!=(r=a.readNextAC3Frame());){var o=1536/r.sampling_frequency*1e3,l={codec:"ac-3",data:r},l=(0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"ac-3",sampling_frequency:r.sampling_frequency,bit_stream_identification:r.bit_stream_identification,bit_stream_mode:r.bit_stream_mode,low_frequency_effects_channel_on:r.low_frequency_effects_channel_on,channel_mode:r.channel_mode},this.dispatchAudioInitSegment(l)):this.detectAudioMetadataChange(l)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(l)),n=s,Math.floor(s)),l={unit:r.data,length:r.data.byteLength,pts:l,dts:l};this.audio_track_.samples.push(l),this.audio_track_.length+=r.data.byteLength,s+=o}n&&(this.aac_last_sample_pts_=n)}},m.prototype.parseOpusPayload=function(e,t){if(!this.has_video_||this.video_init_segment_dispatched_){var i;if(null!=t&&(i=t/this.timescale_),"opus"===this.audio_metadata_.codec)if(null==t&&null!=this.aac_last_sample_pts_)i=this.aac_last_sample_pts_+(a=20);else if(null==t)return void I.a.w(this.TAG,"Opus: Unknown pts");for(var n=i,r=0;r<e.length;){for(var a=20,s=0!=(16&e[r+1]),o=0!=(8&e[r+1]),l=r+2,u=0;255===e[l];)u+=255,l+=1;u+=e[l];var l=(l+=1)+(s?2:0)+(o?2:0),h=n,s=Math.floor(n),o=e.slice(l,l+u),s={unit:o,length:o.byteLength,pts:s,dts:s};this.audio_track_.samples.push(s),this.audio_track_.length+=o.byteLength,n+=a,r=l+u}h&&(this.aac_last_sample_pts_=h)}},m.prototype.parseMP3Payload=function(e,t){if(!this.has_video_||this.video_init_segment_dispatched_){var i=e[1]>>>3&3,n=(6&e[1])>>1,r=(e[2],(12&e[2])>>>2),a=3!=(e[3]>>>6&3)?2:1,s=0,o=34;switch(i){case 0:s=[11025,12e3,8e3,0][r];break;case 2:s=[22050,24e3,16e3,0][r];break;case 3:s=[44100,48e3,32e3,0][r]}switch(n){case 1:o=34;break;case 2:o=33;break;case 3:o=32}i=new _e,n=(i.object_type=o,i.sample_rate=s,i.channel_count=a,i.data=e,{codec:"mp3",data:i}),i=(0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"mp3",object_type:o,sample_rate:s,channel_count:a},this.dispatchAudioInitSegment(n)):this.detectAudioMetadataChange(n)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(n)),{unit:e,length:e.byteLength,pts:t/this.timescale_,dts:t/this.timescale_});this.audio_track_.samples.push(i),this.audio_track_.length+=e.byteLength}},m.prototype.detectAudioMetadataChange=function(e){if(e.codec!==this.audio_metadata_.codec)return I.a.v(this.TAG,"Audio: Audio Codecs changed from "+this.audio_metadata_.codec+" to "+e.codec),!0;
191if("aac"===e.codec&&"aac"===this.audio_metadata_.codec){if((t=e.data).audio_object_type!==this.audio_metadata_.audio_object_type)return I.a.v(this.TAG,"AAC: AudioObjectType changed from "+this.audio_metadata_.audio_object_type+" to "+t.audio_object_type),!0;if(t.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return I.a.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+this.audio_metadata_.sampling_freq_index+" to "+t.sampling_freq_index),!0;if(t.channel_config!==this.audio_metadata_.channel_config)return I.a.v(this.TAG,"AAC: Channel configuration changed from "+this.audio_metadata_.channel_config+" to "+t.channel_config),!0}else if("ac-3"===e.codec&&"ac-3"===this.audio_metadata_.codec){var t;if((t=e.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return I.a.v(this.TAG,"AC3: Sampling Frequency changed from "+this.audio_metadata_.sampling_frequency+" to "+t.sampling_frequency),!0;if(t.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return I.a.v(this.TAG,"AC3: Bit Stream Identification changed from "+this.audio_metadata_.bit_stream_identification+" to "+t.bit_stream_identification),!0;if(t.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return I.a.v(this.TAG,"AC3: BitStream Mode changed from "+this.audio_metadata_.bit_stream_mode+" to "+t.bit_stream_mode),!0;if(t.channel_mode!==this.audio_metadata_.channel_mode)return I.a.v(this.TAG,"AC3: Channel Mode changed from "+this.audio_metadata_.channel_mode+" to "+t.channel_mode),!0;if(t.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return I.a.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+this.audio_metadata_.low_frequency_effects_channel_on+" to "+t.low_frequency_effects_channel_on),!0}else if("opus"===e.codec&&"opus"===this.audio_metadata_.codec){if
191((i=e.meta).sample_rate!==this.audio_metadata_.sample_rate)return I.a.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+this.audio_metadata_.sample_rate+" to "+i.sample_rate),!0;if(i.channel_count!==this.audio_metadata_.channel_count)return I.a.v(this.TAG,"Opus: Channel count changed from "+this.audio_metadata_.channel_count+" to "+i.channel_count),!0}else if("mp3"===e.codec&&"mp3"===this.audio_metadata_.codec){var i;if((i=e.data).object_type!==this.audio_metadata_.object_type)return I.a.v(this.TAG,"MP3: AudioObjectType changed from "+this.audio_metadata_.object_type+" to "+i.object_type),!0;if(i.sample_rate!==this.audio_metadata_.sample_rate)return I.a.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+this.audio_metadata_.sample_rate+" to "+i.sample_rate),!0;if(i.channel_count!==this.audio_metadata_.channel_count)return I.a.v(this.TAG,"MP3: Channel count changed from "+this.audio_metadata_.channel_count+" to "+i.channel_count),!0}return!1},m.prototype.dispatchAudioInitSegment=function(e){var t={type:"audio"},i=(t.id=this.audio_track_.id,t.timescale=1e3,t.duration=this.duration_,"aac"===this.audio_metadata_.codec?(i="aac"===e.codec?e.data:null,i=new te(i),t.audioSampleRate=i.sampling_rate,t.channelCount=i.channel_count,t.codec=i.codec_mimetype,t.originalCodec=i.original_codec_mimetype,t.config=i.config,t.refSampleDuration=1024/t.audioSampleRate*t.timescale):"ac-3"===this.audio_metadata_.codec?(i="ac-3"===e.codec?e.data:null,e=new ve(i),t.audioSampleRate=e.sampling_rate,t.channelCount=e.channel_count,t.codec=e.codec_mimetype,t.originalCodec=e.original_codec_mimetype,t.config=e.config,t.refSampleDuration=1536/t.audioSampleRate*t.timescale):"opus"===this.audio_metadata_.codec?(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.channelConfigCode=this.audio_metadata_.channel_config_code,t.codec="opus",t.originalCodec="opus",t.config=void 0,t.refSampleDuration=20):"mp3"===this.audio_metadata_.codec&&(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.codec="mp3",t.originalCodec="mp3",t.config=void 0),0==this.audio_init_segment_dispatched_&&I.a.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: "+t.codec),this.onTrackMetadata("audio",t),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1,this.media_info_);i.hasAudio=!0,i.audioCodec=t.originalCodec,i.audioSampleRate=t.audioSampleRate,i.audioChannelCount=t.channelCount,i.hasVideo&&i.videoCodec?i.mimeType='video/mp2t; codecs="'+i.videoCodec+","+i.audioCodec+'"':i.mimeType='video/mp2t; codecs="'+i.audioCodec+'"',i.isComplete()&&this.onMediaInfo(i)},m.prototype.dispatchPESPrivateDataDescriptor=function(e,t,i){var n=new ae;n.pid=e,n.stream_type=t,n.descriptor=i,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(n)},m.prototype.parsePESPrivateDataPayload=function(e,t,i,n,r){var a=new re;a.pid=n,a.stream_id=r,a.len=e.byteLength,a.data=e,null!=t?(n=Math.floor(t/this.timescale_),a.pts=n):a.nearest_pts=this.aac_last_sample_pts_,null!=i&&(r=Math.floor(i/this.timescale_),a.dts=r),this.onPESPrivateData&&this.onPESPrivateData(a)},m.prototype.parseTimedID3MetadataPayload=function(e,t,i,n,r){var a=new re;a.pid=n,a.stream_id=r,a.len=e.byteLength,a.data=e,null!=t&&(n=Math.floor(t/this.timescale_),a.pts=n),null!=i&&(r=Math.floor(i/this.timescale_),a.dts=r),this.onTimedID3Metadata&&this.onTimedID3Metadata(a)},m.prototype.parseSMPTE2038MetadataPayload=function(f,e,t,i,n){var r=new ge;r.pid=i,r.stream_id=n,r.len=f.byteLength,r.data=f,null!=e&&(i=Math.floor(e/this.timescale_),r.pts=i),r.nearest_pts=this.aac_last_sample_pts_,null!=t&&(n=Math.floor(t/this.timescale_),r.dts=n),r.ancillaries=function(){for(var e=new ie(f),t=0,i=[];t+=6,0===e.readBits(6);){var n=e.readBool(),r=(t+=1,e.readBits(11)),a=(t+=11,e.readBits(12)),s=(t+=12,255&e.readBits(10)),o=(t+=10,255&e.readBits(10)),l=(t+=10,255&e.readBits(10));t+=10;for(var u=new Uint8Array(l),h=0;h<l;h++){var d=255&e.readBits(10);t+=10,u[h]=d}e.readBits(10),t+=10;var c="User Defined";65==s?7==o&&(c="SCTE-104"):95==s?220==o?c="ARIB STD-B37 (1SEG)":221==o?c="ARIB STD-B37 (ANALOG)":222==o?c="ARIB STD-B37 (SD)":223==o&&(c="ARIB STD-B37 (HD)"):97==s&&(1==o?c="EIA-708":2==o&&(c="EIA-608")),i.push({yc_indicator:n,line_number:r,horizontal_offset:a,did:s,sdid:o,user_data:u,description:c,information:{}}),e.readBits(8-(t-Math.floor(t/8))%8),t+=(8-(t-Math.floor(t/8)))%8}return e.destroy(),e=null,i}(),this.onSMPTE2038Metadata&&this.onSMPTE2038Metadata(r)}
vendor: 12,733 bytes, line 191
191,m),u=(h.init=function(){for(var e in h.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],hvc1:[],hvcC:[],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":[],Opus:[],dOps:[],"ac-3":[],dac3:[]})h.types.hasOwnProperty(e)&&(h.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var t=h.constants={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSC=t.STCO=t.STTS,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.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]),t.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]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},h.box=function(e){for(var t=8,i=null,n=Array.prototype.slice.call(arguments,1),r=n.length,a=0;a<r;a++)t+=n[a].byteLength;(i=new Uint8Array(t))[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);for(var s=8,a=0;a<r;a++)i.set(n[a],s),s+=n[a].byteLength;return i},h.generateInitSegment=function(e){var t=h.box(h.types.ftyp,h.constants.FTYP),e=h.moov(e),i=new Uint8Array(t.byteLength+e.byteLength);return i.set(t,0),i.set(e,t.byteLength),i},h.moov=function(e){var t=h.mvhd(e.timescale,e.duration),i=h.trak(e),e=h.mvex(e);return h.box(h.types.moov,t,i,e)},h.mvhd=function(e,t){return h.box(h.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},h.trak=function(e){return h.box(h.types.trak,h.tkhd(e),h.mdia(e))},h.tkhd=function(e){var t=e.id,i=e.duration,n=e.presentWidth,e=e.presentHeight;return h.box(h.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,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,n>>>8&255,255&n,0,0,e>>>8&255,255&e,0,0]))},h.mdia=function(e){return h.box(h.types.mdia,h.mdhd(e),h.hdlr(e),h.minf(e))},h.mdhd=function(e){var t=e.timescale,e=e.duration;return h.box(h.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,85,196,0,0]))},h.hdlr=function(e){e="audio"===e.type?h.constants.HDLR_AUDIO:h.constants.HDLR_VIDEO;return h.box(h.types.hdlr,e)},h.minf=function(e){var t="audio"===e.type?h.box(h.types.smhd,h.constants.SMHD):h.box(h.types.vmhd,h.constants.VMHD);return h.box(h.types.minf,t,h.dinf(),h.stbl(e))},h.dinf=function(){return h.box(h.types.dinf,h.box(h.types.dref,h.constants.DREF))},h.stbl=function(e){return h.box(h.types.stbl,h.stsd(e),h.box(h.types.stts,h.constants.STTS),h.box(h.types.stsc,h.constants.STSC),h.box(h.types.stsz,h.constants.STSZ),h.box(h.types.stco,h.constants.STCO))},h.stsd=function(e){return"audio"===e.type?"mp3"===e.codec?h.box(h.types.stsd,h.constants.STSD_PREFIX,h.mp3(e)):"ac-3"===e.codec?h.box(h.types.stsd,h.constants.STSD_PREFIX,h.ac3(e)):"opus"===e.codec?h.box(h.types.stsd,h.constants.STSD_PREFIX,h.Opus(e)):h.box(h.types.stsd,h.constants.STSD_PREFIX,h.mp4a(e)):"video"===e.type&&e.codec.startsWith("hvc1")?h.box(h.types.stsd,h.constants.STSD_PREFIX,h.hvc1(e)):h.box(h.types.stsd,h.constants.STSD_PREFIX,h.avc1(e))},h.mp3=function(e){var t=e.channelCount,e=e.audioSampleRate,t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return h.box(h.types[".mp3"],t)},h.mp4a=function(e){var t=e.channelCount,i=e.audioSampleRate,t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return h.box(h.types.mp4a,t,h.esds(e))},h.ac3=function(e){var t=e.channelCount,i=e.audioSampleRate,t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return h.box(h.types["ac-3"],t,h.box(h.types.dac3,new Uint8Array(e.config)))},h.esds=function(e){var e=e.config||[],t=e.length,t=new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e).concat([6,1,2]));return h.box(h.types.esds,t)},h.Opus=function(e){var t=e.channelCount,i=e.audioSampleRate,t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return h.box(h.types.Opus,t,h.dOps(e))},h.dOps=function(e){var t=e.channelCount,i=e.channelConfigCode,n=e.audioSampleRate;if(!e.config){var r=[];switch(i){case 1:case 2:r=[0];break;case 0:r=[255,1,1,0,1];break;case 128:r=[255,2,0,0,1];break;case 3:r=[1,2,1,0,2,1];break;case 4:r=[1,2,2,0,1,2,3];break;case 5:r=[1,3,2,0,4,1,2,3];break;case 6:r=[1,4,2,0,4,1,2,3,5];break;case 7:r=[1,4,2,0,4,1,2,3,5,6];break;case 8:r=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:r=[1,1,2,0,1];break;case 131:r=[1,1,3,0,1,2];break;case 132:r=[1,1,4,0,1,2,3];break;case 133:r=[1,1,5,0,1,2,3,4];break;case 134:r=[1,1,6,0,1,2,3,4,5];break;case 135:r=[1,1,7,0,1,2,3,4,5,6];break;case 136:r=[1,1,8,0,1,2,3,4,5,6,7]}var a=new Uint8Array(function(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(var n=Array(e),r=0,t=0;t<i;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,r++)n[r]=a[s];return n}([0,t,0,0,n>>>24&255,n>>>17&255,n>>>8&255,n>>>0&255,0,0],r))}return h.box(h.types.dOps,a)},h.avc1=function(e){var t=e.avcc,i=e.codecWidth,e=e.codecHeight,i=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,i>>>8&255,255&i,e>>>8&255,255&e,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return h.box(h.types.avc1,i,h.box(h.types.avcC,t))},h.hvc1=function(e){var t=e.hvcc,i=e.codecWidth,e=e.codecHeight,i=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,i>>>8&255,255&i,e>>>8&255,255&e,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return h.box(h.types.hvc1,i,h.box(h.types.hvcC,t))},h.mvex=function(e){return h.box(h.types.mvex,h.trex(e))},h.trex=function(e){e=e.id,e=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.box(h.types.trex,e)},h.moof=function(e,t){return h.box(h.types.moof,h.mfhd(e.sequenceNumber),h.traf(e,t))},h.mfhd=function(e){e=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return h.box(h.types.mfhd,e)},h.traf=function(e,t){var i=e.id,i=h.box(h.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),t=h.box(h.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),n=h.sdtp(e),e=h.trun(e,n.byteLength+16+16+8+16+8+8);return h.box(h.types.traf,i,t,e,n)},h.sdtp=function(e){for(var t=e.samples||[],i=t.length,n=new Uint8Array(4+i),r=0;r<i;r++){var a=t[r].flags;n[r+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return h.box(h.types.sdtp,n)},h.trun=function(e,t){var i=e.samples||[],n=i.length,e=12+16*n,r=new Uint8Array(e);r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,(t+=8+e)>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(var a=0;a<n;a++){var s=i[a].duration,o=i[a].size,l=i[a].flags,u=i[a].cts;r.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.isNonSync,0,0,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*a)}return h.box(h.types.trun,r)},h.mdat=function(e){return h.box(h.types.mdat,e)},h);function h(){}function m(e,t){var i=Re.call(this)||this;return i.TAG="TSDemuxer",i.first_parse_=!0,i.media_info_=new n.a,i.timescale_=90,i.duration_=0,i.current_pmt_pid_=-1,i.program_pmt_map_={},i.pes_slice_queues_={},i.section_slice_queues_={},i.video_metadata_={vps:void 0,sps:void 0,pps:void 0,details:void 0},i.audio_metadata_={codec:void 0,audio_object_type:void 0,sampling_freq_index:void 0,sampling_frequency:void 0,channel_config:void 0},i.aac_last_sample_pts_=void 0,i.aac_last_incomplete_data_=null,i.has_video_=!1,i.has_audio_=!1,i.video_init_segment_dispatched_=!1,i.audio_init_segment_dispatched_=!1,i.video_metadata_changed_=!1,i.audio_metadata_changed_=!1,i.loas_previous_frame=null,i.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},i.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},i.ts_packet_size_=e.ts_packet_size,i.sync_offset_=e.sync_offset,i.config_=t,i}function g(e){this.TAG="AC3Parser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&I.a.e(this.TAG,"Could not found AC3 syncword until payload end")}function xe(e,t,i,n){var r=23+(5+e.byteLength)+(5+t.byteLength)+(5+i.byteLength),r=this.data=new Uint8Array(r);r[0]=1,r[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,r[2]=n.general_profile_compatibility_flags_1,r[3]=n.general_profile_compatibility_flags_2,r[4]=n.general_profile_compatibility_flags_3,r[5]=n.general_profile_compatibility_flags_4,r[6]=n.general_constraint_indicator_flags_1,r[7]=n.general_constraint_indicator_flags_2,r[8]=n.general_constraint_indicator_flags_3,r[9]=n.general_constraint_indicator_flags_4,r[10]=n.general_constraint_indicator_flags_5,r[11]=n.general_constraint_indicator_flags_6,r[12]=n.general_level_idc,r[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,r[14]=255&n.min_spatial_segmentation_idc,r[15]=252|3&n.parallelismType,r[16]=252|3&n.chroma_format_idc,r[17]=248|7&n.bit_depth_luma_minus8,r[18]=248|7&n.bit_depth_chroma_minus8,r[19]=0,r[20]=0,r[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,r[22]=3,r[23]=128|f.kSliceVPS,r[24]=0,r[25]=1,r[26]=(65280&e.byteLength)>>8,r[27]=(255&e.byteLength)>>0,r.set(e,28),r[23+(5+e.byteLength)+0]=128|f.kSliceSPS,r[23+(5+e.byteLength)+1]=0,r[23+(5+e.byteLength)+2]=1,r[23+(5+e.byteLength)+3]=(65280&t.byteLength)>>8,r[23+(5+e.byteLength)+4]=(255&t.byteLength)>>0,r.set(t,23+(5+e.byteLength)+5),r[23+(5+e.byteLength+5+t.byteLength)+0]=128|f.kSlicePPS,r[23+(5+e.byteLength+5+t.byteLength)+1]=0,r[23+(5+e.byteLength+5+t.byteLength)+2]=1,r[23+(5+e.byteLength+5+t.byteLength)+3]=(65280&i.byteLength)>>8,r[23+(5+e.byteLength+5+t.byteLength)+4]=(255&i.byteLength)>>0,r.set(i,23+(5+e.byteLength+5+t.byteLength)+5)}function De(e){this.TAG="H265AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=e,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&I.a.e(this.TAG,"Could not find H265 startcode until payload end!")}u.init();var x=u,Me=(Oe.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},Oe),M=e(7),Be=(C.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},C.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(C.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}
191,enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),C.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},C.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},C.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new _.a("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),t&&this._remuxVideo(t),e&&this._remuxAudio(e)},C.prototype._onTrackMetadataReceived=function(e,t){var i=null,n="mp4",r=t.codec;if("audio"===e)i="mp3"===(this._audioMeta=t).codec&&this._mp3UseMpegAudio?(n="mpeg",r="",new Uint8Array):x.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=x.generateInitSegment(t)}if(!this._onInitSegment)throw new _.a("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:r,container:e+"/"+n,mediaDuration:t.duration})},C.prototype._calculateDtsBase=function(e,t){this._dtsBaseInited||(e&&e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t&&t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},C.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},C.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0},e=(null!=e&&(i.samples.push(e),i.length=e.length),{type:"audio",id:2,sequenceNumber:0,samples:[],length:0});null!=t&&(e.samples.push(t),e.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(e,!0)},C.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var i=e.samples,n=void 0,r=-1,a=this._audioMeta.refSampleDuration,s="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,o=this._dtsBaseInited&&void 0===this._audioNextDts,l=!1;if(i&&0!==i.length&&(1!==i.length||t)){var u,h,d=0,c=null,f=0,f=s?(d=0,e.length):(d=8)+e.length,p=null,t=(1<i.length&&(f-=(p=i.pop()).length),null!=this._audioStashedLastSample&&(u=this._audioStashedLastSample,this._audioStashedLastSample=null,i.unshift(u),f+=u.length),null!=p&&(this._audioStashedLastSample=p),i[0].dts-this._dtsBase);this._audioNextDts?n=t-this._audioNextDts:this._audioSegmentInfoList.isEmpty()?(n=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(l=!0)):n=null!=(C=this._audioSegmentInfoList.getLastSampleBefore(t))?(R=t-(C.originalDts+C.duration),t-(C.dts+C.duration+(R=R<=3?0:R))):0,l&&(C=t-n,null!=(R=this._videoSegmentInfoList.getLastSegmentBefore(t))&&R.beginDts<C?(w=Me.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(h=R.beginDts,t=C-R.beginDts,I.a.v(this.TAG,"InsertPrefixSilentAudio: dts: "+h+", duration: "+t),i.unshift({unit:w,dts:h,pts:h}),f+=w.byteLength):l=!1);for(var m=[],g=0;g<i.length;g++){var _=(u=i[g]).unit,y=u.dts-this._dtsBase,v=!1,A=null,E=0;if(!((h=y)<-.001)){if("mp3"!==this._audioMeta.codec){var b=y;if((n=y-(b=this._audioNextDts?this._audioNextDts:b))<=-3*a){I.a.w(this.TAG,"Dropping 1 audio frame (originalDts: "+y+" ms ,curRefDts: "+b+" ms) due to dtsCorrection: "+n+" ms overlap.");continue}if(3*a<=n&&this._fillAudioTimestampGap&&!P.a.safari){var w,v=!0,S=Math.floor(n/a);I.a.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+y+" ms, curRefDts: "+b+" ms, dtsCorrection: "+Math.round(n)+" ms, generate: "+S+" frames"),h=Math.floor(b),E=Math.floor(b+a)-h,null==(w=Me.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(I.a.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),w=_);for(var A=[],T=0;T<S;T++){b+=a;var L=Math.floor(b),k=Math.floor(b+a)-L,L={dts:L,pts:L,cts:0,unit:w,size:w.byteLength,duration:k,originalDts:y,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};A.push(L),f+=L.size}}else h=Math.floor(b),E=Math.floor(b+a)-h;this._audioNextDts=b+a}else h=y-n,E=g!==i.length-1?i[g+1].dts-this._dtsBase-n-h:null!=p?p.dts-this._dtsBase-n-h:1<=m.length?m[m.length-1].duration:Math.floor(a),this._audioNextDts=h+E;-1===r&&(r=h),m.push({dts:h,pts:h,cts:0,unit:u.unit,size:u.unit.byteLength,duration:E,originalDts:y,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),v&&m.push.apply(m,A)}}if(0===m.length)e.samples=[],e.length=0;else{for(s?c=new Uint8Array(f):((c=new Uint8Array(f))[0]=f>>>24&255,c[1]=f>>>16&255,c[2]=f>>>8&255,c[3]=255&f,c.set(x.types.mdat,4)),g=0;g<m.length;g++)_=m[g].unit,c.set(_,d),d+=_.byteLength;var C=m[m.length-1],R=C.dts+C.duration,t=new M.b,l=(t.beginDts=r,t.endDts=R,t.beginPts=r,t.endPts=R,t.originalBeginDts=m[0].originalDts,t.originalEndDts=C.originalDts+C.duration,t.firstSample=ne
191w M.d(m[0].dts,m[0].pts,m[0].duration,m[0].originalDts,!1),t.lastSample=new M.d(C.dts,C.pts,C.duration,C.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(t),e.samples=m,e.sequenceNumber++,s?new Uint8Array:x.moof(e,r)),R=(e.samples=[],e.length=0,{type:"audio",data:this._mergeBoxes(l,c).buffer,sampleCount:m.length,info:t});s&&o&&(R.timestampOffset=r),this._onMediaSegment("audio",R)}}}},C.prototype._remuxVideo=function(e,t){if(null!=this._videoMeta){var i=e,n=i.samples,r=void 0,a=-1,s=-1;if(n&&0!==n.length&&(1!==n.length||t)){var o,l=8,u=null,t=8+e.length,h=null,e=(1<n.length&&(t-=(h=n.pop()).length),null!=this._videoStashedLastSample&&(o=this._videoStashedLastSample,this._videoStashedLastSample=null,n.unshift(o),t+=o.length),null!=h&&(this._videoStashedLastSample=h),n[0].dts-this._dtsBase);r=this._videoNextDts?e-this._videoNextDts:!this._videoSegmentInfoList.isEmpty()&&null!=(w=this._videoSegmentInfoList.getLastSampleBefore(e))?(S=e-(w.originalDts+w.duration),e-(w.dts+w.duration+(S=S<=3?0:S))):0;for(var d=new M.b,c=[],f=0;f<n.length;f++){var p,m=(o=n[f]).dts-this._dtsBase,g=o.isKeyframe,_=m-r,y=o.cts,v=_+y,A=(-1===a&&(a=_,s=v),0),A=f!==n.length-1?n[f+1].dts-this._dtsBase-r-_:null!=h?h.dts-this._dtsBase-r-_:1<=c.length?c[c.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);g&&((p=new M.d(_,v,A,o.dts,!0)).fileposition=o.fileposition,d.appendSyncPoint(p)),c.push({dts:_,pts:v,cts:y,units:o.units,size:o.length,isKeyframe:g,duration:A,originalDts:m,flags:{isLeading:0,dependsOn:g?2:1,isDependedOn:g?1:0,hasRedundancy:0,isNonSync:g?0:1}})}for((u=new Uint8Array(t))[0]=t>>>24&255,u[1]=t>>>16&255,u[2]=t>>>8&255,u[3]=255&t,u.set(x.types.mdat,4),f=0;f<c.length;f++)for(var E=c[f].units;E.length;){var b=E.shift().data;u.set(b,l),l+=b.byteLength}var e=c[c.length-1],w=e.dts+e.duration,S=e.pts+e.duration,w=(this._videoNextDts=w,d.beginDts=a,d.endDts=w,d.beginPts=s,d.endPts=S,d.originalBeginDts=c[0].originalDts,d.originalEndDts=e.originalDts+e.duration,d.firstSample=new M.d(c[0].dts,c[0].pts,c[0].duration,c[0].originalDts,c[0].isKeyframe),d.lastSample=new M.d(e.dts,e.pts,e.duration,e.originalDts,e.isKeyframe),this._isLive||this._videoSegmentInfoList.append(d),i.samples=c,i.sequenceNumber++,this._forceFirstIDR&&((t=c[0].flags).dependsOn=2,t.isNonSync=0),x.moof(i,a));i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(w,u).buffer,sampleCount:c.length,info:d})}}},C.prototype._mergeBoxes=function(e,t){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i},C),Fe=e(11),L=e(1);function k(t,i){this.TAG="TransmuxingController",this._emitter=new F.a,this._config=i,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t;var n=this._currentSegmentIndex=0;this._mediaDataSource.segments.forEach(function(e){e.timestampBase=n,n+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,i.referrerPolicy&&(e.referrerPolicy=i.referrerPolicy)}),isNaN(n)||this._mediaDataSource.duration===n||(this._mediaDataSource.duration=n),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}function C(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 M.c("audio"),this._videoSegmentInfoList=new M.c("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!P.a.chrome||!(P.a.version.major<50||50===P.a.version.major&&P.a.version.build<2661)),this._fillSilentAfterSeek=P.a.msedge||P.a.msie,this._mp3UseMpegAudio=!P.a.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}function Oe(){}k.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},k.prototype.on=function(e,t){this._emitter.addListener(e,t)},k.prototype.off=function(e,t){this._emitter.removeListener(e,t)},k.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},k.prototype._loadSegment=function(e,t){this._currentSegmentIndex=e;var i=this._mediaDataSource.segments[e],i=this._ioctl=new Fe.a(i,this._config,e);i.onError=this._onIOException.bind(this),i.onSeeked=this._onIOSeeked.bind(this),i.onComplete=this._onIOComplete.bind(this),i.onRedirect=this._onIORedirect.bind(this),i.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):i.onDataArrival=this._onInitChunkArrival.bind(this),i.open(t)},k.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},k.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},k.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}
191,k.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},k.prototype.seek=function(e){var t,i,n;null!=this._mediaInfo&&this._mediaInfo.isSeekable()&&((t=this._searchSegmentIndexContains(e))===this._currentSegmentIndex?null==(n=this._mediaInfo.segments[t])?this._pendingSeekTime=e:(i=n.getNearestKeyframe(e),this._remuxer.seek(i.milliseconds),this._ioctl.seek(i.fileposition),this._pendingResolveSeekPoint=i.milliseconds):null==(n=this._mediaInfo.segments[t])?(this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t)):(i=n.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,i.fileposition),this._pendingResolveSeekPoint=i.milliseconds,this._reportSegmentMediaInfo(t)),this._enableStatisticsReporter())},k.prototype._searchSegmentIndexContains=function(e){for(var t=this._mediaDataSource.segments,i=t.length-1,n=0;n<t.length;n++)if(e<t[n].timestampBase){i=n-1;break}return i},k.prototype._onInitChunkArrival=function(e,t){var i,n=this,r=0;return 0<t?(this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t)):(i=null,(i=H.probe(e)).match&&(this._setupFLVDemuxerRemuxer(i),r=this._demuxer.parseChunks(e,t)),i.match||i.needMoreData||(i=Pe.probe(e)).match&&(this._setupTSDemuxerRemuxer(i),r=this._demuxer.parseChunks(e,t)),i.match||i.needMoreData||(i=null,I.a.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(L.a.DEMUX_ERROR,E.a.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))),r},k.prototype._setupFLVDemuxerRemuxer=function(e){this._demuxer=new H(e,this._config),this._remuxer||(this._remuxer=new Be(this._config));e=this._mediaDataSource;null==e.duration||isNaN(e.duration)||(this._demuxer.overridedDuration=e.duration),"boolean"==typeof e.hasAudio&&(this._demuxer.overridedHasAudio=e.hasAudio),"boolean"==typeof e.hasVideo&&(this._demuxer.overridedHasVideo=e.hasVideo),this._demuxer.timestampBase=e.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)},k.prototype._setupTSDemuxerRemuxer=function(e){e=this._demuxer=new Pe(e,this._config);this._remuxer||(this._remuxer=new Be(this._config)),e.onError=this._onDemuxException.bind(this),e.onMediaInfo=this._onMediaInfo.bind(this),e.onMetaDataArrived=this._onMetaDataArrived.bind(this),e.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),e.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),e.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),e.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),e.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},k.prototype._onMediaInfo=function(e){var t=this,e=(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,n.a.prototype)),Object.assign({},e));Object.setPrototypeOf(e,n.a.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=e,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pe
191ndingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})},k.prototype._onMetaDataArrived=function(e){this._emitter.emit(L.a.METADATA_ARRIVED,e)},k.prototype._onScriptDataArrived=function(e){this._emitter.emit(L.a.SCRIPTDATA_ARRIVED,e)},k.prototype._onTimedID3Metadata=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.dts&&(e.dts-=t),this._emitter.emit(L.a.TIMED_ID3_METADATA_ARRIVED,e))},k.prototype._onSMPTE2038Metadata=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.dts&&(e.dts-=t),null!=e.nearest_pts&&(e.nearest_pts-=t),this._emitter.emit(L.a.SMPTE2038_METADATA_ARRIVED,e))},k.prototype._onSCTE35Metadata=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.nearest_pts&&(e.nearest_pts-=t),this._emitter.emit(L.a.SCTE35_METADATA_ARRIVED,e))},k.prototype._onPESPrivateDataDescriptor=function(e){this._emitter.emit(L.a.PES_PRIVATE_DATA_DESCRIPTOR,e)},k.prototype._onPESPrivateData=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.nearest_pts&&(e.nearest_pts-=t),null!=e.dts&&(e.dts-=t),this._emitter.emit(L.a.PES_PRIVATE_DATA_ARRIVED,e))},k.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},k.prototype._onIOComplete=function(e){e+=1;e<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(e)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(L.a.LOADING_COMPLETE),this._disableStatisticsReporter())},k.prototype._onIORedirect=function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e},k.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(L.a.RECOVERED_EARLY_EOF)},k.prototype._onIOException=function(e,t){I.a.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(L.a.IO_ERROR,e,t),this._disableStatisticsReporter()},k.prototype._onDemuxException=function(e,t){I.a.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(L.a.DEMUX_ERROR,e,t)},k.prototype._onRemuxerInitSegmentArrival=function(e,t){this._emitter.emit(L.a.INIT_SEGMENT,e,t)},k.prototype._onRemuxerMediaSegmentArrival=function(e,t){null==this._pendingSeekTime&&(this._emitter.emit(L.a.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint)&&"video"===e&&(e=t.info.syncPoints,t=this._pendingResolveSeekPoint,this._pendingResolveSeekPoint=null,P.a.safari&&0<e.length&&e[0].originalDts===t&&(t=e[0].pts),this._emitter.emit(L.a.RECOMMEND_SEEKPOINT,t))},k.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},k.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},k.prototype._reportSegmentMediaInfo=function(e){e=this._mediaInfo.segments[e],e=Object.assign({},e);e.duration=this._mediaInfo.duration,e.segmentCount=this._mediaInfo.segmentCount,delete e.segments,delete e.keyframesIndex,this._emitter.emit(L.a.MEDIA_INFO,e)},k.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(L.a.STATISTICS_INFO,e)},B.a=k},function(e,t,i){"use strict";var n,r,a,s,o,l,u,h,d,c=i(0),f=(P.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},P.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())}
191,Object.defineProperty(P.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return this._intervalBytes/(e=0==e?1:e)/1024},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:500<=this._now()-this._lastCheckpoint?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),P),p=i(2),m=i(4),g=i(3),_=(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)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},h=p.a,n(d=R,i=h),d.prototype=null===i?Object.create(i):(I.prototype=i.prototype,new I),R.isSupported=function(){try{var e=m.a.msedge&&15048<=m.a.version.minor,t=!m.a.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}},R.prototype.destroy=function(){this.isWorking()&&this.abort(),h.prototype.destroy.call(this)},R.prototype.open=function(e,t){var i=this,n=(this._dataSource=e,this._range=t,e.url),r=(this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL),this._seekHandler.getConfig(n,t)),a=new self.Headers;if("object"==typeof r.headers){var s=r.headers;for(o in s)s.hasOwnProperty(o)&&a.append(o,s[o])}n={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var o in this._config.headers)a.append(o,this._config.headers[o]);!1===e.cors&&(n.mode="same-origin"),e.withCredentials&&(n.credentials="include"),e.referrerPolicy&&(n.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,n.signal=this._abortController.signal),this._status=p.c.kConnecting,self.fetch(r.url,n).then(function(e){if(i._requestAbort)i._status=p.c.kIdle,e.body.cancel();else{var t;if(e.ok&&200<=e.status&&e.status<=299)return e.url!==r.url&&i._onURLRedirect&&(t=i._seekHandler.removeURLParameters(e.url),i._onURLRedirect(t)),null!=(t=e.headers.get("Content-Length"))&&(i._contentLength=parseInt(t),0!==i._contentLength)&&i._onContentLengthKnown&&i._onContentLengthKnown(i._contentLength),i._pump.call(i,e.body.getReader());if(i._status=p.c.kError,!i._onError)throw new g.d("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);i._onError(p.b.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}}).catch(function(e){if(!i._abortController||!i._abortController.signal.aborted){if(i._status=p.c.kError,!i._onError)throw e;i._onError(p.b.EXCEPTION,{code:-1,msg:e.message})}})},R.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==p.c.kBuffering||!m.a.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},R.prototype._pump=function(n){var r=this;return n.read().then(function(e){if(e.done)if(null!==r._contentLength&&r._receivedLength<r._contentLength){r._status=p.c.kError;var t=p.b.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!r._onError)throw new g.d(i.msg);r._onError(t,i)}else r._status=p.c.kComplete,r._onComplete&&r._onComplete(r._range.from,r._range.from+r._receivedLength-1);else if(r._abortController&&r._abortController.signal.aborted)r._status=p.c.kComplete;else{if(!0===r._requestAbort)return r._status=p.c.kComplete,n.cancel();r._status=p.c.kBuffering;t=e.value.buffer,i=r._range.from+r._receivedLength;r._receivedLength+=t.byteLength,r._onDataArrival&&r._onDataArrival(t,i,r._receivedLength),r._pump(n)}}).catch(function(e){if(r._abortController&&r._abortController.signal.aborted)r._status=p.c.kComplete;else if(11!==e.code||!m.a.msedge){r._status=p.c.kError;var t=0,i=null,i=19!==e.code&&"network error"!==e.message||!(null===r._contentLength||null!==r._contentLength&&r._receivedLength<r._contentLength)?(t=p.b.EXCEPTION,{code:e.code,msg:e.message}):(t=p.b.EARLY_EOF,{code:e.code,msg:"Fetch stream meet Early-EOF"});if(!r._onError)throw new g.d(i.msg);r._onError(t,i)}})},R),i=(u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),y=(l=p.a,i(C,l),C.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),(e.responseType="moz-chunked-arraybuffer")===e.responseType}catch(e){return c.a.w("MozChunkedLoader",e.message),!1}},C.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),l.prototype.destroy.call(this)},C.prototype.open=function(e,t){this._dataSource=e,this._range=t;var i=e.url,i=(this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(i=e.redirectedURL),this._seekHandler.getConfig(i,t)),n=(this._requestURL=i.url,this._xhr=new XMLHttpRequest);if(n.open("GET",i.url,!0),n.responseType="moz-chunked-arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onloadend=this._onLoadEnd.bind(this),n.onerror=this._onXhrError.bind(this),e.withCredentials&&(n.withCredentials=!0),"object"==typeof i.headers){var r=i.headers;for(a in r)r.hasOwnProperty(a)&&n.setRequestHeader(a,r[a])}if("object"==typeof this._config.headers)for(var a in r=this._config.headers)r.hasOwnProperty(a)&&n.setRequestHeader(a,r[a]);this._status=p.c.kConnecting,n.send()},C.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=p.c.kComplete},C.prototype._onReadyStateChange=function(e){var t,e=e.target;if(2===e.readyState)if(null!=e.responseURL&&e.responseURL!==this._requestURL&&this._onURLRedirect&&(t=this._seekHandler.removeURLParameters(e.responseURL),this._onURLRedirect(t)),0!==e.status&&(e.status<200||299<e.status)){if(this._status=p.c.kError,!this._onError)throw new g.d("MozChunkedLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(p.b.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}else this._status=p.c.kBuffering},C.prototype._onProgress=function(e){var t;this._status!==p.c.kError&&(null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown)&&this._onContentLengthKnown(this._contentLength),e=e.target.response,t=this._range.from+this._receivedLength,this._receivedLength+=e.byteLength,this._onDataArrival)&&this._onDataArrival(e,t,this._receivedLength)},C.prototype._onLoadEnd=function(e){!0!==this._requestAbort?this._status!==p.c.kError&&(this._status=p.c.kComplete,this._onComplete)&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1):this._requestAbort=!1},C.prototype._onXhrError=function(e){this._status=p.c.kError;var t=0,i=null,i=this._contentLength&&e.loaded<this._contentLength?(t=p.b.EARLY_EOF,{code:-1,msg:"Moz-Chunked stream meet Early-Eof"}
191):(t=p.b.EXCEPTION,{code:-1,msg:e.constructor.name+" "+e.type});if(!this._onError)throw new g.d(i.msg);this._onError(t,i)},C),i=(o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),v=(s=p.a,i(k,s),k.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),(e.responseType="arraybuffer")===e.responseType}catch(e){return c.a.w("RangeLoader",e.message),!1}},k.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),s.prototype.destroy.call(this)},Object.defineProperty(k.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),k.prototype.open=function(e,t){this._dataSource=e,this._range=t,this._status=p.c.kConnecting;e=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(e=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||e?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},k.prototype._openSubRange=function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,e=t+e;null!=this._contentLength&&e-this._range.from>=this._contentLength&&(e=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:e},this._internalOpen(this._dataSource,this._currentRequestRange)},k.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var i=e.url,i=(this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL)),this._seekHandler.getConfig(i,t)),n=(this._currentRequestURL=i.url,this._xhr=new XMLHttpRequest);if(n.open("GET",i.url,!0),n.responseType="arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onload=this._onLoad.bind(this),n.onerror=this._onXhrError.bind(this),e.withCredentials&&(n.withCredentials=!0),"object"==typeof i.headers){var r=i.headers;for(a in r)r.hasOwnProperty(a)&&n.setRequestHeader(a,r[a])}if("object"==typeof this._config.headers)for(var a in r=this._config.headers)r.hasOwnProperty(a)&&n.setRequestHeader(a,r[a]);n.send()},k.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=p.c.kComplete},k.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)},k.prototype._onReadyStateChange=function(e){var t,e=e.target;if(2===e.readyState)if(null!=e.responseURL&&(t=this._seekHandler.removeURLParameters(e.responseURL),e.responseURL!==this._currentRequestURL)&&t!==this._currentRedirectedURL&&(this._currentRedirectedURL=t,this._onURLRedirect)&&this._onURLRedirect(t),200<=e.status&&e.status<=299)this._waitForTotalLength||(this._status=p.c.kBuffering);else{if(this._status=p.c.kError,!this._onError)throw new g.d("RangeLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(p.b.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}},k.prototype._onProgress=function(e){if(this._status!==p.c.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength&&(this._waitForTotalLength=!1,t=this._totalLengthReceived=!0,i=e.total,this._internalAbort(),null!=i&0!==i)&&(this._totalLength=i),-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 i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}},k.prototype._normalizeSpeed=function(e){var t,i=this._chunkSizeKBList,n=i.length-1,r=0,a=n;if(e<i[0])return i[0];for(;r<=a;){if((t=r+Math.floor((a-r)/2))===n||e>=i[t]&&e<i[t+1])return i[t];i[t]<e?r=t+1:a=t-1}},k.prototype._onLoad=function(e){var t,i;this._status!==p.c.kError&&(this._waitForTotalLength?this._waitForTotalLength=!1:((this._lastTimeLoaded=0)!==(t=0===(t=this._speedSampler.lastSecondKBps)&&(this._zeroSpeedChunkCount++,3<=this._zeroSpeedChunkCount)?this._speedSampler.currentKBps:t)&&(t=this._normalizeSpeed(t),this._currentSpeedNormalized!==t)&&(this._currentSpeedNormalized=t,this._currentChunkSizeKB=t),t=e.target.response,e=this._range.from+this._receivedLength,this._receivedLength+=t.byteLength,i=!1,null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():i=!0,this._onDataArrival&&this._onDataArrival(t,e,this._receivedLength),i&&(this._status=p.c.kComplete,this._onComplete)&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)))},k.prototype._onXhrError=function(e){this._status=p.c.kError;var t=0,i=null,i=this._contentLength&&0<this._receivedLength&&this._receivedLength<this._contentLength?(t=p.b.EARLY_EOF,{code:-1,msg:"RangeLoader meet Early-Eof"}
191):(t=p.b.EXCEPTION,{code:-1,msg:e.constructor.name+" "+e.type});if(!this._onError)throw new g.d(i.msg);this._onError(t,i)},k),i=(a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),A=(r=p.a,i(L,r),L.isSupported=function(){try{return void 0!==self.WebSocket}catch(e){return!1}},L.prototype.destroy=function(){this._ws&&this.abort(),r.prototype.destroy.call(this)},L.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=p.c.kConnecting}catch(e){this._status=p.c.kError;t={code:e.code,msg:e.message};if(!this._onError)throw new g.d(t.msg);this._onError(p.b.EXCEPTION,t)}},L.prototype.abort=function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=p.c.kComplete},L.prototype._onWebSocketOpen=function(e){this._status=p.c.kBuffering},L.prototype._onWebSocketClose=function(e){!0!==this._requestAbort?(this._status=p.c.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},L.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=p.c.kError;e={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new g.d(e.msg);this._onError(p.b.EXCEPTION,e)}},L.prototype._dispatchArrayBuffer=function(e){var t=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,t,this._receivedLength)},L.prototype._onWebSocketError=function(e){this._status=p.c.kError;e={code:e.code,msg:e.message};if(!this._onError)throw new g.d(e.msg);this._onError(p.b.EXCEPTION,e)},L),E=(T.prototype.getConfig=function(e,t){var i,n={};return 0!==t.from||-1!==t.to?(i=void 0,i=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",n.Range=i):this._zeroStart&&(n.Range="bytes=0-"),{url:e,headers:n}},T.prototype.removeURLParameters=function(e){return e},T),b=(S.prototype.getConfig=function(e,t){var i;return 0===t.from&&-1===t.to||(i=!0,-1===e.indexOf("?")&&(e+="?",i=!1),i&&(e+="&"),e+=this._startName+"="+t.from.toString(),-1!==t.to&&(e+="&"+this._endName+"="+t.to.toString())),{url:e,headers:{}}},S.prototype.removeURLParameters=function(e){var t=e.split("?")[0],i=void 0,n=e.indexOf("?"),r="";if(null!=(i=-1!==n?e.substring(n+1):i)&&0<i.length)for(var a=i.split("&"),s=0;s<a.length;s++){var o=a[s].split("=");o[0]!==this._startName&&o[0]!==this._endName&&(0<s&&(r+="&"),r+=a[s])}return 0===r.length?t:t+"?"+r},S);function w(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=65536,null!=t.stashInitialSize&&0<t.stashInitialSize&&(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)===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||null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new f,this._speedNormalizeList=[32,64,96,128,192,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()}function S(e,t){this._startName=e,this._endName=t}function T(e){this._zeroStart=e||!1}function L(){var e=r.call(this,"websocket-loader")||this;return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}function k(e,t){var i=s.call(this,"xhr-range-loader")||this;return i.TAG="RangeLoader",i._seekHandler=e,i._config=t,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new f,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}function C(e,t){var i=l.call(this,"xhr-moz-chunked-loader")||this;return i.TAG="MozChunkedLoader",i._seekHandler=e,i._config=t,i._needStash=!0,i._xhr=null,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}function R(e,t){var i=h.call(this,"fetch-stream-loader")||this;
vendor: 6,163 bytes, line 191
191return i.TAG="FetchStreamLoader",i._seekHandler=e,i._config=t,i._needStash=!0,i._requestAbort=!1,i._abortController=null,i._contentLength=null,i._receivedLength=0,i}function I(){this.constructor=d}function P(){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}w.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},w.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},w.prototype.isPaused=function(){return this._paused},Object.defineProperty(w.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"currentSpeed",{get:function(){return this._loaderClass===v?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),w.prototype._selectSeekHandler=function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new E(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new b(t,i)}else{if("custom"!==e.seekType)throw new g.b("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new g.b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}},w.prototype._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=A;else if(_.isSupported())this._loaderClass=_;else if(y.isSupported())this._loaderClass=y;else{if(!v.isSupported())throw new g.d("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=v}},w.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)},w.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))},w.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},w.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)},w.prototype.resume=function(){var e;this._paused&&(this._paused=!1,e=this._resumeFrom,this._resumeFrom=0,this._internalSeek(e,!0))},w.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},w.prototype._internalSeek=function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;t={from:e,to:-1};this._currentRange={from:t.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,t),this._onSeeked&&this._onSeeked()},w.prototype.updateUrl=function(e){if(!e||"string"!=typeof e||0===e.length)throw new g.b("Url must be a non-empty string!");this._dataSource.url=e},w.prototype._expandBuffer=function(e){for(var t,i,n=this._stashSize;n+1048576<e;)n*=2;(n+=1048576)!==this._bufferSize&&(t=new ArrayBuffer(n),0<this._stashUsed&&(i=new Uint8Array(this._stashBuffer,0,this._stashUsed),new Uint8Array(t,0,n).set(i,0)),this._stashBuffer=t,this._bufferSize=n)},w.prototype._normalizeSpeed=function(e){var t,i=this._speedNormalizeList,
191n=i.length-1,r=0,a=n;if(e<i[0])return i[0];for(;r<=a;){if((t=r+Math.floor((a-r)/2))===n||e>=i[t]&&e<i[t+1])return i[t];i[t]<e?r=t+1:a=t-1}},w.prototype._adjustStashSize=function(e){var t=0,e=1024*(t=8192<(t=this._config.isLive?e/8:e<512?e:512<=e&&e<=1024?Math.floor(1.5*e):2*e)?8192:t)+1048576;this._bufferSize<e&&this._expandBuffer(e),this._stashSize=1024*t},w.prototype._dispatchChunks=function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)},w.prototype._onURLRedirect=function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)},w.prototype._onContentLengthKnown=function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)},w.prototype._onLoaderChunkArrival=function(e,t,i){if(!this._onDataArrival)throw new g.a("IOController: No existing consumer (onDataArrival) callback!");var n,r,a,s,o;this._paused||(this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof)&&this._onRecoveredEarlyEof(),this._speedSampler.addBytes(e.byteLength),0!==(n=this._speedSampler.lastSecondKBps)&&(n=this._normalizeSpeed(n),this._speedNormalized!==n)&&(this._speedNormalized=n,this._adjustStashSize(n)),this._enableStash?(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize?((a=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength):(a=new Uint8Array(this._stashBuffer,0,this._bufferSize),0<this._stashUsed?(n=this._stashBuffer.slice(0,this._stashUsed),(s=this._dispatchChunks(n,this._stashByteStart))<n.byteLength?0<s&&(o=new Uint8Array(n,s),a.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=s):(this._stashUsed=0,this._stashByteStart+=s),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):(s=this._dispatchChunks(e,t))<e.byteLength&&((r=e.byteLength-s)>this._bufferSize&&(this._expandBuffer(r),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,s),0),this._stashUsed+=r,this._stashByteStart=t+s))):0===this._stashUsed?(s=this._dispatchChunks(e,t))<e.byteLength&&((r=e.byteLength-s)>this._bufferSize&&this._expandBuffer(r),(a=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e,s),0),this._stashUsed+=r,this._stashByteStart=t+s):(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,(s=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&0<s&&(o=new Uint8Array(this._stashBuffer,s),a.set(o,0)),this._stashUsed-=s,this._stashByteStart+=s))},w.prototype._flushStashBuffer=function(e){if(0<this._stashUsed){var t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),n=t.byteLength-i;if(i<t.byteLength){if(!e)return 0<i&&(e=new Uint8Array(this._stashBuffer,0,this._bufferSize),t=new Uint8Array(t,i),e.set(t,0),this._stashUsed=t.byteLength,this._stashByteStart+=i),0;c.a.w(this.TAG,n+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,n}return 0},w.prototype._onLoaderComplete=function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},w.prototype._onLoaderError=function(e,t){switch(c.a.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=p.b.UNRECOVERABLE_EARLY_EOF),e){case p.b.EARLY_EOF:var i;if(!this._config.isLive&&this._totalLength)return void((i=this._currentRange.to+1)<this._totalLength&&(c.a.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(i,!1)));e=p.b.UNRECOVERABLE_EARLY_EOF;break;case p.b.UNRECOVERABLE_EARLY_EOF:case p.b.CONNECTING_TIMEOUT:case p.b.HTTP_STATUS_CODE_INVALID:case p.b.EXCEPTION:}if(!this._onError)throw new g.d("IOException: "+t.msg);this._onError(e,t)},t.a=w},function(e,t,i){"use strict";r.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<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t}
191,"function"!=typeof self.Promise&&i(15).polyfill()};var n=r;function r(){}n.install(),t.a=n},function(e,t,c){function a(i){var n={};function r(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}r.m=i,r.c=n,r.i=function(e){return e},r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw e};var e=r(r.s=ENTRY_MODULE);return e.default||e}function f(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}e.exports=function(d,e){var i={main:c.m},n=(e=e||{}).all?{main:Object.keys(i.main)}:function(e){for(var t={main:[d]},i={main:[]},n={main:{}};function(i){return Object.keys(i).reduce(function(e,t){return e||0<i[t].length},!1)}(t);)for(var r=Object.keys(t),a=0;a<r.length;a++){var s=r[a],o=t[s].pop();if(n[s]=n[s]||{},!n[s][o]&&e[s][o]){n[s][o]=!0,i[s]=i[s]||[],i[s].push(o);for(var l=function(e,t,i){var n={},r=(n[i]=[],t.toString());if(t=r.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)){for(var a,t=t[1],s=new RegExp("(\\\\n|\\W)"+f(t)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");a=s.exec(r);)"dll-reference"!==a[3]&&n[i].push(a[3]);for(s=new RegExp("\\("+f(t)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");a=s.exec(r);)e[a[2]]||(n[i].push(a[1]),e[a[2]]=c(a[1]).m),n[a[2]]=n[a[2]]||[],n[a[2]].push(a[4]);for(var o,l=Object.keys(n),u=0;u<l.length;u++)for(var h=0;h<n[l[u]].length;h++)o=n[l[u]][h],isNaN(+o)||(n[l[u]][h]=+n[l[u]][h])}return n}(e,e[s][o],s),u=Object.keys(l),h=0;h<u.length;h++)t[u[h]]=t[u[h]]||[],t[u[h]]=t[u[h]].concat(l[u[h]])}}return i}(i),r="",t=(Object.keys(n).filter(function(e){return"main"!==e}).forEach(function(t){for(var e=0;n[t][e];)e++;n[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",r=r+"var "+t+" = ("+a.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+n[t].map(function(e){return JSON.stringify(e)+": "+i[t][e].toString()}).join(",")+"});\n"}),r=r+"new (("+a.toString().replace("ENTRY_MODULE",JSON.stringify(d))+")({"+n.main.map(function(e){return JSON.stringify(e)+": "+i.main[e].toString()}).join(",")+"}))(self);",new window.Blob([r],{type:"text/javascript"}));return e.bare||(e=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(t),(t=new window.Worker(e)).objectURL=e),t}},function(e,t,i){e.exports=i(19).default},function(e,t,i){!function(B,F){e.exports=function(){"use strict";function l(e){return"function"==typeof e}var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,t=void 0,r=void 0,o=function(e,t){d[n]=e,d[n+1]=t,2===(n+=2)&&(r?r(c):g())},e="undefined"!=typeof window?window:void 0,a=e||{},a=a.MutationObserver||a.WebKitMutationObserver,s="undefined"==typeof self&&void 0!==B&&"[object process]"==={}.toString.call(B),u="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(c,1)}}var d=new Array(1e3);function c(){for(var e=0;e<n;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;n=0}var f,p,m,g=void 0;function _(e,t){var i,n=this,r=new this.constructor(A),a=(void 0===r[v]&&I(r),n._state);return a?(i=arguments[a-1],o(function(){return C(a,r,i,n._result)})):L(n,r,e,t),r}function y(e){var t;return e&&"object"==typeof e&&e.constructor===this?e:(b(t=new this(A),e),t)}var g=s?function(){return B.nextTick(c)}:a?(p=0,s=new a(c),m=document.createTextNode(""),s.observe(m,{characterData:!0}),function(){m.data=p=++p%2}):u?((f=new MessageChannel).port1.onmessage=c,function(){return f.port2.postMessage(0)}):(void 0===e?function(){try{var e=Function("return this")().require("vertx");return void 0!==(t=e.runOnLoop||e.runOnContext)?function(){t(c)}:h()}catch(e){return h()}}:h)(),v=Math.random().toString(36).substring(2);function A(){}function E(e,t,i){var r,a,n,s;t.constructor===e.constructor&&i===_&&t.constructor.resolve===y?(n=e,1===(s=t)._state?S(n,s._result):2===s._state?T(n,s._result):L(s,void 0,function(e){return b(n,e)},function(e){return T(n,e)})):void 0!==i&&l(i)?(r=t,a=i,o(function(i){var n=!1,e=function(e,t){try{e.call(t,function(e){n||(n=!0,r!==e?b(i,e):S(i,e))},function(e){n||(n=!0,T(i,e))})}catch(e){return e}}(a,r,i._label);!n&&e&&(n=!0,T(i,e))},e)):S(e,t)}function b(e,t){if(e===t)T(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof t,null===t||"object"!=i&&"function"!=i)S(e,t);else{i=void 0;try{i=t.then}catch(t){return void T(e,t)}E(e,t,i)}var i}
191function w(e){e._onerror&&e._onerror(e._result),k(e)}function S(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length)&&o(k,e)}function T(e,t){void 0===e._state&&(e._state=2,e._result=t,o(w,e))}function L(e,t,i,n){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+1]=i,r[a+2]=n,0===a&&e._state&&o(k,e)}function k(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n,r=void 0,a=e._result,s=0;s<t.length;s+=3)n=t[s],r=t[s+i],n?C(i,n,r,a):r(a);e._subscribers.length=0}}function C(e,t,i,n){var r=l(i),a=void 0,s=void 0,o=!0;if(r){try{a=i(n)}catch(e){o=!1,s=e}if(t===a)return void T(t,new TypeError("A promises callback cannot return that same promise."))}else a=n;void 0===t._state&&(r&&o?b(t,a):!1===o?T(t,s):1===e?S(t,a):2===e&&T(t,a))}var R=0;function I(e){e[v]=R++,e._state=void 0,e._result=void 0,e._subscribers=[]}M.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},M.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,n=i.resolve;if(n===y){var r,a=void 0,s=void 0,o=!1;try{a=t.then}catch(t){o=!0,s=t}a===_&&void 0!==t._state?this._settledAt(t._state,e,t._result):"function"!=typeof a?(this._remaining--,this._result[e]=t):i===x?(r=new i(A),o?T(r,s):E(r,t,a),this._willSettleAt(r,e)):this._willSettleAt(new i(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},M.prototype._settledAt=function(e,t,i){var n=this.promise;void 0===n._state&&(this._remaining--,2===e?T(n,i):this._result[t]=i),0===this._remaining&&S(n,this._result)},M.prototype._willSettleAt=function(e,t){var i=this;L(e,void 0,function(e){return i._settledAt(1,t,e)},function(e){return i._settledAt(2,t,e)})};var P=M,x=(D.prototype.catch=function(e){return this.then(null,e)},D.prototype.finally=function(t){var i=this.constructor;return l(t)?this.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})}):this.then(t,t)},D);function D(e){if(this[v]=R++,this._result=this._state=void 0,this._subscribers=[],A!==e){if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof D))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
191onstructor cannot be called as a function.");var t=this,i=e;try{i(function(e){b(t,e)},function(e){T(t,e)})}catch(i){T(t,i)}}}function M(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[v]||I(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0!==this.length&&(this.length=this.length||0,this._enumerate(t),0!==this._remaining)||S(this.promise,this._result)):T(this.promise,new Error("Array Methods must be provided an Array"))}return x.prototype.then=_,x.all=function(e){return new P(this,e).promise},x.race=function(r){var a=this;return i(r)?new a(function(e,t){for(var i=r.length,n=0;n<i;n++)a.resolve(r[n]).then(e,t)}):new a(function(e,t){return t(new TypeError("You must pass an array to race."))})},x.resolve=y,x.reject=function(e){var t=new this(A);return T(t,e),t},x._setScheduler=function(e){r=e},x._setAsap=function(e){o=e},x._asap=o,x.polyfill=function(){var e=void 0;if(void 0!==F)e=F;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===i&&!t.cast)return}e.Promise=x},x.Promise=x}()}.call(this,i(16),i(17))},function(e,t){var i,n,e=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return(i=setTimeout)(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}try{i="function"==typeof setTimeout?setTimeout:r}catch(e){i=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}var o,l=[],u=!1,h=-1;function d(){u&&o&&(u=!1,o.length?l=o.concat(l):h=-1,l.length)&&c()}function c(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(o=l,l=[];++h<t;)o&&o[h].run();h=-1,t=l.length}o=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return(n=clearTimeout)(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new f(e,t)),1!==l.length||u||s(c)},f.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.prependListener=p,e.prependOnceListener=p,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(e,t){var i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t);var a=i(9),s=i(12),o=i(10),l=i(1);t.default=function(i){var n=null,r=function(e,t){i.postMessage({msg:"logcat_callback",data:{type:e,logcat:t}})}.bind(this);s.a.install(),i.addEventListener("message",function(e){switch(e.data.cmd){case"init":(n=new o.a(e.data.param[0],e.data.param[1])).on(l.a.IO_ERROR,function(e,t){i.postMessage({msg:l.a.IO_ERROR,data:{type:e,info:t}})}.bind(this)),n.on(l.a.DEMUX_ERROR,function(e,t){i.postMessage({msg:l.a.DEMUX_ERROR,data:{type:e,info:t}})}.bind(this)),n.on(l.a.INIT_SEGMENT,function(e,t){e={msg:l.a.INIT_SEGMENT,data:{type:e,data:t}},i.postMessage(e,[t.data])}.bind(this)),n.on(l.a.MEDIA_SEGMENT,function(e,t){e={msg:l.a.MEDIA_SEGMENT,data:{type:e,data:t}},i.postMessage(e,[t.data])}.bind(this)),n.on(l.a.LOADING_COMPLETE,function(){var e={msg:l.a.LOADING_COMPLETE};i.postMessage(e)}.bind(this)),n.on(l.a.RECOVERED_EARLY_EOF,function(){var e={msg:l.a.RECOVERED_EARLY_EOF};i.postMessage(e)}.bind(this)),n.on(l.a.MEDIA_INFO,function(e){e={msg:l.a.MEDIA_INFO,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.METADATA_ARRIVED,function(e){e={msg:l.a.METADATA_ARRIVED,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.SCRIPTDATA_ARRIVED,function(e){e={msg:l.a.SCRIPTDATA_ARRIVED,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.TIMED_ID3_METADATA_ARRIVED,function(e){e={msg:l.a.TIMED_ID3_METADATA_ARRIVED,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.SMPTE2038_METADATA_ARRIVED,function(e){e={msg:l.a.SMPTE2038_METADATA_ARRIVED,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.SCTE35_METADATA_ARRIVED,function(e){e={msg:l.a.SCTE35_METADATA_ARRIVED,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.PES_PRIVATE_DATA_DESCRIPTOR,function(e){e={msg:l.a.PES_PRIVATE_DATA_DESCRIPTOR,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.PES_PRIVATE_DATA_ARRIVED,function(e){e={msg:l.a.PES_PRIVATE_DATA_ARRIVED,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.STATISTICS_INFO,function(e){e={msg:l.a.STATISTICS_INFO,data:e},i.postMessage(e)}.bind(this)),n.on(l.a.RECOMMEND_SEEKPOINT,function(e){i.postMessage({msg:l.a.RECOMMEND_SEEKPOINT,data:e})}.bind(this));break;
191case"destroy":n&&(n.destroy(),n=null),i.postMessage({msg:"destroyed"});break;case"start":n.start();break;case"stop":n.stop();break;case"seek":n.seek(e.data.param);break;case"pause":n.pause();break;case"resume":n.resume();break;case"logging_config":var t=e.data.param;a.a.applyConfig(t),!0===t.enableCallback?a.a.addLogListener(r):a.a.removeLogListener(r)}})}},function(B,e,t){"use strict";t.r(e);var i=t(12),n=t(11),r={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function a(){return Object.assign({},r)}M.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},M.supportMSEH265Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"')},M.supportNetworkStreamIO=function(){var e=new n.a({},a()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t},M.getNetworkLoaderTypeName=function(){var e=new n.a({},a()),t=e.loaderType;return e.destroy(),t},M.supportNativeMediaPlayback=function(e){e=(M.videoElement=null==M.videoElement?window.document.createElement("video"):M.videoElement).canPlayType(e);return"probably"===e||"maybe"==e},M.getFeatureList=function(){var e={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.msePlayback=M.supportMSEH264Playback(),e.networkStreamIO=M.supportNetworkStreamIO(),e.networkLoaderName=M.getNetworkLoaderTypeName(),e.mseLivePlayback=e.msePlayback&&e.networkStreamIO,e.mseH265Playback=M.supportMSEH265Playback(),e.nativeMP4H264Playback=M.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeMP4H265Playback=M.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),e.nativeWebmVP8Playback=M.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=M.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e};var s=M,o=t(2),l=t(6),u=t.n(l),h=t(0),d=t(4),c={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info"},l=t(13),f=t.n(l),p=t(9),m=t(10),g=t(1),_=t(8),y=(D.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),p.a.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},D.prototype.on=function(e,t){this._emitter.addListener(e,t)},D.prototype.off=function(e,t){this._emitter.removeListener(e,t)},D.prototype.hasWorker=function(){return null!=this._worker},D.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},D.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},D.prototype.seek=function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)},D.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},D.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},D.prototype._onInitSegment=function(e,t){var i=this;Promise.resolve().then(function(){i._emitter.emit(g.a.INIT_SEGMENT,e,t)})},D.prototype._onMediaSegment=function(e,t){var i=this;Promise.resolve().then(function(){i._emitter.emit(g.a.MEDIA_SEGMENT,e,t)})},D.prototype._onLoadingComplete=function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(g.a.LOADING_COMPLETE)})},D.prototype._onRecoveredEarlyEof=function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(g.a.RECOVERED_EARLY_EOF)})},D.prototype._onMediaInfo=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.MEDIA_INFO,e)})},D.prototype._onMetaDataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.METADATA_ARRIVED,e)})},D.prototype._onScriptDataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.SCRIPTDATA_ARRIVED,e)})}
191,D.prototype._onTimedID3MetadataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.TIMED_ID3_METADATA_ARRIVED,e)})},D.prototype._onSMPTE2038MetadataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.SMPTE2038_METADATA_ARRIVED,e)})},D.prototype._onSCTE35MetadataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.SCTE35_METADATA_ARRIVED,e)})},D.prototype._onPESPrivateDataDescriptor=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.PES_PRIVATE_DATA_DESCRIPTOR,e)})},D.prototype._onPESPrivateDataArrived=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.PES_PRIVATE_DATA_ARRIVED,e)})},D.prototype._onStatisticsInfo=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.STATISTICS_INFO,e)})},D.prototype._onIOError=function(e,t){var i=this;Promise.resolve().then(function(){i._emitter.emit(g.a.IO_ERROR,e,t)})},D.prototype._onDemuxError=function(e,t){var i=this;Promise.resolve().then(function(){i._emitter.emit(g.a.DEMUX_ERROR,e,t)})},D.prototype._onRecommendSeekpoint=function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(g.a.RECOMMEND_SEEKPOINT,e)})},D.prototype._onLoggingConfigChanged=function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})},D.prototype._onWorkerMessage=function(e){var t=e.data,i=t.data;if("destroyed"===t.msg||this._workerDestroying)this._workerDestroying=!1,this._worker.terminate(),this._worker=null;else switch(t.msg){case g.a.INIT_SEGMENT:case g.a.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case g.a.LOADING_COMPLETE:case g.a.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case g.a.MEDIA_INFO:Object.setPrototypeOf(i,_.a.prototype),this._emitter.emit(t.msg,i);break;case g.a.METADATA_ARRIVED:case g.a.SCRIPTDATA_ARRIVED:case g.a.TIMED_ID3_METADATA_ARRIVED:case g.a.SMPTE2038_METADATA_ARRIVED:case g.a.SCTE35_METADATA_ARRIVED:case g.a.PES_PRIVATE_DATA_DESCRIPTOR:case g.a.PES_PRIVATE_DATA_ARRIVED:case g.a.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case g.a.IO_ERROR:case g.a.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case g.a.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":h.a.emitter.emit("log",i.type,i.logcat)}},D),v="error",A="source_open",E="update_end",b="buffer_full",w=t(7),S=t(3),T=(x.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},x.prototype.on=function(e,t){this._emitter.addListener(e,t)},x.prototype.off=function(e,t){this._emitter.removeListener(e,t)},x.prototype.attachMediaElement=function(e){if(this._mediaSource)throw new S.a("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},x.prototype.detachMediaElement=function(){if(this._mediaSource){var e,t=this._mediaSource;for(e in this._sourceBuffers){var i=this._pendingSegments[e],i=(i.splice(0,i.length),this._pendingSegments[e]=null,this._pendingRemoveRanges[e]=null,this._lastInitSegments[e]=null,this._sourceBuffers[e]);if(i){if("closed"!==t.readyState){try{t.removeSourceBuffer(i)}catch(t){h.a.e(this.TAG,t.message)}i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[e]=null,this._sourceBuffers[e]=null}}if("open"===t.readyState)try{t.endOfStream()}catch(t){h.a.e(this.TAG,t.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},x.prototype.appendInitSegment=function(e,t){if(this._mediaSource&&"open"===this._mediaSource.readyState){var i=e,n=""+i.container,r=(i.co
191dec&&0<i.codec.length&&(n+=";codecs="+i.codec),!1);if(h.a.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])h.a.v(this.TAG,"Notice: "+i.type+" mimeType changed, origin: "+this._mimeTypes[i.type]+", target: "+n);else{r=!0;try{var a=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return h.a.e(this.TAG,e.message),void this._emitter.emit(v,{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(),d.a.safari&&"audio/mpeg"===i.container&&0<i.mediaDuration&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())}else this._pendingSourceBufferInit.push(e),this._pendingSegments[e.type].push(e)},x.prototype.appendMediaSegment=function(e){this._pendingSegments[e.type].push(e),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer(),e=this._sourceBuffers[e.type];!e||e.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},x.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){h.a.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<i.buffered.length;r++){var a=i.buffered.start(r),s=i.buffered.end(r);this._pendingRemoveRanges[t].push({start:a,end:s})}i.updating||this._doRemoveRanges(),d.a.safari&&(n=this._lastInitSegments[t])&&(this._pendingSegments[t].push(n),i.updating||this._doAppendSegments())}}},x.prototype.endOfStream=function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},x.prototype.getNearestKeyframe=function(e){return this._idrList.getLastSyncPointBeforeDts(e)},x.prototype._needCleanupSourceBuffer=function(){if(this._config.autoCleanupSourceBuffer){var e,t=this._mediaElement.currentTime;for(e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){i=i.buffered;if(1<=i.length&&t-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}}return!1},x.prototype._doCleanupSourceBuffer=function(){var e,t=this._mediaElement.currentTime;for(e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){for(var n=i.buffered,r=!1,a=0;a<n.length;a++){var s,o=n.start(a),l=n.end(a);o<=t&&t<l+3?t-o>=this._config.autoCleanupMaxBackwardDuration&&(r=!0,s=t-this._config.autoCleanupMinBackwardDuration,this._pendingRemoveRanges[e].push({start:o,end:s})):l<t&&(r=!0,this._pendingRemoveRanges[e].push({start:o,end:l}))}r&&!i.updating&&this._doRemoveRanges()}}},x.prototype._updateMediaSourceDuration=function(){var e,t=this._sourceBuffers;0===this._mediaElement.readyState||"open"!==this._mediaSource.readyState||t.video&&t.video.updating||t.audio&&t.audio.updating||(t=this._mediaSource.duration,0<(e=this._pendingMediaDuration)&&(isNaN(t)||t<e)&&(h.a.v(this.TAG,"Update MediaSource duration from "+t+" to "+e),this._mediaSource.duration=e),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0)},x.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)}},x.prototype._doAppendSegments=function(){var e,t=this._pendingSegments;for(e in t)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating&&0<t[e].length){var i,n,r=t[e].shift();if(r.timestampOffset&&(i=this._sourceBuffers[e].timestampOffset,n=r.timestampOffset/1e3,.1<Math.abs(i-n)&&(h.a.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+n),this._sourceBuffers[e].timestampOffset=n),delete r.timestampOffset),!r.data||0===r.data.byteLength)continue;try{this._sourceBuffers[e].appendBuffer(r.data),this._isBufferFull=!1,"video"===e&&r.hasOwnProperty("info")&&this._idrList.appendArray(r.info.syncPoints)}catch(t){this._pendingSegments[e].unshift(r),22===t.code?(this._isBufferFull||this._emitter.emit(b),this._isBufferFull=!0):(h.a.e(this.TAG,t.message),this._emitter.emit(v,{code:t.code,msg:t.message}))}}},x.prototype._onSourceOpen=function(){if(h.a.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),0<this._pe
191ndingSourceBufferInit.length)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(A)},x.prototype._onSourceEnded=function(){h.a.v(this.TAG,"MediaSource onSourceEnded")},x.prototype._onSourceClose=function(){h.a.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))},x.prototype._hasPendingSegments=function(){var e=this._pendingSegments;return 0<e.video.length||0<e.audio.length},x.prototype._hasPendingRemoveRanges=function(){var e=this._pendingRemoveRanges;return 0<e.video.length||0<e.audio.length},x.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(E)},x.prototype._onSourceBufferError=function(e){h.a.e(this.TAG,"SourceBuffer Error: "+e)},x),l=t(5),L={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},k={NETWORK_EXCEPTION:o.b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:o.b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:o.b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:o.b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:l.a.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:l.a.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:l.a.CODEC_UNSUPPORTED},C=(P.prototype.destroy=function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},P.prototype.on=function(e,t){var i=this;e===c.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(function(){i._emitter.emit(c.MEDIA_INFO,i.mediaInfo)}):e===c.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(function(){i._emitter.emit(c.STATISTICS_INFO,i.statisticsInfo)}),this._emitter.addListener(e,t)},P.prototype.off=function(e,t){this._emitter.removeListener(e,t)},P.prototype.attachMediaElement=function(e){var t=this;if((this._mediaElement=e).addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new T(this._config),this._msectl.on(E,this._onmseUpdateEnd.bind(this)),this._msectl.on(b,this._onmseBufferFull.bind(this)),this._msectl.on(A,function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())}),this._msectl.on(v,function(e){t._emitter.emit(c.ERROR,L.MEDIA_ERROR,k.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},P.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},P.prototype.load=function(){var n=this;if(!this._mediaElement)throw new S.a("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new S.a("MSEPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(0<this._mediaElement.readyState&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new y(this._mediaDataSource,this._config),this._transmuxer.on(g.a.INIT_SEGMENT,function(e,t){n._msectl.appendInitSegment(t)}),this._transmuxer.on(g.a.MEDIA_SEGMENT,function(e,t){var i;n._msectl.appendMediaSegment(t),n._config.lazyLoad&&!n._config.isLive&&(i=n._mediaElement.currentTime,t.info.endDts>=1e3*(i+n._config.lazyLoadMaxDuration))&&null==n._progressChecker&&(h.a.v(n.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),n._suspendTransmuxer())}),this._transmuxer.on(g.a.LOADING_COMPLETE,function(){n._msectl.endOfStream(),n._emitter.emit(c.LOADING_COMPLETE)}),this._transmuxer.on(g.a.RECOVERED_EARLY_EOF,function(){n._emitter.emit(c.RECOVERED_EARLY_EOF)}),this._transmuxer.on(g.a.IO_ERROR,function(e,t){n._emitter.emit(c.ERROR,L.NETWORK_E
191RROR,e,t)}),this._transmuxer.on(g.a.DEMUX_ERROR,function(e,t){n._emitter.emit(c.ERROR,L.MEDIA_ERROR,e,{code:-1,msg:t})}),this._transmuxer.on(g.a.MEDIA_INFO,function(e){n._mediaInfo=e,n._emitter.emit(c.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(g.a.METADATA_ARRIVED,function(e){n._emitter.emit(c.METADATA_ARRIVED,e)}),this._transmuxer.on(g.a.SCRIPTDATA_ARRIVED,function(e){n._emitter.emit(c.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(g.a.TIMED_ID3_METADATA_ARRIVED,function(e){n._emitter.emit(c.TIMED_ID3_METADATA_ARRIVED,e)}),this._transmuxer.on(g.a.SMPTE2038_METADATA_ARRIVED,function(e){n._emitter.emit(c.SMPTE2038_METADATA_ARRIVED,e)}),this._transmuxer.on(g.a.SCTE35_METADATA_ARRIVED,function(e){n._emitter.emit(c.SCTE35_METADATA_ARRIVED,e)}),this._transmuxer.on(g.a.PES_PRIVATE_DATA_DESCRIPTOR,function(e){n._emitter.emit(c.PES_PRIVATE_DATA_DESCRIPTOR,e)}),this._transmuxer.on(g.a.PES_PRIVATE_DATA_ARRIVED,function(e){n._emitter.emit(c.PES_PRIVATE_DATA_ARRIVED,e)}),this._transmuxer.on(g.a.STATISTICS_INFO,function(e){n._statisticsInfo=n._fillStatisticsInfo(e),n._emitter.emit(c.STATISTICS_INFO,Object.assign({},n._statisticsInfo))}),this._transmuxer.on(g.a.RECOMMEND_SEEKPOINT,function(e){n._mediaElement&&!n._config.accurateSeek&&(n._requestSetTime=!0,n._mediaElement.currentTime=e/1e3)}),this._transmuxer.open()))},P.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)},P.prototype.play=function(){return this._mediaElement.play()},P.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(P.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.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(P.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"statisticsInfo",{get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),P.prototype._fillStatisticsInfo=function(e){var t,i,n,r;return e.playerType=this._type,this._mediaElement instanceof HTMLVideoElement&&(t=!0,r=n=0,this._mediaElement.getVideoPlaybackQuality?(n=(i=this._mediaElement.getVideoPlaybackQuality()).totalVideoFrames,r=i.droppedVideoFrames):null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1,t&&(e.decodedFrames=n,e.droppedFrames=r)),e},P.prototype._onmseUpdateEnd=function(){var e,t=this._mediaElement.buffered,i=this._mediaElement.currentTime;if(this._config.isLive&&this._config.liveBufferLatencyChasing&&0<t.length&&!this._mediaElement.paused&&(e=t.end(t.length-1))>this._config.liveBufferLatencyMaxLatency&&e-i>this._config.liveBufferLatencyMaxLatency&&(e=e-this._config.liveBufferLatencyMinRemain,this.currentTime=e),this._config.lazyLoad&&!this._config.isLive){for(var n=0,r=0;r<t.length;r++){var a=t.start(r),s=t.end(r);if(a<=i&&i<s){n=s;break}}n>=i+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(h.a.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},P.prototype._onmseBufferFull=function(){h.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},P.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker)&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3))},P.prototype._checkProgressAndResume=function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,i=!1,n=0;n<t.length;n++){var r=t.start(n),a=t.end(n);if(r<=e&&e<a){e>=a-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i)&&(h.a.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume())},P.prototype._isTimepointBuffered=function(e){for(var t=this._mediaElement.buffered,i=0;i<t.length;i++){var n=t.start(i),r=t.end(i);if(n<=e&&e<r)return!0}return!1},P.prototype._internalSeek=function(e){var t,i=this._isTimepointBuffered(e),n=!1,r=0;e<1&&0<this._mediaElement.buffered.length&&((t=this._mediaElement.buffered.start(0))<1&&e<t||d.a.safari)&&(n=!0,r=d.a.safari?.1:t),n?(this._requestSetTime=!0,this._mediaElement.currentTime=r):i?(this._alwaysSeekKeyframe?(t=this._msectl.getNearestKeyframe(Math.floor(1e3*e)),this._requestSetTime=!0,this._mediaElement.currentTime=null!=t?t.dts/1e3:e):(this._requestSetTime=!0,this._mediaElement.currentTime=e),null!=this._progressChecker&&this._checkProgressAndResume()):(null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))},P.prototype._checkAndApplyUnbufferedSeekpoint=function(){var e;this._seekpointRecord&&(this._seekpointRecord.recordTime<=this._now()-100?(e=this._mediaElement.currentTime,this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))):window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50))},P.prototype._checkAndResumeStuckPlayback=function(e){var t=this._mediaElement;e||!this._receivedCanPlay||t.readyState<2?0<(e=t.buffered).length&&t.currentTime<e.start(0)&&(h.a.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+e.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=e.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress)):this._mediaElement.removeEventListener("progress",this.e.onvProgress)}
191,P.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},P.prototype._onvSeeking=function(e){var t=this._mediaElement.currentTime,i=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&0<i.length){var i=i.start(0);if(i<1&&t<i||d.a.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=d.a.safari?.1:i)}this._isTimepointBuffered(t)?(this._alwaysSeekKeyframe&&null!=(i=this._msectl.getNearestKeyframe(Math.floor(1e3*t)))&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3),null!=this._progressChecker&&this._checkProgressAndResume()):(this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50))}},P.prototype._onvCanPlay=function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},P.prototype._onvStalled=function(e){this._checkAndResumeStuckPlayback(!0)},P.prototype._onvProgress=function(e){this._checkAndResumeStuckPlayback()},P),R=(I.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},I.prototype.on=function(e,t){var i=this;e===c.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){i._emitter.emit(c.MEDIA_INFO,i.mediaInfo)}):e===c.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){i._emitter.emit(c.STATISTICS_INFO,i.statisticsInfo)}),this._emitter.addListener(e,t)},I.prototype.off=function(e,t){this._emitter.removeListener(e,t)},I.prototype.attachMediaElement=function(e){if((this._mediaElement=e).addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},I.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},I.prototype.load=function(){if(!this._mediaElement)throw new S.a("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,0<this._mediaElement.readyState&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},I.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},I.prototype.play=function(){return this._mediaElement.play()},I.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(I.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(I.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(I.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}
191,enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"statisticsInfo",{get:function(){var e,t,i,n,r={playerType:this._type,url:this._mediaDataSource.url};return this._mediaElement instanceof HTMLVideoElement&&(e=!0,n=i=0,this._mediaElement.getVideoPlaybackQuality?(i=(t=this._mediaElement.getVideoPlaybackQuality()).totalVideoFrames,n=t.droppedVideoFrames):null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):e=!1,e)&&(r.decodedFrames=i,r.droppedFrames=n),r},enumerable:!1,configurable:!0}),I.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(c.MEDIA_INFO,this.mediaInfo)},I.prototype._reportStatisticsInfo=function(){this._emitter.emit(c.STATISTICS_INFO,this.statisticsInfo)},I);function I(e,t){this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new u.a,this._config=a(),"object"==typeof t&&Object.assign(this._config,t);t=e.type.toLowerCase();if("mse"===t||"mpegts"===t||"m2ts"===t||"flv"===t)throw new S.b("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new S.b("NativePlayer("+e.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}function P(e,t){this.TAG="MSEPlayer",this._type="MSEPlayer",this._emitter=new u.a,this._config=a(),"object"==typeof t&&Object.assign(this._config,t);t=e.type.toLowerCase();if("mse"!==t&&"mpegts"!==t&&"m2ts"!==t&&"flv"!==t)throw new S.b("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;t=d.a.chrome&&(d.a.version.major<50||50===d.a.version.major&&d.a.version.build<2661);this._alwaysSeekKeyframe=!!(t||d.a.msedge||d.a.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}function x(e){this.TAG="MSEController",this._config=e,this._emitter=new u.a,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 w.a}function D(e,t){if(this.TAG="Transmuxer",this._emitter=new u.a,t.enableWorker&&"undefined"!=typeof Worker)try{this._worker=f()(18),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)},p.a.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:p.a.getConfig()})}catch(i){h.a.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new m.a(e,t)}else this._controller=new m.a(e,t);var i;this._controller&&((i=this._controller).on(g.a.IO_ERROR,this._onIOError.bind(this)),i.on(g.a.DEMUX_ERROR,this._onDemuxError.bind(this)),i.on(g.a.INIT_SEGMENT,this._onInitSegment.bind(this)),i.on(g.a.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),i.on(g.a.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),i.on(g.a.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),i.on(g.a.MEDIA_INFO,this._onMediaInfo.bind(this)),i.on(g.a.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),i.on(g.a.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),i.on(g.a.TIMED_ID3_METADATA_ARRIVED,this._onTimedID3MetadataArrived.bind(this)),i.on(g.a.SMPTE2038_METADATA_ARRIVED,this._onSMPTE2038MetadataArrived.bind(this)),i.on(g.a.SCTE35_METADATA_ARRIVED,this._onSCTE35MetadataArrived.bind(this)),i.on(g.a.PES_PRIVATE_DATA_DESCRIPTOR,this._onPESPrivateDataDescriptor.bind(this)),i.on(g.a.PES_PRIVATE_DATA_ARRIVED,this._onPESPrivateDataArrived.bind(this)),i.on(g.a.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),i.on(g.a.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this)))}function M(){}i.a.install();t={createPlayer:function(e,t){var i=e;if(null==i||"object"!=typeof i)throw new S.b("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new S.b("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"mse":case"mpegts":case"m2ts":case"flv":return new C(i,t);default:return new R(i,t)}},isSupported:function(){return s.supportMSEH264Playback()},getFeatureList:function(){return s.getFeatureList()}};t.BaseLoader=o.a,t.LoaderStatus=o.c,t.LoaderErrors=o.b,t.Events=c,t.ErrorTypes=L,t.ErrorDetails=k,t.MSEPlayer=C,t.NativePlayer=R,t.LoggingControl=p.a,Object.defineProperty(t,"version",{enumerable:!0,get:function(){return"1.7.3"}}),e.default=t}],a={},r.m=n,r.c=a,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
191),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14))},function(e,t){t.AACDecoder=class{constructor(e){this.sampleRate=e.sampleRate,this.frameDurMs=Math.floor(1024e3/this.sampleRate),this.frameDurSec=this.frameDurMs/1e3}updateConfig(e){this.sampleRate=e.sampleRate,this.frameDurMs=1024e3/this.sampleRate,this.frameDurSec=this.frameDurMs/1e3}_getPktLen(e,t,i){return((3&e)<<11)+(t<<3)+((224&i)>>5)}sliceAACFrames(e,t){var i,n,r,a=[];let s=e;for(let e=0;e<t.length-1;)255==t[e]&&t[e+1]>>4==15?(i=this._getPktLen(t[e+3],t[e+4],t[e+5]))<=0||(n=t.subarray(e,e+i),(r=new Uint8Array(i)).set(n,0),a.push({ptime:s,data:r}),s+=this.frameDurSec,e+=i):e+=1;return a}}},function(e,t){e.exports={DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNEL:1,H264AUD:[0,0,0,1,9,224],H265AUD:[0,0,0,1,70,1,80],DEF_AAC:"aac",DEF_MP3:"mp3",DEF_H265:"h265",DEF_HEVC:"hevc",DEF_H264:"h264",DEF_AVC:"avc",CODEC_OFFSET_TABLE:["hevc","h265","avc","h264","aac","mp3"]}},function(e,t,i){const n=i(170),g=i(99),_=i(69),r=i(26),y=i(5),s={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15};function a(){this.listeners={},this.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e]=this.listeners[e].concat(t)},this.off=function(e,t){return!!this.listeners[e]&&(t=this.listeners[e].indexOf(t),this.listeners[e]=this.listeners[e].slice(),this.listeners[e].splice(t,1),-1<t)},this.trigger=function(e){var t,i,n,r=this.listeners[e];if(r)if(2===arguments.length)for(i=r.length,t=0;t<i;++t)r[t].call(this,arguments[1]);else{for(n=[],t=arguments.length,t=1;t<arguments.length;++t)n.push(arguments[t]);for(i=r.length,t=0;t<i;++t)r[t].apply(this,n)}},this.dispose=function(){this.listeners={}}}a.prototype.setStartCode=function(e,t=!1){let i=null;return t?((i=e)[0]=g.DEFINE_STARTCODE[0],i[1]=g.DEFINE_STARTCODE[1],i[2]=g.DEFINE_STARTCODE[2],i[3]=g.DEFINE_STARTCODE[3]):((i=new Uint8Array(g.DEFINE_STARTCODE.length+e.length)).set(g.DEFINE_STARTCODE,0),i.set(e,g.DEFINE_STARTCODE.length)),i},a.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,n=s[this.sampleRate],r=new Uint8Array(7),a=r.length+e.length;return r[0]=255,r[1]=241,r[2]=(i-1<<6)+(n<<2),r[3]=128+(a>>11),r[4]=(2047&a)>>3,r[5]=31+((7&a)<<5),r[6]=252,(t=new Uint8Array(a)).set(r,0),t.set(e,r.length),t},a.prototype.demux=function(){let m=this;m.seekPos=-1,m.mp4boxfile=n.createFile(),m.movieInfo=null,m.videoCodec=null,m.durationMs=-1,m.fps=-1,m.sampleRate=-1,m.aacProfile=2,m.size={width:-1,height:-1},m.bufObject=r(),m.audioNone=!1,m.naluHeader={vps:null,sps:null,pps:null,sei:null},m.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(e){for(var t in(m.movieInfo=e).tracks)"VideoHandler"!==e.tracks[t].name&&"video"!==e.tracks[t].type||(0<=e.tracks[t].codec.indexOf("hev")||0<=e.tracks[t].codec.indexOf("hvc")?m.videoCodec=y.CODEC_H265:0<=e.tracks[t].codec.indexOf("avc")&&(m.videoCodec=y.CODEC_H264));let i=-1;var n;i=e.videoTracks[0].samples_duration/e.videoTracks[0].timescale,m.durationMs=1e3*i,m.fps=e.videoTracks[0].nb_samples/i,m.seekDiffTime=1/m.fps,m.size.width=e.videoTracks[0].track_width,m.size.height=e.videoTracks[0].track_height,0<e.audioTracks.length?(m.sampleRate=e.audioTracks[0].audio.sample_rate,n=e.audioTracks[0].codec.split("."),m.aacProfile=n[n.length-1]):m.audioNone=!0,null!=m.onMp4BoxReady&&m.onMp4BoxReady(m.videoCodec),m.videoCodec!==y.CODEC_H265&&m.videoCodec!==y.CODEC_H264||(m.initializeAllSourceBuffers(),m.mp4boxfile.start())},m.mp4boxfile.onSamples=function(t,e,p){let i=window.setInterval(()=>{for(let e=0;e<p.length;e++){var n=p[e];let r=n.data,i=null;if(!(null==r||r.length<4)&&r){var a=n.dts/n.timescale;if(1===t){let e=null,t=n.is_sync;if(m.videoCodec===y.CODEC_H265){e=n.description.hvcC;var s=_.GET_NALU_TYPE(r[4]);if((s===g.HEVC_NAL_SEI_PREFIX||s===g.HEVC_NAL_SEI_SUFFIX)&&5==(31&r[6])){let e=0,t=0;for(;255==r[++t+6];)e+=255;let i=7+--t;var o=r[i]+e;let n="";for(let e=1;e<=16;e++)n+=r[++i];for(var l=o-16,u=0,h=new Uint8Array(l);h[u]=r[++i],++u<=l;);m.trigger("parse_sei",{data:h,pts:a})}t=t||s==g.DEFINE_KEY_FRAME||n.is_sync}else if(m.videoCodec===y.CODEC_H264&&(e=n.description.avcC,6==(31&r[4]))&&5==(31&r[5])){let e=0,t=0;for(;255==r[++t+5];)e+=255;let i=6+--t;o=r[i]+e;let n="";for(let e=1;e<=16;e++)n+=r[++i];for(var d=o-16,u=0,h=new Uint8Array(d);h[u]=r[++i],++u<=d;);m.trigger("parse_sei",{data:h,pts:a})}if(t){m.videoCodec==y.CODEC_H265?(s=e.nalu_arrays,m.naluHeader.vps=m.setStartCode(s[0][0].data,!1),m.naluHeader.sps=m.setStartCode(s[1][0].data,!1),m.naluHeader.pps=m.setStartCode(s[2][0].data,!1),3<s.length?m.naluHeader.sei=m.setStartCode(s[3][0].data,!1):m.naluHeader.sei=new Uint8Array):m.videoCodec==y.CODEC_H264&&(m.naluHeader.vps=new Uint8Array,m.naluHeader.sps=m.setStartCode(e.SPS[0].nalu,!1),m.naluHeader.pps=m.setStartCode(e.PPS[0].nalu,!1),m.naluHeader.sei=new Uint8Array),m.setStartCode(r.subarray(0,m.naluHeader.vps.length),!0);if(r[4]===m.naluHeader.vps[4]){var n=m.naluHeader.vps.length+4,c=m.naluHeader.vps.length+m.naluHeader.sps.length+4,f=m.naluHeader.vps.length+m.naluHeader.sps.length+m.naluHeader.pps.length+4;if(m.naluHeader.sei.length<=0&&0<m.naluHeader.sps.length&&r[n]===m.naluHeader.sps[4]&&0<m.naluHeader.pps.length&&r[c]===m.naluHeader.pps[4]&&78===r[f]){let t=0;for(let e=0;e<r.length;e++)if(r[e]===g.SOURCE_CODE_SEI_END&&_.GET_NALU_TYPE(r[e+5])===g.DEFINE_KEY_FRAME){t=e;break}r[3]=1,r[n-1]=1,r[c-1]=1,r[f-1]=1,r[2]=0,r[n-2]=0,r[c-2]=0,r[f-2]=0,r[1]=0,r[n-3]=0,r[c-3]=0,r[f-3]=0,r[t+1]=0,r[t+2]=0,r[t+3]=0,r[t+4]=1,m.naluHeader.vps=null,m.naluHeader.sps=null,m.naluHeader.pps=null,m.naluHeader.vps=new Uint8Array,m.naluHeader.sps=new Uint8Array,m.naluHeader.pps=new Uint8Array}else r=r.subarray(m.naluHeader.vps.length+m.naluHeader.sps.length+m.naluHeader.pps.length+m.naluHeader.sei.length)}
191else if(4<m.naluHeader.sei.length&&r[4]===m.naluHeader.sei[4]){n=r.subarray(0,10);let e=new Uint8Array(m.naluHeader.vps.length+n.length);e.set(n,0),e.set(m.naluHeader.vps,n.length),e[3]=1,m.naluHeader.vps=null,m.naluHeader.vps=new Uint8Array(e),e=null,r=r.subarray(10)}else if(0===m.naluHeader.sei.length&&78===r[4]){r=m.setStartCode(r,!0);let t=0;for(let e=0;e<r.length;e++)if(r[e]===g.SOURCE_CODE_SEI_END&&_.GET_NALU_TYPE(r[e+5])===g.DEFINE_KEY_FRAME){t=e;break}m.naluHeader.sei=r.subarray(0,t+1),r=new Uint8Array(r.subarray(t+1))}(i=new Uint8Array(m.naluHeader.vps.length+m.naluHeader.sps.length+m.naluHeader.pps.length+m.naluHeader.sei.length+r.length)).set(m.naluHeader.vps,0),i.set(m.naluHeader.sps,m.naluHeader.vps.length),i.set(m.naluHeader.pps,m.naluHeader.vps.length+m.naluHeader.sps.length),i.set(m.naluHeader.sei,m.naluHeader.vps.length+m.naluHeader.sps.length+m.naluHeader.pps.length),i.set(m.setStartCode(r,!0),m.naluHeader.vps.length+m.naluHeader.sps.length+m.naluHeader.pps.length+m.naluHeader.sei.length)}else i=m.setStartCode(r,!0);m.bufObject.appendFrame(a,i,!0,t)}else 2==t&&(i=m.setAACAdts(r),m.bufObject.appendFrame(a,i,!1,!0))}}window.clearInterval(i),i=null},0)}},a.prototype.appendBufferData=function(e,t=0){return e.fileStart=t,this.mp4boxfile.appendBuffer(e)},a.prototype.finishBuffer=function(){this.mp4boxfile.flush()},a.prototype.play=function(){},a.prototype.getVideoCoder=function(){return this.videoCodec},a.prototype.getDurationMs=function(){return this.durationMs},a.prototype.getFPS=function(){return this.fps},a.prototype.getSampleRate=function(){return this.sampleRate},a.prototype.getSize=function(){return this.size},a.prototype.seek=function(e){0<=e&&(e=this.bufObject.seekIDR(e),this.seekPos=e)},a.prototype.popBuffer=function(e=1,t=-1){return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0},a.prototype.addBuffer=function(e){e=e.id;this.mp4boxfile.setExtractionOptions(e)},a.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){var t=this.movieInfo;for(let e=0;e<t.tracks.length;e++){var i=t.tracks[e];this.addBuffer(i)}this.initializeSourceBuffers()}},a.prototype.onInitAppended=function(e){e=e.target;"open"===e.ms.readyState&&(e.sampleNum=0,e.removeEventListener("updateend",this.onInitAppended),e.ms.pendingInits--,0===e.ms.pendingInits)&&this.mp4boxfile.start()},a.prototype.initializeSourceBuffers=function(){var t=this.mp4boxfile.initializeSegmentation();for(let e=0;e<t.length;e++){var i=t[e].user;0===e&&(i.ms.pendingInits=0),i.addEventListener("updateend",this.onInitAppended),i.appendBuffer(t[e].buffer),i.segmentIndex=0,i.ms.pendingInits++}},e.exports=a},function(e,t,i){function d(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0}function l(e,t,i){this._byteOffset=t||0,e instanceof ArrayBuffer?this.buffer=e:"object"==typeof e?(this.dataView=e,t&&(this._byteOffset+=t)):this.buffer=new ArrayBuffer(e||0),this.position=0,this.endianness=null==i?l.LITTLE_ENDIAN:i}function n(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)}function r(){var r=[],n=(r[3]="ES_Descriptor",r[4]="DecoderConfigDescriptor",r[5]="DecoderSpecificInfo",r[6]="SLConfigDescriptor",this.getDescriptorName=function(e){return r[e]},this),a={};return this.parseOneDescriptor=function(e){var t,i=0,n=e.readUint8();for(t=e.readUint8(),0;128&t;)i=(127&t)<<7,t=e.readUint8(),0;return c.debug("MPEG4DescriptorParser","Found "+(r[n]||"Descriptor "+n)+", size "+(i+=127&t)+" at position "+e.getPosition()),(n=new(r[n]?a[r[n]]:a.Descriptor)(i)).parse(e),n},a.Descriptor=function(e,t){this.tag=e,this.size=t,this.descs=[]},a.Descriptor.prototype.parse=function(e){this.data=e.readUint8Array(this.size)},a.Descriptor.prototype.findDescriptor=function(e){for(var t=0;t<this.descs.length;t++)if(this.descs[t].tag==e)return this.descs[t];return null},a.Descriptor.prototype.parseRemainingDescriptors=function(e){for(var t=e.position;e.position<t+this.size;){var i=n.parseOneDescriptor(e);this.descs.push(i)}},a.ES_Descriptor=function(e){a.Descriptor.call(this,3,e)},a.ES_Descriptor.prototype=new a.Descriptor,a.ES_Descriptor.prototype.parse=function(e){var t;this.ES_ID=e.readUint16(),this.flags=e.readUint8(),this.size-=3,128&this.flags?(this.dependsOn_ES_ID=e.readUint16(),this.size-=2):this.dependsOn_ES_ID=0,64&this.flags?(t=e.readUint8(),this.URL=e.readString(t),this.size-=t+1):this.URL="",32&this.flags?(this.OCR_ES_ID=e.readUint16(),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(e)},a.ES_Descriptor.prototype.getOTI=function(e){var t=this.findDescriptor(4);return t?t.oti:0},a.ES_Descriptor.prototype.getAudioConfig=function(e){var t,i=this.findDescriptor(4);return(i=i&&i.findDescriptor(5))&&i.data?31===(t=(248&i.data[0])>>3)&&2<=i.data.length?32+((7&i.data[0])<<3)+((224&i.data[1])>>5):t:null},a.DecoderConfigDescriptor=function(e){a.Descriptor.call(this,4,e)},a.DecoderConfigDescriptor.prototype=new a.Descriptor,a.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},a.DecoderSpecificInfo=function(e){a.Descriptor.call(this,5,e)},a.DecoderSpecificInfo.prototype=new a.Descriptor,a.SLConfigDescriptor=function(e){a.Descriptor.call(this,6,e)},a.SLConfigDescriptor.prototype=new a.Descriptor,this}function a(){}function s(){}function L(e){this.stream=e||new n,this.boxes=[],this.mdats=[],this.moofs=[],this.isProgressive=!1,this.moovStartFound=!1,this.onMoovStart=null,this.moovStartSent=!1,this.onReady=null,this.readySe
vendor: 10,520 bytes, line 191
191nt=!1,this.onSegment=null,this.onSamples=null,this.onError=null,this.sampleListBuilt=!1,this.fragmentedTracks=[],this.extractedTracks=[],this.isFragmentationInitialized=!1,this.sampleProcessingStarted=!1,this.nextMoofNumber=0,this.itemListBuilt=!1,this.onSidx=null,this.sidxSent=!1}var c=function(){new Date;return{setLogLevel:function(e){e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log)},log:function(e,t){this.debug(e.msg)},info:function(e,t){},warn:function(e,t){},error:function(e,t){}}}(),o=(c.getDurationString=function(e,t){var i;function n(e,t){for(var i=(""+e).split(".");i[0].length<t;)i[0]="0"+i[0];return i.join(".")}e<0?(i=!0,e=-e):i=!1;var e=e/(t||1),t=Math.floor(e/3600),r=(e-=3600*t,Math.floor(e/60)),a=1e3*(e-=60*r);return a-=1e3*(e=Math.floor(e)),a=Math.floor(a),(i?"-":"")+t+":"+n(r,2)+":"+n(e,2)+"."+n(a,3)},c.printRanges=function(e){var t=e.length;if(0<t){for(var i="",n=0;n<t;n++)0<n&&(i+=","),i+="["+c.getDurationString(e.start(n))+","+c.getDurationString(e.end(n))+"]";return i}return"(empty)"},t.Log=c,d.prototype.getPosition=function(){return this.position},d.prototype.getEndPosition=function(){return this.buffer.byteLength},d.prototype.getLength=function(){return this.buffer.byteLength},d.prototype.seek=function(e){e=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},d.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},d.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i=(i|=this.dataview.getUint8(this.position+1)<<8)|this.dataview.getUint8(this.position+2);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},d.prototype.readUint8=function(){return this.readAnyInt(1,!1)},d.prototype.readUint16=function(){return this.readAnyInt(2,!1)},d.prototype.readUint24=function(){return this.readAnyInt(3,!1)},d.prototype.readUint32=function(){return this.readAnyInt(4,!1)},d.prototype.readUint64=function(){return this.readAnyInt(8,!1)},d.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;i<e;i++)t+=String.fromCharCode(this.readUint8());return t}throw"Not enough bytes in buffer"},d.prototype.readCString=function(){for(var e=[];;){var t=this.readUint8();if(0===t)break;e.push(t)}return String.fromCharCode.apply(null,e)},d.prototype.readInt8=function(){return this.readAnyInt(1,!0)},d.prototype.readInt16=function(){return this.readAnyInt(2,!0)},d.prototype.readInt32=function(){return this.readAnyInt(4,!0)},d.prototype.readInt64=function(){return this.readAnyInt(8,!1)},d.prototype.readUint8Array=function(e){for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readUint8();return t},d.prototype.readInt16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readInt16();return t},d.prototype.readUint16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readUint16();return t},d.prototype.readUint32Array=function(e){for(var t=new Uint32Array(e),i=0;i<e;i++)t[i]=this.readUint32();return t},d.prototype.readInt32Array=function(e){for(var t=new Int32Array(e),i=0;i<e;i++)t[i]=this.readInt32();return t},t.MP4BoxStream=d,(l.prototype={}).getPosition=function(){return this.position},l.prototype._realloc=function(e){if(this._dynamicSize){var t=this._byteOffset+this.position+e,i=this._buffer.byteLength;if(t<=i)t>this._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);i<t;)i*=2;var e=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(e,0,n.length).set(n),this.buffer=e,this._byteLength=t}}},l.prototype._trimAlloc=function(){var e,t,i;this._byteLength!=this._buffer.byteLength&&(e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length),t.set(i),this.buffer=e)},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){e=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(e)||!isFinite(e)?0:e},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(+e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=+e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt32=function(e){e=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,e},l.prototype.readInt16=function(e){e=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,e},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){e=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,e},l.prototype.readUint16=function(e){e=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,e},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){e=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,e},l.prototype.readFloat64=function(e){e=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,e},l.endianness=0<new Int8Array(new Int16Array([1]).buffer)[0],l.memcpy=function(e,t,i,n,r){e=new Uint8Array(e,t,r),t=new Uint8Array(i,n,r);e.set(t)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;i<e.byteLength;i+=e.BYTES_PER_ELEMENT)for(var n=i+e.BYTES_PER_ELEMENT-1,r=i;r<n;n--,r++){var a=t[r];t[r]=t[n],t[n]=a}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i<e.length;i++)t[i]=e[i];return String.fromCharCode.apply(null,t)},l.prototype.readString=function(e,t){return null==t||"ASCII"==t?String.fromCharCodeUint8.apply(null,[this.mapUint8Array(null==e?this.byteLength-this.position:e)]):new TextDecoder(t).decode(this.mapUint8Array(e))},l.prototype.readCString=function(e){var t=this.byteLength-this.position,i=new Uint8Array(this._buffer,this._byteOffset+this.position),n=t;null!=e&&(n=Math.min(e,t));for(var r=0;r<n&&0!==i[r];r++);var a=String.fromCharCodeUint8.apply(null,[this.mapUint8Array(r)]);return null!=e?this.position+=n-r:r!=t&&(this.position+=1),a},Math.pow(2,32)),A=(l.prototype.readInt64=function(){return this.readInt32()*o+this.readUint32()},l.prototype.readUint64=function(){return this.readUint32()*o+this.readUint32()},l.prototype.readInt64=function(){return this.readUint32()*o+this.readUint32()},l.prototype.readUint24=function(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8()},(t.DataStream=l).prototype.save=function(e){var t=new Blob([this.buffer]);if(!window.URL||!URL.createObjectURL)throw"DataStream.save: Can't
191create object URL.";var t=window.URL.createObjectURL(t),i=document.createElement("a");document.body.appendChild(i),i.setAttribute("href",t),i.setAttribute("download",e),i.setAttribute("target","_self"),i.click(),window.URL.revokeObjectURL(t)},l.prototype._dynamicSize=!0,Object.defineProperty(l.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(e){e||this._trimAlloc(),this._dynamicSize=e}}),l.prototype.shift=function(e){var t=new ArrayBuffer(this._byteLength-e),i=new Uint8Array(t),n=new Uint8Array(this._buffer,e,i.length);i.set(n),this.buffer=t,this.position-=e},l.prototype.writeInt32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Int32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt32Array(e.length,t);else for(var i=0;i<e.length;i++)this.writeInt32(e[i],t)},l.prototype.writeInt16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Int16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt16Array(e.length,t);else for(var i=0;i<e.length;i++)this.writeInt16(e[i],t)},l.prototype.writeInt8Array=function(e){if(this._realloc(+e.length),e instanceof Int8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt8Array(e.length);else for(var t=0;t<e.length;t++)this.writeInt8(e[t])},l.prototype.writeUint32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Uint32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint32Array(e.length,t);else for(var i=0;i<e.length;i++)this.writeUint32(e[i],t)},l.prototype.writeUint16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Uint16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint16Array(e.length,t);else for(var i=0;i<e.length;i++)this.writeUint16(e[i],t)},l.prototype.writeUint8Array=function(e){if(this._realloc(+e.length),e instanceof Uint8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint8Array(e.length);else for(var t=0;t<e.length;t++)this.writeUint8(e[t])},l.prototype.writeFloat64Array=function(e,t){if(this._realloc(8*e.length),e instanceof Float64Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapFloat64Array(e.length,t);else for(var i=0;i<e.length;i++)this.writeFloat64(e[i],t)},l.prototype.writeFloat32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Float32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapFloat32Array(e.length,t);else for(var i=0;i<e.length;i++)this.writeFloat32(e[i],t)},l.prototype.writeInt32=function(e,t){this._realloc(4),this._dataView.setInt32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeInt16=function(e,t){this._realloc(2),this._dataView.setInt16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeInt8=function(e){this._realloc(1),this._dataView.setInt8(this.position,e),this.position+=1},l.prototype.writeUint32=function(e,t){this._realloc(4),this._dataView.setUint32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeUint16=function(e,t){this._realloc(2),this._dataView.setUint16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeUint8=function(e){this._realloc(1),this._dataView.setUint8(this.position,e),this.position+=1},l.prototype.writeFloat32=function(e,t){this._realloc(4),this._dataView.setFloat32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeFloat64=function(e,t){this._realloc(8),this._dataView.setFloat64(this.position,e,null==t?this.endianness:t),this.position+=8},l.prototype.writeUCS2String=function(e,t,i){null==i&&(i=e.length);for(var n=0;n<e.length&&n<i;n++)this.writeUint16(e.charCodeAt(n),t);for(;n<i;n++)this.writeUint16(0)},l.prototype.writeString=function(e,t,i){var n=0;if(null==t||"ASCII"==t)if(null!=i){for(var r=Math.min(e.length,i),n=0;n<r;n++)this.writeUint8(e.charCodeAt(n));for(;n<i;n++)this.writeUint8(0)}else for(n=0;n<e.length;n++)this.writeUint8(e.charCodeAt(n));else this.writeUint8Array(new TextEncoder(t).encode(e.substring(0,i)))},l.prototype.writeCString=function(e,t){var i=0;if(null!=t){for(var n=Math.min(e.length,t),i=0;i<n;i++)this.writeUint8(e.charCodeAt(i));for(;i<t;i++)this.writeUint8(0)}else{for(i=0;i<e.length;i++)this.writeUint8(e.charCodeAt(i));this.writeUint8(0)}},l.prototype.writeStruct=function(e,t){for(var i=0;i<e.length;i+=2){var n=e[i+1];this.writeType(n,t[e[i]],t)}},l.prototype.writeType=function(e,t,i){var n;if("function"==typeof e)return e(this,t);if("object"==typeof e&&!(e instanceof Array))return e.set(this,t,i);var r=null,a="ASCII",i=this.position;switch("string"==typeof e&&/:/.test(e)&&(e=(n=e.split(":"))[0],r=parseInt(n[1])),"string"==typeof e&&/,/.test(e)&&(e=(n=e.split(","))[0],a=parseInt(n[1])),e){case"uint8":this.writeUint8(t);break;case"int8":this.writeInt8(t);break;case"uint16":this.writeUint16(t,this.endianness);break;case"int16":this.writeInt16(t,this.endianness);break;case"uint32":this.writeUint32(t,this.endianness);break;case"int32":this.writeInt32(t,this.endianness);break;case"float32":this.writeFloat32(t,this.endianness);break;case"float64":this.writeFloat64(t,this.endianness);break;case"uint16be":this.writeUint16(t,l.BIG_ENDIAN);break;case"int16be":this.writeInt16(t,l.BIG_ENDIAN);break;case"uint32be":this.writeUint32(t,l.BIG_ENDIAN);break;case"int32be":this.writeInt32(t,l.BIG_ENDIAN);break;case"float32be":this.writeFloat32(t,l.BIG_ENDIAN);break;case"float64be":this.writeFloat64(t,l.BIG_ENDIAN);break;case"uint16le":this.writeUint16(t,l.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(t,l.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(t,l.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(t,l.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(t,l.LITTLE_ENDIAN);break;
191case"float64le":this.writeFloat64(t,l.LITTLE_ENDIAN);break;case"cstring":this.writeCString(t,r);break;case"string":this.writeString(t,a,r);break;case"u16string":this.writeUCS2String(t,this.endianness,r);break;case"u16stringle":this.writeUCS2String(t,l.LITTLE_ENDIAN,r);break;case"u16stringbe":this.writeUCS2String(t,l.BIG_ENDIAN,r);break;default:if(3!=e.length)this.writeStruct(e,t);else for(var s=e[1],o=0;o<t.length;o++)this.writeType(s,t[o])}null!=r&&(this.position=i,this._realloc(r),this.position=i+r)},l.prototype.writeUint64=function(e){var t=Math.floor(e/o);this.writeUint32(t),this.writeUint32(4294967295&e)},l.prototype.writeUint24=function(e){this.writeUint8((16711680&e)>>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapInt8Array=function(e){this._realloc(+e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=+e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},(n.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return-1<this.bufferIndex||(0<this.buffers.length?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,c.debug("MultiBufferStream","Stream ready for parsing"),!0):(c.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(c.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){c.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},n.prototype.reduceBuffer=function(e,t,i){var n=new Uint8Array(i);return n.set(new Uint8Array(e,t,i)),n.buffer.fileStart=e.fileStart+t,n.buffer.usedBytes=0,n.buffer},n.prototype.insertBuffer=function(e){for(var t=!0,i=0;i<this.buffers.length;i++){var n=this.buffers[i];if(e.fileStart<=n.fileStart){if(e.fileStart===n.fileStart){if(e.byteLength>n.byteLength){this.buffers.splice(i,1),i--;continue}c.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=n.fileStart||(e=this.reduceBuffer(e,0,n.fileStart-e.fileStart)),c.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break}if(e.fileStart<n.fileStart+n.byteLength){var n=n.fileStart+n.byteLength-e.fileStart,r=e.byteLength-n;if(!(0<r)){t=!1;break}e=this.reduceBuffer(e,n,r)}}t&&(c.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i)&&(this.buffer=e)},n.prototype.logBufferLevel=function(e){for(var t,i,n=[],r="",a=0,s=0,o=0;o<this.buffers.length;o++)t=this.buffers[o],0===o?(n.push(i={}),i.start=t.fileStart,i.end=t.fileStart+t.byteLength,r+="["+i.start+"-"):i.end===t.fileStart?i.end=t.fileStart+t.byteLength:((i={}).start=t.fileStart,r+=n[n.length-1].end-1+"], ["+i.start+"-",i.end=t.fileStart+t.byteLength,n.push(i)),a+=t.usedBytes,s+=t.byteLength;0<n.length&&(r+=i.end-1+"]");e=e?c.info:c.debug;0===this.buffers.length?e("MultiBufferStream","No more buffer in memory"):e("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+a+"/"+s+" bytes), continuous ranges: "+r)},n.prototype.cleanBuffers=function(){for(var e,t=0;t<this.buffers.length;t++)(e=this.buffers[t]).usedBytes===e.byteLength&&(c.debug("MultiBufferStream","Removing buffer #"+t),this.buffers.splice(t,1),t--)},n.prototype.mergeNextBuffer=function(){var e,t,i,n;return this.bufferIndex+1<this.buffers.length&&(n=this.buffers[this.bufferIndex+1]).fileStart===this.buffer.fileStart+this.buffer.byteLength&&(e=this.buffer.byteLength,t=this.buffer.usedBytes,i=this.buffer.fileStart,this.buffers[this.bufferIndex]=ArrayBuffer.concat(this.buffer,n),this.buffer=this.buffers[this.bufferIndex],this.buffers.splice(this.bufferIndex+1,1),this.buffer.usedBytes=t,this.buffer.fileStart=i,c.debug("ISOFile","Concatenating buffer for box parsing (length: "+e+"->"+this.buffer.byteLength+")"),!0)},n.prototype.findPosition=function(e,t,i){for(var n=null,r=-1,a=!0===e?0:this.bufferIndex;a<this.buffers.length&&(n=this.buffers[a]).fileStart<=t;)r=a,i&&(n.fileStart+n.byteLength<=t?n.usedBytes=n.byteLength:n.usedBytes=t-n.fileStart,this.logBufferLevel()),a++;return-1!==r&&(n=this.buffers[r]).fileStart+n.byteLength>=t?(c.debug("MultiBufferStream","Found position in existing buffer #"+r),r):-1},n.prototype.findEndContiguousBuf=function(e){var t,i,e=void 0!==e?e:this.bufferIndex,n=this.buffers[e];if(this.buffers.length>e+1)for(t=e+1;t<this.buffers.length&&(i=this.buffers[t]).fileStart===n.fileStart+n.byteLength;t++)n=i;return n.fileStart+n.byteLength},n.prototype.getEndFilePositionAfter=function(e){var t=this.findPosition(!0,e,!1);return-1!==t?this.findEndContiguousBuf(t):e},n.prototype.addUsedBytes=function(e){this.buffer.usedBytes+=e,this.logBufferLevel()},n.prototype.setAllUsedBytes=function(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel()}
191,n.prototype.seek=function(e,t,i){t=this.findPosition(t,e,i);return-1!==t?(this.buffer=this.buffers[t],this.bufferIndex=t,this.position=e-this.buffer.fileStart,c.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(c.debug("MultiBufferStream","Position "+e+" not found in buffered data"),!1)},n.prototype.getPosition=function(){if(-1===this.bufferIndex||null===this.buffers[this.bufferIndex])throw"Error accessing position in the MultiBufferStream";return this.buffers[this.bufferIndex].fileStart+this.position},n.prototype.getLength=function(){return this.byteLength},n.prototype.getEndPosition=function(){if(-1===this.bufferIndex||null===this.buffers[this.bufferIndex])throw"Error accessing position in the MultiBufferStream";return this.buffers[this.bufferIndex].fileStart+this.byteLength},t.MultiBufferStream=n,t.MPEG4DescriptorParser=r,{ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){A.FullBox.prototype=new A.Box,A.ContainerBox.prototype=new A.Box,A.SampleEntry.prototype=new A.Box,A.TrackGroupTypeBox.prototype=new A.FullBox,A.BASIC_BOXES.forEach(function(e){A.createBoxCtor(e)}),A.FULL_BOXES.forEach(function(e){A.createFullBoxCtor(e)}),A.CONTAINER_BOXES.forEach(function(e){A.createContainerBoxCtor(e[0],null,e[1])})},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){A.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){A.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,n){A.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=n},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){A.FullBox.call(this,e,t)},createBoxCtor:function(t,e){A.boxCodes.push(t),A[t+"Box"]=function(e){A.Box.call(this,t,e)},A[t+"Box"].prototype=new A.Box,e&&(A[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,i){A[t+"Box"]=function(e){A.FullBox.call(this,t,e)},A[t+"Box"].prototype=new A.FullBox,A[t+"Box"].prototype.parse=function(e){this.parseFullHeader(e),i&&i.call(this,e)}},addSubBoxArrays:function(e){if(e)for(var t=(this.subBoxNames=e).length,i=0;i<t;i++)this[e[i]+"s"]=[]},createContainerBoxCtor:function(t,e,i){A[t+"Box"]=function(e){A.ContainerBox.call(this,t,e),A.addSubBoxArrays.call(this,i)},A[t+"Box"].prototype=new A.ContainerBox,e&&(A[t+"Box"].prototype.parse=e)},createMediaSampleEntryCtor:function(e,t,i){A.sampleEntryCodes[e]=[],A[e+"SampleEntry"]=function(e,t){A.SampleEntry.call(this,e,t),A.addSubBoxArrays.call(this,i)},A[e+"SampleEntry"].prototype=new A.SampleEntry,t&&(A[e+"SampleEntry"].prototype.parse=t)},createSampleEntryCtor:function(t,i,e,n){A.sampleEntryCodes[t].push(i),A[i+"SampleEntry"]=function(e){A[t+"SampleEntry"].call(this,i,e),A.addSubBoxArrays.call(this,n)},A[i+"SampleEntry"].prototype=new A[t+"SampleEntry"],e&&(A[i+"SampleEntry"].prototype.parse=e)},createEncryptedSampleEntryCtor:function(e,t,i){A.createSampleEntryCtor.call(this,e,t,i,["sinf"])},createSampleGroupCtor:function(t,e){A[t+"SampleGroupEntry"]=function(e){A.SampleGroupEntry.call(this,t,e)},A[t+"SampleGroupEntry"].prototype=new A.SampleGroupEntry,e&&(A[t+"SampleGroupEntry"].prototype.parse=e)},createTrackGroupCtor:function(t,e){A[t+"TrackGroupTypeBox"]=function(e){A.TrackGroupTypeBox.call(this,t,e)},A[t+"TrackGroupTypeBox"].prototype=new A.TrackGroupTypeBox,e&&(A[t+"TrackGroupTypeBox"].prototype.parse=e)},createUUIDBox:function(t,i,n,r){A.UUIDs.push(t),A.UUIDBoxes[t]=function(e){(i?A.FullBox:n?A.ContainerBox:A.Box).call(this,"uuid",e,t)},A.UUIDBoxes[t].prototype=new(i?A.FullBox:n?A.ContainerBox:A.Box),r&&(A.UUIDBoxes[t].prototype.parse=i?function(e){this.parseFullHeader(e),r&&r.call(this,e)}:r)}}),u=(A.initialize(),A.TKHD_FLAG_ENABLED=1,A.TKHD_FLAG_IN_MOVIE=2,A.TKHD_FLAG_IN_PREVIEW=4,A.TFHD_FLAG_BASE_DATA_OFFSET=1,A.TFHD_FLAG_SAMPLE_DESC=2,A.TFHD_FLAG_SAMPLE_DUR=8,A.TFHD_FLAG_SAMPLE_SIZE=16,A.TFHD_FLAG_SAMPLE_FLAGS=32,A.TFHD_FLAG_DUR_EMPTY=65536,A.TFHD_FLAG_DEFAULT_BASE_IS_MOOF=131072,A.TRUN_FLAGS_DATA_OFFSET=1,A.TRUN_FLAGS_FIRST_FLAG=4,A.TRUN_FLAGS_DURATION=256,A.TRUN_FLAGS_SIZE=512,A.TRUN_FLAGS_FLAGS=1024,A.TRUN_FLAGS_CTS_OFFSET=2048,A.Box.prototype.add=function(e){return this.addBox(new A[e+"Box"])},A.Box.prototype.addBox=function(e){return this.boxes.push(e),this[e.type+"s"]?this[e.type+"s"].push(e):this[e.type]=e,e},A.Box.prototype.set=function(e,t){return this[e]=t,this},A.Box.prototype.addEntry=function(e,t){t=t||"entries";return this[t]||(this[t]=[]),this[t].push(e),this},(t.BoxParser=A).parseUUID=function(e){return A.parseHex16(e)},A.parseHex16=function(e){for(var t="",i=0;i<16;i++){var n=e.readUint8().toString(16);t+=1===n.length?"0"+n:n}return t},A.parseOneBox=function(e,t,i){var n,r,a=e.getPosition(),s=0;if(e.getEndPosition()-a<8)return c.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:A.ERR_NOT_ENOUGH_DATA};
vendor: 5,317 bytes, line 191
191if(i&&i<8)return c.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:A.ERR_NOT_ENOUGH_DATA};var o=e.readUint32(),l=e.readString(4),u=l;if(c.debug("BoxParser","Found box of type '"+l+"' and size "+o+" at position "+a),s=8,"uuid"==l){if(e.getEndPosition()-e.getPosition()<16||i-s<16)return e.seek(a),c.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:A.ERR_NOT_ENOUGH_DATA};s+=16,u=r=A.parseUUID(e)}if(1==o){if(e.getEndPosition()-e.getPosition()<8||i&&i-s<8)return e.seek(a),c.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+l+'" box'),{code:A.ERR_NOT_ENOUGH_DATA};o=e.readUint64(),s+=8}else if(0===o)if(i)o=i;else if("mdat"!==l)return c.error("BoxParser","Unlimited box size not supported for type: '"+l+"'"),n=new A.Box(l,o),{code:A.OK,box:n,size:n.size};return o<s?(c.error("BoxParser","Box of type "+l+" has an invalid size "+o+" (too small to be a box)"),{code:A.ERR_NOT_ENOUGH_DATA,type:l,size:o,hdr_size:s,start:a}):i&&i<o?(c.error("BoxParser","Box of type '"+l+"' has a size "+o+" greater than its container size "+i),{code:A.ERR_NOT_ENOUGH_DATA,type:l,size:o,hdr_size:s,start:a}):a+o>e.getEndPosition()?(e.seek(a),c.info("BoxParser","Not enough data in stream to parse the entire '"+l+"' box"),{code:A.ERR_NOT_ENOUGH_DATA,type:l,size:o,hdr_size:s,start:a}):t?{code:A.OK,type:l,size:o,hdr_size:s,start:a}:(A[l+"Box"]?n=new A[l+"Box"](o):"uuid"!==l?(c.warn("BoxParser","Unknown box type: '"+l+"'"),(n=new A.Box(l,o)).has_unparsed_data=!0):A.UUIDBoxes[r]?n=new A.UUIDBoxes[r](o):(c.warn("BoxParser","Unknown uuid type: '"+r+"'"),(n=new A.Box(l,o)).uuid=r,n.has_unparsed_data=!0),n.hdr_size=s,n.start=a,n.write===A.Box.prototype.write&&"mdat"!==n.type&&(c.info("BoxParser","'"+u+"' box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(e)),n.parse(e),(i=e.getPosition()-(n.start+n.size))<0?(c.warn("BoxParser","Parsing of box '"+u+"' did not read the entire indicated box data size (missing "+-i+" bytes), seeking forward"),e.seek(n.start+n.size)):0<i&&(c.error("BoxParser","Parsing of box '"+u+"' read "+i+" more bytes than the indicated box data size, seeking backwards"),e.seek(n.start+n.size)),{code:A.OK,box:n,size:n.size})},A.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},A.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},A.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},A.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},A.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},A.ContainerBox.prototype.parse=function(e){for(;e.getPosition()<this.start+this.size;){if((i=A.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==A.OK)return;var t,i=i.box;this.boxes.push(i),this.subBoxNames&&-1!=this.subBoxNames.indexOf(i.type)?this[this.subBoxNames[this.subBoxNames.indexOf(i.type)]+"s"].push(i):this[t="uuid"!==i.type?i.type:i.uuid]?c.warn("Box of type "+t+" already stored in field of this type"):this[t]=i}},A.Box.prototype.parseLanguage=function(e){this.language=e.readUint16();e=[];e[0]=this.language>>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},A.SAMPLE_ENTRY_TYPE_VISUAL="Visual",A.SAMPLE_ENTRY_TYPE_AUDIO="Audio",A.SAMPLE_ENTRY_TYPE_HINT="Hint",A.SAMPLE_ENTRY_TYPE_METADATA="Metadata",A.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",A.SAMPLE_ENTRY_TYPE_SYSTEM="System",A.SAMPLE_ENTRY_TYPE_TEXT="Text",A.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},A.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},A.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},A.SampleEntry.prototype.parseFooter=function(e){A.ContainerBox.prototype.parse.call(this,e)},A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_HINT),A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_METADATA),A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SUBTITLE),A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SYSTEM),A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_TEXT),A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)}),A.createMediaSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_AUDIO,function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_c
191ount=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),A.createEncryptedSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),A.createEncryptedSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),A.createEncryptedSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),A.createEncryptedSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),A.createEncryptedSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_TEXT,"enct"),A.createEncryptedSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_METADATA,"encm"),A.createBoxCtor("a1lx",function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var i=0;i<3;i++)this.layer_size[i]=16==t?e.readUint16():e.readUint32()}),A.createBoxCtor("a1op",function(e){this.op_index=e.readUint8()}),A.createFullBoxCtor("auxC",function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)}),A.createBoxCtor("av1C",function(e){var t=e.readUint8();if(t>>7&!1)c.error("av1C marker problem");else if(this.version=127&t,1!==this.version)c.error("av1C version "+this.version+" not supported");else if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0!==this.reserved_1)c.error("av1C reserved_1 parsing problem");else{if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void c.error("av1C reserved_2 parsing problem");t=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(t)}}),A.createBoxCtor("avcC",function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t<this.nb_SPS_nalus;t++)this.SPS[t]={},this.SPS[t].length=e.readUint16(),this.SPS[t].nalu=e.readUint8Array(this.SPS[t].length),i-=2+this.SPS[t].length;for(this.nb_PPS_nalus=e.readUint8(),i--,this.PPS=[],t=0;t<this.nb_PPS_nalus;t++)this.PPS[t]={},this.PPS[t].length=e.readUint16(),this.PPS[t].nalu=e.readUint8Array(this.PPS[t].length),i-=2+this.PPS[t].length;0<i&&(this.ext=e.readUint8Array(i))}),A.createBoxCtor("btrt",function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()}),A.createBoxCtor("clap",function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32()}),A.createBoxCtor("clli",function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()}),A.createFullBoxCtor("co64",function(e){var t,i=e.readUint32();if(this.chunk_offsets=[],0===this.version)for(t=0;t<i;t++)this.chunk_offsets.push(e.readUint64())}),A.createFullBoxCtor("CoLL",function(e){this.maxCLL=e.readUint16(),this.maxFALL=e.readUint16()}),A.createBoxCtor("colr",function(e){var t;this.colour_type=e.readString(4),"nclx"===this.colour_type?(this.colour_primaries=e.readUint16(),this.transfer_characteristics=e.readUint16(),this.matrix_coefficients=e.readUint16(),t=e.readUint8(),this.full_range_flag=t>>7):"rICC"!==this.colour_type&&"prof"!==this.colour_type||(this.ICC_profile=e.readUint8Array(this.size-4))}),A.createFullBoxCtor("cprt",function(e){this.parseLanguage(e),this.notice=e.readCString()}),A.createFullBoxCtor("cslg",function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())}),A.createFullBoxCtor("ctts",function(e){var t,i=e.readUint32();if(this.sample_counts=[],this.sample_offsets=[],0===this.version)for(t=0;t<i;t++){this.sample_counts.push(e.readUint32());var n=e.readInt32();n<0&&c.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(n)}else if(1==this.version)for(t=0;t<i;t++)this.sample_counts.push(e.readUint32()),this.sample_offsets.push(e.readInt32())}),A.createBoxCtor("dac3",function(e){var t=e.readUint8(),i=e.readUint8(),e=e.readUint8();this.fscod=t>>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|e>>5&7}),A.createBoxCtor("dec3",function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i<this.num_ind_sub+1;i++){var n={},r=(this.ind_subs.push(n),e.readUint8()),a=e.readUint8(),s=e.readUint8();n.fscod=r>>6,n.bsid=r>>1&31,n.bsmod=(1&r)<<4|a>>4&15,n.acmod=a>>1&7,n.lfeon=1&a,n.num_dep_sub=s>>1&15,0<n.num_dep_sub&&(n.chan_loc=(1&s)<<8|e.readUint8())}}),A.createFullBoxCtor("dfLa",function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var n=e.readUint8(),r=Math.min(127&n,i.length-1);if(r?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[r]),128&n)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"}),A.createBoxCtor("dimm",function(e){this.bytessent=e.readUint64()}),A.createBoxCtor("dmax",function(e){this.time=e.readUint32()}),A.createBoxCtor("dmed",function(e){this.bytessent=e.readUint64()}),A.createFullBoxCtor("dref",function(e){this.entries=[];for(var t,i=e.readUint32(),n=0;n<i;n++){if((t=A.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==A.OK)return;t=t.box,this.entries.push(t)}}),A.createBoxCtor("drep",function(e){this.bytessent=e.readUint64()}),A.createFullBoxCtor("elng",function(e){this.extended_language=e.readString(this.size-this.hdr_size)}),A.createFullBoxCtor("elst",function(e){this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var n={};this.entries.push(n),1===this.version?(n.segment_duration=e.readUint64(),n.media_time=e.readInt64()):(n.segment_duration=e.readUint32(),n.media_time=e.readInt32()),n.media_rate_integer=e.readInt16(),n.media_rate_fraction=e.readInt16()}}),A.createFullBoxCtor("emsg",function(e){1==this.version?(this.timescale=e.readUint32(),this.presentation_time=e.readUint64(),this.event_duration=e.readUint32(),this.id=e.readUint32(),this.scheme_id_uri=e.readCString(),this.value=e.readCString()):(this.scheme_id_uri=e.readCString(),this.value=e.readCString(),this.timescale=e.readUint32(),this.presentation_time_delta=e.readUint32(),this.event_duration=e.readUint32(),this.id=e.readUint32());var t=this.size-this.hdr_size-(16+(this.scheme_id_uri.length+1)+(this.value.length+1));1==this.version&&(t-=4),this.message_data=e.readUint8Array(t)}),A.createFullBoxCtor("esds",function(e){var e=e.readUint8Array(this.size-this.hdr_size),t=new r;this.esd=t.parseOneDescriptor(new l(e.buffer,0,l.BIG_ENDIAN))}),A.createBoxCtor("fiel",function(e){this.fieldCount=e.readUint8(),this.fieldOrdering=e.readUint8()}),A.createBoxCtor("frma",function(e){this.data_format=e.readString(4)}),A.createBoxCtor("ftyp",function(e){for(var t=this.size-this.hdr_size,i=(this.major_brand=e.readString(4),this.minor_version=e.readUint32(),t-=8,this.compatible_brands=[],0);4<=t;)this.compatible_brands[i]=e.readString(4),t-=4,i++}),A.createFullBoxCtor("hdlr",function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1])&&(this.name=this.name.slice(0,-1))}),A.createBoxCtor("hvcC",function(e){this.configurationVersion=e.readUint8(),i=e.readUint8(),this.general_profile_space
vendor: 16,384 bytes, line 191
191=i>>6,this.general_tier_flag=(32&i)>>5,this.general_profile_idc=31&i,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),i=e.readUint8(),this.constantFrameRate=i>>6,this.numTemporalLayers=(13&i)>>3,this.temporalIdNested=(4&i)>>2,this.lengthSizeMinusOne=3&i,this.nalu_arrays=[];for(var t,i,n=e.readUint8(),r=0;r<n;r++)for(var a=[],s=(this.nalu_arrays.push(a),i=e.readUint8(),a.completeness=(128&i)>>7,a.nalu_type=63&i,e.readUint16()),o=0;o<s;o++){var l={};a.push(l),t=e.readUint16(),l.data=e.readUint8Array(t)}}),A.createFullBoxCtor("iinf",function(e){var t;0===this.version?this.entry_count=e.readUint16():this.entry_count=e.readUint32(),this.item_infos=[];for(var i=0;i<this.entry_count;i++){if((t=A.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==A.OK)return;"infe"!==t.box.type&&c.error("BoxParser","Expected 'infe' box, got "+t.box.type),this.item_infos[i]=t.box}}),A.createFullBoxCtor("iloc",function(e){var t=e.readUint8(),i=(this.offset_size=t>>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[],0);if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32()}for(var n=0;n<i;n++){var r={};if(this.items.push(r),!(this.version<2)&&2!==this.version)throw"version of iloc box not supported";switch(r.item_ID=e.readUint16(),1===this.version||2===this.version?r.construction_method=15&e.readUint16():r.construction_method=0,r.data_reference_index=e.readUint16(),this.base_offset_size){case 0:r.base_offset=0;break;case 4:r.base_offset=e.readUint32();break;case 8:r.base_offset=e.readUint64();break;default:throw"Error reading base offset size"}var a=e.readUint16();r.extents=[];for(var s=0;s<a;s++){var o={};if(r.extents.push(o),1===this.version||2===this.version)switch(this.index_size){case 0:o.extent_index=0;break;case 4:o.extent_index=e.readUint32();break;case 8:o.extent_index=e.readUint64();break;default:throw"Error reading extent index"}switch(this.offset_size){case 0:o.extent_offset=0;break;case 4:o.extent_offset=e.readUint32();break;case 8:o.extent_offset=e.readUint64();break;default:throw"Error reading extent index"}switch(this.length_size){case 0:o.extent_length=0;break;case 4:o.extent_length=e.readUint32();break;case 8:o.extent_length=e.readUint64();break;default:throw"Error reading extent index"}}}}),A.createBoxCtor("imir",function(e){e=e.readUint8();this.reserved=e>>7,this.axis=1&e}),A.createFullBoxCtor("infe",function(e){0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version?(this.extension_type=e.readString(4),c.warn("BoxParser","Cannot parse extension type"),e.seek(this.start+this.size)):2<=this.version&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))}),A.createFullBoxCtor("ipma",function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t<entry_count;t++){var n={},r=(this.associations.push(n),this.version<1?n.id=e.readUint16():n.id=e.readUint32(),e.readUint8());for(n.props=[],i=0;i<r;i++){var a=e.readUint8(),s={};n.props.push(s),s.essential=(128&a)>>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a}}}),A.createFullBoxCtor("iref",function(e){var t;for(this.references=[];e.getPosition()<this.start+this.size;){if((t=A.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==A.OK)return;(t=new(0===this.version?A.SingleItemTypeReferenceBox:A.SingleItemTypeReferenceBoxLarge)(t.type,t.size,t.hdr_size,t.start)).write===A.Box.prototype.write&&"mdat"!==t.type&&(c.warn("BoxParser",t.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),t.parseDataAndRewind(e)),t.parse(e),this.references.push(t)}}),A.createBoxCtor("irot",function(e){this.angle=3&e.readUint8()}),A.createFullBoxCtor("ispe",function(e){this.image_width=e.readUint32(),this.image_height=e.readUint32()}),A.createFullBoxCtor("kind",function(e){this.schemeURI=e.readCString(),this.value=e.readCString()}),A.createFullBoxCtor("leva",function(e){var t=e.readUint8();this.levels=[];for(var i=0;i<t;i++){var n={},r=((this.levels[i]=n).track_ID=e.readUint32(),e.readUint8());switch(n.padding_flag=r>>7,n.assignment_type=127&r,n.assignment_type){case 0:n.grouping_type=e.readString(4);break;case 1:n.grouping_type=e.readString(4),n.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:n.sub_track_id=e.readUint32();break;default:c.warn("BoxParser","Unknown leva assignement type")}}}),A.createBoxCtor("lsel",function(e){this.layer_id=e.readUint16()}),A.createBoxCtor("maxr",function(e){this.period=e.readUint32(),this.bytes=e.readUint32()}),A.createBoxCtor("mdcv",function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()}),A.createFullBoxCtor("mdhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()}),A.createFullBoxCtor("mehd",function(e){1&this.flags&&(c.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()}),A.createFullBoxCtor("meta",function(e){this.boxes=[],A.ContainerBox.prototype.parse.call(this,e)}),A.createFullBoxCtor("mfhd",function(e){this.sequence_number=e.readUint32()}),A.createFullBoxCtor("mfro",function(e){this._size=e.readUint32()}),A.createFullBoxCtor("mvhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()}),A.createBoxCtor("npck",function(e){this.packetssent=e.readUint32()}),A.createBoxCtor("nump",function(e){this.packetssent=e.readUint64()}),A.createFullBoxCtor("padb",function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i<Math.floor((t+1)/2);i++)this.padbits=e.readUint8()}),A.createBoxCtor("pasp",function(e){this.hSpacing=e.readUint32(),this.vSpacing=e.readUint32()}),A.createBoxCtor("payl",function(e){this.text=e.readString(this.size-this.hdr_size)}),A.createBoxCtor("payt",function(e){this.payloadID=e.readUint32();var t=e.readUint8();this.rtpmap_string=e.readString(t)}),A.createFullBoxCtor("pdin",function(e){var t=(this.size-this.hdr_size)/8;this.rate=[],this.initial_delay=[];for(var i=0;i<t;i++)this.rate[i]=e.readUint32(),this.initial_delay[i]=e.readUint32()}),A.createFullBoxCtor("pitm",function(e){0===this.version?this.item_id=e.readUint16():this.item_id=e.readUint32()}),A.createFullBoxCtor("pixi",function(e){var t;for(this.num_channels=e.readUint8(),this.bits_per_channels=[],t=0;t<this.num_channels;t++)this.bits_per_channels[t]=e.readUint8()}),A.createBoxCtor("pmax",function(e){this.bytes=e.readUint32()}),A.createFullBoxCtor("prft",function(e){this.ref_track_id=e.readUint32(),this.ntp_timestamp=e.readUint64(),0===this.version?this.media_time=e.readUint32():this.media_time=e.readUint64()}),A.createFullBoxCtor("pssh",function(e){if(this.system_id=A.parseHex16(e),0<this.version){var t=e.readUint32();this.kid=[];for(var i=0;i<t;i++)this.kid[i]=A.parseHex16(e)}var n=e.readUint32();0<n&&(this.data=e.readUint8Array(n))}),A.createFullBoxCtor("clef",function(e){this.width=e.readUint32(),this.height=e.readUint32()}),A.createFullBoxCtor("enof",function(e){this.width=e.readUint32(),this.height=e.readUint32()}),A.createFullBoxCtor("prof",function(e){this.width=e.readUint32(),this.height=e.readUint32()}),A.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),A.createBoxCtor("rtp ",function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)}),A.createFullBoxCtor("saio",function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i<t;i++)0===this.version?this.offset[i]=e.readUint32():this.offset[i]=e.readUint64()}),A.createFullBoxCtor("saiz",function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32()),this.default_sample_info_size=e.readUint8();var t=e.readUint32();if(this.sample_info_size=[],0===this.default_sample_info_size)for(var i=0;i<t;i++)this.sample_info_size[i]=e.readUint8()}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_METADATA,"mett",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_METADATA,"metx",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.namespace=e.readCString(),this.schema_location=e.readCString(),this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SUBTITLE,"sbtt",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SUBTITLE,"stpp",function(e){this.parseHeader(e),this.namespace=e.readCString(),this.schema_location=e.readCString(),this.auxiliary_mime_types=e.readCString(),this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SUBTITLE,"stxt",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_SUBTITLE,"tx3g",function(e){this.parseHeader(e),this.displayFlags=e.readUint32(),this.horizontal_justification=e.readInt8(),this.vertical_justification=e.readInt8(),this.bg_color_rgba=e.readUint8Array(4),this.box_record=e.readInt16Array(4),this.style_record=e.readUint8Array(12),this.parseFooter(e)}),A.createSampleEntryCtor(A.SAMPLE_ENTRY_TYPE_METADATA,"wvtt",function(e){this.parseHeader(e),this.parseFooter(e)}),A.createSampleGroupCtor("alst",function(e){var t,i=e.readUint16();for(this.first_output_sample=e.readUint16(),this.sample_offset=[],t=0;t<i;t++)this.sample_offset[t]=e.readUint32();var n=this.description_length-4-4*i;for(this.num_output_samples=[],this.num_total_samples=[],t=0;t<n/4;t++)this.num_output_samples[t]=e.readUint16(),this.num_total_samples[t]=e.readUint16()}),A.createSampleGroupCtor("avll",function(e){this.layerNumber=e.readUint8(),this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()}),A.createSampleGroupCtor("avss",function(e){this.subSequenceIdentifier=e.readUint16(),this.layerNumber=e.readUint8();for(var t=e.readUint8(),i=(this.durationFlag=t>>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[],e.readUint8()),n=0;n<i;n++){var r={};this.dependency.push(r),r.subSeqDirectionFlag=e.readUint8(),r.layerNumber=e.readUint8(),r.subSequenceIdentifier=e.readUint16()}}),A.createSampleGroupCtor("dtrt",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("mvif",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("prol",function(e){this.roll_distance=e.readInt16()}),A.createSampleGroupCtor("rap ",function(e){e=e.readUint8();this.num_leading_samples_known=e>>7,this.num_leading_samples=127&e}),A.createSampleGroupCtor("rash",function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)c.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t<this.operation_point_count;t++)this.available_bitrate[t]=e.readUint32(),this.target_rate_share[t]=e.readUint16()}this.maximum_bitrate=e.readUint32(),this.minimum_bitrate=e.readUint32(),this.discard_priority=e.readUint8()}}),A.createSampleGroupCtor("roll",function(e){this.roll_distance=e.readInt16()}),A.SampleGroupEntry.prototype.parse=function(e){c.warn("BoxParser","Unknown Sample Group type: "+this.grouping_type),this.data=e.readUint8Array(this.description_length)},A.createSampleGroupCtor("scif",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("scnm",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("seig",function(e){this.reserved=e.readUint8();var t=e.readUint8();this.crypt_byte_block=t>>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=A.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))}),A.createSampleGroupCtor("stsa",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("sync",function(e){e=e.readUint8();this.NAL_unit_type=63&e}),A.createSampleGroupCtor("tele",function(e){e=e.readUint8();this.level_independently_decodable=e>>7}),A.createSampleGroupCtor("tsas",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("tscl",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createSampleGroupCtor("vipr",function(e){c.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),A.createFullBoxCtor("sbgp",function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var n={};this.entries.push(n),n.sample_count=e.readInt32(),n.group_description_index=e.readInt32()}}),A.createFullBoxCtor("schm",function(e){this.scheme_type=e.readString(4),this.scheme_version=e.readUint32(),1&this.flags&&(this.scheme_uri=e.readString(this.size-this.hdr_size-8))}),A.createBoxCtor("sdp ",function(e){this.sdptext=e.readString(this.size-this.hdr_size)}),A.createFullBoxCtor("sdtp",function(e){var t,i=this.size-this.hdr_size;this.is_leading=[],this.sample_depends_on=[],this.sample_is_depended_on=[],this.sample_has_redundancy=[];for(var n=0;n<i;n++)t=e.readUint8(),this.is_leading[n]=t>>6,this.sample_depends_on[n]=t>>4&3,this.sample_is_depended_on[n]=t>>2&3,this.sample_has_redundancy[n]=3&t}),A.createFullBoxCtor("senc"),A.createFullBoxCtor("sgpd",function(e){this.grouping_type=e.readStrin
191g(4),c.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,2<=this.version&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var n=new(A[this.grouping_type+"SampleGroupEntry"]?A[this.grouping_type+"SampleGroupEntry"]:A.SampleGroupEntry)(this.grouping_type);this.entries.push(n),1===this.version&&0===this.default_length?n.description_length=e.readUint32():n.description_length=this.default_length,n.write===A.SampleGroupEntry.prototype.write&&(c.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),n.data=e.readUint8Array(n.description_length),e.position-=n.description_length),n.parse(e)}}),A.createFullBoxCtor("sidx",function(e){this.reference_ID=e.readUint32(),this.timescale=e.readUint32(),0===this.version?(this.earliest_presentation_time=e.readUint32(),this.first_offset=e.readUint32()):(this.earliest_presentation_time=e.readUint64(),this.first_offset=e.readUint64()),e.readUint16(),this.references=[];for(var t=e.readUint16(),i=0;i<t;i++){var n={},r=(this.references.push(n),e.readUint32());n.reference_type=r>>31&1,n.referenced_size=2147483647&r,n.subsegment_duration=e.readUint32(),r=e.readUint32(),n.starts_with_SAP=r>>31&1,n.SAP_type=r>>28&7,n.SAP_delta_time=268435455&r}}),A.SingleItemTypeReferenceBox=function(e,t,i,n){A.Box.call(this,e,t),this.hdr_size=i,this.start=n},A.SingleItemTypeReferenceBox.prototype=new A.Box,A.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i<t;i++)this.references[i]=e.readUint16()},A.SingleItemTypeReferenceBoxLarge=function(e,t,i,n){A.Box.call(this,e,t),this.hdr_size=i,this.start=n},A.SingleItemTypeReferenceBoxLarge.prototype=new A.Box,A.SingleItemTypeReferenceBoxLarge.prototype.parse=function(e){this.from_item_ID=e.readUint32();var t=e.readUint16();this.references=[];for(var i=0;i<t;i++)this.references[i]=e.readUint32()},A.createFullBoxCtor("SmDm",function(e){this.primaryRChromaticity_x=e.readUint16(),this.primaryRChromaticity_y=e.readUint16(),this.primaryGChromaticity_x=e.readUint16(),this.primaryGChromaticity_y=e.readUint16(),this.primaryBChromaticity_x=e.readUint16(),this.primaryBChromaticity_y=e.readUint16(),this.whitePointChromaticity_x=e.readUint16(),this.whitePointChromaticity_y=e.readUint16(),this.luminanceMax=e.readUint32(),this.luminanceMin=e.readUint32()}),A.createFullBoxCtor("smhd",function(e){this.balance=e.readUint16(),e.readUint16()}),A.createFullBoxCtor("ssix",function(e){this.subsegments=[];for(var t=e.readUint32(),i=0;i<t;i++)for(var n={},r=(this.subsegments.push(n),n.ranges=[],e.readUint32()),a=0;a<r;a++){var s={};n.ranges.push(s),s.level=e.readUint8(),s.range_size=e.readUint24()}}),A.createFullBoxCtor("stco",function(e){var t=e.readUint32();if(this.chunk_offsets=[],0===this.version)for(var i=0;i<t;i++)this.chunk_offsets.push(e.readUint32())}),A.createFullBoxCtor("stdp",function(e){var t=(this.size-this.hdr_size)/2;this.priority=[];for(var i=0;i<t;i++)this.priority[i]=e.readUint16()}),A.createFullBoxCtor("sthd"),A.createFullBoxCtor("stri",function(e){this.switch_group=e.readUint16(),this.alternate_group=e.readUint16(),this.sub_track_id=e.readUint32();var t=(this.size-this.hdr_size-8)/4;this.attribute_list=[];for(var i=0;i<t;i++)this.attribute_list[i]=e.readUint32()}),A.createFullBoxCtor("stsc",function(e){var t,i=e.readUint32();if(this.first_chunk=[],this.samples_per_chunk=[],this.sample_description_index=[],0===this.version)for(t=0;t<i;t++)this.first_chunk.push(e.readUint32()),this.samples_per_chunk.push(e.readUint32()),this.sample_description_index.push(e.readUint32())}),A.createFullBoxCtor("stsd",function(e){var t,i,n,r;for(this.entries=[],n=e.readUint32(),t=1;t<=n;t++){if((i=A.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==A.OK)return;A[i.type+"SampleEntry"]?((r=new A[i.type+"SampleEntry"](i.size)).hdr_size=i.hdr_size,r.start=i.start):(c.warn("BoxParser","Unknown sample entry type: "+i.type),r=new A.SampleEntry(i.type,i.size,i.hdr_size,i.start)),r.write===A.SampleEntry.prototype.write&&(c.info("BoxParser","SampleEntry "+r.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),this.entries.push(r)}}),A.createFullBoxCtor("stsg",function(e){this.grouping_type=e.readUint32();var t=e.readUint16();this.group_description_index=[];for(var i=0;i<t;i++)this.group_description_index[i]=e.readUint32()}),A.createFullBoxCtor("stsh",function(e){var t,i=e.readUint32();if(this.shadowed_sample_numbers=[],this.sync_sample_numbers=[],0===this.version)for(t=0;t<i;t++)this.shadowed_sample_numbers.push(e.readUint32()),this.sync_sample_numbers.push(e.readUint32())}),A.createFullBoxCtor("stss",function(e){var t,i=e.readUint32();if(0===this.version)for(this.sample_numbers=[],t=0;t<i;t++)this.sample_numbers.push(e.readUint32())}),A.createFullBoxCtor("stsz",function(e){var t;if(this.sample_sizes=[],0===this.version)for(this.sample_size=e.readUint32(),this.sample_count=e.readUint32(),t=0;t<this.sample_count;t++)0===this.sample_size?this.sample_sizes.push(e.readUint32()):this.sample_sizes[t]=this.sample_size}),A.createFullBoxCtor("stts",function(e){var t,i,n=e.readUint32();if(this.sample_counts=[],this.sample_deltas=[],0===this.version)for(t=0;t<n;t++)this.sample_counts.push(e.readUint32()),(i=e.readInt32())<0&&(c.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),i=1),this.sample_deltas.push(i)}),A.createFullBoxCtor("stvi",function(e){var t,i=e.readUint32(),i=(this.single_view_allowed=3&i,this.stereo_scheme=e.readUint32(),e.readUint32());for(this.stereo_indication_type=e.readString(i),this.boxes=[];e.getPosition()<this.start+this.size;){if((t=A.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==A.OK)return;t=t.box,this.boxes.push(t),this[t.type]=t}}),A.createBoxCtor("styp",function(e){A.ftypBox.prototype.parse.call(this,e)}),A.createFullBoxCtor("stz2",function(e){var t,i;if(this.sample_sizes=[],0===this.version)if(this.reserved=e.readUint24(),this.field_size=e.readUint8(),i=e.readUint32(),4===this.field_size)for(t=0;t<i;t+=2){var n=e.readUint8();this.sample_sizes[t]=n>>4&15,this.sample_sizes[t+1]=15&n}else if(8===this.field_size)for(t=0;t<i;t++)this.sample_sizes[t]=e.readUint8();else if(16===this.field_size)for(t=0;t<i;t++)this.sample_sizes[t]=e.readUint16();else c.error("BoxParser","Error in length field in stz2 box")}),A.createFullBoxCtor("subs",function(e){var t,i,n,r=e.readUint32();for(this.entries=[],t=0;t<r;t++){var a={};if((this.entries[t]=a).sample_delta=e.readUint32(),a.subsamples=[],0<(n=e.readUint16()))for(i=0;i<n;i++){var s={};a.subsamples.push(s),1==this.version?s.size=e.readUint32():s.size=e.readUint16(),s.priority=e.readUint8(),s.discardable=e.readUint8(),s.codec_specific_parameters=e.readUint32()}}}),A.createFullBoxCtor("tenc",function(e){var t;e.readUint8(),0===this.version?e.readUint8():(t=e.readUint8(),this.default_crypt_byte_block=t>>4&15,this.default_skip_byte_block=15&t),this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=A.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))}),A.createFullBoxCtor("tfdt",function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()}),A.createFullBoxCtor("tfhd",function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&A.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&A.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&A.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&A.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&A.TFHD_FLAG_SAMPLE_FLAGS?this.default_sample_flags=e.readUint32():this.default_sample_flags=0}),A.createFullBoxCtor("tfra",function(e){this.track_ID=e.readUint32(),e.readUint24();for(var t=e.readUint8(),i=(this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[],e.readUint32()),n=0;n<i;n++)1===this.version?(this.time=e.readUint64(),this.moof_offset=e.readUint64()):(this.time=e.readUint32(),this.moof_offset=e.readUint32()),this.traf_number=e["readUint"+8*(this.length_size_of_traf_num+1)](),this.trun_number=e["readUint"+8*(this.length_size_of_trun_num+1)](),this.sample_number=e["readUint"+8*(this.length_size_of_sample_num+1)]()}),A.createFullBoxCtor("tkhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.track_id=e.readUint32(),e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.track_id=e.readUint32(),e.readUint32(),this.duration=e.readUint32()),e.readUint32Array(2),this.layer=e.readInt16(),this.alternate_group=e.readInt16(),this.volume=e.readInt16()>>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()}),A.createBoxCtor("tmax",function(e){this.time=e.readUint32()}),A.createBoxCtor("tmin",function(e){this.time=e.readUint32()}),A.createBoxCtor("totl",function(e){this.bytessent=e.readUint32()}),A.createBoxCtor("tpay",function(e){this.bytessent=e.readUint32()}),A.createBoxCtor("tpyl",function(e){this.bytessent=e.readUint64()}),A.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},A.createTrackGroupCtor("msrc"),A.TrackReferenceTypeBox=function(e,t,i,n){A.Box.call(this,e,t),this.hdr_size=i,this.start=n},A.TrackReferenceTypeBox.prototype=new A.Box,A.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},A.trefBox.prototype.parse=function(e){for(var t;e.getPosition()<this.start+this.size;){if((t=A.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==A.OK)return;(t=new A.TrackReferenceTypeBox(t.type,t.size,t.hdr_size,t.start)).write===A.Box.prototype.write&&"mdat"!==t.type&&(c.info("BoxParser","TrackReference "+t.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),t.parseDataAndRewind(e)),t.parse(e),this.boxes.push(t)}},A.createFullBoxCtor("trep",function(e){for(this.track_ID=e.readUint32(),this.boxes=[];e.getPosition()<this.start+this.size;){if((ret=A.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==A.OK)return;box=ret.box,this.boxes.push(box)}}),A.createFullBoxCtor("trex",function(e){this.track_id=e.readUint32(),this.default_sample_description_index=e.readUint32(),this.default_sample_duration=e.readUint32(),this.default_sample_size=e.readUint32(),this.default_sample_flags=e.readUint32()}),A.createBoxCtor("trpy",function(e){this.bytessent=e.readUint64()}),A.createFullBoxCtor("trun",function(e){var t=0;if(this.sample_count=e.readUint32(),this.size-this.hdr_size>(t+=4)&&this.flags&A.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&A.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i<this.sample_count;i++)this.flags&A.TRUN_FLAGS_DURATION&&(this.sample_duration[i]=e.readUint32()),this.flags&A.TRUN_FLAGS_SIZE&&(this.sample_size[i]=e.readUint32()),this.flags&A.TRUN_FLAGS_FLAGS&&(this.sample_flags[i]=e.readUint32()),this.flags&A.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?this.sample_composition_time_offset[i]=e.readUint32():this.sample_composition_time_offset[i]=e.readInt32())}),A.createFullBoxCtor("tsel",function(e){this.switch_group=e.readUint32();var t=(this.size-this.hdr_size-4)/4;this.attribute_list=[];for(var i=0;i<t;i++)this.attribute_list[i]=e.readUint32()}),A.createFullBoxCtor("txtC",function(e){this.config=e.readCString()}),A.createFullBoxCtor("url ",function(e){1!==this.flags&&(this.location=e.readCString())}),A.createFullBoxCtor("urn ",function(e){this.name=e.readCString(),0<this.size-this.hdr_size-this.name.length-1&&(this.location=e.readCString())}),A.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}),A.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(e){this.system_id=A.parseHex16(e);var t=e.readUint32();0<t&&(this.data=e.readUint8Array(t))}),A.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),A.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=A.parseHex16(e)}),A.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(e){this.fragment_c
191ount=e.readUint8(),this.entries=[];for(var t=0;t<this.fragment_count;t++){var i={},n=0,r=0,r=1===this.version?(n=e.readUint64(),e.readUint64()):(n=e.readUint32(),e.readUint32());i.absolute_time=n,i.absolute_duration=r,this.entries.push(i)}}),A.createUUIDBox("6d1d9b0542d544e680e2141daff757b2",!0,!1,function(e){1===this.version?(this.absolute_time=e.readUint64(),this.duration=e.readUint64()):(this.absolute_time=e.readUint32(),this.duration=e.readUint32())}),A.createFullBoxCtor("vmhd",function(e){this.graphicsmode=e.readUint16(),this.opcolor=e.readUint16Array(3)}),A.createFullBoxCtor("vpcC",function(e){var t;1===this.version?(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8()):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)}),A.createBoxCtor("vttC",function(e){this.text=e.readString(this.size-this.hdr_size)}),A.SampleEntry.prototype.isVideo=function(){return!1},A.SampleEntry.prototype.isAudio=function(){return!1},A.SampleEntry.prototype.isSubtitle=function(){return!1},A.SampleEntry.prototype.isMetadata=function(){return!1},A.SampleEntry.prototype.isHint=function(){return!1},A.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},A.SampleEntry.prototype.getWidth=function(){return""},A.SampleEntry.prototype.getHeight=function(){return""},A.SampleEntry.prototype.getChannelCount=function(){return""},A.SampleEntry.prototype.getSampleRate=function(){return""},A.SampleEntry.prototype.getSampleSize=function(){return""},A.VisualSampleEntry.prototype.isVideo=function(){return!0},A.VisualSampleEntry.prototype.getWidth=function(){return this.width},A.VisualSampleEntry.prototype.getHeight=function(){return this.height},A.AudioSampleEntry.prototype.isAudio=function(){return!0},A.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},A.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},A.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},A.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},A.MetadataSampleEntry.prototype.isMetadata=function(){return!0},A.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?2:t;i.length<t;)i="0"+i;return i},A.avc1SampleEntry.prototype.getCodec=A.avc2SampleEntry.prototype.getCodec=A.avc3SampleEntry.prototype.getCodec=A.avc4SampleEntry.prototype.getCodec=function(){var e=A.SampleEntry.prototype.getCodec.call(this);return this.avcC?e+"."+A.decimalToHex(this.avcC.AVCProfileIndication)+A.decimalToHex(this.avcC.profile_compatibility)+A.decimalToHex(this.avcC.AVCLevelIndication):e},A.hev1SampleEntry.prototype.getCodec=A.hvc1SampleEntry.prototype.getCodec=function(){var e=A.SampleEntry.prototype.getCodec.call(this);if(this.hvcC){switch(e+=".",this.hvcC.general_profile_space){case 0:e+="";break;case 1:e+="A";break;case 2:e+="B";break;case 3:e+="C"}for(var e=e+this.hvcC.general_profile_idc+".",t=this.hvcC.general_profile_compatibility,i=0,n=0;n<32&&(i|=1&t,31!=n);n++)i<<=1,t>>=1;e=e+A.decimalToHex(i,0)+".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var r=!1,a="";for(n=5;0<=n;n--)(this.hvcC.general_constraint_indicator[n]||r)&&(a="."+A.decimalToHex(this.hvcC.general_constraint_indicator[n],0)+a,r=!0);e+=a}return e},A.mp4aSampleEntry.prototype.getCodec=function(){var e,t,i=A.SampleEntry.prototype.getCodec.call(this);return this.esds&&this.esds.esd?(e=this.esds.esd.getOTI(),t=this.esds.esd.getAudioConfig(),i+"."+A.decimalToHex(e)+(t?"."+t:"")):i},A.stxtSampleEntry.prototype.getCodec=function(){var e=A.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},A.av01SampleEntry.prototype.getCodec=function(){var e,t=A.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e},A.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>o&&(this.size+=8),"uuid"===this.type&&(this.size+=16),c.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>
vendor: 13,823 bytes, line 191
191o?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>o&&e.writeUint64(this.size)},A.FullBox.prototype.writeHeader=function(e){this.size+=4,A.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},A.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},A.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t<this.boxes.length;t++)this.boxes[t]&&(this.boxes[t].write(e),this.size+=this.boxes[t].size);c.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},A.TrackReferenceTypeBox.prototype.write=function(e){this.size=4*this.track_ids.length,this.writeHeader(e),e.writeUint32Array(this.track_ids)},A.avcCBox.prototype.write=function(e){var t;for(this.size=7,t=0;t<this.SPS.length;t++)this.size+=2+this.SPS[t].length;for(t=0;t<this.PPS.length;t++)this.size+=2+this.PPS[t].length;for(this.ext&&(this.size+=this.ext.length),this.writeHeader(e),e.writeUint8(this.configurationVersion),e.writeUint8(this.AVCProfileIndication),e.writeUint8(this.profile_compatibility),e.writeUint8(this.AVCLevelIndication),e.writeUint8(this.lengthSizeMinusOne+252),e.writeUint8(this.SPS.length+224),t=0;t<this.SPS.length;t++)e.writeUint16(this.SPS[t].length),e.writeUint8Array(this.SPS[t].nalu);for(e.writeUint8(this.PPS.length),t=0;t<this.PPS.length;t++)e.writeUint16(this.PPS[t].length),e.writeUint8Array(this.PPS[t].nalu);this.ext&&e.writeUint8Array(this.ext)},A.co64Box.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.chunk_offsets.length,this.writeHeader(e),e.writeUint32(this.chunk_offsets.length),t=0;t<this.chunk_offsets.length;t++)e.writeUint64(this.chunk_offsets[t])},A.cslgBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeInt32(this.compositionToDTSShift),e.writeInt32(this.leastDecodeToDisplayDelta),e.writeInt32(this.greatestDecodeToDisplayDelta),e.writeInt32(this.compositionStartTime),e.writeInt32(this.compositionEndTime)},A.cttsBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(e),e.writeUint32(this.sample_counts.length),t=0;t<this.sample_counts.length;t++)e.writeUint32(this.sample_counts[t]),1===this.version?e.writeInt32(this.sample_offsets[t]):e.writeUint32(this.sample_offsets[t])},A.drefBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.entries.length);for(var t=0;t<this.entries.length;t++)this.entries[t].write(e),this.size+=this.entries[t].size;c.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},A.elngBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=this.extended_language.length,this.writeHeader(e),e.writeString(this.extended_language)},A.elstBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4+12*this.entries.length,this.writeHeader(e),e.writeUint32(this.entries.length);for(var t=0;t<this.entries.length;t++){var i=this.entries[t];e.writeUint32(i.segment_duration),e.writeInt32(i.media_time),e.writeInt16(i.media_rate_integer),e.writeInt16(i.media_rate_fraction)}},A.emsgBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=16+this.message_data.length+(this.scheme_id_uri.length+1)+(this.value.length+1),this.writeHeader(e),e.writeCString(this.scheme_id_uri),e.writeCString(this.value),e.writeUint32(this.timescale),e.writeUint32(this.presentation_time_delta),e.writeUint32(this.event_duration),e.writeUint32(this.id),e.writeUint8Array(this.message_data)},A.ftypBox.prototype.write=function(e){this.size=8+4*this.compatible_brands.length,this.writeHeader(e),e.writeString(this.major_brand,null,4),e.writeUint32(this.minor_version);for(var t=0;t<this.compatible_brands.length;t++)e.writeString(this.compatible_brands[t],null,4)},A.hdlrBox.prototype.write=function(e){this.size=20+this.name.length+1,this.version=0,this.flags=0,this.writeHeader(e),e.writeUint32(0),e.writeString(this.handler,null,4),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeCString(this.name)},A.kindBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=this.schemeURI.length+1+(this.value.length+1),this.writeHeader(e),e.writeCString(this.schemeURI),e.writeCString(this.value)},A.mdhdBox.prototype.write=function(e){this.size=20,this.flags=0,this.version=0,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.timescale),e.writeUint32(this.duration),e.writeUint16(this.language),e.writeUint16(0)},A.mehdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.fragment_duration)},A.mfhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.sequence_number)},A.mvhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=96,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.timescale),e.writeUint32(this.duration),e.writeUint32(this.rate),e.writeUint16(this.volume<<8),e.writeUint16(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32Array(this.matrix),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(this.next_track_id)},A.SampleEntry.prototype.writeHeader=function(e){this.size=8,A.Box.prototype.writeHeader.call(this,e),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint16(this.data_reference_index)},A.SampleEntry.prototype.writeFooter=function(e){for(var t=0;t<this.boxes.length;t++)this.boxes[t].write(e),this.size+=this.boxes[t].size;c.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},A.SampleEntry.prototype.write=function(e){this.writeHeader(e),e.writeUint8Array(this.data),this.size+=this.data.length,c.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},A.VisualSampleEntry.prototype.write=function(e){this.writeHeader(e),this.size+=70,e.writeUint16(0),e.writeUint16(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint16(this.width),e.writeUint16(this.height),e.writeUint32(this.horizresolution),e.writeUint32(this.vertresolution),e.writeUint32(0),e.writeUint16(this.frame_count),e.writeUint8(Math.min(31,this.compressorname.length)),e.writeString(this.compressorname,null,31),e.writeUint16(this.depth),e.writeInt16(-1),this.writeFooter(e)},A.AudioSampleEntry.prototype.write=function(e){this.writeHeader(e),this.size+=20,e.writeUint32(0),e.writeUint32(0),e.writeUint16(this.channel_count),e.writeUint16(this.samplesize),e.writeUint16(0),e.writeUint16(0),e.writeUint32(this.samplerate<<16),this.writeFooter(e)},A.stppSampleEntry.prototype.write=function(e){this.writeHeader(e),this.size+=this.namespace.length+1+this.schema_location.length+1+this.auxiliary_mime_types.length+1,e.writeCString(this.namespace),e.writeCString(this.schema_location),e.writeCString(this.auxiliary_mime_types),this.writeFooter(e)},A.SampleGroupEntry.prototype.write=function(e){e.writeUint8Array(this.data)},A.sbgpBox.prototype.write=function(e){this.version=1,this.flags=0,this.size=12+8*this.entries.length,this.writeHeader(e),e.writeString(this.grouping_type,null,4),e.writeUint32(this.grouping_type_parameter),e.writeUint32(this.entries.length);for(var t=0;t<this.entries.length;t++){var i=this.entries[t];e.writeInt32(i.sample_count),e.writeInt32(i.group_description_index)}},A.sgpdBox.prototype.write=function(e){var t,i;for(this.flags=0,this.size=12,t=0;t<this.entries.length;t++)i=this.entries[t],1===this.version&&(0===this.default_length&&(this.size+=4),this.size+=i.data.length);for(this.writeHeader(e),e.writeString(this.grouping_type,null,4),1===this.version&&e.writeUint32(this.default_length),2<=this.version&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t<this.entries.length;t++)i=this.entries[t],1===this.version&&0===this.default_length&&e.writeUint32(i.description_length),i.write(e)},A.sidxBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20+12*this.references.length,this.writeHeader(e),e.writeUint32(this.reference_ID),e.writeUint32(this.timescale),e.writeUint32(this.earliest_presentation_time),e.writeUint32(this.first_offset),e.writeUint16(0),e.writeUint16(this.references.length);for(var t=0;t<this.references.length;t++){var i=this.references[t];e.writeUint32(i.reference_type<<31|i.referenced_size),e.writeUint32(i.subsegment_duration),e.writeUint32(i.starts_with_SAP<<31|i.SAP_type<<28|i.SAP_delta_time)}},A.stcoBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4+4*this.chunk_offsets.length,this.writeHeader(e),e.writeUint32(this.chunk_offsets.length),e.writeUint32Array(this.chunk_offsets)},A.stscBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+12*this.first_chunk.length,this.writeHeader(e),e.writeUint32(this.first_chunk.length),t=0;t<this.first_chunk.length;t++)e.writeUint32(this.first_chunk[t]),e.writeUint32(this.samples_per_chunk[t]),e.writeUint32(this.sample_description_index[t])},A.stsdBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=0,this.writeHeader(e),e.writeUint32(this.entries.length),this.size+=4,t=0;t<this.entries.length;t++)this.entries[t].write(e),this.size+=this.entries[t].size;c.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},A.stshBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.shadowed_sample_numbers.length,this.writeHeader(e),e.writeUint32(this.shadowed_sample_numbers.length),t=0;t<this.shadowed_sample_numbers.length;t++)e.writeUint32(this.shadowed_sample_numbers[t]),e.writeUint32(this.sync_sample_numbers[t])},A.stssBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4+4*this.sample_numbers.length,this.writeHeader(e),e.writeUint32(this.sample_numbers.length),e.writeUint32Array(this.sample_numbers)},A.stszBox.prototype.write=function(e){var t,i=!0;if(this.version=0,(this.flags=0)<this.sample_sizes.length)for(t=0;t+1<this.sample_sizes.length;){if(this.sample_sizes[t+1]!==this.sample_sizes[0]){i=!1;break}t++}else i=!1;this.size=8,i||(this.size+=4*this.sample_sizes.length),this.writeHeader(e),i?e.writeUint32(this.sample_sizes[0]):e.writeUint32(0),e.writeUint32(this.sample_sizes.length),i||e.writeUint32Array(this.sample_sizes)},A.sttsBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(e),e.writeUint32(this.sample_counts.length),t=0;t<this.sample_counts.length;t++)e.writeUint32(this.sample_counts[t]),e.writeUint32(this.sample_deltas[t])},A.tfdtBox.prototype.write=function(e){var t=Math.pow(2,32)-1;this.version=this.baseMediaDecodeTime>t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},A.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&A.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&A.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&A.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&A.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&A.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&A.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&A.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&A.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&A.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&A.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},A.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},A.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},A.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&A.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&A.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&A.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&A.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&A.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&A.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&A.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&A.TRUN_FLAGS_FIRST_FLAG&&e.
191writeUint32(this.first_sample_flags);for(var t=0;t<this.sample_count;t++)this.flags&A.TRUN_FLAGS_DURATION&&e.writeUint32(this.sample_duration[t]),this.flags&A.TRUN_FLAGS_SIZE&&e.writeUint32(this.sample_size[t]),this.flags&A.TRUN_FLAGS_FLAGS&&e.writeUint32(this.sample_flags[t]),this.flags&A.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?e.writeUint32(this.sample_composition_time_offset[t]):e.writeInt32(this.sample_composition_time_offset[t]))},A["url Box"].prototype.write=function(e){this.version=0,this.location?(this.flags=0,this.size=this.location.length+1):(this.flags=1,this.size=0),this.writeHeader(e),this.location&&e.writeCString(this.location)},A["urn Box"].prototype.write=function(e){this.version=0,this.flags=0,this.size=this.name.length+1+(this.location?this.location.length+1:0),this.writeHeader(e),e.writeCString(this.name),this.location&&e.writeCString(this.location)},A.vmhdBox.prototype.write=function(e){this.version=0,this.flags=1,this.size=8,this.writeHeader(e),e.writeUint16(this.graphicsmode),e.writeUint16Array(this.opcolor)},A.cttsBox.prototype.unpack=function(e){for(var t,i=0,n=0;n<this.sample_counts.length;n++)for(t=0;t<this.sample_counts[n];t++)e[i].pts=e[i].dts+this.sample_offsets[n],i++},A.sttsBox.prototype.unpack=function(e){for(var t,i=0,n=0;n<this.sample_counts.length;n++)for(t=0;t<this.sample_counts[n];t++)e[i].dts=0===i?0:e[i-1].dts+this.sample_deltas[n],i++},A.stcoBox.prototype.unpack=function(e){for(var t=0;t<this.chunk_offsets.length;t++)e[t].offset=this.chunk_offsets[t]},A.stscBox.prototype.unpack=function(e){for(var t,i,n=0,r=0,a=0;a<this.first_chunk.length;a++)for(t=0;t<(a+1<this.first_chunk.length?this.first_chunk[a+1]:1/0);t++)for(r++,i=0;i<this.samples_per_chunk[a];i++){if(!e[n])return;e[n].description_index=this.sample_description_index[a],e[n].chunk_index=r,n++}},A.stszBox.prototype.unpack=function(e){for(var t=0;t<this.sample_sizes.length;t++)e[t].size=this.sample_sizes[t]},A.DIFF_BOXES_PROP_NAMES=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],A.DIFF_PRIMITIVE_ARRAY_PROP_NAMES=["compatible_brands","matrix","opcolor","sample_counts","sample_counts","sample_deltas","first_chunk","samples_per_chunk","sample_sizes","chunk_offsets","sample_offsets","sample_description_index","sample_duration"],A.boxEqualFields=function(e,t){if(e&&!t)return!1;for(var i in e)if(!(-1<A.DIFF_BOXES_PROP_NAMES.indexOf(i)||e[i]instanceof A.Box||t[i]instanceof A.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&-1<e.subBoxNames.indexOf(i.slice(0,4))||t.subBoxNames&&-1<t.subBoxNames.indexOf(i.slice(0,4))||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||-1<A.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)||e[i]===t[i]))return!1;return!0},A.boxEqual=function(e,t){if(!A.boxEqualFields(e,t))return!1;for(var i=0;i<A.DIFF_BOXES_PROP_NAMES.length;i++){var n=A.DIFF_BOXES_PROP_NAMES[i];if(e[n]&&t[n]&&!A.boxEqual(e[n],t[n]))return!1}return!0},a.prototype.parseSample=function(e){var t,i={resources:[]},n=new d(e.data.buffer);if(e.subsamples&&0!==e.subsamples.length){if(i.documentString=n.readString(e.subsamples[0].size),1<e.subsamples.length)for(t=1;t<e.subsamples.length;t++)i.resources[t]=n.readUint8Array(e.subsamples[t].size)}else i.documentString=n.readString(e.data.length);return"undefined"!=typeof DOMParser&&(i.document=(new DOMParser).parseFromString(i.documentString,"application/xml")),i},s.prototype.parseSample=function(e){return new d(e.data.buffer).readString(e.data.length)},s.prototype.parseConfig=function(e){e=new d(e.buffer);return e.readUint32(),e.readCString()},t.XMLSubtitlein4Parser=a,t.Textin4Parser=s,L.prototype.setSegmentOptions=function(e,t,i){var n,r=this.getTrackById(e);r&&(this.fragmentedTracks.push(n={}),n.id=e,n.user=t,(n.trak=r).nextSample=0,n.segmentStream=null,n.nb_samples=1e3,n.rapAlignement=!0,i)&&(i.nbSamples&&(n.nb_samples=i.nbSamples),i.rapAlignement)&&(n.rapAlignement=i.rapAlignement)},L.prototype.unsetSegmentOptions=function(e){for(var t=-1,i=0;i<this.fragmentedTracks.length;i++)this.fragmentedTracks[i].id==e&&(t=i);-1<t&&this.fragmentedTracks.splice(t,1)},L.prototype.setExtractionOptions=function(e,t,i){var n,r=this.getTrackById(e);r&&(this.extractedTracks.push(n={}),n.id=e,n.user=t,(n.trak=r).nextSample=0,n.nb_samples=1e3,n.samples=[],i)&&i.nbSamples&&(n.nb_samples=i.nbSamples)},L.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i<this.extractedTracks.length;i++)this.extractedTracks[i].id==e&&(t=i);-1<t&&this.extractedTracks.splice(t,1)},L.prototype.parse=function(){var e;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(!this.processIncompleteMdat())return}else if(this.saveParsePosition&&this.saveParsePosition(),(e=A.parseOneBox(this.stream,!1)).code===A.ERR_NOT_ENOUGH_DATA){if(!this.processIncompleteBox)return;if(!this.processIncompleteBox(e))return}else{var t,i="uuid"!==(t=e.box).type?t.type:t.uuid;switch(this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&c.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},L.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(c.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(c.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(c.warn("ISOFile","Not ready to start parsing"),!1))},L.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart)&&this.onMoovStart(),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySe
vendor: 10,250 bytes, line 191
191nt&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition||0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems)&&this.processItems(this.onItem),this.stream.cleanBuffers&&(c.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),c.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},L.prototype.getInfo=function(){var e,t,i,n,r,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e<this.moov.traks.length;e++){if(r=(i=this.moov.traks[e]).mdia.minf.stbl.stsd.entries[0],a.tracks.push(n={}),n.id=i.tkhd.track_id,n.name=i.mdia.hdlr.name,n.references=[],i.tref)for(t=0;t<i.tref.boxes.length;t++)ref={},n.references.push(ref),ref.type=i.tref.boxes[t].type,ref.track_ids=i.tref.boxes[t].track_ids;i.edts&&(n.edits=i.edts.elst.entries),n.created=new Date(s+1e3*i.tkhd.creation_time),n.modified=new Date(s+1e3*i.tkhd.modification_time),n.movie_duration=i.tkhd.duration,n.movie_timescale=a.timescale,n.layer=i.tkhd.layer,n.alternate_group=i.tkhd.alternate_group,n.volume=i.tkhd.volume,n.matrix=i.tkhd.matrix,n.track_width=i.tkhd.width/65536,n.track_height=i.tkhd.height/65536,n.timescale=i.mdia.mdhd.timescale,n.cts_shift=i.mdia.minf.stbl.cslg,n.duration=i.mdia.mdhd.duration,n.samples_duration=i.samples_duration,n.codec=r.getCodec(),n.kind=i.udta&&i.udta.kinds.length?i.udta.kinds[0]:{schemeURI:"",value:""},n.language=i.mdia.elng?i.mdia.elng.extended_language:i.mdia.mdhd.languageString,n.nb_samples=i.samples.length,n.size=i.samples_size,n.bitrate=8*n.size*n.timescale/n.samples_duration,r.isAudio()?(n.type="audio",a.audioTracks.push(n),n.audio={},n.audio.sample_rate=r.getSampleRate(),n.audio.channel_count=r.getChannelCount(),n.audio.sample_size=r.getSampleSize()):r.isVideo()?(n.type="video",a.videoTracks.push(n),n.video={},n.video.width=r.getWidth(),n.video.height=r.getHeight()):(r.isSubtitle()?(n.type="subtitles",a.subtitleTracks):r.isHint()?(n.type="metadata",a.hintTracks):r.isMetadata()?(n.type="metadata",a.metadataTracks):(n.type="metadata",a.otherTracks)).push(n)}else a.hasMoov=!1;if(a.mime="",a.hasMoov&&a.tracks){for(a.videoTracks&&0<a.videoTracks.length?a.mime+='video/mp4; codecs="':a.audioTracks&&0<a.audioTracks.length?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e<a.tracks.length;e++)0!==e&&(a.mime+=","),a.mime+=a.tracks[e].codec;a.mime+='"; profiles="',a.mime+=this.ftyp.compatible_brands.join(),a.mime+='"'}return a},L.prototype.processSamples=function(e){var t;if(this.sampleProcessingStarted){if(this.isFragmentationInitialized&&null!==this.onSegment)for(t=0;t<this.fragmentedTracks.length;t++)for(var i=this.fragmentedTracks[t],n=i.trak;n.nextSample<n.samples.length&&this.sampleProcessingStarted;){c.debug("ISOFile","Creating media fragment on track #"+i.id+" for sample "+n.nextSample);var r=this.createFragment(i.id,n.nextSample,i.segmentStream);if(!r)break;if(i.segmentStream=r,n.nextSample++,(n.nextSample%i.nb_samples==0||e||n.nextSample>=n.samples.length)&&(c.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,n.nextSample-i.nb_samples)+","+(n.nextSample-1)+"]"),c.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,n.nextSample,e||n.nextSample>=n.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}if(null!==this.onSamples)for(t=0;t<this.extractedTracks.length;t++){var a=this.extractedTracks[t];for(n=a.trak;n.nextSample<n.samples.length&&this.sampleProcessingStarted;){c.debug("ISOFile","Exporting on track #"+a.id+" sample #"+n.nextSample);var s=this.getSample(n,n.nextSample);if(!s)break;if(n.nextSample++,a.samples.push(s),(n.nextSample%a.nb_samples==0||n.nextSample>=n.samples.length)&&(c.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+n.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[t]))break}}}},L.prototype.getBox=function(e){e=this.getBoxes(e,!0);return e.length?e[0]:null},L.prototype.getBoxes=function(e,t){var i=[];return L._sweep.call(this,e,i,t),i},L._sweep=function(e,t,i){for(var n in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;L._sweep.call(this.boxes[n],e,t,i)}},L.prototype.getTrackSamplesInfo=function(e){e=this.getTrackById(e);if(e)return e.samples},L.prototype.getTrackSample=function(e,t){e=this.getTrackById(e);return this.getSample(e,t)},L.prototype.releaseUsedSamples=function(e,t){var i=0,n=this.getTrackById(e);n.lastValidSample||(n.lastValidSample=0);for(var r=n.lastValidSample;r<t;r++)i+=this.releaseSample(n,r);c.info("ISOFile","Track #"+e+" released samples up to "+t+" (released size: "+i+", remaining: "+this.samplesDataSize+")"),n.lastValidSample=t},L.prototype.start=function(){this.sampleProcessingStarted=!0,this.processSamples(!1)},L.prototype.stop=function(){this.sampleProcessingStarted=!1},L.prototype.flush=function(){c.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0)},L.prototype.seekTrack=function(e,t,i){var n,r,a,s,o=0,l=0;if(0===i.samples.length)return c.info("ISOFile","No sample in track, cannot seek! Using time "+c.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(n=0;n<i.samples.length;n++){if(r=i.samples[n],0===n)l=0,s=r.timescale;else if(r.cts>e*r.timescale){l=n-1;break}t&&r.is_sync&&(o=n)}for(t&&(l=o),e=i.samples[l].cts,i.nextSample=l;i.samples[l].alreadyRead===i.samples[l].size&&i.samples[l+1];)l++;return a=i.samples[l].offset+i.samples[l].alreadyRead,c.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+c.getDurationString(e,s)+" and offset: "+a),{offset:a,time:e/s}},L.prototype.seek=function(e,t){var i,n,r=this.moov,a={offset:1/0,time:1/0};if(this.moov){for(n=0;n<r.traks.length;n++)i=r.traks[n],(i=this.seekTrack(e,t,i)).offset<a.offset&&(a.offset=i.offset),i.time<a.time&&(a.time=i.time);return c.info("ISOFile","Seeking at time "+c.getDurationString(a.time,1)+" needs a buffer with a fileStart position of "+a.offset),a.offset===1/0?a={offset:this.nextParsePosition,time:0}:a.offset=this.stream.getEndFilePositionAfter(a.offset),c.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+a.offset),a}throw"Cannot seek: moov not received!"},L.prototype.equal=function(e){for(var t=0;t<this.boxes.length&&t<e.boxes.length;){var i=this.boxes[t],n=e.boxes[t];if(!A.boxEqual(i,n))return!1;t++}return!0},(t.ISOFile=L).prototype.lastBoxStartPosition=0,L.prototype.parsingMdat=null,L.prototype.nextParsePosition=0,L.prototype.discardMdatData=!1,L.prototype.processIncompleteBox=function(e){var t;return"mdat"===e.type?(t=new A[e.type+"Box"](e.size),this.parsingMdat=t,this.boxes.push(t),this.mdats.push(t),t.start=e.start,t.hdr_size=e.hdr_size,this.stream.addUsedBytes(t.hdr_size),this.lastBoxStartPosition=t.start+t.size,this.stream.seek(t.start+t.size,!1,this.discardMdatData)?!(this.parsingMdat=null):(this.moovStartFound?this.nextParsePosition=this.stream.findEndContiguousBuf():this.nextParsePosition=t.start+t.size,!1)):("moov"===e.type&&(this.moovStartFound=!0,0===this.mdats.length)&&(this.isProgressive=!0),!!this.stream.mergeNextBuffer&&this.stream.mergeNextBuffer()?(this.nextParsePosition=this.stream.getEndPosition(),!0):(!e.type||this.moovStartFound?this.nextParsePosition=this.stream.getEndPosition():this.nextParsePosition=this.stream.getPosition()+e.size,!1))},L.prototype.hasIncompleteMdat=function(){return null!==this.parsingMdat},L.prototype.processIncompleteMdat=function(){var e=this.parsingMdat;return this.stream.seek(e.start+e.size,!1,this.discardMdatData)?(c.debug("ISOFile","Found 'mdat' end in buffered data"),!(this.parsingMdat=null)):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1)},L.prototype.restoreParsePosition=function(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData)},L.prototype.saveParsePosition=function(){this.lastBoxStartPosition=this.stream.getPosition()},L.prototype.updateUsedBytes=function(e,t){this.stream.addUsedBytes&&("mdat"===e.type?(this.stream.addUsedBytes(e.hdr_size),this.discardMdatData&&this.stream.addUsedBytes(e.size-e.hdr_size)):this.stream.addUsedBytes(e.size))},L.prototype.add=A.Box.prototype.add,L.prototype.addBox=A.Box.prototype.addBox,L.prototype.init=function(e){var e=e||{},t=(this.add("ftyp").set("major_brand",e.brands&&e.brands[0]||"iso4").set("minor_version",0).set("compatible_brands",e.brands||["iso4"]),this.add("moov"));return t.add("mvhd").set("timescale",e.timescale||600).set("rate",e.rate||65536).set("creation_time",0).set("modification_time",0).set("duration",e.duration||0).set("volume",e.width?0:256).set("matrix",[65536,0,0,0,65536,0,0,0,1073741824]).set("next_track_id",1),t.add("mvex"),this},L.prototype.addTrack=function(e){this.moov||this.init(e);var t=e||{},e=(t.width=t.width||320,t.height=t.height||320,t.id=t.id||this.moov.mvhd.next_track_id,t.type=t.type||"avc1",this.moov.add("trak")),i=(this.moov.mvhd.next_track_id=t.
191id+1,e.add("tkhd").set("flags",A.TKHD_FLAG_ENABLED|A.TKHD_FLAG_IN_MOVIE|A.TKHD_FLAG_IN_PREVIEW).set("creation_time",0).set("modification_time",0).set("track_id",t.id).set("duration",t.duration||0).set("layer",t.layer||0).set("alternate_group",0).set("volume",1).set("matrix",[0,0,0,0,0,0,0,0,0]).set("width",t.width).set("height",t.height),e.add("mdia")),n=(i.add("mdhd").set("creation_time",0).set("modification_time",0).set("timescale",t.timescale||1).set("duration",t.media_duration||0).set("language",t.language||"und"),i.add("hdlr").set("handler",t.hdlr||"vide").set("name",t.name||"Track created with MP4Box.js"),i.add("elng").set("extended_language",t.language||"fr-FR"),i.add("minf"));if(void 0!==A[t.type+"SampleEntry"]){var r,a,s,o=new A[t.type+"SampleEntry"],l=(o.data_reference_index=1,"");for(r in A.sampleEntryCodes)for(var u=A.sampleEntryCodes[r],h=0;h<u.length;h++)if(-1<u.indexOf(t.type)){l=r;break}switch(l){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),o.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord&&(a=new A.avcCBox,s=new d(t.avcDecoderConfigRecord),a.parse(s),o.addBox(a));break;case"Audio":n.add("smhd").set("balance",t.balance||0),o.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":n.add("sthd"),"stpp"===t.type&&o.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:n.add("nmhd")}t.description&&o.addBox(t.description),t.description_boxes&&t.description_boxes.forEach(function(e){o.addBox(e)}),n.add("dinf").add("dref").addEntry((new A["url Box"]).set("flags",1));i=n.add("stbl");return i.add("stsd").addEntry(o),i.add("stts").set("sample_counts",[]).set("sample_deltas",[]),i.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),i.add("stco").set("chunk_offsets",[]),i.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(e),t.id}},A.Box.prototype.computeSize=function(e){e=e||new l;e.endianness=l.BIG_ENDIAN,this.write(e)},L.prototype.addSample=function(e,t,i){var i=i||{},n={},e=this.getTrackById(e);if(null!==e)return n.number=e.samples.length,n.track_id=e.tkhd.track_id,n.timescale=e.mdia.mdhd.timescale,n.description_index=i.sample_description_index?i.sample_description_index-1:0,n.description=e.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.byteLength,n.alreadyRead=n.size,n.duration=i.duration||1,n.cts=i.cts||0,n.dts=i.dts||0,n.is_sync=i.is_sync||!1,n.is_leading=i.is_leading||0,n.depends_on=i.depends_on||0,n.is_depended_on=i.is_depended_on||0,n.has_redundancy=i.has_redundancy||0,n.degradation_priority=i.degradation_priority||0,n.offset=0,n.subsamples=i.subsamples,e.samples.push(n),e.samples_size+=n.size,e.samples_duration+=n.duration,e.first_dts||(e.first_dts=i.dts),this.processSamples(),e=this.createSingleSampleMoof(n),this.addBox(e),e.computeSize(),e.trafs[0].truns[0].data_offset=e.size+8,this.add("mdat").data=new Uint8Array(t),n},L.prototype.createSingleSampleMoof=function(e){var t=0,t=e.is_sync?1<<25:65536,i=new A.moofBox,n=(i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++,i.add("traf")),r=this.getTrackById(e.track_id);return n.add("tfhd").set("track_id",e.track_id).set("flags",A.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),n.add("tfdt").set("baseMediaDecodeTime",e.dts-r.first_dts),n.add("trun").set("flags",A.TRUN_FLAGS_DATA_OFFSET|A.TRUN_FLAGS_DURATION|A.TRUN_FLAGS_SIZE|A.TRUN_FLAGS_FLAGS|A.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),i},L.prototype.lastMoofIndex=0,L.prototype.samplesDataSize=0,L.prototype.resetTables=function(){var e,t;for(this.initial_duration=this.moov.mvhd.duration,e=this.moov.mvhd.duration=0;e<this.moov.traks.length;e++){(t=this.moov.traks[e]).tkhd.duration=0,t.mdia.mdhd.duration=0,(t.mdia.minf.stbl.stco||t.mdia.minf.stbl.co64).chunk_offsets=[],(i=t.mdia.minf.stbl.stsc).first_chunk=[],i.samples_per_chunk=[],i.sample_description_index=[],(t.mdia.minf.stbl.stsz||t.mdia.minf.stbl.stz2).sample_sizes=[],(i=t.mdia.minf.stbl.stts).sample_counts=[],i.sample_deltas=[],(i=t.mdia.minf.stbl.ctts)&&(i.sample_counts=[],i.sample_offsets=[]);var i=t.mdia.minf.stbl.stss,i=t.mdia.minf.stbl.boxes.indexOf(i);-1!=i&&(t.mdia.minf.stbl.boxes[i]=null)}},L.initSampleGroups=function(e,t,i,n,r){var a,s,o,l;function u(e,t,i){this.grouping_type=e,this.grouping_type_parameter=t,this.sbgp=i,this.last_sample_in_run=-1,this.entry_index=-1}for(t&&(t.sample_groups_info=[]),e.sample_groups_info||(e.sample_groups_info=[]),s=0;s<i.length;s++){for(l=i[s].grouping_type+"/"+i[s].grouping_type_parameter,o=new u(i[s].grouping_type,i[s].grouping_type_parameter,i[s]),t&&(t.sample_groups_info[l]=o),e.sample_groups_info[l]||(e.sample_groups_info[l]=o),a=0;a<n.length;a++)n[a].grouping_type===i[s].grouping_type&&(o.description=n[a],o.description.used=!0);if(r)for(a=0;a<r.length;a++)r[a].grouping_type===i[s].grouping_type&&(o.fragment_description=r[a],o.fragment_description.used=!0,o.is_fragment=!0)}if(t){if(r)for(s=0;s<r.length;s++)!r[s].used&&2<=r[s].version&&(l=r[s].grouping_type+"/0",(o=new u(r[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(s=0;s<n.length;s++)!n[s].used&&2<=n[s].version&&(l=n[s].grouping_type+"/0",o=new u(n[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},L.setSampleGroupProperties=function(e,t,i,n){var r,a,s;for(r in t.sample_groups=[],n)t.sample_groups[r]={}
191,t.sample_groups[r].grouping_type=n[r].grouping_type,t.sample_groups[r].grouping_type_parameter=n[r].grouping_type_parameter,i>=n[r].last_sample_in_run&&(n[r].last_sample_in_run<0&&(n[r].last_sample_in_run=0),n[r].entry_index++,n[r].entry_index<=n[r].sbgp.entries.length-1)&&(n[r].last_sample_in_run+=n[r].sbgp.entries[n[r].entry_index].sample_count),n[r].entry_index<=n[r].sbgp.entries.length-1?t.sample_groups[r].group_description_index=n[r].sbgp.entries[n[r].entry_index].group_description_index:t.sample_groups[r].group_description_index=-1,0!==t.sample_groups[r].group_description_index&&(s=n[r].fragment_description||n[r].description,0<t.sample_groups[r].group_description_index?(a=65535<t.sample_groups[r].group_description_index?(t.sample_groups[r].group_description_index>>16)-1:t.sample_groups[r].group_description_index-1,s&&0<=a&&(t.sample_groups[r].description=s.entries[a])):s&&2<=s.version&&0<s.default_group_description_index&&(t.sample_groups[r].description=s.entries[s.default_group_description_index-1]))},L.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},L.prototype.buildSampleLists=function(){for(var e,t=0;t<this.moov.traks.length;t++)e=this.moov.traks[t],this.buildTrakSampleLists(e)},L.prototype.buildTrakSampleLists=function(e){var t,i,n,r,a,s,o,l,u,h,d,c,f,p,m,g,_,y,v,A,E,b,w,S;if(e.samples=[],e.samples_duration=0,e.samples_size=0,i=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,n=e.mdia.minf.stbl.stsc,r=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,a=e.mdia.minf.stbl.stts,s=e.mdia.minf.stbl.ctts,o=e.mdia.minf.stbl.stss,l=e.mdia.minf.stbl.stsd,u=e.mdia.minf.stbl.subs,c=e.mdia.minf.stbl.stdp,h=e.mdia.minf.stbl.sbgps,d=e.mdia.minf.stbl.sgpds,E=A=v=y=-1,S=w=b=0,L.initSampleGroups(e,null,h,d),void 0!==r){for(t=0;t<r.sample_sizes.length;t++){var T={};T.number=t,T.track_id=e.tkhd.track_id,T.timescale=e.mdia.mdhd.timescale,T.alreadyRead=0,(e.samples[t]=T).size=r.sample_sizes[t],e.samples_size+=T.size,0===t?(f=0,T.chunk_index=p=1,T.chunk_run_index=f,_=n.samples_per_chunk[f],g=0,m=f+1<n.first_chunk.length?n.first_chunk[f+1]-1:1/0):t<_?(T.chunk_index=p,T.chunk_run_index=f):(g=0,(T.chunk_index=++p)<=m||(m=++f+1<n.first_chunk.length?n.first_chunk[f+1]-1:1/0),T.chunk_run_index=f,_+=n.samples_per_chunk[f]),T.description_index=n.sample_description_index[T.chunk_run_index]-1,T.description=l.entries[T.description_index],T.offset=i.chunk_offsets[T.chunk_index-1]+g,g+=T.size,y<t&&(v++,y<0&&(y=0),y+=a.sample_counts[v]),0<t?(e.samples[t-1].duration=a.sample_deltas[v],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(A<=t&&(E++,A<0&&(A=0),A+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[b]-1?(T.is_sync=!0,b++):(T.is_sync=!1,T.degradation_priority=0),u&&u.entries[w].sample_delta+S==t+1&&(T.subsamples=u.entries[w].subsamples,S+=u.entries[w].sample_delta,w++)):T.is_sync=!0,L.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=c?c.priority[t]:0,u&&u.entries[w].sample_delta+S==t&&(T.subsamples=u.entries[w].subsamples,S+=u.entries[w].sample_delta),(0<h.length||0<d.length)&&L.setSampleGroupProperties(e,T,t,e.sample_groups_info)}0<t&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},L.prototype.updateSampleLists=function(){var e,t,i,n,r,a,s,o,l,u,h,d;if(void 0!==this.moov)for(;this.lastMoofIndex<this.moofs.length;)if(s=this.moofs[this.lastMoofIndex],this.lastMoofIndex++,"moof"==s.type)for(o=s,e=0;e<o.trafs.length;e++){for(l=o.trafs[e],u=this.getTrackById(l.tfhd.track_id),h=this.getTrexById(l.tfhd.track_id),t=l.tfhd.flags&A.TFHD_FLAG_SAMPLE_DESC?l.tfhd.default_sample_description_index:h?h.default_sample_description_index:1,i=l.tfhd.flags&A.TFHD_FLAG_SAMPLE_DUR?l.tfhd.default_sample_duration:h?h.default_sample_duration:0,n=l.tfhd.flags&A.TFHD_FLAG_SAMPLE_SIZE?l.tfhd.default_sample_size:h?h.default_sample_size:0,r=l.tfhd.flags&A.TFHD_FLAG_SAMPLE_FLAGS?l.tfhd.default_sample_flags:h?h.default_sample_flags:0,(l.sample_number=0)<l.sbgps.length&&L.initSampleGroups(u,l,l.sbgps,u.mdia.minf.stbl.sgpds,l.sgpds),v=0;v<l.truns.length;v++)for(var c=l.truns[v],f=0;f<c.sample_count;f++){(d={}).moof_number=this.lastMoofIndex,d.number_in_traf=l.sample_number,l.sample_number++,d.number=u.samples.length,l.first_sample_index=u.samples.length,u.samples.push(d),d.track_id=u.tkhd.track_id,d.timescale=u.mdia.mdhd.timescale,d.description_index=t-1,d.description=u.mdia.minf.stbl.stsd.entries[d.description_index],d.size=n,c.flags&A.TRUN_FLAGS_SIZE&&(d.size=c.sample_size[f]),u.samples_size+=d.size,d.duration=i,c.flags&A.TRUN_FLAGS_DURATION&&(d.duration=c.sample_duration[f]),u.samples_duration+=d.duration,u.first_traf_merged||0<f?d.dts=u.samples[u.samples.length-2].dts+u.samples[u.samples.length-2].duration:(l.tfdt?d.dts=l.tfdt.baseMediaDecodeTime:d.dts=0,u.first_traf_merged=!0),d.cts=d.dts,c.flags&A.TRUN_FLAGS_CTS_OFFSET&&(d.cts=d.dts+c.sample_composition_time_offset[f]),p=r,c.flags&A.TRUN_FLAGS_FLAGS?p=c.sample_flags[f]:0===f&&c.flags&A.TRUN_FLAGS_FIRST_FLAG&&(p=c.first_sample_flags),d.is_sync=!(p>>16&1),d.is_leading=p>>26&3,d.depends_on=p>>24&3,d.is_depended_on=p>>22&3,d.has_redundancy=p>>20&3,d.degradation_priority=65535&p;var p=!!(l.tfhd.flags&A.TFHD_FLAG_BASE_DATA_OFFSET),m=!!(l.tfhd.flags&A.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(c.flags&A.TRUN_FLAGS_DATA_OFFSET),_=0,_=p?l.tfhd.base_data_offset:m||0===v?o.start:a;d.offset=0===v&&0===f?g?_+c.data_offset:_:a,a=d.offset+d.size,(0<l.sbgps.length||0<l.sgpds.length||0<u.mdia.minf.stbl.sbgps.length||0<u.mdia.minf.stbl.sgpds.length)&&L.setSampleGroupProperties(u,d,d.number_in_traf,l.sample_groups_info)}if(l.subs){u.has_fragment_subsamples=!0;for(var y=l.first_sample_index,v=0;
191v<l.subs.entries.length;v++)y+=l.subs.entries[v].sample_delta,(d=u.samples[y-1]).subsamples=l.subs.entries[v].subsamples}}},L.prototype.getSample=function(e,t){var i=e.samples[t];if(!this.moov)return null;if(i.data){if(i.alreadyRead==i.size)return i}else i.data=new Uint8Array(i.size),i.alreadyRead=0,this.samplesDataSize+=i.size,c.debug("ISOFile","Allocating sample #"+t+" on track #"+e.tkhd.track_id+" of size "+i.size+" (total: "+this.samplesDataSize+")");for(;;){var n=this.stream.findPosition(!0,i.offset+i.alreadyRead,!1);if(!(-1<n))return null;var r=(n=this.stream.buffers[n]).byteLength-(i.offset+i.alreadyRead-n.fileStart);if(i.size-i.alreadyRead<=r)return c.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-n.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,n,i.offset+i.alreadyRead-n.fileStart,i.size-i.alreadyRead),n.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0==r)return null;c.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-n.fileStart)+" read size: "+r+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,n,i.offset+i.alreadyRead-n.fileStart,r),i.alreadyRead+=r,n.usedBytes+=r,this.stream.logBufferLevel()}},L.prototype.releaseSample=function(e,t){e=e.samples[t];return e.data?(this.samplesDataSize-=e.size,e.data=null,e.alreadyRead=0,e.size):0},L.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},L.prototype.getCodecs=function(){for(var e="",t=0;t<this.moov.traks.length;t++)0<t&&(e+=","),e+=this.moov.traks[t].mdia.minf.stbl.stsd.entries[0].getCodec();return e},L.prototype.getTrexById=function(e){var t;if(this.moov&&this.moov.mvex)for(t=0;t<this.moov.mvex.trexs.length;t++){var i=this.moov.mvex.trexs[t];if(i.track_id==e)return i}return null},L.prototype.getTrackById=function(e){if(void 0!==this.moov)for(var t=0;t<this.moov.traks.length;t++){var i=this.moov.traks[t];if(i.tkhd.track_id==e)return i}return null},L.prototype.items=[],L.prototype.itemsDataSize=0,L.prototype.flattenItemInfo=function(){var e=this.items,t=this.meta;if(null!=t&&void 0!==t.hdlr&&void 0!==t.iinf){for(l=0;l<t.iinf.item_infos.length;l++)(n={}).id=t.iinf.item_infos[l].item_ID,(e[n.id]=n).ref_to=[],n.name=t.iinf.item_infos[l].item_name,0<t.iinf.item_infos[l].protection_index&&(n.protection=t.ipro.protections[t.iinf.item_infos[l].protection_index-1]),t.iinf.item_infos[l].item_type?n.type=t.iinf.item_infos[l].item_type:n.type="mime",n.content_type=t.iinf.item_infos[l].content_type,n.content_encoding=t.iinf.item_infos[l].content_encoding;if(t.iloc)for(l=0;l<t.iloc.items.length;l++){var i=t.iloc.items[l],n=e[i.item_ID];switch(0!==i.data_reference_index&&(c.warn("Item storage with reference to other files: not supported"),n.source=t.dinf.boxes[i.data_reference_index-1]),i.construction_method){case 0:break;case 1:case 2:c.warn("Item storage with construction_method : not supported")}for(n.extents=[],a=n.size=0;a<i.extents.length;a++)n.extents[a]={},n.extents[a].offset=i.extents[a].extent_offset+i.base_offset,n.extents[a].length=i.extents[a].extent_length,n.extents[a].alreadyRead=0,n.size+=n.extents[a].length}if(t.pitm&&(e[t.pitm.item_id].primary=!0),t.iref)for(l=0;l<t.iref.references.length;l++)for(var r=t.iref.references[l],a=0;a<r.references.length;a++)e[r.from_item_ID].ref_to.push({type:r.type,id:r.references[a]});if(t.iprp)for(var s=0;s<t.iprp.ipmas.length;s++)for(var o=t.iprp.ipmas[s],l=0;l<o.associations.length;l++){var u=o.associations[l];for(void 0===(n=e[u.id]).properties&&(n.properties={},n.properties.boxes=[]),a=0;a<u.props.length;a++){var h=u.props[a];0<h.property_index&&h.property_index-1<t.iprp.ipco.boxes.length&&(h=t.iprp.ipco.boxes[h.property_index-1],n.properties[h.type]=h,n.properties.boxes.push(h))}}}},L.prototype.getItem=function(e){var t;if(!this.meta)return null;if(!(t=this.items[e]).data&&t.size)t.data=new Uint8Array(t.size),t.alreadyRead=0,this.itemsDataSize+=t.size,c.debug("ISOFile","Allocating item #"+e+" of size "+t.size+" (total: "+this.itemsDataSize+")");else if(t.alreadyRead===t.size)return t;for(var i=0;i<t.extents.length;i++){var n=t.extents[i];if(n.alreadyRead!==n.length){var r=this.stream.findPosition(!0,n.offset+n.alreadyRead,!1);if(!(-1<r))return null;var a=(r=this.stream.buffers[r]).byteLength-(n.offset+n.alreadyRead-r.fileStart);if(!(n.length-n.alreadyRead<=a))return c.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+a+" full extent size: "+n.length+" full item size: "+t.size+")"),l.memcpy(t.data.buffer,t.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,a),n.alreadyRead+=a,t.alreadyRead+=a,r.usedBytes+=a,this.stream.logBufferLevel(),null;c.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+t.size+")"),l.memcpy(t.data.buffer,t.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,n.length-n.alreadyRead),r.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),t.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return t.alreadyRead===t.size?t:null},L.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null;for(var i=t.alreadyRead=0;i<t.extents.length;i++)t.extents[i].alreadyRead=0;return t.size}return 0},L.prototype.processItems=function(e){for(var t in this.items){t=this.items[t];this.getItem(t.id),e&&!t.sent&&(e(t),t.sent=!0,t.data=null)}},L.prototype.hasItem=function(e){for(var t in this.items){t=this.items[t];if(t.name===e)return t.id}return-1},L.prototype.getMetaHandler=function(){return this.meta?this.meta.hdlr.handler:null},L.prototype.getPrimaryItem=function(){return this.meta&&this.meta.pitm?this.getItem(this.meta.pitm.item_id):null},L.prototype.itemToFragmentedTrackFile=function(e){var t,e=e||{},i=null;return null!=(i=e.itemId?this.getItem(e.itemId):this.getPrimaryItem())&&
191((e=new L).discardMdatData=!1,t={type:i.type,description_boxes:i.properties.boxes},i.properties.ispe&&(t.width=i.properties.ispe.image_width,t.height=i.properties.ispe.image_height),t=e.addTrack(t))?(e.addSample(t,i.data),e):null},L.prototype.write=function(e){for(var t=0;t<this.boxes.length;t++)this.boxes[t].write(e)},L.prototype.createFragment=function(e,t,i){var e=this.getTrackById(e),n=this.getSample(e,t);return null==n?(n=e.samples[t],this.nextSeekPosition?this.nextSeekPosition=Math.min(n.offset+n.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=e.samples[t].offset+n.alreadyRead,null):((e=i||new l).endianness=l.BIG_ENDIAN,(t=this.createSingleSampleMoof(n)).write(e),t.trafs[0].truns[0].data_offset=t.size+8,c.debug("MP4Box","Adjusting data_offset with new value "+t.trafs[0].truns[0].data_offset),e.adjustUint32(t.trafs[0].truns[0].data_offset_position,t.trafs[0].truns[0].data_offset),(i=new A.mdatBox).data=n.data,i.write(e),e)},L.writeInitializationSegment=function(e,t,i,n){c.debug("ISOFile","Generating initialization segment");var r,a=new l,s=(a.endianness=l.BIG_ENDIAN,e.write(a),t.add("mvex"));for(i&&s.add("mehd").set("fragment_duration",i),r=0;r<t.traks.length;r++)s.add("trex").set("track_id",t.traks[r].tkhd.track_id).set("default_sample_description_index",1).set("default_sample_duration",n).set("default_sample_size",0).set("default_sample_flags",65536);return t.write(a),a.buffer},L.prototype.save=function(e){var t=new l;t.endianness=l.BIG_ENDIAN,this.write(t),t.save(e)},L.prototype.getBuffer=function(){var e=new l;return e.endianness=l.BIG_ENDIAN,this.write(e),e.buffer},L.prototype.initializeSegmentation=function(){var e,t,i,n;for(null===this.onSegment&&c.warn("MP4Box","No segmentation callback set!"),this.isFragmentationInitialized||(this.isFragmentationInitialized=!0,this.nextMoofNumber=0,this.resetTables()),t=[],e=0;e<this.fragmentedTracks.length;e++){var r=new A.moovBox;r.mvhd=this.moov.mvhd,r.boxes.push(r.mvhd),i=this.getTrackById(this.fragmentedTracks[e].id),r.boxes.push(i),r.traks.push(i),(n={}).id=i.tkhd.track_id,n.user=this.fragmentedTracks[e].user,n.buffer=L.writeInitializationSegment(this.ftyp,r,this.moov.mvex&&this.moov.mvex.mehd?this.moov.mvex.mehd.fragment_duration:void 0,0<this.moov.traks[e].samples.length?this.moov.traks[e].samples[0].duration:0),t.push(n)}return t},A.Box.prototype.printHeader=function(e){this.size+=8,this.size>o&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},A.FullBox.prototype.printHeader=function(e){this.size+=4,A.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},A.Box.prototype.print=function(e){this.printHeader(e)},A.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t,i=0;i<this.boxes.length;i++)this.boxes[i]&&(t=e.indent,e.indent+=" ",this.boxes[i].print(e),e.indent=t)},L.prototype.print=function(e){e.indent="";for(var t=0;t<this.boxes.length;t++)this.boxes[t]&&this.boxes[t].print(e)},A.mvhdBox.prototype.print=function(e){A.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"timescale: "+this.timescale),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"rate: "+this.rate),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},A.tkhdBox.prototype.print=function(e){A.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)},{});u.createFile=function(e,t){e=void 0===e||e,t=new L(t);return t.discardMdatData=!e,t},t.createFile=u.createFile},function(e,t,i){const n=i(68),r=i(26),o=i(69);t.MpegTs=class{constructor(){this.seekPos=-1,this.durationMs=-1,this.fps=-1,this.sampleRate=-1,this.aCodec="",this.vCodec="",this.size={
191width:-1,height:-1},this.bufObject=r(),this.mpegTsObj=null,this.bufObject=r(),this.mediaInfo={},this.extensionInfo={},this.onReady=null,this.onDemuxed=null,this.onReadyOBJ=null}initMPEG(){let e=this;this.mpegTsObj=new n.default.MPEG_JS_Module({}),this.mpegTsObj.onDemuxed=()=>{e.mediaInfo=e.mpegTsObj.readMediaInfo(),e.extensionInfo=e.mpegTsObj.readExtensionInfo(),e.vCodec=e.mediaInfo.vCodec,e.aCodec=e.mediaInfo.aCodec,e.durationMs=1e3*e.mediaInfo.duration,e.fps=e.mediaInfo.vFps,e.sampleRate=e.mediaInfo.sampleRate,0<e.extensionInfo.vWidth&&0<e.extensionInfo.vHeight&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight),e.isHEVC()&&e.mpegTsObj.readPacket(),null!=e.onDemuxed&&e.onDemuxed(e.onReadyOBJ)},this.mpegTsObj.onReady=()=>{null!=e.onReady&&e.onReady(e.onReadyOBJ)},this.mpegTsObj.onNalu=e=>{this._appendFrame(e)},this.mpegTsObj.initDemuxer()}_appendFrame(e){var t=e.dtime;if(0==e.type){var i=o.PACK_NALU(e.layer),n=1==e.keyframe;this.bufObject.appendFrame(t,i,!0,n)}else if("aac"==this.mediaInfo.aCodec)for(var r=e.data,a=0;a<r.length;a++){var s=r[a];this.bufObject.appendFrame(s.ptime,s.data,!1,!0)}else this.bufObject.appendFrame(t,e.data,!1,!0)}bindReady(e){this.onReadyOBJ=e}releaseTsDemuxer(){this.mpegTsObj&&this.mpegTsObj.releaseTsDemuxer(),this.mpegTsObj=null}demux(e){this.mpegTsObj.demuxUint8Buf(e)}popBuffer(e=1,t=-1){return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0}isHEVC(){return this.mpegTsObj.isHEVC()}getACodec(){return this.aCodec}getVCodec(){return this.vCodec}getAudioNone(){return this.mpegTsObj.mediaAttr.audioNone}getDurationMs(){return this.durationMs}getFPS(){return this.fps}getSampleRate(){return this.sampleRate}getSize(){return this.size}seek(e){0<=e&&(e=this.bufObject.seekIDR(e),this.seekPos=e)}}},function(e,t,i){const n=i(173),r=i(68),c=i(37),a=i(26),f=i(69),s=i(5);t.M3u8=class{constructor(){this.hls=new n.M3u8Base,this.mpegTsObj=new r.default.MPEG_JS_Module({}),this.mpegTsWasmState=!1,this.mpegTsWasmRetryLoadTimes=0,this.tsList=[],this._segmentPointer=-1,this.parseTsList=[],this.vStartTime=0,this.aStartTime=0,this.lockWait={state:!1,lockMember:{dur:0}},this.timerFeed=null,this.timerTsWasm=null,this.seekPos=-1,this.vPreFramePTS=0,this.aPreFramePTS=0,this.audioNone=!1,this.isHevcParam=!1,this.vCodec=!1,this.aCodec=!1,this.aChannel=0,this.durationMs=-1,this.bufObject=a(),this.fps=-1,this.sampleRate=-1,this.size={width:-1,height:-1},this.mediaInfo=null,this.extensionInfo=null,this.seekTime=-1,this.seekStartTime=-1,this.onReadyOBJ=null,this.onFinished=null,this.onDemuxed=null,this.onSamples=null,this.onCacheProcess=null,this.isDownloaded=!1,this.onError=null}getCachePTS(){return Math.max(this.vPreFramePTS,this.aPreFramePTS)}demux(e){let r=this;this.vPreFramePTS=0,this.aPreFramePTS=0,this.hls.onTransportStream=(e,t,i,n)=>{r.tsList.push({streamURI:e,streamDur:t,start:i,end:n})},this.hls.onFinished=e=>{e.type==s.PLAYER_IN_TYPE_M3U8_VOD?r.durationMs=1e3*e.duration:r.durationMs=-1,null!=r.onFinished&&r.onFinished(r.onReadyOBJ,e)},this.mpegTsObj.onDemuxedFailed=(e,t)=>{r.lockWait.state=!1},this.mpegTsObj.onDemuxed=()=>{r.isDownloaded=!1,null==r.mediaInfo&&(r.mediaInfo=r.mpegTsObj.readMediaInfo(),r.isHevcParam=r.mpegTsObj.isHEVC(),r.vCodec=r.mediaInfo.vCodec,r.aCodec=r.mediaInfo.aCodec,r.aChannel=r.mediaInfo.sampleChannel,r.fps=r.mediaInfo.vFps,r.sampleRate=r.mediaInfo.sampleRate,null===r.aCodec||""===r.aCodec||r.aChannel<=0)&&(r.audioNone=!0),null==r.extensionInfo&&(r.extensionInfo=r.mpegTsObj.readExtensionInfo(),0<r.extensionInfo.vWidth)&&0<r.extensionInfo.vHeight&&(r.size.width=r.extensionInfo.vWidth,r.size.height=r.extensionInfo.vHeight),null!=r.onDemuxed&&r.onDemuxed(r.onReadyOBJ);var e;r.mpegTsObj.readPacket();r.parseTsList&&0<r.parseTsList.length?(e=r.parseTsList.shift().start,r.vStartTime=e,r.aStartTime=e):-1==this.seekStartTime?setTimeout(()=>{r.vStartTime+=parseFloat(r.lockWait.lockMember.dur),r.aStartTime+=parseFloat(r.lockWait.lockMember.dur)},1e3):(r.vStartTime=r.seekStartTime,r.aStartTime=r.seekStartTime,r.seekStartTime=-1),r.lockWait.state=!1},this.mpegTsObj.onReady=()=>{r._onTsReady(e)},this.mpegTsObj.onNalu=e=>{this._appendFrame(e,-1,!1),this.lockWait.state=!1},this.mpegTsObj.onError=e=>{this.onError&&this.onError(e)},r.mpegTsObj.initDemuxer(),this.timerTsWasm=window.setInterval(()=>{r.mpegTsWasmState?(window.clearInterval(r.timerTsWasm),r.timerTsWasm=null):3<=r.mpegTsWasmRetryLoadTimes?(r._onTsReady(e),window.clearInterval(r.timerTsWasm),r.timerTsWasm=null):(r.mpegTsWasmRetryLoadTimes+=1,r.mpegTsObj.initDemuxer())},3e3)}_appendFrame(e,t,i){var n=this,r=0<e.dtime?e.dtime:e.ptime;if(0==e.type){t<0&&r<=n.vPreFramePTS&&(i=!0);var a=f.PACK_NALU(e.layer),s=1==e.keyframe,o=1==i?r+n.vStartTime:r,s=new c.BufferFrame(o,s,a,!0);n.bufObject.appendFrame(s.pts,s.data,!0,s.isKey),n.vPreFramePTS=o,null!=n.onSamples&&n.onSamples(n.onReadyOBJ,s)}else if(t<0&&r<=n.aPreFramePTS&&(i=!0),"aac"==n.mediaInfo.aCodec)for(var l=e.data,u=0;u<l.length;u++){var h=l[u],d=1==i?h.ptime+n.vStartTime:r,h=new c.BufferFrame(d,!0,h.data,!1);n.aPreFramePTS=d,null!=n.onSamples&&n.onSamples(n.onReadyOBJ,h)}else{a=1==i?r+n.vStartTime:r,o=new c.BufferFrame(a,!0,e.data,!1);n.bufObject.appendFrameByBufferFrame(o),n.aPreFramePTS=a,null!=n.onSamples&&n.onSamples(n.onReadyOBJ,o)}this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}_onTsReady(e){this.hls.fetchM3u8(e),this.mpegTsWasmState=!0,this.timerFeed&&window.clearInterval(this.timerFeed),this.downLoadInterval()}downLoadInterval(){let e=this;this.timerFeed&&window.clearInterval(this.timerFeed),e.timerFeed=window.setInterval(()=>{e.loadSegment()},1e3)}loadSegment(){var e,t,i,n=this;if(0<n.tsList.length&&0==n.lockWait.state)try{n.isDownloaded||(e=n.nextSegment(),n.moveSegmentPointer(),null!=e&&(t=e.streamURI,i=e.streamDur,n.lockWait.state=!0,n.lockWait.lockMember.dur=i,n.mpegTsObj.isLive=n.hls.isLive
191(),n.isDownloaded=!0,n.mpegTsObj.demuxURL(t),n.parseTsList.push(e)))}catch(e){n.lockWait.state=!1}}release(){this.hls&&this.hls.release(),this.hls=null,this.mpegTsObj&&this.mpegTsObj.release(),this.timerFeed&&window.clearInterval(this.timerFeed),this.timerFeed=null,this.timerTsWasm&&window.clearInterval(this.timerTsWasm),this.timerTsWasm=null,this._segmentPointer=-1,this.parseTsList=[],this.tsList=[],this.isDownloaded=!1,this.bufObject&&this.bufObject.cleanPipeline()}nextSegment(){return this.tsList&&this.tsList[this._segmentPointer+1]}setNextSegmentByIndex(e=0){this._segmentPointer=e-1}getSegmentByIndex(e){return this.tsList&&this.tsList[e]}moveSegmentPointer(e){null==e&&(e=this._segmentPointer+1),this._segmentPointer=this.clamp(e,-1,this.tsList.length)}findSegmentIndexByTime(n){var r=this.tsList;if(r){for(let e=0,t=r.length,i;e<t;e++)if(n>=(i=r[e]).start&&n<i.end)return e;var e=r[r.length-1];if(Math.abs(n-e.end)<.2)return r.length-1}}clamp(e,t,i){return i<t&&(i=t),Math.min(Math.max(e,t),i)}bindReady(e){this.onReadyOBJ=e}popBuffer(e=1,t=-1){return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0}getVLen(){return this.bufObject.videoBuffer.length}getALen(){return this.bufObject.audioBuffer.length}getLastIdx(){return this.bufObject.videoBuffer.length-1}getALastIdx(){return this.bufObject.audioBuffer.length-1}getACodec(){return this.aCodec}getVCodec(){return this.vCodec}getDurationMs(){return this.durationMs}getFPS(){return this.fps}getSampleRate(){return this.sampleRate}getSampleChannel(){return this.aChannel}getSize(){return this.size}seek(e){0<=e&&(e=this.bufObject.seekIDR(e),this.seekPos=e)}toSeek(e){this.seekTime=e;var e=this.findSegmentIndexByTime(e),t=this.getSegmentByIndex(e);null!=e&&t&&t!==this.tsList.nextSegment&&(this.seekStartTime=t.start,this.setNextSegmentByIndex(e),this.timerFeed&&window.clearInterval(this.timerFeed),this.downLoadInterval())}limitDownloads(e){e!=this.limitDownload&&(this.timerFeed&&window.clearInterval(this.timerFeed),this.limitDownload=e,this.limitDownload?this.timerFeed&&window.clearInterval(this.timerFeed):this.downLoadInterval())}}},function(e,t,i){const f=i(5),p=[/#EXT-X-PROGRAM-DATE-TIME.+\n/g],m={lineDelimiter:/\r?\n/,extensionHeader:"#EXTM3U",tagPrefix:"#EXT",segmentPrefix:"#EXTINF",segmentParse:/^#EXTINF: *([0-9.]+)(, *(.+?)?)?$/,tagParse:/^#EXT-X-([A-Z-]+)(:(.+))?$/,version:"VERSION",allowCache:"ALLOW-CACHE",combined:"COMBINED",endList:"ENDLIST",targetDuration:"TARGETDURATION",mediaSequence:"MEDIA-SEQUENCE",discontinuity:"DISCONTINUITY",streamInf:"STREAM-INF",isComment:e=>e&&"#"===e[0]&&!e.startsWith(m.tagPrefix),isBlank:e=>""===e,canStrip:e=>m.isBlank(e)||m.isComment(e),defaultMinDur:99999,hlsSliceLimit:100};t.M3u8Base=class{constructor(){this.initState=!0,this.controller=new AbortController,this._slices=[],this._type=f.PLAYER_IN_TYPE_M3U8_LIVE,this._preURI="",this.duration=-1,this.onTransportStream=null,this.onFinished=null}isLive(){return this._type===f.PLAYER_IN_TYPE_M3U8_LIVE?1:0}release(){this.initState=!1}fetchM3u8(t){let i=this;this.initState&&fetch(t).then(e=>e.text()).then(e=>{return 1==i._uriParse(t)?i._m3u8Parse(e):null}).then(e=>{null!=e&&!1!==e&&!0!==e&&this._type==f.PLAYER_IN_TYPE_M3U8_LIVE&&setTimeout(()=>{i.fetchM3u8(t)},500*e)}).catch(e=>{setTimeout(()=>{i.fetchM3u8(t)},500)})}_uriParse(e){this._preURI="";var t,e=e.split("://");let i=null;if(e.length<1)return!1;1<e.length?(t=e[0],i=e[1].split("/"),this._preURI=t+"://"):i=e[0].split("/");for(var n=0;n<i.length-1;n++)this._preURI+=i[n]+"/";return!0}_m3u8Parse(t){let i=t;for(let e=0;e<p.length;e++)i=t.replace(p[e],"");var e,n=i.split(m.lineDelimiter);let r=m.defaultMinDur,a="";for(let t=0;t<n.length;t++){let e=n[t];if(!(e.length<1)){if(void 0!==a&&null!==a&&""!==a)switch(a){case m.ver
191sion:case m.mediaSequence:case m.allowCache:case m.discontinuity:case m.targetDuration:case m.combined:break;case m.streamInf:return e.indexOf("http")<0&&e.indexOf(this._preURI)<0&&(e=this._preURI+e),this.fetchM3u8(e),null}var s,o=this._readTag(e);if(null!=o)switch(a=o.key,o.key){case m.version:case m.mediaSequence:case m.allowCache:case m.discontinuity:case m.targetDuration:case m.combined:case m.streamInf:break;case m.endList:return this._type=f.PLAYER_IN_TYPE_M3U8_VOD,null!=this.onFinished&&(s={type:this._type,duration:this.duration},this.onFinished(s)),!0}o=m.segmentParse.exec(e);if(null!=o){var l,u,h=o[1],d=-1==this.duration?0:this.duration,o=(-1==this.duration&&(this.duration=0),this.duration+=parseFloat(o[1]),-1==this.duration?0:this.duration),c=(r>h&&(r=h),n[t+=1]);let e=null;e=0<=c.indexOf("http")?c:("/"===c[0]&&(u=(l=this._preURI.split("//"))[l.length-1].split("/"),this._preURI=l[0]+"//"+u[0]),this._preURI+c),this._slices.indexOf(e)<0&&(this._slices.push(e),null!=this.onTransportStream)&&this.onTransportStream(e,h,d,o)}}}return this._slices.length>m.hlsSliceLimit&&this._type==f.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*m.hlsSliceLimit)),null!=this.onFinished&&(e={type:this._type,duration:-1},this.onFinished(e)),r}_readTag(e){e=m.tagParse.exec(e);return null!==e?{key:e[1],value:e[3]}:null}}},function(e,t,i){!function(e){e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0}.call(this,i(31))},function(e,t){t.UI=class{constructor(){}static createPlayerRender(e,t,i){e=document.querySelector("div#"+e);return e.style.position="relative",e.style.backgroundColor="black",e.style.width=t+"px",e.style.height=i+"px",e}}},function(e,t,i){i=[i(95),i(3),i(0)],t=function(r,a,s){var o=function(t){var i=Number.MIN_VALUE;return function(e){e.position>i&&t(),i=e.position}};function l(e){e.mediaController.off(a.JWPLAYER_MEDIA_PLAY_ATTEMPT,e._onPlayAttempt),e.mediaController.off(a.JWPLAYER_PROVIDER_FIRST_FRAME,e._triggerFirstFrame),e.mediaController.off(a.JWPLAYER_MEDIA_TIME,e._onTime)}return{model:function(e){e.on("change:mediaModel",function(n,e,t){var i;n._qoeItem&&t&&n._qoeItem.end(t.get("state")),n._qoeItem=new r,n._qoeItem.tick(a.JWPLAYER_PLAYLIST_ITEM),n._qoeItem.start(e.get("state")),l(i=n),i._triggerFirstFrame=s.once(function(){var e=i._qoeItem,e=(e.tick(a.JWPLAYER_MEDIA_FIRST_FRAME),e.between(a.JWPLAYER_MEDIA_PLAY_ATTEMPT,a.JWPLAYER_MEDIA_FIRST_FRAME));i.mediaController.trigger(a.JWPLAYER_MEDIA_FIRST_FRAME,{loadTime:e}),l(i)}),i._onTime=o(i._triggerFirstFrame),i._onPlayAttempt=function(){i._qoeItem.tick(a.JWPLAYER_MEDIA_PLAY_ATTEMPT)},i.mediaController.on(a.JWPLAYER_MEDIA_PLAY_ATTEMPT,i._onPlayAttempt),i.mediaController.once(a.JWPLAYER_PROVIDER_FIRST_FRAME,i._triggerFirstFrame),i.mediaController.on(a.JWPLAYER_MEDIA_TIME,i._onTime),e.on("change:state",function(e,t,i){n._qoeItem.end(i),n._qoeItem.start(t)})})}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(4)],t=function(e,t){return e.extend({get:function(e){return this.attributes=this.attributes||{},this.attributes[e]},set:function(e,t){this.attributes=this.attributes||{};var i=this.attributes[e];this.attributes[e]=t,this.trigger("change:"+e,this,t,i)},clone:function(){return e.clone(this.attributes)}},t)}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){"use strict";i.r(t);var n=i(117),r=i.n(n),n=i(0),a=i.n(n),n=i(1),s=i.n(n),n=i(29),o=i.n(n);t.default=class{constructor(e){this.api=null,e&&e.advs&&a.a.isArray(e.advs)&&e.advs.length?(this.processAdvs=e.advs,this.hasProcessAdv=!0,this.el=s.a.createElement(r()())):this.hasProcessAdv=!1,this.activeAdv=null}setApi(e){this.api=e}refreshProcessAdv(t){var e=a.a.find(this.processAdvs,e=>t>=e.begin&&t<=e.end);e?e!==this.activeAdv&&(this.showAdv(e),this.activeAdv=e):this.hideAllProcessAdvs()}showAdv(e){var t=this.element().getElementsByTagName("a")[0],i=t.getElementsByTagName("img")[0],t=(t.setAttribute("href",e.material.landingPage),i.setAttribute("src",e.material.image),{display:"block","z-index":500,opacity:.9,left:"auto",right:"auto",top:"auto",bottom:"auto"});"left"===e.material.horizontalPosition?t.left=10:t.right=10,"top"===e.material.verticalPosition?t.top=10:t.bottom=50,o.a.style(this.element
191(),t)}hideAllProcessAdvs(){this.element().style.display="none",this.activeAdv=null}element(){if(this.api){var e=this.api.getContainer();if(0<s.a.getElementsByClassName("jw-process-adv",e).length)return s.a.getElementsByClassName("jw-process-adv",e)[0]}return this.el}}},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}t.__esModule=!0;var a=r(i(101)),s=n(i(190)),o=n(i(27)),l=r(i(18)),u=r(i(191)),i=n(i(193));function h(){var t=new a.HandlebarsEnvironment;return l.extend(t,a),t.SafeString=s.default,t.Exception=o.default,t.Utils=l,t.escapeExpression=l.escapeExpression,t.VM=u,t.template=function(e){return u.template(e,t)},t}var d=h();d.create=h,i.default(d),d.default=d,t.default=d,e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0;var a=i(18);t.default=function(r){r.registerHelper("blockHelperMissing",function(e,t){var i=t.inverse,n=t.fn;return!0===e?n(this):!1===e||null==e?i(this):a.isArray(e)?0<e.length?(t.ids&&(t.ids=[t.name]),r.helpers.each(e,t)):i(this):(t.data&&t.ids&&((i=a.createFrame(t.data)).contextPath=a.appendContextPath(t.data.contextPath,t.name),t={data:i}),n(e,t))})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0;var p=i(18),i=i(27),m=(i=i)&&i.__esModule?i:{default:i};t.default=function(e){e.registerHelper("each",function(n,e){if(!e)throw new m.default("Must pass iterator to #each");var t,r=e.fn,i=e.inverse,a=0,s="",o=void 0,l=void 0;function u(e,t,i){o&&(o.key=e,o.index=t,o.first=0===t,o.last=!!i,l)&&(o.contextPath=l+e),s+=r(n[e],{data:o,blockParams:p.blockParams([n[e],e],[l+e,null])})}if(e.data&&e.ids&&(l=p.appendContextPath(e.data.contextPath,e.ids[0])+"."),p.isFunction(n)&&(n=n.call(this)),e.data&&(o=p.createFrame(e.data)),n&&"object"==typeof n)if(p.isArray(n))for(var h=n.length;a<h;a++)a in n&&u(a,a,a===n.length-1);else if("function"==typeof Symbol&&n[Symbol.iterator]){for(var d=[],c=n[Symbol.iterator](),f=c.next();!f.done;f=c.next())d.push(f.value);for(h=(n=d).length;a<h;a++)u(a,a,a===n.length-1)}else t=void 0,Object.keys(n).forEach(function(e){void 0!==t&&u(t,a-1),t=e,a++}),void 0!==t&&u(t,a-1,!0);return s=0===a?i(this):s})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0;var i=i(27),n=(i=i)&&i.__esModule?i:{default:i};t.default=function(e){e.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new n.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0;var n=i(18),i=i(27),r=(i=i)&&i.__esModule?i:{default:i};t.default=function(i){i.registerHelper("if",function(e,t){if(2!=arguments.length)throw new r.default("#if requires exactly one argument");return n.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||n.isEmpty(e)?t.inverse(this):t.fn(this)}),i.registerHelper("unless",function(e,t){if(2!=arguments.length)throw new r.default("#unless requires exactly one argument");return i.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.default=function(r){r.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)e.push(arguments[i]);var n=1;null!=t.hash.level?n=t.hash.level:t.data&&null!=t.data.level&&(n=t.data.level),e[0]=n,r.log.apply(r,e)})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",function(e,t,i){return e&&i.lookupProperty(e,t)})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0;var r=i(18),i=i(27),a=(i=i)&&i.__esModule?i:{default:i};t.default=function(e){e.registerHelper("with",function(e,t){if(2!=arguments.length)throw new a.default("#with requires exactly one argument");r.isFunction(e)&&(e=e.call(this));var i,n=t.fn;return r.isEmpty(e)?t.inverse(this):(i=t.data,t.data&&t.ids&&((i=r.createFrame(t.data)).contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:i,blockParams:r.blockParams([e],[i&&i.c
191ontextPath])}))})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.registerDefaultDecorators=function(e){n.default(e)};var t=i(188),n=(i=t)&&i.__esModule?i:{default:i}},function(e,t,i){"use strict";t.__esModule=!0;var s=i(18);t.default=function(e){e.registerDecorator("inline",function(n,r,a,e){var t=n;return r.partials||(r.partials={},t=function(e,t){var i=a.partials,e=(a.partials=s.extend({},i,r.partials),n(e,t));return a.partials=i,e}),r.partials[e.args[0]]=e.fn,t})},e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.createNewLookupObject=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.extend.apply(void 0,[Object.create(null)].concat(t))};var n=i(18)},function(e,t,i){"use strict";function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,i=c.COMPILER_REVISION;if(!(t>=c.LAST_COMPATIBLE_COMPILER_REVISION&&t<=c.COMPILER_REVISION))throw t<c.LAST_COMPATIBLE_COMPILER_REVISION?(i=c.REVISION_CHANGES[i],t=c.REVISION_CHANGES[t],new d.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+t+").")):new d.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")},t.template=function(l,u){if(!u)throw new d.default("No environment passed to template");if(!l||!l.main)throw new d.default("Unknown template object: "+typeof l);l.main.decorator=l.main_d,u.VM.checkRevision(l.compiler);var i=l.compiler&&7===l.compiler[0];var s={strict:function(e,t,i){if(e&&t in e)return s.lookupProperty(e,t);throw new d.default('"'+t+'" not defined in '+e,{loc:i})},lookupProperty:function(e,t){var i=e[t];return null==i||Object.prototype.hasOwnProperty.call(e,t)||p.resultIsAllowed(i,s.protoAccessControl,t)?i:void 0},lookup:function(e,t){for(var i=e.length,n=0;n<i;n++)if(null!=(e[n]&&s.lookupProperty(e[n],t)))return e[n][t]},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:h.escapeExpression,invokePartial:function(e,t,i){i.hash&&(t=h.extend({},t,i.hash),i.ids)&&(i.ids[0]=!0),e=u.VM.resolvePartial.call(this,e,t,i);var n=h.extend({},i,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),r=u.VM.invokePartial.call(this,e,t,n);if(null==r&&u.compile&&(i.partials[i.name]=u.compile(e,l.compilerOptions,u),r=i.partials[i.name](t,n)),null==r)throw new d.default("The partial "+i.name+" could not be compiled when running in runtime-only mode");if(i.indent){for(var a=r.split("\n"),s=0,o=a.length;s<o&&(a[s]||s+1!==o);s++)a[s]=i.indent+a[s];r=a.join("\n")}return r},fn:function(e){var t=l[e];return t.decorator=l[e+"_d"],t},programs:[],program:function(e,t,i,n,r){var a=this.programs[e],s=this.fn(e);return a=t||r||n||i?m(this,e,s,t,i,n,r):a||(this.programs[e]=m(this,e,s))},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var i=e||t;return i=e&&t&&e!==t?h.extend({},t,e):i},nullContext:Object.seal({}),noop:u.VM.noop,compilerInfo:l.compiler};function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.data,n=(o._setup(t),!t.partial&&l.useData&&(i=function(e,t){t&&"root"in t||((t=t?c.createFrame(t):{}).root=e);return t}(e,i)),void 0),r=l.useBlockParams?[]:void 0;function a(e){return""+l.main(s,e,s.helpers,s.partials,i,r,n)}return l.useDepths&&(n=t.depths?e!=t.depths[0]?[e].concat(t.depths):t.depths:[e]),(a=g(l.main,a,s,t.depths||[],i,r))(e,t)}return o.isTop=!0,o._setup=function(e){var t,n,r;e.partial?(s.protoAccessControl=e.protoAccessControl,s.helpers=e.helpers,s.partials=e.partials,s.decorators=e.decorators,s.hooks=e.hooks):(t=h.extend({},u.helpers,e.helpers),n=t,r=s,Object.keys(n).forEach(function(e){var t,i=n[e];n[e]=(t=r.lookupProperty,f.wrapHelper(i,function(e){return h.extend({lookupProperty:t},e)}))}),s.helpers=t,l.usePartial&&(s.partials=s.mergeIfNeeded(e.partials,u.partials)),(l.usePartial||l.useDecorators)&&(s.decorators=h.extend({},u.decorators,e.decorators)),s.hooks={}
191,s.protoAccessControl=p.createProtoAccessControl(e),t=e.allowCallsToHelperMissing||i,a.moveHelperToHooks(s,"helperMissing",t),a.moveHelperToHooks(s,"blockHelperMissing",t))},o._child=function(e,t,i,n){if(l.useBlockParams&&!i)throw new d.default("must pass block params");if(l.useDepths&&!n)throw new d.default("must pass parent depths");return m(s,e,l[e],t,0,i,n)},o},t.wrapProgram=m,t.resolvePartial=function(e,t,i){e?e.call||i.name||(i.name=e,e=i.partials[e]):e="@partial-block"===i.name?i.data["partial-block"]:i.partials[i.name];return e},t.invokePartial=function(e,t,n){var r=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var a=void 0;n.fn&&n.fn!==s&&!function(){n.data=c.createFrame(n.data);var i=n.fn;a=n.data["partial-block"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.data=c.createFrame(t.data),t.data["partial-block"]=r,i(e,t)},i.partials&&(n.partials=h.extend({},n.partials,i.partials))}();void 0===e&&a&&(e=a);{if(void 0===e)throw new d.default("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)}},t.noop=s;var h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(18)),t=i(27),d=(t=t)&&t.__esModule?t:{default:t},c=i(101),a=i(102),f=i(192),p=i(104);function m(n,e,r,a,t,s,o){function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=o;return!o||e==o[0]||e===n.nullContext&&null===o[0]||(i=[e].concat(o)),r(n,e,n.helpers,n.partials,t.data||a,s&&[t.blockParams].concat(s),i)}return(i=g(r,i,n,o,a,s)).program=e,i.depth=o?o.length:0,i.blockParams=t||0,i}function s(){return""}function g(e,t,i,n,r,a){return e.decorator&&(t=e.decorator(t,e={},i,n&&n[0],r,a,n),h.extend(t,e)),t}},function(e,t,i){"use strict";t.__esModule=!0,t.wrapHelper=function(t,i){if("function"!=typeof t)return t;return function(){var e=arguments[arguments.length-1];return arguments[arguments.length-1]=i(e),t.apply(this,arguments)}}},function(e,t,i){"use strict";t.__esModule=!0,t.default=function(e){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}},e.exports=t.default},function(e,t,i){i=[i(4),i(67),i(66),i(3),i(15),i(1),i(0)],t=function(e,i,n,t,r,a,s){function o(e,t){this.model=t,this._adModel=(new i).setup({id:t.get("id"),volume:t.get("volume"),fullscreen:t.get("fullscreen"),mute:t.get("mute")}),this._adModel.on("change:state",n,this),t=e.getContainer(),this.swf=t.querySelector("object")}return o.prototype=s.extend({init:function(){var i,n;a.isChrome()&&(n=!(i=-1),this.swf.on("throttle",function(e){var t;clearTimeout(i),"resume"===e.state?n&&(n=!1,this.instreamPlay()):(t=this,i=setTimeout(function(){t._adModel.get("state")===r.PLAYING&&(n=!0,t.instreamPause())},250))},this)),this.swf.on("instream:state",function(e){switch(e.newstate){case r.PLAYING:case r.PAUSED:this._adModel.set("state",e.newstate)}},this).on("instream:time",function(e){this._adModel.set("position",e.position),this._adModel.set("duration",e.duration),this.trigger(t.JWPLAYER_MEDIA_TIME,e)},this).on("instream:complete",function(e){this.trigger(t.JWPLAYER_MEDIA_COMPLETE,e)},this).on("instream:error",function(e){this.trigger(t.JWPLAYER_MEDIA_ERROR,e)},this),this.swf.triggerFlash("instream:init"),this.applyProviderListeners=function(i){this.model.on("change:volume",function(e,t){i.volume(t)},this),this.model.on("change:mute",function(e,t){i.mute(t)},this)}},instreamDestroy:function(){this._adModel&&(this.off(),this.swf.off(null,null,this),this.swf.triggerFlash("instream:destroy"),this.swf=null,this._adModel.off(),this._adModel=null,this.model=null)},load:function(e){this.swf.triggerFlash("instream:load",e)},instreamPlay:function(){this.swf.triggerFlash("instream:play")},instreamPause:function(){this.swf.triggerFlash("instream:pause")}},e),o}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(196),i(4),i(0),i(3)],t=function(i,e,c,f){function t(n,r,a,s){var o,l=this,u=i.getQueue(),e=30;function t(){d("å®è£
è¶
æ¶","å®è£
æ¶é´å¤§äº"+e+"ç§ï¼è§é¢ä¸è½ææ¾")}function h(){c.each(u,function(e){var i,t;
191!0!==e.complete&&!0!==e.running&&null!==n&&(t=e.depends,c.all(t,function(e){return u[e].complete}))&&(e.running=!0,(i=e).method(function(e){var t;t=i,"error"===(e=e=e||{}).type?d(e.msg,e.reason,e.code||""):"complete"===e.type?(clearTimeout(o),l.trigger(f.JWPLAYER_READY)):(t.complete=!0,h())},r,n,a,s))})}function d(e,t,i){clearTimeout(o),l.trigger(f.JWPLAYER_SETUP_ERROR,{message:e+": "+t,code:i}),l.destroy()}this.start=function(){o=setTimeout(t,1e3*e),h()},this.destroy=function(){clearTimeout(o),this.off(),u.length=0,a=r=n=null}}return t.prototype=e,t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(45),i(70),i(106),i(71),i(44),i(0),i(1),i(3),i(12),i(33)],t=function(n,i,r,a,s,o,l,u,e,t){var h,d;function c(e){e()}function f(e){e()}function p(e){e()}function m(e){e()}function g(e,t){(h=i.loadPlugins(t.get("id"),t.get("plugins"))).on(u.COMPLETE,e),h.on(u.ERROR,o.partial(y,e)),h.load()}function _(e,t,i){h.setupPlugins(i,t),e()}function y(e,t){L(e,"Could not load plugin",t.message)}function v(t,i){var e=i.get("playlist");o.isString(e)?((d=new r).on(u.JWPLAYER_PLAYLIST_LOADED,function(e){i.set("playlist",e.playlist),i.set("feedid",e.feedid),t()}),d.on(u.JWPLAYER_ERROR,o.partial(E,t)),d.load(e)):t()}function A(e,t,i,n,r){var a,t=t.get("playlist");r(t)?e():(r={},t=function(e){var t="",i="";i=(t=l.isMobile()&&(l.isRtmp(e[0].file)||l.isFlv(e[0].file))?"ææºä¸ä¸è½ææ¾rtmpæflvæ ¼å¼çè§é¢":"䏿¯æçè§é¢æ ¼å¼æè
åªä½é®é¢","111");return{errorMessage:t,errorCode:i}}(t),r.message=t.errorMessage,r.code=t.errorCode,"111"===r.code?(t=e,(a=r)&&a.message&&L(t,"è§é¢å 载失败",a.message,a.code||"")):(t=e,(a=r)&&a.message&&L(t,"ææ¾å¨å 载失败",a.message,a.code||"")))}function E(e,t){t&&t.message?L(e,"ææ¾å表å 载失败",t.message):L(e,"ææ¾å¨å 载失败","æªåç°å¯ææ¾çèµæº")}function b(e,t){var i=t.get("skin"),n=t.get("skinUrl");o.contains(s.SkinsIncluded,i)?e():(n=n||function(e,t){if(o.contains(s.SkinsLoadable,e))return t+"skins/"+e+".css"}(i,__DEBUG__?t.get("base"):s.repo),o.isString(n)&&!function(e){for(var t=document.styleSheets,i=0,n=t.length;i<n;i++)if(t[i].href===e)return 1}(n)&&(t.set("skin-loading",!0),(i=new a(n,!0)).addEventListener(u.COMPLETE,function(){t.set("skin-loading",!1)}),i.addEventListener(u.ERROR,function(){t.set("skin","bce"),t.set("skin-loading",!1)}),i.load()),o.defer(function(){e()}))}function w(e,t){var i=t.getProviders(),t=t.get("playlist"),i=i.required(t);n.load(i).then(e)}function S(e,t,i,n){n.setup(),e()}function T(e){e({type:"complete"})}function L(e,t,i,n){e({type:"error",msg:t,reason:i,code:n||""})}return{getQueue:function(){return{LOAD_PROMISE_POLYFILL:{method:c,depends:[]},LOAD_BASE64_POLYFILL:{method:f,depends:[]},LOAD_JSON2:{method:p,depends:[]},LOADED_POLYFILLS:{method:m,depends:["LOAD_PROMISE_POLYFILL","LOAD_BASE64_POLYFILL","LOAD_JSON2"]},LOAD_PLUGINS:{method:g,depends:["LOADED_POLYFILLS"]},INIT_PLUGINS:{method:_,depends:["LOAD_PLUGINS","SETUP_VIEW"]},LOAD_PROVIDERS:{method:w,depends:["FILTER_PLAYLIST"]},LOAD_SKIN:{method:b,depends:["LOADED_POLYFILLS"]},LOAD_PLAYLIST:{method:v,depends:["LOADED_POLYFILLS"]},FILTER_PLAYLIST:{method:A,depends:[]},SETUP_VIEW:{method:S,depends:["LOAD_SKIN"]},SEND_READY:{method:T,depends:["INIT_PLUGINS","LOAD_PROVIDERS","SETUP_VIEW"]}}},error:L}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(58),i(1),i(3),i(4),i(0),i(71)],t=function(f,p,d,c,m,g){return function(a,t){var s,o=m.extend(this,c),i=g.loaderstatus.NEW,e=!1,n=m.size(t),l=!1;function u(){e||(e=!0,i=g.loaderstatus.COMPLETE,o.trigger(d.COMPLETE))}function r(){var r;l||(t&&0!==m.keys(t).length||u(),e)||(r=a.getPlugins(),s=m.after(n,u),m.each(t,function(e,t){var t=f.getPluginName(t),t=r[t],i=t.getJS(),n=t.getTarget(),t=t.getStatus();t!==g.loaderstatus.LOADING&&t!==g.loaderstatus.NEW&&(i&&!p.versionCheck(n)&&o.trigger(d.ERROR,{message:"Incompatible player version"}),s())}))}function h(e){var t;l||(t="File not found",e.url&&p.log(t,e.url),this.off(),this.trigger(d.ERROR,{message:t}),r())}this.setupPlugins=function(d,e){var i=[],n=a.getPlugins(),c=e.get("plugins");m.each(c,function(e,t){var o=f.getPluginName(t),l=n[o],t=l.getFlashPath(),u=l.getJS(),h=l.getU
191RL();t&&(t=m.extend({name:o,swf:t,pluginmode:l.getPluginmode()},e),i.push(t)),p.tryCatch(function(){var e,t,i,n,r,a;function s(){var e=i.displayArea;e&&i.resize(e.clientWidth,e.clientHeight)}u&&c[h]&&((e=document.createElement("div")).id=d.id+"_"+o,e.className="jw-plugin jw-reset",t=m.extend({},c[h]),(t=l.getNewInstance(d,t,e)).addToPlayer=(n=d,r=t,a=e,function(){var e=p.getElementsByClassName("jw-overlays",n.getContainer())[0];e&&(e.appendChild(a),a.left=e.style.left,a.top=e.style.top,r.displayArea=e)}),t.resizeHandler=(i=t,function(){s(),setTimeout(s,400)}),d.addPlugin(o,t,e))})instanceof p.Error&&p.log("ERROR: Failed to load "+o+".")}),e.set("flashPlugins",i)},this.load=function(){var e;p.exists(t)&&"object"!==p.typeOf(t)||(i=g.loaderstatus.LOADING,m.each(t,function(e,t){p.exists(t)&&((t=a.addPlugin(t)).on(d.COMPLETE,r),t.on(d.ERROR,h))}),e=a.getPlugins(),m.each(e,function(e){e.load()})),r()},this.destroy=function(){l=!0,this.off()},this.getStatus=function(){return i}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(58),i(105)],t=function(n,r){return function(i){this.addPlugin=function(e){var t=n.getPluginName(e);return i[t]||(i[t]=new r(e)),i[t]},this.getPlugins=function(){return i}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(12),i(47),i(200),i(201),i(107)],t=function(s,e,o,l,u){var h=e.textContent,d=e.getChildNode,c=e.numChildren,f=e.localName,e={};return e.parse=function(e){for(var t=[],i=0;i<c(e);i++){var n=d(e,i);if("channel"===f(n).toLowerCase())for(var r=0;r<c(n);r++){var a=d(n,r);"item"===f(a).toLowerCase()&&t.push(function(e){for(var t={},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i],r=f(n);if(r)switch(r.toLowerCase()){case"enclosure":t.file=s.xmlAttribute(n,"url");break;case"title":t.title=h(n);break;case"guid":t.mediaid=h(n);break;case"pubdate":t.date=h(n);break;case"description":t.description=h(n);break;case"link":t.link=h(n);break;case"category":t.tags?t.tags+=h(n):t.tags=h(n)}}return t=l(e,t),t=o(e,t),new u(t)}(a))}}return t},e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(47),i(12),i(1)],t=function(h,d,c){return function(e,t){for(var i=[],n=[],r=d.xmlAttribute,a="default",s="file",o=0;o<e.childNodes.length;o++){var l,u=e.childNodes[o];"jwplayer"===u.prefix&&("source"===(l=h.localName(u))?(delete t.sources,i.push({f
191ile:r(u,s),default:r(u,a),label:r(u,"label"),type:r(u,"type")})):"track"===l?(delete t.tracks,n.push({file:r(u,s),default:r(u,a),kind:r(u,"kind"),label:r(u,"label")})):(t[l]=c.serialize(h.textContent(u)),"file"===l&&t.sources&&delete t.sources)),t.file||(t.file=t.link)}if(i.length)for(t.sources=[],o=0;o<i.length;o++)0<i[o].file.length&&(i[o][a]="true"===i[o][a],i[o].label.length||delete i[o].label,t.sources.push(i[o]));if(n.length)for(t.tracks=[],o=0;o<n.length;o++)0<n[o].file.length&&(n[o][a]="true"===n[o][a],n[o].kind=n[o].kind.length?n[o].kind:"captions",n[o].label.length||delete n[o].label,t.tracks.push(n[o]));return t}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(47),i(12),i(1)],t=function(e,t,l){function u(e,t){var i,n,r,a="tracks",s=[];for(n=0;n<f(e);n++)if("media"===(i=e.childNodes[n]).prefix&&d(i))switch(d(i).toLowerCase()){case"content":h(i,"duration")&&(t.duration=l.seconds(h(i,"duration"))),h(i,"url")&&(t.sources||(t.sources=[]),r={file:h(i,"url"),type:h(i,"type"),width:h(i,"width"),label:h(i,"label")},(o=function(e){for(var t=[],i=0;i<f(e);i++){var n=e.childNodes[i];"jwplayer"===n.prefix&&"mediatypes"===d(n).toLowerCase()&&t.push(c(n))}return t}(i)).length&&(r.mediaTypes=o),t.sources.push(r)),0<f(i)&&(t=u(i,t));break;case"title":t.title=c(i);break;case"description":t.description=c(i);break;case"guid":t.mediaid=c(i);break;case"thumbnail":t.image||(t.image=h(i,"url"));break;case"player":break;case"group":u(i,t);break;case"subtitle":var o={};o.file=h(i,"url"),o.kind="captions",0<h(i,"lang").length&&(o.label=(r=h(i,"lang"),void 0,{zh:"Chinese",nl:"Dutch",en:"English",fr:"French",de:"German",it:"Italian",ja:"Japanese",pt:"Portuguese",ru:"Russian",es:"Spanish"}[r]||r)),s.push(o)}for(t.hasOwnProperty(a)||(t[a]=[]),n=0;n<s.length;n++)t[a].push(s[n]);return t}var h=t.xmlAttribute,d=e.localName,c=e.textContent,f=e.numChildren;return u}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(t){var i={kind:"captions",default:!1};return function(e){if(e&&e.file)return t.extend({},i,e)}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(47),i(72),i(204),i(1)],t=function(g,_,y,v){return function(e,a){function s(e){if(e.tracks.length){a.mediaController.off("meta",h),o=[],l={},u={},r=0;for(var t=e.tracks||[],i=0;i<t.length;i++){var n=t[i];n.id=n.name,n.label=n.name||n.language,f(n)}e=p();this.setCaptionsList(e),m()}}a.on("change:playlistItem",c,this),a.on("change:captionsIndex",function(e,t){var i=null;0!==t&&(i=o[t-1]);e.set("captionsTrack",i)},this),a.on("itemReady",function(e){c(0,e),a.mediaController.off("meta",h),a.mediaController.off("subtitlesTracks",s);var t,i,n,r=e.tracks;a.get("provider").name,v.isChrome()||v.isIOS()||v.isSafari();for(n=0;n<r.length;n++)t=r[n],t.file&&/\.(?:web)?vtt(?:\?.*)?$/i.test(t.file),"captions"!==(i=t.kind.toLowerCase())&&"subtitles"!==i||(t.file?(f(t),function(n){v.ajax(n.file,function(e){var t=n,i=e.responseXML?e.responseXML.firstChild:null;if(i)for("xml"===g.localName(i)&&(i=i.nextSibling);i.nodeType===i.COMMENT_NODE;)i=i.nextSibling;try{i&&"tt"===g.localName(i)?t.data=y(e.responseXML):t.data=_(e.responseText)}catch(e){d(e.message+": "+t.file)}},d)}(t)):t.data&&f(t));o.length||(a.mediaController.on("meta",h,this),a.mediaController.on("subtitlesTracks",s,this));e=p();this.setCaptionsList(e),m()},this),a.mediaController.on("subtitlesTracks",s,this),a.mediaController.on("subtitlesTrackData",function(e){var t=l[e.name];if(t){t.source=e.source;for(var i=e.captions||[],n=!1,r=0;r<i.length;r++){var a=i[r],s=e.name+"_"+a.begin+"_"+a.end;u[s]||(u[s]=a,t.data.push(a),n=!0)}n&&t.data.sort(function(e,t){return e.begin-t.begin})}},this),a.mediaController.on("meta",h,this);a.get("sdkplatform");var o=[],l={},u={},r=0;function h(e){var t,i,n,r=e.metadata;!r||"textdata"!==r.type||!r.text||((t=l[r.trackid])||(f(t={kind:"captions",id:r.trackid,data:[]}),n=p(),this.setCaptionsList(n)),n=r.useDTS?(t.source||(t.source=r.source||"mpegts"),i=r.begin,r.begin+"_"+r.text):(i=e.position||a.get("position"),Math.round(10*i)+"_"+r.text),e=u[n])||(e={begin:i,text:r.text},r.end&&(e.end=r.end),u[n]=e,t.data.push(e))}function d(e){v.log("CAPTIONS("+e+")")}function c(e,t){o=[],l={},u={},r=0}function f(e){"number"!=typeof e.id&&(e.id=e.name||e.file||"cc"+o.length),e.data=e.data||[],e.label||(e.label="Unknown CC",1<++r&&(e.label+=" ("+r+")")),o.push(e),l[e.id]=e}function p(){for(var e=[{id:"off",label:"Off"}],t=0;t<o.length;t++)e.push({id:o[t].id,label:o[t].label||"Unknown CC"});return e}function m(){var e=0,t=a.get("captionLabel");if("Off"===t)a.set("captionsIndex",0);else{for(var i,n=0;n<o.length;n++){var r=o[n];if(t&&t===r.label){e=n+1;break}
191r.default||r.defaulttrack||"default"===r.id?e=n+1:r.autoselect}i=e,o.length?a.setVideoSubtitleTrack(i,o):a.set("captionsIndex",i)}}this.getCurrentIndex=function(){return a.get("captionsIndex")},this.getCaptionsList=function(){return a.get("captionsList")},this.setCaptionsList=function(e){a.set("captionsList",e)}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(12)],t=function(l){var u=l.seconds;return function(e){h(e);var t=[],i=e.getElementsByTagName("p");h(i),i.length||(i=e.getElementsByTagName("tt:p")).length||(i=e.getElementsByTagName("tts:p"));for(var n=0;n<i.length;n++){var r,a,s=i[n],o=s.innerHTML||s.textContent||s.text||"",o=l.trim(o).replace(/>\s+</g,"><").replace(/tts?:/g,"");o&&(a=s.getAttribute("begin"),r=s.getAttribute("dur"),s=s.getAttribute("end"),a={begin:u(a),text:o},s?a.end=u(s):r&&(a.end=a.begin+u(r)),t.push(a))}return t.length||d(),t};function h(e){e||d()}function d(){throw new Error("Invalid DFXP file")}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(107),i(108),i(0),i(45)],t=function(t,o,h,i){function e(e){return e=h.isArray(e)?e:[e],h.compact(h.map(e,t))}e.filterPlaylist=function(e,t,i,n,r,a,s,o,l){var u=[];return h.each(e,function(e){(e=h.extend({},e)).allSources=d(e.sources,i,e.drm||n,e.preload||r,f(e.withCredentials,s),o,l),e.sources=c(e.allSources,t),e.sources.length&&(e.file=e.sources[0].file,(e.preload||r)&&(e.preload=e.preload||r),(e.feedid||a)&&(e.feedid=e.feedid||a),u.push(e))}),u};var d=function(e,t,i,n,r,a,s){return h.compact(h.map(e,function(e){if(h.isObject(e))return null!=t&&(e.androidhls=t),(e.drm||i)&&(e.drm=e.drm||i),(e.preload||n)&&(e.preload=e.preload||n),e.withCredentials=f(e.withCredentials,r),e.isHEVC=!0,e.isNative=!0,o(e)}))},c=function(e,t){t=function(e,t){for(var i=0;i<e.length;i++){var n=e[i];if(t.choose(n))return n.type}return null}(e,t=t&&t.choose?t:new i({primary:t?"flash":null}));return h.where(e,{type:t})};function f(e,t){return h.isUndefined(e)?t:e}return e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(3),i(4),i(44),i(15),i(207),i(208),i(209),i(211),i(213),i(215),i(229),i(230),i(232),i(233),i(235),i(236),i(0),i(238),i(239),i(241)],t=function(Ee,be,we,Se,Te,Le,ke,Ce,Re,Ie,Pe,xe,De,Me,Be,Fe,Oe,Ue,Ne,je,Ge){var Ve=Ee.style,He=Ee.bounds,Ye=Ee.isMobile(),ze=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],We={versions:function(){var e=navigator.userAgent;navigator.appVersion;return{trident:-1<e.indexOf("Trident"),presto:-1<e.indexOf("Presto"),webKit:-1<e.indexOf("AppleWebKit"),gecko:-1<e.indexOf("Gecko")&&-1===e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:-1<e.indexOf("Android")||-1<e.indexOf("Linux"),iPhone:-1<e.indexOf("iPhone"),iPad:-1<e.indexOf("iPad"),webApp:-1===e.indexOf("Safari"),weixin:-1<e.indexOf("MicroMessenger"),qq:" qq"===e.match(/\sQQ/i)}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase()};return function(r,a){var s,o,l,F,O,u,h,d,c,f,p,t,m,g,_,y,v,A,E,b,n,w,S,T,e=-1,U=2e3,N=40,L=!1,i=!1,k=-1,j=-1,C=!1,G=!1,R=Ue.extend(this,we),V=(this.model=a,this.api=r,s=Ee.createElement(Ne({id:a.get("id")})),Ee.isIE()&&Ee.addClass(s,"jw-ie"),Ee.isPoorIE()&&Ee.addClass(s,"jw-ie-poorie"),a.get("flashUI")&&Ee.addClass(s,"jw-flashui"),a.get("width")),H=a.get("height");function Y(e){var t=0,i=a.get("duration"),n=a.get("position"),n=("DVR"===Ee.adaptiveType(i)&&(t=i,i=Math.max(n,Se.dvrSeekLimit)),Ee.between(n+e,t,i));r.seek(n)}function z(e){var t,i=a.get("volume"),e=("-"===e?t=100<i?-50:-10:(t=100<=i?50:10,i<100&&100<i+t&&(t=100-i)),a.getVideo()),i=e&&0===e.getName().name.indexOf("flash")?500:100,e=Ee.between(a.get("volume")+t,0,i);r.setVolume(e)}function W(e){var t,i=a.get("keyControls");if((t=e).ctrlKey||t.metaKey||!a.get("controls"))return!0;switch(L||M(),e.keyCode){case 27:r.setFullscreen(!1);break;case 13:case 32:i&&r.play({reason:"interaction"});break;case 37:L||Y((n=a.get("seek_step"))?1+~n:-5);break;case 39:L||Y((n=a.get("seek_step"))||5);break;case 38:z("+");break;case 40:z("-");break;case 67:var n=r.getCaptionsList().length;n&&(n=(r.getCurrentCaptions()+1)%n,r.setCurrentCaptions(n));break;case 77:i&&r.setMute();break;case 70:i&&r.setFullscreen();break;default:i&&48<=e.keyCode&&e.keyCode<=59&&(n=(e.keyCode-48)/10*a.get("duration"),r.seek(n))}return/13|32|37|38|39|40/.test(e.keyCode)?(e.preventDefault&&e.preventDefault(),!1):void 0}function Q(){G=!1,Ee.removeClass(s,"jw-no-focus")}function K(){G=!0,Ee.addClass(s,"jw-no-focus")}function J(){G||Q(),L||M()}function I(){var e=He(s),t=Math.round(e.width),i=Math.round(e.height);return document.body.contains(s)?t&&i&&(t===F&&i===O||(F=t,O=i,clearTimeout(k),k=setTimeout(x,50),a.set("containerWidth",t),a.set("containerHeight",i),R.trigger(be.JWPLAYER_RESIZE,{width:t,height:i}))):(Ee.removeEventListener(window,"resize",I),Ye&&Ee.removeEventListener(window,"orientationchange",I)),e}function q(e,t){Ee.toggleClass(s,"jw-flag-casting",t=t||!1)}function X(e,t){Ee.toggleClass(s,"jw-flag-cast-available",t),Ee.toggleClass(o,"jw-flag-cast-available",t)}function Z(e,t){Ee.replaceClass(s,/jw-stretch-\S+/,"jw-stretch-"+t)}function $(e,t){Ee.toggleClass(s,"jw-flag-compact-player",t)}function ee(e){e&&!Ye&&(Ee.addEventListener(e.element(),"mousemove",ne,!1),Ee.addEventListener(e.element(),"mouseout",re,!1))}function te(){a.get("state")!==Te.IDLE&&a.get("state")!==Te.COMPLETE&&a.get("state")!==Te.PAUSED||!a.get("controls")||r.play({reason:"interaction"}),(i?fe:M)()}function ie(e){e.link?(r.pause(!0),r.setFullscreen(!1),window.open(e.link,e.linktarget)):a.get("controls")&&r.play({reason:"interaction"})}function ne(){clearTimeout(e)}function re(){M()}function P(e){R.trigger(e.type,e)}
191function ae(e,t){t?(E&&E.destroy(),Ee.addClass(s,"jw-flag-flash-blocked")):(E&&E.setup(a,s,s),Ee.removeClass(s,"jw-flag-flash-blocked"))}Ve(s,{width:0<V.toString().indexOf("%")?V:V+"px",height:0<H.toString().indexOf("%")?H:H+"px"}),n=s.requestFullscreen||s.webkitRequestFullscreen||s.webkitRequestFullScreen||s.mozRequestFullScreen||s.msRequestFullscreen,w=document.exitFullscreen||document.webkitExitFullscreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen,C=n&&w,this.onChangeSkin=function(e,t){Ee.replaceClass(s,/jw-skin-\S+/,t?"jw-skin-"+t:"")},this.handleColorOverrides=function(){var r=a.get("id");function e(e,t,i){var n;i&&(e=Ee.prefix(e,"#"+r+" "),(n={})[t]=i,Ee.css(e.join(", "),n,r))}var t=a.get("skinColorActive"),i=a.get("skinColorInactive"),n=a.get("skinColorBackground");e([".jw-toggle",".jw-button-color:hover"],"color",t),e([".jw-active-option",".jw-progress",".jw-playlist-container .jw-option.jw-active-option",".jw-playlist-container .jw-option:hover"],"background",t),e([".jw-text",".jw-option",".jw-button-color",".jw-toggle.jw-off",".jw-tooltip-title",".jw-skip .jw-skip-icon",".jw-playlist-container .jw-icon"],"color",i),e([".jw-cue",".jw-knob"],"background",i),e([".jw-playlist-container .jw-option"],"border-bottom-color",i),e([".jw-background-color",".jw-tooltip-title",".jw-playlist",".jw-playlist-container .jw-option"],"background",n),e([".jw-playlist-container ::-webkit-scrollbar"],"border-color",n)},this.setup=function(){this.handleColorOverrides(),!0===a.get("skin-loading")&&(Ee.addClass(s,"jw-flag-skin-loading"),a.once("change:skin-loading",function(){Ee.removeClass(s,"jw-flag-skin-loading")})),this.onChangeSkin(a,a.get("skin"),""),a.on("change:skin",this.onChangeSkin,this),l=Ee.getElementsByClassName("jw-media",s)[0],o=Ee.getElementsByClassName("jw-controls",s)[0];
191var e=Ee.getElementsByClassName("jw-preview",s)[0],t=((d=new xe(a)).setup(e),Ee.getElementsByClassName("jw-title",s)[0]),t=((_=new Fe(a)).setup(t),Ee.isPoorIE()?(Ee.style(Ee.getElementsByClassName("jw-marquee",s)[0],{display:"none"}),Ee.style(Ee.getElementsByClassName("jw-danmaku",s)[0],{display:"none"})):(c=new De(a,r),a.get("imageAdvs")&&s.appendChild(c.element()),a.get("marquee").show&&(t=Ee.getElementsByClassName("jw-marquee",s)[0],f=new Me(a,t),Ee.style(s,{overflow:"hidden"})),a.get("danmaku")&&(this.api.danmaku=y=new Oe(s,a))),a.advManage&&a.advManage.hasProcessAdv&&s.appendChild(a.advManage.element()),Ee.getElementsByClassName("jw-overlays",s)[0]);Ee.addEventListener(t,"mousemove",M),(p=new ke(a,l,{useHover:!0})).on("click",function(){if(Ee.isMobile()){var e=Ee.hasClass(s,"jw-flag-user-inactive");if(e&&(M(),"playing"===b))return}P({type:be.JWPLAYER_DISPLAY_CLICK}),a.get("controls")&&!a.get("flashUI")&&a.get("allowClickToDisplay")&&r.play({reason:"interaction"})}),p.on("tap",function(){P({type:be.JWPLAYER_DISPLAY_CLICK}),te()}),a.get("allowDoubleClickFullscreen")&&p.on("doubleClick",oe),p.on("move",M),p.on("over",M),(t=new Ce(a)).on("click",function(){P({type:be.JWPLAYER_DISPLAY_CLICK}),r.play({reason:"interaction"})}),t.on("tap",function(){P({type:be.JWPLAYER_DISPLAY_CLICK}),te()}),o.appendChild(t.element()),m=new Re(a),(g=new Ie(a)).on(be.JWPLAYER_LOGO_CLICK,ie),(t=document.createElement("div")).className="jw-controls-right jw-reset",g.setup(t),t.appendChild(m.element()),o.appendChild(t),(v=new Le(a)).setup(s.id,a.get("captions")),o.parentNode.insertBefore(v.element(),_.element()),a.get("watermark")&&(T=new Ge(a,o,s.id)),t=a.get("height"),Ye&&("string"==typeof t||1.5*N<=t)?Ee.addClass(s,"jw-flag-touch"):(E=new Be).setup(a,s,s),(h=new Pe(r,a)).on(be.JWPLAYER_USER_ACTION,M),h.on(be.JWPLAYER_CHANGE_LANGs,Ae),a.on("change:scrubbing",ue),a.on("change:compactUI",$),o.appendChild(h.element()),Ee.addEventListener(s,"focus",J),Ee.addEventListener(s,"blur",Q),Ee.addEventListener(s,"keydown",W),s.onmousedown=K,M(),a.set("mediaContainer",l),a.mediaController.on("fullscreenchange",D);for(var i=ze.length;i--;)Ee.addEventListener(document,ze[i],D,!1);Ee.removeEventListener(window,"resize",I),Ee.addEventListener(window,"resize",I,!1),Ye&&(Ee.removeEventListener(window,"orientationchange",I),Ee.addEventListener(window,"orientationchange",I,!1)),a.on("change:errorEvent",ye),a.on("change:controls",se),se(a,a.get("controls")),a.on("change:state",B),a.on("change:duration",_e,this),a.on("change:flashBlocked",ae),ae(0,a.get("flashBlocked")),r.onPlaylistComplete(pe),r.onPlaylistItem(me),a.on("change:castAvailable",X),X(0,a.get("castAvailable")),a.on("change:castActive",q),q(0,a.get("castActive")),a.get("stretching")&&Z(0,a.get("stretching")),a.on("change:stretching",Z),B(0,Te.IDLE),a.on("change:fullscreen",he),ee(h),ee(g);var n,t=a.get("aspectratio");t&&(Ee.addClass(s,"jw-flag-aspect-mode"),n=Ee.getElementsByClassName("jw-aspect",s)[0],Ve(n,{paddingTop:t})),r.on(be.JWPLAYER_READY,function(){I(),de(a.get("width"),a.get("height"))}),r.on(be.JWPLAYER_PERFORMANCE,e=>{h.elements.pictInpict.hide();var t=a.get("liveInfoPanel");t&&t.showH265Info&&(S||(S=new je(a)).setup(o),S.setData(e))}),a.on("connecting",function(){R.setAltText("æ£å¨ä¸æå¡å¨å»ºç«è¿æ¥"),Ee.toggleClass(s,"jw-flag-live",!0)}),a.on("connectFaild",function(){r.stop(),R.setAltText("è¿æ¥å·²æå¼ï¼è¯·ç¨åéè¯"),Ee.toggleClass(s,"jw-flag-live",!0),Ee.getElementsByClassName("jw-controlbar",s)[0].style.display="block"}),a.on("alive",function(){"idle"!==R.model.get("state")&&(R.setAltText("ç´æä¸"),Ee.toggleClass(s,"jw-flag-live",!0),e.style.display="none",Ee.getElementsByClassName("jw-controlbar",s)[0].style.removeProperty("display"))}),a.on("noLiveStream",function(){"idle"!==R.model.get("state")&&a.get("isLive")&&(R.setAltText("æ ç´ææµ"),Ee.toggleClass(s,"jw-flag-live",!0),a.get("image")&&(e.style.display="block"),Ee.getElementsByClassName("jw-controlbar",s)[0].style.display="block")}),a.on("liveStop",function(){r.stop(),R.setAltText("ç´æç»æ"),Ee.toggleClass(s,"jw-flag-live",!0),Ee.getElementsByClassName("jw-controlbar",s)[0].style.display="block"}),a.on("seekAfterLoadSuccess",function(){R.setAltText("èªå¨è·³è½¬å°ä¸æ¬¡çææ¾æ¶é´..."),Ee.addClass(h.element
191(),"jw-controlbar-textshow"),setTimeout(function(){Ee.removeClass(h.element(),"jw-controlbar-textshow")},1e3)}),a.on("change:danmaku",()=>{})};var se=function(e,t){t&&B(0,(L?u:a).get("state")),Ee.toggleClass(s,"jw-flag-controls-disabled",!t)};function oe(){null!==We&&null!=We.versions&&void 0!==We.versions.android&&null!==We.versions.android&&!0===We.versions.android||a.get("controls")&&r.setFullscreen()}function le(e){e.get("state")===Te.PAUSED?e.once("change:state",le):!1===e.get("scrubbing")&&Ee.removeClass(s,"jw-flag-dragging")}function ue(e,t){e.off("change:state",le),t?Ee.addClass(s,"jw-flag-dragging"):le(e)}var he=function(e,t){var i=a.getVideo();C?(t?n.apply(s):(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msExitFullscreenElement)&&w.apply(document),ce(s,t)):Ee.isIE()?ce(s,t):(u&&u.getVideo()&&u.getVideo().setFullscreen(t),i.setFullscreen(t)),i&&0===i.getName().name.indexOf("flash")&&i.setFullscreen(t),f&&a.get("marquee").show&&f.reset(s.clientWidth,s.clientHeight)};function de(e,t,i){var n=s.className,i=((i=!!i)&&(n=n.replace(/\s*aspectMode/,""),s.className!==n&&(s.className=n),Ee.style(s,{display:"block"},i)),Ee.exists(e)&&Ee.exists(t)&&(a.set("width",e),a.set("height",t)),n={width:e},Ee.hasClass(s,"jw-flag-aspect-mode")||(n.height=t),Ve(s,n,!0),t);A=function(e){if(a.get("aspectratio"))return!1;if(Ue.isString(e)&&-1<e.indexOf("%"))return!1;return function(e){return e&&e<=N*(Ye?1.75:1)}(Ue.isNumber(e)?e:a.get("containerHeight"))}(i),h&&!A&&B(i=L?u:a,i.get("state")),Ee.toggleClass(s,"jw-flag-audio-player",A),x(e,t)}function x(e,t){if(!e||isNaN(Number(e))){if(!l)return;e=l.clientWidth}if(!t||isNaN(Number(t))){if(!l)return;t=l.clientHeight}d&&d.resize(e,t,a.get("stretching")),Ee.isMSIE(9)&&document.all&&!window.atob&&(e=t="100%");var i=a.getVideo();i&&(i.resize(e,t,a.get("stretching"))&&(clearTimeout(k),k=setTimeout(x,250)),v.resize(),h.checkCompactMode(e),a.get("state")===Te.PAUSED)&&a.get("imageAdvs")&&a.get("imageAdvs").pause&&c&&!c.isHidden()&&c.resizePauseAdv(e,t)}function D(e){var t=a.get("fullscreen"),e=void 0!==e.jwstate?e.jwstate:C?!(!(e=document.fullscreenElement||document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.msFullscreenElement)||e.id!==a.get("id")):(L?u:a).getVideo().getFullScreen();t!==e&&a.set("fullscreen",e)}function ce(e,t){t?(Ee.addClass(e,"jw-flag-fullscreen"),Ve(document.body,{"overflow-y":"hidden"}),M()):(Ee.removeClass(e,"jw-flag-fullscreen"),Ve(document.body,{"overflow-y":""})),x()}function fe(){i=!1,clearTimeout(e),h.hideComponents(),Ee.addClass(s,"jw-flag-user-inactive")}function M(){i||(Ee.removeClass(s,"jw-flag-user-inactive"),h.checkCompactMode(l.clientWidth)),i=!0,clearTimeout(e),e=setTimeout(fe,U)}function pe(){r.setFullscreen(!1),a.get("imageAdvs")&&a.get("imageAdvs").end&&c&&c.loadAdv("end")}function me(){t&&t.setState(a.get("state")),ge(0,a.mediaModel.get("mediaType")),a.mediaModel.on("change:mediaType",ge,this)}function ge(e,t){var t="audio"===t,i=a.getVideo(),i=i&&0===i.getName().name.indexOf("flash");Ee.toggleClass(s,"jw-flag-media-audio",t),t&&!i?s.insertBefore(d.el,l):s.insertBefore(d.el,v.element())}function _e(e,t){e=!0===e.get("isLive")||"LIVE"===Ee.adaptiveType(t)||"DVR"===Ee.adaptiveType(t);Ee.toggleClass(s,"jw-flag-live",e),e||R.setAltText("")}function ye(e,t){t?t.name?_.updateText(t.name,t.message):_.updateText(t.message,""):_.playlistItem(e,e.get("playlistItem"))}function ve(){!0===a.get("autostart")&&(b="idle"===b?"buffering":b),Ee.replaceClass(s,/jw-state-\S+/,"jw-state-"+b)}function B(e,t){var i;if(b=t,clearTimeout(j),t!==Te.COMPLETE&&Te.IDLE,ve(),(i=a.getVideo())&&i.isCaster)Ee.addClass(l,"jw-media-show");else switch(t){case Te.PLAYING:c&&c.startAdvPlayed&&c.hide(),x(),f&&a.get("marquee").show&&f.start(),y&&a.get("danmaku").show&&y.start();break;case Te.PAUSED:c&&a.get("imageAdvs")&&a.get("imageAdvs").pause&&c.loadAdv("pause"),M(),f&&a.get("marquee").show&&f.pause(),y&&a.get("danmaku").show&&y.pause();break;case Te.IDLE:f&&a.get("marquee").show&&f.pause(),y&&a.get("danmaku").show&&y.pause();break;case Te.COMPLETE:f&&f.stop()}}function Ae(e){S&&S.changeLang(e)}this.resize=function(e,t){de(e,t,!0),I()},this.resizeMedia=x,this.reset=function(){document.contains(s)&&s.parentNode.replaceChild(void 0,s),Ee.emptyElement(s)}
191,this.setupInstream=function(e){this.instreamModel=u=e,u.on("change:controls",se,this),u.on("change:state",B,this),L=!0,Ee.addClass(s,"jw-flag-ads"),M()},this.setAltText=function(e){h.setAltText(e)},this.useExternalControls=function(){Ee.addClass(s,"jw-flag-ads-hide-controls")},this.destroyInstream=function(){L=!1,u&&(u.off(null,null,this),u=null),this.setAltText(""),Ee.removeClass(s,"jw-flag-ads"),Ee.removeClass(s,"jw-flag-ads-hide-controls"),a.getVideo&&a.getVideo().setContainer(l),_e(a,a.get("duration")),p.revertAlternateClickHandlers()},this.addCues=function(e){h&&h.addCues(e)},this.addThumbnails=function(e){h&&h.addThumbnails(e)},this.clickHandler=function(){return p},this.controlsContainer=function(){return o},this.getContainer=this.element=function(){return s},this.getSafeRegion=function(e){var t={x:0,y:0,width:a.get("containerWidth")||0,height:a.get("containerHeight")||0},i=a.get("dock");return i&&i.length&&a.get("controls")&&(t.y=m.element().clientHeight,t.height-=t.y),(e=e||!Ee.exists(e))&&a.get("controls")&&(t.height-=h.element().clientHeight),t},this.setCaptions=function(e){v.clear(),v.setup(a.get("id"),e),v.resize()},this.destroy=function(){Ee.removeEventListener(window,"resize",I),Ee.removeEventListener(window,"orientationchange",I);for(var e=ze.length;e--;)Ee.removeEventListener(document,ze[e],D,D,!1);a.mediaController&&a.mediaController.off("fullscreenchange",D),Ee.removeEventListener(s,"keydown",W),E&&E.destroy(),t&&(a.off("change:state",t.statusDelegate),t.destroy(),t=null),L&&this.destroyInstream(),g&&g.destroy(),T&&T.destroy(),c&&c.destroy(),Ee.clearCss(a.get("id"))},this.showAdv=function(e){c&&c.loadAdv(e)},this.beginStartAdv=function(){c&&c.beginStartAdv()},this.sendDanmu=e=>{e&&a.get("danmaku")&&a.get("danmaku").show?this.api.danmaku.send(e):e&&e.trim()&&(!a.get("danmaku")||a.get("danmaku")&&a.get("danmaku").show)},this.setLang=e=>{h&&h.setLang&&h.setLang(e)}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(29),i(15),i(0)],t=function(r,g,a,_){var y=g.style,v={back:!0,fontSize:15,fontFamily:"Arial,sans-serif",fontOpacity:100,color:"#FFF",backgroundColor:"#000",backgroundOpacity:100,edgeStyle:null,windowColor:"#FFF",windowOpacity:0,preprocessor:_.identity};return function(o){var t,l,i,u,h,d,c={};function f(e){var t="jw-captions-window jw-reset";(e=e||"")?(d.innerHTML=e,h.className=t+" jw-captions-window-active"):(h.className=t,r.empty(d))}function n(e,t){if(e&&e.data&&t){t=t,i=(i=e).source,n=t.metadata;var i,n,r=i?!(!n||!_.isNumber(n[i]))&&n[i]:t.position;if(!1!==r){var a=e.data;if(!(0<=l&&p(a,l,r))){for(var s=-1,o=0;o<a.length;o++)if(p(a,o,r)){s=o;break}-1===s?f(""):s!==l&&(l=s,f(c.preprocessor(a[l].text)))}}}}function p(e,t,i){return e[t].begin<=i&&(!e[t].end||e[t].end>=i)&&(t===e.length-1||e[t+1].begin>=i)}function m(e,t,i){i=g.hexToRgba("#000000",i);"dropshadow"===e?t.textShadow="0 2px 1px "+i:"raised"===e?t.textShadow="0 0 5px "+i+", 0 1px 5px "+i+", 0 2px 5px "+i:"depressed"===e?t.textShadow="0 -2px 1px "+i:"uniform"===e&&(t.textShadow="-2px 0 1px "+i+",2px 0 1px "+i+",0 -2px 1px "+i+",0 2px 1px "+i+",-1px 1px 1px "+i+",1px 1px 1px "+i+",1px -1px 1px "+i+",1px 1px 1px "+i)}(u=document.createElement("div")).className="jw-captions jw-reset",this.show=function(){u.className="jw-captions jw-captions-enabled jw-reset"},this.hide=function(){u.className="jw-captions jw-reset"},this.populate=function(e){l=-1,(t=e)?n(e,i):f("")},this.resize=function(){var e=u.clientWidth,e=Math.pow(e/400,.6);e&&(e=c.fontSize*e,y(u,{fontSize:Math.round(e)+"px"}))},this.setup=function(e,t){var i,n,r,a,s;h=document.createElement("div"),d=document.createElement("span"),h.className="jw-captions-window jw-reset",d.className="jw-captions-text jw-reset",c=_.extend({},v,t),t&&(t=c.fontOpacity,a=c.windowOpacity,i=c.edgeStyle,s=c.backgroundColor,n={},r={color:g.hexToRgba(c.color,t),fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,textDecoration:c.textDecoration},a&&(n.backgroundColor=g.hexToRgba(c.windowColor,a)),m(i,r,t),c.back?r.backgroundColor=g.hexToRgba(s,c.backgroundOpacity):null===i&&m("uniform",r),y(h,n),y(d,r),a=e,t=n,s=r,g.css("#"+a+" .jw-vi
191deo::-webkit-media-text-track-display",t,a),g.css("#"+a+" .jw-video::cue",s,a),s.backgroundColor)&&(t="{background-color: "+s.backgroundColor+" !important;}",g.css("#"+a+" .jw-video::-webkit-media-text-track-display-backdrop",t,a)),h.appendChild(d),u.appendChild(h),this.populate(o.get("captionsTrack")),o.set("captions",c)},this.clear=function(){r.empty(u)},this.element=function(){return u},o.on("change:playlistItem",function(){i=null,l=-1,f("")},this),o.on("change:captionsTrack",function(e,t){this.populate(t)},this),o.mediaController.on("seek",function(){l=-1},this),o.mediaController.on("time seek",function(e){n(t,i=e)},this),o.mediaController.on("subtitlesTrackData",function(){n(t,i)},this),o.on("change:state",function(e,t){switch(t){case a.IDLE:case a.ERROR:case a.COMPLETE:this.hide();break;default:this.show()}},this)}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(11),i(3),i(4),i(0)],t=function(l,u,h,d){return function(t,e,i){d.extend(this,h),n=e,this.element=function(){return n};var n,r,a,e=new l(n,d.extend({enableDoubleTap:!0,useMove:!0},i)),s=(e.on("click tap",o),e.on("doubleClick doubleTap",function(){a?a():s.trigger("doubleClick")}),e.on("move",function(){s.trigger("move")}),e.on("over",function(){s.trigger("over")}),e.on("out",function(){s.trigger("out")}),this.clickHandler=o,this);function o(e){t.get("flashBlocked")||(r?r(e):s.trigger(e.type===u.touchEvents.CLICK?"click":"tap"))}this.setAlternateClickHandlers=function(e,t){r=e,a=t||null},this.revertAlternateClickHandlers=function(){a=r=null}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(4),i(11),i(210),i(0)],t=function(i,n,r,a,s){function e(e){s.extend(this,n),this.model=e,this.el=i.createElement(a({}));var t=this;this.iconUI=new r(this.el).on("click tap",function(e){t.trigger(e.type)})}return s.extend(e.prototype,{element:function(){return this.el}}),e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="jw-display-icon-container jw-background-color jw-reset" style="cursor:none;pointer-events:none">\n <div class="jw-icon jw-icon-display jw-button-color jw-reset"></div>\n</div>\n'},useData:!0})},function(e,t,i){i=[i(212),i(1),i(0),i(11)],t=function(i,n,r,a){function e(e){this.model=e,this.setup(),this.model.on("change:dock",this.render,this)}return r.extend(e.prototype,{setup:function(){var e=this.model.get("dock"),t=this.click.bind(this),e=i(e);this.el=n.createElement(e),new a(this.el).on("click tap",t)},getDockButton:function(e){return n.hasClass(e.target,"jw-dock-button")?e.target:(n.hasClass(e.target,"jw-dock-text")?e.target.parentElement:e.target).parentElement},click:function(e){var t=this.getDockButton(e).getAttribute("button"),i=this.model.get("dock"),i=r.findWhere(i,{id:t});i&&i.callback&&i.callback(e)},render:function(){var e=this.model.get("dock"),e=i(e),e=n.createElement(e);this.el.innerHTML=e.innerHTML},element:function(){return this.el}}),e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({1:function(e,t,i,n,r){var a,s,o=null!=t?t:e.nullContext||{},l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return' <div class="jw-dock-button jw-background-color jw-reset'+(null!=(a=l(i,"if").call(o,null!=t?l(t,"btnClass"):t,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r,loc:{start:{line:3,column:59},end:{line:3,column:95}}}))?a:"")+'" button="'+e.escapeExpression("function"==typeof(s=null!=(s=l(i,"id")||(null!=t?l(t,"id"):t))?s:e.hooks.helperMissing)?s.call(o,{name:"id",hash:{},data:r,loc:{start:{line:3,column:105},end:{line:3,column:111}}}):s)+'">\n <div class="jw-icon jw-dock-image jw-reset" '+(null!=(a=l(i,"if").call(o,null!=t?l(t,"img"):t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r,loc:{start:{line:4,column:52},end:{line:4,column:110}}}))?a:"")+'></div>\n <div class="jw-arrow jw-reset"></div>\n'+(null!=(a=l(i,"if").call(o,null!=t?l(t,"tooltip"):t,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r,loc:{start:{line:6,column:8},end:{line:10,column:15}}}))?a:"")+" </div>\n"},2:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" "+e.escapeExpression("function"==typeof(i=null!=(i=a(i,"btnClass")||(null!=t?a(t,"btnClass"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"btnClass",hash:{},data:r,loc:{start:{line:3,column:76},end:{line:3,column:88}}}):i)},4:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"style='background-image: url(\""+e.escapeExpression("function"==typeof(i=null!=(i=a(i,"img")||(null!=t?a(t,"img"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"img",hash:{},data:r,loc:{start:{line:4,column:93},end:{line:4,column:100}}}):i)+"\")'"},6:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return' <div class="jw-overlay jw-background-color jw-reset">
191\n <span class="jw-text jw-dock-text jw-reset">'+e.escapeExpression("function"==typeof(i=null!=(i=a(i,"tooltip")||(null!=t?a(t,"tooltip"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"tooltip",hash:{},data:r,loc:{start:{line:8,column:56},end:{line:8,column:67}}}):i)+"</span>\n </div>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="jw-dock jw-reset">\n'+(null!=(i=(e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]})(i,"each").call(null!=t?t:e.nullContext||{},t,{name:"each",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r,loc:{start:{line:2,column:4},end:{line:12,column:13}}}))?i:"")+"</div>"},useData:!0})},function(e,t,i){i=[i(11),i(1),i(3),i(0),i(4),i(214)],t=function(s,o,l,u,e,h){var d=o.style,c={linktarget:"_blank",margin:8,hide:!1,position:"top-right"};return function(i){var n,r,t=new Image,a=u.extend({},i.get("logo"));return u.extend(this,e),this.setup=function(e){(r=u.extend({},c,a)).hide="true"===r.hide.toString(),n=o.createElement(h()),r.file&&(r.hide&&o.addClass(n,"jw-hide"),o.addClass(n,"jw-logo-"+(r.position||c.position)),"top-right"===r.position&&(i.on("change:dock",this.topRight,this),i.on("change:controls",this.topRight,this),this.topRight(i)),i.set("logo",r),t.onload=function(){var e,t={backgroundImage:'url("'+this.src+'")',width:this.width,height:this.height};r.margin!==c.margin&&3===(e=/(\w+)-(\w+)/.exec(r.position)).length&&(t["margin-"+e[1]]=r.margin,t["margin-"+e[2]]=r.margin),d(n,t),i.set("logoWidth",t.width)},t.src=r.file,new s(n).on("click tap",function(e){o.exists(e)&&e.stopPropagation&&e.stopPropagation(),this.trigger(l.JWPLAYER_LOGO_CLICK,{link:r.link,linktarget:r.linktarget})},this),e.appendChild(n))},this.topRight=function(e){var t=e.get("controls"),i=e.get("dock"),t=t&&(i&&i.length||e.get("sharing")||e.get("related"));d(n,{top:t?"3.5em":0})},this.element=function(){return n},this.position=function(){return r.position},this.destroy=function(){t.onload=null},this}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({1:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'src="'+e.escapeExpression("function"==typeof(i=null!=(i=a(i,"file")||(null!=t?a(t,"file"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"file",hash:{},data:r,loc:{start:{line:2,column:48},end:{line:2,column:56}}}):i)+'"'},compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<div class="jw-logo jw-reset">\n <img class="jw-logo-image" '+(null!=(i=a(i,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"file"):t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r,loc:{start:{line:2,column:31},end:{line:2,column:64}}}))?i:"")+">\n</div>"},useData:!0})},function(e,t,i){const s=i(73);i=[i(1),i(0),i(4),i(44),i(11),i(59),i(217),i(220),i(222),i(224),i(225),i(226)],void 0!==(t=function(r,o,e,t,n,l,u,i,h,d,c,f){function p(e,t){var i=document.createElement("div");return i.className="jw-icon jw-icon-inline jw-button-color jw-reset "+e,i.style.display="none",t&&new n(i).on("click tap",function(){t()}),{element:function(){return i},toggle:function(e){e?this.show():this.hide()},show:function(){i.style.display=""},hide:function(){i.style.display="none"}}}function m(e){var t=document.createElement("span");return t.className="jw-text jw-reset "+e,t}function g(e){return new i(e)}function _(e,t){var i=document.createElement("div");return i.className="jw-group jw-controlbar-"+e+"-group jw-reset",o.each(t,function(e){e.element&&(e=e.element()),i.appendChild(e)}),i}function a(e,t){this._api=e,this._model=t,this._isMobile=r.isMobile(),this._compactModeMaxSize=400,this._maxCompactWidth=-1,this.playlistIndex=0,this.resolutionIndex=0,this.langMenu=[],this.curSelectLangIndex=0,this.setup(),this.qualityChangeLang=s.default,this.qualitylevels=[],this.qualityIndex=0}return o.extend(a.prototype,e,{setup:function(){this.initDefaultResolution(),this.build(),this.initialize()},initDefaultResolution:function(){var e=this._model.get("playlist"),t=e.findIndex(e=>e.default),i=0;-1!=t&&(this._model.set("item",t),i=e[t].sources.findIndex(e=>e.default),i=-1==t?0:i),-1!=i&&(this._model.set("currentLevel",i
191),this.resolutionIndex=i)},build:function(){var e,t,i,n,r,a=new u(this._model,this._api),s=new c("jw-icon-more");!1!==this._model.get("visualplaylist")&&(e=new h("jw-icon-playlist")),n=p("jw-icon-volume",this._api.setMute),t=new l("jw-slider-volume","horizontal"),i=new d(this._model,"jw-icon-volume"),this._model.get("danmaku")&&this._model.get("danmaku").show&&(r=new f(this._model,"jw-icon-danmu")),this.elements={alt:m("jw-text-alt"),barLogo:p("jw-icon-barlogo-new",()=>{window.open(this._model.get("controlbar").barLogoUrl)}),play:p("jw-icon-playback",this._api.play.bind(this,{reason:"interaction"})),prev:p("jw-icon-prev",this._api.playlistPrev.bind(this,{reason:"interaction"})),next:p("jw-icon-next",this._api.playlistNext.bind(this,{reason:"interaction"})),playlist:e,elapsed:m("jw-text-elapsed"),split:m("jw-text-split"),time:a,duration:m("jw-text-duration"),playRate:g("jw-icon-playrate"),drawer:s,hd:g("jw-icon-hd"),qualityChange:g("jw-icon-qualityChange"),cc:g("jw-icon-cc"),audiotracks:g("jw-icon-audio-tracks"),mute:n,volume:t,volumetooltip:i,cast:p("jw-icon-cast jw-off",this._api.castToggle),fullscreen:p("jw-icon-fullscreen",this._api.setFullscreen),screenshot:p("jw-icon-screenshot",this._api.setScreenshot),danmuTooltip:r,pictInpict:p("jw-icon-pictureinpicture",this._api.setPictInPict),lang:g("jw-icon-lang")},this._model.get("danmaku")&&this._model.get("danmaku").show,this.elements.split.innerHTML="/",this.layout={left:[this.elements.barLogo,this.elements.play,this.elements.prev,this.elements.playlist,this.elements.next,this.elements.elapsed,this.elements.split,this.elements.duration],center:[this.elements.time,this.elements.alt,this.elements.sendBox],right:[this.elements.playRate,this.elements.lang,this.elements.hd,this.elements.cc,this.elements.audiotracks,this.elements.drawer,this.elements.mute,this.elements.cast,this.elements.volume,this.elements.volumetooltip,this.elements.fullscreen,this.elements.screenshot,this.elements.danmuBtn,this.elements.danmuTooltip,this.elements.pictInpict],drawer:[this.elements.hd,this.elements.qualityChange,this.elements.cc,this.elements.audiotracks]},this.menus=o.compact([this.elements.playlist,this.elements.hd,this.elements.qualityChange,this.elements.cc,this.elements.audiotracks,this.elements.volumetooltip,this.element.lang]),this.layout.left=o.compact(this.layout.left),this.layout.center=o.compact(this.layout.center),this.layout.right=o.compact(this.layout.right),this.layout.drawer=o.compact(this.layout.drawer),this.el=document.createElement("div"),this.el.className="jw-controlbar jw-background-color jw-reset",this.elements.left=_("left",this.layout.left),this.elements.center=_("center",this.layout.center),this.elements.right=_("right",this.layout.right),this.el.appendChild(this.elements.left),this.el.appendChild(this.elements.center),this.el.appendChild(this.elements.right)},initialize:function(){this._model.get("controlbar").barLogo&&this.elements.barLogo.show(),this.elements.play.show(),this.elements.fullscreen.show(),this._model.get("screenshot")?this.elements.screenshot.show():this.elements.screenshot.hide(),this._model.get("pictinpict")&&r.isPictureInpicture()?this.elements.pictInpict.show():this.elements.pictInpict.hide(),this.elements.mute&&this.elements.mute.show(),this.setUpLangMenu(),this.onVolume(this._model,this._model.get("volume")),this.onPlaylist(this._model,this._model.get("playlist")),this.onPlaylistItem(this._model,this._model.get("playlistItem")),this.onMediaModel(this._model,this._model.get("mediaModel")),this.onCastAvailable(this._model,this._model.get("castAvailable")),this.onCastActive(this._model,this._model.get("castActive")),this.onCaptionsList(this._model,this._model.get("captionsList")),this._model.on("change:volume",this.onVolume,this),this._model.on("change:mute",this.onMute,this),this._model.on("change:playlist",this.onPlaylist,this),this._model.on("change:playlistItem",this.onPlaylistItem,this),this._model.on("change:mediaModel",this.onMediaModel,this),this._model.on("change:castAvailable",this.onCastAvailable,this),this._model.on("change:castActive",this.onCastActive,this),this._model.on("change:duration",this.onDuration,this),this._model.on("change:position",this.onElapsed,this),this._model.on("change:fullscreen",this.onFullscreen,this),this._model.on("change:screenshot",this.onScreenshot,this),this._model.on("change:captionsList",this.onCaptionsList,this),this._model.on("change:captionsIndex",this.onCaptionsIndex,this),this._model.on("change:compactUI",this.onCompactUI,this),this._model.on("change:provider",this.onProvider,this),this._model.on("change:danmaku",this.onDanmaku,this),this.elements.volume&&this.elements.volume.on("update",function(e){e=e.percentage;this._api.setVolume(e)},this),this.elements.volumetooltip&&(this.elements.volumetooltip.on("update",function(e){e=e.percentage;this._api.setVolume(e)}
191,this),this.elements.volumetooltip.on("toggleValue",function(){this._api.setMute()},this)),this.elements.danmuTooltip&&(this.elements.danmuTooltip.on("toggleValue",function(){var e=JSON.parse(JSON.stringify(this._model.get("danmaku")));this._model.set("danmaku",Object.assign(e,{active:!e.active}))}),this.elements.danmuTooltip.on("switch",e=>{var t=JSON.parse(JSON.stringify(this._model.get("danmaku")));this._model.set("danmaku",Object.assign(t,{useMask:!t.useMask})),this._api.danmaku&&this._api.danmaku.updateUseMask(e)}),this.elements.danmuTooltip.on("update",e=>{switch(e.type){case 0:this._api.danmaku&&this._api.danmaku.updateOpacity(e.val);break;case 1:this._api.danmaku&&this._api.danmaku.updateArea(e.val);break;case 2:this._api.danmaku&&this._api.danmaku.updateSpeed(e.val);break;case 3:this._api.danmaku&&this._api.danmaku.updateFontSize(e.val)}})),this.elements.playlist&&this.elements.playlist.on("select",function(e){this._model.once("itemReady",function(){this.playlistIndex=e,this._model.setCurrentQuality(this.resolutionIndex),this._api.play({reason:"interaction"})},this),this._model.set("autostart",!0),this._api.load(e,this.resolutionIndex)},this),this.elements.playRate.on("select",function(e){e=this._model.get("playRateConfig")[e].label,e=parseFloat(e.substring(1));this._model.setPlaybackRate(e)},this),this.elements.hd.on("select",function(e){this._model.once("itemReady",function(){this.resolutionIndex=e,this._model.setCurrentQuality(e),this._api.play({reason:"interaction"})},this),this._api.load(this.playlistIndex,e)},this),this.elements.qualityChange.on("select",function(e){this._model.changeHlsQuality(e),this.elements.qualityChange.selectItem(e)},this),this.elements.hd.on("toggleValue",function(){this._model.getVideo().setCurrentQuality(0===this._model.getVideo().getCurrentQuality()?1:0)},this),this.elements.cc.on("select",function(e){this._api.setCurrentCaptions(e)},this),this.elements.cc.on("toggleValue",function(){var e=this._model.get("captionsIndex");this._api.setCurrentCaptions(e?0:1)},this),this.elements.audiotracks.on("select",function(e){this._model.getVideo().setCurrentAudioTrack(e)},this),new n(this.elements.duration).on("click tap",function(){var e;"DVR"===r.adaptiveType(this._model.get("duration"))&&(e=this._model.get("position"),this._api.seek(Math.max(t.dvrSeekLimit,e)))},this),new n(this.el).on("click tap drag",function(){this.trigger("userAction")},this),this.elements.drawer.on("open-drawer close-drawer",function(e,t){r.toggleClass(this.el,"jw-drawer-expanded",t.isOpen),t.isOpen||this.closeMenus()},this),o.each(this.menus,function(e){e.on("open-tooltip",this.closeMenus,this)},this),this._model.get("danmaku")&&this._model.get("danmaku").show&&setTimeout(()=>{this.onDanmaku(this._model,this._model.get("danmaku"))})},setUpLangMenu(){var e=this._model.get("lang"),t=this._model.get("languages");if(this._model.get("showLang")&&t&&t[e]){this.setLangMenu(0);let t=this;this.elements.lang.on("select",function(e){e=t.langMenu[e];t.setLang(e.id)})}},setLangMenu(){var e,t=this._model.get("lang"),i=this._model.get("languages"),n=[];let r=0;for(e in i)n.push({label:i[t][e],index:n.length,id:e}),t==e&&(r=n.length-1);this.langMenu=n,this.elements.lang.setup(n,r,{toggle:!1})},setHlsQulityLangMenu(e,t,i){this.qualitylevels=e||this.qualitylevels,this.qualityIndex=t||this.qualityIndex;var n=[];for(let e=0;e<this.qualitylevels.length;e++)n.push({label:-1==this.qualitylevels[e].id?this.qualityChangeLang[i].HLSQUALITYCHANGE.AUTO:this.qual
191itylevels[e].label});this.elements.qualityChange.setup(n,this.qualityIndex,{toggle:!1})},setLang:function(e){if("string"==typeof e)this._model.set("lang",e);else{if(!e.zh&&!e.en)return;var t=e.zh?"zh":"en",i=(this._model.set("lang",t),this._model.get("languages")),i=Object.assign(i,e);this._model.set("languages",i),e=t}this.elements.playlist.changeLang(e),this._model.get("showLang")&&this.setLangMenu();i=this._model.get("playlist")[this.playlistIndex];if(currentLevel=this._model.get("currentLevel"),i&&i.sources){let t=[];i.sources.forEach(e=>{t.push({label:e.label})}),this.elements.hd.setup(t,this.resolutionIndex,{toggle:!1})}this.elements.danmuTooltip&&this.elements.danmuTooltip.changeLang(e),this.elements.qualityChange&&this.setHlsQulityLangMenu(void 0,void 0,e),this.trigger("change_lang",e)},onCaptionsList:function(e,t){e=e.get("captionsIndex");this.elements.cc.setup(t,e),this.clearCompactMode()},onCaptionsIndex:function(e,t){this.elements.cc.selectItem(t)},onPlaylist:function(e,t){var i,n=1<t.length;this.elements.next.toggle(n),this.elements.prev.toggle(n),this.elements.playlist&&(n=e.get("lang"),i=e.get("languages"),this.elements.playlist.setup(t,e.get("item"),n,i))},onPlaylistItem:function(e){this.elements.time.updateBuffer(0),this.elements.time.render(0),this.elements.duration.innerHTML="00:00",this.elements.elapsed.innerHTML="00:00",this.clearCompactMode();e=e.get("item");this.elements.playlist&&this.elements.playlist.selectItem(e),this.elements.audiotracks.setup()},onMediaModel:function(e,t){t.on("change:levels",function(e,t){this.elements.hd.setup(t,e.get("currentLevel"),{toggle:!1}),this.clearCompactMode(),this._model.setCurrentQuality(this.resolutionIndex)},this),t.on("change:hlsQualityListChange",(e,t)=>{var i=this._model.get("lang")||"zh",n=t.findIndex(e=>e.selected);this.setHlsQulityLangMenu(t,n,i)}),t.on("change:currentLevel",function(e,t){this.elements.hd.selectItem(t)},this),t.on("change:audioTracks",function(e,t){t=o.map(t,function(e){return{label:e.name}});this.elements.audiotracks.setup(t,e.get("currentAudioTrack"),{toggle:!1}),this.clearCompactMode()},this),t.on("change:currentAudioTrack",function(e,t){this.elements.audiotracks.selectItem(t)},this),t.on("change:state",function(e,t){"complete"===t&&(this.elements.drawer.closeTooltip(),r.removeClass(this.el,"jw-drawer-expanded"))},this),t.on("change:playbackRate",function(e,t){var i=this._model.get("playRateConfig");let n=-1;for(let e=0;e<i.length;e++)i[e].label==="Ã"+t&&(n=e);this.elements.playRate.selectItem(n)},this)},onProvider:function(e,t){/(html5|videojs)/.test(t.name)&&e.get("playRate")?this.elements.playRate.setup(e.get("playRateConfig"),0):this.elements.playRate.hide()},onVolume:function(e,t,i){this.renderVolume(e.get("mute"),t,i)},onMute:function(e,t){this.renderVolume(t,e.get("volume"))},renderVolume:function(e,t,i){var n;i=i||t,this.elements.mute&&r.toggleClass(this.elements.mute.element(),"jw-off",e),this.elements.volume&&this.elements.volume.render(e?0:t),this.elements.volumetooltip&&(this.elements.volumetooltip.volumeSlider.render(e?0:t),r.toggleClass(this.elements.volumetooltip.element(),"jw-off",e)),this.elements.volumetooltip&&this.elements.volumetooltip.valuetip&&(n=this.elements.volumetooltip.valuetip,e?n.innerHTML="0%":100===t&&i<t&&this._model.get("provider")&&/^flash/.test(this._model.get("provider").name)?n.innerHTML="100%(æâå¯ä»¥ç»§ç»å¢å¤§é³é)":n.innerText=Math.round(t)+"%")},onCastAvailable:function(e,t){this.elements.cast.toggle(t),this.clearCompactMode()},onCastActive:function(e,t){r.toggleClass(this.elements.cast.element(),"jw-off",!t)},onElapsed:function(e,t){e=e.get("duration"),e="DVR"===r.adaptiveType(e)?"-"+r.timeFormat(-e):r.timeFormat(t);this.elements.elapsed.innerHTML=e},onDuration:function(e,t){var i;"DVR"===r.adaptiveType(t)?(i="Live",this.clearCompactMode()):i=r.timeFormat(t),/NaN/.test(i)||(this.elements.duration.innerHTML=i)},onFullscreen:function(e,t){r.isIOS()||r.toggleClass(this.elements.fullscreen.element(),"jw-off",t)},onScreenshot:function(e,t){r.toggleClass(this.elements.screenshot.element(),"jw-off",t)},element:function(){return this.el},getVisibleBounds:function(){var e,t=this.el;return"table"===(getComputedStyle?getComputedStyle(t):t.currentStyle).display?r.bounds(t):(t.style.visibility="hidden",t.style.display="table",e=r.bounds(t),t.style.visibility=t.style.display="",e)},setAltText:function(e){this.elements.alt.innerHTML=e},addCues:function(e){this.elements.time&&(o.each(e,function(e){this.elements.time.addCue(e)},this),0===e.length&&this.elements.time.resetChapters(),this.elements.time.drawCues())},addThumbnails:function(e){this.elements.time&&(o.each(e,function(e){this.elements.time.addThumbnail(e)},this),this.elements.time.drawCues())},closeMenus:function(t){o.each(this.menus,function(e){t&&t.target===e.el||e.closeTooltip(t)})},hideComponents:function(){this.closeMenus(),this.elements.drawer.closeTooltip(),r.removeClass(this.el,"jw-drawer-expanded")},clearCompactMode:function(){this._maxCompactWidth=-1,this._model.set("compactUI",!1),this._containerWidth&&this.checkCompactMode(this._containerWidth)},setCompactModeBounds:function(){var e;
1910<this.element().offsetWidth&&(e=this.elements.left.offsetWidth+this.elements.right.offsetWidth,"LIVE"===r.adaptiveType(this._model.get("duration"))?this._maxCompactWidth=e+this.elements.alt.offsetWidth:(e=e+(this.elements.center.offsetWidth-this.elements.time.el.offsetWidth),this._maxCompactWidth=e/.8))},checkCompactMode:function(e){this.setCompactModeBounds(),this._containerWidth=e,-1!==this._maxCompactWidth&&(e>=this._compactModeMaxSize&&e>this._maxCompactWidth?this._model.set("compactUI",!1):(e<this._compactModeMaxSize||e<=this._maxCompactWidth)&&this._model.set("compactUI",!0))},onCompactUI:function(e,t){r.removeClass(this.el,"jw-drawer-expanded"),this.elements.drawer.setup(this.layout.drawer,t),(!t||this.elements.drawer.activeContents.length<2)&&o.each(this.layout.drawer,function(e){this.elements.right.insertBefore(e.el,this.elements.drawer.el)},this)},onDanmaku:function(e,t){t.active?this._api.danmaku.enable():this._api.danmaku.disable();var i=document.getElementsByClassName("jw-icon-danmu")[0].getElementsByClassName("jw-overlay ")[0],n=t.active?"block":"none";i.style.display=n,r.toggleClass(this.elements.danmuTooltip.element(),"jw-off",!t.active)}}),a}.apply(t,i))&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a,s=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression,e=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<div class="'+l("function"==typeof(a=null!=(a=e(i,"className")||(null!=t?e(t,"className"):t))?a:o)?a.call(s,{name:"className",hash:{},data:r,loc:{start:{line:1,column:12},end:{line:1,column:25}}}):a)+" "+l("function"==typeof(a=null!=(a=e(i,"orientation")||(null!=t?e(t,"orientation"):t))?a:o)?a.call(s,{name:"orientation",hash:{},data:r,loc:{start:{line:1,column:26},end:{line:1,column:41}}}):a)+' jw-reset">\n <div class="jw-slider-container jw-reset">\n <div class="jw-rail jw-reset"></div>\n <div class="jw-buffer jw-reset"></div>\n <div class="jw-progress jw-reset"></div>\n <div class="jw-knob jw-reset"></div>\n </div>\n</div>'},useData:!0})},function(e,t,i){i=[i(0),i(1),i(44),i(59),i(38),i(218),i(219)],t=function(d,c,f,i,e,t,n){var r=e.extend({setup:function(){this.text=document.createElement("span"),this.text.className="jw-text jw-reset",this.img=document.createElement("div"),this.img.className="jw-reset";var e=document.createElement("div");e.className="jw-time-tip jw-background-color jw-reset",e.appendChild(this.img),e.appendChild(this.text),c.removeClass(this.el,"jw-hidden"),this.addContent(e)},image:function(e){c.style(this.img,e)},update:function(e){this.text.innerHTML=e}}),e=i.extend({constructor:function(e,t){this._model=e,this._api=t,this.timeTip=new r("jw-tooltip-time"),this.timeTip.setup(),this.cues=[],this.seekThrottled=d.throttle(this.performSeek,400),this._model.on("change:playlistItem",this.onPlaylistItem,this).on("change:position",this.onPosition,this).on("change:duration",this.onDuration,this).on("change:buffer",this.onBuffer,this),i.call(this,"jw-slider-time","horizontal")},setup:function(){i.prototype.setup.apply(this,arguments),this._model.get("playlistItem")&&this.onPlaylistItem(this._model,this._model.get("playlistItem")),this.elementRail.appendChild(this.timeTip.element()),c.addEventListener(this.el,"mousemove",this.showTimeTooltip.bind(this),!1),c.addEventListener(this.el,"mouseout",this.hideTimeTooltip.bind(this),!1)},limit:function(e){var t,i,n;return this.activeCue&&d.isNumber(this.activeCue.pct)?this.activeCue.pct:(t=this._model.get("duration"),"DVR"===c.adaptiveType(t)?(i=(1-e/100)*t,n=this._model.get("position"),100-100*Math.min(i,Math.max(f.dvrSeekLimit,n))/t):e)},update:function(e){this.seekTo=e,this.seekThrottled(),i.prototype.update.apply(this,arguments)},dragStart:function(){this._model.set("scrubbing",!0),i.prototype.dragStart.apply(this,arguments)},dragEnd:function(){i.prototype.dragEnd.apply(this,arguments),this._model.set("scrubbing",!1)},onSeeked:function(){this._model.get("scrubbing")&&this.performSeek()},onBuffer:function(e,t){this.updateBuffer(t)},onPosition:function(e,t){this.updateTime(t,e.get("duration"))},onDuration:function(e,t){this.updateTime(e.get("position"),t)},updateTime:function(e,t){var i,n=0;t&&("DVR"===(i=c.adaptiveType(t))?n=(t-e)/t*100:"VOD"===i&&(n=e/t*100)),this.render(n)},onPlaylistItem:function(e,t){this.reset(),e.mediaModel.on("seeked",this.onSeeked,this);e=t.tracks;d.each(e,function(e){e&&e.kind&&"thumbnails"===e.kind.toLowerCase()?this.loadThumbnails(e.file):e&&e.kind&&"chapters"===e.kind.toLowerCase()&&this.loadChapter
191s(e.file)},this)},performSeek:function(){var e,t=this.seekTo,i=this._model.get("duration"),n=c.adaptiveType(i);0===i?this._api.play():"DVR"===n?this._api.seek(e=(100-t)/100*i):this._model.attributes.controlbar.canDrag&&(e=t/100*i,this._api.seek(Math.min(e,i-.25)))},showTimeTooltip:function(e){var t=this._model.get("duration");if(0!==t){var i,n,r=c.bounds(this.elementRail),a=document.documentElement.scrollLeft||document.body.scrollLeft,s=(e.pageX||e.clientX+a)-Math.round(r.left),e=(s=c.between(s,0,Math.round(r.width)))/Math.round(r.width),a=t*e,o=(t<0&&(a=t-a),2),l=20,e=(this.activeCue?(c.removeClass(this.timeTip.el,"jw-tooltip-time-jxm"),i=this.activeCue.text,(n=document.createElement("canvas").getContext("2d")).font="15px Arial",70<(n=n.measureText(i)).width&&(l=.05<e?Math.floor(n.width/70):90,o=100,c.addClass(this.timeTip.el,"jw-tooltip-time-jxm"))):(i=c.timeFormat(a,!0),t<0&&a>f.dvrSeekLimit&&(i="Live"),c.removeClass(this.timeTip.el,"jw-tooltip-time-jxm")),this.timeTip.update(i),this.showThumbnail(a),c.addClass(this.timeTip.el,"jw-open"),this.chooseThumbnail(a));if(e)if(0<e.indexOf("#xywh"))try{var l=/(.+)\#xywh=(\d+),(\d+),(\d+),(\d+)/.exec(e)[4]/2,u=c.between(s,l,r.width-l-o)/r.width;this.timeTip.el.style.left=100*u+"%"}catch(e){}else{var h=new Image;h.onload=d.bind(function(){h.onload=null,l=100;var e=c.between(s,l,r.width-l-o)/r.width;this.timeTip.el.style.left=100*e+"%"},this),h.src=e}else{u=c.between(s,l,r.width-l-o)/r.width;this.timeTip.el.style.left=100*u+"%"}}},hideTimeTooltip:function(){c.removeClass(this.timeTip.el,"jw-open")},reset:function(){this.resetChapters(),this.resetThumbnails()}});return d.extend(e.prototype,t,n),e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(1),i(72)],t=function(n,r,t){function i(e,t){this.time=e,this.text=t,this.el=document.createElement("div"),this.el.className="jw-cue jw-reset",this.el.time=e}return n.extend(i.prototype,{align:function(e){"%"===this.time.toString().slice(-1)?this.pct=this.time:(e=this.time/e*100,this.pct=e+"%"),this.el.style.left=this.pct}}),{loadChapters:function(e){r.ajax(e,this.chaptersLoaded.bind(this),this.chaptersFailed,{plainText:!0})},chaptersLoaded:function(e){e=t(e.responseText);n.isArray(e)&&(n.each(e,this.addCue,this),this.drawCues())},chaptersFailed:function(){},addCue:function(e){this.cues.push(new i(e.begin,e.text))},drawCues:function(){var t,i=this._model.mediaModel.get("duration");!i||i<=0?this._model.mediaModel.once("change:duration",this.drawCues,this):n.each((t=this).cues,function(e){e.align(i),r.addEventListener(e.el,"mouseover",function(){t.activeCue=e}),r.addEventListener(e.el,"mouseout",function(){t.activeCue=null}),r.addEventListener(e.el,"click",function(e){t._api.seek(e.target.time)}),t.elementRail.appendChild(e.el)})},resetChapters:function(){n.each(this.cues,function(e){e.el.parentNode&&e.el.parentNode.removeChild(e.el)},this),this.cues=[]}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(1),i(72)],t=function(n,t,i){function r(e){this.begin=e.begin,this.end=e.end,this.img=e.text}return{loadThumbnails:function(e){e&&(this.vttPath=e.split("?")[0].split("/").slice(0,-1).join("/"),this.individualImage=null,t.ajax(e,this.thumbnailsLoaded.bind(this),this.thumbnailsFailed.bind(this),{plainText:!0}))},thumbnailsLoaded:function(e){e=i(e.responseText);n.isArray(e)&&(n.each(e,function(e){this.thumbnails.push(new r(e))},this),this.drawCues())},thumbnailsFailed:function(){},addThumbnail:function(t){var i=!1;n.each(this.thumbnails,function(e){e.begin===t.begin&&e.end===t.end&&(e.img=t.text,i=!0)},this),i||this.thumbnails.push(new r(t))},chooseThumbnail:function(t){var e;return n.find(this.thumbnails,function(e){return e.begin<=t&&e.end>=t})?((e=n.sortedIndex(this.thumbnails,{end:t},n.property("end")))>=this.thumbnails.length&&(e=this.thumbnails.length-1),(e=this.thumbnails[e].img).indexOf("://")<0&&this.vttPath?this.vttPath+"/"+e:e):""},loadThumbnail:function(e){var t={display:"block",margin:"0 auto",backgroundPosition:"0 0",backgroundRepeat:"no-repeat"};if(0<(e=this.chooseThumbnail(e)).indexOf("#xywh"))try{var i=/(.+)\#xywh=(\d+),(\d+),(\d+),(\d+)/.exec(e),e=i[1];t.backgroundPosition=-1*i[2]+"px "+-1*i[3]+"px",t.width=i[4],t.height=i[5]}catch(e){return}else e&&(this.individualImage?(t.width=this.individualImage.width,t.height=this.individualImage.height):(this.individualImage=new Image,this.individualImage.onload=n.bind(function(){this.individualImage.onload=null,this.timeTip.image({width:this.individualImage.width,height:this.individualImage.height})},this),this.individualImage.src=e));return""===e&&(t.width=0,t.height=0),t.backgroundImage='url("'+e+'")',t},showThumbnail:function(e){this.thumbnails.length<1||this.timeTip.image(this.loadThumbnail(e))},resetThumbnails:function(){this.timeTip.image({backgroundImage:"",width:0,height:0}),this.thumbnails=[]}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(38),i(1),i(0),i(11),i(221)],t=function(e,r,a,s,o){return e.extend({setup:function(e,t,i){this.iconUI||(this.iconUI=new s(this.el,{useHover:!0,directSelect:!0}
191),this.toggleValueListener=this.toggleValue.bind(this),this.toggleOpenStateListener=this.toggleOpenState.bind(this),this.openTooltipListener=this.openTooltip.bind(this),this.closeTooltipListener=this.closeTooltip.bind(this),this.selectListener=this.select.bind(this)),this.reset(),e=a.isArray(e)?e:[],this.list=e,r.toggleClass(this.el,"jw-hidden",e.length<2);var i=2<=e.length||2===e.length&&i&&!1===i.toggle,n=!i&&2===e.length;r.toggleClass(this.el,"jw-toggle",n),r.toggleClass(this.el,"jw-button-color",!n),this.isActive=i||n,i?(r.removeClass(this.el,"jw-off"),this.iconUI.on("tap",this.toggleOpenStateListener).on("over",this.openTooltipListener).on("out",this.closeTooltipListener).on("click",this.toggleOpenStateListener),i=o(e),e=r.createElement(i),this.addContent(e),this.contentUI=new s(this.content).on("click tap",this.selectListener)):n&&this.iconUI.on("click tap",this.toggleValueListener),this.selectItem(t)},toggleValue:function(){this.trigger("toggleValue")},select:function(e){e.target.parentElement===this.content&&(e=r.classList(e.target),e=a.find(e,function(e){return 0===e.indexOf("jw-item")}))&&(this.trigger("select",parseInt(e.split("-")[2])),this.closeTooltipListener())},selectItem:function(e){if(this.content)for(var t=0;t<this.content.children.length;t++)r.toggleClass(this.content.children[t],"jw-active-option",e===t);else r.toggleClass(this.el,"jw-off",0===e);var i;this.isHDMenu()&&this.list&&2<=this.list.length&&(i=this.list[e].label,r.getElementsByClassName("jw-hd-label",this.el)[0].innerHTML=i),this.isCCMenu()&&this.list&&2<=this.list.length&&this.list[e]&&(r.getElementsByClassName("jw-cc-label",this.el)[0].innerHTML=this.list[e].label),this.isPlayrateMenu()&&this.list&&this.list[e]&&(r.getElementsByClassName("jw-playrate-label",this.el)[0].innerHTML=this.list[e].label),this.isQualityChange()&&this.list&&2<=this.list.length&&(i=this.list[e].label,r.getElementsByClassName("jw-qualityChange-label",this.el)[0].innerText=i),this.isLangMenu()&&this.list&&2<=this.list.length&&(i=this.list[e].label,r.getElementsByClassName("jw-lang-label",this.el)[0].innerText=i)},reset:function(){r.addClass(this.el,"jw-off"),this.iconUI.off(),this.contentUI&&this.contentUI.off().destroy(),this.removeContent()},isHDMenu:function(){return r.hasClass(this.el,"jw-icon-hd")},isPlayrateMenu:function(){return r.hasClass(this.el,"jw-icon-playrate")},isCCMenu:function(){return r.hasClass(this.el,"jw-icon-cc")},isQualityChange:function(){return r.hasClass(this.el,"jw-icon-qualityChange")},isLangMenu:function(){return r.hasClass(this.el,"jw-icon-lang")},show:function(){this.el.style.display=""},hide:function(){this.el.style.display="none"}})}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({1:function(e,t,i,n,r){var a=e.escapeExpression,s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" <li class='jw-text jw-option jw-item-"+a("function"==typeof(i=null!=(i=s(i,"index")||r&&s(r,"index"))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"index",hash:{},data:r,loc:{start:{line:3,column:45},end:{line:3,column:55}}}):i)+" jw-reset'>"+a(e.lambda(null!=t?s(t,"label"):t,t))+"</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<ul class="jw-menu jw-background-color jw-reset">\n'+(null!=(i=(e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]})(i,"each").call(null!=t?t:e.nullContext||{},t,{name:"each",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r,loc:{start:{line:2,column:4},end:{line:4,column:13}}}))?i:"")+"</ul>"},useData:!0})},function(e,t,i){i=[i(1),i(0),i(38),i(11),i(223)],t=function(r,a,e,s,t){return e.extend({setup:function(e,t,i,n){this.selectedIndex=t,this.playListTitle="ææ¾å表",i&&n&&n[i]&&(this.lang=i,this.languages=n,this.setPlayListLang(e)),this.iconUI||(this.iconUI=new s(this.el,{useHover:!0}),this.toggleOpenStateListener=this.toggleOpenState.bind(this),this.openTooltipListener=this.openTooltip.bind(this),this.closeTooltipListener=this.closeTooltip.bind(this),this.selectListener=this.onSelect.bind(this)),this.reset(),e=a.isArray(e)?e:[],r.toggleClass(this.el,"jw-hidden",e.length<2),2<=e.length&&(this.iconUI=new s(this.el,{useHover:!0}).on("tap",this.toggleOpenStateListener).on("over",this.openTooltipListener).on("out",this.closeTooltipListener).on("click",this.toggleOpenStateListener),i=this.menuTemplate(e,t),n=r.createElement(i),this.addContent(n),this.contentUI=new s(this.content),this.contentUI.on("click tap",this.selectListener)),this.originalList=e},menuTemplate:function(e,n){e=a.map(e,function(e,t){var i="";return e.title&&(i=(e=r.createElement(e.title)).textContent||e.data),{active:t===n,label:t+1+".",title:i}});return t({title:this.playListTitle,list:e})},onSelect:function(e){var e=e.target;"UL"!==e.tagName&&("LI"!==e.tagName&&(e=e.parentElement),e=r.classList(e),e=a.find(e,function(e){return 0===e.indexOf("jw-item")}
191))&&(this.trigger("select",parseInt(e.split("-")[2])),this.closeTooltip())},selectItem:function(e){this.setup(this.originalList,e,this.lang,this.languages)},changeLang:function(e){this.lang=e,this.setup(this.originalList,this.selectedIndex,e,this.languages)},setPlayListLang:function(e){const t=this.lang,i=this.languages;t&&i[t]&&(e.forEach(e=>{e.lineTextKey&&i[t][e.lineTextKey]&&(e.title=i[t][e.lineTextKey]),e.sources&&e.sources.forEach(e=>{e.definitionTextKey&&i[t][e.definitionTextKey]&&(e.label=i[t][e.definitionTextKey])})}),e=i[t].PLAYLIST_TITLE)&&(this.playListTitle=e)},reset:function(){this.iconUI.off(),this.contentUI&&this.contentUI.off().destroy(),this.removeContent()}})}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({1:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(i,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"active"):t,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.program(4,r,0),data:r,loc:{start:{line:14,column:12},end:{line:24,column:19}}}))?i:""},2:function(e,t,i,n,r){var a=e.escapeExpression,s=e.lambda,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" <li class='jw-option jw-text jw-active-option jw-item-"+a("function"==typeof(i=null!=(i=o(i,"index")||r&&o(r,"index"))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"index",hash:{},data:r,loc:{start:{line:15,column:70},end:{line:15,column:80}}}):i)+' jw-reset\'>\n <span class="jw-label jw-reset"><span class="jw-icon jw-icon-play jw-reset"></span></span>\n <span class="jw-name jw-reset" title="'+a(s(null!=t?o(t,"title"):t,t))+'">'+a(s(null!=t?o(t,"title"):t,t))+"</span>\n </li>\n"},4:function(e,t,i,n,r){var a=e.escapeExpression,s=e.lambda,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" <li class='jw-option jw-text jw-item-"+a("function"==typeof(i=null!=(i=o(i,"index")||r&&o(r,"index"))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"index",hash:{},data:r,loc:{start:{line:20,column:53},end:{line:20,column:63}}}):i)+' jw-reset\'>\n <span class="jw-label jw-reset">'+a(s(null!=t?o(t,"label"):t,t))+'</span>\n <span class="jw-name jw-reset" title="'+a(s(null!=t?o(t,"title"):t,t))+'">'+a(s(null!=t?o(t,"title"):t,t))+"</span>\n </li>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<div class="jw-menu jw-playlist-container jw-background-color jw-reset">\n\n <div class="jw-tooltip-title jw-reset">\n <span class="jw-icon jw-icon-inline jw-icon-playlist jw-reset"></span>\n <span class="jw-text jw-reset">'+e.escapeExpression(e.lambda(null!=t?a(t,"title"):t,t))+'</span>\n </div>\n\n <ul class="jw-playlist jw-reset">\n'+(null!=(i=a(i,"each").call(null!=t?t:e.nullContext||{},null!=t?a(t,"list"):t,{name:"each",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r,loc:{start:{line:13,column:8},end:{line:25,column:17}}}))?i:"")+" </ul>\n</div>"},useData:!0})},function(e,t,i){i=[i(38),i(59),i(11),i(1)],t=function(i,n,r,a){return i.extend({constructor:function(e,t){this._model=e,i.call(this,t),this.volumeSlider=new n("jw-slider-volume jw-volume-tip","vertical"),this.addContent(this.volumeSlider.element()),this.addVolumeValueTip(),this.volumeSlider.on("update",function(e){this.trigger("update",e)},this),a.removeClass(this.el,"jw-hidden"),new r(this.el,{useHover:!0,directSelect:!0}).on("click",this.toggleValue,this).on("tap",this.toggleOpenState,this).on("over",this.openTooltip,this).on("out",this.closeTooltip,this)},toggleValue:function(){this.trigger("toggleValue")},addVolumeValueTip:function(){var e=document.createElement("div");e.className="jw-volume-value-tip",a.getElementsByClassName("jw-overlay",this.el)[0].appendChild(e),this.valuetip=e}})}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(38),i(1),i(0),i(11)],t=function(t,i,n,r){return t.extend({constructor:function(e){t.call(this,e),this.container.className="jw-overlay-horizontal jw-reset",this.openClass="jw-open-drawer",this.componentType="drawer"},setup:function(e,t){this.iconUI||(this.iconUI=new r(this.el,{useHover:!0,directSelect:!0}),this.toggleOpenStateListener=this.toggleOpenState.bind(this),this.openTooltipListener=this.openTooltip.bind(this),this.closeTooltipListener=this.closeTooltip.bind(this)),this.reset(),e=n.isArray(e)?e:[],this.activeContents=n.filter(e,function(e){return e.isActive}),i.toggleClass(this.el,"jw-hidden",!t||this.activeContents.length<2),t&&1<this.activeContents.length&&(i.removeClass(this.el,"jw-off"),this.iconUI.on("tap",this.toggleOpenStateListener).on("over",this.openTooltipListener).on("out",this.closeTooltipListener),n.each(e,function(e){this.container.appendChild(e.el)},this))},reset:function(){i.addClass(this.el,"jw-off"),this.iconUI.off(),this.contentUI&&this.contentUI.off().destroy(),this.removeContent()}})}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){const h=i(73);i=[i(38),i(59),i(11),i(1),i(227)],void 0!==(t=function(a,s,o,l,u){return a.extend({constructor:function(e,t){var i,n="zh"==e.get("lang")||"en"==e.get("lang")?e.get("lang"):"zh";for(i in this.danmuLang=h.default[n].DANMU,this._model=e,a.call(this,t),this.initDanmuValue=JSON.parse(JSON.stringify(this._model.get("danmaku"))),this.addDanmTitleEle(),this.danmuEle={opacity:{slider:new s("jw-slider-opacityslider","horizontal",2),type:0,right:"",left:this.danmuLang.DANMUOPACITY,ID:"DANMUOPACITY"},area:{slider:new s("jw-slider-areaslider","horizontal",3),type:1,right:"",left:this.danmuLang.DANMUAREA,ID:"DANMUAREA"},speed:{slider:new s("jw-slider-speedslider","horizontal",3),type:2,right:"",left:this.danmuLang.DANMUSPEED,ID:"DANMUSPEED"},fontSize:{slider:new s("jw-slider-fontslider","horizontal"),type:3,right:null,left:this.danmuLang.DANMUFONT,ID:"DANMUFONT"}},null!=this.initDanmuValue.useMask&&(n={slider:new u(this.initDanmuValue.useMask),type:4,right:null,left:this.danmuLang.INTELLIGENTBLOCKING,ID:"INTELLIGENTBLOCKING"},this.danmuEle=Object.assign(this.danmuEle,{mark:n})),this.danmuEle){var r=this.danmuEle[i];this.addElement(r,i)}null!=this.initDanmuValue.useMask&&setTimeout(()=>{this.danmuEle.mark.slider.addEvent(),this.danmuEle.mark.slider.on("switch",e=>{this.trigger("switch",e)})},10),this.initDanSet(),l.removeClass(this.el,"jw-hidden"),new o(this.el,{useHover:!0,directSelect:!0}
191).on("click",this.toggleValue,this).on("tap",this.toggleOpenState,this).on("over",this.openTooltip,this).on("out",this.closeTooltip,this)},initDanSet(){var e=this.initDanmuValue.opacity||1,e=this.opacityContent(e),t=this.initDanmuValue.area||.5,t=this.areaContent(t),i=this.initDanmuValue.speed||1,i=this.speedContent(i),n=this.initDanmuValue&&this.initDanmuValue.fontSize?this.initDanmuValue.fontSize:24;return{oVal:e,aVal:t,sVal:i,fzVal:this.fontSizeContent(n)}},addElement(t,e){this.addVolumeValueTip(e);var i=document.createElement("div"),n=(i.className="jw-danmu-slider-left",i.innerHTML=t.left,i.id=t.ID,document.createElement("div"));n.innerHTML=t.right,n.id=t.ID,n.classList.add("jw-danmu-slider-right","jw-danmu-"+e),this.valuetip.appendChild(i),this.valuetip.appendChild(t.slider.element()),this.valuetip.appendChild(n),t.slider.on("update",function(e){this.setDanMuStyle(t.type,e.percentage)},this)},toggleValue:function(){this.trigger("toggleValue")},setDanMuStyle(e,t){switch(e){case 0:var i=this.opacityContent(t/100);this.trigger("update",{val:i,type:e});break;case 1:i=this.areaContent(t/100);this.trigger("update",{val:i,type:e});break;case 2:i=this.speedContent(t/100);this.trigger("update",{val:i,type:e});break;case 3:i=parseInt(14*t/50);this.fontSizeContent(i),this.trigger("update",{val:i/24,type:e})}},opacityContent(t){var i=[{title:"0",percentage:0,value:.2,opacity:0},{title:"1 / 3",percentage:33,value:.4,opacity:.33},{title:"2 / 3",percentage:66,value:.7,opacity:.66},{title:"1",percentage:100,value:1,opacity:1}];let n=i[i.length-1];for(let e=0;e<i.length;e++)if(t<=i[e].value){n=i[e];break}return this.danmuEle.opacity.slider.render(n.percentage),setTimeout(()=>{document.getElementsByClassName("jw-danmu-opacity")[0].innerHTML=n.title},40),n.opacity},areaContent(t){var i=[{title:this.danmuLang.QUARTERSCREEN,percentage:25,value:.25,ID:"QUARTERSCREEN"},{title:this.danmuLang.HALFSCREEN,percentage:50,value:.5,ID:"HALFSCREEN"},{title:this.danmuLang.THREEQUARTERSCREEN,percentage:75,value:.75,ID:"THREEQUARTERSCREEN"},{title:this.danmuLang.FULLSCREEN,percentage:100,value:1,ID:"FULLSCREEN"}];let n=i[0];for(let e=0;e<i.length;e++)if(i[e].value>=t){n=i[e];break}return n=1<=+t?i[i.length-1]:n,this.danmuEle.area.slider.render(n.percentage),setTimeout(()=>{document.getElementsByClassName("jw-danmu-area")[0].innerHTML=n.title,document.getElementsByClassName("jw-danmu-area")[0].id=n.ID},40),n.value},fontSizeContent(e){let t=null,i=null;i=e<=12?(t=this.danmuLang.MINIMAL,"MINIMAL"):e<18?(t=this.danmuLang.MODERATE,"MODERATE"):(t=this.danmuLang.GREAT,"GREAT");var n;return this.danmuEle.fontSize.slider.render(100<(n=50*e/14)?100:n),setTimeout(()=>{document.getElementsByClassName("jw-danmu-fontSize")[0].innerHTML=t,document.getElementsByClassName("jw-danmu-fontSize")[0].id=i},40),e},speedContent(t){var i=[.25,.5,.75,1],n=[25,50,75,100];let r="",a="";for(let e=0;e<i.length;e++)if(t<=i[e]){r=i[e],a=n[e];break}return this.danmuEle.speed.slider.render(a),setTimeout(()=>{document.getElementsByClassName("jw-danmu-speed")[0].innerHTML=r},40),r},addDanmTitleEle(){var e=l.getElementsByClassName("jw-overlay",this.el)[0],t=document.createElement("div");t.innerHTML=`<div class="jw-danmu-title-wrap" id="DANMUSETTING">${this.danmuLang.DANMUSETTING}</div><div class="jw-danmu-reset" id="jw-danmu-reset">${this.danmuLang.RESET}</div>`,t.classList.add("jw-danmu-title"),e.appendChild(t),setTimeout(()=>{document.getElementById("jw-danmu-reset").addEventListener("click",()=>{var{oVal:e,aVal:t,sVal:i,fzVal:n}=this.initDanSet();this.trigger("update",{val:e,type:0}),this.trigger("update",{val:t,type:1}),this.trigger("update",{val:i,type:2}),this.trigger("update",{val:n/24,type:3})})})},addVolumeValueTip:function(e){var t=document.createElement("div");t.classList.add("jw-danmu-container",e),l.getElementsByClassName("jw-overlay",this.el)[0].appendChild(t),this.valuetip=t},changeLang:function(e){for(var t in this.danmuLang=h.default[e].DANMU,this.danmuLang){var i=document.getElementById(t);i&&(i.innerHTML=this.danmuLang[t]),"RESET"===t&&(document.getElementById("jw-danmu-reset").innerHTML=this.danmuLang[t])}}})}.apply(t,i))&&(e.exports=t)},function(e,t,i){i=[i(74),i(11),i(228),i(1)],t=function(e,t,i,n){return e.extend({constructor:function(e){this.defaultStatus=e,this.setup()},setup:function(){this.el=n.createElement(i())},addEvent:function(){document.getElementById("onoffswitch").checked=!!this.defaultStatus,document.getElementById("onoffswitch").addEventListener("click",()=>{document.getElementById("onoffswitch").checked?this.trigger("switch",!0):this.trigger("switch",!1)})},element:function(){return this.el}})}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="jw-switch">\n <input class="jw-switch-checkbox" id="onoffswitch" type="checkbox">\n <label class="jw-switch-label" for="onoffswitch">
191\n <span class="jw-switch-inner"></span>\n <span class="jw-switch-switch"></span>\n </label>\n</div>'},useData:!0})},function(e,t,i){i=[i(0),i(1)],t=function(n,o){function e(e){(this.model=e).on("change:playlistItem",i,this),e.on("change:mediaModel",t,this)}function t(i,e){e.off("change:mediaType",null,this),e.on("change:mediaType",function(e,t){"audio"===t&&this.setImage(i.get("playlistItem").image)},this)}function i(e,i){e.get("autostart")&&!o.isMobile()||0<e.get("item")?(this.setImage(null),e.off("change:state",null,this),e.on("change:state",function(e,t){"complete"!==t&&"idle"!==t&&"error"!==t||this.setImage(i.image)},this)):this.setImage(i.image)}return n.extend(e.prototype,{setup:function(e){this.el=e;e=this.model.get("playlistItem");e&&this.setImage(e.image)},setImage:function(e){var t=this.image,i=(t&&(t.onload=null,this.image=null),this.model.off("change:state",null,this),"");n.isString(e)&&(i='url("'+e+'")',(t=this.image=new Image).src=e),o.isPoorIE()?this.el.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+e+'",sizingMethod="scale"':o.style(this.el,{backgroundImage:i})},resize:function(e,t,i){if("uniform"===i){var n,r=e/t,a=this.image,s=null;if(a){if(0===a.width)return n=this,void(a.onload=function(){n.resize(e,t,i)});a=a.width/a.height;Math.abs(r-a)<.09&&(s="cover")}o.style(this.el,{backgroundSize:s})}},element:function(){return this.el}}),e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(231),i(1),i(0),i(11),i(29)],t=function(i,s,o,e,l){function t(e,t){this.model=e,this.api=t,this.imageUrl="",this.setup(),this.isHide=!0,this.startAdvPlayed=!1,this.timer=null}return o.extend(t.prototype,{setup:function(){var e=i(),t=(this.el=s.createElement(e),this),e=s.isMobile()?"touchstart":"click";s.addEventListener(this.el,e,function(){window.open(t.imageUrl)},!1)},loadAdv:function(e){var t,i,n,r,a=this.model.get("imageAdvs");a&&a[e]&&a[e].image&&(i=a[e].image,r=s.getElementsByClassName("jw-media",this.api.getContainer())[0],t=this,n={display:"block","z-index":1e3,width:"100%",height:"100%",top:0,left:0},o.isString(i)?(i=encodeURI(i),n.backgroundImage='url("'+i+'")'):n.backgroundImage="","end"===e&&(n["z-index"]=0),"pause"===e&&(i=r?r.clientHeight:this.model.get("height"),r=r?r.clientWidth:this.model.get("width"),n.width="400px",n.height="300px",n.top=(i-300)/2,n.left=(r-400)/2),l.style(this.el,n),i=s.getElementsByClassName("adv-close",this.el)[0],r=s.getElementsByClassName("adv-countdown",this.el)[0],i.style.display="none",r.style.display="none","start"===e&&(n=a[e].time<=60?a[e].time:60,r.style.display="block",r.innerHTML="广å: "+n+"ç§"),"pause"===e&&(r=s.isMobile()?"touchstart":"click",i.addEventListener(r,function(e){e.cancelBubble=!0,e.stopPropagation(),e.preventDefault(),t.el.style.display="none"},!1),i.style.display="block"),this.imageUrl=a[e].url,this.element()&&this.api.getContainer().replaceChild(this.el,this.element()),this.isHide=!1)},beginStartAdv:function(){var e,t,i,n;this.startAdvPlayed?this.model.loadVideo():(e=this.model.get("imageAdvs").start,this.loadAdv("start"),t=e.time<=60?e.time:60,i=this.element(),(n=this).timer=setInterval(function(){var e;0<--t?(e="广å: "+t+"ç§",s.getElementsByClassName("adv-countdown",i)[0].innerHTML=e):(clearInterval(n.timer),i.style.display="none",n.isHide=!0,n.startAdvPlayed=!0,n.model.loadVideo())},1e3))},element:function(){var e=this.api.getContainer();return 0<s.getElementsByClassName("jw-adv",e).length?s.getElementsByClassName("jw-adv",e)[0]:this.el},isHidden:function(){return this.isHide},hide:function(){this.isHide=!0,this.element().style.display="none"},resizePauseAdv:function(e,t){l.style(this.element(),{top:(t-300)/2,left:(e-400)/2})},destroy:function(){this.timer&&clearInterval(this.timer),this.timer=null}}),t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="jw-adv jw-reset">\n <div class="adv-countdown"></div>\n <div class="adv-close">X</div>\n</div>'},useData:!0})},function(e,t,i){i=[i(1),i(0),i(29)],t=function(r,e,a){function t(e,t){this.model=e,this.element=t,this.times=0,this.init()}return e.extend(t.prototype,{init:function(){if(r.isMSIE(9))return a.style(this.element,{display:"none"}),!1;var e=this.model.get("marquee").text,t=this.model.get("marquee").color,i=this.model.get("marquee").fontSize;e&&(this.element.innerHTML=e),t&&a.style(this.element,{color:t}),i&&a.style(this.element,{fontSize:i,lineHeight:i+8}),this.reset()},start:function(){if(r.isMSIE(9))return!1;a.style(this.element,{animationPlayState:"running",opacity:1,display:"block"})},stop:function(){this.reset(),a.style(this.element,{animationPlayState:"paused",opacity:0,display:"none"})},pause:function(){"running"===this.element.style.animationPlayState&&a.style(this.element,{animationPlayState:"paused"}),a.style(this.element,{opacity:0}
191)},reset:function(e,t){e=e||this.model.get("width"),t=t||this.model.get("height");var i=this.element,e=this.times%2==0?"marquee1":"marquee2",n=this;a.animation(i,e+" 18s infinite"),this.randomTop(i,t),r.addEventListener(i,"webkitAnimationIteration",function(){n.randomTop(i,t)},!1),r.addEventListener(i,"animationiteration",function(){n.randomTop(i,t)},!1),this.times++},randomTop:function(){var e=0;this.model.get("containerHeight")&&(e=this.model.get("containerHeight")),a.style(this.element,{top:100<(e=e)?30+Math.random()*(e-100):e/2})}}),t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(1),i(234),i(0),i(11),i(33)],t=function(r,t,n,e,a){function i(){}return n.extend(i.prototype,{buildArray:function(){var e=a.split("+")[0],t={items:[]},i=this.model.get("rightclick"),i=(i&&n.isArray(i)&&0<i.length?n.each(i,function(e){t.items.push({title:e.title,link:e.link})}):t.items.push({title:"About Cyber Player "+e,link:"https://bce.baidu.com/doc/MCT/Web-SDK.html#.E6.92.AD.E6.94.BE.E5.99.A8.20Web.20SDK.20.E7.AE.80.E4.BB.8B"}),this.model.get("provider"));return i&&0<=i.name.indexOf("flash")&&(e="Flash Version "+r.flashVersion(),t.items.push({title:e,link:"http://www.adobe.com/software/flash/about/"})),t},buildMenu:function(){var e=this.buildArray();return r.createElement(t(e))},updateHtml:function(){this.el.innerHTML=this.buildMenu().innerHTML},rightClick:function(e){return this.lazySetup(),this.mouseOverContext||(this.hideMenu(),this.showMenu(e)),!1},getOffset:function(e){var t=e.target,i=e.layerX||e.offsetX,n=e.layerY||e.offsetY;if(r.isIE()&&(r.hasClass(t,"jw-video")||r.hasClass(t,"jw-warning")))return{x:i,y:n+40};for(;t!==this.playerElement;)i+=t.offsetLeft,n+=t.offsetTop,t=t.parentNode;return{x:i=i<=this.playerElement.clientWidth?i:this.playerElement.clientWidth,y:n=n<=this.playerElement.clientHeight?n:this.playerElement.clientHeight}},showMenu:function(e){e=this.getOffset(e);return this.el.style.left=e.x+"px",this.el.style.top=e.y+"px",r.addClass(this.playerElement,"jw-flag-rightclick-open"),r.addClass(this.el,"jw-open"),!1},hideMenu:function(){this.mouseOverContext||(r.removeClass(this.playerElement,"jw-flag-rightclick-open"),r.removeClass(this.el,"jw-open"))},lazySetup:function(){this.el||(this.el=this.buildMenu(),this.layer.appendChild(this.el),this.hideMenuHandler=this.hideMenu.bind(this),this.addOffListener(this.playerElement),this.addOffListener(document),this.model.on("change:provider",this.updateHtml,this),this.elementUI=new e(this.el,{useHover:!0}).on("over",function(){this.mouseOverContext=!0},this).on("out",function(){this.mouseOverContext=!1},this))},setup:function(e,t,i){this.playerElement=t,this.model=e,this.mouseOverContext=!1,this.layer=i,r.isPoorIE()||(t.oncontextmenu=this.rightClick.bind(this))},addOffListener:function(e){r.addEventListener(e,"mousedown",this.hideMenuHandler),r.addEventListener(e,"touchstart",this.hideMenuHandler),r.addEventListener(e,"pointerdown",this.hideMenuHandler)},removeOffListener:function(e){r.removeEventListener(e,"mousedown",this.hideMenuHandler),r.removeEventListener(e,"touchstart",this.hideMenuHandler),r.removeEventListener(e,"pointerdown",this.hideMenuHandler)},destroy:function(){this.el&&(this.hideMenu(),this.elementUI.off(),this.removeOffListener(this.playerElement),this.removeOffListener(document),this.hideMenuHandler=null,this.el=null),this.playerElement&&(this.playerElement.oncontextmenu=null,this.playerElement=null),this.model&&(this.model.off("change:provider",this.updateHtml),this.model=null)}}),i}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({1:function(e,t,i,n,r){var a,s,o=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,h=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return' <li class="jw-reset'+(null!=(a=h(i,"if").call(o,null!=t?h(t,"featured"):t,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r,loc:{start:{line:4,column:27},end:{line:4,column:62}}}))?a:"")+'">\n <a href="'+u("function"==typeof(s=null!=(s=h(i,"link")||(null!=t?h(t,"link"):t))?s:l)?s.call(o,{name:"link",hash:{},data:r,loc:{start:{line:5,column:21},end:{line:5,column:29}}}):s)+'" class="jw-reset" target="_blank">\n'+(null!=(a=h(i,"if").call(o,null!=t?h(t,"showLogo"):t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r,loc:{start:{line:6,column:16},end:{line:8,column:23}}}))?a:"")+" "+u("function"==typeof(s=null!=(s=h(i,"title")||(null!=t?h(t,"title"):t))?s:l)?s.call(o,{name:"title",hash:{},data:r,loc:{start:{line:9,column:16},end:{line:9,column:25}}}):s)+"\n </a>\n </li>\n"},2:function(e,t,i,n,r){return" jw-featured"}
191,4:function(e,t,i,n,r){return' <span class="jw-icon jw-rightclick-logo jw-reset"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<div class="jw-rightclick jw-reset">\n <ul class="jw-reset">\n'+(null!=(i=a(i,"each").call(null!=t?t:e.nullContext||{},null!=t?a(t,"items"):t,{name:"each",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r,loc:{start:{line:3,column:4},end:{line:12,column:13}}}))?i:"")+" </ul>\n</div>"},useData:!0})},function(e,t,i){i=[i(0),i(1)],t=function(e,s){function t(e){this.model=e,this.model.on("change:playlistItem",this.playlistItem,this)}return e.extend(t.prototype,{hide:function(){this.el.style.display="none"},show:function(){this.el.style.display=""},setup:function(e){this.el=e;e=this.el.getElementsByTagName("div");this.title=e[0],this.description=e[1],this.model.get("playlistItem")&&this.playlistItem(this.model,this.model.get("playlistItem")),this.model.on("change:logoWidth",this.update,this),this.model.on("change:dock",this.update,this)},update:function(e){var t,i={paddingLeft:0,paddingRight:0},n=e.get("controls"),r=e.get("dock"),a=e.get("logo");a&&(t=+(""+a.margin).replace("px",""),e=e.get("logoWidth")+(isNaN(t)?0:t),"top-left"===a.position?i.paddingLeft=e:"top-right"===a.position&&(i.paddingRight=e)),n&&r&&r.length&&(t=56*r.length,i.paddingRight=Math.max(i.paddingRight,t)),s.style(this.el,i)},playlistItem:function(e,t){var i,n;e.get("displaytitle")||e.get("displaydescription")?(n=i="",t.title&&e.get("displaytitle")&&(i=t.title),t.description&&e.get("displaydescription")&&(n=t.description),this.updateText(i,n)):this.hide()},updateText:function(e,t){this.title.innerHTML=e,this.description.innerHTML=t,this.title.firstChild||this.description.firstChild?this.show():this.hide()},element:function(){return this.el}}),t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(237),i(0),i(15),i(3)],t=function(n,i,e,r){function t(e){return!e||"string"==typeof e&&("#fff"===(e=e.toLowerCase())||"#ffffff"===e)}function a(){return{disabled:!1,blocked:[],fontSize:24,fontSizeScale:1,opacity:1,speed:1,area:.5,bottomUp:!1,colors:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#CC0273","#222222","#FFFFFF"],duration:5,items:[],zIndex:5,maxPerinsert:20,poolSize:50,useMask:!1,isDefaultColor:t,discard(e){return!1}}}function s(e,t){this.el,this.opts,this.enabled=!1,this.paused=!1,this.track=0,this.trackHeight=0,this.timer,this._bulletPool=[],this._aliveBullets=new Set,this._scrollBullets=[],this._topBullets=[],this._bottomBullets=[],this._items=[],this._pos=0,this._prevPauseTime=0,this.opts=i.extend(a(),t.get("danmaku")),this.playerEl=e,this._model=t,this._init(),this.opacityStyleObj={0:{class:"jw-danmaku-opacity-4",value:"0"},1:{class:"jw-danmaku-opacity-1",value:"1"}
191,.33:{class:"jw-danmaku-opacity-3",value:"0.33"},.66:{class:"jw-danmaku-opacity-2",value:"0.66"}},this.curOpacityStyleObj=null}return i.extend(s.prototype,{_init:function(){var e=document.createElement("div");e.classList.add("jw-danmaku"),this.el=this.playerEl.appendChild(e),this.el.style.zIndex=String(this.opts.zIndex),this.el.style.opacity=this.opts.opacity,this._items=Array.isArray(this.opts.items)?this.opts.items:[],this.timer={_prevPauseTime:0,_pausedTime:0,_paused:!1,now(){return((this._paused?this._prevPauseTime:Date.now())-this._pausedTime)/1e3},play(){this._paused&&(this._pausedTime+=Date.now()-this._prevPauseTime,this._paused=!1)},pause(){this._paused||(this._prevPauseTime=Date.now(),this._paused=!0)}},this.opts.disabled||this.enable(),setTimeout(()=>{this._updateTrack()})},getWidth(){return this.playerEl.getBoundingClientRect().width},getCurrentTime(){return this._model.get("position")},getPlaybackRate(){return this._model.get("playbackRate")},getFontSize(){return this.opts.fontSize*this.opts.fontSizeScale},getSpeedScale(){return this.getPlaybackRate()*this.opts.speed},getDuration(){return this._model.get("duration")},getItems(){return this._items},isPlaying(){return this._model.get("state")===e.PLAYING},_createBullet(e,t){let i=this._bulletPool.pop();return i?i.init(e,t):i=new n(this.el,this,e,t),this._aliveBullets.add(i),i},_unmountBullet(e){e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el)},_getShortestTrack(){let i=this._scrollBullets[0];if(!i||i.ended)return[0];for(let e=1,t;e<this.track;++e){if(!(t=this._scrollBullets[e])||t.ended)return[e];i.showAt>t.showAt&&(i=t)}return[i.track,i]},_getEmptyTrack(t,i){for(let e=0;e<this.track;++e)if(!i[e]||i[e]<=t)return e;return-1},_shouldDiscard(e){return!(!this.opts.blocked.includes(e.type||"scroll")&&!this.opts.discard(e)&&(!e.color||!this.opts.blocked.includes("color")||this.opts.isDefaultColor(e.color)))},_fire(){if(this.enabled&&this.isPlaying){this.paused&&this.start();var e=this.getCurrentTime(),i=e-.5,n=e+.5,r=this.timer.now(),a=this._items.length,s=this.opts.maxPerinsert;for(let e=0,t;this._pos<a;this._pos++)if(!((t=this._items[this._pos]).time<i)){if(t.time>n)break;if(!this._shouldDiscard(t)){if(!this._insert(t,r))break;if(++e>s)break}}}},_updateTrack(){var e=this.playerEl.getBoundingClientRect().height;this.trackHeight=this.getFontSize()+5,this.track=Math.floor(e*this.opts.area/this.trackHeight)},_handleSeeked(){this.clearScreen(),this._pos=0},_handleAddMask(t){if(this.opts.useMask){let e=(new TextDecoder).decode(t.data);e=(e=e.replaceAll("\n"," ")).replaceAll("#","%23"),this.el.setAttribute("style",e?`-webkit-mask-image: url('data:image/svg+xml;utf8,${e}')`:"")}},_handleSeekStart(){this.el.setAttribute("style","")},_clearMask(){this.el.setAttribute("style","")},_insert(e,t){if(!e.type||"scroll"===e.type){const[n,r]=this._getShortestTrack();var i=!e.force&&r&&r.showAt>t+2;return i?!1:(this._scrollBullets[n]=this._createBullet(e,{track:n,prev:i?void 0:r}),!0)}i="top"===e.type?this._topBullets:this._bottomBullets;let n=this._getEmptyTrack(t,i);return-1!==(n=-1===n&&e.force?0:n)&&(i[n]=this._createBullet(e,{track:n}).endAt,!0)},recycleBullet(e){this._bulletPool.length>this.opts.poolSize?this._unmountBullet(e):this._bulletPool.push(e),this._aliveBullets.delete(e),"scroll"===e.type&&this._scrollBullets[e.track]===e&&(this._scrollBullets[e.track]=void 0)},send(e){var t;this.enabled&&(void 0===e.time&&(e.time=this.getCurrentTime()),e=i.extend({isMe:!0,force:!0},e),t=this.addItem(e),this._model.mediaController.trigger(r.JWPLAYER_DANMAKU_SEND,{data:e}),this._pos>t)&&this._insert(e,this.timer.now())},start(){this.isPlaying&&(this.timer.play(),this._aliveBullets.forEach(e=>e.run(this._prevPauseTime)),this.paused=!1,this.getCurrentTime()>=this.getDuration())&&(this._handleSeeked(),this._clearMask())},pause(){this._prevPauseTime=this.timer.now(),this.timer.pause(),this._aliveBullets.forEach(e=>e.pause(this._prevPauseTime)),this.paused=!0},addItem(t){if(null==t.time)return-1;var i=this._items.length;if(!i||t.time>=this._items[i-1].time)return this._items.push(t),i;if(t.time<=this._items[0].time)return this._items.unshift(t),0;let n=0;for(let e=0;e<i;e++)if(this._items[e].time>t.time){n=1;break}return this._items.splice(n,0,t),n},appendItems(e){this._items=this._items.concat(e)},resetItems(e){this._items=e,this._pos=0},updateOpacity(e=this.opts.opacity){this.curOpacityStyleObj&&this.el.classList.remove(this.curOpacityStyleObj.class),this.curOpacityStyleObj=this.opacityStyleObj[Str
191ing(e)],this.el.classList.add(this.curOpacityStyleObj.class),this.el.style.opacity=String(e)},updateFontSize(e=this.opts.fontSizeScale){this.opts.fontSizeScale=e,this._updateTrack()},updateArea(e){[.25,.5,.75,1].includes(e)&&(this.opts.area=e,this._updateTrack())},updateBottomUp(t){this.opts.bottomUp=t,this._aliveBullets.forEach(e=>e.updateScrollY(t))},updateSpeed(e){this.opts.speed=e},resetOptions(){this.opts=i.extend(a(),this._model.get("danmaku")),this.updateOpacity(),this.updateFontsize(),this.updateBottomUp(this.opts.bottomUp)},clearScreen(){Array.from(this._aliveBullets).forEach(e=>e.end()),this._topBullets=[],this._bottomBullets=[]},enable(){this.enabled||(this.enabled=!0,this._model&&(this._model.mediaController.on("seek",this._handleSeeked,this),this._model.mediaController.on("sei_info",this._handleAddMask,this),this._model.mediaController.on("seekStart",this._handleSeekStart,this),this._model.on("change:position",this._fire,this)))},disable(){this.enabled=!1,this.clearScreen(),this._model&&(this._model.mediaController.off("seek",this._handleSeeked,this),this._model.mediaController.off("sei_info",this._handleAddMask,this),this._model.mediaController.off("seekStart",this._handleSeekStart,this),this._model.off("change:position",this._fire,this))},dispose(){this.disable(),this._bulletPool=null,this._aliveBullets=null,this._scrollBullets=null,this._topBullets=null,this._bottomBullets=null,this._items=null,this.el=null,this.opts=null},updateUseMask(e){(this.opts.useMask=e)||this.el.setAttribute("style","")}}),s}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(e){const r="jw-danmaku-item";function t(e,t,i,n){this.el=e.appendChild(document.createElement("div")),this.container=e,this.el.className=r,this.type="scroll",this.left=0,this.width=0,this.length=0,this.showAt=0,this.startAt=0,this.endAt=0,this.speed=0,this.track=0,this.ended=!1,this.color="",this.danmaku=t,this.end=this.end.bind(this),this.init(i,n)}return e.extend(t.prototype,{init(e,t){this.el.textContent=e.text,this.type=e.type||"scroll",this.track=t.track,e.color&&(this.el.style.color=this.color=e.color),e.isMe&&this.el.classList.add("jw-danmaku-item-me");var i,n,e=this.el.style;return e.fontSize=this.danmaku.getFontSize()+"px",this.startAt=this.danmaku.timer.now(),"scroll"===this.type?(this.el.addEventListener("transitionend",this.end),i=this.el.getBoundingClientRect(),this.width=i.width+20,i=this.danmaku.getWidth(),t=t.prev,this.left=i,this.speed=this.danmaku.getSpeedScale()*(i+this.width)/this.danmaku.opts.duration,t&&!t.ended&&(0<=(n=t.length-i-(this.startAt-t.startAt)*t.speed)?(this.speed=t.speed,this.left+=n):(n=this.danmaku.getWidth()/(t.endAt-this.startAt),this.speed>n&&(this.speed=n))),this.length=this.left+this.width,t=this.length/this.speed,this.showAt=this.startAt+(this.length-i)/this.speed,this.endAt=this.startAt+t,this.updateScrollY(),e.left=this.left+"px",e.transition=`transform ${t}s linear`,e.transform=`translate3d(-${this.length}px,0,0)`):(e[this.type]=this._pos(),this.el.classList.add("jw-danmaku-item-center"),n=this.danmaku.getSpeedScale()*this.danmaku.opts.duration,this.endAt=this.startAt+n,this.centerTimer=setTimeout(this.end.bind(this),1e3*n)),this.ended=!1,this.show(),this.danmaku.paused&&this.pause(this.startAt),this},_pos(){return this.track*this.danmaku.trackHeight+2+"px"},updateScrollY(e=this.danmaku.opts.bottomUp){var t;"scroll"===this.type&&((t=this.el.style).top=t.bottom="",t[e?"bottom":"top"]=this._pos())},end(){this.el.removeEventListener("transitionend",this.end),clearTimeout(this.centerTimer),this.el.style.cssText="",this.color="",this.el.className=r,this.ended=!0,this.hide(),this.danmaku.recycleBullet(this)},show(){this.el.style.visibility=""},hide(){this.el&&this.container.contains(this.el)&&this.container.removeChild(this.el)},pause(e){var t;"scroll"===this.type?((t=this.el.style).transition="transform 0s linear",t.transform=`translate3d(-${(e-this.startAt)*this.speed}px,0,0)`):clearTimeout(this.centerTimer)},run(e){var t;"scroll"===this.type?((t=this.el.style).transition=`transform ${this.endAt-e}s linear`,t.transform=`translate3d(-${this.length}px,0,0)`):this.centerTimer=setTimeout(this.end.bind(this),1e3*(this.endAt-e))}}),t}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<div id="'+e.escapeExpression("function"==typeof(i=null!=(i=a(i,"id")||(null!=t?a(t,"id"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"id",hash:{},data:r,loc:{start:{line:1,column:9},end:{line:1,column:15}}}):i)+'" class="jwplayer jw-reset" tabindex="0">\n <div class="jw-aspect jw-reset"></div>\n <div class="jw-media jw-reset"></div>\n <div class="jw-preview jw-reset"></div>\n <div class="jw-title jw-reset">\n <div class="jw-title-primary jw-reset"></div>\n <div class="jw-title-secondary jw-reset"></div>\n </div>\n <div class="jw-overlays jw-reset"></div>\n <div class="jw-controls jw-reset"></div>\n <div class="jw-warning jw-reset">\n ç¨æ·é´æå¤±è´¥ï¼è¯·å
<a target="_blank" href="http://bce.baidu.com">注å</a>æä¸ºç¾åº¦æºè½äºç¨æ·\n </div>\n <div class="jw-marquee">ç¾åº¦äº</div>\n</div>'},useData:!0}
191)},function(e,t,i){const r=i(73);i=[i(1),i(240)],void 0!==(t=function(i,n){return function(e){var t,e="zh"==e.get("lang")||"en"==e.get("lang")?e.get("lang"):"zh";return this.performanceLang=r.default[e].PERFORMANCE,this.container=null,this.setup=function(e){this.container=e,t=i.createElement(n(this.performanceLang)),e.appendChild(t)},this.setData=e=>{for(var t in e){var i=document.getElementById("performance-"+t);i&&(i.innerText=e[t])}},this.changeLang=function(e){this.performanceLang=r.default[e].PERFORMANCE,this.reset(),this.setup(this.container)},this.reset=function(){this.container.removeChild(t),t=null},this.destroy=function(){this.reset(),this.container=null},this}}.apply(t,i))&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a=e.lambda,s=e.escapeExpression,e=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<ul id="performance-info" class="performance-info jw-reset">\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"FORMAT"):t,t))+'</span>\n <span id="performance-playStyle"></span>\n </li>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"DECODEEFFICIENCY"):t,t))+'</span>\n <span>\n <span id="performance-decodeFrameRate"></span>\n frames/s\n </span>\n </li>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"DECODECONSUMPTION"):t,t))+'</span>\n <span>\n <span id="performance-decodeTime"></span>\n ms\n </span>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"FPS"):t,t))+'</span>\n <span id="performance-frameRate"></span>\n </li>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"RESOLUTION"):t,t))+'</span>\n <span id="performance-resolution">\n <span id="performance-width"></span>\n * \n <span id="performance-height"></span>\n </span>\n </li>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"ENCODETYPE"):t,t))+'</span>\n <span id="performance-code"></span>\n </li>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"BUFFEREND"):t,t))+'</span>\n <span id="performance-buffer"></span>\n </li>\n <li>\n <span style="color: #c9cdd4;">'+s(a(null!=t?e(t,"FIRSETIME"):t,t))+'</span>\n <span id="performance-firstFrameTime"></span>\n </li>\n</ul>'},useData:!0})},function(e,t,i){i=[i(1)],t=function(i){return class{constructor(e,t,i){this.watermarkOptions=Object.assign({},this.defaultConfig(),e.get("watermark")),this.isLeftToRight=!0,this.isTopToBottom=!0,this.watermarkEle=null,this.contentEle=null,this.playerId=i,this.container=t,this.undateChild(),this.timer=null,this.updateStyle()}getTag(){return{container:this.playerId+"-jw-watermark-container jw-watermark-container",content:this.playerId+"-jw-watermark-content jw-watermark-content"}}defaultConfig(){return{type:"text",speed:0,content:"",opacity:.5,fontSize:"12px",color:"#bdbdbd",left:"0%",top:"70%",rotate:"30deg"}}render(){return`<div class="${this.getTag().container}" >${this.renderContent()}</div>`}renderContent(){var{type:e,content:t}=this.watermarkOptions;return"image"==e?`<img class="${this.getTag().content}" style=${this.setStyle()} src=${this.setImage(t)} />`:`<div class="${this.getTag().content}" style=${this.setStyle()}>${t}</div>`}setImage(e){return 0==e.indexOf("http")?e:0==e.indexOf("://")?document.location.protocol+e:0==e.indexOf("//")?document.location.protocol+":"+e:document.location.protocol+"://"+e}setStyle(){let{opacity:e,fontSize:t,color:i,left:n,top:r,rotate:a,speed:s,width:o,right:l,bottom:u}=this.watermarkOptions;if(0<s&&this.contentEle){var{offsetLeft:h,clientWidth:d,clientHeight:c,offsetTop:f}=this.contentEle;const o=this.watermarkEle.clientWidth,g=this.watermarkEle.clientHeight;var p,m=Math.abs(d/2*Math.sin(parseFloat(a)*(2*Math.PI/360)));n.includes("px")&&(n=parseFloat(n)/o*100),r.includes("px")&&(r=parseFloat(r)/g*100),parseFloat(n)<100&&0<=parseFloat(n)&&this.isLeftToRight&&h+d<o||parseFloat(n)<=0?(o-d<(h=parseFloat(n)+ +s)/100*o?(p=parseInt((o-d)/o*100),this.isLeftToRight=!1):(p=h,this.isLeftToRight=!0),this.watermarkOptions.left=n=p+"%"):(this.watermarkOptions.left=n=parseFloat(n)-+s+"%",this.isLeftToRight=!1),parseFloat(r)<100&&0<=parseFloat(r)&&this.isTopToBottom&&f+c+m<g||parseFloat(r)<=0?(h=g<(d=parseFloat(r)+ +s)/100*g+c?parseFloat((g-c)/g*100):d,this.watermarkOptions.top=r=h+"%",this.isTopToBottom=!0):0<f-m?(this.watermarkOptions.top=r=parseFloat(r)-+s+"%",this.isTopToBottom=!1):this.isTopToBottom=!0}return`width:${o};opacity:${e};font-size:${t};color:${i};left:${n};top:${r};transform:rotate(${a});right:${l};bottom:`+u}updateStyle(){this.timer&&clearInterval(this.timer),this.timer=null,this.timer=setInterval(()=>
191{this.undateChild()},50)}undateChild(){var e,t;this.watermarkOptions.content&&(e=document.getElementsByClassName(this.getTag().container),0==(t=document.getElementsByClassName(this.getTag().content)).length&&0!=e.length&&(this.contentEle=i.createElement(this.renderContent()),e[0].appendChild(this.contentEle)),0!=t.length&&(this.contentEle=t[0],t[0].style=this.setStyle()),0==e.length)&&(this.watermarkEle=i.createElement(this.render()),this.container.appendChild(this.watermarkEle))}destroy(){this.timer&&clearInterval(this.timer),this.timer=null,this.container&&this.container.removeChild(this.watermarkEle)}}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(243)],t=function(r){return function(e,t,i,n){return r({id:e,skin:t,title:i,body:n})}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=i(13);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var a,s,o=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u="function",h=e.escapeExpression,e=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<div id="'+h(typeof(s=null!=(s=e(i,"id")||(null!=t?e(t,"id"):t))?s:l)==u?s.call(o,{name:"id",hash:{},data:r,loc:{start:{line:1,column:9},end:{line:1,column:15}}}):s)+'"class="jw-skin-'+h(typeof(s=null!=(s=e(i,"skin")||(null!=t?e(t,"skin"):t))?s:l)==u?s.call(o,{name:"skin",hash:{},data:r,loc:{start:{line:1,column:31},end:{line:1,column:39}}}):s)+' jw-error jw-reset">\n <div class="jw-title jw-reset">\n <div class="jw-title-primary jw-reset">'+(null!=(a=typeof(s=null!=(s=e(i,"title")||(null!=t?e(t,"title"):t))?s:l)==u?s.call(o,{name:"title",hash:{},data:r,loc:{start:{line:3,column:47},end:{line:3,column:58}}}):s)?a:"")+'</div>\n <div class="jw-title-secondary jw-reset">'+h(typeof(s=null!=(s=e(i,"body")||(null!=t?e(t,"body"):t))?s:l)==u?s.call(o,{name:"body",hash:{},data:r,loc:{start:{line:4,column:49},end:{line:4,column:57}}}):s)+'</div>\n </div>\n\n <div class="jw-icon-container jw-reset">\n <div class="jw-display-icon-container jw-background-color jw-reset">\n <div class="jw-icon jw-icon-display jw-reset"></div>\n </div>\n </div>\n</div>\n'},useData:!0})},function(e,t,i){i=[i(92),i(33),i(94)],t=function(e,t){var d,c,i,f,p={},n=document.getElementsByTagName("script")[0].parentNode,m=(window.__LOG_API__,0),g=0,_=!1,y=(new Date).getTime()+"",v=!1;function A(e){var t=new Date,i=t.getFullYear(),n=t.getMonth()+1,r=t.getDate(),a=t.getHours(),s=t.getMinutes(),o=t.getSeconds(),t=t.getMilliseconds(),i=i+"-"+(n<10?"0"+n:n)+"-"+(r<10?"0"+r:r)+" "+(a<10?"0"+a:a)+":"+(s<10?"0"+s:s)+":"+(o<10?"0"+o:o);return i=e?i+"."+t:i}function E(){return{flashVersion:e.flashVersion(),cyberPlayerVersion:t,ak:c.ak||"",provider:d.get("provider")?d.get("provider").name:"",config:""}}function b(e){var t;v||(t=e.action,delete e.action,e.sendTime=A(),e=function(e){var t,i=[];for(t in e)"object"==typeof e[t]?i.push(t+"="+encodeURIComponent(JSON.stringify(e[t]))):i.push(t+"="+e[t]);return i.join("&")}(e),i&&n.removeChild(i),(i=document.createElement("script")).setAttribute("type","text/javascript"),i.src=__LOG_API__+t+"?"+e,n.insertBefore(i,n.getElementsByTagName("script")[0]))}return function(e,t){if(c=(d=t).getConfiguration(),__DEBUG__||!1===c.withLog)return!1;var i,n,r,a,s,o=0,l=(e.on("meta",function(e){for(var t in e.metadata)p[t]=e.metadata[t];p.cdn_ip&&b({action:"/user/web/cdn",url:d.get("file")||d.getCurrentItem().file,cdn:p.cdn_ip})}),e.on("beforePlay",function(){_=v=!1,i=setInterval(function(){o+=100},100)}),e.on("play",function(){_?(clearInterval(i),i=null):(i&&(b({action:"/media/web/available",videoUrl:d.get("file")||d.getCurrentItem().file,type:"play",duration:o,time:A(!0),sessionTime:y,env:E()}),clearInterval(i),i=null),g=d.get("position"),b({action:"/user/web/play",videoUrl:d.get("file")||d.getCurrentItem().file,videoHeight:encodeURIComponent(p.height)||"",videoWidth:encodeURIComponent(p.width)||"",playerHeight:encodeURIComponent(c.height),playerWidth:encodeURIComponent(c.width),duration:p.duration||"",size:p.filesize||"",startPosition:d.get("position"),service:0<this.getDuration()?"vod":"lss",time:A(!0),sessionTime:y,env:E()}),_=!0,f||(f=setInterval(function(){b({action:"/user/web/count",session:y,url:d.get("file")||d.getCurrentItem().file})},6e4),b({action:"/user/web/count",session:y,url:d.get("file")||d.getCurrentItem().file})))}),e.on("seek",function(e){m+=e.position-g,g=e.offset,b({action:"/user/web/seek",videoUrl:d.get("file")||d.getCurrentItem().file,from:e.position,to:e.offset,time:A(!0),sessionTime:y,env:E()})}),e.on("pause",function(){m+=d.get("position")-g,b({action:"/user/web/
191pause",videoUrl:d.get("file")||d.getCurrentItem().file,time:A(!0),sessionTime:y,env:E()})}),e.on("idle",function(e){"complete"===e.reason&&(m+=d.get("duration")-g,b({action:"/user/web/end",videoUrl:d.get("file")||d.getCurrentItem().file,playInterval:m,time:A(!0),sessionTime:y,env:E()}))}),e.on("stop",function(){v=!0,clearInterval(i),i=null,clearInterval(f),f=null,p.duration&&(m+=d.get("position")-g,b({action:"/user/web/end",videoUrl:d.get("file")||d.getCurrentItem().file,playInterval:m,time:A(!0),sessionTime:y,env:E()}))}),e.on("error",function(e){clearInterval(i),b({action:"/core/web/error",videoUrl:d.get("file")||d.getCurrentItem().file,error:e.code,errorInfo:e.message,time:A(!0),sessionTime:y,env:E()})}),e.on("setupError",function(e){b({action:"/core/web/error",videoUrl:d.get("file")||d.getCurrentItem().file,error:e.code,errorInfo:e.message,time:A(!0),sessionTime:y,env:E()})}),e.on("alive",function(){n=(new Date).getTime()}),e.on("liveStop",function(){r=(new Date).getTime(),b({action:"/user/web/end",videoUrl:d.get("file")||d.getCurrentItem().file,playInterval:(r-n)/1e3,time:A(!0),sessionTime:y,env:E()})}),!0),u=!1,h=0;e.on("alive",function(){u=!0,l?l=!1:a&&(s=(new Date).getTime()-a,h++,b({action:"/user/web/buffer",session:y,url:d.get("file")||d.getCurrentItem().file,bt:s,bc:h,env:E()}),a=null)}),e.on("noLiveStream",function(){u&&(a=a||(new Date).getTime())})}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(70),i(0)],t=function(e,n){return function(t,i){n.each(["seek","skipAd","stop","playlistNext","playlistPrev","playlistItem","resize","addButton","removeButton","registerPlugin","attachMedia"],function(e){t[e]=function(){return i[e].apply(i,arguments),t}}),t.registerPlugin=e.registerPlugin}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0)],t=function(e){return function(i,n){e.each(["buffer","controls","position","duration","fullscreen","volume","mute","item","stretching","playlist","captions","playbackRate","screenshot"],function(e){var t=e.slice(0,1).toUpperCase()+e.slice(1);i["get"+t]=function(){return n._model.get(e)}});e.each(["getAudioTracks","getCaptionsList","getWidth","getHeight","getCurrentAudioTrack","setCurrentAudioTrack","getCurrentCaptions","setCurrentCaptions","getCurrentQuality","setCurrentQuality","getQualityLevels","getVisualQuality","getConfig","getState","getSafeRegion","isBeforeComplete","isBeforePlay","getProvider","detachMedia","getHlsCurrentLevel"],function(e){i[e]=function(){return n[e]?n[e].apply(n,arguments):null}}),e.each(["setControls","setKeyControls","setFullscreen","setVolume","enableGPU","disableGPU","setMute","setCues","setCaptions","setToken","setThumbnails","setPlaybackRate","setScreenshot","setSeekStep","setCaptureFrameStart","setCaptureFrameEnd","setDanmuStatus","sendDanmu","setPictInPict","setLang"],function(e){i[e]=function(){return n[e].apply(n,arguments),i}}),i.getPlaylistIndex=i.getItem}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(0),i(3)],t=function(n,t){return function(i){var e={onSeekFinished:t.JWPLAYER_MEDIA_SEEK_FINISHED,onBufferChange:t.JWPLAYER_MEDIA_BUFFER,onBufferFull:t.JWPLAYER_MEDIA_BUFFER_FULL,onError:t.JWPLAYER_ERROR,onSetupError:t.JWPLAYER_SETUP_ERROR,onFullscreen:t.JWPLAYER_FULLSCREEN,onMeta:t.JWPLAYER_MEDIA_META,onMute:t.JWPLAYER_MEDIA_MUTE,onPlaylist:t.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:t.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:t.JWPLAYER_PLAYLIST_COMPLETE,onReady:t.JWPLAYER_READY,onCoverImageReady:t.JWPLAYER_H265WEB_COVERLOADED,onResize:t.JWPLAYER_RESIZE,onComplete:t.JWPLAYER_MEDIA_COMPLETE,onSeek:t.JWPLAYER_MEDIA_SEEK,onTime:t.JWPLAYER_MEDIA_TIME,onVolume:t.JWPLAYER_MEDIA_VOLUME,onBeforePlay:t.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:t.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:t.JWPLAYER_DISPLAY_CLICK,onControls:t.JWPLAYER_CONTROLS,onQualityLevels:t.JWPLAYER_MEDIA_LEVELS,onQualityChange:t.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:t.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:t.JWPLAYER_CAPTIONS_CHANGED,onAdError:t.JWPLAYER_AD_ERROR,onAdClick:t.JWPLAYER_AD_CLICK,onAdImpression:t.JWPLAYER_AD_IMPRESSION,onAdTime:t.JWPLAYER_AD_TIME,onAdComplete:t.JWPLAYER_AD_COMPLETE,onAdCompanions:t.JWPLAYER_AD_COMPANIONS,onAdSkipped:t.JWPLAYER_AD_SKIPPED,onAdPlay:t.JWPLAYER_AD_PLAY,onAdPause:t.JWPLAYER_AD_PAUSE,onAdMeta:t.JWPLAYER_AD_META,onCast:t.JWPLAYER_CAST_SESSION,onAudioTrackChange:t.JWPLAYER_AUDIO_TRACK_CHANGED,onAudioTracks:t.JWPLAYER_AUDIO_TRACKS,onCuepoint:t.JWPLAYER_CUEPOINT,onSeekForwardForbidden:t.JWPLAYER_SEEK_FORWARD_FORBIDDEN,onConnection:t.JWPLAYER_CONNECTING,onAlive:t.JWPLAYER_ALIVE,onNoLiveStream:t.JWPLAYER_NO_LIVE_STREAM,onLiveStop:t.JWPLAYER_LIVE_STOP,onPlaybackRate:t.JWPLAYER_PLAYBACKRATE,onScreenshot:t.JWPLAYER_SCREENSHOT,onCaptureFrameFinished:t.JWPLAYER_CaptureFrameFinished};n.each({onBuffer:"buffer",onPause:"pause",onPlay:"play",onIdle:"idle",onStop:"stop"},function(e,t){i[t]=n.partial(i.on,e,n)}),n.each(e,function(e,t){i[t]=n.partial(i.on,e,n)})}}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){i=[i(33),i(1)],t=function(i,n){function r(){for(var e=n.getElementsByClassName("jw-warning"),t=0;t<e.length;t++)e[t].style.display="block"}function e(e,t){this.config=e,this.api=t}return e.prototype={userCertify:function(){var e,t;return!__DEBUG__&&!1!==this.config.withLog&&(e=this.config.ak||"",/^[a-zA-Z0-9]{32}$/.test(e)||/^[a-zA-Z0-9]{26}$/.test(e)?(e="https://drm.media.baidubce.com/v1/playerAuth?ak="+e+"&player="+("web-html5-"+i)+"&platform="+n.getBrowserInfo()+"&callback="+this._getCallback(),e=encodeURI(e),(t=document.createElement("script")).type="text/javascript",t.src=e,void document.getElementsByTagName("head")[0].appendChild(t)):(r(),!1))},_getCallback:function(){var i="jwplayer_"+(new Date).getTime()+"_"+(1e9*Math.random()>>>0);return window[i]=function(e){try{!(t=e).code||"UNAUTHORIZED"!==t.code&&"BAD_REQUEST"!==t.code||r(),delete window[i]}catch(e){window[i]=null}var t},i}},e}.apply(t,i);void 0!==t&&(e.exports=t)},function(e,t,i){var n=i(250),r=("string"==typeof n&&(n=[[e.i,n,""]]),{hmr:!0});r.transform=void 0,r.insertInto=void 0,i(254)(n,r);n.locals&&(e.exports=n.locals)}
191,function(e,t,i){(e.exports=i(251)()).push([e.i,".jw-reset {\n color: inherit;\n background-color: transparent;\n padding: 0;\n margin: 0;\n float: none;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n line-height: 1em;\n list-style: none;\n text-align: left;\n text-transform: none;\n vertical-align: baseline;\n border: 0;\n direction: ltr;\n font-variant: inherit;\n font-stretch: inherit;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n}\n/*** When not base64 encoded, fallbacks will work so that we won't load both fonts if we don't have to ***/\n/*** TTF is used for support for some older version of Android Stock (4.3 and less) ***/\n/*** https://kekee000.github.io/fonteditor/# iconçæå¨ ***/\n@font-face {\n font-family: 'jw-icons';\n src: url("+i(252)+") format('woff'), url("+i(253)+') format(\'truetype\');\n font-weight: normal;\n font-style: normal;\n}\n.jw-icon-inline,\n.jw-icon-tooltip,\n.jw-icon-display,\n.jw-controlbar .jw-menu .jw-option:before {\n font-family: \'jw-icons\';\n -webkit-font-smoothing: antialiased;\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n background-color: transparent;\n font-variant: normal;\n /* Enable Ligatures ================ */\n -webkit-font-feature-settings: "liga";\n -moz-font-feature-settings: "liga=1";\n -moz-font-feature-settings: "liga";\n -ms-font-feature-settings: "liga" 1;\n -o-font-feature-settings: "liga";\n font-feature-settings: "liga";\n -moz-osx-font-smoothing: grayscale;\n}\n/*** ICONS ***/\n.jw-icon-audio-tracks:before {\n content: "\\E600";\n}\n.jw-icon-buffer:before {\n content: "\\E601";\n}\n.jw-icon-cast:before {\n content: "\\E603";\n}\n.jw-icon-cast.jw-off:before {\n content: "\\E602";\n}\n.jw-icon-cc:before {\n content: "\\E605";\n}\n.jw-icon-cue:before {\n content: "\\E606";\n}\n.jw-icon-menu-bullet:before {\n content: "\\E606";\n}\n.jw-icon-error:before {\n content: "\\E607";\n}\n.jw-icon-fullscreen:before {\n content: "\\E608";\n}\n.jw-icon-fullscreen.jw-off:before {\n content: "\\E613";\n}\n.jw-icon-screenshot:before {\n content: "\\E619";\n}\n.jw-icon-screenshot.jw-off:before {\n content: "\\E619";\n}\n.jw-icon-pictureinpicture:before {\n content: "\\E61C";\n}\n.jw-icon-pictureinpicture.jw-off:before {\n content: "\\E61C";\n}\n.jw-icon-danmu:before {\n content: "\\E61A";\n}\n.jw-icon-danmu.jw-off:before {\n content: "\\E61B";\n}\n.jw-icon-hd:before {\n content: none;\n}\n.jw-watermark:before,\n.jw-rightclick-logo:before {\n content: "\\E60B";\n}\n.jw-icon-next:before {\n content: "\\E60C";\n}\n.jw-icon-pause:before {\n content: "\\E60D";\n}\n.jw-icon-play:before {\n content: "\\E60E";\n}\n.jw-icon-prev:before {\n content: "\\E60F";\n}\n.jw-icon-replay:before {\n content: "\\E610";\n}\n.jw-icon-volume:before {\n content: "\\E612";\n}\n.jw-icon-volume.jw-off:before {\n content: "\\E611";\n}\n.jw-icon-more:before {\n content: "\\E614";\n}\n.jw-icon-close:before {\n content: "\\E615";\n}\n.jw-icon-playlist:before {\n content: "\\E616";\n}\n.jw-icon-barlogo:before {\n content: "\\E617";\n}\n.jw-icon-barlogo-new:before {\n content: "\\E618";\n}\n.jwplayer {\n width: 100%;\n font-size: 16px;\n position: relative;\n display: block;\n min-height: 0;\n overflow: hidden;\n box-sizing: border-box;\n font-family: Arial, Helvetica, sans-serif;\n background-color: #000;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.jwplayer * {\n box-sizing: inherit;\n}\n.jwplayer.jw-flag-aspect-mode {\n height: auto !important;\n}\n.jwplayer.jw-flag-aspect-mode .jw-aspect {\n display: block;\n}\n.jwplayer .jw-aspect {\n display: none;\n}\n.jwplayer.jw-no-focus:focus,\n.jwplayer .jw-swf {\n outline: none;\n}\n.jwplayer.jw-ie:focus {\n outline: #585858 dotted 1px;\n}\n.jwplayer:hover .jw-display-icon-container {\n background-color: #333;\n background: #333;\n background-size: #333;\n}\n.jw-media,\n.jw-preview,\n.jw-adv,\n.jw-overlays,\n.jw-controls {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n.jwplayer .jw-adv {\n background-size: 100% 100%;\n cursor: pointer;\n}\n.jwplayer .jw-adv .adv-countdown {\n position: absolute;\n width: 95px;\n padding-left: 10px;\n height: 30px;\n line-height: 30px;\n background-color: #202020;\n opacity: 0.7;\n color: #ee6002;\n font-size: 14px;\n top: 0px;\n right: 0px;\n display: none;\n}\n.jwplayer .jw-adv .adv-close {\n position: absolute;\n height: 22px;\n line-height: 22px;\n color: #FFF;\n font-weight: bold;\n font-size: 14px;
191\n width: 20px;\n top: 0px;\n right: 5px;\n display: none;\n text-align: center;\n}\n.jw-media {\n overflow: hidden;\n cursor: pointer;\n}\n.jw-overlays {\n cursor: auto;\n}\n.jw-media.jw-media-show {\n visibility: visible;\n opacity: 1;\n}\n.jw-controls.jw-controls-disabled {\n display: none;\n}\n.jw-controls .jw-controls-right {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 2em;\n}\n.jw-warning {\n color: #F00;\n top: 10px;\n right: 10px;\n position: absolute;\n z-index: 10000;\n display: none;\n}\n.jw-warning a {\n color: #108cee;\n}\n.jw-marquee {\n opacity: 0;\n color: #FFF;\n width: auto;\n font-size: 16px;\n font-weight: bold;\n white-space: nowrap;\n position: absolute;\n}\n@-webkit-keyframes marquee1 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-moz-keyframes marquee1 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-o-keyframes marquee1 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-ms-keyframes marquee1 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@keyframes marquee1 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-webkit-keyframes marquee2 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-moz-keyframes marquee2 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-o-keyframes marquee2 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@-ms-keyframes marquee2 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n@keyframes marquee2 {\n from {\n left: 100%;\n }\n to {\n left: -110px;\n }\n}\n.jw-text {\n height: 1em;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 0.75em;\n font-style: normal;\n font-weight: normal;\n color: white;\n text-align: center;\n font-variant: normal;\n font-stretch: normal;\n}\n.jw-plugin {\n position: absolute;\n bottom: 2.5em;\n}\n.jw-plugin .jw-banner {\n max-width: 100%;\n opacity: 0;\n cursor: pointer;\n position: absolute;\n margin: auto auto 0 auto;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n}\n.jw-cast-screen {\n width: 100%;\n height: 100%;\n}\n.jw-instream {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: none;\n}\n.jw-icon-playback:before {\n content: "\\E60E";\n}\n.jw-preview,\n.jw-captions,\n.jw-title,\n.jw-overlays,\n.jw-controls {\n pointer-events: none;\n}\n.jw-overlays > div,\n.jw-media,\n.jw-controlbar,\n.jw-dock,\n.jw-logo,\n.jw-skip,\n.jw-display-icon-container {\n pointer-events: all;\n}\n.jw-danmaku {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n pointer-events: none;\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n}\n.jw-danmaku-opacity-1 {\n opacity: 1;\n}\n.jw-danmaku-opacity-2 {\n opacity: 0.66;\n}\n.jw-danmaku-opacity-3 {\n opacity: 0.33;\n}\n.jw-danmaku-opacity-4 {\n opacity: 0;\n}\n.jw-danmaku-item {\n position: absolute;\n white-space: nowrap;\n line-height: 1.125;\n letter-spacing: 1px;\n color: #fff;\n text-shadow: #000000 1px 0px 1px, #000000 0px 1px 1px, #000000 0px -1px 1px, #000000 -1px 0px 1px;\n will-change: transform;\n}\n.jw-danmaku-item-center {\n left: 50%;\n transform: translateX(-50%);\n will-change: initial;\n z-index: 1;\n}\n.jw-danmaku-item-me {\n outline: 2px solid;\n z-index: 2;\n}\n.jw-danmaku-sendbox {\n display: flex;\n align-items: center;\n margin: 0 10px;\n padding: 5px 10px;\n color: white;\n background: rgba(255, 255, 255, 0.15);\n}\n.jw-danmaku-sendbox input {\n flex: 1;\n width: 100px;\n padding: 0;\n color: currentColor;\n background: transparent;\n border: 0;\n outline: 0;\n font-size: 13px;\n}\n.jw-danmaku-sendbox input::placeholder {\n color: rgba(255, 255, 255, 0.5);\n}\n.jw-danmaku-sendbox-btn {\n color: white;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.performance-info {\n color: #fff;\n width: 178px;\n height: 100%;\n z-index: 8;\n font-size: 12px;\n padding: 10px;\n background: rgba(0, 0, 0, 0.5);\n font-weight: 400;\n box-sizing: border-box;\n overflow-y: auto;\n position: absolute;\n top: 0;\n}
191\n.performance-info li {\n line-height: 35px;\n color: #fff;\n display: flex;\n justify-content: space-between;\n}\n.performance-info #performance-buffer {\n max-width: 70px;\n display: inline-block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n vertical-align: middle;\n line-height: 35px;\n}\n.jw-watermark-container {\n left: 0%;\n top: 0%;\n width: 100%;\n height: 100%;\n display: block;\n visibility: visible;\n position: absolute;\n margin: 0px;\n padding: 0px;\n}\n.jw-watermark-container .jw-watermark-content {\n position: absolute;\n height: fit-content;\n}\n.jw-watermark-container img {\n width: 20px;\n}\n.jwplayer video {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n margin: auto;\n background: transparent;\n}\n.jwplayer video::-webkit-media-controls-start-playback-button {\n display: none;\n}\n.jwplayer.jw-stretch-uniform video {\n object-fit: contain;\n}\n.jwplayer.jw-stretch-none video {\n object-fit: none;\n}\n.jwplayer.jw-stretch-fill video {\n object-fit: cover;\n}\n.jwplayer.jw-stretch-exactfit video {\n object-fit: fill;\n}\n/* W3C */\n/* icons */\n/* doc */\n/* IE9 SVG, needs conditional override of \'filter\' to \'none\' */\n/* IE9 SVG, needs conditional override of \'filter\' to \'none\' */\n.jw-click {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.jw-preview,\n.jw-adv {\n position: absolute;\n display: none;\n opacity: 1;\n visibility: visible;\n width: 100%;\n height: 100%;\n background: #000 no-repeat 50% 50%;\n}\n.jwplayer .jw-preview,\n.jw-error .jw-preview,\n.jw-stretch-uniform .jw-preview {\n background-size: 100% 100%;\n}\n.jw-stretch-none .jw-preview {\n background-size: auto auto;\n}\n.jw-stretch-fill .jw-preview {\n background-size: cover;\n}\n.jw-stretch-exactfit .jw-preview {\n background-size: 100% 100%;\n}\n.jw-display-icon-container {\n position: relative;\n top: 50%;\n display: table;\n height: 3.5em;\n width: 3.5em;\n margin: -1.75em auto 0;\n cursor: pointer;\n}\n.jw-display-icon-container .jw-icon-display {\n position: relative;\n display: table-cell;\n text-align: center;\n vertical-align: middle !important;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n font-size: 2em;\n}\n.jw-flag-audio-player .jw-display-icon-container,\n.jw-flag-dragging .jw-display-icon-container {\n display: none;\n}\n.jw-icon {\n font-family: \'jw-icons\';\n -webkit-font-smoothing: antialiased;\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n background-color: transparent;\n font-variant: normal;\n /* Enable Ligatures ================ */\n -webkit-font-feature-settings: "liga";\n -moz-font-feature-settings: "liga=1";\n -moz-font-feature-settings: "liga";\n -ms-font-feature-settings: "liga" 1;\n -o-font-feature-settings: "liga";\n font-feature-settings: "liga";\n -moz-osx-font-smoothing: grayscale;\n}\n/* Mixin for common skin styles with variable colors */\n.jw-controlbar {\n display: table;\n position: absolute;\n right: 0;\n left: 0;\n bottom: 0;\n height: 2em;\n padding: 0 0.25em;\n}\n.jw-controlbar .jw-hidden {\n display: none;\n}\n.jw-controlbar.jw-drawer-expanded .jw-controlbar-left-group,\n.jw-controlbar.jw-drawer-expanded .jw-controlbar-center-group {\n opacity: 0;\n}\n.jw-controlbar-textshow .jw-controlbar-center-group .jw-text-elapsed,\n.jw-controlbar-textshow .jw-controlbar-center-group .jw-text-duration,\n.jw-controlbar-textshow .jw-controlbar-center-group .jw-slider-time {\n display: none;\n}\n.jw-controlbar-textshow .jw-controlbar-center-group .jw-text-alt {\n display: inline;\n}\n.jw-background-color {\n background-color: #414040;\n}\n.jw-group {\n display: table-cell;\n}\n.jw-controlbar-center-group {\n width: 100%;\n padding: 0 0.25em;\n}\n.jw-controlbar-center-group .jw-slider-time,\n.jw-controlbar-center-group .jw-text-alt {\n padding: 0;\n}\n.jw-controlbar-center-group .jw-text-alt {\n display: none;\n}\n.jw-controlbar-left-group,\n.jw-controlbar-right-group {\n white-space: nowrap;\n}\n.jw-knob:hover,\n.jw-icon-inline:hover,\n.jw-icon-tooltip:hover,\n.jw-icon-display:hover,\n.jw-option:before:hover {\n
191color: #eee;\n}\n.jw-icon-inline,\n.jw-icon-tooltip,\n.jw-slider-horizontal,\n.jw-text-elapsed,\n.jw-text-duration {\n display: inline-block;\n height: 2em;\n position: relative;\n line-height: 2em;\n vertical-align: middle;\n cursor: pointer;\n}\n.jw-icon-inline,\n.jw-icon-tooltip {\n min-width: 1.25em;\n text-align: center;\n}\n.jw-icon-playback {\n min-width: 2.25em;\n}\n.jw-icon-barlogo {\n font-size: 19px;\n min-width: 1.75em;\n}\n.jw-icon-barlogo-new {\n font-size: 20px;\n min-width: 1.5em;\n height: 1em;\n line-height: 1em;\n}\n.jw-icon-volume {\n min-width: 1.75em;\n text-align: left;\n}\n.jw-controlbar .jw-icon-volume .jw-overlay {\n left: 42%;\n}\n.jw-time-tip {\n line-height: 1em;\n pointer-events: none;\n}\n.jw-icon-inline:after,\n.jw-icon-tooltip:after {\n width: 100%;\n height: 100%;\n font-size: 1em;\n}\n.jw-icon-cast {\n display: none;\n}\n.jw-slider-volume.jw-slider-horizontal,\n.jw-icon-inline.jw-icon-volume {\n display: none;\n}\n.jw-icon-hd .jw-hd-label {\n font-size: 12px;\n vertical-align: text-top;\n display: inline-block;\n height: 14px;\n line-height: 14px;\n pointer-events: none;\n}\n.jw-icon-qualityChange {\n margin: 0px 5px;\n}\n.jw-icon-qualityChange .jw-qualityChange-label {\n font-size: 14px;\n pointer-events: none;\n vertical-align: text-top;\n display: inline-block;\n height: 14px;\n line-height: 14px;\n}\n.jw-controlbar .jw-icon-playrate .jw-overlay {\n bottom: 1.5em;\n}\n.jw-controlbar .jw-icon-playrate .jw-playrate-label {\n font-size: 0.75em;\n border-left: 1px solid #666;\n padding: 0 0.7em;\n display: inline-block;\n line-height: 16px;\n height: 16px;\n vertical-align: text-top;\n}\n.jw-controlbar .jw-icon-cc:before {\n content: none;\n}\n.jw-controlbar .jw-icon-cc .jw-cc-label {\n font-size: 0.75em;\n padding: 0 0.7em;\n display: inline-block;\n line-height: 16px;\n height: 16px;\n vertical-align: text-top;\n}\n.jw-controlbar .jw-icon-lang {\n margin: 0px 3px 0px 8px;\n}\n.jw-controlbar .jw-icon-lang .jw-lang-label {\n font-size: 14px;\n pointer-events: none;\n vertical-align: text-top;\n display: inline-block;\n height: 14px;\n line-height: 14px;\n}\n.jw-dock {\n margin: 0.75em;\n display: block;\n opacity: 1;\n clear: right;\n}\n.jw-dock:after {\n content: \'\';\n clear: both;\n display: block;\n}\n.jw-dock-button {\n cursor: pointer;\n float: right;\n position: relative;\n width: 2.5em;\n height: 2.5em;\n margin: 0.5em;\n}\n.jw-dock-button .jw-arrow {\n display: none;\n position: absolute;\n bottom: -0.2em;\n width: 0.5em;\n height: 0.2em;\n left: 50%;\n margin-left: -0.25em;\n}\n.jw-dock-button .jw-overlay {\n display: none;\n position: absolute;\n top: 2.5em;\n right: 0em;\n margin-top: 0.25em;\n padding: 0.5em;\n white-space: nowrap;\n}\n.jw-dock-button:hover .jw-overlay,\n.jw-dock-button:hover .jw-arrow {\n display: block;\n}\n.jw-dock-image {\n width: 100%;\n height: 100%;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n opacity: 0.75;\n}\n.jw-title {\n display: none;\n position: absolute;\n top: 0;\n width: 100%;\n font-size: 0.875em;\n height: 8em;\n background: linear-gradient(to bottom, #000000 0, #000000 18%, rgba(0, 0, 0, 0) 100%);\n}\n.jw-title-primary,\n.jw-title-secondary {\n padding: 0.75em 1.5em;\n min-height: 2.5em;\n color: white;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow-x: hidden;\n}\n.jw-title-primary {\n font-weight: bold;\n}\n.jw-title-secondary {\n margin-top: -0.5em;\n}\n.jw-slider-container {\n display: inline-block;\n height: 1em;\n position: relative;\n touch-action: none;\n}\n.jw-rail,\n.jw-buffer,\n.jw-progress {\n position: absolute;\n cursor: pointer;\n}\n.jw-progress {\n background-color: #fff;\n}\n.jw-rail {\n background-color: #aaa;\n}\n.jw-buffer {\n background-color: #202020;\n}\n.jw-cue,\n.jw-knob {\n position: absolute;\n cursor: pointer;\n}\n.jw-cue {\n background-color: #fff;\n width: 0.1em;\n height: 0.4em;\n}\n.jw-knob {\n background-color: #aaa;\n width: 0.4em;\n height: 0.4em;\n}\n.jw-slider-horizontal {\n width: 4em;\n height: 1em;\n}\n.jw-slider-horizontal.jw-slider-volume {\n margin-right: 5px;\n}\n.jw-slider-horizontal .jw-rail,\n.jw-slider-horizontal .jw-buffer,\n.jw-slider-horizontal .jw-progress {\n width: 100%;\n height: 0.4em;\n}\n.jw-slider-horizontal .jw-progress,\n.jw-slider-horizontal .jw-buffer {\n width: 0;\n}\n.jw-slider-horizontal .jw-rail,\n.jw-slider-horizontal .jw-progress,\n.jw-slider-horizontal .jw-sli
191der-container {\n width: 100%;\n left: 0;\n}\n.jw-slider-horizontal .jw-knob {\n left: 0;\n margin-left: -0.325em;\n}\n.jw-slider-vertical {\n width: 0.75em;\n height: 4em;\n bottom: 0em;\n position: absolute;\n padding: 1em;\n}\n.jw-slider-vertical .jw-rail,\n.jw-slider-vertical .jw-buffer,\n.jw-slider-vertical .jw-progress {\n bottom: 0;\n height: 100%;\n}\n.jw-slider-vertical .jw-progress,\n.jw-slider-vertical .jw-buffer {\n height: 0;\n}\n.jw-slider-vertical .jw-slider-container,\n.jw-slider-vertical .jw-rail,\n.jw-slider-vertical .jw-progress {\n bottom: 0;\n width: 0.75em;\n height: 100%;\n left: 0;\n right: 0;\n margin: 0 auto;\n}\n.jw-slider-vertical .jw-slider-container {\n height: 4em;\n position: relative;\n}\n.jw-slider-vertical .jw-knob {\n bottom: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n}\n.jw-slider-time {\n right: 0;\n left: 1%;\n width: 98%;\n}\n.jw-tooltip-time {\n position: absolute;\n}\n.jw-slider-volume .jw-buffer {\n display: none;\n}\n.jw-slider-breakpoint {\n position: absolute;\n top: 1px;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 3px;\n height: 2px;\n background-color: #b7becb;\n border-radius: 50%;\n}\n.jwplayer .jw-process-adv {\n position: absolute;\n top: 0;\n left: 0;\n display: none;\n}\n.jwplayer .jw-process-adv img {\n border: none;\n}\n.jw-captions {\n position: absolute;\n display: none;\n margin: 0 auto;\n width: 100%;\n left: 0;\n bottom: 3em;\n right: 0;\n max-width: 90%;\n text-align: center;\n}\n.jw-captions.jw-captions-enabled {\n display: block;\n}\n.jw-captions-window {\n display: none;\n padding: 0.25em;\n border-radius: 0.25em;\n}\n.jw-captions-window.jw-captions-window-active {\n display: inline-block;\n}\n.jw-captions-text {\n display: inline-block;\n color: white;\n background-color: black;\n word-wrap: break-word;\n white-space: pre-line;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n text-decoration: none;\n line-height: 1.3em;\n padding: 0.1em 0.8em;\n}\n.jwplayer video::-webkit-media-controls {\n justify-content: flex-start;\n}\n.jwplayer video::-webkit-media-text-track-container {\n max-height: calc(97% - 6.25 * 2em);\n line-height: 1.3em;\n}\n.jwplayer.jw-flag-compact-player video::-webkit-media-text-track-container {\n max-height: calc(97% - 7.5 * 2em);\n}\n.jwplayer .jw-rightclick {\n display: none;\n position: absolute;\n white-space: nowrap;\n}\n.jwplayer .jw-rightclick.jw-open {\n display: block;\n}\n.jwplayer .jw-rightclick ul {\n list-style: none;\n font-weight: bold;\n border-radius: 0.15em;\n margin: 0;\n border: 1px solid #444;\n padding: 0;\n}\n.jwplayer .jw-rightclick ul li {\n background-color: #000;\n border-bottom: 1px solid #444;\n margin: 0;\n}\n.jwplayer .jw-rightclick ul li .jw-rightclick-logo {\n font-size: 2em;\n color: #ff0147;\n vertical-align: middle;\n padding-right: 0.3em;\n margin-right: 0.3em;\n border-right: 1px solid #444;\n}\n.jwplayer .jw-rightclick ul li a {\n color: #fff;\n text-decoration: none;\n padding: 1em;\n display: block;\n font-size: 0.6875em;\n line-height: 1em;\n}\n.jwplayer .jw-rightclick ul li:last-child {\n border-bottom: none;\n}\n.jwplayer .jw-rightclick ul li:hover {\n background-color: #1a1a1a;\n cursor: pointer;\n}\n.jwplayer .jw-rightclick ul .jw-featured {\n background-color: #252525;\n vertical-align: middle;\n}\n.jwplayer .jw-rightclick ul .jw-featured a {\n color: #777;\n}\n.jw-logo {\n position: absolute;\n margin: 0.75em;\n cursor: pointer;\n pointer-events: all;\n background-repeat: no-repeat;\n background-size: contain;\n top: auto;\n right: auto;\n left: auto;\n bottom: auto;\n}\n.jw-logo .jw-flag-audio-player {\n display: none;\n}\n.jw-logo-top-right {\n top: 0;\n right: 0;\n}\n.jw-logo-top-left {\n top: 0;\n left: 0;\n}\n.jw-logo-bottom-left {\n bottom: 0;\n left: 0;\n}\n.jw-logo-bottom-right {\n bottom: 0;\n right: 0;\n}\n.jw-watermark {\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n bottom: 0;\n text-align: center;\n font-size: 14em;\n color: #eee;\n opacity: 0.33;\n pointer-events: none;\n}\n.jw-icon-tooltip.jw-open .jw-overlay {\n opacity: 1;\n visibility: visible;\n}\n.jw-icon-tooltip.jw-hidden {\n display: none;\n}\n.jw-overlay-horizontal {\n display: none;\n}\n.jw-icon-tooltip.jw-open-drawer:before {\n display: none;\n}\n.jw-icon-tooltip.jw-open-drawer .jw-overlay-horizontal {\n opacity: 1;\n display: inline-block;\n vertical-align: top;\n}\n.jw-overlay:before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -50%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0);\n content: " ";\n}\n.jw-slider-time .jw-overlay:before {\n height: 1em;\n top: auto;\n}\n.jw-time-tip,\n.jw-volume-tip,\n.jw-menu {\n position: relative;\n left: -50%;\n border: solid 1px #000;\n margin: 0;\n}\n.jw-volume-value-tip {\n font-size: 12px;\n position: absolute;\n top: -26px;\n right: 20px;\n background-color: #000;\n line-height: 20px;\n border-radius: 3px;\n padding: 0 3px;\n color: #FFF;\n}\n.jw-volume-tip {\n width: 100%;\n height: 100%;\n display: block;\n}\n.jw-time-tip {\n text-align: center;\n font-family: inherit;\n color: #aaa;\n bottom: 1em;\n border: solid 4px #000;\n}\n.jw-time-tip .jw-text {\n line-height: 1em;\n}\n.jw-controlbar .jw-overlay {\n margin: 0;\n position: absolute;\n bottom: 2em;\n left: 50%;\n opacity: 0;\n visibility: hidden;\n}\n.jw-controlbar .jw-overlay .jw-contents {\n position: relative;\n}\n.jw-controlbar .jw-option {\n position: relative;\n white-space: nowrap;\n cursor: pointer;\n list-style: none;\n height: 1.5em;\n font-family: inherit;\n line-height: 1.5em;\n color: #aaa;\n padding: 0 0.5em;\n font-size: 0.8em;\n}\n.jw-controlbar .jw-option:hover,\n.jw-controlbar .jw-option:before:hover {\n
191color: #eee;\n}\n.jw-controlbar .jw-option:before {\n padding-right: 0.125em;\n}\n.jw-playlist-container ::-webkit-scrollbar-track {\n background-color: #333;\n border-radius: 10px;\n}\n.jw-playlist-container ::-webkit-scrollbar {\n width: 5px;\n border: 10px solid black;\n border-bottom: 0;\n border-top: 0;\n}\n.jw-playlist-container ::-webkit-scrollbar-thumb {\n background-color: white;\n border-radius: 5px;\n}\n.jw-tooltip-title {\n border-bottom: 1px solid #444;\n text-align: left;\n padding-left: 0.7em;\n}\n.jw-playlist {\n max-height: 11em;\n min-height: 4.5em;\n overflow-x: hidden;\n overflow-y: scroll;\n width: calc(100% - 4px);\n}\n.jw-playlist .jw-option {\n height: 3em;\n margin-right: 5px;\n color: white;\n padding-left: 1em;\n font-size: 0.8em;\n}\n.jw-playlist .jw-label,\n.jw-playlist .jw-name {\n display: inline-block;\n line-height: 3em;\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n}\n.jw-playlist .jw-label {\n width: 1em;\n}\n.jw-playlist .jw-name {\n width: 11em;\n}\n.jw-skip {\n cursor: default;\n position: absolute;\n float: right;\n display: inline-block;\n right: 0.75em;\n bottom: 3em;\n}\n.jw-skip.jw-skippable {\n cursor: pointer;\n}\n.jw-skip.jw-hidden {\n visibility: hidden;\n}\n.jw-skip .jw-skip-icon {\n display: none;\n margin-left: -0.75em;\n}\n.jw-skip .jw-skip-icon:before {\n content: "\\E60C";\n}\n.jw-skip .jw-text,\n.jw-skip .jw-skip-icon {\n color: #aaa;\n vertical-align: middle;\n line-height: 1.5em;\n font-size: 0.7em;\n}\n.jw-skip.jw-skippable:hover {\n cursor: pointer;\n}\n.jw-skip.jw-skippable:hover .jw-text,\n.jw-skip.jw-skippable:hover .jw-skip-icon {\n color: #eee;\n}\n.jw-skip.jw-skippable .jw-skip-icon {\n display: inline;\n margin: 0;\n}\n.jwplayer.jw-state-playing.jw-flag-casting .jw-display-icon-container,\n.jwplayer.jw-state-paused.jw-flag-casting .jw-display-icon-container {\n display: table;\n}\n.jwplayer.jw-flag-casting .jw-display-icon-container {\n border-radius: 0;\n border: 1px solid white;\n position: absolute;\n top: auto;\n left: 0.5em;\n right: 0.5em;\n bottom: 50%;\n margin-bottom: -12.5%;\n height: 50%;\n width: 50%;\n padding: 0;\n background-repeat: no-repeat;\n background-position: center;\n}\n.jwplayer.jw-flag-casting .jw-display-icon-container .jw-icon {\n font-size: 3em;\n}\n.jwplayer.jw-flag-casting.jw-state-complete .jw-preview {\n display: none;\n}\n.jw-cast {\n position: absolute;\n width: 100%;\n height: 100%;\n background-repeat: no-repeat;\n background-size: auto;\n background-position: 50% 50%;\n}\n.jw-cast-label {\n position: absolute;\n left: 0.5em;\n right: 0.5em;\n bottom: 75%;\n margin-bottom: 1.5em;\n text-align: center;\n}\n.jw-cast-name {\n color: #cccccc;\n}\n.jw-switch {\n position: relative;\n float: left;\n width: 30px;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n display: inline-block;\n position: absolute;\n right: 10px;\n top: 18px;\n}\n.jw-switch-checkbox {\n display: none;\n}\n.jw-switch-label {\n display: block;\n overflow: hidden;\n cursor: pointer;\n border-radius: 20px;\n}\n.jw-switch-inner {\n display: block;\n width: 200%;\n margin-left: -100%;\n transition: margin 0.3s ease-in 0s;\n}\n.jw-switch-inner::before,\n.jw-switch-inner::after {\n display: block;\n float: right;\n width: 50%;\n height: 15px;\n padding: 0;\n line-height: 15px;\n font-size: 14px;\n color: white;\n font-family: Trebuchet, Arial, sans-serif;\n font-weight: bold;\n box-sizing: border-box;\n}\n.jw-switch-inner::after {\n content: attr(data-on);\n padding-left: 10px;\n background-color: #0D5DEC;\n color: #FFFFFF;\n}\n.jw-switch-inner::before {\n content: attr(data-off);\n padding-right: 10px;\n background-color: #EEEEEE;\n color: #999999;\n text-align: right;\n}\n.jw-switch-switch {\n position: absolute;\n display: block;\n width: 12px;\n height: 12px;\n margin: 2px 1px 2px 1px;\n background: #FFFFFF;\n top: 0;\n bottom: 0;\n right: 14px;\n border: 1px solid #999999;\n border-radius: 20px;\n transition: all 0.3s ease-in 0s;\n}\n.jw-switch-checkbox:checked + .jw-switch-label .jw-switch-inner {\n margin-left: 0;\n}\n.jw-switch-checkbox:checked + .jw-switch-label .jw-switch-switch {\
191n right: 0px;\n}\n.jw-state-idle .jw-preview {\n display: block;\n}\n.jw-state-idle .jw-icon-display:before {\n content: "\\E60E";\n}\n.jw-state-idle .jw-controlbar {\n display: none;\n}\n.jw-state-idle .jw-captions {\n display: none;\n}\n.jw-state-idle .jw-title {\n display: block;\n}\n.jwplayer.jw-state-playing .jw-display-icon-container {\n display: none;\n}\n.jwplayer.jw-state-playing .jw-display-icon-container .jw-icon-display:before {\n content: "\\E60D";\n}\n.jwplayer.jw-state-playing .jw-icon-playback:before {\n content: "\\E60D";\n}\n.jwplayer.jw-state-paused .jw-display-icon-container .jw-icon-display:before {\n content: "\\E60E";\n}\n.jwplayer.jw-state-paused .jw-icon-playback:before {\n content: "\\E60E";\n}\n.jwplayer.jw-state-buffering .jw-display-icon-container .jw-icon-display {\n -webkit-animation: spin 2s linear infinite;\n -moz-animation: spin 2s linear infinite;\n animation: spin 2s linear infinite;\n}\n.jwplayer.jw-state-buffering .jw-display-icon-container .jw-icon-display:before {\n content: "\\E601";\n}\n@-moz-keyframes spin {\n 100% {\n -moz-transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n 100% {\n -webkit-transform: rotate(360deg);\n }\n}\n@keyframes spin {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.jwplayer.jw-state-buffering .jw-display-icon-container .jw-text {\n display: none;\n}\n.jwplayer.jw-state-buffering .jw-icon-playback:before {\n content: "\\E60D";\n}\n.jwplayer.jw-state-buffering .jw-preview {\n display: block;\n}\n.jwplayer.jw-state-complete .jw-preview {\n display: block;\n}\n.jwplayer.jw-state-complete .jw-display-icon-container {\n z-index: 10;\n}\n.jwplayer.jw-state-complete .jw-display-icon-container .jw-icon-display:before {\n content: "\\E610";\n}\n.jwplayer.jw-state-complete .jw-display-icon-container .jw-text {\n display: none;\n}\n.jwplayer.jw-state-complete .jw-icon-playback:before {\n content: "\\E60E";\n}\n.jwplayer.jw-state-complete .jw-captions {\n display: none;\n}\nbody .jw-error .jw-title,\n.jwplayer.jw-state-error .jw-title {\n display: block;\n z-index: 1;\n pointer-events: auto;\n}\nbody .jw-error .jw-title .jw-title-primary,\n.jwplayer.jw-state-error .jw-title .jw-title-primary {\n white-space: normal;\n}\nbody .jw-error .jw-title .jw-title-primary a,\n.jwplayer.jw-state-error .jw-title .jw-title-primary a {\n cursor: pointer;\n color: #699f00;\n pointer-events: auto;\n}\nbody .jw-error .jw-preview,\n.jwplayer.jw-state-error .jw-preview {\n display: block;\n}\nbody .jw-error .jw-controlbar,\n.jwplayer.jw-state-error .jw-controlbar {\n display: none;\n}\nbody .jw-error .jw-captions,\n.jwplayer.jw-state-error .jw-captions {\n display: none;\n}\nbody .jw-error:hover .jw-display-icon-container,\n.jwplayer.jw-state-error:hover .jw-display-icon-container {\n cursor: default;\n color: #fff;\n background: #000;\n}\nbody .jw-error .jw-icon-display,\n.jwplayer.jw-state-error .jw-icon-display {\n cursor: default;\n font-family: \'jw-icons\';\n -webkit-font-smoothing: antialiased;\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n background-color: transparent;\n font-variant: normal;\n /* Enable Ligatures ================ */\n -webkit-font-feature-settings: "liga";\n -moz-font-feature-settings: "liga=1";\n -moz-font-feature-settings: "liga";\n -ms-font-feature-settings: "liga" 1;\n -o-font-feature-settings: "liga";\n font-feature-settings: "liga";\n -moz-osx-font-smoothing: grayscale;\n}\nbody .jw-error .jw-icon-display:before,\n.jwplayer.jw-state-error .jw-icon-display:before {\n content: "\\E607";\n}\nbody .jw-error .jw-icon-display:hover,\n.jwplayer.jw-state-error .jw-icon-display:hover {\n color: #fff;\n}\nbody .jw-error {\n font-size: 16px;\n background-color: #000;\n color: #eee;\n width: 100%;\n height: 100%;\n display: table;\n opacity: 1;\n position: relative;\n}\nbody .jw-error .jw-icon-container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n.jwplayer.jw-flag-cast-available .jw-controlbar {\n display: table;\n}\n.jwplayer.jw-flag-cast-available .jw-icon-cast {\n display: inline-block;\n}\n.jwplayer.jw-flag-skin-loading .jw-captions,\n.jwplayer.jw-flag-skin-loading .jw-controls,\
191n.jwplayer.jw-flag-skin-loading .jw-title {\n display: none;\n}\n.jwplayer.jw-flag-fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n margin: 0;\n position: fixed;\n}\n.jwplayer.jw-flag-live .jw-controlbar {\n border-top: 1px solid #333;\n}\n.jwplayer.jw-flag-live .jw-controlbar .jw-text-split,\n.jwplayer.jw-flag-live .jw-controlbar .jw-text-elapsed,\n.jwplayer.jw-flag-live .jw-controlbar .jw-text-duration,\n.jwplayer.jw-flag-live .jw-controlbar .jw-slider-time,\n.jwplayer.jw-flag-live .jw-controlbar .jw-icon-playrate {\n display: none;\n}\n.jwplayer.jw-flag-live .jw-controlbar .jw-text-alt {\n display: inline;\n}\n.jwplayer.jw-flag-user-inactive.jw-state-playing .jw-controlbar,\n.jwplayer.jw-flag-user-inactive.jw-state-playing .jw-dock {\n display: none;\n}\n.jwplayer.jw-flag-user-inactive.jw-state-playing .jw-logo.jw-hide {\n display: none;\n}\n.jwplayer.jw-flag-user-inactive.jw-state-playing .jw-plugin,\n.jwplayer.jw-flag-user-inactive.jw-state-playing .jw-captions {\n bottom: 0.5em;\n}\n.jwplayer.jw-flag-user-inactive.jw-state-playing .jw-media {\n cursor: none;\n -webkit-cursor-visibility: auto-hide;\n}\n.jwplayer.jw-flag-user-inactive.jw-state-playing video::-webkit-media-text-track-container {\n max-height: none;\n}\n.jwplayer.jw-flag-user-inactive.jw-state-buffering .jw-controlbar {\n display: none;\n}\n.jwplayer.jw-flag-media-audio .jw-controlbar {\n display: table;\n}\n.jwplayer.jw-flag-media-audio.jw-flag-user-inactive .jw-controlbar {\n display: table;\n}\n.jwplayer.jw-flag-media-audio.jw-flag-user-inactive.jw-state-playing .jw-plugin,\n.jwplayer.jw-flag-media-audio.jw-flag-user-inactive.jw-state-playing .jw-captions {\n bottom: 3em;\n}\n.jwplayer.jw-flag-media-audio.jw-flag-user-inactive.jw-state-playing video::-webkit-media-text-track-container {\n max-height: calc(97% - 6.25 * 2em);\n}\n.jw-flag-media-audio .jw-preview {\n display: block;\n}\n.jwplayer.jw-flag-ads .jw-preview,\n.jwplayer.jw-flag-ads .jw-dock,\n.jwplayer.jw-flag-ads .jw-logo,\n.jwplayer.jw-flag-ads .jw-captions.jw-captions-enabled {\n display: none;\n}\n.jwplayer.jw-flag-ads video::-webkit-media-text-track-container {\n display: none;\n}\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-inline,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-tooltip,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-text,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-slider-horizontal {\n display: none;\n}\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-playback,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-volume,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-slider-volume,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-fullscreen {\n display: inline-block;\n}\n.jwplayer.jw-flag-ads .jw-controlbar .jw-text-alt {\n display: inline;\n}\n.jwplayer.jw-flag-ads .jw-controlbar .jw-slider-volume.jw-slider-horizontal,\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-inline.jw-icon-volume {\n display: inline-block;\n}\n.jwplayer.jw-flag-ads .jw-controlbar .jw-icon-tooltip.jw-icon-volume {\n display: none;\n}\n.jwplayer.jw-flag-ads-googleima .jw-controlbar {\n display: table;\n bottom: 0;\n}\n.jwplayer.jw-flag-ads-googleima.jw-flag-touch .jw-controlbar {\n font-size: 1em;\n}\n.jwplayer.jw-flag-ads-googleima.jw-flag-touch.jw-state-paused .jw-display-icon-container {\n display: none;\n}\n.jwplayer.jw-flag-ads-googleima.jw-skin-seven .jw-controlbar {\n font-size: 0.9em;\n}\n.jwplayer.jw-flag-ads-vpaid .jw-controlbar {\n display: none;\n}\n.jwplayer.jw-flag-ads-hide-controls .jw-controls {\n display: none !important;\n}\n.jwplayer.jw-flag-ads.jw-flag-touch .jw-controlbar {\n display: table;\n}\n.jwplayer.jw-flag-overlay-open .jw-title {\n display: none;\n}\n.jwplayer.jw-flag-overlay-open .jw-controls-right .jw-logo {\n display: none;\n}\n.jwplayer.jw-flag-overlay-open-sharing .jw-controls,\n.jwplayer.jw-flag-overlay-open-related .jw-controls,\n.jwplayer.jw-flag-overlay-open-sharing .jw-title,\n.jwplayer.jw-flag-overlay-open-related .jw-title {\n display: none;\n}\n.jwplayer.jw-flag-rightclick-open {\n overflow: visible;\n}\n.jwplayer.jw-flag-rightclick-open .jw-rightclick {\n z-index: 16777215;\n}
191\n.jw-flag-controls-disabled .jw-controls {\n visibility: hidden;\n}\n.jw-flag-controls-disabled .jw-logo {\n visibility: visible;\n}\n.jw-flag-controls-disabled .jw-media {\n cursor: auto;\n}\nbody .jwplayer.jw-flag-flash-blocked .jw-title {\n display: block;\n}\nbody .jwplayer.jw-flag-flash-blocked .jw-controls,\nbody .jwplayer.jw-flag-flash-blocked .jw-overlays,\nbody .jwplayer.jw-flag-flash-blocked .jw-preview {\n display: none;\n}\n.jw-flag-touch .jw-controlbar,\n.jw-flag-touch .jw-skip,\n.jw-flag-touch .jw-plugin {\n font-size: 1.5em;\n}\n.jw-flag-touch .jw-captions {\n bottom: 4.25em;\n}\n.jw-flag-touch video::-webkit-media-text-track-container {\n max-height: 70%;\n}\n.jw-flag-touch .jw-icon-tooltip.jw-open-drawer:before {\n display: inline;\n}\n.jw-flag-touch .jw-icon-tooltip.jw-open-drawer:before {\n content: "\\E615";\n}\n.jw-flag-touch .jw-display-icon-container {\n pointer-events: none;\n}\n.jw-flag-touch.jw-state-paused .jw-display-icon-container {\n display: table;\n}\n.jw-flag-touch.jw-state-paused.jw-flag-dragging .jw-display-icon-container {\n display: none;\n}\n.jw-flag-compact-player .jw-text-elapsed,\n.jw-flag-compact-player .jw-text-duration,\n.jw-flag-compact-player .jw-text-split,\n.jw-flag-compact-player .jw-icon-danmu {\n display: none;\n}\n.jwplayer.jw-flag-audio-player {\n background-color: transparent;\n}\n.jwplayer.jw-flag-audio-player .jw-media {\n visibility: hidden;\n}\n.jwplayer.jw-flag-audio-player .jw-media object {\n width: 1px;\n height: 1px;\n}\n.jwplayer.jw-flag-audio-player .jw-preview,\n.jwplayer.jw-flag-audio-player .jw-display-icon-container {\n display: none;\n}\n.jwplayer.jw-flag-audio-player .jw-controlbar {\n display: table;\n height: auto;\n left: 0;\n bottom: 0;\n margin: 0;\n width: 100%;\n min-width: 100%;\n opacity: 1;\n}\n.jwplayer.jw-flag-audio-player .jw-controlbar .jw-icon-fullscreen,\n.jwplayer.jw-flag-audio-player .jw-controlbar .jw-icon-tooltip {\n display: none;\n}\n.jwplayer.jw-flag-audio-player .jw-controlbar .jw-slider-volume.jw-slider-horizontal,\n.jwplayer.jw-flag-audio-player .jw-controlbar .jw-icon-inline.jw-icon-volume {\n display: inline-block;\n}\n.jwplayer.jw-flag-audio-player .jw-controlbar .jw-icon-tooltip.jw-icon-volume {\n display: none;\n}\n.jwplayer.jw-flag-audio-player.jw-flag-user-inactive .jw-controlbar {\n display: table;\n}\n.jw-ie-poorie.jw-flag-media-audio .jw-preview {\n display: none;\n}\n.jw-ie-poorie .jw-display-icon-container .jw-icon-display {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/display_play.png\');\n width: 56px;\n height: 56px;\n}\n.jw-ie-poorie.jw-state-idle .jw-icon-display,\n.jw-ie-poorie.jw-state-complete .jw-icon-display {\n visibility: visible;\n}\n.jw-ie-poorie.jwplayer.jw-flag-audio-player .jw-media {\n visibility: visible;\n}\n.jw-ie-poorie.jwplayer.jw-flag-audio-player .jw-media object {\n width: 100%;\n height: 100%;\n}\n.background-base {\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie .jw-playlist-container .jw-label .jw-icon-play {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/play_small.png\');\n background-repeat: no-repeat;\n background-position: left;\n}\n.jw-ie-poorie .jw-controlbar {\n /*\n .jw-icon-hd {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/hd.png\');\n .background-base;\n // width: 47px;\n // height: 32px;\n }\n */\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-barlogo {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/baiduLogo.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 15px;\n height: 15px;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-barlogo-new {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/bce.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 13px;\n height: 14px;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-playback {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/play.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 15px;\n height: 15px;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-prev {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/prev.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 26px;\n height: 21px;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-next {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/next.png\');\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-playlist {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/playlist.png\');\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie .jw-controlbar .jw-knob {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/cue.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 10px;\n height: 10px;\n background-color: inherit;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-cc {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/cc.png\');\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-volume {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/volume.png\');\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie .jw-controlbar .jw-icon-fullscreen {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/fullscreen.png\');\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie .jw-controls-right {\n display: none;\n}\n.jw-ie-poorie .jw-display-icon-container {\n text-align: center;\n}\n.jw-ie-poorie.jw-state-playing .jw-icon-playback,\n.jw-ie-poorie.jw-state-buffering .jw-icon-playback {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/pause.png\');\n background-repeat: no-repeat;\n background-position: center;\n}\n.jw-ie-poorie.jw-state-buffering .jw-icon-display {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/loading.gif\');\n background-repeat: no-repeat;\n background-position: center;\n width: 56px;\n height: 56px;\n}\n.jw-ie-poorie.jw-state-error .jw-icon-display {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/error.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 36px;\n height: 32px;\n}\n.jw-ie-poorie.jw-state-complete .jw-icon-display {\n background-image: url(\'http://cyberplayer.bcelive.com/resource/img/replay.png\');\n background-repeat: no-repeat;\n background-position: center;\n width: 28px;\n height: 32px;\n}\n.jw-flashui .jw-controlbar {\n display: none;\n}\n.jw-flashui.jw-state-buffering .jw-display-icon-container {\n display: none;\n}\n.jw-skin-bce {\n outline: none;\n /* Controlbar styles */\n /* Contains icons, time text, and slider */\n /* Playlist container - need second background-color declaration to overwrite the .jw-background-color class */\n /* ul container */\n /* Playlist title */\n /* Colors, padding for icons and text */\n /* Styles for play button on idle */\n /* Rail/slider styles */\n /* Timeline and horizontal volume slider */\n /* Volume slider */\n /* Volume slider container */\n /* Color of video\'s duration time */\n /* Icon borders on the right side of the controlbar */\n /* Icons, text and container styles for the dock, in the upper right corner */\n /* Styles for active list items */\n /* A min-width on the volume icon to keep the width from collapsing on toggle */\n /* For the overlay containers */\n /* Position and padding of slider thumbnail */\n /* Position of remaining overlay containers */\n /* Skip icon and text styles */\n}\n.jw-skin-bce .jw-background-color {\n background: #000;\n}\n.jw-skin-bce .jw-controlbar {\n border: none;\n height: 2.5em;
191\n}\n.jw-skin-bce .jw-group {\n vertical-align: middle;\n}\n.jw-skin-bce .jw-playlist {\n background-color: rgba(0, 0, 0, 0.5);\n}\n.jw-skin-bce .jw-playlist-container {\n left: -43%;\n background-color: rgba(0, 0, 0, 0.5);\n /* li list option */\n /* play icon is always active */\n}\n.jw-skin-bce .jw-playlist-container .jw-option {\n border-bottom: 1px solid #444;\n /* Playlist items are black when active, or hovered */\n /* Number color when li is hovered */\n}\n.jw-skin-bce .jw-playlist-container .jw-option:hover,\n.jw-skin-bce .jw-playlist-container .jw-option.jw-active-option {\n background-color: black;\n}\n.jw-skin-bce .jw-playlist-container .jw-option:hover .jw-label {\n color: #108CEE;\n}\n.jw-skin-bce .jw-playlist-container .jw-icon-playlist {\n margin-left: 0;\n}\n.jw-skin-bce .jw-playlist-container .jw-label .jw-icon-play {\n color: #108CEE;\n}\n.jw-skin-bce .jw-playlist-container .jw-label .jw-icon-play:before {\n padding-left: 0;\n}\n.jw-skin-bce .jw-icon-playlist .jw-overlay {\n z-index: 100;\n bottom: 1.6em;\n}\n.jw-skin-bce .jw-tooltip-title {\n background-color: #000;\n color: #fff;\n}\n.jw-skin-bce .jw-text {\n color: #fff;\n}\n.jw-skin-bce .jw-button-color {\n color: #fff;\n}\n.jw-skin-bce .jw-button-color:hover {\n color: #108CEE;\n}\n.jw-skin-bce .jw-toggle {\n color: #108CEE;\n}\n.jw-skin-bce .jw-toggle.jw-off {\n color: #fff;\n}\n.jw-skin-bce .jw-controlbar .jw-icon:before,\n.jw-skin-bce .jw-text-elapsed,\n.jw-skin-bce .jw-text-duration {\n padding: 0 0.7em;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-barlogo-new:before {\n padding: 0;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-prev:before {\n padding-right: 0.25em;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-playlist:before {\n padding: 0 0.45em;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-next:before {\n padding-left: 0.25em;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-hd:before {\n content: none;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-hd .jw-hd-label {\n color: #000;\n background: #FFF;\n padding: 0 4px;\n border-radius: 2px;\n margin: 0 0.7em;
191\n margin-top: 1px;\n}\n.jw-skin-bce .jw-controlbar .jw-icon-hd .jw-hd-label:hover {\n background: #108CEE;\n}\n.jw-skin-bce .jw-icon-prev,\n.jw-skin-bce .jw-icon-next {\n font-size: 0.7em;\n}\n.jw-skin-bce .jw-icon-prev:before {\n border-left: 1px solid #666;\n}\n.jw-skin-bce .jw-icon-next:before {\n border-right: 1px solid #666;\n}\n.jw-skin-bce .jw-icon-display {\n color: #fff;\n}\n.jw-skin-bce .jw-icon-display:before {\n padding-left: 0;\n}\n.jw-skin-bce .jw-display-icon-container {\n border-radius: 50%;\n border: 1px solid #333;\n}\n.jw-skin-bce .jw-rail {\n background-color: #333;\n box-shadow: none;\n opacity: 0.5;\n}\n.jw-skin-bce .jw-buffer {\n background-color: #666F82;\n opacity: 0.5;\n}\n.jw-skin-bce .jw-progress {\n background: #108CEE;\n opacity: 0.3;\n}\n.jw-skin-bce .jw-knob {\n width: 0.6em;\n height: 0.6em;\n background-color: #fff;\n border-radius: 1em;\n display: none;\n}\n.jw-skin-bce .jw-slider-volume .jw-knob {\n display: inline-block;\n}\n.jw-skin-bce .jw-slider-horizontal .jw-slider-container {\n position: relative;\n height: 0.95em;\n vertical-align: top;\n}\n.jw-skin-bce .jw-slider-horizontal .jw-rail,\n.jw-skin-bce .jw-slider-horizontal .jw-buffer,\n.jw-skin-bce .jw-slider-horizontal .jw-progress {\n height: 0.2em;\n top: 5px;\n border-radius: 0;\n}\n.jw-skin-bce .jw-slider-horizontal .jw-knob {\n top: -0.2em;\n top: 0;\n}\n.jw-skin-bce .jw-slider-horizontal .jw-cue {\n top: 0.2em;\n width: 0.4em;\n height: 0.4em;\n background-color: #fff;\n border-radius: 50%;\n margin-left: -0.325em;\n}\n.jw-skin-bce .jw-slider-vertical .jw-rail,\n.jw-skin-bce .jw-slider-vertical .jw-buffer,\n.jw-skin-bce .jw-slider-vertical .jw-progress {\n width: 0.2em;\n}\n.jw-skin-bce .jw-slider-vertical .jw-knob {\n margin-bottom: -0.3em;\n}\n.jw-skin-bce .jw-volume-tip {\n width: 100%;\n left: -45%;\n padding-bottom: 0.7em;\n}\n.jw-skin-bce .jw-text-duration {\n color: #666F82;\n}\n.jw-skin-bce .jw-controlbar-right-group .jw-icon-inline:first-child:before {\n border: none;\n}\n.jw-skin-bce .jw-dock .jw-dock-button {\n border-radius: 50%;\n border: 1px solid #333;\n}\n.jw-skin-bce .jw-dock .jw-overlay {\n border-radius: 2.5em;\n}\n.jw-skin-bce .jw-icon-tooltip .jw-active-option {\n background-color: #108CEE;\n color: #fff;\n}\n.jw-skin-bce .jw-time-tip,\n.jw-skin-bce .jw-menu,\n.jw-skin-bce .jw-volume-tip,\n.jw-skin-bce .jw-skip {\n border: 1px solid #333;\n}\n.jw-skin-bce .jw-time-tip {\n padding: 0.2em;\n bottom: -18px;\n}\n.jw-skin-bce .jw-menu,\n.jw-skin-bce .jw-volume-tip {\n bottom: 0.24em;\n}\n.jw-skin-bce .jw-skip {\n padding: 0.4em;\n border-radius: 1.75em;\n}\n.jw-skin-bce .jw-skip .jw-text,\n.jw-skin-bce .jw-skip .jw-icon-inline {\n color: #fff;\n line-height: 1.75em;\n}\n.jw-skin-bce .jw-skip.jw-skippable:hover .jw-text,\n.jw-skin-bce .jw-skip.jw-skippable:hover .jw-icon-inline {\n color: #108CEE;\n}\n.jw-skin-bce.jw-flag-touch .jw-controlbar .jw-icon:before,\n.jw-skin-bce.jw-flag-touch .jw-text-elapsed,\n.jw-skin-bce.jw-flag-touch .jw-text-duration {\n padding: 0 0.35em;\n}\n.jw-skin-bce.jw-flag-touch .jw-controlbar .jw-icon-prev:before {\n padding: 0 0.125em 0 0.7em;\n}\n.jw-skin-bce.jw-flag-touch .jw-controlbar .jw-icon-next:before {\n padding: 0 0.7em 0 0.125em;\n}\n.jw-skin-bce.jw-flag-touch .jw-controlbar .jw-icon-playlist:before {\n padding: 0 0.225em;\n}\n.jw-skin-bce .jw-slider-time {\n background: 0 0;\n position: absolute;\n top: -8px;\n height: 8px;\n line-height: 1em;\n}\n.jw-skin-bce .jw-slider-time .jw-slider-container {\n height: 8px;\n vertical-align: top;\n}\n.jw-skin-bce .jw-slider-time:hover .jw-knob {\n display: block;\n}\n.jw-skin-bce .jw-slider-time:hover .jw-slider-container {\n vertical-align: top;\n}\n.jw-skin-bce .jw-slider-time:hover .jw-slider-container .jw-rail,\n.jw-skin-bce .jw-slider-time:hover .jw-slider-container .jw-buffer,\n.jw-skin-bce .jw-slider-time:hover .jw-slider-container .jw-progress {\n height: 0.6em;\n border-radius: 0;\n top: 0;\n}\n.jw-skin-bce .jw-slider-time:hover .jw-cue {\n top: 0;\n width: 0.6em;\n height: 0.6em;\n}\n.jw-skin-bce .jw-controlbar-left-group .jw-text-elapsed {\n padding-right: 0;\n cursor: default;\n}\n.jw-skin-bce .jw-controlbar-left-group .jw-text-split {\n padding: 0 2px;\n cursor: default;\n}\n.jw-skin-bce .jw-controlbar-left-group .jw-text-duration {\n padding-left: 0;\n color: #FFF;\n cursor: default;\n}\n.jw-skin-bce .jw-controlbar-center-group .jw-tooltip-time {\n top: -7px;\n height: 1em;\n transform: translate(-10px);\n}\n.jw-skin-bce .jw-controlbar-center-group .jw-overlay {\n z-index: 100;\n}\n.jw-skin-bce .jw-controlbar-right-group .jw-icon-playrate {\n height: 24px;\n line-height: 24px;\n margin-top: -2px;\n}\n.jw-skin-bce .jw-controlbar-right-group .jw-icon-playrate .jw-playrate-label {\n border: 1px solid #333;\n line-height: 24px;\n height: 24px;\n vertical-align: bottom;\n}\n.jw-skin-bce .jw-media {\n width: 100%;\n height: 100%;\n}\n.jw-skin-bce .jw-icon-danmu {\n position: relative;\n z-index: 11;\n}\n.jw-skin-bce .jw-icon-danmu .jw-overlay {\n background-color: #000c;\n box-shadow: 0 1px 15px #0b122342;\n position: relative;\n position: absolute;\n width: 300px;\n height: 210px;\n z-index: 1;\n left: -250px;\n}\n.jw-skin-bce .jw-icon-danmu .jw-danmu-title {\n padding: 15px 10px 0px 10px;\n display: flex;\n justify-content: space-between;\n}
191\n.jw-skin-bce .jw-icon-danmu .jw-danmu-title div {\n color: #fff;\n font-size: 15px;\n}\n.jw-skin-bce .jw-icon-danmu .jw-background-color {\n background-color: transparent;\n}\n.jw-skin-bce .jw-icon-danmu .jw-progress {\n background-color: #0d5de7;\n opacity: 1;\n}\n.jw-skin-bce .jw-icon-danmu .jw-knob {\n display: inline-block;\n position: absolute;\n top: 2px;\n}\n.jw-skin-bce .jw-icon-danmu .jw-overlay:before {\n right: 0px !important;\n}\n.jw-skin-bce .jw-icon-danmu .jw-danmu-container {\n height: 35px;\n line-height: 35px;\n padding: 10px;\n position: relative;\n}\n.jw-skin-bce .jw-icon-danmu .jw-danmu-container .jw-slider-horizontal {\n width: 170px;\n}\n.jw-skin-bce .jw-icon-danmu .jw-danmu-container .jw-danmu-slider-left {\n margin-right: 8px;\n}\n.jw-skin-bce .jw-icon-danmu .jw-danmu-container .jw-danmu-slider-left,\n.jw-skin-bce .jw-icon-danmu .jw-danmu-container .jw-danmu-slider-right {\n color: #fff;\n display: inline-block;\n font-size: 13px;\n}\n.jw-skin-bce .jw-icon-danmu .jw-danmu-container .jw-danmu-slider-right {\n position: absolute;\n right: 10px;\n}\n',""])},function(e,t){e.exports=function(){var s=[];return s.toString=function(){for(var e=[],t=0;t<this.length;t++){var i=this[t];i[2]?e.push("@media "+i[2]+"{"+i[1]+"}"):e.push(i[1])}return e.join("")},s.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},n=0;n<this.length;n++){var r=this[n][0];"number"==typeof r&&(i[r]=!0)}for(n=0;n<e.length;n++){var a=e[n];"number"==typeof a[0]&&i[a[0]]||(t&&!a[2]?a[2]=t:t&&(a[2]="("+a[2]+") and ("+t+")"),s.push(a))}},s}},function(e,t){e.exports="data:application/font-woff;base64,d09GRgABAAAAAB5IAAoAAAAAHgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgVrNcv2NtYXAAAAFUAAABSgAAAUrMDRv3Z2x5ZgAAAqAAABd8AAAXfP5v0edoZWFkAAAaHAAAADYAAAA2JgRwFWhoZWEAABpUAAAAJAAAACQJpwRuaG10eAAAGngAAAB4AAAAeIq1Cahsb2NhAAAa8AAAAD4AAAA+WVhUNG1heHAAABswAAAAIAAAACAAKQFxbmFtZQAAG1AAAAGtAAABrRlSpcxwb3N0AAAdAAAAAUYAAAFGFaS+XQAEBJ8BkAAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAIOYcAyz/LABcAywA1AAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABEAAMAAQAAABwABAAoAAAABgAEAAEAAgAg5hz//wAAACDmAP///+AaAQABAAAAAAAAAAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAABABgAAAFoAOAADoAPwBEAEkAACUVIi4CNTQ2Ny4BNTQ+AjMyHgIVFAYHHgEVFA4CIxEyFhc+ATU0LgIjIg4CFRQWFz4BMxExARUhNSEXFSE1IRcVITUhAUAuUj0jCgoKCkZ6o11do3pGCgoKCiM9Ui4qSh4BAjpmiE1NiGY6AQIeSioCVQIL/fWWAXX+i0oBK/7VHh4jPVIuGS4VH0MiXaN6RkZ6o10iQx8VLhkuUj0jAcAdGQ0bDk2IZjo6ZohNDhsNGR3+XgNilZXglZXglZUAAAABADz/uAO8AzgAIQAAExQeAjMyPgI1MxQOAiMiLgI1ND4CMxUiDgIVMYc6ZohNTYhmOktGeqNdXaN6RkZ6o11NiGY6AXhNiGY6OmaITV2jekZGeqNdXaN6Rks6ZohNAAAEAAD/vgTAAvwADgAcACoAMQAABS4BJyERIREuAScRIREhJyMuAyc1HgMXMScjLgMnNR4DFzErATUeARcxAn8DBQQCDPxGCysLBDz9v5NaCERrjE9irINTCLVbByc6Sio9a1I1CHaBL0YMQgsoCgLB/ukDCgIBSPzCAk6HaEIIWAhQgKdgDClIOSYHWAc0UWc8fQtELgAAAAUAQAAABMADgAAOABkAJwA1ADwAACUuASchESERLgEnESERIQE1IREhLgMnMQEjLgMnNR4DFzErAS4DJzUeAxcxKwE1HgEXMQKAAgYFAg38QAwqCgRA/cD+gANA/iAYRVlsPgEtWghFa4xPYq2DUgmzWgcnO0oqPGpSNgm6gDBEDEAMKAwCwP7tAggDAUb8wAHQ8P3APWdUQRf98E2IaEIHWghQgKhgKUg4JgdaCDVRZzt9DEMuAAAEAEAAAAXAA4AABAAJAGcAxQAANxEhESEBIREhEQU+ATc+ATMyFhceARceARceARcjLgEnLgEnLgEnLgEjIgYHDgEHDgEHDgEVFBYXHgEXHgEXHgEzMjY3PgE3Mw4BBw4BBw4BBw4BIyImJy4BJy4BJy4BNTQ2Nz4BNzEhPgE3PgEzMhYXHgEXHgEXHgEXIy4BJy4BJy4BJy4BIyIGBw4BBw4BBw4BFRQWFx4BFx4BFx4BMzI2Nz4BNzMOAQcOAQcOAQcOASMiJicuAScuAScuATU0Njc+ATcxQAWA+oAFNvsUBOz8Iw4hExQsGBIhEA8cDQwUCAgLAlsBBQUECgYHDggIEAkQGgsLEgcHCgMDAwMDAwoHBxILCxoQFiEMDA8DWgIJBwgTDQwcERAkFBgsFBMh
191Dg0VBwcHBwcHFQ0Bug0hFBMsGREhEBAcDAwVCAgKAloCBQQECwYGDggIEQgQGwsLEgcHCgMDAwMDAwoHBxILCxsQFSIMDA4DWwIJCAcUDAwdEBEkExksExQhDQ4UBwcICAcHFA4AA4D8gAM1/RYC6tcQGAgJCQUFBQ8KChgPDiETCQ4HBwwFBQgDAwIGBgYRCgoYDQ0cDg0aDQ0XCgoRBgYGDQ0OIhYUJBEQHAsLEgYGBgkICRcPDyQUFCwXGC0VFCQPEBgICQkFBQUPCgoYDw4hEwkOBwcMBQUIAwMCBgYGEQoKGA0NHA4NGg0NFwoKEQYGBg0NDiIWFCQREBwLCxIGBgYJCAkXDw8kFBQsFxgtFRQkDwAAAAADAEAAAAXAA4AAEABvAM4AACUhIiY1ETQ2MyEyFhURFAYjAT4BNz4BNz4BMzIWFx4BFx4BFx4BFzMuAScuAScuAScuASMiBgcOAQcOAQcOARUUFhceARceARceATMyNjc+ATc+ATc+ATcjDgEHDgEjIiYnLgEnLgEnLgE1NDY3OQEhPgE3PgE3PgEzMhYXHgEXHgEXHgEXMy4BJy4BJy4BJy4BIyIGBw4BBw4BBw4BFRQWFx4BFx4BFx4BMzI2Nz4BNz4BNz4BNyMOAQcOASMiJicuAScuAScuATU0Njc5AQUs+6g9V1c9BFg9V1c9/JoDCgcGEgsLGxAJEAgIDgYHCgQEBgFaAgoICBQNDBwQDyESGCwUEyEODRUHBwcHBwcVDQ4hExQrGRQkEBAdDAwUCAcJAloDDwwMIhUQGwsLEgYHCgMEAwMEAbkDCgcHEgsLGxAIEQgHDwYGCwQEBQFbAgoICBUMDBwQECERGSwTFCENDhQHBwgIBwcUDg0hFBMsGRMkERAdDAwUBwgJAlsDDgwNIRUQGwsLEgcHCgMDAwMDAFc+AlY+V1c+/ao+VwH0DRgKCxAGBgYCAwMIBQUMBwcOCRMhDg8YCgoOBgUFCQkIGBAPJBQVLRgXLBQUJA8PFwkICQYGBhILCxwQESQUFiIODQ0GBgYRCgoXDQ0aDg4bDQ0YCgsQBgYGAgMDCAUFDAcHDgkTIQ4PGAoKDgYFBQkJCBgQDyQUFS0YFywUFCQPDxcJCAkGBgYSCwscEBEkFBYiDg0NBgYGEQoKFw0NGg4OGw0AAAABAOAAoAMgAuAAFAAAARQOAiMiLgI1ND4CMzIeAhUDIC1OaTw8aU4tLU5pPDxpTi0BwDxpTi0tTmk8PGlOLS1OaTwAAAMAQAAQBEADkAADABAAHwAANwkBISUyNjU0JiMiBhUUFjMTNCYjIgYVERQWMzI2NRFAAgACAPwAAgAOFRUODhUVDiMVDg4VFQ4OFRADgPyAcBYQDxgWERAWAeYPGBYR/tcPGBYRASkAAgBAAAADwAOAAAcADwAANxEXNxcHFyEBIREnByc3J0CAsI2wgP5zAfMBjYCwjbCAAAGNgLCNsIADgP5zgLCNsIAAAAAFAEAAAAXAA4AABAAJABYAMwBPAAA3ESERIQEhESERATM1MxEjNSMVIxEzFSUeARceARceARUUBgcOAQcOAQcOASsBETMeARcxBxEzMjY3PgE3PgE3PgE1NCYnLgEnLgEnLgErAUAFgPqABTb7FATs/FS2YGC2ZGQCXBQeDg8UBwcJBgcHEwwMIRMTLBuwsBYqE6BHCRcJChIIBw0FBQUEAwINBwcTDAwgETcAA4D8gAM2/RcC6f7Arf5AwMABwK2dBxQODyIWFTAbGC4TFiIPDhgKCQcBwAIHB0P+5gQDAg0HBxcMDCETER0PDhgKCQ8EBQUABAA9AAAFwAOAABAAHQA7AFkAACUhIiY1ETQ2MyEyFhURFAYjASMVIzUjETM1MxUzEQUuAScuAScuASsBETMyNjc+ATc+ATc+ATUuASc5AQcOAQcOASsBETMyFhceARceARceARUUBgcOAQc5AQUq+6k+WFg+BFc+WFg+/bNgs2Rks2ABsAcXDA4fExMnFrCwGywTEx4PDBMHBwYCCAl3CBIKCRQMRzcTHgwMEwcHCwQDBAUFBQ0HAFg+AlQ+WFg+/aw+WAKdra3+QMDAAcB9FiIODxQHBwb+QAkHCRgPDiUTFiwYHTAW4ggNAgMEAR8EBQUPCgoYDw4fERMfDwwXBwAAAAABAEP//wOgA34AjwAAExQiNScwJic0JicuAQcOARUcARUeARceATc+ATc+ATE2MhUwFAcUFhceARceATMyNjc+ATc+ATc+AzE2MhUwDgIVFBYXHgEXFjY3PgE3PgE3PgE3PgM3PAE1NCYnJgYHDgMxBiI1MDwCNTQmJyYGBw4BBw4DMQYiNTAmJy4BJyYGBw4BMRWQBgQIBAgCBQ4KBwkDFgcHIQ8QDwcHNgUEAwMHBQsJChcMBQ0FBwsHDBMICR8cFQUFAwQDCAUHFRERJBEMEwgJEgUOGQwGMjgvBAkHDBYEAz1IPAQFLyQRIhEQFgoGIiUcBQUEAgMYKCcmCgcsAboFBQwYDwUKBwUEAgMNBwcLBxRrDhENBwggDxOTCgqdMBM1EQwTCAcFBAIFCgcPIw4UQ0IxCgpTc3glEyMREBgIBwEKBxUKESUQJ00mE6/JrA8FBgIHDQMECAkGla2PCQk1VGYxNTsHAgUKChwQC2BqVQoKehYfTwUDRx8TkAMAAAAAAgBGAAAENgOAAAQACAAAJREzESMJAhEDxnBw/IADgPyAAAOA/IADgP5A/kADgAAAAgCAAAADgAOAAAQACQAAJREhESEBIREhEQKAAQD/AP4AAQD/AAADgPyAA4D8gAOAAAAAAAEAgP+kBAADJAADAAAJAREBBAD8gAOAAWT+QAOA/kAAAgBKAAAEOgOAAAQACAAANxEjETMJAhG6cHADgPyAA4AAA4D8gAOA/kD+QAOAAAAAAQB/AAADfwOAACkAAAEeARUUDgIjIi4CNTQ+AjM1DQE1Ig4CFRQeAjMyPgI1NCYnNwNJGhw8aYxPT4xoPT1ojE8BQP7APGlOLS1OaTw8aU4tFhNTAkMrYzVPjGg9PWiMT0+MaD2ArbOALU5pPDxpTi0tTmk8KUsfMAAAAAEBNABeAxQDCwAGAAABETMlESUjATTNARP+7c0BKwETzf1TzQAAAAAEAEAAAASQA4AAFwArADoAQQAAJSc+AzU0LgInNx4DFRQOAgcxLwE+ATU0Jic3HgMVDgMHMSc+ATU0Jic3HgEVFAYHJwURMyURJSMD2iomPisXFys+JioqQzAZGTBDKqQpOUREOSkhNCQUARQkMyHDIigoIiomMDAmKv3NzQET/u3NACMoXmlyPDxxaV4pIytmcnxBQXxyZiuDIzWRVFSRNSMeSFBYLy9ZUUcdsxZIKStGFSMcXDQ1WR8pAwETzf1TzQAAAgBAAAADwwOAAAcADwAAARchERc3FwcBByc3JyERJwMqcP6pcJd5mf4mlnqWcAFXbQJzcAFXcJZ6k/4jlnqWcP6qbAADAEABEwXAAmAADAAZACYAAAEUBiMiJjU0NjMyFhUhFAYjIiY1NDYzMhYVIRQGIyImNTQ2MzIWFQGNYkVFYWFFRWICFmFFRWJiRUVhAh1hRUViYkVFYQG6RWJiRUVhYUVFYmJFRWFhRUViYkVFYWFFAAAAAAEAQgACA74DfgAgAAABFxYUBwYiLwEHBiInJjQ/AScmNDc2Mh8BNzYyFxYUDwECo/ckJCRjHfb2JGMdJCT39yQkJGMd9vYkYx0kJPcBwPYkYx0kJPf3JCQkYx329iRjHSQk9/ckJCRjHfYAAAYARAAEA7wDfAAEAAkADgATABgAHQAAASEVITURIRUhNREhFSE1ATMVIzURMxUjNREzFSM1AacCFf3rAhX96wIV/ev+nbKysrKysgN8WVn+nVlZ/p1ZWQLGsrL+nbKy/p2ysgAIAIL/+gNeAysAKQBQAH8ArwEqATwBWQFwAAAADgEiDgQUHgg+Ci4JIiYTPgE3PgE3PgE3PgE3PgEnLgI0NS4BBw4BBw4BBwYUFRQWFx4BFwUmFicuAScmBicuASMmBgciJgcOAQcUFg4BBw4BBw4CFA4BBwYWFx4BFzc+ATchLgI0NS4BJyoBJwY2Bw4BBw4CFAcOARceARceARczPgE3PgE3NjQ+AjQ+ATckBiIGIg4HFA4VFAYUHgoyPgUyHgMyHgIyPg80Lg0iLhUiJgMOAQcGFgcOARUGMhceARc3JxcHIy4BJy4BLwE+ATc+Azc+ATc+ATM+AT8BMxceARczPwEfAQcjJhYnJiIjLgEnNTczAY4GCQYYDQwHAgQDAhMPBwcFGwUNEwQFEwEEAgQCAgQCBQUCBQIIGAcI4hADAQYKBQcBBQEDAQ0NAgEDAgs5HwQbGwUKBAESEwQOBv7iCgoHBx0OCQMIAwUCCQcKAQQCCxYFAQIEAQICAQIDAQIDAQIPEAkSCjEUIQ0CJQYDAgYgDgMIHC0XCg4GCQEDAQEKAQEEAQUIERs2BwwHBQwCAQEEAQIDBv6DDwgLBQUGBQUJBgYODAUHJgkMCQgHBQYRCQQGBRAIBQEHBQUFAgMCBgoZDAMMFVYKBx0JFgw+DgoVCAkFGglCEgcPBQkMBQkEBQUIBQUBBQUBBQIGBBAJBQYKCgkFAw8nBQoGCAUFCQQFBwwGBAMNBAYFCAYJDJwHCgUHAgIBBAMDBAMJDjcBUAKHCxgJBAsIAQILEQMEBQgDAQECAwYDEiQSBDpUAwIHNwEDOwECkAkKCwIEAQ4KBwM6AysBBhIQGRgYGB8ICiIPBQIFAgIBDAUDHgYFEAYwHQYODQYFBAcJEgX+/gYDAQMIAwYFCQEBAhM3GAIFBgUCHS8JAhQgCxcMCxULG
191CkPAwUCFQ4OFBEgCwcDAQEDAgQDAQEEFQsBAgMEAgUKBQMEBgcHCAQaNhUJCwcCCRsvGwIDBQIPIAUFBwMGBwoMAQEEBQIdLSUIEQgLEQoEBAQDDgQCAwQBAwUEBCE+BQUGAQUBBwUKDgQSBA0sBg8FBgsBBQ4KAgYIDxEFBwkRCQ4bDxAICg4RGwUFBAkBBAEFAgUBBgEFAQcEAgMCBQEMAQgGBwQUDgcPDDAKDQYIDQUVBQYHBQ0FBw8pCQgHDgYEEAYDDwkHAwcGBQIFAQQE/vYDAwUIAwoDBQQNBw4PBgFikwIGCgsFERY2CRoQAwYFAgICAwEBAQEDAUfXBwEFkwMCxAICAgYBCQ8MmgMAAwCyAH4DTgNrAA0AGwAsAAABNTQvAREUFwU1NC8BJgUHBh0BJTY1EQcGHQEUAycmBwUXFj8BNjc2HwEWPwEBOydhDAEqJnwMAX58JgEqDGEnNn0MDP7UYScmfgIDCgl9JyZiAYuNLBY3/q0OB6pvLBZHBwdHFixvqgcOAVM3FiyNDQGfRwcHqzgWFkgBAQMFSBYWOAAAAAAEAED/lATiA7gABwAMABQAGQAAFyYnNjcWFwYlFjc2AQMmJzY3FhcGAQAXFjfyow8Po6MPD/7ffn48AsE9og8PoqMPD/vkAr49fn44D6SiDw+ipCVoaDsDgfwQD6SiDw+ipAPh/H46aGgAAAAKAA3/NAYcAyQAKgAuADIANgA6AD4AQgBRAGEAeAAABTIWFw4BIyEuAScRPgE3IRYXFhcVBgcGByYnJj0BJicmJyEGBwYHER4BFwEzNSMXITUhATM1IxchNSETITUhBzM1IyUWFxYXDgEHJicmJzY3NhM2NzY3JicmJwYHBgcWFxYTFhUUDwEGIyIvASY1NDc2MzIfATc2MgNiEhUBARUS/WJLaQMDaUsDuks0NQIBCgsREgoKAh8fKfxGKx4fAQE9KwEbTU2bATb+yv58TU2cATX+y5oBNv7Kmk1NA2h6U1IDA6V6e1JTAwNTUntZPT0CAj09WVo9PAMDPD38DAyiDQ8PC24LCw0PDwxRiA0eMRURExUDaUsCNktpAgI1NEsyEgsKAQEKCxIyKh8eAgIeHyr9yis8AgIfTk5O/vBNTU3+8U1NTcIDUlN6e6UDA1NSe3pTUv4LAz08Wlo8PQICPTxaWjw9ASwMEA8LpAsLbgsPDw0LC1KIDAAAAAoADf80BhwDJAAqAC4AMgA2ADoAPgBCAFEAXgBrAAAFMhYXDgEjIS4BJxE+ATchFhcWFxUGBwYHJicmPQEmJyYnIQYHBgcRHgEXATM1IxchNSEBMzUjFyE1IREzNSMXITUhJRYXFhcOAQcmJyYnNjc2EzI3NjcBBgcGFRYXFjc2NzY1JicmJyIHBgcDYhIVAQEVEv1iS2kDA2lLA7pLNDUCAQoLERIKCgIfHyn8RiseHwEBPSsBG01NmwE2/sr+fE1NnAE1/stNTZoBNv7KAs56U1IDA6V6e1JTAwNTUnsdGhoX/t0MBwgDPD38GA4NAj09WSciIh0xFRETFQNpSwI2S2kCAjU0SzISCwoBAQoLEjIqHx4CAh4fKv3KKzwCAh9OTk7+8E1NTf7xTU1NwgNSU3p7pQMDU1J7elNS/gsIBw0BIxgaGh1aPD1LGyMjJ1o8PQINDhgAAgAV/zQEdgMkABUAKQAAASEiBwYHERYXFjMhNSERIREzESYnJgMhIgcGFREUFxYzITI3NjcRJicmBD38EBcQEAEBEBAXAYn+sAN/cQEQEBj+QRgREBARGAG/GBAQAQEQEAMkEBEX/IAXERBwAxD+sAGIFxEQ/dAQEBj+sBcREBARFwFQGBAQAAEAAAABAADdhMtGXw889QALBAAAAAAA4GSWFgAAAADgZJYWAAD/NAYcA7gAAAAIAAIAAAAAAAAAAQAAAyz/LABcBiwAAP73BhwAAQAAAAAAAAAAAAAAAAAAAB4CAAAABgAAYAQAADwFAAAABQAAQAYAAEAGAABABAAA4ASAAEAEAABABgAAQAYAAD0D4ABDBIAARgQAAIAEAACABIAASgOAAH8EwAE0BMAAQAQAAEAGAABABAAAQgQAAEQCVQCCBAAAsgUiAEAGLAANBiwADQSGABUAAAAKAHQApADwAUwCcgOeA8AD9AQWBJAFEgXUBewGBgYWBi4GbAaABuIHBAc+B3QHpgmOCdoKEArOC3oLvgAAAAEAAAAeAXEACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAJYAAQAAAAAAAQAKAAAAAQAAAAAAAgAGAAoAAQAAAAAAAwAbABAAAQAAAAAABAAKACsAAQAAAAAABQAeADUAAQAAAAAABgAKAFMAAwABBAkAAQAUAF0AAwABBAkAAgAMAHEAAwABBAkAAwA2AH0AAwABBAkABAAUALMAAwABBAkABQA8AMcAAwABBAkABgAUAQNmb250ZWRpdG9yTWVkaXVtRm9udEVkaXRvciAxLjAgOiBmb250ZWRpdG9yZm9udGVkaXRvclZlcnNpb24gMS4wOyBGb250RWRpdG9yICh2MS4wKWZvbnRlZGl0b3IAZgBvAG4AdABlAGQAaQB0AG8AcgBNAGUAZABpAHUAbQBGAG8AbgB0AEUAZABpAHQAbwByACAAMQAuADAAIAA6ACAAZgBvAG4AdABlAGQAaQB0AG8AcgBmAG8AbgB0AGUAZABpAHQAbwByAFYAZQByAHMAaQBvAG4AIAAxAC4AMAA7ACAARgBvAG4AdABFAGQAaQB0AG8AcgAgACgAdgAxAC4AMAApAGYAbwBuAHQAZQBkAGkAdABvAHIAAAAAAgAAAAAAAAAyAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgAeAAABAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeB3VuaUU2MDAHdW5pRTYwMQd1bmlFNjAyB3VuaUU2MDMHdW5pRTYwNAd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQd1bmlFNjBCB3VuaUU2MEMHdW5pRTYwRAd1bmlFNjBFB3VuaUU2MEYHdW5pRTYxMAd1bmlFNjExB3VuaUU2MTIHdW5pRTYxMwd1bmlFNjE0B3VuaUU2MTUHdW5pRTYxNgd1bmlFNjE3B3VuaUU2MTgHdW5pRTYxOQd1bmlFNjFBB3VuaUU2MUIHdW5pRTYxQwAA"},function(e,t){e.exports="data:application/octet-stream;base64,AAEAAAAKAIAAAwAgT1MvMlazXL8AAACsAAAAYGNtYXDMDRv3AAABDAAAAUpnbHlm/m/R5wAAAlgAABd8aGVhZCYEcBUAABnUAAAANmhoZWEJpwRuAAAaDAAAACRobXR4irUJqAAAGjAAAAB4bG9jYVlYVDQAABqoAAAAPm1heHAAKQFxAAAa6AAAACBuYW1lGVKlzAAAGwgAAAGtcG9zdBWkvl0AABy4AAABRgAEBJ8BkAAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAIOYcAyz/LABcAywA1AAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABEAAMAAQAAABwABAAoAAAABgAEAAEAAgAg5hz//wAAACDmAP///+AaAQABAAAAAAAAAAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAABABgAAAFoAOAADoAPwBEAEkAACUVIi4CNTQ2Ny4BNTQ+A
191jMyHgIVFAYHHgEVFA4CIxEyFhc+ATU0LgIjIg4CFRQWFz4BMxExARUhNSEXFSE1IRcVITUhAUAuUj0jCgoKCkZ6o11do3pGCgoKCiM9Ui4qSh4BAjpmiE1NiGY6AQIeSioCVQIL/fWWAXX+i0oBK/7VHh4jPVIuGS4VH0MiXaN6RkZ6o10iQx8VLhkuUj0jAcAdGQ0bDk2IZjo6ZohNDhsNGR3+XgNilZXglZXglZUAAAABADz/uAO8AzgAIQAAExQeAjMyPgI1MxQOAiMiLgI1ND4CMxUiDgIVMYc6ZohNTYhmOktGeqNdXaN6RkZ6o11NiGY6AXhNiGY6OmaITV2jekZGeqNdXaN6Rks6ZohNAAAEAAD/vgTAAvwADgAcACoAMQAABS4BJyERIREuAScRIREhJyMuAyc1HgMXMScjLgMnNR4DFzErATUeARcxAn8DBQQCDPxGCysLBDz9v5NaCERrjE9irINTCLVbByc6Sio9a1I1CHaBL0YMQgsoCgLB/ukDCgIBSPzCAk6HaEIIWAhQgKdgDClIOSYHWAc0UWc8fQtELgAAAAUAQAAABMADgAAOABkAJwA1ADwAACUuASchESERLgEnESERIQE1IREhLgMnMQEjLgMnNR4DFzErAS4DJzUeAxcxKwE1HgEXMQKAAgYFAg38QAwqCgRA/cD+gANA/iAYRVlsPgEtWghFa4xPYq2DUgmzWgcnO0oqPGpSNgm6gDBEDEAMKAwCwP7tAggDAUb8wAHQ8P3APWdUQRf98E2IaEIHWghQgKhgKUg4JgdaCDVRZzt9DEMuAAAEAEAAAAXAA4AABAAJAGcAxQAANxEhESEBIREhEQU+ATc+ATMyFhceARceARceARcjLgEnLgEnLgEnLgEjIgYHDgEHDgEHDgEVFBYXHgEXHgEXHgEzMjY3PgE3Mw4BBw4BBw4BBw4BIyImJy4BJy4BJy4BNTQ2Nz4BNzEhPgE3PgEzMhYXHgEXHgEXHgEXIy4BJy4BJy4BJy4BIyIGBw4BBw4BBw4BFRQWFx4BFx4BFx4BMzI2Nz4BNzMOAQcOAQcOAQcOASMiJicuAScuAScuATU0Njc+ATcxQAWA+oAFNvsUBOz8Iw4hExQsGBIhEA8cDQwUCAgLAlsBBQUECgYHDggIEAkQGgsLEgcHCgMDAwMDAwoHBxILCxoQFiEMDA8DWgIJBwgTDQwcERAkFBgsFBMh
191Dg0VBwcHBwcHFQ0Bug0hFBMsGREhEBAcDAwVCAgKAloCBQQECwYGDggIEQgQGwsLEgcHCgMDAwMDAwoHBxILCxsQFSIMDA4DWwIJCAcUDAwdEBEkExksExQhDQ4UBwcICAcHFA4AA4D8gAM1/RYC6tcQGAgJCQUFBQ8KChgPDiETCQ4HBwwFBQgDAwIGBgYRCgoYDQ0cDg0aDQ0XCgoRBgYGDQ0OIhYUJBEQHAsLEgYGBgkICRcPDyQUFCwXGC0VFCQPEBgICQkFBQUPCgoYDw4hEwkOBwcMBQUIAwMCBgYGEQoKGA0NHA4NGg0NFwoKEQYGBg0NDiIWFCQREBwLCxIGBgYJCAkXDw8kFBQsFxgtFRQkDwAAAAADAEAAAAXAA4AAEABvAM4AACUhIiY1ETQ2MyEyFhURFAYjAT4BNz4BNz4BMzIWFx4BFx4BFx4BFzMuAScuAScuAScuASMiBgcOAQcOAQcOARUUFhceARceARceATMyNjc+ATc+ATc+ATcjDgEHDgEjIiYnLgEnLgEnLgE1NDY3OQEhPgE3PgE3PgEzMhYXHgEXHgEXHgEXMy4BJy4BJy4BJy4BIyIGBw4BBw4BBw4BFRQWFx4BFx4BFx4BMzI2Nz4BNz4BNz4BNyMOAQcOASMiJicuAScuAScuATU0Njc5AQUs+6g9V1c9BFg9V1c9/JoDCgcGEgsLGxAJEAgIDgYHCgQEBgFaAgoICBQNDBwQDyESGCwUEyEODRUHBwcHBwcVDQ4hExQrGRQkEBAdDAwUCAcJAloDDwwMIhUQGwsLEgYHCgMEAwMEAbkDCgcHEgsLGxAIEQgHDwYGCwQEBQFbAgoICBUMDBwQECERGSwTFCENDhQHBwgIBwcUDg0hFBMsGRMkERAdDAwUBwgJAlsDDgwNIRUQGwsLEgcHCgMDAwMDAFc+AlY+V1c+/ao+VwH0DRgKCxAGBgYCAwMIBQUMBwcOCRMhDg8YCgoOBgUFCQkIGBAPJBQVLRgXLBQUJA8PFwkICQYGBhILCxwQESQUFiIODQ0GBgYRCgoXDQ0aDg4bDQ0YCgsQBgYGAgMDCAUFDAcHDgkTIQ4PGAoKDgYFBQkJCBgQDyQUFS0YFywUFCQPDxcJCAkGBgYSCwscEBEkFBYiDg0NBgYGEQoKFw0NGg4OGw0AAAABAOAAoAMgAuAAFAAAARQOAiMiLgI1ND4CMzIeAhUDIC1OaTw8aU4tLU5pPDxpTi0BwDxpTi0tTmk8PGlOLS1OaTwAAAMAQAAQBEADkAADABAAHwAANwkBISUyNjU0JiMiBhUUFjMTNCYjIgYVERQWMzI2NRFAAgACAPwAAgAOFRUODhUVDiMVDg4VFQ4OFRADgPyAcBYQDxgWERAWAeYPGBYR/tcPGBYRASkAAgBAAAADwAOAAAcADwAANxEXNxcHFyEBIREnByc3J0CAsI2wgP5zAfMBjYCwjbCAAAGNgLCNsIADgP5zgLCNsIAAAAAFAEAAAAXAA4AABAAJABYAMwBPAAA3ESERIQEhESERATM1MxEjNSMVIxEzFSUeARceARceARUUBgcOAQcOAQcOASsBETMeARcxBxEzMjY3PgE3PgE3PgE1NCYnLgEnLgEnLgErAUAFgPqABTb7FATs/FS2YGC2ZGQCXBQeDg8UBwcJBgcHEwwMIRMTLBuwsBYqE6BHCRcJChIIBw0FBQUEAwINBwcTDAwgETcAA4D8gAM2/RcC6f7Arf5AwMABwK2dBxQODyIWFTAbGC4TFiIPDhgKCQcBwAIHB0P+5gQDAg0HBxcMDCETER0PDhgKCQ8EBQUABAA9AAAFwAOAABAAHQA7AFkAACUhIiY1ETQ2MyEyFhURFAYjASMVIzUjETM1MxUzEQUuAScuAScuASsBETMyNjc+ATc+ATc+ATUuASc5AQcOAQcOASsBETMyFhceARceARceARUUBgcOAQc5AQUq+6k+WFg+BFc+WFg+/bNgs2Rks2ABsAcXDA4fExMnFrCwGywTEx4PDBMHBwYCCAl3CBIKCRQMRzcTHgwMEwcHCwQDBAUFBQ0HAFg+AlQ+WFg+/aw+WAKdra3+QMDAAcB9FiIODxQHBwb+QAkHCRgPDiUTFiwYHTAW4ggNAgMEAR8EBQUPCgoYDw4fERMfDwwXBwAAAAABAEP//wOgA34AjwAAExQiNScwJic0JicuAQcOARUcARUeARceATc+ATc+ATE2MhUwFAcUFhceARceATMyNjc+ATc+ATc+AzE2MhUwDgIVFBYXHgEXFjY3PgE3PgE3PgE3PgM3PAE1NCYnJgYHDgMxBiI1MDwCNTQmJyYGBw4BBw4DMQYiNTAmJy4BJyYGBw4BMRWQBgQIBAgCBQ4KBwkDFgcHIQ8QDwcHNgUEAwMHBQsJChcMBQ0FBwsHDBMICR8cFQUFAwQDCAUHFRERJBEMEwgJEgUOGQwGMjgvBAkHDBYEAz1IPAQFLyQRIhEQFgoGIiUcBQUEAgMYKCcmCgcsAboFBQwYDwUKBwUEAgMNBwcLBxRrDhENBwggDxOTCgqdMBM1EQwTCAcFBAIFCgcPIw4UQ0IxCgpTc3glEyMREBgIBwEKBxUKESUQJ00mE6/JrA8FBgIHDQMECAkGla2PCQk1VGYxNTsHAgUKChwQC2BqVQoKehYfTwUDRx8TkAMAAAAAAgBGAAAENgOAAAQACAAAJREzESMJAhEDxnBw/IADgPyAAAOA/IADgP5A/kADgAAAAgCAAAADgAOAAAQACQAAJREhESEBIREhEQKAAQD/AP4AAQD/AAADgPyAA4D8gAOAAAAAAAEAgP+kBAADJAADAAAJAREBBAD8gAOAAWT+QAOA/kAAAgBKAAAEOgOAAAQACAAANxEjETMJAhG6cHADgPyAA4AAA4D8gAOA/kD+QAOAAAAAAQB/AAADfwOAACkAAAEeARUUDgIjIi4CNTQ+AjM1DQE1Ig4CFRQeAjMyPgI1NCYnNwNJGhw8aYxPT4xoPT1ojE8BQP7APGlOLS1OaTw8aU4tFhNTAkMrYzVPjGg9PWiMT0+MaD2ArbOALU5pPDxpTi0tTmk8KUsfMAAAAAEBNABeAxQDCwAGAAABETMlESUjATTNARP+7c0BKwETzf1TzQAAAAAEAEAAAASQA4AAFwArADoAQQAAJSc+AzU0LgInNx4DFRQOAgcxLwE+ATU0Jic3HgMVDgMHMSc+ATU0Jic3HgEVFAYHJwURMyURJSMD2iomPisXFys+JioqQzAZGTBDKqQpOUREOSkhNCQUARQkMyHDIigoIiomMDAmKv3NzQET/u3NACMoXmlyPDxxaV4pIytmcnxBQXxyZiuDIzWRVFSRNSMeSFBYLy9ZUUcdsxZIKStGFSMcXDQ1WR8pAwETzf1TzQAAAgBAAAADwwOAAAcADwAAARchERc3FwcBByc3JyERJwMqcP6pcJd5mf4mlnqWcAFXbQJzcAFXcJZ6k/4jlnqWcP6qbAADAEABEwXAAmAADAAZACYAAAEUBiMiJjU0NjMyFhUhFAYjIiY1NDYzMhYVIRQGIyImNTQ2MzIWFQGNYkVFYWFFRWICFmFFRWJiRUVhAh1hRUViYkVFYQG6RWJiRUVhYUVFYmJFRWFhRUViYkVFYWFFAAAAAAEAQgACA74DfgAgAAABFxYUBwYiLwEHBiInJjQ/AScmNDc2Mh8BNzYyFxYUDwECo/ckJCRjHfb2JGMdJCT39yQkJGMd9vYkYx0kJPcBwPYkYx0kJPf3JCQkYx329iRjHSQk9/ckJCRjHfYAAAYARAAEA7wDfAAEAAkADgATABgAHQAAASEVITURIRUhNREhFSE1ATMVIzURMxUjNREzFSM1AacCFf3rAhX96wIV/ev+nbKysrKysgN8WVn+nVlZ/p1ZWQLGsrL+nbKy/p2ysgAIAIL/+gNeAysAKQBQAH8ArwEqATwBWQFwAAAADgEiDgQUHgg+Ci4JIiYTPgE3PgE3PgE3PgE3PgEnLgI0NS4BBw4BBw4BBwYUFRQWFx4BFwUmFicuAScmBicuASMmBgciJgcOAQcUFg4BBw4BBw4CFA4BBwYWFx4BFzc+ATchLgI0NS4BJyoBJwY2Bw4BBw4CFAcOARceARceARczPgE3PgE3NjQ+AjQ+ATckBiIGIg4HFA4VFAYUHgoyPgUyHgMyHgIyPg80Lg0iLhUiJgMOAQcGFgcOARUGMhceARc3JxcHIy4BJy4BLwE+ATc+Azc+ATc+ATM+AT8BMxceARczPwEfAQcjJhYnJiIjLgEnNTczAY4GCQYYDQwHAgQDAhMPBwcFGwUNEwQFEwEEAgQCAgQCBQUCBQIIGAcI4hADAQYKBQcBBQEDAQ0NAgEDAgs5HwQbGwUKBAESEwQOBv7iCgoHBx0OCQMIAwUCCQcKAQQCCxYFAQIEAQICAQIDAQIDAQIPEAkSCjEUIQ0CJQYDAgYgDgMIHC0XCg4GCQEDAQEKAQEEAQUIERs2BwwHBQwCAQEEAQIDBv6DDwgLBQUGBQUJBgYODAUHJgkMCQgHBQYRCQQGBRAIBQEHBQUFAgMCBgoZDAMMFVYKBx0JFgw+DgoVCAkFGglCEgcPBQkMBQkEBQUIBQUBBQUBBQIGBBAJBQYKCgkFAw8nBQoGCAUFCQQFBwwGBAMNBAYFCAYJDJwHCgUHAgIBBAMDBAMJDjcBUAKHCxgJBAsIAQILEQMEBQgDAQECAwYDEiQSBDpUAwIHNwEDOwECkAkKCwIEAQ4KBwM6AysBBhIQGRgYGB8ICiIPBQIFAgIBDAUDHgYFEAYwHQYODQYFBAcJEgX+/gYDAQMIAwYFCQEBAhM3GAIFBgUCHS8JAhQgCxcMCxULG
191CkPAwUCFQ4OFBEgCwcDAQEDAgQDAQEEFQsBAgMEAgUKBQMEBgcHCAQaNhUJCwcCCRsvGwIDBQIPIAUFBwMGBwoMAQEEBQIdLSUIEQgLEQoEBAQDDgQCAwQBAwUEBCE+BQUGAQUBBwUKDgQSBA0sBg8FBgsBBQ4KAgYIDxEFBwkRCQ4bDxAICg4RGwUFBAkBBAEFAgUBBgEFAQcEAgMCBQEMAQgGBwQUDgcPDDAKDQYIDQUVBQYHBQ0FBw8pCQgHDgYEEAYDDwkHAwcGBQIFAQQE/vYDAwUIAwoDBQQNBw4PBgFikwIGCgsFERY2CRoQAwYFAgICAwEBAQEDAUfXBwEFkwMCxAICAgYBCQ8MmgMAAwCyAH4DTgNrAA0AGwAsAAABNTQvAREUFwU1NC8BJgUHBh0BJTY1EQcGHQEUAycmBwUXFj8BNjc2HwEWPwEBOydhDAEqJnwMAX58JgEqDGEnNn0MDP7UYScmfgIDCgl9JyZiAYuNLBY3/q0OB6pvLBZHBwdHFixvqgcOAVM3FiyNDQGfRwcHqzgWFkgBAQMFSBYWOAAAAAAEAED/lATiA7gABwAMABQAGQAAFyYnNjcWFwYlFjc2AQMmJzY3FhcGAQAXFjfyow8Po6MPD/7ffn48AsE9og8PoqMPD/vkAr49fn44D6SiDw+ipCVoaDsDgfwQD6SiDw+ipAPh/H46aGgAAAAKAA3/NAYcAyQAKgAuADIANgA6AD4AQgBRAGEAeAAABTIWFw4BIyEuAScRPgE3IRYXFhcVBgcGByYnJj0BJicmJyEGBwYHER4BFwEzNSMXITUhATM1IxchNSETITUhBzM1IyUWFxYXDgEHJicmJzY3NhM2NzY3JicmJwYHBgcWFxYTFhUUDwEGIyIvASY1NDc2MzIfATc2MgNiEhUBARUS/WJLaQMDaUsDuks0NQIBCgsREgoKAh8fKfxGKx4fAQE9KwEbTU2bATb+yv58TU2cATX+y5oBNv7Kmk1NA2h6U1IDA6V6e1JTAwNTUntZPT0CAj09WVo9PAMDPD38DAyiDQ8PC24LCw0PDwxRiA0eMRURExUDaUsCNktpAgI1NEsyEgsKAQEKCxIyKh8eAgIeHyr9yis8AgIfTk5O/vBNTU3+8U1NTcIDUlN6e6UDA1NSe3pTUv4LAz08Wlo8PQICPTxaWjw9ASwMEA8LpAsLbgsPDw0LC1KIDAAAAAoADf80BhwDJAAqAC4AMgA2ADoAPgBCAFEAXgBrAAAFMhYXDgEjIS4BJxE+ATchFhcWFxUGBwYHJicmPQEmJyYnIQYHBgcRHgEXATM1IxchNSEBMzUjFyE1IREzNSMXITUhJRYXFhcOAQcmJyYnNjc2EzI3NjcBBgcGFRYXFjc2NzY1JicmJyIHBgcDYhIVAQEVEv1iS2kDA2lLA7pLNDUCAQoLERIKCgIfHyn8RiseHwEBPSsBG01NmwE2/sr+fE1NnAE1/stNTZoBNv7KAs56U1IDA6V6e1JTAwNTUnsdGhoX/t0MBwgDPD38GA4NAj09WSciIh0xFRETFQNpSwI2S2kCAjU0SzISCwoBAQoLEjIqHx4CAh4fKv3KKzwCAh9OTk7+8E1NTf7xTU1NwgNSU3p7pQMDU1J7elNS/gsIBw0BIxgaGh1aPD1LGyMjJ1o8PQINDhgAAgAV/zQEdgMkABUAKQAAASEiBwYHERYXFjMhNSERIREzESYnJgMhIgcGFREUFxYzITI3NjcRJicmBD38EBcQEAEBEBAXAYn+sAN/cQEQEBj+QRgREBARGAG/GBAQAQEQEAMkEBEX/IAXERBwAxD+sAGIFxEQ/dAQEBj+sBcREBARFwFQGBAQAAEAAAABAADdhMtGXw889QALBAAAAAAA4GSWFgAAAADgZJYWAAD/NAYcA7gAAAAIAAIAAAAAAAAAAQAAAyz/LABcBiwAAP73BhwAAQAAAAAAAAAAAAAAAAAAAB4CAAAABgAAYAQAADwFAAAABQAAQAYAAEAGAABABAAA4ASAAEAEAABABgAAQAYAAD0D4ABDBIAARgQAAIAEAACABIAASgOAAH8EwAE0BMAAQAQAAEAGAABABAAAQgQAAEQCVQCCBAAAsgUiAEAGLAANBiwADQSGABUAAAAKAHQApADwAUwCcgOeA8AD9AQWBJAFEgXUBewGBgYWBi4GbAaABuIHBAc+B3QHpgmOCdoKEArOC3oLvgAAAAEAAAAeAXEACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAJYAAQAAAAAAAQAKAAAAAQAAAAAAAgAGAAoAAQAAAAAAAwAbABAAAQAAAAAABAAKACsAAQAAAAAABQAeADUAAQAAAAAABgAKAFMAAwABBAkAAQAUAF0AAwABBAkAAgAMAHEAAwABBAkAAwA2AH0AAwABBAkABAAUALMAAwABBAkABQA8AMcAAwABBAkABgAUAQNmb250ZWRpdG9yTWVkaXVtRm9udEVkaXRvciAxLjAgOiBmb250ZWRpdG9yZm9udGVkaXRvclZlcnNpb24gMS4wOyBGb250RWRpdG9yICh2MS4wKWZvbnRlZGl0b3IAZgBvAG4AdABlAGQAaQB0AG8AcgBNAGUAZABpAHUAbQBGAG8AbgB0AEUAZABpAHQAbwByACAAMQAuADAAIAA6ACAAZgBvAG4AdABlAGQAaQB0AG8AcgBmAG8AbgB0AGUAZABpAHQAbwByAFYAZQByAHMAaQBvAG4AIAAxAC4AMAA7ACAARgBvAG4AdABFAGQAaQB0AG8AcgAgACgAdgAxAC4AMAApAGYAbwBuAHQAZQBkAGkAdABvAHIAAAAAAgAAAAAAAAAyAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgAeAAABAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeB3VuaUU2MDAHdW5pRTYwMQd1bmlFNjAyB3VuaUU2MDMHdW5pRTYwNAd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQd1bmlFNjBCB3VuaUU2MEMHdW5pRTYwRAd1bmlFNjBFB3VuaUU2MEYHdW5pRTYxMAd1bmlFNjExB3VuaUU2MTIHdW5pRTYxMwd1bmlFNjE0B3VuaUU2MTUHdW5pRTYxNgd1bmlFNjE3B3VuaUU2MTgHdW5pRTYxOQd1bmlFNjFBB3VuaUU2MUIHdW5pRTYxQwAA"},function(e,t,n){var i,r,a,l={},u=(i=function(){return window&&document&&document.all&&!window.atob},function(){return r=void 0===r?i.apply(this,arguments):r}),s=(a={},function(e,t){if("function"==typeof e)return e();if(void 0===a[e]){t=function(e,t){return(t||document).querySelector(e)}.call(this,e,t);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}a[e]=t}return a[e]}),o=null,h=0,d=[],c=n(255);function f(e,t){for(var i=0;i<e.length;i++){var n=e[i],r=l[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(v(n.parts[a],t))}else{for(var s=[],a=0;a<n.parts.length;a++)s.push(v(n.parts[a],t));l[n.id]={id:n.id,refs:1,parts:s}}}}function p(e,t){for(var i=[],n={},r=0;r<e.length;
vendor: 1,102 bytes, line 191
191r++){var a=e[r],s=t.base?a[0]+t.base:a[0],a={css:a[1],media:a[2],sourceMap:a[3]};n[s]?n[s].parts.push(a):i.push(n[s]={id:s,parts:[a]})}return i}function m(e,t){var i=s(e.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=d[d.length-1];if("top"===e.insertAt)n?n.nextSibling?i.insertBefore(t,n.nextSibling):i.appendChild(t):i.insertBefore(t,i.firstChild),d.push(t);else if("bottom"===e.insertAt)i.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");n=s(e.insertAt.before,i);i.insertBefore(t,n)}}function g(e){null!==e.parentNode&&(e.parentNode.removeChild(e),0<=(e=d.indexOf(e)))&&d.splice(e,1)}function _(e){var t,i=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce&&(t=n.nc)&&(e.attrs.nonce=t),y(i,e.attrs),m(e,i),i}
191function y(t,i){Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])})}function v(t,e){var i,n,r,a,s;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}return r=e.singleton?(a=h++,i=o=o||_(e),n=b.bind(null,i,a,!1),b.bind(null,i,a,!0)):t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=e,s=document.createElement("link"),void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",y(s,a.attrs),m(a,s),i=s,n=function(e,t,i){var n=i.css,i=i.sourceMap,r=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||r)&&(n=c(n));i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");t=new Blob([n],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(t),r&&URL.revokeObjectURL(r)}.bind(null,i,e),function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=_(e),n=function(e,t){var i=t.css,t=t.media;t&&e.setAttribute("media",t);if(e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}.bind(null,i),function(){g(i)}),n(t),function(e){e?e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap||n(t=e):r()}}e.exports=function(e,s){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(s=s||{}).attrs="object"==typeof s.attrs?s.attrs:{},s.singleton||"boolean"==typeof s.singleton||(s.singleton=u()),s.insertInto||(s.insertInto="head"),s.insertAt||(s.insertAt="bottom");var o=p(e,s);return f(o,s),function(e){for(var t=[],i=0;i<o.length;i++){var n=o[i];(r=l[n.id]).refs--,t.push(r)}e&&f(p(e,s),s);for(var r,i=0;i<t.length;i++)if(0===(r=t[i]).refs){for(var a=0;a<r.parts.length;a++)r.parts[a]();delete l[r.id]}}};A=[];var A,E=function(e,t){return A[e]=t,A.filter(Boolean).join("\n")};function b(e,t,i,n){var i=i?"":n.css;e.styleSheet?e.styleSheet.cssText=E(t,i):(n=document.createTextNode(i),(i=e.childNodes)[t]&&e.removeChild(i[t]),i.length?e.insertBefore(n,i[t]):e.appendChild(n))}},function(e,t){e.exports=function(e){var i,n,t="undefined"!=typeof window&&window.location;if(t)return e&&"string"==typeof e?(i=t.protocol+"//"+t.host,n=i+t.pathname.replace(/\/[^\/]*$/,"/"),e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){t=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(t)?e:(e=0===t.indexOf("//")?t:0===t.indexOf("/")?i+t:n+t.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})):e;throw new Error("fixUrls requires window.location")}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){e.exports=i(134)}];function e(e){for(var t,i,n=e[0],r=e[1],a=0,s=[];a<n.length;a++)i=n[a],Object.prototype.hasOwnProperty.call(l,i)&&l[i]&&s.push(l[i][0]),l[i]=0;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&(o[t]=r[t]);for(h&&h(e);s.length;)s.shift()()}var i={},l={3:0};function u(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},o[e].call(t.exports,t,t.exports,u),t.l=!0,t)).exports}u.e=function(n){var r,a,e,s,t,i=[],o=l[n];return 0!==o&&(o?i.push(o[2]):(t=new Promise(function(e,t){o=l[n]=[e,t]}),i.push(o[2]=t),(r=document.createElement("script")).charset="utf-8",r.timeout=120,u.nc&&r.setAttribute("nonce",u.nc),r.src=u.p+""+({0:"../polyfills.base64",1:"../polyfills.json2",2:"../polyfills.promise",5:"flv",6:"vendors~flv"}[t=n]||t)+".js",a=new Error,e=function(e){r.onerror=r.onload=null,clearTimeout(s);var t,i=l[n];0!==i&&(i&&(t=e&&("load"===e.type?"missing":e.type),e=e&&e.target&&e.target.src,a.message="Loading chunk "+n+" failed.\n("+t+": "+e+")",a.name="ChunkLoadError",a.type=t,a.request=e,i[1](a)),l[n]=void 0)},s=setTimeout(function(){e({type:"timeout",target:r})},12e4),r.onerror=r.onload=e,document.head.appendChild(r))),Promise.all(i)},u.m=o,u.c=i,u.d=function(e,t,i){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
191),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(u.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)u.d(i,n,function(e){return t[e]}.bind(null,n));return i},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="",u.oe=function(e){throw e};var t=(n=window.webpackJsonpcyberplayer=window.webpackJsonpcyberplayer||[]).push.bind(n);n.push=e;for(var n=n.slice(),r=0;r<n.length;r++)e(n[r]);var h=t;return u(u.s=318)});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.