forked from ProtonMail/WebClients
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenpgp.min.js
More file actions
9 lines (9 loc) · 282 KB
/
openpgp.min.js
File metadata and controls
9 lines (9 loc) · 282 KB
1
2
3
4
5
6
7
8
9
/*! OpenPGPjs.org this is LGPL licensed code, see LICENSE/our website for more information.- v1.2.0 - 2016-10-26 */!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.openpgp=e():"undefined"!=typeof global?global.openpgp=e():"undefined"!=typeof self&&(self.openpgp=e())}(function(){return function e(n,o,f){function p(i,t){if(!o[i]){if(!n[i]){var u="function"==typeof require&&require;if(!t&&u)return u(i,!0);if(d)return d(i,!0);throw new Error("Cannot find module '"+i+"'")}var l=o[i]={exports:{}};n[i][0].call(l.exports,function(e){var o=n[i][1][e];return p(o?o:e)},l,l.exports,e,n,o,f)}return o[i].exports}for(var d="function"==typeof require&&require,i=0;i<f.length;i++)p(f[i]);return p}({1:[function(e,n,o){"use strict";var f=e("./promise/promise").Promise,p=e("./promise/polyfill").polyfill;o.Promise=f,o.polyfill=p},{"./promise/polyfill":5,"./promise/promise":6}],2:[function(e,n,o){"use strict";function f(e){var n=this;if(!p(e))throw new TypeError("You must pass an array to all.");return new n(function(n,o){function f(e){return function(n){p(e,n)}}function p(e,o){t[e]=o,0===--u&&n(t)}var i,t=[],u=e.length;0===u&&n([]);for(var l=0;l<e.length;l++)i=e[l],i&&d(i.then)?i.then(f(l),o):p(l,i)})}var p=e("./utils").isArray,d=e("./utils").isFunction;o.all=f},{"./utils":10}],3:[function(e,n,o){function f(){return function(){l.nextTick(i)}}function p(){var e=0,n=new s(i),o=document.createTextNode("");return n.observe(o,{characterData:!0}),function(){o.data=e=++e%2}}function d(){return function(){y.setTimeout(i,1)}}function i(){for(var e=0;e<w.length;e++){var n=w[e],o=n[0],f=n[1];o(f)}w=[]}function t(e,n){var o=w.push([e,n]);1===o&&u()}var u,l=e("__browserify_process"),c="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g="undefined"!=typeof window?window:{},s=g.MutationObserver||g.WebKitMutationObserver,y="undefined"!=typeof c?c:void 0===this?window:this,w=[];u="undefined"!=typeof l&&"[object process]"==={}.toString.call(l)?f():s?p():d(),o.asap=t},{__browserify_process:11}],4:[function(e,n,o){"use strict";function f(e,n){return 2!==arguments.length?p[e]:void(p[e]=n)}var p={instrument:!1};o.config=p,o.configure=f},{}],5:[function(e,n,o){function f(){var e;e="undefined"!=typeof p?p:"undefined"!=typeof window&&window.document?window:self;var n="Promise"in e&&"resolve"in e.Promise&&"reject"in e.Promise&&"all"in e.Promise&&"race"in e.Promise&&function(){var n;return new e.Promise(function(e){n=e}),i(n)}();n||(e.Promise=d)}var p="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},d=e("./promise").Promise,i=e("./utils").isFunction;o.polyfill=f},{"./promise":6,"./utils":10}],6:[function(e,n,o){"use strict";function f(e){if(!b(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof f))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],p(e,this)}function p(e,n){function o(e){l(n,e)}function f(e){g(n,e)}try{e(o,f)}catch(p){f(p)}}function d(e,n,o,f){var p,d,i,t,c=b(o);if(c)try{p=o(f),i=!0}catch(s){t=!0,d=s}else p=f,i=!0;u(n,p)||(c&&i?l(n,p):t?g(n,d):e===v?l(n,p):e===z&&g(n,p))}function i(e,n,o,f){var p=e._subscribers,d=p.length;p[d]=n,p[d+v]=o,p[d+z]=f}function t(e,n){for(var o,f,p=e._subscribers,i=e._detail,t=0;t<p.length;t+=3)o=p[t],f=p[t+n],d(n,o,f,i);e._subscribers=null}function u(e,n){var o,f=null;try{if(e===n)throw new TypeError("A promises callback cannot return that same promise.");if(a(n)&&(f=n.then,b(f)))return f.call(n,function(f){return o?!0:(o=!0,void(n!==f?l(e,f):c(e,f)))},function(n){return o?!0:(o=!0,void g(e,n))}),!0}catch(p){return o?!0:(g(e,p),!0)}return!1}function l(e,n){e===n?c(e,n):u(e,n)||c(e,n)}function c(e,n){e._state===k&&(e._state=q,e._detail=n,w.async(s,e))}function g(e,n){e._state===k&&(e._state=q,e._detail=n,w.async(y,e))}function s(e){t(e,e._state=v)}function y(e){t(e,e._state=z)}var w=e("./config").config,a=(e("./config").configure,e("./utils").objectOrFunction),b=e("./utils").isFunction,r=(e("./utils").now,e("./all").all),m=e("./race").race,x=e("./resolve").resolve,j=e("./reject").reject,h=e("./asap").asap;w.async=h;var k=void 0,q=0,v=1,z=2;f.prototype={constructor:f,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(e,n){var o=this,f=new this.constructor(function(){});if(this._state){var p=arguments;w.async(function(){d(o._state,f,p[o._state-1],o._detail)})}else i(this,f,e,n);return f},"catch":function(e){return this.then(null,e)}},f.all=r,f.race=m,f.resolve=x,f.reject=j,o.Promise=f},{"./all":2,"./asap":3,"./config":4,"./race":7,"./reject":8,"./resolve":9,"./utils":10}],7:[function(e,n,o){"use strict";function f(e){var n=this;if(!p(e))throw new TypeError("You must pass an array to race.");return new n(function(n,o){for(var f,p=0;p<e.length;p++)f=e[p],f&&"function"==typeof f.then?f.then(n,o):n(f)})}var p=e("./utils").isArray;o.race=f},{"./utils":10}],8:[function(e,n,o){"use strict";function f(e){var n=this;return new n(function(n,o){o(e)})}o.reject=f},{}],9:[function(e,n,o){"use strict";function f(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var n=this;return new n(function(n){n(e)})}o.resolve=f},{}],10:[function(e,n,o){"use strict";function f(e){return p(e)||"object"==typeof e&&null!==e}function p(e){return"function"==typeof e}function d(e){return"[object Array]"===Object.prototype.toString.call(e)}var i=Date.now||function(){return(new Date).getTime()};o.objectOrFunction=f,o.isFunction=p,o.isArray=d,o.now=i},{}],11:[function(e,n,o){var f=n.exports={};f.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(n){var o=[];return window.addEventListener("message",function(e){var n=e.source;if((n===window||null===n)&&"process-tick"===e.data&&(e.stopPropagation(),o.length>0)){var f=o.shift();f()}},!0),function(e){o.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),f.title="browser",f.browser=!0,f.env={},f.argv=[],f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],12:[function(e,n,o){"use strict";function f(e,n){return this instanceof f?(this.text=e.replace(/\r/g,"").replace(/[\t ]+\n/g,"\n").replace(/\n/g,"\r\n"),void(this.packets=n||new t.List)):new f(e,n)}function p(e){var n=l.decode(e);if(n.type!==u.armor.signed)throw new Error("No cleartext signed message.");var o=new t.List;o.read(n.data),d(n.headers,o);var p=new f(n.text,o);return p}function d(e,n){for(var o=function(e){for(var o=0;o<n.length;o++)if(n[o].tag===u.packet.signature&&!e.some(function(e){return n[o].hashAlgorithm===e}))return!1;return!0},f=null,p=[],d=0;d<e.length;d++){if(f=e[d].match(/Hash: (.+)/),!f)throw new Error('Only "Hash" header allowed in cleartext signed message');f=f[1].replace(/\s/g,""),f=f.split(","),f=f.map(function(e){e=e.toLowerCase();try{return u.write(u.hash,e)}catch(n){throw new Error("Unknown hash algorithm in armor header: "+e)}}),p=p.concat(f)}if(!p.length&&!o([u.hash.md5]))throw new Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(!o(p))throw new Error("Hash algorithm mismatch in armor header and signature")}var i=e("./config"),t=e("./packet"),u=e("./enums.js"),l=e("./encoding/armor.js");f.prototype.getSigningKeyIds=function(){var e=[],n=this.packets.filterByTag(u.packet.signature);return n.forEach(function(n){e.push(n.issuerKeyId)}),e},f.prototype.sign=function(e){var n=new t.List,o=new t.Literal;o.setText(this.text);for(var f=0;f<e.length;f++){if(e[f].isPublic())throw new Error("Need private key for signing");var p=new t.Signature;p.signatureType=u.signature.text,p.hashAlgorithm=i.prefer_hash_algorithm;var d=e[f].getSigningKeyPacket();if(p.publicKeyAlgorithm=d.algorithm,!d.isDecrypted)throw new Error("Private key is not decrypted.");p.sign(d,o),n.push(p)}this.packets=n},f.prototype.verify=function(e){var n=[],o=this.packets.filterByTag(u.packet.signature),f=new t.Literal;f.setText(this.text);for(var p=0;p<o.length;p++){for(var d=null,i=0;i<e.length&&!(d=e[i].getSigningKeyPacket(o[p].issuerKeyId));i++);var l={};d?(l.keyid=o[p].issuerKeyId,l.valid=o[p].verify(d,f)):(l.keyid=o[p].issuerKeyId,l.valid=null),n.push(l)}return n},f.prototype.getText=function(){return this.text.replace(/\r\n/g,"\n")},f.prototype.armor=function(){var e={hash:u.read(u.hash,i.prefer_hash_algorithm).toUpperCase(),text:this.text,data:this.packets.write()};return l.encode(u.armor.signed,e)},o.CleartextMessage=f,o.readArmored=p},{"./config":17,"./encoding/armor.js":41,"./enums.js":43,"./packet":53}],13:[function(e,n,o){(function(){"use strict";function e(e,n){var o=e.split("."),f=y;!(o[0]in f)&&f.execScript&&f.execScript("var "+o[0]);for(var p;o.length&&(p=o.shift());)o.length||n===g?f=f[p]?f[p]:f[p]={}:f[p]=n}function n(e,n){if(this.index="number"==typeof n?n:0,this.d=0,this.buffer=e instanceof(w?Uint8Array:Array)?e:new(w?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&o(this)}function o(e){var n,o=e.buffer,f=o.length,p=new(w?Uint8Array:Array)(f<<1);if(w)p.set(o);else for(n=0;f>n;++n)p[n]=o[n];return e.buffer=p}function f(e){this.buffer=new(w?Uint16Array:Array)(2*e),this.length=0}function p(e,n){this.e=k,this.f=0,this.input=w&&e instanceof Array?new Uint8Array(e):e,this.c=0,n&&(n.lazy&&(this.f=n.lazy),"number"==typeof n.compressionType&&(this.e=n.compressionType),n.outputBuffer&&(this.b=w&&n.outputBuffer instanceof Array?new Uint8Array(n.outputBuffer):n.outputBuffer),"number"==typeof n.outputIndex&&(this.c=n.outputIndex)),this.b||(this.b=new(w?Uint8Array:Array)(32768))}function d(e,n){this.length=e,this.g=n}function i(e,n){function o(e,n){var o,f=e.g,p=[],d=0;o=z[e.length],p[d++]=65535&o,p[d++]=o>>16&255,p[d++]=o>>24;var i;switch(s){case 1===f:i=[0,f-1,0];break;case 2===f:i=[1,f-2,0];break;case 3===f:i=[2,f-3,0];break;case 4===f:i=[3,f-4,0];break;case 6>=f:i=[4,f-5,1];break;case 8>=f:i=[5,f-7,1];break;case 12>=f:i=[6,f-9,2];break;case 16>=f:i=[7,f-13,2];break;case 24>=f:i=[8,f-17,3];break;case 32>=f:i=[9,f-25,3];break;case 48>=f:i=[10,f-33,4];break;case 64>=f:i=[11,f-49,4];break;case 96>=f:i=[12,f-65,5];break;case 128>=f:i=[13,f-97,5];break;case 192>=f:i=[14,f-129,6];break;case 256>=f:i=[15,f-193,6];break;case 384>=f:i=[16,f-257,7];break;case 512>=f:i=[17,f-385,7];break;case 768>=f:i=[18,f-513,8];break;case 1024>=f:i=[19,f-769,8];break;case 1536>=f:i=[20,f-1025,9];break;case 2048>=f:i=[21,f-1537,9];break;case 3072>=f:i=[22,f-2049,10];break;case 4096>=f:i=[23,f-3073,10];break;case 6144>=f:i=[24,f-4097,11];break;case 8192>=f:i=[25,f-6145,11];break;case 12288>=f:i=[26,f-8193,12];break;case 16384>=f:i=[27,f-12289,12];break;case 24576>=f:i=[28,f-16385,13];break;case 32768>=f:i=[29,f-24577,13];break;default:throw"invalid distance"}o=i,p[d++]=o[0],p[d++]=o[1],p[d++]=o[2];var t,u;for(t=0,u=p.length;u>t;++t)r[m++]=p[t];j[p[0]]++,h[p[3]]++,x=e.length+n-1,y=null}var f,p,d,i,u,l,c,y,a,b={},r=w?new Uint16Array(2*n.length):[],m=0,x=0,j=new(w?Uint32Array:Array)(286),h=new(w?Uint32Array:Array)(30),k=e.f;if(!w){for(d=0;285>=d;)j[d++]=0;for(d=0;29>=d;)h[d++]=0}for(j[256]=1,f=0,p=n.length;p>f;++f){for(d=u=0,i=3;i>d&&f+d!==p;++d)u=u<<8|n[f+d];if(b[u]===g&&(b[u]=[]),l=b[u],!(0<x--)){for(;0<l.length&&32768<f-l[0];)l.shift();if(f+3>=p){for(y&&o(y,-1),d=0,i=p-f;i>d;++d)a=n[f+d],r[m++]=a,++j[a];break}0<l.length?(c=t(n,f,l),y?y.length<c.length?(a=n[f-1],r[m++]=a,++j[a],o(c,0)):o(y,-1):c.length<k?y=c:o(c,0)):y?o(y,-1):(a=n[f],r[m++]=a,++j[a])}l.push(f)}return r[m++]=256,j[256]++,e.j=j,e.i=h,w?r.subarray(0,m):r}function t(e,n,o){var f,p,i,t,u,l,c=0,g=e.length;t=0,l=o.length;e:for(;l>t;t++){if(f=o[l-t-1],i=3,c>3){for(u=c;u>3;u--)if(e[f+u-1]!==e[n+u-1])continue e;i=c}for(;258>i&&g>n+i&&e[f+i]===e[n+i];)++i;if(i>c&&(p=f,c=i),258===i)break}return new d(c,n-p)}function u(e,n){var o,p,d,i,t,u=e.length,c=new f(572),g=new(w?Uint8Array:Array)(u);if(!w)for(i=0;u>i;i++)g[i]=0;for(i=0;u>i;++i)0<e[i]&&c.push(i,e[i]);if(o=Array(c.length/2),p=new(w?Uint32Array:Array)(c.length/2),1===o.length)return g[c.pop().index]=1,g;for(i=0,t=c.length/2;t>i;++i)o[i]=c.pop(),p[i]=o[i].value;for(d=l(p,p.length,n),i=0,t=o.length;t>i;++i)g[o[i].index]=d[i];return g}function l(e,n,o){function f(e){var o=y[e][a[e]];o===n?(f(e+1),f(e+1)):--g[o],++a[e]}var p,d,i,t,u,l=new(w?Uint16Array:Array)(o),c=new(w?Uint8Array:Array)(o),g=new(w?Uint8Array:Array)(n),s=Array(o),y=Array(o),a=Array(o),b=(1<<o)-n,r=1<<o-1;for(l[o-1]=n,d=0;o>d;++d)r>b?c[d]=0:(c[d]=1,b-=r),b<<=1,l[o-2-d]=(l[o-1-d]/2|0)+n;for(l[0]=c[0],s[0]=Array(l[0]),y[0]=Array(l[0]),d=1;o>d;++d)l[d]>2*l[d-1]+c[d]&&(l[d]=2*l[d-1]+c[d]),s[d]=Array(l[d]),y[d]=Array(l[d]);for(p=0;n>p;++p)g[p]=o;for(i=0;i<l[o-1];++i)s[o-1][i]=e[i],y[o-1][i]=i;for(p=0;o>p;++p)a[p]=0;for(1===c[o-1]&&(--g[0],++a[o-1]),d=o-2;d>=0;--d){for(t=p=0,u=a[d+1],i=0;i<l[d];i++)t=s[d+1][u]+s[d+1][u+1],t>e[p]?(s[d][i]=t,y[d][i]=n,u+=2):(s[d][i]=e[p],y[d][i]=p,++p);a[d]=0,1===c[d]&&f(d)}return g}function c(e){var n,o,f,p,d=new(w?Uint16Array:Array)(e.length),i=[],t=[],u=0;for(n=0,o=e.length;o>n;n++)i[e[n]]=(0|i[e[n]])+1;for(n=1,o=16;o>=n;n++)t[n]=u,u+=0|i[n],u<<=1;for(n=0,o=e.length;o>n;n++)for(u=t[e[n]],t[e[n]]+=1,f=d[n]=0,p=e[n];p>f;f++)d[n]=d[n]<<1|1&u,u>>>=1;return d}var g=void 0,s=!0,y=this,w="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;n.prototype.a=function(e,n,f){var p,d=this.buffer,i=this.index,t=this.d,u=d[i];if(f&&n>1&&(e=n>8?(j[255&e]<<24|j[e>>>8&255]<<16|j[e>>>16&255]<<8|j[e>>>24&255])>>32-n:j[e]>>8-n),8>n+t)u=u<<n|e,t+=n;else for(p=0;n>p;++p)u=u<<1|e>>n-p-1&1,8===++t&&(t=0,d[i++]=j[u],u=0,i===d.length&&(d=o(this)));d[i]=u,this.buffer=d,this.d=t,this.index=i},n.prototype.finish=function(){var e,n=this.buffer,o=this.index;return 0<this.d&&(n[o]<<=8-this.d,n[o]=j[n[o]],o++),w?e=n.subarray(0,o):(n.length=o,e=n),e};var a,b=new(w?Uint8Array:Array)(256);for(a=0;256>a;++a){for(var r=a,m=r,x=7,r=r>>>1;r;r>>>=1)m<<=1,m|=1&r,--x;b[a]=(m<<x&255)>>>0}var j=b;f.prototype.getParent=function(e){return 2*((e-2)/4|0)},f.prototype.push=function(e,n){var o,f,p,d=this.buffer;for(o=this.length,d[this.length++]=n,d[this.length++]=e;o>0&&(f=this.getParent(o),d[o]>d[f]);)p=d[o],d[o]=d[f],d[f]=p,p=d[o+1],d[o+1]=d[f+1],d[f+1]=p,o=f;return this.length},f.prototype.pop=function(){var e,n,o,f,p,d=this.buffer;for(n=d[0],e=d[1],this.length-=2,d[0]=d[this.length],d[1]=d[this.length+1],p=0;(f=2*p+2,!(f>=this.length))&&(f+2<this.length&&d[f+2]>d[f]&&(f+=2),d[f]>d[p]);)o=d[p],d[p]=d[f],d[f]=o,o=d[p+1],d[p+1]=d[f+1],d[f+1]=o,p=f;return{index:e,value:n,length:this.length}};var h,k=2,q=[];for(h=0;288>h;h++)switch(s){case 143>=h:q.push([h+48,8]);break;case 255>=h:q.push([h-144+400,9]);break;case 279>=h:q.push([h-256+0,7]);break;case 287>=h:q.push([h-280+192,8]);break;default:throw"invalid literal: "+h}p.prototype.h=function(){var e,o,f,p,d=this.input;switch(this.e){case 0:for(f=0,p=d.length;p>f;){o=w?d.subarray(f,f+65535):d.slice(f,f+65535),f+=o.length;var t=o,l=f===p,y=g,a=g,b=g,r=g,m=g,x=this.b,j=this.c;if(w){for(x=new Uint8Array(this.b.buffer);x.length<=j+t.length+5;)x=new Uint8Array(x.length<<1);x.set(this.b)}if(y=l?1:0,x[j++]=0|y,a=t.length,b=~a+65536&65535,x[j++]=255&a,x[j++]=a>>>8&255,x[j++]=255&b,x[j++]=b>>>8&255,w)x.set(t,j),j+=t.length,x=x.subarray(0,j);else{for(r=0,m=t.length;m>r;++r)x[j++]=t[r];x.length=j}this.c=j,this.b=x}break;case 1:var h=new n(w?new Uint8Array(this.b.buffer):this.b,this.c);h.a(1,1,s),h.a(1,2,s);var v,z,A,B=i(this,d);for(v=0,z=B.length;z>v;v++)if(A=B[v],n.prototype.a.apply(h,q[A]),A>256)h.a(B[++v],B[++v],s),h.a(B[++v],5),h.a(B[++v],B[++v],s);else if(256===A)break;this.b=h.finish(),this.c=this.b.length;break;case k:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new n(w?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=k,R.a(1,1,s),R.a(C,2,s),D=i(this,d),H=u(this.j,15),I=c(H),J=u(this.i,7),K=c(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ee=new(w?Uint32Array:Array)($+_),ne=new(w?Uint32Array:Array)(316),oe=new(w?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ee[V++]=H[U];for(U=0;_>U;U++)ee[V++]=J[U];if(!w)for(U=0,X=oe.length;X>U;++U)oe[U]=0;for(U=Y=0,X=ee.length;X>U;U+=V){for(V=1;X>U+V&&ee[U+V]===ee[U];++V);if(W=V,0===ee[U])if(3>W)for(;0<W--;)ne[Y++]=0,oe[0]++;else for(;W>0;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ne[Y++]=17,ne[Y++]=Z-3,oe[17]++):(ne[Y++]=18,ne[Y++]=Z-11,oe[18]++),W-=Z;else if(ne[Y++]=ee[U],oe[ee[U]]++,W--,3>W)for(;0<W--;)ne[Y++]=ee[U],oe[ee[U]]++;else for(;W>0;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ne[Y++]=16,ne[Y++]=Z-3,oe[16]++,W-=Z}for(e=w?ne.subarray(0,Y):ne.slice(0,Y),L=u(oe,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=c(L),R.a(E-257,5,s),R.a(F-1,5,s),R.a(G-4,4,s),P=0;G>P;P++)R.a(T[P],3,s);for(P=0,Q=e.length;Q>P;P++)if(N=e[P],R.a(M[N],L[N],s),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(e[P],O,s)}var fe,pe,de,ie,te,ue,le,ce,ge=[I,H],se=[K,J];for(te=ge[0],ue=ge[1],le=se[0],ce=se[1],fe=0,pe=D.length;pe>fe;++fe)if(de=D[fe],R.a(te[de],ue[de],s),de>256)R.a(D[++fe],D[++fe],s),ie=D[++fe],R.a(le[ie],ce[ie],s),R.a(D[++fe],D[++fe],s);else if(256===de)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var v=function(){function e(e){switch(s){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:throw"invalid length: "+e}}var n,o,f=[];for(n=3;258>=n;n++)o=e(n),f[n]=o[2]<<24|o[1]<<16|o[0];return f}(),z=w?new Uint32Array(v):v;e("Zlib.RawDeflate",p),e("Zlib.RawDeflate.prototype.compress",p.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:k};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],e("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],14:[function(e,n,o){(function(){"use strict";function e(e,n){var o=e.split("."),f=i;!(o[0]in f)&&f.execScript&&f.execScript("var "+o[0]);for(var p;o.length&&(p=o.shift());)o.length||void 0===n?f=f[p]?f[p]:f[p]={}:f[p]=n}function n(e){var n,o,f,p,d,i,u,l,c,g,s=e.length,y=0,w=Number.POSITIVE_INFINITY;for(l=0;s>l;++l)e[l]>y&&(y=e[l]),e[l]<w&&(w=e[l]);for(n=1<<y,o=new(t?Uint32Array:Array)(n),f=1,p=0,d=2;y>=f;){for(l=0;s>l;++l)if(e[l]===f){for(i=0,u=p,c=0;f>c;++c)i=i<<1|1&u,u>>=1;for(g=f<<16|l,c=i;n>c;c+=d)o[c]=g;++p}++f,p<<=1,d<<=1}return[o,y,w]}function o(e,n){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=t?new Uint8Array(e):e,this.l=!1,this.i=l,this.q=!1,(n||!(n={}))&&(n.index&&(this.d=n.index),n.bufferSize&&(this.h=n.bufferSize),n.bufferType&&(this.i=n.bufferType),n.resize&&(this.q=n.resize)),this.i){case u:this.a=32768,this.b=new(t?Uint8Array:Array)(32768+this.h+258);break;case l:this.a=0,this.b=new(t?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throw Error("invalid inflate mode")}}function f(e,n){for(var o,f=e.f,p=e.c,d=e.input,i=e.d,t=d.length;n>p;){if(i>=t)throw Error("input buffer is broken");f|=d[i++]<<p,p+=8}return o=f&(1<<n)-1,e.f=f>>>n,e.c=p-n,e.d=i,o}function p(e,n){for(var o,f,p=e.f,d=e.c,i=e.input,t=e.d,u=i.length,l=n[0],c=n[1];c>d&&!(t>=u);)p|=i[t++]<<d,d+=8;return o=l[p&(1<<c)-1],f=o>>>16,e.f=p>>f,e.c=d-f,e.d=t,65535&o}function d(e){function o(e,n,o){var d,i,t,u=this.p;for(t=0;e>t;)switch(d=p(this,n)){case 16:for(i=3+f(this,2);i--;)o[t++]=u;break;case 17:for(i=3+f(this,3);i--;)o[t++]=0;u=0;break;case 18:for(i=11+f(this,7);i--;)o[t++]=0;u=0;break;default:u=o[t++]=d}return this.p=u,o}var d,i,u,l,c=f(e,5)+257,g=f(e,5)+1,s=f(e,4)+4,w=new(t?Uint8Array:Array)(y.length);for(l=0;s>l;++l)w[y[l]]=f(e,3);if(!t)for(l=s,s=w.length;s>l;++l)w[y[l]]=0;d=n(w),i=new(t?Uint8Array:Array)(c),u=new(t?Uint8Array:Array)(g),e.p=0,e.j(n(o.call(e,c,d,i)),n(o.call(e,g,d,u)))}var i=this,t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,u=0,l=1;o.prototype.u=function(){for(;!this.l;){var e=f(this,3);switch(1&e&&(this.l=!0),e>>>=1){case 0:var n=this.input,o=this.d,p=this.b,i=this.a,c=n.length,g=void 0,s=void 0,y=p.length,w=void 0;if(this.c=this.f=0,o+1>=c)throw Error("invalid uncompressed block header: LEN");if(g=n[o++]|n[o++]<<8,o+1>=c)throw Error("invalid uncompressed block header: NLEN");if(s=n[o++]|n[o++]<<8,g===~s)throw Error("invalid uncompressed block header: length verify");if(o+g>n.length)throw Error("input buffer is broken");switch(this.i){case u:for(;i+g>p.length;){if(w=y-i,g-=w,t)p.set(n.subarray(o,o+w),i),i+=w,o+=w;else for(;w--;)p[i++]=n[o++];this.a=i,p=this.e(),i=this.a}break;case l:for(;i+g>p.length;)p=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(t)p.set(n.subarray(o,o+g),i),i+=g,o+=g;else for(;g--;)p[i++]=n[o++];this.d=o,this.a=i,this.b=p;break;case 1:this.j(z,B);break;case 2:d(this);break;default:throw Error("unknown BTYPE: "+e)}}return this.m()};var c,g,s=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],y=t?new Uint16Array(s):s,w=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],a=t?new Uint16Array(w):w,b=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=t?new Uint8Array(b):b,m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],x=t?new Uint16Array(m):m,j=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],h=t?new Uint8Array(j):j,k=new(t?Uint8Array:Array)(288);for(c=0,g=k.length;g>c;++c)k[c]=143>=c?8:255>=c?9:279>=c?7:8;var q,v,z=n(k),A=new(t?Uint8Array:Array)(30);for(q=0,v=A.length;v>q;++q)A[q]=5;var B=n(A);o.prototype.j=function(e,n){var o=this.b,d=this.a;this.n=e;for(var i,t,u,l,c=o.length-258;256!==(i=p(this,e));)if(256>i)d>=c&&(this.a=d,o=this.e(),d=this.a),o[d++]=i;else for(t=i-257,l=a[t],0<r[t]&&(l+=f(this,r[t])),i=p(this,n),u=x[i],0<h[i]&&(u+=f(this,h[i])),d>=c&&(this.a=d,o=this.e(),d=this.a);l--;)o[d]=o[d++-u];for(;8<=this.c;)this.c-=8,this.d--;this.a=d},o.prototype.t=function(e,n){var o=this.b,d=this.a;this.n=e;for(var i,t,u,l,c=o.length;256!==(i=p(this,e));)if(256>i)d>=c&&(o=this.e(),c=o.length),o[d++]=i;else for(t=i-257,l=a[t],0<r[t]&&(l+=f(this,r[t])),i=p(this,n),u=x[i],0<h[i]&&(u+=f(this,h[i])),d+l>c&&(o=this.e(),c=o.length);l--;)o[d]=o[d++-u];for(;8<=this.c;)this.c-=8,this.d--;this.a=d},o.prototype.e=function(){var e,n,o=new(t?Uint8Array:Array)(this.a-32768),f=this.a-32768,p=this.b;if(t)o.set(p.subarray(32768,o.length));else for(e=0,n=o.length;n>e;++e)o[e]=p[e+32768];if(this.g.push(o),this.k+=o.length,t)p.set(p.subarray(f,f+32768));else for(e=0;32768>e;++e)p[e]=p[f+e];return this.a=32768,p},o.prototype.v=function(e){var n,o,f,p,d=this.input.length/this.d+1|0,i=this.input,u=this.b;return e&&("number"==typeof e.o&&(d=e.o),"number"==typeof e.r&&(d+=e.r)),2>d?(o=(i.length-this.d)/this.n[2],p=258*(o/2)|0,f=p<u.length?u.length+p:u.length<<1):f=u.length*d,t?(n=new Uint8Array(f),n.set(u)):n=u,this.b=n},o.prototype.m=function(){var e,n,o,f,p,d=0,i=this.b,u=this.g,l=new(t?Uint8Array:Array)(this.k+(this.a-32768));if(0===u.length)return t?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(n=0,o=u.length;o>n;++n)for(e=u[n],f=0,p=e.length;p>f;++f)l[d++]=e[f];for(n=32768,o=this.a;o>n;++n)l[d++]=i[n];return this.g=[],this.buffer=l},o.prototype.s=function(){var e,n=this.a;return t?this.q?(e=new Uint8Array(n),e.set(this.b.subarray(0,n))):e=this.b.subarray(0,n):(this.b.length>n&&(this.b.length=n),e=this.b),this.buffer=e},e("Zlib.RawInflate",o),e("Zlib.RawInflate.prototype.decompress",o.prototype.u);var C,D,E,F,G={ADAPTIVE:l,BLOCK:u};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],e("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}],15:[function(e,n,o){(function(){"use strict";function e(e){throw e}function n(e,n){var o=e.split("."),f=k;!(o[0]in f)&&f.execScript&&f.execScript("var "+o[0]);for(var p;o.length&&(p=o.shift());)o.length||n===j?f=f[p]?f[p]:f[p]={}:f[p]=n}function o(n,o){this.index="number"==typeof o?o:0,this.i=0,this.buffer=n instanceof(q?Uint8Array:Array)?n:new(q?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&e(Error("invalid index")),this.buffer.length<=this.index&&this.f()}function f(e){this.buffer=new(q?Uint16Array:Array)(2*e),this.length=0}function p(e){var n,o,f,p,d,i,t,u,l,c,g=e.length,s=0,y=Number.POSITIVE_INFINITY;for(u=0;g>u;++u)e[u]>s&&(s=e[u]),e[u]<y&&(y=e[u]);for(n=1<<s,o=new(q?Uint32Array:Array)(n),f=1,p=0,d=2;s>=f;){for(u=0;g>u;++u)if(e[u]===f){for(i=0,t=p,l=0;f>l;++l)i=i<<1|1&t,t>>=1;for(c=f<<16|u,l=i;n>l;l+=d)o[l]=c;++p}++f,p<<=1,d<<=1}return[o,s,y]}function d(e,n){this.h=F,this.w=0,this.input=q&&e instanceof Array?new Uint8Array(e):e,this.b=0,n&&(n.lazy&&(this.w=n.lazy),"number"==typeof n.compressionType&&(this.h=n.compressionType),n.outputBuffer&&(this.a=q&&n.outputBuffer instanceof Array?new Uint8Array(n.outputBuffer):n.outputBuffer),"number"==typeof n.outputIndex&&(this.b=n.outputIndex)),this.a||(this.a=new(q?Uint8Array:Array)(32768))}function i(e,n){this.length=e,this.H=n}function t(n,o){function f(n,o){var f,p=n.H,d=[],i=0;f=J[n.length],d[i++]=65535&f,d[i++]=f>>16&255,d[i++]=f>>24;var t;switch(h){case 1===p:t=[0,p-1,0];break;case 2===p:t=[1,p-2,0];break;case 3===p:t=[2,p-3,0];break;case 4===p:t=[3,p-4,0];break;case 6>=p:t=[4,p-5,1];break;case 8>=p:t=[5,p-7,1];break;case 12>=p:t=[6,p-9,2];break;case 16>=p:t=[7,p-13,2];break;case 24>=p:t=[8,p-17,3];break;case 32>=p:t=[9,p-25,3];break;case 48>=p:t=[10,p-33,4];break;case 64>=p:t=[11,p-49,4];break;case 96>=p:t=[12,p-65,5];break;case 128>=p:t=[13,p-97,5];break;case 192>=p:t=[14,p-129,6];break;case 256>=p:t=[15,p-193,6];break;case 384>=p:t=[16,p-257,7];break;case 512>=p:t=[17,p-385,7];break;case 768>=p:t=[18,p-513,8];break;case 1024>=p:t=[19,p-769,8];break;case 1536>=p:t=[20,p-1025,9];break;case 2048>=p:t=[21,p-1537,9];break;case 3072>=p:t=[22,p-2049,10];break;case 4096>=p:t=[23,p-3073,10];break;case 6144>=p:t=[24,p-4097,11];break;case 8192>=p:t=[25,p-6145,11];break;case 12288>=p:t=[26,p-8193,12];break;case 16384>=p:t=[27,p-12289,12];break;case 24576>=p:t=[28,p-16385,13];break;case 32768>=p:t=[29,p-24577,13];break;default:e("invalid distance")}f=t,d[i++]=f[0],d[i++]=f[1],d[i++]=f[2];var u,l;for(u=0,l=d.length;l>u;++u)a[b++]=d[u];m[d[0]]++,x[d[3]]++,r=n.length+o-1,s=null}var p,d,i,t,l,c,g,s,y,w={},a=q?new Uint16Array(2*o.length):[],b=0,r=0,m=new(q?Uint32Array:Array)(286),x=new(q?Uint32Array:Array)(30),k=n.w;if(!q){for(i=0;285>=i;)m[i++]=0;for(i=0;29>=i;)x[i++]=0}for(m[256]=1,p=0,d=o.length;d>p;++p){for(i=l=0,t=3;t>i&&p+i!==d;++i)l=l<<8|o[p+i];if(w[l]===j&&(w[l]=[]),c=w[l],!(0<r--)){for(;0<c.length&&32768<p-c[0];)c.shift();if(p+3>=d){for(s&&f(s,-1),i=0,t=d-p;t>i;++i)y=o[p+i],a[b++]=y,++m[y];break}0<c.length?(g=u(o,p,c),s?s.length<g.length?(y=o[p-1],a[b++]=y,++m[y],f(g,0)):f(s,-1):g.length<k?s=g:f(g,0)):s?f(s,-1):(y=o[p],a[b++]=y,++m[y])}c.push(p)}return a[b++]=256,m[256]++,n.M=m,n.L=x,q?a.subarray(0,b):a}function u(e,n,o){var f,p,d,t,u,l,c=0,g=e.length;t=0,l=o.length;e:for(;l>t;t++){if(f=o[l-t-1],d=3,c>3){for(u=c;u>3;u--)if(e[f+u-1]!==e[n+u-1])continue e;d=c}for(;258>d&&g>n+d&&e[f+d]===e[n+d];)++d;if(d>c&&(p=f,c=d),258===d)break}return new i(c,n-p)}function l(e,n){var o,p,d,i,t,u=e.length,l=new f(572),g=new(q?Uint8Array:Array)(u);if(!q)for(i=0;u>i;i++)g[i]=0;for(i=0;u>i;++i)0<e[i]&&l.push(i,e[i]);if(o=Array(l.length/2),p=new(q?Uint32Array:Array)(l.length/2),1===o.length)return g[l.pop().index]=1,g;for(i=0,t=l.length/2;t>i;++i)o[i]=l.pop(),p[i]=o[i].value;for(d=c(p,p.length,n),i=0,t=o.length;t>i;++i)g[o[i].index]=d[i];return g}function c(e,n,o){function f(e){var o=y[e][w[e]];o===n?(f(e+1),f(e+1)):--g[o],++w[e]}var p,d,i,t,u,l=new(q?Uint16Array:Array)(o),c=new(q?Uint8Array:Array)(o),g=new(q?Uint8Array:Array)(n),s=Array(o),y=Array(o),w=Array(o),a=(1<<o)-n,b=1<<o-1;for(l[o-1]=n,d=0;o>d;++d)b>a?c[d]=0:(c[d]=1,a-=b),a<<=1,l[o-2-d]=(l[o-1-d]/2|0)+n;for(l[0]=c[0],s[0]=Array(l[0]),y[0]=Array(l[0]),d=1;o>d;++d)l[d]>2*l[d-1]+c[d]&&(l[d]=2*l[d-1]+c[d]),s[d]=Array(l[d]),y[d]=Array(l[d]);for(p=0;n>p;++p)g[p]=o;for(i=0;i<l[o-1];++i)s[o-1][i]=e[i],y[o-1][i]=i;for(p=0;o>p;++p)w[p]=0;for(1===c[o-1]&&(--g[0],++w[o-1]),d=o-2;d>=0;--d){for(t=p=0,u=w[d+1],i=0;i<l[d];i++)t=s[d+1][u]+s[d+1][u+1],t>e[p]?(s[d][i]=t,y[d][i]=n,u+=2):(s[d][i]=e[p],y[d][i]=p,++p);w[d]=0,1===c[d]&&f(d)}return g}function g(e){var n,o,f,p,d=new(q?Uint16Array:Array)(e.length),i=[],t=[],u=0;for(n=0,o=e.length;o>n;n++)i[e[n]]=(0|i[e[n]])+1;for(n=1,o=16;o>=n;n++)t[n]=u,u+=0|i[n],u<<=1;for(n=0,o=e.length;o>n;n++)for(u=t[e[n]],t[e[n]]+=1,f=d[n]=0,p=e[n];p>f;f++)d[n]=d[n]<<1|1&u,u>>>=1;return d}function s(n,o){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=q?new Uint8Array(n):n,this.s=!1,this.n=L,this.C=!1,(o||!(o={}))&&(o.index&&(this.c=o.index),o.bufferSize&&(this.m=o.bufferSize),o.bufferType&&(this.n=o.bufferType),o.resize&&(this.C=o.resize)),this.n){case K:this.b=32768,this.a=new(q?Uint8Array:Array)(32768+this.m+258);break;case L:this.b=0,this.a=new(q?Uint8Array:Array)(this.m),this.f=this.K,this.t=this.I,this.o=this.J;break;default:e(Error("invalid inflate mode"))}}function y(n,o){for(var f,p=n.g,d=n.e,i=n.input,t=n.c,u=i.length;o>d;)t>=u&&e(Error("input buffer is broken")),p|=i[t++]<<d,d+=8;return f=p&(1<<o)-1,n.g=p>>>o,n.e=d-o,n.c=t,f}function w(e,n){for(var o,f,p=e.g,d=e.e,i=e.input,t=e.c,u=i.length,l=n[0],c=n[1];c>d&&!(t>=u);)p|=i[t++]<<d,d+=8;return o=l[p&(1<<c)-1],f=o>>>16,e.g=p>>f,e.e=d-f,e.c=t,65535&o}function a(e){function n(e,n,o){var f,p,d,i=this.z;for(d=0;e>d;)switch(f=w(this,n)){case 16:for(p=3+y(this,2);p--;)o[d++]=i;break;case 17:for(p=3+y(this,3);p--;)o[d++]=0;i=0;break;case 18:for(p=11+y(this,7);p--;)o[d++]=0;i=0;break;default:i=o[d++]=f}return this.z=i,o}var o,f,d,i,t=y(e,5)+257,u=y(e,5)+1,l=y(e,4)+4,c=new(q?Uint8Array:Array)(Q.length);for(i=0;l>i;++i)c[Q[i]]=y(e,3);if(!q)for(i=l,l=c.length;l>i;++i)c[Q[i]]=0;o=p(c),f=new(q?Uint8Array:Array)(t),d=new(q?Uint8Array:Array)(u),e.z=0,e.o(p(n.call(e,t,o,f)),p(n.call(e,u,o,d)))}function b(e){if("string"==typeof e){var n,o,f=e.split("");for(n=0,o=f.length;o>n;n++)f[n]=(255&f[n].charCodeAt(0))>>>0;e=f}for(var p,d=1,i=0,t=e.length,u=0;t>0;){p=t>1024?1024:t,t-=p;do d+=e[u++],i+=d;while(--p);d%=65521,i%=65521}return(i<<16|d)>>>0}function r(n,o){var f,p;switch(this.input=n,this.c=0,(o||!(o={}))&&(o.index&&(this.c=o.index),o.verify&&(this.N=o.verify)),f=n[this.c++],p=n[this.c++],15&f){case fe:this.method=fe;break;default:e(Error("unsupported compression method"))}0!==((f<<8)+p)%31&&e(Error("invalid fcheck flag:"+((f<<8)+p)%31)),32&p&&e(Error("fdict flag is not supported")),this.B=new s(n,{index:this.c,bufferSize:o.bufferSize,bufferType:o.bufferType,resize:o.resize})}function m(e,n){this.input=e,this.a=new(q?Uint8Array:Array)(32768),this.h=pe.k;var o,f={};!n&&(n={})||"number"!=typeof n.compressionType||(this.h=n.compressionType);for(o in n)f[o]=n[o];
f.outputBuffer=this.a,this.A=new d(this.input,f)}function x(e,o){var f,p,d,i;if(Object.keys)f=Object.keys(o);else for(p in f=[],d=0,o)f[d++]=p;for(d=0,i=f.length;i>d;++d)p=f[d],n(e+"."+p,o[p])}var j=void 0,h=!0,k=this,q="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;o.prototype.f=function(){var e,n=this.buffer,o=n.length,f=new(q?Uint8Array:Array)(o<<1);if(q)f.set(n);else for(e=0;o>e;++e)f[e]=n[e];return this.buffer=f},o.prototype.d=function(e,n,o){var f,p=this.buffer,d=this.index,i=this.i,t=p[d];if(o&&n>1&&(e=n>8?(D[255&e]<<24|D[e>>>8&255]<<16|D[e>>>16&255]<<8|D[e>>>24&255])>>32-n:D[e]>>8-n),8>n+i)t=t<<n|e,i+=n;else for(f=0;n>f;++f)t=t<<1|e>>n-f-1&1,8===++i&&(i=0,p[d++]=D[t],t=0,d===p.length&&(p=this.f()));p[d]=t,this.buffer=p,this.i=i,this.index=d},o.prototype.finish=function(){var e,n=this.buffer,o=this.index;return 0<this.i&&(n[o]<<=8-this.i,n[o]=D[n[o]],o++),q?e=n.subarray(0,o):(n.length=o,e=n),e};var v,z=new(q?Uint8Array:Array)(256);for(v=0;256>v;++v){for(var A=v,B=A,C=7,A=A>>>1;A;A>>>=1)B<<=1,B|=1&A,--C;z[v]=(B<<C&255)>>>0}var D=z;f.prototype.getParent=function(e){return 2*((e-2)/4|0)},f.prototype.push=function(e,n){var o,f,p,d=this.buffer;for(o=this.length,d[this.length++]=n,d[this.length++]=e;o>0&&(f=this.getParent(o),d[o]>d[f]);)p=d[o],d[o]=d[f],d[f]=p,p=d[o+1],d[o+1]=d[f+1],d[f+1]=p,o=f;return this.length},f.prototype.pop=function(){var e,n,o,f,p,d=this.buffer;for(n=d[0],e=d[1],this.length-=2,d[0]=d[this.length],d[1]=d[this.length+1],p=0;(f=2*p+2,!(f>=this.length))&&(f+2<this.length&&d[f+2]>d[f]&&(f+=2),d[f]>d[p]);)o=d[p],d[p]=d[f],d[f]=o,o=d[p+1],d[p+1]=d[f+1],d[f+1]=o,p=f;return{index:e,value:n,length:this.length}};var E,F=2,G={NONE:0,r:1,k:F,O:3},H=[];for(E=0;288>E;E++)switch(h){case 143>=E:H.push([E+48,8]);break;case 255>=E:H.push([E-144+400,9]);break;case 279>=E:H.push([E-256+0,7]);break;case 287>=E:H.push([E-280+192,8]);break;default:e("invalid literal: "+E)}d.prototype.j=function(){var n,f,p,d,i=this.input;switch(this.h){case 0:for(p=0,d=i.length;d>p;){f=q?i.subarray(p,p+65535):i.slice(p,p+65535),p+=f.length;var u=f,c=p===d,s=j,y=j,w=j,a=j,b=j,r=this.a,m=this.b;if(q){for(r=new Uint8Array(this.a.buffer);r.length<=m+u.length+5;)r=new Uint8Array(r.length<<1);r.set(this.a)}if(s=c?1:0,r[m++]=0|s,y=u.length,w=~y+65536&65535,r[m++]=255&y,r[m++]=y>>>8&255,r[m++]=255&w,r[m++]=w>>>8&255,q)r.set(u,m),m+=u.length,r=r.subarray(0,m);else{for(a=0,b=u.length;b>a;++a)r[m++]=u[a];r.length=m}this.b=m,this.a=r}break;case 1:var x=new o(q?new Uint8Array(this.a.buffer):this.a,this.b);x.d(1,1,h),x.d(1,2,h);var k,v,z,A=t(this,i);for(k=0,v=A.length;v>k;k++)if(z=A[k],o.prototype.d.apply(x,H[z]),z>256)x.d(A[++k],A[++k],h),x.d(A[++k],5),x.d(A[++k],A[++k],h);else if(256===z)break;this.a=x.finish(),this.b=this.a.length;break;case F:var B,C,D,E,G,I,J,K,L,M,N,O,P,Q,R,S=new o(q?new Uint8Array(this.a.buffer):this.a,this.b),T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(19);for(B=F,S.d(1,1,h),S.d(B,2,h),C=t(this,i),I=l(this.M,15),J=g(I),K=l(this.L,7),L=g(K),D=286;D>257&&0===I[D-1];D--);for(E=30;E>1&&0===K[E-1];E--);var V,W,X,Y,Z,$,_=D,ee=E,ne=new(q?Uint32Array:Array)(_+ee),oe=new(q?Uint32Array:Array)(316),fe=new(q?Uint8Array:Array)(19);for(V=W=0;_>V;V++)ne[W++]=I[V];for(V=0;ee>V;V++)ne[W++]=K[V];if(!q)for(V=0,Y=fe.length;Y>V;++V)fe[V]=0;for(V=Z=0,Y=ne.length;Y>V;V+=W){for(W=1;Y>V+W&&ne[V+W]===ne[V];++W);if(X=W,0===ne[V])if(3>X)for(;0<X--;)oe[Z++]=0,fe[0]++;else for(;X>0;)$=138>X?X:138,$>X-3&&X>$&&($=X-3),10>=$?(oe[Z++]=17,oe[Z++]=$-3,fe[17]++):(oe[Z++]=18,oe[Z++]=$-11,fe[18]++),X-=$;else if(oe[Z++]=ne[V],fe[ne[V]]++,X--,3>X)for(;0<X--;)oe[Z++]=ne[V],fe[ne[V]]++;else for(;X>0;)$=6>X?X:6,$>X-3&&X>$&&($=X-3),oe[Z++]=16,oe[Z++]=$-3,fe[16]++,X-=$}for(n=q?oe.subarray(0,Z):oe.slice(0,Z),M=l(fe,7),Q=0;19>Q;Q++)U[Q]=M[T[Q]];for(G=19;G>4&&0===U[G-1];G--);for(N=g(M),S.d(D-257,5,h),S.d(E-1,5,h),S.d(G-4,4,h),Q=0;G>Q;Q++)S.d(U[Q],3,h);for(Q=0,R=n.length;R>Q;Q++)if(O=n[Q],S.d(N[O],M[O],h),O>=16){switch(Q++,O){case 16:P=2;break;case 17:P=3;break;case 18:P=7;break;default:e("invalid code: "+O)}S.d(n[Q],P,h)}var pe,de,ie,te,ue,le,ce,ge,se=[J,I],ye=[L,K];for(ue=se[0],le=se[1],ce=ye[0],ge=ye[1],pe=0,de=C.length;de>pe;++pe)if(ie=C[pe],S.d(ue[ie],le[ie],h),ie>256)S.d(C[++pe],C[++pe],h),te=C[++pe],S.d(ce[te],ge[te],h),S.d(C[++pe],C[++pe],h);else if(256===ie)break;this.a=S.finish(),this.b=this.a.length;break;default:e("invalid compression type")}return this.a};var I=function(){function n(n){switch(h){case 3===n:return[257,n-3,0];case 4===n:return[258,n-4,0];case 5===n:return[259,n-5,0];case 6===n:return[260,n-6,0];case 7===n:return[261,n-7,0];case 8===n:return[262,n-8,0];case 9===n:return[263,n-9,0];case 10===n:return[264,n-10,0];case 12>=n:return[265,n-11,1];case 14>=n:return[266,n-13,1];case 16>=n:return[267,n-15,1];case 18>=n:return[268,n-17,1];case 22>=n:return[269,n-19,2];case 26>=n:return[270,n-23,2];case 30>=n:return[271,n-27,2];case 34>=n:return[272,n-31,2];case 42>=n:return[273,n-35,3];case 50>=n:return[274,n-43,3];case 58>=n:return[275,n-51,3];case 66>=n:return[276,n-59,3];case 82>=n:return[277,n-67,4];case 98>=n:return[278,n-83,4];case 114>=n:return[279,n-99,4];case 130>=n:return[280,n-115,4];case 162>=n:return[281,n-131,5];case 194>=n:return[282,n-163,5];case 226>=n:return[283,n-195,5];case 257>=n:return[284,n-227,5];case 258===n:return[285,n-258,0];default:e("invalid length: "+n)}}var o,f,p=[];for(o=3;258>=o;o++)f=n(o),p[o]=f[2]<<24|f[1]<<16|f[0];return p}(),J=q?new Uint32Array(I):I,K=0,L=1,M={F:K,D:L};s.prototype.p=function(){for(;!this.s;){var n=y(this,3);switch(1&n&&(this.s=h),n>>>=1){case 0:var o=this.input,f=this.c,p=this.a,d=this.b,i=o.length,t=j,u=j,l=p.length,c=j;switch(this.e=this.g=0,f+1>=i&&e(Error("invalid uncompressed block header: LEN")),t=o[f++]|o[f++]<<8,f+1>=i&&e(Error("invalid uncompressed block header: NLEN")),u=o[f++]|o[f++]<<8,t===~u&&e(Error("invalid uncompressed block header: length verify")),f+t>o.length&&e(Error("input buffer is broken")),this.n){case K:for(;d+t>p.length;){if(c=l-d,t-=c,q)p.set(o.subarray(f,f+c),d),d+=c,f+=c;else for(;c--;)p[d++]=o[f++];this.b=d,p=this.f(),d=this.b}break;case L:for(;d+t>p.length;)p=this.f({v:2});break;default:e(Error("invalid inflate mode"))}if(q)p.set(o.subarray(f,f+t),d),d+=t,f+=t;else for(;t--;)p[d++]=o[f++];this.c=f,this.b=d,this.a=p;break;case 1:this.o(ee,oe);break;case 2:a(this);break;default:e(Error("unknown BTYPE: "+n))}}return this.t()};var N,O,P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=q?new Uint16Array(P):P,R=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],S=q?new Uint16Array(R):R,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],U=q?new Uint8Array(T):T,V=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],W=q?new Uint16Array(V):V,X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Y=q?new Uint8Array(X):X,Z=new(q?Uint8Array:Array)(288);for(N=0,O=Z.length;O>N;++N)Z[N]=143>=N?8:255>=N?9:279>=N?7:8;var $,_,ee=p(Z),ne=new(q?Uint8Array:Array)(30);for($=0,_=ne.length;_>$;++$)ne[$]=5;var oe=p(ne);s.prototype.o=function(e,n){var o=this.a,f=this.b;this.u=e;for(var p,d,i,t,u=o.length-258;256!==(p=w(this,e));)if(256>p)f>=u&&(this.b=f,o=this.f(),f=this.b),o[f++]=p;else for(d=p-257,t=S[d],0<U[d]&&(t+=y(this,U[d])),p=w(this,n),i=W[p],0<Y[p]&&(i+=y(this,Y[p])),f>=u&&(this.b=f,o=this.f(),f=this.b);t--;)o[f]=o[f++-i];for(;8<=this.e;)this.e-=8,this.c--;this.b=f},s.prototype.J=function(e,n){var o=this.a,f=this.b;this.u=e;for(var p,d,i,t,u=o.length;256!==(p=w(this,e));)if(256>p)f>=u&&(o=this.f(),u=o.length),o[f++]=p;else for(d=p-257,t=S[d],0<U[d]&&(t+=y(this,U[d])),p=w(this,n),i=W[p],0<Y[p]&&(i+=y(this,Y[p])),f+t>u&&(o=this.f(),u=o.length);t--;)o[f]=o[f++-i];for(;8<=this.e;)this.e-=8,this.c--;this.b=f},s.prototype.f=function(){var e,n,o=new(q?Uint8Array:Array)(this.b-32768),f=this.b-32768,p=this.a;if(q)o.set(p.subarray(32768,o.length));else for(e=0,n=o.length;n>e;++e)o[e]=p[e+32768];if(this.l.push(o),this.q+=o.length,q)p.set(p.subarray(f,f+32768));else for(e=0;32768>e;++e)p[e]=p[f+e];return this.b=32768,p},s.prototype.K=function(e){var n,o,f,p,d=this.input.length/this.c+1|0,i=this.input,t=this.a;return e&&("number"==typeof e.v&&(d=e.v),"number"==typeof e.G&&(d+=e.G)),2>d?(o=(i.length-this.c)/this.u[2],p=258*(o/2)|0,f=p<t.length?t.length+p:t.length<<1):f=t.length*d,q?(n=new Uint8Array(f),n.set(t)):n=t,this.a=n},s.prototype.t=function(){var e,n,o,f,p,d=0,i=this.a,t=this.l,u=new(q?Uint8Array:Array)(this.q+(this.b-32768));if(0===t.length)return q?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(n=0,o=t.length;o>n;++n)for(e=t[n],f=0,p=e.length;p>f;++f)u[d++]=e[f];for(n=32768,o=this.b;o>n;++n)u[d++]=i[n];return this.l=[],this.buffer=u},s.prototype.I=function(){var e,n=this.b;return q?this.C?(e=new Uint8Array(n),e.set(this.a.subarray(0,n))):e=this.a.subarray(0,n):(this.a.length>n&&(this.a.length=n),e=this.a),this.buffer=e},r.prototype.p=function(){var n,o,f=this.input;return n=this.B.p(),this.c=this.B.c,this.N&&(o=(f[this.c++]<<24|f[this.c++]<<16|f[this.c++]<<8|f[this.c++])>>>0,o!==b(n)&&e(Error("invalid adler-32 checksum"))),n};var fe=8,pe=G;m.prototype.j=function(){var n,o,f,p,d,i,t,u=0;switch(t=this.a,n=fe){case fe:o=Math.LOG2E*Math.log(32768)-8;break;default:e(Error("invalid compression method"))}switch(f=o<<4|n,t[u++]=f,n){case fe:switch(this.h){case pe.NONE:d=0;break;case pe.r:d=1;break;case pe.k:d=2;break;default:e(Error("unsupported compression type"))}break;default:e(Error("invalid compression method"))}return p=d<<6|0,t[u++]=p|31-(256*f+p)%31,i=b(this.input),this.A.b=u,t=this.A.j(),u=t.length,q&&(t=new Uint8Array(t.buffer),t.length<=u+4&&(this.a=new Uint8Array(t.length+4),this.a.set(t),t=this.a),t=t.subarray(0,u+4)),t[u++]=i>>24&255,t[u++]=i>>16&255,t[u++]=i>>8&255,t[u++]=255&i,t},n("Zlib.Inflate",r),n("Zlib.Inflate.prototype.decompress",r.prototype.p),x("Zlib.Inflate.BufferType",{ADAPTIVE:M.D,BLOCK:M.F}),n("Zlib.Deflate",m),n("Zlib.Deflate.compress",function(e,n){return new m(e,n).j()}),n("Zlib.Deflate.prototype.compress",m.prototype.j),x("Zlib.Deflate.CompressionType",{NONE:pe.NONE,FIXED:pe.r,DYNAMIC:pe.k})}).call(this)},{}],16:[function(e,n,o){var f=e("../enums.js");n.exports={prefer_hash_algorithm:f.hash.sha256,encryption_cipher:f.symmetric.aes256,compression:f.compression.zip,integrity_protect:!0,rsa_blinding:!0,useWebCrypto:!0,useNative:!1,show_version:!0,show_comment:!0,versionstring:"OpenPGP.js v1.2.0",commentstring:"http://openpgpjs.org",keyserver:"keyserver.linux.it",node_store:"./openpgp.store",debug:!1}},{"../enums.js":43}],17:[function(e,n,o){n.exports=e("./config.js")},{"./config.js":16}],18:[function(e,n,o){!function(e,n){function o(){var e=Error.apply(this,arguments);this.message=e.message,this.stack=e.stack}function f(){var e=Error.apply(this,arguments);this.message=e.message,this.stack=e.stack}function p(){var e=Error.apply(this,arguments);this.message=e.message,this.stack=e.stack}function d(e){for(var n=e.length,o=new Uint8Array(n),f=0;n>f;f++){var p=e.charCodeAt(f);if(p>>>8)throw new Error("Wide characters are not allowed");o[f]=p}return o}function i(e){for(var n="",o=0;o<e.length;o++)n+=String.fromCharCode(e[o]);return n}function t(e){for(var n="",o=0;o<e.length;o++){var f=(255&e[o]).toString(16);f.length<2&&(n+="0"),n+=f}return n}function u(e){return btoa(i(e))}function l(e){return"string"==typeof e}function c(e){return e instanceof ArrayBuffer}function g(e){return e instanceof Uint8Array}function s(e,n){var o=n.heap,f=o?o.byteLength:n.heapSize||65536;if(4095&f||0>=f)throw new Error("heap size must be a positive integer and a multiple of 4096");return o=o||new e(new ArrayBuffer(f))}function y(e,n,o,f,p){var d=e.length-n,i=p>d?d:p;return e.set(o.subarray(f,f+i),n),i}function w(e){e=e||{},this.heap=s(Uint8Array,e).subarray(L.HEAP_DATA),this.asm=e.asm||L(n,null,this.heap.buffer),this.mode=null,this.key=null,this.reset(e)}function a(e){if(void 0!==e){if(c(e)||g(e))e=new Uint8Array(e);else{if(!l(e))throw new TypeError("unexpected key type");e=d(e)}var n=e.length;if(16!==n&&24!==n&&32!==n)throw new f("illegal key size");var o=new DataView(e.buffer,e.byteOffset,e.byteLength);this.asm.set_key(n>>2,o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12),n>16?o.getUint32(16):0,n>16?o.getUint32(20):0,n>24?o.getUint32(24):0,n>24?o.getUint32(28):0),this.key=e}else if(!this.key)throw new Error("key is required")}function b(e){if(void 0!==e){if(c(e)||g(e))e=new Uint8Array(e);else{if(!l(e))throw new TypeError("unexpected iv type");e=d(e)}if(16!==e.length)throw new f("illegal iv size");var n=new DataView(e.buffer,e.byteOffset,e.byteLength);this.iv=e,this.asm.set_iv(n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12))}else this.iv=null,this.asm.set_iv(0,0,0,0)}function r(e){this.padding=void 0!==e?!!e:!0}function m(e){return e=e||{},this.result=null,this.pos=0,this.len=0,a.call(this,e.key),this.hasOwnProperty("iv")&&b.call(this,e.iv),this.hasOwnProperty("padding")&&r.call(this,e.padding),this}function x(e){if(l(e)&&(e=d(e)),c(e)&&(e=new Uint8Array(e)),!g(e))throw new TypeError("data isn't of expected type");for(var n=this.asm,o=this.heap,f=L.ENC[this.mode],p=L.HEAP_DATA,i=this.pos,t=this.len,u=0,s=e.length||0,w=0,a=t+s&-16,b=0,r=new Uint8Array(a);s>0;)b=y(o,i+t,e,u,s),t+=b,u+=b,s-=b,b=n.cipher(f,p+i,t),b&&r.set(o.subarray(i,i+b),w),w+=b,t>b?(i+=b,t-=b):(i=0,t=0);return this.result=r,this.pos=i,this.len=t,this}function j(e){var n=null,o=0;void 0!==e&&(n=x.call(this,e).result,o=n.length);var p=this.asm,d=this.heap,i=L.ENC[this.mode],t=L.HEAP_DATA,u=this.pos,l=this.len,c=16-l%16,g=l;if(this.hasOwnProperty("padding")){if(this.padding){for(var s=0;c>s;++s)d[u+l+s]=c;l+=c,g=l}else if(l%16)throw new f("data length must be a multiple of the block size")}else l+=c;var y=new Uint8Array(o+g);return o&&y.set(n),l&&p.cipher(i,t+u,l),g&&y.set(d.subarray(u,u+g),o),this.result=y,this.pos=0,this.len=0,this}function h(e){if(l(e)&&(e=d(e)),c(e)&&(e=new Uint8Array(e)),!g(e))throw new TypeError("data isn't of expected type");var n=this.asm,o=this.heap,f=L.DEC[this.mode],p=L.HEAP_DATA,i=this.pos,t=this.len,u=0,s=e.length||0,w=0,a=t+s&-16,b=0,r=0;this.hasOwnProperty("padding")&&this.padding&&(b=t+s-a||16,a-=b);for(var m=new Uint8Array(a);s>0;)r=y(o,i+t,e,u,s),t+=r,u+=r,s-=r,r=n.cipher(f,p+i,t-(s?0:b)),r&&m.set(o.subarray(i,i+r),w),w+=r,t>r?(i+=r,t-=r):(i=0,t=0);return this.result=m,this.pos=i,this.len=t,this}function k(e){var n=null,o=0;void 0!==e&&(n=h.call(this,e).result,o=n.length);var d=this.asm,i=this.heap,t=L.DEC[this.mode],u=L.HEAP_DATA,l=this.pos,c=this.len,g=c;if(c>0){if(c%16){if(this.hasOwnProperty("padding"))throw new f("data length must be a multiple of the block size");c+=16-c%16}if(d.cipher(t,u+l,c),this.hasOwnProperty("padding")&&this.padding){var s=i[l+g-1];if(1>s||s>16||s>g)throw new p("bad padding");for(var y=0,w=s;w>1;w--)y|=s^i[l+g-w];if(y)throw new p("bad padding");g-=s}}var a=new Uint8Array(o+g);return o>0&&a.set(n),g>0&&a.set(i.subarray(l,l+g),o),this.result=a,this.pos=0,this.len=0,this}function q(e){this.iv=null,w.call(this,e),this.mode="CFB"}function v(e){q.call(this,e)}function z(e){q.call(this,e)}function A(e,n,o){if(void 0===e)throw new SyntaxError("data required");if(void 0===n)throw new SyntaxError("key required");return new q({heap:P,asm:Q,key:n,iv:o}).encrypt(e).result}function B(e,n,o){if(void 0===e)throw new SyntaxError("data required");if(void 0===n)throw new SyntaxError("key required");return new q({heap:P,asm:Q,key:n,iv:o}).decrypt(e).result}function C(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this}function D(e){if(null!==this.result)throw new o("state must be reset before processing new data");if(l(e)&&(e=d(e)),c(e)&&(e=new Uint8Array(e)),!g(e))throw new TypeError("data isn't of expected type");for(var n=this.asm,f=this.heap,p=this.pos,i=this.len,t=0,u=e.length,s=0;u>0;)s=y(f,p+i,e,t,u),i+=s,t+=s,u-=s,s=n.process(p,i),p+=s,i-=s,i||(p=0);return this.pos=p,this.len=i,this}function E(){if(null!==this.result)throw new o("state must be reset before processing new data");return this.asm.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(this.heap.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this}function F(e,n,o){"use asm";function f(e,n,o,f,p,d,i,t,u,l,c,g,s,y,w,q){e|=0,n|=0,o|=0,f|=0,p|=0,d|=0,i|=0,t|=0,u|=0,l|=0,c|=0,g|=0,s|=0,y|=0,w|=0,q|=0;var v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;v=a,z=b,A=r,B=m,C=x,D=j,E=h,F=k,G=e+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1116352408|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=n+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1899447441|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=o+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3049323471|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=f+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3921009573|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=p+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+961987163|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=d+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1508970993|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=i+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2453635748|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=t+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2870763221|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=u+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3624381080|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=l+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+310598401|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=c+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+607225278|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=g+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1426881987|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=s+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1925078388|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=y+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2162078206|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=w+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2614888103|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,G=q+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3248222580|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,e=G=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+e+l|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3835390401|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,n=G=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+n+c|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+4022224774|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,o=G=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+o+g|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+264347078|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,f=G=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+f+s|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+604807628|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,p=G=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+p+y|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+770255983|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,d=G=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+d+w|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1249150122|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,i=G=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+i+q|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1555081692|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,t=G=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+t+e|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1996064986|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,u=G=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+u+n|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2554220882|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,l=G=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+l+o|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2821834349|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,c=G=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+c+f|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2952996808|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,g=G=(s>>>7^s>>>18^s>>>3^s<<25^s<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+g+p|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3210313671|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,s=G=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+s+d|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3336571891|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,y=G=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+y+i|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3584528711|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,w=G=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(s>>>17^s>>>19^s>>>10^s<<15^s<<13)+w+t|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+113926993|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,q=G=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+q+u|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+338241895|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,e=G=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+e+l|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+666307205|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,n=G=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+n+c|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+773529912|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,o=G=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+o+g|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1294757372|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,f=G=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+f+s|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1396182291|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,p=G=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+p+y|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1695183700|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,d=G=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+d+w|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1986661051|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,i=G=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+i+q|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2177026350|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,t=G=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+t+e|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2456956037|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,u=G=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+u+n|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2730485921|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,l=G=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+l+o|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2820302411|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,c=G=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+c+f|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3259730800|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,g=G=(s>>>7^s>>>18^s>>>3^s<<25^s<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+g+p|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3345764771|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,s=G=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+s+d|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3516065817|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,y=G=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+y+i|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3600352804|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,w=G=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(s>>>17^s>>>19^s>>>10^s<<15^s<<13)+w+t|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+4094571909|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,q=G=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+q+u|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+275423344|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,e=G=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+e+l|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+430227734|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,n=G=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+n+c|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+506948616|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,o=G=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+o+g|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+659060556|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,f=G=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+f+s|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+883997877|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,p=G=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+p+y|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+958139571|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,d=G=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+d+w|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1322822218|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,i=G=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+i+q|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1537002063|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,t=G=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+t+e|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1747873779|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,u=G=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+u+n|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+1955562222|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,l=G=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+l+o|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2024104815|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,c=G=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+c+f|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2227730452|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,g=G=(s>>>7^s>>>18^s>>>3^s<<25^s<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+g+p|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2361852424|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,s=G=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+s+d|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2428436474|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,y=G=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+y+i|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+2756734187|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,w=G=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(s>>>17^s>>>19^s>>>10^s<<15^s<<13)+w+t|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3204031479|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,q=G=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+q+u|0,G=G+F+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(E^C&(D^E))+3329325298|0,F=E,E=D,D=C,C=B+G|0,B=A,A=z,z=v,v=G+(z&A^B&(z^A))+(z>>>2^z>>>13^z>>>22^z<<30^z<<19^z<<10)|0,a=a+v|0,b=b+z|0,r=r+A|0,m=m+B|0,x=x+C|0,j=j+D|0,h=h+E|0,k=k+F|0}function p(e){e|=0,f(O[e|0]<<24|O[e|1]<<16|O[e|2]<<8|O[e|3],O[e|4]<<24|O[e|5]<<16|O[e|6]<<8|O[e|7],O[e|8]<<24|O[e|9]<<16|O[e|10]<<8|O[e|11],O[e|12]<<24|O[e|13]<<16|O[e|14]<<8|O[e|15],O[e|16]<<24|O[e|17]<<16|O[e|18]<<8|O[e|19],O[e|20]<<24|O[e|21]<<16|O[e|22]<<8|O[e|23],O[e|24]<<24|O[e|25]<<16|O[e|26]<<8|O[e|27],O[e|28]<<24|O[e|29]<<16|O[e|30]<<8|O[e|31],O[e|32]<<24|O[e|33]<<16|O[e|34]<<8|O[e|35],O[e|36]<<24|O[e|37]<<16|O[e|38]<<8|O[e|39],O[e|40]<<24|O[e|41]<<16|O[e|42]<<8|O[e|43],O[e|44]<<24|O[e|45]<<16|O[e|46]<<8|O[e|47],O[e|48]<<24|O[e|49]<<16|O[e|50]<<8|O[e|51],O[e|52]<<24|O[e|53]<<16|O[e|54]<<8|O[e|55],O[e|56]<<24|O[e|57]<<16|O[e|58]<<8|O[e|59],O[e|60]<<24|O[e|61]<<16|O[e|62]<<8|O[e|63])}function d(e){e|=0,O[e|0]=a>>>24,O[e|1]=a>>>16&255,O[e|2]=a>>>8&255,O[e|3]=a&255,O[e|4]=b>>>24,O[e|5]=b>>>16&255,O[e|6]=b>>>8&255,O[e|7]=b&255,O[e|8]=r>>>24,O[e|9]=r>>>16&255,O[e|10]=r>>>8&255,O[e|11]=r&255,O[e|12]=m>>>24,O[e|13]=m>>>16&255,O[e|14]=m>>>8&255,O[e|15]=m&255,O[e|16]=x>>>24,O[e|17]=x>>>16&255,O[e|18]=x>>>8&255,O[e|19]=x&255,O[e|20]=j>>>24,O[e|21]=j>>>16&255,O[e|22]=j>>>8&255,O[e|23]=j&255,O[e|24]=h>>>24,O[e|25]=h>>>16&255,O[e|26]=h>>>8&255,O[e|27]=h&255,O[e|28]=k>>>24,O[e|29]=k>>>16&255,O[e|30]=k>>>8&255,O[e|31]=k&255}function i(){
a=1779033703,b=3144134277,r=1013904242,m=2773480762,x=1359893119,j=2600822924,h=528734635,k=1541459225,q=0}function t(e,n,o,f,p,d,i,t,u){e|=0,n|=0,o|=0,f|=0,p|=0,d|=0,i|=0,t|=0,u|=0,a=e,b=n,r=o,m=f,x=p,j=d,h=i,k=t,q=u}function u(e,n){e|=0,n|=0;var o=0;if(e&63)return-1;for(;(n|0)>=64;)p(e),e=e+64|0,n=n-64|0,o=o+64|0;return q=q+o|0,o|0}function l(e,n,o){e|=0,n|=0,o|=0;var f=0,i=0;if(e&63)return-1;if(~o&&o&31)return-1;if((n|0)>=64){if(f=u(e,n)|0,(f|0)==-1)return-1;e=e+f|0,n=n-f|0}if(f=f+n|0,q=q+n|0,O[e|n]=128,(n|0)>=56){for(i=n+1|0;(i|0)<64;i=i+1|0)O[e|i]=0;p(e),n=0,O[e|0]=0}for(i=n+1|0;(i|0)<59;i=i+1|0)O[e|i]=0;return O[e|59]=q>>>29,O[e|60]=q>>>21&255,O[e|61]=q>>>13&255,O[e|62]=q>>>5&255,O[e|63]=q<<3&255,p(e),~o&&d(o),f|0}function c(){a=v,b=z,r=A,m=B,x=C,j=D,h=E,k=F,q=64}function g(){a=G,b=H,r=I,m=J,x=K,j=L,h=M,k=N,q=64}function s(e,n,o,p,d,t,u,l,c,g,s,y,w,O,P,Q){e|=0,n|=0,o|=0,p|=0,d|=0,t|=0,u|=0,l|=0,c|=0,g|=0,s|=0,y|=0,w|=0,O|=0,P|=0,Q|=0,i(),f(e^1549556828,n^1549556828,o^1549556828,p^1549556828,d^1549556828,t^1549556828,u^1549556828,l^1549556828,c^1549556828,g^1549556828,s^1549556828,y^1549556828,w^1549556828,O^1549556828,P^1549556828,Q^1549556828),G=a,H=b,I=r,J=m,K=x,L=j,M=h,N=k,i(),f(e^909522486,n^909522486,o^909522486,p^909522486,d^909522486,t^909522486,u^909522486,l^909522486,c^909522486,g^909522486,s^909522486,y^909522486,w^909522486,O^909522486,P^909522486,Q^909522486),v=a,z=b,A=r,B=m,C=x,D=j,E=h,F=k,q=64}function y(e,n,o){e|=0,n|=0,o|=0;var p=0,i=0,t=0,u=0,c=0,s=0,y=0,w=0,q=0;return e&63?-1:~o&&o&31?-1:(q=l(e,n,-1)|0,p=a,i=b,t=r,u=m,c=x,s=j,y=h,w=k,g(),f(p,i,t,u,c,s,y,w,2147483648,0,0,0,0,0,0,768),~o&&d(o),q|0)}function w(e,n,o,p,i){e|=0,n|=0,o|=0,p|=0,i|=0;var t=0,u=0,l=0,s=0,w=0,q=0,v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;if(e&63)return-1;if(~i&&i&31)return-1;for(O[e+n|0]=o>>>24,O[e+n+1|0]=o>>>16&255,O[e+n+2|0]=o>>>8&255,O[e+n+3|0]=o&255,y(e,n+4|0,-1)|0,t=A=a,u=B=b,l=C=r,s=D=m,w=E=x,q=F=j,v=G=h,z=H=k,p=p-1|0;(p|0)>0;)c(),f(A,B,C,D,E,F,G,H,2147483648,0,0,0,0,0,0,768),A=a,B=b,C=r,D=m,E=x,F=j,G=h,H=k,g(),f(A,B,C,D,E,F,G,H,2147483648,0,0,0,0,0,0,768),A=a,B=b,C=r,D=m,E=x,F=j,G=h,H=k,t^=a,u^=b,l^=r,s^=m,w^=x,q^=j,v^=h,z^=k,p=p-1|0;return a=t,b=u,r=l,m=s,x=w,j=q,h=v,k=z,~i&&d(i),0}var a=0,b=0,r=0,m=0,x=0,j=0,h=0,k=0,q=0,v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=new e.Uint8Array(o);return{reset:i,init:t,process:u,finish:l,hmac_reset:c,hmac_init:s,hmac_finish:y,pbkdf2_generate_block:w}}function G(e){e=e||{},this.heap=s(Uint8Array,e),this.asm=e.asm||F(n,null,this.heap.buffer),this.BLOCK_SIZE=R,this.HASH_SIZE=S,this.reset()}function H(){return null===U&&(U=new G({heapSize:1048576})),U}function I(e){if(void 0===e)throw new SyntaxError("data required");return H().reset().process(e).finish().result}function J(e){var n=I(e);return t(n)}function K(e){var n=I(e);return u(n)}n.asmCrypto=e,o.prototype=Object.create(Error.prototype,{name:{value:"IllegalStateError"}}),f.prototype=Object.create(Error.prototype,{name:{value:"IllegalArgumentError"}}),p.prototype=Object.create(Error.prototype,{name:{value:"SecurityError"}});var L=(n.Float64Array||n.Float32Array,function(){"use strict";function e(){p=[],d=[];var e,n,o=1;for(e=0;255>e;e++)p[e]=o,n=128&o,o<<=1,o&=255,128===n&&(o^=27),o^=p[e],d[p[e]]=e;p[255]=p[0],d[0]=0,c=!0}function n(e,n){var o=p[(d[e]+d[n])%255];return(0===e||0===n)&&(o=0),o}function o(e){var n=p[255-d[e]];return 0===e&&(n=0),n}function f(){function f(e){var n,f,p;for(f=p=o(e),n=0;4>n;n++)f=255&(f<<1|f>>>7),p^=f;return p^=99}c||e(),i=[],t=[],u=[[],[],[],[]],l=[[],[],[],[]];for(var p=0;256>p;p++){var d=f(p);i[p]=d,t[d]=p,u[0][p]=n(2,d)<<24|d<<16|d<<8|n(3,d),l[0][d]=n(14,p)<<24|n(9,p)<<16|n(13,p)<<8|n(11,p);for(var g=1;4>g;g++)u[g][p]=u[g-1][p]>>>8|u[g-1][p]<<24,l[g][d]=l[g-1][d]>>>8|l[g-1][d]<<24}}var p,d,i,t,u,l,c=!1,g=!1,s=function(e,n,o){function p(e,n,o,f,p,t,u,c,g){var y=d.subarray(0,60),w=d.subarray(256,316);y.set([n,o,f,p,t,u,c,g]);for(var a=e,b=1;4*e+28>a;a++){var r=y[a-1];(a%e===0||8===e&&a%e===4)&&(r=i[r>>>24]<<24^i[r>>>16&255]<<16^i[r>>>8&255]<<8^i[255&r]),a%e===0&&(r=r<<8^r>>>24^b<<24,b=b<<1^(128&b?27:0)),y[a]=y[a-e]^r}for(var m=0;a>m;m+=4)for(var x=0;4>x;x++){var r=y[a-(4+m)+(4-x)%4];w[m+x]=4>m||m>=a-4?r:l[0][i[r>>>24]]^l[1][i[r>>>16&255]]^l[2][i[r>>>8&255]]^l[3][i[255&r]]}s.set_rounds(e+5)}g||f();var d=new Uint32Array(o);d.set(i,512),d.set(t,768);for(var c=0;4>c;c++)d.set(u[c],4096+1024*c>>2),d.set(l[c],8192+1024*c>>2);var s=function(e,n,o){"use asm";function f(e,n,o,f,p,d,i,t){e|=0,n|=0,o|=0,f|=0,p|=0,d|=0,i|=0,t|=0;var u=0,l=0,c=0,g=0,s=0,y=0,w=0,a=0;for(u=o|1024,l=o|2048,c=o|3072,p^=T[(e|0)>>2],d^=T[(e|4)>>2],i^=T[(e|8)>>2],t^=T[(e|12)>>2],a=16;(a|0)<=f<<4;a=a+16|0)g=T[(o|p>>22&1020)>>2]^T[(u|d>>14&1020)>>2]^T[(l|i>>6&1020)>>2]^T[(c|t<<2&1020)>>2]^T[(e|a|0)>>2],s=T[(o|d>>22&1020)>>2]^T[(u|i>>14&1020)>>2]^T[(l|t>>6&1020)>>2]^T[(c|p<<2&1020)>>2]^T[(e|a|4)>>2],y=T[(o|i>>22&1020)>>2]^T[(u|t>>14&1020)>>2]^T[(l|p>>6&1020)>>2]^T[(c|d<<2&1020)>>2]^T[(e|a|8)>>2],w=T[(o|t>>22&1020)>>2]^T[(u|p>>14&1020)>>2]^T[(l|d>>6&1020)>>2]^T[(c|i<<2&1020)>>2]^T[(e|a|12)>>2],p=g,d=s,i=y,t=w;v=T[(n|p>>22&1020)>>2]<<24^T[(n|d>>14&1020)>>2]<<16^T[(n|i>>6&1020)>>2]<<8^T[(n|t<<2&1020)>>2]^T[(e|a|0)>>2],z=T[(n|d>>22&1020)>>2]<<24^T[(n|i>>14&1020)>>2]<<16^T[(n|t>>6&1020)>>2]<<8^T[(n|p<<2&1020)>>2]^T[(e|a|4)>>2],A=T[(n|i>>22&1020)>>2]<<24^T[(n|t>>14&1020)>>2]<<16^T[(n|p>>6&1020)>>2]<<8^T[(n|d<<2&1020)>>2]^T[(e|a|8)>>2],B=T[(n|t>>22&1020)>>2]<<24^T[(n|p>>14&1020)>>2]<<16^T[(n|d>>6&1020)>>2]<<8^T[(n|i<<2&1020)>>2]^T[(e|a|12)>>2]}function p(e,n,o,p){e|=0,n|=0,o|=0,p|=0,f(0,2048,4096,S,e,n,o,p)}function d(e,n,o,p){e|=0,n|=0,o|=0,p|=0;var d=0;f(1024,3072,8192,S,e,p,o,n),d=z,z=B,B=d}function i(e,n,o,p){e|=0,n|=0,o|=0,p|=0,f(0,2048,4096,S,C^e,D^n,E^o,F^p),C=v,D=z,E=A,F=B}function t(e,n,o,p){e|=0,n|=0,o|=0,p|=0;var d=0;f(1024,3072,8192,S,e,p,o,n),d=z,z=B,B=d,v^=C,z^=D,A^=E,B^=F,C=e,D=n,E=o,F=p}function u(e,n,o,p){e|=0,n|=0,o|=0,p|=0,f(0,2048,4096,S,C,D,E,F),C=v^=e,D=z^=n,E=A^=o,F=B^=p}function l(e,n,o,p){e|=0,n|=0,o|=0,p|=0,f(0,2048,4096,S,C,D,E,F),v^=e,z^=n,A^=o,B^=p,C=e,D=n,E=o,F=p}function c(e,n,o,p){e|=0,n|=0,o|=0,p|=0,f(0,2048,4096,S,C,D,E,F),C=v,D=z,E=A,F=B,v^=e,z^=n,A^=o,B^=p}function g(e,n,o,p){e|=0,n|=0,o|=0,p|=0,f(0,2048,4096,S,G,H,I,J),J=~N&J|N&J+1,I=~M&I|M&I+((J|0)==0),H=~L&H|L&H+((I|0)==0),G=~K&G|K&G+((H|0)==0),v^=e,z^=n,A^=o,B^=p}function s(e,n,o,f){e|=0,n|=0,o|=0,f|=0;var p=0,d=0,i=0,t=0,u=0,l=0,c=0,g=0,s=0,y=0;for(e^=C,n^=D,o^=E,f^=F,p=O|0,d=P|0,i=Q|0,t=R|0;(s|0)<128;s=s+1|0)p>>>31&&(u^=e,l^=n,c^=o,g^=f),p=p<<1|d>>>31,d=d<<1|i>>>31,i=i<<1|t>>>31,t<<=1,y=f&1,f=f>>>1|o<<31,o=o>>>1|n<<31,n=n>>>1|e<<31,e>>>=1,y&&(e^=3774873600);C=u,D=l,E=c,F=g}function y(e){e|=0,S=e}function w(e,n,o,f){e|=0,n|=0,o|=0,f|=0,v=e,z=n,A=o,B=f}function a(e,n,o,f){e|=0,n|=0,o|=0,f|=0,C=e,D=n,E=o,F=f}function b(e,n,o,f){e|=0,n|=0,o|=0,f|=0,G=e,H=n,I=o,J=f}function r(e,n,o,f){e|=0,n|=0,o|=0,f|=0,K=e,L=n,M=o,N=f}function m(e,n,o,f){e|=0,n|=0,o|=0,f|=0,J=~N&J|N&f,I=~M&I|M&o,H=~L&H|L&n,G=~K&G|K&e}function x(e){return e|=0,e&15?-1:(U[e|0]=v>>>24,U[e|1]=v>>>16&255,U[e|2]=v>>>8&255,U[e|3]=v&255,U[e|4]=z>>>24,U[e|5]=z>>>16&255,U[e|6]=z>>>8&255,U[e|7]=z&255,U[e|8]=A>>>24,U[e|9]=A>>>16&255,U[e|10]=A>>>8&255,U[e|11]=A&255,U[e|12]=B>>>24,U[e|13]=B>>>16&255,U[e|14]=B>>>8&255,U[e|15]=B&255,16)}function j(e){return e|=0,e&15?-1:(U[e|0]=C>>>24,U[e|1]=C>>>16&255,U[e|2]=C>>>8&255,U[e|3]=C&255,U[e|4]=D>>>24,U[e|5]=D>>>16&255,U[e|6]=D>>>8&255,U[e|7]=D&255,U[e|8]=E>>>24,U[e|9]=E>>>16&255,U[e|10]=E>>>8&255,U[e|11]=E&255,U[e|12]=F>>>24,U[e|13]=F>>>16&255,U[e|14]=F>>>8&255,U[e|15]=F&255,16)}function h(){p(0,0,0,0),O=v,P=z,Q=A,R=B}function k(e,n,o){e|=0,n|=0,o|=0;var f=0;if(n&15)return-1;for(;(o|0)>=16;)V[e&7](U[n|0]<<24|U[n|1]<<16|U[n|2]<<8|U[n|3],U[n|4]<<24|U[n|5]<<16|U[n|6]<<8|U[n|7],U[n|8]<<24|U[n|9]<<16|U[n|10]<<8|U[n|11],U[n|12]<<24|U[n|13]<<16|U[n|14]<<8|U[n|15]),U[n|0]=v>>>24,U[n|1]=v>>>16&255,U[n|2]=v>>>8&255,U[n|3]=v&255,U[n|4]=z>>>24,U[n|5]=z>>>16&255,U[n|6]=z>>>8&255,U[n|7]=z&255,U[n|8]=A>>>24,U[n|9]=A>>>16&255,U[n|10]=A>>>8&255,U[n|11]=A&255,U[n|12]=B>>>24,U[n|13]=B>>>16&255,U[n|14]=B>>>8&255,U[n|15]=B&255,f=f+16|0,n=n+16|0,o=o-16|0;return f|0}function q(e,n,o){e|=0,n|=0,o|=0;var f=0;if(n&15)return-1;for(;(o|0)>=16;)W[e&1](U[n|0]<<24|U[n|1]<<16|U[n|2]<<8|U[n|3],U[n|4]<<24|U[n|5]<<16|U[n|6]<<8|U[n|7],U[n|8]<<24|U[n|9]<<16|U[n|10]<<8|U[n|11],U[n|12]<<24|U[n|13]<<16|U[n|14]<<8|U[n|15]),f=f+16|0,n=n+16|0,o=o-16|0;return f|0}var v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=new e.Uint32Array(o),U=new e.Uint8Array(o),V=[p,d,i,t,u,l,c,g],W=[i,s];return{set_rounds:y,set_state:w,set_iv:a,set_nonce:b,set_mask:r,set_counter:m,get_state:x,get_iv:j,gcm_init:h,cipher:k,mac:q}}(e,n,o);return s.set_key=p,s};return s.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},s.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},s.MAC={CBC:0,GCM:1},s.HEAP_DATA=16384,s}()),M=q.prototype;M.BLOCK_SIZE=16,M.reset=m,M.encrypt=j,M.decrypt=k;var N=v.prototype;N.BLOCK_SIZE=16,N.reset=m,N.process=x,N.finish=j;var O=z.prototype;O.BLOCK_SIZE=16,O.reset=m,O.process=h,O.finish=k;var P=new Uint8Array(1048576),Q=L(n,null,P.buffer);e.AES_CFB=q,e.AES_CFB.encrypt=A,e.AES_CFB.decrypt=B,e.AES_CFB.Encrypt=v,e.AES_CFB.Decrypt=z;var R=64,S=32;G.BLOCK_SIZE=R,G.HASH_SIZE=S;var T=G.prototype;T.reset=C,T.process=D,T.finish=E;var U=null;G.bytes=I,G.hex=J,G.base64=K,e.SHA256=G}({},function(){return this}())},{}],19:[function(e,n,o){"use strict";var f=e("./cipher");n.exports={encrypt:function(e,n,o,p,d){n=new f[n](p);var i=n.blockSize,t=new Uint8Array(i),u=new Uint8Array(i),l=new Uint8Array(e.length+2);l.set(e),l[e.length]=e[i-2],l[e.length+1]=e[i-1],e=l;var c,g,s,y=new Uint8Array(o.length+2+2*i),w=d?0:2;for(c=0;i>c;c++)t[c]=0;for(u=n.encrypt(t),c=0;i>c;c++)y[c]=u[c]^e[c];for(t.set(y.subarray(0,i)),u=n.encrypt(t),y[i]=u[0]^e[i],y[i+1]=u[1]^e[i+1],d?t.set(y.subarray(2,i+2)):t.set(y.subarray(0,i)),u=n.encrypt(t),c=0;i>c;c++)y[i+2+c]=u[c+w]^o[c];for(g=i;g<o.length+w;g+=i)for(s=g+2-w,t.set(y.subarray(s,s+i)),u=n.encrypt(t),c=0;i>c;c++)y[i+s+c]=u[c]^o[g+c-w];return y=y.subarray(0,o.length+2+i)},mdc:function(e,n,o){e=new f[e](n);var p,d=e.blockSize,i=new Uint8Array(d),t=new Uint8Array(d);for(p=0;d>p;p++)i[p]=0;for(i=e.encrypt(i),p=0;d>p;p++)t[p]=o[p],i[p]^=t[p];t=e.encrypt(t);var u=new Uint8Array(i.length+2);return u.set(i),u[i.length]=t[0]^o[d],u[i.length+1]=t[1]^o[d+1],u},decrypt:function(e,n,o,p){e=new f[e](n);var d,i,t,u=e.blockSize,l=new Uint8Array(u),c=new Uint8Array(u),g=new Uint8Array(o.length-u);for(d=0;u>d;d++)l[d]=0;for(l=e.encrypt(l),d=0;u>d;d++)c[d]=o[d],l[d]^=c[d];if(c=e.encrypt(c),l[u-2]!=(c[0]^o[u])||l[u-1]!=(c[1]^o[u+1]))throw new Error("CFB decrypt: invalid key");if(i=0,p){for(d=0;u>d;d++)l[d]=o[d+2];for(t=u+2;t<o.length;t+=u)for(c=e.encrypt(l),d=0;u>d&&d+t<o.length;d++)l[d]=o[t+d],i<g.length&&(g[i]=c[d]^l[d],i++)}else{for(d=0;u>d;d++)l[d]=o[d];for(t=u;t<o.length;t+=u)for(c=e.encrypt(l),d=0;u>d&&d+t<o.length;d++)l[d]=o[t+d],i<g.length&&(g[i]=c[d]^l[d],i++)}return t=p?0:2,g=g.subarray(t,o.length-u-2+t)},normalEncrypt:function(e,n,o,p){e=new f[e](n);var d=e.blockSize,i=new Uint8Array(d),t=new Uint8Array(d),u=0,l=new Uint8Array(o.length),c=0;if(null===p)for(s=0;d>s;s++)t[s]=0;else for(s=0;d>s;s++)t[s]=p[s];for(;o.length>d*u;){var g=e.encrypt(t);i=o.subarray(u*d,u*d+d);for(var s=0;s<i.length;s++)t[s]=i[s]^g[s],l[c++]=t[s];u++}return l},normalDecrypt:function(e,n,o,p){e=new f[e](n);var d,i=e.blockSize,t=0,u=new Uint8Array(o.length),l=0,c=0;if(null===p)for(d=new Uint8Array(i),s=0;i>s;s++)d[s]=0;else d=p.subarray(0,i);for(;o.length>i*t;){var g=e.encrypt(d);d=o.subarray(t*i+l,t*i+i+l);for(var s=0;s<d.length;s++)u[c++]=d[s]^g[s];t++}return u}}},{"./cipher":24}],20:[function(e,n,o){"use strict";function f(e){return 255&e}function p(e){return e>>8&255}function d(e){return e>>16&255}function i(e){return e>>24&255}function t(e,n,o,f){return p(a[255&e])|p(a[n>>8&255])<<8|p(a[o>>16&255])<<16|p(a[f>>>24])<<24}function u(e){var n,o,f=e.length,p=new Array(f/4);if(e&&!(f%4)){for(n=0,o=0;f>o;o+=4)p[n++]=e[o]|e[o+1]<<8|e[o+2]<<16|e[o+3]<<24;return p}}function l(e){var n,o=0,t=e.length,u=new Array(4*t);for(n=0;t>n;n++)u[o++]=f(e[n]),u[o++]=p(e[n]),u[o++]=d(e[n]),u[o++]=i(e[n]);return u}function c(e){var n,o,t,u,l,c,g=new Array(j+1),s=e.length,a=new Array(x),b=new Array(x),r=0;if(16==s)c=10,n=4;else if(24==s)c=12,n=6;else{if(32!=s)throw new Error("Invalid key-length for AES key:"+s);c=14,n=8}for(o=0;j+1>o;o++)g[o]=new Uint32Array(4);for(o=0,t=0;s>t;t++,o+=4)a[t]=e[o]|e[o+1]<<8|e[o+2]<<16|e[o+3]<<24;for(t=n-1;t>=0;t--)b[t]=a[t];for(u=0,l=0,t=0;n>t&&c+1>u;){for(;n>t&&4>l;t++,l++)g[u][l]=b[t];4==l&&(u++,l=0)}for(;c+1>u;){var m=b[n-1];if(b[0]^=w[p(m)]|w[d(m)]<<8|w[i(m)]<<16|w[f(m)]<<24,b[0]^=y[r++],8!=n)for(t=1;n>t;t++)b[t]^=b[t-1];else{for(t=1;n/2>t;t++)b[t]^=b[t-1];for(m=b[n/2-1],b[n/2]^=w[f(m)]|w[p(m)]<<8|w[d(m)]<<16|w[i(m)]<<24,t=n/2+1;n>t;t++)b[t]^=b[t-1]}for(t=0;n>t&&c+1>u;){for(;n>t&&4>l;t++,l++)g[u][l]=b[t];4==l&&(u++,l=0)}}return{rounds:c,rk:g}}function g(e,n,o){var f,p,d;for(d=u(e),p=n.rounds,f=0;p-1>f;f++)o[0]=d[0]^n.rk[f][0],o[1]=d[1]^n.rk[f][1],o[2]=d[2]^n.rk[f][2],o[3]=d[3]^n.rk[f][3],d[0]=a[255&o[0]]^b[o[1]>>8&255]^r[o[2]>>16&255]^m[o[3]>>>24],d[1]=a[255&o[1]]^b[o[2]>>8&255]^r[o[3]>>16&255]^m[o[0]>>>24],d[2]=a[255&o[2]]^b[o[3]>>8&255]^r[o[0]>>16&255]^m[o[1]>>>24],d[3]=a[255&o[3]]^b[o[0]>>8&255]^r[o[1]>>16&255]^m[o[2]>>>24];return f=p-1,o[0]=d[0]^n.rk[f][0],o[1]=d[1]^n.rk[f][1],o[2]=d[2]^n.rk[f][2],o[3]=d[3]^n.rk[f][3],d[0]=t(o[0],o[1],o[2],o[3])^n.rk[p][0],d[1]=t(o[1],o[2],o[3],o[0])^n.rk[p][1],d[2]=t(o[2],o[3],o[0],o[1])^n.rk[p][2],d[3]=t(o[3],o[0],o[1],o[2])^n.rk[p][3],l(d)}function s(e){var n=function(e){this.key=c(e),this._temp=new Uint32Array(this.blockSize/4),this.encrypt=function(e){return g(e,this.key,this._temp)}};return n.blockSize=n.prototype.blockSize=16,n.keySize=n.prototype.keySize=e/8,n}var y=new Uint8Array([1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145]),w=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),a=new Uint32Array([2774754246,2222750968,2574743534,2373680118,234025727,3177933782,2976870366,1422247313,1345335392,50397442,2842126286,2099981142,436141799,1658312629,3870010189,2591454956,1170918031,2642575903,1086966153,2273148410,368769775,3948501426,3376891790,200339707,3970805057,1742001331,4255294047,3937382213,3214711843,4154762323,2524082916,1539358875,3266819957,486407649,2928907069,1780885068,1513502316,1094664062,49805301,1338821763,1546925160,4104496465,887481809,150073849,2473685474,1943591083,1395732834,1058346282,201589768,1388824469,1696801606,1589887901,672667696,2711000631,251987210,3046808111,151455502,907153956,2608889883,1038279391,652995533,1764173646,3451040383,2675275242,453576978,2659418909,1949051992,773462580,756751158,2993581788,3998898868,4221608027,4132590244,1295727478,1641469623,3467883389,2066295122,1055122397,1898917726,2542044179,4115878822,1758581177,0,753790401,1612718144,536673507,3367088505,3982187446,3194645204,1187761037,3653156455,1262041458,3729410708,3561770136,3898103984,1255133061,1808847035,720367557,3853167183,385612781,3309519750,3612167578,1429418854,2491778321,3477423498,284817897,100794884,2172616702,4031795360,1144798328,3131023141,3819481163,4082192802,4272137053,3225436288,2324664069,2912064063,3164445985,1211644016,83228145,3753688163,3249976951,1977277103,1663115586,806359072,452984805,250868733,1842533055,1288555905,336333848,890442534,804056259,3781124030,2727843637,3427026056,957814574,1472513171,4071073621,2189328124,1195195770,2892260552,3881655738,723065138,2507371494,2690670784,2558624025,3511635870,2145180835,1713513028,2116692564,2878378043,2206763019,3393603212,703524551,3552098411,1007948840,2044649127,3797835452,487262998,1994120109,1004593371,1446130276,1312438900,503974420,3679013266,168166924,1814307912,3831258296,1573044895,1859376061,4021070915,2791465668,2828112185,2761266481,937747667,2339994098,854058965,1137232011,1496790894,3077402074,2358086913,1691735473,3528347292,3769215305,3027004632,4199962284,133494003,636152527,2942657994,2390391540,3920539207,403179536,3585784431,2289596656,1864705354,1915629148,605822008,4054230615,3350508659,1371981463,602466507,2094914977,2624877800,555687742,3712699286,3703422305,2257292045,2240449039,2423288032,1111375484,3300242801,2858837708,3628615824,84083462,32962295,302911004,2741068226,1597322602,4183250862,3501832553,2441512471,1489093017,656219450,3114180135,954327513,335083755,3013122091,856756514,3144247762,1893325225,2307821063,2811532339,3063651117,572399164,2458355477,552200649,1238290055,4283782570,2015897680,2061492133,2408352771,4171342169,2156497161,386731290,3669999461,837215959,3326231172,3093850320,3275833730,2962856233,1999449434,286199582,3417354363,4233385128,3602627437,974525996]),b=new Uint32Array([1667483301,2088564868,2004348569,2071721613,4076011277,1802229437,1869602481,3318059348,808476752,16843267,1734856361,724260477,4278118169,3621238114,2880130534,1987505306,3402272581,2189565853,3385428288,2105408135,4210749205,1499050731,1195871945,4042324747,2913812972,3570709351,2728550397,2947499498,2627478463,2762232823,1920132246,3233848155,3082253762,4261273884,2475900334,640044138,909536346,1061125697,4160222466,3435955023,875849820,2779075060,3857043764,4059166984,1903288979,3638078323,825320019,353708607,67373068,3351745874,589514341,3284376926,404238376,2526427041,84216335,2593796021,117902857,303178806,2155879323,3806519101,3958099238,656887401,2998042573,1970662047,151589403,2206408094,741103732,437924910,454768173,1852759218,1515893998,2694863867,1381147894,993752653,3604395873,3014884814,690573947,3823361342,791633521,2223248279,1397991157,3520182632,0,3991781676,538984544,4244431647,2981198280,1532737261,1785386174,3419114822,3200149465,960066123,1246401758,1280088276,1482207464,3486483786,3503340395,4025468202,2863288293,4227591446,1128498885,1296931543,859006549,2240090516,1162185423,4193904912,33686534,2139094657,1347461360,1010595908,2678007226,2829601763,1364304627,2745392638,1077969088,2408514954,2459058093,2644320700,943222856,4126535940,3166462943,3065411521,3671764853,555827811,269492272,4294960410,4092853518,3537026925,3452797260,202119188,320022069,3974939439,1600110305,2543269282,1145342156,387395129,3301217111,2812761586,2122251394,1027439175,1684326572,1566423783,421081643,1936975509,1616953504,2172721560,1330618065,3705447295,572671078,707417214,2425371563,2290617219,1179028682,4008625961,3099093971,336865340,3739133817,1583267042,185275933,3688607094,3772832571,842163286,976909390,168432670,1229558491,101059594,606357612,1549580516,3267534685,3553869166,2896970735,1650640038,2442213800,2509582756,3840201527,2038035083,3890730290,3368586051,926379609,1835915959,2374828428,3587551588,1313774802,2846444e3,1819072692,1448520954,4109693703,3941256997,1701169839,2054878350,2930657257,134746136,3132780501,2021191816,623200879,774790258,471611428,2795919345,3031724999,3334903633,3907570467,3722289532,1953818780,522141217,1263245021,3183305180,2341145990,2324303749,1886445712,1044282434,3048567236,1718013098,1212715224,50529797,4143380225,235805714,1633796771,892693087,1465364217,3115936208,2256934801,3250690392,488454695,2661164985,3789674808,4177062675,2560109491,286335539,1768542907,3654920560,2391672713,2492740519,2610638262,505297954,2273777042,3924412704,3469641545,1431677695,673730680,3755976058,2357986191,2711706104,2307459456,218962455,3216991706,3873888049,1111655622,1751699640,1094812355,2576951728,757946999,252648977,2964356043,1414834428,3149622742,370551866]),r=new Uint32Array([1673962851,2096661628,2012125559,2079755643,4076801522,1809235307,1876865391,3314635973,811618352,16909057,1741597031,727088427,4276558334,3618988759,2874009259,1995217526,3398387146,2183110018,3381215433,2113570685,4209972730,1504897881,1200539975,4042984432,2906778797,3568527316,2724199842,2940594863,2619588508,2756966308,1927583346,3231407040,3077948087,4259388669,2470293139,642542118,913070646,1065238847,4160029431,3431157708,879254580,2773611685,3855693029,4059629809,1910674289,3635114968,828527409,355090197,67636228,3348452039,591815971,3281870531,405809176,2520228246,84545285,2586817946,118360327,304363026,2149292928,3806281186,3956090603,659450151,2994720178,1978310517,152181513,2199756419,743994412,439627290,456535323,1859957358,1521806938,2690382752,1386542674,997608763,3602342358,3011366579,693271337,3822927587,794718511,2215876484,1403450707,3518589137,0,3988860141,541089824,4242743292,2977548465,1538714971,1792327274,3415033547,3194476990,963791673,1251270218,1285084236,1487988824,3481619151,3501943760,4022676207,2857362858,4226619131,1132905795,1301993293,862344499,2232521861,1166724933,4192801017,33818114,2147385727,1352724560,1014514748,2670049951,2823545768,1369633617,2740846243,1082179648,2399505039,2453646738,2636233885,946882616,4126213365,3160661948,3061301686,3668932058,557998881,270544912,4293204735,4093447923,3535760850,3447803085,202904588,321271059,3972214764,1606345055,2536874647,1149815876,388905239,3297990596,2807427751,2130477694,1031423805,1690872932,1572530013,422718233,1944491379,1623236704,2165938305,1335808335,3701702620,574907938,710180394,2419829648,2282455944,1183631942,4006029806,3094074296,338181140,3735517662,1589437022,185998603,3685578459,3772464096,845436466,980700730,169090570,1234361161,101452294,608726052,1555620956,3265224130,3552407251,2890133420,1657054818,2436475025,2503058581,3839047652,2045938553,3889509095,3364570056,929978679,1843050349,2365688973,3585172693,1318900302,2840191145,1826141292,1454176854,4109567988,3939444202,1707781989,2062847610,2923948462,135272456,3127891386,2029029496,625635109,777810478,473441308,2790781350,3027486644,3331805638,3905627112,3718347997,1961401460,524165407,1268178251,3177307325,2332919435,2316273034,1893765232,1048330814,3044132021,1724688998,1217452104,50726147,4143383030,236720654,1640145761,896163637,1471084887,3110719673,2249691526,3248052417,490350365,2653403550,3789109473,4176155640,2553000856,287453969,1775418217,3651760345,2382858638,2486413204,2603464347,507257374,2266337927,3922272489,3464972750,1437269845,676362280,3752164063,2349043596,2707028129,2299101321,219813645,3211123391,3872862694,1115997762,1758509160,1099088705,2569646233,760903469,253628687,2960903088,1420360788,3144537787,371997206]),m=new Uint32Array([3332727651,4169432188,4003034999,4136467323,4279104242,3602738027,3736170351,2438251973,1615867952,33751297,3467208551,1451043627,3877240574,3043153879,1306962859,3969545846,2403715786,530416258,2302724553,4203183485,4011195130,3001768281,2395555655,4211863792,1106029997,3009926356,1610457762,1173008303,599760028,1408738468,3835064946,2606481600,1975695287,3776773629,1034851219,1282024998,1817851446,2118205247,4110612471,2203045068,1750873140,1374987685,3509904869,4178113009,3801313649,2876496088,1649619249,708777237,135005188,2505230279,1181033251,2640233411,807933976,933336726,168756485,800430746,235472647,607523346,463175808,3745374946,3441880043,1315514151,2144187058,3936318837,303761673,496927619,1484008492,875436570,908925723,3702681198,3035519578,1543217312,2767606354,1984772923,3076642518,2110698419,1383803177,3711886307,1584475951,328696964,2801095507,3110654417,0,3240947181,1080041504,3810524412,2043195825,3069008731,3569248874,2370227147,1742323390,1917532473,2497595978,2564049996,2968016984,2236272591,3144405200,3307925487,1340451498,3977706491,2261074755,2597801293,1716859699,294946181,2328839493,3910203897,67502594,4269899647,2700103760,2017737788,632987551,1273211048,2733855057,1576969123,2160083008,92966799,1068339858,566009245,1883781176,4043634165,1675607228,2009183926,2943736538,1113792801,540020752,3843751935,4245615603,3211645650,2169294285,403966988,641012499,3274697964,3202441055,899848087,2295088196,775493399,2472002756,1441965991,4236410494,2051489085,3366741092,3135724893,841685273,3868554099,3231735904,429425025,2664517455,2743065820,1147544098,1417554474,1001099408,193169544,2362066502,3341414126,1809037496,675025940,2809781982,3168951902,371002123,2910247899,3678134496,1683370546,1951283770,337512970,2463844681,201983494,1215046692,3101973596,2673722050,3178157011,1139780780,3299238498,967348625,832869781,3543655652,4069226873,3576883175,2336475336,1851340599,3669454189,25988493,2976175573,2631028302,1239460265,3635702892,2902087254,4077384948,3475368682,3400492389,4102978170,1206496942,270010376,1876277946,4035475576,1248797989,1550986798,941890588,1475454630,1942467764,2538718918,3408128232,2709315037,3902567540,1042358047,2531085131,1641856445,226921355,260409994,3767562352,2084716094,1908716981,3433719398,2430093384,100991747,4144101110,470945294,3265487201,1784624437,2935576407,1775286713,395413126,2572730817,975641885,666476190,3644383713,3943954680,733190296,573772049,3535497577,2842745305,126455438,866620564,766942107,1008868894,361924487,3374377449,2269761230,2868860245,1350051880,2776293343,59739276,1509466529,159418761,437718285,1708834751,3610371814,2227585602,3501746280,2193834305,699439513,1517759789,504434447,2076946608,2835108948,1842789307,742004246]),x=8,j=14;n.exports={};var h=[128,192,256];for(var k in h)n.exports[h[k]]=s(h[k])},{}],21:[function(e,n,o){function f(){}function p(e){this.bf=new f,this.bf.init(e),this.encrypt=function(e){return this.bf.encrypt_block(e)}}f.prototype.BLOCKSIZE=8,f.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],
f.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],f.prototype.NN=16,f.prototype._clean=function(e){if(0>e){var n=2147483647&e;e=n+2147483648}return e},f.prototype._F=function(e){var n,o,f,p,d;return p=255&e,e>>>=8,f=255&e,e>>>=8,o=255&e,e>>>=8,n=255&e,d=this.sboxes[0][n]+this.sboxes[1][o],d^=this.sboxes[2][f],d+=this.sboxes[3][p]},f.prototype._encrypt_block=function(e){var n,o=e[0],f=e[1];for(n=0;n<this.NN;++n){o^=this.parray[n],f=this._F(o)^f;var p=o;o=f,f=p}o^=this.parray[this.NN+0],f^=this.parray[this.NN+1],e[0]=this._clean(f),e[1]=this._clean(o)},f.prototype.encrypt_block=function(e){var n,o=[0,0],f=this.BLOCKSIZE/2;for(n=0;n<this.BLOCKSIZE/2;++n)o[0]=o[0]<<8|255&e[n+0],o[1]=o[1]<<8|255&e[n+f];this._encrypt_block(o);var p=[];for(n=0;n<this.BLOCKSIZE/2;++n)p[n+0]=o[0]>>>24-8*n&255,p[n+f]=o[1]>>>24-8*n&255;return p},f.prototype._decrypt_block=function(e){var n,o=e[0],f=e[1];for(n=this.NN+1;n>1;--n){o^=this.parray[n],f=this._F(o)^f;var p=o;o=f,f=p}o^=this.parray[1],f^=this.parray[0],e[0]=this._clean(f),e[1]=this._clean(o)},f.prototype.init=function(e){var n,o=0;for(this.parray=[],n=0;n<this.NN+2;++n){var f,p=0;for(f=0;4>f;++f)p=p<<8|255&e[o],++o>=e.length&&(o=0);this.parray[n]=this.PARRAY[n]^p}for(this.sboxes=[],n=0;4>n;++n)for(this.sboxes[n]=[],o=0;256>o;++o)this.sboxes[n][o]=this.SBOXES[n][o];var d=[0,0];for(n=0;n<this.NN+2;n+=2)this._encrypt_block(d),this.parray[n+0]=d[0],this.parray[n+1]=d[1];for(n=0;4>n;++n)for(o=0;256>o;o+=2)this._encrypt_block(d),this.sboxes[n][o+0]=d[0],this.sboxes[n][o+1]=d[1]},n.exports=p,n.exports.keySize=p.prototype.keySize=16,n.exports.blockSize=p.prototype.blockSize=16},{}],22:[function(e,n,o){function f(){function e(e,n,o){var f=n+e,p=f<<o|f>>>32-o;return(d[0][p>>>24]^d[1][p>>>16&255])-d[2][p>>>8&255]+d[3][255&p]}function n(e,n,o){var f=n^e,p=f<<o|f>>>32-o;return d[0][p>>>24]-d[1][p>>>16&255]+d[2][p>>>8&255]^d[3][255&p]}function o(e,n,o){var f=n-e,p=f<<o|f>>>32-o;return(d[0][p>>>24]+d[1][p>>>16&255]^d[2][p>>>8&255])-d[3][255&p]}this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=new Array(16),this.rotate=new Array(16),this.reset(),e.length!=this.KeySize)throw new Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(var e=0;16>e;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return BlockSize},this.encrypt=function(f){for(var p=new Array(f.length),d=0;d<f.length;d+=8){var i,t=f[d]<<24|f[d+1]<<16|f[d+2]<<8|f[d+3],u=f[d+4]<<24|f[d+5]<<16|f[d+6]<<8|f[d+7];i=u,u=t^e(u,this.masking[0],this.rotate[0]),t=i,i=u,u=t^n(u,this.masking[1],this.rotate[1]),t=i,i=u,u=t^o(u,this.masking[2],this.rotate[2]),t=i,i=u,u=t^e(u,this.masking[3],this.rotate[3]),t=i,i=u,u=t^n(u,this.masking[4],this.rotate[4]),t=i,i=u,u=t^o(u,this.masking[5],this.rotate[5]),t=i,i=u,u=t^e(u,this.masking[6],this.rotate[6]),t=i,i=u,u=t^n(u,this.masking[7],this.rotate[7]),t=i,i=u,u=t^o(u,this.masking[8],this.rotate[8]),t=i,i=u,u=t^e(u,this.masking[9],this.rotate[9]),t=i,i=u,u=t^n(u,this.masking[10],this.rotate[10]),t=i,i=u,u=t^o(u,this.masking[11],this.rotate[11]),t=i,i=u,u=t^e(u,this.masking[12],this.rotate[12]),t=i,i=u,u=t^n(u,this.masking[13],this.rotate[13]),t=i,i=u,u=t^o(u,this.masking[14],this.rotate[14]),t=i,i=u,u=t^e(u,this.masking[15],this.rotate[15]),t=i,p[d]=u>>>24&255,p[d+1]=u>>>16&255,p[d+2]=u>>>8&255,p[d+3]=255&u,p[d+4]=t>>>24&255,p[d+5]=t>>>16&255,p[d+6]=t>>>8&255,p[d+7]=255&t}return p},this.decrypt=function(f){for(var p=new Array(f.length),d=0;d<f.length;d+=8){var i,t=f[d]<<24|f[d+1]<<16|f[d+2]<<8|f[d+3],u=f[d+4]<<24|f[d+5]<<16|f[d+6]<<8|f[d+7];i=u,u=t^e(u,this.masking[15],this.rotate[15]),t=i,i=u,u=t^o(u,this.masking[14],this.rotate[14]),t=i,i=u,u=t^n(u,this.masking[13],this.rotate[13]),t=i,i=u,u=t^e(u,this.masking[12],this.rotate[12]),t=i,i=u,u=t^o(u,this.masking[11],this.rotate[11]),t=i,i=u,u=t^n(u,this.masking[10],this.rotate[10]),t=i,i=u,u=t^e(u,this.masking[9],this.rotate[9]),t=i,i=u,u=t^o(u,this.masking[8],this.rotate[8]),t=i,i=u,u=t^n(u,this.masking[7],this.rotate[7]),t=i,i=u,u=t^e(u,this.masking[6],this.rotate[6]),t=i,i=u,u=t^o(u,this.masking[5],this.rotate[5]),t=i,i=u,u=t^n(u,this.masking[4],this.rotate[4]),t=i,i=u,u=t^e(u,this.masking[3],this.rotate[3]),t=i,i=u,u=t^o(u,this.masking[2],this.rotate[2]),t=i,i=u,u=t^n(u,this.masking[1],this.rotate[1]),t=i,i=u,u=t^e(u,this.masking[0],this.rotate[0]),t=i,p[d]=u>>>24&255,p[d+1]=u>>>16&255,p[d+2]=u>>>8&255,p[d+3]=255&u,p[d+4]=t>>>24&255,p[d+5]=t>>16&255,p[d+6]=t>>8&255,p[d+7]=255&t}return p};var f=new Array(4);f[0]=new Array(4),f[0][0]=new Array(4,0,13,15,12,14,8),f[0][1]=new Array(5,2,16,18,17,19,10),f[0][2]=new Array(6,3,23,22,21,20,9),f[0][3]=new Array(7,1,26,25,27,24,11),f[1]=new Array(4),f[1][0]=new Array(0,6,21,23,20,22,16),f[1][1]=new Array(1,4,0,2,1,3,18),f[1][2]=new Array(2,5,7,6,5,4,17),f[1][3]=new Array(3,7,10,9,11,8,19),f[2]=new Array(4),f[2][0]=new Array(4,0,13,15,12,14,8),f[2][1]=new Array(5,2,16,18,17,19,10),f[2][2]=new Array(6,3,23,22,21,20,9),f[2][3]=new Array(7,1,26,25,27,24,11),f[3]=new Array(4),f[3][0]=new Array(0,6,21,23,20,22,16),f[3][1]=new Array(1,4,0,2,1,3,18),f[3][2]=new Array(2,5,7,6,5,4,17),f[3][3]=new Array(3,7,10,9,11,8,19);var p=new Array(4);p[0]=new Array(4),p[0][0]=new Array(24,25,23,22,18),p[0][1]=new Array(26,27,21,20,22),p[0][2]=new Array(28,29,19,18,25),p[0][3]=new Array(30,31,17,16,28),p[1]=new Array(4),p[1][0]=new Array(3,2,12,13,8),p[1][1]=new Array(1,0,14,15,13),p[1][2]=new Array(7,6,8,9,3),p[1][3]=new Array(5,4,10,11,7),p[2]=new Array(4),p[2][0]=new Array(19,18,28,29,25),p[2][1]=new Array(17,16,30,31,28),p[2][2]=new Array(23,22,24,25,18),p[2][3]=new Array(21,20,26,27,22),p[3]=new Array(4),p[3][0]=new Array(8,9,7,6,3),p[3][1]=new Array(10,11,5,4,7),p[3][2]=new Array(12,13,3,2,8),p[3][3]=new Array(14,15,1,0,13),this.keySchedule=function(e){var n,o,i=new Array(8),t=new Array(32);for(n=0;4>n;n++)o=4*n,i[n]=e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3];for(var u,l=[6,7,4,5],c=0,g=0;2>g;g++)for(var s=0;4>s;s++){for(o=0;4>o;o++){var y=f[s][o];u=i[y[1]],u^=d[4][i[y[2]>>>2]>>>24-8*(3&y[2])&255],u^=d[5][i[y[3]>>>2]>>>24-8*(3&y[3])&255],u^=d[6][i[y[4]>>>2]>>>24-8*(3&y[4])&255],u^=d[7][i[y[5]>>>2]>>>24-8*(3&y[5])&255],u^=d[l[o]][i[y[6]>>>2]>>>24-8*(3&y[6])&255],i[y[0]]=u}for(o=0;4>o;o++){var w=p[s][o];u=d[4][i[w[0]>>>2]>>>24-8*(3&w[0])&255],u^=d[5][i[w[1]>>>2]>>>24-8*(3&w[1])&255],u^=d[6][i[w[2]>>>2]>>>24-8*(3&w[2])&255],u^=d[7][i[w[3]>>>2]>>>24-8*(3&w[3])&255],u^=d[4+o][i[w[4]>>>2]>>>24-8*(3&w[4])&255],t[c]=u,c++}}for(n=0;16>n;n++)this.masking[n]=t[n],this.rotate[n]=31&t[16+n]};var d=new Array(8);d[0]=new Array(821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063),d[1]=new Array(522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321),d[2]=new Array(2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027),d[3]=new Array(2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730),d[4]=new Array(2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860),d[5]=new Array(4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975),d[6]=new Array(2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875),d[7]=new Array(3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926)}function p(e){this.cast5=new f,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}n.exports=p,n.exports.blockSize=p.prototype.blockSize=8,n.exports.keySize=p.prototype.keySize=16},{}],23:[function(e,n,o){function f(e,n,o,f,p,i){var u,l,c,g,s,y,w,a,b,r,m,x,j,h,k=new Array(16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756),q=new Array(-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344),v=new Array(520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584),z=new Array(8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928),A=new Array(256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080),B=new Array(536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312),C=new Array(2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154),D=new Array(268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696),E=0,F=n.length,G=32==e.length?3:9;
a=3==G?o?new Array(0,32,2):new Array(30,-2,-2):o?new Array(0,32,2,62,30,-2,64,96,2):new Array(94,62,-2,32,64,2,30,-2,-2),o&&(n=d(n,i),F=n.length);var H=new Uint8Array(F),I=0;for(1==f&&(b=p[E++]<<24|p[E++]<<16|p[E++]<<8|p[E++],m=p[E++]<<24|p[E++]<<16|p[E++]<<8|p[E++],E=0);F>E;){for(y=n[E++]<<24|n[E++]<<16|n[E++]<<8|n[E++],w=n[E++]<<24|n[E++]<<16|n[E++]<<8|n[E++],1==f&&(o?(y^=b,w^=m):(r=b,x=m,b=y,m=w)),c=252645135&(y>>>4^w),w^=c,y^=c<<4,c=65535&(y>>>16^w),w^=c,y^=c<<16,c=858993459&(w>>>2^y),y^=c,w^=c<<2,c=16711935&(w>>>8^y),y^=c,w^=c<<8,c=1431655765&(y>>>1^w),w^=c,y^=c<<1,y=y<<1|y>>>31,w=w<<1|w>>>31,l=0;G>l;l+=3){for(j=a[l+1],h=a[l+2],u=a[l];u!=j;u+=h)g=w^e[u],s=(w>>>4|w<<28)^e[u+1],c=y,y=w,w=c^(q[g>>>24&63]|z[g>>>16&63]|B[g>>>8&63]|D[63&g]|k[s>>>24&63]|v[s>>>16&63]|A[s>>>8&63]|C[63&s]);c=y,y=w,w=c}y=y>>>1|y<<31,w=w>>>1|w<<31,c=1431655765&(y>>>1^w),w^=c,y^=c<<1,c=16711935&(w>>>8^y),y^=c,w^=c<<8,c=858993459&(w>>>2^y),y^=c,w^=c<<2,c=65535&(y>>>16^w),w^=c,y^=c<<16,c=252645135&(y>>>4^w),w^=c,y^=c<<4,1==f&&(o?(b=y,m=w):(y^=r,w^=x)),H[I++]=y>>>24,H[I++]=y>>>16&255,H[I++]=y>>>8&255,H[I++]=255&y,H[I++]=w>>>24,H[I++]=w>>>16&255,H[I++]=w>>>8&255,H[I++]=255&w}return o||(H=t(H,i)),H}function p(e){pc2bytes0=new Array(0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964),pc2bytes1=new Array(0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697),pc2bytes2=new Array(0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272),pc2bytes3=new Array(0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144),pc2bytes4=new Array(0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256),pc2bytes5=new Array(0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488),pc2bytes6=new Array(0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746),pc2bytes7=new Array(0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568),pc2bytes8=new Array(0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578),pc2bytes9=new Array(0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488),pc2bytes10=new Array(0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800),pc2bytes11=new Array(0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744),pc2bytes12=new Array(0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128),pc2bytes13=new Array(0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261);for(var n,o,f,p=e.length>8?3:1,d=new Array(32*p),t=new Array(0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0),u=0,l=0,c=0;p>c;c++)for(left=e[u++]<<24|e[u++]<<16|e[u++]<<8|e[u++],right=e[u++]<<24|e[u++]<<16|e[u++]<<8|e[u++],f=252645135&(left>>>4^right),right^=f,left^=f<<4,f=65535&(right>>>-16^left),left^=f,right^=f<<-16,f=858993459&(left>>>2^right),right^=f,left^=f<<2,f=65535&(right>>>-16^left),left^=f,right^=f<<-16,f=1431655765&(left>>>1^right),right^=f,left^=f<<1,f=16711935&(right>>>8^left),left^=f,right^=f<<8,f=1431655765&(left>>>1^right),right^=f,left^=f<<1,f=left<<8|right>>>20&240,left=right<<24|right<<8&16711680|right>>>8&65280|right>>>24&240,right=f,i=0;i<t.length;i++)t[i]?(left=left<<2|left>>>26,right=right<<2|right>>>26):(left=left<<1|left>>>27,right=right<<1|right>>>27),left&=-15,right&=-15,n=pc2bytes0[left>>>28]|pc2bytes1[left>>>24&15]|pc2bytes2[left>>>20&15]|pc2bytes3[left>>>16&15]|pc2bytes4[left>>>12&15]|pc2bytes5[left>>>8&15]|pc2bytes6[left>>>4&15],o=pc2bytes7[right>>>28]|pc2bytes8[right>>>24&15]|pc2bytes9[right>>>20&15]|pc2bytes10[right>>>16&15]|pc2bytes11[right>>>12&15]|pc2bytes12[right>>>8&15]|pc2bytes13[right>>>4&15],f=65535&(o>>>16^n),d[l++]=n^f,d[l++]=o^f<<16;return d}function d(e,n){var o,f=8-e.length%8;if(2==n&&8>f)o=" ".charCodeAt(0);else if(1==n)o=f;else{if(n||!(8>f)){if(8==f)return e;throw new Error("des: invalid padding")}o=0}for(var p=new Uint8Array(e.length+f),d=0;d<e.length;d++)p[d]=e[d];for(var i=0;f>i;i++)p[e.length+i]=o;return p}function t(e,n){var o,f=null;if(2==n)o=" ".charCodeAt(0);else if(1==n)f=e[e.length-1];else{if(n)throw new Error("des: invalid padding");o=0}if(!f){for(f=1;e[e.length-f]===o;)f++;f--}return e.subarray(0,e.length-f)}function u(e){this.key=[];for(var n=0;3>n;n++)this.key.push(new Uint8Array(e.subarray(8*n,8*n+8)));this.encrypt=function(e){return f(p(this.key[2]),f(p(this.key[1]),f(p(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function l(e){this.key=e,this.encrypt=function(e,n){var o=p(this.key);return f(o,e,!0,0,null,n)},this.decrypt=function(e,n){var o=p(this.key);return f(o,e,!1,0,null,n)}}e("../../util.js");u.keySize=u.prototype.keySize=24,u.blockSize=u.prototype.blockSize=8,n.exports={des:u,originalDes:l}},{"../../util.js":74}],24:[function(e,n,o){var f=e("./des.js");n.exports={des:f.originalDes,tripledes:f.des,cast5:e("./cast5.js"),twofish:e("./twofish.js"),blowfish:e("./blowfish.js"),idea:function(){throw new Error("IDEA symmetric-key algorithm not implemented")}};var p=e("./aes.js");for(var d in p)n.exports["aes"+d]=p[d]},{"./aes.js":20,"./blowfish.js":21,"./cast5.js":22,"./des.js":23,"./twofish.js":25}],25:[function(e,n,o){function f(e,n){return(e<<n|e>>>32-n)&c}function p(e,n){return e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24}function d(e,n,o){e.splice(n,4,255&o,o>>>8&255,o>>>16&255,o>>>24&255)}function i(e,n){return e>>>8*n&255}function t(){function e(e){function n(e){return e^e>>2^[0,90,180,238][3&e]}function o(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function d(e,n){var o,f,p;for(o=0;8>o;o++)f=n>>>24,n=n<<8&c|e>>>24,e=e<<8&c,p=f<<1,128&f&&(p^=333),n^=f^p<<16,p^=f>>>1,1&f&&(p^=166),n^=p<<24|p<<8;return n}function t(e,n){var o,f,p,d;return o=n>>4,f=15&n,p=A[e][o^f],d=B[e][E[f]^F[o]],D[e][E[d]^F[p]]<<4|C[e][p^d]}function u(e,n){var o=i(e,0),f=i(e,1),p=i(e,2),d=i(e,3);switch(b){case 4:o=G[1][o]^i(n[3],0),f=G[0][f]^i(n[3],1),p=G[0][p]^i(n[3],2),d=G[1][d]^i(n[3],3);case 3:o=G[1][o]^i(n[2],0),f=G[1][f]^i(n[2],1),p=G[0][p]^i(n[2],2),d=G[0][d]^i(n[2],3);case 2:o=G[0][G[0][o]^i(n[1],0)]^i(n[0],0),f=G[0][G[1][f]^i(n[1],1)]^i(n[0],1),p=G[1][G[0][p]^i(n[1],2)]^i(n[0],2),d=G[1][G[1][d]^i(n[1],3)]^i(n[0],3)}return H[0][o]^H[1][f]^H[2][p]^H[3][d]}w=e;var l,g,s,y,a,b,r,j,h,k=[],q=[],v=[],z=[],A=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],B=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],C=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],D=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],E=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],F=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],G=[[],[]],H=[[],[],[],[]];for(w=w.slice(0,32),l=w.length;16!=l&&24!=l&&32!=l;)w[l++]=0;for(l=0;l<w.length;l+=4)v[l>>2]=p(w,l);for(l=0;256>l;l++)G[0][l]=t(0,l),G[1][l]=t(1,l);for(l=0;256>l;l++)r=G[1][l],j=n(r),h=o(r),H[0][l]=r+(j<<8)+(h<<16)+(h<<24),H[2][l]=j+(h<<8)+(r<<16)+(h<<24),r=G[0][l],j=n(r),h=o(r),H[1][l]=h+(h<<8)+(j<<16)+(r<<24),H[3][l]=j+(r<<8)+(h<<16)+(j<<24);for(b=v.length/2,l=0;b>l;l++)g=v[l+l],k[l]=g,s=v[l+l+1],q[l]=s,z[b-l-1]=d(g,s);for(l=0;40>l;l+=2)g=16843009*l,s=g+16843009,g=u(g,k),s=f(u(s,q),8),m[l]=g+s&c,m[l+1]=f(g+2*s,9);for(l=0;256>l;l++)switch(g=s=y=a=l,b){case 4:g=G[1][g]^i(z[3],0),s=G[0][s]^i(z[3],1),y=G[0][y]^i(z[3],2),a=G[1][a]^i(z[3],3);case 3:g=G[1][g]^i(z[2],0),s=G[1][s]^i(z[2],1),y=G[0][y]^i(z[2],2),a=G[0][a]^i(z[2],3);case 2:x[0][l]=H[0][G[0][G[0][g]^i(z[1],0)]^i(z[0],0)],x[1][l]=H[1][G[0][G[1][s]^i(z[1],1)]^i(z[0],1)],x[2][l]=H[2][G[1][G[0][y]^i(z[1],2)]^i(z[0],2)],x[3][l]=H[3][G[1][G[1][a]^i(z[1],3)]^i(z[0],3)]}}function n(e){return x[0][i(e,0)]^x[1][i(e,1)]^x[2][i(e,2)]^x[3][i(e,3)]}function o(e){return x[0][i(e,3)]^x[1][i(e,0)]^x[2][i(e,1)]^x[3][i(e,2)]}function t(e,p){var d=n(p[0]),i=o(p[1]);p[2]=f(p[2]^d+i+m[4*e+8]&c,31),p[3]=f(p[3],1)^d+2*i+m[4*e+9]&c,d=n(p[2]),i=o(p[3]),p[0]=f(p[0]^d+i+m[4*e+10]&c,31),p[1]=f(p[1],1)^d+2*i+m[4*e+11]&c}function u(e,p){var d=n(p[0]),i=o(p[1]);p[2]=f(p[2],1)^d+i+m[4*e+10]&c,p[3]=f(p[3]^d+2*i+m[4*e+11]&c,31),d=n(p[2]),i=o(p[3]),p[0]=f(p[0],1)^d+i+m[4*e+8]&c,p[1]=f(p[1]^d+2*i+m[4*e+9]&c,31)}function l(){m=[],x=[[],[],[],[]]}function g(e,n){a=e,b=n;for(var o=[p(a,b)^m[0],p(a,b+4)^m[1],p(a,b+8)^m[2],p(a,b+12)^m[3]],f=0;8>f;f++)t(f,o);return d(a,b,o[2]^m[4]),d(a,b+4,o[3]^m[5]),d(a,b+8,o[0]^m[6]),d(a,b+12,o[1]^m[7]),b+=16,a}function s(e,n){a=e,b=n;for(var o=[p(a,b)^m[4],p(a,b+4)^m[5],p(a,b+8)^m[6],p(a,b+12)^m[7]],f=7;f>=0;f--)u(f,o);d(a,b,o[2]^m[0]),d(a,b+4,o[3]^m[1]),d(a,b+8,o[0]^m[2]),d(a,b+12,o[1]^m[3]),b+=16}function y(){return a}var w=null,a=null,b=-1,r=null;r="twofish";var m=[],x=[[],[],[],[]];return{name:"twofish",blocksize:16,open:e,close:l,encrypt:g,decrypt:s,finalize:y}}function u(e){this.tf=t(),this.tf.open(l(e),0),this.encrypt=function(e){return this.tf.encrypt(l(e),0)}}function l(e){for(var n=[],o=0;o<e.length;o++)n[o]=e[o];return n}var c=4294967295;n.exports=u,n.exports.keySize=u.prototype.keySize=32,n.exports.blockSize=u.prototype.blockSize=16},{}],26:[function(e,n,o){var f=e("./random.js"),p=e("./cipher"),d=e("./public_key"),i=e("../type/mpi.js");n.exports={publicKeyEncrypt:function(e,n,o){var f=function(){var f;switch(e){case"rsa_encrypt":case"rsa_encrypt_sign":var p=new d.rsa,i=n[0].toBigInteger(),t=n[1].toBigInteger();return f=o.toBigInteger(),[p.encrypt(f,t,i)];case"elgamal":var u=new d.elgamal,l=n[0].toBigInteger(),c=n[1].toBigInteger(),g=n[2].toBigInteger();return f=o.toBigInteger(),u.encrypt(f,c,l,g);default:return[]}}();return f.map(function(e){var n=new i;return n.fromBigInteger(e),n})},publicKeyDecrypt:function(e,n,o){var f,p=function(){switch(e){case"rsa_encrypt_sign":case"rsa_encrypt":var p=new d.rsa,i=n[0].toBigInteger(),t=n[1].toBigInteger(),u=n[2].toBigInteger();f=n[3].toBigInteger();var l=n[4].toBigInteger(),c=n[5].toBigInteger(),g=o[0].toBigInteger();return p.decrypt(g,i,t,u,f,l,c);case"elgamal":var s=new d.elgamal,y=n[3].toBigInteger(),w=o[0].toBigInteger(),a=o[1].toBigInteger();return f=n[0].toBigInteger(),s.decrypt(w,a,f,y);default:return null}}(),t=new i;return t.fromBigInteger(p),t},getPrivateMpiCount:function(e){switch(e){case"rsa_encrypt":case"rsa_encrypt_sign":case"rsa_sign":return 4;case"elgamal":return 1;case"dsa":return 1;default:throw new Error("Unknown algorithm")}},getPublicMpiCount:function(e){switch(e){case"rsa_encrypt":case"rsa_encrypt_sign":case"rsa_sign":return 2;case"elgamal":return 3;case"dsa":return 4;default:throw new Error("Unknown algorithm.")}},generateMpi:function(e,n){function o(e){return e.map(function(e){var n=new i;return n.fromBigInteger(e),n})}switch(e){case"rsa_encrypt":case"rsa_encrypt_sign":case"rsa_sign":var f=new d.rsa;return f.generate(n,"10001").then(function(e){var n=[];return n.push(e.n),n.push(e.ee),n.push(e.d),n.push(e.p),n.push(e.q),n.push(e.u),o(n)});default:throw new Error("Unsupported algorithm for key generation.")}},getPrefixRandom:function(e){return f.getRandomBytes(p[e].blockSize)},generateSessionKey:function(e){return f.getRandomBytes(p[e].keySize)}}},{"../type/mpi.js":72,"./cipher":24,"./public_key":36,"./random.js":39}],27:[function(e,n,o){function f(n){return function(o){var f=e("crypto"),p=e("buffer").Buffer,d=f.createHash(n);return d.update(new p(o)),new Uint8Array(d.digest())}}var p=e("./sha.js"),d=e("./rusha.js"),i=e("../../config");util=e("../../util.js");var t,u=new d;t="undefined"!=typeof n&&n.exports&&i.useNative?{md5:f("md5"),sha1:f("sha1"),sha224:f("sha224"),sha256:f("sha256"),sha384:f("sha384"),sha512:f("sha512"),ripemd:f("ripemd160")}:{md5:e("./md5.js"),sha1:function(e){return util.str2Uint8Array(util.hex2bin(u.digest(e)))},sha224:p.sha224,sha256:asmCrypto.SHA256.bytes,sha384:p.sha384,sha512:p.sha512,ripemd:e("./ripe-md.js")},n.exports={md5:t.md5,sha1:t.sha1,sha224:t.sha224,sha256:t.sha256,sha384:t.sha384,sha512:t.sha512,ripemd:t.ripemd,digest:function(e,n){switch(e){case 1:return this.md5(n);case 2:return this.sha1(n);case 3:return this.ripemd(n);case 8:return this.sha256(n);case 9:return this.sha384(n);case 10:return this.sha512(n);case 11:return this.sha224(n);default:throw new Error("Invalid hash function.")}},getHashByteLength:function(e){switch(e){case 1:return 16;case 2:case 3:return 20;case 8:return 32;case 9:return 48;case 10:return 64;case 11:return 28;default:throw new Error("Invalid hash algorithm.")}}}},{"../../config":17,"../../util.js":74,"./md5.js":28,"./ripe-md.js":29,"./rusha.js":30,"./sha.js":31,buffer:!1,crypto:!1}],28:[function(e,n,o){function f(e,n){var o=e[0],f=e[1],p=e[2],l=e[3];o=d(o,f,p,l,n[0],7,-680876936),l=d(l,o,f,p,n[1],12,-389564586),p=d(p,l,o,f,n[2],17,606105819),f=d(f,p,l,o,n[3],22,-1044525330),o=d(o,f,p,l,n[4],7,-176418897),l=d(l,o,f,p,n[5],12,1200080426),p=d(p,l,o,f,n[6],17,-1473231341),f=d(f,p,l,o,n[7],22,-45705983),o=d(o,f,p,l,n[8],7,1770035416),l=d(l,o,f,p,n[9],12,-1958414417),p=d(p,l,o,f,n[10],17,-42063),f=d(f,p,l,o,n[11],22,-1990404162),o=d(o,f,p,l,n[12],7,1804603682),l=d(l,o,f,p,n[13],12,-40341101),p=d(p,l,o,f,n[14],17,-1502002290),f=d(f,p,l,o,n[15],22,1236535329),o=i(o,f,p,l,n[1],5,-165796510),l=i(l,o,f,p,n[6],9,-1069501632),p=i(p,l,o,f,n[11],14,643717713),f=i(f,p,l,o,n[0],20,-373897302),o=i(o,f,p,l,n[5],5,-701558691),l=i(l,o,f,p,n[10],9,38016083),p=i(p,l,o,f,n[15],14,-660478335),f=i(f,p,l,o,n[4],20,-405537848),o=i(o,f,p,l,n[9],5,568446438),l=i(l,o,f,p,n[14],9,-1019803690),p=i(p,l,o,f,n[3],14,-187363961),f=i(f,p,l,o,n[8],20,1163531501),o=i(o,f,p,l,n[13],5,-1444681467),l=i(l,o,f,p,n[2],9,-51403784),p=i(p,l,o,f,n[7],14,1735328473),f=i(f,p,l,o,n[12],20,-1926607734),o=t(o,f,p,l,n[5],4,-378558),l=t(l,o,f,p,n[8],11,-2022574463),p=t(p,l,o,f,n[11],16,1839030562),f=t(f,p,l,o,n[14],23,-35309556),o=t(o,f,p,l,n[1],4,-1530992060),l=t(l,o,f,p,n[4],11,1272893353),p=t(p,l,o,f,n[7],16,-155497632),f=t(f,p,l,o,n[10],23,-1094730640),o=t(o,f,p,l,n[13],4,681279174),l=t(l,o,f,p,n[0],11,-358537222),p=t(p,l,o,f,n[3],16,-722521979),f=t(f,p,l,o,n[6],23,76029189),o=t(o,f,p,l,n[9],4,-640364487),l=t(l,o,f,p,n[12],11,-421815835),p=t(p,l,o,f,n[15],16,530742520),f=t(f,p,l,o,n[2],23,-995338651),o=u(o,f,p,l,n[0],6,-198630844),l=u(l,o,f,p,n[7],10,1126891415),p=u(p,l,o,f,n[14],15,-1416354905),f=u(f,p,l,o,n[5],21,-57434055),o=u(o,f,p,l,n[12],6,1700485571),l=u(l,o,f,p,n[3],10,-1894986606),p=u(p,l,o,f,n[10],15,-1051523),f=u(f,p,l,o,n[1],21,-2054922799),o=u(o,f,p,l,n[8],6,1873313359),l=u(l,o,f,p,n[15],10,-30611744),p=u(p,l,o,f,n[6],15,-1560198380),f=u(f,p,l,o,n[13],21,1309151649),o=u(o,f,p,l,n[4],6,-145523070),l=u(l,o,f,p,n[11],10,-1120210379),p=u(p,l,o,f,n[2],15,718787259),f=u(f,p,l,o,n[9],21,-343485551),e[0]=w(o,e[0]),e[1]=w(f,e[1]),e[2]=w(p,e[2]),e[3]=w(l,e[3])}function p(e,n,o,f,p,d){return n=w(w(n,e),w(f,d)),w(n<<p|n>>>32-p,o)}function d(e,n,o,f,d,i,t){return p(n&o|~n&f,e,n,d,i,t)}function i(e,n,o,f,d,i,t){return p(n&f|o&~f,e,n,d,i,t)}function t(e,n,o,f,d,i,t){return p(n^o^f,e,n,d,i,t)}function u(e,n,o,f,d,i,t){return p(o^(n|~f),e,n,d,i,t)}function l(e){txt="";var n,o=e.length,p=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=e.length;n+=64)f(p,c(e.substring(n-64,n)));e=e.substring(n-64);var d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<e.length;n++)d[n>>2]|=e.charCodeAt(n)<<(n%4<<3);if(d[n>>2]|=128<<(n%4<<3),n>55)for(f(p,d),n=0;16>n;n++)d[n]=0;return d[14]=8*o,f(p,d),p}function c(e){var n,o=[];for(n=0;64>n;n+=4)o[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return o}function g(e){for(var n="",o=0;4>o;o++)n+=b[e>>8*o+4&15]+b[e>>8*o&15];return n}function s(e){for(var n=0;n<e.length;n++)e[n]=g(e[n]);return e.join("")}function y(e){return s(l(e))}function w(e,n){return e+n&4294967295}function w(e,n){var o=(65535&e)+(65535&n),f=(e>>16)+(n>>16)+(o>>16);return f<<16|65535&o}var a=e("../../util.js");n.exports=function(e){var n=y(a.Uint8Array2str(e)),o=a.str2Uint8Array(a.hex2bin(n));return o};var b="0123456789abcdef".split("");"5d41402abc4b2a76b9719d911017c592"!=y("hello")},{"../../util.js":74}],29:[function(e,n,o){function f(e,n){return new Number(e<<n|e>>>32-n)}function p(e,n,o){return new Number(e^n^o)}function d(e,n,o){return new Number(e&n|~e&o)}function i(e,n,o){return new Number((e|~n)^o)}function t(e,n,o){return new Number(e&o|n&~o)}function u(e,n,o){return new Number(e^(n|~o))}function l(e,n,o,l,c,g,s,y){switch(y){case 0:e+=p(n,o,l)+g+0;break;case 1:e+=d(n,o,l)+g+1518500249;break;case 2:e+=i(n,o,l)+g+1859775393;break;case 3:e+=t(n,o,l)+g+2400959708;break;case 4:e+=u(n,o,l)+g+2840853838;break;case 5:e+=u(n,o,l)+g+1352829926;break;case 6:e+=t(n,o,l)+g+1548603684;break;case 7:e+=i(n,o,l)+g+1836072691;break;case 8:e+=d(n,o,l)+g+2053994217;break;case 9:e+=p(n,o,l)+g+0;break;default:throw new Error("Bogus round number")}e=f(e,s)+c,o=f(o,10),e&=4294967295,n&=4294967295,o&=4294967295,l&=4294967295,c&=4294967295;var w=[];return w[0]=e,w[1]=n,w[2]=o,w[3]=l,w[4]=c,w[5]=g,w[6]=s,w}function c(e){e[0]=1732584193,e[1]=4023233417,e[2]=2562383102,e[3]=271733878,e[4]=3285377520}function g(e,n){blockA=[],blockB=[];var o,f,p;for(f=0;5>f;f++)blockA[f]=new Number(e[f]),blockB[f]=new Number(e[f]);var d=0;for(p=0;5>p;p++)for(f=0;16>f;f++)o=l(blockA[(d+0)%5],blockA[(d+1)%5],blockA[(d+2)%5],blockA[(d+3)%5],blockA[(d+4)%5],n[j[p][f]],x[p][f],p),blockA[(d+0)%5]=o[0],blockA[(d+1)%5]=o[1],blockA[(d+2)%5]=o[2],blockA[(d+3)%5]=o[3],blockA[(d+4)%5]=o[4],d+=4;for(d=0,p=5;10>p;p++)for(f=0;16>f;f++)o=l(blockB[(d+0)%5],blockB[(d+1)%5],blockB[(d+2)%5],blockB[(d+3)%5],blockB[(d+4)%5],n[j[p][f]],x[p][f],p),blockB[(d+0)%5]=o[0],blockB[(d+1)%5]=o[1],blockB[(d+2)%5]=o[2],blockB[(d+3)%5]=o[3],blockB[(d+4)%5]=o[4],d+=4;blockB[3]+=blockA[2]+e[1],e[1]=e[2]+blockA[3]+blockB[4],e[2]=e[3]+blockA[4]+blockB[0],e[3]=e[4]+blockA[0]+blockB[1],e[4]=e[0]+blockA[1]+blockB[2],e[0]=blockB[3]}function s(e){for(var n=0;16>n;n++)e[n]=0}function y(e,n,o,f){var p=new Array(16);s(p);for(var d=0,i=0;(63&o)>i;i++)p[i>>>2]^=(255&n.charCodeAt(d++))<<8*(3&i);p[o>>>2&15]^=1<<8*(3&o)+7,(63&o)>55&&(g(e,p),p=new Array(16),s(p)),p[14]=o<<3,p[15]=o>>>29|f<<3,g(e,p)}function w(e){var n=(255&e.charCodeAt(3))<<24;return n|=(255&e.charCodeAt(2))<<16,n|=(255&e.charCodeAt(1))<<8,n|=255&e.charCodeAt(0)}function a(e){var n,o,f=new Array(m/32),p=new Array(m/8);c(f),n=e.length;var d=new Array(16);s(d);var i,t=0;for(o=n;o>63;o-=64){for(i=0;16>i;i++)d[i]=w(e.substr(t,4)),t+=4;g(f,d)}for(y(f,e.substr(t),n,0),i=0;m/8>i;i+=4)p[i]=255&f[i>>>2],p[i+1]=f[i>>>2]>>>8&255,p[i+2]=f[i>>>2]>>>16&255,p[i+3]=f[i>>>2]>>>24&255;return p}function b(e){for(var n=a(r.Uint8Array2str(e)),o="",f=0;m/8>f;f++)o+=String.fromCharCode(n[f]);return r.str2Uint8Array(o)}var r=e("../../util.js"),m=160,x=[[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],[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]],j=[[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],[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]];n.exports=b},{"../../util.js":74}],30:[function(e,n,o){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:{};!function(){function e(n){"use strict";var f={fill:0},p=function(e){for(e+=9;e%64>0;e+=1);return e},d=function(e,n){for(var o=n>>2;o<e.length;o++)e[o]=0},i=function(e,n,o){e[n>>2]|=128<<24-(n%4<<3),e[((n>>2)+2&-16)+14]=o>>29,e[((n>>2)+2&-16)+15]=o<<3},t=function(e,n,o,f,p){var d,i=this,t=p%4,u=f%4,l=f-u;if(l>0)switch(t){case 0:e[p+3|0]=i.charCodeAt(o);case 1:e[p+2|0]=i.charCodeAt(o+1);case 2:e[p+1|0]=i.charCodeAt(o+2);case 3:e[0|p]=i.charCodeAt(o+3)}for(d=t;l>d;d=d+4|0)n[p+d>>2]=i.charCodeAt(o+d)<<24|i.charCodeAt(o+d+1)<<16|i.charCodeAt(o+d+2)<<8|i.charCodeAt(o+d+3);switch(u){case 3:e[p+l+1|0]=i.charCodeAt(o+l+2);case 2:e[p+l+2|0]=i.charCodeAt(o+l+1);case 1:e[p+l+3|0]=i.charCodeAt(o+l)}},u=function(e,n,o,f,p){var d,i=this,t=p%4,u=f%4,l=f-u;if(l>0)switch(t){case 0:e[p+3|0]=i[o];case 1:e[p+2|0]=i[o+1];case 2:e[p+1|0]=i[o+2];case 3:e[0|p]=i[o+3]}for(d=4-t;l>d;d=d+=4)n[p+d>>2]=i[o+d]<<24|i[o+d+1]<<16|i[o+d+2]<<8|i[o+d+3];switch(u){case 3:e[p+l+1|0]=i[o+l+2];case 2:e[p+l+2|0]=i[o+l+1];case 1:e[p+l+3|0]=i[o+l]}},l=function(e,n,o,f,p){var d,i=this,t=p%4,u=f%4,l=f-u,c=new Uint8Array(reader.readAsArrayBuffer(i.slice(o,o+f)));if(l>0)switch(t){case 0:e[p+3|0]=c[0];case 1:e[p+2|0]=c[1];case 2:e[p+1|0]=c[2];case 3:e[0|p]=c[3]}for(d=4-t;l>d;d=d+=4)n[p+d>>2]=c[d]<<24|c[d+1]<<16|c[d+2]<<8|c[d+3];switch(u){case 3:e[p+l+1|0]=c[l+2];case 2:e[p+l+2|0]=c[l+1];case 1:e[p+l+3|0]=c[l]}},c=function(e){switch(o.getDataType(e)){case"string":return t.bind(e);case"array":return u.bind(e);case"buffer":return u.bind(e);case"arraybuffer":return u.bind(new Uint8Array(e));case"view":return u.bind(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));case"blob":return l.bind(e)}},g=function(e){var n,o,f="0123456789abcdef",p=[],d=new Uint8Array(e);for(n=0;n<d.length;n++)o=d[n],p[n]=f.charAt(o>>4&15)+f.charAt(o>>0&15);return p.join("")},s=function(e){var n;if(65536>=e)return 65536;if(16777216>e)for(n=1;e>n;n<<=1);else for(n=16777216;e>n;n+=16777216);return n},y=function(n){if(n%64>0)throw new Error("Chunk size must be a multiple of 128 bit");f.maxChunkLen=n,f.padMaxChunkLen=p(n),f.heap=new ArrayBuffer(s(f.padMaxChunkLen+320+20)),f.h32=new Int32Array(f.heap),f.h8=new Int8Array(f.heap),f.core=new e._core({Int32Array:Int32Array,DataView:DataView},{},f.heap),f.buffer=null};y(n||65536);var w=function(e,n){var o=new Int32Array(e,n+320,5);o[0]=1732584193,o[1]=-271733879,o[2]=-1732584194,o[3]=271733878,o[4]=-1009589776},a=function(e,n){var o=p(e),t=new Int32Array(f.heap,0,o>>2);return d(t,e),i(t,e,n),o},b=function(e,n,o){c(e)(f.h8,f.h32,n,o,0)},r=function(e,n,o,p,d){var i=o;d&&(i=a(o,p)),b(e,n,o),f.core.hash(i,f.padMaxChunkLen)},m=function(e,n){var o=new Int32Array(e,n+320,5),f=new Int32Array(5),p=new DataView(f.buffer);return p.setInt32(0,o[0],!1),p.setInt32(4,o[1],!1),p.setInt32(8,o[2],!1),p.setInt32(12,o[3],!1),p.setInt32(16,o[4],!1),f},x=this.rawDigest=function(e){var n=e.byteLength||e.length||e.size||0;w(f.heap,f.padMaxChunkLen);var o=0,p=f.maxChunkLen;for(o=0;n>o+p;o+=p)r(e,o,p,n,!1);return r(e,o,n-o,n,!0),m(f.heap,f.padMaxChunkLen)};this.digest=this.digestFromString=this.digestFromBuffer=this.digestFromArrayBuffer=function(e){return g(x(e).buffer)}}n.exports=e;var o={getDataType:function(e){if("string"==typeof e)return"string";if(e instanceof Array)return"array";if("undefined"!=typeof f&&f.Buffer&&f.Buffer.isBuffer(e))return"buffer";if(e instanceof ArrayBuffer)return"arraybuffer";if(e.buffer instanceof ArrayBuffer)return"view";if(e instanceof Blob)return"blob";throw new Error("Unsupported data type.")}};e._core=function(e,n,o){"use asm";function f(e,n){e|=0,n|=0;var o=0,f=0,d=0,i=0,t=0,u=0,l=0,c=0,g=0,s=0,y=0,w=0,a=0,b=0;for(d=p[n+320>>2]|0,t=p[n+324>>2]|0,l=p[n+328>>2]|0,g=p[n+332>>2]|0,y=p[n+336>>2]|0,o=0;(o|0)<(e|0);o=o+64|0){for(i=d,u=t,c=l,s=g,w=y,f=0;(f|0)<64;f=f+4|0)b=p[o+f>>2]|0,a=((d<<5|d>>>27)+(t&l|~t&g)|0)+((b+y|0)+1518500249|0)|0,y=g,g=l,l=t<<30|t>>>2,t=d,d=a,p[e+f>>2]=b;for(f=e+64|0;(f|0)<(e+80|0);f=f+4|0)b=(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])<<1|(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])>>>31,a=((d<<5|d>>>27)+(t&l|~t&g)|0)+((b+y|0)+1518500249|0)|0,y=g,g=l,l=t<<30|t>>>2,t=d,d=a,p[f>>2]=b;for(f=e+80|0;(f|0)<(e+160|0);f=f+4|0)b=(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])<<1|(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])>>>31,a=((d<<5|d>>>27)+(t^l^g)|0)+((b+y|0)+1859775393|0)|0,y=g,g=l,l=t<<30|t>>>2,t=d,d=a,p[f>>2]=b;for(f=e+160|0;(f|0)<(e+240|0);f=f+4|0)b=(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])<<1|(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])>>>31,a=((d<<5|d>>>27)+(t&l|t&g|l&g)|0)+((b+y|0)-1894007588|0)|0,y=g,g=l,l=t<<30|t>>>2,t=d,d=a,p[f>>2]=b;for(f=e+240|0;(f|0)<(e+320|0);f=f+4|0)b=(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])<<1|(p[f-12>>2]^p[f-32>>2]^p[f-56>>2]^p[f-64>>2])>>>31,a=((d<<5|d>>>27)+(t^l^g)|0)+((b+y|0)-899497514|0)|0,y=g,g=l,l=t<<30|t>>>2,t=d,d=a,p[f>>2]=b;d=d+i|0,t=t+u|0,l=l+c|0,g=g+s|0,y=y+w|0}p[n+320>>2]=d,p[n+324>>2]=t,p[n+328>>2]=l,p[n+332>>2]=g,p[n+336>>2]=y}var p=new e.Int32Array(o);return{hash:f}}}()},{}],31:[function(e,n,o){var f=(e("../../util.js"),7);!function(e){"use strict";function o(e,n){this.highOrder=e,this.lowOrder=n}function p(e,n){var o,f,p,d,i=[],t=[],u=0;if("UTF8"===n)for(f=0;f<e.length;f+=1)for(o=e.charCodeAt(f),t=[],128>o?t.push(o):2048>o?(t.push(192|o>>>6),t.push(128|63&o)):55296>o||o>=57344?t.push(224|o>>>12,128|o>>>6&63,128|63&o):(f+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(f)),t.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),p=0;p<t.length;p+=1){for(d=u>>>2;i.length<=d;)i.push(0);i[d]|=t[p]<<24-8*(u%4),u+=1}else if("UTF16BE"===n||"UTF16LE"===n)for(f=0;f<e.length;f+=1){for(o=e.charCodeAt(f),"UTF16LE"===n&&(p=255&o,o=p<<8|o>>8),d=u>>>2;i.length<=d;)i.push(0);i[d]|=o<<16-8*(u%4),u+=2}return{value:i,binLen:8*u}}function d(e){var n,o,f,p=[],d=e.length;if(0!==d%2)throw"String of HEX type must be in byte increments";for(n=0;d>n;n+=2){if(o=parseInt(e.substr(n,2),16),isNaN(o))throw"String of HEX type contains invalid characters";for(f=n>>>3;p.length<=f;)p.push(0);p[n>>>3]|=o<<24-4*(n%8)}return{value:p,binLen:4*d}}function i(e){var n,o,f,p=[];for(o=0;o<e.length;o+=1)n=e.charCodeAt(o),f=o>>>2,p.length<=f&&p.push(0),p[f]|=n<<24-8*(o%4);return{value:p,binLen:8*e.length}}function t(e){var n,o,f,p=[];for(o=0;o<e.length;o+=1)n=e[o],f=o>>>2,p.length<=f&&p.push(0),p[f]|=n<<24-8*(o%4);return{value:p,binLen:8*e.length}}function u(e){var n,o,f,p,d,i,t,u=[],l=0,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";if(-1===e.search(/^[a-zA-Z0-9=+\/]+$/))throw"Invalid character in base-64 string";if(i=e.indexOf("="),e=e.replace(/\=/g,""),-1!==i&&i<e.length)throw"Invalid '=' found in base-64 string";for(o=0;o<e.length;o+=4){for(d=e.substr(o,4),p=0,f=0;f<d.length;f+=1)n=c.indexOf(d[f]),p|=n<<18-6*f;for(f=0;f<d.length-1;f+=1){for(t=l>>>2;u.length<=t;)u.push(0);u[t]|=(p>>>16-8*f&255)<<24-8*(l%4),l+=1}}return{value:u,binLen:8*l}}function l(e,n){var o,f,p="0123456789abcdef",d="",i=4*e.length;for(o=0;i>o;o+=1)f=e[o>>>2]>>>8*(3-o%4),d+=p.charAt(f>>>4&15)+p.charAt(15&f);return n.outputUpper?d.toUpperCase():d}function c(e,n){var o,f,p,d,i,t,u="",l=4*e.length,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0;l>o;o+=3)for(d=o+1>>>2,i=e.length<=d?0:e[d],d=o+2>>>2,t=e.length<=d?0:e[d],p=(e[o>>>2]>>>8*(3-o%4)&255)<<16|(i>>>8*(3-(o+1)%4)&255)<<8|t>>>8*(3-(o+2)%4)&255,f=0;4>f;f+=1)u+=8*o+6*f<=32*e.length?c.charAt(p>>>6*(3-f)&63):n.b64Pad;return u}function g(e,n){var o,f,p="",d=4*e.length;for(o=0;d>o;o+=1)f=e[o>>>2]>>>8*(3-o%4)&255,p+=String.fromCharCode(f);return p}function s(e,n){var o,f=4*e.length,p=new Uint8Array(f);for(o=0;f>o;o+=1)p[o]=e[o>>>2]>>>8*(3-o%4)&255;return p}function y(e){var n={outputUpper:!1,b64Pad:"="};try{e.hasOwnProperty("outputUpper")&&(n.outputUpper=e.outputUpper),e.hasOwnProperty("b64Pad")&&(n.b64Pad=e.b64Pad)}catch(o){}if("boolean"!=typeof n.outputUpper)throw"Invalid outputUpper formatting option";if("string"!=typeof n.b64Pad)throw"Invalid b64Pad formatting option";return n}function w(e,n){return e<<n|e>>>32-n}function a(e,n){return e>>>n|e<<32-n}function b(e,n){var f=null,p=new o(e.highOrder,e.lowOrder);return f=32>=n?new o(p.highOrder>>>n|p.lowOrder<<32-n&4294967295,p.lowOrder>>>n|p.highOrder<<32-n&4294967295):new o(p.lowOrder>>>n-32|p.highOrder<<64-n&4294967295,p.highOrder>>>n-32|p.lowOrder<<64-n&4294967295)}function r(e,n){return e>>>n}function m(e,n){var f=null;return f=32>=n?new o(e.highOrder>>>n,e.lowOrder>>>n|e.highOrder<<32-n&4294967295):new o(0,e.highOrder>>>n-32)}function x(e,n,o){return e^n^o}function j(e,n,o){return e&n^~e&o}function h(e,n,f){return new o(e.highOrder&n.highOrder^~e.highOrder&f.highOrder,e.lowOrder&n.lowOrder^~e.lowOrder&f.lowOrder)}function k(e,n,o){return e&n^e&o^n&o}function q(e,n,f){return new o(e.highOrder&n.highOrder^e.highOrder&f.highOrder^n.highOrder&f.highOrder,e.lowOrder&n.lowOrder^e.lowOrder&f.lowOrder^n.lowOrder&f.lowOrder)}function v(e){return a(e,2)^a(e,13)^a(e,22)}function z(e){var n=b(e,28),f=b(e,34),p=b(e,39);return new o(n.highOrder^f.highOrder^p.highOrder,n.lowOrder^f.lowOrder^p.lowOrder)}function A(e){return a(e,6)^a(e,11)^a(e,25)}function B(e){var n=b(e,14),f=b(e,18),p=b(e,41);return new o(n.highOrder^f.highOrder^p.highOrder,n.lowOrder^f.lowOrder^p.lowOrder)}function C(e){return a(e,7)^a(e,18)^r(e,3)}function D(e){var n=b(e,1),f=b(e,8),p=m(e,7);return new o(n.highOrder^f.highOrder^p.highOrder,n.lowOrder^f.lowOrder^p.lowOrder)}function E(e){return a(e,17)^a(e,19)^r(e,10)}function F(e){var n=b(e,19),f=b(e,61),p=m(e,6);return new o(n.highOrder^f.highOrder^p.highOrder,n.lowOrder^f.lowOrder^p.lowOrder)}function G(e,n){var o=(65535&e)+(65535&n),f=(e>>>16)+(n>>>16)+(o>>>16);return(65535&f)<<16|65535&o}function H(e,n,o,f){var p=(65535&e)+(65535&n)+(65535&o)+(65535&f),d=(e>>>16)+(n>>>16)+(o>>>16)+(f>>>16)+(p>>>16);return(65535&d)<<16|65535&p}function I(e,n,o,f,p){var d=(65535&e)+(65535&n)+(65535&o)+(65535&f)+(65535&p),i=(e>>>16)+(n>>>16)+(o>>>16)+(f>>>16)+(p>>>16)+(d>>>16);return(65535&i)<<16|65535&d}function J(e,n){var f,p,d,i;return f=(65535&e.lowOrder)+(65535&n.lowOrder),p=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(f>>>16),d=(65535&p)<<16|65535&f,f=(65535&e.highOrder)+(65535&n.highOrder)+(p>>>16),p=(e.highOrder>>>16)+(n.highOrder>>>16)+(f>>>16),i=(65535&p)<<16|65535&f,new o(i,d)}function K(e,n,f,p){var d,i,t,u;return d=(65535&e.lowOrder)+(65535&n.lowOrder)+(65535&f.lowOrder)+(65535&p.lowOrder),i=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(f.lowOrder>>>16)+(p.lowOrder>>>16)+(d>>>16),t=(65535&i)<<16|65535&d,d=(65535&e.highOrder)+(65535&n.highOrder)+(65535&f.highOrder)+(65535&p.highOrder)+(i>>>16),i=(e.highOrder>>>16)+(n.highOrder>>>16)+(f.highOrder>>>16)+(p.highOrder>>>16)+(d>>>16),u=(65535&i)<<16|65535&d,new o(u,t)}function L(e,n,f,p,d){var i,t,u,l;return i=(65535&e.lowOrder)+(65535&n.lowOrder)+(65535&f.lowOrder)+(65535&p.lowOrder)+(65535&d.lowOrder),t=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(f.lowOrder>>>16)+(p.lowOrder>>>16)+(d.lowOrder>>>16)+(i>>>16),u=(65535&t)<<16|65535&i,i=(65535&e.highOrder)+(65535&n.highOrder)+(65535&f.highOrder)+(65535&p.highOrder)+(65535&d.highOrder)+(t>>>16),t=(e.highOrder>>>16)+(n.highOrder>>>16)+(f.highOrder>>>16)+(p.highOrder>>>16)+(d.highOrder>>>16)+(i>>>16),l=(65535&t)<<16|65535&i,new o(l,u)}function M(e,n){var o,f,p,d,i,t,u,l,c,g,s=[],y=j,a=x,b=k,r=w,m=G,h=I,q=[1732584193,4023233417,2562383102,271733878,3285377520];for(g=(n+65>>>9<<4)+15;e.length<=g;)e.push(0);for(e[n>>>5]|=128<<24-n%32,e[g]=n,c=e.length,u=0;c>u;u+=16){for(o=q[0],f=q[1],p=q[2],d=q[3],i=q[4],l=0;80>l;l+=1)16>l?s[l]=e[l+u]:s[l]=r(s[l-3]^s[l-8]^s[l-14]^s[l-16],1),t=20>l?h(r(o,5),y(f,p,d),i,1518500249,s[l]):40>l?h(r(o,5),a(f,p,d),i,1859775393,s[l]):60>l?h(r(o,5),b(f,p,d),i,2400959708,s[l]):h(r(o,5),a(f,p,d),i,3395469782,s[l]),i=d,d=p,p=r(f,30),f=o,o=t;q[0]=m(o,q[0]),q[1]=m(f,q[1]),q[2]=m(p,q[2]),q[3]=m(d,q[3]),q[4]=m(i,q[4])}return q}function N(e,n,p){var d,i,t,u,l,c,g,s,y,w,a,b,r,m,x,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ee,ne=[],oe=[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],fe=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],pe=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];
if(("SHA-224"===p||"SHA-256"===p)&&2&f)b=64,r=(n+65>>>9<<4)+15,M=16,N=1,X=Number,O=G,P=H,Q=I,R=C,S=E,T=v,U=A,W=k,V=j,a="SHA-224"===p?fe:pe;else{if("SHA-384"!==p&&"SHA-512"!==p||!(4&f))throw"Unexpected error in SHA-2 implementation";b=80,r=(n+128>>>10<<5)+31,M=32,N=2,X=o,O=J,P=K,Q=L,R=D,S=F,T=z,U=B,W=q,V=h,oe=[new X(oe[0],3609767458),new X(oe[1],602891725),new X(oe[2],3964484399),new X(oe[3],2173295548),new X(oe[4],4081628472),new X(oe[5],3053834265),new X(oe[6],2937671579),new X(oe[7],3664609560),new X(oe[8],2734883394),new X(oe[9],1164996542),new X(oe[10],1323610764),new X(oe[11],3590304994),new X(oe[12],4068182383),new X(oe[13],991336113),new X(oe[14],633803317),new X(oe[15],3479774868),new X(oe[16],2666613458),new X(oe[17],944711139),new X(oe[18],2341262773),new X(oe[19],2007800933),new X(oe[20],1495990901),new X(oe[21],1856431235),new X(oe[22],3175218132),new X(oe[23],2198950837),new X(oe[24],3999719339),new X(oe[25],766784016),new X(oe[26],2566594879),new X(oe[27],3203337956),new X(oe[28],1034457026),new X(oe[29],2466948901),new X(oe[30],3758326383),new X(oe[31],168717936),new X(oe[32],1188179964),new X(oe[33],1546045734),new X(oe[34],1522805485),new X(oe[35],2643833823),new X(oe[36],2343527390),new X(oe[37],1014477480),new X(oe[38],1206759142),new X(oe[39],344077627),new X(oe[40],1290863460),new X(oe[41],3158454273),new X(oe[42],3505952657),new X(oe[43],106217008),new X(oe[44],3606008344),new X(oe[45],1432725776),new X(oe[46],1467031594),new X(oe[47],851169720),new X(oe[48],3100823752),new X(oe[49],1363258195),new X(oe[50],3750685593),new X(oe[51],3785050280),new X(oe[52],3318307427),new X(oe[53],3812723403),new X(oe[54],2003034995),new X(oe[55],3602036899),new X(oe[56],1575990012),new X(oe[57],1125592928),new X(oe[58],2716904306),new X(oe[59],442776044),new X(oe[60],593698344),new X(oe[61],3733110249),new X(oe[62],2999351573),new X(oe[63],3815920427),new X(3391569614,3928383900),new X(3515267271,566280711),new X(3940187606,3454069534),new X(4118630271,4000239992),new X(116418474,1914138554),new X(174292421,2731055270),new X(289380356,3203993006),new X(460393269,320620315),new X(685471733,587496836),new X(852142971,1086792851),new X(1017036298,365543100),new X(1126000580,2618297676),new X(1288033470,3409855158),new X(1501505948,4234509866),new X(1607167915,987167468),new X(1816402316,1246189591)],a="SHA-384"===p?[new X(3418070365,fe[0]),new X(1654270250,fe[1]),new X(2438529370,fe[2]),new X(355462360,fe[3]),new X(1731405415,fe[4]),new X(41048885895,fe[5]),new X(3675008525,fe[6]),new X(1203062813,fe[7])]:[new X(pe[0],4089235720),new X(pe[1],2227873595),new X(pe[2],4271175723),new X(pe[3],1595750129),new X(pe[4],2917565137),new X(pe[5],725511199),new X(pe[6],4215389547),new X(pe[7],327033209)]}for(;e.length<=r;)e.push(0);for(e[n>>>5]|=128<<24-n%32,e[r]=n,_=e.length,m=0;_>m;m+=M){for(d=a[0],i=a[1],t=a[2],u=a[3],l=a[4],c=a[5],g=a[6],s=a[7],x=0;b>x;x+=1)16>x?($=x*N+m,Y=e.length<=$?0:e[$],Z=e.length<=$+1?0:e[$+1],ne[x]=new X(Y,Z)):ne[x]=P(S(ne[x-2]),ne[x-7],R(ne[x-15]),ne[x-16]),y=Q(s,U(l),V(l,c,g),oe[x],ne[x]),w=O(T(d),W(d,i,t)),s=g,g=c,c=l,l=O(u,y),u=t,t=i,i=d,d=O(y,w);a[0]=O(d,a[0]),a[1]=O(i,a[1]),a[2]=O(t,a[2]),a[3]=O(u,a[3]),a[4]=O(l,a[4]),a[5]=O(c,a[5]),a[6]=O(g,a[6]),a[7]=O(s,a[7])}if("SHA-224"===p&&2&f)ee=[a[0],a[1],a[2],a[3],a[4],a[5],a[6]];else if("SHA-256"===p&&2&f)ee=a;else if("SHA-384"===p&&4&f)ee=[a[0].highOrder,a[0].lowOrder,a[1].highOrder,a[1].lowOrder,a[2].highOrder,a[2].lowOrder,a[3].highOrder,a[3].lowOrder,a[4].highOrder,a[4].lowOrder,a[5].highOrder,a[5].lowOrder];else{if(!("SHA-512"===p&&4&f))throw"Unexpected error in SHA-2 implementation";ee=[a[0].highOrder,a[0].lowOrder,a[1].highOrder,a[1].lowOrder,a[2].highOrder,a[2].lowOrder,a[3].highOrder,a[3].lowOrder,a[4].highOrder,a[4].lowOrder,a[5].highOrder,a[5].lowOrder,a[6].highOrder,a[6].lowOrder,a[7].highOrder,a[7].lowOrder]}return ee}var O=function(e,n,o){var w=0,a=[0],b="",r=null;if(b=o||"UTF8","UTF8"!==b&&"UTF16BE"!==b&&"UTF16LE"!==b)throw"encoding must be UTF8, UTF16BE, or UTF16LE";if("HEX"===n){if(0!==e.length%2)throw"srcString of HEX type must be in byte increments";r=d(e),w=r.binLen,a=r.value}else if("TEXT"===n||"ASCII"===n)r=p(e,b),w=r.binLen,a=r.value;else if("B64"===n)r=u(e),w=r.binLen,a=r.value;else if("BYTES"===n)r=i(e),w=r.binLen,a=r.value;else{if("TYPED"!==n)throw"inputFormat must be HEX, TEXT, ASCII, B64, BYTES, or TYPED";r=t(e),w=r.binLen,a=r.value}this.getHash=function(e,n,o,p){var d,i=null,t=a.slice(),u=w;if(3===arguments.length?"number"!=typeof o&&(p=o,o=1):2===arguments.length&&(o=1),o!==parseInt(o,10)||1>o)throw"numRounds must a integer >= 1";switch(n){case"HEX":i=l;break;case"B64":i=c;break;case"BYTES":i=g;break;case"TYPED":i=s;break;default:throw"format must be HEX, B64, or BYTES"}if("SHA-1"===e&&1&f)for(d=0;o>d;d+=1)t=M(t,u),u=160;else if("SHA-224"===e&&2&f)for(d=0;o>d;d+=1)t=N(t,u,e),u=224;else if("SHA-256"===e&&2&f)for(d=0;o>d;d+=1)t=N(t,u,e),u=256;else if("SHA-384"===e&&4&f)for(d=0;o>d;d+=1)t=N(t,u,e),u=384;else{if(!("SHA-512"===e&&4&f))throw"Chosen SHA variant is not supported";for(d=0;o>d;d+=1)t=N(t,u,e),u=512}return i(t,y(p))},this.getHMAC=function(e,n,o,t,s){var r,m,x,j,h,k,q,v,z,A=[],B=[],C=null;switch(t){case"HEX":r=l;break;case"B64":r=c;break;case"BYTES":r=g;break;default:throw"outputFormat must be HEX, B64, or BYTES"}if("SHA-1"===o&&1&f)x=64,z=160;else if("SHA-224"===o&&2&f)x=64,z=224;else if("SHA-256"===o&&2&f)x=64,z=256;else if("SHA-384"===o&&4&f)x=128,z=384;else{if(!("SHA-512"===o&&4&f))throw"Chosen SHA variant is not supported";x=128,z=512}if("HEX"===n)C=d(e),v=C.binLen,m=C.value;else if("TEXT"===n||"ASCII"===n)C=p(e,b),v=C.binLen,m=C.value;else if("B64"===n)C=u(e),v=C.binLen,m=C.value;else{if("BYTES"!==n)throw"inputFormat must be HEX, TEXT, ASCII, B64, or BYTES";C=i(e),v=C.binLen,m=C.value}if(j=8*x,q=x/4-1,v/8>x){if("SHA-1"===o&&1&f)m=M(m,v);else{if(!(6&f))throw"Unexpected error in HMAC implementation";m=N(m,v,o)}for(;m.length<=q;)m.push(0);m[q]&=4294967040}else if(x>v/8){for(;m.length<=q;)m.push(0);m[q]&=4294967040}for(h=0;q>=h;h+=1)A[h]=909522486^m[h],B[h]=1549556828^m[h];if("SHA-1"===o&&1&f)k=M(B.concat(M(A.concat(a),j+w)),j+z);else{if(!(6&f))throw"Unexpected error in HMAC implementation";k=N(B.concat(N(A.concat(a),j+w,o)),j+z,o)}return r(k,y(s))}};n.exports={sha1:function(e){var n=new O(e,"TYPED","UTF8");return n.getHash("SHA-1","TYPED")},sha224:function(e){var n=new O(e,"TYPED","UTF8");return n.getHash("SHA-224","TYPED")},sha256:function(e){var n=new O(e,"TYPED","UTF8");return n.getHash("SHA-256","TYPED")},sha384:function(e){var n=new O(e,"TYPED","UTF8");return n.getHash("SHA-384","TYPED")},sha512:function(e){var n=new O(e,"TYPED","UTF8");return n.getHash("SHA-512","TYPED")}}}(this)},{"../../util.js":74}],32:[function(e,n,o){e("./asmcrypto.js"),n.exports={cipher:e("./cipher"),hash:e("./hash"),cfb:e("./cfb.js"),publicKey:e("./public_key"),signature:e("./signature.js"),random:e("./random.js"),pkcs1:e("./pkcs1.js")};var f=e("./crypto.js");for(var p in f)n.exports[p]=f[p]},{"./asmcrypto.js":18,"./cfb.js":19,"./cipher":24,"./crypto.js":26,"./hash":27,"./pkcs1.js":33,"./public_key":36,"./random.js":39,"./signature.js":40}],33:[function(e,n,o){function f(e){for(var n,o="";o.length<e;)n=d.getSecureRandomOctet(),0!==n&&(o+=String.fromCharCode(n));return o}var p=[];p[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],p[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],p[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],p[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],p[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],p[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],p[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];var d=(e("./crypto.js"),e("./random.js")),i=e("../util.js"),t=e("./public_key/jsbn.js"),u=e("./hash");n.exports={eme:{encode:function(e,n){var o=e.length;if(o>n-11)throw new Error("Message too long");var p=f(n-o-3),d=String.fromCharCode(0)+String.fromCharCode(2)+p+String.fromCharCode(0)+e;return d},decode:function(e){0!==e.charCodeAt(0)&&(e=String.fromCharCode(0)+e);for(var n=e.charCodeAt(0),o=e.charCodeAt(1),f=2;0!==e.charCodeAt(f)&&f<e.length;)f++;var p=f-2,d=e.charCodeAt(f++);if(0===n&&2===o&&p>=8&&0===d)return e.substr(f);throw new Error("Decryption error")}},emsa:{encode:function(e,n,o){var f,d=i.Uint8Array2str(u.digest(e,i.str2Uint8Array(n)));if(d.length!==u.getHashByteLength(e))throw new Error("Invalid hash length");var l="";for(f=0;f<p[e].length;f++)l+=String.fromCharCode(p[e][f]);l+=d;var c=l.length;if(c+11>o)throw new Error("Intended encoded message length too short");var g="";for(f=0;o-c-3>f;f++)g+=String.fromCharCode(255);var s=String.fromCharCode(0)+String.fromCharCode(1)+g+String.fromCharCode(0)+l;return new t(i.hexstrdump(s),16)}}}},{"../util.js":74,"./crypto.js":26,"./hash":27,"./public_key/jsbn.js":37,"./random.js":39}],34:[function(e,n,o){function f(){function e(e,n,o,f,u,l){for(var c,g,s,y=t.getLeftNBits(t.Uint8Array2str(i.digest(e,t.str2Uint8Array(n))),u.bitLength()),w=new p(t.hexstrdump(y),16);;)if(c=d.getRandomBigIntegerInRange(p.ONE,u.subtract(p.ONE)),g=o.modPow(c,f).mod(u),s=c.modInverse(u).multiply(w.add(l.multiply(g))).mod(u),0!=g&&0!=s)break;var a=[];return a[0]=g.toMPI(),a[1]=s.toMPI(),a}function n(e){var n=u.prefer_hash_algorithm;switch(Math.round(e.bitLength()/8)){case 20:return 2!=n&&n>11&&10!=n&&8>n?2:n;case 28:return n>11&&8>n?11:n;case 32:return n>10&&8>n?8:n;default:return t.print_debug("DSA select hash algorithm: returning null for an unknown length of q"),null}}function o(e,n,o,f,d,u,l,c){var g=t.getLeftNBits(t.Uint8Array2str(i.digest(e,t.str2Uint8Array(f))),u.bitLength()),s=new p(t.hexstrdump(g),16);if(p.ZERO.compareTo(n)>=0||n.compareTo(u)>=0||p.ZERO.compareTo(o)>=0||o.compareTo(u)>=0)return t.print_debug("invalid DSA Signature"),null;var y=o.modInverse(u);if(0==p.ZERO.compareTo(y))return t.print_debug("invalid DSA Signature"),null;var w=s.multiply(y).mod(u),a=n.multiply(y).mod(u);return l.modPow(w,d).multiply(c.modPow(a,d)).mod(d).mod(u)}this.select_hash_algorithm=n,this.sign=e,this.verify=o}var p=e("./jsbn.js"),d=e("../random.js"),i=e("../hash"),t=e("../../util.js"),u=e("../../config");n.exports=f},{"../../config":17,"../../util.js":74,"../hash":27,"../random.js":39,"./jsbn.js":37}],35:[function(e,n,o){function f(){function e(e,n,o,f){var i=o.subtract(p.TWO),t=d.getRandomBigIntegerInRange(p.ONE,i);t=t.mod(i).add(p.ONE);var u=[];return u[0]=n.modPow(t,o),u[1]=f.modPow(t,o).multiply(e).mod(o),u}function n(e,n,o,f){return i.print_debug("Elgamal Decrypt:\nc1:"+i.hexstrdump(e.toMPI())+"\nc2:"+i.hexstrdump(n.toMPI())+"\np:"+i.hexstrdump(o.toMPI())+"\nx:"+i.hexstrdump(f.toMPI())),e.modPow(f,o).modInverse(o).multiply(n).mod(o)}this.encrypt=e,this.decrypt=n}var p=e("./jsbn.js"),d=e("../random.js"),i=e("../../util.js");n.exports=f},{"../../util.js":74,"../random.js":39,"./jsbn.js":37}],36:[function(e,n,o){n.exports={rsa:e("./rsa.js"),elgamal:e("./elgamal.js"),dsa:e("./dsa.js")}},{"./dsa.js":34,"./elgamal.js":35,"./rsa.js":38}],37:[function(e,n,o){function f(e,n,o){null!=e&&("number"==typeof e?this.fromNumber(e,n,o):null==n&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,n))}function p(){return new f(null)}function d(e,n,o,f,p,d){for(;--d>=0;){var i=n*this[e++]+o[f]+p;p=Math.floor(i/67108864),o[f++]=67108863&i}return p}function i(e){return dn.charAt(e)}function t(e,n){var o=tn[e.charCodeAt(n)];return null==o?-1:o}function u(e){for(var n=this.t-1;n>=0;--n)e[n]=this[n];e.t=this.t,e.s=this.s}function l(e){this.t=1,this.s=0>e?-1:0,e>0?this[0]=e:-1>e?this[0]=e+this.DV:this.t=0}function c(e){var n=p();return n.fromInt(e),n}function g(e,n){var o;if(16==n)o=4;else if(8==n)o=3;else if(256==n)o=8;else if(2==n)o=1;else if(32==n)o=5;else{if(4!=n)return void this.fromRadix(e,n);o=2}this.t=0,this.s=0;for(var p=e.length,d=!1,i=0;--p>=0;){var u=8==o?255&e[p]:t(e,p);0>u?"-"==e.charAt(p)&&(d=!0):(d=!1,0==i?this[this.t++]=u:i+o>this.DB?(this[this.t-1]|=(u&(1<<this.DB-i)-1)<<i,this[this.t++]=u>>this.DB-i):this[this.t-1]|=u<<i,i+=o,i>=this.DB&&(i-=this.DB))}8==o&&0!=(128&e[0])&&(this.s=-1,i>0&&(this[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),d&&f.ZERO.subTo(this,this)}function s(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function y(e){if(this.s<0)return"-"+this.negate().toString(e);var n;if(16==e)n=4;else if(8==e)n=3;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return this.toRadix(e);n=2}var o,f=(1<<n)-1,p=!1,d="",t=this.t,u=this.DB-t*this.DB%n;if(t-->0)for(u<this.DB&&(o=this[t]>>u)>0&&(p=!0,d=i(o));t>=0;)n>u?(o=(this[t]&(1<<u)-1)<<n-u,o|=this[--t]>>(u+=this.DB-n)):(o=this[t]>>(u-=n)&f,0>=u&&(u+=this.DB,--t)),o>0&&(p=!0),p&&(d+=i(o));return p?d:"0"}function w(){var e=p();return f.ZERO.subTo(this,e),e}function a(){return this.s<0?this.negate():this}function b(e){var n=this.s-e.s;if(0!=n)return n;var o=this.t;if(n=o-e.t,0!=n)return this.s<0?-n:n;for(;--o>=0;)if(0!=(n=this[o]-e[o]))return n;return 0}function r(e){var n,o=1;return 0!=(n=e>>>16)&&(e=n,o+=16),0!=(n=e>>8)&&(e=n,o+=8),0!=(n=e>>4)&&(e=n,o+=4),0!=(n=e>>2)&&(e=n,o+=2),0!=(n=e>>1)&&(e=n,o+=1),o}function m(){return this.t<=0?0:this.DB*(this.t-1)+r(this[this.t-1]^this.s&this.DM)}function x(e,n){var o;for(o=this.t-1;o>=0;--o)n[o+e]=this[o];for(o=e-1;o>=0;--o)n[o]=0;n.t=this.t+e,n.s=this.s}function j(e,n){for(var o=e;o<this.t;++o)n[o-e]=this[o];n.t=Math.max(this.t-e,0),n.s=this.s}function h(e,n){var o,f=e%this.DB,p=this.DB-f,d=(1<<p)-1,i=Math.floor(e/this.DB),t=this.s<<f&this.DM;for(o=this.t-1;o>=0;--o)n[o+i+1]=this[o]>>p|t,t=(this[o]&d)<<f;for(o=i-1;o>=0;--o)n[o]=0;n[i]=t,n.t=this.t+i+1,n.s=this.s,n.clamp()}function k(e,n){n.s=this.s;var o=Math.floor(e/this.DB);if(o>=this.t)return void(n.t=0);var f=e%this.DB,p=this.DB-f,d=(1<<f)-1;n[0]=this[o]>>f;for(var i=o+1;i<this.t;++i)n[i-o-1]|=(this[i]&d)<<p,n[i-o]=this[i]>>f;f>0&&(n[this.t-o-1]|=(this.s&d)<<p),n.t=this.t-o,n.clamp()}function q(e,n){for(var o=0,f=0,p=Math.min(e.t,this.t);p>o;)f+=this[o]-e[o],n[o++]=f&this.DM,f>>=this.DB;if(e.t<this.t){for(f-=e.s;o<this.t;)f+=this[o],n[o++]=f&this.DM,f>>=this.DB;f+=this.s}else{for(f+=this.s;o<e.t;)f-=e[o],n[o++]=f&this.DM,f>>=this.DB;f-=e.s}n.s=0>f?-1:0,-1>f?n[o++]=this.DV+f:f>0&&(n[o++]=f),n.t=o,n.clamp()}function v(e,n){var o=this.abs(),p=e.abs(),d=o.t;for(n.t=d+p.t;--d>=0;)n[d]=0;for(d=0;d<p.t;++d)n[d+o.t]=o.am(0,p[d],n,d,0,o.t);n.s=0,n.clamp(),this.s!=e.s&&f.ZERO.subTo(n,n)}function z(e){for(var n=this.abs(),o=e.t=2*n.t;--o>=0;)e[o]=0;for(o=0;o<n.t-1;++o){var f=n.am(o,n[o],e,2*o,0,1);(e[o+n.t]+=n.am(o+1,2*n[o],e,2*o+1,f,n.t-o-1))>=n.DV&&(e[o+n.t]-=n.DV,e[o+n.t+1]=1)}e.t>0&&(e[e.t-1]+=n.am(o,n[o],e,2*o,0,1)),e.s=0,e.clamp()}function A(e,n,o){var d=e.abs();if(!(d.t<=0)){var i=this.abs();if(i.t<d.t)return null!=n&&n.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=p());var t=p(),u=this.s,l=e.s,c=this.DB-r(d[d.t-1]);c>0?(d.lShiftTo(c,t),i.lShiftTo(c,o)):(d.copyTo(t),i.copyTo(o));var g=t.t,s=t[g-1];if(0!=s){var y=s*(1<<this.F1)+(g>1?t[g-2]>>this.F2:0),w=this.FV/y,a=(1<<this.F1)/y,b=1<<this.F2,m=o.t,x=m-g,j=null==n?p():n;for(t.dlShiftTo(x,j),o.compareTo(j)>=0&&(o[o.t++]=1,o.subTo(j,o)),f.ONE.dlShiftTo(g,j),j.subTo(t,t);t.t<g;)t[t.t++]=0;for(;--x>=0;){var h=o[--m]==s?this.DM:Math.floor(o[m]*w+(o[m-1]+b)*a);if((o[m]+=t.am(0,h,o,x,0,g))<h)for(t.dlShiftTo(x,j),o.subTo(j,o);o[m]<--h;)o.subTo(j,o)}null!=n&&(o.drShiftTo(g,n),u!=l&&f.ZERO.subTo(n,n)),o.t=g,o.clamp(),c>0&&o.rShiftTo(c,o),0>u&&f.ZERO.subTo(o,o)}}}function B(e){var n=p();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(f.ZERO)>0&&e.subTo(n,n),n}function C(e){this.m=e}function D(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function E(e){return e}function F(e){e.divRemTo(this.m,null,e)}function G(e,n,o){e.multiplyTo(n,o),this.reduce(o)}function H(e,n){e.squareTo(n),this.reduce(n)}function I(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var n=3&e;return n=n*(2-(15&e)*n)&15,n=n*(2-(255&e)*n)&255,n=n*(2-((65535&e)*n&65535))&65535,n=n*(2-e*n%this.DV)%this.DV,n>0?this.DV-n:-n}function J(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function K(e){var n=p();return e.abs().dlShiftTo(this.m.t,n),n.divRemTo(this.m,null,n),e.s<0&&n.compareTo(f.ZERO)>0&&this.m.subTo(n,n),n}function L(e){var n=p();return e.copyTo(n),this.reduce(n),n}function M(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var n=0;n<this.m.t;++n){var o=32767&e[n],f=o*this.mpl+((o*this.mph+(e[n]>>15)*this.mpl&this.um)<<15)&e.DM;for(o=n+this.m.t,e[o]+=this.m.am(0,f,e,n,0,this.m.t);e[o]>=e.DV;)e[o]-=e.DV,e[++o]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function N(e,n){e.squareTo(n),this.reduce(n)}function O(e,n,o){e.multiplyTo(n,o),this.reduce(o)}function P(){return 0==(this.t>0?1&this[0]:this.s)}function Q(e,n){if(e>4294967295||1>e)return f.ONE;var o=p(),d=p(),i=n.convert(this),t=r(e)-1;for(i.copyTo(o);--t>=0;)if(n.sqrTo(o,d),(e&1<<t)>0)n.mulTo(d,i,o);else{var u=o;o=d,d=u}return n.revert(o)}function R(e,n){var o;return o=256>e||n.isEven()?new C(n):new J(n),this.exp(e,o)}function S(){var e=p();return this.copyTo(e),e}function T(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function U(){return 0==this.t?this.s:this[0]<<24>>24}function V(){return 0==this.t?this.s:this[0]<<16>>16}function W(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function X(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function Y(e){if(null==e&&(e=10),0==this.signum()||2>e||e>36)return"0";var n=this.chunkSize(e),o=Math.pow(e,n),f=c(o),d=p(),i=p(),t="";for(this.divRemTo(f,d,i);d.signum()>0;)t=(o+i.intValue()).toString(e).substr(1)+t,d.divRemTo(f,d,i);return i.intValue().toString(e)+t}function Z(e,n){this.fromInt(0),null==n&&(n=10);for(var o=this.chunkSize(n),p=Math.pow(n,o),d=!1,i=0,u=0,l=0;l<e.length;++l){var c=t(e,l);0>c?"-"==e.charAt(l)&&0==this.signum()&&(d=!0):(u=n*u+c,++i>=o&&(this.dMultiply(p),this.dAddOffset(u,0),i=0,u=0))}i>0&&(this.dMultiply(Math.pow(n,i)),this.dAddOffset(u,0)),d&&f.ZERO.subTo(this,this)}function $(e,n,o){if("number"==typeof n)if(2>e)this.fromInt(1);else for(this.fromNumber(e,o),this.testBit(e-1)||this.bitwiseTo(f.ONE.shiftLeft(e-1),ie,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(f.ONE.shiftLeft(e-1),this);else{var p=new Array,d=7&e;p.length=(e>>3)+1,n.nextBytes(p),d>0?p[0]&=(1<<d)-1:p[0]=0,this.fromString(p,256)}}function _(){var e=this.t,n=new Array;n[0]=this.s;var o,f=this.DB-e*this.DB%8,p=0;if(e-->0)for(f<this.DB&&(o=this[e]>>f)!=(this.s&this.DM)>>f&&(n[p++]=o|this.s<<this.DB-f);e>=0;)8>f?(o=(this[e]&(1<<f)-1)<<8-f,o|=this[--e]>>(f+=this.DB-8)):(o=this[e]>>(f-=8)&255,0>=f&&(f+=this.DB,--e)),(p>0||o!=this.s)&&(n[p++]=o);return n}function ee(e){return 0==this.compareTo(e)}function ne(e){return this.compareTo(e)<0?this:e}function oe(e){return this.compareTo(e)>0?this:e}function fe(e,n,o){var f,p,d=Math.min(e.t,this.t);for(f=0;d>f;++f)o[f]=n(this[f],e[f]);if(e.t<this.t){for(p=e.s&this.DM,f=d;f<this.t;++f)o[f]=n(this[f],p);o.t=this.t}else{for(p=this.s&this.DM,f=d;f<e.t;++f)o[f]=n(p,e[f]);o.t=e.t}o.s=n(this.s,e.s),o.clamp()}function pe(e,n){return e&n}function de(e){var n=p();return this.bitwiseTo(e,pe,n),n}function ie(e,n){return e|n}function te(e){var n=p();return this.bitwiseTo(e,ie,n),n}function ue(e,n){return e^n}function le(e){var n=p();return this.bitwiseTo(e,ue,n),n}function ce(e,n){return e&~n}function ge(e){var n=p();return this.bitwiseTo(e,ce,n),n}function se(){for(var e=p(),n=0;n<this.t;++n)e[n]=this.DM&~this[n];return e.t=this.t,e.s=~this.s,e}function ye(e){var n=p();return 0>e?this.rShiftTo(-e,n):this.lShiftTo(e,n),n}function we(e){var n=p();return 0>e?this.lShiftTo(-e,n):this.rShiftTo(e,n),n}function ae(e){if(0==e)return-1;var n=0;return 0==(65535&e)&&(e>>=16,n+=16),0==(255&e)&&(e>>=8,n+=8),0==(15&e)&&(e>>=4,n+=4),0==(3&e)&&(e>>=2,n+=2),0==(1&e)&&++n,n}function be(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+ae(this[e]);return this.s<0?this.t*this.DB:-1}function re(e){for(var n=0;0!=e;)e&=e-1,++n;return n}function me(){for(var e=0,n=this.s&this.DM,o=0;o<this.t;++o)e+=re(this[o]^n);return e}function xe(e){var n=Math.floor(e/this.DB);return n>=this.t?0!=this.s:0!=(this[n]&1<<e%this.DB)}function je(e,n){var o=f.ONE.shiftLeft(e);return this.bitwiseTo(o,n,o),o}function he(e){return this.changeBit(e,ie)}function ke(e){return this.changeBit(e,ce)}function qe(e){return this.changeBit(e,ue)}function ve(e,n){for(var o=0,f=0,p=Math.min(e.t,this.t);p>o;)f+=this[o]+e[o],n[o++]=f&this.DM,f>>=this.DB;if(e.t<this.t){for(f+=e.s;o<this.t;)f+=this[o],n[o++]=f&this.DM,f>>=this.DB;f+=this.s}else{for(f+=this.s;o<e.t;)f+=e[o],n[o++]=f&this.DM,f>>=this.DB;f+=e.s}n.s=0>f?-1:0,f>0?n[o++]=f:-1>f&&(n[o++]=this.DV+f),n.t=o,n.clamp()}function ze(e){var n=p();return this.addTo(e,n),n}function Ae(e){var n=p();return this.subTo(e,n),n}function Be(e){var n=p();return this.multiplyTo(e,n),n}function Ce(){var e=p();return this.squareTo(e),e}function De(e){var n=p();return this.divRemTo(e,n,null),n}function Ee(e){var n=p();return this.divRemTo(e,null,n),n}function Fe(e){var n=p(),o=p();return this.divRemTo(e,n,o),new Array(n,o)}function Ge(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function He(e,n){if(0!=e){for(;this.t<=n;)this[this.t++]=0;for(this[n]+=e;this[n]>=this.DV;)this[n]-=this.DV,++n>=this.t&&(this[this.t++]=0),++this[n]}}function Ie(){}function Je(e){return e}function Ke(e,n,o){e.multiplyTo(n,o)}function Le(e,n){e.squareTo(n)}function Me(e){return this.exp(e,new Ie)}function Ne(e,n,o){var f=Math.min(this.t+e.t,n);for(o.s=0,o.t=f;f>0;)o[--f]=0;var p;for(p=o.t-this.t;p>f;++f)o[f+this.t]=this.am(0,e[f],o,f,0,this.t);for(p=Math.min(e.t,n);p>f;++f)this.am(0,e[f],o,f,0,n-f);o.clamp()}function Oe(e,n,o){--n;var f=o.t=this.t+e.t-n;for(o.s=0;--f>=0;)o[f]=0;for(f=Math.max(n-this.t,0);f<e.t;++f)o[this.t+f-n]=this.am(n-f,e[f],o,0,0,this.t+f-n);o.clamp(),o.drShiftTo(1,o)}function Pe(e){this.r2=p(),this.q3=p(),f.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Qe(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var n=p();return e.copyTo(n),this.reduce(n),n}function Re(e){return e}function Se(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Te(e,n){e.squareTo(n),this.reduce(n)}function Ue(e,n,o){e.multiplyTo(n,o),this.reduce(o)}function Ve(e,n){var o,f,d=e.bitLength(),i=c(1);if(0>=d)return i;o=18>d?1:48>d?3:144>d?4:768>d?5:6,f=8>d?new C(n):n.isEven()?new Pe(n):new J(n);var t=new Array,u=3,l=o-1,g=(1<<o)-1;if(t[1]=f.convert(this),o>1){var s=p();for(f.sqrTo(t[1],s);g>=u;)t[u]=p(),f.mulTo(s,t[u-2],t[u]),u+=2}var y,w,a=e.t-1,b=!0,m=p();for(d=r(e[a])-1;a>=0;){for(d>=l?y=e[a]>>d-l&g:(y=(e[a]&(1<<d+1)-1)<<l-d,a>0&&(y|=e[a-1]>>this.DB+d-l)),u=o;0==(1&y);)y>>=1,--u;if((d-=u)<0&&(d+=this.DB,--a),b)t[y].copyTo(i),b=!1;else{for(;u>1;)f.sqrTo(i,m),f.sqrTo(m,i),u-=2;u>0?f.sqrTo(i,m):(w=i,i=m,m=w),f.mulTo(m,t[y],i)}for(;a>=0&&0==(e[a]&1<<d);)f.sqrTo(i,m),w=i,i=m,m=w,--d<0&&(d=this.DB-1,--a)}return f.revert(i)}function We(e){var n=this.s<0?this.negate():this.clone(),o=e.s<0?e.negate():e.clone();if(n.compareTo(o)<0){var f=n;n=o,o=f}var p=n.getLowestSetBit(),d=o.getLowestSetBit();if(0>d)return n;for(d>p&&(d=p),d>0&&(n.rShiftTo(d,n),o.rShiftTo(d,o));n.signum()>0;)(p=n.getLowestSetBit())>0&&n.rShiftTo(p,n),(p=o.getLowestSetBit())>0&&o.rShiftTo(p,o),n.compareTo(o)>=0?(n.subTo(o,n),n.rShiftTo(1,n)):(o.subTo(n,o),o.rShiftTo(1,o));return d>0&&o.lShiftTo(d,o),o}function Xe(e){if(0>=e)return 0;var n=this.DV%e,o=this.s<0?e-1:0;if(this.t>0)if(0==n)o=this[0]%e;else for(var f=this.t-1;f>=0;--f)o=(n*o+this[f])%e;return o}function Ye(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return f.ZERO;for(var o=e.clone(),p=this.clone(),d=c(1),i=c(0),t=c(0),u=c(1);0!=o.signum();){for(;o.isEven();)o.rShiftTo(1,o),n?(d.isEven()&&i.isEven()||(d.addTo(this,d),i.subTo(e,i)),d.rShiftTo(1,d)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;p.isEven();)p.rShiftTo(1,p),n?(t.isEven()&&u.isEven()||(t.addTo(this,t),u.subTo(e,u)),t.rShiftTo(1,t)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);o.compareTo(p)>=0?(o.subTo(p,o),n&&d.subTo(t,d),i.subTo(u,i)):(p.subTo(o,p),n&&t.subTo(d,t),u.subTo(i,u))}return 0!=p.compareTo(f.ONE)?f.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u}function Ze(e){var n,o=this.abs();if(1==o.t&&o[0]<=un[un.length-1]){for(n=0;n<un.length;++n)if(o[0]==un[n])return!0;return!1}if(o.isEven())return!1;for(n=1;n<un.length;){for(var f=un[n],p=n+1;p<un.length&&ln>f;)f*=un[p++];for(f=o.modInt(f);p>n;)if(f%un[n++]==0)return!1}return o.millerRabin(e)}function r(e){var n,o=1;return 0!=(n=e>>>16)&&(e=n,o+=16),0!=(n=e>>8)&&(e=n,o+=8),0!=(n=e>>4)&&(e=n,o+=4),0!=(n=e>>2)&&(e=n,o+=2),0!=(n=e>>1)&&(e=n,o+=1),o}function $e(){var e=this.toByteArray(),n=8*(e.length-1)+r(e[0]),o="";return o+=String.fromCharCode((65280&n)>>8),o+=String.fromCharCode(255&n),o+=nn.bin2str(e)}function _e(e){var n=this.subtract(f.ONE),o=n.getLowestSetBit();if(0>=o)return!1;var d=n.shiftRight(o);e=e+1>>1,e>un.length&&(e=un.length);for(var i,t=p(),u=[],l=0;e>l;++l){for(;i=un[Math.floor(Math.random()*un.length)],-1!=u.indexOf(i););u.push(i),t.fromInt(i);var c=t.modPow(d,this);if(0!=c.compareTo(f.ONE)&&0!=c.compareTo(n)){for(var i=1;i++<o&&0!=c.compareTo(n);)if(c=c.modPowInt(2,this),0==c.compareTo(f.ONE))return!1;if(0!=c.compareTo(n))return!1}}return!0}var en,nn=e("../../util.js");f.prototype.am=d,en=26,f.prototype.DB=en,f.prototype.DM=(1<<en)-1,f.prototype.DV=1<<en;var on=52;f.prototype.FV=Math.pow(2,on),f.prototype.F1=on-en,f.prototype.F2=2*en-on;var fn,pn,dn="0123456789abcdefghijklmnopqrstuvwxyz",tn=new Array;for(fn="0".charCodeAt(0),pn=0;9>=pn;++pn)tn[fn++]=pn;for(fn="a".charCodeAt(0),pn=10;36>pn;++pn)tn[fn++]=pn;for(fn="A".charCodeAt(0),pn=10;36>pn;++pn)tn[fn++]=pn;C.prototype.convert=D,C.prototype.revert=E,C.prototype.reduce=F,C.prototype.mulTo=G,C.prototype.sqrTo=H,J.prototype.convert=K,J.prototype.revert=L,J.prototype.reduce=M,J.prototype.mulTo=O,J.prototype.sqrTo=N,f.prototype.copyTo=u,f.prototype.fromInt=l,f.prototype.fromString=g,f.prototype.clamp=s,f.prototype.dlShiftTo=x,f.prototype.drShiftTo=j,f.prototype.lShiftTo=h,f.prototype.rShiftTo=k,f.prototype.subTo=q,f.prototype.multiplyTo=v,f.prototype.squareTo=z,f.prototype.divRemTo=A,f.prototype.invDigit=I,f.prototype.isEven=P,f.prototype.exp=Q,f.prototype.toString=y,f.prototype.negate=w,f.prototype.abs=a,f.prototype.compareTo=b,f.prototype.bitLength=m,f.prototype.mod=B,f.prototype.modPowInt=R,f.ZERO=c(0),f.ONE=c(1),f.TWO=c(2),n.exports=f,Ie.prototype.convert=Je,Ie.prototype.revert=Je,Ie.prototype.mulTo=Ke,Ie.prototype.sqrTo=Le,Pe.prototype.convert=Qe,Pe.prototype.revert=Re,Pe.prototype.reduce=Se,Pe.prototype.mulTo=Ue,Pe.prototype.sqrTo=Te;var un=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ln=(1<<26)/un[un.length-1],f=e("./jsbn.js");f.prototype.chunkSize=W,f.prototype.toRadix=Y,f.prototype.fromRadix=Z,f.prototype.fromNumber=$,f.prototype.bitwiseTo=fe,f.prototype.changeBit=je,f.prototype.addTo=ve,f.prototype.dMultiply=Ge,f.prototype.dAddOffset=He,f.prototype.multiplyLowerTo=Ne,f.prototype.multiplyUpperTo=Oe,f.prototype.modInt=Xe,f.prototype.millerRabin=_e,f.prototype.clone=S,f.prototype.intValue=T,f.prototype.byteValue=U,f.prototype.shortValue=V,f.prototype.signum=X,f.prototype.toByteArray=_,f.prototype.equals=ee,f.prototype.min=ne,f.prototype.max=oe,f.prototype.and=de,f.prototype.or=te,f.prototype.xor=le,f.prototype.andNot=ge,f.prototype.not=se,f.prototype.shiftLeft=ye,f.prototype.shiftRight=we,f.prototype.getLowestSetBit=be,f.prototype.bitCount=me,f.prototype.testBit=xe,f.prototype.setBit=he,f.prototype.clearBit=ke,f.prototype.flipBit=qe,f.prototype.add=ze,f.prototype.subtract=Ae,f.prototype.multiply=Be,f.prototype.divide=De,f.prototype.remainder=Ee,f.prototype.divideAndRemainder=Fe,f.prototype.modPow=Ve,f.prototype.modInverse=Ye,f.prototype.pow=Me,f.prototype.gcd=We,f.prototype.isProbablePrime=Ze,f.prototype.toMPI=$e,f.prototype.square=Ce},{"../../util.js":74,"./jsbn.js":37}],38:[function(e,n,o){function f(){function e(e){for(var n=0;n<e.length;n++)e[n]=l.getSecureRandomOctet()}this.nextBytes=e}function p(e,n,o){return s=s.bitLength()===n.bitLength()?s.square().mod(n):l.getRandomBigIntegerInRange(t.TWO,n),g=s.modInverse(n).modPow(o,n),e.multiply(g).mod(n)}function d(e,n){return e.multiply(s).mod(n)}function i(){function e(e,n,o,f,i,l,g){c.rsa_blinding&&(e=p(e,n,o));var s=e.mod(i).modPow(f.mod(i.subtract(t.ONE)),i),y=e.mod(l).modPow(f.mod(l.subtract(t.ONE)),l);u.print_debug("rsa.js decrypt\nxpn:"+u.hexstrdump(s.toMPI())+"\nxqn:"+u.hexstrdump(y.toMPI()));var w=y.subtract(s);return 0===w[0]?(w=s.subtract(y),w=w.multiply(g).mod(l),w=l.subtract(w)):w=w.multiply(g).mod(l),w=w.multiply(i).add(s),c.rsa_blinding&&(w=d(w,n)),w}function n(e,n,o){return e.modPowInt(n,o)}function o(e,n,o){return e.modPow(n,o)}function i(e,n,o){return e.modPowInt(n,o)}function l(){this.n=null,this.e=0,this.ee=null,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.u=null}function g(e,n){function o(e){var n=i.exportKey("jwk",e.privateKey);return n instanceof Promise||(n=d(n,"Error exporting RSA key pair.")),n}function p(e){function o(e){var n=e.replace(/\-/g,"+").replace(/_/g,"/"),o=u.hexstrdump(atob(n));return new t(o,16)}var f=new l;return f.n=o(e.n),f.ee=new t(n,16),f.d=o(e.d),f.p=o(e.p),f.q=o(e.q),f.u=f.p.modInverse(f.q),f}function d(e,n){return new Promise(function(o,f){e.onerror=function(e){f(new Error(n))},e.oncomplete=function(e){o(e.target.result)}})}var i=u.getWebCrypto();if(i){var c,g,s=new Uint32Array([parseInt(n,16)]),y=new Uint8Array(s.buffer);return window.crypto&&window.crypto.webkitSubtle?(c={name:"RSA-OAEP",modulusLength:e,publicExponent:y.subarray(0,3)},g=i.generateKey(c,!0,["encrypt","decrypt"])):(c={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:y.subarray(0,3),hash:{name:"SHA-1"}},g=i.generateKey(c,!0,["sign","verify"]),g instanceof Promise||(g=d(g,"Error generating RSA key pair."))),g.then(o).then(function(e){return p(e instanceof ArrayBuffer?JSON.parse(String.fromCharCode.apply(null,new Uint8Array(e))):e)})}return new Promise(function(o){var p=new l,d=new f,i=e>>1;for(p.e=parseInt(n,16),p.ee=new t(n,16);;){for(;p.p=new t(e-i,1,d),0!==p.p.subtract(t.ONE).gcd(p.ee).compareTo(t.ONE)||!p.p.isProbablePrime(10););for(;p.q=new t(i,1,d),0!==p.q.subtract(t.ONE).gcd(p.ee).compareTo(t.ONE)||!p.q.isProbablePrime(10););if(p.p.compareTo(p.q)<=0){var u=p.p;p.p=p.q,p.q=u}var c=p.p.subtract(t.ONE),g=p.q.subtract(t.ONE),s=c.multiply(g);if(0===s.gcd(p.ee).compareTo(t.ONE)){p.n=p.p.multiply(p.q),p.d=p.ee.modInverse(s),p.dmp1=p.d.mod(c),p.dmq1=p.d.mod(g),p.u=p.p.modInverse(p.q);break}}o(p)})}this.encrypt=n,this.decrypt=e,this.verify=i,this.sign=o,this.generate=g,this.keyObject=l}var t=e("./jsbn.js"),u=e("../../util.js"),l=e("../random.js"),c=e("../../config"),g=t.ZERO,s=t.ZERO;n.exports=i},{"../../config":17,"../../util.js":74,"../random.js":39,"./jsbn.js":37}],39:[function(e,n,o){
function f(){this.buffer=null,this.size=null}var p=e("../type/mpi.js"),d=e("../util.js"),i=null;"undefined"==typeof window&&(i=e("crypto")),n.exports={getRandomBytes:function(e){for(var n=new Uint8Array(e),o=0;e>o;o++)n[o]=this.getSecureRandomOctet();return n},getSecureRandom:function(e,n){for(var o=this.getSecureRandomUint(),f=(n-e).toString(2).length;(o&Math.pow(2,f)-1)>n-e;)o=this.getSecureRandomUint();return e+Math.abs(o&Math.pow(2,f)-1)},getSecureRandomOctet:function(){var e=new Uint8Array(1);return this.getRandomValues(e),e[0]},getSecureRandomUint:function(){var e=new Uint8Array(4),n=new DataView(e.buffer);return this.getRandomValues(e),n.getUint32(0)},getRandomValues:function(e){if(!(e instanceof Uint8Array))throw new Error("Invalid type: buf not an Uint8Array");if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(e);else if("undefined"!=typeof window&&"object"==typeof window.msCrypto&&"function"==typeof window.msCrypto.getRandomValues)window.msCrypto.getRandomValues(e);else if(i){var n=i.randomBytes(e.length);e.set(n)}else{if(!this.randomBuffer.buffer)throw new Error("No secure random number generator available.");this.randomBuffer.get(e)}},getRandomBigInteger:function(e){if(1>e)throw new Error("Illegal parameter value: bits < 1");var n=Math.floor((e+7)/8),o=d.Uint8Array2str(this.getRandomBytes(n));e%8>0&&(o=String.fromCharCode(Math.pow(2,e%8)-1&o.charCodeAt(0))+o.substring(1));var f=new p;return f.fromBytes(o),f.toBigInteger()},getRandomBigIntegerInRange:function(e,n){if(n.compareTo(e)<=0)throw new Error("Illegal parameter value: max <= min");for(var o=n.subtract(e),f=this.getRandomBigInteger(o.bitLength());f.compareTo(o)>0;)f=this.getRandomBigInteger(o.bitLength());return e.add(f)},randomBuffer:new f},f.prototype.init=function(e){this.buffer=new Uint8Array(e),this.size=0},f.prototype.set=function(e){if(!this.buffer)throw new Error("RandomBuffer is not initialized");if(!(e instanceof Uint8Array))throw new Error("Invalid type: buf not an Uint8Array");var n=this.buffer.length-this.size;e.length>n&&(e=e.subarray(0,n)),this.buffer.set(e,this.size),this.size+=e.length},f.prototype.get=function(e){if(!this.buffer)throw new Error("RandomBuffer is not initialized");if(!(e instanceof Uint8Array))throw new Error("Invalid type: buf not an Uint8Array");if(this.size<e.length)throw new Error("Random number buffer depleted");for(var n=0;n<e.length;n++)e[n]=this.buffer[--this.size],this.buffer[this.size]=0}},{"../type/mpi.js":72,"../util.js":74,crypto:!1}],40:[function(e,n,o){var f=e("../util"),p=e("./public_key"),d=e("./pkcs1.js");e("./hash");n.exports={verify:function(e,n,o,i,t){switch(t=f.Uint8Array2str(t),e){case 1:case 2:case 3:var u=new p.rsa,l=i[0].toBigInteger(),c=i[0].byteLength(),g=i[1].toBigInteger(),s=o[0].toBigInteger(),y=u.verify(s,g,l),w=d.emsa.encode(n,t,c);return 0===y.compareTo(w);case 16:throw new Error("signing with Elgamal is not defined in the OpenPGP standard.");case 17:var a=new p.dsa,b=o[0].toBigInteger(),r=o[1].toBigInteger(),m=i[0].toBigInteger(),x=i[1].toBigInteger(),j=i[2].toBigInteger(),h=i[3].toBigInteger(),s=t,k=a.verify(n,b,r,s,m,x,j,h);return 0===k.compareTo(b);default:throw new Error("Invalid signature algorithm.")}},sign:function(e,n,o,i){i=f.Uint8Array2str(i);var t;switch(n){case 1:case 2:case 3:var u=new p.rsa,l=o[2].toBigInteger(),c=o[0].toBigInteger();return t=d.emsa.encode(e,i,o[0].byteLength()),f.str2Uint8Array(u.sign(t,l,c).toMPI());case 17:var g=new p.dsa,s=o[0].toBigInteger(),y=o[1].toBigInteger(),w=o[2].toBigInteger(),a=(o[3].toBigInteger(),o[4].toBigInteger());t=i;var b=g.sign(e,t,w,s,y,a);return f.str2Uint8Array(b[0].toString()+b[1].toString());case 16:throw new Error("Signing with Elgamal is not defined in the OpenPGP standard.");default:throw new Error("Invalid signature algorithm.")}}}},{"../util":74,"./hash":27,"./pkcs1.js":33,"./public_key":36}],41:[function(e,n,o){function f(e){var n=/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$\n/m,o=e.match(n);if(!o)throw new Error("Unknown ASCII armor type");return o[1].match(/MESSAGE, PART \d+\/\d+/)?w.armor.multipart_section:o[1].match(/MESSAGE, PART \d+/)?w.armor.multipart_last:o[1].match(/SIGNED MESSAGE/)?w.armor.signed:o[1].match(/MESSAGE/)?w.armor.message:o[1].match(/PUBLIC KEY BLOCK/)?w.armor.public_key:o[1].match(/PRIVATE KEY BLOCK/)?w.armor.private_key:void 0}function p(){var e="";return a.show_version&&(e+="Version: "+a.versionstring+"\r\n"),a.show_comment&&(e+="Comment: "+a.commentstring+"\r\n"),e+="\r\n"}function d(e){var n=t(e),o=new Uint8Array([n>>16,n>>8&255,255&n]);return y.encode(o)}function i(e,n){var o=d(e),f=n;return o[0]==f[0]&&o[1]==f[1]&&o[2]==f[2]&&o[3]==f[3]}function t(e){for(var n=11994318,o=0;e.length-o>16;)n=n<<8^b[255&(n>>16^e[o])],n=n<<8^b[255&(n>>16^e[o+1])],n=n<<8^b[255&(n>>16^e[o+2])],n=n<<8^b[255&(n>>16^e[o+3])],n=n<<8^b[255&(n>>16^e[o+4])],n=n<<8^b[255&(n>>16^e[o+5])],n=n<<8^b[255&(n>>16^e[o+6])],n=n<<8^b[255&(n>>16^e[o+7])],n=n<<8^b[255&(n>>16^e[o+8])],n=n<<8^b[255&(n>>16^e[o+9])],n=n<<8^b[255&(n>>16^e[o+10])],n=n<<8^b[255&(n>>16^e[o+11])],n=n<<8^b[255&(n>>16^e[o+12])],n=n<<8^b[255&(n>>16^e[o+13])],n=n<<8^b[255&(n>>16^e[o+14])],n=n<<8^b[255&(n>>16^e[o+15])],o+=16;for(var f=o;f<e.length;f++)n=n<<8^b[255&(n>>16^e[o++])];return 16777215&n}function u(e){var n=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*\n/m,o="",f=e,p=n.exec(e);if(null===p)throw new Error("Mandatory blank line missing between armor headers and armor data");return o=e.slice(0,p.index),f=e.slice(p.index+p[0].length),o=o.split("\n"),o.pop(),{headers:o,body:f}}function l(e){for(var n=0;n<e.length;n++)if(!e[n].match(/^(Version|Comment|MessageID|Hash|Charset): .+$/))throw new Error("Improperly formatted armor header: "+e[n])}function c(e){var n=/^=/m,o=e,f="",p=n.exec(e);return null!==p&&(o=e.slice(0,p.index),f=e.slice(p.index+1)),{body:o,checksum:f}}function g(e){var n=/^-----[^-]+-----$\n/m;e=e.replace(/[\t\r ]+\n/g,"\n");var o,p,t,g=f(e),s=e.split(n),w=1;if(e.search(n)!=s[0].length&&(w=0),2!=g){t=u(s[w]);var a=c(t.body);o={data:y.decode(a.body),headers:t.headers,type:g},p=a.checksum}else{t=u(s[w].replace(/^- /gm,""));var b=u(s[w+1].replace(/^- /gm,""));l(b.headers);var r=c(b.body);o={text:t.body.replace(/\n$/,"").replace(/\n/g,"\r\n"),data:y.decode(r.body),headers:t.headers,type:g},p=r.checksum}if(p=p.substr(0,4),!i(o.data,p))throw new Error("Ascii armor integrity check on message failed: '"+p+"' should be '"+d(o.data)+"'");return l(o.headers),o}function s(e,n,o,f){var i=[];switch(e){case w.armor.multipart_section:i.push("-----BEGIN PGP MESSAGE, PART "+o+"/"+f+"-----\r\n"),i.push(p()),i.push(y.encode(n)),i.push("\r\n="+d(n)+"\r\n"),i.push("-----END PGP MESSAGE, PART "+o+"/"+f+"-----\r\n");break;case w.armor.multipart_last:i.push("-----BEGIN PGP MESSAGE, PART "+o+"-----\r\n"),i.push(p()),i.push(y.encode(n)),i.push("\r\n="+d(n)+"\r\n"),i.push("-----END PGP MESSAGE, PART "+o+"-----\r\n");break;case w.armor.signed:i.push("\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\n"),i.push("Hash: "+n.hash+"\r\n\r\n"),i.push(n.text.replace(/\n-/g,"\n- -")),i.push("\r\n-----BEGIN PGP SIGNATURE-----\r\n"),i.push(p()),i.push(y.encode(n.data)),i.push("\r\n="+d(n.data)+"\r\n"),i.push("-----END PGP SIGNATURE-----\r\n");break;case w.armor.message:i.push("-----BEGIN PGP MESSAGE-----\r\n"),i.push(p()),i.push(y.encode(n)),i.push("\r\n="+d(n)+"\r\n"),i.push("-----END PGP MESSAGE-----\r\n");break;case w.armor.public_key:i.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n"),i.push(p()),i.push(y.encode(n)),i.push("\r\n="+d(n)+"\r\n"),i.push("-----END PGP PUBLIC KEY BLOCK-----\r\n\r\n");break;case w.armor.private_key:i.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n"),i.push(p()),i.push(y.encode(n)),i.push("\r\n="+d(n)+"\r\n"),i.push("-----END PGP PRIVATE KEY BLOCK-----\r\n")}return i.join("")}var y=e("./base64.js"),w=e("../enums.js"),a=e("../config"),b=[0,8801531,25875725,17603062,60024545,51751450,35206124,44007191,128024889,120049090,103502900,112007375,70412248,78916387,95990485,88014382,264588937,256049778,240098180,248108927,207005800,215016595,232553829,224014750,140824496,149062475,166599357,157832774,200747345,191980970,176028764,184266919,520933865,529177874,512099556,503334943,480196360,471432179,487973381,496217854,414011600,405478443,422020573,430033190,457094705,465107658,448029500,439496647,281648992,273666971,289622637,298124950,324696449,333198714,315665548,307683447,392699481,401494690,383961940,375687087,352057528,343782467,359738805,368533838,1041867730,1050668841,1066628831,1058355748,1032471859,1024199112,1006669886,1015471301,968368875,960392720,942864358,951368477,975946762,984451313,1000411399,992435708,836562267,828023200,810956886,818967725,844041146,852051777,868605623,860066380,914189410,922427545,938981743,930215316,904825475,896059e3,878993294,887231349,555053627,563297984,547333942,538569677,579245274,570480673,588005847,596249900,649392898,640860153,658384399,666397428,623318499,631331096,615366894,606833685,785398962,777416777,794487231,802989380,759421523,767923880,751374174,743392165,695319947,704115056,687564934,679289981,719477610,711202705,728272487,737067676,2083735460,2092239711,2109313705,2101337682,2141233477,2133257662,2116711496,2125215923,2073216669,2064943718,2048398224,2057199467,2013339772,2022141063,2039215473,2030942602,1945504045,1936737750,1920785440,1929023707,1885728716,1893966647,1911503553,1902736954,1951893524,1959904495,1977441561,1968902626,2009362165,2000822798,1984871416,1992881923,1665111629,1673124534,1656046400,1647513531,1621913772,1613380695,1629922721,1637935450,1688082292,1679317903,1695859321,1704103554,1728967061,1737211246,1720132760,1711368291,1828378820,1820103743,1836060105,1844855090,1869168165,1877963486,1860430632,1852155859,1801148925,1809650950,1792118e3,1784135691,1757986588,1750004711,1765960209,1774462698,1110107254,1118611597,1134571899,1126595968,1102643863,1094667884,1077139354,1085643617,1166763343,1158490548,1140961346,1149762745,1176011694,1184812885,1200772771,1192499800,1307552511,1298785796,1281720306,1289958153,1316768798,1325007077,1341561107,1332794856,1246636998,1254647613,1271201483,1262662192,1239272743,1230733788,1213667370,1221678289,1562785183,1570797924,1554833554,1546300521,1588974462,1580441477,1597965939,1605978760,1518843046,1510078557,1527603627,1535847760,1494504007,1502748348,1486784330,1478020017,1390639894,1382365165,1399434779,1408230112,1366334967,1375129868,1358579962,1350304769,1430452783,1438955220,1422405410,1414423513,1456544974,1448562741,1465633219,1474135352];n.exports={encode:s,decode:g}},{"../config":17,"../enums.js":43,"./base64.js":42}],42:[function(e,n,o){function f(e,n){var o,f,p,i=n?n:[],t=0,u=0,l=e.length;for(p=0;l>p;p++)f=e[p],0===u?(i.push(d.charAt(f>>2&63)),o=(3&f)<<4):1==u?(i.push(d.charAt(o|f>>4&15)),o=(15&f)<<2):2==u&&(i.push(d.charAt(o|f>>6&3)),t+=1,t%60===0&&i.push("\n"),i.push(d.charAt(63&f))),t+=1,t%60===0&&i.push("\n"),u+=1,3==u&&(u=0);return u>0&&(i.push(d.charAt(o)),t+=1,t%60===0&&i.push("\n"),i.push("="),t+=1),1==u&&(t%60===0&&i.push("\n"),i.push("=")),n?void 0:i.join("")}function p(e){var n,o,f=[],p=0,i=0,t=e.length;for(o=0;t>o;o++)n=d.indexOf(e.charAt(o)),n>=0&&(p&&f.push(i|n>>6-p&255),p=p+2&7,i=n<<p&255);return new Uint8Array(f)}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";n.exports={encode:f,decode:p}},{}],43:[function(e,n,o){"use strict";n.exports={s2k:{simple:0,salted:1,iterated:3,gnu:101},publicKey:{rsa_encrypt_sign:1,rsa_encrypt:2,rsa_sign:3,elgamal:16,dsa:17},symmetric:{plaintext:0,idea:1,tripledes:2,cast5:3,blowfish:4,aes128:7,aes192:8,aes256:9,twofish:10},compression:{uncompressed:0,zip:1,zlib:2,bzip2:3},hash:{md5:1,sha1:2,ripemd:3,sha256:8,sha384:9,sha512:10,sha224:11},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressed:8,symmetricallyEncrypted:9,marker:10,literal:11,trust:12,userid:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtected:18,modificationDetectionCode:19},literal:{binary:"b".charCodeAt(),text:"t".charCodeAt(),utf8:"u".charCodeAt()},signature:{binary:0,text:1,standalone:2,cert_generic:16,cert_persona:17,cert_casual:18,cert_positive:19,cert_revocation:48,subkey_binding:24,key_binding:25,key:31,key_revocation:32,subkey_revocation:40,timestamp:64,third_party:80},signatureSubpacket:{signature_creation_time:2,signature_expiration_time:3,exportable_certification:4,trust_signature:5,regular_expression:6,revocable:7,key_expiration_time:9,placeholder_backwards_compatibility:10,preferred_symmetric_algorithms:11,revocation_key:12,issuer:16,notation_data:20,preferred_hash_algorithms:21,preferred_compression_algorithms:22,key_server_preferences:23,preferred_key_server:24,primary_user_id:25,policy_uri:26,key_flags:27,signers_user_id:28,reason_for_revocation:29,features:30,signature_target:31,embedded_signature:32},keyFlags:{certify_keys:1,sign_data:2,encrypt_communication:4,encrypt_storage:8,split_private_key:16,authentication:32,shared_private_key:128},keyStatus:{invalid:0,expired:1,revoked:2,valid:3,no_self_cert:4},armor:{multipart_section:0,multipart_last:1,signed:2,message:3,public_key:4,private_key:5},write:function(e,n){if("number"==typeof n&&(n=this.read(e,n)),void 0!==e[n])return e[n];throw new Error("Invalid enum value.")},read:function(e,n){for(var o in e)if(e[o]==n)return o;throw new Error("Invalid enum value.")}}},{}],44:[function(e,n,o){"use strict";n.exports=e("./openpgp.js"),n.exports.key=e("./key.js"),n.exports.message=e("./message.js"),n.exports.cleartext=e("./cleartext.js"),n.exports.util=e("./util.js"),n.exports.packet=e("./packet"),n.exports.MPI=e("./type/mpi.js"),n.exports.S2K=e("./type/s2k.js"),n.exports.Keyid=e("./type/keyid.js"),n.exports.armor=e("./encoding/armor.js"),n.exports.enums=e("./enums.js"),n.exports.config=e("./config/config.js"),n.exports.crypto=e("./crypto"),n.exports.Keyring=e("./keyring"),n.exports.AsyncProxy=e("./worker/async_proxy.js")},{"./cleartext.js":12,"./config/config.js":16,"./crypto":32,"./encoding/armor.js":41,"./enums.js":43,"./key.js":45,"./keyring":46,"./message.js":49,"./openpgp.js":50,"./packet":53,"./type/keyid.js":71,"./type/mpi.js":72,"./type/s2k.js":73,"./util.js":74,"./worker/async_proxy.js":75}],45:[function(e,n,o){"use strict";function f(e){if(!(this instanceof f))return new f(e);if(this.primaryKey=null,this.revocationSignature=null,this.directSignatures=null,this.users=null,this.subKeys=null,this.packetlist2structure(e),!this.primaryKey||!this.users)throw new Error("Invalid key: need at least key and user ID packet")}function p(e,n){return e.algorithm!==w.read(w.publicKey,w.publicKey.dsa)&&e.algorithm!==w.read(w.publicKey,w.publicKey.rsa_sign)&&(!n.keyFlags||0!==(n.keyFlags[0]&w.keyFlags.encrypt_communication)||0!==(n.keyFlags[0]&w.keyFlags.encrypt_storage))}function d(e,n){return!(e.algorithm!=w.read(w.publicKey,w.publicKey.dsa)&&e.algorithm!=w.read(w.publicKey,w.publicKey.rsa_sign)&&e.algorithm!=w.read(w.publicKey,w.publicKey.rsa_encrypt_sign)||n.keyFlags&&0===(n.keyFlags[0]&w.keyFlags.sign_data))}function i(e,n){return 3==e.version&&0!==e.expirationTimeV3?new Date(e.created.getTime()+24*e.expirationTimeV3*3600*1e3):4==e.version&&n.keyNeverExpires===!1?new Date(e.created.getTime()+1e3*n.keyExpirationTime):null}function t(e,n,o,f){e=e[o],e&&(n[o]?e.forEach(function(e){e.isExpired()||f&&!f(e)||n[o].some(function(n){return r.equalsUint8Array(n.signature,e.signature)})||n[o].push(e)}):n[o]=e)}function u(e){return this instanceof u?(this.userId=e.tag==w.packet.userid?e:null,this.userAttribute=e.tag==w.packet.userAttribute?e:null,this.selfCertifications=null,this.otherCertifications=null,void(this.revocationCertifications=null)):new u(e)}function l(e){return this instanceof l?(this.subKey=e,this.bindingSignature=null,void(this.revocationSignature=null)):new l(e)}function c(e){var n={};n.keys=[];try{var o=a.decode(e);if(o.type!=w.armor.public_key&&o.type!=w.armor.private_key)throw new Error("Armored text not of type key");var p=new y.List;p.read(o.data);var d=p.indexOfTag(w.packet.publicKey,w.packet.secretKey);if(0===d.length)throw new Error("No key packet found in armored text");for(var i=0;i<d.length;i++){var t=p.slice(d[i],d[i+1]);try{var u=new f(t);n.keys.push(u)}catch(l){n.err=n.err||[],n.err.push(l)}}}catch(l){n.err=n.err||[],n.err.push(l)}return n}function g(e){function n(){return i=new y.SecretKey,i.algorithm=w.read(w.publicKey,e.keyType),i.generate(e.numBits)}function o(){return c=new y.SecretSubkey,c.algorithm=w.read(w.publicKey,e.keyType),c.generate(e.numBits)}function p(){return e.passphrase&&(i.encrypt(e.passphrase),c.encrypt(e.passphrase)),d=new y.List,t=new y.Userid,t.read(r.str2Uint8Array(e.userId)),u={},u.userid=t,u.key=i,l=new y.Signature,l.signatureType=w.signature.cert_generic,l.publicKeyAlgorithm=e.keyType,l.hashAlgorithm=b.prefer_hash_algorithm,l.keyFlags=[w.keyFlags.certify_keys|w.keyFlags.sign_data],l.preferredSymmetricAlgorithms=[],l.preferredSymmetricAlgorithms.push(w.symmetric.aes256),l.preferredSymmetricAlgorithms.push(w.symmetric.aes192),l.preferredSymmetricAlgorithms.push(w.symmetric.aes128),l.preferredSymmetricAlgorithms.push(w.symmetric.cast5),l.preferredSymmetricAlgorithms.push(w.symmetric.tripledes),l.preferredHashAlgorithms=[],l.preferredHashAlgorithms.push(w.hash.sha256),l.preferredHashAlgorithms.push(w.hash.sha1),l.preferredHashAlgorithms.push(w.hash.sha512),l.preferredCompressionAlgorithms=[],l.preferredCompressionAlgorithms.push(w.compression.zlib),l.preferredCompressionAlgorithms.push(w.compression.zip),b.integrity_protect&&(l.features=[],l.features.push(1)),l.sign(i,u),u={},u.key=i,u.bind=c,g=new y.Signature,g.signatureType=w.signature.subkey_binding,g.publicKeyAlgorithm=e.keyType,g.hashAlgorithm=b.prefer_hash_algorithm,g.keyFlags=[w.keyFlags.encrypt_communication|w.keyFlags.encrypt_storage],g.sign(i,u),d.push(i),d.push(t),d.push(l),d.push(c),d.push(g),e.unlocked||(i.clearPrivateMPIs(),c.clearPrivateMPIs()),new f(d)}var d,i,t,u,l,c,g;if(e.keyType=e.keyType||w.publicKey.rsa_encrypt_sign,e.keyType!==w.publicKey.rsa_encrypt_sign)throw new Error("Only RSA Encrypt or Sign supported");e.passphrase||(e.unlocked=!0);var s=n(),a=o();return Promise.all([s,a]).then(p)}function s(e){for(var n={},o=0;o<e.length;o++){var f=e[o].getPrimaryUser();if(!f||!f.selfCertificate.preferredSymmetricAlgorithms)return b.encryption_cipher;f.selfCertificate.preferredSymmetricAlgorithms.forEach(function(e,o){var f=n[e]||(n[e]={prio:0,count:0,algo:e});f.prio+=64>>o,f.count++})}var p={prio:0,algo:b.encryption_cipher};for(var d in n)try{d!==w.symmetric.plaintext&&d!==w.symmetric.idea&&w.read(w.symmetric,d)&&n[d].count===e.length&&n[d].prio>p.prio&&(p=n[d])}catch(i){}return p.algo}var y=e("./packet"),w=e("./enums.js"),a=e("./encoding/armor.js"),b=e("./config"),r=e("./util");f.prototype.packetlist2structure=function(e){for(var n,o,f,p=0;p<e.length;p++)switch(e[p].tag){case w.packet.publicKey:case w.packet.secretKey:this.primaryKey=e[p],o=this.primaryKey.getKeyId();break;case w.packet.userid:case w.packet.userAttribute:n=new u(e[p]),this.users||(this.users=[]),this.users.push(n);break;case w.packet.publicSubkey:case w.packet.secretSubkey:n=null,this.subKeys||(this.subKeys=[]),f=new l(e[p]),this.subKeys.push(f);break;case w.packet.signature:switch(e[p].signatureType){case w.signature.cert_generic:case w.signature.cert_persona:case w.signature.cert_casual:case w.signature.cert_positive:if(!n){r.print_debug("Dropping certification signatures without preceding user packet");continue}e[p].issuerKeyId.equals(o)?(n.selfCertifications||(n.selfCertifications=[]),n.selfCertifications.push(e[p])):(n.otherCertifications||(n.otherCertifications=[]),n.otherCertifications.push(e[p]));break;case w.signature.cert_revocation:n?(n.revocationCertifications||(n.revocationCertifications=[]),n.revocationCertifications.push(e[p])):(this.directSignatures||(this.directSignatures=[]),this.directSignatures.push(e[p]));break;case w.signature.key:this.directSignatures||(this.directSignatures=[]),this.directSignatures.push(e[p]);break;case w.signature.subkey_binding:if(!f){r.print_debug("Dropping subkey binding signature without preceding subkey packet");continue}f.bindingSignature=e[p];break;case w.signature.key_revocation:this.revocationSignature=e[p];break;case w.signature.subkey_revocation:if(!f){r.print_debug("Dropping subkey revocation signature without preceding subkey packet");continue}f.revocationSignature=e[p]}}},f.prototype.toPacketlist=function(){var e=new y.List;e.push(this.primaryKey),e.push(this.revocationSignature),e.concat(this.directSignatures);var n;for(n=0;n<this.users.length;n++)e.concat(this.users[n].toPacketlist());if(this.subKeys)for(n=0;n<this.subKeys.length;n++)e.concat(this.subKeys[n].toPacketlist());return e},f.prototype.getSubkeyPackets=function(){var e=[];if(this.subKeys)for(var n=0;n<this.subKeys.length;n++)e.push(this.subKeys[n].subKey);return e},f.prototype.getAllKeyPackets=function(){return[this.primaryKey].concat(this.getSubkeyPackets())},f.prototype.getKeyIds=function(){for(var e=[],n=this.getAllKeyPackets(),o=0;o<n.length;o++)e.push(n[o].getKeyId());return e},f.prototype.getKeyPacket=function(e){for(var n=this.getAllKeyPackets(),o=0;o<n.length;o++)for(var f=n[o].getKeyId(),p=0;p<e.length;p++)if(f.equals(e[p]))return n[o];return null},f.prototype.getUserIds=function(){for(var e=[],n=0;n<this.users.length;n++)this.users[n].userId&&e.push(r.Uint8Array2str(this.users[n].userId.write()));return e},f.prototype.isPublic=function(){return this.primaryKey.tag==w.packet.publicKey},f.prototype.isPrivate=function(){return this.primaryKey.tag==w.packet.secretKey},f.prototype.toPublic=function(){for(var e,n=new y.List,o=this.toPacketlist(),p=0;p<o.length;p++)switch(o[p].tag){case w.packet.secretKey:e=o[p].writePublicKey();var d=new y.PublicKey;d.read(e),n.push(d);break;case w.packet.secretSubkey:e=o[p].writePublicKey();var i=new y.PublicSubkey;i.read(e),n.push(i);break;default:n.push(o[p])}return new f(n)},f.prototype.armor=function(){var e=this.isPublic()?w.armor.public_key:w.armor.private_key;return a.encode(e,this.toPacketlist().write())},f.prototype.getSigningKeyPacket=function(e){var n=this.getPrimaryUser();if(n&&d(this.primaryKey,n.selfCertificate)&&(!e||this.primaryKey.getKeyId().equals(e)))return this.primaryKey;if(this.subKeys)for(var o=0;o<this.subKeys.length;o++)if(this.subKeys[o].isValidSigningKey(this.primaryKey)&&(!e||this.subKeys[o].subKey.getKeyId().equals(e)))return this.subKeys[o].subKey;return null},f.prototype.getPreferredHashAlgorithm=function(){var e=this.getPrimaryUser();return e&&e.selfCertificate.preferredHashAlgorithms?e.selfCertificate.preferredHashAlgorithms[0]:b.prefer_hash_algorithm},f.prototype.getEncryptionKeyPacket=function(){if(this.subKeys)for(var e=0;e<this.subKeys.length;e++)if(this.subKeys[e].isValidEncryptionKey(this.primaryKey))return this.subKeys[e].subKey;var n=this.getPrimaryUser();return n&&p(this.primaryKey,n.selfCertificate)?this.primaryKey:null},f.prototype.decrypt=function(e){if(!this.isPrivate())throw new Error("Nothing to decrypt in a public key");for(var n=this.getAllKeyPackets(),o=0;o<n.length;o++){var f=n[o].decrypt(e);if(!f)return!1}return!0},f.prototype.decryptKeyPacket=function(e,n){if(!this.isPrivate())throw new Error("Nothing to decrypt in a public key");for(var o=this.getAllKeyPackets(),f=0;f<o.length;f++)for(var p=o[f].getKeyId(),d=0;d<e.length;d++)if(p.equals(e[d])){var i=o[f].decrypt(n);if(!i)return!1}return!0},f.prototype.verifyPrimaryKey=function(){if(this.revocationSignature&&!this.revocationSignature.isExpired()&&(this.revocationSignature.verified||this.revocationSignature.verify(this.primaryKey,{key:this.primaryKey})))return w.keyStatus.revoked;if(3==this.primaryKey.version&&0!==this.primaryKey.expirationTimeV3&&Date.now()>this.primaryKey.created.getTime()+24*this.primaryKey.expirationTimeV3*3600*1e3)return w.keyStatus.expired;for(var e=!1,n=0;n<this.users.length;n++)this.users[n].userId&&this.users[n].selfCertifications&&(e=!0);if(!e)return w.keyStatus.no_self_cert;var o=this.getPrimaryUser();return o?4==this.primaryKey.version&&o.selfCertificate.keyNeverExpires===!1&&Date.now()>this.primaryKey.created.getTime()+1e3*o.selfCertificate.keyExpirationTime?w.keyStatus.expired:w.keyStatus.valid:w.keyStatus.invalid},f.prototype.getExpirationTime=function(){if(3==this.primaryKey.version)return i(this.primaryKey);if(4==this.primaryKey.version){var e=this.getPrimaryUser();return e?i(this.primaryKey,e.selfCertificate):null}},f.prototype.getPrimaryUser=function(){for(var e=[],n=0;n<this.users.length;n++)if(this.users[n].userId&&this.users[n].selfCertifications)for(var o=0;o<this.users[n].selfCertifications.length;o++)e.push({user:this.users[n],selfCertificate:this.users[n].selfCertifications[o]});e=e.sort(function(e,n){return e.selfCertificate.isPrimaryUserID>n.selfCertificate.isPrimaryUserID?-1:e.selfCertificate.isPrimaryUserID<n.selfCertificate.isPrimaryUserID?1:e.selfCertificate.created>n.selfCertificate.created?-1:e.selfCertificate.created<n.selfCertificate.created?1:0});for(var n=0;n<e.length;n++)if(e[n].user.isValidSelfCertificate(this.primaryKey,e[n].selfCertificate))return e[n];return null},f.prototype.update=function(e){var n=this;if(e.verifyPrimaryKey()!==w.keyStatus.invalid){if(this.primaryKey.getFingerprint()!==e.primaryKey.getFingerprint())throw new Error("Key update method: fingerprints of keys not equal");if(this.isPublic()&&e.isPrivate()){var o=(this.subKeys&&this.subKeys.length)===(e.subKeys&&e.subKeys.length)&&(!this.subKeys||this.subKeys.every(function(n){return e.subKeys.some(function(e){return n.subKey.getFingerprint()===e.subKey.getFingerprint()})}));if(!o)throw new Error("Cannot update public key with private key if subkey mismatch");this.primaryKey=e.primaryKey}this.revocationSignature||!e.revocationSignature||e.revocationSignature.isExpired()||!e.revocationSignature.verified&&!e.revocationSignature.verify(e.primaryKey,{key:e.primaryKey})||(this.revocationSignature=e.revocationSignature),t(e,this,"directSignatures"),e.users.forEach(function(e){for(var o=!1,f=0;f<n.users.length;f++)if(e.userId&&e.userId.userid===n.users[f].userId.userid||e.userAttribute&&e.userAttribute.equals(n.users[f].userAttribute)){n.users[f].update(e,n.primaryKey),o=!0;break}o||n.users.push(e)}),e.subKeys&&e.subKeys.forEach(function(e){for(var o=!1,f=0;f<n.subKeys.length;f++)if(e.subKey.getFingerprint()===n.subKeys[f].subKey.getFingerprint()){n.subKeys[f].update(e,n.primaryKey),o=!0;break}o||n.subKeys.push(e)})}},f.prototype.revoke=function(){},u.prototype.toPacketlist=function(){var e=new y.List;return e.push(this.userId||this.userAttribute),e.concat(this.revocationCertifications),e.concat(this.selfCertifications),e.concat(this.otherCertifications),e},u.prototype.isRevoked=function(e,n){if(this.revocationCertifications){var o=this;return this.revocationCertifications.some(function(f){return f.issuerKeyId.equals(e.issuerKeyId)&&!f.isExpired()&&(f.verified||f.verify(n,{userid:o.userId||o.userAttribute,key:n}))})}return!1},u.prototype.getValidSelfCertificate=function(e){if(!this.selfCertifications)return null;for(var n=this.selfCertifications.sort(function(e,n){return e=e.created,n=n.created,e>n?-1:n>e?1:0}),o=0;o<n.length;o++)if(this.isValidSelfCertificate(e,n[o]))return n[o];return null},u.prototype.isValidSelfCertificate=function(e,n){return this.isRevoked(n,e)?!1:n.isExpired()||!n.verified&&!n.verify(e,{userid:this.userId||this.userAttribute,key:e})?!1:!0},u.prototype.verify=function(e){if(!this.selfCertifications)return w.keyStatus.no_self_cert;for(var n,o=0;o<this.selfCertifications.length;o++)if(this.isRevoked(this.selfCertifications[o],e))n=w.keyStatus.revoked;else if(this.selfCertifications[o].verified||this.selfCertifications[o].verify(e,{userid:this.userId||this.userAttribute,key:e})){if(!this.selfCertifications[o].isExpired()){n=w.keyStatus.valid;break}n=w.keyStatus.expired}else n=w.keyStatus.invalid;return n},u.prototype.update=function(e,n){var o=this;t(e,this,"selfCertifications",function(e){return e.verified||e.verify(n,{userid:o.userId||o.userAttribute,key:n})}),t(e,this,"otherCertifications"),t(e,this,"revocationCertifications")},l.prototype.toPacketlist=function(){var e=new y.List;return e.push(this.subKey),e.push(this.revocationSignature),e.push(this.bindingSignature),e},l.prototype.isValidEncryptionKey=function(e){return this.verify(e)==w.keyStatus.valid&&p(this.subKey,this.bindingSignature)},l.prototype.isValidSigningKey=function(e){return this.verify(e)==w.keyStatus.valid&&d(this.subKey,this.bindingSignature)},l.prototype.verify=function(e){return this.revocationSignature&&!this.revocationSignature.isExpired()&&(this.revocationSignature.verified||this.revocationSignature.verify(e,{key:e,bind:this.subKey}))?w.keyStatus.revoked:3==this.subKey.version&&0!==this.subKey.expirationTimeV3&&Date.now()>this.subKey.created.getTime()+24*this.subKey.expirationTimeV3*3600*1e3?w.keyStatus.expired:this.bindingSignature?this.bindingSignature.isExpired()?w.keyStatus.expired:this.bindingSignature.verified||this.bindingSignature.verify(e,{key:e,bind:this.subKey})?4==this.subKey.version&&this.bindingSignature.keyNeverExpires===!1&&Date.now()>this.subKey.created.getTime()+1e3*this.bindingSignature.keyExpirationTime?w.keyStatus.expired:w.keyStatus.valid:w.keyStatus.invalid:w.keyStatus.invalid},l.prototype.getExpirationTime=function(){return i(this.subKey,this.bindingSignature)},l.prototype.update=function(e,n){if(e.verify(n)!==w.keyStatus.invalid){if(this.subKey.getFingerprint()!==e.subKey.getFingerprint())throw new Error("SubKey update method: fingerprints of subkeys not equal");this.subKey.tag===w.packet.publicSubkey&&e.subKey.tag===w.packet.secretSubkey&&(this.subKey=e.subKey),!this.bindingSignature&&e.bindingSignature&&(e.bindingSignature.verified||e.bindingSignature.verify(n,{key:n,bind:this.subKey}))&&(this.bindingSignature=e.bindingSignature),this.revocationSignature||!e.revocationSignature||e.revocationSignature.isExpired()||!e.revocationSignature.verified&&!e.revocationSignature.verify(n,{key:n,bind:this.subKey})||(this.revocationSignature=e.revocationSignature)}},o.Key=f,o.readArmored=c,o.generate=g,o.getPreferredSymAlgo=s},{"./config":17,"./encoding/armor.js":41,"./enums.js":43,"./packet":53,"./util":74}],46:[function(e,n,o){n.exports=e("./keyring.js"),n.exports.localstore=e("./localstore.js")},{"./keyring.js":47,"./localstore.js":48}],47:[function(e,n,o){function f(n){this.storeHandler=n||new(e("./localstore.js")),this.publicKeys=new p(this.storeHandler.loadPublic()),this.privateKeys=new p(this.storeHandler.loadPrivate())}function p(e){this.keys=e}function d(e,n){e=e.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");for(var o=new RegExp("<"+e+">"),f=n.getUserIds(),p=0;p<f.length;p++)if(o.test(f[p].toLowerCase()))return!0;return!1}function i(e,n){return 16===e.length?e===n.getKeyId().toHex():e===n.getFingerprint()}var t=(e("../enums.js"),e("../key.js"));e("../util.js");n.exports=f,f.prototype.store=function(){this.storeHandler.storePublic(this.publicKeys.keys),this.storeHandler.storePrivate(this.privateKeys.keys)},f.prototype.clear=function(){this.publicKeys.keys=[],this.privateKeys.keys=[]},f.prototype.getKeysForId=function(e,n){var o=[];return o=o.concat(this.publicKeys.getForId(e,n)||[]),o=o.concat(this.privateKeys.getForId(e,n)||[]),o.length?o:null},f.prototype.removeKeysForId=function(e){var n=[];return n=n.concat(this.publicKeys.removeForId(e)||[]),n=n.concat(this.privateKeys.removeForId(e)||[]),n.length?n:null},f.prototype.getAllKeys=function(){return this.publicKeys.keys.concat(this.privateKeys.keys)},p.prototype.getForAddress=function(e){for(var n=[],o=0;o<this.keys.length;o++)d(e,this.keys[o])&&n.push(this.keys[o]);return n},p.prototype.getForId=function(e,n){for(var o=0;o<this.keys.length;o++){
if(i(e,this.keys[o].primaryKey))return this.keys[o];if(n&&this.keys[o].subKeys)for(var f=0;f<this.keys[o].subKeys.length;f++)if(i(e,this.keys[o].subKeys[f].subKey))return this.keys[o]}return null},p.prototype.importKey=function(e){var n=t.readArmored(e),o=this;return n.keys.forEach(function(e){var n=e.primaryKey.getKeyId().toHex(),f=o.getForId(n);f?f.update(e):o.push(e)}),n.err?n.err:null},p.prototype.push=function(e){return this.keys.push(e)},p.prototype.removeForId=function(e){for(var n=0;n<this.keys.length;n++)if(i(e,this.keys[n].primaryKey))return this.keys.splice(n,1)[0];return null}},{"../enums.js":43,"../key.js":45,"../util.js":74,"./localstore.js":48}],48:[function(e,n,o){function f(n){n=n||"openpgp-",this.publicKeysItem=n+this.publicKeysItem,this.privateKeysItem=n+this.privateKeysItem,"undefined"!=typeof window&&window.localStorage?this.storage=window.localStorage:this.storage=new(e("node-localstorage").LocalStorage)(i.node_store)}function p(e,n){var o=JSON.parse(e.getItem(n)),f=[];if(null!==o&&0!==o.length)for(var p,d=0;d<o.length;d++)p=t.readArmored(o[d]),p.err?u.print_debug("Error reading armored key from keyring index: "+d):f.push(p.keys[0]);return f}function d(e,n,o){for(var f=[],p=0;p<o.length;p++)f.push(o[p].armor());e.setItem(n,JSON.stringify(f))}n.exports=f;var i=e("../config"),t=e("../key.js"),u=e("../util.js");f.prototype.publicKeysItem="public-keys",f.prototype.privateKeysItem="private-keys",f.prototype.loadPublic=function(){return p(this.storage,this.publicKeysItem)},f.prototype.loadPrivate=function(){return p(this.storage,this.privateKeysItem)},f.prototype.storePublic=function(e){d(this.storage,this.publicKeysItem,e)},f.prototype.storePrivate=function(e){d(this.storage,this.privateKeysItem,e)}},{"../config":17,"../key.js":45,"../util.js":74,"node-localstorage":!1}],49:[function(e,n,o){"use strict";function f(e){return this instanceof f?void(this.packets=e||new g.List):new f(e)}function p(e,n,o,p){o&&!Array.prototype.isPrototypeOf(o)&&(o=[o]),p&&!Array.prototype.isPrototypeOf(p)&&(p=[p]);var d=new g.List;return o&&o.forEach(function(o){var f=o.getEncryptionKeyPacket();if(!f)throw new Error("Could not find valid key packet for encryption in key "+o.primaryKey.getKeyId().toHex());var p=new g.PublicKeyEncryptedSessionKey;p.publicKeyId=f.getKeyId(),p.publicKeyAlgorithm=f.algorithm,p.sessionKey=e,p.sessionKeyAlgorithm=n,p.encrypt(f),d.push(p)}),p&&p.forEach(function(o){var f=new g.SymEncryptedSessionKey;f.sessionKey=e,f.sessionKeyAlgorithm=n,f.encrypt(o),d.push(f)}),new f(d)}function d(e){var n=y.decode(e).data;return i(n)}function i(e){var n=new g.List;n.read(e);var o=new f(n);return o}function t(e,n){var o=new g.Literal;o.setBytes(c.str2Uint8Array(e),s.read(s.literal,s.literal.binary));var p=new g.List;p.push(o);var d=y.decode(n).data;p.read(d);var i=new f(p);return i}function u(e,n){var o=new g.Literal;o.setText(e),void 0!==n&&o.setFilename(n);var p=new g.List;p.push(o);var d=new f(p);return d}function l(e,n){if(!Uint8Array.prototype.isPrototypeOf(e))throw new Error("Data must be in the form of a Uint8Array");var o=new g.Literal;o.setBytes(e,s.read(s.literal,s.literal.binary)),void 0!==n&&o.setFilename(n);var p=new g.List;p.push(o);var d=new f(p);return d}var c=e("./util.js"),g=e("./packet"),s=e("./enums.js"),y=e("./encoding/armor.js"),w=e("./config"),a=e("./crypto"),b=e("./key.js");f.prototype.getEncryptionKeyIds=function(){var e=[],n=this.packets.filterByTag(s.packet.publicKeyEncryptedSessionKey);return n.forEach(function(n){e.push(n.publicKeyId)}),e},f.prototype.getSigningKeyIds=function(){var e=[],n=this.unwrapCompressed(),o=n.packets.filterByTag(s.packet.onePassSignature);if(o.forEach(function(n){e.push(n.signingKeyId)}),!e.length){var f=n.packets.filterByTag(s.packet.signature);f.forEach(function(n){e.push(n.issuerKeyId)})}return e},f.prototype.decrypt=function(e,n){var o;if(o=n?{key:e,algo:n}:this.decryptSessionKey(e)){var p=this.packets.filterByTag(s.packet.symmetricallyEncrypted,s.packet.symEncryptedIntegrityProtected);if(0!==p.length){var d=p[0];d.decrypt(o.algo,o.key);var i=new f(d.packets);return d.packets=new g.List,i}}},f.prototype.decryptSessionKey=function(e){var n;if(String.prototype.isPrototypeOf(e)||"string"==typeof e){for(var o=this.packets.filterByTag(s.packet.symEncryptedSessionKey),f=o.length,p=0;f>p;p++){n=o[p];try{n.decrypt(e);break}catch(d){if(p===f-1)throw d}}if(!n)throw new Error("No symmetrically encrypted session key packet found.")}else{var i=this.getEncryptionKeyIds();if(!i.length)return this;var t=e.getKeyPacket(i);if(!t.isDecrypted)throw new Error("Private key is not decrypted.");for(var u=this.packets.filterByTag(s.packet.publicKeyEncryptedSessionKey),p=0;p<u.length;p++)if(u[p].publicKeyId.equals(t.getKeyId())){n=u[p],n.decrypt(t);break}}return n?{key:n.sessionKey,algo:n.sessionKeyAlgorithm}:void 0},f.prototype.getLiteralData=function(){var e=this.packets.findPacket(s.packet.literal);return e&&e.data||null},f.prototype.getFilename=function(){var e=this.packets.findPacket(s.packet.literal);return e&&e.getFilename()||null},f.prototype.getText=function(){var e=this.packets.findPacket(s.packet.literal);return e?e.getText():null},f.prototype.encrypt=function(e,n){var o;if(e)o=b.getPreferredSymAlgo(e);else{if(!n)throw new Error("No keys or passwords");o=w.encryption_cipher}var f,d=a.generateSessionKey(s.read(s.symmetric,o)),i=p(d,s.read(s.symmetric,o),e,n),t=i.packets;return f=w.integrity_protect?new g.SymEncryptedIntegrityProtected:new g.SymmetricallyEncrypted,f.packets=this.packets,f.encrypt(s.read(s.symmetric,o),d),t.push(f),f.packets=new g.List,i},f.prototype.symEncrypt=function(e){if(!e)throw new Error("The passphrase cannot be empty!");var n=s.read(s.symmetric,w.encryption_cipher),o=new g.List,p=new g.SymEncryptedSessionKey;p.sessionKeyAlgorithm=n,p.decrypt(e),o.push(p);var d=new g.SymEncryptedIntegrityProtected;return d.packets=this.packets,d.encrypt(n,p.sessionKey),o.push(d),d.packets=new g.List,new f(o)},f.prototype.symDecrypt=function(e){var n=this.packets.filterByTag(s.packet.symEncryptedSessionKey,s.packet.symEncryptedIntegrityProtected),o=n[0];o.decrypt(e);var p=n[1];p.decrypt(o.sessionKeyAlgorithm,o.sessionKey);var d=new f(p.packets);return p.packets=new g.List,d},f.prototype.sign=function(e){var n=new g.List,o=this.packets.findPacket(s.packet.literal);if(!o)throw new Error("No literal data packet to sign.");var p,d=s.write(s.literal,o.format),i=d==s.literal.binary?s.signature.binary:s.signature.text;for(p=0;p<e.length;p++){if(e[p].isPublic())throw new Error("Need private key for signing");var t=new g.OnePassSignature;t.type=i,t.hashAlgorithm=w.prefer_hash_algorithm;var u=e[p].getSigningKeyPacket();if(!u)throw new Error("Could not find valid key packet for signing in key "+e[p].primaryKey.getKeyId().toHex());t.publicKeyAlgorithm=u.algorithm,t.signingKeyId=u.getKeyId(),n.push(t)}for(n.push(o),p=e.length-1;p>=0;p--){var l=new g.Signature;if(l.signatureType=i,l.hashAlgorithm=w.prefer_hash_algorithm,l.publicKeyAlgorithm=u.algorithm,!u.isDecrypted)throw new Error("Private key is not decrypted.");l.sign(u,o),n.push(l)}return new f(n)},f.prototype.verify=function(e){var n=[],o=this.unwrapCompressed(),f=o.packets.filterByTag(s.packet.literal);if(1!==f.length)throw new Error("Can only verify message with one literal data packet.");for(var p=o.packets.filterByTag(s.packet.signature),d=0;d<p.length;d++){for(var i=null,t=0;t<e.length&&!(i=e[t].getSigningKeyPacket(p[d].issuerKeyId));t++);var u={};i?(u.keyid=p[d].issuerKeyId,u.valid=p[d].verify(i,f[0])):(u.keyid=p[d].issuerKeyId,u.valid=null),n.push(u)}return n},f.prototype.unwrapCompressed=function(){var e=this.packets.filterByTag(s.packet.compressed);return e.length?new f(e[0].packets):this},f.prototype.armor=function(){return y.encode(s.armor.message,this.packets.write())},o.Message=f,o.read=i,o.readArmored=d,o.readSignedContent=t,o.fromText=u,o.fromBinary=l,o.encryptSessionKey=p},{"./config":17,"./crypto":32,"./encoding/armor.js":41,"./enums.js":43,"./key.js":45,"./packet":53,"./util.js":74}],50:[function(e,n,o){"use strict";function f(e,n){return n&&n.worker||"undefined"!=typeof window&&window.Worker?(n=n||{},n.config=this.config,q=new k(e,n),!0):!1}function p(){return q}function d(e,n,o,f){if(q)return q.encryptMessage(e,n,o,f);var p,d;return f&&(p=f.filename,d=f.packets),w(function(){var f;if(f=n instanceof Uint8Array?m.fromBinary(n,p):m.fromText(n,p),f=f.encrypt(e,o),d){var i=f.packets.indexOfTag(r.packet.symmetricallyEncrypted,r.packet.symEncryptedIntegrityProtected)[0],t={keys:f.packets.slice(0,i).write(),data:f.packets.slice(i,f.packets.length).write()};return t}return b.encode(r.armor.message,f.packets.write())},"Error encrypting message!")}function i(e,n,o,f){return q?q.encryptSessionKey(e,n,o,f):w(function(){var p=m.encryptSessionKey(e,n,o,f);return p.packets.write()},"Error encrypting session key!")}function t(e,n,o){return e.length||(e=[e]),q?q.signAndEncryptMessage(e,n,o):w(function(){var f,p;return f=m.fromText(o),f=f.sign([n]),f=f.encrypt(e),p=b.encode(r.armor.message,f.packets.write())},"Error signing and encrypting message!")}function u(e,n,o){if(q)return q.decryptMessage(e,n,o);var f,p;return o&&(f=o.binary,p=o.sessionKeyAlgorithm),w(function(){if(n=n.decrypt(e,p),f){var o={data:n.getLiteralData(),filename:n.getFilename()};return o}return n.getText()},"Error decrypting message!")}function l(e,n){return q?q.decryptSessionKey(e,n):w(function(){var o=n.decryptSessionKey(e);return o},"Error decrypting session key!")}function c(e,n,o){return n.length||(n=[n]),q?q.decryptAndVerifyMessage(e,n,o):w(function(){var f={};return o=o.decrypt(e),f.text=o.getText(),f.text?(f.signatures=o.verify(n),f):null},"Error decrypting and verifying message!")}function g(e,n){return e.length||(e=[e]),q?q.signClearMessage(e,n):w(function(){var o=new x.CleartextMessage(n);return o.sign(e),o.armor()},"Error signing cleartext message!")}function s(e,n){return e.length||(e=[e]),q?q.verifyClearSignedMessage(e,n):w(function(){var o={};if(!(n instanceof x.CleartextMessage))throw new Error("Parameter [message] needs to be of type CleartextMessage.");return o.text=n.getText(),o.signatures=n.verify(e),o},"Error verifying cleartext signed message!")}function y(e){return!h.getWebCrypto()&&q?q.generateKeyPair(e):j.generate(e).then(function(e){var n={};return n.key=e,n.privateKeyArmored=e.armor(),n.publicKeyArmored=e.toPublic().armor(),n})["catch"](function(n){if(console.error(n),!h.getWebCrypto())throw new Error("Error generating keypair using js fallback!");return console.log("Error generating keypair using native WebCrypto... falling back back to js!"),q.generateKeyPair(e)})["catch"](a.bind(null,"Error generating keypair!"))}function w(e,n){var o=new Promise(function(n){var o=e();n(o)});return o["catch"](a.bind(null,n))}function a(e,n){throw console.error(n.stack),new Error(e)}var b=e("./encoding/armor.js"),r=e("./enums.js"),m=e("./message.js"),x=e("./cleartext.js"),j=e("./key.js"),h=e("./util"),k=e("./worker/async_proxy.js");"undefined"==typeof Promise&&e("es6-promise").polyfill();var q=null;o.initWorker=f,o.getWorker=p,o.encryptMessage=d,o.encryptSessionKey=i,o.signAndEncryptMessage=t,o.decryptMessage=u,o.decryptSessionKey=l,o.decryptAndVerifyMessage=c,o.signClearMessage=g,o.verifyClearSignedMessage=s,o.generateKeyPair=y},{"./cleartext.js":12,"./encoding/armor.js":41,"./enums.js":43,"./key.js":45,"./message.js":49,"./util":74,"./worker/async_proxy.js":75,"es6-promise":1}],51:[function(e,n,o){function f(e){return e.substr(0,1).toUpperCase()+e.substr(1)}var p=e("../enums.js");n.exports={Compressed:e("./compressed.js"),SymEncryptedIntegrityProtected:e("./sym_encrypted_integrity_protected.js"),PublicKeyEncryptedSessionKey:e("./public_key_encrypted_session_key.js"),SymEncryptedSessionKey:e("./sym_encrypted_session_key.js"),Literal:e("./literal.js"),PublicKey:e("./public_key.js"),SymmetricallyEncrypted:e("./symmetrically_encrypted.js"),Marker:e("./marker.js"),PublicSubkey:e("./public_subkey.js"),UserAttribute:e("./user_attribute.js"),OnePassSignature:e("./one_pass_signature.js"),SecretKey:e("./secret_key.js"),Userid:e("./userid.js"),SecretSubkey:e("./secret_subkey.js"),Signature:e("./signature.js"),Trust:e("./trust.js"),newPacketFromTag:function(e){return new(this[f(e)])},fromStructuredClone:function(e){var n=p.read(p.packet,e.tag),o=this.newPacketFromTag(n);for(var f in e)e.hasOwnProperty(f)&&(o[f]=e[f]);return o.postCloneTypeFix&&o.postCloneTypeFix(),o}}},{"../enums.js":43,"./compressed.js":52,"./literal.js":54,"./marker.js":55,"./one_pass_signature.js":56,"./public_key.js":59,"./public_key_encrypted_session_key.js":60,"./public_subkey.js":61,"./secret_key.js":62,"./secret_subkey.js":63,"./signature.js":64,"./sym_encrypted_integrity_protected.js":65,"./sym_encrypted_session_key.js":66,"./symmetrically_encrypted.js":67,"./trust.js":68,"./user_attribute.js":69,"./userid.js":70}],52:[function(e,n,o){function f(){this.tag=p.packet.compressed,this.packets=null,this.algorithm="zip",this.compressed=null}n.exports=f;var p=e("../enums.js"),d=e("../util.js"),i=e("../compression/zlib.min.js"),t=e("../compression/rawinflate.min.js"),u=e("../compression/rawdeflate.min.js");f.prototype.read=function(e){this.algorithm=p.read(p.compression,e[0]),this.compressed=e.subarray(1,e.length),this.decompress()},f.prototype.write=function(){return null===this.compressed&&this.compress(),d.concatUint8Array(new Uint8Array([p.write(p.compression,this.algorithm)]),this.compressed)},f.prototype.decompress=function(){var e;switch(this.algorithm){case"uncompressed":e=this.compressed;break;case"zip":var n=new t.Zlib.RawInflate(this.compressed);e=n.decompress();break;case"zlib":var n=new i.Zlib.Inflate(this.compressed);e=n.decompress();break;case"bzip2":throw new Error("Compression algorithm BZip2 [BZ2] is not implemented.");default:throw new Error("Compression algorithm unknown :"+this.alogrithm)}this.packets.read(e)},f.prototype.compress=function(){var e,n;switch(e=this.packets.write(),this.algorithm){case"uncompressed":this.compressed=e;break;case"zip":n=new u.Zlib.RawDeflate(e),this.compressed=n.compress();break;case"zlib":n=new i.Zlib.Deflate(e),this.compressed=n.compress();break;case"bzip2":throw new Error("Compression algorithm BZip2 [BZ2] is not implemented.");default:throw new Error("Compression algorithm unknown :"+this.type)}}},{"../compression/rawdeflate.min.js":13,"../compression/rawinflate.min.js":14,"../compression/zlib.min.js":15,"../enums.js":43,"../util.js":74}],53:[function(e,n,o){e("../enums.js");n.exports={List:e("./packetlist.js")};var f=e("./all_packets.js");for(var p in f)n.exports[p]=f[p]},{"../enums.js":43,"./all_packets.js":51,"./packetlist.js":58}],54:[function(e,n,o){function f(){this.tag=d.packet.literal,this.format="utf8",this.date=new Date,this.data=new Uint8Array(0),this.filename="msg.txt"}n.exports=f;var p=e("../util.js"),d=e("../enums.js");f.prototype.setText=function(e){e=e.replace(/\r/g,"").replace(/\n/g,"\r\n"),this.data="utf8"==this.format?p.str2Uint8Array(p.encode_utf8(e)):p.str2Uint8Array(e)},f.prototype.getText=function(){var e=p.decode_utf8(p.Uint8Array2str(this.data));return e.replace(/\r\n/g,"\n")},f.prototype.setBytes=function(e,n){this.format=n,this.data=e},f.prototype.getBytes=function(){return this.data},f.prototype.setFilename=function(e){this.filename=e},f.prototype.getFilename=function(){return this.filename},f.prototype.read=function(e){var n=d.read(d.literal,e[0]),o=e[1];this.filename=p.decode_utf8(p.Uint8Array2str(e.subarray(2,2+o))),this.date=p.readDate(e.subarray(2+o,2+o+4));var f=e.subarray(6+o,e.length);this.setBytes(f,n)},f.prototype.write=function(){var e=p.str2Uint8Array(p.encode_utf8(this.filename)),n=new Uint8Array([e.length]),o=new Uint8Array([d.write(d.literal,this.format)]),f=p.writeDate(this.date),i=this.getBytes();return p.concatUint8Array([o,n,e,f,i])}},{"../enums.js":43,"../util.js":74}],55:[function(e,n,o){function f(){this.tag=p.packet.marker}n.exports=f;var p=e("../enums.js");f.prototype.read=function(e){return 80==e[0]&&71==e[1]&&80==e[2]?!0:!1}},{"../enums.js":43}],56:[function(e,n,o){function f(){this.tag=d.packet.onePassSignature,this.version=null,this.type=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signingKeyId=null,this.flags=null}n.exports=f;var p=e("../util.js"),d=e("../enums.js"),i=e("../type/keyid.js");f.prototype.read=function(e){var n=0;return this.version=e[n++],this.type=d.read(d.signature,e[n++]),this.hashAlgorithm=d.read(d.hash,e[n++]),this.publicKeyAlgorithm=d.read(d.publicKey,e[n++]),this.signingKeyId=new i,this.signingKeyId.read(e.subarray(n,n+8)),n+=8,this.flags=e[n++],this},f.prototype.write=function(){var e=new Uint8Array([3,d.write(d.signature,this.type),d.write(d.hash,this.hashAlgorithm),d.write(d.publicKey,this.publicKeyAlgorithm)]),n=new Uint8Array([this.flags]);return p.concatUint8Array([e,this.signingKeyId.write(),n])},f.prototype.postCloneTypeFix=function(){this.signingKeyId=i.fromClone(this.signingKeyId)}},{"../enums.js":43,"../type/keyid.js":71,"../util.js":74}],57:[function(e,n,o){var f=(e("../enums.js"),e("../util.js"));n.exports={readSimpleLength:function(e){var n,o=0,p=e[0];return 192>p?(o=e[0],n=1):255>p?(o=(e[0]-192<<8)+e[1]+192,n=2):255==p&&(o=f.readNumber(e.subarray(1,5)),n=5),{len:o,offset:n}},writeSimpleLength:function(e){return 192>e?new Uint8Array([e]):e>191&&8384>e?new Uint8Array([(e-192>>8)+192,e-192&255]):f.concatUint8Array([new Uint8Array([255]),f.writeNumber(e,4)])},writeHeader:function(e,n){return f.concatUint8Array([new Uint8Array([192|e]),this.writeSimpleLength(n)])},writeOldHeader:function(e,n){return 256>n?new Uint8Array([128|e<<2,n]):65536>n?f.concatUint8Array([128|e<<2|1,f.writeNumber(n,2)]):f.concatUint8Array([128|e<<2|2,f.writeNumber(n,4)])},read:function(e,n,o){if(null===e||e.length<=n||e.subarray(n,e.length).length<2||0===(128&e[n]))throw new Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");var p,d=n,i=-1,t=-1;t=0,0!==(64&e[d])&&(t=1);var u;t?i=63&e[d]:(i=(63&e[d])>>2,u=3&e[d]),d++;var l=null,c=-1;if(t)if(e[d]<192)p=e[d++],f.print_debug("1 byte length:"+p);else if(e[d]>=192&&e[d]<224)p=(e[d++]-192<<8)+e[d++]+192,f.print_debug("2 byte length:"+p);else if(e[d]>223&&e[d]<255){p=1<<(31&e[d++]),f.print_debug("4 byte length:"+p);var g=d+p;l=[e.subarray(d,d+p)];for(var s;;){if(e[g]<192){s=e[g++],p+=s,l.push(e.subarray(g,g+s)),g+=s;break}if(e[g]>=192&&e[g]<224){s=(e[g++]-192<<8)+e[g++]+192,p+=s,l.push(e.subarray(g,g+s)),g+=s;break}if(!(e[g]>223&&e[g]<255)){g++,s=e[g++]<<24|e[g++]<<16|e[g++]<<8|e[g++],l.push(e.subarray(g,g+s)),p+=s,g+=s;break}s=1<<(31&e[g++]),p+=s,l.push(e.subarray(g,g+s)),g+=s}c=g-d}else d++,p=e[d++]<<24|e[d++]<<16|e[d++]<<8|e[d++];else switch(u){case 0:p=e[d++];break;case 1:p=e[d++]<<8|e[d++];break;case 2:p=e[d++]<<24|e[d++]<<16|e[d++]<<8|e[d++];break;default:p=o}return-1==c&&(c=p),null===l?l=e.subarray(d,d+c):l instanceof Array&&(l=f.concatUint8Array(l)),{tag:i,packet:l,offset:d+c}}}},{"../enums.js":43,"../util.js":74}],58:[function(e,n,o){function f(){this.length=0}n.exports=f;var p=e("../util"),d=e("./packet.js"),i=e("./all_packets.js"),t=e("../enums.js");f.prototype.read=function(e){for(var n=0;n<e.length;){var o=d.read(e,n,e.length-n);n=o.offset;var f=t.read(t.packet,o.tag),p=i.newPacketFromTag(f);this.push(p),p.read(o.packet)}},f.prototype.write=function(){for(var e=[],n=0;n<this.length;n++){var o=this[n].write();e.push(d.writeHeader(this[n].tag,o.length)),e.push(o)}return p.concatUint8Array(e)},f.prototype.push=function(e){e&&(e.packets=e.packets||new f,this[this.length]=e,this.length++)},f.prototype.filter=function(e){for(var n=new f,o=0;o<this.length;o++)e(this[o],o,this)&&n.push(this[o]);return n},f.prototype.filterByTag=function(){for(var e=Array.prototype.slice.call(arguments),n=new f,o=this,p=0;p<this.length;p++)e.some(function(e){return o[p].tag==e})&&n.push(this[p]);return n},f.prototype.forEach=function(e){for(var n=0;n<this.length;n++)e(this[n])},f.prototype.findPacket=function(e){var n=this.filterByTag(e);if(n.length)return n[0];for(var o=null,f=0;f<this.length;f++)if(this[f].packets.length&&(o=this[f].packets.findPacket(e)))return o;return null},f.prototype.indexOfTag=function(){for(var e=Array.prototype.slice.call(arguments),n=[],o=this,f=0;f<this.length;f++)e.some(function(e){return o[f].tag==e})&&n.push(f);return n},f.prototype.slice=function(e,n){n||(n=this.length);for(var o=new f,p=e;n>p;p++)o.push(this[p]);return o},f.prototype.concat=function(e){if(e)for(var n=0;n<e.length;n++)this.push(e[n])},n.exports.fromStructuredClone=function(e){for(var n=new f,o=0;o<e.length;o++)n.push(i.fromStructuredClone(e[o])),0!==n[o].packets.length?n[o].packets=this.fromStructuredClone(n[o].packets):n[o].packets=new f;return n}},{"../enums.js":43,"../util":74,"./all_packets.js":51,"./packet.js":57}],59:[function(e,n,o){function f(){this.tag=t.packet.publicKey,this.version=4,this.created=new Date,this.mpi=[],this.algorithm="rsa_sign",this.expirationTimeV3=0,this.fingerprint=null,this.keyid=null}n.exports=f;var p=e("../util.js"),d=e("../type/mpi.js"),i=e("../type/keyid.js"),t=e("../enums.js"),u=e("../crypto");f.prototype.read=function(e){var n=0;if(this.version=e[n++],3==this.version||4==this.version){this.created=p.readDate(e.subarray(n,n+4)),n+=4,3==this.version&&(this.expirationTimeV3=p.readNumber(e.subarray(n,n+2)),n+=2),this.algorithm=t.read(t.publicKey,e[n++]);var o=u.getPublicMpiCount(this.algorithm);this.mpi=[];for(var f=e.subarray(n,e.length),i=0,l=0;o>l&&i<f.length;l++)if(this.mpi[l]=new d,i+=this.mpi[l].read(f.subarray(i,f.length)),i>f.length)throw new Error("Error reading MPI @:"+i);return i+6}throw new Error("Version "+this.version+" of the key packet is unsupported.")},f.prototype.readPublicKey=f.prototype.read,f.prototype.write=function(){var e=[];e.push(new Uint8Array([this.version])),e.push(p.writeDate(this.created)),3==this.version&&e.push(p.writeNumber(this.expirationTimeV3,2)),e.push(new Uint8Array([t.write(t.publicKey,this.algorithm)]));for(var n=u.getPublicMpiCount(this.algorithm),o=0;n>o;o++)e.push(this.mpi[o].write());return p.concatUint8Array(e)},f.prototype.writePublicKey=f.prototype.write,f.prototype.writeOld=function(){var e=this.writePublicKey();return p.concatUint8Array([new Uint8Array([153]),p.writeNumber(e.length,2),e])},f.prototype.getKeyId=function(){if(this.keyid)return this.keyid;if(this.keyid=new i,4==this.version)this.keyid.read(p.str2Uint8Array(p.hex2bin(this.getFingerprint()).substr(12,8)));else if(3==this.version){var e=this.mpi[0].write();this.keyid.read(e.subarray(e.length-8,e.length))}return this.keyid},f.prototype.getFingerprint=function(){if(this.fingerprint)return this.fingerprint;var e="";if(4==this.version)e=this.writeOld(),this.fingerprint=p.Uint8Array2str(u.hash.sha1(e));else if(3==this.version){for(var n=u.getPublicMpiCount(this.algorithm),o=0;n>o;o++)e+=this.mpi[o].toBytes();this.fingerprint=p.Uint8Array2str(u.hash.md5(p.str2Uint8Array(e)))}return this.fingerprint=p.hexstrdump(this.fingerprint),this.fingerprint},f.prototype.getBitSize=function(){return 8*this.mpi[0].byteLength()},f.prototype.postCloneTypeFix=function(){for(var e=0;e<this.mpi.length;e++)this.mpi[e]=d.fromClone(this.mpi[e]);this.keyid&&(this.keyid=i.fromClone(this.keyid))}},{"../crypto":32,"../enums.js":43,"../type/keyid.js":71,"../type/mpi.js":72,"../util.js":74}],60:[function(e,n,o){function f(){this.tag=t.packet.publicKeyEncryptedSessionKey,this.version=3,this.publicKeyId=new p,this.publicKeyAlgorithm="rsa_encrypt",this.sessionKey=null,this.sessionKeyAlgorithm="aes256",this.encrypted=[]}n.exports=f;var p=e("../type/keyid.js"),d=e("../util.js"),i=e("../type/mpi.js"),t=e("../enums.js"),u=e("../crypto");f.prototype.read=function(e){this.version=e[0],this.publicKeyId.read(e.subarray(1,e.length)),this.publicKeyAlgorithm=t.read(t.publicKey,e[9]);var n=10,o=function(e){switch(e){case"rsa_encrypt":case"rsa_encrypt_sign":return 1;case"elgamal":return 2;default:throw new Error("Invalid algorithm.")}}(this.publicKeyAlgorithm);this.encrypted=[];for(var f=0;o>f;f++){var p=new i;n+=p.read(e.subarray(n,e.length)),this.encrypted.push(p)}},f.prototype.write=function(){for(var e=[new Uint8Array([this.version]),this.publicKeyId.write(),new Uint8Array([t.write(t.publicKey,this.publicKeyAlgorithm)])],n=0;n<this.encrypted.length;n++)e.push(this.encrypted[n].write());return d.concatUint8Array(e)},f.prototype.encrypt=function(e){var n=String.fromCharCode(t.write(t.symmetric,this.sessionKeyAlgorithm));n+=d.Uint8Array2str(this.sessionKey);var o=d.calc_checksum(this.sessionKey);n+=d.Uint8Array2str(d.writeNumber(o,2));var f=new i;f.fromBytes(u.pkcs1.eme.encode(n,e.mpi[0].byteLength())),this.encrypted=u.publicKeyEncrypt(this.publicKeyAlgorithm,e.mpi,f)},f.prototype.decrypt=function(e){var n=u.publicKeyDecrypt(this.publicKeyAlgorithm,e.mpi,this.encrypted).toBytes(),o=d.readNumber(d.str2Uint8Array(n.substr(n.length-2))),f=u.pkcs1.eme.decode(n);if(e=d.str2Uint8Array(f.substring(1,f.length-2)),o!=d.calc_checksum(e))throw new Error("Checksum mismatch");this.sessionKey=e,this.sessionKeyAlgorithm=t.read(t.symmetric,f.charCodeAt(0))},f.prototype.postCloneTypeFix=function(){this.publicKeyId=p.fromClone(this.publicKeyId);for(var e=0;e<this.encrypted.length;e++)this.encrypted[e]=i.fromClone(this.encrypted[e])}},{"../crypto":32,"../enums.js":43,"../type/keyid.js":71,"../type/mpi.js":72,"../util.js":74}],61:[function(e,n,o){function f(){p.call(this),this.tag=d.packet.publicSubkey}n.exports=f;var p=e("./public_key.js"),d=e("../enums.js");f.prototype=new p,f.prototype.constructor=f},{"../enums.js":43,"./public_key.js":59}],62:[function(e,n,o){function f(){l.call(this),this.tag=c.packet.secretKey,this.encrypted=null,this.isDecrypted=!1}function p(e){return"sha1"==e?20:2}function d(e){return"sha1"==e?s.hash.sha1:function(e){return g.writeNumber(g.calc_checksum(e),2)}}function i(e,n,o){var f=p(e),i=d(e),t=g.Uint8Array2str(n.subarray(n.length-f,n.length));n=n.subarray(0,n.length-f);var u=g.Uint8Array2str(i(n));if(u!=t)return new Error("Hash mismatch.");for(var l=s.getPrivateMpiCount(o),c=0,w=[],a=0;l>a&&c<n.length;a++)w[a]=new y,c+=w[a].read(n.subarray(c,n.length));return w}function t(e,n,o){for(var f=[],p=s.getPublicMpiCount(n),i=p;i<o.length;i++)f.push(o[i].write());var t=g.concatUint8Array(f),u=d(e)(t);return g.concatUint8Array([t,u])}function u(e,n,o){return e.produce_key(n,s.cipher[o].keySize)}n.exports=f;var l=e("./public_key.js"),c=e("../enums.js"),g=e("../util.js"),s=e("../crypto"),y=e("../type/mpi.js"),w=e("../type/s2k.js");f.prototype=new l,f.prototype.constructor=f,f.prototype.read=function(e){var n=this.readPublicKey(e);e=e.subarray(n,e.length);var o=e[0];if(o)this.encrypted=e;else{var f=i("mod",e.subarray(1,e.length),this.algorithm);if(f instanceof Error)throw f;this.mpi=this.mpi.concat(f),this.isDecrypted=!0}},f.prototype.write=function(){var e=[this.writePublicKey()];return this.encrypted?e.push(this.encrypted):(e.push(new Uint8Array([0])),e.push(t("mod",this.algorithm,this.mpi))),g.concatUint8Array(e)},f.prototype.encrypt=function(e){if(this.isDecrypted&&!e)return void(this.encrypted=null);if(!e)throw new Error("The key must be decrypted before removing passphrase protection.");var n=new w,o="aes256",f=t("sha1",this.algorithm,this.mpi),p=u(n,e,o),d=s.cipher[o].blockSize,i=s.random.getRandomBytes(d),l=[new Uint8Array([254,c.write(c.symmetric,o)])];l.push(n.write()),l.push(i),l.push(s.cfb.normalEncrypt(o,p,f,i)),this.encrypted=g.concatUint8Array(l)},f.prototype.decrypt=function(e){if(this.isDecrypted)return!0;var n,o,f=0,p=this.encrypted[f++];if(255==p||254==p){n=this.encrypted[f++],n=c.read(c.symmetric,n);var d=new w;f+=d.read(this.encrypted.subarray(f,this.encrypted.length)),o=u(d,e,n)}else n=p,n=c.read(c.symmetric,n),o=s.hash.md5(e);var t=this.encrypted.subarray(f,f+s.cipher[n].blockSize);f+=t.length;var l,g=this.encrypted.subarray(f,this.encrypted.length);l=s.cfb.normalDecrypt(n,o,g,t);var y=254==p?"sha1":"mod",a=i(y,l,this.algorithm);return a instanceof Error?!1:(this.mpi=this.mpi.concat(a),this.isDecrypted=!0,!0)},f.prototype.generate=function(e){var n=this;return s.generateMpi(n.algorithm,e).then(function(e){n.mpi=e,n.isDecrypted=!0})},f.prototype.clearPrivateMPIs=function(){if(!this.encrypted)throw new Error("If secret key is not encrypted, clearing private MPIs is irreversible.");this.mpi=this.mpi.slice(0,s.getPublicMpiCount(this.algorithm)),this.isDecrypted=!1}},{"../crypto":32,"../enums.js":43,"../type/mpi.js":72,"../type/s2k.js":73,"../util.js":74,"./public_key.js":59}],63:[function(e,n,o){function f(){p.call(this),this.tag=d.packet.secretSubkey}n.exports=f;var p=e("./secret_key.js"),d=e("../enums.js");f.prototype=new p,f.prototype.constructor=f},{"../enums.js":43,"./secret_key.js":62}],64:[function(e,n,o){function f(){this.tag=t.packet.signature,this.version=4,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=null,this.signedHashValue=null,this.created=new Date,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyId=new c,this.notation=null,this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserId=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.verified=!1}function p(e,n){var o=[];return o.push(i.writeSimpleLength(n.length+1)),o.push(new Uint8Array([e])),o.push(n),d.concatUint8Array(o)}n.exports=f;var d=e("../util.js"),i=e("./packet.js"),t=e("../enums.js"),u=e("../crypto"),l=e("../type/mpi.js"),c=e("../type/keyid.js");f.prototype.read=function(e){function n(e){for(var n=d.readNumber(e.subarray(0,2)),o=2;2+n>o;){var f=i.readSimpleLength(e.subarray(o,e.length));o+=f.offset,this.read_sub_packet(e.subarray(o,o+f.len)),o+=f.len}return o}var o=0;switch(this.version=e[o++],this.version){case 3:5!=e[o++]&&d.print_debug("packet/signature.js\ninvalid One-octet length of following hashed material.MUST be 5. @:"+(o-1));var f=o;this.signatureType=e[o++],this.created=d.readDate(e.subarray(o,o+4)),o+=4,this.signatureData=e.subarray(f,o),this.issuerKeyId.read(e.subarray(o,o+8)),o+=8,this.publicKeyAlgorithm=e[o++],this.hashAlgorithm=e[o++];break;case 4:this.signatureType=e[o++],this.publicKeyAlgorithm=e[o++],this.hashAlgorithm=e[o++],o+=n.call(this,e.subarray(o,e.length),!0),this.signatureData=e.subarray(0,o);var p=o;o+=n.call(this,e.subarray(o,e.length),!1),this.unhashedSubpackets=e.subarray(p,o);break;default:throw new Error("Version "+this.version+" of the signature is unsupported.")}this.signedHashValue=e.subarray(o,o+2),o+=2,this.signature=e.subarray(o,e.length)},f.prototype.write=function(){var e=[];switch(this.version){case 3:e.push(new Uint8Array([3,5])),e.push(this.signatureData),e.push(this.issuerKeyId.write()),e.push(new Uint8Array([this.publicKeyAlgorithm,this.hashAlgorithm]));break;case 4:e.push(this.signatureData),e.push(this.unhashedSubpackets?this.unhashedSubpackets:d.writeNumber(0,2))}return e.push(this.signedHashValue),e.push(this.signature),d.concatUint8Array(e)},f.prototype.sign=function(e,n){var o=t.write(t.signature,this.signatureType),f=t.write(t.publicKey,this.publicKeyAlgorithm),p=t.write(t.hash,this.hashAlgorithm),i=[new Uint8Array([4,o,f,p])];this.issuerKeyId=e.getKeyId(),i.push(this.write_all_sub_packets()),this.signatureData=d.concatUint8Array(i);var l=this.calculateTrailer(),c=d.concatUint8Array([this.toSign(o,n),this.signatureData,l]),g=u.hash.digest(p,c);
this.signedHashValue=g.subarray(0,2),this.signature=u.signature.sign(p,f,e.mpi,c)},f.prototype.write_all_sub_packets=function(){var e,n=t.signatureSubpacket,o=[];if(null!==this.created&&o.push(p(n.signature_creation_time,d.writeDate(this.created))),null!==this.signatureExpirationTime&&o.push(p(n.signature_expiration_time,d.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&o.push(p(n.exportable_certification,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(e=new Uint8Array([this.trustLevel,this.trustAmount]),o.push(p(n.trust_signature,e))),null!==this.regularExpression&&o.push(p(n.regular_expression,this.regularExpression)),null!==this.revocable&&o.push(p(n.revocable,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&o.push(p(n.key_expiration_time,d.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(e=d.str2Uint8Array(d.bin2str(this.preferredSymmetricAlgorithms)),o.push(p(n.preferred_symmetric_algorithms,e))),null!==this.revocationKeyClass&&(e=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),e=d.concatUint8Array([e,this.revocationKeyFingerprint]),o.push(p(n.revocation_key,e))),this.issuerKeyId.isNull()||o.push(p(n.issuer,this.issuerKeyId.write())),null!==this.notation)for(var f in this.notation)if(this.notation.hasOwnProperty(f)){var i=this.notation[f];e=[new Uint8Array([128,0,0,0])],e.push(d.writeNumber(f.length,2)),e.push(d.writeNumber(i.length,2)),e.push(d.str2Uint8Array(f+i)),e=d.concatUint8Array(e),o.push(p(n.notation_data,e))}null!==this.preferredHashAlgorithms&&(e=d.str2Uint8Array(d.bin2str(this.preferredHashAlgorithms)),o.push(p(n.preferred_hash_algorithms,e))),null!==this.preferredCompressionAlgorithms&&(e=d.str2Uint8Array(d.bin2str(this.preferredCompressionAlgorithms)),o.push(p(n.preferred_compression_algorithms,e))),null!==this.keyServerPreferences&&(e=d.str2Uint8Array(d.bin2str(this.keyServerPreferences)),o.push(p(n.key_server_preferences,e))),null!==this.preferredKeyServer&&o.push(p(n.preferred_key_server,d.str2Uint8Array(this.preferredKeyServer))),null!==this.isPrimaryUserID&&o.push(p(n.primary_user_id,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&o.push(p(n.policy_uri,d.str2Uint8Array(this.policyURI))),null!==this.keyFlags&&(e=d.str2Uint8Array(d.bin2str(this.keyFlags)),o.push(p(n.key_flags,e))),null!==this.signersUserId&&o.push(p(n.signers_user_id,d.str2Uint8Array(this.signersUserId))),null!==this.reasonForRevocationFlag&&(e=d.str2Uint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),o.push(p(n.reason_for_revocation,e))),null!==this.features&&(e=d.str2Uint8Array(d.bin2str(this.features)),o.push(p(n.features,e))),null!==this.signatureTargetPublicKeyAlgorithm&&(e=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],e.push(d.str2Uint8Array(this.signatureTargetHash)),e=d.concatUint8Array(e),o.push(p(n.signature_target,e))),null!==this.embeddedSignature&&o.push(p(n.embedded_signature,this.embeddedSignature.write()));var u=d.concatUint8Array(o),l=d.writeNumber(u.length,2);return d.concatUint8Array([l,u])},f.prototype.read_sub_packet=function(e){function n(e,n){this[e]=[];for(var o=0;o<n.length;o++)this[e].push(n[o])}var o,p=0,i=127&e[p++];switch(i){case 2:this.created=d.readDate(e.subarray(p,e.length));break;case 3:o=d.readNumber(e.subarray(p,e.length)),this.signatureNeverExpires=0===o,this.signatureExpirationTime=o;break;case 4:this.exportable=1==e[p++];break;case 5:this.trustLevel=e[p++],this.trustAmount=e[p++];break;case 6:this.regularExpression=e[p];break;case 7:this.revocable=1==e[p++];break;case 9:o=d.readNumber(e.subarray(p,e.length)),this.keyExpirationTime=o,this.keyNeverExpires=0===o;break;case 11:n.call(this,"preferredSymmetricAlgorithms",e.subarray(p,e.length));break;case 12:this.revocationKeyClass=e[p++],this.revocationKeyAlgorithm=e[p++],this.revocationKeyFingerprint=e.subarray(p,20);break;case 16:this.issuerKeyId.read(e.subarray(p,e.length));break;case 20:if(128==e[p]){p+=4;var t=d.readNumber(e.subarray(p,p+2));p+=2;var l=d.readNumber(e.subarray(p,p+2));p+=2;var c=d.Uint8Array2str(e.subarray(p,p+t)),g=d.Uint8Array2str(e.subarray(p+t,p+t+l));this.notation=this.notation||{},this.notation[c]=g}else d.print_debug("Unsupported notation flag "+e[p]);break;case 21:n.call(this,"preferredHashAlgorithms",e.subarray(p,e.length));break;case 22:n.call(this,"preferredCompressionAlgorithms",e.subarray(p,e.length));break;case 23:n.call(this,"keyServerPreferencess",e.subarray(p,e.length));break;case 24:this.preferredKeyServer=d.Uint8Array2str(e.subarray(p,e.length));break;case 25:this.isPrimaryUserID=0!==e[p++];break;case 26:this.policyURI=d.Uint8Array2str(e.subarray(p,e.length));break;case 27:n.call(this,"keyFlags",e.subarray(p,e.length));break;case 28:this.signersUserId+=d.Uint8Array2str(e.subarray(p,e.length));break;case 29:this.reasonForRevocationFlag=e[p++],this.reasonForRevocationString=d.Uint8Array2str(e.subarray(p,e.length));break;case 30:n.call(this,"features",e.subarray(p,e.length));break;case 31:this.signatureTargetPublicKeyAlgorithm=e[p++],this.signatureTargetHashAlgorithm=e[p++];var s=u.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=d.Uint8Array2str(e.subarray(p,p+s));break;case 32:this.embeddedSignature=new f,this.embeddedSignature.read(e.subarray(p,e.length));break;default:d.print_debug("Unknown signature subpacket type "+i+" @:"+p)}},f.prototype.toSign=function(e,n){var o=t.signature;switch(e){case o.binary:case o.text:return n.getBytes();case o.standalone:return new Uint8Array(0);case o.cert_generic:case o.cert_persona:case o.cert_casual:case o.cert_positive:case o.cert_revocation:var f,p;if(void 0!==n.userid)p=180,f=n.userid;else{if(void 0===n.userattribute)throw new Error("Either a userid or userattribute packet needs to be supplied for certification.");p=209,f=n.userattribute}var i=f.write();if(4==this.version)return d.concatUint8Array([this.toSign(o.key,n),new Uint8Array([p]),d.writeNumber(i.length,4),i]);if(3==this.version)return d.concatUint8Array([this.toSign(o.key,n),i]);break;case o.subkey_binding:case o.subkey_revocation:case o.key_binding:return d.concatUint8Array([this.toSign(o.key,n),this.toSign(o.key,{key:n.bind})]);case o.key:if(void 0===n.key)throw new Error("Key packet is required for this signature.");return n.key.writeOld();case o.key_revocation:return this.toSign(o.key,n);case o.timestamp:return new Uint8Array(0);case o.third_party:throw new Error("Not implemented");default:throw new Error("Unknown signature type.")}},f.prototype.calculateTrailer=function(){if(3==this.version)return new Uint8Array(0);var e=new Uint8Array([4,255]);return d.concatUint8Array([e,d.writeNumber(this.signatureData.length,4)])},f.prototype.verify=function(e,n){var o=t.write(t.signature,this.signatureType),f=t.write(t.publicKey,this.publicKeyAlgorithm),p=t.write(t.hash,this.hashAlgorithm),i=this.toSign(o,n),c=this.calculateTrailer(),g=0;f>0&&4>f?g=1:17==f&&(g=2);for(var s=[],y=0,w=0;g>w;w++)s[w]=new l,y+=s[w].read(this.signature.subarray(y,this.signature.length));return this.verified=u.signature.verify(f,p,s,e.mpi,d.concatUint8Array([i,this.signatureData,c])),this.verified},f.prototype.isExpired=function(){return this.signatureNeverExpires?!1:Date.now()>this.created.getTime()+1e3*this.signatureExpirationTime},f.prototype.postCloneTypeFix=function(){this.issuerKeyId=c.fromClone(this.issuerKeyId)}},{"../crypto":32,"../enums.js":43,"../type/keyid.js":71,"../type/mpi.js":72,"../util.js":74,"./packet.js":57}],65:[function(e,n,o){function f(){this.tag=t.packet.symEncryptedIntegrityProtected,this.encrypted=null,this.modification=!1,this.packets=null}n.exports=f;var p=e("../util.js"),d=e("../crypto"),i=e("../config"),t=e("../enums.js");f.prototype.read=function(e){var n=e[0];if(1!=n)throw new Error("Invalid packet version.");this.encrypted=e.subarray(1,e.length)},f.prototype.write=function(){return p.concatUint8Array([new Uint8Array([1]),this.encrypted])},f.prototype.encrypt=function(o,f){var t=this.packets.write(),u=d.getPrefixRandom(o),l=new Uint8Array([u[u.length-2],u[u.length-1]]),c=p.concatUint8Array([u,l]),g=new Uint8Array([211,20]),s=p.concatUint8Array([t,g]),y=d.hash.sha1(p.concatUint8Array([c,s]));if(s=p.concatUint8Array([s,y]),"aes"===o.substr(0,3)){var w=d.cipher[o].blockSize;if("undefined"!=typeof n&&n.exports&&i.useNative){var a=e("crypto"),b=e("buffer").Buffer,r=new a.createCipheriv("aes-"+o.substr(3,3)+"-cfb",new b(f),new b(new Uint8Array(w)));this.encrypted=new Uint8Array(r.update(new b(p.concatUint8Array([c,s]))))}else this.encrypted=asmCrypto.AES_CFB.encrypt(p.concatUint8Array([c,s]),f)}else this.encrypted=d.cfb.encrypt(u,o,s,f,!1).subarray(0,c.length+s.length)},f.prototype.decrypt=function(o,f){var t;if("aes"===o.substr(0,3)){var u=d.cipher[o].blockSize;if("undefined"!=typeof n&&n.exports&&i.useNative){var l=e("crypto"),c=e("buffer").Buffer,g=new l.createDecipheriv("aes-"+o.substr(3,3)+"-cfb",new c(f),new c(new Uint8Array(u)));t=new Uint8Array(g.update(new c(this.encrypted)))}else t=asmCrypto.AES_CFB.decrypt(this.encrypted,f);t=t.subarray(u+2,t.length)}else t=d.cfb.decrypt(o,f,this.encrypted,!1);this.hash=p.Uint8Array2str(d.hash.sha1(p.concatUint8Array([d.cfb.mdc(o,f,this.encrypted),t.subarray(0,t.length-20)])));var s=p.Uint8Array2str(t.subarray(t.length-20,t.length));if(this.hash!=s)throw new Error("Modification detected.");this.packets.read(t.subarray(0,t.length-22))}},{"../config":17,"../crypto":32,"../enums.js":43,"../util.js":74,buffer:!1,crypto:!1}],66:[function(e,n,o){function f(){this.tag=i.packet.symEncryptedSessionKey,this.version=4,this.sessionKey=null,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm="aes256",this.encrypted=null,this.s2k=new d}var p=e("../util.js"),d=e("../type/s2k.js"),i=e("../enums.js"),t=e("../crypto");n.exports=f,f.prototype.read=function(e){this.version=e[0];var n=i.read(i.symmetric,e[1]),o=this.s2k.read(e.subarray(2,e.length)),f=o+2;f<e.length?(this.encrypted=e.subarray(f,e.length),this.sessionKeyEncryptionAlgorithm=n):this.sessionKeyAlgorithm=n},f.prototype.write=function(){var e=null===this.encrypted?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm,n=p.concatUint8Array([new Uint8Array([this.version,i.write(i.symmetric,e)]),this.s2k.write()]);return null!==this.encrypted&&(n=p.concatUint8Array([n,this.encrypted])),n},f.prototype.decrypt=function(e){var n=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,o=t.cipher[n].keySize,f=this.s2k.produce_key(e,o);if(null===this.encrypted)this.sessionKey=f;else{var p=t.cfb.normalDecrypt(n,f,this.encrypted,null);this.sessionKeyAlgorithm=i.read(i.symmetric,p[0]),this.sessionKey=p.subarray(1,p.length)}},f.prototype.encrypt=function(e){var n=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=n;var o,f=t.cipher[n].keySize,d=this.s2k.produce_key(e,f),u=new Uint8Array([i.write(i.symmetric,this.sessionKeyAlgorithm)]);null===this.sessionKey&&(this.sessionKey=t.getRandomBytes(t.cipher[this.sessionKeyAlgorithm].keySize)),o=p.concatUint8Array([u,this.sessionKey]),this.encrypted=t.cfb.normalEncrypt(n,d,o,null)},f.prototype.postCloneTypeFix=function(){this.s2k=d.fromClone(this.s2k)}},{"../crypto":32,"../enums.js":43,"../type/s2k.js":73,"../util.js":74}],67:[function(e,n,o){function f(){this.tag=d.packet.symmetricallyEncrypted,this.encrypted=null,this.packets=null}n.exports=f;var p=e("../crypto"),d=e("../enums.js");f.prototype.read=function(e){this.encrypted=e},f.prototype.write=function(){return this.encrypted},f.prototype.decrypt=function(e,n){var o=p.cfb.decrypt(e,n,this.encrypted,!0);this.packets.read(o)},f.prototype.encrypt=function(e,n){var o=this.packets.write();this.encrypted=p.cfb.encrypt(p.getPrefixRandom(e),e,o,n,!0)}},{"../crypto":32,"../enums.js":43}],68:[function(e,n,o){function f(){this.tag=p.packet.trust}n.exports=f;var p=e("../enums.js");f.prototype.read=function(e){}},{"../enums.js":43}],69:[function(e,n,o){function f(){this.tag=i.packet.userAttribute,this.attributes=[]}var p=e("../util.js"),d=e("./packet.js"),i=e("../enums.js");n.exports=f,f.prototype.read=function(e){for(var n=0;n<e.length;){var o=d.readSimpleLength(e.subarray(n,e.length));n+=o.offset,this.attributes.push(p.Uint8Array2str(e.subarray(n,n+o.len))),n+=o.len}},f.prototype.write=function(){for(var e=[],n=0;n<this.attributes.length;n++)e.push(d.writeSimpleLength(this.attributes[n].length)),e.push(p.str2Uint8Array(this.attributes[n]));return p.concatUint8Array(e)},f.prototype.equals=function(e){return e&&e instanceof f?this.attributes.every(function(n,o){return n===e.attributes[o]}):!1}},{"../enums.js":43,"../util.js":74,"./packet.js":57}],70:[function(e,n,o){function f(){this.tag=d.packet.userid,this.userid=""}n.exports=f;var p=e("../util.js"),d=e("../enums.js");f.prototype.read=function(e){this.userid=p.decode_utf8(p.Uint8Array2str(e))},f.prototype.write=function(){return p.str2Uint8Array(p.encode_utf8(this.userid))}},{"../enums.js":43,"../util.js":74}],71:[function(e,n,o){function f(){this.bytes=""}n.exports=f;var p=e("../util.js");f.prototype.read=function(e){this.bytes=p.Uint8Array2str(e.subarray(0,8))},f.prototype.write=function(){return p.str2Uint8Array(this.bytes)},f.prototype.toHex=function(){return p.hexstrdump(this.bytes)},f.prototype.equals=function(e){return this.bytes==e.bytes},f.prototype.isNull=function(){return""===this.bytes},n.exports.mapToHex=function(e){return e.toHex()},n.exports.fromClone=function(e){var n=new f;return n.bytes=e.bytes,n},n.exports.fromId=function(e){var n=new f;return n.read(p.hex2bin(e)),n}},{"../util.js":74}],72:[function(e,n,o){function f(){this.data=null}n.exports=f;var p=e("../crypto/public_key/jsbn.js"),d=e("../util.js");f.prototype.read=function(e){("string"==typeof e||String.prototype.isPrototypeOf(e))&&(e=d.str2Uint8Array(e));var n=e[0]<<8|e[1],o=Math.ceil(n/8),f=d.Uint8Array2str(e.subarray(2,2+o));return this.fromBytes(f),2+o},f.prototype.fromBytes=function(e){this.data=new p(d.hexstrdump(e),16)},f.prototype.toBytes=function(){var e=d.Uint8Array2str(this.write());return e.substr(2)},f.prototype.byteLength=function(){return this.toBytes().length},f.prototype.write=function(){return d.str2Uint8Array(this.data.toMPI())},f.prototype.toBigInteger=function(){return this.data.clone()},f.prototype.fromBigInteger=function(e){this.data=e.clone()},n.exports.fromClone=function(e){e.data.copyTo=p.prototype.copyTo;var n=new p;e.data.copyTo(n);var o=new f;return o.data=n,o}},{"../crypto/public_key/jsbn.js":37,"../util.js":74}],73:[function(e,n,o){function f(){this.algorithm="sha256",this.type="iterated",this.c=96,this.salt=i.random.getRandomBytes(8)}n.exports=f;var p=e("../enums.js"),d=e("../util.js"),i=e("../crypto");f.prototype.get_count=function(){var e=6;return 16+(15&this.c)<<(this.c>>4)+e},f.prototype.read=function(e){var n=0;switch(this.type=p.read(p.s2k,e[n++]),this.algorithm=p.read(p.hash,e[n++]),this.type){case"simple":break;case"salted":this.salt=e.subarray(n,n+8),n+=8;break;case"iterated":this.salt=e.subarray(n,n+8),n+=8,this.c=e[n++];break;case"gnu":if("GNU"!=d.Uint8Array2str(e.subarray(n,3)))throw new Error("Unknown s2k type.");n+=3;var o=1e3+e[n++];if(1001!=o)throw new Error("Unknown s2k gnu protection mode.");this.type=o;break;default:throw new Error("Unknown s2k type.")}return n},f.prototype.write=function(){var e=[new Uint8Array([p.write(p.s2k,this.type),p.write(p.hash,this.algorithm)])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]))}return d.concatUint8Array(e)},f.prototype.produce_key=function(e,n){function o(n,o){var f=p.write(p.hash,o.algorithm);switch(o.type){case"simple":return i.hash.digest(f,d.concatUint8Array([n,e]));case"salted":return i.hash.digest(f,d.concatUint8Array([n,o.salt,e]));case"iterated":var t=[],u=o.get_count();for(data=d.concatUint8Array([o.salt,e]);t.length*data.length<u;)t.push(data);return t=d.concatUint8Array(t),t.length>u&&(t=t.subarray(0,u)),i.hash.digest(f,d.concatUint8Array([n,t]))}}e=d.str2Uint8Array(d.encode_utf8(e));for(var f=[],t=0,u=new Uint8Array(n),l=0;n>l;l++)u[l]=0;for(l=0;n>=t;){var c=o(u.subarray(0,l),this);f.push(c),t+=c.length,l++}return d.concatUint8Array(f).subarray(0,n)},n.exports.fromClone=function(e){var n=new f;return n.algorithm=e.algorithm,n.type=e.type,n.c=e.c,n.salt=e.salt,n}},{"../crypto":32,"../enums.js":43,"../util.js":74}],74:[function(e,n,o){"use strict";var f=e("./config");n.exports={readNumber:function(e){for(var n=0,o=0;o<e.length;o++)n<<=8,n+=e[o];return n},writeNumber:function(e,n){for(var o=new Uint8Array(n),f=0;n>f;f++)o[f]=e>>8*(n-f-1)&255;return o},readDate:function(e){var n=this.readNumber(e),o=new Date;return o.setTime(1e3*n),o},writeDate:function(e){var n=Math.round(e.getTime()/1e3);return this.writeNumber(n,4)},emailRegEx:/^[+a-zA-Z0-9_.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,6}$/,hexdump:function(e){for(var n,o=[],f=e.length,p=0,d=0;f>p;){for(n=e.charCodeAt(p++).toString(16);n.length<2;)n="0"+n;o.push(" "+n),d++,d%32===0&&o.push("\n ")}return o.join("")},hexstrdump:function(e){if(null===e)return"";for(var n,o=[],f=e.length,p=0;f>p;){for(n=e.charCodeAt(p++).toString(16);n.length<2;)n="0"+n;o.push(""+n)}return o.join("")},hex2bin:function(e){for(var n="",o=0;o<e.length;o+=2)n+=String.fromCharCode(parseInt(e.substr(o,2),16));return n},hexidump:function(e){for(var n,o=[],f=e.length,p=0;f>p;){for(n=e[p++].toString(16);n.length<2;)n="0"+n;o.push(""+n)}return o.join("")},encode_utf8:function(e){return unescape(encodeURIComponent(e))},decode_utf8:function(e){if("string"!=typeof e)throw new Error('Parameter "utf8" is not of type string');try{return decodeURIComponent(escape(e))}catch(n){return e}},bin2str:function(e){for(var n=[],o=0;o<e.length;o++)n[o]=String.fromCharCode(e[o]);return n.join("")},str2bin:function(e){for(var n=[],o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return n},str2Uint8Array:function(e){if("string"!=typeof e&&!String.prototype.isPrototypeOf(e))throw new Error("str2Uint8Array: Data must be in the form of a string");for(var n=new Uint8Array(e.length),o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return n},Uint8Array2str:function(e){if(!Uint8Array.prototype.isPrototypeOf(e))throw new Error("Uint8Array2str: Data must be in the form of a Uint8Array");for(var n=[],o=0;o<e.length;o++)n[o]=String.fromCharCode(e[o]);return n.join("")},concatUint8Array:function(e){var n=0;e.forEach(function(e){if(!Uint8Array.prototype.isPrototypeOf(e))throw new Error("concatUint8Array: Data must be in the form of a Uint8Array");n+=e.length});var o=new Uint8Array(n),f=0;return e.forEach(function(e){o.set(e,f),f+=e.length}),o},copyUint8Array:function(e){if(!Uint8Array.prototype.isPrototypeOf(e))throw new Error("Data must be in the form of a Uint8Array");var n=new Uint8Array(e.length);return n.set(e),n},equalsUint8Array:function(e,n){if(!Uint8Array.prototype.isPrototypeOf(e)||!Uint8Array.prototype.isPrototypeOf(n))throw new Error("Data must be in the form of a Uint8Array");if(e.length!==n.length)return!1;for(var o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0},calc_checksum:function(e){for(var n={s:0,add:function(e){this.s=(this.s+e)%65536}},o=0;o<e.length;o++)n.add(e[o]);return n.s},print_debug:function(e){f.debug&&console.log(e)},print_debug_hexstr_dump:function(e,n){f.debug&&(e+=this.hexstrdump(n),console.log(e))},getLeftNBits:function(e,n){var o=n%8;if(0===o)return e.substring(0,n/8);var f=(n-o)/8+1,p=e.substring(0,f);return this.shiftRight(p,8-o)},shiftRight:function(e,n){var o=util.str2bin(e);if(n%8===0)return e;for(var f=o.length-1;f>=0;f--)o[f]>>=n%8,f>0&&(o[f]|=o[f-1]<<8-n%8&255);return util.bin2str(o)},get_hashAlgorithmString:function(e){switch(e){case 1:return"MD5";case 2:return"SHA1";case 3:return"RIPEMD160";case 8:return"SHA256";case 9:return"SHA384";case 10:return"SHA512";case 11:return"SHA224"}return"unknown"},getWebCrypto:function(){if(f.useWebCrypto!==!1&&"undefined"!=typeof window){if(window.crypto)return window.crypto.subtle||window.crypto.webkitSubtle;if(window.msCrypto)return window.msCrypto.subtle}}}},{"./config":17}],75:[function(e,n,o){"use strict";function f(e,n){n&&n.worker?this.worker=n.worker:this.worker=new Worker(e||"openpgp.worker.min.js"),this.worker.onmessage=this.onMessage.bind(this),this.worker.onerror=function(e){throw new Error("Unhandled error in openpgp worker: "+e.message+" ("+e.filename+":"+e.lineno+")")},this.seedRandom(u),this.tasks={},n&&n.config&&this.worker.postMessage({event:"configure",config:n.config}),this.currentID=0}var p=e("../crypto"),d=e("../packet"),i=e("../key.js"),t=e("../type/keyid.js"),u=5e4,l=2e4;f.prototype.getID=function(){return this.currentID++},f.prototype.execute=function(e,n){var o=this,f=new Promise(function(f,p){e(),o.tasks[n]={resolve:f,reject:p}});return f},f.prototype.onMessage=function(e){var n=e.data;switch(n.event){case"method-return":n.err?this.tasks[n.id].reject(new Error(n.err)):this.tasks[n.id].resolve(n.data),delete this.tasks[n.id];break;case"request-seed":this.seedRandom(l);break;default:throw new Error("Unknown Worker Event.")}},f.prototype.seedRandom=function(e){var n=this.getRandomBuffer(e);this.worker.postMessage({event:"seed-random",buf:n})},f.prototype.getRandomBuffer=function(e){if(!e)return null;var n=new Uint8Array(e);return p.random.getRandomValues(n),n},f.prototype.terminate=function(){this.worker.terminate()},f.prototype.encryptMessage=function(e,n,o,f){var p=this,d=this.getID();return p.execute(function(){e&&(Array.prototype.isPrototypeOf(e)||(e=[e]),e=e.map(function(e){return e.toPacketlist()})),p.worker.postMessage({event:"encrypt-message",keys:e,data:n,passwords:o,params:f,id:d})},d)},f.prototype.encryptSessionKey=function(e,n,o,f){var p=this,d=this.getID();return p.execute(function(){o&&(Array.prototype.isPrototypeOf(o)||(o=[o]),o=o.map(function(e){return e.toPacketlist()})),p.worker.postMessage({event:"encrypt-session-key",sessionKey:e,algo:n,keys:o,passwords:f,id:d})},d)},f.prototype.signAndEncryptMessage=function(e,n,o){var f=this,p=this.getID();return f.execute(function(){e.length||(e=[e]),e=e.map(function(e){return e.toPacketlist()}),n=n.toPacketlist(),f.worker.postMessage({event:"sign-and-encrypt-message",publicKeys:e,privateKey:n,text:o,id:p})},p)},f.prototype.decryptMessage=function(e,n,o){var f=this,p=this.getID();return f.execute(function(){String.prototype.isPrototypeOf(e)||"string"==typeof e||Uint8Array.prototype.isPrototypeOf(e)||(e=e.toPacketlist()),f.worker.postMessage({event:"decrypt-message",privateKey:e,message:n,params:o,id:p})},p)},f.prototype.decryptSessionKey=function(e,n){var o=this,f=this.getID();return o.execute(function(){String.prototype.isPrototypeOf(e)||"string"==typeof e||(e=e.toPacketlist()),o.worker.postMessage({event:"decrypt-session-key",privateKey:e,message:n,id:f})},f)},f.prototype.decryptAndVerifyMessage=function(e,n,o){var f=this,p=this.getID(),d=new Promise(function(d,i){e=e.toPacketlist(),n.length||(n=[n]),n=n.map(function(e){return e.toPacketlist()}),f.worker.postMessage({event:"decrypt-and-verify-message",privateKey:e,publicKeys:n,message:o,id:p}),f.tasks[p]={resolve:function(e){e.signatures=e.signatures.map(function(e){return e.keyid=t.fromClone(e.keyid),e}),d(e)},reject:i}});return d},f.prototype.signClearMessage=function(e,n){var o=this,f=this.getID();return o.execute(function(){e.length||(e=[e]),e=e.map(function(e){return e.toPacketlist()}),o.worker.postMessage({event:"sign-clear-message",privateKeys:e,text:n,id:f})},f)},f.prototype.verifyClearSignedMessage=function(e,n){var o=this,f=this.getID(),p=new Promise(function(p,d){e.length||(e=[e]),e=e.map(function(e){return e.toPacketlist()}),o.worker.postMessage({event:"verify-clear-signed-message",publicKeys:e,message:n,id:f}),o.tasks[f]={resolve:function(e){e.signatures=e.signatures.map(function(e){return e.keyid=t.fromClone(e.keyid),e}),p(e)},reject:d}});return p},f.prototype.generateKeyPair=function(e){var n=this,o=this.getID(),f=new Promise(function(f,p){n.worker.postMessage({event:"generate-key-pair",options:e,id:o}),n.tasks[o]={resolve:function(e){var n=d.List.fromStructuredClone(e.key);e.key=new i.Key(n),f(e)},reject:p}});return f},f.prototype.decryptKey=function(e,n){var o=this,f=this.getID(),p=new Promise(function(p,t){e=e.toPacketlist(),o.worker.postMessage({event:"decrypt-key",privateKey:e,password:n,id:f}),o.tasks[f]={resolve:function(e){var n=d.List.fromStructuredClone(e);e=new i.Key(n),p(e)},reject:t}});return p},f.prototype.decryptKeyPacket=function(e,n,o){var f=this,p=this.getID(),t=new Promise(function(t,u){e=e.toPacketlist(),f.worker.postMessage({event:"decrypt-key-packet",privateKey:e,keyIds:n,password:o,id:p}),f.tasks[p]={resolve:function(e){var n=d.List.fromStructuredClone(e);e=new i.Key(n),t(e)},reject:u}});return t},n.exports=f},{"../crypto":32,"../key.js":45,"../packet":53,"../type/keyid.js":71}]},{},[44])(44)});