h265player
Version:
1 lines • 617 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.h265player=e():t.h265player=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=187)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.r(e);e.default={ProcessorResetEnd:"DataProcessorController.processorResetEnd",DataProcessorReady:"DataProcessorController.dataProcessorReady",DecodeStartDecode:"DecodeController.startDecode",DecodeFlush:"DecodeController.flush",DecodeDecoded:"DecodeController.decoded",DecodeApppendEnd:"DecodeController.appendEnd",DecodeFlushEnd:"DecodeController.flushEnd",DecodeReady:"DecodeController.ready",DemuxResetEnd:"DemuxController.resetEnd",DemuxStartDemux:"DemuxController.startDemux",DemuxLast:"DemuxController.last",DemuxVideo:"DemuxController.video",DemuxAAC:"DemuxController.AAC",DemuxReady:"DemuxController.ready",DemuxCodecError:"DemuxController.codecError",ImagePlayerRenderEnd:"ImagePlayer.renderEnd",ImagePlayerWait:"ImagePlayer.wait",ImagePlayerReady:"ImagePlayer.ready",ImagePlayerEnd:"ImagePlayer.end",ImagePlayerBuffeUpdate:"ImagePlayer.bufferUpdate",ImagePlayerSwitchPool:"ImagePlayer.switchPool",ControlBarPlay:"ControlBar.onPlay",ControlBarPause:"ControlBar.onPause",ControlBarPauseLoading:"ControlBar.onPauseLoading",LoadDataReadBufferByNo:"LoadData.readBufferByNo",LoadDataReadBuffer:"LoadData.readBuffer",LoadDataRead:"LoadData.onRead",LoadDataSeek:"LoadData.onSeek",LoadDataFirstLoaded:"LoadData.onFirstLoaded",LoaderPlayListStart:"Loader.playlistStart",LoaderLoading:"Loader.onLoading",LoaderError:"Loader.onError",LoaderLoaded:"Loader.onLoaded",LoaderUpdateSpeed:"Loader.updateSpeed",LoaderLoadFile:"Loader.loadFile",LoaderPlayListLoaded:"Loader.playlistLoaded",AudioPlayerReady:"AudioPlayer.MSEReady",AudioPlayerDataReady:"AudioPlayer.dataReady",AudioPlayerWait:"AudioPlayer.wait",AudioPlayerEnd:"AudioPlayer.end",AudioPlayerPlaySuccess:"AudioPlayer.playSuccess",AudioPlayerPlayFail:"AudioPlayer.playFail",PlayerMaxPTS:"DemuxController.maxpts",PlayerSeekEnd:"Player.seekend",PlayerSpeedTo:"Player.speedTo",PlayerChangeRate:"Player.changeRate",PlayerChangeSrc:"Player.changeSrc",PlayerPlaying:"Player.playing",PlayerTimeUpdate:"Player.timeUpdate",PlayerbufferUpdate:"Player.bufferupdate",PlayerResetReady:"Player.resetReady",PlayerWait:"Player.wait",PlayerLoadNext:"Player.loadNext",PlayerOnPlay:"Player.onPlay",PlayerOnPause:"Player.onPause",PlayerOnSeek:"Player.onSeek",PlayerOnVolume:"Player.onVolume",PlayerReady:"Player.ready",PlayerPlay:"Player.play",PlayerReset:"Player.reset",PlayerLoadedMetaData:"Player.loadedMetaData",PlayerEnd:"Player.end",PlayerPause:"Player.pause",PlayerSeeking:"Player.seeking",PlayerAlert:"Player.alert",PlayerThrowError:"Player.throwError",StreamDataReady:"StreamController.dataReady"}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(34);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(14).default,i=n(1);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(5),a=n.n(o),s=n(0),u=n.n(s),c=n(13),l=n(27),f=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),u()(this,"logger",null),this.options=e,this.debug=e.debug||!1,this.setLogger(this.constructor.name+".js")}return a()(t,[{key:"setLogger",value:function(t){this.logger=new c.a(t)}},{key:"getLogger",value:function(){return this.logger}},{key:"setOptions",value:function(t){Object.assign(this.options,t)}},{key:"events",get:function(){return this.options&&this.options.events?this.options.events(this):Object(l.a)(this)}},{key:"alert",get:function(){var t="";return this.options&&this.options.alertError&&(t=this.options.alertError),t}},{key:"toString",value:function(){return JSON.stringify(this)}}]),t}();e.a=f},,function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a}));var r={projectName:"GOLDPLAY",projectAbbreviation:"GP",mode:"production",basePath:"./",get distPath(){var t="";return("development"==this.mode||"test"==this.mode)&&(t="/dist/"),t},get libPath(){return this.distPath+"lib/"},hideBarBoxTime:300,speedList:[{name:"0.5X",value:.5},{name:"1.0X",value:1},{name:"1.5X",value:1.5},{name:"2.0X",value:2},{name:"3.0X",value:3}]},i={maxDuration:15,maxSize:1024e6,maxRetryCount:3,maxSegment:10},o=1/9e4,a={READYBUFFERLENGTH:500,MAXBUFFERLENGTH:5500}},function(t,e,n){t.exports=n(95)},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(5),a=n.n(o),s=n(0),u=n.n(s),c=n(11),l=console||{};function f(t,e){if(l[t]){if(this.disabled||this.level<0)return;if("production"===c.c.mode&&("error"!==t||"warn"!==t))return;if(1===this.level&&["info"].includes(t))return;if(2===this.level&&["log","info"].includes(t))return;if(this.level>2&&"error"!==t)return;for(var n=(new Date).toLocaleString(),r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var a=["[32m".concat(e,"[39m")].concat(i,[n]);"error"!==t&&"warn"!==t||(a=[e].concat(i,[n])),"function"==typeof l[t]&&l[t].apply(l,a)}}var h=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i()(this,t),u()(this,"prefix",c.c.projectName),u()(this,"joiner",">"),u()(this,"left","["),u()(this,"right","]"),u()(this,"disabled",!1),u()(this,"level",0),Object.assign(this,n),"string"==typeof e?this.file=e:e&&e.constructor&&(this.file=e.constructor.name)}return a()(t,[{key:"setDisabled",value:function(t){this.disabled=t}},{key:"setLevel",value:function(t){this.level=t}}],[{key:"get",value:function(e,n){return new t(e,n)}}]),t}();["info","log","debug","warn","error"].forEach((function(t){h.prototype[t]=function(e,n){n=void 0===n?"":this.joiner+n;for(var r=this.left+e+n+this.right,i=this.left+this.prefix+" "+this.file+this.right+r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];f.apply(this,[t,i].concat(a))}})),e.a=h},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},,,,,function(t,e,n){var r=n(83),i=n(84),o=n(85),a=n(87);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(t,r,i){n.d(e,"b",(function(){return S})),n.d(e,"a",(function(){return _}));var o=n(20),a=n.n(o),s=n(3),u=n.n(s),c=n(5),l=n.n(c),f=n(6),h=n.n(f),p=n(7),d=n.n(p),y=n(4),g=n.n(y),v=n(9);function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g()(t);if(e){var i=g()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}var b=function(){},_=null,w=[],E=!1;window.fs=t;var k=function(e){h()(o,e);var n=m(o);function o(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b;return u()(this,o),(e=n.call(this)).fs_ready=r,e.write_ready=a,e.read_ready=i,e.header_cnt=11,e.base_offset=4*e.header_cnt,e.img_cache_basedir="/img_cache",e.img_cache_dir=e.img_cache_basedir+"/"+t.toString(),e}return l()(o,[{key:"onError",value:function(t){this.logger.error("Error: "+t)}},{key:"init",value:function(e,n){var i=this;r.install(n);r.configure({fs:e,options:{size:10240,cacheSize:10240,type:PERSISTENT}},(function(e){if(e)throw e;i.logger.info("fs",t),i.fs=t.getRootFS(),i.fs.empty((function(e){e&&i.onError(e),i.logger.info("empty"),i.fs.mkdir(i.img_cache_basedir,777,(function(e){e&&i.onError(e),i.logger.info("mkdir",i.img_cache_basedir),i.fs.mkdir(i.img_cache_dir,777,(function(e){e&&i.onError(e),i.logger.info("mkdir",i.img_cache_dir),E=!0,i.fs_ready(t)}))}))}))}))}},{key:"saveImg",value:function(e,n,r){var o=this;if(r&&r.buf_u){if(E){var s=[r.buf_u.length,r.buf_v.length,r.buf_y.length],u=s[0],c=s[1],l=s[2],f=r.duration,h=r.fps,p=r.height,d=r.pts,y=r.stride_u,g=r.stride_v,v=r.stride_y,m=r.width,b=new ArrayBuffer(this.base_offset+u+c+l),_=new Uint32Array(b),k=new Uint8Array(b);_.subarray(0,this.header_cnt).set(new Uint32Array([u,c,l,f,h,p,d,y,g,v,m]));var S=[0,u,u+c].map((function(t){return t+o.base_offset})),x=a()(S,3),T=x[0],P=x[1],R=x[2];k.set(r.buf_u,T),k.set(r.buf_v,P),k.set(r.buf_y,R);var L=this.img_cache_dir+"/"+e.toString(),A=L+"/"+n.toString()+".jpg",B=!1;w.indexOf(L)>-1&&(B=!0);var D=i.from(b);return new Promise((function(r){B?t.writeFile(A,D,(function(t){t&&o.onError(t),o.logger.info(A+" write ok!"),o.write_ready(e,n,A),r({video_id:e,frame_seq:n,f_path:A})})):o.fs.mkdir(L,777,(function(i){i&&o.onError(i),w.push(L),t.writeFile(A,D,(function(t){t&&o.onError(t),o.logger.info(A+" write ok!"),o.write_ready(e,n,A),r({video_id:e,frame_seq:n,f_path:A})}))}))}))}setTimeout((function(){o.saveImg(e,n,r)}),20)}}},{key:"loadImg",value:function(e,n){var r=this,i=this.img_cache_dir+"/"+e.toString()+"/"+n.toString()+".jpg";return new Promise((function(o,s){t.readFile(i,{},(function(t,i){if(t||!i)return r.onError(t),void s();var u=i.buffer,c=new Uint32Array(u),l=new Uint8Array(u),f=c.slice(0,r.header_cnt),h=f,p=a()(h,11),d=p[0],y=p[1],g=p[2],v=p[3],m=p[4],b=p[5],_=p[6],w=p[7],E=p[8],k=p[9],S=p[10],x=[0,d,d+y].map((function(t){return t+r.base_offset})),T=a()(x,3),P=T[0],R=T[1],L=T[2],A={buf_u:l.slice(P,P+d),buf_v:l.slice(R,R+y),buf_y:l.slice(L,L+g),duration:v,fps:m,height:b,pts:_,stride_u:w,stride_v:E,stride_y:k,width:S};o(A),r.read_ready(e,n,A),c=null,l=null,f=null}))}))}},{key:"empty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b;if(this.fs)this.fs.empty(e);else{var n=t.getRootFS();n&&(this.fs=n,this.fs.empty(e))}}}]),o}(v.a);function S(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:window;(_=new k(t,n,r,i)).init(e,o)}}).call(this,n(96),n(43),n(60))},,function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(3),i=n.n(r),o=n(5),a=n.n(o),s=n(0),u=n.n(s),c=n(11),l={eval:EvalError,range:RangeError,reference:ReferenceError,syntax:SyntaxError,type:TypeError,uri:URIError,default:Error},f=null,h=(f||(f=new(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1001;return i()(this,t),u()(this,"type",""),u()(this,"errorName","DefaultError"),u()(this,"code",null),u()(this,"message",""),u()(this,"stack",""),this.type=e,this.code=n,this.throws.bind(this)}return a()(t,[{key:"throws",value:function(t){for(var e="",n=Error,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(t instanceof Error){for(var a in l)if(t instanceof l[a]){this.errorName=l[a].name,n=t.constructor;break}this.stack=t.stack,i&&i.splice&&(e=i[0],i.splice(0,1))}else e=t.toString();this.message="[".concat(c.c.projectName," ERROR:")+this.type+"-"+this.code+"]"+e;try{throw new n(this.message,"[args]:",i)}catch(t){this.stack=this.stack||t.stack}}}]),t}())),f)},function(t,e,n){var r=n(88),i=n(59);t.exports=function(t,e){var n=i(t,e,"get");return r(t,n)},t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(5),a=n.n(o),s=n(0),u=n.n(s);function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f: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.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var f=n(13).a.get("Events.js"),h=function(){function t(e){i()(this,t),u()(this,"eventsQueue",{}),u()(this,"target",{}),u()(this,"disallowRepeat",!1),this.target=e}return a()(t,[{key:"add",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=c(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;this.on(o,n,r)}}catch(t){i.e(t)}finally{i.f()}}},{key:"on",value:function(t,e,n){if(void 0===this.eventsQueue[t]&&(this.eventsQueue[t]={methods:[],once:!1}),"function"==typeof e){if(!this.disallowRepeat||!this.eventsQueue[t].methods.includes(e))return this.eventsQueue[t].methods.push(e),void 0!==n&&(this.eventsQueue[t].once=n),this.target}else f.error("on","the argument is not function.",e)}},{key:"once",value:function(t,e){this.on(t,e,!0)}},{key:"off",value:function(t,e){var n=this.eventsQueue[t];if(n){var r=n.methods;if(e)for(var i=r.length;i--;)r[i]===e&&r.splice(i,1);else delete this.eventsQueue[t];return this.target}}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this.eventsQueue[t];if(o){var a=o.methods;return a.forEach((function(t){t.apply(e.target,r)})),o.once&&this.off(t),this.target}}},{key:"clear",value:function(t){delete this.eventsQueue[t]}},{key:"clearAll",value:function(){this.eventsQueue={}}}]),t}();e.a=function(t){var e=new h(t);return function(t){return e.target=t,e}}},function(t,e,n){var r=n(34),i=n(90);function o(e,n,a){return i()?(t.exports=o=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},t.exports.default=t.exports,t.exports.__esModule=!0),o.apply(null,arguments)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(89),i=n(59);t.exports=function(t,e,n){var o=i(t,e,"set");return r(t,o,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e,n){var r=n(4),i=n(34),o=n(91),a=n(28);function s(e){var n="function"==typeof Map?new Map:void 0;return t.exports=s=function(t){if(null===t||!o(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return a(t,arguments,r(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i(e,t)},t.exports.default=t.exports,t.exports.__esModule=!0,s(e)}t.exports=s,t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,r)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){function r(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n.oe=function(t){throw t};var r=n(n.s=ENTRY_MODULE);return r.default||r}var i="[\\.|\\-|\\+|\\w|/|@]+",o="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(t,e,r){var s={};s[r]=[];var u=e.toString(),c=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return s;for(var l,f=c[1],h=new RegExp("(\\\\n|\\W)"+a(f)+o,"g");l=h.exec(u);)"dll-reference"!==l[3]&&s[r].push(l[3]);for(h=new RegExp("\\("+a(f)+'\\("(dll-reference\\s('+i+'))"\\)\\)'+o,"g");l=h.exec(u);)t[l[2]]||(s[r].push(l[1]),t[l[2]]=n(l[1]).m),s[l[2]]=s[l[2]]||[],s[l[2]].push(l[4]);for(var p,d=Object.keys(s),y=0;y<d.length;y++)for(var g=0;g<s[d[y]].length;g++)p=s[d[y]][g],isNaN(1*p)||(s[d[y]][g]=1*s[d[y]][g]);return s}function u(t){return Object.keys(t).reduce((function(e,n){return e||t[n].length>0}),!1)}t.exports=function(t,e){e=e||{};var i={main:n.m},o=e.all?{main:Object.keys(i.main)}:function(t,e){for(var n={main:[e]},r={main:[]},i={main:{}};u(n);)for(var o=Object.keys(n),a=0;a<o.length;a++){var c=o[a],l=n[c].pop();if(i[c]=i[c]||{},!i[c][l]&&t[c][l]){i[c][l]=!0,r[c]=r[c]||[],r[c].push(l);for(var f=s(t,t[c][l],c),h=Object.keys(f),p=0;p<h.length;p++)n[h[p]]=n[h[p]]||[],n[h[p]]=n[h[p]].concat(f[h[p]])}}return r}(i,t),a="";Object.keys(o).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;o[t][e];)e++;o[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+t+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o[t].map((function(e){return JSON.stringify(e)+": "+i[t][e].toString()})).join(",")+"});\n"})),a=a+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o.main.map((function(t){return JSON.stringify(t)+": "+i.main[t].toString()})).join(",")+"}))(self);";var c=new window.Blob([a],{type:"text/javascript"});if(e.bare)return c;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),f=new window.Worker(l);return f.objectURL=l,f}},function(t,e,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){var t=function(){},e={},n={},r={};function i(t,e){t=t.push?t:[t];var i,o,a,s=[],u=t.length,c=u;for(i=function(t,n){n.length&&s.push(t),--c||e(s)};u--;)o=t[u],(a=n[o])?i(o,a):(r[o]=r[o]||[]).push(i)}function o(t,e){if(t){var i=r[t];if(n[t]=e,i)for(;i.length;)i[0](t,e),i.splice(0,1)}}function a(e,n){e.call&&(e={success:e}),n.length?(e.error||t)(n):(e.success||t)(e)}function s(e,n,r,i){var o,a,u=document,c=r.async,l=(r.numRetries||0)+1,f=r.before||t,h=e.replace(/[\?|#].*$/,""),p=e.replace(/^(css|img)!/,"");i=i||0,/(^css!|\.css$)/.test(h)?((a=u.createElement("link")).rel="stylesheet",a.href=p,(o="hideFocus"in a)&&a.relList&&(o=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(a=u.createElement("img")).src=p:((a=u.createElement("script")).src=e,a.async=void 0===c||c),a.onload=a.onerror=a.onbeforeload=function(t){var u=t.type[0];if(o)try{a.sheet.cssText.length||(u="e")}catch(t){18!=t.code&&(u="e")}if("e"==u){if((i+=1)<l)return s(e,n,r,i)}else if("preload"==a.rel&&"style"==a.as)return a.rel="stylesheet";n(e,u,t.defaultPrevented)},!1!==f(e,a)&&u.head.appendChild(a)}function u(t,e,n){var r,i,o=(t=t.push?t:[t]).length,a=o,u=[];for(r=function(t,n,r){if("e"==n&&u.push(t),"b"==n){if(!r)return;u.push(t)}--o||e(u)},i=0;i<a;i++)s(t[i],r,n)}function c(t,n,r){var i,s;if(n&&n.trim&&(i=n),s=(i?r:n)||{},i){if(i in e)throw"LoadJS";e[i]=!0}function c(e,n){u(t,(function(t){a(s,t),e&&a({success:e,error:n},t),o(i,t)}),s)}if(s.returnPromise)return new Promise(c);c()}return c.ready=function(t,e){return i(t,(function(t){a(e,t)})),c},c.done=function(t){o(t,[])},c.reset=function(){e={},n={},r={}},c.isDefined=function(t){return t in e},c})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){var r=n(34);t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},,,,,,function(t,e,n){(function(e){var n;n=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,r){(function(t,i,o,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s,u=r(2),c=r(9);!function(t){t[t.EPERM=1]="EPERM",t[t.ENOENT=2]="ENOENT",t[t.EIO=5]="EIO",t[t.EBADF=9]="EBADF",t[t.EACCES=13]="EACCES",t[t.EBUSY=16]="EBUSY",t[t.EEXIST=17]="EEXIST",t[t.ENOTDIR=20]="ENOTDIR",t[t.EISDIR=21]="EISDIR",t[t.EINVAL=22]="EINVAL",t[t.EFBIG=27]="EFBIG",t[t.ENOSPC=28]="ENOSPC",t[t.EROFS=30]="EROFS",t[t.ENOTEMPTY=39]="ENOTEMPTY",t[t.ENOTSUP=95]="ENOTSUP"}(s||(s={}));var l={};l[s.EPERM]="Operation not permitted.",l[s.ENOENT]="No such file or directory.",l[s.EIO]="Input/output error.",l[s.EBADF]="Bad file descriptor.",l[s.EACCES]="Permission denied.",l[s.EBUSY]="Resource busy or locked.",l[s.EEXIST]="File exists.",l[s.ENOTDIR]="File is not a directory.",l[s.EISDIR]="File is a directory.",l[s.EINVAL]="Invalid argument.",l[s.EFBIG]="File is too big.",l[s.ENOSPC]="No space left on disk.",l[s.EROFS]="Cannot modify a read-only file system.",l[s.ENOTEMPTY]="Directory is not empty.",l[s.ENOTSUP]="Operation is not supported.";var f,h=function(e){function n(t,n,r){void 0===n&&(n=l[t]),e.call(this,n),this.syscall="",this.errno=t,this.code=s[t],this.path=r,this.stack=(new e).stack,this.message="Error: "+this.code+": "+n+(this.path?", '"+this.path+"'":"")}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.fromJSON=function(t){var e=new n(0);return e.errno=t.errno,e.code=t.code,e.path=t.path,e.stack=t.stack,e.message=t.message,e},n.fromBuffer=function(t,e){return void 0===e&&(e=0),n.fromJSON(JSON.parse(t.toString("utf8",e+4,e+4+t.readUInt32LE(e))))},n.FileError=function(t,e){return new n(t,l[t],e)},n.ENOENT=function(t){return this.FileError(s.ENOENT,t)},n.EEXIST=function(t){return this.FileError(s.EEXIST,t)},n.EISDIR=function(t){return this.FileError(s.EISDIR,t)},n.ENOTDIR=function(t){return this.FileError(s.ENOTDIR,t)},n.EPERM=function(t){return this.FileError(s.EPERM,t)},n.ENOTEMPTY=function(t){return this.FileError(s.ENOTEMPTY,t)},n.prototype.toString=function(){return this.message},n.prototype.toJSON=function(){return{errno:this.errno,code:this.code,path:this.path,stack:this.stack,message:this.message}},n.prototype.writeToBuffer=function(e,n){void 0===e&&(e=t.alloc(this.bufferSize())),void 0===n&&(n=0);var r=e.write(JSON.stringify(this.toJSON()),n+4);return e.writeUInt32LE(r,n),e},n.prototype.bufferSize=function(){return 4+t.byteLength(JSON.stringify(this.toJSON()))},n}(Error),p=Object.freeze({get ErrorCode(){return s},ErrorStrings:l,ApiError:h});!function(t){t[t.NOP=0]="NOP",t[t.THROW_EXCEPTION=1]="THROW_EXCEPTION",t[t.TRUNCATE_FILE=2]="TRUNCATE_FILE",t[t.CREATE_FILE=3]="CREATE_FILE"}(f||(f={}));var d,y=function t(e){if(this.flagStr=e,t.validFlagStrs.indexOf(e)<0)throw new h(s.EINVAL,"Invalid flag: "+e)};y.getFileFlag=function(t){return y.flagCache.hasOwnProperty(t)?y.flagCache[t]:y.flagCache[t]=new y(t)},y.prototype.getFlagString=function(){return this.flagStr},y.prototype.isReadable=function(){return-1!==this.flagStr.indexOf("r")||-1!==this.flagStr.indexOf("+")},y.prototype.isWriteable=function(){return-1!==this.flagStr.indexOf("w")||-1!==this.flagStr.indexOf("a")||-1!==this.flagStr.indexOf("+")},y.prototype.isTruncating=function(){return-1!==this.flagStr.indexOf("w")},y.prototype.isAppendable=function(){return-1!==this.flagStr.indexOf("a")},y.prototype.isSynchronous=function(){return-1!==this.flagStr.indexOf("s")},y.prototype.isExclusive=function(){return-1!==this.flagStr.indexOf("x")},y.prototype.pathExistsAction=function(){return this.isExclusive()?f.THROW_EXCEPTION:this.isTruncating()?f.TRUNCATE_FILE:f.NOP},y.prototype.pathNotExistsAction=function(){return(this.isWriteable()||this.isAppendable())&&"r+"!==this.flagStr?f.CREATE_FILE:f.THROW_EXCEPTION},y.flagCache={},y.validFlagStrs=["r","r+","rs","rs+","w","wx","w+","wx+","a","ax","a+","ax+"],function(t){t[t.FILE=32768]="FILE",t[t.DIRECTORY=16384]="DIRECTORY",t[t.SYMLINK=40960]="SYMLINK"}(d||(d={}));var g=function(t,e,n,r,i,o){if(void 0===r&&(r=new Date),void 0===i&&(i=new Date),void 0===o&&(o=new Date),this.size=e,this.atime=r,this.mtime=i,this.ctime=o,this.dev=0,this.ino=0,this.rdev=0,this.nlink=1,this.blksize=4096,this.uid=0,this.gid=0,this.birthtime=new Date(0),this.fileData=null,n)this.mode=n;else switch(t){case d.FILE:this.mode=420;break;case d.DIRECTORY:default:this.mode=511}this.blocks=Math.ceil(e/512),this.mode<4096&&(this.mode|=t)};g.fromBuffer=function(t){var e=t.readUInt32LE(0),n=t.readUInt32LE(4),r=t.readDoubleLE(8),i=t.readDoubleLE(16),o=t.readDoubleLE(24);return new g(61440&n,e,4095&n,new Date(r),new Date(i),new Date(o))},g.prototype.toBuffer=function(){var e=t.alloc(32);return e.writeUInt32LE(this.size,0),e.writeUInt32LE(this.mode,4),e.writeDoubleLE(this.atime.getTime(),8),e.writeDoubleLE(this.mtime.getTime(),16),e.writeDoubleLE(this.ctime.getTime(),24),e},g.prototype.clone=function(){return new g(61440&this.mode,this.size,4095&this.mode,this.atime,this.mtime,this.ctime)},g.prototype.isFile=function(){return(61440&this.mode)===d.FILE},g.prototype.isDirectory=function(){return(61440&this.mode)===d.DIRECTORY},g.prototype.isSymbolicLink=function(){return(61440&this.mode)===d.SYMLINK},g.prototype.chmod=function(t){this.mode=61440&this.mode|t},g.prototype.isSocket=function(){return!1},g.prototype.isBlockDevice=function(){return!1},g.prototype.isCharacterDevice=function(){return!1},g.prototype.isFIFO=function(){return!1};var v=function(t,e){return t};function m(t){if(t)return t;throw new h(s.EIO,"Initialize BrowserFS with a file system using BrowserFS.initialize(filesystem)")}function b(t,e){switch(typeof t){case"number":return t;case"string":var n=parseInt(t,8);return isNaN(n)?e:n;default:return e}}function _(t){if(t instanceof Date)return t;if("number"==typeof t)return new Date(1e3*t);throw new h(s.EINVAL,"Invalid time.")}function w(t){if(t.indexOf("\0")>=0)throw new h(s.EINVAL,"Path must be a string without null bytes.");if(""===t)throw new h(s.EINVAL,"Path must not be empty.");return c.resolve(t)}function E(t,e,n,r){switch(typeof t){case"object":return{encoding:void 0!==t.encoding?t.encoding:e,flag:void 0!==t.flag?t.flag:n,mode:b(t.mode,r)};case"string":return{encoding:t,flag:n,mode:r};default:return{encoding:e,flag:n,mode:r}}}function k(){}var S=function(){this.F_OK=0,this.R_OK=4,this.W_OK=2,this.X_OK=1,this.root=null,this.fdMap={},this.nextFd=100};S.prototype.initialize=function(t){if(!t.constructor.isAvailable())throw new h(s.EINVAL,"Tried to instantiate BrowserFS with an unavailable file system.");return this.root=t},S.prototype._toUnixTimestamp=function(t){if("number"==typeof t)return t;if(t instanceof Date)return t.getTime()/1e3;throw new Error("Cannot parse time: "+t)},S.prototype.getRootFS=function(){return this.root?this.root:null},S.prototype.rename=function(t,e,n){void 0===n&&(n=k);var r=v(n,1);try{m(this.root).rename(w(t),w(e),r)}catch(t){r(t)}},S.prototype.renameSync=function(t,e){m(this.root).renameSync(w(t),w(e))},S.prototype.exists=function(t,e){void 0===e&&(e=k);var n=v(e,1);try{return m(this.root).exists(w(t),n)}catch(t){return n(!1)}},S.prototype.existsSync=function(t){try{return m(this.root).existsSync(w(t))}catch(t){return!1}},S.prototype.stat=function(t,e){void 0===e&&(e=k);var n=v(e,2);try{return m(this.root).stat(w(t),!1,n)}catch(t){return n(t)}},S.prototype.statSync=function(t){return m(this.root).statSync(w(t),!1)},S.prototype.lstat=function(t,e){void 0===e&&(e=k);var n=v(e,2);try{return m(this.root).stat(w(t),!0,n)}catch(t){return n(t)}},S.prototype.lstatSync=function(t){return m(this.root).statSync(w(t),!0)},S.prototype.truncate=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=k);var r=0;"function"==typeof e?n=e:"number"==typeof e&&(r=e);var i=v(n,1);try{if(r<0)throw new h(s.EINVAL);return m(this.root).truncate(w(t),r,i)}catch(t){return i(t)}},S.prototype.truncateSync=function(t,e){if(void 0===e&&(e=0),e<0)throw new h(s.EINVAL);return m(this.root).truncateSync(w(t),e)},S.prototype.unlink=function(t,e){void 0===e&&(e=k);var n=v(e,1);try{return m(this.root).unlink(w(t),n)}catch(t){return n(t)}},S.prototype.unlinkSync=function(t){return m(this.root).unlinkSync(w(t))},S.prototype.open=function(t,e,n,r){var i=this;void 0===r&&(r=k);var o=b(n,420),a=v(r="function"==typeof n?n:r,2);try{m(this.root).open(w(t),y.getFileFlag(e),o,(function(t,e){e?a(t,i.getFdForFile(e)):a(t)}))}catch(t){a(t)}},S.prototype.openSync=function(t,e,n){return void 0===n&&(n=420),this.getFdForFile(m(this.root).openSync(w(t),y.getFileFlag(e),b(n,420)))},S.prototype.readFile=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=k);var r=E(e,null,"r",null),i=v(n="function"==typeof e?e:n,2);try{var o=y.getFileFlag(r.flag);return o.isReadable()?m(this.root).readFile(w(t),r.encoding,o,i):i(new h(s.EINVAL,"Flag passed to readFile must allow for reading."))}catch(t){return i(t)}},S.prototype.readFileSync=function(t,e){void 0===e&&(e={});var n=E(e,null,"r",null),r=y.getFileFlag(n.flag);if(!r.isReadable())throw new h(s.EINVAL,"Flag passed to readFile must allow for reading.");return m(this.root).readFileSync(w(t),n.encoding,r)},S.prototype.writeFile=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r=k);var i=E(n,"utf8","w",420),o=v(r="function"==typeof n?n:r,1);try{var a=y.getFileFlag(i.flag);return a.isWriteable()?m(this.root).writeFile(w(t),e,i.encoding,a,i.mode,o):o(new h(s.EINVAL,"Flag passed to writeFile must allow for writing."))}catch(t){return o(t)}},S.prototype.writeFileSync=function(t,e,n){var r=E(n,"utf8","w",420),i=y.getFileFlag(r.flag);if(!i.isWriteable())throw new h(s.EINVAL,"Flag passed to writeFile must allow for writing.");return m(this.root).writeFileSync(w(t),e,r.encoding,i,r.mode)},S.prototype.appendFile=function(t,e,n,r){void 0===r&&(r=k);var i=E(n,"utf8","a",420),o=v(r="function"==typeof n?n:r,1);try{var a=y.getFileFlag(i.flag);if(!a.isAppendable())return o(new h(s.EINVAL,"Flag passed to appendFile must allow for appending."));m(this.root).appendFile(w(t),e,i.encoding,a,i.mode,o)}catch(t){o(t)}},S.prototype.appendFileSync=function(t,e,n){var r=E(n,"utf8","a",420),i=y.getFileFlag(r.flag);if(!i.isAppendable())throw new h(s.EINVAL,"Flag passed to appendFile must allow for appending.");return m(this.root).appendFileSync(w(t),e,r.encoding,i,r.mode)},S.prototype.fstat=function(t,e){void 0===e&&(e=k);var n=v(e,2);try{this.fd2file(t).stat(n)}catch(t){n(t)}},S.prototype.fstatSync=function(t){return this.fd2file(t).statSync()},S.prototype.close=function(t,e){var n=this;void 0===e&&(e=k);var r=v(e,1);try{this.fd2file(t).close((function(e){e||n.closeFd(t),r(e)}))}catch(t){r(t)}},S.prototype.closeSync=function(t){this.fd2file(t).closeSync(),this.closeFd(t)},S.prototype.ftruncate=function(t,e,n){void 0===n&&(n=k);var r="number"==typeof e?e:0,i=v(n="function"==typeof e?e:n,1);try{var o=this.fd2file(t);if(r<0)throw new h(s.EINVAL);o.truncate(r,i)}catch(t){i(t)}},S.prototype.ftruncateSync=function(t,e){void 0===e&&(e=0);var n=this.fd2file(t);if(e<0)throw new h(s.EINVAL);n.truncateSync(e)},S.prototype.fsync=function(t,e){void 0===e&&(e=k);var n=v(e,1);try{this.fd2file(t).sync(n)}catch(t){n(t)}},S.prototype.fsyncSync=function(t){this.fd2file(t).syncSync()},S.prototype.fdatasync=function(t,e){void 0===e&&(e=k);var n=v(e,1);try{this.fd2file(t).datasync(n)}catch(t){n(t)}},S.prototype.fdatasyncSync=function(t){this.fd2file(t).datasyncSync()},S.prototype.write=function(e,n,r,i,o,a){void 0===a&&(a=k);var u,c,l,f=null;if("string"==typeof n){var p="utf8";switch(typeof r){case"function":a=r;break;case"number":f=r,p="string"==typeof i?i:"utf8",a="function"==typeof o?o:a;break;default:return(a="function"==typeof i?i:"function"==typeof o?o:a)(new h(s.EINVAL,"Invalid arguments."))}c=0,l=(u=t.from(n,p)).length}else u=n,c=r,l=i,f="number"==typeof o?o:null,a="function"==typeof o?o:a;var d=v(a,3);try{var y=this.fd2file(e);null==f&&(f=y.getPos()),y.write(u,c,l,f,d)}catch(t){d(t)}},S.prototype.writeSync=function(e,n,r,i,o){var a,s,u,c=0;if("string"==typeof n){u="number"==typeof r?r:null;var l="string"==typeof i?i:"utf8";c=0,s=(a=t.from(n,l)).length}else a=n,c=r,s=i,u="number"==typeof o?o:null;var f=this.fd2file(e);return null==u&&(u=f.getPos()),f.writeSync(a,c,s,u)},S.prototype.read=function(e,n,r,i,o,a){var s,u,c,l,f;if(void 0===a&&(a=k),"number"==typeof n){c=n,s=r;var h=i;a="function"==typeof o?o:a,u=0,l=t.alloc(c),f=v((function(t,e,n){if(t)return a(t);a(t,n.toString(h),e)}),3)}else l=n,u=r,c=i,s=o,f=v(a,3);try{var p=this.fd2file(e);null==s&&(s=p.getPos()),p.read(l,u,c,s,f)}catch(t){f(t)}},S.prototype.readSync=function(e,n,r,i,o){var a,s,u,c,l=!1,f="utf8";"number"==typeof n?(u=n,c=r,f=i,s=0,a=t.alloc(u),l=!0):(a=n,s=r,u=i,c=o);var h=this.fd2file(e);null==c&&(c=h.getPos());var p=h.readSync(a,s,u,c);return l?[a.toString(f),p]:p},S.prototype.fchown=function(t,e,n,r){void 0===r&&(r=k);var i=v(r,1);try{this.fd2file(t).chown(e,n,i)}catch(t){i(t)}},S.prototype.fchownSync=function(t,e,n){this.fd2file(t).chownSync(e,n)},S.prototype.fchmod=function(t,e,n){var r=v(n,1);try{var i="string"==typeof e?parseInt(e,8):e;this.fd2file(t).chmod(i,r)}catch(t){r(t)}},S.prototype.fchmodSync=function(t,e){var n="string"==typeof e?parseInt(e,8):e;this.fd2file(t).chmodSync(n)},S.prototype.futimes=function(t,e,n,r){void 0===r&&(r=k);var i=v(r,1);try{var o=this.fd2file(t);"number"==typeof e&&(e=new Date(1e3*e)),"number"==typeof n&&(n=new Date(1e3*n)),o.utimes(e,n,i)}catch(t){i(t)}},S.prototype.futimesSync=function(t,e,n){this.fd2file(t).utimesSync(_(e),_(n))},S.prototype.rmdir=function(t,e){void 0===e&&(e=k);var n=v(e,1);try{t=w(t),m(this.root).rmdir(t,n)}catch(t){n(t)}},S.prototype.rmdirSync=function(t){return t=w(t),m(this.root).rmdirSync(t)},S.prototype.mkdir=function(t,e,n){void 0===n&&(n=k),"function"==typeof e&&(n=e,e=511);var r=v(n,1);try{t=w(t),m(this.root).mkdir(t,e,r)}catch(t){r(t)}},S.prototype.mkdirSync=function(t,e){m(this.root).mkdirSync(w(t),b(e,511))},S.prototype.readdir=function(t,e){void 0===e&&(e=k);var n=v(e,2);try{t=w(t),m(this.root).readdir(t,n)}catch(t){n(t)}},S.prototype.readdirSync=function(t){return t=w(t),m(this.root).readdirSync(t)},S.prototype.link=function(t,e,n){void 0===n&&(n=k);var r=v(n,1);try{t=w(t),e=w(e),m(this.root).link(t,e,r)}catch(t){r(t)}},S.prototype.linkSync=function(t,e){return t=w(t),e=w(e),m(this.root).linkSync(t,e)},S.prototype.symlink=function(t,e,n,r){void 0===r&&(r=k);var i="string"==typeof n?n:"file",o=v(r="function"==typeof n?n:r,1);try{if("file"!==i&&"dir"!==i)return o(new h(s.EINVAL,"Invalid type: "+i));t=w(t),e=w(e),m(this.root).symlink(t,e,i,o)}catch(t){o(t)}},S.prototype.symlinkSync=function(t,e,n){if(n){if("file"!==n&&"dir"!==n)throw new h(s.EINVAL,"Invalid type: "+n)}else n="file";return t=w(t),e=w(e),m(this.root).symlinkSync(t,e,n)},S.prototype.readlink=function(t,e){void 0===e&&(e=k);var n=v(e,2);try{t=w(t),m(this.root).readlink(t,n)}catch(t){n(t)}},S.prototype.readlinkSync=function(t){return t=w(t),m(this.root).readlinkSync(t)},S.prototype.chown=function(t,e,n,r){void 0===r&&(r=k);var i=v(r,1);try{t=w(t),m(this.root).chown(t,!1,e,n,i)}catch(t){i(t)}},S.prototype.chownSync=function(t,e,n){t=w(t),m(this.root).chownSync(t,!1,e,n)},S.prototype.lchown=function(t,e,n,r){void 0===r&&(r=k);var i=v(r,1);try{t=w(t),m(this.root).chown(t,!0,e,n,i)}catch(t){i(t)}},S.prototype.lchownSync=function(t,e,n){t=w(t),m(this.root).chownSync(t,!0,e,n)},S.prototype.chmod=function(t,e,n){void 0===n&&(n=k);var r=v(n,1);try{var i=b(e,-1);if(i<0)throw new h(s.EINVAL,"Invalid mode.");m(this.root).chmod(w(t),!1,i,r)}catch(t){r(t)}},S.prototype.chmodSync=function(t,e){var n=b(e,-1);if(n<0)throw new h(s.EINVAL,"Invalid mode.");t=w(t),m(this.root).chmodSync(t,!1,n)},S.prototype.lchmod=function(t,e,n){void 0===n&&(n=k);var r=v(n,1);try{var i=b(e,-1);if(i<0)throw new h(s.EINVAL,"Invalid mode.");m(this.root).chmod(w(t),!0,i,r)}catch(t){r(t)}},S.prototype.lchmodSync=function(t,e){var n=b(e,-1);if(n<1)throw new h(s.EINVAL,"Invalid mode.");m(this.root).chmodSync(w(t),!0,n)},S.prototype.utimes=function(t,e,n,r){void 0===r&&(r=k);var i=v(r,1);try{m(this.root).utimes(w(t),_(e),_(n),i)}catch(t){i(t)}},S.prototype.utimesSync=function(t,e,n){m(this.root).utimesSync(w(t),_(e),_(n))},S.prototype.realpath=function(t,e,n){void 0===n&&(n=k);var r="object"==typeof e?e:{},i=v(n="function"==typeof e?e:k,2);try{t=w(t),m(this.root).realpath(t,r,i)}catch(t){i(t)}},S.prototype.realpathSync=function(t,e){return void 0===e&&(e={}),t=w(t),m(this.root).realpathSync(t,e)},S.prototype.watchFile=function(t,e,n){throw void 0===n&&(n=k),new h(s.ENOTSUP)},S.prototype.unwatchFile=function(t,e){throw void 0===e&&(e=k),new h(s.ENOTSUP)},S.prototype.watch=function(t,e,n){throw void 0===n&&(n=k),new h(s.ENOTSUP)},S.prototype.access=function(t,e,n){throw void 0===n&&(n=k),new h(s.ENOTSUP)},S.prototype.accessSync=function(t,e){throw new h(s.ENOTSUP)},S.prototype.createReadStream=function(t,e){throw new h(s.ENOTSUP)},S.prototype.createWriteStream=function(t,e){throw new h(s.ENOTSUP)},S.prototype.wrapCallbacks=function(t){v=t},S.prototype.getFdForFile=function(t){var e=this.nextFd++;return this.fdMap[e]=t,e},S.prototype.fd2file=function(t){var e=this.fdMap[t];if(e)return e;throw new h(s.EBADF,"Invalid file descriptor.")},S.prototype.closeFd=function(t){delete this.fdMap[t]},S.Stats=g;var x=new S,T={},P=S.prototype;function R(t,e,n,r,i){return t<e||n<e?t>n?n+1:t+1:r===i?e:e+1}function L(t,e){if(t===e)return 0;if(t.length>e.length){var n=t;t=e,e=n}for(var r=t.length,i=e.length;r>0&&t.charCodeAt(r-1)===e.charCodeAt(i-1);)r--,i--;for(var o=0;o<r&&t.charCodeAt(o)===e.charCodeAt(o);)o++;if(i-=o,0==(r-=o)||1===i)return i;for(var a,s,u,c,l,f=new Array(r<<1),h=0;h<r;)f[r+h]=t.charCodeAt(o+h),f[h]=++h;for(a=0;a+3<i;)for(var p=e.charCodeAt(o+(s=a)),d=e.charCodeAt(o+(u=a+1)),y=e.charCodeAt(o+(c=a+2)),g=e.charCodeAt(o+(l=a+3)),v=a+=4,m=0;m<r;){var b=f[r+m],_=f[m];s=R(_,s,u,p,b),u=R(s,u,c,d,b),c=R(u,c,l,y,b),v=R(c,l,v,g,b),f[m++]=v,l=c,c=u,u=s,s=_}for(var w=0;a<i;){var E=e.charCodeAt(o+(s=a));w=++a;for(var k=0;k<r;k++){var S=f[k];f[k]=w=S<s||w<s?S>w?w+1:S+1:E===f[r+k]?s:s+1,s=S}}return w}function A(t,e,n){}Object.keys(P).forEach((function(t){"function"==typeof x[t]?T[t]=function(){return x[t].apply(x,arguments)}:T[t]=x[t]})),T.changeFSModule=function(t){x=t},T.getFSModule=function(){return x},T.FS=S;var B="undefined"!=typeof navigator&&!(!/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())&&-1===navigator.userAgent.indexOf("Trident")),D="undefined"==typeof window;function I(){throw new Error("BFS has reached an impossible code path; please file a bug.")}function O(t,e,n){n.existsSync(t)||(O(c.dirname(t),e,n),n.mkdirSync(t,e))}function C(t){var e=N(t),n=e.byteOffset,r=e.byteLength;return 0===n&&r===e.buffer.byteLength?e.buffer:e.buffer.slice(n,n+r)}function N(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function F(e){return e instanceof t?e:e instanceof Uint8Array?M(e):t.from(e)}function M(e){return e instanceof t?e:0===e.byteOffset&&e.byteLength===e.buffer.byteLength?U(e.buffer):t.from(e.buffer,e.byteOffset,e.byteLength)}function U(e){return t.from(e)}function j(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=t.length),e<0||n<0||n>t.length||e>n)throw new TypeError("Invalid slice bounds on buffer of length "+t.length+": ["+e+", "+n+"]");if(0===t.length)return z();var r=N(t),i=t[0],o=(i+1)%255;return t[0]=o,r[0]===o?(r[0]=i,M(r.slice(e,n))):(t[0]=i,M(r.subarray(e,n)))}var H=null;function z(){return H||(H=t.alloc(0))}function W(e,n){t.isBuffer(e)?n():n(new h(s.EINVAL,"option must be a Buffer."))}function V(t,e,n){var r=t.Options,i=t.Name,o=0,a=!1,u=!1;function c(t){a||(t&&(a=!0,n(t)),0==--o&&u&&n())}var l=function(t){if(r.hasOwnProperty(t)){var u=r[t],l=e[t];if(null==l){if(!u.optional){var f=Object.keys(e).filter((function(t){return!(t in r)})).map((function(e){return{str:e,distance:L(t,e)}})).filter((function(t){return t.distance<5})).sort((function(t,e){return t.distance-e.distance}));return a?{}:(a=!0,{v:n(new h(s.EINVAL,"["+i+"] Required option '"+t+"' not provided."+(f.length>0?" You provided unrecognized option '"+f[0].str+"'; perhaps you meant to type '"+t+"'.":"")+"\nOption description: "+u.description))})}}else{if(!(Array.isArray(u.type)?-1!==u.type.indexOf(typeof l):typeof l===u.type))return a?{}:(a=!0,{v:n(new h(s.EINVAL,"["+i+"] Value provided for option "+t+" is not the proper type. Expected "+(Array.isArray(u.type)?"one of {"+u.type.join(", ")+"}":u.type)+", but received "+typeof l+"\nOption description: "+u.description))});u.validator&&(o++,u.validator(l,c))}}};for(var f in r){var p=l(f);if(p)return p.v}u=!0,0!==o||a||n()}var $=Object.freeze({deprecationMessage:A,isIE:B,isWebWorker:D,fail:I,mkdirpSync:O,buffer2ArrayBuffer:C,buffer2Uint8array:N,arrayish2Buffer:F,uint8Array2Buffer:M,arrayBuffer2Buffer:U,copyingSlice:j,emptyBuffer:z,bufferValidator:W,checkOptions:V}),X=function(t){this.fs=t,this.nodefs=t.getNodeFS(),this.FS=t.getFS(),this.PATH=t.getPATH(),this.ERRNO_CODES=t.getERRNO_CODES()};X.prototype.open=function(t){var e=this.fs.realPath(t.node),n=this.FS;try{n.isFile(t.node.mode)&&(t.nfd=this.nodefs.openSync(e,this.fs.flagsToPermissionString(t.flags)))}catch(t){if(!t.code)throw t;throw new n.ErrnoError(this.ERRNO_CODES[t.code])}},X.prototype.close=function(t){var e=this.FS;try{e.isFile(t.node.mode)&&t.nfd&&this.nodefs.closeSync(t.nfd)}catch(t){if(!t.code)throw t;throw new e.ErrnoError(this.ERRNO_CODES[t.code])}},X.prototype.read=function(t,e,n,r,i){try{return this.nodefs.readSync(t.nfd,M(e),n,r,i)}catch(t){throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},X.prototype.write=function(t,e,n,r,i){try{return this.nodefs.writeSync(t.nfd,M(e),n,r,i)}catch(t){throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},X.prototype.llseek=function(t,e,n){var r=e;if(1===n)r+=t.position;else if(2===n&&this.FS.isFile(t.node.mode))try{r+=this.nodefs.fstatSync(t.nfd).size}catch(t){throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}if(r<0)throw new this.FS.ErrnoError(this.ERRNO_CODES.EINVAL);return t.position=r,r};var Y=function(t){this.fs=t,this.nodefs=t.getNodeFS(),this.FS=t.getFS(),this.PATH=t.getPATH(),this.ERRNO_CODES=t.getERRNO_CODES()};Y.prototype.getattr=function(t){var e,n=this.fs.realPath(t);try{e=this.nodefs.lstatSync(n)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}return{dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,size:e.size,atime:e.atime,mtime:e.mtime,ctime:e.ctime,blksize:e.blksize,blocks:e.blocks}},Y.prototype.setattr=function(t,e){var n=this.fs.realPath(t);try{if(void 0!==e.mode&&(this.nodefs.chmodSync(n,e.mode),t.mode=e.mode),void 0!==e.timestamp){var r=new Date(e.timestamp);this.nodefs.utimesSync(n,r,r)}}catch(t){if(!t.code)throw t;if("ENOTSUP"!==t.code)throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}if(void 0!==e.size)try{this.nodefs.truncateSync(n,e.size)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},Y.prototype.lookup=function(t,e){var n=this.PATH.join2(this.fs.realPath(t),e),r=this.fs.getMode(n);return this.fs.createNode(t,e,r)},Y.prototype.mknod=function(t,e,n,r){var i=this.fs.createNode(t,e,n,r),o=this.fs.realPath(i);try{this.FS.isDir(i.mode)?this.nodefs.mkdirSync(o,i.mode):this.nodefs.writeFileSync(o,"",{mode:i.mode})}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}return i},Y.prototype.rename=function(t,e,n){var r=this.fs.realPath(t),i=this.PATH.join2(this.fs.realPath(e),n);try{this.nodefs.renameSync(r,i),t.name=n,t.parent=e}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},Y.prototype.unlink=function(t,e){var n=this.PATH.join2(this.fs.realPath(t),e);try{this.nodefs.unlinkSync(n)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},Y.prototype.rmdir=function(t,e){var n=this.PATH.join2(this.fs.realPath(t),e);try{this.nodefs.rmdirSync(n)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},Y.prototype.readdir=function(t){var e=this.fs.realPath(t);try{var n=this.nodefs.readdirSync(e);return n.push(".",".."),n}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},Y.prototype.symlink=function(t,e,n){var r=this.PATH.join2(this.fs.realPath(t),e);try{this.nodefs.symlinkSync(n,r)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}},Y.prototype.readlink=function(t){var e=this.fs.realPath(t);try{return this.nodefs.readlinkSync(e)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}};var G=function(t,e,n,r){void 0===t&&(t=self.FS),void 0===e&&(e=self.PATH),void 0===n&&(n=self.ERRNO_CODES),void 0===r&&(r=T),this.flagsToPermissionStringMap={0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},this.nodefs=r,this.FS=t,this.PATH=e,this.ERRNO_CODES=n,this.node_ops=new Y(this),this.stream_ops=new X(this)};G.prototype.mount=function(t){return this.createNode(null,"/",this.getMode(t.opts.root),0)},G.prototype.createNode=function(t,e,n,r){var i=this.FS;if(!i.isDir(n)&&!i.isFile(n)&&!i.isLink(n))throw new i.ErrnoError(this.ERRNO_CODES.EINVAL);var o=i.createNode(t,e,n);return o.node_ops=this.node_ops,o.stream_ops=this.stream_ops,o},G.prototype.getMode=function(t){var e;try{e=this.nodefs.lstatSync(t)}catch(t){if(!t.code)throw t;throw new this.FS.ErrnoError(this.ERRNO_CODES[t.code])}return e.mode},G.prototype.realPath=function(t){for(var e=[];t.parent!==t;)e.push(t.name),t=t.parent;return e.push(t.mount.opts.root),e.reverse(),this.PATH.join.apply(null,e)},G.prototype.flagsToPermissionString=function(t){var e="string"==typeof t?parseInt(t,10):t;return(e&=8191)in this.flagsToPermissionStringMap?this.flagsToPermissionStringMap[e]:t},G.prototype.getNodeFS=function(){return this.nodefs},G.prototype.getFS=function(){return this.FS},G.prototype.getPATH=function(){return this.PATH},G.prototype.getERRNO_CODES=function(){return this.ERRNO_CODES};var q=function(){};q.prototype.supportsLinks=function(){return!1},q.prototype.diskSpace=function(t,e){e(0,0)},q.prototype.openFile=function(t,e,n){throw new h(s.ENOTSUP)},q.prototype.createFile=function(t,e,n,r){throw new h(s.ENOTSUP)},q.prototype.open=function(t,e,n,r){var i=this;this.stat(t,!1,(function(o,a){if(o)switch(e.pathNotExistsAction()){case f.CREATE_FILE:return i.stat(c.dirname(t),!1,(function(o,a){o?r(o):a&&!a.isDirectory()?r(h.ENOTDIR(c.dirname(t))):i.createFile(t,e,n,r)