-
Notifications
You must be signed in to change notification settings - Fork 0
/
38.b0efce3f0e9121b3f61d.js
1 lines (1 loc) · 48.6 KB
/
38.b0efce3f0e9121b3f61d.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{14:function(r,t){},"6vPO":function(r,t,e){(function(t){const n=e("kX2E"),i=e("Z7Q3");var o=function(){};function s(r){return r.startsWith("int[")?"int256"+r.slice(3):"int"===r?"int256":r.startsWith("uint[")?"uint256"+r.slice(4):"uint"===r?"uint256":r.startsWith("fixed[")?"fixed128x128"+r.slice(5):"fixed"===r?"fixed128x128":r.startsWith("ufixed[")?"ufixed128x128"+r.slice(6):"ufixed"===r?"ufixed128x128":r}function a(r){return parseInt(/^\D+(\d+)$/.exec(r)[1],10)}function f(r){var t=/^\D+(\d+)x(\d+)$/.exec(r);return[parseInt(t[1],10),parseInt(t[2],10)]}function h(r){var t=r.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function u(r){var t=typeof r;if("string"===t)return n.isHexPrefixed(r)?new i(n.stripHexPrefix(r),16):new i(r,10);if("number"===t)return new i(r);if(r.toArray)return r;throw new Error("Argument is not a number")}function c(r){var t=/^(\w+)\((.*)\)$/.exec(r);if(3!==t.length)throw new Error("Invalid method signature");var e=/^(.+)\):\((.+)$/.exec(t[2]);if(null!==e&&3===e.length)return{method:t[1],args:e[1].split(","),retargs:e[2].split(",")};var n=t[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:t[1],args:n}}function y(r,e){var o,s,c,l;if("address"===r)return y("uint160",u(e));if("bool"===r)return y("uint8",e?1:0);if("string"===r)return y("bytes",t.from(e,"utf8"));if(g(r)){if(void 0===e.length)throw new Error("Not an array?");if("dynamic"!==(o=h(r))&&0!==o&&e.length>o)throw new Error("Elements exceed array size: "+o);for(l in c=[],r=r.slice(0,r.lastIndexOf("[")),"string"==typeof e&&(e=JSON.parse(e)),e)c.push(y(r,e[l]));if("dynamic"===o){var p=y("uint256",e.length);c.unshift(p)}return t.concat(c)}if("bytes"===r)return e=t.from(e),c=t.concat([y("uint256",e.length),e]),e.length%32!=0&&(c=t.concat([c,n.zeros(32-e.length%32)])),c;if(r.startsWith("bytes")){if((o=a(r))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return n.setLengthRight(e,32)}if(r.startsWith("uint")){if((o=a(r))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((s=u(e)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+s.bitLength());if(s<0)throw new Error("Supplied uint is negative");return s.toArrayLike(t,"be",32)}if(r.startsWith("int")){if((o=a(r))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((s=u(e)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+s.bitLength());return s.toTwos(256).toArrayLike(t,"be",32)}if(r.startsWith("ufixed")){if(o=f(r),(s=u(e))<0)throw new Error("Supplied ufixed is negative");return y("uint256",s.mul(new i(2).pow(new i(o[1]))))}if(r.startsWith("fixed"))return o=f(r),y("int256",u(e).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+r)}function l(r,e,n){var o,s,a,f;if("string"==typeof r&&(r=p(r)),"address"===r.name)return l(r.rawType,e,n).toArrayLike(t,"be",20).toString("hex");if("bool"===r.name)return l(r.rawType,e,n).toString()===new i(1).toString();if("string"===r.name){var h=l(r.rawType,e,n);return t.from(h,"utf8").toString()}if(r.isArray){for(a=[],o=r.size,"dynamic"===r.size&&(n=l("uint256",e,n).toNumber(),o=l("uint256",e,n).toNumber(),n+=32),f=0;f<o;f++){var u=l(r.subArray,e,n);a.push(u),n+=r.subArray.memoryUsage}return a}if("bytes"===r.name)return n=l("uint256",e,n).toNumber(),o=l("uint256",e,n).toNumber(),e.slice(n+32,n+32+o);if(r.name.startsWith("bytes"))return e.slice(n,n+r.size);if(r.name.startsWith("uint")){if((s=new i(e.slice(n,n+32),16,"be")).bitLength()>r.size)throw new Error("Decoded int exceeds width: "+r.size+" vs "+s.bitLength());return s}if(r.name.startsWith("int")){if((s=new i(e.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>r.size)throw new Error("Decoded uint exceeds width: "+r.size+" vs "+s.bitLength());return s}if(r.name.startsWith("ufixed")){if(o=new i(2).pow(new i(r.size[1])),!(s=l("uint256",e,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return s.div(o)}if(r.name.startsWith("fixed")){if(o=new i(2).pow(new i(r.size[1])),!(s=l("int256",e,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return s.div(o)}throw new Error("Unsupported or invalid type: "+r.name)}function p(r){var t,e,n;if(g(r)){t=h(r);var i=r.slice(0,r.lastIndexOf("["));return i=p(i),{isArray:!0,name:r,size:t,memoryUsage:"dynamic"===t?32:i.memoryUsage*t,subArray:i}}switch(r){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(e={rawType:n,name:r,memoryUsage:32},r.startsWith("bytes")&&"bytes"!==r||r.startsWith("uint")||r.startsWith("int")?e.size=a(r):(r.startsWith("ufixed")||r.startsWith("fixed"))&&(e.size=f(r)),r.startsWith("bytes")&&"bytes"!==r&&(e.size<1||e.size>32))throw new Error("Invalid bytes<N> width: "+e.size);if((r.startsWith("uint")||r.startsWith("int"))&&(e.size%8||e.size<8||e.size>256))throw new Error("Invalid int/uint<N> width: "+e.size);return e}function d(r){return"string"===r||"bytes"===r||"dynamic"===h(r)}function g(r){return r.lastIndexOf("]")===r.length-1}function w(r,t){return r.startsWith("address")||r.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}o.eventID=function(r,e){var i=r+"("+e.map(s).join(",")+")";return n.keccak256(t.from(i))},o.methodID=function(r,t){return o.eventID(r,t).slice(0,4)},o.rawEncode=function(r,e){var n=[],i=[],o=0;r.forEach(function(r){if(g(r)){var t=h(r);o+="dynamic"!==t?32*t:32}else o+=32});for(var a=0;a<r.length;a++){var f=s(r[a]),u=y(f,e[a]);d(f)?(n.push(y("uint256",o)),i.push(u),o+=u.length):n.push(u)}return t.concat(n.concat(i))},o.rawDecode=function(r,e){var n=[];e=t.from(e);for(var i=0,o=0;o<r.length;o++){var a=p(s(r[o])),f=l(a,e,i);i+=a.memoryUsage,n.push(f)}return n},o.simpleEncode=function(r){var e=Array.prototype.slice.call(arguments).slice(1),n=c(r);if(e.length!==n.args.length)throw new Error("Argument count mismatch");return t.concat([o.methodID(n.method,n.args),o.rawEncode(n.args,e)])},o.simpleDecode=function(r,t){var e=c(r);if(!e.retargs)throw new Error("No return values in method");return o.rawDecode(e.retargs,t)},o.stringify=function(r,t){var e=[];for(var n in r){var i=r[n],o=t[n];o=/^[^\[]+\[.*\]$/.test(i)?o.map(function(r){return w(i,r)}).join(", "):w(i,o),e.push(o)}return e},o.solidityHexValue=function(r,e,i){var s,f;if(g(r)){var c=r.replace(/\[.*?\]/,"");if(!g(c)){var y=h(r);if("dynamic"!==y&&0!==y&&e.length>y)throw new Error("Elements exceed array size: "+y)}var l=e.map(function(r){return o.solidityHexValue(c,r,256)});return t.concat(l)}if("bytes"===r)return e;if("string"===r)return t.from(e,"utf8");if("bool"===r){i=i||8;var p=Array(i/4).join("0");return t.from(e?p+"1":p+"0","hex")}if("address"===r){var d=20;return i&&(d=i/8),n.setLengthLeft(e,d)}if(r.startsWith("bytes")){if((s=a(r))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);return n.setLengthRight(e,s)}if(r.startsWith("uint")){if((s=a(r))%8||s<8||s>256)throw new Error("Invalid uint<N> width: "+s);if((f=u(e)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+f.bitLength());return f.toArrayLike(t,"be",(i=i||s)/8)}if(r.startsWith("int")){if((s=a(r))%8||s<8||s>256)throw new Error("Invalid int<N> width: "+s);if((f=u(e)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+f.bitLength());return i=i||s,f.toTwos(s).toArrayLike(t,"be",i/8)}throw new Error("Unsupported or invalid type: "+r)},o.solidityPack=function(r,e){if(r.length!==e.length)throw new Error("Number of types are not matching the values");for(var n=[],i=0;i<r.length;i++){var a=s(r[i]);n.push(o.solidityHexValue(a,e[i],null))}return t.concat(n)},o.soliditySHA3=function(r,t){return n.keccak256(o.solidityPack(r,t))},o.soliditySHA256=function(r,t){return n.sha256(o.solidityPack(r,t))},o.solidityRIPEMD160=function(r,t){return n.ripemd160(o.solidityPack(r,t),!0)},o.fromSerpent=function(r){for(var t,e=[],n=0;n<r.length;n++){var i=r[n];if("s"===i)e.push("bytes");else if("b"===i){for(var o="bytes",s=n+1;s<r.length&&(t=r[s])>="0"&&t<="9";)o+=r[s]-"0",s++;n=s-1,e.push(o)}else if("i"===i)e.push("int256");else{if("a"!==i)throw new Error("Unsupported or invalid type: "+i);e.push("int256[]")}}return e},o.toSerpent=function(r){for(var t=[],e=0;e<r.length;e++){var n=r[e];if("bytes"===n)t.push("s");else if(n.startsWith("bytes"))t.push("b"+a(n));else if("int256"===n)t.push("i");else{if("int256[]"!==n)throw new Error("Unsupported or invalid type: "+n);t.push("a")}}return t.join("")},r.exports=o}).call(this,e("tjlA").Buffer)},Qnqb:function(r,t,e){(function(t){!function(t,e){"use strict";r.exports?r.exports=e():(t.nacl||(t.nacl={}),t.nacl.util=e())}(this,function(){"use strict";var r={};function e(r){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(r))throw new TypeError("invalid encoding")}return r.decodeUTF8=function(r){if("string"!=typeof r)throw new TypeError("expected string");var t,e=unescape(encodeURIComponent(r)),n=new Uint8Array(e.length);for(t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n},r.encodeUTF8=function(r){var t,e=[];for(t=0;t<r.length;t++)e.push(String.fromCharCode(r[t]));return decodeURIComponent(escape(e.join("")))},"undefined"==typeof atob?void 0!==t.from?(r.encodeBase64=function(r){return t.from(r).toString("base64")},r.decodeBase64=function(r){return e(r),new Uint8Array(Array.prototype.slice.call(t.from(r,"base64"),0))}):(r.encodeBase64=function(r){return new t(r).toString("base64")},r.decodeBase64=function(r){return e(r),new Uint8Array(Array.prototype.slice.call(new t(r,"base64"),0))}):(r.encodeBase64=function(r){var t,e=[],n=r.length;for(t=0;t<n;t++)e.push(String.fromCharCode(r[t]));return btoa(e.join(""))},r.decodeBase64=function(r){e(r);var t,n=atob(r),i=new Uint8Array(n.length);for(t=0;t<n.length;t++)i[t]=n.charCodeAt(t);return i}),r})}).call(this,e("tjlA").Buffer)},da9Z:function(r,t,e){"use strict";(function(r){var n=this&&this.__createBinding||(Object.create?function(r,t,e,n){void 0===n&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){void 0===n&&(n=e),r[n]=t[e]}),i=this&&this.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(null!=r)for(var e in r)"default"!==e&&Object.prototype.hasOwnProperty.call(r,e)&&n(t,r,e);return i(t,r),t};Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature_v4=t.recoverTypedSignature=t.signTypedData_v4=t.signTypedData=t.recoverTypedMessage=t.signTypedMessage=t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=t.recoverTypedSignatureLegacy=t.signTypedDataLegacy=t.typedSignatureHash=t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=t.normalize=t.concatSig=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=void 0;const s=o(e("tnHP")),a=o(e("ga3E")),f=o(e("rMXL")),h=o(e("Qnqb")),u={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]};t.TYPED_MESSAGE_SCHEMA=u;const c={encodeData(t,e,n,i=!0){const o=["bytes32"],f=[this.hashType(t,n)];if(i){const h=(t,e,o)=>{if(void 0!==n[e])return["bytes32",null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":s.keccak(this.encodeData(e,o,n,i))];if(void 0===o)throw new Error(`missing value for field ${t} of type ${e}`);if("bytes"===e)return["bytes32",s.keccak(o)];if("string"===e)return"string"==typeof o&&(o=r.from(o,"utf8")),["bytes32",s.keccak(o)];if(e.lastIndexOf("]")===e.length-1){const r=e.slice(0,e.lastIndexOf("[")),n=o.map(e=>h(t,r,e));return["bytes32",s.keccak(a.rawEncode(n.map(([r])=>r),n.map(([,r])=>r)))]}return[e,o]};for(const r of n[t]){const[t,n]=h(r.name,r.type,e[r.name]);o.push(t),f.push(n)}}else for(const a of n[t]){let t=e[a.name];if(void 0!==t)if("bytes"===a.type)o.push("bytes32"),t=s.keccak(t),f.push(t);else if("string"===a.type)o.push("bytes32"),"string"==typeof t&&(t=r.from(t,"utf8")),t=s.keccak(t),f.push(t);else if(void 0!==n[a.type])o.push("bytes32"),t=s.keccak(this.encodeData(a.type,t,n,i)),f.push(t);else{if(a.type.lastIndexOf("]")===a.type.length-1)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");o.push(a.type),f.push(t)}}return a.rawEncode(o,f)},encodeType(r,t){let e="",n=this.findTypeDependencies(r,t).filter(t=>t!==r);n=[r].concat(n.sort());for(const i of n){if(!t[i])throw new Error(`No type definition specified: ${i}`);e+=`${i}(${t[i].map(({name:r,type:t})=>`${t} ${r}`).join(",")})`}return e},findTypeDependencies(r,t,e=[]){if([r]=r.match(/^\w*/u),e.includes(r)||void 0===t[r])return e;e.push(r);for(const n of t[r])for(const r of this.findTypeDependencies(n.type,t,e))!e.includes(r)&&e.push(r);return e},hashStruct(r,t,e,n=!0){return s.keccak(this.encodeData(r,t,e,n))},hashType(r,t){return s.keccak(this.encodeType(r,t))},sanitizeData(r){const t={};for(const e in u.properties)r[e]&&(t[e]=r[e]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},sign(t,e=!0){const n=this.sanitizeData(t),i=[r.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,e)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,e)),s.keccak(r.concat(i))}};function y(r,t,e){const n=s.fromSigned(t),i=s.fromSigned(e),o=s.bufferToInt(r),a=S(s.toUnsigned(n).toString("hex"),64),f=S(s.toUnsigned(i).toString("hex"),64),h=s.stripHexPrefix(s.intToHex(o));return s.addHexPrefix(a.concat(f,h)).toString("hex")}function l(r,t){const e=x(t.data),n=s.ecsign(e,r);return s.bufferToHex(y(n.v,n.r,n.s))}function p(r){const t=E(x(r.data),r.sig),e=s.publicToAddress(t);return s.bufferToHex(e)}function d(r,t,e){switch(e){case"x25519-xsalsa20-poly1305":{if("string"!=typeof t.data)throw new Error('Cannot detect secret message, message params should be of the form {data: "secret message"} ');const e=f.box.keyPair();let i;try{i=h.decodeBase64(r)}catch(n){throw new Error("Bad public key")}const o=h.decodeUTF8(t.data),s=f.randomBytes(f.box.nonceLength),a=f.box(o,s,i,e.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:h.encodeBase64(s),ephemPublicKey:h.encodeBase64(e.publicKey),ciphertext:h.encodeBase64(a)}}default:throw new Error("Encryption type/version not supported")}}function g(r,t){switch(r.version){case"x25519-xsalsa20-poly1305":{const n=_(t),i=f.box.keyPair.fromSecretKey(n).secretKey,o=h.decodeBase64(r.nonce),s=h.decodeBase64(r.ciphertext),a=h.decodeBase64(r.ephemPublicKey),u=f.box.open(s,o,a,i);let c;try{c=h.encodeUTF8(u)}catch(e){throw new Error("Decryption failed.")}if(c)return c;throw new Error("Decryption failed.")}default:throw new Error("Encryption type/version not supported.")}}function w(r,t){const e=c.sign(t.data,!1),n=s.ecsign(e,r);return s.bufferToHex(y(n.v,n.r,n.s))}function b(r,t){const e=c.sign(t.data),n=s.ecsign(e,r);return s.bufferToHex(y(n.v,n.r,n.s))}function v(r){const t=E(c.sign(r.data,!1),r.sig),e=s.publicToAddress(t);return s.bufferToHex(e)}function m(r){const t=E(c.sign(r.data),r.sig),e=s.publicToAddress(t);return s.bufferToHex(e)}function x(r){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof r||!("length"in r)||!r.length)throw t;const e=r.map(function(r){return"bytes"===r.type?s.toBuffer(r.value):r.value}),n=r.map(function(r){return r.type}),i=r.map(function(r){if(!r.name)throw t;return`${r.type} ${r.name}`});return a.soliditySHA3(["bytes32","bytes32"],[a.soliditySHA3(new Array(r.length).fill("string"),i),a.soliditySHA3(n,e)])}function E(r,t){const e=s.toBuffer(t),n=s.fromRpcSig(e);return s.ecrecover(r,n.v,n.r,n.s)}function A(r){const t=s.toBuffer(r.data);return E(s.hashPersonalMessage(t),r.sig)}function S(r,t){let e=`${r}`;for(;e.length<t;)e=`0${e}`;return e}function _(t){const e=r.from(t,"hex").toString("base64");return h.decodeBase64(e)}t.TypedDataUtils=c,t.concatSig=y,t.normalize=function(r){if(r){if("number"==typeof r){const t=s.toBuffer(r);r=s.bufferToHex(t)}if("string"!=typeof r){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof r}: ${r}`,new Error(t)}return s.addHexPrefix(r.toLowerCase())}},t.personalSign=function(r,t){const e=s.toBuffer(t.data),n=s.hashPersonalMessage(e),i=s.ecsign(n,r);return s.bufferToHex(y(i.v,i.r,i.s))},t.recoverPersonalSignature=function(r){const t=A(r),e=s.publicToAddress(t);return s.bufferToHex(e)},t.extractPublicKey=function(r){return`0x${A(r).toString("hex")}`},t.typedSignatureHash=function(r){const t=x(r);return s.bufferToHex(t)},t.signTypedDataLegacy=l,t.recoverTypedSignatureLegacy=p,t.encrypt=d,t.encryptSafely=function(t,e,n){const{data:i}=e;if(!i)throw new Error("Cannot encrypt empty msg.data");if("object"==typeof i&&"toJSON"in i)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const o={data:i,padding:""},s=r.byteLength(JSON.stringify(o),"utf-8")%2048;let a=0;return s>0&&(a=2048-s-16),o.padding="0".repeat(a),d(t,{data:JSON.stringify(o)},n)},t.decrypt=g,t.decryptSafely=function(r,t){return JSON.parse(g(r,t)).data},t.getEncryptionPublicKey=function(r){const t=_(r),e=f.box.keyPair.fromSecretKey(t).publicKey;return h.encodeBase64(e)},t.signTypedMessage=function(r,t,e="V4"){switch(e){case"V1":return l(r,t);case"V3":return w(r,t);case"V4":default:return b(r,t)}},t.recoverTypedMessage=function(r,t="V4"){switch(t){case"V1":return p(r);case"V3":return v(r);case"V4":default:return m(r)}},t.signTypedData=w,t.signTypedData_v4=b,t.recoverTypedSignature=v,t.recoverTypedSignature_v4=m}).call(this,e("tjlA").Buffer)},ga3E:function(r,t,e){r.exports=e("6vPO")},rMXL:function(r,t,e){!function(r){"use strict";var t=function(r){var t,e=new Float64Array(16);if(r)for(t=0;t<r.length;t++)e[t]=r[t];return e},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=t(),a=t([1]),f=t([56129,1]),h=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),l=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(r,t,e,n){r[t]=e>>24&255,r[t+1]=e>>16&255,r[t+2]=e>>8&255,r[t+3]=255&e,r[t+4]=n>>24&255,r[t+5]=n>>16&255,r[t+6]=n>>8&255,r[t+7]=255&n}function d(r,t,e,n,i){var o,s=0;for(o=0;o<i;o++)s|=r[t+o]^e[n+o];return(1&s-1>>>8)-1}function g(r,t,e,n){return d(r,t,e,n,16)}function w(r,t,e,n){return d(r,t,e,n,32)}function b(r,t,e,n){!function(r,t,e,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,a=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,f=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,h=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&e[16]|(255&e[17])<<8|(255&e[18])<<16|(255&e[19])<<24,w=255&e[20]|(255&e[21])<<8|(255&e[22])<<16|(255&e[23])<<24,b=255&e[24]|(255&e[25])<<8|(255&e[26])<<16|(255&e[27])<<24,v=255&e[28]|(255&e[29])<<8|(255&e[30])<<16|(255&e[31])<<24,m=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=o,E=s,A=a,S=f,_=h,U=u,T=c,k=y,M=l,B=p,L=d,P=g,z=w,D=b,I=v,K=m,N=0;N<20;N+=2)x^=(i=(z^=(i=(M^=(i=(_^=(i=x+z|0)<<7|i>>>25)+x|0)<<9|i>>>23)+_|0)<<13|i>>>19)+M|0)<<18|i>>>14,U^=(i=(E^=(i=(D^=(i=(B^=(i=U+E|0)<<7|i>>>25)+U|0)<<9|i>>>23)+B|0)<<13|i>>>19)+D|0)<<18|i>>>14,L^=(i=(T^=(i=(A^=(i=(I^=(i=L+T|0)<<7|i>>>25)+L|0)<<9|i>>>23)+I|0)<<13|i>>>19)+A|0)<<18|i>>>14,K^=(i=(P^=(i=(k^=(i=(S^=(i=K+P|0)<<7|i>>>25)+K|0)<<9|i>>>23)+S|0)<<13|i>>>19)+k|0)<<18|i>>>14,x^=(i=(S^=(i=(A^=(i=(E^=(i=x+S|0)<<7|i>>>25)+x|0)<<9|i>>>23)+E|0)<<13|i>>>19)+A|0)<<18|i>>>14,U^=(i=(_^=(i=(k^=(i=(T^=(i=U+_|0)<<7|i>>>25)+U|0)<<9|i>>>23)+T|0)<<13|i>>>19)+k|0)<<18|i>>>14,L^=(i=(B^=(i=(M^=(i=(P^=(i=L+B|0)<<7|i>>>25)+L|0)<<9|i>>>23)+P|0)<<13|i>>>19)+M|0)<<18|i>>>14,K^=(i=(I^=(i=(D^=(i=(z^=(i=K+I|0)<<7|i>>>25)+K|0)<<9|i>>>23)+z|0)<<13|i>>>19)+D|0)<<18|i>>>14;E=E+s|0,A=A+a|0,S=S+f|0,_=_+h|0,U=U+u|0,T=T+c|0,k=k+y|0,M=M+l|0,B=B+p|0,L=L+d|0,P=P+g|0,z=z+w|0,D=D+b|0,I=I+v|0,K=K+m|0,r[0]=(x=x+o|0)>>>0&255,r[1]=x>>>8&255,r[2]=x>>>16&255,r[3]=x>>>24&255,r[4]=E>>>0&255,r[5]=E>>>8&255,r[6]=E>>>16&255,r[7]=E>>>24&255,r[8]=A>>>0&255,r[9]=A>>>8&255,r[10]=A>>>16&255,r[11]=A>>>24&255,r[12]=S>>>0&255,r[13]=S>>>8&255,r[14]=S>>>16&255,r[15]=S>>>24&255,r[16]=_>>>0&255,r[17]=_>>>8&255,r[18]=_>>>16&255,r[19]=_>>>24&255,r[20]=U>>>0&255,r[21]=U>>>8&255,r[22]=U>>>16&255,r[23]=U>>>24&255,r[24]=T>>>0&255,r[25]=T>>>8&255,r[26]=T>>>16&255,r[27]=T>>>24&255,r[28]=k>>>0&255,r[29]=k>>>8&255,r[30]=k>>>16&255,r[31]=k>>>24&255,r[32]=M>>>0&255,r[33]=M>>>8&255,r[34]=M>>>16&255,r[35]=M>>>24&255,r[36]=B>>>0&255,r[37]=B>>>8&255,r[38]=B>>>16&255,r[39]=B>>>24&255,r[40]=L>>>0&255,r[41]=L>>>8&255,r[42]=L>>>16&255,r[43]=L>>>24&255,r[44]=P>>>0&255,r[45]=P>>>8&255,r[46]=P>>>16&255,r[47]=P>>>24&255,r[48]=z>>>0&255,r[49]=z>>>8&255,r[50]=z>>>16&255,r[51]=z>>>24&255,r[52]=D>>>0&255,r[53]=D>>>8&255,r[54]=D>>>16&255,r[55]=D>>>24&255,r[56]=I>>>0&255,r[57]=I>>>8&255,r[58]=I>>>16&255,r[59]=I>>>24&255,r[60]=K>>>0&255,r[61]=K>>>8&255,r[62]=K>>>16&255,r[63]=K>>>24&255}(r,t,e,n)}function v(r,t,e,n){!function(r,t,e,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,a=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,f=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,h=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&e[16]|(255&e[17])<<8|(255&e[18])<<16|(255&e[19])<<24,w=255&e[20]|(255&e[21])<<8|(255&e[22])<<16|(255&e[23])<<24,b=255&e[24]|(255&e[25])<<8|(255&e[26])<<16|(255&e[27])<<24,v=255&e[28]|(255&e[29])<<8|(255&e[30])<<16|(255&e[31])<<24,m=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=0;x<20;x+=2)o^=(i=(w^=(i=(l^=(i=(h^=(i=o+w|0)<<7|i>>>25)+o|0)<<9|i>>>23)+h|0)<<13|i>>>19)+l|0)<<18|i>>>14,u^=(i=(s^=(i=(b^=(i=(p^=(i=u+s|0)<<7|i>>>25)+u|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,d^=(i=(c^=(i=(a^=(i=(v^=(i=d+c|0)<<7|i>>>25)+d|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,m^=(i=(g^=(i=(y^=(i=(f^=(i=m+g|0)<<7|i>>>25)+m|0)<<9|i>>>23)+f|0)<<13|i>>>19)+y|0)<<18|i>>>14,o^=(i=(f^=(i=(a^=(i=(s^=(i=o+f|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,u^=(i=(h^=(i=(y^=(i=(c^=(i=u+h|0)<<7|i>>>25)+u|0)<<9|i>>>23)+c|0)<<13|i>>>19)+y|0)<<18|i>>>14,d^=(i=(p^=(i=(l^=(i=(g^=(i=d+p|0)<<7|i>>>25)+d|0)<<9|i>>>23)+g|0)<<13|i>>>19)+l|0)<<18|i>>>14,m^=(i=(v^=(i=(b^=(i=(w^=(i=m+v|0)<<7|i>>>25)+m|0)<<9|i>>>23)+w|0)<<13|i>>>19)+b|0)<<18|i>>>14;r[0]=o>>>0&255,r[1]=o>>>8&255,r[2]=o>>>16&255,r[3]=o>>>24&255,r[4]=u>>>0&255,r[5]=u>>>8&255,r[6]=u>>>16&255,r[7]=u>>>24&255,r[8]=d>>>0&255,r[9]=d>>>8&255,r[10]=d>>>16&255,r[11]=d>>>24&255,r[12]=m>>>0&255,r[13]=m>>>8&255,r[14]=m>>>16&255,r[15]=m>>>24&255,r[16]=c>>>0&255,r[17]=c>>>8&255,r[18]=c>>>16&255,r[19]=c>>>24&255,r[20]=y>>>0&255,r[21]=y>>>8&255,r[22]=y>>>16&255,r[23]=y>>>24&255,r[24]=l>>>0&255,r[25]=l>>>8&255,r[26]=l>>>16&255,r[27]=l>>>24&255,r[28]=p>>>0&255,r[29]=p>>>8&255,r[30]=p>>>16&255,r[31]=p>>>24&255}(r,t,e,n)}var m=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function x(r,t,e,n,i,o,s){var a,f,h=new Uint8Array(16),u=new Uint8Array(64);for(f=0;f<16;f++)h[f]=0;for(f=0;f<8;f++)h[f]=o[f];for(;i>=64;){for(b(u,h,s,m),f=0;f<64;f++)r[t+f]=e[n+f]^u[f];for(a=1,f=8;f<16;f++)h[f]=255&(a=a+(255&h[f])|0),a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(b(u,h,s,m),f=0;f<i;f++)r[t+f]=e[n+f]^u[f];return 0}function E(r,t,e,n,i){var o,s,a=new Uint8Array(16),f=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;e>=64;){for(b(f,a,i,m),s=0;s<64;s++)r[t+s]=f[s];for(o=1,s=8;s<16;s++)a[s]=255&(o=o+(255&a[s])|0),o>>>=8;e-=64,t+=64}if(e>0)for(b(f,a,i,m),s=0;s<e;s++)r[t+s]=f[s];return 0}function A(r,t,e,n,i){var o=new Uint8Array(32);v(o,n,i,m);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return E(r,t,e,s,o)}function S(r,t,e,n,i,o,s){var a=new Uint8Array(32);v(a,o,s,m);for(var f=new Uint8Array(8),h=0;h<8;h++)f[h]=o[h+16];return x(r,t,e,n,i,f,a)}var _=function(r){var t,e,n,i,o,s,a,f;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,this.r[0]=8191&(t=255&r[0]|(255&r[1])<<8),this.r[1]=8191&(t>>>13|(e=255&r[2]|(255&r[3])<<8)<<3),this.r[2]=7939&(e>>>10|(n=255&r[4]|(255&r[5])<<8)<<6),this.r[3]=8191&(n>>>7|(i=255&r[6]|(255&r[7])<<8)<<9),this.r[4]=255&(i>>>4|(o=255&r[8]|(255&r[9])<<8)<<12),this.r[5]=o>>>1&8190,this.r[6]=8191&(o>>>14|(s=255&r[10]|(255&r[11])<<8)<<2),this.r[7]=8065&(s>>>11|(a=255&r[12]|(255&r[13])<<8)<<5),this.r[8]=8191&(a>>>8|(f=255&r[14]|(255&r[15])<<8)<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};function U(r,t,e,n,i,o){var s=new _(o);return s.update(e,n,i),s.finish(r,t),0}function T(r,t,e,n,i,o){var s=new Uint8Array(16);return U(s,0,e,n,i,o),g(r,t,s,0)}function k(r,t,e,n,i){var o;if(e<32)return-1;for(S(r,0,t,0,e,n,i),U(r,16,r,32,e-32,r),o=0;o<16;o++)r[o]=0;return 0}function M(r,t,e,n,i){var o,s=new Uint8Array(32);if(e<32)return-1;if(A(s,0,32,n,i),0!==T(t,16,t,32,e-32,s))return-1;for(S(r,0,t,0,e,n,i),o=0;o<32;o++)r[o]=0;return 0}function B(r,t){var e;for(e=0;e<16;e++)r[e]=0|t[e]}function L(r){var t,e,n=1;for(t=0;t<16;t++)e=r[t]+n+65535,n=Math.floor(e/65536),r[t]=e-65536*n;r[0]+=n-1+37*(n-1)}function P(r,t,e){for(var n,i=~(e-1),o=0;o<16;o++)r[o]^=n=i&(r[o]^t[o]),t[o]^=n}function z(r,e){var n,i,o,s=t(),a=t();for(n=0;n<16;n++)a[n]=e[n];for(L(a),L(a),L(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,P(a,s,1-o)}for(n=0;n<16;n++)r[2*n]=255&a[n],r[2*n+1]=a[n]>>8}function D(r,t){var e=new Uint8Array(32),n=new Uint8Array(32);return z(e,r),z(n,t),w(e,0,n,0)}function I(r){var t=new Uint8Array(32);return z(t,r),1&t[0]}function K(r,t){var e;for(e=0;e<16;e++)r[e]=t[2*e]+(t[2*e+1]<<8);r[15]&=32767}function N(r,t,e){for(var n=0;n<16;n++)r[n]=t[n]+e[n]}function O(r,t,e){for(var n=0;n<16;n++)r[n]=t[n]-e[n]}function H(r,t,e){var n,i,o=0,s=0,a=0,f=0,h=0,u=0,c=0,y=0,l=0,p=0,d=0,g=0,w=0,b=0,v=0,m=0,x=0,E=0,A=0,S=0,_=0,U=0,T=0,k=0,M=0,B=0,L=0,P=0,z=0,D=0,I=0,K=e[0],N=e[1],O=e[2],H=e[3],W=e[4],j=e[5],Y=e[6],C=e[7],$=e[8],R=e[9],V=e[10],Z=e[11],F=e[12],J=e[13],G=e[14],q=e[15];o+=(n=t[0])*K,s+=n*N,a+=n*O,f+=n*H,h+=n*W,u+=n*j,c+=n*Y,y+=n*C,l+=n*$,p+=n*R,d+=n*V,g+=n*Z,w+=n*F,b+=n*J,v+=n*G,m+=n*q,s+=(n=t[1])*K,a+=n*N,f+=n*O,h+=n*H,u+=n*W,c+=n*j,y+=n*Y,l+=n*C,p+=n*$,d+=n*R,g+=n*V,w+=n*Z,b+=n*F,v+=n*J,m+=n*G,x+=n*q,a+=(n=t[2])*K,f+=n*N,h+=n*O,u+=n*H,c+=n*W,y+=n*j,l+=n*Y,p+=n*C,d+=n*$,g+=n*R,w+=n*V,b+=n*Z,v+=n*F,m+=n*J,x+=n*G,E+=n*q,f+=(n=t[3])*K,h+=n*N,u+=n*O,c+=n*H,y+=n*W,l+=n*j,p+=n*Y,d+=n*C,g+=n*$,w+=n*R,b+=n*V,v+=n*Z,m+=n*F,x+=n*J,E+=n*G,A+=n*q,h+=(n=t[4])*K,u+=n*N,c+=n*O,y+=n*H,l+=n*W,p+=n*j,d+=n*Y,g+=n*C,w+=n*$,b+=n*R,v+=n*V,m+=n*Z,x+=n*F,E+=n*J,A+=n*G,S+=n*q,u+=(n=t[5])*K,c+=n*N,y+=n*O,l+=n*H,p+=n*W,d+=n*j,g+=n*Y,w+=n*C,b+=n*$,v+=n*R,m+=n*V,x+=n*Z,E+=n*F,A+=n*J,S+=n*G,_+=n*q,c+=(n=t[6])*K,y+=n*N,l+=n*O,p+=n*H,d+=n*W,g+=n*j,w+=n*Y,b+=n*C,v+=n*$,m+=n*R,x+=n*V,E+=n*Z,A+=n*F,S+=n*J,_+=n*G,U+=n*q,y+=(n=t[7])*K,l+=n*N,p+=n*O,d+=n*H,g+=n*W,w+=n*j,b+=n*Y,v+=n*C,m+=n*$,x+=n*R,E+=n*V,A+=n*Z,S+=n*F,_+=n*J,U+=n*G,T+=n*q,l+=(n=t[8])*K,p+=n*N,d+=n*O,g+=n*H,w+=n*W,b+=n*j,v+=n*Y,m+=n*C,x+=n*$,E+=n*R,A+=n*V,S+=n*Z,_+=n*F,U+=n*J,T+=n*G,k+=n*q,p+=(n=t[9])*K,d+=n*N,g+=n*O,w+=n*H,b+=n*W,v+=n*j,m+=n*Y,x+=n*C,E+=n*$,A+=n*R,S+=n*V,_+=n*Z,U+=n*F,T+=n*J,k+=n*G,M+=n*q,d+=(n=t[10])*K,g+=n*N,w+=n*O,b+=n*H,v+=n*W,m+=n*j,x+=n*Y,E+=n*C,A+=n*$,S+=n*R,_+=n*V,U+=n*Z,T+=n*F,k+=n*J,M+=n*G,B+=n*q,g+=(n=t[11])*K,w+=n*N,b+=n*O,v+=n*H,m+=n*W,x+=n*j,E+=n*Y,A+=n*C,S+=n*$,_+=n*R,U+=n*V,T+=n*Z,k+=n*F,M+=n*J,B+=n*G,L+=n*q,w+=(n=t[12])*K,b+=n*N,v+=n*O,m+=n*H,x+=n*W,E+=n*j,A+=n*Y,S+=n*C,_+=n*$,U+=n*R,T+=n*V,k+=n*Z,M+=n*F,B+=n*J,L+=n*G,P+=n*q,b+=(n=t[13])*K,v+=n*N,m+=n*O,x+=n*H,E+=n*W,A+=n*j,S+=n*Y,_+=n*C,U+=n*$,T+=n*R,k+=n*V,M+=n*Z,B+=n*F,L+=n*J,P+=n*G,z+=n*q,v+=(n=t[14])*K,m+=n*N,x+=n*O,E+=n*H,A+=n*W,S+=n*j,_+=n*Y,U+=n*C,T+=n*$,k+=n*R,M+=n*V,B+=n*Z,L+=n*F,P+=n*J,z+=n*G,D+=n*q,m+=(n=t[15])*K,s+=38*(E+=n*O),a+=38*(A+=n*H),f+=38*(S+=n*W),h+=38*(_+=n*j),u+=38*(U+=n*Y),c+=38*(T+=n*C),y+=38*(k+=n*$),l+=38*(M+=n*R),p+=38*(B+=n*V),d+=38*(L+=n*Z),g+=38*(P+=n*F),w+=38*(z+=n*J),b+=38*(D+=n*G),v+=38*(I+=n*q),o=(n=(o+=38*(x+=n*N))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),r[0]=o+=i-1+37*(i-1),r[1]=s,r[2]=a,r[3]=f,r[4]=h,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=p,r[10]=d,r[11]=g,r[12]=w,r[13]=b,r[14]=v,r[15]=m}function W(r,t){H(r,t,t)}function j(r,e){var n,i=t();for(n=0;n<16;n++)i[n]=e[n];for(n=253;n>=0;n--)W(i,i),2!==n&&4!==n&&H(i,i,e);for(n=0;n<16;n++)r[n]=i[n]}function Y(r,e){var n,i=t();for(n=0;n<16;n++)i[n]=e[n];for(n=250;n>=0;n--)W(i,i),1!==n&&H(i,i,e);for(n=0;n<16;n++)r[n]=i[n]}function C(r,e,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),h=t(),u=t(),c=t(),y=t(),l=t(),p=t();for(o=0;o<31;o++)s[o]=e[o];for(s[31]=127&e[31]|64,s[0]&=248,K(a,n),o=0;o<16;o++)u[o]=a[o],y[o]=h[o]=c[o]=0;for(h[0]=y[0]=1,o=254;o>=0;--o)P(h,u,i=s[o>>>3]>>>(7&o)&1),P(c,y,i),N(l,h,c),O(h,h,c),N(c,u,y),O(u,u,y),W(y,l),W(p,h),H(h,c,h),H(c,u,l),N(l,h,c),O(h,h,c),W(u,h),O(c,y,p),H(h,c,f),N(h,h,y),H(c,c,h),H(h,y,p),H(y,u,a),W(u,l),P(h,u,i),P(c,y,i);for(o=0;o<16;o++)a[o+16]=h[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=y[o];var d=a.subarray(32),g=a.subarray(16);return j(d,d),H(g,g,d),z(r,g),0}function $(r,t){return C(r,t,o)}function R(r,t){return n(t,32),$(r,t)}function V(r,t,e){var n=new Uint8Array(32);return C(n,e,t),v(r,i,n,m)}_.prototype.blocks=function(r,t,e){for(var n,i,o,s,a,f,h,u,c,y,l,p,d,g,w,b,v,m,x,E=this.fin?0:2048,A=this.h[0],S=this.h[1],_=this.h[2],U=this.h[3],T=this.h[4],k=this.h[5],M=this.h[6],B=this.h[7],L=this.h[8],P=this.h[9],z=this.r[0],D=this.r[1],I=this.r[2],K=this.r[3],N=this.r[4],O=this.r[5],H=this.r[6],W=this.r[7],j=this.r[8],Y=this.r[9];e>=16;)y=c=0,y+=(A+=8191&(n=255&r[t+0]|(255&r[t+1])<<8))*z,y+=(S+=8191&(n>>>13|(i=255&r[t+2]|(255&r[t+3])<<8)<<3))*(5*Y),y+=(_+=8191&(i>>>10|(o=255&r[t+4]|(255&r[t+5])<<8)<<6))*(5*j),y+=(U+=8191&(o>>>7|(s=255&r[t+6]|(255&r[t+7])<<8)<<9))*(5*W),c=(y+=(T+=8191&(s>>>4|(a=255&r[t+8]|(255&r[t+9])<<8)<<12))*(5*H))>>>13,y&=8191,y+=(k+=a>>>1&8191)*(5*O),y+=(M+=8191&(a>>>14|(f=255&r[t+10]|(255&r[t+11])<<8)<<2))*(5*N),y+=(B+=8191&(f>>>11|(h=255&r[t+12]|(255&r[t+13])<<8)<<5))*(5*K),y+=(L+=8191&(h>>>8|(u=255&r[t+14]|(255&r[t+15])<<8)<<8))*(5*I),l=c+=(y+=(P+=u>>>5|E)*(5*D))>>>13,l+=A*D,l+=S*z,l+=_*(5*Y),l+=U*(5*j),c=(l+=T*(5*W))>>>13,l&=8191,l+=k*(5*H),l+=M*(5*O),l+=B*(5*N),l+=L*(5*K),c+=(l+=P*(5*I))>>>13,l&=8191,p=c,p+=A*I,p+=S*D,p+=_*z,p+=U*(5*Y),c=(p+=T*(5*j))>>>13,p&=8191,p+=k*(5*W),p+=M*(5*H),p+=B*(5*O),p+=L*(5*N),d=c+=(p+=P*(5*K))>>>13,d+=A*K,d+=S*I,d+=_*D,d+=U*z,c=(d+=T*(5*Y))>>>13,d&=8191,d+=k*(5*j),d+=M*(5*W),d+=B*(5*H),d+=L*(5*O),g=c+=(d+=P*(5*N))>>>13,g+=A*N,g+=S*K,g+=_*I,g+=U*D,c=(g+=T*z)>>>13,g&=8191,g+=k*(5*Y),g+=M*(5*j),g+=B*(5*W),g+=L*(5*H),w=c+=(g+=P*(5*O))>>>13,w+=A*O,w+=S*N,w+=_*K,w+=U*I,c=(w+=T*D)>>>13,w&=8191,w+=k*z,w+=M*(5*Y),w+=B*(5*j),w+=L*(5*W),b=c+=(w+=P*(5*H))>>>13,b+=A*H,b+=S*O,b+=_*N,b+=U*K,c=(b+=T*I)>>>13,b&=8191,b+=k*D,b+=M*z,b+=B*(5*Y),b+=L*(5*j),v=c+=(b+=P*(5*W))>>>13,v+=A*W,v+=S*H,v+=_*O,v+=U*N,c=(v+=T*K)>>>13,v&=8191,v+=k*I,v+=M*D,v+=B*z,v+=L*(5*Y),m=c+=(v+=P*(5*j))>>>13,m+=A*j,m+=S*W,m+=_*H,m+=U*O,c=(m+=T*N)>>>13,m&=8191,m+=k*K,m+=M*I,m+=B*D,m+=L*z,x=c+=(m+=P*(5*Y))>>>13,x+=A*Y,x+=S*j,x+=_*W,x+=U*H,c=(x+=T*O)>>>13,x&=8191,x+=k*N,x+=M*K,x+=B*I,x+=L*D,A=y=8191&(c=(c=((c+=(x+=P*z)>>>13)<<2)+c|0)+(y&=8191)|0),S=l+=c>>>=13,_=p&=8191,U=d&=8191,T=g&=8191,k=w&=8191,M=b&=8191,B=v&=8191,L=m&=8191,P=x&=8191,t+=16,e-=16;this.h[0]=A,this.h[1]=S,this.h[2]=_,this.h[3]=U,this.h[4]=T,this.h[5]=k,this.h[6]=M,this.h[7]=B,this.h[8]=L,this.h[9]=P},_.prototype.finish=function(r,t){var e,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(e=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=e,e=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*e,e=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=e,e=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=e,s[0]=this.h[0]+5,e=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+e,e=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^e)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),this.h[0]=65535&(i=this.h[0]+this.pad[0]),o=1;o<8;o++)this.h[o]=65535&(i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0);r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},_.prototype.update=function(r,t,e){var n,i;if(this.leftover){for((i=16-this.leftover)>e&&(i=e),n=0;n<i;n++)this.buffer[this.leftover+n]=r[t+n];if(e-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(e>=16&&(this.blocks(r,t,i=e-e%16),t+=i,e-=i),e){for(n=0;n<e;n++)this.buffer[this.leftover+n]=r[t+n];this.leftover+=e}};var Z=k,F=M,J=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function G(r,t,e,n){for(var i,o,s,a,f,h,u,c,y,l,p,d,g,w,b,v,m,x,E,A,S,_,U=new Int32Array(16),T=new Int32Array(16),k=r[0],M=r[1],B=r[2],L=r[3],P=r[4],z=r[5],D=r[6],I=r[7],K=t[0],N=t[1],O=t[2],H=t[3],W=t[4],j=t[5],Y=t[6],C=t[7],$=0;n>=128;){for(b=0;b<16;b++)U[b]=e[(v=8*b+$)+0]<<24|e[v+1]<<16|e[v+2]<<8|e[v+3],T[b]=e[v+4]<<24|e[v+5]<<16|e[v+6]<<8|e[v+7];for(b=0;b<80;b++)if(i=M,o=B,s=P,a=z,f=D,u=N,c=O,y=W,l=j,p=Y,E=65535&(x=C),A=x>>>16,S=65535&(m=I),_=m>>>16,E+=65535&(x=(W>>>14|P<<18)^(W>>>18|P<<14)^(P>>>9|W<<23)),A+=x>>>16,S+=65535&(m=(P>>>14|W<<18)^(P>>>18|W<<14)^(W>>>9|P<<23)),_+=m>>>16,E+=65535&(x=W&j^~W&Y),A+=x>>>16,S+=65535&(m=P&z^~P&D),_+=m>>>16,E+=65535&(x=J[2*b+1]),A+=x>>>16,S+=65535&(m=J[2*b]),_+=m>>>16,A+=(x=T[b%16])>>>16,S+=65535&(m=U[b%16]),_+=m>>>16,S+=(A+=(E+=65535&x)>>>16)>>>16,E=65535&(x=w=65535&E|A<<16),A=x>>>16,S=65535&(m=g=65535&S|(_+=S>>>16)<<16),_=m>>>16,E+=65535&(x=(K>>>28|k<<4)^(k>>>2|K<<30)^(k>>>7|K<<25)),A+=x>>>16,S+=65535&(m=(k>>>28|K<<4)^(K>>>2|k<<30)^(K>>>7|k<<25)),_+=m>>>16,A+=(x=K&N^K&O^N&O)>>>16,S+=65535&(m=k&M^k&B^M&B),_+=m>>>16,h=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,d=65535&E|A<<16,E=65535&(x=H),A=x>>>16,S=65535&(m=L),_=m>>>16,A+=(x=w)>>>16,S+=65535&(m=g),_+=m>>>16,M=k,B=i,L=o,P=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,z=s,D=a,I=f,k=h,N=K,O=u,H=c,W=65535&E|A<<16,j=y,Y=l,C=p,K=d,b%16==15)for(v=0;v<16;v++)E=65535&(x=T[v]),A=x>>>16,S=65535&(m=U[v]),_=m>>>16,E+=65535&(x=T[(v+9)%16]),A+=x>>>16,S+=65535&(m=U[(v+9)%16]),_+=m>>>16,E+=65535&(x=((w=T[(v+1)%16])>>>1|(g=U[(v+1)%16])<<31)^(w>>>8|g<<24)^(w>>>7|g<<25)),A+=x>>>16,S+=65535&(m=(g>>>1|w<<31)^(g>>>8|w<<24)^g>>>7),_+=m>>>16,A+=(x=((w=T[(v+14)%16])>>>19|(g=U[(v+14)%16])<<13)^(g>>>29|w<<3)^(w>>>6|g<<26))>>>16,S+=65535&(m=(g>>>19|w<<13)^(w>>>29|g<<3)^g>>>6),_+=m>>>16,U[v]=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,T[v]=65535&E|A<<16;E=65535&(x=K),A=x>>>16,S=65535&(m=k),_=m>>>16,A+=(x=t[0])>>>16,S+=65535&(m=r[0]),_+=m>>>16,r[0]=k=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[0]=K=65535&E|A<<16,E=65535&(x=N),A=x>>>16,S=65535&(m=M),_=m>>>16,A+=(x=t[1])>>>16,S+=65535&(m=r[1]),_+=m>>>16,r[1]=M=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[1]=N=65535&E|A<<16,E=65535&(x=O),A=x>>>16,S=65535&(m=B),_=m>>>16,A+=(x=t[2])>>>16,S+=65535&(m=r[2]),_+=m>>>16,r[2]=B=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[2]=O=65535&E|A<<16,E=65535&(x=H),A=x>>>16,S=65535&(m=L),_=m>>>16,A+=(x=t[3])>>>16,S+=65535&(m=r[3]),_+=m>>>16,r[3]=L=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[3]=H=65535&E|A<<16,E=65535&(x=W),A=x>>>16,S=65535&(m=P),_=m>>>16,A+=(x=t[4])>>>16,S+=65535&(m=r[4]),_+=m>>>16,r[4]=P=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[4]=W=65535&E|A<<16,E=65535&(x=j),A=x>>>16,S=65535&(m=z),_=m>>>16,A+=(x=t[5])>>>16,S+=65535&(m=r[5]),_+=m>>>16,r[5]=z=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[5]=j=65535&E|A<<16,E=65535&(x=Y),A=x>>>16,S=65535&(m=D),_=m>>>16,A+=(x=t[6])>>>16,S+=65535&(m=r[6]),_+=m>>>16,r[6]=D=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[6]=Y=65535&E|A<<16,E=65535&(x=C),A=x>>>16,S=65535&(m=I),_=m>>>16,A+=(x=t[7])>>>16,S+=65535&(m=r[7]),_+=m>>>16,r[7]=I=65535&(S+=(A+=(E+=65535&x)>>>16)>>>16)|(_+=S>>>16)<<16,t[7]=C=65535&E|A<<16,$+=128,n-=128}return n}function q(r,t,e){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,G(i,o,t,e),e%=128,n=0;n<e;n++)s[n]=t[a-e+n];for(s[e]=128,s[(e=256-128*(e<112?1:0))-9]=0,p(s,e-8,a/536870912|0,a<<3),G(i,o,s,e),n=0;n<8;n++)p(r,8*n,i[n],o[n]);return 0}function X(r,e){var n=t(),i=t(),o=t(),s=t(),a=t(),f=t(),h=t(),c=t(),y=t();O(n,r[1],r[0]),O(y,e[1],e[0]),H(n,n,y),N(i,r[0],r[1]),N(y,e[0],e[1]),H(i,i,y),H(o,r[3],e[3]),H(o,o,u),H(s,r[2],e[2]),N(s,s,s),O(a,i,n),O(f,s,o),N(h,s,o),N(c,i,n),H(r[0],a,f),H(r[1],c,h),H(r[2],h,f),H(r[3],a,c)}function Q(r,t,e){var n;for(n=0;n<4;n++)P(r[n],t[n],e)}function rr(r,e){var n=t(),i=t(),o=t();j(o,e[2]),H(n,e[0],o),H(i,e[1],o),z(r,i),r[31]^=I(n)<<7}function tr(r,t,e){var n,i;for(B(r[0],s),B(r[1],a),B(r[2],a),B(r[3],s),i=255;i>=0;--i)Q(r,t,n=e[i/8|0]>>(7&i)&1),X(t,r),X(r,r),Q(r,t,n)}function er(r,e){var n=[t(),t(),t(),t()];B(n[0],c),B(n[1],y),B(n[2],a),H(n[3],c,y),tr(r,n,e)}function nr(r,e,i){var o,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(e,32),q(s,e,32),s[0]&=248,s[31]&=127,s[31]|=64,er(a,s),rr(r,a),o=0;o<32;o++)e[o+32]=r[o];return 0}var ir=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function or(r,t){var e,n,i,o;for(n=63;n>=32;--n){for(e=0,i=n-32,o=n-12;i<o;++i)t[i]+=e-16*t[n]*ir[i-(n-32)],e=Math.floor((t[i]+128)/256),t[i]-=256*e;t[i]+=e,t[n]=0}for(e=0,i=0;i<32;i++)t[i]+=e-(t[31]>>4)*ir[i],e=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=e*ir[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,r[n]=255&t[n]}function sr(r){var t,e=new Float64Array(64);for(t=0;t<64;t++)e[t]=r[t];for(t=0;t<64;t++)r[t]=0;or(r,e)}function ar(r,e,n,i){var o,s,a=new Uint8Array(64),f=new Uint8Array(64),h=new Uint8Array(64),u=new Float64Array(64),c=[t(),t(),t(),t()];q(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=n+64;for(o=0;o<n;o++)r[64+o]=e[o];for(o=0;o<32;o++)r[32+o]=a[32+o];for(q(h,r.subarray(32),n+32),sr(h),er(c,h),rr(r,c),o=32;o<64;o++)r[o]=i[o];for(q(f,r,n+64),sr(f),o=0;o<64;o++)u[o]=0;for(o=0;o<32;o++)u[o]=h[o];for(o=0;o<32;o++)for(s=0;s<32;s++)u[o+s]+=f[o]*a[s];return or(r.subarray(32),u),y}function fr(r,e,n,i){var o,f=new Uint8Array(32),u=new Uint8Array(64),c=[t(),t(),t(),t()],y=[t(),t(),t(),t()];if(n<64)return-1;if(function(r,e){var n=t(),i=t(),o=t(),f=t(),u=t(),c=t(),y=t();return B(r[2],a),K(r[1],e),W(o,r[1]),H(f,o,h),O(o,o,r[2]),N(f,r[2],f),W(u,f),W(c,u),H(y,c,u),H(n,y,o),H(n,n,f),Y(n,n),H(n,n,o),H(n,n,f),H(n,n,f),H(r[0],n,f),W(i,r[0]),H(i,i,f),D(i,o)&&H(r[0],r[0],l),W(i,r[0]),H(i,i,f),D(i,o)?-1:(I(r[0])===e[31]>>7&&O(r[0],s,r[0]),H(r[3],r[0],r[1]),0)}(y,i))return-1;for(o=0;o<n;o++)r[o]=e[o];for(o=0;o<32;o++)r[o+32]=i[o];if(q(u,r,n),sr(u),tr(c,y,u),er(y,e.subarray(32)),X(c,y),rr(f,c),n-=64,w(e,0,f,0)){for(o=0;o<n;o++)r[o]=0;return-1}for(o=0;o<n;o++)r[o]=e[o+64];return n}var hr,ur=64,cr=32,yr=64;function lr(r,t){if(32!==r.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pr(){for(var r=0;r<arguments.length;r++)if(!(arguments[r]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function dr(r){for(var t=0;t<r.length;t++)r[t]=0}r.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:S,crypto_stream:A,crypto_stream_salsa20_xor:x,crypto_stream_salsa20:E,crypto_onetimeauth:U,crypto_onetimeauth_verify:T,crypto_verify_16:g,crypto_verify_32:w,crypto_secretbox:k,crypto_secretbox_open:M,crypto_scalarmult:C,crypto_scalarmult_base:$,crypto_box_beforenm:V,crypto_box_afternm:Z,crypto_box:function(r,t,e,n,i,o){var s=new Uint8Array(32);return V(s,i,o),Z(r,t,e,n,s)},crypto_box_open:function(r,t,e,n,i,o){var s=new Uint8Array(32);return V(s,i,o),F(r,t,e,n,s)},crypto_box_keypair:R,crypto_hash:q,crypto_sign:ar,crypto_sign_keypair:nr,crypto_sign_open:fr,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ur,crypto_sign_PUBLICKEYBYTES:cr,crypto_sign_SECRETKEYBYTES:yr,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:h,L:ir,pack25519:z,unpack25519:K,M:H,A:N,S:W,Z:O,pow2523:Y,add:X,set25519:B,modL:or,scalarmult:tr,scalarbase:er},r.randomBytes=function(r){var t=new Uint8Array(r);return n(t,r),t},r.secretbox=function(r,t,e){pr(r,t,e),lr(e,t);for(var n=new Uint8Array(32+r.length),i=new Uint8Array(n.length),o=0;o<r.length;o++)n[o+32]=r[o];return k(i,n,n.length,t,e),i.subarray(16)},r.secretbox.open=function(r,t,e){pr(r,t,e),lr(e,t);for(var n=new Uint8Array(16+r.length),i=new Uint8Array(n.length),o=0;o<r.length;o++)n[o+16]=r[o];return n.length<32||0!==M(i,n,n.length,t,e)?null:i.subarray(32)},r.secretbox.keyLength=32,r.secretbox.nonceLength=24,r.secretbox.overheadLength=16,r.scalarMult=function(r,t){if(pr(r,t),32!==r.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var e=new Uint8Array(32);return C(e,r,t),e},r.scalarMult.base=function(r){if(pr(r),32!==r.length)throw new Error("bad n size");var t=new Uint8Array(32);return $(t,r),t},r.scalarMult.scalarLength=32,r.scalarMult.groupElementLength=32,r.box=function(t,e,n,i){var o=r.box.before(n,i);return r.secretbox(t,e,o)},r.box.before=function(r,t){pr(r,t),function(r,t){if(32!==r.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(r,t);var e=new Uint8Array(32);return V(e,r,t),e},r.box.after=r.secretbox,r.box.open=function(t,e,n,i){var o=r.box.before(n,i);return r.secretbox.open(t,e,o)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(32),t=new Uint8Array(32);return R(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(pr(r),32!==r.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return $(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=32,r.box.secretKeyLength=32,r.box.sharedKeyLength=32,r.box.nonceLength=24,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(pr(r,t),t.length!==yr)throw new Error("bad secret key size");var e=new Uint8Array(ur+r.length);return ar(e,r,r.length,t),e},r.sign.open=function(r,t){if(pr(r,t),t.length!==cr)throw new Error("bad public key size");var e=new Uint8Array(r.length),n=fr(e,r,r.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=e[o];return i},r.sign.detached=function(t,e){for(var n=r.sign(t,e),i=new Uint8Array(ur),o=0;o<i.length;o++)i[o]=n[o];return i},r.sign.detached.verify=function(r,t,e){if(pr(r,t,e),t.length!==ur)throw new Error("bad signature size");if(e.length!==cr)throw new Error("bad public key size");var n,i=new Uint8Array(ur+r.length),o=new Uint8Array(ur+r.length);for(n=0;n<ur;n++)i[n]=t[n];for(n=0;n<r.length;n++)i[n+ur]=r[n];return fr(o,i,i.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(cr),t=new Uint8Array(yr);return nr(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(pr(r),r.length!==yr)throw new Error("bad secret key size");for(var t=new Uint8Array(cr),e=0;e<t.length;e++)t[e]=r[32+e];return{publicKey:t,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(pr(r),32!==r.length)throw new Error("bad seed size");for(var t=new Uint8Array(cr),e=new Uint8Array(yr),n=0;n<32;n++)e[n]=r[n];return nr(t,e,!0),{publicKey:t,secretKey:e}},r.sign.publicKeyLength=cr,r.sign.secretKeyLength=yr,r.sign.seedLength=32,r.sign.signatureLength=ur,r.hash=function(r){pr(r);var t=new Uint8Array(64);return q(t,r,r.length),t},r.hash.hashLength=64,r.verify=function(r,t){return pr(r,t),0!==r.length&&0!==t.length&&r.length===t.length&&0===d(r,0,t,0,r.length)},r.setPRNG=function(r){n=r},(hr="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&hr.getRandomValues?r.setPRNG(function(r,t){var e,n=new Uint8Array(t);for(e=0;e<t;e+=65536)hr.getRandomValues(n.subarray(e,e+Math.min(t-e,65536)));for(e=0;e<t;e++)r[e]=n[e];dr(n)}):(hr=e(14))&&hr.randomBytes&&r.setPRNG(function(r,t){var e,n=hr.randomBytes(t);for(e=0;e<t;e++)r[e]=n[e];dr(n)})}(r.exports?r.exports:self.nacl=self.nacl||{})}}]);