1 |
- !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t((function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),n=e(r),o=t((function(e){var t=r.default;e.exports=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));e(o);var i=t((function(e){var t=r.default;e.exports=function(e){var r=o(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}));e(i);var a=e(t((function(e){function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}e.exports=function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}))),s=e(t((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),u=t((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));e(u);var c=e(t((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=t((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));e(f);var l=t((function(e){var t=r.default;e.exports=function(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return f(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),d=e(l),p=t((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),h=e(p),m=t((function(e){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports}));e(m);var v=t((function(e){e.exports=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(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports}));e(v);var g=t((function(e){function t(r,n,o){return v()?(e.exports=t=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=t=function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));e(g);var y=t((function(e){function t(r){var n="function"==typeof Map?new Map:void 0;return e.exports=t=function(e){if(null===e||!m(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return g(e,arguments,p(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),u(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),w=e(y),b=t((function(e){function t(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports})),E=e(b),_=t((function(e){var t=r.default;function n(){e.exports=n=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exports;var r,o={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(r){d=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new R(n||[]);return s(i,"_invoke",{value:F(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}o.wrap=p;var m="suspendedStart",v="suspendedYield",g="executing",y="completed",w={};function b(){}function E(){}function _(){}var k={};d(k,c,(function(){return this}));var P=Object.getPrototypeOf,T=P&&P(P(j([])));T&&T!==i&&a.call(T,c)&&(k=T);var x=_.prototype=b.prototype=Object.create(k);function S(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(o,i,s,u){var c=h(e[o],e,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==t(l)&&a.call(l,"__await")?r.resolve(l.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(l).then((function(e){f.value=e,s(f)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(e,t){function i(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(i,i):i()}})}function F(e,t,n){var o=m;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===w)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=h(e,t,n);if("normal"===c.type){if(o=n.done?y:v,c.arg===w)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=y,n.method="throw",n.arg=c.arg)}}}function A(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,A(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=h(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,w;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,w):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,w)}function M(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 D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function j(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return E.prototype=_,s(x,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:E,configurable:!0}),E.displayName=d(_,l,"GeneratorFunction"),o.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,d(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},o.awrap=function(e){return{__await:e}},S(C.prototype),d(C.prototype,f,(function(){return this})),o.AsyncIterator=C,o.async=function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new C(p(e,t,r,n),i);return o.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(x),d(x,l,"Generator"),d(x,c,(function(){return this})),d(x,"toString",(function(){return"[object Generator]"})),o.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},o.values=j,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return s.type="throw",s.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,w):this.complete(i)},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),w},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;D(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),w}},o}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}));e(_);var k=_(),P=k;try{regeneratorRuntime=k}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=k:Function("r","regeneratorRuntime = r")(k)}function T(e){var t=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(e){return!1}}();return function(){var r,n=h(e);if(t){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return d(this,r)}}var x,S=(x="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("jessibuca-pro-mp4-recorder-decoder.js",document.baseURI).href,E(P.mark((function e(){var t,r,o,i,u,f,l,d,p,h,m,v,g,y,b,E,_,k,S,C,F,A,M,D,R,j,$,O,L,U,I,N,z,W,B,H,V,q,G,X,Y,J,K,Z,Q,ee,te,re,ne,oe,ie,ae,se,ue,ce,fe,le,de,pe,he,me,ve,ge,ye,we,be,Ee,_e,ke,Pe,Te,xe,Se,Ce,Fe,Ae,Me,De,Re,je,$e,Oe,Le,Ue,Ie,Ne,ze,We,Be,He,Ve,qe,Ge,Xe,Ye,Je,Ke,Ze,Qe,et,tt,rt,nt,ot,it,at,st,ut,ct,ft,lt,dt,pt,ht,mt,vt,gt,yt,wt,bt,Et,_t,kt,Pt,Tt,xt,St,Ct,Ft,At,Mt,Dt,Rt,jt,$t,Ot,Lt,Ut,It,Nt,zt,Wt,Bt,Ht,Vt,qt,Gt,Xt,Yt,Jt,Kt,Zt,Qt,er,tr,rr,nr,or,ir,ar,sr,ur,cr,fr,lr,dr,pr,hr,mr,vr,gr,yr,wr,br,Er,_r,kr,Pr,Tr,xr,Sr,Cr,Fr,Ar,Mr,Dr,Rr,jr,$r,Or,Lr,Ur,Ir,Nr,zr,Wr,Br,Hr,Vr,qr,Gr,Xr,Yr,Jr,Kr,Zr,Qr,en,tn,rn,nn,on,an,sn,un,cn,fn,ln,dn,pn,hn,mn,vn,gn,yn,wn,bn,En,_n,kn,Pn,Tn,xn,Sn,Cn,Fn,An,Mn,Dn,Rn,jn,$n,On,Ln,Un,In,Nn,zn,Wn=arguments;return P.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(zn=function(){function e(){Nn||(Nn=!0,r.calledRun=!0,D||(G(),o(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),X()))}Z>0||(q(),Z>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))},Cn=function(e,t,r,n){try{var o=We.getStreamFromFD(e),i=Sn(o,t,r);return I[n>>2]=i,0}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return e.errno}},xn=function(e,t,r,n,o){var i=Qr(t,r);try{if(isNaN(i))return 61;var a=We.getStreamFromFD(e);return Ne.llseek(a,i,n),he=[a.position>>>0,(pe=a.position,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[o>>2]=he[0],U[o+4>>2]=he[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return e.errno}},Tn=function(e,t,r,n){try{var o=We.getStreamFromFD(e),i=Pn(o,t,r);return I[n>>2]=i,0}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return e.errno}},kn=function(e,t){try{var r=We.getStreamFromFD(e),n=r.tty?2:Ne.isDir(r.mode)?3:Ne.isLink(r.mode)?7:4;return j[t>>0]=n,O[t+2>>1]=0,he=[0,(pe=0,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[t+8>>2]=he[0],U[t+12>>2]=he[1],he=[0,(pe=0,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[t+16>>2]=he[0],U[t+20>>2]=he[1],0}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return e.errno}},_n=function(e){try{var t=We.getStreamFromFD(e);return Ne.close(t),0}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return e.errno}},an=function(e,t,r){var n=Qr(e,t),o=new Date(1e3*n);U[r>>2]=o.getSeconds(),U[r+4>>2]=o.getMinutes(),U[r+8>>2]=o.getHours(),U[r+12>>2]=o.getDate(),U[r+16>>2]=o.getMonth(),U[r+20>>2]=o.getFullYear()-1900,U[r+24>>2]=o.getDay();var i=0|on(o);U[r+28>>2]=i,U[r+36>>2]=-60*o.getTimezoneOffset();var a=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=a.getTimezoneOffset(),c=0|(s!=u&&o.getTimezoneOffset()==Math.min(u,s));U[r+32>>2]=c},en=function(e,t,r){var n=Qr(e,t),o=new Date(1e3*n);U[r>>2]=o.getUTCSeconds(),U[r+4>>2]=o.getUTCMinutes(),U[r+8>>2]=o.getUTCHours(),U[r+12>>2]=o.getUTCDate(),U[r+16>>2]=o.getUTCMonth(),U[r+20>>2]=o.getUTCFullYear()-1900,U[r+24>>2]=o.getUTCDay();var i=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),a=(o.getTime()-i)/864e5|0;U[r+28>>2]=a},hr=function(e){return this.fromWireType(U[e>>2])},ur=function(){this.allocated=[void 0],this.freelist=[]},sr=function(){Object.assign(ur.prototype,{get:function(e){return this.allocated[e]},has:function(e){return void 0!==this.allocated[e]},allocate:function(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free:function(e){this.allocated[e]=void 0,this.freelist.push(e)}})},nr=function(e,t,r,n,o,i){var a=t.length;a<2&&Qe("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var f="void"!==t[0].name,l="",d="";for(c=0;c<a-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var p="\n return function (".concat(l,") {\n if (arguments.length !== ").concat(a-2,") {\n throwBindingError('function ").concat(e," called with ' + arguments.length + ' arguments, expected ").concat(a-2,"');\n }");u&&(p+="var destructors = [];\n");var h=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[Qe,n,o,tr,t[0],t[1]];for(s&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),c=0;c<a-2;++c)p+="var arg"+c+"Wired = argType"+c+".toWireType("+h+", arg"+c+"); // "+t[c+2].name+"\n",m.push("argType"+c),v.push(t[c+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),p+=(f||i?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",u)p+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var g=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(p+=g+"_dtor("+g+"); // "+t[c].name+"\n",m.push(g+"_dtor"),v.push(t[c].destructorFunction))}f&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",m.push(p);var y=rr(Function,m).apply(null,v);return Ft(e,y)},rr=function(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type ".concat(n(e)," which is not a function"));var r=Ft(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var o=new r,i=e.apply(o,t);return i instanceof Object?i:o},Nt=function(e,t,r,n,o,i,a,s,u,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=Ot:n?(this.toWireType=$t,this.destructorFunction=null):(this.toWireType=Lt,this.destructorFunction=null)},Ut=function(e){return this.fromWireType(I[e>>2])},Lt=function(e,t){if(null===t)return this.isReference&&Qe("null is not a valid ".concat(this.name)),0;t.$$||Qe('Cannot pass "'.concat(vr(t),'" as a ').concat(this.name)),t.$$.ptr||Qe("Cannot pass deleted object as a pointer of type ".concat(this.name)),t.$$.ptrType.isConst&&Qe("Cannot convert argument of type ".concat(t.$$.ptrType.name," to parameter type ").concat(this.name));var r=t.$$.ptrType.registeredClass;return jt(t.$$.ptr,r,this.registeredClass)},Ot=function(e,t){var r;if(null===t)return this.isReference&&Qe("null is not a valid ".concat(this.name)),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Qe('Cannot pass "'.concat(vr(t),'" as a ').concat(this.name)),t.$$.ptr||Qe("Cannot pass deleted object as a pointer of type ".concat(this.name)),!this.isConst&&t.$$.ptrType.isConst&&Qe("Cannot convert argument of type ".concat(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name," to parameter type ").concat(this.name));var n=t.$$.ptrType.registeredClass;if(r=jt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Qe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Qe("Cannot convert argument of type ".concat(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name," to parameter type ").concat(this.name));break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,pr.toHandle((function(){return o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Qe("Unsupporting sharing policy")}return r},$t=function(e,t){if(null===t)return this.isReference&&Qe("null is not a valid ".concat(this.name)),0;t.$$||Qe('Cannot pass "'.concat(vr(t),'" as a ').concat(this.name)),t.$$.ptr||Qe("Cannot pass deleted object as a pointer of type ".concat(this.name));var r=t.$$.ptrType.registeredClass;return jt(t.$$.ptr,r,this.registeredClass)},Rt=function(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]},Ct=function(){},Tt=function(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=kt(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=pt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=dt(t,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Pt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:e}):Pt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},ot=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return nt(e,t,r)},nt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.name;if(e||Qe('type "'.concat(n,'" must have a positive integer typeid pointer')),Je.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Qe("Cannot register type '".concat(n,"' twice"))}if(Je[e]=t,delete Ke[e],Ye.hasOwnProperty(e)){var o=Ye[e];delete Ye[e],o.forEach((function(e){return e()}))}},He=function(e,t,r,n){We.varargs=n;try{t=We.getStr(t),t=We.calculateAt(e,t);var o=n?We.get():0;return Ne.open(t,r,o).fd}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return-e.errno}},Be=function(e,t,r){We.varargs=r;try{var n=We.getStreamFromFD(e);switch(t){case 0:if((o=We.get())<0)return-28;for(;Ne.streams[o];)o++;return Ne.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=We.get();return n.flags|=o,0;case 5:return o=We.getp(),O[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ye(28),-1}}catch(e){if(void 0===Ne||"ErrnoError"!==e.name)throw e;return-e.errno}},Ce=function(e,t,r){var n=r>0?r:xe(e)+1,o=new Array(n),i=Se(e,o,0,o.length);return t&&(o.length=i),o},ve=function(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){I[this.ptr+4>>2]=e},this.get_type=function(){return I[this.ptr+4>>2]},this.set_destructor=function(e){I[this.ptr+8>>2]=e},this.get_destructor=function(){return I[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,j[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=j[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,j[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=j[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){I[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return I[this.ptr+16>>2]},this.get_exception_ptr=function(){if(In(this.get_type()))return I[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}},de=function(){var e={a:Dn};function t(e,t){return Rn=e.exports,M=Rn.S,W(),Ht=Rn.W,J(Rn.T),ne("wasm-instantiate"),Rn}if(re("wasm-instantiate"),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){F("Module.instantiateWasm callback failed with error: ".concat(e)),i(e)}return le(A,se,e,(function(e){t(e.instance)})).catch(i),{}},le=function(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||ie(t)||ae(t)||p||"function"!=typeof fetch?fe(t,r,n):fetch(t,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return F("wasm streaming compile failed: ".concat(e)),F("falling back to ArrayBuffer instantiation"),fe(t,r,n)}))}))},fe=function(e,t,r){return ce(e).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(r,(function(e){F("failed to asynchronously prepare wasm: ".concat(e)),oe(e)}))},ce=function(e){if(!A&&(l||d)){if("function"==typeof fetch&&!ae(e))return fetch(e,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((function(){return ue(e)}));if(g)return new Promise((function(t,r){g(e,(function(e){return t(new Uint8Array(e))}),r)}))}return Promise.resolve().then((function(){return ue(e)}))},ue=function(e){if(e==se&&A)return new Uint8Array(A);if(y)return y(e);throw"both async and sync fetching of the wasm failed"},oe=function(e){r.onAbort&&r.onAbort(e),F(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t},ne=function(e){if(Z--,r.monitorRunDependencies&&r.monitorRunDependencies(Z),0==Z&&(null!==Q&&(clearInterval(Q),Q=null),ee)){var t=ee;ee=null,t()}},re=function(e){Z++,r.monitorRunDependencies&&r.monitorRunDependencies(Z)},te=function(e){return e},K=function(e){V.unshift(e)},J=function(e){H.unshift(e)},Y=function(e){B.unshift(e)},X=function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)K(r.postRun.shift());me(V)},G=function(){r.noFSInit||Ne.init.initialized||Ne.init(),Ne.ignorePermissions=!1,Ae.init(),me(H)},q=function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)Y(r.preRun.shift());me(B)},W=function(){var e=M.buffer;r.HEAP8=j=new Int8Array(e),r.HEAP16=O=new Int16Array(e),r.HEAPU8=$=new Uint8Array(e),r.HEAPU16=L=new Uint16Array(e),r.HEAP32=U=new Int32Array(e),r.HEAPU32=I=new Uint32Array(e),r.HEAPF32=N=new Float32Array(e),r.HEAPF64=z=new Float64Array(e)},R=function(e,t){e||oe(t)},m=function(e){return r.locateFile?r.locateFile(e,h):h+e},(r=t=Wn.length>0&&void 0!==Wn[0]?Wn[0]:{}).ready=new Promise((function(e,t){o=e,i=t})),(r=void 0!==r?r:{}).locateFile=function(e){return"decoder-pro-mp4-recorder-decoder.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_MP4_RECORDER_WASM_URL&&""!=JESSIBUCA_PRO_MP4_RECORDER_WASM_URL?JESSIBUCA_PRO_MP4_RECORDER_WASM_URL:e},u=Object.assign({},r),f="./this.program",l="object"==("undefined"==typeof window?"undefined":n(window)),d="function"==typeof importScripts,p="object"==("undefined"==typeof process?"undefined":n(process))&&"object"==n(process.versions)&&"string"==typeof process.versions.node,h="",!p){e.next=76;break}return e.next=61,import("module");case 61:b=e.sent,E=b.createRequire,_=E("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("jessibuca-pro-mp4-recorder-decoder.js",document.baseURI).href),k=_("fs"),S=_("path"),h=d?S.dirname(h)+"/":_("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("jessibuca-pro-mp4-recorder-decoder.js",document.baseURI).href)),v=function(e,t){return e=ae(e)?new URL(e):S.normalize(e),k.readFileSync(e,t?void 0:"utf8")},y=function(e){var t=v(e,!0);return t.buffer||(t=new Uint8Array(t)),t},g=function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=ae(e)?new URL(e):S.normalize(e),k.readFile(e,n?void 0:"utf8",(function(e,o){e?r(e):t(n?o.buffer:o)}))},!r.thisProgram&&process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),r.inspect=function(){return"[Emscripten Module object]"},e.next=77;break;case 76:(l||d)&&(d?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),x&&(h=x),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",v=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(y=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});case 77:if(C=r.print||console.log.bind(console),F=r.printErr||console.error.bind(console),Object.assign(r,u),u=null,r.arguments&&r.arguments,r.thisProgram&&(f=r.thisProgram),r.quit&&r.quit,r.wasmBinary&&(A=r.wasmBinary),"object"!=("undefined"==typeof WebAssembly?"undefined":n(WebAssembly))&&oe("no native wasm support detected"),D=!1,B=[],H=[],V=[],Z=0,Q=null,ee=null,ie=function(e){return e.startsWith("data:application/octet-stream;base64,")},ae=function(e){return e.startsWith("file://")},r.locateFile?ie(se="jessibuca-pro-mp4-recorder-decoder.wasm")||(se=m(se)):se=new URL("jessibuca-pro-mp4-recorder-decoder.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("jessibuca-pro-mp4-recorder-decoder.js",document.baseURI).href).href,me=function(e){for(;e.length>0;)e.shift()(r)},r.noExitRuntime,ge=function(e,t,r){throw new ve(e).init(t,r),e},ye=function(e){return U[On()>>2]=e,e},we={isAbs:function(e){return"/"===e.charAt(0)},splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t=we.isAbs(e),r="/"===e.substr(-1);return(e=we.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=we.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=we.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return we.normalize(e.join("/"))},join2:function(e,t){return we.normalize(e+"/"+t)}},be=function(){if("object"==("undefined"==typeof crypto?"undefined":n(crypto))&&"function"==typeof crypto.getRandomValues)return function(e){return crypto.getRandomValues(e)};if(p)try{var e=_("crypto");if(e.randomFillSync)return function(t){return e.randomFillSync(t)};var t=e.randomBytes;return function(e){return e.set(t(e.byteLength)),e}}catch(e){}oe("initRandomDevice")},Ee=function(e){return(Ee=be())(e)},_e={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ne.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=we.isAbs(n)}return(t?"/":"")+(e=we.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=_e.resolve(e).substr(1),t=_e.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},ke="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Pe=function(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&ke)return ke.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i},Te=[],xe=function(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},Se=function(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o},Fe=function(){if(!Te.length){var e=null;if(p){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=k.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;Te=Ce(e,!0)}return Te.shift()},Ae={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){Ae.ttys[e]={input:[],output:[],ops:t},Ne.registerDevice(e,Ae.stream_ops)},stream_ops:{open:function(e){var t=Ae.ttys[e.node.rdev];if(!t)throw new Ne.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ne.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Ne.ErrnoError(29)}if(void 0===s&&0===i)throw new Ne.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Ne.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new Ne.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){return Fe()},put_char:function(e,t){null===t||10===t?(C(Pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(C(Pe(e.output,0)),e.output=[])},ioctl_tcgets:function(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function(e,t,r){return 0},ioctl_tiocgwinsz:function(e){return[24,80]}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(F(Pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(F(Pe(e.output,0)),e.output=[])}}},Me=function(e){oe()},De={ops_table:null,mount:function(e){return De.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(Ne.isBlkdev(r)||Ne.isFIFO(r))throw new Ne.ErrnoError(63);De.ops_table||(De.ops_table={dir:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr,lookup:De.node_ops.lookup,mknod:De.node_ops.mknod,rename:De.node_ops.rename,unlink:De.node_ops.unlink,rmdir:De.node_ops.rmdir,readdir:De.node_ops.readdir,symlink:De.node_ops.symlink},stream:{llseek:De.stream_ops.llseek}},file:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr},stream:{llseek:De.stream_ops.llseek,read:De.stream_ops.read,write:De.stream_ops.write,allocate:De.stream_ops.allocate,mmap:De.stream_ops.mmap,msync:De.stream_ops.msync}},link:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr,readlink:De.node_ops.readlink},stream:{}},chrdev:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr},stream:Ne.chrdev_stream_ops}});var o=Ne.createNode(e,t,r,n);return Ne.isDir(o.mode)?(o.node_ops=De.ops_table.dir.node,o.stream_ops=De.ops_table.dir.stream,o.contents={}):Ne.isFile(o.mode)?(o.node_ops=De.ops_table.file.node,o.stream_ops=De.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ne.isLink(o.mode)?(o.node_ops=De.ops_table.link.node,o.stream_ops=De.ops_table.link.stream):Ne.isChrdev(o.mode)&&(o.node_ops=De.ops_table.chrdev.node,o.stream_ops=De.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=Ne.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ne.isDir(e.mode)?t.size=4096:Ne.isFile(e.mode)?t.size=e.usedBytes:Ne.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&De.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Ne.genericErrors[44]},mknod:function(e,t,r,n){return De.createNode(e,t,r,n)},rename:function(e,t,r){if(Ne.isDir(e.mode)){var n;try{n=Ne.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new Ne.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=Ne.lookupNode(e,t);for(var n in r.contents)throw new Ne.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=De.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!Ne.isLink(e.mode))throw new Ne.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(t.buffer===j.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(De.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&Ne.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ne.ErrnoError(28);return n},allocate:function(e,t,r){De.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o){if(!Ne.isFile(e.node.mode))throw new Ne.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==j.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(i=Me()))throw new Ne.ErrnoError(48);j.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(e,t,r,n,o){return De.stream_ops.write(e,t,0,n,r,!1),0}}},Re=function(e,t,r,n){var o=n?"":te("al ".concat(e));g(e,(function(r){R(r,'Loading data file "'.concat(e,'" failed (no arrayBuffer).')),t(new Uint8Array(r)),o&&ne(o)}),(function(t){if(!r)throw'Loading data file "'.concat(e,'" failed.');r()})),o&&re(o)},je=function(e,t,r,n,o,i){Ne.createDataFile(e,t,r,n,o,i)},$e=r.preloadPlugins||[],Oe=function(e,t,r,n){"undefined"!=typeof Browser&&Browser.init();var o=!1;return $e.forEach((function(i){o||i.canHandle(t)&&(i.handle(e,t,r,n),o=!0)})),o},Le=function(e,t,r,n,o,i,a,s,u,c){var f=t?_e.resolve(we.join2(e,t)):e,l=te("cp ".concat(f));function d(r){function d(r){c&&c(),s||je(e,t,r,n,o,u),i&&i(),ne(l)}Oe(r,f,d,(function(){a&&a(),ne(l)}))||d(r)}re(l),"string"==typeof r?Re(r,(function(e){return d(e)}),a):d(r)},Ue=function(e){var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error("Unknown file open mode: ".concat(e));return t},Ie=function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},Ne={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=_e.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Ne.ErrnoError(32);for(var r=e.split("/").filter((function(e){return!!e})),n=Ne.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&t.parent)break;if(n=Ne.lookupNode(n,r[i]),o=we.join2(o,r[i]),Ne.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;Ne.isLink(n.mode);){var u=Ne.readlink(o);if(o=_e.resolve(we.dirname(o),u),n=Ne.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Ne.ErrnoError(32)}}return{path:o,node:n}},getPath:function(e){for(var t;;){if(Ne.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?"".concat(r,"/").concat(t):r+t:r}t=t?"".concat(e.name,"/").concat(t):e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Ne.nameTable.length},hashAddNode:function(e){var t=Ne.hashName(e.parent.id,e.name);e.name_next=Ne.nameTable[t],Ne.nameTable[t]=e},hashRemoveNode:function(e){var t=Ne.hashName(e.parent.id,e.name);if(Ne.nameTable[t]===e)Ne.nameTable[t]=e.name_next;else for(var r=Ne.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=Ne.mayLookup(e);if(r)throw new Ne.ErrnoError(r,e);for(var n=Ne.hashName(e.id,t),o=Ne.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return Ne.lookup(e,t)},createNode:function(e,t,r,n){var o=new Ne.FSNode(e,t,r,n);return Ne.hashAddNode(o),o},destroyNode:function(e){Ne.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return Ne.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2},mayLookup:function(e){var t=Ne.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return Ne.lookupNode(e,t),20}catch(e){}return Ne.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=Ne.lookupNode(e,t)}catch(e){return e.errno}var o=Ne.nodePermissions(e,"wx");if(o)return o;if(r){if(!Ne.isDir(n.mode))return 54;if(Ne.isRoot(n)||Ne.getPath(n)===Ne.cwd())return 10}else if(Ne.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?Ne.isLink(e.mode)?32:Ne.isDir(e.mode)&&("r"!==Ne.flagsToPermissionString(t)||512&t)?31:Ne.nodePermissions(e,Ne.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(){for(var e=0;e<=Ne.MAX_OPEN_FDS;e++)if(!Ne.streams[e])return e;throw new Ne.ErrnoError(33)},getStreamChecked:function(e){var t=Ne.getStream(e);if(!t)throw new Ne.ErrnoError(8);return t},getStream:function(e){return Ne.streams[e]},createStream:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Ne.FSStream||(Ne.FSStream=function(){this.shared={}},Ne.FSStream.prototype={},Object.defineProperties(Ne.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new Ne.FSStream,e),-1==t&&(t=Ne.nextfd()),e.fd=t,Ne.streams[t]=e,e},closeStream:function(e){Ne.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ne.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ne.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ne.devices[e]={stream_ops:t}},getDevice:function(e){return Ne.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ne.syncFSRequests++,Ne.syncFSRequests>1&&F("warning: ".concat(Ne.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"));var r=Ne.getMounts(Ne.root.mount),n=0;function o(e){return Ne.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){var n,o="/"===r,i=!r;if(o&&Ne.root)throw new Ne.ErrnoError(10);if(!o&&!i){var a=Ne.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,Ne.isMountpoint(n))throw new Ne.ErrnoError(10);if(!Ne.isDir(n.mode))throw new Ne.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Ne.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var t=Ne.lookupPath(e,{follow_mount:!1});if(!Ne.isMountpoint(t.node))throw new Ne.ErrnoError(28);var r=t.node,n=r.mounted,o=Ne.getMounts(n);Object.keys(Ne.nameTable).forEach((function(e){for(var t=Ne.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&Ne.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=Ne.lookupPath(e,{parent:!0}).node,o=we.basename(e);if(!o||"."===o||".."===o)throw new Ne.ErrnoError(28);var i=Ne.mayCreate(n,o);if(i)throw new Ne.ErrnoError(i);if(!n.node_ops.mknod)throw new Ne.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ne.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ne.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{Ne.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,Ne.mknod(e,t,r)},symlink:function(e,t){if(!_e.resolve(e))throw new Ne.ErrnoError(44);var r=Ne.lookupPath(t,{parent:!0}).node;if(!r)throw new Ne.ErrnoError(44);var n=we.basename(t),o=Ne.mayCreate(r,n);if(o)throw new Ne.ErrnoError(o);if(!r.node_ops.symlink)throw new Ne.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:function(e,t){var r,n,o=we.dirname(e),i=we.dirname(t),a=we.basename(e),s=we.basename(t);if(r=Ne.lookupPath(e,{parent:!0}).node,n=Ne.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ne.ErrnoError(44);if(r.mount!==n.mount)throw new Ne.ErrnoError(75);var u,c=Ne.lookupNode(r,a),f=_e.relative(e,i);if("."!==f.charAt(0))throw new Ne.ErrnoError(28);if("."!==(f=_e.relative(t,o)).charAt(0))throw new Ne.ErrnoError(55);try{u=Ne.lookupNode(n,s)}catch(e){}if(c!==u){var l=Ne.isDir(c.mode),d=Ne.mayDelete(r,a,l);if(d)throw new Ne.ErrnoError(d);if(d=u?Ne.mayDelete(n,s,l):Ne.mayCreate(n,s))throw new Ne.ErrnoError(d);if(!r.node_ops.rename)throw new Ne.ErrnoError(63);if(Ne.isMountpoint(c)||u&&Ne.isMountpoint(u))throw new Ne.ErrnoError(10);if(n!==r&&(d=Ne.nodePermissions(r,"w")))throw new Ne.ErrnoError(d);Ne.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{Ne.hashAddNode(c)}}},rmdir:function(e){var t=Ne.lookupPath(e,{parent:!0}).node,r=we.basename(e),n=Ne.lookupNode(t,r),o=Ne.mayDelete(t,r,!0);if(o)throw new Ne.ErrnoError(o);if(!t.node_ops.rmdir)throw new Ne.ErrnoError(63);if(Ne.isMountpoint(n))throw new Ne.ErrnoError(10);t.node_ops.rmdir(t,r),Ne.destroyNode(n)},readdir:function(e){var t=Ne.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ne.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(e){var t=Ne.lookupPath(e,{parent:!0}).node;if(!t)throw new Ne.ErrnoError(44);var r=we.basename(e),n=Ne.lookupNode(t,r),o=Ne.mayDelete(t,r,!1);if(o)throw new Ne.ErrnoError(o);if(!t.node_ops.unlink)throw new Ne.ErrnoError(63);if(Ne.isMountpoint(n))throw new Ne.ErrnoError(10);t.node_ops.unlink(t,r),Ne.destroyNode(n)},readlink:function(e){var t=Ne.lookupPath(e).node;if(!t)throw new Ne.ErrnoError(44);if(!t.node_ops.readlink)throw new Ne.ErrnoError(28);return _e.resolve(Ne.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,t){var r=Ne.lookupPath(e,{follow:!t}).node;if(!r)throw new Ne.ErrnoError(44);if(!r.node_ops.getattr)throw new Ne.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(e){return Ne.stat(e,!0)},chmod:function(e,t,r){var n;if(!(n="string"==typeof e?Ne.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Ne.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,t){Ne.chmod(e,t,!0)},fchmod:function(e,t){var r=Ne.getStreamChecked(e);Ne.chmod(r.node,t)},chown:function(e,t,r,n){var o;if(!(o="string"==typeof e?Ne.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Ne.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,t,r){Ne.chown(e,t,r,!0)},fchown:function(e,t,r){var n=Ne.getStreamChecked(e);Ne.chown(n.node,t,r)},truncate:function(e,t){if(t<0)throw new Ne.ErrnoError(28);var r;if(!(r="string"==typeof e?Ne.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Ne.ErrnoError(63);if(Ne.isDir(r.mode))throw new Ne.ErrnoError(31);if(!Ne.isFile(r.mode))throw new Ne.ErrnoError(28);var n=Ne.nodePermissions(r,"w");if(n)throw new Ne.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=Ne.getStreamChecked(e);if(0==(2097155&r.flags))throw new Ne.ErrnoError(28);Ne.truncate(r.node,t)},utime:function(e,t,r){var n=Ne.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:function(e,t,o){if(""===e)throw new Ne.ErrnoError(44);var i;if(o=void 0===o?438:o,o=64&(t="string"==typeof t?Ue(t):t)?4095&o|32768:0,"object"==n(e))i=e;else{e=we.normalize(e);try{i=Ne.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t)if(i){if(128&t)throw new Ne.ErrnoError(20)}else i=Ne.mknod(e,o,0),a=!0;if(!i)throw new Ne.ErrnoError(44);if(Ne.isChrdev(i.mode)&&(t&=-513),65536&t&&!Ne.isDir(i.mode))throw new Ne.ErrnoError(54);if(!a){var s=Ne.mayOpen(i,t);if(s)throw new Ne.ErrnoError(s)}512&t&&!a&&Ne.truncate(i,0),t&=-131713;var u=Ne.createStream({node:i,path:Ne.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!r.logReadFiles||1&t||(Ne.readFiles||(Ne.readFiles={}),e in Ne.readFiles||(Ne.readFiles[e]=1)),u},close:function(e){if(Ne.isClosed(e))throw new Ne.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ne.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ne.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ne.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,n,o){if(n<0||o<0)throw new Ne.ErrnoError(28);if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(1==(2097155&e.flags))throw new Ne.ErrnoError(8);if(Ne.isDir(e.node.mode))throw new Ne.ErrnoError(31);if(!e.stream_ops.read)throw new Ne.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Ne.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:function(e,t,r,n,o,i){if(n<0||o<0)throw new Ne.ErrnoError(28);if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(0==(2097155&e.flags))throw new Ne.ErrnoError(8);if(Ne.isDir(e.node.mode))throw new Ne.ErrnoError(31);if(!e.stream_ops.write)throw new Ne.ErrnoError(28);e.seekable&&1024&e.flags&&Ne.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new Ne.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:function(e,t,r){if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(t<0||r<=0)throw new Ne.ErrnoError(28);if(0==(2097155&e.flags))throw new Ne.ErrnoError(8);if(!Ne.isFile(e.node.mode)&&!Ne.isDir(e.node.mode))throw new Ne.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ne.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Ne.ErrnoError(2);if(1==(2097155&e.flags))throw new Ne.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ne.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:function(e,t,r,n,o){return e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new Ne.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'.concat(r.encoding,'"'));var n=Ne.open(e,r.flags),o=Ne.stat(e).size,i=new Uint8Array(o);return Ne.read(n,i,0,o,0),"utf8"===r.encoding?t=Pe(i,0):"binary"===r.encoding&&(t=i),Ne.close(n),t},writeFile:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=Ne.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(xe(t)+1),i=Se(t,o,0,o.length);Ne.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ne.write(n,t,0,t.byteLength,void 0,r.canOwn)}Ne.close(n)},cwd:function(){return Ne.currentPath},chdir:function(e){var t=Ne.lookupPath(e,{follow:!0});if(null===t.node)throw new Ne.ErrnoError(44);if(!Ne.isDir(t.node.mode))throw new Ne.ErrnoError(54);var r=Ne.nodePermissions(t.node,"x");if(r)throw new Ne.ErrnoError(r);Ne.currentPath=t.path},createDefaultDirectories:function(){Ne.mkdir("/tmp"),Ne.mkdir("/home"),Ne.mkdir("/home/web_user")},createDefaultDevices:function(){Ne.mkdir("/dev"),Ne.registerDevice(Ne.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),Ne.mkdev("/dev/null",Ne.makedev(1,3)),Ae.register(Ne.makedev(5,0),Ae.default_tty_ops),Ae.register(Ne.makedev(6,0),Ae.default_tty1_ops),Ne.mkdev("/dev/tty",Ne.makedev(5,0)),Ne.mkdev("/dev/tty1",Ne.makedev(6,0));var e=new Uint8Array(1024),t=0,r=function(){return 0===t&&(t=Ee(e).byteLength),e[--t]};Ne.createDevice("/dev","random",r),Ne.createDevice("/dev","urandom",r),Ne.mkdir("/dev/shm"),Ne.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Ne.mkdir("/proc");var e=Ne.mkdir("/proc/self");Ne.mkdir("/proc/self/fd"),Ne.mount({mount:function(){var t=Ne.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(e,t){var r=+t,n=Ne.getStreamChecked(r),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){r.stdin?Ne.createDevice("/dev","stdin",r.stdin):Ne.symlink("/dev/tty","/dev/stdin"),r.stdout?Ne.createDevice("/dev","stdout",null,r.stdout):Ne.symlink("/dev/tty","/dev/stdout"),r.stderr?Ne.createDevice("/dev","stderr",null,r.stderr):Ne.symlink("/dev/tty1","/dev/stderr"),Ne.open("/dev/stdin",0),Ne.open("/dev/stdout",1),Ne.open("/dev/stderr",1)},ensureErrnoError:function(){Ne.ErrnoError||(Ne.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ne.ErrnoError.prototype=new Error,Ne.ErrnoError.prototype.constructor=Ne.ErrnoError,[44].forEach((function(e){Ne.genericErrors[e]=new Ne.ErrnoError(e),Ne.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:function(){Ne.ensureErrnoError(),Ne.nameTable=new Array(4096),Ne.mount(De,{},"/"),Ne.createDefaultDirectories(),Ne.createDefaultDevices(),Ne.createSpecialDirectories(),Ne.filesystems={MEMFS:De}},init:function(e,t,n){Ne.init.initialized=!0,Ne.ensureErrnoError(),r.stdin=e||r.stdin,r.stdout=t||r.stdout,r.stderr=n||r.stderr,Ne.createStandardStreams()},quit:function(){Ne.init.initialized=!1;for(var e=0;e<Ne.streams.length;e++){var t=Ne.streams[e];t&&Ne.close(t)}},findObject:function(e,t){var r=Ne.analyzePath(e,t);return r.exists?r.object:null},analyzePath:function(e,t){try{e=(n=Ne.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Ne.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=we.basename(e),n=Ne.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:function(e,t,r,n){e="string"==typeof e?e:Ne.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=we.join2(e,i);try{Ne.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){var i=we.join2("string"==typeof e?e:Ne.getPath(e),t),a=Ie(n,o);return Ne.create(i,a)},createDataFile:function(e,t,r,n,o,i){var a=t;e&&(e="string"==typeof e?e:Ne.getPath(e),a=t?we.join2(e,t):e);var s=Ie(n,o),u=Ne.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}Ne.chmod(u,146|s);var d=Ne.open(u,577);Ne.write(d,r,0,r.length,0,i),Ne.close(d),Ne.chmod(u,s)}},createDevice:function(e,t,r,n){var o=we.join2("string"==typeof e?e:Ne.getPath(e),t),i=Ie(!!r,!!n);Ne.createDevice.major||(Ne.createDevice.major=64);var a=Ne.makedev(Ne.createDevice.major++,0);return Ne.registerDevice(a,{open:function(e){e.seekable=!1},close:function(e){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(e){throw new Ne.ErrnoError(29)}if(void 0===u&&0===a)throw new Ne.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new Ne.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Ne.mkdev(o,i,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!v)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ce(v(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Ne.ErrnoError(29)}},createLazyFile:function(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Ce(o.responseText||"",!0)}(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,C("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=Ne.createFile(e,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(e,t,r,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((function(e){var t=u.stream_ops[e];c[e]=function(){return Ne.forceLoadFile(u),t.apply(null,arguments)}})),c.read=function(e,t,r,n,o){return Ne.forceLoadFile(u),f(e,t,r,n,o)},c.mmap=function(e,t,r,n,o){Ne.forceLoadFile(u);var i=Me();if(!i)throw new Ne.ErrnoError(48);return f(e,j,i,t,r),{ptr:i,allocated:!0}},u.stream_ops=c,u}},ze=function(e,t){return e?Pe($,e,t):""},We={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(we.isAbs(t))return t;var n;if(n=-100===e?Ne.cwd():We.getStreamFromFD(e).path,0==t.length){if(!r)throw new Ne.ErrnoError(44);return n}return we.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&we.normalize(t)!==we.normalize(Ne.getPath(e.node)))return-54;throw e}U[r>>2]=n.dev,U[r+4>>2]=n.mode,I[r+8>>2]=n.nlink,U[r+12>>2]=n.uid,U[r+16>>2]=n.gid,U[r+20>>2]=n.rdev,he=[n.size>>>0,(pe=n.size,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[r+24>>2]=he[0],U[r+28>>2]=he[1],U[r+32>>2]=4096,U[r+36>>2]=n.blocks;var o=n.atime.getTime(),i=n.mtime.getTime(),a=n.ctime.getTime();return he=[Math.floor(o/1e3)>>>0,(pe=Math.floor(o/1e3),+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[r+40>>2]=he[0],U[r+44>>2]=he[1],I[r+48>>2]=o%1e3*1e3,he=[Math.floor(i/1e3)>>>0,(pe=Math.floor(i/1e3),+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[r+56>>2]=he[0],U[r+60>>2]=he[1],I[r+64>>2]=i%1e3*1e3,he=[Math.floor(a/1e3)>>>0,(pe=Math.floor(a/1e3),+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[r+72>>2]=he[0],U[r+76>>2]=he[1],I[r+80>>2]=a%1e3*1e3,he=[n.ino>>>0,(pe=n.ino,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],U[r+88>>2]=he[0],U[r+92>>2]=he[1],0},doMsync:function(e,t,r,n,o){if(!Ne.isFile(t.node.mode))throw new Ne.ErrnoError(43);if(2&n)return 0;var i=$.slice(e,e+r);Ne.msync(t,i,o,r,n)},varargs:void 0,get:function(){var e=U[+We.varargs>>2];return We.varargs+=4,e},getp:function(){return We.get()},getStr:function(e){return ze(e)},getStreamFromFD:function(e){return Ne.getStreamChecked(e)}},Ve=function(e,t,r,n,o){},qe=function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ge=e},Xe=function(e){for(var t="",r=e;$[r];)t+=Ge[$[r++]];return t},Ye={},Je={},Ke={},Qe=function(e){throw new Ze(e)},tt=function(e){throw new et(e)},rt=function(e,t,r){function n(t){var n=r(t);n.length!==e.length&&tt("Mismatched type converter count");for(var o=0;o<e.length;++o)ot(e[o],n[o])}e.forEach((function(e){Ke[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){Je.hasOwnProperty(e)?o[t]=Je[e]:(i.push(e),Ye.hasOwnProperty(e)||(Ye[e]=[]),Ye[e].push((function(){o[t]=Je[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)},it=function(e,t,r,n){t=Xe(t),ot(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType($[e])},destructorFunction:null})},at=function(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}},st=function(e){Qe(e.$$.ptrType.registeredClass.name+" instance already deleted")},ut=!1,ct=function(e){},ft=function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},lt=function(e){e.count.value-=1,0===e.count.value&&ft(e)},dt=function e(t,r,n){if(r===n)return t;if(void 0===n.baseClass)return null;var o=e(t,r,n.baseClass);return null===o?null:n.downcast(o)},pt={},ht=function(){return Object.keys(Et).length},mt=function(){var e=[];for(var t in Et)Et.hasOwnProperty(t)&&e.push(Et[t]);return e},vt=[],gt=function(){for(;vt.length;){var e=vt.pop();e.$$.deleteScheduled=!1,e.delete()}},wt=function(e){yt=e,vt.length&&yt&&yt(gt)},bt=function(){r.getInheritedInstanceCount=ht,r.getLiveInheritedInstances=mt,r.flushPendingDeletes=gt,r.setDelayFunction=wt},Et={},_t=function(e,t){for(void 0===t&&Qe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},kt=function(e,t){return t=_t(e,t),Et[t]},Pt=function(e,t){return t.ptrType&&t.ptr||tt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&tt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},xt(Object.create(e,{$$:{value:t}}))},xt=function(e){return"undefined"==typeof FinalizationRegistry?(xt=function(e){return e},e):(ut=new FinalizationRegistry((function(e){lt(e.$$)})),xt=function(e){var t=e.$$;if(t.smartPtr){var r={$$:t};ut.register(e,r,e)}return e},ct=function(e){return ut.unregister(e)},xt(e))},St=function(){Object.assign(Ct.prototype,{isAliasOf:function(e){if(!(this instanceof Ct))return!1;if(!(e instanceof Ct))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o},clone:function(){if(this.$$.ptr||st(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=xt(Object.create(Object.getPrototypeOf(this),{$$:{value:at(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete:function(){this.$$.ptr||st(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Qe("Object already scheduled for deletion"),ct(this),lt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted:function(){return!this.$$.ptr},deleteLater:function(){return this.$$.ptr||st(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Qe("Object already scheduled for deletion"),vt.push(this),1===vt.length&&yt&&yt(gt),this.$$.deleteScheduled=!0,this}})},Ft=function(e,t){return Object.defineProperty(t,"name",{value:e})},At=function(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Qe("Function '".concat(r,"' called with an invalid number of arguments (").concat(arguments.length,") - expects one of (").concat(e[t].overloadTable,")!")),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},Mt=function(e,t,n){r.hasOwnProperty(e)?((void 0===n||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[n])&&Qe("Cannot register public name '".concat(e,"' twice")),At(r,e,e),r.hasOwnProperty(n)&&Qe("Cannot register multiple overloads of a function with the same number of arguments (".concat(n,")!")),r[e].overloadTable[n]=t):(r[e]=t,void 0!==n&&(r[e].numArguments=n))},Dt=function(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_".concat(e):e},jt=function(e,t,r){for(;t!==r;)t.upcast||Qe("Expected null or instance of ".concat(r.name,", got an instance of ").concat(t.name)),e=t.upcast(e),t=t.baseClass;return e},It=function(){Object.assign(Nt.prototype,{getPointee:function(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor:function(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:8,readValueFromPointer:Ut,deleteObject:function(e){null!==e&&e.delete()},fromWireType:Tt})},zt=function(e,t,n){r.hasOwnProperty(e)||tt("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==n?r[e].overloadTable[n]=t:(r[e]=t,r[e].argCount=n)},Wt=function(e,t,n){var o=r["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},Bt=[],Vt=function(e){var t=Bt[e];return t||(e>=Bt.length&&(Bt.length=e+1),Bt[e]=t=Ht.get(e)),t},qt=function(e,t,r){return e.includes("j")?Wt(e,t,r):Vt(t).apply(null,r)},Gt=function(e,t){var r=[];return function(){return r.length=0,Object.assign(r,arguments),qt(e,t,r)}},Xt=function(e,t){var r=(e=Xe(e)).includes("j")?Gt(e,t):Vt(t);return"function"!=typeof r&&Qe("unknown function pointer with signature ".concat(e,": ").concat(t)),r},Yt=function(e,t){var r=Ft(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:"".concat(this.name,": ").concat(this.message)},r},Kt=function(e){var t=Ln(e),r=Xe(t);return $n(t),r},Zt=function(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Je[t]||(Ke[t]?Ke[t].forEach(e):(r.push(t),n[t]=!0))})),new Jt("".concat(e,": ")+r.map(Kt).join([", "]))},Qt=function(e,t,r,n,o,i,a,s,u,c,f,l,d){f=Xe(f),i=Xt(o,i),s&&(s=Xt(a,s)),c&&(c=Xt(u,c)),d=Xt(l,d);var p=Dt(f);Mt(p,(function(){Zt("Cannot construct ".concat(f," due to unbound types"),[n])})),rt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Ct.prototype;var a=Ft(f,(function(){if(Object.getPrototypeOf(this)!==u)throw new Ze("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new Ze(f+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new Ze("Tried to invoke ctor of ".concat(f," with invalid number of parameters (").concat(arguments.length,") - expected (").concat(Object.keys(l.constructor_body).toString(),") parameters instead!"));return e.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var l=new Rt(f,a,u,d,r,i,s,c);l.baseClass&&(void 0===l.baseClass.__derivedClasses&&(l.baseClass.__derivedClasses=[]),l.baseClass.__derivedClasses.push(l));var h=new Nt(f,l,!0,!1,!1),m=new Nt(f+"*",l,!1,!1,!1),v=new Nt(f+" const*",l,!1,!0,!1);return pt[e]={pointerType:m,constPointerType:v},zt(p,a),[h,m,v]}))},er=function(e,t){for(var r=[],n=0;n<e;n++)r.push(I[t+4*n>>2]);return r},tr=function(e){for(;e.length;){var t=e.pop();e.pop()(t)}},or=function(e,t,r,n,o,i){var a=er(t,r);o=Xt(n,o),rt([],[e],(function(e){e=e[0];var r="constructor ".concat(e.name);if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Ze("Cannot register multiple constructors with identical number of parameters (".concat(t-1,") for class '").concat(e.name,"'! Overload resolution is currently only performed using the parameter count, not actual type info!"));return e.registeredClass.constructor_body[t-1]=function(){Zt("Cannot construct ".concat(e.name," due to unbound types"),a)},rt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=nr(r,n,null,o,i),[]})),[]}))},ir=function(e){var t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},ar=function(e,t,r,n,o,i,a,s,u){var c=er(r,n);t=Xe(t),t=ir(t),i=Xt(o,i),rt([],[e],(function(e){e=e[0];var n="".concat(e.name,".").concat(t);function o(){Zt("Cannot call ".concat(n," due to unbound types"),c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var f=e.registeredClass.instancePrototype,l=f[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(o.argCount=r-2,o.className=e.name,f[t]=o):(At(f,t,n),f[t].overloadTable[r-2]=o),rt([],c,(function(o){var s=nr(n,o,e,i,a,u);return void 0===f[t].overloadTable?(s.argCount=r-2,f[t]=s):f[t].overloadTable[r-2]=s,[]})),[]}))},cr=new ur,fr=function(e){e>=cr.reserved&&0==--cr.get(e).refcount&&cr.free(e)},lr=function(){for(var e=0,t=cr.reserved;t<cr.allocated.length;++t)void 0!==cr.allocated[t]&&++e;return e},dr=function(){cr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),cr.reserved=cr.allocated.length,r.count_emval_handles=lr},pr={toValue:function(e){return e||Qe("Cannot use deleted val. handle = "+e),cr.get(e).value},toHandle:function(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return cr.allocate({refcount:1,value:e})}}},mr=function(e,t){t=Xe(t),ot(e,{name:t,fromWireType:function(e){var t=pr.toValue(e);return fr(e),t},toWireType:function(e,t){return pr.toHandle(t)},argPackAdvance:8,readValueFromPointer:hr,destructorFunction:null})},vr=function(e){if(null===e)return"null";var t=n(e);return"object"===t||"array"===t||"function"===t?e.toString():""+e},gr=function(e,t){switch(t){case 4:return function(e){return this.fromWireType(N[e>>2])};case 8:return function(e){return this.fromWireType(z[e>>3])};default:throw new TypeError("invalid float width (".concat(t,"): ").concat(e))}},yr=function(e,t,r){t=Xe(t),ot(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:gr(t,r),destructorFunction:null})},wr=function(e,t,r){switch(t){case 1:return r?function(e){return j[e>>0]}:function(e){return $[e>>0]};case 2:return r?function(e){return O[e>>1]}:function(e){return L[e>>1]};case 4:return r?function(e){return U[e>>2]}:function(e){return I[e>>2]};default:throw new TypeError("invalid integer width (".concat(t,"): ").concat(e))}},br=function(e,t,r,n,o){t=Xe(t);var i=function(e){return e};if(0===n){var a=32-8*r;i=function(e){return e<<a>>>a}}var s=t.includes("unsigned");ot(e,{name:t,fromWireType:i,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:wr(t,r,0!==n),destructorFunction:null})},Er=function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=I[e>>2],r=I[e+4>>2];return new n(j.buffer,r,t)}r=Xe(r),ot(e,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_r=function(e,t,r){return Se(e,$,t,r)},kr=function(e,t){var r="std::string"===(t=Xe(t));ot(e,{name:t,fromWireType:function(e){var t,n=I[e>>2],o=e+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==$[s]){var u=ze(i,s-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode($[o+a]);t=c.join("")}return $n(e),t},toWireType:function(e,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Qe("Cannot pass non-string to std::string"),n=r&&o?xe(t):t.length;var i=jn(4+n+1),a=i+4;if(I[i>>2]=n,r&&o)_r(t,a,n+1);else if(o)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&($n(a),Qe("String has UTF-16 code units that do not fit in 8 bits")),$[a+s]=u}else for(s=0;s<n;++s)$[a+s]=t[s];return null!==e&&e.push($n,i),i},argPackAdvance:8,readValueFromPointer:Ut,destructorFunction:function(e){$n(e)}})},Pr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Tr=function(e,t){for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&L[n];)++n;if((r=n<<1)-e>32&&Pr)return Pr.decode($.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=O[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i},xr=function(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);O[t>>1]=a,t+=2}return O[t>>1]=0,t-n},Sr=function(e){return 2*e.length},Cr=function(e,t){for(var r=0,n="";!(r>=t/4);){var o=U[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n},Fr=function(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),U[t>>2]=a,(t+=4)+4>o)break}return U[t>>2]=0,t-n},Ar=function(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},Mr=function(e,t,r){var n,o,i,a,s;r=Xe(r),2===t?(n=Tr,o=xr,a=Sr,i=function(){return L},s=1):4===t&&(n=Cr,o=Fr,a=Ar,i=function(){return I},s=2),ot(e,{name:r,fromWireType:function(e){for(var r,o=I[e>>2],a=i(),u=e+4,c=0;c<=o;++c){var f=e+4+c*t;if(c==o||0==a[f>>s]){var l=n(u,f-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=f+t}}return $n(e),r},toWireType:function(e,n){"string"!=typeof n&&Qe("Cannot pass non-string to C++ string type ".concat(r));var i=a(n),u=jn(4+i+t);return I[u>>2]=i>>s,o(n,u+4,i+t),null!==e&&e.push($n,u),u},argPackAdvance:8,readValueFromPointer:hr,destructorFunction:function(e){$n(e)}})},Dr=function(e,t){t=Xe(t),ot(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},Rr=function(){return 1},jr=function(e,t){var r=Je[e];return void 0===r&&Qe(t+" has unknown type "+Kt(e)),r},$r=function(e,t,r){var n=[],o=e.toWireType(n,r);return n.length&&(I[t>>2]=pr.toHandle(n)),o},Or=function(e,t,r){return e=pr.toValue(e),t=jr(t,"emval::as"),$r(t,r,e)},Lr={},Ur=function(e){var t=Lr[e];return void 0===t?Xe(e):t},Ir=[],Nr=function(e,t,r,n,o){return(e=Ir[e])(t=pr.toValue(t),t[r=Ur(r)],n,o)},zr=function(){return"object"==("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis:Function("return this")()},Wr=function(e){return 0===e?pr.toHandle(zr()):(e=Ur(e),pr.toHandle(zr()[e]))},Br=function(e){var t=Ir.length;return Ir.push(e),t},Hr=function(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=jr(I[t+4*n>>2],"parameter "+n);return r},Vr=function(e,t,r){var n=Hr(e,t),o=n.shift();e--;var i="return function (obj, func, destructorsRef, args) {\n",a=0,s=[];0===r&&s.push("obj");for(var u=["retType"],c=[o],f=0;f<e;++f)s.push("arg"+f),u.push("argType"+f),c.push(n[f]),i+=" var arg".concat(f," = argType").concat(f,".readValueFromPointer(args").concat(a?"+"+a:"",");\n"),a+=n[f].argPackAdvance;for(i+=" var rv = ".concat(1===r?"new func":"func.call","(").concat(s.join(", "),");\n"),f=0;f<e;++f)n[f].deleteObject&&(i+=" argType".concat(f,".deleteObject(arg").concat(f,");\n"));o.isVoid||(u.push("emval_returnValue"),c.push($r),i+=" return emval_returnValue(retType, destructorsRef, rv);\n"),i+="};\n",u.push(i);var l=rr(Function,u).apply(null,c),d="methodCaller<(".concat(n.map((function(e){return e.name})).join(", "),") => ").concat(o.name,">");return Br(Ft(d,l))},qr=function(e,t){return e=pr.toValue(e),t=pr.toValue(t),pr.toHandle(e[t])},Gr=function(e){e>4&&(cr.get(e).refcount+=1)},Xr=function(e){return pr.toHandle(Ur(e))},Yr=function(){return pr.toHandle({})},Jr=function(e){var t=pr.toValue(e);tr(t),fr(e)},Kr=function(e,t,r){e=pr.toValue(e),t=pr.toValue(t),r=pr.toValue(r),e[t]=r},Zr=function(e,t){var r=(e=jr(e,"_emval_take_value")).readValueFromPointer(t);return pr.toHandle(r)},Qr=function(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN},tn=function(e){return e%4==0&&(e%100!=0||e%400==0)},rn=[0,31,60,91,121,152,182,213,244,274,305,335],nn=[0,31,59,90,120,151,181,212,243,273,304,334],on=function(e){return(tn(e.getFullYear())?rn:nn)[e.getMonth()]+e.getDate()-1},sn=function(e){var t=function(){var t=new Date(U[e+20>>2]+1900,U[e+16>>2],U[e+12>>2],U[e+8>>2],U[e+4>>2],U[e>>2],0),r=U[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)U[e+32>>2]=Number(i!=a&&s==n);else if(r>0!=(s==n)){var u=Math.max(a,i),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-n))}U[e+24>>2]=t.getDay();var f=0|on(t);U[e+28>>2]=f,U[e>>2]=t.getSeconds(),U[e+4>>2]=t.getMinutes(),U[e+8>>2]=t.getHours(),U[e+12>>2]=t.getDate(),U[e+16>>2]=t.getMonth(),U[e+20>>2]=t.getYear();var l=t.getTime();return isNaN(l)?(ye(61),-1):l/1e3}();return Un((pe=t,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)),t>>>0},un=function(e){var t=xe(e)+1,r=jn(t);return r&&_r(e,r,t),r},cn=function(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),u=Math.max(a,s);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[e>>2]=60*u,U[t>>2]=Number(a!=s);var f=c(o),l=c(i),d=un(f),p=un(l);s<a?(I[r>>2]=d,I[r+4>>2]=p):(I[r>>2]=p,I[r+4>>2]=d)},fn=function(){oe("")},ln=function(){return Date.now()},dn=function(){return performance.now()},pn=function(e,t,r){return $.copyWithin(e,t,t+r)},hn=function(e){var t=(e-M.buffer.byteLength+65535)/65536;try{return M.grow(t),W(),1}catch(e){}},mn=function(e){var t=$.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n,o,i=1;i<=4;i*=2){var a=t*(1+.2/i);a=Math.min(a,e+100663296);var s=Math.min(r,(n=Math.max(e,a))+((o=65536)-n%o)%o);if(hn(s))return!0}return!1},vn={},gn=function(){return f||"./this.program"},yn=function e(){if(!e.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==("undefined"==typeof navigator?"undefined":n(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:gn()};for(var r in vn)void 0===vn[r]?delete t[r]:t[r]=vn[r];var o=[];for(var r in t)o.push("".concat(r,"=").concat(t[r]));e.strings=o}return e.strings},wn=function(e,t){for(var r=0;r<e.length;++r)j[t++>>0]=e.charCodeAt(r);j[t>>0]=0},bn=function(e,t){var r=0;return yn().forEach((function(n,o){var i=t+r;I[e+4*o>>2]=i,wn(n,i),r+=n.length+1})),0},En=function(e,t){var r=yn();I[e>>2]=r.length;var n=0;return r.forEach((function(e){return n+=e.length+1})),I[t>>2]=n,0},Pn=function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=I[t>>2],s=I[t+4>>2];t+=8;var u=Ne.read(e,j,a,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o},Sn=function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=I[t>>2],s=I[t+4>>2];t+=8;var u=Ne.write(e,j,a,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o},Fn=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ne.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},An=365,Mn=146,Object.defineProperties(Fn.prototype,{read:{get:function(){return(this.mode&An)===An},set:function(e){e?this.mode|=An:this.mode&=-366}},write:{get:function(){return(this.mode&Mn)===Mn},set:function(e){e?this.mode|=Mn:this.mode&=-147}},isFolder:{get:function(){return Ne.isDir(this.mode)}},isDevice:{get:function(){return Ne.isChrdev(this.mode)}}}),Ne.FSNode=Fn,Ne.createPreloadedFile=Le,Ne.staticInit(),qe(),Ze=r.BindingError=function(e){c(r,e);var t=T(r);function r(e){var n;return s(this,r),(n=t.call(this,e)).name="BindingError",n}return a(r)}(w(Error)),et=r.InternalError=function(e){c(r,e);var t=T(r);function r(e){var n;return s(this,r),(n=t.call(this,e)).name="InternalError",n}return a(r)}(w(Error)),St(),bt(),It(),Jt=r.UnboundTypeError=Yt(Error,"UnboundTypeError"),sr(),dr(),Dn={P:ge,L:Be,D:He,A:Ve,N:it,u:Qt,Q:or,i:ar,M:mr,s:yr,h:br,d:Er,t:kr,p:Mr,O:Dr,H:Rr,g:Or,o:Nr,b:fr,R:Wr,l:Vr,e:qr,q:Gr,c:Xr,v:Yr,f:Jr,k:Kr,j:Zr,w:en,x:an,y:sn,C:cn,a:fn,n:ln,m:dn,I:pn,B:mn,F:bn,G:En,r:_n,E:kn,K:Tn,z:xn,J:Cn},Rn=de(),jn=function(e){return(jn=Rn.U)(e)},$n=function(e){return($n=Rn.V)(e)},On=function(){return(On=Rn.X)()},Ln=function(e){return(Ln=Rn.Y)(e)},Un=function(e){return(Un=Rn.Z)(e)},In=function(e){return(In=Rn._)(e)},r.dynCall_jiji=function(e,t,n,o,i){return(r.dynCall_jiji=Rn.$)(e,t,n,o,i)},r._ff_h264_cabac_tables=128780,ee=function e(){Nn||zn(),Nn||(ee=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return zn(),e.abrupt("return",t.ready);case 284:case"end":return e.stop()}}),e)})))),C="debug",F="warn",A={debug:!1,debugLevel:F,debugUuid:"",decoder:"jessibuca-pro-mp4-recorder-decoder.js"},M="init",D="startRecord",R="stopRecord",j="videoFrame",$="audioFrame",O="destroy",L="init",U="startRecordError",I="startRecordSuccess",N="recordEnd",z="stopRecordError",W="recordTimestamp";function B(e){return!0!==e&&"true"!==e}var H=a((function e(t){s(this,e),this.log=function(e){if(t._opt.debug&&t._opt.debugLevel==C){for(var r,n=t._opt.debugUuid?"[".concat(t._opt.debugUuid,"]"):"",o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(r=console).log.apply(r,["JbPro".concat(n,"[✅✅✅][wasmMp4Recorder][").concat(e,"]")].concat(i))}},this.warn=function(e){if(t._opt.debug&&(t._opt.debugLevel==C||t._opt.debugLevel==F)){for(var r,n=t._opt.debugUuid?"[".concat(t._opt.debugUuid,"]"):"",o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(r=console).log.apply(r,["JbPro".concat(n,"[❗❗❗][wasmMp4Recorder][").concat(e,"]")].concat(i))}},this.error=function(e){for(var r,n=t._opt.debugUuid?"[".concat(t._opt.debugUuid,"]"):"",o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(r=console).error.apply(r,["JbPro".concat(n,"[❌❌❌][wasmMp4Recorder][").concat(e,"]")].concat(i))}}));S().then((function(e){var t={hasInitStreamInfo:!1,hasAudio:!1,hasVideo:!1,isRecording:!1,TAG_NAME:"mp4-recorder-worker",_opt:{debug:A.debug,debugLevel:A.debugLevel,debugUuid:A.debugUuid},destroy:function(){r&&(r.clear(),r=null)},startRecord:function(e){r?(t.setStreamInfo(e),t.hasInitStreamInfo?(r.startRecord(),t.isRecording=!0,postMessage({cmd:I})):postMessage({cmd:U,msg:"streamInfo not init"})):postMessage({cmd:U,msg:"mp4Recorder not init"})},stopRecord:function(){if(B(t.hasInitStreamInfo))postMessage({cmd:z,msg:"streamInfo not init"});else if(B(t.isRecording))postMessage({cmd:z,msg:"not start record"});else{var n=r.stopRecord();if(t.debug.log(t.TAG_NAME,"stopRecord()",JSON.stringify(n)),n&&n.outBuffer){var o=n.outBuffer,i=n.outBufferLen,a=e.HEAPU8.subarray(o,o+i),s=new Uint8Array(a);postMessage({cmd:N,data:s},[s.buffer])}else postMessage({cmd:z,msg:"stop record error"})}},setStreamInfo:function(e){e.audio&&e.audio.type&&(t.hasAudio=!0),e.video&&e.video.type&&(t.hasVideo=!0),(t.hasVideo||t.hasAudio)&&(r.setStreamsInfo(e),t.hasInitStreamInfo=!0)},writeVideoFrame:function(e){B(t.hasInitStreamInfo)||t.hasVideo&&r.writeVFrame(e.data,e.isIFrame?1:0,e.dts,e.pts)},writeAudioFrame:function(e){B(t.hasInitStreamInfo)||this.hasAudio&&r.writeAFrame(e.data,e.ts)},recordingTimestampUpdate:function(e){t.debug.log(t.TAG_NAME,"recordingTimestampUpdate()",e),postMessage({cmd:W,msg:e})},jsLog:function(e){}};t.debug=new H(t);var r=null;e.Recorder&&(r=new e.Recorder(t)),postMessage({cmd:L}),self.onmessage=function(e){var r=e.data;switch(r.cmd){case M:try{t._opt=Object.assign(t._opt,JSON.parse(r.opt))}catch(e){}break;case D:t.startRecord(r.streamInfo);break;case R:t.stopRecord();break;case $:t.writeAudioFrame(r);break;case j:t.writeVideoFrame(r);break;case O:t.destroy()}}}))}));
|