26 lines
530 KiB
JavaScript
26 lines
530 KiB
JavaScript
/*!
|
|
* pixi-compressed-textures - v1.1.5
|
|
* Compiled Fri, 05 May 2017 17:10:12 UTC
|
|
*
|
|
* pixi-compressed-textures is licensed under the MIT License.
|
|
* http://www.opensource.org/licenses/mit-license
|
|
*/
|
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,(t.pixiCompressedTextures||(t.pixiCompressedTextures={})).min=e()}}(function(){var define,module,exports;return function e(t,r,i){function n(o,f){if(!r[o]){if(!t[o]){var s="function"==typeof require&&require;if(!f&&s)return s(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,function(e){var r=t[o][1][e];return n(r?r:e)},u,u.exports,e,t,r,i)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(require,module,exports){(function(process,Buffer,__dirname){function ha(e){eval.call(null,e)}function assert(e,t){e||x("Assertion failed: "+t)}function qa(a){var b=e["_"+a];if(!b)try{b=eval("_"+a)}catch(e){}return assert(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function wa(e,t,r){switch(r=r||"i8","*"===r.charAt(r.length-1)&&(r="i32"),r){case"i1":y[e>>0]=t;break;case"i8":y[e>>0]=t;break;case"i16":z[e>>1]=t;break;case"i32":C[e>>2]=t;break;case"i64":pa=[t>>>0,(oa=t,1<=+xa(oa)?0<oa?(0|ya(+za(oa/4294967296),4294967295))>>>0:~~+Aa((oa-+(~~oa>>>0))/4294967296)>>>0:0)],C[e>>2]=pa[0],C[e+4>>2]=pa[1];break;case"float":Ba[e>>2]=t;break;case"double":Ca[e>>3]=t;break;default:x("invalid type for setValue: "+r)}}function Da(e,t){switch(t=t||"i8","*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":return y[e>>0];case"i8":return y[e>>0];case"i16":return z[e>>1];case"i32":return C[e>>2];case"i64":return C[e>>2];case"float":return Ba[e>>2];case"double":return Ca[e>>3];default:x("invalid type for setValue: "+t)}return null}function D(e,t,r,i){var a,o;"number"==typeof e?(a=!0,o=e):(a=!1,o=e.length);var f="string"==typeof t?t:null;if(r=4==r?i:[Ea,n.aa,n.Ra,n.R][void 0===r?2:r](Math.max(o,f?1:t.length)),a){for(i=r,assert(0==(3&r)),e=r+(o&-4);i<e;i+=4)C[i>>2]=0;for(e=r+o;i<e;)y[i++>>0]=0;return r}if("i8"===f)return e.subarray||e.slice?E.set(e,r):E.set(new Uint8Array(e),r),r;i=0;for(var s,c;i<o;){var u=e[i];"function"==typeof u&&(u=n.Id(u)),a=f||t[i],0===a?i++:("i64"==a&&(a="i32"),wa(r+i,u,a),c!==a&&(s=n.Ka(a),c=a),i+=s)}return r}function va(t,r){if(0===r||!t)return"";for(var i,n=0,a=0;(i=E[t+a>>0],n|=i,0!=i||r)&&(a++,!r||a!=r););if(r||(r=a),i="",128>n){for(;0<r;)n=String.fromCharCode.apply(String,E.subarray(t,t+Math.min(r,1024))),i=i?i+n:n,t+=1024,r-=1024;return i}return e.UTF8ToString(t)}function Ja(e,t){for(var r,i,n,a,o,f,s="";;){if(!(r=e[t++]))return s;128&r?(i=63&e[t++],192==(224&r)?s+=String.fromCharCode((31&r)<<6|i):(n=63&e[t++],224==(240&r)?r=(15&r)<<12|i<<6|n:(a=63&e[t++],240==(248&r)?r=(7&r)<<18|i<<12|n<<6|a:(o=63&e[t++],248==(252&r)?r=(3&r)<<24|i<<18|n<<12|a<<6|o:(f=63&e[t++],r=(1&r)<<30|i<<24|n<<18|a<<12|o<<6|f))),65536>r?s+=String.fromCharCode(r):(r-=65536,s+=String.fromCharCode(55296|r>>10,56320|1023&r)))):s+=String.fromCharCode(r)}}function Ka(e,t,r,i){if(!(0<i))return 0;var n=r;i=r+i-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),127>=o){if(r>=i)break;t[r++]=o}else{if(2047>=o){if(r+1>=i)break;t[r++]=192|o>>6}else{if(65535>=o){if(r+2>=i)break;t[r++]=224|o>>12}else{if(2097151>=o){if(r+3>=i)break;t[r++]=240|o>>18}else{if(67108863>=o){if(r+4>=i)break;t[r++]=248|o>>24}else{if(r+5>=i)break;t[r++]=252|o>>30,t[r++]=128|o>>24&63}t[r++]=128|o>>18&63}t[r++]=128|o>>12&63}t[r++]=128|o>>6&63}t[r++]=128|63&o}}return t[r]=0,r-n}function La(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&57343>=i&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++r)),127>=i?++t:t=2047>=i?t+2:65535>=i?t+3:2097151>=i?t+4:67108863>=i?t+5:t+6}return t}function Ma(t){function r(e,i,n){i=i||1/0;var a,o="",f=[];if("N"===t[s]){for(s++,"K"===t[s]&&s++,a=[];"E"!==t[s];)if("S"===t[s]){s++;var d=t.indexOf("_",s);a.push(u[t.substring(s,d)||0]||"?"),s=d+1}else if("C"===t[s])a.push(a[a.length-1]),s+=2;else{var d=parseInt(t.substr(s)),l=d.toString().length;if(!d||!l){s--;break}var p=t.substr(s+l,d);a.push(p),u.push(p),s+=l+d}if(s++,a=a.join("::"),0===--i)return e?[a]:a}else("K"===t[s]||h&&"L"===t[s])&&s++,(d=parseInt(t.substr(s)))&&(l=d.toString().length,a=t.substr(s+l,d),s+=l+d);h=!1,"I"===t[s]?(s++,d=r(!0),l=r(!0,1,!0),o+=l[0]+" "+a+"<"+d.join(", ")+">"):o=a;e:for(;s<t.length&&0<i--;)if((a=t[s++])in c)f.push(c[a]);else switch(a){case"P":f.push(r(!0,1,!0)[0]+"*");break;case"R":f.push(r(!0,1,!0)[0]+"&");break;case"L":s++,d=t.indexOf("E",s)-s,f.push(t.substr(s,d)),s+=d+2;break;case"A":if(d=parseInt(t.substr(s)),s+=d.toString().length,"_"!==t[s])throw"?";s++,f.push(r(!0,1,!0)[0]+" ["+d+"]");break;case"E":break e;default:o+="?"+a;break e}return n||1!==f.length||"void"!==f[0]||(f=[]),e?(o&&f.push(o+"?"),f):o+"("+f.join(", ")+")"}var i=!!e.___cxa_demangle;if(i)try{var a=Ea(t.length);ua(t.substr(1),a);var o=Ea(4),f=e.___cxa_demangle(a,0,0,o);if(0===Da(o,"i32")&&f)return va(f)}catch(e){}finally{a&&Na(a),o&&Na(o),f&&Na(f)}var s=3,c={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},u=[],h=!0,a=t;try{if("Object._main"==t||"_main"==t)return"main()";if("number"==typeof t&&(t=va(t)),"_"!==t[0]||"_"!==t[1]||"Z"!==t[2])return t;switch(t[3]){case"n":return"operator new()";case"d":return"operator delete()"}a=r()}catch(e){a+="?"}return 0<=a.indexOf("?")&&!i&&n.O("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),a}function Oa(){return Pa().replace(/__Z[\w\d_]+/g,function(e){var t=Ma(e);return e===t?e:e+" ["+t+"]"})}function Pa(){var e=Error();if(!e.stack){try{throw Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function Qa(e){return 0<e%4096&&(e+=4096-e%4096),e}function ma(){var i=Math.pow(2,31);if(r>=i)return!1;for(;t<=r;)if(t<i/2)t=Qa(2*t);else{var n=t;if((t=Qa((3*t+i)/4))<=n)return!1}if((t=Math.max(t,16777216))>=i)return!1;try{if(ArrayBuffer.p)buffer=ArrayBuffer.p(buffer,t);else{var a=y;buffer=new ArrayBuffer(t)}}catch(e){return!1}return!!Xa(buffer)&&(e.buffer=buffer,e.HEAP8=y=new Int8Array(buffer),e.HEAP16=z=new Int16Array(buffer),e.HEAP32=C=new Int32Array(buffer),e.HEAPU8=E=new Uint8Array(buffer),e.HEAPU16=Ra=new Uint16Array(buffer),e.HEAPU32=Sa=new Uint32Array(buffer),e.HEAPF32=Ba=new Float32Array(buffer),e.HEAPF64=Ca=new Float64Array(buffer),ArrayBuffer.p||y.set(a),!0)}function ab(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t();else{var r=t.ab;"number"==typeof r?void 0===t.X?n.L("v",r):n.L("vi",r,[t.X]):r(void 0===t.X?null:t.X)}}}function fb(e){bb.unshift(e)}function gb(e){eb.unshift(e)}function hb(e,t,r){return r=Array(0<r?r:La(e)+1),e=Ka(e,r,0,r.length),t&&(r.length=e),r}function ua(e,t,r){for(e=hb(e,r),r=0;r<e.length;)y[t+r>>0]=e[r],r+=1}function ta(e,t){for(var r=0;r<e.length;r++)y[t++>>0]=e[r]}function Ia(e,t,r){for(var i=0;i<e.length;++i)y[t++>>0]=e.charCodeAt(i);r||(y[t>>0]=0)}function kb(){I++,e.monitorRunDependencies&&e.monitorRunDependencies(I)}function lb(){if(I--,e.monitorRunDependencies&&e.monitorRunDependencies(I),0==I&&(null!==ib&&(clearInterval(ib),ib=null),jb)){var t=jb;jb=null,t()}}function ob(t){return e.___errno_location&&(C[e.___errno_location()>>2]=t),t}function pb(e,t){H.push(function(){n.L("vi",e,[t])}),pb.level=H.length}function tb(){return!!tb.p}function wb(e,t){wb.p||(wb.p={}),e in wb.p||(n.L("v",t),wb.p[e]=1)}function yb(e,t){for(var r=0,i=e.length-1;0<=i;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function zb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function Ab(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function Bb(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)}function Cb(){return zb(Array.prototype.slice.call(arguments,0).join("/"))}function K(e,t){return zb(e+"/"+t)}function Db(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}function Fb(e,t){Eb[e]={input:[],output:[],N:t},Gb(e,Hb)}function S(e,t){if(e=Db("/",e),t=t||{},!e)return{path:"",g:null};var r,i={Ia:!0,ra:0};for(r in i)void 0===t[r]&&(t[r]=i[r]);if(8<t.ra)throw new L(J.ga);var i=yb(e.split("/").filter(function(e){return!!e}),!1),n=Pb;r="/";for(var a=0;a<i.length;a++){var o=a===i.length-1;if(o&&t.parent)break;if(n=Nb(n,i[a]),r=K(r,i[a]),n.U&&(!o||o&&t.Ia)&&(n=n.U.root),!o||t.la)for(o=0;40960==(61440&n.mode);)if(n=Vb(r),r=Db(Ab(r),n),n=S(r,{ra:t.ra}).g,40<o++)throw new L(J.ga)}return{path:r,g:n}}function T(e){for(var t;;){if(e===e.parent)return e=e.A.Oa,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Wb(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%Q.length}function Xb(e){var t=Wb(e.parent.id,e.name);e.M=Q[t],Q[t]=e}function Nb(e,t){var r;if(r=(r=Yb(e,"x"))?r:e.k.lookup?0:J.da)throw new L(r,e);for(r=Q[Wb(e.id,t)];r;r=r.M){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.k.lookup(e,t)}function Lb(e,t,r,i){return Zb||(Zb=function(e,t,r,i){e||(e=this),this.parent=e,this.A=e.A,this.U=null,this.id=Sb++,this.name=t,this.mode=r,this.k={},this.n={},this.rdev=i},Zb.prototype={},Object.defineProperties(Zb.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},kb:{get:function(){return N(this.mode)}},jb:{get:function(){return 8192==(61440&this.mode)}}})),e=new Zb(e,t,r,i),Xb(e),e}function N(e){return 16384==(61440&e)}function Yb(e,t){return Tb?0:(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:J.da}function ac(e,t){try{return Nb(e,t),J.wa}catch(e){}return Yb(e,"wx")}function bc(){var e;e=4096;for(var t=0;t<=e;t++)if(!Rb[t])return t;throw new L(J.Sa)}function cc(e){dc||(dc=function(){},dc.prototype={},Object.defineProperties(dc.prototype,{object:{get:function(){return this.g},set:function(e){this.g=e}},Ld:{get:function(){return 1!=(2097155&this.flags)}},Md:{get:function(){return 0!=(2097155&this.flags)}},Kd:{get:function(){return 1024&this.flags}}}));var t,r=new dc;for(t in e)r[t]=e[t];return e=r,r=bc(),e.fd=r,Rb[r]=e}function Gb(e,t){Qb[e]={n:t}}function ec(e,t){var r,i="/"===t,n=!t;if(i&&Pb)throw new L(J.fa);if(!i&&!n){if(r=S(t,{Ia:!1}),t=r.path,r=r.g,r.U)throw new L(J.fa);if(!N(r.mode))throw new L(J.ya)}var n={type:e,pa:{},Oa:t,lb:[]},a=e.A(n);a.A=n,n.root=a,i?Pb=a:r&&(r.U=n,r.A&&r.A.lb.push(n))}function fc(e,t,r){var i=S(e,{parent:!0}).g;if(!(e=Bb(e))||"."===e||".."===e)throw new L(J.q);var n=ac(i,e);if(n)throw new L(n);if(!i.k.T)throw new L(J.I);return i.k.T(i,e,t,r)}function gc(e,t){return t=4095&(void 0!==t?t:438),t|=32768,fc(e,t,0)}function V(e,t){return t=1023&(void 0!==t?t:511),t|=16384,fc(e,t,0)}function hc(e,t,r){return void 0===r&&(r=t,t=438),fc(e,8192|t,r)}function ic(e,t){if(!Db(e))throw new L(J.F);var r=S(t,{parent:!0}).g;if(!r)throw new L(J.F);var i=Bb(t),n=ac(r,i);if(n)throw new L(n);if(!r.k.symlink)throw new L(J.I);return r.k.symlink(r,i,e)}function Vb(e){if(!(e=S(e).g))throw new L(J.F);if(!e.k.readlink)throw new L(J.q);return Db(T(e.parent),e.k.readlink(e))}function jc(e,t){var r;if(r="string"==typeof e?S(e,{la:!0}).g:e,!r.k.u)throw new L(J.I);r.k.u(r,{mode:4095&t|r.mode&-4096,timestamp:Date.now()})}function kc(t,r){var i;if(""===t)throw new L(J.F);var n;if("string"==typeof r){if(void 0===(n=$b[r]))throw Error("Unknown file open mode: "+r)}else n=r;r=n,i=64&r?4095&(void 0===i?438:i)|32768:0;var a;if("object"==typeof t)a=t;else{t=zb(t);try{a=S(t,{la:!(131072&r)}).g}catch(e){}}if(n=!1,64&r)if(a){if(128&r)throw new L(J.wa)}else a=fc(t,i,0),n=!0;if(!a)throw new L(J.F);if(8192==(61440&a.mode)&&(r&=-513),65536&r&&!N(a.mode))throw new L(J.ya);if(!n&&(a?40960==(61440&a.mode)?i=J.ga:N(a.mode)&&(0!=(2097155&r)||512&r)?i=J.P:(i=["r","w","rw"][3&r],512&r&&(i+="w"),i=Yb(a,i)):i=J.F,i))throw new L(i);if(512&r){i=a;var o;if(o="string"==typeof i?S(i,{la:!0}).g:i,!o.k.u)throw new L(J.I);if(N(o.mode))throw new L(J.P);if(32768!=(61440&o.mode))throw new L(J.q);if(i=Yb(o,"w"))throw new L(i);o.k.u(o,{size:0,timestamp:Date.now()})}r&=-641,a=cc({g:a,path:T(a),flags:r,seekable:!0,position:0,n:a.n,tb:[],error:!1}),a.n.open&&a.n.open(a),!e.logReadFiles||1&r||(lc||(lc={}),t in lc||(lc[t]=1,e.printErr("read file: "+t)));try{R.onOpenFile&&(o=0,1!=(2097155&r)&&(o|=1),0!=(2097155&r)&&(o|=2),R.onOpenFile(t,o))}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return a}function mc(e){e.na&&(e.na=null);try{e.n.close&&e.n.close(e)}catch(e){throw e}finally{Rb[e.fd]=null}}function nc(e,t,r){if(!e.seekable||!e.n.G)throw new L(J.ia);e.position=e.n.G(e,t,r),e.tb=[]}function oc(e,t,r,i,n,a){if(0>i||0>n)throw new L(J.q);if(0==(2097155&e.flags))throw new L(J.ea);if(N(e.g.mode))throw new L(J.P);if(!e.n.write)throw new L(J.q);1024&e.flags&&nc(e,0,2);var o=!0;if(void 0===n)n=e.position,o=!1;else if(!e.seekable)throw new L(J.ia);t=e.n.write(e,t,r,i,n,a),o||(e.position+=t);try{e.path&&R.onWriteToFile&&R.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return t}function pc(){L||(L=function(e,t){this.g=t,this.qb=function(e){this.S=e;for(var t in J)if(J[t]===e){this.code=t;break}},this.qb(e),this.message=xb[e]},L.prototype=Error(),L.prototype.constructor=L,[J.F].forEach(function(e){Mb[e]=new L(e),Mb[e].stack="<generic error, no stack>"}))}function rc(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}function sc(e,t,r,i){return e=K("string"==typeof e?e:T(e),t),gc(e,rc(r,i))}function tc(e,t,r,i,n,a){if(e=t?K("string"==typeof e?e:T(e),t):e,i=rc(i,n),n=gc(e,i),r){if("string"==typeof r){e=Array(r.length),t=0;for(var o=r.length;t<o;++t)e[t]=r.charCodeAt(t);r=e}jc(n,146|i),e=kc(n,"w"),oc(e,r,0,r.length,0,a),mc(e),jc(n,i)}return n}function W(e,t,r,i){e=K("string"==typeof e?e:T(e),t),t=rc(!!r,!!i),W.Ma||(W.Ma=64);var n=W.Ma++<<8|0;return Gb(n,{open:function(e){e.seekable=!1},close:function(){i&&i.buffer&&i.buffer.length&&i(10)},read:function(e,t,i,n){for(var a=0,o=0;o<n;o++){var f;try{f=r()}catch(e){throw new L(J.H)}if(void 0===f&&0===a)throw new L(J.va);if(null===f||void 0===f)break;a++,t[i+o]=f}return a&&(e.g.timestamp=Date.now()),a},write:function(e,t,r,n){for(var a=0;a<n;a++)try{i(t[r+a])}catch(e){throw new L(J.H)}return n&&(e.g.timestamp=Date.now()),a}}),hc(e,t,n)}function uc(t){if(t.jb||t.kb||t.link||t.e)return!0;var r=!0;if("undefined"!=typeof XMLHttpRequest)throw 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(!e.read)throw Error("Cannot load without read() or XMLHttpRequest.");try{t.e=hb(e.read(t.url),!0),t.o=t.e.length}catch(e){r=!1}return r||ob(J.H),r}function X(){return wc+=4,C[wc-4>>2]}function xc(){var e;if(e=X(),!(e=Rb[e]))throw new L(J.ea);return e}function Ga(e){Ga.p||(r=Qa(r),Ga.p=!0,assert(n.R),Ga.bb=n.R,n.R=function(){x("cannot dynamically allocate, sbrk now has control")});var t=r;return 0==e||Ga.bb(e)?t:4294967295}function Cc(e,t){if(Dc=e,Ec=t,!Fc)return 1;if(0==e)Y=function(){setTimeout(Gc,t)},Hc="timeout";else if(1==e)Y=function(){Ic(Gc)},Hc="rAF";else if(2==e){if(!window.setImmediate){var r=[];window.addEventListener("message",function(e){e.source===window&&"__emcc"===e.data&&(e.stopPropagation(),r.shift()())},!0),window.setImmediate=function(e){r.push(e),window.postMessage("__emcc","*")}}Y=function(){window.setImmediate(Gc)},Hc="immediate"}return 0}function Jc(t,r,i,a,o){e.noExitRuntime=!0,assert(!Fc,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Fc=t,Kc=a;var f=Lc;if(Gc=function(){if(!na)if(0<Mc.length){var r=Date.now(),i=Mc.shift();if(i.ab(i.X),Nc){var o=Nc,s=0==o%1?o-1:Math.floor(o);Nc=i.Bd?s:(8*o+(s+.5))/9}console.log('main loop blocker "'+i.name+'" took '+(Date.now()-r)+" ms"),Oc(),setTimeout(Gc,0)}else f<Lc||(Pc=Pc+1|0,1==Dc&&1<Ec&&0!=Pc%Ec?Y():("timeout"===Hc&&e.ka&&(e.W("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Hc=""),Qc(function(){void 0!==a?n.L("vi",t,[a]):n.L("v",t)}),f<Lc||("object"==typeof SDL&&SDL.audio&&SDL.audio.mb&&SDL.audio.mb(),Y())))},o||(r&&0<r?Cc(0,1e3/r):Cc(1,1),Y()),i)throw"SimulateInfiniteLoop"}function Oc(){if(e.setStatus){var t=e.statusMessage||"Please wait...",r=Nc,i=Rc.Dd;r?r<i?e.setStatus(t+" ("+(i-r)+"/"+i+")"):e.setStatus(t):e.setStatus("")}}function Qc(t){if(!(na||e.preMainLoop&&!1===e.preMainLoop())){try{t()}catch(t){if(t instanceof ia)return;throw t&&"object"==typeof t&&t.stack&&e.W("exception thrown: "+[t,t.stack]),t}e.postMainLoop&&e.postMainLoop()}}function Vc(){function t(){Tc=document.pointerLockElement===r||document.mozPointerLockElement===r||document.webkitPointerLockElement===r||document.msPointerLockElement===r}if(e.preloadPlugins||(e.preloadPlugins=[]),!Wc){Wc=!0;try{Xc=!0}catch(e){Xc=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Yc="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Xc?null:console.log("warning: no BlobBuilder"),Zc="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,e.Qa||void 0!==Zc||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),e.Qa=!0),e.preloadPlugins.push({canHandle:function(t){return!e.Qa&&/\.(jpg|jpeg|png|bmp)$/i.test(t)},handle:function(t,r,i,a){var o=null;if(Xc)try{o=new Blob([t],{type:$c(r)}),o.size!==t.length&&(o=new Blob([new Uint8Array(t).buffer],{type:$c(r)}))}catch(e){n.O("Blob constructor present but fails: "+e+"; falling back to blob builder")}o||(o=new Yc,o.append(new Uint8Array(t).buffer),o=o.getBlob());var f=Zc.createObjectURL(o),s=new Image;s.onload=function(){assert(s.complete,"Image "+r+" could not be decoded");var n=document.createElement("canvas");n.width=s.width,n.height=s.height,n.getContext("2d").drawImage(s,0,0),e.preloadedImages[r]=n,Zc.revokeObjectURL(f),i&&i(t)},s.onerror=function(){console.log("Image "+f+" could not be decoded"),a&&a()},s.src=f}}),e.preloadPlugins.push({canHandle:function(t){return!e.Pd&&t.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(t,r,i,n){function a(n){f||(f=!0,e.preloadedAudios[r]=n,i&&i(t))}function o(){f||(f=!0,e.preloadedAudios[r]=new Audio,n&&n())}var f=!1;if(!Xc)return o();try{var s=new Blob([t],{type:$c(r)})}catch(e){return o()}var s=Zc.createObjectURL(s),c=new Audio;c.addEventListener("canplaythrough",function(){a(c)},!1),c.onerror=function(){if(!f){console.log("warning: browser could not fully decode audio "+r+", trying slower base64 approach");for(var e="",i=0,n=0,o=0;o<t.length;o++)for(i=i<<8|t[o],n+=8;6<=n;)var s=i>>n-6&63,n=n-6,e=e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[s];2==n?(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&i)<<4],e+="=="):4==n&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&i)<<2],e+="="),c.src="data:audio/x-"+r.substr(-3)+";base64,"+e,a(c)}},c.src=s,ad(function(){a(c)})}});var r=e.canvas;r&&(r.sa=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.Fa=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.Fa=r.Fa.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),e.elementPointerLock&&r.addEventListener("click",function(e){!Tc&&r.sa&&(r.sa(),e.preventDefault())},!1))}}function bd(t,r,i,n){if(r&&e.ka&&t==e.canvas)return e.ka;var a,o;if(r){if(o={antialias:!1,alpha:!1},n)for(var f in n)o[f]=n[f];(o=GL.createContext(t,o))&&(a=GL.getContext(o).td),t.style.backgroundColor="black"}else a=t.getContext("2d");return a?(i&&(r||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),e.ka=a,r&&GL.Od(o),e.Td=r,Uc.forEach(function(e){e()}),Vc()),a):null}function fd(t,r,i){function n(){Sc=!1;var t=a.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t?(a.Da=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},a.Da=a.Da.bind(document),dd&&a.sa(),Sc=!0,ed&&gd()):(t.parentNode.insertBefore(a,t),t.parentNode.removeChild(t),ed&&hd()),e.onFullScreen&&e.onFullScreen(Sc),id(a)}dd=t,ed=r,jd=i,void 0===dd&&(dd=!0),void 0===ed&&(ed=!1),void 0===jd&&(jd=null);var a=e.canvas;cd||(cd=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var o=document.createElement("div");a.parentNode.insertBefore(o,a),o.appendChild(a),o.p=o.requestFullScreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullScreen?function(){o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i?o.p({Ud:i}):o.p()}function ld(e){var t=Date.now();if(0===kd)kd=t+1e3/60;else for(;t+2>=kd;)kd+=1e3/60;t=Math.max(kd-t,0),setTimeout(e,t)}function Ic(e){"undefined"==typeof window?ld(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||ld),window.requestAnimationFrame(e))}function ad(t){e.noExitRuntime=!0,setTimeout(function(){na||t()},1e4)}function $c(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}function md(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}function nd(e,t,r){md(e,function(r){assert(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),lb()},function(){if(!r)throw'Loading data file "'+e+'" failed.';r()}),kb()}function pd(){var t=e.canvas;od.forEach(function(e){e(t.width,t.height)})}function gd(){if("undefined"!=typeof SDL){var e=Sa[SDL.screen+0*n.J>>2];C[SDL.screen+0*n.J>>2]=8388608|e}pd()}function hd(){if("undefined"!=typeof SDL){var e=Sa[SDL.screen+0*n.J>>2];C[SDL.screen+0*n.J>>2]=e&-8388609}pd()}function id(t,r,i){r&&i?(t.ub=r,t.hb=i):(r=t.ub,i=t.hb);var n=r,a=i;if(e.forcedAspectRatio&&0<e.forcedAspectRatio&&(n/a<e.forcedAspectRatio?n=Math.round(a*e.forcedAspectRatio):a=Math.round(n/e.forcedAspectRatio)),(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&"undefined"!=typeof screen)var o=Math.min(screen.width/n,screen.height/a),n=Math.round(n*o),a=Math.round(a*o);ed?(t.width!=n&&(t.width=n),t.height!=a&&(t.height=a),void 0!==t.style&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=r&&(t.width=r),t.height!=i&&(t.height=i),void 0!==t.style&&(n!=r||a!=i?(t.style.setProperty("width",n+"px","important"),t.style.setProperty("height",a+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))}function ia(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function td(t){function r(){if(!e.calledRun&&(e.calledRun=!0,!na)){if(Ha||(Ha=!0,ab(cb)),ab(db),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e._main&&vd&&e.callMain(t),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)gb(e.postRun.shift());ab(eb)}}if(t=t||e.arguments,null===rd&&(rd=Date.now()),!(0<I)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)fb(e.preRun.shift());ab(bb),0<I||e.calledRun||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),r()},1)):r())}}function ud(t,r){if(!r||!e.noExitRuntime)throw!e.noExitRuntime&&(na=!0,m=void 0,ab(H),e.onExit)&&e.onExit(t),da?(process.stdout.once("drain",function(){process.exit(t)}),console.log(" "),setTimeout(function(){process.exit(t)},500)):ea&&"function"==typeof quit&&quit(t),new ia(t)}function x(t){void 0!==t?(e.print(t),e.W(t),t=JSON.stringify(t)):t="",na=!0;var r="abort("+t+") at "+Oa()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw wd&&wd.forEach(function(e){r=e(r,t)}),r}var e;e||(e=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var aa={},k;for(k in e)e.hasOwnProperty(k)&&(aa[k]=e[k]);var ba="object"==typeof window,ca="function"==typeof importScripts,da="object"==typeof process&&"function"==typeof require&&!ba&&!ca,ea=!ba&&!da&&!ca;if(da){e.print||(e.print=function(e){process.stdout.write(e+"\n")}),e.printErr||(e.printErr=function(e){process.stderr.write(e+"\n")});var fa=require("fs"),ga=require("path");e.read=function(e,t){e=ga.normalize(e);var r=fa.readFileSync(e);return r||e==ga.resolve(e)||(e=path.join(__dirname,"..","src",e),r=fa.readFileSync(e)),r&&!t&&(r=r.toString()),r},e.readBinary=function(t){return t=e.read(t,!0),t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},e.load=function(e){ha(read(e))},e.thisProgram||(e.thisProgram=1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program"),e.arguments=process.argv.slice(2),void 0!==module&&(module.exports=e),process.on("uncaughtException",function(e){if(!(e instanceof ia))throw e}),e.inspect=function(){return"[Emscripten Module object]"}}else if(ea)e.print||(e.print=print),"undefined"!=typeof printErr&&(e.printErr=printErr),e.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)"},e.readBinary=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(e=read(e,"binary"),assert("object"==typeof e),e)},"undefined"!=typeof scriptArgs?e.arguments=scriptArgs:void 0!==arguments&&(e.arguments=arguments),eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined");else{if(!ba&&!ca)throw"Unknown runtime environment. Where are we?";e.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},void 0!==arguments&&(e.arguments=arguments),"undefined"!=typeof console?(e.print||(e.print=function(e){console.log(e)}),e.printErr||(e.printErr=function(e){console.log(e)})):e.print||(e.print=function(){}),ca&&(e.load=importScripts),void 0===e.setWindowTitle&&(e.setWindowTitle=function(e){document.title=e})}!e.load&&e.read&&(e.load=function(t){ha(e.read(t))}),e.print||(e.print=function(){}),e.printErr||(e.printErr=e.print),e.arguments||(e.arguments=[]),e.thisProgram||(e.thisProgram="./this.program"),e.print=e.print,e.W=e.printErr,e.preRun=[],e.postRun=[];for(k in aa)aa.hasOwnProperty(k)&&(e[k]=aa[k]);var n={rb:function(e){ka=e},fb:function(){return ka},ua:function(){return m},ba:function(e){m=e},Ka:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:return"*"===e[e.length-1]?n.J:"i"===e[0]?(e=parseInt(e.substr(1)),assert(0==e%8),e/8):0}},eb:function(e){return Math.max(n.Ka(e),n.J)},ud:16,Qd:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},Ed:function(e,t,r){return r||"i64"!=e&&"double"!=e?e?Math.min(t||(e?n.eb(e):0),n.J):Math.min(t,8):8},L:function(t,r,i){return i&&i.length?(i.splice||(i=Array.prototype.slice.call(i)),i.splice(0,0,r),e["dynCall_"+t].apply(null,i)):e["dynCall_"+t].call(null,r)},Z:[],Xa:function(e){for(var t=0;t<n.Z.length;t++)if(!n.Z[t])return n.Z[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},nb:function(e){n.Z[(e-2)/2]=null},O:function(t){n.O.ta||(n.O.ta={}),n.O.ta[t]||(n.O.ta[t]=1,e.W(t))},ma:{},Hd:function(e,t){assert(t),n.ma[t]||(n.ma[t]={});var r=n.ma[t];return r[e]||(r[e]=function(){return n.L(t,e,arguments)}),r[e]},Fd:function(){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},aa:function(e){var t=m;return m=m+e|0,m=m+15&-16,t},Ra:function(e){var t=la;return la=la+e|0,la=la+15&-16,t},R:function(e){var i=r;return r=r+e|0,r=r+15&-16,r>=t&&!ma()?(r=i,0):i},ja:function(e,t){return Math.ceil(e/(t?t:16))*(t?t:16)},Nd:function(e,t,r){return r?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},Ua:8,J:4,vd:0};e.Runtime=n,n.addFunction=n.Xa,n.removeFunction=n.nb;var na=!1,oa,pa,ka,ra,sa;!function(){function a(e){return e=e.toString().match(d).slice(1),{arguments:e[0],body:e[1],returnValue:e[2]}}var b={stackSave:function(){n.ua()},stackRestore:function(){n.ba()},arrayToC:function(e){var t=n.aa(e.length);return ta(e,t),t},stringToC:function(e){var t=0;return null!==e&&void 0!==e&&0!==e&&(t=n.aa(1+(e.length<<2)),ua(e,t)),t}},c={string:b.stringToC,array:b.arrayToC};sa=function(e,t,r,i,a){e=qa(e);var o=[],f=0;if(i)for(var s=0;s<i.length;s++){var u=c[r[s]];u?(0===f&&(f=n.ua()),o[s]=u(i[s])):o[s]=i[s]}if(r=e.apply(null,o),"string"===t&&(r=va(r)),0!==f){if(a&&a.async)return void EmterpreterAsync.yd.push(function(){n.ba(f)});n.ba(f)}return r};var d=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,f={},g;for(g in b)b.hasOwnProperty(g)&&(f[g]=a(b[g]));ra=function(b,c,d){d=d||[];var g=qa(b);b=d.every(function(e){return"number"===e});var q="string"!==c;if(q&&b)return g;var v=d.map(function(e,t){return"$"+t});c="(function("+v.join(",")+") {";var B=d.length;if(!b){c+="var stack = "+f.stackSave.body+";";for(var G=0;G<B;G++){var O=v[G],ja=d[G];"number"!==ja&&(ja=f[ja+"ToC"],c+="var "+ja.arguments+" = "+O+";",c+=ja.body+";",c+=O+"="+ja.returnValue+";")}}return d=a(function(){return g}).returnValue,c+="var ret = "+d+"("+v.join(",")+");",q||(d=a(function(){return va}).returnValue,c+="ret = "+d+"(ret);"),b||(c+=f.stackRestore.body.replace("()","(stack)")+";"),eval(c+"return ret})")}}(),e.ccall=sa,e.cwrap=ra,e.setValue=wa,e.getValue=Da,e.ALLOC_NORMAL=0,e.ALLOC_STACK=1,e.ALLOC_STATIC=2,e.ALLOC_DYNAMIC=3,e.ALLOC_NONE=4,e.allocate=D,e.getMemory=function(e){
|
|
return Fa?void 0!==Ga&&!Ga.p||!Ha?n.R(e):Ea(e):n.Ra(e)},e.Pointer_stringify=va,e.AsciiToString=function(e){for(var t="";;){var r=y[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}},e.stringToAscii=function(e,t){return Ia(e,t,!1)},e.UTF8ArrayToString=Ja,e.UTF8ToString=function(e){return Ja(E,e)},e.stringToUTF8Array=Ka,e.stringToUTF8=function(e,t,r){return Ka(e,E,t,r)},e.lengthBytesUTF8=La,e.UTF16ToString=function(e){for(var t=0,r="";;){var i=z[e+2*t>>1];if(0==i)return r;++t,r+=String.fromCharCode(i)}},e.stringToUTF16=function(e,t,r){if(void 0===r&&(r=2147483647),2>r)return 0;r-=2;var i=t;r=r<2*e.length?r/2:e.length;for(var n=0;n<r;++n)z[t>>1]=e.charCodeAt(n),t+=2;return z[t>>1]=0,t-i},e.lengthBytesUTF16=function(e){return 2*e.length},e.UTF32ToString=function(e){for(var t=0,r="";;){var i=C[e+4*t>>2];if(0==i)return r;++t,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}},e.stringToUTF32=function(e,t,r){if(void 0===r&&(r=2147483647),4>r)return 0;var i=t;r=i+r-4;for(var n=0;n<e.length;++n){var a=e.charCodeAt(n);if(55296<=a&&57343>=a)var o=e.charCodeAt(++n),a=65536+((1023&a)<<10)|1023&o;if(C[t>>2]=a,(t+=4)+4>r)break}return C[t>>2]=0,t-i},e.lengthBytesUTF32=function(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&57343>=i&&++r,t+=4}return t},e.stackTrace=function(){return Oa()};var y,E,z,Ra,C,Sa,Ba,Ca,Ta=0,la=0,Fa=!1,Ua=0,m=0,Va=0,Wa=0,r=0,Ya;try{(Ya=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get))(new ArrayBuffer(4))}catch(e){Ya=function(e){return e.byteLength}}for(var $a=e.TOTAL_STACK||5242880,t=e.TOTAL_MEMORY||16777216,F=65536;F<t||F<2*$a;)F=16777216>F?2*F:F+16777216;F=Math.max(F,16777216),F!==t&&(t=F),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support");var buffer;buffer=new ArrayBuffer(t),y=new Int8Array(buffer),z=new Int16Array(buffer),C=new Int32Array(buffer),E=new Uint8Array(buffer),Ra=new Uint16Array(buffer),Sa=new Uint32Array(buffer),Ba=new Float32Array(buffer),Ca=new Float64Array(buffer),C[0]=255,assert(255===E[0]&&0===E[3],"Typed arrays 2 must be run on a little-endian system"),e.HEAP=void 0,e.buffer=buffer,e.HEAP8=y,e.HEAP16=z,e.HEAP32=C,e.HEAPU8=E,e.HEAPU16=Ra,e.HEAPU32=Sa,e.HEAPF32=Ba,e.HEAPF64=Ca;var bb=[],cb=[],db=[],H=[],eb=[],Ha=!1;e.addOnPreRun=fb,e.addOnInit=function(e){cb.unshift(e)},e.addOnPreMain=function(e){db.unshift(e)},e.addOnExit=function(e){H.unshift(e)},e.addOnPostRun=gb,e.intArrayFromString=hb,e.intArrayToString=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];255<i&&(i&=255),t.push(String.fromCharCode(i))}return t.join("")},e.writeStringToMemory=ua,e.writeArrayToMemory=ta,e.writeAsciiToMemory=Ia,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,t){var r=65535&e,i=65535&t;return r*i+((e>>>16)*i+r*(t>>>16)<<16)|0}),Math.Jd=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;32>t;t++)if(e&1<<31-t)return t;return 32}),Math.Ad=Math.clz32;var xa=Math.abs,Aa=Math.ceil,za=Math.floor,ya=Math.min,I=0,ib=null,jb=null;e.addRunDependency=kb,e.removeRunDependency=lb,e.preloadedImages={},e.preloadedAudios={},Ta=8,la=Ta+5888,cb.push(),D([124,0,0,0,98,7,0,0,124,0,0,0,111,7,0,0,164,0,0,0,124,7,0,0,16,0,0,0,0,0,0,0,164,0,0,0,157,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,227,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,191,7,0,0,56,0,0,0,0,0,0,0,164,0,0,0,5,8,0,0,40,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,40,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,114,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,1,0,0,236,1,0,0,236,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,239,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,4,0,0,0,231,16,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0],"i8",4,n.Ua);var mb=n.ja(D(12,"i8",2),8);assert(0==mb%8),e._i64Subtract=nb;var J={I:1,F:2,ed:3,bc:4,H:5,Aa:6,vb:7,zc:8,ea:9,Jb:10,va:11,qd:11,Ta:12,da:13,Vb:14,Lc:15,fa:16,wa:17,rd:18,ha:19,ya:20,P:21,q:22,uc:23,Sa:24,Q:25,nd:26,Wb:27,Hc:28,ia:29,bd:30,nc:31,Vc:32,Sb:33,Zc:34,Dc:42,Zb:43,Kb:44,ec:45,fc:46,gc:47,mc:48,od:49,xc:50,dc:51,Pb:35,Ac:37,Bb:52,Eb:53,sd:54,vc:55,Fb:56,Gb:57,Qb:35,Hb:59,Jc:60,yc:61,kd:62,Ic:63,Ec:64,Fc:65,ad:66,Bc:67,yb:68,gd:69,Lb:70,Wc:71,pc:72,Tb:73,Db:74,Qc:76,Cb:77,$c:78,hc:79,ic:80,lc:81,kc:82,jc:83,Kc:38,za:39,qc:36,ga:40,Rc:95,Uc:96,Ob:104,wc:105,zb:97,Yc:91,Oc:88,Gc:92,cd:108,Nb:111,wb:98,Mb:103,tc:101,rc:100,ld:110,Xb:112,Yb:113,ac:115,Ab:114,Rb:89,oc:90,Xc:93,dd:94,xb:99,sc:102,cc:106,Mc:107,md:109,pd:87,Ub:122,hd:116,Pc:95,Cc:123,$b:84,Sc:75,Ib:125,Nc:131,Tc:130,jd:86};e._memset=qb,e._bitshift64Lshr=rb,e._bitshift64Shl=sb;var ub=[],vb={},xb={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},Eb=[],Hb={open:function(e){var t=Eb[e.g.rdev];if(!t)throw new L(J.ha);e.tty=t,e.seekable=!1},close:function(e){e.tty.N.flush(e.tty)},flush:function(e){e.tty.N.flush(e.tty)},read:function(e,t,r,i){if(!e.tty||!e.tty.N.La)throw new L(J.Aa);for(var n=0,a=0;a<i;a++){var o;try{o=e.tty.N.La(e.tty)}catch(e){throw new L(J.H)}if(void 0===o&&0===n)throw new L(J.va);if(null===o||void 0===o)break;n++,t[r+a]=o}return n&&(e.g.timestamp=Date.now()),n},write:function(e,t,r,i){if(!e.tty||!e.tty.N.qa)throw new L(J.Aa);for(var n=0;n<i;n++)try{e.tty.N.qa(e.tty,t[r+n])}catch(e){throw new L(J.H)}return i&&(e.g.timestamp=Date.now()),n}},Ib={La:function(e){if(!e.input.length){var t=null;if(da){var r=new Buffer(256),i=0,n=process.stdin.fd,a=!1;try{n=fs.openSync("/dev/stdin","r"),a=!0}catch(e){}i=fs.readSync(n,r,0,256,null),a&&fs.closeSync(n),t=0<i?r.slice(0,i).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=hb(t,!0)}return e.input.shift()},qa:function(t,r){null===r||10===r?(e.print(Ja(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},flush:function(t){t.output&&0<t.output.length&&(e.print(Ja(t.output,0)),t.output=[])}},Jb={qa:function(t,r){null===r||10===r?(e.printErr(Ja(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},flush:function(t){t.output&&0<t.output.length&&(e.printErr(Ja(t.output,0)),t.output=[])}},M={C:null,A:function(){return M.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(24576==(61440&r)||4096==(61440&r))throw new L(J.I);return M.C||(M.C={dir:{g:{D:M.k.D,u:M.k.u,lookup:M.k.lookup,T:M.k.T,rename:M.k.rename,unlink:M.k.unlink,rmdir:M.k.rmdir,readdir:M.k.readdir,symlink:M.k.symlink},stream:{G:M.n.G}},file:{g:{D:M.k.D,u:M.k.u},stream:{G:M.n.G,read:M.n.read,write:M.n.write,Ba:M.n.Ba,Na:M.n.Na,Pa:M.n.Pa}},link:{g:{D:M.k.D,u:M.k.u,readlink:M.k.readlink},stream:{}},Ea:{g:{D:M.k.D,u:M.k.u},stream:Kb}}),r=Lb(e,t,r,i),N(r.mode)?(r.k=M.C.dir.g,r.n=M.C.dir.stream,r.e={}):32768==(61440&r.mode)?(r.k=M.C.file.g,r.n=M.C.file.stream,r.o=0,r.e=null):40960==(61440&r.mode)?(r.k=M.C.link.g,r.n=M.C.link.stream):8192==(61440&r.mode)&&(r.k=M.C.Ea.g,r.n=M.C.Ea.stream),r.timestamp=Date.now(),e&&(e.e[t]=r),r},cb:function(e){if(e.e&&e.e.subarray){for(var t=[],r=0;r<e.o;++r)t.push(e.e[r]);return t}return e.e},Gd:function(e){return e.e?e.e.subarray?e.e.subarray(0,e.o):new Uint8Array(e.e):new Uint8Array},Ga:function(e,t){if(e.e&&e.e.subarray&&t>e.e.length&&(e.e=M.cb(e),e.o=e.e.length),!e.e||e.e.subarray){var r=e.e?e.e.buffer.byteLength:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)|0),0!=r&&(t=Math.max(t,256)),r=e.e,e.e=new Uint8Array(t),0<e.o&&e.e.set(r.subarray(0,e.o),0))}else for(!e.e&&0<t&&(e.e=[]);e.e.length<t;)e.e.push(0)},ob:function(e,t){if(e.o!=t)if(0==t)e.e=null,e.o=0;else{if(!e.e||e.e.subarray){var r=e.e;e.e=new Uint8Array(new ArrayBuffer(t)),r&&e.e.set(r.subarray(0,Math.min(t,e.o)))}else if(e.e||(e.e=[]),e.e.length>t)e.e.length=t;else for(;e.e.length<t;)e.e.push(0);e.o=t}},k:{D:function(e){var t={};return t.dev=8192==(61440&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,N(e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.o:40960==(61440&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.K=4096,t.blocks=Math.ceil(t.size/t.K),t},u:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&M.ob(e,t.size)},lookup:function(){throw Mb[J.F]},T:function(e,t,r,i){return M.createNode(e,t,r,i)},rename:function(e,t,r){if(N(e.mode)){var i;try{i=Nb(t,r)}catch(e){}if(i)for(var n in i.e)throw new L(J.za)}delete e.parent.e[e.name],e.name=r,t.e[r]=e,e.parent=t},unlink:function(e,t){delete e.e[t]},rmdir:function(e,t){var r,i=Nb(e,t);for(r in i.e)throw new L(J.za);delete e.e[t]},readdir:function(e){var t,r=[".",".."];for(t in e.e)e.e.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,t,r){return e=M.createNode(e,t,41471,0),e.link=r,e},readlink:function(e){if(40960!=(61440&e.mode))throw new L(J.q);return e.link}},n:{read:function(e,t,r,i,n){var a=e.g.e;if(n>=e.g.o)return 0;if(e=Math.min(e.g.o-n,i),assert(0<=e),8<e&&a.subarray)t.set(a.subarray(n,n+e),r);else for(i=0;i<e;i++)t[r+i]=a[n+i];return e},write:function(e,t,r,i,n,a){if(!i)return 0;if(e=e.g,e.timestamp=Date.now(),t.subarray&&(!e.e||e.e.subarray)){if(a)return e.e=t.subarray(r,r+i),e.o=i;if(0===e.o&&0===n)return e.e=new Uint8Array(t.subarray(r,r+i)),e.o=i;if(n+i<=e.o)return e.e.set(t.subarray(r,r+i),n),i}if(M.Ga(e,n+i),e.e.subarray&&t.subarray)e.e.set(t.subarray(r,r+i),n);else for(a=0;a<i;a++)e.e[n+a]=t[r+a];return e.o=Math.max(e.o,n+i),i},G:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.g.mode)&&(t+=e.g.o),0>t)throw new L(J.q);return t},Ba:function(e,t,r){M.Ga(e.g,t+r),e.g.o=Math.max(e.g.o,t+r)},Na:function(e,t,r,i,n,a,o){if(32768!=(61440&e.g.mode))throw new L(J.ha);if(r=e.g.e,2&o||r.buffer!==t&&r.buffer!==t.buffer){if((0<n||n+i<e.g.o)&&(r=r.subarray?r.subarray(n,n+i):Array.prototype.slice.call(r,n,n+i)),e=!0,!(i=Ea(i)))throw new L(J.Ta);t.set(r,i)}else e=!1,i=r.byteOffset;return{Rd:i,xd:e}},Pa:function(e,t,r,i,n){if(32768!=(61440&e.g.mode))throw new L(J.ha);return 2&n?0:(M.n.write(e,t,0,i,r,!1),0)}}},P={$:!1,sb:function(){P.$=!!process.platform.match(/^win/)},A:function(e){return assert(da),P.createNode(null,"/",P.Ja(e.pa.root),0)},createNode:function(e,t,r){if(!N(r)&&32768!=(61440&r)&&40960!=(61440&r))throw new L(J.q);return e=Lb(e,t,r),e.k=P.k,e.n=P.n,e},Ja:function(e){var t;try{t=fs.lstatSync(e),P.$&&(t.mode=t.mode|(146&t.mode)>>1)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return t.mode},B:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.A.pa.root),t.reverse(),Cb.apply(null,t)},Ha:{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+"},$a:function(e){if((e&=-32769)in P.Ha)return P.Ha[e];throw new L(J.q)},k:{D:function(e){e=P.B(e);var t;try{t=fs.lstatSync(e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return P.$&&!t.K&&(t.K=4096),P.$&&!t.blocks&&(t.blocks=(t.size+t.K-1)/t.K|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,K:t.K,blocks:t.blocks}},u:function(e,t){var r=P.B(e);try{void 0!==t.mode&&(fs.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.size&&fs.truncateSync(r,t.size)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},lookup:function(e,t){var r=K(P.B(e),t),r=P.Ja(r);return P.createNode(e,t,r)},T:function(e,t,r,i){e=P.createNode(e,t,r,i),t=P.B(e);try{N(e.mode)?fs.mkdirSync(t,e.mode):fs.writeFileSync(t,"",{mode:e.mode})}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return e},rename:function(e,t,r){e=P.B(e),t=K(P.B(t),r);try{fs.renameSync(e,t)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},unlink:function(e,t){var r=K(P.B(e),t);try{fs.unlinkSync(r)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},rmdir:function(e,t){var r=K(P.B(e),t);try{fs.rmdirSync(r)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},readdir:function(e){e=P.B(e);try{return fs.readdirSync(e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},symlink:function(e,t,r){e=K(P.B(e),t);try{fs.symlinkSync(r,e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},readlink:function(e){var t=P.B(e);try{
|
|
return t=fs.readlinkSync(t),t=Ob.relative(Ob.resolve(e.A.pa.root),t)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}}},n:{open:function(e){var t=P.B(e.g);try{32768==(61440&e.g.mode)&&(e.V=fs.openSync(t,P.$a(e.flags)))}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},close:function(e){try{32768==(61440&e.g.mode)&&e.V&&fs.closeSync(e.V)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},read:function(e,t,r,i,n){if(0===i)return 0;var a,o=new Buffer(i);try{a=fs.readSync(e.V,o,0,i,n)}catch(e){throw new L(J[e.code])}if(0<a)for(e=0;e<a;e++)t[r+e]=o[e];return a},write:function(e,t,r,i,n){t=new Buffer(t.subarray(r,r+i));var a;try{a=fs.writeSync(e.V,t,0,i,n)}catch(e){throw new L(J[e.code])}return a},G:function(e,t,r){if(1===r)t+=e.position;else if(2===r&&32768==(61440&e.g.mode))try{t+=fs.fstatSync(e.V).size}catch(e){throw new L(J[e.code])}if(0>t)throw new L(J.q);return t}}};D(1,"i32*",2),D(1,"i32*",2),D(1,"i32*",2);var Pb=null,Qb=[null],Rb=[],Sb=1,Q=null,Tb=!0,R={},L=null,Mb={},$b={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},Kb={open:function(e){e.n=Qb[e.g.rdev].n,e.n.open&&e.n.open(e)},G:function(){throw new L(J.ia)}},qc,vc={},Zb,dc,lc,wc=0,yc={};e._i64Add=zc;var Ac=1;e._memcpy=Bc;var Y=null,Hc="",Lc=0,Fc=null,Kc=0,Dc=0,Ec=0,Pc=0,Mc=[],Rc={},Gc,Nc,Sc=!1,Tc=!1,Uc=[],cd=!1,dd=void 0,ed=void 0,kd=0,od=[],Wc,Xc,Yc,Zc,jd;if(pc(),Q=Array(4096),ec(M,"/"),V("/tmp"),V("/home"),V("/home/web_user"),function(){V("/dev"),Gb(259,{read:function(){return 0},write:function(e,t,r,i){return i}}),hc("/dev/null",259),Fb(1280,Ib),Fb(1536,Jb),hc("/dev/tty",1280),hc("/dev/tty1",1536);var e;if("undefined"!=typeof crypto){var t=new Uint8Array(1);e=function(){return crypto.getRandomValues(t),t[0]}}else e=da?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};W("/dev","random",e),W("/dev","urandom",e),V("/dev/shm"),V("/dev/shm/tmp")}(),V("/proc"),V("/proc/self"),V("/proc/self/fd"),ec({A:function(){var e=Lb("/proc/self","fd",16895,73);return e.k={lookup:function(e,t){var r=Rb[+t];if(!r)throw new L(J.ea);var i={parent:null,A:{Oa:"fake"},k:{readlink:function(){return r.path}}};return i.parent=i}},e}},"/proc/self/fd"),cb.unshift(function(){if(!e.noFSInit&&!qc){assert(!qc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),qc=!0,pc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?W("/dev","stdin",e.stdin):ic("/dev/tty","/dev/stdin"),e.stdout?W("/dev","stdout",null,e.stdout):ic("/dev/tty","/dev/stdout"),e.stderr?W("/dev","stderr",null,e.stderr):ic("/dev/tty1","/dev/stderr");var t=kc("/dev/stdin","r");assert(0===t.fd,"invalid handle for stdin ("+t.fd+")"),t=kc("/dev/stdout","w"),assert(1===t.fd,"invalid handle for stdout ("+t.fd+")"),t=kc("/dev/stderr","w"),assert(2===t.fd,"invalid handle for stderr ("+t.fd+")")}}),db.push(function(){Tb=!1}),H.push(function(){qc=!1;var t=e._fflush;for(t&&t(0),t=0;t<Rb.length;t++){var r=Rb[t];r&&mc(r)}}),e.FS_createFolder=function(e,t,r,i){return e=K("string"==typeof e?e:T(e),t),V(e,rc(r,i))},e.FS_createPath=function(e,t){e="string"==typeof e?e:T(e);for(var r=t.split("/").reverse();r.length;){var i=r.pop();if(i){var n=K(e,i);try{V(n)}catch(e){}e=n}}return n},e.FS_createDataFile=tc,e.FS_createPreloadedFile=function(t,r,i,n,a,o,f,s,c,u){function h(i){function h(e){u&&u(),s||tc(t,r,e,n,a,c),o&&o(),lb()}var l=!1;e.preloadPlugins.forEach(function(e){!l&&e.canHandle(d)&&(e.handle(i,d,h,function(){f&&f(),lb()}),l=!0)}),l||h(i)}Vc();var d=r?Db(K(t,r)):t;kb(),"string"==typeof i?nd(i,function(e){h(e)},f):h(i)},e.FS_createLazyFile=function(e,t,r,i,n){function a(){this.oa=!1,this.Y=[]}var o,f;if(a.prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.chunkSize;return this.gb(e/this.chunkSize|0)[t]}},a.prototype.pb=function(e){this.gb=e},a.prototype.Ca=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(200<=e.status&&300>e.status||304===e.status))throw Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(n=i);var a=this;a.pb(function(e){var t=e*n,o=(e+1)*n-1,o=Math.min(o,i-1);if(void 0===a.Y[e]){var f=a.Y;if(t>o)throw Error("invalid range ("+t+", "+o+") or no bytes requested!");if(o>i-1)throw Error("only "+i+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",r,!1),i!==n&&s.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(s.responseType="arraybuffer"),s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(200<=s.status&&300>s.status||304===s.status))throw Error("Couldn't load "+r+". Status: "+s.status);t=void 0!==s.response?new Uint8Array(s.response||[]):hb(s.responseText||"",!0),f[e]=t}if(void 0===a.Y[e])throw Error("doXHR failed!");return a.Y[e]}),this.Wa=i,this.Va=n,this.oa=!0},"undefined"!=typeof XMLHttpRequest){if(!ca)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";o=new a,Object.defineProperty(o,"length",{get:function(){return this.oa||this.Ca(),this.Wa}}),Object.defineProperty(o,"chunkSize",{get:function(){return this.oa||this.Ca(),this.Va}}),f=void 0}else f=r,o=void 0;var s=sc(e,t,i,n);o?s.e=o:f&&(s.e=null,s.url=f),Object.defineProperty(s,"usedBytes",{get:function(){return this.e.length}});var c={};return Object.keys(s.n).forEach(function(e){var t=s.n[e];c[e]=function(){if(!uc(s))throw new L(J.H);return t.apply(null,arguments)}}),c.read=function(e,t,r,i,n){if(!uc(s))throw new L(J.H);if(e=e.g.e,n>=e.length)return 0;if(i=Math.min(e.length-n,i),assert(0<=i),e.slice)for(var a=0;a<i;a++)t[r+a]=e[n+a];else for(a=0;a<i;a++)t[r+a]=e.get(n+a);return i},s.n=c,s},e.FS_createLink=function(e,t,r){return e=K("string"==typeof e?e:T(e),t),ic(r,e)},e.FS_createDevice=W,e.FS_unlink=function(e){var t,r=S(e,{parent:!0}).g,i=Bb(e),n=Nb(r,i);e:{try{t=Nb(r,i)}catch(e){t=e.S;break e}var a=Yb(r,"wx");t=a?a:N(t.mode)?J.P:0}if(t)throw t===J.P&&(t=J.I),new L(t);if(!r.k.unlink)throw new L(J.I);if(n.U)throw new L(J.fa);try{R.willDeletePath&&R.willDeletePath(e)}catch(t){console.log("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}if(r.k.unlink(r,i),r=Wb(n.parent.id,n.name),Q[r]===n)Q[r]=n.M;else for(r=Q[r];r;){if(r.M===n){r.M=n.M;break}r=r.M}try{R.onDeletePath&&R.onDeletePath(e)}catch(t){console.log("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},cb.unshift(function(){}),H.push(function(){}),da){var fs=require("fs"),Ob=require("path");P.sb()}e.requestFullScreen=function(e,t,r){fd(e,t,r)},e.requestAnimationFrame=function(e){Ic(e)},e.setCanvasSize=function(t,r,i){id(e.canvas,t,r),i||pd()},e.pauseMainLoop=function(){Y=null,Lc++},e.resumeMainLoop=function(){Lc++;var e=Dc,t=Ec,r=Fc;Fc=null,Jc(r,0,!1,Kc,!0),Cc(e,t),Y()},e.getUserMedia=function(){window.p||(window.p=navigator.getUserMedia||navigator.mozGetUserMedia),window.p(void 0)},e.createContext=function(e,t,r,i){return bd(e,t,r,i)},Ua=m=n.ja(la),Fa=!0,Va=Ua+$a,Wa=r=n.ja(Va),assert(Wa<t,"TOTAL_MEMORY not big enough for stack");var qd=D([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",3);e.Ya={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:Ya},e.Za={abort:x,assert:assert,invoke_iiii:function(t,r,i,n){try{return e.dynCall_iiii(t,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiiii:function(t,r,i,n,a,o){try{e.dynCall_viiiii(t,r,i,n,a,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_vi:function(t,r){try{e.dynCall_vi(t,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_ii:function(t,r){try{return e.dynCall_ii(t,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viii:function(t,r,i,n){try{e.dynCall_viii(t,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_v:function(t){try{e.dynCall_v(t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiiiii:function(t,r,i,n,a,o,f){try{e.dynCall_viiiiii(t,r,i,n,a,o,f)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_iiiiii:function(t,r,i,n,a,o){try{return e.dynCall_iiiiii(t,r,i,n,a,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiii:function(t,r,i,n,a){try{e.dynCall_viiii(t,r,i,n,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},_pthread_cleanup_pop:function(){assert(pb.level==H.length,"cannot pop if something else added meanwhile!"),H.pop(),pb.level=H.length},___syscall54:function(e,t){wc=t;try{var r=xc(),i=X();switch(i){case 21505:return r.tty?0:-J.Q;case 21506:return r.tty?0:-J.Q;case 21519:if(!r.tty)return-J.Q;var n=X();return C[n>>2]=0;case 21520:return r.tty?-J.q:-J.Q;case 21531:if(n=X(),!r.n.ib)throw new L(J.Q);return r.n.ib(r,i,n);default:x("bad ioctl syscall "+i)}}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall6:function(e,t){wc=t;try{return mc(xc()),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},_emscripten_set_main_loop_timing:Cc,__ZSt18uncaught_exceptionv:tb,___setErrNo:ob,_sbrk:Ga,___cxa_begin_catch:function(e){tb.p--,ub.push(e);var t;e:{if(e&&!vb[e])for(t in vb)if(vb[t].wd===e)break e;t=e}return t&&vb[t].Sd++,e},_emscripten_memcpy_big:function(e,t,r){return E.set(E.subarray(t,t+r),e),e},_sysconf:function(e){switch(e){case 30:return 4096;case 85:return F/4096;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator?navigator.hardwareConcurrency||1:1}return ob(J.q),-1},_pthread_getspecific:function(e){return yc[e]||0},_pthread_self:function(){return 0},_pthread_once:wb,_pthread_key_create:function(e){return 0==e?J.q:(C[e>>2]=Ac,yc[Ac]=0,Ac++,0)},___unlock:function(){},_emscripten_set_main_loop:Jc,_pthread_setspecific:function(e,t){return e in yc?(yc[e]=t,0):J.q},___lock:function(){},_abort:function(){e.abort()},_pthread_cleanup_push:pb,_time:function(e){var t=Date.now()/1e3|0;return e&&(C[e>>2]=t),t},___syscall140:function(e,t){wc=t;try{var r=xc(),i=X(),n=X(),a=X(),o=X();return assert(0===i),nc(r,n,o),C[a>>2]=r.position,r.na&&0===n&&0===o&&(r.na=null),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall146:function(e,t){wc=t;try{var r,i=xc(),n=X();e:{for(var a=X(),o=0,f=0;f<a;f++){var s=oc(i,y,C[n+8*f>>2],C[n+(8*f+4)>>2],void 0);if(0>s){r=-1;break e}o+=s}r=o}return r}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},STACKTOP:m,STACK_MAX:Va,tempDoublePtr:mb,ABORT:na,cttz_i8:qd};var Z=function(e,t,r){"use asm";var i=e.Int8Array;var n=e.Int16Array;var a=e.Int32Array;var o=e.Uint8Array;var f=e.Uint16Array;var s=e.Uint32Array;var c=e.Float32Array;var u=e.Float64Array;var h=new i(r);var d=new n(r);var l=new a(r);var p=new o(r);var b=new f(r);var v=new s(r);var y=new c(r);var m=new u(r);var g=e.byteLength;var w=t.STACKTOP|0;var _=t.STACK_MAX|0;var k=t.tempDoublePtr|0;var S=t.ABORT|0;var E=t.cttz_i8|0;var M=0;var A=0;var x=0;var B=0;var I=e.NaN,C=e.Infinity;var R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0;var q=0;var F=0;var z=0;var K=0;var X=0;var H=0;var J=0;var V=0;var Y=0;var W=0;var G=e.Math.floor;var Z=e.Math.abs;var Q=e.Math.sqrt;var $=e.Math.pow;var ee=e.Math.cos;var te=e.Math.sin;var re=e.Math.tan;var ie=e.Math.acos;var ne=e.Math.asin;var ae=e.Math.atan;var oe=e.Math.atan2;var fe=e.Math.exp;var se=e.Math.log;var ce=e.Math.ceil;var ue=e.Math.imul;var he=e.Math.min;var de=e.Math.clz32;var le=t.abort;var pe=t.assert;var be=t.invoke_iiii;var ve=t.invoke_viiiii;var ye=t.invoke_vi;var me=t.invoke_ii;var ge=t.invoke_viii;var we=t.invoke_v;var _e=t.invoke_viiiiii;var ke=t.invoke_iiiiii;var Se=t.invoke_viiii;var Ee=t._pthread_cleanup_pop;var Me=t.___syscall54;var Ae=t.___syscall6;var xe=t._emscripten_set_main_loop_timing;var Be=t.__ZSt18uncaught_exceptionv;var Ie=t.___setErrNo;var Ce=t._sbrk;var Re=t.___cxa_begin_catch;var Te=t._emscripten_memcpy_big;var Pe=t._sysconf;var Le=t._pthread_getspecific;var je=t._pthread_self;var De=t._pthread_once;var Ue=t._pthread_key_create;var Oe=t.___unlock;var Ne=t._emscripten_set_main_loop;var qe=t._pthread_setspecific;var Fe=t.___lock;var ze=t._abort;var Ke=t._pthread_cleanup_push;var Xe=t._time;var He=t.___syscall140;var Je=t.___syscall146;var Ve=0;function Ye(e){if(g(e)&16777215||g(e)<=16777215||g(e)>2147483648)return false;h=new i(e);d=new n(e);l=new a(e);p=new o(e);b=new f(e);v=new s(e);y=new c(e);m=new u(e);r=e;return true}function We(e){e=e|0;var t=0;t=w;w=w+e|0;w=w+15&-16;return t|0}function Ge(){return w|0}function Ze(e){e=e|0;w=e}function Qe(e,t){e=e|0;t=t|0;w=e;_=t}function $e(e,t){e=e|0;t=t|0;if(!M){M=e;A=t}}function et(e){e=e|0;h[k>>0]=h[e>>0];h[k+1>>0]=h[e+1>>0];h[k+2>>0]=h[e+2>>0];h[k+3>>0]=h[e+3>>0]}function tt(e){e=e|0;h[k>>0]=h[e>>0];h[k+1>>0]=h[e+1>>0];h[k+2>>0]=h[e+2>>0];h[k+3>>0]=h[e+3>>0];h[k+4>>0]=h[e+4>>0];h[k+5>>0]=h[e+5>>0];h[k+6>>0]=h[e+6>>0];h[k+7>>0]=h[e+7>>0]}function rt(e){e=e|0;q=e}function it(){return q|0}function nt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0,v=0;v=w;w=w+608|0;d=v+88|0;h=v+72|0;s=v+64|0;f=v+48|0;o=v+24|0;a=v;u=v+96|0;p=v+92|0;c=e+4|0;b=e+8|0;if((l[c>>2]|0)>>>0>(l[b>>2]|0)>>>0){l[a>>2]=1154;l[a+4>>2]=2120;l[a+8>>2]=1133;wr(u,1100,a)|0;gr(u,v+16|0)|0}if((2147418112/(i>>>0)|0)>>>0<=t>>>0){l[o>>2]=1154;l[o+4>>2]=2121;l[o+8>>2]=1169;wr(u,1100,o)|0;gr(u,v+40|0)|0}o=l[b>>2]|0;if(o>>>0>=t>>>0){b=1;w=v;return b|0}do{if(r){if(t){a=t+-1|0;if(!(a&t)){a=11;break}else t=a}else t=-1;t=t>>>16|t;t=t>>>8|t;t=t>>>4|t;t=t>>>2|t;t=(t>>>1|t)+1|0;a=10}else a=10}while(0);if((a|0)==10)if(!t){t=0;a=12}else a=11;if((a|0)==11)if(t>>>0<=o>>>0)a=12;if((a|0)==12){l[f>>2]=1154;l[f+4>>2]=2130;l[f+8>>2]=1217;wr(u,1100,f)|0;gr(u,s)|0}r=ue(t,i)|0;do{if(!n){a=at(l[e>>2]|0,r,p,1)|0;if(!a){b=0;w=v;return b|0}else{l[e>>2]=a;break}}else{o=ot(r,p)|0;if(!o){b=0;w=v;return b|0}Ci[n&0](o,l[e>>2]|0,l[c>>2]|0);a=l[e>>2]|0;do{if(a)if(!(a&7)){Pi[l[104>>2]&1](a,0,0,1,l[27]|0)|0;break}else{l[h>>2]=1154;l[h+4>>2]=2499;l[h+8>>2]=1516;wr(u,1100,h)|0;gr(u,d)|0;break}}while(0);l[e>>2]=o}}while(0);a=l[p>>2]|0;if(a>>>0>r>>>0)t=(a>>>0)/(i>>>0)|0;l[b>>2]=t;b=1;w=v;return b|0}function at(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,o=0,f=0,s=0,c=0;c=w;w=w+592|0;s=c+48|0;a=c+24|0;n=c;f=c+72|0;o=c+68|0;if(e&7){l[n>>2]=1154;l[n+4>>2]=2499;l[n+8>>2]=1494;wr(f,1100,n)|0;gr(f,c+16|0)|0;s=0;w=c;return s|0}if(t>>>0>2147418112){l[a>>2]=1154;l[a+4>>2]=2499;l[a+8>>2]=1387;wr(f,1100,a)|0;gr(f,c+40|0)|0;s=0;w=c;return s|0}l[o>>2]=t;i=Pi[l[104>>2]&1](e,t,o,i,l[27]|0)|0;if(r)l[r>>2]=l[o>>2];if(!(i&7)){s=i;w=c;return s|0}l[s>>2]=1154;l[s+4>>2]=2551;l[s+8>>2]=1440;wr(f,1100,s)|0;gr(f,c+64|0)|0;s=i;w=c;return s|0}function ot(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0;s=w;w=w+592|0;o=s+48|0;f=s+24|0;r=s;a=s+72|0;n=s+68|0;i=e+3&-4;i=(i|0)!=0?i:4;if(i>>>0>2147418112){l[r>>2]=1154;l[r+4>>2]=2499;l[r+8>>2]=1387;wr(a,1100,r)|0;gr(a,s+16|0)|0;f=0;w=s;return f|0}l[n>>2]=i;r=Pi[l[104>>2]&1](0,i,n,1,l[27]|0)|0;e=l[n>>2]|0;if(t)l[t>>2]=e;if((r|0)==0|e>>>0<i>>>0){l[f>>2]=1154;l[f+4>>2]=2499;l[f+8>>2]=1413;wr(a,1100,f)|0;gr(a,s+40|0)|0;f=0;w=s;return f|0}if(!(r&7)){f=r;w=s;return f|0}l[o>>2]=1154;l[o+4>>2]=2526;l[o+8>>2]=1440;wr(a,1100,o)|0;gr(a,s+64|0)|0;f=r;w=s;return f|0}function ft(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,o=0,f=0,s=0,c=0,u=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0,q=0,F=0,z=0,K=0,X=0;X=w;w=w+960|0;F=X+232|0;q=X+216|0;N=X+208|0;O=X+192|0;U=X+184|0;D=X+168|0;j=X+160|0;L=X+144|0;R=X+136|0;C=X+120|0;I=X+112|0;B=X+96|0;M=X+88|0;E=X+72|0;S=X+64|0;k=X+48|0;v=X+40|0;m=X+24|0;y=X+16|0;u=X;P=X+440|0;z=X+376|0;K=X+304|0;_=X+236|0;if((t|0)==0|i>>>0>11){e=0;w=X;return e|0}l[e>>2]=t;n=K;a=n+68|0;do{l[n>>2]=0;n=n+4|0}while((n|0)<(a|0));a=0;do{n=h[r+a>>0]|0;if(n<<24>>24){T=K+((n&255)<<2)|0;l[T>>2]=(l[T>>2]|0)+1}a=a+1|0}while((a|0)!=(t|0));a=0;c=1;o=0;f=-1;s=0;while(1){n=l[K+(c<<2)>>2]|0;if(!n)l[e+28+(c+-1<<2)>>2]=0;else{T=c+-1|0;l[z+(T<<2)>>2]=a;a=n+a|0;x=16-c|0;l[e+28+(T<<2)>>2]=(a+-1<<x|(1<<x)+-1)+1;l[e+96+(T<<2)>>2]=s;l[_+(c<<2)>>2]=s;o=o>>>0>c>>>0?o:c;f=f>>>0<c>>>0?f:c;s=n+s|0}c=c+1|0;if((c|0)==17){T=o;break}else a=a<<1}l[e+4>>2]=s;a=e+172|0;do{if(s>>>0>(l[a>>2]|0)>>>0){l[a>>2]=s;if(s){n=s+-1|0;if(n&s)g=14}else{n=-1;g=14}if((g|0)==14){x=n>>>16|n;x=x>>>8|x;x=x>>>4|x;x=x>>>2|x;x=(x>>>1|x)+1|0;l[a>>2]=x>>>0>t>>>0?t:x}o=e+176|0;n=l[o>>2]|0;do{if(n){x=l[n+-4>>2]|0;n=n+-8|0;if(!((x|0)!=0?(x|0)==(~l[n>>2]|0):0)){l[u>>2]=1154;l[u+4>>2]=644;l[u+8>>2]=1863;wr(P,1100,u)|0;gr(P,y)|0}if(!(n&7)){Pi[l[104>>2]&1](n,0,0,1,l[27]|0)|0;break}else{l[m>>2]=1154;l[m+4>>2]=2499;l[m+8>>2]=1516;wr(P,1100,m)|0;gr(P,v)|0;break}}}while(0);a=l[a>>2]|0;a=(a|0)!=0?a:1;n=ot((a<<1)+8|0,0)|0;if(!n){l[o>>2]=0;n=0;break}else{l[n+4>>2]=a;l[n>>2]=~a;l[o>>2]=n+8;g=25;break}}else g=25}while(0);e:do{if((g|0)==25){x=e+24|0;h[x>>0]=f;h[e+25>>0]=T;a=e+176|0;o=0;do{A=h[r+o>>0]|0;n=A&255;if(A<<24>>24){if(!(l[K+(n<<2)>>2]|0)){l[k>>2]=1154;l[k+4>>2]=2273;l[k+8>>2]=1261;wr(P,1100,k)|0;gr(P,S)|0}A=_+(n<<2)|0;n=l[A>>2]|0;l[A>>2]=n+1;if(n>>>0>=s>>>0){l[E>>2]=1154;l[E+4>>2]=2277;l[E+8>>2]=1274;wr(P,1100,E)|0;gr(P,M)|0}d[(l[a>>2]|0)+(n<<1)>>1]=o}o=o+1|0}while((o|0)!=(t|0));n=h[x>>0]|0;M=(n&255)>>>0<i>>>0?i:0;A=e+8|0;l[A>>2]=M;E=(M|0)!=0;if(E){S=1<<M;n=e+164|0;do{if(S>>>0>(l[n>>2]|0)>>>0){l[n>>2]=S;o=e+168|0;n=l[o>>2]|0;do{if(n){k=l[n+-4>>2]|0;n=n+-8|0;if(!((k|0)!=0?(k|0)==(~l[n>>2]|0):0)){l[B>>2]=1154;l[B+4>>2]=644;l[B+8>>2]=1863;wr(P,1100,B)|0;gr(P,I)|0}if(!(n&7)){Pi[l[104>>2]&1](n,0,0,1,l[27]|0)|0;break}else{l[C>>2]=1154;l[C+4>>2]=2499;l[C+8>>2]=1516;wr(P,1100,C)|0;gr(P,R)|0;break}}}while(0);n=S<<2;a=ot(n+8|0,0)|0;if(!a){l[o>>2]=0;n=0;break e}else{R=a+8|0;l[a+4>>2]=S;l[a>>2]=~S;l[o>>2]=R;a=R;break}}else{a=e+168|0;n=S<<2;o=a;a=l[a>>2]|0}}while(0);Yr(a|0,-1,n|0)|0;g=e+176|0;k=1;do{if(l[K+(k<<2)>>2]|0){t=M-k|0;_=1<<t;a=k+-1|0;f=l[z+(a<<2)>>2]|0;if(a>>>0>=16){l[L>>2]=1154;l[L+4>>2]=1953;l[L+8>>2]=1737;wr(P,1100,L)|0;gr(P,j)|0}n=l[e+28+(a<<2)>>2]|0;if(!n)m=-1;else m=(n+-1|0)>>>(16-k|0);if(f>>>0<=m>>>0){v=(l[e+96+(a<<2)>>2]|0)-f|0;y=k<<16;do{n=b[(l[g>>2]|0)+(v+f<<1)>>1]|0;if((p[r+n>>0]|0|0)!=(k|0)){l[D>>2]=1154;l[D+4>>2]=2319;l[D+8>>2]=1303;wr(P,1100,D)|0;gr(P,U)|0}u=f<<t;a=n|y;c=0;do{s=c+u|0;if(s>>>0>=S>>>0){l[O>>2]=1154;l[O+4>>2]=2325;l[O+8>>2]=1337;wr(P,1100,O)|0;gr(P,N)|0}n=l[o>>2]|0;if((l[n+(s<<2)>>2]|0)!=-1){l[q>>2]=1154;l[q+4>>2]=2327;l[q+8>>2]=1360;wr(P,1100,q)|0;gr(P,F)|0;n=l[o>>2]|0}l[n+(s<<2)>>2]=a;c=c+1|0}while(c>>>0<_>>>0);f=f+1|0}while(f>>>0<=m>>>0)}}k=k+1|0}while(M>>>0>=k>>>0);n=h[x>>0]|0}a=e+96|0;l[a>>2]=(l[a>>2]|0)-(l[z>>2]|0);a=e+100|0;l[a>>2]=(l[a>>2]|0)-(l[z+4>>2]|0);a=e+104|0;l[a>>2]=(l[a>>2]|0)-(l[z+8>>2]|0);a=e+108|0;l[a>>2]=(l[a>>2]|0)-(l[z+12>>2]|0);a=e+112|0;l[a>>2]=(l[a>>2]|0)-(l[z+16>>2]|0);a=e+116|0;l[a>>2]=(l[a>>2]|0)-(l[z+20>>2]|0);a=e+120|0;l[a>>2]=(l[a>>2]|0)-(l[z+24>>2]|0);a=e+124|0;l[a>>2]=(l[a>>2]|0)-(l[z+28>>2]|0);a=e+128|0;l[a>>2]=(l[a>>2]|0)-(l[z+32>>2]|0);a=e+132|0;l[a>>2]=(l[a>>2]|0)-(l[z+36>>2]|0);a=e+136|0;l[a>>2]=(l[a>>2]|0)-(l[z+40>>2]|0);a=e+140|0;l[a>>2]=(l[a>>2]|0)-(l[z+44>>2]|0);a=e+144|0;l[a>>2]=(l[a>>2]|0)-(l[z+48>>2]|0);a=e+148|0;l[a>>2]=(l[a>>2]|0)-(l[z+52>>2]|0);a=e+152|0;l[a>>2]=(l[a>>2]|0)-(l[z+56>>2]|0);a=e+156|0;l[a>>2]=(l[a>>2]|0)-(l[z+60>>2]|0);a=e+16|0;l[a>>2]=0;o=e+20|0;l[o>>2]=n&255;t:do{if(E){while(1){if(!i)break t;n=i+-1|0;if(!(l[K+(i<<2)>>2]|0))i=n;else break}l[a>>2]=l[e+28+(n<<2)>>2];n=M+1|0;l[o>>2]=n;if(n>>>0<=T>>>0){while(1){if(l[K+(n<<2)>>2]|0)break;n=n+1|0;if(n>>>0>T>>>0)break t}l[o>>2]=n}}}while(0);l[e+92>>2]=-1;l[e+160>>2]=1048575;l[e+12>>2]=32-(l[A>>2]|0);n=1}}while(0);e=n;w=X;return e|0}function st(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0;if(!e){n=qr(t)|0;if(!r){r=n;return r|0}if(!n)a=0;else a=Kr(n)|0;l[r>>2]=a;r=n;return r|0}if(!t){Fr(e);if(!r){r=0;return r|0}l[r>>2]=0;r=0;return r|0}n=zr(e,t)|0;a=(n|0)!=0;if(a|i^1)a=a?n:e;else{n=zr(e,t)|0;a=(n|0)==0?e:n}if(!r){r=n;return r|0}t=Kr(a)|0;l[r>>2]=t;r=n;return r|0}function ct(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(!((e|0)!=0&t>>>0>73&(r|0)!=0)){r=0;return r|0}if((l[r>>2]|0)!=40|t>>>0<74){r=0;return r|0}if(((p[e>>0]|0)<<8|(p[e+1>>0]|0)|0)!=18552){r=0;return r|0}if(((p[e+2>>0]|0)<<8|(p[e+3>>0]|0))>>>0<74){r=0;return r|0}if(((p[e+7>>0]|0)<<16|(p[e+6>>0]|0)<<24|(p[e+8>>0]|0)<<8|(p[e+9>>0]|0))>>>0>t>>>0){r=0;return r|0}l[r+4>>2]=(p[e+12>>0]|0)<<8|(p[e+13>>0]|0);l[r+8>>2]=(p[e+14>>0]|0)<<8|(p[e+15>>0]|0);l[r+12>>2]=p[e+16>>0];l[r+16>>2]=p[e+17>>0];t=e+18|0;i=r+32|0;l[i>>2]=p[t>>0];l[i+4>>2]=0;t=h[t>>0]|0;l[r+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16;l[r+24>>2]=(p[e+26>>0]|0)<<16|(p[e+25>>0]|0)<<24|(p[e+27>>0]|0)<<8|(p[e+28>>0]|0);l[r+28>>2]=(p[e+30>>0]|0)<<16|(p[e+29>>0]|0)<<24|(p[e+31>>0]|0)<<8|(p[e+32>>0]|0);r=1;return r|0}function ut(e){e=e|0;Re(e|0)|0;Ft()}function ht(e){e=e|0;var t=0,r=0,i=0,n=0,a=0;a=w;w=w+544|0;n=a;i=a+24|0;t=l[e+20>>2]|0;if(t)dt(t);t=e+4|0;r=l[t>>2]|0;if(!r){n=e+16|0;h[n>>0]=0;w=a;return}if(!(r&7))Pi[l[104>>2]&1](r,0,0,1,l[27]|0)|0;else{l[n>>2]=1154;l[n+4>>2]=2499;l[n+8>>2]=1516;wr(i,1100,n)|0;gr(i,a+16|0)|0}l[t>>2]=0;l[e+8>>2]=0;l[e+12>>2]=0;n=e+16|0;h[n>>0]=0;w=a;return}function dt(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0;p=w;w=w+640|0;d=p+112|0;h=p+96|0;u=p+88|0;c=p+72|0;s=p+64|0;f=p+48|0;i=p+40|0;a=p+24|0;n=p+16|0;r=p;o=p+120|0;if(!e){w=p;return}t=l[e+168>>2]|0;do{if(t){b=l[t+-4>>2]|0;t=t+-8|0;if(!((b|0)!=0?(b|0)==(~l[t>>2]|0):0)){l[r>>2]=1154;l[r+4>>2]=644;l[r+8>>2]=1863;wr(o,1100,r)|0;gr(o,n)|0}if(!(t&7)){Pi[l[104>>2]&1](t,0,0,1,l[27]|0)|0;break}else{l[a>>2]=1154;l[a+4>>2]=2499;l[a+8>>2]=1516;wr(o,1100,a)|0;gr(o,i)|0;break}}}while(0);t=l[e+176>>2]|0;do{if(t){b=l[t+-4>>2]|0;t=t+-8|0;if(!((b|0)!=0?(b|0)==(~l[t>>2]|0):0)){l[f>>2]=1154;l[f+4>>2]=644;l[f+8>>2]=1863;wr(o,1100,f)|0;gr(o,s)|0}if(!(t&7)){Pi[l[104>>2]&1](t,0,0,1,l[27]|0)|0;break}else{l[c>>2]=1154;l[c+4>>2]=2499;l[c+8>>2]=1516;wr(o,1100,c)|0;gr(o,u)|0;break}}}while(0);if(!(e&7)){Pi[l[104>>2]&1](e,0,0,1,l[27]|0)|0;w=p;return}else{l[h>>2]=1154;l[h+4>>2]=2499;l[h+8>>2]=1516;wr(o,1100,h)|0;gr(o,d)|0;w=p;return}}function lt(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0;u=w;w=w+560|0;o=u+40|0;f=u+24|0;t=u;a=u+48|0;n=e+8|0;r=l[n>>2]|0;if((r+-1|0)>>>0>=8192){l[t>>2]=1154;l[t+4>>2]=2997;l[t+8>>2]=1541;wr(a,1100,t)|0;gr(a,u+16|0)|0}l[e>>2]=r;i=e+20|0;t=l[i>>2]|0;if(!t){t=ot(180,0)|0;if(!t)t=0;else{c=t+164|0;l[c>>2]=0;l[c+4>>2]=0;l[c+8>>2]=0;l[c+12>>2]=0}l[i>>2]=t;c=t;s=l[e>>2]|0}else{c=t;s=r}if(!(l[n>>2]|0)){l[f>>2]=1154;l[f+4>>2]=903;l[f+8>>2]=1781;wr(a,1100,f)|0;gr(a,o)|0;a=l[e>>2]|0}else a=s;n=l[e+4>>2]|0;if(a>>>0>16){r=a;t=0}else{e=0;c=ft(c,s,n,e)|0;w=u;return c|0}while(1){i=t+1|0;if(r>>>0>3){r=r>>>1;t=i}else{r=i;break}}e=t+2+((r|0)!=32&1<<r>>>0<a>>>0&1)|0;e=e>>>0<11?e&255:11;c=ft(c,s,n,e)|0;w=u;return c|0}function pt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,d=0,b=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0;N=w;w=w+800|0;L=N+256|0;P=N+240|0;T=N+232|0;R=N+216|0;C=N+208|0;I=N+192|0;B=N+184|0;x=N+168|0;A=N+160|0;M=N+144|0;E=N+136|0;S=N+120|0;k=N+112|0;_=N+96|0;g=N+88|0;m=N+72|0;d=N+64|0;u=N+48|0;f=N+40|0;s=N+24|0;a=N+16|0;n=N;U=N+288|0;O=N+264|0;j=bt(e,14)|0;if(!j){l[t>>2]=0;r=t+4|0;i=l[r>>2]|0;if(i){if(!(i&7))Pi[l[104>>2]&1](i,0,0,1,l[27]|0)|0;else{l[n>>2]=1154;l[n+4>>2]=2499;l[n+8>>2]=1516;wr(U,1100,n)|0;gr(U,a)|0}l[r>>2]=0;l[t+8>>2]=0;l[t+12>>2]=0}h[t+16>>0]=0;r=t+20|0;i=l[r>>2]|0;if(!i){t=1;w=N;return t|0}dt(i);l[r>>2]=0;t=1;w=N;return t|0}v=t+4|0;y=t+8|0;r=l[y>>2]|0;if((r|0)!=(j|0)){if(r>>>0<=j>>>0){do{if((l[t+12>>2]|0)>>>0<j>>>0){if(nt(v,j,(r+1|0)==(j|0),1,0)|0){r=l[y>>2]|0;break}h[t+16>>0]=1;t=0;w=N;return t|0}}while(0);Yr((l[v>>2]|0)+r|0,0,j-r|0)|0}l[y>>2]=j}Yr(l[v>>2]|0,0,j|0)|0;b=e+20|0;r=l[b>>2]|0;if((r|0)<5){a=e+4|0;o=e+8|0;n=e+16|0;do{i=l[a>>2]|0;if((i|0)==(l[o>>2]|0))i=0;else{l[a>>2]=i+1;i=p[i>>0]|0}r=r+8|0;l[b>>2]=r;if((r|0)>=33){l[s>>2]=1154;l[s+4>>2]=3199;l[s+8>>2]=1650;wr(U,1100,s)|0;gr(U,f)|0;r=l[b>>2]|0}i=i<<32-r|l[n>>2];l[n>>2]=i}while((r|0)<5)}else{i=e+16|0;n=i;i=l[i>>2]|0}c=i>>>27;l[n>>2]=i<<5;l[b>>2]=r+-5;if((c+-1|0)>>>0>20){t=0;w=N;return t|0}l[O+20>>2]=0;l[O>>2]=0;l[O+4>>2]=0;l[O+8>>2]=0;l[O+12>>2]=0;h[O+16>>0]=0;r=O+4|0;i=O+8|0;e:do{if(nt(r,21,0,1,0)|0){f=l[i>>2]|0;s=l[r>>2]|0;Yr(s+f|0,0,21-f|0)|0;l[i>>2]=21;if(c){n=e+4|0;a=e+8|0;o=e+16|0;f=0;do{r=l[b>>2]|0;if((r|0)<3)do{i=l[n>>2]|0;if((i|0)==(l[a>>2]|0))i=0;else{l[n>>2]=i+1;i=p[i>>0]|0}r=r+8|0;l[b>>2]=r;if((r|0)>=33){l[u>>2]=1154;l[u+4>>2]=3199;l[u+8>>2]=1650;wr(U,1100,u)|0;gr(U,d)|0;r=l[b>>2]|0}i=i<<32-r|l[o>>2];l[o>>2]=i}while((r|0)<3);else i=l[o>>2]|0;l[o>>2]=i<<3;l[b>>2]=r+-3;h[s+(p[1611+f>>0]|0)>>0]=i>>>29;f=f+1|0}while((f|0)!=(c|0))}if(lt(O)|0){f=e+4|0;s=e+8|0;c=e+16|0;i=0;t:while(1){o=j-i|0;r=vt(e,O)|0;r:do{if(r>>>0<17){if((l[y>>2]|0)>>>0<=i>>>0){l[m>>2]=1154;l[m+4>>2]=903;l[m+8>>2]=1781;wr(U,1100,m)|0;gr(U,g)|0}h[(l[v>>2]|0)+i>>0]=r;r=i+1|0}else switch(r|0){case 17:{r=l[b>>2]|0;if((r|0)<3)do{n=l[f>>2]|0;if((n|0)==(l[s>>2]|0))n=0;else{l[f>>2]=n+1;n=p[n>>0]|0}r=r+8|0;l[b>>2]=r;if((r|0)>=33){l[_>>2]=1154;l[_+4>>2]=3199;l[_+8>>2]=1650;wr(U,1100,_)|0;gr(U,k)|0;r=l[b>>2]|0}n=n<<32-r|l[c>>2];l[c>>2]=n}while((r|0)<3);else n=l[c>>2]|0;l[c>>2]=n<<3;l[b>>2]=r+-3;r=(n>>>29)+3|0;if(r>>>0>o>>>0){r=0;break e}r=r+i|0;break r}case 18:{r=l[b>>2]|0;if((r|0)<7)do{n=l[f>>2]|0;if((n|0)==(l[s>>2]|0))n=0;else{l[f>>2]=n+1;n=p[n>>0]|0}r=r+8|0;l[b>>2]=r;if((r|0)>=33){l[S>>2]=1154;l[S+4>>2]=3199;l[S+8>>2]=1650;wr(U,1100,S)|0;gr(U,E)|0;r=l[b>>2]|0}n=n<<32-r|l[c>>2];l[c>>2]=n}while((r|0)<7);else n=l[c>>2]|0;l[c>>2]=n<<7;l[b>>2]=r+-7;r=(n>>>25)+11|0;if(r>>>0>o>>>0){r=0;break e}r=r+i|0;break r}default:{if((r+-19|0)>>>0>=2){D=90;break t}a=l[b>>2]|0;if((r|0)==19){if((a|0)<2){n=a;while(1){r=l[f>>2]|0;if((r|0)==(l[s>>2]|0))a=0;else{l[f>>2]=r+1;a=p[r>>0]|0}r=n+8|0;l[b>>2]=r;if((r|0)>=33){l[M>>2]=1154;l[M+4>>2]=3199;l[M+8>>2]=1650;wr(U,1100,M)|0;gr(U,A)|0;r=l[b>>2]|0}n=a<<32-r|l[c>>2];l[c>>2]=n;if((r|0)<2)n=r;else break}}else{n=l[c>>2]|0;r=a}l[c>>2]=n<<2;l[b>>2]=r+-2;a=(n>>>30)+3|0}else{if((a|0)<6){n=a;while(1){r=l[f>>2]|0;if((r|0)==(l[s>>2]|0))a=0;else{l[f>>2]=r+1;a=p[r>>0]|0}r=n+8|0;l[b>>2]=r;if((r|0)>=33){l[x>>2]=1154;l[x+4>>2]=3199;l[x+8>>2]=1650;wr(U,1100,x)|0;gr(U,B)|0;r=l[b>>2]|0}n=a<<32-r|l[c>>2];l[c>>2]=n;if((r|0)<6)n=r;else break}}else{n=l[c>>2]|0;r=a}l[c>>2]=n<<6;l[b>>2]=r+-6;a=(n>>>26)+7|0}if((i|0)==0|a>>>0>o>>>0){r=0;break e}r=i+-1|0;if((l[y>>2]|0)>>>0<=r>>>0){l[I>>2]=1154;l[I+4>>2]=903;l[I+8>>2]=1781;wr(U,1100,I)|0;gr(U,C)|0}n=h[(l[v>>2]|0)+r>>0]|0;if(!(n<<24>>24)){r=0;break e}r=a+i|0;if(i>>>0>=r>>>0){r=i;break r}do{if((l[y>>2]|0)>>>0<=i>>>0){l[R>>2]=1154;l[R+4>>2]=903;l[R+8>>2]=1781;wr(U,1100,R)|0;gr(U,T)|0}h[(l[v>>2]|0)+i>>0]=n;i=i+1|0}while((i|0)!=(r|0))}}}while(0);if(j>>>0>r>>>0)i=r;else break}if((D|0)==90){l[P>>2]=1154;l[P+4>>2]=3140;l[P+8>>2]=1632;wr(U,1100,P)|0;gr(U,L)|0;r=0;break}if((j|0)==(r|0))r=lt(t)|0;else r=0}else r=0}else{h[O+16>>0]=1;r=0}}while(0);ht(O);t=r;w=N;return t|0}function bt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0;u=w;w=w+544|0;f=u+16|0;o=u;a=u+24|0;if(!t){c=0;w=u;return c|0}if(t>>>0<=16){c=yt(e,t)|0;w=u;return c|0}s=yt(e,t+-16|0)|0;c=e+20|0;t=l[c>>2]|0;if((t|0)<16){i=e+4|0;n=e+8|0;r=e+16|0;do{e=l[i>>2]|0;if((e|0)==(l[n>>2]|0))e=0;else{l[i>>2]=e+1;e=p[e>>0]|0}t=t+8|0;l[c>>2]=t;if((t|0)>=33){l[o>>2]=1154;l[o+4>>2]=3199;l[o+8>>2]=1650;wr(a,1100,o)|0;gr(a,f)|0;t=l[c>>2]|0}e=e<<32-t|l[r>>2];l[r>>2]=e}while((t|0)<16)}else{e=e+16|0;r=e;e=l[e>>2]|0}l[r>>2]=e<<16;l[c>>2]=t+-16;c=e>>>16|s<<16;w=u;return c|0}function vt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0;S=w;w=w+608|0;m=S+88|0;y=S+72|0;d=S+64|0;h=S+48|0;u=S+40|0;v=S+24|0;c=S+16|0;s=S;_=S+96|0;g=l[t+20>>2]|0;k=e+20|0;f=l[k>>2]|0;do{if((f|0)<24){o=e+4|0;i=l[o>>2]|0;n=l[e+8>>2]|0;r=i>>>0<n>>>0;if((f|0)>=16){if(r){l[o>>2]=i+1;r=p[i>>0]|0}else r=0;l[k>>2]=f+8;o=e+16|0;a=r<<24-f|l[o>>2];l[o>>2]=a;break}if(r){a=(p[i>>0]|0)<<8;r=i+1|0}else{a=0;r=i}if(r>>>0<n>>>0){i=p[r>>0]|0;r=r+1|0}else i=0;l[o>>2]=r;l[k>>2]=f+16;o=e+16|0;a=(i|a)<<16-f|l[o>>2];l[o>>2]=a}else{a=e+16|0;o=a;a=l[a>>2]|0}}while(0);n=(a>>>16)+1|0;do{if(n>>>0<=(l[g+16>>2]|0)>>>0){i=l[(l[g+168>>2]|0)+(a>>>(32-(l[g+8>>2]|0)|0)<<2)>>2]|0;if((i|0)==-1){l[s>>2]=1154;l[s+4>>2]=3244;l[s+8>>2]=1677;wr(_,1100,s)|0;gr(_,c)|0}r=i&65535;i=i>>>16;if((l[t+8>>2]|0)>>>0<=r>>>0){l[v>>2]=1154;l[v+4>>2]=902;l[v+8>>2]=1781;wr(_,1100,v)|0;gr(_,u)|0}if((p[(l[t+4>>2]|0)+r>>0]|0|0)!=(i|0)){l[h>>2]=1154;l[h+4>>2]=3248;l[h+8>>2]=1694;wr(_,1100,h)|0;gr(_,d)|0}}else{i=l[g+20>>2]|0;while(1){r=i+-1|0;if(n>>>0>(l[g+28+(r<<2)>>2]|0)>>>0)i=i+1|0;else break}r=(a>>>(32-i|0))+(l[g+96+(r<<2)>>2]|0)|0;if(r>>>0<(l[t>>2]|0)>>>0){r=b[(l[g+176>>2]|0)+(r<<1)>>1]|0;break}l[y>>2]=1154;l[y+4>>2]=3266;l[y+8>>2]=1632;wr(_,1100,y)|0;gr(_,m)|0;k=0;w=S;return k|0}}while(0);l[o>>2]=l[o>>2]<<i;l[k>>2]=(l[k>>2]|0)-i;k=r;w=S;return k|0}function yt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0;u=w;w=w+560|0;f=u+40|0;s=u+24|0;r=u;o=u+48|0;if(t>>>0>=33){l[r>>2]=1154;l[r+4>>2]=3190;l[r+8>>2]=1634;wr(o,1100,r)|0;gr(o,u+16|0)|0}c=e+20|0;r=l[c>>2]|0;if((r|0)>=(t|0)){a=e+16|0;o=a;a=l[a>>2]|0;f=r;s=32-t|0;s=a>>>s;a=a<<t;l[o>>2]=a;t=f-t|0;l[c>>2]=t;w=u;return s|0}n=e+4|0;a=e+8|0;i=e+16|0;do{e=l[n>>2]|0;if((e|0)==(l[a>>2]|0))e=0;else{l[n>>2]=e+1;e=p[e>>0]|0}r=r+8|0;l[c>>2]=r;if((r|0)>=33){l[s>>2]=1154;l[s+4>>2]=3199;l[s+8>>2]=1650;wr(o,1100,s)|0;gr(o,f)|0;r=l[c>>2]|0}e=e<<32-r|l[i>>2];l[i>>2]=e}while((r|0)<(t|0));s=32-t|0;s=e>>>s;f=e<<t;l[i>>2]=f;t=r-t|0;l[c>>2]=t;w=u;return s|0}function mt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,d=0,b=0,v=0,y=0,m=0,g=0;y=w;w=w+544|0;b=y+16|0;d=y;u=y+24|0;if((e|0)==0|t>>>0<62){v=0;w=y;return v|0}c=ot(300,0)|0;if(!c){v=0;w=y;return v|0}l[c>>2]=519686845;r=c+4|0;l[r>>2]=0;i=c+8|0;l[i>>2]=0;s=c+88|0;n=c+136|0;a=c+160|0;o=s;f=o+44|0;do{l[o>>2]=0;o=o+4|0}while((o|0)<(f|0));h[s+44>>0]=0;m=c+184|0;o=c+208|0
|
|
;f=c+232|0;g=c+252|0;l[g>>2]=0;l[g+4>>2]=0;l[g+8>>2]=0;h[g+12>>0]=0;g=c+268|0;l[g>>2]=0;l[g+4>>2]=0;l[g+8>>2]=0;h[g+12>>0]=0;g=c+284|0;l[g>>2]=0;l[g+4>>2]=0;l[g+8>>2]=0;h[g+12>>0]=0;l[n>>2]=0;l[n+4>>2]=0;l[n+8>>2]=0;l[n+12>>2]=0;l[n+16>>2]=0;h[n+20>>0]=0;l[a>>2]=0;l[a+4>>2]=0;l[a+8>>2]=0;l[a+12>>2]=0;l[a+16>>2]=0;h[a+20>>0]=0;l[m>>2]=0;l[m+4>>2]=0;l[m+8>>2]=0;l[m+12>>2]=0;l[m+16>>2]=0;h[m+20>>0]=0;l[o>>2]=0;l[o+4>>2]=0;l[o+8>>2]=0;l[o+12>>2]=0;l[o+16>>2]=0;h[o+20>>0]=0;l[f>>2]=0;l[f+4>>2]=0;l[f+8>>2]=0;l[f+12>>2]=0;h[f+16>>0]=0;do{if(((t>>>0>=74?((p[e>>0]|0)<<8|(p[e+1>>0]|0)|0)==18552:0)?((p[e+2>>0]|0)<<8|(p[e+3>>0]|0))>>>0>=74:0)?((p[e+7>>0]|0)<<16|(p[e+6>>0]|0)<<24|(p[e+8>>0]|0)<<8|(p[e+9>>0]|0))>>>0<=t>>>0:0){l[s>>2]=e;l[r>>2]=e;l[i>>2]=t;if(xt(c)|0){r=l[s>>2]|0;if((p[r+39>>0]|0)<<8|(p[r+40>>0]|0)){if(!(Bt(c)|0))break;if(!(It(c)|0))break;r=l[s>>2]|0}if(!((p[r+55>>0]|0)<<8|(p[r+56>>0]|0))){g=c;w=y;return g|0}if(Ct(c)|0?Rt(c)|0:0){g=c;w=y;return g|0}}}else v=7}while(0);if((v|0)==7)l[s>>2]=0;Dt(c);if(!(c&7)){Pi[l[104>>2]&1](c,0,0,1,l[27]|0)|0;g=0;w=y;return g|0}else{l[d>>2]=1154;l[d+4>>2]=2499;l[d+8>>2]=1516;wr(u,1100,d)|0;gr(u,b)|0;g=0;w=y;return g|0}return 0}function gt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0,s=0,c=0,u=0;u=w;w=w+544|0;c=u;s=u+24|0;a=l[e+88>>2]|0;f=(p[a+70+(n<<2)+1>>0]|0)<<16|(p[a+70+(n<<2)>>0]|0)<<24|(p[a+70+(n<<2)+2>>0]|0)<<8|(p[a+70+(n<<2)+3>>0]|0);o=n+1|0;if(o>>>0<(p[a+16>>0]|0)>>>0)a=(p[a+70+(o<<2)+1>>0]|0)<<16|(p[a+70+(o<<2)>>0]|0)<<24|(p[a+70+(o<<2)+2>>0]|0)<<8|(p[a+70+(o<<2)+3>>0]|0);else a=l[e+8>>2]|0;if(a>>>0>f>>>0){s=e+4|0;s=l[s>>2]|0;s=s+f|0;c=a-f|0;c=wt(e,s,c,t,r,i,n)|0;w=u;return c|0}l[c>>2]=1154;l[c+4>>2]=3704;l[c+8>>2]=1792;wr(s,1100,c)|0;gr(s,u+16|0)|0;s=e+4|0;s=l[s>>2]|0;s=s+f|0;c=a-f|0;c=wt(e,s,c,t,r,i,n)|0;w=u;return c|0}function wt(e,t,r,i,n,a,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;o=o|0;var f=0,s=0,c=0,u=0;u=l[e+88>>2]|0;s=((p[u+12>>0]|0)<<8|(p[u+13>>0]|0))>>>o;c=((p[u+14>>0]|0)<<8|(p[u+15>>0]|0))>>>o;s=s>>>0>1?(s+3|0)>>>2:1;c=c>>>0>1?(c+3|0)>>>2:1;u=u+18|0;o=h[u>>0]|0;o=ue(o<<24>>24==0|o<<24>>24==9?8:16,s)|0;if(a)if((a&3|0)==0&o>>>0<=a>>>0)o=a;else{e=0;return e|0}if((ue(o,c)|0)>>>0>n>>>0){e=0;return e|0}a=(s+1|0)>>>1;f=(c+1|0)>>>1;if(!r){e=0;return e|0}l[e+92>>2]=t;l[e+96>>2]=t;l[e+104>>2]=r;l[e+100>>2]=t+r;l[e+108>>2]=0;l[e+112>>2]=0;switch(p[u>>0]|0|0){case 0:{Tt(e,i,n,o,s,c,a,f)|0;e=1;return e|0}case 4:case 6:case 5:case 3:case 2:{Pt(e,i,n,o,s,c,a,f)|0;e=1;return e|0}case 9:{Lt(e,i,n,o,s,c,a,f)|0;e=1;return e|0}case 8:case 7:{jt(e,i,n,o,s,c,a,f)|0;e=1;return e|0}default:{e=0;return e|0}}return 0}function _t(e,t){e=e|0;t=t|0;var r=0,i=0;i=w;w=w+48|0;r=i;l[r>>2]=40;ct(e,t,r)|0;w=i;return l[r+4>>2]|0}function kt(e,t){e=e|0;t=t|0;var r=0,i=0;i=w;w=w+48|0;r=i;l[r>>2]=40;ct(e,t,r)|0;w=i;return l[r+8>>2]|0}function St(e,t){e=e|0;t=t|0;var r=0,i=0;i=w;w=w+48|0;r=i;l[r>>2]=40;ct(e,t,r)|0;w=i;return l[r+12>>2]|0}function Et(e,t){e=e|0;t=t|0;var r=0,i=0;i=w;w=w+48|0;r=i;l[r>>2]=40;ct(e,t,r)|0;w=i;return l[r+32>>2]|0}function Mt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0,f=0,s=0,c=0;s=w;w=w+576|0;o=s+56|0;a=s+40|0;n=s+64|0;c=s;l[c>>2]=40;ct(e,t,c)|0;i=(((l[c+4>>2]|0)>>>r)+3|0)>>>2;t=(((l[c+8>>2]|0)>>>r)+3|0)>>>2;r=c+32|0;e=l[r+4>>2]|0;do{switch(l[r>>2]|0){case 0:{if(!e)e=8;else f=13;break}case 1:{if(!e)f=12;else f=13;break}case 2:{if(!e)f=12;else f=13;break}case 3:{if(!e)f=12;else f=13;break}case 4:{if(!e)f=12;else f=13;break}case 5:{if(!e)f=12;else f=13;break}case 6:{if(!e)f=12;else f=13;break}case 7:{if(!e)f=12;else f=13;break}case 8:{if(!e)f=12;else f=13;break}case 9:{if(!e)e=8;else f=13;break}default:f=13}}while(0);if((f|0)==12)e=16;else if((f|0)==13){l[a>>2]=1154;l[a+4>>2]=2663;l[a+8>>2]=1535;wr(n,1100,a)|0;gr(n,o)|0;e=0}c=ue(ue(t,i)|0,e)|0;w=s;return c|0}function At(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0,v=0;b=w;w=w+608|0;d=b+80|0;p=b+64|0;f=b+56|0;o=b+40|0;u=b+88|0;v=b;h=b+84|0;l[v>>2]=40;ct(e,t,v)|0;s=(((l[v+4>>2]|0)>>>n)+3|0)>>>2;v=v+32|0;a=l[v+4>>2]|0;do{switch(l[v>>2]|0){case 0:{if(!a)a=8;else c=13;break}case 1:{if(!a)c=12;else c=13;break}case 2:{if(!a)c=12;else c=13;break}case 3:{if(!a)c=12;else c=13;break}case 4:{if(!a)c=12;else c=13;break}case 5:{if(!a)c=12;else c=13;break}case 6:{if(!a)c=12;else c=13;break}case 7:{if(!a)c=12;else c=13;break}case 8:{if(!a)c=12;else c=13;break}case 9:{if(!a)a=8;else c=13;break}default:c=13}}while(0);if((c|0)==12)a=16;else if((c|0)==13){l[o>>2]=1154;l[o+4>>2]=2663;l[o+8>>2]=1535;wr(u,1100,o)|0;gr(u,f)|0;a=0}f=ue(a,s)|0;o=mt(e,t)|0;l[h>>2]=r;a=(o|0)==0;if(!(n>>>0>15|(i>>>0<8|a))?(l[o>>2]|0)==519686845:0)gt(o,h,i,f,n)|0;if(a){w=b;return}if((l[o>>2]|0)!=519686845){w=b;return}Dt(o);if(!(o&7)){Pi[l[104>>2]&1](o,0,0,1,l[27]|0)|0;w=b;return}else{l[p>>2]=1154;l[p+4>>2]=2499;l[p+8>>2]=1516;wr(u,1100,p)|0;gr(u,d)|0;w=b;return}}function xt(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0;o=e+92|0;i=l[e+4>>2]|0;a=e+88|0;n=l[a>>2]|0;t=(p[n+68>>0]|0)<<8|(p[n+67>>0]|0)<<16|(p[n+69>>0]|0);r=i+t|0;n=(p[n+65>>0]|0)<<8|(p[n+66>>0]|0);if(!n){e=0;return e|0}l[o>>2]=r;l[e+96>>2]=r;l[e+104>>2]=n;l[e+100>>2]=i+(n+t);l[e+108>>2]=0;l[e+112>>2]=0;if(!(pt(o,e+116|0)|0)){e=0;return e|0}t=l[a>>2]|0;do{if(!((p[t+39>>0]|0)<<8|(p[t+40>>0]|0))){if(!((p[t+55>>0]|0)<<8|(p[t+56>>0]|0))){e=0;return e|0}}else{if(!(pt(o,e+140|0)|0)){e=0;return e|0}if(pt(o,e+188|0)|0){t=l[a>>2]|0;break}else{e=0;return e|0}}}while(0);if((p[t+55>>0]|0)<<8|(p[t+56>>0]|0)){if(!(pt(o,e+164|0)|0)){e=0;return e|0}if(!(pt(o,e+212|0)|0)){e=0;return e|0}}e=1;return e|0}function Bt(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,d=0,b=0,v=0,y=0;y=w;w=w+592|0;s=y+16|0;f=y;o=y+72|0;v=y+24|0;i=e+88|0;t=l[i>>2]|0;b=(p[t+39>>0]|0)<<8|(p[t+40>>0]|0);u=e+236|0;a=e+240|0;r=l[a>>2]|0;if((r|0)!=(b|0)){if(r>>>0<=b>>>0){do{if((l[e+244>>2]|0)>>>0<b>>>0){if(nt(u,b,(r+1|0)==(b|0),4,0)|0){t=l[a>>2]|0;break}h[e+248>>0]=1;v=0;w=y;return v|0}else t=r}while(0);Yr((l[u>>2]|0)+(t<<2)|0,0,b-t<<2|0)|0;t=l[i>>2]|0}l[a>>2]=b}c=e+92|0;r=l[e+4>>2]|0;i=(p[t+34>>0]|0)<<8|(p[t+33>>0]|0)<<16|(p[t+35>>0]|0);n=r+i|0;t=(p[t+37>>0]|0)<<8|(p[t+36>>0]|0)<<16|(p[t+38>>0]|0);if(!t){v=0;w=y;return v|0}l[c>>2]=n;l[e+96>>2]=n;l[e+104>>2]=t;l[e+100>>2]=r+(t+i);l[e+108>>2]=0;l[e+112>>2]=0;l[v+20>>2]=0;l[v>>2]=0;l[v+4>>2]=0;l[v+8>>2]=0;l[v+12>>2]=0;h[v+16>>0]=0;e=v+24|0;l[v+44>>2]=0;l[e>>2]=0;l[e+4>>2]=0;l[e+8>>2]=0;l[e+12>>2]=0;h[e+16>>0]=0;if(pt(c,v)|0?(d=v+24|0,pt(c,d)|0):0){if(!(l[a>>2]|0)){l[f>>2]=1154;l[f+4>>2]=903;l[f+8>>2]=1781;wr(o,1100,f)|0;gr(o,s)|0}if(!b)t=1;else{i=0;n=0;a=0;t=0;o=0;e=0;f=0;r=l[u>>2]|0;while(1){i=(vt(c,v)|0)+i&31;n=(vt(c,d)|0)+n&63;a=(vt(c,v)|0)+a&31;t=(vt(c,v)|0)+t|0;o=(vt(c,d)|0)+o&63;e=(vt(c,v)|0)+e&31;l[r>>2]=n<<5|i<<11|a|t<<27|o<<21|e<<16;f=f+1|0;if((f|0)==(b|0)){t=1;break}else{t=t&31;r=r+4|0}}}}else t=0;ht(v+24|0);ht(v);v=t;w=y;return v|0}function It(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,d=0,b=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0;I=w;w=w+1024|0;f=I+16|0;o=I;a=I+504|0;B=I+480|0;A=I+284|0;x=I+88|0;M=I+24|0;n=l[e+88>>2]|0;E=(p[n+47>>0]|0)<<8|(p[n+48>>0]|0);S=e+92|0;t=l[e+4>>2]|0;r=(p[n+42>>0]|0)<<8|(p[n+41>>0]|0)<<16|(p[n+43>>0]|0);i=t+r|0;n=(p[n+45>>0]|0)<<8|(p[n+44>>0]|0)<<16|(p[n+46>>0]|0);if(!n){B=0;w=I;return B|0}l[S>>2]=i;l[e+96>>2]=i;l[e+104>>2]=n;l[e+100>>2]=t+(n+r);l[e+108>>2]=0;l[e+112>>2]=0;l[B+20>>2]=0;l[B>>2]=0;l[B+4>>2]=0;l[B+8>>2]=0;l[B+12>>2]=0;h[B+16>>0]=0;if(pt(S,B)|0){r=0;i=-3;n=-3;while(1){l[A+(r<<2)>>2]=i;l[x+(r<<2)>>2]=n;t=(i|0)>2;r=r+1|0;if((r|0)==49)break;else{i=t?-3:i+1|0;n=(t&1)+n|0}}t=M;r=t+64|0;do{l[t>>2]=0;t=t+4|0}while((t|0)<(r|0));k=e+252|0;r=e+256|0;t=l[r>>2]|0;e:do{if((t|0)==(E|0))s=13;else{if(t>>>0<=E>>>0){do{if((l[e+260>>2]|0)>>>0<E>>>0)if(nt(k,E,(t+1|0)==(E|0),4,0)|0){t=l[r>>2]|0;break}else{h[e+264>>0]=1;t=0;break e}}while(0);Yr((l[k>>2]|0)+(t<<2)|0,0,E-t<<2|0)|0}l[r>>2]=E;s=13}}while(0);do{if((s|0)==13){if(!E){l[o>>2]=1154;l[o+4>>2]=903;l[o+8>>2]=1781;wr(a,1100,o)|0;gr(a,f)|0;t=1;break}i=M+4|0;n=M+8|0;e=M+12|0;a=M+16|0;o=M+20|0;f=M+24|0;s=M+28|0;c=M+32|0;u=M+36|0;d=M+40|0;b=M+44|0;v=M+48|0;y=M+52|0;m=M+56|0;g=M+60|0;_=0;r=l[k>>2]|0;while(1){t=0;do{C=vt(S,B)|0;k=t<<1;R=M+(k<<2)|0;l[R>>2]=(l[R>>2]|0)+(l[A+(C<<2)>>2]|0)&3;k=M+((k|1)<<2)|0;l[k>>2]=(l[k>>2]|0)+(l[x+(C<<2)>>2]|0)&3;t=t+1|0}while((t|0)!=8);l[r>>2]=(p[1725+(l[i>>2]|0)>>0]|0)<<2|(p[1725+(l[M>>2]|0)>>0]|0)|(p[1725+(l[n>>2]|0)>>0]|0)<<4|(p[1725+(l[e>>2]|0)>>0]|0)<<6|(p[1725+(l[a>>2]|0)>>0]|0)<<8|(p[1725+(l[o>>2]|0)>>0]|0)<<10|(p[1725+(l[f>>2]|0)>>0]|0)<<12|(p[1725+(l[s>>2]|0)>>0]|0)<<14|(p[1725+(l[c>>2]|0)>>0]|0)<<16|(p[1725+(l[u>>2]|0)>>0]|0)<<18|(p[1725+(l[d>>2]|0)>>0]|0)<<20|(p[1725+(l[b>>2]|0)>>0]|0)<<22|(p[1725+(l[v>>2]|0)>>0]|0)<<24|(p[1725+(l[y>>2]|0)>>0]|0)<<26|(p[1725+(l[m>>2]|0)>>0]|0)<<28|(p[1725+(l[g>>2]|0)>>0]|0)<<30;_=_+1|0;if((_|0)==(E|0)){t=1;break}else r=r+4|0}}}while(0)}else t=0;ht(B);R=t;w=I;return R|0}function Ct(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,b=0,v=0;v=w;w=w+560|0;s=v+16|0;f=v;o=v+48|0;b=v+24|0;n=l[e+88>>2]|0;u=(p[n+55>>0]|0)<<8|(p[n+56>>0]|0);c=e+92|0;t=l[e+4>>2]|0;r=(p[n+50>>0]|0)<<8|(p[n+49>>0]|0)<<16|(p[n+51>>0]|0);i=t+r|0;n=(p[n+53>>0]|0)<<8|(p[n+52>>0]|0)<<16|(p[n+54>>0]|0);if(!n){b=0;w=v;return b|0}l[c>>2]=i;l[e+96>>2]=i;l[e+104>>2]=n;l[e+100>>2]=t+(n+r);l[e+108>>2]=0;l[e+112>>2]=0;l[b+20>>2]=0;l[b>>2]=0;l[b+4>>2]=0;l[b+8>>2]=0;l[b+12>>2]=0;h[b+16>>0]=0;e:do{if(pt(c,b)|0){a=e+268|0;r=e+272|0;t=l[r>>2]|0;if((t|0)!=(u|0)){if(t>>>0<=u>>>0){do{if((l[e+276>>2]|0)>>>0<u>>>0)if(nt(a,u,(t+1|0)==(u|0),2,0)|0){t=l[r>>2]|0;break}else{h[e+280>>0]=1;t=0;break e}}while(0);Yr((l[a>>2]|0)+(t<<1)|0,0,u-t<<1|0)|0}l[r>>2]=u}if(!u){l[f>>2]=1154;l[f+4>>2]=903;l[f+8>>2]=1781;wr(o,1100,f)|0;gr(o,s)|0;t=1;break}r=0;i=0;n=0;t=l[a>>2]|0;while(1){s=vt(c,b)|0;r=s+r&255;i=(vt(c,b)|0)+i&255;d[t>>1]=i<<8|r;n=n+1|0;if((n|0)==(u|0)){t=1;break}else t=t+2|0}}else t=0}while(0);ht(b);b=t;w=v;return b|0}function Rt(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,b=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0;C=w;w=w+2432|0;f=C+16|0;o=C;a=C+1912|0;I=C+1888|0;x=C+988|0;B=C+88|0;A=C+24|0;n=l[e+88>>2]|0;M=(p[n+63>>0]|0)<<8|(p[n+64>>0]|0);E=e+92|0;t=l[e+4>>2]|0;r=(p[n+58>>0]|0)<<8|(p[n+57>>0]|0)<<16|(p[n+59>>0]|0);i=t+r|0;n=(p[n+61>>0]|0)<<8|(p[n+60>>0]|0)<<16|(p[n+62>>0]|0);if(!n){I=0;w=C;return I|0}l[E>>2]=i;l[e+96>>2]=i;l[e+104>>2]=n;l[e+100>>2]=t+(n+r);l[e+108>>2]=0;l[e+112>>2]=0;l[I+20>>2]=0;l[I>>2]=0;l[I+4>>2]=0;l[I+8>>2]=0;l[I+12>>2]=0;h[I+16>>0]=0;if(pt(E,I)|0){r=0;i=-7;n=-7;while(1){l[x+(r<<2)>>2]=i;l[B+(r<<2)>>2]=n;t=(i|0)>6;r=r+1|0;if((r|0)==225)break;else{i=t?-7:i+1|0;n=(t&1)+n|0}}t=A;r=t+64|0;do{l[t>>2]=0;t=t+4|0}while((t|0)<(r|0));S=e+284|0;r=M*3|0;i=e+288|0;t=l[i>>2]|0;e:do{if((t|0)==(r|0))s=13;else{if(t>>>0<=r>>>0){do{if((l[e+292>>2]|0)>>>0<r>>>0)if(nt(S,r,(t+1|0)==(r|0),2,0)|0){t=l[i>>2]|0;break}else{h[e+296>>0]=1;t=0;break e}}while(0);Yr((l[S>>2]|0)+(t<<1)|0,0,r-t<<1|0)|0}l[i>>2]=r;s=13}}while(0);do{if((s|0)==13){if(!M){l[o>>2]=1154;l[o+4>>2]=903;l[o+8>>2]=1781;wr(a,1100,o)|0;gr(a,f)|0;t=1;break}i=A+4|0;n=A+8|0;e=A+12|0;a=A+16|0;o=A+20|0;f=A+24|0;s=A+28|0;c=A+32|0;u=A+36|0;b=A+40|0;v=A+44|0;y=A+48|0;m=A+52|0;g=A+56|0;_=A+60|0;k=0;r=l[S>>2]|0;while(1){t=0;do{R=vt(E,I)|0;S=t<<1;T=A+(S<<2)|0;l[T>>2]=(l[T>>2]|0)+(l[x+(R<<2)>>2]|0)&7;S=A+((S|1)<<2)|0;l[S>>2]=(l[S>>2]|0)+(l[B+(R<<2)>>2]|0)&7;t=t+1|0}while((t|0)!=8);R=p[1729+(l[o>>2]|0)>>0]|0;d[r>>1]=(p[1729+(l[i>>2]|0)>>0]|0)<<3|(p[1729+(l[A>>2]|0)>>0]|0)|(p[1729+(l[n>>2]|0)>>0]|0)<<6|(p[1729+(l[e>>2]|0)>>0]|0)<<9|(p[1729+(l[a>>2]|0)>>0]|0)<<12|R<<15;T=p[1729+(l[b>>2]|0)>>0]|0;d[r+2>>1]=(p[1729+(l[f>>2]|0)>>0]|0)<<2|R>>>1|(p[1729+(l[s>>2]|0)>>0]|0)<<5|(p[1729+(l[c>>2]|0)>>0]|0)<<8|(p[1729+(l[u>>2]|0)>>0]|0)<<11|T<<14;d[r+4>>1]=(p[1729+(l[v>>2]|0)>>0]|0)<<1|T>>>2|(p[1729+(l[y>>2]|0)>>0]|0)<<4|(p[1729+(l[m>>2]|0)>>0]|0)<<7|(p[1729+(l[g>>2]|0)>>0]|0)<<10|(p[1729+(l[_>>2]|0)>>0]|0)<<13;k=k+1|0;if((k|0)==(M|0)){t=1;break}else r=r+6|0}}}while(0)}else t=0;ht(I);T=t;w=C;return T|0}function Tt(e,t,r,i,n,a,o,f){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;o=o|0;f=f|0;var s=0,c=0,u=0,d=0,b=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0,q=0,F=0,z=0,K=0,X=0,H=0,J=0,V=0,Y=0,W=0,G=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,ae=0,oe=0,fe=0,se=0,ce=0,he=0,de=0,le=0,pe=0,be=0,ve=0,ye=0;be=w;w=w+720|0;pe=be+184|0;de=be+168|0;he=be+160|0;ce=be+144|0;se=be+136|0;fe=be+120|0;oe=be+112|0;ne=be+96|0;ie=be+88|0;re=be+72|0;te=be+64|0;ee=be+48|0;$=be+40|0;le=be+24|0;ae=be+16|0;Q=be;G=be+208|0;Z=be+192|0;K=e+240|0;X=l[K>>2]|0;V=e+256|0;Y=l[V>>2]|0;r=h[(l[e+88>>2]|0)+17>>0]|0;W=i>>>2;if(!(r<<24>>24)){w=be;return 1}H=(f|0)==0;J=f+-1|0;D=(a&1|0)!=0;U=i<<1;O=e+92|0;N=e+116|0;q=e+140|0;F=e+236|0;z=o+-1|0;j=(n&1|0)!=0;L=e+188|0;I=e+252|0;C=W+1|0;R=W+2|0;T=W+3|0;P=z<<4;x=r&255;r=0;a=0;n=1;B=0;do{if(!H){M=l[t+(B<<2)>>2]|0;A=0;while(1){k=A&1;s=(k|0)==0;_=(k<<5^32)+-16|0;k=(k<<1^2)+-1|0;E=s?o:-1;c=s?0:z;e=(A|0)==(J|0);S=D&e;if((c|0)!=(E|0)){g=D&e^1;m=s?M:M+P|0;while(1){if((n|0)==1)n=vt(O,N)|0|512;y=n&7;n=n>>>3;s=p[1823+y>>0]|0;e=0;do{b=(vt(O,q)|0)+a|0;v=b-X|0;a=v>>31;a=a&b|v&~a;if((l[K>>2]|0)>>>0<=a>>>0){l[Q>>2]=1154;l[Q+4>>2]=903;l[Q+8>>2]=1781;wr(G,1100,Q)|0;gr(G,ae)|0}l[Z+(e<<2)>>2]=l[(l[F>>2]|0)+(a<<2)>>2];e=e+1|0}while(e>>>0<s>>>0);v=j&(c|0)==(z|0);if(S|v){b=0;do{u=ue(b,i)|0;e=m+u|0;s=(b|0)==0|g;d=b<<1;ye=(vt(O,L)|0)+r|0;ve=ye-Y|0;r=ve>>31;r=r&ye|ve&~r;do{if(v){if(!s){ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;break}l[e>>2]=l[Z+((p[1831+(y<<2)+d>>0]|0)<<2)>>2];if((l[V>>2]|0)>>>0<=r>>>0){l[ce>>2]=1154;l[ce+4>>2]=903;l[ce+8>>2]=1781;wr(G,1100,ce)|0;gr(G,he)|0}l[m+(u+4)>>2]=l[(l[I>>2]|0)+(r<<2)>>2];ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r}else{if(!s){ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;break}l[e>>2]=l[Z+((p[1831+(y<<2)+d>>0]|0)<<2)>>2];if((l[V>>2]|0)>>>0<=r>>>0){l[fe>>2]=1154;l[fe+4>>2]=903;l[fe+8>>2]=1781;wr(G,1100,fe)|0;gr(G,se)|0}l[m+(u+4)>>2]=l[(l[I>>2]|0)+(r<<2)>>2];ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;l[m+(u+8)>>2]=l[Z+((p[(d|1)+(1831+(y<<2))>>0]|0)<<2)>>2];if((l[V>>2]|0)>>>0<=r>>>0){l[de>>2]=1154;l[de+4>>2]=903;l[de+8>>2]=1781;wr(G,1100,de)|0;gr(G,pe)|0}l[m+(u+12)>>2]=l[(l[I>>2]|0)+(r<<2)>>2]}}while(0);b=b+1|0}while((b|0)!=2)}else{l[m>>2]=l[Z+((p[1831+(y<<2)>>0]|0)<<2)>>2];ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;if((l[V>>2]|0)>>>0<=r>>>0){l[le>>2]=1154;l[le+4>>2]=903;l[le+8>>2]=1781;wr(G,1100,le)|0;gr(G,$)|0}l[m+4>>2]=l[(l[I>>2]|0)+(r<<2)>>2];l[m+8>>2]=l[Z+((p[1831+(y<<2)+1>>0]|0)<<2)>>2];ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;if((l[V>>2]|0)>>>0<=r>>>0){l[ee>>2]=1154;l[ee+4>>2]=903;l[ee+8>>2]=1781;wr(G,1100,ee)|0;gr(G,te)|0}l[m+12>>2]=l[(l[I>>2]|0)+(r<<2)>>2];l[m+(W<<2)>>2]=l[Z+((p[1831+(y<<2)+2>>0]|0)<<2)>>2];ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;if((l[V>>2]|0)>>>0<=r>>>0){l[re>>2]=1154;l[re+4>>2]=903;l[re+8>>2]=1781;wr(G,1100,re)|0;gr(G,ie)|0}l[m+(C<<2)>>2]=l[(l[I>>2]|0)+(r<<2)>>2];l[m+(R<<2)>>2]=l[Z+((p[1831+(y<<2)+3>>0]|0)<<2)>>2];ve=(vt(O,L)|0)+r|0;ye=ve-Y|0;r=ye>>31;r=r&ve|ye&~r;if((l[V>>2]|0)>>>0<=r>>>0){l[ne>>2]=1154;l[ne+4>>2]=903;l[ne+8>>2]=1781;wr(G,1100,ne)|0;gr(G,oe)|0}l[m+(T<<2)>>2]=l[(l[I>>2]|0)+(r<<2)>>2]}c=c+k|0;if((c|0)==(E|0))break;else m=m+_|0}}A=A+1|0;if((A|0)==(f|0))break;else M=M+U|0}}B=B+1|0}while((B|0)!=(x|0));w=be;return 1}function Pt(e,t,r,i,n,a,o,f){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;o=o|0;f=f|0;var s=0,c=0,u=0,d=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0,q=0,F=0,z=0,K=0,X=0,H=0,J=0,V=0,Y=0,W=0,G=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,ae=0,oe=0,fe=0,se=0,ce=0,ue=0,he=0,de=0,le=0,pe=0,be=0,ve=0,ye=0;ve=w;w=w+640|0;le=ve+88|0;de=ve+72|0;he=ve+64|0;ue=ve+48|0;ce=ve+40|0;be=ve+24|0;pe=ve+16|0;se=ve;oe=ve+128|0;fe=ve+112|0;ae=ve+96|0;X=e+240|0;H=l[X>>2]|0;Y=e+256|0;re=l[Y>>2]|0;ie=e+272|0;ne=l[ie>>2]|0;r=l[e+88>>2]|0;J=(p[r+63>>0]|0)<<8|(p[r+64>>0]|0);r=h[r+17>>0]|0;if(!(r<<24>>24)){w=ve;return 1}V=(f|0)==0;W=f+-1|0;G=i<<1;Z=e+92|0;Q=e+116|0;$=o+-1|0;ee=e+212|0;te=e+188|0;K=(n&1|0)==0;z=(a&1|0)==0;D=e+288|0;U=e+284|0;O=e+252|0;N=e+140|0;q=e+236|0;F=e+164|0;L=e+268|0;j=$<<5;T=r&255;r=0;n=0;a=0;e=0;s=1;P=0;do{if(!V){C=l[t+(P<<2)>>2]|0;R=0;while(1){B=R&1;c=(B|0)==0;x=(B<<6^64)+-32|0;B=(B<<1^2)+-1|0;I=c?o:-1;u=c?0:$;if((u|0)!=(I|0)){A=z|(R|0)!=(W|0);M=c?C:C+j|0;while(1){if((s|0)==1)s=vt(Z,Q)|0|512;E=s&7;s=s>>>3;d=p[1823+E>>0]|0;c=0;do{k=(vt(Z,F)|0)+n|0;S=k-ne|0;n=S>>31;n=n&k|S&~n;if((l[ie>>2]|0)>>>0<=n>>>0){l[se>>2]=1154;l[se+4>>2]=903;l[se+8>>2]=1781;wr(oe,1100,se)|0;gr(oe,pe)|0}l[ae+(c<<2)>>2]=b[(l[L>>2]|0)+(n<<1)>>1];c=c+1|0}while(c>>>0<d>>>0);c=0;do{k=(vt(Z,N)|0)+e|0;S=k-H|0;e=S>>31;e=e&k|S&~e;if((l[X>>2]|0)>>>0<=e>>>0){l[be>>2]=1154;l[be+4>>2]=903;l[be+8>>2]=1781;wr(oe,1100,be)|0;gr(oe,ce)|0}l[fe+(c<<2)>>2]=l[(l[q>>2]|0)+(e<<2)>>2];c=c+1|0}while(c>>>0<d>>>0);S=K|(u|0)!=($|0);_=0;k=M;while(1){g=A|(_|0)==0;m=_<<1;v=0;y=k;while(1){d=(vt(Z,ee)|0)+r|0;c=d-J|0;r=c>>31;r=r&d|c&~r;c=(vt(Z,te)|0)+a|0;d=c-re|0;a=d>>31;a=a&c|d&~a;if((S|(v|0)==0)&g){c=p[v+m+(1831+(E<<2))>>0]|0;d=r*3|0;if((l[D>>2]|0)>>>0<=d>>>0){l[ue>>2]=1154;l[ue+4>>2]=903;l[ue+8>>2]=1781;wr(oe,1100,ue)|0;gr(oe,he)|0}ye=l[U>>2]|0;l[y>>2]=(b[ye+(d<<1)>>1]|0)<<16|l[ae+(c<<2)>>2];l[y+4>>2]=(b[ye+(d+2<<1)>>1]|0)<<16|(b[ye+(d+1<<1)>>1]|0);l[y+8>>2]=l[fe+(c<<2)>>2];if((l[Y>>2]|0)>>>0<=a>>>0){l[de>>2]=1154;l[de+4>>2]=903;l[de+8>>2]=1781;wr(oe,1100,de)|0;gr(oe,le)|0}l[y+12>>2]=l[(l[O>>2]|0)+(a<<2)>>2]}v=v+1|0;if((v|0)==2)break;else y=y+16|0}_=_+1|0;if((_|0)==2)break;else k=k+i|0}u=u+B|0;if((u|0)==(I|0))break;else M=M+x|0}}R=R+1|0;if((R|0)==(f|0))break;else C=C+G|0}}P=P+1|0}while((P|0)!=(T|0));w=ve;return 1}function Lt(e,t,r,i,n,a,o,f){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;o=o|0;f=f|0;var s=0,c=0,u=0,d=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0,q=0,F=0,z=0,K=0,X=0,H=0,J=0,V=0,Y=0,W=0,G=0,Z=0,Q=0,$=0,ee=0,te=0,re=0;re=w;w=w+608|0;$=re+64|0;Q=re+48|0;Z=re+40|0;te=re+24|0;ee=re+16|0;G=re;W=re+88|0;Y=re+72|0;O=e+272|0;N=l[O>>2]|0;r=l[e+88>>2]|0;q=(p[r+63>>0]|0)<<8|(p[r+64>>0]|0);r=h[r+17>>0]|0;if(!(r<<24>>24)){w=re;return 1}F=(f|0)==0;z=f+-1|0;K=i<<1;X=e+92|0;H=e+116|0;J=o+-1|0;V=e+212|0;U=(a&1|0)==0;L=e+288|0;j=e+284|0;D=e+164|0;T=e+268|0;P=J<<4;R=r&255;C=(n&1|0)!=0;r=0;a=0;e=1;I=0;do{if(!F){x=l[t+(I<<2)>>2]|0;B=0;while(1){M=B&1;n=(M|0)==0;E=(M<<5^32)+-16|0;M=(M<<1^2)+-1|0;A=n?o:-1;s=n?0:J;if((s|0)!=(A|0)){S=U|(B|0)!=(z|0);k=n?x:x+P|0;while(1){if((e|0)==1)e=vt(X,H)|0|512;_=e&7;e=e>>>3;c=p[1823+_>>0]|0;n=0;do{m=(vt(X,D)|0)+a|0;g=m-N|0;a=g>>31;a=a&m|g&~a;if((l[O>>2]|0)>>>0<=a>>>0){l[G>>2]=1154;l[G+4>>2]=903;l[G+8>>2]=1781;wr(W,1100,G)|0;gr(W,ee)|0}l[Y+(n<<2)>>2]=b[(l[T>>2]|0)+(a<<1)>>1];n=n+1|0}while(n>>>0<c>>>0);g=(s|0)==(J|0)&C;y=0;m=k;while(1){v=S|(y|0)==0;d=y<<1;n=(vt(X,V)|0)+r|0;u=n-q|0;c=u>>31;c=c&n|u&~c;if(v){r=p[1831+(_<<2)+d>>0]|0;n=c*3|0;if((l[L>>2]|0)>>>0<=n>>>0){l[te>>2]=1154;l[te+4>>2]=903;l[te+8>>2]=1781;wr(W,1100,te)|0;gr(W,Z)|0}u=l[j>>2]|0;l[m>>2]=(b[u+(n<<1)>>1]|0)<<16|l[Y+(r<<2)>>2];l[m+4>>2]=(b[u+(n+2<<1)>>1]|0)<<16|(b[u+(n+1<<1)>>1]|0)}u=m+8|0;n=(vt(X,V)|0)+c|0;c=n-q|0;r=c>>31;r=r&n|c&~r;if(!(g|v^1)){n=p[(d|1)+(1831+(_<<2))>>0]|0;c=r*3|0;if((l[L>>2]|0)>>>0<=c>>>0){l[Q>>2]=1154;l[Q+4>>2]=903;l[Q+8>>2]=1781;wr(W,1100,Q)|0;gr(W,$)|0}v=l[j>>2]|0;l[u>>2]=(b[v+(c<<1)>>1]|0)<<16|l[Y+(n<<2)>>2];l[m+12>>2]=(b[v+(c+2<<1)>>1]|0)<<16|(b[v+(c+1<<1)>>1]|0)}y=y+1|0;if((y|0)==2)break;else m=m+i|0}s=s+M|0;if((s|0)==(A|0))break;else k=k+E|0}}B=B+1|0;if((B|0)==(f|0))break;else x=x+K|0}}I=I+1|0}while((I|0)!=(R|0));w=re;return 1}function jt(e,t,r,i,n,a,o,f){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;o=o|0;f=f|0;var s=0,c=0,u=0,d=0,v=0,y=0,m=0,g=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0,q=0,F=0,z=0,K=0,X=0,H=0,J=0,V=0,Y=0,W=0,G=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,ae=0,oe=0,fe=0,se=0,ce=0,ue=0,he=0;he=w;w=w+640|0;se=he+88|0;fe=he+72|0;oe=he+64|0;ae=he+48|0;ne=he+40|0;ue=he+24|0;ce=he+16|0;ie=he;re=he+128|0;ee=he+112|0;te=he+96|0;X=e+272|0;H=l[X>>2]|0;r=l[e+88>>2]|0;J=(p[r+63>>0]|0)<<8|(p[r+64>>0]|0);r=h[r+17>>0]|0;if(!(r<<24>>24)){w=he;return 1}V=(f|0)==0;Y=f+-1|0;W=i<<1;G=e+92|0;Z=e+116|0;Q=o+-1|0;$=e+212|0;K=(n&1|0)==0;z=(a&1|0)==0;N=e+288|0;q=e+284|0;F=e+164|0;U=e+268|0;O=Q<<5;j=r&255;r=0;n=0;a=0;e=0;s=1;D=0;do{if(!V){P=l[t+(D<<2)>>2]|0;L=0;while(1){R=L&1;c=(R|0)==0;C=(R<<6^64)+-32|0;R=(R<<1^2)+-1|0;T=c?o:-1;u=c?0:Q;if((u|0)!=(T|0)){I=z|(L|0)!=(Y|0);B=c?P:P+O|0;while(1){if((s|0)==1)s=vt(G,Z)|0|512;x=s&7;s=s>>>3;d=p[1823+x>>0]|0;c=0;do{M=(vt(G,F)|0)+e|0;A=M-H|0;e=A>>31;e=e&M|A&~e;if((l[X>>2]|0)>>>0<=e>>>0){l[ie>>2]=1154;l[ie+4>>2]=903;l[ie+8>>2]=1781;wr(re,1100,ie)|0;gr(re,ce)|0}l[ee+(c<<2)>>2]=b[(l[U>>2]|0)+(e<<1)>>1];c=c+1|0}while(c>>>0<d>>>0);c=0;do{M=(vt(G,F)|0)+n|0;A=M-H|0;n=A>>31;n=n&M|A&~n;if((l[X>>2]|0)>>>0<=n>>>0){l[ue>>2]=1154;l[ue+4>>2]=903;l[ue+8>>2]=1781;wr(re,1100,ue)|0;gr(re,ne)|0}l[te+(c<<2)>>2]=b[(l[U>>2]|0)+(n<<1)>>1];c=c+1|0}while(c>>>0<d>>>0);A=K|(u|0)!=(Q|0);E=0;M=B;while(1){S=I|(E|0)==0;k=E<<1;g=0;_=M;while(1){m=(vt(G,$)|0)+a|0;y=m-J|0;a=y>>31;a=a&m|y&~a;y=(vt(G,$)|0)+r|0;m=y-J|0;r=m>>31;r=r&y|m&~r;if((A|(g|0)==0)&S){y=p[g+k+(1831+(x<<2))>>0]|0;m=a*3|0;c=l[N>>2]|0;if(c>>>0<=m>>>0){l[ae>>2]=1154;l[ae+4>>2]=903;l[ae+8>>2]=1781;wr(re,1100,ae)|0;gr(re,oe)|0;c=l[N>>2]|0}d=l[q>>2]|0;v=r*3|0;if(c>>>0>v>>>0)c=d;else{l[fe>>2]=1154;l[fe+4>>2]=903;l[fe+8>>2]=1781;wr(re,1100,fe)|0;gr(re,se)|0;c=l[q>>2]|0}l[_>>2]=(b[d+(m<<1)>>1]|0)<<16|l[ee+(y<<2)>>2];l[_+4>>2]=(b[d+(m+2<<1)>>1]|0)<<16|(b[d+(m+1<<1)>>1]|0);l[_+8>>2]=(b[c+(v<<1)>>1]|0)<<16|l[te+(y<<2)>>2];l[_+12>>2]=(b[c+(v+2<<1)>>1]|0)<<16|(b[c+(v+1<<1)>>1]|0)}g=g+1|0;if((g|0)==2)break;else _=_+16|0}E=E+1|0;if((E|0)==2)break;else M=M+i|0}u=u+R|0;if((u|0)==(T|0))break;else B=B+C|0}}L=L+1|0;if((L|0)==(f|0))break;else P=P+W|0}}D=D+1|0}while((D|0)!=(j|0));w=he;return 1}function Dt(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,d=0,p=0;p=w;w=w+608|0;d=p+88|0;u=p+72|0;s=p+64|0;f=p+48|0;a=p+40|0;o=p+24|0;n=p+16|0;i=p;c=p+96|0;l[e>>2]=0;t=e+284|0;r=l[t>>2]|0;if(r){if(!(r&7))Pi[l[104>>2]&1](r,0,0,1,l[27]|0)|0;else{l[i>>2]=1154;l[i+4>>2]=2499;l[i+8>>2]=1516;wr(c,1100,i)|0;gr(c,n)|0}l[t>>2]=0;l[e+288>>2]=0;l[e+292>>2]=0}h[e+296>>0]=0;t=e+268|0;r=l[t>>2]|0;if(r){if(!(r&7))Pi[l[104>>2]&1](r,0,0,1,l[27]|0)|0;else{l[o>>2]=1154;l[o+4>>2]=2499;l[o+8>>2]=1516;wr(c,1100,o)|0;gr(c,a)|0}l[t>>2]=0;l[e+272>>2]=0;l[e+276>>2]=0}h[e+280>>0]=0;t=e+252|0;r=l[t>>2]|0;if(r){if(!(r&7))Pi[l[104>>2]&1](r,0,0,1,l[27]|0)|0;else{l[f>>2]=1154;l[f+4>>2]=2499;l[f+8>>2]=1516;wr(c,1100,f)|0;gr(c,s)|0}l[t>>2]=0;l[e+256>>2]=0;l[e+260>>2]=0}h[e+264>>0]=0;t=e+236|0;r=l[t>>2]|0;if(!r){d=e+248|0;h[d>>0]=0;d=e+212|0;ht(d);d=e+188|0;ht(d);d=e+164|0;ht(d);d=e+140|0;ht(d);d=e+116|0;ht(d);w=p;return}if(!(r&7))Pi[l[104>>2]&1](r,0,0,1,l[27]|0)|0;else{l[u>>2]=1154;l[u+4>>2]=2499;l[u+8>>2]=1516;wr(c,1100,u)|0;gr(c,d)|0}l[t>>2]=0;l[e+240>>2]=0;l[e+244>>2]=0;d=e+248|0;h[d>>0]=0;d=e+212|0;ht(d);d=e+188|0;ht(d);d=e+164|0;ht(d);d=e+140|0;ht(d);d=e+116|0;ht(d);w=p;return}function Ut(e,t){e=e|0;t=t|0;var r=0;r=w;w=w+16|0;l[r>>2]=t;t=l[63]|0;_r(t,e,r)|0;yr(10,t)|0;ze()}function Ot(){var e=0,t=0;e=w;w=w+16|0;if(!(De(200,2)|0)){t=Le(l[49]|0)|0;w=e;return t|0}else Ut(2090,e);return 0}function Nt(e){e=e|0;Fr(e);return}function qt(e){e=e|0;var t=0;t=w;w=w+16|0;Ri[e&3]();Ut(2139,t)}function Ft(){var e=0,t=0;e=Ot()|0;if(((e|0)!=0?(t=l[e>>2]|0,(t|0)!=0):0)?(e=t+48|0,(l[e>>2]&-256|0)==1126902528?(l[e+4>>2]|0)==1129074247:0):0)qt(l[t+12>>2]|0);t=l[28]|0;l[28]=t+0;qt(t)}function zt(e){e=e|0;return}function Kt(e){e=e|0;return}function Xt(e){e=e|0;return}function Ht(e){e=e|0;return}function Jt(e){e=e|0;Nt(e);return}function Vt(e){e=e|0;Nt(e);return}function Yt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0;o=w;w=w+64|0;a=o;if((e|0)!=(t|0))if((t|0)!=0?(n=Qt(t,24,40,0)|0,(n|0)!=0):0){t=a;i=t+56|0;do{l[t>>2]=0;t=t+4|0}while((t|0)<(i|0));l[a>>2]=n;l[a+8>>2]=e;l[a+12>>2]=-1;l[a+48>>2]=1;Li[l[(l[n>>2]|0)+28>>2]&3](n,a,l[r>>2]|0,1);if((l[a+24>>2]|0)==1){l[r>>2]=l[a+16>>2];t=1}else t=0}else t=0;else t=1;w=o;return t|0}function Wt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0;e=t+16|0;n=l[e>>2]|0;do{if(n){if((n|0)!=(r|0)){i=t+36|0;l[i>>2]=(l[i>>2]|0)+1;l[t+24>>2]=2;h[t+54>>0]=1;break}e=t+24|0;if((l[e>>2]|0)==2)l[e>>2]=i}else{l[e>>2]=r;l[t+24>>2]=i;l[t+36>>2]=1}}while(0);return}function Gt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(l[t+8>>2]|0))Wt(0,t,r,i);return}function Zt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(l[t+8>>2]|0))Wt(0,t,r,i);else{e=l[e+8>>2]|0;Li[l[(l[e>>2]|0)+28>>2]&3](e,t,r,i)}return}function Qt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,o=0,f=0,s=0,c=0,u=0,p=0,b=0,v=0;v=w;w=w+64|0;b=v;p=l[e>>2]|0;u=e+(l[p+-8>>2]|0)|0;p=l[p+-4>>2]|0;l[b>>2]=r;l[b+4>>2]=e;l[b+8>>2]=t;l[b+12>>2]=i;i=b+16|0;e=b+20|0;t=b+24|0;n=b+28|0;a=b+32|0;o=b+40|0;f=(p|0)==(r|0);s=i;c=s+36|0;do{l[s>>2]=0;s=s+4|0}while((s|0)<(c|0));d[i+36>>1]=0;h[i+38>>0]=0;e:do{if(f){l[b+48>>2]=1;Ti[l[(l[r>>2]|0)+20>>2]&3](r,b,u,u,1,0);i=(l[t>>2]|0)==1?u:0}else{xi[l[(l[p>>2]|0)+24>>2]&3](p,b,u,1,0);switch(l[b+36>>2]|0){case 0:{i=(l[o>>2]|0)==1&(l[n>>2]|0)==1&(l[a>>2]|0)==1?l[e>>2]|0:0;break e}case 1:break;default:{i=0;break e}}if((l[t>>2]|0)!=1?!((l[o>>2]|0)==0&(l[n>>2]|0)==1&(l[a>>2]|0)==1):0){i=0;break}i=l[i>>2]|0}}while(0);w=v;return i|0}function $t(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;h[t+53>>0]=1;do{if((l[t+4>>2]|0)==(i|0)){h[t+52>>0]=1;i=t+16|0;e=l[i>>2]|0;if(!e){l[i>>2]=r;l[t+24>>2]=n;l[t+36>>2]=1;if(!((n|0)==1?(l[t+48>>2]|0)==1:0))break;h[t+54>>0]=1;break}if((e|0)!=(r|0)){n=t+36|0;l[n>>2]=(l[n>>2]|0)+1;h[t+54>>0]=1;break}e=t+24|0;i=l[e>>2]|0;if((i|0)==2){l[e>>2]=n;i=n}if((i|0)==1?(l[t+48>>2]|0)==1:0)h[t+54>>0]=1}}while(0);return}function er(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0,s=0;e:do{if((e|0)==(l[t+8>>2]|0)){if((l[t+4>>2]|0)==(r|0)?(a=t+28|0,(l[a>>2]|0)!=1):0)l[a>>2]=i}else{if((e|0)!=(l[t>>2]|0)){f=l[e+8>>2]|0;xi[l[(l[f>>2]|0)+24>>2]&3](f,t,r,i,n);break}if((l[t+16>>2]|0)!=(r|0)?(o=t+20|0,(l[o>>2]|0)!=(r|0)):0){l[t+32>>2]=i;i=t+44|0;if((l[i>>2]|0)==4)break;a=t+52|0;h[a>>0]=0;s=t+53|0;h[s>>0]=0;e=l[e+8>>2]|0;Ti[l[(l[e>>2]|0)+20>>2]&3](e,t,r,r,1,n);if(h[s>>0]|0){if(!(h[a>>0]|0)){a=1;f=13}}else{a=0;f=13}do{if((f|0)==13){l[o>>2]=r;s=t+40|0;l[s>>2]=(l[s>>2]|0)+1;if((l[t+36>>2]|0)==1?(l[t+24>>2]|0)==2:0){h[t+54>>0]=1;if(a)break}else f=16;if((f|0)==16?a:0)break;l[i>>2]=4;break e}}while(0);l[i>>2]=3;break}if((i|0)==1)l[t+32>>2]=1}}while(0);return}function tr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0;do{if((e|0)==(l[t+8>>2]|0)){if((l[t+4>>2]|0)==(r|0)?(o=t+28|0,(l[o>>2]|0)!=1):0)l[o>>2]=i}else if((e|0)==(l[t>>2]|0)){if((l[t+16>>2]|0)!=(r|0)?(a=t+20|0,(l[a>>2]|0)!=(r|0)):0){l[t+32>>2]=i;l[a>>2]=r;n=t+40|0;l[n>>2]=(l[n>>2]|0)+1;if((l[t+36>>2]|0)==1?(l[t+24>>2]|0)==2:0)h[t+54>>0]=1;l[t+44>>2]=4;break}if((i|0)==1)l[t+32>>2]=1}}while(0);return}function rr(e,t,r,i,n,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;if((e|0)==(l[t+8>>2]|0))$t(0,t,r,i,n);else{e=l[e+8>>2]|0;Ti[l[(l[e>>2]|0)+20>>2]&3](e,t,r,i,n,a)}return}function ir(e,t,r,i,n,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;if((e|0)==(l[t+8>>2]|0))$t(0,t,r,i,n);return}function nr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=w;w=w+16|0;i=n;l[i>>2]=l[r>>2];e=Ai[l[(l[e>>2]|0)+16>>2]&7](e,t,i)|0;if(e)l[r>>2]=l[i>>2];w=n;return e&1|0}function ar(e){e=e|0;if(!e)e=0;else e=(Qt(e,24,72,0)|0)!=0;return e&1|0}function or(){var e=0,t=0,r=0,i=0,n=0,a=0,o=0,f=0;n=w;w=w+48|0;o=n+32|0;r=n+24|0;f=n+16|0;a=n;n=n+36|0;e=Ot()|0;if((e|0)!=0?(i=l[e>>2]|0,(i|0)!=0):0){e=i+48|0;t=l[e>>2]|0;e=l[e+4>>2]|0;if(!((t&-256|0)==1126902528&(e|0)==1129074247)){l[r>>2]=l[51];Ut(2368,r)}if((t|0)==1126902529&(e|0)==1129074247)e=l[i+44>>2]|0;else e=i+80|0;l[n>>2]=e;i=l[i>>2]|0;e=l[i+4>>2]|0;if(Ai[l[(l[8>>2]|0)+16>>2]&7](8,i,n)|0){f=l[n>>2]|0;n=l[51]|0;f=Ii[l[(l[f>>2]|0)+8>>2]&1](f)|0;l[a>>2]=n;l[a+4>>2]=e;l[a+8>>2]=f;Ut(2282,a)}else{l[f>>2]=l[51];l[f+4>>2]=e;Ut(2327,f)}}Ut(2406,o)}function fr(){var e=0;e=w;w=w+16|0;if(!(Ue(196,6)|0)){w=e;return}else Ut(2179,e)}function sr(e){e=e|0;var t=0;t=w;w=w+16|0;Fr(e);if(!(qe(l[49]|0,0)|0)){w=t;return}else Ut(2229,t)}function cr(e){e=e|0;var t=0,r=0;t=0;while(1){if((p[2427+t>>0]|0)==(e|0)){r=2;break}t=t+1|0;if((t|0)==87){t=87;e=2515;r=5;break}}if((r|0)==2)if(!t)e=2515;else{e=2515;r=5}if((r|0)==5)while(1){r=e;while(1){e=r+1|0;if(!(h[r>>0]|0))break;else r=e}t=t+-1|0;if(!t)break;else r=5}return e|0}function ur(){var e=0;if(!(l[52]|0))e=264;else{e=(je()|0)+60|0;e=l[e>>2]|0}return e|0}function hr(e){e=e|0;var t=0;if(e>>>0>4294963200){t=ur()|0;l[t>>2]=0-e;e=-1}return e|0}function dr(e,t){e=+e;t=t|0;var r=0,i=0,n=0;m[k>>3]=e;r=l[k>>2]|0;i=l[k+4>>2]|0;n=Wr(r|0,i|0,52)|0;n=n&2047;switch(n|0){case 0:{if(e!=0){e=+dr(e*0x10000000000000000,t);r=(l[t>>2]|0)+-64|0}else r=0;l[t>>2]=r;break}case 2047:break;default:{l[t>>2]=n+-1022;l[k>>2]=r;l[k+4>>2]=i&-2146435073|1071644672;e=+m[k>>3]}}return+e}function lr(e,t){e=+e;t=t|0;return+ +dr(e,t)}function pr(e,t,r){e=e|0;t=t|0;r=r|0;do{if(e){if(t>>>0<128){h[e>>0]=t;e=1;break}if(t>>>0<2048){h[e>>0]=t>>>6|192;h[e+1>>0]=t&63|128;e=2;break}if(t>>>0<55296|(t&-8192|0)==57344){h[e>>0]=t>>>12|224;h[e+1>>0]=t>>>6&63|128;h[e+2>>0]=t&63|128;e=3;break}if((t+-65536|0)>>>0<1048576){h[e>>0]=t>>>18|240;h[e+1>>0]=t>>>12&63|128;h[e+2>>0]=t>>>6&63|128;h[e+3>>0]=t&63|128;e=4;break}else{e=ur()|0;l[e>>2]=84;e=-1;break}}else e=1}while(0);return e|0}function br(e,t){e=e|0;t=t|0;if(!e)e=0;else e=pr(e,t,0)|0;return e|0}function vr(e){e=e|0;var t=0,r=0;do{if(e){if((l[e+76>>2]|0)<=-1){t=Pr(e)|0;break}r=(Er(e)|0)==0;t=Pr(e)|0;if(!r)Mr(e)}else{if(!(l[65]|0))t=0;else t=vr(l[65]|0)|0;Fe(236);e=l[58]|0;if(e)do{if((l[e+76>>2]|0)>-1)r=Er(e)|0;else r=0;if((l[e+20>>2]|0)>>>0>(l[e+28>>2]|0)>>>0)t=Pr(e)|0|t;if(r)Mr(e);e=l[e+56>>2]|0}while((e|0)!=0);Oe(236)}}while(0);return t|0}function yr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0;if((l[t+76>>2]|0)>=0?(Er(t)|0)!=0:0){if((h[t+75>>0]|0)!=(e|0)?(i=t+20|0,n=l[i>>2]|0,n>>>0<(l[t+16>>2]|0)>>>0):0){l[i>>2]=n+1;h[n>>0]=e;r=e&255}else r=Ar(t,e)|0;Mr(t)}else o=3;do{if((o|0)==3){if((h[t+75>>0]|0)!=(e|0)?(a=t+20|0,r=l[a>>2]|0,r>>>0<(l[t+16>>2]|0)>>>0):0){l[a>>2]=r+1;h[r>>0]=e;r=e&255;break}r=Ar(t,e)|0}}while(0);return r|0}function mr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0;i=r+16|0;n=l[i>>2]|0;if(!n)if(!(Rr(r)|0)){n=l[i>>2]|0;a=4}else i=0;else a=4;e:do{if((a|0)==4){o=r+20|0;a=l[o>>2]|0;if((n-a|0)>>>0<t>>>0){i=Ai[l[r+36>>2]&7](r,e,t)|0;break}t:do{if((h[r+75>>0]|0)>-1){i=t;while(1){if(!i){n=a;i=0;break t}n=i+-1|0;if((h[e+n>>0]|0)==10)break;else i=n}if((Ai[l[r+36>>2]&7](r,e,i)|0)>>>0<i>>>0)break e;t=t-i|0;e=e+i|0;n=l[o>>2]|0}else{n=a;i=0}}while(0);Qr(n|0,e|0,t|0)|0;l[o>>2]=(l[o>>2]|0)+t;i=i+t|0}}while(0);return i|0}function gr(e,t){e=e|0;t=t|0;var r=0,i=0;r=w;w=w+16|0;i=r;l[i>>2]=t;t=_r(l[64]|0,e,i)|0;w=r;return t|0}function wr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=w;w=w+16|0;n=i;l[n>>2]=r;r=Sr(e,t,n)|0;w=i;return r|0}function _r(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,d=0,p=0,b=0,v=0,y=0;y=w;w=w+224|0;d=y+120|0;v=y+80|0;b=y;p=y+136|0;i=v;n=i+40|0;do{l[i>>2]=0;i=i+4|0}while((i|0)<(n|0));l[d>>2]=l[r>>2];if((Lr(0,t,d,b,v)|0)<0)r=-1;else{if((l[e+76>>2]|0)>-1)c=Er(e)|0;else c=0;r=l[e>>2]|0;u=r&32;if((h[e+74>>0]|0)<1)l[e>>2]=r&-33;r=e+48|0;if(!(l[r>>2]|0)){n=e+44|0;a=l[n>>2]|0;l[n>>2]=p;o=e+28|0;l[o>>2]=p;f=e+20|0;l[f>>2]=p;l[r>>2]=80;s=e+16|0;l[s>>2]=p+80;i=Lr(e,t,d,b,v)|0;if(a){Ai[l[e+36>>2]&7](e,0,0)|0;i=(l[f>>2]|0)==0?-1:i;l[n>>2]=a;l[r>>2]=0;l[s>>2]=0;l[o>>2]=0;l[f>>2]=0}}else i=Lr(e,t,d,b,v)|0;r=l[e>>2]|0;l[e>>2]=r|u;if(c)Mr(e);r=(r&32|0)==0?i:-1}w=y;return r|0}function kr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,o=0,f=0,s=0,c=0,u=0;u=w;w=w+128|0;n=u+112|0;c=u;a=c;o=268;f=a+112|0;do{l[a>>2]=l[o>>2];a=a+4|0;o=o+4|0}while((a|0)<(f|0));if((t+-1|0)>>>0>2147483646)if(!t){t=1;s=4}else{t=ur()|0;l[t>>2]=75;t=-1}else{n=e;s=4}if((s|0)==4){s=-2-n|0;s=t>>>0>s>>>0?s:t;l[c+48>>2]=s;e=c+20|0;l[e>>2]=n;l[c+44>>2]=n;t=n+s|0;n=c+16|0;l[n>>2]=t;l[c+28>>2]=t;t=_r(c,r,i)|0;if(s){r=l[e>>2]|0;h[r+(((r|0)==(l[n>>2]|0))<<31>>31)>>0]=0}}w=u;return t|0}function Sr(e,t,r){e=e|0
|
|
;t=t|0;r=r|0;return kr(e,2147483647,t,r)|0}function Er(e){e=e|0;return 0}function Mr(e){e=e|0;return}function Ar(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0;s=w;w=w+16|0;f=s;o=t&255;h[f>>0]=o;i=e+16|0;n=l[i>>2]|0;if(!n)if(!(Rr(e)|0)){n=l[i>>2]|0;a=4}else r=-1;else a=4;do{if((a|0)==4){i=e+20|0;a=l[i>>2]|0;if(a>>>0<n>>>0?(r=t&255,(r|0)!=(h[e+75>>0]|0)):0){l[i>>2]=a+1;h[a>>0]=o;break}if((Ai[l[e+36>>2]&7](e,f,1)|0)==1)r=p[f>>0]|0;else r=-1}}while(0);w=s;return r|0}function xr(e){e=e|0;var t=0,r=0;t=w;w=w+16|0;r=t;l[r>>2]=l[e+60>>2];e=hr(Ae(6,r|0)|0)|0;w=t;return e|0}function Br(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0;n=w;w=w+32|0;a=n;i=n+20|0;l[a>>2]=l[e+60>>2];l[a+4>>2]=0;l[a+8>>2]=t;l[a+12>>2]=i;l[a+16>>2]=r;if((hr(He(140,a|0)|0)|0)<0){l[i>>2]=-1;e=-1}else e=l[i>>2]|0;w=n;return e|0}function Ir(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0;b=w;w=w+48|0;h=b+16|0;u=b;i=b+32|0;d=e+28|0;n=l[d>>2]|0;l[i>>2]=n;p=e+20|0;n=(l[p>>2]|0)-n|0;l[i+4>>2]=n;l[i+8>>2]=t;l[i+12>>2]=r;s=e+60|0;c=e+44|0;t=2;n=n+r|0;while(1){if(!(l[52]|0)){l[h>>2]=l[s>>2];l[h+4>>2]=i;l[h+8>>2]=t;o=hr(Je(146,h|0)|0)|0}else{Ke(7,e|0);l[u>>2]=l[s>>2];l[u+4>>2]=i;l[u+8>>2]=t;o=hr(Je(146,u|0)|0)|0;Ee(0)}if((n|0)==(o|0)){n=6;break}if((o|0)<0){n=8;break}n=n-o|0;a=l[i+4>>2]|0;if(o>>>0<=a>>>0)if((t|0)==2){l[d>>2]=(l[d>>2]|0)+o;f=a;t=2}else f=a;else{f=l[c>>2]|0;l[d>>2]=f;l[p>>2]=f;f=l[i+12>>2]|0;o=o-a|0;i=i+8|0;t=t+-1|0}l[i>>2]=(l[i>>2]|0)+o;l[i+4>>2]=f-o}if((n|0)==6){h=l[c>>2]|0;l[e+16>>2]=h+(l[e+48>>2]|0);e=h;l[d>>2]=e;l[p>>2]=e}else if((n|0)==8){l[e+16>>2]=0;l[d>>2]=0;l[p>>2]=0;l[e>>2]=l[e>>2]|32;if((t|0)==2)r=0;else r=r-(l[i+4>>2]|0)|0}w=b;return r|0}function Cr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=w;w=w+80|0;i=n;l[e+36>>2]=3;if((l[e>>2]&64|0)==0?(l[i>>2]=l[e+60>>2],l[i+4>>2]=21505,l[i+8>>2]=n+12,(Me(54,i|0)|0)!=0):0)h[e+75>>0]=-1;i=Ir(e,t,r)|0;w=n;return i|0}function Rr(e){e=e|0;var t=0,r=0;t=e+74|0;r=h[t>>0]|0;h[t>>0]=r+255|r;t=l[e>>2]|0;if(!(t&8)){l[e+8>>2]=0;l[e+4>>2]=0;t=l[e+44>>2]|0;l[e+28>>2]=t;l[e+20>>2]=t;l[e+16>>2]=t+(l[e+48>>2]|0);t=0}else{l[e>>2]=t|32;t=-1}return t|0}function Tr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0;a=t&255;i=(r|0)!=0;e:do{if(i&(e&3|0)!=0){n=t&255;while(1){if((h[e>>0]|0)==n<<24>>24){o=6;break e}e=e+1|0;r=r+-1|0;i=(r|0)!=0;if(!(i&(e&3|0)!=0)){o=5;break}}}else o=5}while(0);if((o|0)==5)if(i)o=6;else r=0;e:do{if((o|0)==6){n=t&255;if((h[e>>0]|0)!=n<<24>>24){i=ue(a,16843009)|0;t:do{if(r>>>0>3)while(1){a=l[e>>2]^i;if((a&-2139062144^-2139062144)&a+-16843009)break;e=e+4|0;r=r+-4|0;if(r>>>0<=3){o=11;break t}}else o=11}while(0);if((o|0)==11)if(!r){r=0;break}while(1){if((h[e>>0]|0)==n<<24>>24)break e;e=e+1|0;r=r+-1|0;if(!r){r=0;break}}}}}while(0);return((r|0)!=0?e:0)|0}function Pr(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0;t=e+20|0;a=e+28|0;if((l[t>>2]|0)>>>0>(l[a>>2]|0)>>>0?(Ai[l[e+36>>2]&7](e,0,0)|0,(l[t>>2]|0)==0):0)t=-1;else{o=e+4|0;r=l[o>>2]|0;i=e+8|0;n=l[i>>2]|0;if(r>>>0<n>>>0)Ai[l[e+40>>2]&7](e,r-n|0,1)|0;l[e+16>>2]=0;l[a>>2]=0;l[t>>2]=0;l[i>>2]=0;l[o>>2]=0;t=0}return t|0}function Lr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0,s=0,c=0,u=0,b=0,v=0,y=0,g=0,_=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0,N=0,F=0,z=0,K=0,X=0,H=0,J=0,V=0,Y=0,W=0,G=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,ae=0,oe=0;oe=w;w=w+624|0;te=oe+24|0;ie=oe+16|0;re=oe+588|0;G=oe+576|0;ee=oe;V=oe+536|0;ae=oe+8|0;ne=oe+528|0;U=(e|0)!=0;O=V+40|0;J=O;V=V+39|0;Y=ae+4|0;W=G+12|0;G=G+11|0;Z=re;Q=W;$=Q-Z|0;N=-2-Z|0;F=Q+2|0;z=te+288|0;K=re+9|0;X=K;H=re+8|0;a=0;_=t;o=0;t=0;e:while(1){do{if((a|0)>-1)if((o|0)>(2147483647-a|0)){a=ur()|0;l[a>>2]=75;a=-1;break}else{a=o+a|0;break}}while(0);o=h[_>>0]|0;if(!(o<<24>>24)){D=245;break}else f=_;t:while(1){switch(o<<24>>24){case 37:{o=f;D=9;break t}case 0:{o=f;break t}default:{}}j=f+1|0;o=h[j>>0]|0;f=j}t:do{if((D|0)==9)while(1){D=0;if((h[o+1>>0]|0)!=37)break t;f=f+1|0;o=o+2|0;if((h[o>>0]|0)==37)D=9;else break}}while(0);E=f-_|0;if(U?(l[e>>2]&32|0)==0:0)mr(_,E,e)|0;if((f|0)!=(_|0)){_=o;o=E;continue}u=o+1|0;f=h[u>>0]|0;s=(f<<24>>24)+-48|0;if(s>>>0<10){j=(h[o+2>>0]|0)==36;u=j?o+3|0:u;f=h[u>>0]|0;y=j?s:-1;t=j?1:t}else y=-1;o=f<<24>>24;t:do{if((o&-32|0)==32){s=0;while(1){if(!(1<<o+-32&75913)){b=s;o=u;break t}s=1<<(f<<24>>24)+-32|s;u=u+1|0;f=h[u>>0]|0;o=f<<24>>24;if((o&-32|0)!=32){b=s;o=u;break}}}else{b=0;o=u}}while(0);do{if(f<<24>>24==42){s=o+1|0;f=(h[s>>0]|0)+-48|0;if(f>>>0<10?(h[o+2>>0]|0)==36:0){l[n+(f<<2)>>2]=10;t=1;o=o+3|0;f=l[i+((h[s>>0]|0)+-48<<3)>>2]|0}else{if(t){a=-1;break e}if(!U){S=b;o=s;t=0;j=0;break}t=(l[r>>2]|0)+(4-1)&~(4-1);f=l[t>>2]|0;l[r>>2]=t+4;t=0;o=s}if((f|0)<0){S=b|8192;j=0-f|0}else{S=b;j=f}}else{s=(f<<24>>24)+-48|0;if(s>>>0<10){f=0;do{f=(f*10|0)+s|0;o=o+1|0;s=(h[o>>0]|0)+-48|0}while(s>>>0<10);if((f|0)<0){a=-1;break e}else{S=b;j=f}}else{S=b;j=0}}}while(0);t:do{if((h[o>>0]|0)==46){s=o+1|0;f=h[s>>0]|0;if(f<<24>>24!=42){u=(f<<24>>24)+-48|0;if(u>>>0<10){o=s;f=0}else{o=s;u=0;break}while(1){f=(f*10|0)+u|0;o=o+1|0;u=(h[o>>0]|0)+-48|0;if(u>>>0>=10){u=f;break t}}}s=o+2|0;f=(h[s>>0]|0)+-48|0;if(f>>>0<10?(h[o+3>>0]|0)==36:0){l[n+(f<<2)>>2]=10;o=o+4|0;u=l[i+((h[s>>0]|0)+-48<<3)>>2]|0;break}if(t){a=-1;break e}if(U){o=(l[r>>2]|0)+(4-1)&~(4-1);u=l[o>>2]|0;l[r>>2]=o+4;o=s}else{o=s;u=0}}else u=-1}while(0);v=0;while(1){f=(h[o>>0]|0)+-65|0;if(f>>>0>57){a=-1;break e}s=o+1|0;f=h[5359+(v*58|0)+f>>0]|0;b=f&255;if((b+-1|0)>>>0<8){o=s;v=b}else{L=s;break}}if(!(f<<24>>24)){a=-1;break}s=(y|0)>-1;do{if(f<<24>>24==19)if(s){a=-1;break e}else D=52;else{if(s){l[n+(y<<2)>>2]=b;T=i+(y<<3)|0;P=l[T+4>>2]|0;D=ee;l[D>>2]=l[T>>2];l[D+4>>2]=P;D=52;break}if(!U){a=0;break e}Ur(ee,b,r)}}while(0);if((D|0)==52?(D=0,!U):0){_=L;o=E;continue}y=h[o>>0]|0;y=(v|0)!=0&(y&15|0)==3?y&-33:y;s=S&-65537;P=(S&8192|0)==0?S:s;t:do{switch(y|0){case 110:switch(v|0){case 0:{l[l[ee>>2]>>2]=a;_=L;o=E;continue e}case 1:{l[l[ee>>2]>>2]=a;_=L;o=E;continue e}case 2:{_=l[ee>>2]|0;l[_>>2]=a;l[_+4>>2]=((a|0)<0)<<31>>31;_=L;o=E;continue e}case 3:{d[l[ee>>2]>>1]=a;_=L;o=E;continue e}case 4:{h[l[ee>>2]>>0]=a;_=L;o=E;continue e}case 6:{l[l[ee>>2]>>2]=a;_=L;o=E;continue e}case 7:{_=l[ee>>2]|0;l[_>>2]=a;l[_+4>>2]=((a|0)<0)<<31>>31;_=L;o=E;continue e}default:{_=L;o=E;continue e}}case 112:{v=P|8;u=u>>>0>8?u:8;y=120;D=64;break}case 88:case 120:{v=P;D=64;break}case 111:{s=ee;f=l[s>>2]|0;s=l[s+4>>2]|0;if((f|0)==0&(s|0)==0)o=O;else{o=O;do{o=o+-1|0;h[o>>0]=f&7|48;f=Wr(f|0,s|0,3)|0;s=q}while(!((f|0)==0&(s|0)==0))}if(!(P&8)){f=P;v=0;b=5839;D=77}else{v=J-o+1|0;f=P;u=(u|0)<(v|0)?v:u;v=0;b=5839;D=77}break}case 105:case 100:{f=ee;o=l[f>>2]|0;f=l[f+4>>2]|0;if((f|0)<0){o=Vr(0,0,o|0,f|0)|0;f=q;s=ee;l[s>>2]=o;l[s+4>>2]=f;s=1;b=5839;D=76;break t}if(!(P&2048)){b=P&1;s=b;b=(b|0)==0?5839:5841;D=76}else{s=1;b=5840;D=76}break}case 117:{f=ee;o=l[f>>2]|0;f=l[f+4>>2]|0;s=0;b=5839;D=76;break}case 99:{h[V>>0]=l[ee>>2];_=V;f=1;v=0;y=5839;o=O;break}case 109:{o=ur()|0;o=cr(l[o>>2]|0)|0;D=82;break}case 115:{o=l[ee>>2]|0;o=(o|0)!=0?o:5849;D=82;break}case 67:{l[ae>>2]=l[ee>>2];l[Y>>2]=0;l[ee>>2]=ae;u=-1;D=86;break}case 83:{if(!u){Nr(e,32,j,0,P);o=0;D=98}else D=86;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{c=+m[ee>>3];l[ie>>2]=0;m[k>>3]=c;if((l[k+4>>2]|0)>=0)if(!(P&2048)){T=P&1;R=T;T=(T|0)==0?5857:5862}else{R=1;T=5859}else{c=-c;R=1;T=5856}m[k>>3]=c;C=l[k+4>>2]&2146435072;do{if(C>>>0<2146435072|(C|0)==2146435072&0<0){g=+lr(c,ie)*2;f=g!=0;if(f)l[ie>>2]=(l[ie>>2]|0)+-1;B=y|32;if((B|0)==97){_=y&32;E=(_|0)==0?T:T+9|0;S=R|2;o=12-u|0;do{if(!(u>>>0>11|(o|0)==0)){c=8;do{o=o+-1|0;c=c*16}while((o|0)!=0);if((h[E>>0]|0)==45){c=-(c+(-g-c));break}else{c=g+c-c;break}}else c=g}while(0);f=l[ie>>2]|0;o=(f|0)<0?0-f|0:f;o=Or(o,((o|0)<0)<<31>>31,W)|0;if((o|0)==(W|0)){h[G>>0]=48;o=G}h[o+-1>>0]=(f>>31&2)+43;v=o+-2|0;h[v>>0]=y+15;b=(u|0)<1;s=(P&8|0)==0;f=re;while(1){T=~~c;o=f+1|0;h[f>>0]=p[5823+T>>0]|_;c=(c-+(T|0))*16;do{if((o-Z|0)==1){if(s&(b&c==0))break;h[o>>0]=46;o=f+2|0}}while(0);if(!(c!=0))break;else f=o}u=(u|0)!=0&(N+o|0)<(u|0)?F+u-v|0:$-v+o|0;s=u+S|0;Nr(e,32,j,s,P);if(!(l[e>>2]&32))mr(E,S,e)|0;Nr(e,48,j,s,P^65536);o=o-Z|0;if(!(l[e>>2]&32))mr(re,o,e)|0;f=Q-v|0;Nr(e,48,u-(o+f)|0,0,0);if(!(l[e>>2]&32))mr(v,f,e)|0;Nr(e,32,j,s,P^8192);o=(s|0)<(j|0)?j:s;break}o=(u|0)<0?6:u;if(f){f=(l[ie>>2]|0)+-28|0;l[ie>>2]=f;c=g*268435456}else{c=g;f=l[ie>>2]|0}C=(f|0)<0?te:z;I=C;f=C;do{x=~~c>>>0;l[f>>2]=x;f=f+4|0;c=(c-+(x>>>0))*1e9}while(c!=0);s=f;f=l[ie>>2]|0;if((f|0)>0){b=C;while(1){v=(f|0)>29?29:f;u=s+-4|0;do{if(u>>>0<b>>>0)u=b;else{f=0;do{x=Gr(l[u>>2]|0,0,v|0)|0;x=Zr(x|0,q|0,f|0,0)|0;f=q;A=oi(x|0,f|0,1e9,0)|0;l[u>>2]=A;f=ai(x|0,f|0,1e9,0)|0;u=u+-4|0}while(u>>>0>=b>>>0);if(!f){u=b;break}u=b+-4|0;l[u>>2]=f}}while(0);while(1){if(s>>>0<=u>>>0)break;f=s+-4|0;if(!(l[f>>2]|0))s=f;else break}f=(l[ie>>2]|0)-v|0;l[ie>>2]=f;if((f|0)>0)b=u;else break}}else u=C;if((f|0)<0){E=((o+25|0)/9|0)+1|0;M=(B|0)==102;_=u;while(1){S=0-f|0;S=(S|0)>9?9:S;do{if(_>>>0<s>>>0){f=(1<<S)+-1|0;b=1e9>>>S;u=0;v=_;do{x=l[v>>2]|0;l[v>>2]=(x>>>S)+u;u=ue(x&f,b)|0;v=v+4|0}while(v>>>0<s>>>0);f=(l[_>>2]|0)==0?_+4|0:_;if(!u){u=f;break}l[s>>2]=u;u=f;s=s+4|0}else u=(l[_>>2]|0)==0?_+4|0:_}while(0);f=M?C:u;s=(s-f>>2|0)>(E|0)?f+(E<<2)|0:s;f=(l[ie>>2]|0)+S|0;l[ie>>2]=f;if((f|0)>=0){_=u;break}else _=u}}else _=u;do{if(_>>>0<s>>>0){f=(I-_>>2)*9|0;b=l[_>>2]|0;if(b>>>0<10)break;else u=10;do{u=u*10|0;f=f+1|0}while(b>>>0>=u>>>0)}else f=0}while(0);A=(B|0)==103;x=(o|0)!=0;u=o-((B|0)!=102?f:0)+((x&A)<<31>>31)|0;if((u|0)<(((s-I>>2)*9|0)+-9|0)){v=u+9216|0;M=(v|0)/9|0;u=C+(M+-1023<<2)|0;v=((v|0)%9|0)+1|0;if((v|0)<9){b=10;do{b=b*10|0;v=v+1|0}while((v|0)!=9)}else b=10;S=l[u>>2]|0;E=(S>>>0)%(b>>>0)|0;if((E|0)==0?(C+(M+-1022<<2)|0)==(s|0):0)b=_;else D=163;do{if((D|0)==163){D=0;g=(((S>>>0)/(b>>>0)|0)&1|0)==0?9007199254740992:9007199254740994;v=(b|0)/2|0;do{if(E>>>0<v>>>0)c=.5;else{if((E|0)==(v|0)?(C+(M+-1022<<2)|0)==(s|0):0){c=1;break}c=1.5}}while(0);do{if(R){if((h[T>>0]|0)!=45)break;g=-g;c=-c}}while(0);v=S-E|0;l[u>>2]=v;if(!(g+c!=g)){b=_;break}B=v+b|0;l[u>>2]=B;if(B>>>0>999999999){f=_;while(1){b=u+-4|0;l[u>>2]=0;if(b>>>0<f>>>0){f=f+-4|0;l[f>>2]=0}B=(l[b>>2]|0)+1|0;l[b>>2]=B;if(B>>>0>999999999)u=b;else{_=f;u=b;break}}}f=(I-_>>2)*9|0;v=l[_>>2]|0;if(v>>>0<10){b=_;break}else b=10;do{b=b*10|0;f=f+1|0}while(v>>>0>=b>>>0);b=_}}while(0);B=u+4|0;_=b;s=s>>>0>B>>>0?B:s}E=0-f|0;while(1){if(s>>>0<=_>>>0){M=0;B=s;break}u=s+-4|0;if(!(l[u>>2]|0))s=u;else{M=1;B=s;break}}do{if(A){o=(x&1^1)+o|0;if((o|0)>(f|0)&(f|0)>-5){y=y+-1|0;o=o+-1-f|0}else{y=y+-2|0;o=o+-1|0}s=P&8;if(s)break;do{if(M){s=l[B+-4>>2]|0;if(!s){u=9;break}if(!((s>>>0)%10|0)){b=10;u=0}else{u=0;break}do{b=b*10|0;u=u+1|0}while(((s>>>0)%(b>>>0)|0|0)==0)}else u=9}while(0);s=((B-I>>2)*9|0)+-9|0;if((y|32|0)==102){s=s-u|0;s=(s|0)<0?0:s;o=(o|0)<(s|0)?o:s;s=0;break}else{s=s+f-u|0;s=(s|0)<0?0:s;o=(o|0)<(s|0)?o:s;s=0;break}}else s=P&8}while(0);S=o|s;b=(S|0)!=0&1;v=(y|32|0)==102;if(v){f=(f|0)>0?f:0;y=0}else{u=(f|0)<0?E:f;u=Or(u,((u|0)<0)<<31>>31,W)|0;if((Q-u|0)<2)do{u=u+-1|0;h[u>>0]=48}while((Q-u|0)<2);h[u+-1>>0]=(f>>31&2)+43;I=u+-2|0;h[I>>0]=y;f=Q-I|0;y=I}E=R+1+o+b+f|0;Nr(e,32,j,E,P);if(!(l[e>>2]&32))mr(T,R,e)|0;Nr(e,48,j,E,P^65536);do{if(v){u=_>>>0>C>>>0?C:_;f=u;do{s=Or(l[f>>2]|0,0,K)|0;do{if((f|0)==(u|0)){if((s|0)!=(K|0))break;h[H>>0]=48;s=H}else{if(s>>>0<=re>>>0)break;do{s=s+-1|0;h[s>>0]=48}while(s>>>0>re>>>0)}}while(0);if(!(l[e>>2]&32))mr(s,X-s|0,e)|0;f=f+4|0}while(f>>>0<=C>>>0);do{if(S){if(l[e>>2]&32)break;mr(5891,1,e)|0}}while(0);if((o|0)>0&f>>>0<B>>>0){s=f;while(1){f=Or(l[s>>2]|0,0,K)|0;if(f>>>0>re>>>0)do{f=f+-1|0;h[f>>0]=48}while(f>>>0>re>>>0);if(!(l[e>>2]&32))mr(f,(o|0)>9?9:o,e)|0;s=s+4|0;f=o+-9|0;if(!((o|0)>9&s>>>0<B>>>0)){o=f;break}else o=f}}Nr(e,48,o+9|0,9,0)}else{v=M?B:_+4|0;if((o|0)>-1){b=(s|0)==0;u=_;do{f=Or(l[u>>2]|0,0,K)|0;if((f|0)==(K|0)){h[H>>0]=48;f=H}do{if((u|0)==(_|0)){s=f+1|0;if(!(l[e>>2]&32))mr(f,1,e)|0;if(b&(o|0)<1){f=s;break}if(l[e>>2]&32){f=s;break}mr(5891,1,e)|0;f=s}else{if(f>>>0<=re>>>0)break;do{f=f+-1|0;h[f>>0]=48}while(f>>>0>re>>>0)}}while(0);s=X-f|0;if(!(l[e>>2]&32))mr(f,(o|0)>(s|0)?s:o,e)|0;o=o-s|0;u=u+4|0}while(u>>>0<v>>>0&(o|0)>-1)}Nr(e,48,o+18|0,18,0);if(l[e>>2]&32)break;mr(y,Q-y|0,e)|0}}while(0);Nr(e,32,j,E,P^8192);o=(E|0)<(j|0)?j:E}else{v=(y&32|0)!=0;b=c!=c|0!=0;f=b?0:R;u=f+3|0;Nr(e,32,j,u,s);o=l[e>>2]|0;if(!(o&32)){mr(T,f,e)|0;o=l[e>>2]|0}if(!(o&32))mr(b?v?5883:5887:v?5875:5879,3,e)|0;Nr(e,32,j,u,P^8192);o=(u|0)<(j|0)?j:u}}while(0);_=L;continue e}default:{s=P;f=u;v=0;y=5839;o=O}}}while(0);t:do{if((D|0)==64){s=ee;f=l[s>>2]|0;s=l[s+4>>2]|0;b=y&32;if(!((f|0)==0&(s|0)==0)){o=O;do{o=o+-1|0;h[o>>0]=p[5823+(f&15)>>0]|b;f=Wr(f|0,s|0,4)|0;s=q}while(!((f|0)==0&(s|0)==0));D=ee;if((v&8|0)==0|(l[D>>2]|0)==0&(l[D+4>>2]|0)==0){f=v;v=0;b=5839;D=77}else{f=v;v=2;b=5839+(y>>4)|0;D=77}}else{o=O;f=v;v=0;b=5839;D=77}}else if((D|0)==76){o=Or(o,f,O)|0;f=P;v=s;D=77}else if((D|0)==82){D=0;P=Tr(o,0,u)|0;T=(P|0)==0;_=o;f=T?u:P-o|0;v=0;y=5839;o=T?o+u|0:P}else if((D|0)==86){D=0;f=0;o=0;b=l[ee>>2]|0;while(1){s=l[b>>2]|0;if(!s)break;o=br(ne,s)|0;if((o|0)<0|o>>>0>(u-f|0)>>>0)break;f=o+f|0;if(u>>>0>f>>>0)b=b+4|0;else break}if((o|0)<0){a=-1;break e}Nr(e,32,j,f,P);if(!f){o=0;D=98}else{s=0;u=l[ee>>2]|0;while(1){o=l[u>>2]|0;if(!o){o=f;D=98;break t}o=br(ne,o)|0;s=o+s|0;if((s|0)>(f|0)){o=f;D=98;break t}if(!(l[e>>2]&32))mr(ne,o,e)|0;if(s>>>0>=f>>>0){o=f;D=98;break}else u=u+4|0}}}}while(0);if((D|0)==98){D=0;Nr(e,32,j,o,P^8192);_=L;o=(j|0)>(o|0)?j:o;continue}if((D|0)==77){D=0;s=(u|0)>-1?f&-65537:f;f=ee;f=(l[f>>2]|0)!=0|(l[f+4>>2]|0)!=0;if((u|0)!=0|f){f=(f&1^1)+(J-o)|0;_=o;f=(u|0)>(f|0)?u:f;y=b;o=O}else{_=O;f=0;y=b;o=O}}b=o-_|0;f=(f|0)<(b|0)?b:f;u=v+f|0;o=(j|0)<(u|0)?u:j;Nr(e,32,o,u,s);if(!(l[e>>2]&32))mr(y,v,e)|0;Nr(e,48,o,u,s^65536);Nr(e,48,f,b,0);if(!(l[e>>2]&32))mr(_,b,e)|0;Nr(e,32,o,u,s^8192);_=L}e:do{if((D|0)==245)if(!e)if(t){a=1;while(1){t=l[n+(a<<2)>>2]|0;if(!t)break;Ur(i+(a<<3)|0,t,r);a=a+1|0;if((a|0)>=10){a=1;break e}}if((a|0)<10)while(1){if(l[n+(a<<2)>>2]|0){a=-1;break e}a=a+1|0;if((a|0)>=10){a=1;break}}else a=1}else a=0}while(0);w=oe;return a|0}function jr(e){e=e|0;if(!(l[e+68>>2]|0))Mr(e);return}function Dr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=e+20|0;n=l[i>>2]|0;e=(l[e+16>>2]|0)-n|0;e=e>>>0>r>>>0?r:e;Qr(n|0,t|0,e|0)|0;l[i>>2]=(l[i>>2]|0)+e;return r|0}function Ur(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0;e:do{if(t>>>0<=20)do{switch(t|0){case 9:{i=(l[r>>2]|0)+(4-1)&~(4-1);t=l[i>>2]|0;l[r>>2]=i+4;l[e>>2]=t;break e}case 10:{i=(l[r>>2]|0)+(4-1)&~(4-1);t=l[i>>2]|0;l[r>>2]=i+4;i=e;l[i>>2]=t;l[i+4>>2]=((t|0)<0)<<31>>31;break e}case 11:{i=(l[r>>2]|0)+(4-1)&~(4-1);t=l[i>>2]|0;l[r>>2]=i+4;i=e;l[i>>2]=t;l[i+4>>2]=0;break e}case 12:{i=(l[r>>2]|0)+(8-1)&~(8-1);t=i;n=l[t>>2]|0;t=l[t+4>>2]|0;l[r>>2]=i+8;i=e;l[i>>2]=n;l[i+4>>2]=t;break e}case 13:{n=(l[r>>2]|0)+(4-1)&~(4-1);i=l[n>>2]|0;l[r>>2]=n+4;i=(i&65535)<<16>>16;n=e;l[n>>2]=i;l[n+4>>2]=((i|0)<0)<<31>>31;break e}case 14:{n=(l[r>>2]|0)+(4-1)&~(4-1);i=l[n>>2]|0;l[r>>2]=n+4;n=e;l[n>>2]=i&65535;l[n+4>>2]=0;break e}case 15:{n=(l[r>>2]|0)+(4-1)&~(4-1);i=l[n>>2]|0;l[r>>2]=n+4;i=(i&255)<<24>>24;n=e;l[n>>2]=i;l[n+4>>2]=((i|0)<0)<<31>>31;break e}case 16:{n=(l[r>>2]|0)+(4-1)&~(4-1);i=l[n>>2]|0;l[r>>2]=n+4;n=e;l[n>>2]=i&255;l[n+4>>2]=0;break e}case 17:{n=(l[r>>2]|0)+(8-1)&~(8-1);a=+m[n>>3];l[r>>2]=n+8;m[e>>3]=a;break e}case 18:{n=(l[r>>2]|0)+(8-1)&~(8-1);a=+m[n>>3];l[r>>2]=n+8;m[e>>3]=a;break e}default:break e}}while(0)}while(0);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(t>>>0>0|(t|0)==0&e>>>0>4294967295)while(1){i=oi(e|0,t|0,10,0)|0;r=r+-1|0;h[r>>0]=i|48;i=ai(e|0,t|0,10,0)|0;if(t>>>0>9|(t|0)==9&e>>>0>4294967295){e=i;t=q}else{e=i;break}}if(e)while(1){r=r+-1|0;h[r>>0]=(e>>>0)%10|0|48;if(e>>>0<10)break;else e=(e>>>0)/10|0}return r|0}function Nr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0;f=w;w=w+256|0;o=f;do{if((r|0)>(i|0)&(n&73728|0)==0){n=r-i|0;Yr(o|0,t|0,(n>>>0>256?256:n)|0)|0;t=l[e>>2]|0;a=(t&32|0)==0;if(n>>>0>255){i=r-i|0;do{if(a){mr(o,256,e)|0;t=l[e>>2]|0}n=n+-256|0;a=(t&32|0)==0}while(n>>>0>255);if(a)n=i&255;else break}else if(!a)break;mr(o,n,e)|0}}while(0);w=f;return}function qr(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0,v=0,y=0,m=0,g=0,w=0,_=0,k=0,S=0,E=0,M=0,A=0,x=0,B=0,I=0,C=0,R=0,T=0,P=0,L=0,j=0,D=0,U=0,O=0;do{if(e>>>0<245){p=e>>>0<11?16:e+11&-8;e=p>>>3;f=l[151]|0;r=f>>>e;if(r&3){e=(r&1^1)+e|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;n=l[i>>2]|0;a=n+8|0;o=l[a>>2]|0;do{if((r|0)!=(o|0)){if(o>>>0<(l[155]|0)>>>0)ze();t=o+12|0;if((l[t>>2]|0)==(n|0)){l[t>>2]=r;l[i>>2]=o;break}else ze()}else l[151]=f&~(1<<e)}while(0);O=e<<3;l[n+4>>2]=O|3;O=n+(O|4)|0;l[O>>2]=l[O>>2]|1;O=a;return O|0}o=l[153]|0;if(p>>>0>o>>>0){if(r){i=2<<e;i=r<<e&(i|0-i);i=(i&0-i)+-1|0;s=i>>>12&16;i=i>>>s;n=i>>>5&8;i=i>>>n;a=i>>>2&4;i=i>>>a;r=i>>>1&2;i=i>>>r;e=i>>>1&1;e=(n|s|a|r|e)+(i>>>e)|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;a=l[i>>2]|0;s=a+8|0;n=l[s>>2]|0;do{if((r|0)!=(n|0)){if(n>>>0<(l[155]|0)>>>0)ze();t=n+12|0;if((l[t>>2]|0)==(a|0)){l[t>>2]=r;l[i>>2]=n;c=l[153]|0;break}else ze()}else{l[151]=f&~(1<<e);c=o}}while(0);O=e<<3;o=O-p|0;l[a+4>>2]=p|3;f=a+p|0;l[a+(p|4)>>2]=o|1;l[a+O>>2]=o;if(c){n=l[156]|0;r=c>>>3;t=r<<1;i=644+(t<<2)|0;e=l[151]|0;r=1<<r;if(e&r){e=644+(t+2<<2)|0;t=l[e>>2]|0;if(t>>>0<(l[155]|0)>>>0)ze();else{u=e;h=t}}else{l[151]=e|r;u=644+(t+2<<2)|0;h=i}l[u>>2]=n;l[h+12>>2]=n;l[n+8>>2]=h;l[n+12>>2]=i}l[153]=o;l[156]=f;O=s;return O|0}e=l[152]|0;if(e){r=(e&0-e)+-1|0;U=r>>>12&16;r=r>>>U;D=r>>>5&8;r=r>>>D;O=r>>>2&4;r=r>>>O;e=r>>>1&2;r=r>>>e;i=r>>>1&1;i=l[908+((D|U|O|e|i)+(r>>>i)<<2)>>2]|0;r=(l[i+4>>2]&-8)-p|0;e=i;while(1){t=l[e+16>>2]|0;if(!t){t=l[e+20>>2]|0;if(!t){s=r;break}}e=(l[t+4>>2]&-8)-p|0;O=e>>>0<r>>>0;r=O?e:r;e=t;i=O?t:i}a=l[155]|0;if(i>>>0<a>>>0)ze();f=i+p|0;if(i>>>0>=f>>>0)ze();o=l[i+24>>2]|0;r=l[i+12>>2]|0;do{if((r|0)==(i|0)){e=i+20|0;t=l[e>>2]|0;if(!t){e=i+16|0;t=l[e>>2]|0;if(!t){d=0;break}}while(1){r=t+20|0;n=l[r>>2]|0;if(n){t=n;e=r;continue}r=t+16|0;n=l[r>>2]|0;if(!n)break;else{t=n;e=r}}if(e>>>0<a>>>0)ze();else{l[e>>2]=0;d=t;break}}else{n=l[i+8>>2]|0;if(n>>>0<a>>>0)ze();t=n+12|0;if((l[t>>2]|0)!=(i|0))ze();e=r+8|0;if((l[e>>2]|0)==(i|0)){l[t>>2]=r;l[e>>2]=n;d=r;break}else ze()}}while(0);do{if(o){t=l[i+28>>2]|0;e=908+(t<<2)|0;if((i|0)==(l[e>>2]|0)){l[e>>2]=d;if(!d){l[152]=l[152]&~(1<<t);break}}else{if(o>>>0<(l[155]|0)>>>0)ze();t=o+16|0;if((l[t>>2]|0)==(i|0))l[t>>2]=d;else l[o+20>>2]=d;if(!d)break}e=l[155]|0;if(d>>>0<e>>>0)ze();l[d+24>>2]=o;t=l[i+16>>2]|0;do{if(t)if(t>>>0<e>>>0)ze();else{l[d+16>>2]=t;l[t+24>>2]=d;break}}while(0);t=l[i+20>>2]|0;if(t)if(t>>>0<(l[155]|0)>>>0)ze();else{l[d+20>>2]=t;l[t+24>>2]=d;break}}}while(0);if(s>>>0<16){O=s+p|0;l[i+4>>2]=O|3;O=i+(O+4)|0;l[O>>2]=l[O>>2]|1}else{l[i+4>>2]=p|3;l[i+(p|4)>>2]=s|1;l[i+(s+p)>>2]=s;t=l[153]|0;if(t){a=l[156]|0;r=t>>>3;t=r<<1;n=644+(t<<2)|0;e=l[151]|0;r=1<<r;if(e&r){t=644+(t+2<<2)|0;e=l[t>>2]|0;if(e>>>0<(l[155]|0)>>>0)ze();else{b=t;v=e}}else{l[151]=e|r;b=644+(t+2<<2)|0;v=n}l[b>>2]=a;l[v+12>>2]=a;l[a+8>>2]=v;l[a+12>>2]=n}l[153]=s;l[156]=f}O=i+8|0;return O|0}else v=p}else v=p}else if(e>>>0<=4294967231){e=e+11|0;h=e&-8;u=l[152]|0;if(u){r=0-h|0;e=e>>>8;if(e)if(h>>>0>16777215)c=31;else{v=(e+1048320|0)>>>16&8;_=e<<v;b=(_+520192|0)>>>16&4;_=_<<b;c=(_+245760|0)>>>16&2;c=14-(b|v|c)+(_<<c>>>15)|0;c=h>>>(c+7|0)&1|c<<1}else c=0;e=l[908+(c<<2)>>2]|0;e:do{if(!e){n=0;e=0;_=86}else{o=r;n=0;f=h<<((c|0)==31?0:25-(c>>>1)|0);s=e;e=0;while(1){a=l[s+4>>2]&-8;r=a-h|0;if(r>>>0<o>>>0)if((a|0)==(h|0)){a=s;e=s;_=90;break e}else e=s;else r=o;_=l[s+20>>2]|0;s=l[s+16+(f>>>31<<2)>>2]|0;n=(_|0)==0|(_|0)==(s|0)?n:_;if(!s){_=86;break}else{o=r;f=f<<1}}}}while(0);if((_|0)==86){if((n|0)==0&(e|0)==0){e=2<<c;e=u&(e|0-e);if(!e){v=h;break}e=(e&0-e)+-1|0;d=e>>>12&16;e=e>>>d;u=e>>>5&8;e=e>>>u;b=e>>>2&4;e=e>>>b;v=e>>>1&2;e=e>>>v;n=e>>>1&1;n=l[908+((u|d|b|v|n)+(e>>>n)<<2)>>2]|0;e=0}if(!n){f=r;s=e}else{a=n;_=90}}if((_|0)==90)while(1){_=0;v=(l[a+4>>2]&-8)-h|0;n=v>>>0<r>>>0;r=n?v:r;e=n?a:e;n=l[a+16>>2]|0;if(n){a=n;_=90;continue}a=l[a+20>>2]|0;if(!a){f=r;s=e;break}else _=90}if((s|0)!=0?f>>>0<((l[153]|0)-h|0)>>>0:0){n=l[155]|0;if(s>>>0<n>>>0)ze();o=s+h|0;if(s>>>0>=o>>>0)ze();a=l[s+24>>2]|0;r=l[s+12>>2]|0;do{if((r|0)==(s|0)){e=s+20|0;t=l[e>>2]|0;if(!t){e=s+16|0;t=l[e>>2]|0;if(!t){p=0;break}}while(1){r=t+20|0;i=l[r>>2]|0;if(i){t=i;e=r;continue}r=t+16|0;i=l[r>>2]|0;if(!i)break;else{t=i;e=r}}if(e>>>0<n>>>0)ze();else{l[e>>2]=0;p=t;break}}else{i=l[s+8>>2]|0;if(i>>>0<n>>>0)ze();t=i+12|0;if((l[t>>2]|0)!=(s|0))ze();e=r+8|0;if((l[e>>2]|0)==(s|0)){l[t>>2]=r;l[e>>2]=i;p=r;break}else ze()}}while(0);do{if(a){t=l[s+28>>2]|0;e=908+(t<<2)|0;if((s|0)==(l[e>>2]|0)){l[e>>2]=p;if(!p){l[152]=l[152]&~(1<<t);break}}else{if(a>>>0<(l[155]|0)>>>0)ze();t=a+16|0;if((l[t>>2]|0)==(s|0))l[t>>2]=p;else l[a+20>>2]=p;if(!p)break}e=l[155]|0;if(p>>>0<e>>>0)ze();l[p+24>>2]=a;t=l[s+16>>2]|0;do{if(t)if(t>>>0<e>>>0)ze();else{l[p+16>>2]=t;l[t+24>>2]=p;break}}while(0);t=l[s+20>>2]|0;if(t)if(t>>>0<(l[155]|0)>>>0)ze();else{l[p+20>>2]=t;l[t+24>>2]=p;break}}}while(0);e:do{if(f>>>0>=16){l[s+4>>2]=h|3;l[s+(h|4)>>2]=f|1;l[s+(f+h)>>2]=f;t=f>>>3;if(f>>>0<256){e=t<<1;i=644+(e<<2)|0;r=l[151]|0;t=1<<t;if(r&t){t=644+(e+2<<2)|0;e=l[t>>2]|0;if(e>>>0<(l[155]|0)>>>0)ze();else{m=t;g=e}}else{l[151]=r|t;m=644+(e+2<<2)|0;g=i}l[m>>2]=o;l[g+12>>2]=o;l[s+(h+8)>>2]=g;l[s+(h+12)>>2]=i;break}t=f>>>8;if(t)if(f>>>0>16777215)i=31;else{U=(t+1048320|0)>>>16&8;O=t<<U;D=(O+520192|0)>>>16&4;O=O<<D;i=(O+245760|0)>>>16&2;i=14-(D|U|i)+(O<<i>>>15)|0;i=f>>>(i+7|0)&1|i<<1}else i=0;t=908+(i<<2)|0;l[s+(h+28)>>2]=i;l[s+(h+20)>>2]=0;l[s+(h+16)>>2]=0;e=l[152]|0;r=1<<i;if(!(e&r)){l[152]=e|r;l[t>>2]=o;l[s+(h+24)>>2]=t;l[s+(h+12)>>2]=o;l[s+(h+8)>>2]=o;break}t=l[t>>2]|0;t:do{if((l[t+4>>2]&-8|0)!=(f|0)){i=f<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=l[e>>2]|0;if(!r)break;if((l[r+4>>2]&-8|0)==(f|0)){E=r;break t}else{i=i<<1;t=r}}if(e>>>0<(l[155]|0)>>>0)ze();else{l[e>>2]=o;l[s+(h+24)>>2]=t;l[s+(h+12)>>2]=o;l[s+(h+8)>>2]=o;break e}}else E=t}while(0);t=E+8|0;e=l[t>>2]|0;O=l[155]|0;if(e>>>0>=O>>>0&E>>>0>=O>>>0){l[e+12>>2]=o;l[t>>2]=o;l[s+(h+8)>>2]=e;l[s+(h+12)>>2]=E;l[s+(h+24)>>2]=0;break}else ze()}else{O=f+h|0;l[s+4>>2]=O|3;O=s+(O+4)|0;l[O>>2]=l[O>>2]|1}}while(0);O=s+8|0;return O|0}else v=h}else v=h}else v=-1}while(0);r=l[153]|0;if(r>>>0>=v>>>0){t=r-v|0;e=l[156]|0;if(t>>>0>15){l[156]=e+v;l[153]=t;l[e+(v+4)>>2]=t|1;l[e+r>>2]=t;l[e+4>>2]=v|3}else{l[153]=0;l[156]=0;l[e+4>>2]=r|3;O=e+(r+4)|0;l[O>>2]=l[O>>2]|1}O=e+8|0;return O|0}e=l[154]|0;if(e>>>0>v>>>0){U=e-v|0;l[154]=U;O=l[157]|0;l[157]=O+v;l[O+(v+4)>>2]=U|1;l[O+4>>2]=v|3;O=O+8|0;return O|0}do{if(!(l[269]|0)){e=Pe(30)|0;if(!(e+-1&e)){l[271]=e;l[270]=e;l[272]=-1;l[273]=-1;l[274]=0;l[262]=0;E=(Xe(0)|0)&-16^1431655768;l[269]=E;break}else ze()}}while(0);s=v+48|0;f=l[271]|0;c=v+47|0;o=f+c|0;f=0-f|0;u=o&f;if(u>>>0<=v>>>0){O=0;return O|0}e=l[261]|0;if((e|0)!=0?(g=l[259]|0,E=g+u|0,E>>>0<=g>>>0|E>>>0>e>>>0):0){O=0;return O|0}e:do{if(!(l[262]&4)){e=l[157]|0;t:do{if(e){n=1052;while(1){r=l[n>>2]|0;if(r>>>0<=e>>>0?(y=n+4|0,(r+(l[y>>2]|0)|0)>>>0>e>>>0):0){a=n;e=y;break}n=l[n+8>>2]|0;if(!n){_=174;break t}}r=o-(l[154]|0)&f;if(r>>>0<2147483647){n=Ce(r|0)|0;E=(n|0)==((l[a>>2]|0)+(l[e>>2]|0)|0);e=E?r:0;if(E){if((n|0)!=(-1|0)){k=n;b=e;_=194;break e}}else _=184}else e=0}else _=174}while(0);do{if((_|0)==174){a=Ce(0)|0;if((a|0)!=(-1|0)){e=a;r=l[270]|0;n=r+-1|0;if(!(n&e))r=u;else r=u-e+(n+e&0-r)|0;e=l[259]|0;n=e+r|0;if(r>>>0>v>>>0&r>>>0<2147483647){E=l[261]|0;if((E|0)!=0?n>>>0<=e>>>0|n>>>0>E>>>0:0){e=0;break}n=Ce(r|0)|0;E=(n|0)==(a|0);e=E?r:0;if(E){k=a;b=e;_=194;break e}else _=184}else e=0}else e=0}}while(0);t:do{if((_|0)==184){a=0-r|0;do{if(s>>>0>r>>>0&(r>>>0<2147483647&(n|0)!=(-1|0))?(w=l[271]|0,w=c-r+w&0-w,w>>>0<2147483647):0)if((Ce(w|0)|0)==(-1|0)){Ce(a|0)|0;break t}else{r=w+r|0;break}}while(0);if((n|0)!=(-1|0)){k=n;b=r;_=194;break e}}}while(0);l[262]=l[262]|4;_=191}else{e=0;_=191}}while(0);if((((_|0)==191?u>>>0<2147483647:0)?(k=Ce(u|0)|0,S=Ce(0)|0,k>>>0<S>>>0&((k|0)!=(-1|0)&(S|0)!=(-1|0))):0)?(M=S-k|0,A=M>>>0>(v+40|0)>>>0,A):0){b=A?M:e;_=194}if((_|0)==194){e=(l[259]|0)+b|0;l[259]=e;if(e>>>0>(l[260]|0)>>>0)l[260]=e;o=l[157]|0;e:do{if(o){a=1052;do{e=l[a>>2]|0;r=a+4|0;n=l[r>>2]|0;if((k|0)==(e+n|0)){x=e;B=r;I=n;C=a;_=204;break}a=l[a+8>>2]|0}while((a|0)!=0);if(((_|0)==204?(l[C+12>>2]&8|0)==0:0)?o>>>0<k>>>0&o>>>0>=x>>>0:0){l[B>>2]=I+b;O=(l[154]|0)+b|0;U=o+8|0;U=(U&7|0)==0?0:0-U&7;D=O-U|0;l[157]=o+U;l[154]=D;l[o+(U+4)>>2]=D|1;l[o+(O+4)>>2]=40;l[158]=l[273];break}e=l[155]|0;if(k>>>0<e>>>0){l[155]=k;e=k}r=k+b|0;a=1052;while(1){if((l[a>>2]|0)==(r|0)){n=a;r=a;_=212;break}a=l[a+8>>2]|0;if(!a){r=1052;break}}if((_|0)==212)if(!(l[r+12>>2]&8)){l[n>>2]=k;d=r+4|0;l[d>>2]=(l[d>>2]|0)+b;d=k+8|0;d=(d&7|0)==0?0:0-d&7;c=k+(b+8)|0;c=(c&7|0)==0?0:0-c&7;t=k+(c+b)|0;h=d+v|0;p=k+h|0;u=t-(k+d)-v|0;l[k+(d+4)>>2]=v|3;t:do{if((t|0)!=(o|0)){if((t|0)==(l[156]|0)){O=(l[153]|0)+u|0;l[153]=O;l[156]=p;l[k+(h+4)>>2]=O|1;l[k+(O+h)>>2]=O;break}f=b+4|0;r=l[k+(f+c)>>2]|0;if((r&3|0)==1){s=r&-8;a=r>>>3;r:do{if(r>>>0>=256){o=l[k+((c|24)+b)>>2]|0;i=l[k+(b+12+c)>>2]|0;do{if((i|0)==(t|0)){n=c|16;i=k+(f+n)|0;r=l[i>>2]|0;if(!r){i=k+(n+b)|0;r=l[i>>2]|0;if(!r){j=0;break}}while(1){n=r+20|0;a=l[n>>2]|0;if(a){r=a;i=n;continue}n=r+16|0;a=l[n>>2]|0;if(!a)break;else{r=a;i=n}}if(i>>>0<e>>>0)ze();else{l[i>>2]=0;j=r;break}}else{n=l[k+((c|8)+b)>>2]|0;if(n>>>0<e>>>0)ze();e=n+12|0;if((l[e>>2]|0)!=(t|0))ze();r=i+8|0;if((l[r>>2]|0)==(t|0)){l[e>>2]=i;l[r>>2]=n;j=i;break}else ze()}}while(0);if(!o)break;e=l[k+(b+28+c)>>2]|0;r=908+(e<<2)|0;do{if((t|0)!=(l[r>>2]|0)){if(o>>>0<(l[155]|0)>>>0)ze();e=o+16|0;if((l[e>>2]|0)==(t|0))l[e>>2]=j;else l[o+20>>2]=j;if(!j)break r}else{l[r>>2]=j;if(j)break;l[152]=l[152]&~(1<<e);break r}}while(0);r=l[155]|0;if(j>>>0<r>>>0)ze();l[j+24>>2]=o;t=c|16;e=l[k+(t+b)>>2]|0;do{if(e)if(e>>>0<r>>>0)ze();else{l[j+16>>2]=e;l[e+24>>2]=j;break}}while(0);t=l[k+(f+t)>>2]|0;if(!t)break;if(t>>>0<(l[155]|0)>>>0)ze();else{l[j+20>>2]=t;l[t+24>>2]=j;break}}else{i=l[k+((c|8)+b)>>2]|0;n=l[k+(b+12+c)>>2]|0;r=644+(a<<1<<2)|0;do{if((i|0)!=(r|0)){if(i>>>0<e>>>0)ze();if((l[i+12>>2]|0)==(t|0))break;ze()}}while(0);if((n|0)==(i|0)){l[151]=l[151]&~(1<<a);break}do{if((n|0)==(r|0))R=n+8|0;else{if(n>>>0<e>>>0)ze();e=n+8|0;if((l[e>>2]|0)==(t|0)){R=e;break}ze()}}while(0);l[i+12>>2]=n;l[R>>2]=i}}while(0);t=k+((s|c)+b)|0;n=s+u|0}else n=u;t=t+4|0;l[t>>2]=l[t>>2]&-2;l[k+(h+4)>>2]=n|1;l[k+(n+h)>>2]=n;t=n>>>3;if(n>>>0<256){e=t<<1;i=644+(e<<2)|0;r=l[151]|0;t=1<<t;do{if(!(r&t)){l[151]=r|t;D=644+(e+2<<2)|0;U=i}else{t=644+(e+2<<2)|0;e=l[t>>2]|0;if(e>>>0>=(l[155]|0)>>>0){D=t;U=e;break}ze()}}while(0);l[D>>2]=p;l[U+12>>2]=p;l[k+(h+8)>>2]=U;l[k+(h+12)>>2]=i;break}t=n>>>8;do{if(!t)i=0;else{if(n>>>0>16777215){i=31;break}D=(t+1048320|0)>>>16&8;U=t<<D;j=(U+520192|0)>>>16&4;U=U<<j;i=(U+245760|0)>>>16&2;i=14-(j|D|i)+(U<<i>>>15)|0;i=n>>>(i+7|0)&1|i<<1}}while(0);t=908+(i<<2)|0;l[k+(h+28)>>2]=i;l[k+(h+20)>>2]=0;l[k+(h+16)>>2]=0;e=l[152]|0;r=1<<i;if(!(e&r)){l[152]=e|r;l[t>>2]=p;l[k+(h+24)>>2]=t;l[k+(h+12)>>2]=p;l[k+(h+8)>>2]=p;break}t=l[t>>2]|0;r:do{if((l[t+4>>2]&-8|0)!=(n|0)){i=n<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=l[e>>2]|0;if(!r)break;if((l[r+4>>2]&-8|0)==(n|0)){O=r;break r}else{i=i<<1;t=r}}if(e>>>0<(l[155]|0)>>>0)ze();else{l[e>>2]=p;l[k+(h+24)>>2]=t;l[k+(h+12)>>2]=p;l[k+(h+8)>>2]=p;break t}}else O=t}while(0);t=O+8|0;e=l[t>>2]|0;U=l[155]|0;if(e>>>0>=U>>>0&O>>>0>=U>>>0){l[e+12>>2]=p;l[t>>2]=p;l[k+(h+8)>>2]=e;l[k+(h+12)>>2]=O;l[k+(h+24)>>2]=0;break}else ze()}else{O=(l[154]|0)+u|0;l[154]=O;l[157]=p;l[k+(h+4)>>2]=O|1}}while(0);O=k+(d|8)|0;return O|0}else r=1052;while(1){e=l[r>>2]|0;if(e>>>0<=o>>>0?(t=l[r+4>>2]|0,i=e+t|0,i>>>0>o>>>0):0)break;r=l[r+8>>2]|0}n=e+(t+-39)|0;e=e+(t+-47+((n&7|0)==0?0:0-n&7))|0;n=o+16|0;e=e>>>0<n>>>0?o:e;t=e+8|0;r=k+8|0;r=(r&7|0)==0?0:0-r&7;O=b+-40-r|0;l[157]=k+r;l[154]=O;l[k+(r+4)>>2]=O|1;l[k+(b+-36)>>2]=40;l[158]=l[273];r=e+4|0;l[r>>2]=27;l[t>>2]=l[263];l[t+4>>2]=l[264];l[t+8>>2]=l[265];l[t+12>>2]=l[266];l[263]=k;l[264]=b;l[266]=0;l[265]=t;t=e+28|0;l[t>>2]=7;if((e+32|0)>>>0<i>>>0)do{O=t;t=t+4|0;l[t>>2]=7}while((O+8|0)>>>0<i>>>0);if((e|0)!=(o|0)){a=e-o|0;l[r>>2]=l[r>>2]&-2;l[o+4>>2]=a|1;l[e>>2]=a;t=a>>>3;if(a>>>0<256){e=t<<1;i=644+(e<<2)|0;r=l[151]|0;t=1<<t;if(r&t){t=644+(e+2<<2)|0;e=l[t>>2]|0;if(e>>>0<(l[155]|0)>>>0)ze();else{T=t;P=e}}else{l[151]=r|t;T=644+(e+2<<2)|0;P=i}l[T>>2]=o;l[P+12>>2]=o;l[o+8>>2]=P;l[o+12>>2]=i;break}t=a>>>8;if(t)if(a>>>0>16777215)i=31;else{U=(t+1048320|0)>>>16&8;O=t<<U;D=(O+520192|0)>>>16&4;O=O<<D;i=(O+245760|0)>>>16&2;i=14-(D|U|i)+(O<<i>>>15)|0;i=a>>>(i+7|0)&1|i<<1}else i=0;r=908+(i<<2)|0;l[o+28>>2]=i;l[o+20>>2]=0;l[n>>2]=0;t=l[152]|0;e=1<<i;if(!(t&e)){l[152]=t|e;l[r>>2]=o;l[o+24>>2]=r;l[o+12>>2]=o;l[o+8>>2]=o;break}t=l[r>>2]|0;t:do{if((l[t+4>>2]&-8|0)!=(a|0)){i=a<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=l[e>>2]|0;if(!r)break;if((l[r+4>>2]&-8|0)==(a|0)){L=r;break t}else{i=i<<1;t=r}}if(e>>>0<(l[155]|0)>>>0)ze();else{l[e>>2]=o;l[o+24>>2]=t;l[o+12>>2]=o;l[o+8>>2]=o;break e}}else L=t}while(0);t=L+8|0;e=l[t>>2]|0;O=l[155]|0;if(e>>>0>=O>>>0&L>>>0>=O>>>0){l[e+12>>2]=o;l[t>>2]=o;l[o+8>>2]=e;l[o+12>>2]=L;l[o+24>>2]=0;break}else ze()}}else{O=l[155]|0;if((O|0)==0|k>>>0<O>>>0)l[155]=k;l[263]=k;l[264]=b;l[266]=0;l[160]=l[269];l[159]=-1;t=0;do{O=t<<1;U=644+(O<<2)|0;l[644+(O+3<<2)>>2]=U;l[644+(O+2<<2)>>2]=U;t=t+1|0}while((t|0)!=32);O=k+8|0;O=(O&7|0)==0?0:0-O&7;U=b+-40-O|0;l[157]=k+O;l[154]=U;l[k+(O+4)>>2]=U|1;l[k+(b+-36)>>2]=40;l[158]=l[273]}}while(0);t=l[154]|0;if(t>>>0>v>>>0){U=t-v|0;l[154]=U;O=l[157]|0;l[157]=O+v;l[O+(v+4)>>2]=U|1;l[O+4>>2]=v|3;O=O+8|0;return O|0}}O=ur()|0;l[O>>2]=12;O=0;return O|0}function Fr(e){e=e|0;var t=0,r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0,v=0,y=0,m=0,g=0,w=0;if(!e)return;t=e+-8|0;f=l[155]|0;if(t>>>0<f>>>0)ze();r=l[e+-4>>2]|0;i=r&3;if((i|0)==1)ze();p=r&-8;v=e+(p+-8)|0;do{if(!(r&1)){t=l[t>>2]|0;if(!i)return;s=-8-t|0;u=e+s|0;h=t+p|0;if(u>>>0<f>>>0)ze();if((u|0)==(l[156]|0)){t=e+(p+-4)|0;r=l[t>>2]|0;if((r&3|0)!=3){w=u;a=h;break}l[153]=h;l[t>>2]=r&-2;l[e+(s+4)>>2]=h|1;l[v>>2]=h;return}n=t>>>3;if(t>>>0<256){i=l[e+(s+8)>>2]|0;r=l[e+(s+12)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<f>>>0)ze();if((l[i+12>>2]|0)!=(u|0))ze()}if((r|0)==(i|0)){l[151]=l[151]&~(1<<n);w=u;a=h;break}if((r|0)!=(t|0)){if(r>>>0<f>>>0)ze();t=r+8|0;if((l[t>>2]|0)==(u|0))o=t;else ze()}else o=r+8|0;l[i+12>>2]=r;l[o>>2]=i;w=u;a=h;break}o=l[e+(s+24)>>2]|0;i=l[e+(s+12)>>2]|0;do{if((i|0)==(u|0)){r=e+(s+20)|0;t=l[r>>2]|0;if(!t){r=e+(s+16)|0;t=l[r>>2]|0;if(!t){c=0;break}}while(1){i=t+20|0;n=l[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=l[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<f>>>0)ze();else{l[r>>2]=0;c=t;break}}else{n=l[e+(s+8)>>2]|0;if(n>>>0<f>>>0)ze();t=n+12|0;if((l[t>>2]|0)!=(u|0))ze();r=i+8|0;if((l[r>>2]|0)==(u|0)){l[t>>2]=i;l[r>>2]=n;c=i;break}else ze()}}while(0);if(o){t=l[e+(s+28)>>2]|0;r=908+(t<<2)|0;if((u|0)==(l[r>>2]|0)){l[r>>2]=c;if(!c){l[152]=l[152]&~(1<<t);w=u;a=h;break}}else{if(o>>>0<(l[155]|0)>>>0)ze();t=o+16|0;if((l[t>>2]|0)==(u|0))l[t>>2]=c;else l[o+20>>2]=c;if(!c){w=u;a=h;break}}r=l[155]|0;if(c>>>0<r>>>0)ze();l[c+24>>2]=o;t=l[e+(s+16)>>2]|0;do{if(t)if(t>>>0<r>>>0)ze();else{l[c+16>>2]=t;l[t+24>>2]=c;break}}while(0);t=l[e+(s+20)>>2]|0;if(t)if(t>>>0<(l[155]|0)>>>0)ze();else{l[c+20>>2]=t;l[t+24>>2]=c;w=u;a=h;break}else{w=u;a=h}}else{w=u;a=h}}else{w=t;a=p}}while(0);if(w>>>0>=v>>>0)ze();t=e+(p+-4)|0;r=l[t>>2]|0;if(!(r&1))ze();if(!(r&2)){if((v|0)==(l[157]|0)){g=(l[154]|0)+a|0;l[154]=g;l[157]=w;l[w+4>>2]=g|1;if((w|0)!=(l[156]|0))return;l[156]=0;l[153]=0;return}if((v|0)==(l[156]|0)){g=(l[153]|0)+a|0;l[153]=g;l[156]=w;l[w+4>>2]=g|1;l[w+g>>2]=g;return}a=(r&-8)+a|0;n=r>>>3;do{if(r>>>0>=256){o=l[e+(p+16)>>2]|0;t=l[e+(p|4)>>2]|0;do{if((t|0)==(v|0)){r=e+(p+12)|0;t=l[r>>2]|0;if(!t){r=e+(p+8)|0;t=l[r>>2]|0;if(!t){b=0;break}}while(1){i=t+20|0;n=l[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=l[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<(l[155]|0)>>>0)ze();else{l[r>>2]=0;b=t;break}}else{r=l[e+p>>2]|0;if(r>>>0<(l[155]|0)>>>0)ze();i=r+12|0;if((l[i>>2]|0)!=(v|0))ze();n=t+8|0;if((l[n>>2]|0)==(v|0)){l[i>>2]=t;l[n>>2]=r;b=t;break}else ze()}}while(0);if(o){t=l[e+(p+20)>>2]|0;r=908+(t<<2)|0;if((v|0)==(l[r>>2]|0)){l[r>>2]=b;if(!b){l[152]=l[152]&~(1<<t);break}}else{
|
|
if(o>>>0<(l[155]|0)>>>0)ze();t=o+16|0;if((l[t>>2]|0)==(v|0))l[t>>2]=b;else l[o+20>>2]=b;if(!b)break}r=l[155]|0;if(b>>>0<r>>>0)ze();l[b+24>>2]=o;t=l[e+(p+8)>>2]|0;do{if(t)if(t>>>0<r>>>0)ze();else{l[b+16>>2]=t;l[t+24>>2]=b;break}}while(0);t=l[e+(p+12)>>2]|0;if(t)if(t>>>0<(l[155]|0)>>>0)ze();else{l[b+20>>2]=t;l[t+24>>2]=b;break}}}else{i=l[e+p>>2]|0;r=l[e+(p|4)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<(l[155]|0)>>>0)ze();if((l[i+12>>2]|0)!=(v|0))ze()}if((r|0)==(i|0)){l[151]=l[151]&~(1<<n);break}if((r|0)!=(t|0)){if(r>>>0<(l[155]|0)>>>0)ze();t=r+8|0;if((l[t>>2]|0)==(v|0))d=t;else ze()}else d=r+8|0;l[i+12>>2]=r;l[d>>2]=i}}while(0);l[w+4>>2]=a|1;l[w+a>>2]=a;if((w|0)==(l[156]|0)){l[153]=a;return}}else{l[t>>2]=r&-2;l[w+4>>2]=a|1;l[w+a>>2]=a}t=a>>>3;if(a>>>0<256){r=t<<1;n=644+(r<<2)|0;i=l[151]|0;t=1<<t;if(i&t){t=644+(r+2<<2)|0;r=l[t>>2]|0;if(r>>>0<(l[155]|0)>>>0)ze();else{y=t;m=r}}else{l[151]=i|t;y=644+(r+2<<2)|0;m=n}l[y>>2]=w;l[m+12>>2]=w;l[w+8>>2]=m;l[w+12>>2]=n;return}t=a>>>8;if(t)if(a>>>0>16777215)n=31;else{y=(t+1048320|0)>>>16&8;m=t<<y;v=(m+520192|0)>>>16&4;m=m<<v;n=(m+245760|0)>>>16&2;n=14-(v|y|n)+(m<<n>>>15)|0;n=a>>>(n+7|0)&1|n<<1}else n=0;t=908+(n<<2)|0;l[w+28>>2]=n;l[w+20>>2]=0;l[w+16>>2]=0;r=l[152]|0;i=1<<n;e:do{if(r&i){t=l[t>>2]|0;t:do{if((l[t+4>>2]&-8|0)!=(a|0)){n=a<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=t+16+(n>>>31<<2)|0;i=l[r>>2]|0;if(!i)break;if((l[i+4>>2]&-8|0)==(a|0)){g=i;break t}else{n=n<<1;t=i}}if(r>>>0<(l[155]|0)>>>0)ze();else{l[r>>2]=w;l[w+24>>2]=t;l[w+12>>2]=w;l[w+8>>2]=w;break e}}else g=t}while(0);t=g+8|0;r=l[t>>2]|0;m=l[155]|0;if(r>>>0>=m>>>0&g>>>0>=m>>>0){l[r+12>>2]=w;l[t>>2]=w;l[w+8>>2]=r;l[w+12>>2]=g;l[w+24>>2]=0;break}else ze()}else{l[152]=r|i;l[t>>2]=w;l[w+24>>2]=t;l[w+12>>2]=w;l[w+8>>2]=w}}while(0);w=(l[159]|0)+-1|0;l[159]=w;if(!w)t=1060;else return;while(1){t=l[t>>2]|0;if(!t)break;else t=t+8|0}l[159]=-1;return}function zr(e,t){e=e|0;t=t|0;var r=0,i=0;if(!e){e=qr(t)|0;return e|0}if(t>>>0>4294967231){e=ur()|0;l[e>>2]=12;e=0;return e|0}r=Xr(e+-8|0,t>>>0<11?16:t+11&-8)|0;if(r){e=r+8|0;return e|0}r=qr(t)|0;if(!r){e=0;return e|0}i=l[e+-4>>2]|0;i=(i&-8)-((i&3|0)==0?8:4)|0;Qr(r|0,e|0,(i>>>0<t>>>0?i:t)|0)|0;Fr(e);e=r;return e|0}function Kr(e){e=e|0;var t=0;if(!e){t=0;return t|0}e=l[e+-4>>2]|0;t=e&3;if((t|0)==1){t=0;return t|0}t=(e&-8)-((t|0)==0?8:4)|0;return t|0}function Xr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0;p=e+4|0;b=l[p>>2]|0;s=b&-8;u=e+s|0;f=l[155]|0;r=b&3;if(!((r|0)!=1&e>>>0>=f>>>0&e>>>0<u>>>0))ze();i=e+(s|4)|0;n=l[i>>2]|0;if(!(n&1))ze();if(!r){if(t>>>0<256){e=0;return e|0}if(s>>>0>=(t+4|0)>>>0?(s-t|0)>>>0<=l[271]<<1>>>0:0)return e|0;e=0;return e|0}if(s>>>0>=t>>>0){r=s-t|0;if(r>>>0<=15)return e|0;l[p>>2]=b&1|t|2;l[e+(t+4)>>2]=r|3;l[i>>2]=l[i>>2]|1;Hr(e+t|0,r);return e|0}if((u|0)==(l[157]|0)){r=(l[154]|0)+s|0;if(r>>>0<=t>>>0){e=0;return e|0}d=r-t|0;l[p>>2]=b&1|t|2;l[e+(t+4)>>2]=d|1;l[157]=e+t;l[154]=d;return e|0}if((u|0)==(l[156]|0)){i=(l[153]|0)+s|0;if(i>>>0<t>>>0){e=0;return e|0}r=i-t|0;if(r>>>0>15){l[p>>2]=b&1|t|2;l[e+(t+4)>>2]=r|1;l[e+i>>2]=r;i=e+(i+4)|0;l[i>>2]=l[i>>2]&-2;i=e+t|0}else{l[p>>2]=b&1|i|2;i=e+(i+4)|0;l[i>>2]=l[i>>2]|1;i=0;r=0}l[153]=r;l[156]=i;return e|0}if(n&2){e=0;return e|0}h=(n&-8)+s|0;if(h>>>0<t>>>0){e=0;return e|0}d=h-t|0;a=n>>>3;do{if(n>>>0>=256){o=l[e+(s+24)>>2]|0;a=l[e+(s+12)>>2]|0;do{if((a|0)==(u|0)){i=e+(s+20)|0;r=l[i>>2]|0;if(!r){i=e+(s+16)|0;r=l[i>>2]|0;if(!r){c=0;break}}while(1){n=r+20|0;a=l[n>>2]|0;if(a){r=a;i=n;continue}n=r+16|0;a=l[n>>2]|0;if(!a)break;else{r=a;i=n}}if(i>>>0<f>>>0)ze();else{l[i>>2]=0;c=r;break}}else{n=l[e+(s+8)>>2]|0;if(n>>>0<f>>>0)ze();r=n+12|0;if((l[r>>2]|0)!=(u|0))ze();i=a+8|0;if((l[i>>2]|0)==(u|0)){l[r>>2]=a;l[i>>2]=n;c=a;break}else ze()}}while(0);if(o){r=l[e+(s+28)>>2]|0;i=908+(r<<2)|0;if((u|0)==(l[i>>2]|0)){l[i>>2]=c;if(!c){l[152]=l[152]&~(1<<r);break}}else{if(o>>>0<(l[155]|0)>>>0)ze();r=o+16|0;if((l[r>>2]|0)==(u|0))l[r>>2]=c;else l[o+20>>2]=c;if(!c)break}i=l[155]|0;if(c>>>0<i>>>0)ze();l[c+24>>2]=o;r=l[e+(s+16)>>2]|0;do{if(r)if(r>>>0<i>>>0)ze();else{l[c+16>>2]=r;l[r+24>>2]=c;break}}while(0);r=l[e+(s+20)>>2]|0;if(r)if(r>>>0<(l[155]|0)>>>0)ze();else{l[c+20>>2]=r;l[r+24>>2]=c;break}}}else{n=l[e+(s+8)>>2]|0;i=l[e+(s+12)>>2]|0;r=644+(a<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<f>>>0)ze();if((l[n+12>>2]|0)!=(u|0))ze()}if((i|0)==(n|0)){l[151]=l[151]&~(1<<a);break}if((i|0)!=(r|0)){if(i>>>0<f>>>0)ze();r=i+8|0;if((l[r>>2]|0)==(u|0))o=r;else ze()}else o=i+8|0;l[n+12>>2]=i;l[o>>2]=n}}while(0);if(d>>>0<16){l[p>>2]=h|b&1|2;t=e+(h|4)|0;l[t>>2]=l[t>>2]|1;return e|0}else{l[p>>2]=b&1|t|2;l[e+(t+4)>>2]=d|3;b=e+(h|4)|0;l[b>>2]=l[b>>2]|1;Hr(e+t|0,d);return e|0}return 0}function Hr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0,v=0,y=0,m=0,g=0;v=e+t|0;r=l[e+4>>2]|0;do{if(!(r&1)){c=l[e>>2]|0;if(!(r&3))return;d=e+(0-c)|0;h=c+t|0;s=l[155]|0;if(d>>>0<s>>>0)ze();if((d|0)==(l[156]|0)){i=e+(t+4)|0;r=l[i>>2]|0;if((r&3|0)!=3){g=d;o=h;break}l[153]=h;l[i>>2]=r&-2;l[e+(4-c)>>2]=h|1;l[v>>2]=h;return}a=c>>>3;if(c>>>0<256){n=l[e+(8-c)>>2]|0;i=l[e+(12-c)>>2]|0;r=644+(a<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<s>>>0)ze();if((l[n+12>>2]|0)!=(d|0))ze()}if((i|0)==(n|0)){l[151]=l[151]&~(1<<a);g=d;o=h;break}if((i|0)!=(r|0)){if(i>>>0<s>>>0)ze();r=i+8|0;if((l[r>>2]|0)==(d|0))f=r;else ze()}else f=i+8|0;l[n+12>>2]=i;l[f>>2]=n;g=d;o=h;break}f=l[e+(24-c)>>2]|0;n=l[e+(12-c)>>2]|0;do{if((n|0)==(d|0)){n=16-c|0;i=e+(n+4)|0;r=l[i>>2]|0;if(!r){i=e+n|0;r=l[i>>2]|0;if(!r){u=0;break}}while(1){n=r+20|0;a=l[n>>2]|0;if(a){r=a;i=n;continue}n=r+16|0;a=l[n>>2]|0;if(!a)break;else{r=a;i=n}}if(i>>>0<s>>>0)ze();else{l[i>>2]=0;u=r;break}}else{a=l[e+(8-c)>>2]|0;if(a>>>0<s>>>0)ze();r=a+12|0;if((l[r>>2]|0)!=(d|0))ze();i=n+8|0;if((l[i>>2]|0)==(d|0)){l[r>>2]=n;l[i>>2]=a;u=n;break}else ze()}}while(0);if(f){r=l[e+(28-c)>>2]|0;i=908+(r<<2)|0;if((d|0)==(l[i>>2]|0)){l[i>>2]=u;if(!u){l[152]=l[152]&~(1<<r);g=d;o=h;break}}else{if(f>>>0<(l[155]|0)>>>0)ze();r=f+16|0;if((l[r>>2]|0)==(d|0))l[r>>2]=u;else l[f+20>>2]=u;if(!u){g=d;o=h;break}}n=l[155]|0;if(u>>>0<n>>>0)ze();l[u+24>>2]=f;r=16-c|0;i=l[e+r>>2]|0;do{if(i)if(i>>>0<n>>>0)ze();else{l[u+16>>2]=i;l[i+24>>2]=u;break}}while(0);r=l[e+(r+4)>>2]|0;if(r)if(r>>>0<(l[155]|0)>>>0)ze();else{l[u+20>>2]=r;l[r+24>>2]=u;g=d;o=h;break}else{g=d;o=h}}else{g=d;o=h}}else{g=e;o=t}}while(0);s=l[155]|0;if(v>>>0<s>>>0)ze();r=e+(t+4)|0;i=l[r>>2]|0;if(!(i&2)){if((v|0)==(l[157]|0)){m=(l[154]|0)+o|0;l[154]=m;l[157]=g;l[g+4>>2]=m|1;if((g|0)!=(l[156]|0))return;l[156]=0;l[153]=0;return}if((v|0)==(l[156]|0)){m=(l[153]|0)+o|0;l[153]=m;l[156]=g;l[g+4>>2]=m|1;l[g+m>>2]=m;return}o=(i&-8)+o|0;a=i>>>3;do{if(i>>>0>=256){f=l[e+(t+24)>>2]|0;n=l[e+(t+12)>>2]|0;do{if((n|0)==(v|0)){i=e+(t+20)|0;r=l[i>>2]|0;if(!r){i=e+(t+16)|0;r=l[i>>2]|0;if(!r){b=0;break}}while(1){n=r+20|0;a=l[n>>2]|0;if(a){r=a;i=n;continue}n=r+16|0;a=l[n>>2]|0;if(!a)break;else{r=a;i=n}}if(i>>>0<s>>>0)ze();else{l[i>>2]=0;b=r;break}}else{a=l[e+(t+8)>>2]|0;if(a>>>0<s>>>0)ze();r=a+12|0;if((l[r>>2]|0)!=(v|0))ze();i=n+8|0;if((l[i>>2]|0)==(v|0)){l[r>>2]=n;l[i>>2]=a;b=n;break}else ze()}}while(0);if(f){r=l[e+(t+28)>>2]|0;i=908+(r<<2)|0;if((v|0)==(l[i>>2]|0)){l[i>>2]=b;if(!b){l[152]=l[152]&~(1<<r);break}}else{if(f>>>0<(l[155]|0)>>>0)ze();r=f+16|0;if((l[r>>2]|0)==(v|0))l[r>>2]=b;else l[f+20>>2]=b;if(!b)break}i=l[155]|0;if(b>>>0<i>>>0)ze();l[b+24>>2]=f;r=l[e+(t+16)>>2]|0;do{if(r)if(r>>>0<i>>>0)ze();else{l[b+16>>2]=r;l[r+24>>2]=b;break}}while(0);r=l[e+(t+20)>>2]|0;if(r)if(r>>>0<(l[155]|0)>>>0)ze();else{l[b+20>>2]=r;l[r+24>>2]=b;break}}}else{n=l[e+(t+8)>>2]|0;i=l[e+(t+12)>>2]|0;r=644+(a<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<s>>>0)ze();if((l[n+12>>2]|0)!=(v|0))ze()}if((i|0)==(n|0)){l[151]=l[151]&~(1<<a);break}if((i|0)!=(r|0)){if(i>>>0<s>>>0)ze();r=i+8|0;if((l[r>>2]|0)==(v|0))p=r;else ze()}else p=i+8|0;l[n+12>>2]=i;l[p>>2]=n}}while(0);l[g+4>>2]=o|1;l[g+o>>2]=o;if((g|0)==(l[156]|0)){l[153]=o;return}}else{l[r>>2]=i&-2;l[g+4>>2]=o|1;l[g+o>>2]=o}r=o>>>3;if(o>>>0<256){i=r<<1;a=644+(i<<2)|0;n=l[151]|0;r=1<<r;if(n&r){r=644+(i+2<<2)|0;i=l[r>>2]|0;if(i>>>0<(l[155]|0)>>>0)ze();else{y=r;m=i}}else{l[151]=n|r;y=644+(i+2<<2)|0;m=a}l[y>>2]=g;l[m+12>>2]=g;l[g+8>>2]=m;l[g+12>>2]=a;return}r=o>>>8;if(r)if(o>>>0>16777215)a=31;else{y=(r+1048320|0)>>>16&8;m=r<<y;v=(m+520192|0)>>>16&4;m=m<<v;a=(m+245760|0)>>>16&2;a=14-(v|y|a)+(m<<a>>>15)|0;a=o>>>(a+7|0)&1|a<<1}else a=0;r=908+(a<<2)|0;l[g+28>>2]=a;l[g+20>>2]=0;l[g+16>>2]=0;i=l[152]|0;n=1<<a;if(!(i&n)){l[152]=i|n;l[r>>2]=g;l[g+24>>2]=r;l[g+12>>2]=g;l[g+8>>2]=g;return}r=l[r>>2]|0;e:do{if((l[r+4>>2]&-8|0)!=(o|0)){a=o<<((a|0)==31?0:25-(a>>>1)|0);while(1){i=r+16+(a>>>31<<2)|0;n=l[i>>2]|0;if(!n)break;if((l[n+4>>2]&-8|0)==(o|0)){r=n;break e}else{a=a<<1;r=n}}if(i>>>0<(l[155]|0)>>>0)ze();l[i>>2]=g;l[g+24>>2]=r;l[g+12>>2]=g;l[g+8>>2]=g;return}}while(0);i=r+8|0;n=l[i>>2]|0;m=l[155]|0;if(!(n>>>0>=m>>>0&r>>>0>=m>>>0))ze();l[n+12>>2]=g;l[i>>2]=g;l[g+8>>2]=n;l[g+12>>2]=r;l[g+24>>2]=0;return}function Jr(){}function Vr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;i=t-i-(r>>>0>e>>>0|0)>>>0;return(q=i,e-r>>>0|0)|0}function Yr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,a=0,o=0;i=e+r|0;if((r|0)>=20){t=t&255;a=e&3;o=t|t<<8|t<<16|t<<24;n=i&~3;if(a){a=e+4-a|0;while((e|0)<(a|0)){h[e>>0]=t;e=e+1|0}}while((e|0)<(n|0)){l[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){h[e>>0]=t;e=e+1|0}return e-r|0}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){q=t>>>r;return e>>>r|(t&(1<<r)-1)<<32-r}q=0;return t>>>r-32|0}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){q=t<<r|(e&(1<<r)-1<<32-r)>>>32-r;return e<<r}q=e<<r-32;return 0}function Zr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;r=e+r>>>0;return(q=t+i+(r>>>0<e>>>0|0)>>>0,r|0)|0}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)>=4096)return Te(e|0,t|0,r|0)|0;i=e|0;if((e&3)==(t&3)){while(e&3){if(!r)return i|0;h[e>>0]=h[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){l[e>>2]=l[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){h[e>>0]=h[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function $r(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){q=t>>r;return e>>>r|(t&(1<<r)-1)<<32-r}q=(t|0)<0?-1:0;return t>>r-32|0}function ei(e){e=e|0;var t=0;t=h[E+(e&255)>>0]|0;if((t|0)<8)return t|0;t=h[E+(e>>8&255)>>0]|0;if((t|0)<8)return t+8|0;t=h[E+(e>>16&255)>>0]|0;if((t|0)<8)return t+16|0;return(h[E+(e>>>24)>>0]|0)+24|0}function ti(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,a=0;a=e&65535;n=t&65535;r=ue(n,a)|0;i=e>>>16;e=(r>>>16)+(ue(n,i)|0)|0;n=t>>>16;t=ue(n,a)|0;return(q=(e>>>16)+(ue(n,i)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|r&65535|0)|0}function ri(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,o=0,f=0,s=0,c=0;c=t>>31|((t|0)<0?-1:0)<<1;s=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;a=i>>31|((i|0)<0?-1:0)<<1;n=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;f=Vr(c^e,s^t,c,s)|0;o=q;e=a^c;t=n^s;return Vr((fi(f,o,Vr(a^r,n^i,a,n)|0,q,0)|0)^e,q^t,e,t)|0}function ii(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,o=0,f=0,s=0,c=0;n=w;w=w+16|0;f=n|0;o=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;c=i>>31|((i|0)<0?-1:0)<<1;s=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;e=Vr(o^e,a^t,o,a)|0;t=q;fi(e,t,Vr(c^r,s^i,c,s)|0,q,f)|0;i=Vr(l[f>>2]^o,l[f+4>>2]^a,o,a)|0;r=q;w=n;return(q=r,i)|0}function ni(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0;n=e;a=r;r=ti(n,a)|0;e=q;return(q=(ue(t,a)|0)+(ue(i,n)|0)+e|e&0,r|0|0)|0}function ai(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return fi(e,t,r,i,0)|0}function oi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0;a=w;w=w+16|0;n=a|0;fi(e,t,r,i,n)|0;w=a;return(q=l[n+4>>2]|0,l[n>>2]|0)|0}function fi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var a=0,o=0,f=0,s=0,c=0,u=0,h=0,d=0,p=0,b=0;u=e;s=t;c=s;o=r;d=i;f=d;if(!c){a=(n|0)!=0;if(!f){if(a){l[n>>2]=(u>>>0)%(o>>>0);l[n+4>>2]=0}d=0;n=(u>>>0)/(o>>>0)>>>0;return(q=d,n)|0}else{if(!a){d=0;n=0;return(q=d,n)|0}l[n>>2]=e|0;l[n+4>>2]=t&0;d=0;n=0;return(q=d,n)|0}}a=(f|0)==0;do{if(o){if(!a){a=(de(f|0)|0)-(de(c|0)|0)|0;if(a>>>0<=31){h=a+1|0;f=31-a|0;t=a-31>>31;o=h;e=u>>>(h>>>0)&t|c<<f;t=c>>>(h>>>0)&t;a=0;f=u<<f;break}if(!n){d=0;n=0;return(q=d,n)|0}l[n>>2]=e|0;l[n+4>>2]=s|t&0;d=0;n=0;return(q=d,n)|0}a=o-1|0;if(a&o){f=(de(o|0)|0)+33-(de(c|0)|0)|0;b=64-f|0;h=32-f|0;s=h>>31;p=f-32|0;t=p>>31;o=f;e=h-1>>31&c>>>(p>>>0)|(c<<h|u>>>(f>>>0))&t;t=t&c>>>(f>>>0);a=u<<b&s;f=(c<<b|u>>>(p>>>0))&s|u<<h&f-33>>31;break}if(n){l[n>>2]=a&u;l[n+4>>2]=0}if((o|0)==1){p=s|t&0;b=e|0|0;return(q=p,b)|0}else{b=ei(o|0)|0;p=c>>>(b>>>0)|0;b=c<<32-b|u>>>(b>>>0)|0;return(q=p,b)|0}}else{if(a){if(n){l[n>>2]=(c>>>0)%(o>>>0);l[n+4>>2]=0}p=0;b=(c>>>0)/(o>>>0)>>>0;return(q=p,b)|0}if(!u){if(n){l[n>>2]=0;l[n+4>>2]=(c>>>0)%(f>>>0)}p=0;b=(c>>>0)/(f>>>0)>>>0;return(q=p,b)|0}a=f-1|0;if(!(a&f)){if(n){l[n>>2]=e|0;l[n+4>>2]=a&c|t&0}p=0;b=c>>>((ei(f|0)|0)>>>0);return(q=p,b)|0}a=(de(f|0)|0)-(de(c|0)|0)|0;if(a>>>0<=30){t=a+1|0;f=31-a|0;o=t;e=c<<f|u>>>(t>>>0);t=c>>>(t>>>0);a=0;f=u<<f;break}if(!n){p=0;b=0;return(q=p,b)|0}l[n>>2]=e|0;l[n+4>>2]=s|t&0;p=0;b=0;return(q=p,b)|0}}while(0);if(!o){c=f;s=0;f=0}else{h=r|0|0;u=d|i&0;c=Zr(h|0,u|0,-1,-1)|0;r=q;s=f;f=0;do{i=s;s=a>>>31|s<<1;a=f|a<<1;i=e<<1|i>>>31|0;d=e>>>31|t<<1|0;Vr(c,r,i,d)|0;b=q;p=b>>31|((b|0)<0?-1:0)<<1;f=p&1;e=Vr(i,d,p&h,(((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1)&u)|0;t=q;o=o-1|0}while((o|0)!=0);c=s;s=0}o=0;if(n){l[n>>2]=e;l[n+4>>2]=t}p=(a|0)>>>31|(c|o)<<1|(o<<1|a>>>31)&0|s;b=(a<<1|0>>>31)&-2|f;return(q=p,b)|0}function si(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return Ai[e&7](t|0,r|0,i|0)|0}function ci(e,t,r,i,n,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;xi[e&3](t|0,r|0,i|0,n|0,a|0)}function ui(e,t){e=e|0;t=t|0;Bi[e&7](t|0)}function hi(e,t){e=e|0;t=t|0;return Ii[e&1](t|0)|0}function di(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;Ci[e&0](t|0,r|0,i|0)}function li(e){e=e|0;Ri[e&3]()}function pi(e,t,r,i,n,a,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;o=o|0;Ti[e&3](t|0,r|0,i|0,n|0,a|0,o|0)}function bi(e,t,r,i,n,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;return Pi[e&1](t|0,r|0,i|0,n|0,a|0)|0}function vi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;Li[e&3](t|0,r|0,i|0,n|0)}function yi(e,t,r){e=e|0;t=t|0;r=r|0;le(0);return 0}function mi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;le(1)}function gi(e){e=e|0;le(2)}function wi(e){e=e|0;le(3);return 0}function _i(e,t,r){e=e|0;t=t|0;r=r|0;le(4)}function ki(){le(5)}function Si(e,t,r,i,n,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a=a|0;le(6)}function Ei(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;le(7);return 0}function Mi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;le(8)}var Ai=[yi,Yt,Dr,Ir,Br,Cr,yi,yi];var xi=[mi,tr,er,mi];var Bi=[gi,Kt,Jt,Xt,Ht,Vt,sr,jr];var Ii=[wi,xr];var Ci=[_i];var Ri=[ki,or,fr,ki];var Ti=[Si,ir,rr,Si];var Pi=[Ei,st];var Li=[Mi,Gt,Zt,Mi];return{___cxa_can_catch:nr,_crn_get_levels:St,_crn_get_uncompressed_size:Mt,_crn_decompress:At,_i64Add:Zr,_crn_get_width:_t,___cxa_is_pointer_type:ar,_i64Subtract:Vr,_memset:Yr,_malloc:qr,_free:Fr,_memcpy:Qr,_bitshift64Lshr:Wr,_fflush:vr,_bitshift64Shl:Gr,_crn_get_height:kt,___errno_location:ur,_crn_get_dxt_format:Et,runPostSets:Jr,_emscripten_replace_memory:Ye,stackAlloc:We,stackSave:Ge,stackRestore:Ze,establishStackSpace:Qe,setThrew:$e,setTempRet0:rt,getTempRet0:it,dynCall_iiii:si,dynCall_viiiii:ci,dynCall_vi:ui,dynCall_ii:hi,dynCall_viii:di,dynCall_v:li,dynCall_viiiiii:pi,dynCall_iiiiii:bi,dynCall_viiii:vi}}(e.Ya,e.Za,buffer);e.___cxa_can_catch=Z.___cxa_can_catch,e._crn_get_levels=Z._crn_get_levels,e.runPostSets=Z.runPostSets,e._crn_get_uncompressed_size=Z._crn_get_uncompressed_size,e._crn_decompress=Z._crn_decompress;var zc=e._i64Add=Z._i64Add;e._crn_get_height=Z._crn_get_height,e.___cxa_is_pointer_type=Z.___cxa_is_pointer_type;var nb=e._i64Subtract=Z._i64Subtract,qb=e._memset=Z._memset,Ea=e._malloc=Z._malloc,Bc=e._memcpy=Z._memcpy,Xa=e._emscripten_replace_memory=Z._emscripten_replace_memory;e._crn_get_dxt_format=Z._crn_get_dxt_format;var rb=e._bitshift64Lshr=Z._bitshift64Lshr,Na=e._free=Z._free;e._fflush=Z._fflush,e._crn_get_width=Z._crn_get_width,e.___errno_location=Z.___errno_location;var sb=e._bitshift64Shl=Z._bitshift64Shl;e.dynCall_iiii=Z.dynCall_iiii,e.dynCall_viiiii=Z.dynCall_viiiii,e.dynCall_vi=Z.dynCall_vi,e.dynCall_ii=Z.dynCall_ii,e.dynCall_viii=Z.dynCall_viii,e.dynCall_v=Z.dynCall_v,e.dynCall_viiiiii=Z.dynCall_viiiiii,e.dynCall_iiiiii=Z.dynCall_iiiiii,e.dynCall_viiii=Z.dynCall_viiii,n.aa=Z.stackAlloc,n.ua=Z.stackSave,n.ba=Z.stackRestore,n.Cd=Z.establishStackSpace,n.rb=Z.setTempRet0,n.fb=Z.getTempRet0,ia.prototype=Error(),ia.prototype.constructor=ia;var rd=null,jb=function t(){e.calledRun||td(),e.calledRun||(jb=t)};e.callMain=e.zd=function(t){function r(){for(var e=0;3>e;e++)n.push(0)}assert(0==I,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==bb.length,"cannot call main when preRun functions remain to be called"),t=t||[],Ha||(Ha=!0,ab(cb));var i=t.length+1,n=[D(hb(e.thisProgram),"i8",0)];r();for(var a=0;a<i-1;a+=1)n.push(D(hb(t[a]),"i8",0)),r();n.push(0),n=D(n,"i32",0);try{ud(e._main(i,n,0),!0)}catch(t){if(!(t instanceof ia)){if("SimulateInfiniteLoop"!=t)throw t&&"object"==typeof t&&t.stack&&e.W("exception thrown: "+[t,t.stack]),t;e.noExitRuntime=!0}}finally{}},e.run=e.run=td,e.exit=e.exit=ud;var wd=[];if(e.abort=e.abort=x,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();var vd=!0;e.noInitialRun&&(vd=!1),td(),window.Module=e}).call(this,require("_process"),require("buffer").Buffer,"/lib")},{_process:211,buffer:4,crypto:8,fs:2,path:210}],2:[function(e,t,r){},{}],3:[function(e,t,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],4:[function(e,t,r){(function(t){"use strict";function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function n(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return o(this,e,t,r)}function o(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,r,i):"string"==typeof t?u(e,t,r):l(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function s(e,t,r,i){return f(t),t<=0?n(e,t):void 0!==r?"string"==typeof i?n(e,t).fill(r,i):n(e,t).fill(r):n(e,t)}function c(e,t){if(f(t),e=n(e,t<0?0:0|p(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function u(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,r);e=n(e,i);var o=e.write(t,r);return o!==i&&(e=e.slice(0,o)),e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=n(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function d(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=h(e,t),e}function l(e,t){if(a.isBuffer(t)){var r=0|p(t.length);return e=n(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||W(t.length)?n(e,0):h(e,t);if("Buffer"===t.type&&Q(t.data))return h(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(i)return X(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return R(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function g(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:w(e,t,r,i,n);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,i,n){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,f=e.length,s=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,f/=2,s/=2,r/=2}var c;if(n){var u=-1;for(c=r;c<f;c++)if(a(e,c)===a(t,u===-1?0:c-u)){if(u===-1&&(u=c),c-u+1===s)return u*o}else u!==-1&&(c-=c-u),u=-1}else for(r+s>f&&(r=f-s),c=r;c>=0;c--){for(var h=!0,d=0;d<s;d++)if(a(e,c+d)!==a(t,d)){h=!1;break}if(h)return c}return-1}function _(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o<i;++o){var f=parseInt(t.substr(2*o,2),16);if(isNaN(f))return o;e[r+o]=f}return o}function k(e,t,r,i){return Y(X(t,e.length-r),e,r,i)}function S(e,t,r,i){return Y(H(t),e,r,i)}function E(e,t,r,i){return S(e,t,r,i)}function M(e,t,r,i){return Y(V(t),e,r,i)}function A(e,t,r,i){return Y(J(t,e.length-r),e,r,i)}function x(e,t,r){return 0===t&&r===e.length?G.fromByteArray(e):G.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var a=e[n],o=null,f=a>239?4:a>223?3:a>191?2:1;if(n+f<=r){var s,c,u,h;switch(f){case 1:a<128&&(o=a);break;case 2:s=e[n+1],128==(192&s)&&(h=(31&a)<<6|63&s)>127&&(o=h);break;case 3:s=e[n+1],c=e[n+2],128==(192&s)&&128==(192&c)&&(h=(15&a)<<12|(63&s)<<6|63&c)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:s=e[n+1],c=e[n+2],u=e[n+3],128==(192&s)&&128==(192&c)&&128==(192&u)&&(h=(15&a)<<18|(63&s)<<12|(63&c)<<6|63&u)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,f=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=f}return I(i)}function I(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",i=0;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=$));return r}function C(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function R(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function T(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=t;a<r;++a)n+=K(e[a]);return n}function P(e,t,r){for(var i=e.slice(t,r),n="",a=0;a<i.length;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function L(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,i,n,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function D(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-r,2);n<a;++n)e[r+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function U(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-r,4);n<a;++n)e[r+n]=t>>>8*(i?n:3-n)&255}function O(e,t,r,i,n,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,i,n){return n||O(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,i,23,4),r+4}function q(e,t,r,i,n){return n||O(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,i,52,8),r+8}function F(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function X(e,t){t=t||1/0;for(var r,i=e.length,n=null,a=[],o=0;o<i;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function H(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function J(e,t){for(var r,i,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function V(e){return G.toByteArray(F(e))}function Y(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function W(e){return e!==e}var G=e("base64-js"),Z=e("ieee754"),Q=e("isarray");r.Buffer=a,r.SlowBuffer=b,r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return s(null,e,t,r)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=a.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?B(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,i,n){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var o=n-i,f=r-t,s=Math.min(o,f),c=this.slice(i,n),u=e.slice(t,r),h=0;h<s;++h)if(c[h]!==u[h]){o=c[h],f=u[h];break}return o<f?-1:f<o?1:0},a.prototype.includes=function(e,t,r){return this.indexOf(e,t,r)!==-1},a.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},a.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return M(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=a.prototype;else{var n=t-e;i=new a(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+e]}return i},a.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var i=this[e],n=1,a=0;++a<t&&(n*=256);)i+=this[e+a]*n;return i},a.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},a.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var i=this[e],n=1,a=0;++a<t&&(n*=256);)i+=this[e+a]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var i=t,n=1,a=this[e+--i];i>0&&(n*=256);)a+=this[e+--i]*n;return n*=128,a>=n&&(a-=Math.pow(2,8*t)),a},
|
|
a.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t|=0,r|=0,!i){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var n=1,a=0;for(this[t]=255&e;++a<r&&(n*=256);)this[t+a]=e/n&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t|=0,r|=0,!i){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}var a=0,o=1,f=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===f&&0!==this[t+a-1]&&(f=1),this[t+a]=(e/o>>0)-f&255;return t+r},a.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}var a=r-1,o=1,f=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===f&&0!==this[t+a+1]&&(f=1),this[t+a]=(e/o>>0)-f&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n,o=i-r;if(this===e&&r<t&&t<i)for(n=o-1;n>=0;--n)e[n+t]=this[n+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},a.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var f=a.isBuffer(e)?e:X(new a(e,i).toString()),s=f.length;for(o=0;o<r-t;++o)this[o+t]=f[o%s]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":5,ieee754:6,isarray:7}],5:[function(e,t,r){"use strict";function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function n(e){return 3*e.length/4-i(e)}function a(e){var t,r,n,a,o,f,s=e.length;o=i(e),f=new h(3*s/4-o),n=o>0?s-4:s;var c=0;for(t=0,r=0;t<n;t+=4,r+=3)a=u[e.charCodeAt(t)]<<18|u[e.charCodeAt(t+1)]<<12|u[e.charCodeAt(t+2)]<<6|u[e.charCodeAt(t+3)],f[c++]=a>>16&255,f[c++]=a>>8&255,f[c++]=255&a;return 2===o?(a=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,f[c++]=255&a):1===o&&(a=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,f[c++]=a>>8&255,f[c++]=255&a),f}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function f(e,t,r){for(var i,n=[],a=t;a<r;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],n.push(o(i));return n.join("")}function s(e){for(var t,r=e.length,i=r%3,n="",a=[],o=0,s=r-i;o<s;o+=16383)a.push(f(e,o,o+16383>s?s:o+16383));return 1===i?(t=e[r-1],n+=c[t>>2],n+=c[t<<4&63],n+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],n+=c[t>>10],n+=c[t>>4&63],n+=c[t<<2&63],n+="="),a.push(n),a.join("")}r.byteLength=n,r.toByteArray=a,r.fromByteArray=s;for(var c=[],u=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=d.length;l<p;++l)c[l]=d[l],u[d.charCodeAt(l)]=l;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},{}],6:[function(e,t,r){r.read=function(e,t,r,i,n){var a,o,f=8*n-i-1,s=(1<<f)-1,c=s>>1,u=-7,h=r?n-1:0,d=r?-1:1,l=e[t+h];for(h+=d,a=l&(1<<-u)-1,l>>=-u,u+=f;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===s)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,i),a-=c}return(l?-1:1)*o*Math.pow(2,a-i)},r.write=function(e,t,r,i,n,a){var o,f,s,c=8*a-n-1,u=(1<<c)-1,h=u>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,l=i?0:a-1,p=i?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(f=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-o))<1&&(o--,s*=2),t+=o+h>=1?d/s:d*Math.pow(2,1-h),t*s>=2&&(o++,s/=2),o+h>=u?(f=0,o=u):o+h>=1?(f=(t*s-1)*Math.pow(2,n),o+=h):(f=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+l]=255&f,l+=p,f/=256,n-=8);for(o=o<<n|f,c+=n;c>0;e[r+l]=255&o,l+=p,o/=256,c-=8);e[r+l-p]|=128*b}},{}],7:[function(e,t,r){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],8:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(e("browserify-sign/algos")));r.getHashes=function(){return i};var n=e("pbkdf2");r.pbkdf2=n.pbkdf2,r.pbkdf2Sync=n.pbkdf2Sync;var a=e("browserify-cipher");["Cipher","createCipher","Cipheriv","createCipheriv","Decipher","createDecipher","Decipheriv","createDecipheriv","getCiphers","listCiphers"].forEach(function(e){r[e]=a[e]});var o=e("diffie-hellman");["DiffieHellmanGroup","createDiffieHellmanGroup","getDiffieHellman","createDiffieHellman","DiffieHellman"].forEach(function(e){r[e]=o[e]});var f=e("browserify-sign");["createSign","Sign","createVerify","Verify"].forEach(function(e){r[e]=f[e]}),r.createECDH=e("create-ecdh");var s=e("public-encrypt");["publicEncrypt","privateEncrypt","publicDecrypt","privateDecrypt"].forEach(function(e){r[e]=s[e]}),["createCredentials"].forEach(function(e){r[e]=function(){throw new Error(["sorry, "+e+" is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))}})},{"browserify-cipher":9,"browserify-sign":39,"browserify-sign/algos":38,"create-ecdh":109,"create-hash":137,"create-hmac":150,"diffie-hellman":151,pbkdf2:158,"public-encrypt":160,randombytes:206}],9:[function(e,t,r){function i(e,t){var r,i;if(e=e.toLowerCase(),d[e])r=d[e].key,i=d[e].iv;else{if(!h[e])throw new TypeError("invalid suite type");r=8*h[e].key,i=h[e].iv}var n=s(t,!1,r,i);return a(e,n.key,n.iv)}function n(e,t){var r,i;if(e=e.toLowerCase(),d[e])r=d[e].key,i=d[e].iv;else{if(!h[e])throw new TypeError("invalid suite type");r=8*h[e].key,i=h[e].iv}var n=s(t,!1,r,i);return o(e,n.key,n.iv)}function a(e,t,r){if(e=e.toLowerCase(),d[e])return c.createCipheriv(e,t,r);if(h[e])return new u({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function o(e,t,r){if(e=e.toLowerCase(),d[e])return c.createDecipheriv(e,t,r);if(h[e])return new u({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function f(){return Object.keys(h).concat(c.getCiphers())}var s=e("evp_bytestokey"),c=e("browserify-aes/browser"),u=e("browserify-des"),h=e("browserify-des/modes"),d=e("browserify-aes/modes");r.createCipher=r.Cipher=i,r.createCipheriv=r.Cipheriv=a,r.createDecipher=r.Decipher=n,r.createDecipheriv=r.Decipheriv=o,r.listCiphers=r.getCiphers=f},{"browserify-aes/browser":12,"browserify-aes/modes":16,"browserify-des":27,"browserify-des/modes":28,evp_bytestokey:37}],10:[function(e,t,r){(function(e){function t(e){var t;return e>f||e<0?(t=Math.abs(e)%f,e<0?f-t:t):e}function i(e){for(;0<e.length;e++)e[0]=0;return!1}function n(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function a(e){for(var t=e.length/4,r=new Array(t),i=-1;++i<t;)r[i]=e.readUInt32BE(4*i);return r}function o(e){this._key=a(e),this._doReset()}var f=Math.pow(2,32);n.prototype.init=function(){var e,t,r,i,n,a,o,f,s,c;for(e=function(){var e,r;for(r=[],t=e=0;e<256;t=++e)t<128?r.push(t<<1):r.push(t<<1^283);return r}(),n=0,s=0,t=c=0;c<256;t=++c)r=s^s<<1^s<<2^s<<3^s<<4,r=r>>>8^255&r^99,this.SBOX[n]=r,this.INV_SBOX[r]=n,a=e[n],o=e[a],f=e[o],i=257*e[r]^16843008*r,this.SUB_MIX[0][n]=i<<24|i>>>8,this.SUB_MIX[1][n]=i<<16|i>>>16,this.SUB_MIX[2][n]=i<<8|i>>>24,this.SUB_MIX[3][n]=i,i=16843009*f^65537*o^257*a^16843008*n,this.INV_SUB_MIX[0][r]=i<<24|i>>>8,this.INV_SUB_MIX[1][r]=i<<16|i>>>16,this.INV_SUB_MIX[2][r]=i<<8|i>>>24,this.INV_SUB_MIX[3][r]=i,0===n?n=s=1:(n=a^e[e[e[f^a]]],s^=e[e[s]]);return!0};var s=new n;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var e,t,r,i,n,a;for(r=this._key,t=r.length,this._nRounds=t+6,n=4*(this._nRounds+1),this._keySchedule=[],i=0;i<n;i++)this._keySchedule[i]=i<t?r[i]:(a=this._keySchedule[i-1],i%t==0?(a=a<<8|a>>>24,a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=s.RCON[i/t|0]<<24):t>6&&i%t==4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),this._keySchedule[i-t]^a);for(this._invKeySchedule=[],e=0;e<n;e++)i=n-e,a=this._keySchedule[i-(e%4?0:4)],this._invKeySchedule[e]=e<4||i<=4?a:s.INV_SUB_MIX[0][s.SBOX[a>>>24]]^s.INV_SUB_MIX[1][s.SBOX[a>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[a>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&a]];return!0},o.prototype.encryptBlock=function(t){t=a(new e(t));var r=this._doCryptBlock(t,this._keySchedule,s.SUB_MIX,s.SBOX),i=new e(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[1],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[3],12),i},o.prototype.decryptBlock=function(t){t=a(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var i=this._doCryptBlock(t,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX),n=new e(16);return n.writeUInt32BE(i[0],0),n.writeUInt32BE(i[3],4),n.writeUInt32BE(i[2],8),n.writeUInt32BE(i[1],12),n},o.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},o.prototype._doCryptBlock=function(e,r,i,n){var a,o,f,s,c,u,h,d,l;o=e[0]^r[0],f=e[1]^r[1],s=e[2]^r[2],c=e[3]^r[3],a=4;for(var p=1;p<this._nRounds;p++)u=i[0][o>>>24]^i[1][f>>>16&255]^i[2][s>>>8&255]^i[3][255&c]^r[a++],h=i[0][f>>>24]^i[1][s>>>16&255]^i[2][c>>>8&255]^i[3][255&o]^r[a++],d=i[0][s>>>24]^i[1][c>>>16&255]^i[2][o>>>8&255]^i[3][255&f]^r[a++],l=i[0][c>>>24]^i[1][o>>>16&255]^i[2][f>>>8&255]^i[3][255&s]^r[a++],o=u,f=h,s=d,c=l;return u=(n[o>>>24]<<24|n[f>>>16&255]<<16|n[s>>>8&255]<<8|n[255&c])^r[a++],h=(n[f>>>24]<<24|n[s>>>16&255]<<16|n[c>>>8&255]<<8|n[255&o])^r[a++],d=(n[s>>>24]<<24|n[c>>>16&255]<<16|n[o>>>8&255]<<8|n[255&f])^r[a++],l=(n[c>>>24]<<24|n[o>>>16&255]<<16|n[f>>>8&255]<<8|n[255&s])^r[a++],[t(u),t(h),t(d),t(l)]},r.AES=o}).call(this,e("buffer").Buffer)},{buffer:4}],11:[function(e,t,r){(function(r){function i(e,t,n,f){if(!(this instanceof i))return new i(e,t,n);o.call(this),this._finID=r.concat([n,new r([0,0,0,1])]),n=r.concat([n,new r([0,0,0,2])]),this._cipher=new a.AES(t),this._prev=new r(n.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=f,this._alen=0,this._len=0,n.copy(this._prev),this._mode=e;var c=new r(4);c.fill(0),this._ghash=new s(this._cipher.encryptBlock(c)),this._authTag=null,this._called=!1}function n(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=-1;++n<i;)r+=e[n]^t[n];return r}var a=e("./aes"),o=e("cipher-base"),f=e("inherits"),s=e("./ghash"),c=e("buffer-xor");f(i,o),t.exports=i,i.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=new r(t),t.fill(0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(n(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=e;this._cipher.scrub()},i.prototype.getAuthTag=function(){if(!this._decrypt&&r.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},i.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},i.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length}}).call(this,e("buffer").Buffer)},{"./aes":10,"./ghash":15,buffer:4,"buffer-xor":24,"cipher-base":25,inherits:208}],12:[function(e,t,r){function i(){return Object.keys(o)}var n=e("./encrypter");r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv;var a=e("./decrypter");r.createDecipher=r.Decipher=a.createDecipher,r.createDecipheriv=r.Decipheriv=a.createDecipheriv;var o=e("./modes");r.listCiphers=r.getCiphers=i},{"./decrypter":13,"./encrypter":14,"./modes":16}],13:[function(e,t,r){(function(t){function i(e,r,a){if(!(this instanceof i))return new i(e,r,a);c.call(this),this._cache=new n,this._last=void 0,this._cipher=new s.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function n(){if(!(this instanceof n))return new n;this.cache=new t("")}function a(e){for(var t=e[15],r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function o(e,r,n){var a=h[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new d(b[a.mode],r,n,!0):"auth"===a.type?new l(b[a.mode],r,n,!0):new i(b[a.mode],r,n)}function f(e,t){var r=h[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=p(t,!1,r.key,r.iv);return o(e,i.key,i.iv)}var s=e("./aes"),c=e("cipher-base"),u=e("inherits"),h=e("./modes"),d=e("./streamCipher"),l=e("./authCipher"),p=e("evp_bytestokey");u(i,c),i.prototype._update=function(e){this._cache.add(e);for(var r,i,n=[];r=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,r),n.push(i);return t.concat(n)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return a(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=t.concat([this.cache,e])},n.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},n.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=f,r.createDecipheriv=o}).call(this,e("buffer").Buffer)},{"./aes":10,"./authCipher":11,"./modes":16,"./modes/cbc":17,"./modes/cfb":18,"./modes/cfb1":19,"./modes/cfb8":20,"./modes/ctr":21,"./modes/ecb":22,"./modes/ofb":23,"./streamCipher":26,buffer:4,"cipher-base":25,evp_bytestokey:37,inherits:208}],14:[function(e,t,r){(function(t){function i(e,r,a){if(!(this instanceof i))return new i(e,r,a);s.call(this),this._cache=new n,this._cipher=new f.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function n(){if(!(this instanceof n))return new n;this.cache=new t("")}function a(e,r,n){var a=u[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new d(p[a.mode],r,n):"auth"===a.type?new l(p[a.mode],r,n):new i(p[a.mode],r,n)}function o(e,t){var r=u[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=h(t,!1,r.key,r.iv);return a(e,i.key,i.iv)}var f=e("./aes"),s=e("cipher-base"),c=e("inherits"),u=e("./modes"),h=e("evp_bytestokey"),d=e("./streamCipher"),l=e("./authCipher");c(i,s),i.prototype._update=function(e){this._cache.add(e);for(var r,i,n=[];r=this._cache.get();)i=this._mode.encrypt(this,r),n.push(i);return t.concat(n)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=t.concat([this.cache,e])},n.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},n.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),i=-1;++i<e;)r.writeUInt8(e,i);return t.concat([this.cache,r])};var p={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createCipheriv=a,r.createCipher=o}).call(this,e("buffer").Buffer)},{"./aes":10,"./authCipher":11,"./modes":16,"./modes/cbc":17,"./modes/cfb":18,"./modes/cfb1":19,"./modes/cfb8":20,"./modes/ctr":21,"./modes/ecb":22,"./modes/ofb":23,"./streamCipher":26,buffer:4,"cipher-base":25,evp_bytestokey:37,inherits:208}],15:[function(e,t,r){(function(e){function r(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function n(t){t=t.map(a);var r=new e(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r}function a(e){var t;return e>s||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var f=new e(16);f.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},r.prototype._multiply=function(){for(var e,t,r,a=i(this.h),f=[0,0,0,0],s=-1;++s<128;){for(t=0!=(this.state[~~(s/8)]&1<<7-s%8),t&&(f=o(f,a)),r=0!=(1&a[3]),e=3;e>0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=n(f)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,f],16)),this.ghash(n([0,t,0,r])),this.state};var s=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:4}],16:[function(e,t,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},r.aes128=r["aes-128-cbc"],r.aes192=r["aes-192-cbc"],r.aes256=r["aes-256-cbc"],r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],17:[function(e,t,r){var i=e("buffer-xor");r.encrypt=function(e,t){var r=i(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;return e._prev=t,i(e._cipher.decryptBlock(t),r)}},{"buffer-xor":24}],18:[function(e,t,r){(function(t){function i(e,r,i){var a=r.length,o=n(r,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,i?r:o]),o}var n=e("buffer-xor");r.encrypt=function(e,r,n){for(var a,o=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){o=t.concat([o,i(e,r,n)]);break}a=e._cache.length,o=t.concat([o,i(e,r.slice(0,a),n)]),r=r.slice(a)}return o}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":24}],19:[function(e,t,r){(function(e){function t(e,t,r){for(var n,a,o,f=-1,s=0;++f<8;)n=e._cipher.encryptBlock(e._prev),a=t&1<<7-f?128:0,o=n[0]^a,s+=(128&o)>>f%8,e._prev=i(e._prev,r?a:o);return s}function i(t,r){var i=t.length,n=-1,a=new e(t.length);for(t=e.concat([t,new e([r])]);++n<i;)a[n]=t[n]<<1|t[n+1]>>7;return a}r.encrypt=function(r,i,n){for(var a=i.length,o=new e(a),f=-1;++f<a;)o[f]=t(r,i[f],n);return o}}).call(this,e("buffer").Buffer)},{buffer:4}],20:[function(e,t,r){(function(e){function t(t,r,i){var n=t._cipher.encryptBlock(t._prev),a=n[0]^r;return t._prev=e.concat([t._prev.slice(1),new e([i?r:a])]),a}r.encrypt=function(r,i,n){for(var a=i.length,o=new e(a),f=-1;++f<a;)o[f]=t(r,i[f],n);return o}}).call(this,e("buffer").Buffer)},{buffer:4}],21:[function(e,t,r){(function(t){function i(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}function n(e){var t=e._cipher.encryptBlock(e._prev);return i(e._prev),t}var a=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var i=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),a(r,i)}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":24}],22:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],23:[function(e,t,r){(function(t){function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var n=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,a)}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":24}],24:[function(e,t,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),a=0;a<i;++a)n[a]=t[a]^r[a];return n}}).call(this,e("buffer").Buffer)},{buffer:4}],25:[function(e,t,r){(function(r){function i(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var n=e("stream").Transform,a=e("inherits"),o=e("string_decoder").StringDecoder;t.exports=i,a(i,n),i.prototype.update=function(e,t,i){"string"==typeof e&&(e=new r(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this._final())}catch(e){t=e}finally{e(t)}},i.prototype._finalOrDigest=function(e){var t=this._final()||new r("");return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i}}).call(this,e("buffer").Buffer)},{buffer:4,inherits:208,stream:228,string_decoder:229}],26:[function(e,t,r){(function(r){function i(e,t,o,f){if(!(this instanceof i))return new i(e,t,o);a.call(this),this._cipher=new n.AES(t),this._prev=new r(o.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=f,o.copy(this._prev),this._mode=e}var n=e("./aes"),a=e("cipher-base");e("inherits")(i,a),t.exports=i,i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()}}).call(this,e("buffer").Buffer)},{"./aes":10,buffer:4,"cipher-base":25,inherits:208}],27:[function(e,t,r){(function(r){function i(e){n.call(this);var t,i=e.mode.toLowerCase(),a=f[i];t=e.decrypt?"decrypt":"encrypt";var o=e.key;"des-ede"!==i&&"des-ede-cbc"!==i||(o=r.concat([o,o.slice(0,8)]));var s=e.iv;this._des=a.create({key:o,iv:s,type:t})}var n=e("cipher-base"),a=e("des.js"),o=e("inherits"),f={"des-ede3-cbc":a.CBC.instantiate(a.EDE),"des-ede3":a.EDE,"des-ede-cbc":a.CBC.instantiate(a.EDE),"des-ede":a.EDE,"des-cbc":a.CBC.instantiate(a.DES),"des-ecb":a.DES};f.des=f["des-cbc"],f.des3=f["des-ede3-cbc"],t.exports=i,o(i,n),i.prototype._update=function(e){return new r(this._des.update(e))},i.prototype._final=function(){return new r(this._des.final())}}).call(this,e("buffer").Buffer)},{buffer:4,"cipher-base":29,"des.js":30,inherits:208}],28:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],29:[function(e,t,r){(function(r){function i(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var n=e("stream").Transform,a=e("inherits"),o=e("string_decoder").StringDecoder;t.exports=i,a(i,n),i.prototype.update=function(e,t,i){"string"==typeof e&&(e=new r(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this._final())}catch(e){t=e}finally{e(t)}},i.prototype._finalOrDigest=function(e){var t=this._final()||new r("");return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i}}).call(this,e("buffer").Buffer)},{buffer:4,inherits:208,stream:228,string_decoder:229}],30:[function(e,t,r){"use strict";r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":31,"./des/cipher":32,"./des/des":33,"./des/ede":34,"./des/utils":35}],31:[function(e,t,r){"use strict";function i(e){a.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function n(e){function t(t){e.call(this,t),this._cbcInit()}o(t,e);for(var r=Object.keys(f),i=0;i<r.length;i++){var n=r[i];t.prototype[n]=f[n]}return t.create=function(e){return new t(e)},t}var a=e("minimalistic-assert"),o=e("inherits"),f={};r.instantiate=n,f._cbcInit=function(){var e=new i(this.options.iv);this._cbcState=e},f._update=function(e,t,r,i){var n=this._cbcState,a=this.constructor.super_.prototype,o=n.iv;if("encrypt"===this.type){for(var f=0;f<this.blockSize;f++)o[f]^=e[t+f];a._update.call(this,o,0,r,i);for(var f=0;f<this.blockSize;f++)o[f]=r[i+f]}else{a._update.call(this,e,t,r,i);for(var f=0;f<this.blockSize;f++)r[i+f]^=o[f];for(var f=0;f<this.blockSize;f++)o[f]=e[t+f]}}},{inherits:208,"minimalistic-assert":36}],32:[function(e,t,r){"use strict";function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),
|
|
this.buffer=new Array(this.blockSize),this.bufferOff=0}var n=e("minimalistic-assert");t.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},i.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":36}],33:[function(e,t,r){"use strict";function i(){this.tmp=new Array(2),this.keys=null}function n(e){c.call(this,e);var t=new i;this._desState=t,this.deriveKeys(t,e.key)}var a=e("minimalistic-assert"),o=e("inherits"),f=e("../des"),s=f.utils,c=f.Cipher;o(n,c),t.exports=n,n.create=function(e){return new n(e)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];n.prototype.deriveKeys=function(e,t){e.keys=new Array(32),a.equal(t.length,this.blockSize,"Invalid key length");var r=s.readUInt32BE(t,0),i=s.readUInt32BE(t,4);s.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var n=0;n<e.keys.length;n+=2){var o=u[n>>>1];r=s.r28shl(r,o),i=s.r28shl(i,o),s.pc2(r,i,e.keys,n)}},n.prototype._update=function(e,t,r,i){var n=this._desState,a=s.readUInt32BE(e,t),o=s.readUInt32BE(e,t+4);s.ip(a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,o,n.tmp,0):this._decrypt(n,a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],s.writeUInt32BE(r,a,i),s.writeUInt32BE(r,o,i+4)},n.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},n.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)a.equal(e[r],t);return e.slice(0,e.length-t)},n.prototype._encrypt=function(e,t,r,i,n){for(var a=t,o=r,f=0;f<e.keys.length;f+=2){var c=e.keys[f],u=e.keys[f+1];s.expand(o,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=s.substitute(c,u),d=s.permute(h),l=o;o=(a^d)>>>0,a=l}s.rip(o,a,i,n)},n.prototype._decrypt=function(e,t,r,i,n){for(var a=r,o=t,f=e.keys.length-2;f>=0;f-=2){var c=e.keys[f],u=e.keys[f+1];s.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=s.substitute(c,u),d=s.permute(h),l=a;a=(o^d)>>>0,o=l}s.rip(a,o,i,n)}},{"../des":30,inherits:208,"minimalistic-assert":36}],34:[function(e,t,r){"use strict";function i(e,t){a.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);this.ciphers="encrypt"===e?[c.create({type:"encrypt",key:r}),c.create({type:"decrypt",key:i}),c.create({type:"encrypt",key:n})]:[c.create({type:"decrypt",key:n}),c.create({type:"encrypt",key:i}),c.create({type:"decrypt",key:r})]}function n(e){s.call(this,e);var t=new i(this.type,this.options.key);this._edeState=t}var a=e("minimalistic-assert"),o=e("inherits"),f=e("../des"),s=f.Cipher,c=f.DES;o(n,s),t.exports=n,n.create=function(e){return new n(e)},n.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},n.prototype._pad=c.prototype._pad,n.prototype._unpad=c.prototype._unpad},{"../des":30,inherits:208,"minimalistic-assert":36}],35:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,i){for(var n=0,a=0,o=6;o>=0;o-=2){for(var f=0;f<=24;f+=8)n<<=1,n|=t>>>f+o&1;for(var f=0;f<=24;f+=8)n<<=1,n|=e>>>f+o&1}for(var o=6;o>=0;o-=2){for(var f=1;f<=25;f+=8)a<<=1,a|=t>>>f+o&1;for(var f=1;f<=25;f+=8)a<<=1,a|=e>>>f+o&1}r[i+0]=n>>>0,r[i+1]=a>>>0},r.rip=function(e,t,r,i){for(var n=0,a=0,o=0;o<4;o++)for(var f=24;f>=0;f-=8)n<<=1,n|=t>>>f+o&1,n<<=1,n|=e>>>f+o&1;for(var o=4;o<8;o++)for(var f=24;f>=0;f-=8)a<<=1,a|=t>>>f+o&1,a<<=1,a|=e>>>f+o&1;r[i+0]=n>>>0,r[i+1]=a>>>0},r.pc1=function(e,t,r,i){for(var n=0,a=0,o=7;o>=5;o--){for(var f=0;f<=24;f+=8)n<<=1,n|=t>>f+o&1;for(var f=0;f<=24;f+=8)n<<=1,n|=e>>f+o&1}for(var f=0;f<=24;f+=8)n<<=1,n|=t>>f+o&1;for(var o=1;o<=3;o++){for(var f=0;f<=24;f+=8)a<<=1,a|=t>>f+o&1;for(var f=0;f<=24;f+=8)a<<=1,a|=e>>f+o&1}for(var f=0;f<=24;f+=8)a<<=1,a|=e>>f+o&1;r[i+0]=n>>>0,r[i+1]=a>>>0},r.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,n){for(var a=0,o=0,f=i.length>>>1,s=0;s<f;s++)a<<=1,a|=e>>>i[s]&1;for(var s=f;s<i.length;s++)o<<=1,o|=t>>>i[s]&1;r[n+0]=a>>>0,r[n+1]=o>>>0},r.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=e>>>a&63;for(var a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,i=0;i<4;i++){var a=e>>>18-6*i&63,o=n[64*i+a];r<<=4,r|=o}for(var i=0;i<4;i++){var a=t>>>18-6*i&63,o=n[256+64*i+a];r<<=4,r|=o}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r<a.length;r++)t<<=1,t|=e>>>a[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],a=0;a<t;a+=r)n.push(i.slice(a,a+r));return n.join(" ")}},{}],36:[function(e,t,r){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=i,i.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],37:[function(e,t,r){(function(r){function i(e,t,i,a){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),i/=8,a=a||0;for(var o,f,s=0,c=0,u=new r(i),h=new r(a),d=0,l=[];;){if(d++>0&&l.push(o),l.push(e),t&&l.push(t),o=n(r.concat(l)),l=[],f=0,i>0)for(;;){if(0===i)break;if(f===o.length)break;u[s++]=o[f],i--,f++}if(a>0&&f!==o.length)for(;;){if(0===a)break;if(f===o.length)break;h[c++]=o[f],a--,f++}if(0===i&&0===a)break}for(f=0;f<o.length;f++)o[f]=0;return{key:u,iv:h}}var n=e("create-hash/md5");t.exports=i}).call(this,e("buffer").Buffer)},{buffer:4,"create-hash/md5":139}],38:[function(e,t,r){(function(e){"use strict";r["RSA-SHA224"]=r.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new e("302d300d06096086480165030402040500041c","hex")},r["RSA-SHA256"]=r.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new e("3031300d060960864801650304020105000420","hex")},r["RSA-SHA384"]=r.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new e("3041300d060960864801650304020205000430","hex")},r["RSA-SHA512"]=r.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new e("3051300d060960864801650304020305000440","hex")},r["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new e("3021300906052b0e03021a05000414","hex")},r["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new e("","hex")},r.DSA=r["DSA-SHA1"]=r["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new e("","hex")},r["DSA-SHA224"]=r["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new e("","hex")},r["DSA-SHA256"]=r["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new e("","hex")},r["DSA-SHA384"]=r["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new e("","hex")},r["DSA-SHA512"]=r["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new e("","hex")},r["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new e("","hex")},r["RSA-RIPEMD160"]=r.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new e("3021300906052b2403020105000414","hex")},r["RSA-MD5"]=r.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new e("3020300c06082a864886f70d020505000410","hex")}}).call(this,e("buffer").Buffer)},{buffer:4}],39:[function(e,t,r){(function(r){function i(e){h.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function n(e){h.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function a(e){return new i(e)}function o(e){return new n(e)}var f=e("./algos"),s=e("create-hash"),c=e("inherits"),u=e("./sign"),h=e("stream"),d=e("./verify"),l={};Object.keys(f).forEach(function(e){l[e]=l[e.toLowerCase()]=f[e]}),c(i,h.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),n=u(r.concat([this._tag,i]),e,this._hashType,this._signType);return t?n.toString(t):n},c(n,h.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.verify=function(e,t,i){"string"==typeof t&&(t=new r(t,i)),this.end();var n=this._hash.digest();return d(t,r.concat([this._tag,n]),e,this._signType)},t.exports={Sign:a,Verify:o,createSign:a,createVerify:o}}).call(this,e("buffer").Buffer)},{"./algos":38,"./sign":107,"./verify":108,buffer:4,"create-hash":137,inherits:208,stream:228}],40:[function(e,t,r){"use strict";r["1.3.132.0.10"]="secp256k1",r["1.3.132.0.33"]="p224",r["1.2.840.10045.3.1.1"]="p192",r["1.2.840.10045.3.1.7"]="p256",r["1.3.132.0.34"]="p384",r["1.3.132.0.35"]="p521"},{}],41:[function(e,t,r){!function(t,r){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}function o(e,t,r){for(var i=0,n=Math.min(e.length,r),a=t;a<n;a++){var o=e.charCodeAt(a)-48;i<<=4,i|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return i}function f(e,t,r,i){for(var n=0,a=Math.min(e.length,r),o=t;o<a;o++){var f=e.charCodeAt(o)-48;n*=i,n+=f>=49?f-49+10:f>=17?f-17+10:f}return n}function s(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,f=67108863&o,s=o/67108864|0;r.words[0]=f;for(var c=1;c<i;c++){for(var u=s>>>26,h=67108863&s,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;n=0|e.words[p],a=0|t.words[l],o=n*a+h,u+=o/67108864|0,h=67108863&o}r.words[c]=0|h,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}function u(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var o=n;n=0;for(var f=67108863&i,s=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=s;c++){var u=a-c,h=0|e.words[u],d=0|t.words[c],l=h*d,p=67108863&l;o=o+(l/67108864|0)|0,p=p+f|0,f=67108863&p,o=o+(p>>>26)|0,n+=o>>>26,o&=67108863}r.words[a]=f,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}function h(e,t,r){return(new d).mulp(e,t,r)}function d(e,t){this.x=e,this.y=t}function l(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function m(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function g(e){m.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var w;try{w=e("buffer").Buffer}catch(e){}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var n=0;"-"===e[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,o,f=0;if("be"===r)for(n=e.length-1,a=0;n>=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<<f&67108863,this.words[a+1]=o>>>26-f&67108863,(f+=24)>=26&&(f-=26,a++);else if("le"===r)for(n=0,a=0;n<e.length;n+=3)o=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=o<<f&67108863,this.words[a+1]=o>>>26-f&67108863,(f+=24)>=26&&(f-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,n,a=0;for(r=e.length-6,i=0;r>=t;r-=6)n=o(e,r,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,i++);r+6!==t&&(n=o(e,t,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var a=e.length-r,o=a%i,s=Math.min(a,a-o)+r,c=0,u=r;u<s;u+=i)c=f(e,u,u+i,t),this.imuln(n),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=f(e,u,e.length,t),u=0;u<o;u++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){e=e||10,t=0|t||1;var r;if(16===e||"hex"===e){r="";for(var n=0,a=0,o=0;o<this.length;o++){var f=this.words[o],s=(16777215&(f<<n|a)).toString(16);a=f>>>24-n&16777215,r=0!==a||o!==this.length-1?_[6-s.length]+s+r:s+r,n+=2,n>=26&&(n-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=k[e],u=S[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var d=h.modn(u).toString(e);h=h.idivn(u),r=h.isZero()?d+r:_[c-d.length]+d+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==w),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,f,s="le"===t,c=new e(a),u=this.clone();if(s){for(f=0;!u.isZero();f++)o=u.andln(255),u.iushrn(8),c[f]=o;for(;f<a;f++)c[f]=0}else{for(f=0;f<a-n;f++)c[f]=0;for(f=0;!u.isZero();f++)o=u.andln(255),u.iushrn(8),c[a-f-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(e){var t;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var r,i;this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,a=0;a<i.length;a++)t=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<r.length;a++)t=(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var i,n;r>0?(i=this,n=e):(i=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|i.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<i.length;o++)t=(0|i.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var E=function(e,t,r){var i,n,a,o=e.words,f=t.words,s=r.words,c=0,u=0|o[0],h=8191&u,d=u>>>13,l=0|o[1],p=8191&l,b=l>>>13,v=0|o[2],y=8191&v,m=v>>>13,g=0|o[3],w=8191&g,_=g>>>13,k=0|o[4],S=8191&k,E=k>>>13,M=0|o[5],A=8191&M,x=M>>>13,B=0|o[6],I=8191&B,C=B>>>13,R=0|o[7],T=8191&R,P=R>>>13,L=0|o[8],j=8191&L,D=L>>>13,U=0|o[9],O=8191&U,N=U>>>13,q=0|f[0],F=8191&q,z=q>>>13,K=0|f[1],X=8191&K,H=K>>>13,J=0|f[2],V=8191&J,Y=J>>>13,W=0|f[3],G=8191&W,Z=W>>>13,Q=0|f[4],$=8191&Q,ee=Q>>>13,te=0|f[5],re=8191&te,ie=te>>>13,ne=0|f[6],ae=8191&ne,oe=ne>>>13,fe=0|f[7],se=8191&fe,ce=fe>>>13,ue=0|f[8],he=8191&ue,de=ue>>>13,le=0|f[9],pe=8191&le,be=le>>>13;r.negative=e.negative^t.negative,r.length=19,i=Math.imul(h,F),n=Math.imul(h,z),n=n+Math.imul(d,F)|0,a=Math.imul(d,z);var ve=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(p,F),n=Math.imul(p,z),n=n+Math.imul(b,F)|0,a=Math.imul(b,z),i=i+Math.imul(h,X)|0,n=n+Math.imul(h,H)|0,n=n+Math.imul(d,X)|0,a=a+Math.imul(d,H)|0;var ye=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,F),n=Math.imul(y,z),n=n+Math.imul(m,F)|0,a=Math.imul(m,z),i=i+Math.imul(p,X)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(b,X)|0,a=a+Math.imul(b,H)|0,i=i+Math.imul(h,V)|0,n=n+Math.imul(h,Y)|0,n=n+Math.imul(d,V)|0,a=a+Math.imul(d,Y)|0;var me=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(w,F),n=Math.imul(w,z),n=n+Math.imul(_,F)|0,a=Math.imul(_,z),i=i+Math.imul(y,X)|0,n=n+Math.imul(y,H)|0,n=n+Math.imul(m,X)|0,a=a+Math.imul(m,H)|0,i=i+Math.imul(p,V)|0,n=n+Math.imul(p,Y)|0,n=n+Math.imul(b,V)|0,a=a+Math.imul(b,Y)|0,i=i+Math.imul(h,G)|0,n=n+Math.imul(h,Z)|0,n=n+Math.imul(d,G)|0,a=a+Math.imul(d,Z)|0;var ge=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(S,F),n=Math.imul(S,z),n=n+Math.imul(E,F)|0,a=Math.imul(E,z),i=i+Math.imul(w,X)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,X)|0,a=a+Math.imul(_,H)|0,i=i+Math.imul(y,V)|0,n=n+Math.imul(y,Y)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,Y)|0,i=i+Math.imul(p,G)|0,n=n+Math.imul(p,Z)|0,n=n+Math.imul(b,G)|0,a=a+Math.imul(b,Z)|0,i=i+Math.imul(h,$)|0,n=n+Math.imul(h,ee)|0,n=n+Math.imul(d,$)|0,a=a+Math.imul(d,ee)|0;var we=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(A,F),n=Math.imul(A,z),n=n+Math.imul(x,F)|0,a=Math.imul(x,z),i=i+Math.imul(S,X)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(E,X)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,V)|0,n=n+Math.imul(w,Y)|0,n=n+Math.imul(_,V)|0,a=a+Math.imul(_,Y)|0,i=i+Math.imul(y,G)|0,n=n+Math.imul(y,Z)|0,n=n+Math.imul(m,G)|0,a=a+Math.imul(m,Z)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(p,ee)|0,n=n+Math.imul(b,$)|0,a=a+Math.imul(b,ee)|0,i=i+Math.imul(h,re)|0,n=n+Math.imul(h,ie)|0,n=n+Math.imul(d,re)|0,a=a+Math.imul(d,ie)|0;var _e=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,F),n=Math.imul(I,z),n=n+Math.imul(C,F)|0,a=Math.imul(C,z),i=i+Math.imul(A,X)|0,n=n+Math.imul(A,H)|0,n=n+Math.imul(x,X)|0,a=a+Math.imul(x,H)|0,i=i+Math.imul(S,V)|0,n=n+Math.imul(S,Y)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,Y)|0,i=i+Math.imul(w,G)|0,n=n+Math.imul(w,Z)|0,n=n+Math.imul(_,G)|0,a=a+Math.imul(_,Z)|0,i=i+Math.imul(y,$)|0,n=n+Math.imul(y,ee)|0,n=n+Math.imul(m,$)|0,a=a+Math.imul(m,ee)|0,i=i+Math.imul(p,re)|0,n=n+Math.imul(p,ie)|0,n=n+Math.imul(b,re)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(h,ae)|0,n=n+Math.imul(h,oe)|0,n=n+Math.imul(d,ae)|0,a=a+Math.imul(d,oe)|0;var ke=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(T,F),n=Math.imul(T,z),n=n+Math.imul(P,F)|0,a=Math.imul(P,z),i=i+Math.imul(I,X)|0,n=n+Math.imul(I,H)|0,n=n+Math.imul(C,X)|0,a=a+Math.imul(C,H)|0,i=i+Math.imul(A,V)|0,n=n+Math.imul(A,Y)|0,n=n+Math.imul(x,V)|0,a=a+Math.imul(x,Y)|0,i=i+Math.imul(S,G)|0,n=n+Math.imul(S,Z)|0,n=n+Math.imul(E,G)|0,a=a+Math.imul(E,Z)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(w,ee)|0,n=n+Math.imul(_,$)|0,a=a+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=n+Math.imul(y,ie)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ie)|0,i=i+Math.imul(p,ae)|0,n=n+Math.imul(p,oe)|0,n=n+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,i=i+Math.imul(h,se)|0,n=n+Math.imul(h,ce)|0,n=n+Math.imul(d,se)|0,a=a+Math.imul(d,ce)|0;var Se=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(j,F),n=Math.imul(j,z),n=n+Math.imul(D,F)|0,a=Math.imul(D,z),i=i+Math.imul(T,X)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(P,X)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(I,V)|0,n=n+Math.imul(I,Y)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,Y)|0,i=i+Math.imul(A,G)|0,n=n+Math.imul(A,Z)|0,n=n+Math.imul(x,G)|0,a=a+Math.imul(x,Z)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(S,ee)|0,n=n+Math.imul(E,$)|0,a=a+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=n+Math.imul(w,ie)|0,n=n+Math.imul(_,re)|0,a=a+Math.imul(_,ie)|0,i=i+Math.imul(y,ae)|0,n=n+Math.imul(y,oe)|0,n=n+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,i=i+Math.imul(p,se)|0,n=n+Math.imul(p,ce)|0,n=n+Math.imul(b,se)|0,a=a+Math.imul(b,ce)|0,i=i+Math.imul(h,he)|0,n=n+Math.imul(h,de)|0,n=n+Math.imul(d,he)|0,a=a+Math.imul(d,de)|0;var Ee=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(O,F),n=Math.imul(O,z),n=n+Math.imul(N,F)|0,a=Math.imul(N,z),i=i+Math.imul(j,X)|0,n=n+Math.imul(j,H)|0,n=n+Math.imul(D,X)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(T,V)|0,n=n+Math.imul(T,Y)|0,n=n+Math.imul(P,V)|0,a=a+Math.imul(P,Y)|0,i=i+Math.imul(I,G)|0,n=n+Math.imul(I,Z)|0,n=n+Math.imul(C,G)|0,a=a+Math.imul(C,Z)|0,i=i+Math.imul(A,$)|0,n=n+Math.imul(A,ee)|0,n=n+Math.imul(x,$)|0,a=a+Math.imul(x,ee)|0,i=i+Math.imul(S,re)|0,n=n+Math.imul(S,ie)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ie)|0,i=i+Math.imul(w,ae)|0,n=n+Math.imul(w,oe)|0,n=n+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,i=i+Math.imul(y,se)|0,n=n+Math.imul(y,ce)|0,n=n+Math.imul(m,se)|0,a=a+Math.imul(m,ce)|0,i=i+Math.imul(p,he)|0,n=n+Math.imul(p,de)|0,n=n+Math.imul(b,he)|0,a=a+Math.imul(b,de)|0,i=i+Math.imul(h,pe)|0,n=n+Math.imul(h,be)|0,n=n+Math.imul(d,pe)|0,a=a+Math.imul(d,be)|0;var Me=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(O,X),n=Math.imul(O,H),n=n+Math.imul(N,X)|0,a=Math.imul(N,H),i=i+Math.imul(j,V)|0,n=n+Math.imul(j,Y)|0,n=n+Math.imul(D,V)|0,a=a+Math.imul(D,Y)|0,i=i+Math.imul(T,G)|0,n=n+Math.imul(T,Z)|0,n=n+Math.imul(P,G)|0,a=a+Math.imul(P,Z)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(I,ee)|0,n=n+Math.imul(C,$)|0,a=a+Math.imul(C,ee)|0,i=i+Math.imul(A,re)|0,n=n+Math.imul(A,ie)|0,n=n+Math.imul(x,re)|0,a=a+Math.imul(x,ie)|0,i=i+Math.imul(S,ae)|0,n=n+Math.imul(S,oe)|0,n=n+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,i=i+Math.imul(w,se)|0,n=n+Math.imul(w,ce)|0,n=n+Math.imul(_,se)|0,a=a+Math.imul(_,ce)|0,i=i+Math.imul(y,he)|0,n=n+Math.imul(y,de)|0,n=n+Math.imul(m,he)|0,a=a+Math.imul(m,de)|0,i=i+Math.imul(p,pe)|0,n=n+Math.imul(p,be)|0,n=n+Math.imul(b,pe)|0,a=a+Math.imul(b,be)|0;var Ae=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(O,V),n=Math.imul(O,Y),n=n+Math.imul(N,V)|0,a=Math.imul(N,Y),i=i+Math.imul(j,G)|0,n=n+Math.imul(j,Z)|0,n=n+Math.imul(D,G)|0,a=a+Math.imul(D,Z)|0,i=i+Math.imul(T,$)|0,n=n+Math.imul(T,ee)|0,n=n+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,i=i+Math.imul(I,re)|0,n=n+Math.imul(I,ie)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ie)|0,i=i+Math.imul(A,ae)|0,n=n+Math.imul(A,oe)|0,n=n+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,i=i+Math.imul(S,se)|0,n=n+Math.imul(S,ce)|0,n=n+Math.imul(E,se)|0,a=a+Math.imul(E,ce)|0,i=i+Math.imul(w,he)|0,n=n+Math.imul(w,de)|0,n=n+Math.imul(_,he)|0,a=a+Math.imul(_,de)|0,i=i+Math.imul(y,pe)|0,n=n+Math.imul(y,be)|0,n=n+Math.imul(m,pe)|0,a=a+Math.imul(m,be)|0;var xe=(c+i|0)+((8191&n)<<13)|0
|
|
;c=(a+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(O,G),n=Math.imul(O,Z),n=n+Math.imul(N,G)|0,a=Math.imul(N,Z),i=i+Math.imul(j,$)|0,n=n+Math.imul(j,ee)|0,n=n+Math.imul(D,$)|0,a=a+Math.imul(D,ee)|0,i=i+Math.imul(T,re)|0,n=n+Math.imul(T,ie)|0,n=n+Math.imul(P,re)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(I,ae)|0,n=n+Math.imul(I,oe)|0,n=n+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,i=i+Math.imul(A,se)|0,n=n+Math.imul(A,ce)|0,n=n+Math.imul(x,se)|0,a=a+Math.imul(x,ce)|0,i=i+Math.imul(S,he)|0,n=n+Math.imul(S,de)|0,n=n+Math.imul(E,he)|0,a=a+Math.imul(E,de)|0,i=i+Math.imul(w,pe)|0,n=n+Math.imul(w,be)|0,n=n+Math.imul(_,pe)|0,a=a+Math.imul(_,be)|0;var Be=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(O,$),n=Math.imul(O,ee),n=n+Math.imul(N,$)|0,a=Math.imul(N,ee),i=i+Math.imul(j,re)|0,n=n+Math.imul(j,ie)|0,n=n+Math.imul(D,re)|0,a=a+Math.imul(D,ie)|0,i=i+Math.imul(T,ae)|0,n=n+Math.imul(T,oe)|0,n=n+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,i=i+Math.imul(I,se)|0,n=n+Math.imul(I,ce)|0,n=n+Math.imul(C,se)|0,a=a+Math.imul(C,ce)|0,i=i+Math.imul(A,he)|0,n=n+Math.imul(A,de)|0,n=n+Math.imul(x,he)|0,a=a+Math.imul(x,de)|0,i=i+Math.imul(S,pe)|0,n=n+Math.imul(S,be)|0,n=n+Math.imul(E,pe)|0,a=a+Math.imul(E,be)|0;var Ie=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(O,re),n=Math.imul(O,ie),n=n+Math.imul(N,re)|0,a=Math.imul(N,ie),i=i+Math.imul(j,ae)|0,n=n+Math.imul(j,oe)|0,n=n+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,i=i+Math.imul(T,se)|0,n=n+Math.imul(T,ce)|0,n=n+Math.imul(P,se)|0,a=a+Math.imul(P,ce)|0,i=i+Math.imul(I,he)|0,n=n+Math.imul(I,de)|0,n=n+Math.imul(C,he)|0,a=a+Math.imul(C,de)|0,i=i+Math.imul(A,pe)|0,n=n+Math.imul(A,be)|0,n=n+Math.imul(x,pe)|0,a=a+Math.imul(x,be)|0;var Ce=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,ae),n=Math.imul(O,oe),n=n+Math.imul(N,ae)|0,a=Math.imul(N,oe),i=i+Math.imul(j,se)|0,n=n+Math.imul(j,ce)|0,n=n+Math.imul(D,se)|0,a=a+Math.imul(D,ce)|0,i=i+Math.imul(T,he)|0,n=n+Math.imul(T,de)|0,n=n+Math.imul(P,he)|0,a=a+Math.imul(P,de)|0,i=i+Math.imul(I,pe)|0,n=n+Math.imul(I,be)|0,n=n+Math.imul(C,pe)|0,a=a+Math.imul(C,be)|0;var Re=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(O,se),n=Math.imul(O,ce),n=n+Math.imul(N,se)|0,a=Math.imul(N,ce),i=i+Math.imul(j,he)|0,n=n+Math.imul(j,de)|0,n=n+Math.imul(D,he)|0,a=a+Math.imul(D,de)|0,i=i+Math.imul(T,pe)|0,n=n+Math.imul(T,be)|0,n=n+Math.imul(P,pe)|0,a=a+Math.imul(P,be)|0;var Te=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(O,he),n=Math.imul(O,de),n=n+Math.imul(N,he)|0,a=Math.imul(N,de),i=i+Math.imul(j,pe)|0,n=n+Math.imul(j,be)|0,n=n+Math.imul(D,pe)|0,a=a+Math.imul(D,be)|0;var Pe=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(O,pe),n=Math.imul(O,be),n=n+Math.imul(N,pe)|0,a=Math.imul(N,be);var Le=(c+i|0)+((8191&n)<<13)|0;return c=(a+(n>>>13)|0)+(Le>>>26)|0,Le&=67108863,s[0]=ve,s[1]=ye,s[2]=me,s[3]=ge,s[4]=we,s[5]=_e,s[6]=ke,s[7]=Se,s[8]=Ee,s[9]=Me,s[10]=Ae,s[11]=xe,s[12]=Be,s[13]=Ie,s[14]=Ce,s[15]=Re,s[16]=Te,s[17]=Pe,s[18]=Le,0!==c&&(s[19]=c,r.length++),r};Math.imul||(E=c),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?E(this,e,t):r<63?c(this,e,t):r<1024?u(this,e,t):h(this,e,t)},d.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},d.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},d.prototype.permute=function(e,t,r,i,n,a){for(var o=0;o<a;o++)i[o]=t[e[o]],n[o]=r[e[o]]},d.prototype.transform=function(e,t,r,i,n,a){this.permute(a,e,t,r,i,n);for(var o=1;o<n;o<<=1)for(var f=o<<1,s=Math.cos(2*Math.PI/f),c=Math.sin(2*Math.PI/f),u=0;u<n;u+=f)for(var h=s,d=c,l=0;l<o;l++){var p=r[u+l],b=i[u+l],v=r[u+l+o],y=i[u+l+o],m=h*v-d*y;y=h*y+d*v,v=m,r[u+l]=p+v,i[u+l]=b+y,r[u+l+o]=p-v,i[u+l+o]=b-y,l!==f&&(m=s*h-c*d,d=s*d+c*h,h=m)}},d.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},d.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},d.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},d.prototype.convert13b=function(e,t,r,n){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<n;++o)r[o]=0;i(0===a),i(0==(a&-8192))},d.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},d.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),a=this.stub(i),o=new Array(i),f=new Array(i),s=new Array(i),c=new Array(i),u=new Array(i),h=new Array(i),d=r.words;d.length=i,this.convert13b(e.words,e.length,o,i),this.convert13b(t.words,t.length,c,i),this.transform(o,a,f,s,i,n),this.transform(c,a,u,h,i,n);for(var l=0;l<i;l++){var p=f[l]*u[l]-s[l]*h[l];s[l]=f[l]*h[l]+s[l]*u[l],f[l]=p}return this.conjugate(f,s,i),this.transform(f,s,d,a,i,n),this.conjugate(d,a,i),this.normalize13b(d,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),h(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,a=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=s(e);if(0===t.length)return new a(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var f=this.words[t]&a,s=(0|this.words[t])-f<<r;this.words[t]=s|o,o=f>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){i("number"==typeof e&&e>=0);var n;n=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),f=67108863^67108863>>>a<<a,s=r;if(n-=o,n=Math.max(0,n),s){for(var c=0;c<o;c++)s.words[c]=this.words[c];s.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=n);c--){var h=0|this.words[c];this.words[c]=u<<26-a|h>>>a,u=h&f}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},a.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var n,a=e.length+r;this._expand(a);var o,f=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+f;var s=(0|e.words[n])*t;o-=67108863&s,f=(o>>26)-(s/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)o=(0|this.words[n+r])+f,f=o>>26,this.words[n+r]=67108863&o;if(0===f)return this.strip();for(i(f===-1),f=0,n=0;n<this.length;n++)o=-(0|this.words[n])+f,f=o>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!==(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var f,s=i.length-n.length;if("mod"!==t){f=new a(null),f.length=s+1,f.words=new Array(f.length);for(var c=0;c<f.length;c++)f.words[c]=0}var u=i.clone()._ishlnsubmul(n,1,s);0===u.negative&&(i=u,f&&(f.words[s]=1));for(var h=s-1;h>=0;h--){var d=67108864*(0|i.words[n.length+h])+(0|i.words[n.length+h-1]);for(d=Math.min(d/o|0,67108863),i._ishlnsubmul(n,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,h),i.isZero()||(i.negative^=1);f&&(f.words[h]=d)}return f&&f.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:f||null,mod:i}},a.prototype.divmod=function(e,t,r){if(i(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var n,o,f;return 0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(n=f.div.neg()),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(n=f.div.neg()),{div:n,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:f.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},a.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),f=new a(0),s=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(u),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(u),s.isub(h)),f.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(f),o.isub(s)):(r.isub(t),f.isub(n),s.isub(o))}return{a:f,b:s,gcd:r.iushln(c)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var s=0,c=1;0==(t.words[0]&c)&&s<26;++s,c<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(f),n.iushrn(1);for(var u=0,h=1;0==(r.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(r.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(o)):(r.isub(t),o.isub(n))}var d;return d=0===t.cmpn(1)?n:o,d.cmpn(0)<0&&d.iadd(e),d},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r,r=a}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,o=r;0!==a&&o<this.length;o++){var f=0|this.words[o];f+=a,a=f>>>26,f&=67108863,this.words[o]=f}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];r=n===e?0:n<e?-1:1}return 0!==this.negative?0|-r:r},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new m(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var M={k256:null,p224:null,p192:null,p25519:null};l.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},l.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):r.strip(),r},l.prototype.split=function(e,t){e.iushrn(this.n,0,t)},l.prototype.imulK=function(e){return e.imul(this.k)},n(p,l),p.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(4194303&a)<<4|n>>>22,n=a}n>>>=22,e.words[i-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},p.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(b,l),n(v,l),n(y,l),y.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function e(t){if(M[t])return M[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return M[t]=e,e},m.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},m.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},m.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},m.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},m.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},m.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},m.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},m.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},m.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},m.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},m.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},m.prototype.isqr=function(e){return this.imul(e,e.clone())},m.prototype.sqr=function(e){return this.mul(e,e)},m.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var f=new a(1).toRed(this),s=f.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var h=this.pow(u,n),d=this.pow(e,n.addn(1).iushrn(1)),l=this.pow(e,n),p=o;0!==l.cmp(f);){for(var b=l,v=0;0!==b.cmp(f);v++)b=b.redSqr();i(v<p);var y=this.pow(h,new a(1).iushln(p-v-1));d=d.redMul(y),h=y.redSqr(),l=l.redMul(h),p=v}return d},m.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},m.prototype.pow=function(e,t){if(t.isZero())return new a(1);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],o=0,f=0,s=t.bitLength()%26;for(0===s&&(s=26),i=t.length-1;i>=0;i--){for(var c=t.words[i],u=s-1;u>=0;u--){var h=c>>u&1;n!==r[0]&&(n=this.sqr(n)),0!==h||0!==o?(o<<=1,o|=h,(4===++f||0===i&&0===u)&&(n=this.mul(n,r[o]),f=0,o=0)):f=0}s=26}return n},m.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},m.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new g(e)},n(g,m),g.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},g.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},g.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},g.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},g.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],42:[function(e,t,r){(function(r){function i(e){var t=a(e);return{blinder:t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}function n(e,t){var n=i(t),a=t.modulus.byteLength(),f=(o.mont(t.modulus),new o(e).mul(n.blinder).umod(t.modulus)),s=f.toRed(o.mont(t.prime1)),c=f.toRed(o.mont(t.prime2)),u=t.coefficient,h=t.prime1,d=t.prime2,l=s.redPow(t.exponent1),p=c.redPow(t.exponent2);l=l.fromRed(),p=p.fromRed();var b=l.isub(p).imul(u).umod(h);return b.imul(d),p.iadd(b),new r(p.imul(n.unblinder).umod(t.modulus).toArray(!1,a))}function a(e){for(var t=e.modulus.byteLength(),r=new o(f(t));r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new o(f(t));return r}var o=e("bn.js"),f=e("randombytes");t.exports=n,n.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":41,buffer:4,randombytes:206}],43:[function(e,t,r){"use strict";var i=r;i.version=e("../package.json").version,i.utils=e("./elliptic/utils"),i.rand=e("brorand"),i.curve=e("./elliptic/curve"),i.curves=e("./elliptic/curves"),i.ec=e("./elliptic/ec"),i.eddsa=e("./elliptic/eddsa")},{"../package.json":68,"./elliptic/curve":46,"./elliptic/curves":49,"./elliptic/ec":50,"./elliptic/eddsa":53,"./elliptic/utils":57,brorand:58}],44:[function(e,t,r){"use strict";function i(e,t){this.type=e,this.p=new a(t.p,16),this.red=t.prime?a.red(t.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=t.n&&new a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function n(e,t){this.curve=e,this.type=t,this.precomputed=null}var a=e("bn.js"),o=e("../../elliptic"),f=o.utils,s=f.getNAF,c=f.getJSF,u=f.assert;t.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,t){u(e.precomputed);var r=e._getDoubles(),i=s(t,1),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var a=[],o=0;o<i.length;o+=r.step){for(var f=0,t=o+r.step-1;t>=o;t--)f=(f<<1)+i[t];a.push(f)}for(var c=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=n;d>0;d--){for(var o=0;o<a.length;o++){var f=a[o];f===d?h=h.mixedAdd(r.points[o]):f===-d&&(h=h.mixedAdd(r.points[o].neg()))}c=c.add(h)}return c.toP()},i.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=s(t,r),o=this.jpoint(null,null,null),f=a.length-1;f>=0;f--){for(var t=0;f>=0&&0===a[f];f--)t++;if(f>=0&&t++,o=o.dblp(t),f<0)break;var c=a[f];u(0!==c),o="affine"===e.type?c>0?o.mixedAdd(n[c-1>>1]):o.mixedAdd(n[-c-1>>1].neg()):c>0?o.add(n[c-1>>1]):o.add(n[-c-1>>1].neg())}return"affine"===e.type?o.toP():o},i.prototype._wnafMulAdd=function(e,t,r,i,n){for(var a=this._wnafT1,o=this._wnafT2,f=this._wnafT3,u=0,h=0;h<i;h++){var d=t[h],l=d._getNAFPoints(e);a[h]=l.wnd,o[h]=l.points}for(var h=i-1;h>=1;h-=2){var p=h-1,b=h;if(1===a[p]&&1===a[b]){var v=[t[p],null,null,t[b]];0===t[p].y.cmp(t[b].y)?(v[1]=t[p].add(t[b]),v[2]=t[p].toJ().mixedAdd(t[b].neg())):0===t[p].y.cmp(t[b].y.redNeg())?(v[1]=t[p].toJ().mixedAdd(t[b]),v[2]=t[p].add(t[b].neg())):(v[1]=t[p].toJ().mixedAdd(t[b]),v[2]=t[p].toJ().mixedAdd(t[b].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=c(r[p],r[b]);u=Math.max(m[0].length,u),f[p]=new Array(u),f[b]=new Array(u);for(var g=0;g<u;g++){var w=0|m[0][g],_=0|m[1][g];f[p][g]=y[3*(w+1)+(_+1)],f[b][g]=0,o[p]=v}}else f[p]=s(r[p],a[p]),f[b]=s(r[b],a[b]),u=Math.max(f[p].length,u),u=Math.max(f[b].length,u)}for(var k=this.jpoint(null,null,null),S=this._wnafT4,h=u;h>=0;h--){for(var E=0;h>=0;){for(var M=!0,g=0;g<i;g++)S[g]=0|f[g][h],0!==S[g]&&(M=!1);if(!M)break;E++,h--}if(h>=0&&E++,k=k.dblp(E),h<0)break;for(var g=0;g<i;g++){var d,A=S[g];0!==A&&(A>0?d=o[g][A-1>>1]:A<0&&(d=o[g][-A-1>>1].neg()),k="affine"===d.type?k.mixedAdd(d):k.add(d))}}for(var h=0;h<i;h++)o[h]=null;return n?k:k.toP()},i.BasePoint=n,n.prototype.eq=function(){throw new Error("Not implemented")},n.prototype.validate=function(){return this.curve.validate(this)},i.prototype.decodePoint=function(e,t){e=f.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r){6===e[0]?u(e[e.length-1]%2==0):7===e[0]&&u(e[e.length-1]%2==1);return this.point(e.slice(1,1+r),e.slice(1+r,1+2*r))}if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},n.prototype.encodeCompressed=function(e){return this.encode(e,!0)},n.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},n.prototype.encode=function(e,t){return f.encode(this._encode(t),e)},n.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},n.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},n.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var a=0;a<e;a++)i=i.dbl();r.push(i)}return{step:e,points:r}},n.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},n.prototype._getBeta=function(){return null},n.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../../elliptic":43,"bn.js":41}],45:[function(e,t,r){"use strict";function i(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&(0|e.a)==-1,this.extended=this.mOneA,c.call(this,"edwards",e),this.a=new f(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new f(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new f(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function n(e,t,r,i,n){c.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new f(t,16),this.y=new f(r,16),this.z=i?new f(i,16):this.curve.one,this.t=n&&new f(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var a=e("../curve"),o=e("../../elliptic"),f=e("bn.js"),s=e("inherits"),c=a.base,u=o.utils.assert;s(i,c),t.exports=i,i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},i.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},i.prototype.pointFromX=function(e,t){e=new f(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(n.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},i.prototype.pointFromY=function(e,t){e=new f(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.one),n=r.redMul(this.d).redAdd(this.one),a=i.redMul(n.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},s(n,c.BasePoint),i.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},i.prototype.point=function(e,t,r,i){return new n(this,e,t,r,i)},n.fromJSON=function(e,t){return new n(e,t[0],t[1],t[2])},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},n.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),o=a.redSub(r),f=i.redSub(t),s=n.redMul(o),c=a.redMul(f),u=n.redMul(f),h=o.redMul(a);return this.curve.point(s,c,h,u)},n.prototype._projDbl=function(){var e,t,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(n),f=o.redAdd(a);if(this.zOne)e=i.redSub(n).redSub(a).redMul(f.redSub(this.curve.two)),
|
|
t=f.redMul(o.redSub(a)),r=f.redSqr().redSub(f).redSub(f);else{var s=this.z.redSqr(),c=f.redSub(s).redISub(s);e=i.redSub(n).redISub(a).redMul(c),t=f.redMul(o.redSub(a)),r=f.redMul(c)}}else{var o=n.redAdd(a),s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=o.redSub(s).redSub(s);e=this.curve._mulC(i.redISub(o)).redMul(c),t=this.curve._mulC(o).redMul(n.redISub(a)),r=o.redMul(c)}return this.curve.point(e,t,r)},n.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},n.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=n.redSub(i),f=n.redAdd(i),s=r.redAdd(t),c=a.redMul(o),u=f.redMul(s),h=a.redMul(s),d=o.redMul(f);return this.curve.point(c,u,d,h)},n.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),f=this.curve.d.redMul(a).redMul(o),s=n.redSub(f),c=n.redAdd(f),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),h=i.redMul(s).redMul(u);return this.curve.twisted?(t=i.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=s.redMul(c)):(t=i.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(s).redMul(c)),this.curve.point(h,t,r)},n.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},n.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},n.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},n.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},n.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()},n.prototype.getY=function(){return this.normalize(),this.y.fromRed()},n.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},n.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}return!1},n.prototype.toP=n.prototype.normalize,n.prototype.mixedAdd=n.prototype.add},{"../../elliptic":43,"../curve":46,"bn.js":41,inherits:208}],46:[function(e,t,r){"use strict";var i=r;i.base=e("./base"),i.short=e("./short"),i.mont=e("./mont"),i.edwards=e("./edwards")},{"./base":44,"./edwards":45,"./mont":47,"./short":48}],47:[function(e,t,r){"use strict";function i(e){s.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function n(e,t,r){s.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var a=e("../curve"),o=e("bn.js"),f=e("inherits"),s=a.base,c=e("../../elliptic"),u=c.utils;f(i,s),t.exports=i,i.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},f(n,s.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(u.toArray(e,t),1)},i.prototype.point=function(e,t){return new n(this,e,t)},i.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},n.prototype.precompute=function(){},n.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},n.fromJSON=function(e,t){return new n(e,t[0],t[1]||e.one)},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},n.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),i=r.redSqr(),n=t.redSub(i),a=t.redMul(i),o=n.redMul(i.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,o)},n.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(r),f=n.redMul(i),s=t.z.redMul(o.redAdd(f).redSqr()),c=t.x.redMul(o.redISub(f).redSqr());return this.curve.point(s,c)},n.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=this,a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(r=r.diffAdd(i,n),i=i.dbl()):(i=r.diffAdd(i,n),r=r.dbl());return i},n.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},n.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":43,"../curve":46,"bn.js":41,inherits:208}],48:[function(e,t,r){"use strict";function i(e){u.call(this,"short",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function n(e,t,r,i){u.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new s(t,16),this.y=new s(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(e,t,r,i){u.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new s(0)):(this.x=new s(t,16),this.y=new s(r,16),this.z=new s(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=e("../curve"),f=e("../../elliptic"),s=e("bn.js"),c=e("inherits"),u=o.base,h=f.utils.assert;c(i,u),t.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new s(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1],t=t.toRed(this.red)}if(e.lambda)r=new s(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],h(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var a;return a=e.basis?e.basis.map(function(e){return{a:new s(e.a,16),b:new s(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:a}}},i.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:s.mont(e),r=new s(2).toRed(t).redInvm(),i=r.redNeg(),n=new s(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},i.prototype._getEndoBasis=function(e){for(var t,r,i,n,a,o,f,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new s(1),b=new s(0),v=new s(0),y=new s(1),m=0;0!==d.cmpn(0);){var g=l.div(d);c=l.sub(g.mul(d)),u=v.sub(g.mul(p));var w=y.sub(g.mul(b));if(!i&&c.cmp(h)<0)t=f.neg(),r=p,i=c.neg(),n=u;else if(i&&2==++m)break;f=c,l=d,d=c,v=p,p=u,y=b,b=w}a=c.neg(),o=u;var _=i.sqr().add(n.sqr());return a.sqr().add(o.sqr()).cmp(_)>=0&&(a=t,o=r),i.negative&&(i=i.neg(),n=n.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:n},{a:a,b:o}]},i.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=n.mul(r.a),f=a.mul(i.a),s=n.mul(r.b),c=a.mul(i.b);return{k1:e.sub(o).sub(f),k2:s.add(c).neg()}},i.prototype.pointFromX=function(e,t){e=new s(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(t&&!n||!t&&n)&&(i=i.redNeg()),this.point(e,i)},i.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),f=e[a],s=f._getBeta();o.k1.negative&&(o.k1.ineg(),f=f.neg(!0)),o.k2.negative&&(o.k2.ineg(),s=s.neg(!0)),i[2*a]=f,i[2*a+1]=s,n[2*a]=o.k1,n[2*a+1]=o.k2}for(var c=this._wnafMulAdd(1,i,n,2*a,r),u=0;u<2*a;u++)i[u]=null,n[u]=null;return c},c(n,u.BasePoint),i.prototype.point=function(e,t,r){return new n(this,e,t,r)},i.prototype.pointFromJSON=function(e,t){return n.fromJSON(this,e,t)},n.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},n.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},n.fromJSON=function(e,t,r){function i(t){return e.point(t[0],t[1],r)}"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return this.inf},n.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},n.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},n.prototype.getX=function(){return this.x.fromRed()},n.prototype.getY=function(){return this.y.fromRed()},n.prototype.mul=function(e){return e=new s(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},n.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},n.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},n.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},n.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(a,u.BasePoint),i.prototype.jpoint=function(e,t,r){return new a(this,e,t,r)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),f=i.redSub(n),s=a.redSub(o);if(0===f.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=f.redSqr(),u=c.redMul(f),h=i.redMul(c),d=s.redSqr().redIAdd(u).redISub(h).redISub(h),l=s.redMul(h.redISub(d)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(f);return this.curve.jpoint(d,l,p)},a.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(i),f=n.redSub(a);if(0===o.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),c=s.redMul(o),u=r.redMul(s),h=f.redSqr().redIAdd(c).redISub(u).redISub(u),d=f.redMul(u.redISub(h)).redISub(n.redMul(c)),l=this.z.redMul(o);return this.curve.jpoint(h,d,l)},a.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}for(var i=this.curve.a,n=this.curve.tinv,a=this.x,o=this.y,f=this.z,s=f.redSqr().redSqr(),c=o.redAdd(o),r=0;r<e;r++){var u=a.redSqr(),h=c.redSqr(),d=h.redSqr(),l=u.redAdd(u).redIAdd(u).redIAdd(i.redMul(s)),p=a.redMul(h),b=l.redSqr().redISub(p.redAdd(p)),v=p.redISub(b),y=l.redMul(v);y=y.redIAdd(y).redISub(d);var m=c.redMul(f);r+1<e&&(s=s.redMul(d)),a=b,f=m,c=y}return this.curve.jpoint(a,c.redMul(n),f)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},a.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(i).redISub(a);o=o.redIAdd(o);var f=i.redAdd(i).redIAdd(i),s=f.redSqr().redISub(o).redISub(o),c=a.redIAdd(a);c=c.redIAdd(c),c=c.redIAdd(c),e=s,t=f.redMul(o.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),l=this.x.redAdd(h).redSqr().redISub(u).redISub(d);l=l.redIAdd(l);var p=u.redAdd(u).redIAdd(u),b=p.redSqr(),v=d.redIAdd(d);v=v.redIAdd(v),v=v.redIAdd(v),e=b.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(v),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)},a.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(i).redISub(a);o=o.redIAdd(o);var f=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),s=f.redSqr().redISub(o).redISub(o);e=s;var c=a.redIAdd(a);c=c.redIAdd(c),c=c.redIAdd(c),t=f.redMul(o.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),l=this.x.redSub(u).redMul(this.x.redAdd(u));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d);p=p.redIAdd(p);var b=p.redAdd(p);e=l.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(u);var v=h.redSqr();v=v.redIAdd(v),v=v.redIAdd(v),v=v.redIAdd(v),t=l.redMul(p.redISub(e)).redISub(v)}return this.curve.jpoint(e,t,r)},a.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),f=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),s=t.redAdd(t);s=s.redIAdd(s);var c=s.redMul(o),u=f.redSqr().redISub(c.redAdd(c)),h=c.redISub(u),d=o.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=f.redMul(h).redISub(d),p=r.redAdd(r).redMul(i);return this.curve.jpoint(u,l,p)},a.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(i);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var f=o.redSqr(),s=i.redIAdd(i);s=s.redIAdd(s),s=s.redIAdd(s),s=s.redIAdd(s);var c=n.redIAdd(o).redSqr().redISub(a).redISub(f).redISub(s),u=t.redMul(c);u=u.redIAdd(u),u=u.redIAdd(u);var h=this.x.redMul(f).redISub(u);h=h.redIAdd(h),h=h.redIAdd(h);var d=this.y.redMul(c.redMul(s.redISub(c)).redISub(o.redMul(f)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=this.z.redAdd(o).redSqr().redISub(r).redISub(f);return this.curve.jpoint(h,d,l)},a.prototype.mul=function(e,t){return e=new s(e,t),this.curve._wnafMul(this,e)},a.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},a.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}return!1},a.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":43,"../curve":46,"bn.js":41,inherits:208}],49:[function(e,t,r){"use strict";function i(e){"short"===e.type?this.curve=new f.curve.short(e):"edwards"===e.type?this.curve=new f.curve.edwards(e):this.curve=new f.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function n(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:r}),r}})}var a=r,o=e("hash.js"),f=e("../elliptic"),s=f.utils.assert;a.PresetCurve=i,n("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),n("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),n("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),n("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),n("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),n("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),n("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var c;try{c=e("./precomputed/secp256k1")}catch(e){c=void 0}n("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},{"../elliptic":43,"./precomputed/secp256k1":56,"hash.js":59}],50:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);"string"==typeof e&&(s(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var n=e("bn.js"),a=e("hmac-drbg"),o=e("../../elliptic"),f=o.utils,s=f.assert,c=e("./key"),u=e("./signature");t.exports=i,i.prototype.keyPair=function(e){return new c(this,e)},i.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},i.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},i.prototype.genKeyPair=function(e){e||(e={});for(var t=new a({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new n(2));;){var f=new n(t.generate(r));if(!(f.cmp(i)>0))return f.iaddn(1),this.keyFromPrivate(f)}},i.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},i.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),f=t.getPrivate().toArray("be",o),s=e.toArray("be",o),c=new a({hash:this.hash,entropy:f,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),h=this.n.sub(new n(1)),d=0;!0;d++){var l=i.k?i.k(d):new n(c.generate(this.n.byteLength()));if(l=this._truncateToN(l,!0),!(l.cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var y=l.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(y=y.umod(this.n),0!==y.cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return i.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new u({r:v,s:y,recoveryParam:m})}}}}}},i.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i),t=new u(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var f=o.invm(this.n),s=f.mul(e).umod(this.n),c=f.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var h=this.g.mulAdd(s,r.getPublic(),c);return!h.isInfinity()&&0===h.getX().umod(this.n).cmp(a)}var h=this.g.jmulAdd(s,r.getPublic(),c);return!h.isInfinity()&&h.eqXToP(a)},i.prototype.recoverPubKey=function(e,t,r,i){s((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var a=this.n,o=new n(e),f=t.r,c=t.s,h=1&r,d=r>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");f=d?this.curve.pointFromX(f.add(this.curve.n),h):this.curve.pointFromX(f,h);var l=t.r.invm(a),p=a.sub(o).mul(l).umod(a),b=c.mul(l).umod(a);return this.g.mulAdd(p,f,b)},i.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new u(t,i),null!==t.recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":43,"./key":51,"./signature":52,"bn.js":41,"hmac-drbg":65}],51:[function(e,t,r){"use strict";function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var n=e("bn.js"),a=e("../../elliptic"),o=a.utils,f=o.assert;t.exports=i,i.fromPublic=function(e,t,r){return t instanceof i?t:new i(e,{pub:t,pubEnc:r})},i.fromPrivate=function(e,t,r){return t instanceof i?t:new i(e,{priv:t,privEnc:r})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?f(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||f(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.mul(this.priv).getX()},i.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":43,"bn.js":41}],52:[function(e,t,r){"use strict";function i(e,t){if(e instanceof i)return e;this._importDER(e,t)||(h(e.r&&e.s,"Signature without r or s"),this.r=new s(e.r,16),this.s=new s(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function n(){this.place=0}function a(e,t){var r=e[t.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,o=t.place;a<i;a++,o++)n<<=8,n|=e[o];return t.place=o,n}function o(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)return void e.push(t);var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var s=e("bn.js"),c=e("../../elliptic"),u=c.utils,h=u.assert;t.exports=i,i.prototype._importDER=function(e,t){e=u.toArray(e,t);var r=new n;if(48!==e[r.place++])return!1;if(a(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=a(e,r),o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var f=a(e,r);if(e.length!==f+r.place)return!1;var c=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new s(o),this.s=new s(c),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=o(t),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];f(i,t.length),i=i.concat(t),i.push(2),f(i,r.length);var n=i.concat(r),a=[48];return f(a,n.length),a=a.concat(n),u.encode(a,e)}},{"../../elliptic":43,"bn.js":41}],53:[function(e,t,r){"use strict";function i(e){if(f("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof i))return new i(e);var e=a.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}var n=e("hash.js"),a=e("../../elliptic"),o=a.utils,f=o.assert,s=o.parseBytes,c=e("./key"),u=e("./signature");t.exports=i,i.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),a=this.encodePoint(n),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=i.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:f,Rencoded:a})},i.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(a)},i.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},i.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},i.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},i.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},i.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},i.prototype.decodePoint=function(e){e=o.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(e[t]&-129),i=0!=(128&e[t]),n=o.intFromLE(r);return this.curve.pointFromY(n,i)},i.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},i.prototype.decodeInt=function(e){return o.intFromLE(e)},i.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../../elliptic":43,"./key":54,"./signature":55,"hash.js":59}],54:[function(e,t,r){"use strict";function i(e,t){this.eddsa=e,this._secret=f(t.secret),
|
|
e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=f(t.pub)}var n=e("../../elliptic"),a=n.utils,o=a.assert,f=a.parseBytes,s=a.cachedProperty;i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},s(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),s(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),s(i,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i}),s(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),s(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),s(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),a.encode(this.secret(),e)},i.prototype.getPublic=function(e){return a.encode(this.pubBytes(),e)},t.exports=i},{"../../elliptic":43}],55:[function(e,t,r){"use strict";function i(e,t){this.eddsa=e,"object"!=typeof t&&(t=c(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),f(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var n=e("bn.js"),a=e("../../elliptic"),o=a.utils,f=o.assert,s=o.cachedProperty,c=o.parseBytes;s(i,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),s(i,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),s(i,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),s(i,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=i},{"../../elliptic":43,"bn.js":41}],56:[function(e,t,r){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],57:[function(e,t,r){"use strict";function i(e,t){for(var r=[],i=1<<t+1,n=e.clone();n.cmpn(1)>=0;){var a;if(n.isOdd()){var o=n.andln(i-1);a=o>(i>>1)-1?(i>>1)-o:o,n.isubn(a)}else a=0;r.push(a);for(var f=0!==n.cmpn(0)&&0===n.andln(i-1)?t+1:1,s=1;s<f;s++)r.push(0);n.iushrn(f)}return r}function n(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0;e.cmpn(-i)>0||t.cmpn(-n)>0;){var a=e.andln(3)+i&3,o=t.andln(3)+n&3;3===a&&(a=-1),3===o&&(o=-1);var f;if(0==(1&a))f=0;else{var s=e.andln(7)+i&7;f=3!==s&&5!==s||2!==o?a:-a}r[0].push(f);var c;if(0==(1&o))c=0;else{var s=t.andln(7)+n&7;c=3!==s&&5!==s||2!==a?o:-o}r[1].push(c),2*i===f+1&&(i=1-i),2*n===c+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r}function a(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}}function o(e){return"string"==typeof e?s.toArray(e,"hex"):e}function f(e){return new c(e,"hex","le")}var s=r,c=e("bn.js"),u=e("minimalistic-assert"),h=e("minimalistic-crypto-utils");s.assert=u,s.toArray=h.toArray,s.zero2=h.zero2,s.toHex=h.toHex,s.encode=h.encode,s.getNAF=i,s.getJSF=n,s.cachedProperty=a,s.parseBytes=o,s.intFromLE=f},{"bn.js":41,"minimalistic-assert":66,"minimalistic-crypto-utils":67}],58:[function(e,t,r){function i(e){this.rand=e}var n;if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=e("crypto");if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},{crypto:3}],59:[function(e,t,r){var i=r;i.utils=e("./hash/utils"),i.common=e("./hash/common"),i.sha=e("./hash/sha"),i.ripemd=e("./hash/ripemd"),i.hmac=e("./hash/hmac"),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},{"./hash/common":60,"./hash/hmac":61,"./hash/ripemd":62,"./hash/sha":63,"./hash/utils":64}],60:[function(e,t,r){function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var n=e("../hash"),a=n.utils,o=a.assert;r.BlockHash=i,i.prototype.update=function(e,t){if(e=a.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=a.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,
|
|
"big"===this.endian){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else{i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0;for(var a=8;a<this.padLength;a++)i[n++]=0}return i}},{"../hash":59}],61:[function(e,t,r){function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(a.toArray(t,r))}var n=e("../hash"),a=n.utils,o=a.assert;t.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(var t=0;t<e.length;t++)e[t]^=54;this.inner=(new this.Hash).update(e);for(var t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"../hash":59}],62:[function(e,t,r){function i(){if(!(this instanceof i))return new i;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function n(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function a(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function o(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var f=e("../hash"),s=f.utils,c=s.rotl32,u=s.sum32,h=s.sum32_3,d=s.sum32_4,l=f.common.BlockHash;s.inherits(i,l),r.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(e,t){for(var r=this.h[0],i=this.h[1],f=this.h[2],s=this.h[3],l=this.h[4],m=r,g=i,w=f,_=s,k=l,S=0;S<80;S++){var E=u(c(d(r,n(S,i,f,s),e[p[S]+t],a(S)),v[S]),l);r=l,l=s,s=c(f,10),f=i,i=E,E=u(c(d(m,n(79-S,g,w,_),e[b[S]+t],o(S)),y[S]),k),m=k,k=_,_=c(w,10),w=g,g=E}E=h(this.h[1],f,_),this.h[1]=h(this.h[2],s,k),this.h[2]=h(this.h[3],l,m),this.h[3]=h(this.h[4],r,g),this.h[4]=h(this.h[0],i,w),this.h[0]=E},i.prototype._digest=function(e){return"hex"===e?s.toHex32(this.h,"little"):s.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"../hash":59}],63:[function(e,t,r){function i(){if(!(this instanceof i))return new i;V.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Y,this.W=new Array(64)}function n(){if(!(this instanceof n))return new n;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}function a(){if(!(this instanceof a))return new a;V.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=W,this.W=new Array(160)}function o(){if(!(this instanceof o))return new o;a.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}function f(){if(!(this instanceof f))return new f;V.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}function s(e,t,r){return e&t^~e&r}function c(e,t,r){return e&t^e&r^t&r}function u(e,t,r){return e^t^r}function h(e){return R(e,2)^R(e,13)^R(e,22)}function d(e){return R(e,6)^R(e,11)^R(e,25)}function l(e){return R(e,7)^R(e,18)^e>>>3}function p(e){return R(e,17)^R(e,19)^e>>>10}function b(e,t,r,i){return 0===e?s(t,r,i):1===e||3===e?u(t,r,i):2===e?c(t,r,i):void 0}function v(e,t,r,i,n,a){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function y(e,t,r,i,n,a){var o=t&i^~t&a;return o<0&&(o+=4294967296),o}function m(e,t,r,i,n,a){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function g(e,t,r,i,n,a){var o=t&i^t&a^i&a;return o<0&&(o+=4294967296),o}function w(e,t){var r=D(e,t,28),i=D(t,e,2),n=D(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function _(e,t){var r=U(e,t,28),i=U(t,e,2),n=U(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function k(e,t){var r=D(e,t,14),i=D(e,t,18),n=D(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function S(e,t){var r=U(e,t,14),i=U(e,t,18),n=U(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function E(e,t){var r=D(e,t,1),i=D(e,t,8),n=O(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function M(e,t){var r=U(e,t,1),i=U(e,t,8),n=N(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function A(e,t){var r=D(e,t,19),i=D(t,e,29),n=O(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}function x(e,t){var r=U(e,t,19),i=U(t,e,29),n=N(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}var B=e("../hash"),I=B.utils,C=I.assert,R=I.rotr32,T=I.rotl32,P=I.sum32,L=I.sum32_4,j=I.sum32_5,D=I.rotr64_hi,U=I.rotr64_lo,O=I.shr64_hi,N=I.shr64_lo,q=I.sum64,F=I.sum64_hi,z=I.sum64_lo,K=I.sum64_4_hi,X=I.sum64_4_lo,H=I.sum64_5_hi,J=I.sum64_5_lo,V=B.common.BlockHash,Y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],G=[1518500249,1859775393,2400959708,3395469782];I.inherits(i,V),r.sha256=i,i.blockSize=512,i.outSize=256,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=L(p(r[i-2]),r[i-7],l(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],o=this.h[2],f=this.h[3],u=this.h[4],b=this.h[5],v=this.h[6],y=this.h[7];C(this.k.length===r.length);for(var i=0;i<r.length;i++){var m=j(y,d(u),s(u,b,v),this.k[i],r[i]),g=P(h(n),c(n,a,o));y=v,v=b,b=u,u=P(f,m),f=o,o=a,a=n,n=P(m,g)}this.h[0]=P(this.h[0],n),this.h[1]=P(this.h[1],a),this.h[2]=P(this.h[2],o),this.h[3]=P(this.h[3],f),this.h[4]=P(this.h[4],u),this.h[5]=P(this.h[5],b),this.h[6]=P(this.h[6],v),this.h[7]=P(this.h[7],y)},i.prototype._digest=function(e){return"hex"===e?I.toHex32(this.h,"big"):I.split32(this.h,"big")},I.inherits(n,i),r.sha224=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(e){return"hex"===e?I.toHex32(this.h.slice(0,7),"big"):I.split32(this.h.slice(0,7),"big")},I.inherits(a,V),r.sha512=a,a.blockSize=1024,a.outSize=512,a.hmacStrength=192,a.padLength=128,a.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=A(r[i-4],r[i-3]),a=x(r[i-4],r[i-3]),o=r[i-14],f=r[i-13],s=E(r[i-30],r[i-29]),c=M(r[i-30],r[i-29]),u=r[i-32],h=r[i-31];r[i]=K(n,a,o,f,s,c,u,h),r[i+1]=X(n,a,o,f,s,c,u,h)}},a.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],n=this.h[1],a=this.h[2],o=this.h[3],f=this.h[4],s=this.h[5],c=this.h[6],u=this.h[7],h=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],b=this.h[12],E=this.h[13],M=this.h[14],A=this.h[15];C(this.k.length===r.length);for(var x=0;x<r.length;x+=2){var B=M,I=A,R=k(h,d),T=S(h,d),P=v(h,d,l,p,b,E),L=y(h,d,l,p,b,E),j=this.k[x],D=this.k[x+1],U=r[x],O=r[x+1],N=H(B,I,R,T,P,L,j,D,U,O),K=J(B,I,R,T,P,L,j,D,U,O),B=w(i,n),I=_(i,n),R=m(i,n,a,o,f,s),T=g(i,n,a,o,f,s),X=F(B,I,R,T),V=z(B,I,R,T);M=b,A=E,b=l,E=p,l=h,p=d,h=F(c,u,N,K),d=z(u,u,N,K),c=f,u=s,f=a,s=o,a=i,o=n,i=F(N,K,X,V),n=z(N,K,X,V)}q(this.h,0,i,n),q(this.h,2,a,o),q(this.h,4,f,s),q(this.h,6,c,u),q(this.h,8,h,d),q(this.h,10,l,p),q(this.h,12,b,E),q(this.h,14,M,A)},a.prototype._digest=function(e){return"hex"===e?I.toHex32(this.h,"big"):I.split32(this.h,"big")},I.inherits(o,a),r.sha384=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?I.toHex32(this.h.slice(0,12),"big"):I.split32(this.h.slice(0,12),"big")},I.inherits(f,V),r.sha1=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=T(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);for(var n=this.h[0],a=this.h[1],o=this.h[2],f=this.h[3],s=this.h[4],i=0;i<r.length;i++){var c=~~(i/20),u=j(T(n,5),b(c,a,o,f),s,r[i],G[c]);s=f,f=o,o=T(a,30),a=n,n=u}this.h[0]=P(this.h[0],n),this.h[1]=P(this.h[1],a),this.h[2]=P(this.h[2],o),this.h[3]=P(this.h[3],f),this.h[4]=P(this.h[4],s)},f.prototype._digest=function(e){return"hex"===e?I.toHex32(this.h,"big"):I.split32(this.h,"big")}},{"../hash":59}],64:[function(e,t,r){function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,o=255&n;a?r.push(a,o):r.push(o)}else for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}function n(e){for(var t="",r=0;r<e.length;r++)t+=f(e[r].toString(16));return t}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];"little"===t&&(n=a(n)),r+=s(n.toString(16))}return r}function f(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function c(e,t,r,i){var n=r-t;y(n%4==0);for(var a=new Array(n/4),o=0,f=t;o<a.length;o++,f+=4){var s;s="big"===i?e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3]:e[f+3]<<24|e[f+2]<<16|e[f+1]<<8|e[f],a[o]=s>>>0}return a}function u(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var a=e[i];"big"===t?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r}function h(e,t){return e>>>t|e<<32-t}function d(e,t){return e<<t|e>>>32-t}function l(e,t){return e+t>>>0}function p(e,t,r){return e+t+r>>>0}function b(e,t,r,i){return e+t+r+i>>>0}function v(e,t,r,i,n){return e+t+r+i+n>>>0}function y(e,t){if(!e)throw new Error(t||"Assertion failed")}function m(e,t,r,i){var n=e[t],a=e[t+1],o=i+a>>>0,f=(o<i?1:0)+r+n;e[t]=f>>>0,e[t+1]=o}function g(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0}function w(e,t,r,i){return t+i>>>0}function _(e,t,r,i,n,a,o,f){var s=0,c=t;return c=c+i>>>0,s+=c<t?1:0,c=c+a>>>0,s+=c<a?1:0,c=c+f>>>0,s+=c<f?1:0,e+r+n+o+s>>>0}function k(e,t,r,i,n,a,o,f){return t+i+a+f>>>0}function S(e,t,r,i,n,a,o,f,s,c){var u=0,h=t;return h=h+i>>>0,u+=h<t?1:0,h=h+a>>>0,u+=h<a?1:0,h=h+f>>>0,u+=h<f?1:0,h=h+c>>>0,u+=h<c?1:0,e+r+n+o+s+u>>>0}function E(e,t,r,i,n,a,o,f,s,c){return t+i+a+f+c>>>0}function M(e,t,r){return(t<<32-r|e>>>r)>>>0}function A(e,t,r){return(e<<32-r|t>>>r)>>>0}function x(e,t,r){return e>>>r}function B(e,t,r){return(e<<32-r|t>>>r)>>>0}var I=r,C=e("inherits");I.toArray=i,I.toHex=n,I.htonl=a,I.toHex32=o,I.zero2=f,I.zero8=s,I.join32=c,I.split32=u,I.rotr32=h,I.rotl32=d,I.sum32=l,I.sum32_3=p,I.sum32_4=b,I.sum32_5=v,I.assert=y,I.inherits=C,r.sum64=m,r.sum64_hi=g,r.sum64_lo=w,r.sum64_4_hi=_,r.sum64_4_lo=k,r.sum64_5_hi=S,r.sum64_5_lo=E,r.rotr64_hi=M,r.rotr64_lo=A,r.shr64_hi=x,r.shr64_lo=B},{inherits:208}],65:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=a.toArray(e.entropy,e.entropyEnc||"hex"),r=a.toArray(e.nonce,e.nonceEnc||"hex"),n=a.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var n=e("hash.js"),a=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");t.exports=i,i.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this.reseed=1,this.reseedInterval=281474976710656},i.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},i.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},i.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=a.toArray(e,t),r=a.toArray(r,i),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},i.prototype.generate=function(e,t,r,i){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=a.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,e);return this._update(r),this.reseed++,a.encode(o,t)}},{"hash.js":59,"minimalistic-assert":66,"minimalistic-crypto-utils":67}],66:[function(e,t,r){arguments[4][36][0].apply(r,arguments)},{dup:36}],67:[function(e,t,r){"use strict";function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,o=255&n;a?r.push(a,o):r.push(o)}return r}function n(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}var o=r;o.toArray=i,o.zero2=n,o.toHex=a,o.encode=function(e,t){return"hex"===t?a(e):e}},{}],68:[function(e,t,r){t.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},readme:"# Elliptic [](http://travis-ci.org/indutny/elliptic) [](https://coveralls.io/github/indutny/elliptic?branch=master) [](https://codeclimate.com/github/indutny/elliptic)\n\n[](https://saucelabs.com/u/gh-indutny-elliptic)\n\nFast elliptic-curve cryptography in a plain javascript implementation.\n\nNOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve\nfor your cryptography operations.\n\n## Incentive\n\nECC is much slower than regular RSA cryptography, the JS implementations are\neven more slower.\n\n## Benchmarks\n\n```bash\n$ node benchmarks/index.js\nBenchmarking: sign\nelliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)\neccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)\n------------------------\nFastest is elliptic#sign\n========================\nBenchmarking: verify\nelliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)\neccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)\n------------------------\nFastest is elliptic#verify\n========================\nBenchmarking: gen\nelliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)\neccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)\n------------------------\nFastest is elliptic#gen\n========================\nBenchmarking: ecdh\nelliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)\n------------------------\nFastest is elliptic#ecdh\n========================\n```\n\n## API\n\n### ECDSA\n\n```javascript\nvar EC = require('elliptic').ec;\n\n// Create and initialize EC context\n// (better do it once and reuse it)\nvar ec = new EC('secp256k1');\n\n// Generate keys\nvar key = ec.genKeyPair();\n\n// Sign message (must be an array, or it'll be treated as a hex sequence)\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\nvar signature = key.sign(msg);\n\n// Export DER encoded signature in Array\nvar derSign = signature.toDER();\n\n// Verify signature\nconsole.log(key.verify(msg, derSign));\n\n// CHECK WITH NO PRIVATE KEY\n\n// Public key as '04 + x + y'\nvar pub = '04bb1fa3...';\n\n// Signature MUST be either:\n// 1) hex-string of DER-encoded signature; or\n// 2) DER-encoded signature as buffer; or\n// 3) object with two hex-string properties (r and s)\n\nvar signature = 'b102ac...'; // case 1\nvar signature = new Buffer('...'); // case 2\nvar signature = { r: 'b1fc...', s: '9c42...' }; // case 3\n\n// Import public key\nvar key = ec.keyFromPublic(pub, 'hex');\n\n// Verify signature\nconsole.log(key.verify(msg, signature));\n```\n\n### EdDSA\n\n```javascript\nvar EdDSA = require('elliptic').eddsa;\n\n// Create and initialize EdDSA context\n// (better do it once and reuse it)\nvar ec = new EdDSA('ed25519');\n\n// Create key pair from secret\nvar key = ec.keyFromSecret('693e3c...'); // hex string, array or Buffer\n\n// Sign message (must be an array, or it'll be treated as a hex sequence)\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\nvar signature = key.sign(msg).toHex();\n\n// Verify signature\nconsole.log(key.verify(msg, signature));\n\n// CHECK WITH NO PRIVATE KEY\n\n// Import public key\nvar pub = '0a1af638...';\nvar key = ec.keyFromPublic(pub, 'hex');\n\n// Verify signature\nvar signature = '70bed1...';\nconsole.log(key.verify(msg, signature));\n```\n\n### ECDH\n\n```javascript\nvar EC = require('elliptic').ec;\nvar ec = new EC('curve25519');\n\n// Generate keys\nvar key1 = ec.genKeyPair();\nvar key2 = ec.genKeyPair();\n\nvar shared1 = key1.derive(key2.getPublic());\nvar shared2 = key2.derive(key1.getPublic());\n\nconsole.log('Both shared secrets are BN instances');\nconsole.log(shared1.toString(16));\nconsole.log(shared2.toString(16));\n```\n\nthree and more members:\n```javascript\nvar EC = require('elliptic').ec;\nvar ec = new EC('curve25519');\n\nvar A = ec.genKeyPair();\nvar B = ec.genKeyPair();\nvar C = ec.genKeyPair();\n\nvar AB = A.getPublic().mul(B.getPrivate())\nvar BC = B.getPublic().mul(C.getPrivate())\nvar CA = C.getPublic().mul(A.getPrivate())\n\nvar ABC = AB.mul(C.getPrivate())\nvar BCA = BC.mul(A.getPrivate())\nvar CAB = CA.mul(B.getPrivate())\n\nconsole.log(ABC.getX().toString(16))\nconsole.log(BCA.getX().toString(16))\nconsole.log(CAB.getX().toString(16))\n```\n\nNOTE: `.derive()` returns a [BN][1] instance.\n\n## Supported curves\n\nElliptic.js support following curve types:\n\n* Short Weierstrass\n* Montgomery\n* Edwards\n* Twisted Edwards\n\nFollowing curve 'presets' are embedded into the library:\n\n* `secp256k1`\n* `p192`\n* `p224`\n* `p256`\n* `p384`\n* `p521`\n* `curve25519`\n* `ed25519`\n\nNOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.\n\n### Implementation details\n\nECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of\nthe curve operations are performed on non-affine coordinates (either projective\nor extended), various windowing techniques are used for different cases.\n\nAll operations are performed in reduction context using [bn.js][1], hashing is\nprovided by [hash.js][2]\n\n### Related projects\n\n* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both\n browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for\n node)\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://tools.ietf.org/html/rfc6979\n[1]: https://github.com/indutny/bn.js\n[2]: https://github.com/indutny/hash.js\n[3]: https://github.com/bitchan/eccrypto\n[4]: https://github.com/wanderer/secp256k1-node\n",readmeFilename:"README.md",_id:"elliptic@6.4.0",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_resolved:"http://10.0.0.106:8080/e/elliptic/_attachments/elliptic-6.4.0.tgz",_from:"elliptic@>=6.0.0 <7.0.0"}},{}],69:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],70:[function(e,t,r){"use strict";var i=e("asn1.js");r.certificate=e("./certificate");var n=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=n;var a=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=a;var o=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(f),this.key("subjectPublicKey").bitstr())});r.PublicKey=o;var f=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),s=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(f),this.key("subjectPrivateKey").octstr())});r.PrivateKey=s;var c=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=c;var u=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=u,r.DSAparam=i.define("DSAparam",function(){this.int()});var h=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=h;var d=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":71,"asn1.js":74}],71:[function(e,t,r){"use strict";var i=e("asn1.js"),n=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),a=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),f=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),s=i.define("RelativeDistinguishedName",function(){this.setof(a)}),c=i.define("RDNSequence",function(){this.seqof(s)}),u=i.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),h=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),d=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(f),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),p=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":74}],72:[function(e,t,r){(function(r){var i=e("evp_bytestokey"),n=e("browserify-aes");t.exports=function(e,t){var a,o=e.toString(),f=o.match(/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m);if(f){var s="aes"+f[1],c=new r(f[2],"hex"),u=new r(f[3].replace(/\r?\n/g,""),"base64"),h=i(t,c.slice(0,8),parseInt(f[1],10)).key,d=[],l=n.createDecipheriv(s,h,c);d.push(l.update(u)),d.push(l.final()),a=r.concat(d)}else{a=new r(o.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m)[2].replace(/\r?\n/g,""),"base64")}return{tag:o.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m)[1],data:a}}}).call(this,e("buffer").Buffer)},{"browserify-aes":91,buffer:4,evp_bytestokey:106}],73:[function(e,t,r){(function(r){function i(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var i,o,s=f(e,t),c=s.tag,u=s.data;switch(c){case"CERTIFICATE":o=a.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=a.PublicKey.decode(u,"der")),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=a.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+c);case"ENCRYPTED PRIVATE KEY":u=a.EncryptedPrivateKey.decode(u,"der"),u=n(u,t);case"PRIVATE KEY":switch(o=a.PrivateKey.decode(u,"der"),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:a.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=a.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+c);case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return u=a.ECPrivateKey.decode(u,"der"),{curve:u.parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+c)}}function n(e,t){
|
|
var i=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=o[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(a.split("-")[1],10)/8,d=c.pbkdf2Sync(t,i,n,h),l=s.createDecipheriv(a,d,f),p=[];return p.push(l.update(u)),p.push(l.final()),r.concat(p)}var a=e("./asn1"),o=e("./aesid.json"),f=e("./fixProc"),s=e("browserify-aes"),c=e("pbkdf2");t.exports=i,i.signature=a.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":69,"./asn1":70,"./fixProc":72,"browserify-aes":91,buffer:4,pbkdf2:158}],74:[function(e,t,r){var i=r;i.bignum=e("bn.js"),i.define=e("./asn1/api").define,i.base=e("./asn1/base"),i.constants=e("./asn1/constants"),i.decoders=e("./asn1/decoders"),i.encoders=e("./asn1/encoders")},{"./asn1/api":75,"./asn1/base":77,"./asn1/constants":81,"./asn1/decoders":83,"./asn1/encoders":86,"bn.js":41}],75:[function(e,t,r){function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var n=e("../asn1"),a=e("inherits");r.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return a(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},i.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},i.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":74,inherits:208,vm:230}],76:[function(e,t,r){function i(e,t){if(o.call(this,t),!f.isBuffer(e))return void this.error("Input not Buffer");this.base=e,this.offset=0,this.length=e.length}function n(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof n||(e=new n(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=f.byteLength(e);else{if(!f.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var a=e("inherits"),o=e("../base").Reporter,f=e("buffer").Buffer;a(i,o),r.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},i.prototype.restore=function(e){var t=new i(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},i.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new i(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},i.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=n,n.prototype.join=function(e,t){return e||(e=new f(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):f.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":77,buffer:4,inherits:208}],77:[function(e,t,r){var i=r;i.Reporter=e("./reporter").Reporter,i.DecoderBuffer=e("./buffer").DecoderBuffer,i.EncoderBuffer=e("./buffer").EncoderBuffer,i.Node=e("./node")},{"./buffer":76,"./node":78,"./reporter":79}],78:[function(e,t,r){function i(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var n=e("../base").Reporter,a=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,f=e("minimalistic-assert"),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s),u=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=i;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];i.prototype.clone=function(){var e=this._baseState,t={};h.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},i.prototype._wrap=function(){var e=this._baseState;c.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},i.prototype._init=function(e){var t=this._baseState;f(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),f.equal(t.children.length,1,"Root node can have only one child")},i.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(f(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(f(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0),t[e[r]]=r}),t}))},u.forEach(function(e){i.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){i.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return f(null===t.tag),t.tag=e,this._useArgs(r),this}}),i.prototype.use=function(e){f(e);var t=this._baseState;return f(null===t.use),t.use=e,this},i.prototype.optional=function(){return this._baseState.optional=!0,this},i.prototype.def=function(e){var t=this._baseState;return f(null===t.default),t.default=e,t.optional=!0,this},i.prototype.explicit=function(e){var t=this._baseState;return f(null===t.explicit&&null===t.implicit),t.explicit=e,this},i.prototype.implicit=function(e){var t=this._baseState;return f(null===t.explicit&&null===t.implicit),t.implicit=e,this},i.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},i.prototype.key=function(e){var t=this._baseState;return f(null===t.key),t.key=e,this},i.prototype.any=function(){return this._baseState.any=!0,this},i.prototype.choice=function(e){var t=this._baseState;return f(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},i.prototype.contains=function(e){var t=this._baseState;return f(null===t.use),t.contains=e,this},i.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var i=r.default,n=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){var f=null;if(null!==r.explicit?f=r.explicit:null!==r.implicit?f=r.implicit:null!==r.tag&&(f=r.tag),null!==f||r.any){if(n=this._peekTag(e,f,r.any),e.isError(n))return n}else{var s=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),n=!0}catch(e){n=!1}e.restore(s)}}var c;if(r.obj&&n&&(c=e.enterObject()),n){if(null!==r.explicit){var u=this._decodeTag(e,r.explicit);if(e.isError(u))return u;e=u}var h=e.offset;if(null===r.use&&null===r.choice){if(r.any)var s=e.save();var d=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(d))return d;r.any?i=e.raw(s):e=d}if(t&&t.track&&null!==r.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var l=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(l,t)}}return r.obj&&n&&(i=e.leaveObject(c)),null===r.key||null===i&&n!==!0?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},i.prototype._decodeGeneric=function(e,t,r){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},i.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),f(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},i.prototype._decodeChoice=function(e,t){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some(function(a){var o=e.save(),f=r.choice[a];try{var s=f._decode(e,t);if(e.isError(s))return!1;i={type:a,value:s},n=!0}catch(t){return e.restore(o),!1}return!0},this),n?i:e.error("Choice not matched")},i.prototype._createEncoderBuffer=function(e){return new a(e,this.reporter)},i.prototype._encode=function(e,t,r){var i=this._baseState;if(null===i.default||i.default!==e){var n=this._encodeValue(e,t,r);if(void 0!==n&&!this._skipDefault(n,t,r))return n}},i.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var a=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var o=null,f=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,r)._encode(e,t),f=!0;else if(i.children)o=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),n},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)},s))}else null!==i.use?a=this._getUse(i.use,r)._encode(e,t):(o=this._encodePrimitive(i.tag,e),f=!0);var a;if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,u=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be ommited only for .use()"):null===i.use&&(a=this._encodeComposite(c,f,u,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},i.prototype._encodeChoice=function(e,t){var r=this._baseState,i=r.choice[e.type];return i||f(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(e.value,t)},i.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},i.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},i.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":77,"minimalistic-assert":88}],79:[function(e,t,r){function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function n(e,t){this.path=e,this.rethrow(t)}var a=e("inherits");r.Reporter=i,i.prototype.isError=function(e){return e instanceof n},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,i=e instanceof n;if(t=i?e:new n(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return i||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},a(n,Error),n.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,n),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:208}],80:[function(e,t,r){var i=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=i._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=i._reverse(r.tag)},{"../constants":81}],81:[function(e,t,r){var i=r;i._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0),t[e[r]]=r}),t},i.der=e("./der")},{"./der":80}],82:[function(e,t,r){function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new n,this.tree._init(e.body)}function n(e){c.Node.call(this,"der",e)}function a(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=h.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:h.tag[r]}}function o(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var o=e.readUInt8(r);if(e.isError(o))return o;i|=o}return i}var f=e("inherits"),s=e("../../asn1"),c=s.base,u=s.bignum,h=s.constants.der;t.exports=i,i.prototype.decode=function(e,t){return e instanceof c.DecoderBuffer||(e=new c.DecoderBuffer(e,t)),this.tree._decode(e,t)},f(n,c.Node),n.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var i=e.save(),n=a(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},n.prototype._decodeTag=function(e,t,r){var i=a(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=o(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(i.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var f=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(n=e.offset-f.offset,e.restore(f),e.skip(n,'Failed to match body of: "'+t+'"'))},n.prototype._skipUntilEnd=function(e,t){for(;;){var r=a(e,t);if(e.isError(r))return r;var i=o(e,r.primitive,t);if(e.isError(i))return i;var n;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},n.prototype._decodeList=function(e,t,r,i){for(var n=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var o=r.decode(e,"der",i);if(e.isError(o)&&a)break;n.push(o)}return n},n.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var i=e.raw();if(i.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var n="",a=0;a<i.length/2;a++)n+=String.fromCharCode(i.readUInt16BE(2*a));return n}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var f=e.raw().toString("ascii");return this._isPrintstr(f)?f:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},n.prototype._decodeObjid=function(e,t,r){for(var i,n=[],a=0;!e.isEmpty();){var o=e.readUInt8();a<<=7,a|=127&o,0==(128&o)&&(n.push(a),a=0)}128&o&&n.push(a);var f=n[0]/40|0,s=n[0]%40;if(i=r?n:[f,s].concat(n.slice(1)),t){var c=t[i.join(" ")];void 0===c&&(c=t[i.join(".")]),void 0!==c&&(i=c)}return i},n.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var i=0|r.slice(0,4),n=0|r.slice(4,6),a=0|r.slice(6,8),o=0|r.slice(8,10),f=0|r.slice(10,12),s=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");var i=0|r.slice(0,2),n=0|r.slice(2,4),a=0|r.slice(4,6),o=0|r.slice(6,8),f=0|r.slice(8,10),s=0|r.slice(10,12);i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,a,o,f,s,0)},n.prototype._decodeNull=function(e){return null},n.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},n.prototype._decodeInt=function(e,t){var r=e.raw(),i=new u(r);return t&&(i=t[i.toString(10)]||i),i},n.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":74,inherits:208}],83:[function(e,t,r){var i=r;i.der=e("./der"),i.pem=e("./pem")},{"./der":82,"./pem":84}],84:[function(e,t,r){function i(e){o.call(this,e),this.enc="pem"}var n=e("inherits"),a=e("buffer").Buffer,o=e("./der");n(i,o),t.exports=i,i.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),n=-1,f=-1,s=0;s<r.length;s++){var c=r[s].match(/^-----(BEGIN|END) ([^-]+)-----$/);if(null!==c&&c[2]===i){if(n!==-1){if("END"!==c[1])break;f=s;break}if("BEGIN"!==c[1])break;n=s}}if(n===-1||f===-1)throw new Error("PEM section not found for: "+i);var u=r.slice(n+1,f).join("");u.replace(/[^a-z0-9\+\/=]+/gi,"");var h=new a(u,"base64");return o.prototype.decode.call(this,h,t)}},{"./der":82,buffer:4,inherits:208}],85:[function(e,t,r){function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new n,this.tree._init(e.body)}function n(e){u.Node.call(this,"der",e)}function a(e){return e<10?"0"+e:e}function o(e,t,r,i){var n;if("seqof"===e?e="seq":"setof"===e&&(e="set"),h.tagByName.hasOwnProperty(e))n=h.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);n=e}return n>=31?i.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=h.tagClassByName[r||"universal"]<<6)}var f=e("inherits"),s=e("buffer").Buffer,c=e("../../asn1"),u=c.base,h=c.constants.der;t.exports=i,i.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},f(n,u.Node),n.prototype._encodeComposite=function(e,t,r,i){var n=o(e,t,r,this.reporter);if(i.length<128){var a=new s(2);return a[0]=n,a[1]=i.length,this._createEncoderBuffer([a,i])}for(var f=1,c=i.length;c>=256;c>>=8)f++;var a=new s(2+f);a[0]=n,a[1]=128|f;for(var c=1+f,u=i.length;u>0;c--,u>>=8)a[c]=255&u;return this._createEncoderBuffer([a,i])},n.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new s(2*e.length),i=0;i<e.length;i++)r.writeUInt16BE(e.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},n.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(var i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var n=0,i=0;i<e.length;i++){var a=e[i];for(n++;a>=128;a>>=7)n++}for(var o=new s(n),f=o.length-1,i=e.length-1;i>=0;i--){var a=e[i];for(o[f--]=127&a;(a>>=7)>0;)o[f--]=128|127&a}return this._createEncoderBuffer(o)},n.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[a(i.getFullYear()),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[a(i.getFullYear()%100),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},n.prototype._encodeNull=function(){return this._createEncoderBuffer("")},n.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!s.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new s(r)}if(s.isBuffer(e)){var i=e.length;0===e.length&&i++;var n=new s(i);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var i=1,a=e;a>=256;a>>=8)i++;for(var n=new Array(i),a=n.length-1;a>=0;a--)n[a]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new s(n))},n.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},n.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},n.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var a=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==n.defaultBuffer[i])return!1;return!0}},{"../../asn1":74,buffer:4,inherits:208}],86:[function(e,t,r){var i=r;i.der=e("./der"),i.pem=e("./pem")},{"./der":85,"./pem":87}],87:[function(e,t,r){function i(e){a.call(this,e),this.enc="pem"}var n=e("inherits"),a=e("./der");n(i,a),t.exports=i,i.prototype.encode=function(e,t){for(var r=a.prototype.encode.call(this,e),i=r.toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o<i.length;o+=64)n.push(i.slice(o,o+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":85,inherits:208}],88:[function(e,t,r){arguments[4][36][0].apply(r,arguments)},{dup:36}],89:[function(e,t,r){(function(e){function t(e){var t;return e>f||e<0?(t=Math.abs(e)%f,e<0?f-t:t):e}function i(e){for(;0<e.length;e++)e[0]=0;return!1}function n(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function a(e){for(var t=e.length/4,r=new Array(t),i=-1;++i<t;)r[i]=e.readUInt32BE(4*i);return r}function o(e){this._key=a(e),this._doReset()}var f=Math.pow(2,32);n.prototype.init=function(){var e,t,r,i,n,a,o,f,s,c;for(e=function(){var e,r;for(r=[],t=e=0;e<256;t=++e)t<128?r.push(t<<1):r.push(t<<1^283);return r}(),n=0,s=0,t=c=0;c<256;t=++c)r=s^s<<1^s<<2^s<<3^s<<4,r=r>>>8^255&r^99,this.SBOX[n]=r,this.INV_SBOX[r]=n,a=e[n],o=e[a],f=e[o],i=257*e[r]^16843008*r,this.SUB_MIX[0][n]=i<<24|i>>>8,this.SUB_MIX[1][n]=i<<16|i>>>16,this.SUB_MIX[2][n]=i<<8|i>>>24,this.SUB_MIX[3][n]=i,i=16843009*f^65537*o^257*a^16843008*n,this.INV_SUB_MIX[0][r]=i<<24|i>>>8,this.INV_SUB_MIX[1][r]=i<<16|i>>>16,this.INV_SUB_MIX[2][r]=i<<8|i>>>24,this.INV_SUB_MIX[3][r]=i,0===n?n=s=1:(n=a^e[e[e[f^a]]],s^=e[e[s]]);return!0};var s=new n;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var e,t,r,i,n,a;for(r=this._key,t=r.length,this._nRounds=t+6,n=4*(this._nRounds+1),this._keySchedule=[],i=0;i<n;i++)this._keySchedule[i]=i<t?r[i]:(a=this._keySchedule[i-1],i%t==0?(a=a<<8|a>>>24,a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=s.RCON[i/t|0]<<24):t>6&&i%t==4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),this._keySchedule[i-t]^a);for(this._invKeySchedule=[],e=0;e<n;e++)i=n-e,a=this._keySchedule[i-(e%4?0:4)],this._invKeySchedule[e]=e<4||i<=4?a:s.INV_SUB_MIX[0][s.SBOX[a>>>24]]^s.INV_SUB_MIX[1][s.SBOX[a>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[a>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&a]];return!0},o.prototype.encryptBlock=function(t){t=a(new e(t));var r=this._doCryptBlock(t,this._keySchedule,s.SUB_MIX,s.SBOX),i=new e(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[1],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[3],12),i},o.prototype.decryptBlock=function(t){t=a(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var i=this._doCryptBlock(t,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX),n=new e(16);return n.writeUInt32BE(i[0],0),n.writeUInt32BE(i[3],4),n.writeUInt32BE(i[2],8),n.writeUInt32BE(i[1],12),n},o.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},o.prototype._doCryptBlock=function(e,r,i,n){var a,o,f,s,c,u,h,d,l;o=e[0]^r[0],f=e[1]^r[1],s=e[2]^r[2],c=e[3]^r[3],a=4;for(var p=1;p<this._nRounds;p++)u=i[0][o>>>24]^i[1][f>>>16&255]^i[2][s>>>8&255]^i[3][255&c]^r[a++],h=i[0][f>>>24]^i[1][s>>>16&255]^i[2][c>>>8&255]^i[3][255&o]^r[a++],d=i[0][s>>>24]^i[1][c>>>16&255]^i[2][o>>>8&255]^i[3][255&f]^r[a++],l=i[0][c>>>24]^i[1][o>>>16&255]^i[2][f>>>8&255]^i[3][255&s]^r[a++],o=u,f=h,s=d,c=l;return u=(n[o>>>24]<<24|n[f>>>16&255]<<16|n[s>>>8&255]<<8|n[255&c])^r[a++],h=(n[f>>>24]<<24|n[s>>>16&255]<<16|n[c>>>8&255]<<8|n[255&o])^r[a++],d=(n[s>>>24]<<24|n[c>>>16&255]<<16|n[o>>>8&255]<<8|n[255&f])^r[a++],l=(n[c>>>24]<<24|n[o>>>16&255]<<16|n[f>>>8&255]<<8|n[255&s])^r[a++],[t(u),t(h),t(d),t(l)]},r.AES=o}).call(this,e("buffer").Buffer)},{buffer:4}],90:[function(e,t,r){(function(r){function i(e,t,n,f){if(!(this instanceof i))return new i(e,t,n);o.call(this),this._finID=r.concat([n,new r([0,0,0,1])]),n=r.concat([n,new r([0,0,0,2])]),this._cipher=new a.AES(t),this._prev=new r(n.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=f,this._alen=0,this._len=0,n.copy(this._prev),this._mode=e;var c=new r(4);c.fill(0),this._ghash=new s(this._cipher.encryptBlock(c)),this._authTag=null,this._called=!1}function n(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=-1;++n<i;)r+=e[n]^t[n];return r}var a=e("./aes"),o=e("cipher-base"),f=e("inherits"),s=e("./ghash"),c=e("buffer-xor");f(i,o),t.exports=i,i.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=new r(t),t.fill(0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(n(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=e;this._cipher.scrub()},i.prototype.getAuthTag=function(){if(!this._decrypt&&r.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},i.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},i.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length}}).call(this,e("buffer").Buffer)},{"./aes":89,"./ghash":94,buffer:4,"buffer-xor":103,"cipher-base":104,inherits:208}],91:[function(e,t,r){arguments[4][12][0].apply(r,arguments)},{"./decrypter":92,"./encrypter":93,"./modes":95,dup:12}],92:[function(e,t,r){(function(t){function i(e,r,a){if(!(this instanceof i))return new i(e,r,a);c.call(this),this._cache=new n,this._last=void 0,this._cipher=new s.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function n(){if(!(this instanceof n))return new n;this.cache=new t("")}function a(e){for(var t=e[15],r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function o(e,r,n){var a=h[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new d(b[a.mode],r,n,!0):"auth"===a.type?new l(b[a.mode],r,n,!0):new i(b[a.mode],r,n)}function f(e,t){var r=h[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=p(t,!1,r.key,r.iv);return o(e,i.key,i.iv)}var s=e("./aes"),c=e("cipher-base"),u=e("inherits"),h=e("./modes"),d=e("./streamCipher"),l=e("./authCipher"),p=e("evp_bytestokey");u(i,c),i.prototype._update=function(e){this._cache.add(e);for(var r,i,n=[];r=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,r),n.push(i);return t.concat(n)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return a(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=t.concat([this.cache,e])},n.prototype.get=function(e){var t;if(e){
|
|
if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},n.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=f,r.createDecipheriv=o}).call(this,e("buffer").Buffer)},{"./aes":89,"./authCipher":90,"./modes":95,"./modes/cbc":96,"./modes/cfb":97,"./modes/cfb1":98,"./modes/cfb8":99,"./modes/ctr":100,"./modes/ecb":101,"./modes/ofb":102,"./streamCipher":105,buffer:4,"cipher-base":104,evp_bytestokey:106,inherits:208}],93:[function(e,t,r){(function(t){function i(e,r,a){if(!(this instanceof i))return new i(e,r,a);s.call(this),this._cache=new n,this._cipher=new f.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function n(){if(!(this instanceof n))return new n;this.cache=new t("")}function a(e,r,n){var a=u[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new d(p[a.mode],r,n):"auth"===a.type?new l(p[a.mode],r,n):new i(p[a.mode],r,n)}function o(e,t){var r=u[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=h(t,!1,r.key,r.iv);return a(e,i.key,i.iv)}var f=e("./aes"),s=e("cipher-base"),c=e("inherits"),u=e("./modes"),h=e("evp_bytestokey"),d=e("./streamCipher"),l=e("./authCipher");c(i,s),i.prototype._update=function(e){this._cache.add(e);for(var r,i,n=[];r=this._cache.get();)i=this._mode.encrypt(this,r),n.push(i);return t.concat(n)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=t.concat([this.cache,e])},n.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},n.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),i=-1;++i<e;)r.writeUInt8(e,i);return t.concat([this.cache,r])};var p={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createCipheriv=a,r.createCipher=o}).call(this,e("buffer").Buffer)},{"./aes":89,"./authCipher":90,"./modes":95,"./modes/cbc":96,"./modes/cfb":97,"./modes/cfb1":98,"./modes/cfb8":99,"./modes/ctr":100,"./modes/ecb":101,"./modes/ofb":102,"./streamCipher":105,buffer:4,"cipher-base":104,evp_bytestokey:106,inherits:208}],94:[function(e,t,r){(function(e){function r(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function n(t){t=t.map(a);var r=new e(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r}function a(e){var t;return e>s||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var f=new e(16);f.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},r.prototype._multiply=function(){for(var e,t,r,a=i(this.h),f=[0,0,0,0],s=-1;++s<128;){for(t=0!=(this.state[~~(s/8)]&1<<7-s%8),t&&(f=o(f,a)),r=0!=(1&a[3]),e=3;e>0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=n(f)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,f],16)),this.ghash(n([0,t,0,r])),this.state};var s=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:4}],95:[function(e,t,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],96:[function(e,t,r){arguments[4][17][0].apply(r,arguments)},{"buffer-xor":103,dup:17}],97:[function(e,t,r){(function(t){function i(e,r,i){var a=r.length,o=n(r,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,i?r:o]),o}var n=e("buffer-xor");r.encrypt=function(e,r,n){for(var a,o=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){o=t.concat([o,i(e,r,n)]);break}a=e._cache.length,o=t.concat([o,i(e,r.slice(0,a),n)]),r=r.slice(a)}return o}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":103}],98:[function(e,t,r){(function(e){function t(e,t,r){for(var n,a,o,f=-1,s=0;++f<8;)n=e._cipher.encryptBlock(e._prev),a=t&1<<7-f?128:0,o=n[0]^a,s+=(128&o)>>f%8,e._prev=i(e._prev,r?a:o);return s}function i(t,r){var i=t.length,n=-1,a=new e(t.length);for(t=e.concat([t,new e([r])]);++n<i;)a[n]=t[n]<<1|t[n+1]>>7;return a}r.encrypt=function(r,i,n){for(var a=i.length,o=new e(a),f=-1;++f<a;)o[f]=t(r,i[f],n);return o}}).call(this,e("buffer").Buffer)},{buffer:4}],99:[function(e,t,r){(function(e){function t(t,r,i){var n=t._cipher.encryptBlock(t._prev),a=n[0]^r;return t._prev=e.concat([t._prev.slice(1),new e([i?r:a])]),a}r.encrypt=function(r,i,n){for(var a=i.length,o=new e(a),f=-1;++f<a;)o[f]=t(r,i[f],n);return o}}).call(this,e("buffer").Buffer)},{buffer:4}],100:[function(e,t,r){(function(t){function i(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}function n(e){var t=e._cipher.encryptBlock(e._prev);return i(e._prev),t}var a=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var i=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),a(r,i)}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":103}],101:[function(e,t,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],102:[function(e,t,r){(function(t){function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var n=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,a)}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":103}],103:[function(e,t,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),a=0;a<i;++a)n[a]=t[a]^r[a];return n}}).call(this,e("buffer").Buffer)},{buffer:4}],104:[function(e,t,r){(function(r){function i(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var n=e("stream").Transform,a=e("inherits"),o=e("string_decoder").StringDecoder;t.exports=i,a(i,n),i.prototype.update=function(e,t,i){"string"==typeof e&&(e=new r(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this._final())}catch(e){t=e}finally{e(t)}},i.prototype._finalOrDigest=function(e){var t=this._final()||new r("");return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i}}).call(this,e("buffer").Buffer)},{buffer:4,inherits:208,stream:228,string_decoder:229}],105:[function(e,t,r){(function(r){function i(e,t,o,f){if(!(this instanceof i))return new i(e,t,o);a.call(this),this._cipher=new n.AES(t),this._prev=new r(o.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=f,o.copy(this._prev),this._mode=e}var n=e("./aes"),a=e("cipher-base");e("inherits")(i,a),t.exports=i,i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()}}).call(this,e("buffer").Buffer)},{"./aes":89,buffer:4,"cipher-base":104,inherits:208}],106:[function(e,t,r){(function(r){function i(e,t,i,a){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),i/=8,a=a||0;for(var o,f,s=0,c=0,u=new r(i),h=new r(a),d=0,l=[];;){if(d++>0&&l.push(o),l.push(e),t&&l.push(t),o=n(r.concat(l)),l=[],f=0,i>0)for(;;){if(0===i)break;if(f===o.length)break;u[s++]=o[f],i--,f++}if(a>0&&f!==o.length)for(;;){if(0===a)break;if(f===o.length)break;h[c++]=o[f],a--,f++}if(0===i&&0===a)break}for(f=0;f<o.length;f++)o[f]=0;return{key:u,iv:h}}var n=e("create-hash/md5");t.exports=i}).call(this,e("buffer").Buffer)},{buffer:4,"create-hash/md5":139}],107:[function(e,t,r){(function(r){function i(e,t,r,i){var o=v(t);if(o.curve){if("ecdsa"!==i)throw new Error("wrong private key type");return n(e,o)}if("dsa"===o.type){if("dsa"!==i)throw new Error("wrong private key type");return a(e,o,r)}if("rsa"!==i)throw new Error("wrong private key type");for(var f=o.modulus.byteLength(),s=[0,1];e.length+s.length+1<f;)s.push(255);s.push(0);for(var c=-1;++c<e.length;)s.push(e[c]);return l(s,o)}function n(e,t){var i=p[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var n=new m(i),a=n.genKeyPair();return a._importPrivate(t.privateKey),new r(a.sign(e).toDER())}function a(e,t,r){for(var i,n=t.params.priv_key,a=t.params.p,c=t.params.q,d=t.params.g,l=new y(0),p=s(e,c).mod(c),b=!1,v=f(n,c,e,r);b===!1;)i=u(c,v,r),l=h(d,i,a,c),b=i.invm(c).imul(p.add(n.mul(l))).mod(c),b.cmpn(0)||(b=!1,l=new y(0));return o(l,b)}function o(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var i=e.length+t.length+4,n=[48,i,2,e.length];return n=n.concat(e,[2,t.length],t),new r(n)}function f(e,t,i,n){if(e=new r(e.toArray()),e.length<t.byteLength()){var a=new r(t.byteLength()-e.length);a.fill(0),e=r.concat([a,e])}var o=i.length,f=c(i,t),s=new r(o);s.fill(1);var u=new r(o);return u.fill(0),u=d(n,u).update(s).update(new r([0])).update(e).update(f).digest(),s=d(n,u).update(s).digest(),u=d(n,u).update(s).update(new r([1])).update(e).update(f).digest(),s=d(n,u).update(s).digest(),{k:u,v:s}}function s(e,t){var r=new y(e),i=(e.length<<3)-t.bitLength();return i>0&&r.ishrn(i),r}function c(e,t){e=s(e,t),e=e.mod(t);var i=new r(e.toArray());if(i.length<t.byteLength()){var n=new r(t.byteLength()-i.length);n.fill(0),i=r.concat([n,i])}return i}function u(e,t,i){var n,a;do{for(n=new r("");8*n.length<e.bitLength();)t.v=d(i,t.k).update(t.v).digest(),n=r.concat([n,t.v]);a=s(n,e),t.k=d(i,t.k).update(t.v).update(new r([0])).digest(),t.v=d(i,t.k).update(t.v).digest()}while(a.cmp(e)!==-1);return a}function h(e,t,r,i){return e.toRed(y.mont(r)).redPow(t).fromRed().mod(i)}var d=e("create-hmac"),l=e("browserify-rsa"),p=e("./curves"),b=e("elliptic"),v=e("parse-asn1"),y=e("bn.js"),m=b.ec;t.exports=i,t.exports.getKey=f,t.exports.makeKey=u}).call(this,e("buffer").Buffer)},{"./curves":40,"bn.js":41,"browserify-rsa":42,buffer:4,"create-hmac":150,elliptic:43,"parse-asn1":73}],108:[function(e,t,r){(function(r){function i(e,t,i,o){var f=c(i);if("ec"===f.type){if("ecdsa"!==o)throw new Error("wrong public key type");return n(e,t,f)}if("dsa"===f.type){if("dsa"!==o)throw new Error("wrong public key type");return a(e,t,f)}if("rsa"!==o)throw new Error("wrong public key type");for(var s=f.modulus.byteLength(),h=[1],d=0;t.length+h.length+2<s;)h.push(255),d++;h.push(0);for(var l=-1;++l<t.length;)h.push(t[l]);h=new r(h);var p=u.mont(f.modulus);e=new u(e).toRed(p),e=e.redPow(new u(f.publicExponent)),e=new r(e.fromRed().toArray());var b=0;for(d<8&&(b=1),s=Math.min(e.length,h.length),e.length!==h.length&&(b=1),l=-1;++l<s;)b|=e[l]^h[l];return 0===b}function n(e,t,r){var i=f[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new h(i),a=r.data.subjectPrivateKey.data;return n.verify(t,e,a)}function a(e,t,r){var i=r.data.p,n=r.data.q,a=r.data.g,f=r.data.pub_key,s=c.signature.decode(e,"der"),h=s.s,d=s.r;o(h,n),o(d,n);var l=u.mont(i),p=h.invm(n);return!a.toRed(l).redPow(new u(t).mul(p).mod(n)).fromRed().mul(f.toRed(l).redPow(d.mul(p).mod(n)).fromRed()).mod(i).mod(n).cmp(d)}function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var f=e("./curves"),s=e("elliptic"),c=e("parse-asn1"),u=e("bn.js"),h=s.ec;t.exports=i}).call(this,e("buffer").Buffer)},{"./curves":40,"bn.js":41,buffer:4,elliptic:43,"parse-asn1":73}],109:[function(e,t,r){(function(r){function i(e){this.curveType=f[e],this.curveType||(this.curveType={name:e}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function n(e,t,i){Array.isArray(e)||(e=e.toArray());var n=new r(e);if(i&&n.length<i){var a=new r(i-n.length);a.fill(0),n=r.concat([a,n])}return t?n.toString(t):n}var a=e("elliptic"),o=e("bn.js");t.exports=function(e){return new i(e)};var f={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};f.p224=f.secp224r1,f.p256=f.secp256r1=f.prime256v1,f.p192=f.secp192r1=f.prime192v1,f.p384=f.secp384r1,f.p521=f.secp521r1,i.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},i.prototype.computeSecret=function(e,t,i){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),n(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},i.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),n(r,e)},i.prototype.getPrivateKey=function(e){return n(this.keys.getPrivate(),e)},i.prototype.setPublicKey=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.keys._importPublic(e),this},i.prototype.setPrivateKey=function(e,t){t=t||"utf8",r.isBuffer(e)||(e=new r(e,t));var i=new o(e);return i=i.toString(16),this.keys._importPrivate(i),this}}).call(this,e("buffer").Buffer)},{"bn.js":110,buffer:4,elliptic:111}],110:[function(e,t,r){arguments[4][41][0].apply(r,arguments)},{dup:41}],111:[function(e,t,r){arguments[4][43][0].apply(r,arguments)},{"../package.json":136,"./elliptic/curve":114,"./elliptic/curves":117,"./elliptic/ec":118,"./elliptic/eddsa":121,"./elliptic/utils":125,brorand:126,dup:43}],112:[function(e,t,r){arguments[4][44][0].apply(r,arguments)},{"../../elliptic":111,"bn.js":110,dup:44}],113:[function(e,t,r){arguments[4][45][0].apply(r,arguments)},{"../../elliptic":111,"../curve":114,"bn.js":110,dup:45,inherits:208}],114:[function(e,t,r){arguments[4][46][0].apply(r,arguments)},{"./base":112,"./edwards":113,"./mont":115,"./short":116,dup:46}],115:[function(e,t,r){arguments[4][47][0].apply(r,arguments)},{"../../elliptic":111,"../curve":114,"bn.js":110,dup:47,inherits:208}],116:[function(e,t,r){arguments[4][48][0].apply(r,arguments)},{"../../elliptic":111,"../curve":114,"bn.js":110,dup:48,inherits:208}],117:[function(e,t,r){arguments[4][49][0].apply(r,arguments)},{"../elliptic":111,"./precomputed/secp256k1":124,dup:49,"hash.js":127}],118:[function(e,t,r){arguments[4][50][0].apply(r,arguments)},{"../../elliptic":111,"./key":119,"./signature":120,"bn.js":110,dup:50,"hmac-drbg":133}],119:[function(e,t,r){arguments[4][51][0].apply(r,arguments)},{"../../elliptic":111,"bn.js":110,dup:51}],120:[function(e,t,r){arguments[4][52][0].apply(r,arguments)},{"../../elliptic":111,"bn.js":110,dup:52}],121:[function(e,t,r){arguments[4][53][0].apply(r,arguments)},{"../../elliptic":111,"./key":122,"./signature":123,dup:53,"hash.js":127}],122:[function(e,t,r){arguments[4][54][0].apply(r,arguments)},{"../../elliptic":111,dup:54}],123:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"../../elliptic":111,"bn.js":110,dup:55}],124:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{dup:56}],125:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{"bn.js":110,dup:57,"minimalistic-assert":134,"minimalistic-crypto-utils":135}],126:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{crypto:3,dup:58}],127:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./hash/common":128,"./hash/hmac":129,"./hash/ripemd":130,"./hash/sha":131,"./hash/utils":132,dup:59}],128:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{"../hash":127,dup:60}],129:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"../hash":127,dup:61}],130:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"../hash":127,dup:62}],131:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"../hash":127,dup:63}],132:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64,inherits:208}],133:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65,"hash.js":127,"minimalistic-assert":134,"minimalistic-crypto-utils":135}],134:[function(e,t,r){arguments[4][36][0].apply(r,arguments)},{dup:36}],135:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],136:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{dup:68}],137:[function(e,t,r){(function(r){"use strict";function i(e){c.call(this,"digest"),this._hash=e,this.buffers=[]}function n(e){c.call(this,"digest"),this._hash=e}var a=e("inherits"),o=e("./md5"),f=e("ripemd160"),s=e("sha.js"),c=e("cipher-base");a(i,c),i.prototype._update=function(e){this.buffers.push(e)},i.prototype._final=function(){var e=r.concat(this.buffers),t=this._hash(e);return this.buffers=null,t},a(n,c),n.prototype._update=function(e){this._hash.update(e)},n.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return e=e.toLowerCase(),"md5"===e?new i(o):"rmd160"===e||"ripemd160"===e?new i(f):new n(s(e))}}).call(this,e("buffer").Buffer)},{"./md5":139,buffer:4,"cipher-base":140,inherits:208,ripemd160:141,"sha.js":143}],138:[function(e,t,r){(function(e){"use strict";function t(t,r){if(t.length%a!=0){var i=t.length+(a-t.length%a);t=e.concat([t,o],i)}for(var n=[],f=r?t.readInt32BE:t.readInt32LE,s=0;s<t.length;s+=a)n.push(f.call(t,s));return n}function i(t,r,i){for(var n=new e(r),a=i?n.writeInt32BE:n.writeInt32LE,o=0;o<t.length;o++)a.call(n,t[o],4*o,!0);return n}function n(r,n,a,o){return e.isBuffer(r)||(r=new e(r)),i(n(t(r,o),r.length*f),a,o)}var a=4,o=new e(a);o.fill(0);var f=8;r.hash=n}).call(this,e("buffer").Buffer)},{buffer:4}],139:[function(e,t,r){"use strict";function i(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,i=-271733879,n=-1732584194,u=271733878,h=0;h<e.length;h+=16){var d=r,l=i,p=n,b=u;r=a(r,i,n,u,e[h+0],7,-680876936),u=a(u,r,i,n,e[h+1],12,-389564586),n=a(n,u,r,i,e[h+2],17,606105819),i=a(i,n,u,r,e[h+3],22,-1044525330),r=a(r,i,n,u,e[h+4],7,-176418897),u=a(u,r,i,n,e[h+5],12,1200080426),n=a(n,u,r,i,e[h+6],17,-1473231341),i=a(i,n,u,r,e[h+7],22,-45705983),r=a(r,i,n,u,e[h+8],7,1770035416),u=a(u,r,i,n,e[h+9],12,-1958414417),n=a(n,u,r,i,e[h+10],17,-42063),i=a(i,n,u,r,e[h+11],22,-1990404162),r=a(r,i,n,u,e[h+12],7,1804603682),u=a(u,r,i,n,e[h+13],12,-40341101),n=a(n,u,r,i,e[h+14],17,-1502002290),i=a(i,n,u,r,e[h+15],22,1236535329),r=o(r,i,n,u,e[h+1],5,-165796510),u=o(u,r,i,n,e[h+6],9,-1069501632),n=o(n,u,r,i,e[h+11],14,643717713),i=o(i,n,u,r,e[h+0],20,-373897302),r=o(r,i,n,u,e[h+5],5,-701558691),u=o(u,r,i,n,e[h+10],9,38016083),n=o(n,u,r,i,e[h+15],14,-660478335),i=o(i,n,u,r,e[h+4],20,-405537848),r=o(r,i,n,u,e[h+9],5,568446438),u=o(u,r,i,n,e[h+14],9,-1019803690),n=o(n,u,r,i,e[h+3],14,-187363961),i=o(i,n,u,r,e[h+8],20,1163531501),r=o(r,i,n,u,e[h+13],5,-1444681467),u=o(u,r,i,n,e[h+2],9,-51403784),n=o(n,u,r,i,e[h+7],14,1735328473),i=o(i,n,u,r,e[h+12],20,-1926607734),r=f(r,i,n,u,e[h+5],4,-378558),u=f(u,r,i,n,e[h+8],11,-2022574463),n=f(n,u,r,i,e[h+11],16,1839030562),i=f(i,n,u,r,e[h+14],23,-35309556),r=f(r,i,n,u,e[h+1],4,-1530992060),u=f(u,r,i,n,e[h+4],11,1272893353),n=f(n,u,r,i,e[h+7],16,-155497632),i=f(i,n,u,r,e[h+10],23,-1094730640),r=f(r,i,n,u,e[h+13],4,681279174),u=f(u,r,i,n,e[h+0],11,-358537222),n=f(n,u,r,i,e[h+3],16,-722521979),i=f(i,n,u,r,e[h+6],23,76029189),r=f(r,i,n,u,e[h+9],4,-640364487),u=f(u,r,i,n,e[h+12],11,-421815835),n=f(n,u,r,i,e[h+15],16,530742520),i=f(i,n,u,r,e[h+2],23,-995338651),r=s(r,i,n,u,e[h+0],6,-198630844),u=s(u,r,i,n,e[h+7],10,1126891415),n=s(n,u,r,i,e[h+14],15,-1416354905),i=s(i,n,u,r,e[h+5],21,-57434055),r=s(r,i,n,u,e[h+12],6,1700485571),u=s(u,r,i,n,e[h+3],10,-1894986606),n=s(n,u,r,i,e[h+10],15,-1051523),i=s(i,n,u,r,e[h+1],21,-2054922799),r=s(r,i,n,u,e[h+8],6,1873313359),u=s(u,r,i,n,e[h+15],10,-30611744),n=s(n,u,r,i,e[h+6],15,-1560198380),i=s(i,n,u,r,e[h+13],21,1309151649),r=s(r,i,n,u,e[h+4],6,-145523070),u=s(u,r,i,n,e[h+11],10,-1120210379),n=s(n,u,r,i,e[h+2],15,718787259),i=s(i,n,u,r,e[h+9],21,-343485551),r=c(r,d),i=c(i,l),n=c(n,p),u=c(u,b)}return Array(r,i,n,u)}function n(e,t,r,i,n,a){return c(u(c(c(t,e),c(i,a)),n),r)}function a(e,t,r,i,a,o,f){return n(t&r|~t&i,e,t,a,o,f)}function o(e,t,r,i,a,o,f){return n(t&i|r&~i,e,t,a,o,f)}function f(e,t,r,i,a,o,f){return n(t^r^i,e,t,a,o,f)}function s(e,t,r,i,a,o,f){return n(r^(t|~i),e,t,a,o,f)}function c(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function u(e,t){return e<<t|e>>>32-t}var h=e("./helpers");t.exports=function(e){return h.hash(e,i,16)}},{"./helpers":138}],140:[function(e,t,r){(function(r){function i(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var n=e("stream").Transform,a=e("inherits"),o=e("string_decoder").StringDecoder;t.exports=i,a(i,n),i.prototype.update=function(e,t,i){"string"==typeof e&&(e=new r(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this._final())}catch(e){t=e}finally{e(t)}},i.prototype._finalOrDigest=function(e){var t=this._final()||new r("");return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i}}).call(this,e("buffer").Buffer)},{buffer:4,inherits:208,stream:228,string_decoder:229}],141:[function(e,t,r){(function(e){function r(e){for(var t=[],r=0,i=0;r<e.length;r++,i+=8)t[i>>>5]|=e[r]<<24-i%32;return t}function i(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}function n(e,t,r){for(var i=0;i<16;i++){var n=r+i,h=t[n];t[n]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var m,g,w,_,k,S,E,M,A,x;S=m=e[0],E=g=e[1],M=w=e[2],A=_=e[3],x=k=e[4];var B;for(i=0;i<80;i+=1)B=m+t[r+d[i]]|0,B+=i<16?a(g,w,_)+v[0]:i<32?o(g,w,_)+v[1]:i<48?f(g,w,_)+v[2]:i<64?s(g,w,_)+v[3]:c(g,w,_)+v[4],B|=0,B=u(B,p[i]),B=B+k|0,m=k,k=_,_=u(w,10),w=g,g=B,B=S+t[r+l[i]]|0,B+=i<16?c(E,M,A)+y[0]:i<32?s(E,M,A)+y[1]:i<48?f(E,M,A)+y[2]:i<64?o(E,M,A)+y[3]:a(E,M,A)+y[4],B|=0,B=u(B,b[i]),B=B+x|0,S=x,x=A,A=u(M,10),M=E,E=B;B=e[1]+w+A|0,e[1]=e[2]+_+x|0,e[2]=e[3]+k+S|0,e[3]=e[4]+m+E|0,e[4]=e[0]+g+M|0,e[0]=B}function a(e,t,r){return e^t^r}function o(e,t,r){return e&t|~e&r}function f(e,t,r){return(e|~t)^r}function s(e,t,r){return e&r|t&~r}function c(e,t,r){return e^(t|~r)}function u(e,t){return e<<t|e>>>32-t}function h(t){var a=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=r(t),f=8*t.length,s=8*t.length;o[f>>>5]|=128<<24-f%32,o[14+(f+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);for(var c=0;c<o.length;c+=16)n(a,o,c);for(c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return new e(i(a))}var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];t.exports=h}).call(this,e("buffer").Buffer)},{buffer:4}],142:[function(e,t,r){(function(e){function r(t,r){this._block=new e(t),this._finalSize=r,this._blockSize=t,this._len=0,this._s=0}r.prototype.update=function(t,r){"string"==typeof t&&(r=r||"utf8",t=new e(t,r));for(var i=this._len+=t.length,n=this._s||0,a=0,o=this._block;n<i;){for(var f=Math.min(t.length,a+this._blockSize-n%this._blockSize),s=f-a,c=0;c<s;c++)o[n%this._blockSize+c]=t[c+a];n+=s,a+=s,n%this._blockSize==0&&this._update(o)}return this._s=n,this},r.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(this,e("buffer").Buffer)},{buffer:4}],143:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":144,"./sha1":145,"./sha224":146,"./sha256":147,"./sha384":148,"./sha512":149}],144:[function(e,t,r){(function(r){function i(){this.init(),this._w=u,s.call(this,64,56)}function n(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function o(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}var f=e("inherits"),s=e("./hash"),c=[1518500249,1859775393,-1894007588,-899497514],u=new Array(80);f(i,s),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,f=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)t[h]=e.readInt32BE(4*h);for(;h<80;++h)t[h]=t[h-3]^t[h-8]^t[h-14]^t[h-16];for(var d=0;d<80;++d){var l=~~(d/20),p=n(r)+o(l,i,f,s)+u+t[d]+c[l]|0;u=s,s=f,f=a(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=f+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},i.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":142,buffer:4,inherits:208}],145:[function(e,t,r){(function(r){function i(){this.init(),this._w=h,c.call(this,64,56)}function n(e){return e<<1|e>>>31}function a(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function f(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}var s=e("inherits"),c=e("./hash"),u=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);s(i,c),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,s=0|this._c,c=0|this._d,h=0|this._e,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<80;++d)t[d]=n(t[d-3]^t[d-8]^t[d-14]^t[d-16]);for(var l=0;l<80;++l){var p=~~(l/20),b=a(r)+f(p,i,s,c)+h+t[l]+u[p]|0;h=c,c=s,s=o(i),i=r,r=b}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=c+this._d|0,this._e=h+this._e|0},i.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":142,buffer:4,inherits:208}],146:[function(e,t,r){(function(r){function i(){this.init(),this._w=f,o.call(this,64,56)}var n=e("inherits"),a=e("./sha256"),o=e("./hash"),f=new Array(64);n(i,a),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var e=new r(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":142,"./sha256":147,buffer:4,inherits:208}],147:[function(e,t,r){(function(r){function i(){this.init(),this._w=l,h.call(this,64,56)}function n(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function s(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function c(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var u=e("inherits"),h=e("./hash"),d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=new Array(64);u(i,h),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,u=0|this._c,h=0|this._d,l=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,y=0;y<16;++y)t[y]=e.readInt32BE(4*y);for(;y<64;++y)t[y]=c(t[y-2])+t[y-7]+s(t[y-15])+t[y-16]|0;for(var m=0;m<64;++m){var g=v+f(l)+n(l,p,b)+d[m]+t[m]|0,w=o(r)+a(r,i,u)|0;v=b,b=p,p=l,l=h+g|0,h=u,u=i,i=r,r=g+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=u+this._c|0,this._d=h+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,
|
|
this._g=b+this._g|0,this._h=v+this._h|0},i.prototype._hash=function(){var e=new r(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":142,buffer:4,inherits:208}],148:[function(e,t,r){(function(r){function i(){this.init(),this._w=f,o.call(this,128,112)}var n=e("inherits"),a=e("./sha512"),o=e("./hash"),f=new Array(160);n(i,a),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}var t=new r(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":142,"./sha512":149,buffer:4,inherits:208}],149:[function(e,t,r){(function(r){function i(){this.init(),this._w=v,p.call(this,128,112)}function n(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function s(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function u(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function h(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function d(e,t){return e>>>0<t>>>0?1:0}var l=e("inherits"),p=e("./hash"),b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],v=new Array(160);l(i,p),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,l=0|this._ch,p=0|this._dh,v=0|this._eh,y=0|this._fh,m=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,S=0|this._dl,E=0|this._el,M=0|this._fl,A=0|this._gl,x=0|this._hl,B=0;B<32;B+=2)t[B]=e.readInt32BE(4*B),t[B+1]=e.readInt32BE(4*B+4);for(;B<160;B+=2){var I=t[B-30],C=t[B-30+1],R=s(I,C),T=c(C,I);I=t[B-4],C=t[B-4+1];var P=u(I,C),L=h(C,I),j=t[B-14],D=t[B-14+1],U=t[B-32],O=t[B-32+1],N=T+D|0,q=R+j+d(N,T)|0;N=N+L|0,q=q+P+d(N,L)|0,N=N+O|0,q=q+U+d(N,O)|0,t[B]=q,t[B+1]=N}for(var F=0;F<160;F+=2){q=t[F],N=t[F+1];var z=a(r,i,l),K=a(w,_,k),X=o(r,w),H=o(w,r),J=f(v,E),V=f(E,v),Y=b[F],W=b[F+1],G=n(v,y,m),Z=n(E,M,A),Q=x+V|0,$=g+J+d(Q,x)|0;Q=Q+Z|0,$=$+G+d(Q,Z)|0,Q=Q+W|0,$=$+Y+d(Q,W)|0,Q=Q+N|0,$=$+q+d(Q,N)|0;var ee=H+K|0,te=X+z+d(ee,H)|0;g=m,x=A,m=y,A=M,y=v,M=E,E=S+Q|0,v=p+$+d(E,S)|0,p=l,S=k,l=i,k=_,i=r,_=w,w=Q+ee|0,r=$+te+d(w,Q)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+M|0,this._gl=this._gl+A|0,this._hl=this._hl+x|0,this._ah=this._ah+r+d(this._al,w)|0,this._bh=this._bh+i+d(this._bl,_)|0,this._ch=this._ch+l+d(this._cl,k)|0,this._dh=this._dh+p+d(this._dl,S)|0,this._eh=this._eh+v+d(this._el,E)|0,this._fh=this._fh+y+d(this._fl,M)|0,this._gh=this._gh+m+d(this._gl,A)|0,this._hh=this._hh+g+d(this._hl,x)|0},i.prototype._hash=function(){function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}var t=new r(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":142,buffer:4,inherits:208}],150:[function(e,t,r){(function(r){"use strict";function i(e,t){o.call(this),e=e.toLowerCase(),"string"==typeof t&&(t=new r(t));var i="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>i?t=n(e).update(t).digest():t.length<i&&(t=r.concat([t,f],i));for(var a=this._ipad=new r(i),s=this._opad=new r(i),c=0;c<i;c++)a[c]=54^t[c],s[c]=92^t[c];this._hash=n(e).update(a)}var n=e("create-hash/browser"),a=e("inherits"),o=e("stream").Transform,f=new r(128);f.fill(0),a(i,o),i.prototype.update=function(e,t){return this._hash.update(e,t),this},i.prototype._transform=function(e,t,r){this._hash.update(e),r()},i.prototype._flush=function(e){this.push(this.digest()),e()},i.prototype.digest=function(e){var t=this._hash.digest();return n(this._alg).update(this._opad).update(t).digest(e)},t.exports=function(e,t){return new i(e,t)}}).call(this,e("buffer").Buffer)},{buffer:4,"create-hash/browser":137,inherits:208,stream:228}],151:[function(e,t,r){(function(t){function i(e){return new f(new t(o[e].prime,"hex"),new t(o[e].gen,"hex"))}function n(e,r,i,o){return t.isBuffer(r)||void 0===s[r]?n(e,"binary",r,i):(r=r||"binary",o=o||"binary",i=i||new t([2]),t.isBuffer(i)||(i=new t(i,o)),"number"==typeof e?new f(a(e,i),i,!0):(t.isBuffer(e)||(e=new t(e,r)),new f(e,i,!0)))}var a=e("./lib/generatePrime"),o=e("./lib/primes.json"),f=e("./lib/dh"),s={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=i,r.createDiffieHellman=r.DiffieHellman=n}).call(this,e("buffer").Buffer)},{"./lib/dh":152,"./lib/generatePrime":153,"./lib/primes.json":154,buffer:4}],152:[function(e,t,r){(function(r){function i(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._pub=new s(e),this}function n(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._priv=new s(e),this}function a(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in m)return m[i];var n=0;if(e.isEven()||!v.simpleSieve||!v.fermatTest(e)||!u.test(e))return n+=1,n+="02"===r||"05"===r?8:4,m[i]=n,n;u.test(e.shrn(1))||(n+=2);var a;switch(r){case"02":e.mod(h).cmp(d)&&(n+=8);break;case"05":a=e.mod(l),a.cmp(p)&&a.cmp(b)&&(n+=8);break;default:n+=4}return m[i]=n,n}function o(e,t,r){this.setGenerator(t),this.__prime=new s(e),this._prime=s.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=i,this.setPrivateKey=n):this._primeCode=8}function f(e,t){var i=new r(e.toArray());return t?i.toString(t):i}var s=e("bn.js"),c=e("miller-rabin"),u=new c,h=new s(24),d=new s(11),l=new s(10),p=new s(3),b=new s(7),v=e("./generatePrime"),y=e("randombytes");t.exports=o;var m={};Object.defineProperty(o.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=a(this.__prime,this.__gen)),this._primeCode}}),o.prototype.generateKeys=function(){return this._priv||(this._priv=new s(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},o.prototype.computeSecret=function(e){e=new s(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),i=new r(t.toArray()),n=this.getPrime();if(i.length<n.length){var a=new r(n.length-i.length);a.fill(0),i=r.concat([a,i])}return i},o.prototype.getPublicKey=function(e){return f(this._pub,e)},o.prototype.getPrivateKey=function(e){return f(this._priv,e)},o.prototype.getPrime=function(e){return f(this.__prime,e)},o.prototype.getGenerator=function(e){return f(this._gen,e)},o.prototype.setGenerator=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.__gen=e,this._gen=new s(e),this}}).call(this,e("buffer").Buffer)},{"./generatePrime":153,"bn.js":155,buffer:4,"miller-rabin":156,randombytes:206}],153:[function(e,t,r){function i(){if(null!==g)return g;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return g=e,e}function n(e){for(var t=i(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function a(e){var t=s.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function o(e,t){if(e<16)return new s(2===t||5===t?[140,123]:[140,39]);t=new s(t);for(var r,i;;){for(r=new s(f(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(d),r.testn(1)||r.iadd(l),t.cmp(l)){if(!t.cmp(p))for(;r.mod(b).cmp(v);)r.iadd(m)}else for(;r.mod(c).cmp(y);)r.iadd(m);if(i=r.shrn(1),n(i)&&n(r)&&a(i)&&a(r)&&h.test(i)&&h.test(r))return r}}var f=e("randombytes");t.exports=o,o.simpleSieve=n,o.fermatTest=a;var s=e("bn.js"),c=new s(24),u=e("miller-rabin"),h=new u,d=new s(1),l=new s(2),p=new s(5),b=(new s(16),new s(8),new s(10)),v=new s(3),y=(new s(7),new s(11)),m=new s(4),g=(new s(12),null)},{"bn.js":155,"miller-rabin":156,randombytes:206}],154:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],155:[function(e,t,r){arguments[4][41][0].apply(r,arguments)},{dup:41}],156:[function(e,t,r){function i(e){this.rand=e||new a.Rand}var n=e("bn.js"),a=e("brorand");t.exports=i,i.create=function(e){return new i(e)},i.prototype._rand=function(e){var t=e.bitLength(),r=this.rand.generate(Math.ceil(t/8));r[0]|=3;var i=7&t;return 0!==i&&(r[r.length-1]>>=7-i),new n(r)},i.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),o=new n(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var f=e.subn(1),s=f.subn(1),c=0;!f.testn(c);c++);for(var u=e.shrn(c),h=f.toRed(a);t>0;t--){var d=this._rand(s);r&&r(d);var l=d.toRed(a).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(h)){for(var p=1;p<c;p++){if(l=l.redSqr(),0===l.cmp(o))return!1;if(0===l.cmp(h))break}if(p===c)return!1}}return!0},i.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var o=e.subn(1),f=o.subn(1),s=0;!o.testn(s);s++);for(var c=e.shrn(s),u=o.toRed(i);t>0;t--){var h=this._rand(f),d=e.gcd(h);if(0!==d.cmpn(1))return d;var l=h.toRed(i).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(u)){for(var p=1;p<s;p++){if(l=l.redSqr(),0===l.cmp(a))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(u))break}if(p===s)return l=l.redSqr(),l.fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":155,brorand:157}],157:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{crypto:3,dup:58}],158:[function(e,t,r){(function(t,i){var n=e("create-hmac"),a=e("./precondition");r.pbkdf2=function(e,t,i,n,o,f){if("function"==typeof o&&(f=o,o=void 0),a(i,n),"function"!=typeof f)throw new Error("No callback provided to pbkdf2");setTimeout(function(){f(null,r.pbkdf2Sync(e,t,i,n,o))})};var o;if(t.browser)o="utf-8";else{o=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}r.pbkdf2Sync=function(e,t,r,f,s){i.isBuffer(e)||(e=new i(e,o)),i.isBuffer(t)||(t=new i(t,o)),a(r,f),s=s||"sha1";var c,u=1,h=new i(f),d=new i(t.length+4);t.copy(d,0,0,t.length);for(var l,p,b=1;b<=u;b++){d.writeUInt32BE(b,t.length);var v=n(s,e).update(d).digest();c||(c=v.length,p=new i(c),u=Math.ceil(f/c),l=f-(u-1)*c),v.copy(p,0,0,c);for(var y=1;y<r;y++){v=n(s,e).update(v).digest();for(var m=0;m<c;m++)p[m]^=v[m]}var g=(b-1)*c,w=b===u?l:c;p.copy(h,g,0,w)}return h}}).call(this,e("_process"),e("buffer").Buffer)},{"./precondition":159,_process:211,buffer:4,"create-hmac":150}],159:[function(e,t,r){var i=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>i||t!==t)throw new TypeError("Bad key length")}},{}],160:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":202,"./publicEncrypt":203}],161:[function(e,t,r){(function(r){function i(e){var t=new r(4);return t.writeUInt32BE(e,0),t}var n=e("create-hash");t.exports=function(e,t){for(var a,o=new r(""),f=0;o.length<t;)a=i(f++),o=r.concat([o,n("sha1").update(e).update(a).digest()]);return o.slice(0,t)}}).call(this,e("buffer").Buffer)},{buffer:4,"create-hash":137}],162:[function(e,t,r){arguments[4][41][0].apply(r,arguments)},{dup:41}],163:[function(e,t,r){(function(r){function i(e){var t=a(e);return{blinder:t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}function n(e,t){var n=i(t),a=t.modulus.byteLength(),f=(o.mont(t.modulus),new o(e).mul(n.blinder).umod(t.modulus)),s=f.toRed(o.mont(t.prime1)),c=f.toRed(o.mont(t.prime2)),u=t.coefficient,h=t.prime1,d=t.prime2,l=s.redPow(t.exponent1),p=c.redPow(t.exponent2);l=l.fromRed(),p=p.fromRed();var b=l.isub(p).imul(u).umod(h);return b.imul(d),p.iadd(b),new r(p.imul(n.unblinder).umod(t.modulus).toArray(!1,a))}function a(e){for(var t=e.modulus.byteLength(),r=new o(f(t));r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new o(f(t));return r}var o=e("bn.js"),f=e("randombytes");t.exports=n,n.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":162,buffer:4,randombytes:206}],164:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{dup:69}],165:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./certificate":166,"asn1.js":169,dup:70}],166:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{"asn1.js":169,dup:71}],167:[function(e,t,r){(function(r){var i=e("evp_bytestokey"),n=e("browserify-aes");t.exports=function(e,t){var a,o=e.toString(),f=o.match(/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m);if(f){var s="aes"+f[1],c=new r(f[2],"hex"),u=new r(f[3].replace(/\r?\n/g,""),"base64"),h=i(t,c.slice(0,8),parseInt(f[1],10)).key,d=[],l=n.createDecipheriv(s,h,c);d.push(l.update(u)),d.push(l.final()),a=r.concat(d)}else{a=new r(o.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m)[2].replace(/\r?\n/g,""),"base64")}return{tag:o.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m)[1],data:a}}}).call(this,e("buffer").Buffer)},{"browserify-aes":186,buffer:4,evp_bytestokey:201}],168:[function(e,t,r){(function(r){function i(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var i,o,s=f(e,t),c=s.tag,u=s.data;switch(c){case"CERTIFICATE":o=a.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=a.PublicKey.decode(u,"der")),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=a.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+c);case"ENCRYPTED PRIVATE KEY":u=a.EncryptedPrivateKey.decode(u,"der"),u=n(u,t);case"PRIVATE KEY":switch(o=a.PrivateKey.decode(u,"der"),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:a.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=a.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+c);case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return u=a.ECPrivateKey.decode(u,"der"),{curve:u.parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+c)}}function n(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=o[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(a.split("-")[1],10)/8,d=c.pbkdf2Sync(t,i,n,h),l=s.createDecipheriv(a,d,f),p=[];return p.push(l.update(u)),p.push(l.final()),r.concat(p)}var a=e("./asn1"),o=e("./aesid.json"),f=e("./fixProc"),s=e("browserify-aes"),c=e("pbkdf2");t.exports=i,i.signature=a.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":164,"./asn1":165,"./fixProc":167,"browserify-aes":186,buffer:4,pbkdf2:158}],169:[function(e,t,r){arguments[4][74][0].apply(r,arguments)},{"./asn1/api":170,"./asn1/base":172,"./asn1/constants":176,"./asn1/decoders":178,"./asn1/encoders":181,"bn.js":162,dup:74}],170:[function(e,t,r){arguments[4][75][0].apply(r,arguments)},{"../asn1":169,dup:75,inherits:208,vm:230}],171:[function(e,t,r){arguments[4][76][0].apply(r,arguments)},{"../base":172,buffer:4,dup:76,inherits:208}],172:[function(e,t,r){arguments[4][77][0].apply(r,arguments)},{"./buffer":171,"./node":173,"./reporter":174,dup:77}],173:[function(e,t,r){arguments[4][78][0].apply(r,arguments)},{"../base":172,dup:78,"minimalistic-assert":183}],174:[function(e,t,r){arguments[4][79][0].apply(r,arguments)},{dup:79,inherits:208}],175:[function(e,t,r){arguments[4][80][0].apply(r,arguments)},{"../constants":176,dup:80}],176:[function(e,t,r){arguments[4][81][0].apply(r,arguments)},{"./der":175,dup:81}],177:[function(e,t,r){arguments[4][82][0].apply(r,arguments)},{"../../asn1":169,dup:82,inherits:208}],178:[function(e,t,r){arguments[4][83][0].apply(r,arguments)},{"./der":177,"./pem":179,dup:83}],179:[function(e,t,r){arguments[4][84][0].apply(r,arguments)},{"./der":177,buffer:4,dup:84,inherits:208}],180:[function(e,t,r){arguments[4][85][0].apply(r,arguments)},{"../../asn1":169,buffer:4,dup:85,inherits:208}],181:[function(e,t,r){arguments[4][86][0].apply(r,arguments)},{"./der":180,"./pem":182,dup:86}],182:[function(e,t,r){arguments[4][87][0].apply(r,arguments)},{"./der":180,dup:87,inherits:208}],183:[function(e,t,r){arguments[4][36][0].apply(r,arguments)},{dup:36}],184:[function(e,t,r){(function(e){function t(e){var t;return e>f||e<0?(t=Math.abs(e)%f,e<0?f-t:t):e}function i(e){for(;0<e.length;e++)e[0]=0;return!1}function n(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function a(e){for(var t=e.length/4,r=new Array(t),i=-1;++i<t;)r[i]=e.readUInt32BE(4*i);return r}function o(e){this._key=a(e),this._doReset()}var f=Math.pow(2,32);n.prototype.init=function(){var e,t,r,i,n,a,o,f,s,c;for(e=function(){var e,r;for(r=[],t=e=0;e<256;t=++e)t<128?r.push(t<<1):r.push(t<<1^283);return r}(),n=0,s=0,t=c=0;c<256;t=++c)r=s^s<<1^s<<2^s<<3^s<<4,r=r>>>8^255&r^99,this.SBOX[n]=r,this.INV_SBOX[r]=n,a=e[n],o=e[a],f=e[o],i=257*e[r]^16843008*r,this.SUB_MIX[0][n]=i<<24|i>>>8,this.SUB_MIX[1][n]=i<<16|i>>>16,this.SUB_MIX[2][n]=i<<8|i>>>24,this.SUB_MIX[3][n]=i,i=16843009*f^65537*o^257*a^16843008*n,this.INV_SUB_MIX[0][r]=i<<24|i>>>8,this.INV_SUB_MIX[1][r]=i<<16|i>>>16,this.INV_SUB_MIX[2][r]=i<<8|i>>>24,this.INV_SUB_MIX[3][r]=i,0===n?n=s=1:(n=a^e[e[e[f^a]]],s^=e[e[s]]);return!0};var s=new n;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var e,t,r,i,n,a;for(r=this._key,t=r.length,this._nRounds=t+6,n=4*(this._nRounds+1),this._keySchedule=[],i=0;i<n;i++)this._keySchedule[i]=i<t?r[i]:(a=this._keySchedule[i-1],i%t==0?(a=a<<8|a>>>24,a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=s.RCON[i/t|0]<<24):t>6&&i%t==4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),this._keySchedule[i-t]^a);for(this._invKeySchedule=[],e=0;e<n;e++)i=n-e,a=this._keySchedule[i-(e%4?0:4)],this._invKeySchedule[e]=e<4||i<=4?a:s.INV_SUB_MIX[0][s.SBOX[a>>>24]]^s.INV_SUB_MIX[1][s.SBOX[a>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[a>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&a]];return!0},o.prototype.encryptBlock=function(t){t=a(new e(t));var r=this._doCryptBlock(t,this._keySchedule,s.SUB_MIX,s.SBOX),i=new e(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[1],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[3],12),i},o.prototype.decryptBlock=function(t){t=a(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var i=this._doCryptBlock(t,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX),n=new e(16);return n.writeUInt32BE(i[0],0),n.writeUInt32BE(i[3],4),n.writeUInt32BE(i[2],8),n.writeUInt32BE(i[1],12),n},o.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},o.prototype._doCryptBlock=function(e,r,i,n){var a,o,f,s,c,u,h,d,l;o=e[0]^r[0],f=e[1]^r[1],s=e[2]^r[2],c=e[3]^r[3],a=4;for(var p=1;p<this._nRounds;p++)u=i[0][o>>>24]^i[1][f>>>16&255]^i[2][s>>>8&255]^i[3][255&c]^r[a++],h=i[0][f>>>24]^i[1][s>>>16&255]^i[2][c>>>8&255]^i[3][255&o]^r[a++],d=i[0][s>>>24]^i[1][c>>>16&255]^i[2][o>>>8&255]^i[3][255&f]^r[a++],l=i[0][c>>>24]^i[1][o>>>16&255]^i[2][f>>>8&255]^i[3][255&s]^r[a++],o=u,f=h,s=d,c=l;return u=(n[o>>>24]<<24|n[f>>>16&255]<<16|n[s>>>8&255]<<8|n[255&c])^r[a++],h=(n[f>>>24]<<24|n[s>>>16&255]<<16|n[c>>>8&255]<<8|n[255&o])^r[a++],d=(n[s>>>24]<<24|n[c>>>16&255]<<16|n[o>>>8&255]<<8|n[255&f])^r[a++],l=(n[c>>>24]<<24|n[o>>>16&255]<<16|n[f>>>8&255]<<8|n[255&s])^r[a++],[t(u),t(h),t(d),t(l)]},r.AES=o}).call(this,e("buffer").Buffer)},{buffer:4}],185:[function(e,t,r){(function(r){function i(e,t,n,f){if(!(this instanceof i))return new i(e,t,n);o.call(this),this._finID=r.concat([n,new r([0,0,0,1])]),n=r.concat([n,new r([0,0,0,2])]),this._cipher=new a.AES(t),this._prev=new r(n.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=f,this._alen=0,this._len=0,n.copy(this._prev),this._mode=e;var c=new r(4);c.fill(0),this._ghash=new s(this._cipher.encryptBlock(c)),this._authTag=null,this._called=!1}function n(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=-1;++n<i;)r+=e[n]^t[n];return r}var a=e("./aes"),o=e("cipher-base"),f=e("inherits"),s=e("./ghash"),c=e("buffer-xor");f(i,o),t.exports=i,i.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=new r(t),t.fill(0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(n(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=e;this._cipher.scrub()},i.prototype.getAuthTag=function(){if(!this._decrypt&&r.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},i.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},i.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length}}).call(this,e("buffer").Buffer)},{"./aes":184,"./ghash":189,buffer:4,"buffer-xor":198,"cipher-base":199,inherits:208}],186:[function(e,t,r){arguments[4][12][0].apply(r,arguments)},{"./decrypter":187,"./encrypter":188,"./modes":190,dup:12}],
|
|
187:[function(e,t,r){(function(t){function i(e,r,a){if(!(this instanceof i))return new i(e,r,a);c.call(this),this._cache=new n,this._last=void 0,this._cipher=new s.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function n(){if(!(this instanceof n))return new n;this.cache=new t("")}function a(e){for(var t=e[15],r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function o(e,r,n){var a=h[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new d(b[a.mode],r,n,!0):"auth"===a.type?new l(b[a.mode],r,n,!0):new i(b[a.mode],r,n)}function f(e,t){var r=h[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=p(t,!1,r.key,r.iv);return o(e,i.key,i.iv)}var s=e("./aes"),c=e("cipher-base"),u=e("inherits"),h=e("./modes"),d=e("./streamCipher"),l=e("./authCipher"),p=e("evp_bytestokey");u(i,c),i.prototype._update=function(e){this._cache.add(e);for(var r,i,n=[];r=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,r),n.push(i);return t.concat(n)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return a(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=t.concat([this.cache,e])},n.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},n.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=f,r.createDecipheriv=o}).call(this,e("buffer").Buffer)},{"./aes":184,"./authCipher":185,"./modes":190,"./modes/cbc":191,"./modes/cfb":192,"./modes/cfb1":193,"./modes/cfb8":194,"./modes/ctr":195,"./modes/ecb":196,"./modes/ofb":197,"./streamCipher":200,buffer:4,"cipher-base":199,evp_bytestokey:201,inherits:208}],188:[function(e,t,r){(function(t){function i(e,r,a){if(!(this instanceof i))return new i(e,r,a);s.call(this),this._cache=new n,this._cipher=new f.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function n(){if(!(this instanceof n))return new n;this.cache=new t("")}function a(e,r,n){var a=u[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new d(p[a.mode],r,n):"auth"===a.type?new l(p[a.mode],r,n):new i(p[a.mode],r,n)}function o(e,t){var r=u[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=h(t,!1,r.key,r.iv);return a(e,i.key,i.iv)}var f=e("./aes"),s=e("cipher-base"),c=e("inherits"),u=e("./modes"),h=e("evp_bytestokey"),d=e("./streamCipher"),l=e("./authCipher");c(i,s),i.prototype._update=function(e){this._cache.add(e);for(var r,i,n=[];r=this._cache.get();)i=this._mode.encrypt(this,r),n.push(i);return t.concat(n)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=t.concat([this.cache,e])},n.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},n.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),i=-1;++i<e;)r.writeUInt8(e,i);return t.concat([this.cache,r])};var p={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createCipheriv=a,r.createCipher=o}).call(this,e("buffer").Buffer)},{"./aes":184,"./authCipher":185,"./modes":190,"./modes/cbc":191,"./modes/cfb":192,"./modes/cfb1":193,"./modes/cfb8":194,"./modes/ctr":195,"./modes/ecb":196,"./modes/ofb":197,"./streamCipher":200,buffer:4,"cipher-base":199,evp_bytestokey:201,inherits:208}],189:[function(e,t,r){(function(e){function r(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function n(t){t=t.map(a);var r=new e(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r}function a(e){var t;return e>s||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var f=new e(16);f.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},r.prototype._multiply=function(){for(var e,t,r,a=i(this.h),f=[0,0,0,0],s=-1;++s<128;){for(t=0!=(this.state[~~(s/8)]&1<<7-s%8),t&&(f=o(f,a)),r=0!=(1&a[3]),e=3;e>0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=n(f)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,f],16)),this.ghash(n([0,t,0,r])),this.state};var s=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:4}],190:[function(e,t,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],191:[function(e,t,r){arguments[4][17][0].apply(r,arguments)},{"buffer-xor":198,dup:17}],192:[function(e,t,r){(function(t){function i(e,r,i){var a=r.length,o=n(r,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,i?r:o]),o}var n=e("buffer-xor");r.encrypt=function(e,r,n){for(var a,o=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){o=t.concat([o,i(e,r,n)]);break}a=e._cache.length,o=t.concat([o,i(e,r.slice(0,a),n)]),r=r.slice(a)}return o}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":198}],193:[function(e,t,r){(function(e){function t(e,t,r){for(var n,a,o,f=-1,s=0;++f<8;)n=e._cipher.encryptBlock(e._prev),a=t&1<<7-f?128:0,o=n[0]^a,s+=(128&o)>>f%8,e._prev=i(e._prev,r?a:o);return s}function i(t,r){var i=t.length,n=-1,a=new e(t.length);for(t=e.concat([t,new e([r])]);++n<i;)a[n]=t[n]<<1|t[n+1]>>7;return a}r.encrypt=function(r,i,n){for(var a=i.length,o=new e(a),f=-1;++f<a;)o[f]=t(r,i[f],n);return o}}).call(this,e("buffer").Buffer)},{buffer:4}],194:[function(e,t,r){(function(e){function t(t,r,i){var n=t._cipher.encryptBlock(t._prev),a=n[0]^r;return t._prev=e.concat([t._prev.slice(1),new e([i?r:a])]),a}r.encrypt=function(r,i,n){for(var a=i.length,o=new e(a),f=-1;++f<a;)o[f]=t(r,i[f],n);return o}}).call(this,e("buffer").Buffer)},{buffer:4}],195:[function(e,t,r){(function(t){function i(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}function n(e){var t=e._cipher.encryptBlock(e._prev);return i(e._prev),t}var a=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var i=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),a(r,i)}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":198}],196:[function(e,t,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],197:[function(e,t,r){(function(t){function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var n=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,a)}}).call(this,e("buffer").Buffer)},{buffer:4,"buffer-xor":198}],198:[function(e,t,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),a=0;a<i;++a)n[a]=t[a]^r[a];return n}}).call(this,e("buffer").Buffer)},{buffer:4}],199:[function(e,t,r){(function(r){function i(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var n=e("stream").Transform,a=e("inherits"),o=e("string_decoder").StringDecoder;t.exports=i,a(i,n),i.prototype.update=function(e,t,i){"string"==typeof e&&(e=new r(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this._final())}catch(e){t=e}finally{e(t)}},i.prototype._finalOrDigest=function(e){var t=this._final()||new r("");return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i}}).call(this,e("buffer").Buffer)},{buffer:4,inherits:208,stream:228,string_decoder:229}],200:[function(e,t,r){(function(r){function i(e,t,o,f){if(!(this instanceof i))return new i(e,t,o);a.call(this),this._cipher=new n.AES(t),this._prev=new r(o.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=f,o.copy(this._prev),this._mode=e}var n=e("./aes"),a=e("cipher-base");e("inherits")(i,a),t.exports=i,i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()}}).call(this,e("buffer").Buffer)},{"./aes":184,buffer:4,"cipher-base":199,inherits:208}],201:[function(e,t,r){(function(r){function i(e,t,i,a){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),i/=8,a=a||0;for(var o,f,s=0,c=0,u=new r(i),h=new r(a),d=0,l=[];;){if(d++>0&&l.push(o),l.push(e),t&&l.push(t),o=n(r.concat(l)),l=[],f=0,i>0)for(;;){if(0===i)break;if(f===o.length)break;u[s++]=o[f],i--,f++}if(a>0&&f!==o.length)for(;;){if(0===a)break;if(f===o.length)break;h[c++]=o[f],a--,f++}if(0===i&&0===a)break}for(f=0;f<o.length;f++)o[f]=0;return{key:u,iv:h}}var n=e("create-hash/md5");t.exports=i}).call(this,e("buffer").Buffer)},{buffer:4,"create-hash/md5":139}],202:[function(e,t,r){(function(r){function i(e,t){var i=(e.modulus,e.modulus.byteLength()),n=(t.length,h("sha1").update(new r("")).digest()),o=n.length;if(0!==t[0])throw new Error("decryption error");var c=t.slice(1,o+1),u=t.slice(o+1),d=s(c,f(u,o)),l=s(u,f(d,i-o-1));if(a(n,l.slice(0,o)))throw new Error("decryption error");for(var p=o;0===l[p];)p++;if(1!==l[p++])throw new Error("decryption error");return l.slice(p)}function n(e,t,r){for(var i=t.slice(0,2),n=2,a=0;0!==t[n++];)if(n>=t.length){a++;break}var o=t.slice(2,n-1);t.slice(n-1,n);if(("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return t.slice(n)}function a(e,t){e=new r(e),t=new r(t);var i=0,n=e.length;e.length!==t.length&&(i++,n=Math.min(e.length,t.length));for(var a=-1;++a<n;)i+=e[a]^t[a];return i}var o=e("parse-asn1"),f=e("./mgf"),s=e("./xor"),c=e("bn.js"),u=e("browserify-rsa"),h=e("create-hash"),d=e("./withPublic");t.exports=function(e,t,a){var f;f=e.padding?e.padding:a?1:4;var s=o(e),h=s.modulus.byteLength();if(t.length>h||new c(t).cmp(s.modulus)>=0)throw new Error("decryption error");var l;l=a?d(new c(t),s):u(t,s);var p=new r(h-l.length);if(p.fill(0),l=r.concat([p,l],h),4===f)return i(s,l);if(1===f)return n(s,l,a);if(3===f)return l;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":161,"./withPublic":204,"./xor":205,"bn.js":162,"browserify-rsa":163,buffer:4,"create-hash":137,"parse-asn1":168}],203:[function(e,t,r){(function(r){function i(e,t){var i=e.modulus.byteLength(),n=t.length,a=s("sha1").update(new r("")).digest(),o=a.length,d=2*o;if(n>i-d-2)throw new Error("message too long");var l=new r(i-n-d-2);l.fill(0);var p=i-o-1,b=f(o),v=u(r.concat([a,l,new r([1]),t],p),c(b,p)),y=u(b,c(v,o));return new h(r.concat([new r([0]),y,v],i))}function n(e,t,i){var n=t.length,o=e.modulus.byteLength();if(n>o-11)throw new Error("message too long");var f;return i?(f=new r(o-n-3),f.fill(255)):f=a(o-n-3),new h(r.concat([new r([0,i?1:2]),f,new r([0]),t],o))}function a(e,t){for(var i,n=new r(e),a=0,o=f(2*e),s=0;a<e;)s===o.length&&(o=f(2*e),s=0),(i=o[s++])&&(n[a++]=i);return n}var o=e("parse-asn1"),f=e("randombytes"),s=e("create-hash"),c=e("./mgf"),u=e("./xor"),h=e("bn.js"),d=e("./withPublic"),l=e("browserify-rsa");t.exports=function(e,t,r){var a;a=e.padding?e.padding:r?1:4;var f,s=o(e);if(4===a)f=i(s,t);else if(1===a)f=n(s,t,r);else{if(3!==a)throw new Error("unknown padding");if(f=new h(t),f.cmp(s.modulus)>=0)throw new Error("data too long for modulus")}return r?l(f,s):d(f,s)}}).call(this,e("buffer").Buffer)},{"./mgf":161,"./withPublic":204,"./xor":205,"bn.js":162,"browserify-rsa":163,buffer:4,"create-hash":137,"parse-asn1":168,randombytes:206}],204:[function(e,t,r){(function(r){function i(e,t){return new r(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}var n=e("bn.js");t.exports=i}).call(this,e("buffer").Buffer)},{"bn.js":162,buffer:4}],205:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e}},{}],206:[function(e,t,r){(function(e,r,i){"use strict";function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function a(t,n){if(t>65536)throw new Error("requested too many random bytes");var a=new r.Uint8Array(t);t>0&&o.getRandomValues(a);var f=new i(a.buffer);return"function"==typeof n?e.nextTick(function(){n(null,f)}):f}var o=r.crypto||r.msCrypto;o&&o.getRandomValues?t.exports=a:t.exports=n}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:211,buffer:4}],207:[function(e,t,r){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function f(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,r,i,a,s,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(r=this._events[e],f(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,s=0;s<i;s++)c[s].apply(this,a);return!0},i.prototype.addListener=function(e,t){var r;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(r=f(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},i.prototype.removeListener=function(e,t){var r,i,a,f;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(f=a;f-- >0;)if(r[f]===t||r[f].listener&&r[f].listener===t){i=f;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],208:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],209:[function(e,t,r){function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}t.exports=function(e){return null!=e&&(i(e)||n(e)||!!e._isBuffer)}},{}],210:[function(e,t,r){(function(e){function t(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)t(e[i],i,e)&&r.push(e[i]);return r}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return n.exec(e).slice(1)};r.resolve=function(){for(var r="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,n="/"===o.charAt(0))}return r=t(i(r.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(e){var n=r.isAbsolute(e),a="/"===o(e,-1);return e=t(i(e.split("/"),function(e){return!!e}),!n).join("/"),e||n||(e="."),e&&a&&(e+="/"),(n?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function i(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=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var n=i(e.split("/")),a=i(t.split("/")),o=Math.min(n.length,a.length),f=o,s=0;s<o;s++)if(n[s]!==a[s]){f=s;break}for(var c=[],s=f;s<n.length;s++)c.push("..");return c=c.concat(a.slice(f)),c.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=a(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},r.basename=function(e,t){var r=a(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return a(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:211}],211:[function(e,t,r){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function a(e){if(h===setTimeout)return setTimeout(e,0);if((h===i||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}function o(e){if(d===clearTimeout)return clearTimeout(e);if((d===n||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function f(){v&&p&&(v=!1,p.length?b=p.concat(b):y=-1,b.length&&s())}function s(){if(!v){var e=a(f);v=!0;for(var t=b.length;t;){for(p=b,b=[];++y<t;)p&&p[y].run();y=-1,t=b.length}p=null,v=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var h,d,l=t.exports={};!function(){try{h="function"==typeof setTimeout?setTimeout:i}catch(e){h=i}try{d="function"==typeof clearTimeout?clearTimeout:n}catch(e){d=n}}();var p,b=[],v=!1,y=-1;l.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];b.push(new c(e,t)),1!==b.length||v||a(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=u,l.addListener=u,l.once=u,l.off=u,l.removeListener=u,l.removeAllListeners=u,l.emit=u,l.binding=function(e){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(e){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],212:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":213}],213:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);c.call(this,e),u.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",n)}function n(){this.allowHalfOpen||this._writableState.ended||f(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=i;var f=e("process-nextick-args"),s=e("core-util-is");s.inherits=e("inherits");var c=e("./_stream_readable"),u=e("./_stream_writable");s.inherits(i,c);for(var h=o(u.prototype),d=0;d<h.length;d++){var l=h[d];i.prototype[l]||(i.prototype[l]=u.prototype[l])}},{"./_stream_readable":215,"./_stream_writable":217,"core-util-is":220,inherits:208,"process-nextick-args":222}],214:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}t.exports=i;var n=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":216,"core-util-is":220,inherits:208}],215:[function(e,t,r){(function(r){"use strict";function i(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?R(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function n(t,r){I=I||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof I&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(N||(N=e("string_decoder/").StringDecoder),this.decoder=new N(t.encoding),this.encoding=t.encoding)}function a(t){if(I=I||e("./_stream_duplex"),!(this instanceof a))return new a(t);this._readableState=new n(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),T.call(this)}function o(e,t,r,i,n){var a=u(t,r);if(a)e.emit("error",a);else if(null===r)t.reading=!1,h(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!n){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&n){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||n||i||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),n||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&d(e))),p(e,t)}else n||(t.reading=!1);return f(t)}function f(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function u(e,t){var r=null;return L.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,d(e)}}function d(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(O("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?C(l,e):l(e))}function l(e){O("emit readable"),e.emit("readable"),w(e)}function p(e,t){t.readingMore||(t.readingMore=!0,C(b,e,t))}function b(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(O("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function v(e){return function(){var t=e._readableState;O("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&P(e,"data")&&(t.flowing=!0,w(e))}}function y(e){O("readable nexttick read 0"),e.read(0)}function m(e,t){t.resumeScheduled||(t.resumeScheduled=!0,C(g,e,t))}function g(e,t){t.reading||(O("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;for(O("flow",t.flowing);t.flowing&&null!==e.read(););}function _(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=k(e,t.buffer,t.decoder),r}function k(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():r?S(e,t):E(e,t),i}function S(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(n+=o===a.length?a:a.slice(0,e),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function E(e,t){var r=j.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n}return t.length-=n,r}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,C(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function x(e,t){for(var r=0,i=e.length;r<i;r++)t(e[r],r)}function B(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}t.exports=a;var I,C=e("process-nextick-args"),R=e("isarray");a.ReadableState=n;var T,P=(e("events").EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{T=e("stream")}catch(e){}finally{T||(T=e("events").EventEmitter)}}();var L=e("buffer").Buffer,j=e("buffer-shims"),D=e("core-util-is");D.inherits=e("inherits");var U=e("util"),O=void 0;O=U&&U.debuglog?U.debuglog("stream"):function(){};var N,q=e("./internal/streams/BufferList");D.inherits(a,T),a.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=j.from(e,t),t=""),o(this,r,e,t,!1)},a.prototype.unshift=function(e){return o(this,this._readableState,e,"",!0)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(t){return N||(N=e("string_decoder/").StringDecoder),this._readableState.decoder=new N(t),this._readableState.encoding=t,this};var F=8388608;a.prototype.read=function(e){O("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return O("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):d(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&M(this),null;var i=t.needReadable;O("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,O("length less than watermark",i)),t.ended||t.reading?(i=!1,O("reading or ended",i)):i&&(O("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=c(r,t)));var n;return n=e>0?_(e,t):null,null===n?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},a.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(e,t){function n(e){O("onunpipe"),e===d&&o()}function a(){O("onend"),e.end()}function o(){O("cleanup"),e.removeListener("close",c),e.removeListener("finish",u),e.removeListener("drain",y),e.removeListener("error",s),e.removeListener("unpipe",n),d.removeListener("end",a),d.removeListener("end",o),d.removeListener("data",f),m=!0,!l.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function f(t){O("ondata"),g=!1,!1!==e.write(t)||g||((1===l.pipesCount&&l.pipes===e||l.pipesCount>1&&B(l.pipes,e)!==-1)&&!m&&(O("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,g=!0),d.pause())}function s(t){O("onerror",t),h(),e.removeListener("error",s),0===P(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",u),h()}function u(){O("onfinish"),e.removeListener("close",c),h()}function h(){O("unpipe"),d.unpipe(e)}var d=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1,O("pipe count=%d opts=%j",l.pipesCount,t);var p=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,b=p?a:o;l.endEmitted?C(b):d.once("end",b),e.on("unpipe",n);var y=v(d);e.on("drain",y);var m=!1,g=!1;return d.on("data",f),i(e,"error",s),e.once("close",c),e.once("finish",u),e.emit("pipe",d),l.flowing||(O("pipe resume"),d.resume()),e},
|
|
a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var n=0;n<i;n++)r[n].emit("unpipe",this);return this}var a=B(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},a.prototype.on=function(e,t){var r=T.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&d(this):C(y,this))}return r},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var e=this._readableState;return e.flowing||(O("resume"),e.flowing=!0,m(this,e)),this},a.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},a.prototype.wrap=function(e){var t=this._readableState,r=!1,i=this;e.on("end",function(){if(O("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&i.push(e)}i.push(null)}),e.on("data",function(n){if(O("wrapped data"),t.decoder&&(n=t.decoder.write(n)),(!t.objectMode||null!==n&&void 0!==n)&&(t.objectMode||n&&n.length)){i.push(n)||(r=!0,e.pause())}});for(var n in e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));return x(["error","close","destroy","pause","resume"],function(t){e.on(t,i.emit.bind(i,t))}),i._read=function(t){O("wrapped _read",t),r&&(r=!1,e.resume())},i},a._fromList=_}).call(this,e("_process"))},{"./_stream_duplex":213,"./internal/streams/BufferList":218,_process:211,buffer:4,"buffer-shims":219,"core-util-is":220,events:207,inherits:208,isarray:221,"process-nextick-args":222,"string_decoder/":229,util:3}],216:[function(e,t,r){"use strict";function i(e){this.afterTransform=function(t,r){return n(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function n(e,t,r){var i=e._transformState;i.transforming=!1;var n=i.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));i.writechunk=null,i.writecb=null,null!==r&&void 0!==r&&e.push(r),n(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);f.call(this,e),this._transformState=new i(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,r){o(t,e,r)}):o(t)})}function o(e,t,r){if(t)return e.emit("error",t);null!==r&&void 0!==r&&e.push(r);var i=e._writableState,n=e._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=a;var f=e("./_stream_duplex"),s=e("core-util-is");s.inherits=e("inherits"),s.inherits(a,f),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,f.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":213,"core-util-is":220,inherits:208}],217:[function(e,t,r){(function(r){"use strict";function i(e){this.next=null,this.entry=null,this.finish=onCorkedFinish.bind(void 0,this,e)}function n(){}function a(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function o(t,r){S=S||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof S&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,a=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:a,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){b(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function f(t){if(S=S||e("./_stream_duplex"),!(R.call(f,this)||this instanceof S))return new f(t);this._writableState=new o(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),x.call(this)}function s(e,t){var r=new Error("write after end");e.emit("error",r),E(t,r)}function c(e,t,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),E(i,a),n=!1),n}function u(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=C.from(t,r)),t}function h(e,t,r,i,n,o){r||(i=u(t,i,n),I.isBuffer(i)&&(n="buffer"));var f=t.objectMode?1:i.length;t.length+=f;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new a(i,n,o),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else d(e,t,!1,f,i,n,o);return s}function d(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function l(e,t,r,i,n){--t.pendingcb,r?E(n,i):n(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function b(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(p(r),t)l(e,r,i,t,n);else{var a=g(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?M(v,e,r,a,n):v(e,r,a,n)}}function v(e,t,r,i){r||y(e,t),t.pendingcb--,i(),_(e,t)}function y(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var f=0;r;)a[f]=r,r=r.next,f+=1;d(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t)}else{for(;r;){var s=r.chunk,c=r.encoding,u=r.callback;if(d(e,t,!1,t.objectMode?1:s.length,s,c,u),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function g(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function _(e,t){var r=g(t);return r&&(0===t.pendingcb?(w(e,t),t.finished=!0,e.emit("finish")):w(e,t)),r}function k(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?E(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=f;var S,E=e("process-nextick-args"),M=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:E;f.WritableState=o;var A=e("core-util-is");A.inherits=e("inherits");var x,B={deprecate:e("util-deprecate")};!function(){try{x=e("stream")}catch(e){}finally{x||(x=e("events").EventEmitter)}}();var I=e("buffer").Buffer,C=e("buffer-shims");A.inherits(f,x),o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:B.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var R;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(e){return!!R.call(this,e)||e&&e._writableState instanceof o}})):R=function(e){return e instanceof this},f.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},f.prototype.write=function(e,t,r){var i=this._writableState,a=!1,o=I.isBuffer(e);return"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?s(this,r):(o||c(this,i,e,r))&&(i.pendingcb++,a=h(this,i,o,e,t,r)),a},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},f.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},f.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},f.prototype._writev=null,f.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||k(this,i,r)}}).call(this,e("_process"))},{"./_stream_duplex":213,_process:211,buffer:4,"buffer-shims":219,"core-util-is":220,events:207,inherits:208,"process-nextick-args":222,"util-deprecate":223}],218:[function(e,t,r){"use strict";function i(){this.head=null,this.tail=null,this.length=0}var n=(e("buffer").Buffer,e("buffer-shims"));t.exports=i,i.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},i.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},i.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},i.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t=n.allocUnsafe(e>>>0),r=this.head,i=0;r;)r.data.copy(t,i),i+=r.data.length,r=r.next;return t}},{buffer:4,"buffer-shims":219}],219:[function(e,t,r){(function(t){"use strict";var i=e("buffer"),n=i.Buffer,a=i.SlowBuffer,o=i.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof n.alloc)return n.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var i=r,a=t;void 0===a&&(i=void 0,a=0);var f=new n(e);if("string"==typeof a)for(var s=new n(a,i),c=s.length,u=-1;++u<e;)f[u]=s[u%c];else f.fill(a);return f},r.allocUnsafe=function(e){if("function"==typeof n.allocUnsafe)return n.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");return new n(e)},r.from=function(e,r,i){if("function"==typeof n.from&&(!t.Uint8Array||Uint8Array.from!==n.from))return n.from(e,r,i);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new n(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=r;if(1===arguments.length)return new n(e);void 0===a&&(a=0);var o=i;if(void 0===o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new n(e.slice(a,a+o))}if(n.isBuffer(e)){var f=new n(e.length);return e.copy(f,0,0,e.length),f}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new n(e);if("Buffer"===e.type&&Array.isArray(e.data))return new n(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof n.allocUnsafeSlow)return n.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:4}],220:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function i(e){return"boolean"==typeof e}function n(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function f(e){return"string"==typeof e}function s(e){return"symbol"==typeof e}function c(e){return void 0===e}function u(e){return"[object RegExp]"===v(e)}function h(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===v(e)}function l(e){return"[object Error]"===v(e)||e instanceof Error}function p(e){return"function"==typeof e}function b(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function v(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=i,r.isNull=n,r.isNullOrUndefined=a,r.isNumber=o,r.isString=f,r.isSymbol=s,r.isUndefined=c,r.isRegExp=u,r.isObject=h,r.isDate=d,r.isError=l,r.isFunction=p,r.isPrimitive=b,r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":209}],221:[function(e,t,r){arguments[4][7][0].apply(r,arguments)},{dup:7}],222:[function(e,t,r){(function(e){"use strict";function r(t,r,i,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,f=arguments.length;switch(f){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,i)});case 4:return e.nextTick(function(){t.call(null,r,i,n)});default:for(a=new Array(f-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(this,e("_process"))},{_process:211}],223:[function(e,t,r){(function(e){function r(e,t){function r(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}if(i("noDeprecation"))return e;var n=!1;return r}function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],224:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":214}],225:[function(e,t,r){(function(i){var n=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!i.browser&&"disable"===i.env.READABLE_STREAM&&n&&(t.exports=n)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":213,"./lib/_stream_passthrough.js":214,"./lib/_stream_readable.js":215,"./lib/_stream_transform.js":216,"./lib/_stream_writable.js":217,_process:211}],226:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":216}],227:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":217}],228:[function(e,t,r){function i(){n.call(this)}t.exports=i;var n=e("events").EventEmitter;e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function i(){c.readable&&c.resume&&c.resume()}function a(){u||(u=!0,e.end())}function o(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(s(),0===n.listenerCount(this,"error"))throw e}function s(){c.removeListener("data",r),e.removeListener("drain",i),c.removeListener("end",a),c.removeListener("close",o),c.removeListener("error",f),e.removeListener("error",f),c.removeListener("end",s),c.removeListener("close",s),e.removeListener("close",s)}var c=this;c.on("data",r),e.on("drain",i),e._isStdio||t&&t.end===!1||(c.on("end",a),c.on("close",o));var u=!1;return c.on("error",f),e.on("error",f),c.on("end",s),c.on("close",s),e.on("close",s),e.emit("pipe",c),e}},{events:207,inherits:208,"readable-stream/duplex.js":212,"readable-stream/passthrough.js":224,"readable-stream/readable.js":225,"readable-stream/transform.js":226,"readable-stream/writable.js":227}],229:[function(e,t,r){function i(e){if(e&&!s(e))throw new Error("Unknown encoding: "+e)}function n(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var f=e("buffer").Buffer,s=f.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),i(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=n)}this.charBuffer=new f(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived),t+=e.toString(this.encoding,0,n);var n=t.length-1,i=t.charCodeAt(n);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,n)}return t},c.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},c.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,i=this.charBuffer,n=this.encoding;t+=i.slice(0,r).toString(n)}return t}},{buffer:4}],230:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),function(t){r[t]=e[t]}),forEach(globals,function(t){e[t]&&(r[t]=e[t])});var a=Object_keys(r),o=i.call(r,this.code);return forEach(Object_keys(r),function(t){(t in e||indexOf(a,t)===-1)&&(e[t]=r[t])}),forEach(globals,function(t){t in e||defineProp(e,t,r[t])}),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return forEach(Object_keys(t),function(r){e[r]=t[r]}),r},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}},{indexof:231}],231:[function(e,t,r){var i=[].indexOf;t.exports=function(e,t){if(i)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},{}],232:[function(e,t,r){function i(e,t,r,n,a,o,f){i.prototype.init.apply(this,arguments)}function n(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function a(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}function o(e,t,r){switch(e){case f:case u:case j:return(t+3>>2)*(r+3>>2)*8;case s:case c:case h:case d:return(t+3>>2)*(r+3>>2)*16;case R:case P:return Math.floor((Math.max(t,8)*Math.max(r,8)*4+7)/8);case T:case L:return Math.floor((Math.max(t,16)*Math.max(r,8)*2+7)/8);default:return 0}}t.exports=i,i.prototype.init=function(e,t,r,i,n,a,o,f){this.src=e,this.width=i,this.height=n,this.data=t,this.type=r,this.levels=a,this.internalFormat=o,this.isCompressedImage=!0,this.crunch=f,this.preserveSource=!0;var s=this.complete;return this.complete=!!t,!s&&this.complete&&this.onload&&this.onload({target:this}),this},i.prototype.dispose=function(){this.data=null},i.prototype.generateWebGLTexture=function(e){if(null===this.data)throw"Trying to create a second (or more) webgl texture from the same CompressedImage : "+this.src;for(var t=this.width,r=this.height,i=this.levels,n=0,a=0;a<this.levels;++a){var f=o(this.internalFormat,t,r),s=new Uint8Array(this.data.buffer,this.data.byteOffset+n,f);e.compressedTexImage2D(e.TEXTURE_2D,a,this.internalFormat,t,r,0,s),t>>=1,t<1&&(t=1),r>>=1,r<1&&(r=1),n+=f}i>1?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)),this.crunch&&(Module._free(this.crunch[0]),Module._free(this.crunch[1])),this.preserveSource||(this.data=null)},i.loadFromArrayBuffer=function(e,t){return new i(t).loadFromArrayBuffer(e)},i.prototype.loadFromArrayBuffer=function(e,t){var r=new Uint8Array(e,0,3);if(r[0]=="DDS".charCodeAt(0)&&r[1]=="DDS".charCodeAt(1)&&r[2]=="DDS".charCodeAt(2))return this._loadDDS(e);if(r[0]=="PVR".charCodeAt(0)&&r[1]=="PVR".charCodeAt(1)&&r[2]=="PVR".charCodeAt(2))return this._loadPVR(e);if(t)return this._loadCRN(e);throw"Compressed texture format is not recognized: "+this.src},i.prototype.arrayBufferCopy=function(e,t,r,i){dst32Offset=r/4;for(var n=i%4,a=new Uint32Array(e.buffer,0,(i-n)/4),o=new Uint32Array(t.buffer),f=0;f<a.length;f++)o[dst32Offset+f]=a[f];for(var s=i-n;s<i;s++)t[r+s]=e[s]},i.prototype._loadCRN=function(e){DXT_FORMAT_MAP=[f,s,c];var t=e.byteLength,r=new Uint8Array(e),n=Module._malloc(t);i.prototype.arrayBufferCopy(r,Module.HEAPU8,n,t);var a=Module._crn_get_width(n,t),o=Module._crn_get_height(n,t),u=Module._crn_get_levels(n,t),h=Module._crn_get_dxt_format(n,t),d=Module._crn_get_uncompressed_size(n,t,0),l=Module._malloc(d);Module._crn_decompress(n,t,l,d,0);var p=new Uint8Array(Module.HEAPU8.buffer,l,d);return this.init(this.src,p,"CRN",a,o,u,DXT_FORMAT_MAP[h],[n,l])},i.prototype._loadDDS=function(e){var t=new Int32Array(e,0,v);if(t[y]!=l)throw"Invalid magic number in DDS header";if(!t[S]&b)throw"Unsupported format, must contain a FourCC code";var r,i=t[E];switch(i){case M:r=f;break;case A:r=s;break;case x:r=c;break;case B:r=u;break;case I:r=h;break;case C:r=d;break;default:throw"Unsupported FourCC code: "+a(i)}var n=1;t[g]&p&&(n=Math.max(1,t[k]));var o=t[_],R=t[w],T=t[m]+4,P=new Uint8Array(e,T);return this.init(this.src,P,"DDS",o,R,n,r)},i.prototype._loadPVR=function(e){var t=new Int32Array(e,0,X);if(t[J]!=H)throw"Invalid magic number in PVR header";var r,i=t[V];switch(i){case D:r=T;break;case U:r=L;break;case O:r=R;break;case N:r=P;break;case q:r=j;break;case F:r=f;break;case z:r=s;break;case K:r=c;break;default:throw"Unsupported PVR format: "+i}var n=t[W],a=t[Y],o=t[G],u=t[Z]+52,h=new Uint8Array(e,u);return this.init(this.src,h,"PVR",n,a,o,r)};var f=33776,s=33778,c=33779,u=35986,h=35987,d=34798,l=542327876,p=131072,b=4,v=31,y=0,m=1,g=2,w=3,_=4,k=7,S=20,E=21,M=n("DXT1"),A=n("DXT3"),x=n("DXT5"),B=n("ATC "),I=n("ATCA"),C=n("ATCI"),R=35840,T=35841,P=35842,L=35843,j=36196,D=0,U=1,O=2,N=3,q=6,F=7,z=9,K=5,X=13,H=55727696,J=0,V=2,Y=6,W=7,G=11,Z=12},{}],233:[function(e,t,r){function i(e){a.call(this,e),this.extensions={}}var n=PIXI,a=(e("./CompressedImage"),n.WebGLManager);i.prototype=Object.create(a.prototype),i.prototype.constructor=i,i.prototype.onContextChange=function(){function e(e,t){var r=["","WEBKIT_","MOZ_"],i=null;for(var n in r)if(i=e.getExtension(r[n]+t))break;return i}var t=this.renderer.gl;this.extensions={dxt:e(t,"WEBGL_compressed_texture_s3tc"),pvrtc:e(t,"WEBGL_compressed_texture_pvrtc"),atc:e(t,"WEBGL_compressed_texture_atc")},this.extensions.crn=this.extensions.dxt},t.exports=i,n.WebGLRenderer.registerPlugin("compressedTextureManager",i),i.prototype.getSupportedExtensions=function(){return this.extensions}},{"./CompressedImage":232}],234:[function(e,t,r){var i=e("./CompressedImage"),n=PIXI.glCore.GLTexture,a={uploadNotCompressed:n.prototype.upload,isCompressed:!1,upload:function(e){if(!(e instanceof i))return this.uploadNotCompressed(e);this.bind();var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),this.isCompressed=!0,e.generateWebGLTexture(t)},enableMipmap:function(){if(!this.isCompressed){var e=this.gl;this.bind(),this.mipmap=!0,e.generateMipmap(e.TEXTURE_2D)}}};t.exports=a},{"./CompressedImage":232}],235:[function(e,t,r){function i(t){t=t||[];var r=e("./imageParser")();return function(e,i){var n=e.metadata.choice;if(!n)return i();var a=e.url;if(!e._defaultUrlChoice){e._defaultUrlChoice=a;var o=a.lastIndexOf(".");if(!(o>=0))return i();e._baseUrl=a.substring(0,o)}for(var f=n.length-1;f>=0;f--){a=e._baseUrl+n[f];for(var s=0;s<t.length;s++)if(n[f]===t[s])return e.url=a,e.loadType=e._determineLoadType(),r(e,i)}return r(e,i)}}t.exports=i},{"./imageParser":237}],236:[function(e,t,r){function i(e){return function(e,t){if(e.texture&&e._defaultUrlChoice&&e._defaultUrl!=e.url){var r=e.texture,i=r.baseTexture;delete a.BaseTextureCache[i.imageUrl],delete a.TextureCache[i.imageUrl],i.imageUrl=e._defaultUrlChoice,n.utils.BaseTextureCache[i.imageUrl]=i,n.utils.TextureCache[i.imageUrl]=r}t()}}var n=PIXI,a=n.utils;e("./CompressedImage");t.exports=i},{"./CompressedImage":232}],237:[function(e,t,r){function i(){return function(e,t){if(e.url.indexOf(".crn")!=-1||e.url.indexOf(".dds")!=-1||e.url.indexOf(".pvr")!=-1||e.url.indexOf(".etc1")!=-1){var r=e.compressedImage||new a(e.url);if(e.data)throw"compressedImageParser middleware must be specified in loader.before() and must have zero resource.data";e.isCompressedImage=!0,e.data=r,e.onComplete.add(function(){e.type=o.TYPE.IMAGE,r.loadFromArrayBuffer(e.data,e.url.includes(".crn")),e.data=r})}t()}}var n=PIXI,a=(n.utils,e("./CompressedImage")),o=n.loaders.Resource;o.setExtensionXhrType("dds",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("crn",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("pvr",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("etc1",o.XHR_RESPONSE_TYPE.BUFFER),t.exports=i},{"./CompressedImage":232}],238:[function(e,t,r){(function(r){var i={CompressedImage:e("./CompressedImage"),CompressedTextureManager:e("./CompressedTextureManager"),imageParser:e("./imageParser"),extensionChooser:e("./extensionChooser"),extensionFixer:e("./extensionFixer"),GLTextureMixin:e("./GLTextureMixin"),detectExtensions:function(e,t){var r=[];if(e instanceof PIXI.WebGLRenderer){var i=e.plugins.compressedTextureManager.getSupportedExtensions();i.dxt&&r.push(".dds"),i.pvrtc&&r.push(".pvr"),i.atc&&r.push(".atc")}else PIXI.CanvasRenderer;t=t||e.resolution;for(var n="@"+t+"x",a=r.slice(0);a.length>0;)r.push(n+a.pop());return r.push(n+".png"),r.push(n+".jpg"),r.push(n+".json"),r.push(n+".atlas"),r}};try{i.crn=e("./../lib/crn_decomp")}catch(e){console.warn("Unable to load crn decompression in pixi-compressed-textures")}Object.assign(PIXI.glCore.GLTexture.prototype,i.GLTextureMixin),PIXI.loaders.Loader.addPixiMiddleware(i.extensionFixer),PIXI.loader.use(i.extensionFixer()),t.exports=r.PIXI.compressedTextures=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./../lib/crn_decomp":1,"./CompressedImage":232,"./CompressedTextureManager":233,"./GLTextureMixin":234,"./extensionChooser":235,"./extensionFixer":236,"./imageParser":237}]},{},[238])(238)});
|
|
//# sourceMappingURL=pixi-compressed-textures.min.js.map
|