From cc9b622bde4a06739856f46d81c587140c7cd358 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Wed, 28 Mar 2018 22:03:46 -0700 Subject: [PATCH] fixed cryptofill on edge --- app/utils.js | 5 ++--- assets/cryptofill.js | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/utils.js b/app/utils.js index 8b8a18d3..f675476e 100644 --- a/app/utils.js +++ b/app/utils.js @@ -9,9 +9,7 @@ function arrayToB64(array) { } function b64ToArray(str) { - return b64.toByteArray( - str + '==='.slice((str.length + 3) % 4) - ); + return b64.toByteArray(str + '==='.slice((str.length + 3) % 4)); } function loadShim(polyfill) { @@ -59,6 +57,7 @@ async function canHasSend() { ); return true; } catch (err) { + console.error(err); return false; } } diff --git a/assets/cryptofill.js b/assets/cryptofill.js index b52d6862..55499a14 100644 --- a/assets/cryptofill.js +++ b/assets/cryptofill.js @@ -1,4 +1,4 @@ -var liner=function(e){function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var t={};return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=16)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(e){function n(e){for(var r,t=e,n=/[^%](%\d+)/g,a=[];r=n.exec(t);)a.push({arg:r[1],index:r.index});for(var o=a.length-1;o>=0;o--){var i=a[o],s=i.arg.substring(1),c=i.index+1;t=t.substring(0,c)+arguments[+s]+t.substring(c+1+s.length)}return t=t.replace("%%","%")}function a(e){var r;r="string"==typeof e?{name:e}:e,p.checkAlgorithm(r);var t=e;return t.hash&&(t.hash=a(t.hash)),r}function o(e,r){if(!e)throw new s("Parameter '"+r+"' is required and cant be empty");if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return new Uint8Array(e);if(ArrayBuffer.isView(e)){var t=e.map(function(e){return e});return new Uint8Array(t.buffer)}if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new s("Incoming parameter '"+r+"' has wrong data type. Must be ArrayBufferView or ArrayBuffer")}t.d(r,"WebCryptoError",function(){return s}),t.d(r,"AlgorithmError",function(){return c}),t.d(r,"CryptoKeyError",function(){return u}),t.d(r,"PrepareAlgorithm",function(){return a}),t.d(r,"PrepareData",function(){return o}),t.d(r,"BaseCrypto",function(){return p}),t.d(r,"AlgorithmNames",function(){return h}),t.d(r,"Base64Url",function(){return y}),t.d(r,"SubtleCrypto",function(){return x}),t.d(r,"Aes",function(){return A}),t.d(r,"AesAlgorithmError",function(){return m}),t.d(r,"AesWrapKey",function(){return w}),t.d(r,"AesEncrypt",function(){return v}),t.d(r,"AesECB",function(){return g}),t.d(r,"AesCBC",function(){return C}),t.d(r,"AesCTR",function(){return k}),t.d(r,"AesGCM",function(){return d}),t.d(r,"AesKW",function(){return b}),t.d(r,"RsaKeyGenParamsError",function(){return G}),t.d(r,"RsaHashedImportParamsError",function(){return M}),t.d(r,"Rsa",function(){return B}),t.d(r,"RsaSSA",function(){return T}),t.d(r,"RsaPSSParamsError",function(){return D}),t.d(r,"RsaPSS",function(){return j}),t.d(r,"RsaOAEPParamsError",function(){return W}),t.d(r,"RsaOAEP",function(){return H}),t.d(r,"EcKeyGenParamsError",function(){return U}),t.d(r,"Ec",function(){return _}),t.d(r,"EcAlgorithmError",function(){return K}),t.d(r,"EcDSA",function(){return S}),t.d(r,"EcDH",function(){return O}),t.d(r,"ShaAlgorithms",function(){return E}),t.d(r,"Sha",function(){return P});var i=t(8),s=function(e){function r(r){for(var t=[],a=1;a0&&e.length<=128))throw new m(m.PARAM_WRONG_VALUE,"length","number [1-128]")},r.ALG_NAME=h.AesCTR,r}(v),d=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithmParams=function(e){if(this.checkAlgorithm(e),e.additionalData&&!(ArrayBuffer.isView(e.additionalData)||e.additionalData instanceof ArrayBuffer))throw new m(m.PARAM_WRONG_TYPE,"additionalData","ArrayBufferView or ArrayBuffer");if(!e.iv)throw new m(m.PARAM_REQUIRED,"iv");if(!(ArrayBuffer.isView(e.iv)||e.iv instanceof ArrayBuffer))throw new m(m.PARAM_WRONG_TYPE,"iv","ArrayBufferView or ArrayBuffer");if(e.tagLength){if(![32,64,96,104,112,120,128].some(function(r){return r===e.tagLength}))throw new m(m.PARAM_WRONG_VALUE,"tagLength","32, 64, 96, 104, 112, 120 or 128")}},r.ALG_NAME=h.AesGCM,r}(v),b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithmParams=function(e){this.checkAlgorithm(e)},r.ALG_NAME=h.AesKW,r.KEY_USAGES=["wrapKey","unwrapKey"],r}(w),E=[h.Sha1,h.Sha256,h.Sha384,h.Sha512].join(" | "),P=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithm=function(r){var t;switch(t="string"==typeof r?{name:r}:r,e.checkAlgorithm.call(this,t),t.name.toUpperCase()){case h.Sha1:case h.Sha256:case h.Sha384:case h.Sha512:break;default:throw new c(c.WRONG_ALG_NAME,t.name,E)}},r.digest=function(e,r){var t=this;return new Promise(function(r,n){t.checkAlgorithm(e),r(void 0)})},r}(p),U=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.code=9,r}return Object(i.a)(r,e),r}(c),_=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithm=function(e){if(e.name.toUpperCase()!==this.ALG_NAME.toUpperCase())throw new c(c.WRONG_ALG_NAME,e.name,this.ALG_NAME)},r.checkKeyGenParams=function(e){if(!e.namedCurve)throw new U(U.PARAM_REQUIRED,"namedCurve");if("string"!=typeof e.namedCurve)throw new U(U.PARAM_WRONG_TYPE,"namedCurve","string");switch(e.namedCurve.toUpperCase()){case"P-256":case"K-256":case"P-384":case"P-521":break;default:throw new U(U.PARAM_WRONG_VALUE,"namedCurve","K-256, P-256, P-384 or P-521")}},r.checkKeyGenUsages=function(e){var r=this;e.forEach(function(e){var t=0;for(t;t0&&e.length<=512))throw new c(c.PARAM_WRONG_VALUE,"length","more 0 and less than 512")},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t=256&&r<=16384)||r%8)throw new G(G.PARAM_WRONG_VALUE,"modulusLength"," a multiple of 8 bits and >= 256 and <= 16384");var t=e.publicExponent;if(!t)throw new G(G.PARAM_REQUIRED,"publicExponent");if(!ArrayBuffer.isView(t))throw new G(G.PARAM_WRONG_TYPE,"publicExponent","ArrayBufferView");if(3!==t[0]&&(1!==t[0]||0!==t[1]||1!==t[2]))throw new G(G.PARAM_WRONG_VALUE,"publicExponent","Uint8Array([3]) | Uint8Array([1, 0, 1])");if(!e.hash)throw new G(G.PARAM_REQUIRED,"hash",E);P.checkAlgorithm(e.hash)},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t>>16&65535,n=65535&e,a=r>>>16&65535,o=65535&r;return n*o+(t*o+n*a<<16>>>0)|0})},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e){this.algorithm=e.algorithm,e.type&&(this.type=e.type),this.extractable=e.extractable,this.usages=e.usages}return e}();r.CryptoKey=n},function(e,r,t){"use strict";function n(){var e,t={name:"Unknown",version:"0"},n=self.navigator.userAgent;return(e=/edge\/([\d\.]+)/i.exec(n))?(t.name=r.Browser.Edge,t.version=e[1]):/msie/i.test(n)?(t.name=r.Browser.IE,t.version=/msie ([\d\.]+)/i.exec(n)[1]):/Trident/i.test(n)?(t.name=r.Browser.IE,t.version=/rv:([\d\.]+)/i.exec(n)[1]):/chrome/i.test(n)?(t.name=r.Browser.Chrome,t.version=/chrome\/([\d\.]+)/i.exec(n)[1]):/safari/i.test(n)?(t.name=r.Browser.Safari,t.version=/version\/([\d\.]+)/i.exec(n)[1]):/firefox/i.test(n)&&(t.name=r.Browser.Firefox,t.version=/firefox\/([\d\.]+)/i.exec(n)[1]),t}function a(e){for(var r=new Uint8Array(e.length),t=0;t=0;o--){var i=a[o],s=i.arg.substring(1),c=i.index+1;t=t.substring(0,c)+arguments[+s]+t.substring(c+1+s.length)}return t=t.replace("%%","%")}function a(e){var r;r="string"==typeof e?{name:e}:e,p.checkAlgorithm(r);var t=e;return t.hash&&(t.hash=a(t.hash)),r}function o(e,r){if(!e)throw new s("Parameter '"+r+"' is required and cant be empty");if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return new Uint8Array(e);if(ArrayBuffer.isView(e)){var t=e.map(function(e){return e});return new Uint8Array(t.buffer)}if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new s("Incoming parameter '"+r+"' has wrong data type. Must be ArrayBufferView or ArrayBuffer")}t.d(r,"WebCryptoError",function(){return s}),t.d(r,"AlgorithmError",function(){return c}),t.d(r,"CryptoKeyError",function(){return u}),t.d(r,"PrepareAlgorithm",function(){return a}),t.d(r,"PrepareData",function(){return o}),t.d(r,"BaseCrypto",function(){return p}),t.d(r,"AlgorithmNames",function(){return h}),t.d(r,"Base64Url",function(){return y}),t.d(r,"SubtleCrypto",function(){return x}),t.d(r,"Aes",function(){return A}),t.d(r,"AesAlgorithmError",function(){return m}),t.d(r,"AesWrapKey",function(){return w}),t.d(r,"AesEncrypt",function(){return v}),t.d(r,"AesECB",function(){return g}),t.d(r,"AesCBC",function(){return C}),t.d(r,"AesCTR",function(){return k}),t.d(r,"AesGCM",function(){return d}),t.d(r,"AesKW",function(){return b}),t.d(r,"RsaKeyGenParamsError",function(){return G}),t.d(r,"RsaHashedImportParamsError",function(){return M}),t.d(r,"Rsa",function(){return B}),t.d(r,"RsaSSA",function(){return T}),t.d(r,"RsaPSSParamsError",function(){return D}),t.d(r,"RsaPSS",function(){return j}),t.d(r,"RsaOAEPParamsError",function(){return W}),t.d(r,"RsaOAEP",function(){return H}),t.d(r,"EcKeyGenParamsError",function(){return U}),t.d(r,"Ec",function(){return _}),t.d(r,"EcAlgorithmError",function(){return K}),t.d(r,"EcDSA",function(){return S}),t.d(r,"EcDH",function(){return O}),t.d(r,"ShaAlgorithms",function(){return E}),t.d(r,"Sha",function(){return P});var i=t(8),s=function(e){function r(r){for(var t=[],a=1;a0&&e.length<=128))throw new m(m.PARAM_WRONG_VALUE,"length","number [1-128]")},r.ALG_NAME=h.AesCTR,r}(v),d=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithmParams=function(e){if(this.checkAlgorithm(e),e.additionalData&&!(ArrayBuffer.isView(e.additionalData)||e.additionalData instanceof ArrayBuffer))throw new m(m.PARAM_WRONG_TYPE,"additionalData","ArrayBufferView or ArrayBuffer");if(!e.iv)throw new m(m.PARAM_REQUIRED,"iv");if(!(ArrayBuffer.isView(e.iv)||e.iv instanceof ArrayBuffer))throw new m(m.PARAM_WRONG_TYPE,"iv","ArrayBufferView or ArrayBuffer");if(e.tagLength){if(![32,64,96,104,112,120,128].some(function(r){return r===e.tagLength}))throw new m(m.PARAM_WRONG_VALUE,"tagLength","32, 64, 96, 104, 112, 120 or 128")}},r.ALG_NAME=h.AesGCM,r}(v),b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithmParams=function(e){this.checkAlgorithm(e)},r.ALG_NAME=h.AesKW,r.KEY_USAGES=["wrapKey","unwrapKey"],r}(w),E=[h.Sha1,h.Sha256,h.Sha384,h.Sha512].join(" | "),P=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithm=function(r){var t;switch(t="string"==typeof r?{name:r}:r,e.checkAlgorithm.call(this,t),t.name.toUpperCase()){case h.Sha1:case h.Sha256:case h.Sha384:case h.Sha512:break;default:throw new c(c.WRONG_ALG_NAME,t.name,E)}},r.digest=function(e,r){var t=this;return new Promise(function(r,n){t.checkAlgorithm(e),r(void 0)})},r}(p),U=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.code=9,r}return Object(i.a)(r,e),r}(c),_=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(i.a)(r,e),r.checkAlgorithm=function(e){if(e.name.toUpperCase()!==this.ALG_NAME.toUpperCase())throw new c(c.WRONG_ALG_NAME,e.name,this.ALG_NAME)},r.checkKeyGenParams=function(e){if(!e.namedCurve)throw new U(U.PARAM_REQUIRED,"namedCurve");if("string"!=typeof e.namedCurve)throw new U(U.PARAM_WRONG_TYPE,"namedCurve","string");switch(e.namedCurve.toUpperCase()){case"P-256":case"K-256":case"P-384":case"P-521":break;default:throw new U(U.PARAM_WRONG_VALUE,"namedCurve","K-256, P-256, P-384 or P-521")}},r.checkKeyGenUsages=function(e){var r=this;e.forEach(function(e){var t=0;for(t;t0&&e.length<=512))throw new c(c.PARAM_WRONG_VALUE,"length","more 0 and less than 512")},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t=256&&r<=16384)||r%8)throw new G(G.PARAM_WRONG_VALUE,"modulusLength"," a multiple of 8 bits and >= 256 and <= 16384");var t=e.publicExponent;if(!t)throw new G(G.PARAM_REQUIRED,"publicExponent");if(!ArrayBuffer.isView(t))throw new G(G.PARAM_WRONG_TYPE,"publicExponent","ArrayBufferView");if(3!==t[0]&&(1!==t[0]||0!==t[1]||1!==t[2]))throw new G(G.PARAM_WRONG_VALUE,"publicExponent","Uint8Array([3]) | Uint8Array([1, 0, 1])");if(!e.hash)throw new G(G.PARAM_REQUIRED,"hash",E);P.checkAlgorithm(e.hash)},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t>>16&65535,n=65535&e,a=r>>>16&65535,o=65535&r;return n*o+(t*o+n*a<<16>>>0)|0})},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e){this.algorithm=e.algorithm,e.type&&(this.type=e.type),this.extractable=e.extractable,this.usages=e.usages}return e}();r.CryptoKey=n},function(e,r,t){"use strict";function n(){var e={name:"Unknown",version:"0"};try{var t=self.navigator.userAgent,n=void 0;(n=/edge\/([\d\.]+)/i.exec(t))?(e.name=r.Browser.Edge,e.version=n[1]):/msie/i.test(t)?(e.name=r.Browser.IE,e.version=/msie ([\d\.]+)/i.exec(t)[1]):/Trident/i.test(t)?(e.name=r.Browser.IE,e.version=/rv:([\d\.]+)/i.exec(t)[1]):/chrome/i.test(t)?(e.name=r.Browser.Chrome,e.version=/chrome\/([\d\.]+)/i.exec(t)[1]):/safari/i.test(t)?(e.name=r.Browser.Safari,e.version=/version\/([\d\.]+)/i.exec(t)[1]):/firefox/i.test(t)&&(e.name=r.Browser.Firefox,e.version=/firefox\/([\d\.]+)/i.exec(t)[1])}catch(e){}return e}function a(e){for(var r=new Uint8Array(e.length),t=0;t-1&&("public"===e.type||"secret"===e.type)&&e.usages.push(t)}),["sign","decrypt","unwrapKey","deriveKey","deriveBits"].forEach(function(t){r.indexOf(t)>-1&&("private"===e.type||"secret"===e.type)&&e.usages.push(t)})))})}function s(e,r,t){if(r&&w.BrowserInfo().name===w.Browser.IE){"extractable"in e&&(e.ext=e.extractable,delete e.extractable);var n=null;switch(r.name.toUpperCase()){case h.AlgorithmNames.AesECB.toUpperCase():case h.AlgorithmNames.AesCBC.toUpperCase():case h.AlgorithmNames.AesGCM.toUpperCase():n=v.AesCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,r.name.toUpperCase())}n&&!e.alg&&(e.alg=n.alg2jwk(r)),"key_ops"in e||(e.key_ops=t)}}function c(e){w.BrowserInfo().name===w.Browser.IE&&("ext"in e&&(e.extractable=e.ext,delete e.ext),delete e.key_ops,delete e.alg)}function u(e){var r=/AppleWebKit\/(\d+)/.exec(self.navigator.userAgent);return e.toUpperCase()===h.AlgorithmNames.RsaOAEP&&r&&parseInt(r[1],10)<604}var p=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var h=t(0),f=t(0),y=t(0),l=t(3),A=t(2),m=t(1),w=t(5),v=t(11),g=t(12),C=t(13),k=t(14),d=t(15),b=[],E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return p(r,e),r.prototype.generateKey=function(r,t,n){var o,s=this,c=arguments;return e.prototype.generateKey.apply(this,c).then(function(e){if(o=y.PrepareAlgorithm(r),!(w.BrowserInfo().name===w.Browser.Edge&&o.name.toUpperCase()===h.AlgorithmNames.AesGCM||u(o.name))&&l.nativeSubtle)try{return l.nativeSubtle.generateKey.apply(l.nativeSubtle,c).catch(function(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")})}catch(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")}}).then(function(e){if(e){var c=Promise.resolve(e);if(w.BrowserInfo().name===w.Browser.Safari&&(o.name.toUpperCase()===h.AlgorithmNames.EcDH.toUpperCase()||o.name.toUpperCase()===h.AlgorithmNames.EcDSA.toUpperCase())){var u=e.publicKey;c=c.then(function(){return s.exportKey("jwk",u).then(function(a){return s.exportKey("spki",u).then(function(o){for(var i=h.Base64Url.decode(a.x),c=h.Base64Url.decode(a.y),u=i.length+c.length,p=new Uint8Array(o),f=0;f-1&&("public"===e.type||"secret"===e.type)&&e.usages.push(t)}),["sign","decrypt","unwrapKey","deriveKey","deriveBits"].forEach(function(t){r.indexOf(t)>-1&&("private"===e.type||"secret"===e.type)&&e.usages.push(t)})))})}function s(e,r,t){if(r&&w.BrowserInfo().name===w.Browser.IE){"extractable"in e&&(e.ext=e.extractable,delete e.extractable);var n=null;switch(r.name.toUpperCase()){case h.AlgorithmNames.AesECB.toUpperCase():case h.AlgorithmNames.AesCBC.toUpperCase():case h.AlgorithmNames.AesGCM.toUpperCase():n=v.AesCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,r.name.toUpperCase())}n&&!e.alg&&(e.alg=n.alg2jwk(r)),"key_ops"in e||(e.key_ops=t)}}function c(e){w.BrowserInfo().name===w.Browser.IE&&("ext"in e&&(e.extractable=e.ext,delete e.ext),delete e.key_ops,delete e.alg)}function u(e){var r=/AppleWebKit\/(\d+)/.exec(self.navigator.userAgent);return e.toUpperCase()===h.AlgorithmNames.RsaOAEP&&r&&parseInt(r[1],10)<604}var p=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var h=t(0),f=t(0),y=t(0),l=t(3),A=t(2),m=t(1),w=t(5),v=t(11),g=t(12),C=t(13),k=t(14),d=t(15),b=[],E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return p(r,e),r.prototype.generateKey=function(r,t,n){var o,s=this,c=arguments;return e.prototype.generateKey.apply(this,c).then(function(e){if(o=y.PrepareAlgorithm(r),!(w.BrowserInfo().name===w.Browser.Edge&&o.name.toUpperCase()===h.AlgorithmNames.AesGCM||u(o.name))&&l.nativeSubtle)try{return l.nativeSubtle.generateKey.apply(l.nativeSubtle,c).catch(function(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")})}catch(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")}}).then(function(e){if(e){var c=Promise.resolve(e);if(w.BrowserInfo().name===w.Browser.Safari&&(o.name.toUpperCase()===h.AlgorithmNames.EcDH.toUpperCase()||o.name.toUpperCase()===h.AlgorithmNames.EcDSA.toUpperCase())){var u=e.publicKey;c=c.then(function(){return s.exportKey("jwk",u).then(function(a){return s.exportKey("spki",u).then(function(o){for(var i=h.Base64Url.decode(a.x),c=h.Base64Url.decode(a.y),u=i.length+c.length,p=new Uint8Array(o),f=0;f>>7);return n^=99}r||function(){t=[],e=[];var s,i,n=1;for(s=0;s<255;s++)t[s]=n,i=128&n,n<<=1,n&=255,128===i&&(n^=27),n^=t[s],e[t[s]]=s;t[255]=t[0],e[0]=0,r=!0}(),i=[],n=[],a=[[],[],[],[]],h=[[],[],[],[]];for(var c=0;c<256;c++){var u=o(c);i[c]=u,n[u]=c,a[0][c]=s(2,u)<<24|u<<16|u<<8|s(3,u),h[0][u]=s(14,c)<<24|s(9,c)<<16|s(13,c)<<8|s(11,c);for(var f=1;f<4;f++)a[f][c]=a[f-1][c]>>>8|a[f-1][c]<<24,h[f][u]=h[f-1][u]>>>8|h[f-1][u]<<24}}var c=function(t,e){o();var r=new Uint32Array(e);r.set(i,512),r.set(n,768);for(var s=0;s<4;s++)r.set(a[s],4096+1024*s>>2),r.set(h[s],8192+1024*s>>2);var c=function(t,e,r){"use asm";var s=0,i=0,n=0,a=0,h=0,o=0,c=0,u=0,f=0,l=0,p=0,w=0,y=0,_=0,d=0,A=0,v=0,x=0,E=0,g=0,m=0;var b=new t.Uint32Array(r),S=new t.Uint8Array(r);function C(t,e,r,h,o,c,u,f){t=t|0;e=e|0;r=r|0;h=h|0;o=o|0;c=c|0;u=u|0;f=f|0;var l=0,p=0,w=0,y=0,_=0,d=0,A=0,v=0;l=r|0x400,p=r|0x800,w=r|0xc00;o=o^b[(t|0)>>2],c=c^b[(t|4)>>2],u=u^b[(t|8)>>2],f=f^b[(t|12)>>2];for(v=16;(v|0)<=h<<4;v=v+16|0){y=b[(r|o>>22&1020)>>2]^b[(l|c>>14&1020)>>2]^b[(p|u>>6&1020)>>2]^b[(w|f<<2&1020)>>2]^b[(t|v|0)>>2],_=b[(r|c>>22&1020)>>2]^b[(l|u>>14&1020)>>2]^b[(p|f>>6&1020)>>2]^b[(w|o<<2&1020)>>2]^b[(t|v|4)>>2],d=b[(r|u>>22&1020)>>2]^b[(l|f>>14&1020)>>2]^b[(p|o>>6&1020)>>2]^b[(w|c<<2&1020)>>2]^b[(t|v|8)>>2],A=b[(r|f>>22&1020)>>2]^b[(l|o>>14&1020)>>2]^b[(p|c>>6&1020)>>2]^b[(w|u<<2&1020)>>2]^b[(t|v|12)>>2];o=y,c=_,u=d,f=A}s=b[(e|o>>22&1020)>>2]<<24^b[(e|c>>14&1020)>>2]<<16^b[(e|u>>6&1020)>>2]<<8^b[(e|f<<2&1020)>>2]^b[(t|v|0)>>2],i=b[(e|c>>22&1020)>>2]<<24^b[(e|u>>14&1020)>>2]<<16^b[(e|f>>6&1020)>>2]<<8^b[(e|o<<2&1020)>>2]^b[(t|v|4)>>2],n=b[(e|u>>22&1020)>>2]<<24^b[(e|f>>14&1020)>>2]<<16^b[(e|o>>6&1020)>>2]<<8^b[(e|c<<2&1020)>>2]^b[(t|v|8)>>2],a=b[(e|f>>22&1020)>>2]<<24^b[(e|o>>14&1020)>>2]<<16^b[(e|c>>6&1020)>>2]<<8^b[(e|u<<2&1020)>>2]^b[(t|v|12)>>2]}function M(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;C(0x0000,0x0800,0x1000,m,t,e,r,s)}function U(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;var n=0;C(0x0400,0x0c00,0x2000,m,t,s,r,e);n=i,i=a,a=n}function H(t,e,r,f){t=t|0;e=e|0;r=r|0;f=f|0;C(0x0000,0x0800,0x1000,m,h^t,o^e,c^r,u^f);h=s,o=i,c=n,u=a}function T(t,e,r,f){t=t|0;e=e|0;r=r|0;f=f|0;var l=0;C(0x0400,0x0c00,0x2000,m,t,f,r,e);l=i,i=a,a=l;s=s^h,i=i^o,n=n^c,a=a^u;h=t,o=e,c=r,u=f}function D(t,e,r,f){t=t|0;e=e|0;r=r|0;f=f|0;C(0x0000,0x0800,0x1000,m,h,o,c,u);h=s=s^t,o=i=i^e,c=n=n^r,u=a=a^f}function k(t,e,r,f){t=t|0;e=e|0;r=r|0;f=f|0;C(0x0000,0x0800,0x1000,m,h,o,c,u);s=s^t,i=i^e,n=n^r,a=a^f;h=t,o=e,c=r,u=f}function G(t,e,r,f){t=t|0;e=e|0;r=r|0;f=f|0;C(0x0000,0x0800,0x1000,m,h,o,c,u);h=s,o=i,c=n,u=a;s=s^t,i=i^e,n=n^r,a=a^f}function I(t,e,r,h){t=t|0;e=e|0;r=r|0;h=h|0;C(0x0000,0x0800,0x1000,m,f,l,p,w);w=~A&w|A&w+1;p=~d&p|d&p+((w|0)==0);l=~_&l|_&l+((p|0)==0);f=~y&f|y&f+((l|0)==0);s=s^t;i=i^e;n=n^r;a=a^h}function Z(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;var i=0,n=0,a=0,f=0,l=0,p=0,w=0,y=0,_=0,d=0;t=t^h,e=e^o,r=r^c,s=s^u;i=v|0,n=x|0,a=E|0,f=g|0;for(;(_|0)<128;_=_+1|0){if(i>>>31){l=l^t,p=p^e,w=w^r,y=y^s}i=i<<1|n>>>31,n=n<<1|a>>>31,a=a<<1|f>>>31,f=f<<1;d=s&1;s=s>>>1|r<<31,r=r>>>1|e<<31,e=e>>>1|t<<31,t=t>>>1;if(d)t=t^0xe1000000}h=l,o=p,c=w,u=y}function P(t){t=t|0;m=t}function B(t,e,r,h){t=t|0;e=e|0;r=r|0;h=h|0;s=t,i=e,n=r,a=h}function z(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;h=t,o=e,c=r,u=s}function O(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;f=t,l=e,p=r,w=s}function q(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;y=t,_=e,d=r,A=s}function L(t,e,r,s){t=t|0;e=e|0;r=r|0;s=s|0;w=~A&w|A&s,p=~d&p|d&r,l=~_&l|_&e,f=~y&f|y&t}function R(t){t=t|0;if(t&15)return-1;S[t|0]=s>>>24,S[t|1]=s>>>16&255,S[t|2]=s>>>8&255,S[t|3]=s&255,S[t|4]=i>>>24,S[t|5]=i>>>16&255,S[t|6]=i>>>8&255,S[t|7]=i&255,S[t|8]=n>>>24,S[t|9]=n>>>16&255,S[t|10]=n>>>8&255,S[t|11]=n&255,S[t|12]=a>>>24,S[t|13]=a>>>16&255,S[t|14]=a>>>8&255,S[t|15]=a&255;return 16}function K(t){t=t|0;if(t&15)return-1;S[t|0]=h>>>24,S[t|1]=h>>>16&255,S[t|2]=h>>>8&255,S[t|3]=h&255,S[t|4]=o>>>24,S[t|5]=o>>>16&255,S[t|6]=o>>>8&255,S[t|7]=o&255,S[t|8]=c>>>24,S[t|9]=c>>>16&255,S[t|10]=c>>>8&255,S[t|11]=c&255,S[t|12]=u>>>24,S[t|13]=u>>>16&255,S[t|14]=u>>>8&255,S[t|15]=u&255;return 16}function N(){M(0,0,0,0);v=s,x=i,E=n,g=a}function F(t,e,r){t=t|0;e=e|0;r=r|0;var h=0;if(e&15)return-1;while((r|0)>=16){V[t&7](S[e|0]<<24|S[e|1]<<16|S[e|2]<<8|S[e|3],S[e|4]<<24|S[e|5]<<16|S[e|6]<<8|S[e|7],S[e|8]<<24|S[e|9]<<16|S[e|10]<<8|S[e|11],S[e|12]<<24|S[e|13]<<16|S[e|14]<<8|S[e|15]);S[e|0]=s>>>24,S[e|1]=s>>>16&255,S[e|2]=s>>>8&255,S[e|3]=s&255,S[e|4]=i>>>24,S[e|5]=i>>>16&255,S[e|6]=i>>>8&255,S[e|7]=i&255,S[e|8]=n>>>24,S[e|9]=n>>>16&255,S[e|10]=n>>>8&255,S[e|11]=n&255,S[e|12]=a>>>24,S[e|13]=a>>>16&255,S[e|14]=a>>>8&255,S[e|15]=a&255;h=h+16|0,e=e+16|0,r=r-16|0}return h|0}function j(t,e,r){t=t|0;e=e|0;r=r|0;var s=0;if(e&15)return-1;while((r|0)>=16){W[t&1](S[e|0]<<24|S[e|1]<<16|S[e|2]<<8|S[e|3],S[e|4]<<24|S[e|5]<<16|S[e|6]<<8|S[e|7],S[e|8]<<24|S[e|9]<<16|S[e|10]<<8|S[e|11],S[e|12]<<24|S[e|13]<<16|S[e|14]<<8|S[e|15]);s=s+16|0,e=e+16|0,r=r-16|0}return s|0}var V=[M,U,H,T,D,k,G,I];var W=[H,Z];return{set_rounds:P,set_state:B,set_iv:z,set_nonce:O,set_mask:q,set_counter:L,get_state:R,get_iv:K,gcm_init:N,cipher:F,mac:j}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},t,e);return c.set_key=function(t,e,s,n,a,o,u,f,l){var p=r.subarray(0,60),w=r.subarray(256,316);p.set([e,s,n,a,o,u,f,l]);for(var y=t,_=1;y<4*t+28;y++){var d=p[y-1];(y%t==0||8===t&&y%t==4)&&(d=i[d>>>24]<<24^i[d>>>16&255]<<16^i[d>>>8&255]<<8^i[255&d]),y%t==0&&(d=d<<8^d>>>24^_<<24,_=_<<1^(128&_?27:0)),p[y]=p[y-t]^d}for(var A=0;A=y-4?d:h[0][i[d>>>24]]^h[1][i[d>>>16&255]]^h[2][i[d>>>8&255]]^h[3][i[255&d]];c.set_rounds(t+5)},c};return c.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},c.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},c.MAC={CBC:0,GCM:1},c.HEAP_DATA=16384,c}(),r=new Uint8Array(1048576),s=e(null,r.buffer);function i(){var t=Error.apply(this,arguments);this.message=t.message,this.stack=t.stack}function n(){var t=Error.apply(this,arguments);this.message=t.message,this.stack=t.stack}function a(){var t=Error.apply(this,arguments);this.message=t.message,this.stack=t.stack}function h(t,e){e=!!e;for(var r=t.length,s=new Uint8Array(e?4*r:r),i=0,n=0;i=r)throw new Error("Malformed string, low surrogate expected at position "+i);a=(55296^a)<<10|65536|56320^t.charCodeAt(i)}else if(!e&&a>>>8)throw new Error("Wide characters are not allowed.");!e||a<=127?s[n++]=a:a<=2047?(s[n++]=192|a>>6,s[n++]=128|63&a):a<=65535?(s[n++]=224|a>>12,s[n++]=128|a>>6&63,s[n++]=128|63&a):(s[n++]=240|a>>18,s[n++]=128|a>>12&63,s[n++]=128|a>>6&63,s[n++]=128|63&a)}return s.subarray(0,n)}function o(t){for(var e="",r=0;r=192&&a<224&&i+1=224&&a<240&&i+2=240&&a<248&&i+3>10,s[n++]=56320|1023&h)}}var o="";for(i=0;i>2,r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12),e>16?r.getUint32(16):0,e>16?r.getUint32(20):0,e>24?r.getUint32(24):0,e>24?r.getUint32(28):0),this.key=t}else if(!this.key)throw new Error("key is required")}AES_CTR_set_options(t,e,r){if(void 0!==r){if(r<8||r>48)throw new n("illegal counter size");this.counterSize=r;var s=Math.pow(2,r)-1;this.asm.set_mask(0,0,s/4294967296|0,0|s)}else this.counterSize=r=48,this.asm.set_mask(0,0,65535,4294967295);if(void 0===t)throw new Error("nonce is required");if(!p(t))throw new TypeError("unexpected nonce type");var i=t.length;if(!i||i>16)throw new n("illegal nonce size");this.nonce=t;var a=new DataView(new ArrayBuffer(16));if(new Uint8Array(a.buffer).set(t),this.asm.set_nonce(a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)),void 0!==e){if(!u(e))throw new TypeError("unexpected counter type");if(e<0||e>=Math.pow(2,r))throw new n("illegal counter value");this.counter=e,this.asm.set_counter(0,0,e/4294967296|0,0|e)}else this.counter=0}AES_set_iv(t){if(void 0!==t){if(!p(t))throw new TypeError("unexpected iv type");if(16!==t.length)throw new n("illegal iv size");var e=new DataView(t.buffer,t.byteOffset,t.byteLength);this.iv=t,this.asm.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else this.iv=null,this.asm.set_iv(0,0,0,0)}AES_set_padding(t){this.padding=void 0===t||!!t}AES_reset(t,e,r){return this.result=null,this.pos=0,this.len=0,this.AES_set_key(t),this.AES_set_iv(e),this.AES_set_padding(r),this}AES_Encrypt_process(t){if(!p(t))throw new TypeError("data isn't of expected type");for(var r=this.asm,s=this.heap,i=e.ENC[this.mode],n=e.HEAP_DATA,a=this.pos,h=this.len,o=0,c=t.length||0,u=0,f=0,l=new Uint8Array(h+c&-16);c>0;)h+=f=y(s,a+h,t,o,c),o+=f,c-=f,(f=r.cipher(i,n+a,h))&&l.set(s.subarray(a,a+f),u),u+=f,f0;)h+=w=y(s,a+h,t,o,c),o+=w,c-=w,(w=r.cipher(i,n+a,h-(c?0:l)))&&_.set(s.subarray(a,a+w),u),u+=w,w0){if(f%16){if(this.hasOwnProperty("padding"))throw new n("data length must be a multiple of the block size");f+=16-f%16}if(i.cipher(o,c+u,f),this.hasOwnProperty("padding")&&this.padding){var p=h[u+l-1];if(p<1||p>16||p>l)throw new a("bad padding");for(var w=0,y=p;y>1;y--)w|=p^h[u+l-y];if(w)throw new a("bad padding");l-=p}}var _=new Uint8Array(s+l);return s>0&&_.set(r),l>0&&_.set(h.subarray(u,u+l),s),this.result=_,this.pos=0,this.len=0,this}}var d=68719476704;class A extends _{constructor(t,e,r,s,i,n){super(t,void 0,!1,i,n),this.nonce=null,this.adata=null,this.iv=null,this.counter=1,this.tagSize=16,this.mode="GCM",this.BLOCK_SIZE=16,this.reset(t,s,e,r)}reset(t,e,r,s){return this.AES_GCM_reset(t,e,r,s)}encrypt(t){return this.AES_GCM_encrypt(t)}decrypt(t){return this.AES_GCM_decrypt(t)}AES_GCM_Encrypt_process(t){if(!p(t))throw new TypeError("data isn't of expected type");var r=0,s=t.length||0,i=this.asm,n=this.heap,a=this.counter,h=this.pos,o=this.len,c=0,u=o+s&-16,f=0;if((a-1<<4)+o+s>d)throw new RangeError("counter overflow");for(var l=new Uint8Array(u);s>0;)o+=f=y(n,h+o,t,r,s),r+=f,s-=f,f=i.cipher(e.ENC.CTR,e.HEAP_DATA+h,o),(f=i.mac(e.MAC.GCM,e.HEAP_DATA+h,f))&&l.set(n.subarray(h,h+f),c),a+=f>>>4,c+=f,f>>29,r[4]=u>>>21,r[5]=u>>>13&255,r[6]=u>>>5&255,r[7]=u<<3&255,r[8]=r[9]=r[10]=0,r[11]=f>>>29,r[12]=f>>>21&255,r[13]=f>>>13&255,r[14]=f>>>5&255,r[15]=f<<3&255,t.mac(e.MAC.GCM,e.HEAP_DATA,16),t.get_iv(e.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(e.ENC.CTR,e.HEAP_DATA,16),o.set(r.subarray(0,i),h),this.result=o,this.counter=1,this.pos=0,this.len=0,this}AES_GCM_Decrypt_process(t){if(!p(t))throw new TypeError("data isn't of expected type");var r=0,s=t.length||0,i=this.asm,n=this.heap,a=this.counter,h=this.tagSize,o=this.pos,c=this.len,u=0,f=c+s>h?c+s-h&-16:0,l=c+s-f,w=0;if((a-1<<4)+c+s>d)throw new RangeError("counter overflow");for(var _=new Uint8Array(f);s>l;)c+=w=y(n,o+c,t,r,s-l),r+=w,s-=w,w=i.mac(e.MAC.GCM,e.HEAP_DATA+o,w),(w=i.cipher(e.DEC.CTR,e.HEAP_DATA+o,w))&&_.set(n.subarray(o,o+w),u),a+=w>>>4,u+=w,o=0,c=0;return s>0&&(c+=y(n,0,t,r,s)),this.result=_,this.counter=a,this.pos=o,this.len=c,this}AES_GCM_Decrypt_finish(){var t=this.asm,r=this.heap,s=this.tagSize,n=this.adata,h=this.counter,o=this.pos,c=this.len,u=c-s;if(c>>29,r[4]=w>>>21,r[5]=w>>>13&255,r[6]=w>>>5&255,r[7]=w<<3&255,r[8]=r[9]=r[10]=0,r[11]=y>>>29,r[12]=y>>>21&255,r[13]=y>>>13&255,r[14]=y>>>5&255,r[15]=y<<3&255,t.mac(e.MAC.GCM,e.HEAP_DATA,16),t.get_iv(e.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(e.ENC.CTR,e.HEAP_DATA,16);var _=0;for(p=0;p16)throw new n("illegal tagSize value");this.tagSize=r}else this.tagSize=16;if(void 0===s)throw new Error("nonce is required");if(!p(s))throw new TypeError("unexpected nonce type");this.nonce=s;var f=s.length||0,l=new Uint8Array(16);12!==f?(this._gcm_mac_process(s),c[0]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=0,c[11]=f>>>29,c[12]=f>>>21&255,c[13]=f>>>13&255,c[14]=f>>>5&255,c[15]=f<<3&255,o.mac(e.MAC.GCM,e.HEAP_DATA,16),o.get_iv(e.HEAP_DATA),o.set_iv(),l.set(c.subarray(0,16))):(l.set(s),l[15]=1);var w=new DataView(l.buffer);if(this.gamma0=w.getUint32(12),o.set_nonce(w.getUint32(0),w.getUint32(4),w.getUint32(8),0),o.set_mask(0,0,0,4294967295),void 0!==i&&null!==i){if(!p(i))throw new TypeError("unexpected adata type");if(i.length>d)throw new n("illegal adata length");i.length?(this.adata=i,this._gcm_mac_process(i)):this.adata=null}else this.adata=null;if(void 0!==a){if(!u(a))throw new TypeError("counter must be a number");if(a<1||a>4294967295)throw new RangeError("counter must be a positive 32-bit integer");this.counter=a,o.set_counter(0,0,0,this.gamma0+a|0)}else this.counter=1,o.set_counter(0,0,0,this.gamma0+1|0);if(void 0!==h){if(!u(h))throw new TypeError("iv must be a number");this.iv=h,this.AES_set_iv(h)}return this}_gcm_mac_process(t){for(var r=this.heap,s=this.asm,i=0,n=t.length||0,a=0;n>0;){for(i+=a=y(r,0,t,i,n),n-=a;15&a;)r[a++]=0;s.mac(e.MAC.GCM,e.HEAP_DATA,a)}}}A.encrypt=function(t,e,i,n,a){if(void 0===t)throw new SyntaxError("data required");if(void 0===e)throw new SyntaxError("key required");if(void 0===i)throw new SyntaxError("nonce required");return new A(e,i,n,a,r,s).encrypt(t).result},A.decrypt=function(t,e,i,n,a){if(void 0===t)throw new SyntaxError("data required");if(void 0===e)throw new SyntaxError("key required");if(void 0===i)throw new SyntaxError("nonce required");return new A(e,i,n,a,r,s).decrypt(t).result};class v{constructor(t){if(!(t=t||{}).hash)throw new SyntaxError("option 'hash' is required");if(!t.hash.HASH_SIZE)throw new SyntaxError("option 'hash' supplied doesn't seem to be a valid hash function");return this.hash=t.hash,this.BLOCK_SIZE=this.hash.BLOCK_SIZE,this.HMAC_SIZE=this.hash.HASH_SIZE,this.key=null,this.verify=null,this.result=null,void 0===t.password&&void 0===t.verify||this.reset(t),this}reset(t){var e=(t=t||{}).password;if(null===this.key&&!f(e)&&!e)throw new i("no key is associated with the instance");this.result=null,this.hash.reset(),(e||f(e))&&(this.key=x(this.hash,e));for(var r=new Uint8Array(this.key),s=0;st.BLOCK_SIZE?r.set(t.reset().process(e).finish().result):r.set(e),r}var E=64,g=32;function m(t){t=t||{},this.heap=w(Uint8Array,t.heap),this.asm=t.asm||function(t,e,r){"use asm";var s=0,i=0,n=0,a=0,h=0,o=0,c=0,u=0,f=0,l=0,p=0,w=0,y=0,_=0,d=0,A=0,v=0,x=0,E=0,g=0,m=0,b=0,S=0,C=0,M=0,U=0,H=new t.Uint8Array(r);function T(t,e,r,f,l,p,w,y,_,d,A,v,x,E,g,m){t=t|0;e=e|0;r=r|0;f=f|0;l=l|0;p=p|0;w=w|0;y=y|0;_=_|0;d=d|0;A=A|0;v=v|0;x=x|0;E=E|0;g=g|0;m=m|0;var b=0,S=0,C=0,M=0,U=0,H=0,T=0,D=0;b=s;S=i;C=n;M=a;U=h;H=o;T=c;D=u;D=t+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0x428a2f98|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;T=e+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0x71374491|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;H=r+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0xb5c0fbcf|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;U=f+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0xe9b5dba5|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;M=l+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0x3956c25b|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;C=p+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0x59f111f1|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;S=w+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0x923f82a4|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;b=y+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0xab1c5ed5|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;D=_+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0xd807aa98|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;T=d+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0x12835b01|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;H=A+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0x243185be|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;U=v+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0x550c7dc3|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;M=x+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0x72be5d74|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;C=E+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0x80deb1fe|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;S=g+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0x9bdc06a7|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;b=m+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0xc19bf174|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+t+d|0;D=t+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0xe49b69c1|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;e=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+e+A|0;T=e+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0xefbe4786|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+r+v|0;H=r+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0x0fc19dc6|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;f=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+f+x|0;U=f+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0x240ca1cc|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+l+E|0;M=l+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0x2de92c6f|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;p=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+p+g|0;C=p+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0x4a7484aa|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;w=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+w+m|0;S=w+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0x5cb0a9dc|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;y=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+y+t|0;b=y+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0x76f988da|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;_=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+e|0;D=_+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0x983e5152|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;d=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+d+r|0;T=d+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0xa831c66d|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;A=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+A+f|0;H=A+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0xb00327c8|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;v=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+v+l|0;U=v+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0xbf597fc7|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;x=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+x+p|0;M=x+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0xc6e00bf3|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;E=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+E+w|0;C=E+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0xd5a79147|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;g=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+g+y|0;S=g+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0x06ca6351|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;m=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+m+_|0;b=m+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0x14292967|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+t+d|0;D=t+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0x27b70a85|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;e=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+e+A|0;T=e+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0x2e1b2138|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+r+v|0;H=r+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0x4d2c6dfc|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;f=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+f+x|0;U=f+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0x53380d13|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+l+E|0;M=l+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0x650a7354|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;p=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+p+g|0;C=p+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0x766a0abb|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;w=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+w+m|0;S=w+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0x81c2c92e|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;y=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+y+t|0;b=y+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0x92722c85|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;_=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+e|0;D=_+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0xa2bfe8a1|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;d=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+d+r|0;T=d+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0xa81a664b|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;A=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+A+f|0;H=A+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0xc24b8b70|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;v=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+v+l|0;U=v+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0xc76c51a3|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;x=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+x+p|0;M=x+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0xd192e819|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;E=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+E+w|0;C=E+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0xd6990624|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;g=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+g+y|0;S=g+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0xf40e3585|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;m=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+m+_|0;b=m+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0x106aa070|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+t+d|0;D=t+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0x19a4c116|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;e=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+e+A|0;T=e+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0x1e376c08|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+r+v|0;H=r+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0x2748774c|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;f=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+f+x|0;U=f+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0x34b0bcb5|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+l+E|0;M=l+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0x391c0cb3|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;p=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+p+g|0;C=p+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0x4ed8aa4a|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;w=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+w+m|0;S=w+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0x5b9cca4f|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;y=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+y+t|0;b=y+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0x682e6ff3|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;_=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+e|0;D=_+D+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(T^U&(H^T))+0x748f82ee|0;M=M+D|0;D=D+(b&S^C&(b^S))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;d=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+d+r|0;T=d+T+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(H^M&(U^H))+0x78a5636f|0;C=C+T|0;T=T+(D&b^S&(D^b))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;A=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+A+f|0;H=A+H+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(U^C&(M^U))+0x84c87814|0;S=S+H|0;H=H+(T&D^b&(T^D))+(T>>>2^T>>>13^T>>>22^T<<30^T<<19^T<<10)|0;v=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+v+l|0;U=v+U+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(M^S&(C^M))+0x8cc70208|0;b=b+U|0;U=U+(H&T^D&(H^T))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;x=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+x+p|0;M=x+M+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(C^b&(S^C))+0x90befffa|0;D=D+M|0;M=M+(U&H^T&(U^H))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;E=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+E+w|0;C=E+C+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(S^D&(b^S))+0xa4506ceb|0;T=T+C|0;C=C+(M&U^H&(M^U))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;g=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+g+y|0;S=g+S+(T>>>6^T>>>11^T>>>25^T<<26^T<<21^T<<7)+(b^T&(D^b))+0xbef9a3f7|0;H=H+S|0;S=S+(C&M^U&(C^M))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;m=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+m+_|0;b=m+b+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(D^H&(T^D))+0xc67178f2|0;U=U+b|0;b=b+(S&C^M&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;s=s+b|0;i=i+S|0;n=n+C|0;a=a+M|0;h=h+U|0;o=o+H|0;c=c+T|0;u=u+D|0}function D(t){t=t|0;T(H[t|0]<<24|H[t|1]<<16|H[t|2]<<8|H[t|3],H[t|4]<<24|H[t|5]<<16|H[t|6]<<8|H[t|7],H[t|8]<<24|H[t|9]<<16|H[t|10]<<8|H[t|11],H[t|12]<<24|H[t|13]<<16|H[t|14]<<8|H[t|15],H[t|16]<<24|H[t|17]<<16|H[t|18]<<8|H[t|19],H[t|20]<<24|H[t|21]<<16|H[t|22]<<8|H[t|23],H[t|24]<<24|H[t|25]<<16|H[t|26]<<8|H[t|27],H[t|28]<<24|H[t|29]<<16|H[t|30]<<8|H[t|31],H[t|32]<<24|H[t|33]<<16|H[t|34]<<8|H[t|35],H[t|36]<<24|H[t|37]<<16|H[t|38]<<8|H[t|39],H[t|40]<<24|H[t|41]<<16|H[t|42]<<8|H[t|43],H[t|44]<<24|H[t|45]<<16|H[t|46]<<8|H[t|47],H[t|48]<<24|H[t|49]<<16|H[t|50]<<8|H[t|51],H[t|52]<<24|H[t|53]<<16|H[t|54]<<8|H[t|55],H[t|56]<<24|H[t|57]<<16|H[t|58]<<8|H[t|59],H[t|60]<<24|H[t|61]<<16|H[t|62]<<8|H[t|63])}function k(t){t=t|0;H[t|0]=s>>>24;H[t|1]=s>>>16&255;H[t|2]=s>>>8&255;H[t|3]=s&255;H[t|4]=i>>>24;H[t|5]=i>>>16&255;H[t|6]=i>>>8&255;H[t|7]=i&255;H[t|8]=n>>>24;H[t|9]=n>>>16&255;H[t|10]=n>>>8&255;H[t|11]=n&255;H[t|12]=a>>>24;H[t|13]=a>>>16&255;H[t|14]=a>>>8&255;H[t|15]=a&255;H[t|16]=h>>>24;H[t|17]=h>>>16&255;H[t|18]=h>>>8&255;H[t|19]=h&255;H[t|20]=o>>>24;H[t|21]=o>>>16&255;H[t|22]=o>>>8&255;H[t|23]=o&255;H[t|24]=c>>>24;H[t|25]=c>>>16&255;H[t|26]=c>>>8&255;H[t|27]=c&255;H[t|28]=u>>>24;H[t|29]=u>>>16&255;H[t|30]=u>>>8&255;H[t|31]=u&255}function G(){s=0x6a09e667;i=0xbb67ae85;n=0x3c6ef372;a=0xa54ff53a;h=0x510e527f;o=0x9b05688c;c=0x1f83d9ab;u=0x5be0cd19;f=l=0}function I(t,e,r,p,w,y,_,d,A,v){t=t|0;e=e|0;r=r|0;p=p|0;w=w|0;y=y|0;_=_|0;d=d|0;A=A|0;v=v|0;s=t;i=e;n=r;a=p;h=w;o=y;c=_;u=d;f=A;l=v}function Z(t,e){t=t|0;e=e|0;var r=0;if(t&63)return-1;while((e|0)>=64){D(t);t=t+64|0;e=e-64|0;r=r+64|0}f=f+r|0;if(f>>>0>>0)l=l+1|0;return r|0}function P(t,e,r){t=t|0;e=e|0;r=r|0;var s=0,i=0;if(t&63)return-1;if(~r)if(r&31)return-1;if((e|0)>=64){s=Z(t,e)|0;if((s|0)==-1)return-1;t=t+s|0;e=e-s|0}s=s+e|0;f=f+e|0;if(f>>>0>>0)l=l+1|0;H[t|e]=0x80;if((e|0)>=56){for(i=e+1|0;(i|0)<64;i=i+1|0)H[t|i]=0x00;D(t);e=0;H[t|0]=0}for(i=e+1|0;(i|0)<59;i=i+1|0)H[t|i]=0;H[t|56]=l>>>21&255;H[t|57]=l>>>13&255;H[t|58]=l>>>5&255;H[t|59]=l<<3&255|f>>>29;H[t|60]=f>>>21&255;H[t|61]=f>>>13&255;H[t|62]=f>>>5&255;H[t|63]=f<<3&255;D(t);if(~r)k(r);return s|0}function B(){s=p;i=w;n=y;a=_;h=d;o=A;c=v;u=x;f=64;l=0}function z(){s=E;i=g;n=m;a=b;h=S;o=C;c=M;u=U;f=64;l=0}function O(t,e,r,H,D,k,I,Z,P,B,z,O,q,L,R,K){t=t|0;e=e|0;r=r|0;H=H|0;D=D|0;k=k|0;I=I|0;Z=Z|0;P=P|0;B=B|0;z=z|0;O=O|0;q=q|0;L=L|0;R=R|0;K=K|0;G();T(t^0x5c5c5c5c,e^0x5c5c5c5c,r^0x5c5c5c5c,H^0x5c5c5c5c,D^0x5c5c5c5c,k^0x5c5c5c5c,I^0x5c5c5c5c,Z^0x5c5c5c5c,P^0x5c5c5c5c,B^0x5c5c5c5c,z^0x5c5c5c5c,O^0x5c5c5c5c,q^0x5c5c5c5c,L^0x5c5c5c5c,R^0x5c5c5c5c,K^0x5c5c5c5c);E=s;g=i;m=n;b=a;S=h;C=o;M=c;U=u;G();T(t^0x36363636,e^0x36363636,r^0x36363636,H^0x36363636,D^0x36363636,k^0x36363636,I^0x36363636,Z^0x36363636,P^0x36363636,B^0x36363636,z^0x36363636,O^0x36363636,q^0x36363636,L^0x36363636,R^0x36363636,K^0x36363636);p=s;w=i;y=n;_=a;d=h;A=o;v=c;x=u;f=64;l=0}function q(t,e,r){t=t|0;e=e|0;r=r|0;var f=0,l=0,p=0,w=0,y=0,_=0,d=0,A=0,v=0;if(t&63)return-1;if(~r)if(r&31)return-1;v=P(t,e,-1)|0;f=s,l=i,p=n,w=a,y=h,_=o,d=c,A=u;z();T(f,l,p,w,y,_,d,A,0x80000000,0,0,0,0,0,0,768);if(~r)k(r);return v|0}function L(t,e,r,f,l){t=t|0;e=e|0;r=r|0;f=f|0;l=l|0;var p=0,w=0,y=0,_=0,d=0,A=0,v=0,x=0,E=0,g=0,m=0,b=0,S=0,C=0,M=0,U=0;if(t&63)return-1;if(~l)if(l&31)return-1;H[t+e|0]=r>>>24;H[t+e+1|0]=r>>>16&255;H[t+e+2|0]=r>>>8&255;H[t+e+3|0]=r&255;q(t,e+4|0,-1)|0;p=E=s,w=g=i,y=m=n,_=b=a,d=S=h,A=C=o,v=M=c,x=U=u;f=f-1|0;while((f|0)>0){B();T(E,g,m,b,S,C,M,U,0x80000000,0,0,0,0,0,0,768);E=s,g=i,m=n,b=a,S=h,C=o,M=c,U=u;z();T(E,g,m,b,S,C,M,U,0x80000000,0,0,0,0,0,0,768);E=s,g=i,m=n,b=a,S=h,C=o,M=c,U=u;p=p^s;w=w^i;y=y^n;_=_^a;d=d^h;A=A^o;v=v^c;x=x^u;f=f-1|0}s=p;i=w;n=y;a=_;h=d;o=A;c=v;u=x;if(~l)k(l);return 0}return{reset:G,init:I,process:Z,finish:P,hmac_reset:B,hmac_init:O,hmac_finish:q,pbkdf2_generate_block:L}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.BLOCK_SIZE=E,this.HASH_SIZE=g,this.reset()}m.BLOCK_SIZE=E,m.HASH_SIZE=g,m.NAME="sha256";var b=m.prototype;b.reset=function(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this},b.process=function(t){if(null!==this.result)throw new i("state must be reset before processing new data");if(f(t)&&(t=h(t)),l(t)&&(t=new Uint8Array(t)),!p(t))throw new TypeError("data isn't of expected type");for(var e=this.asm,r=this.heap,s=this.pos,n=this.len,a=0,o=t.length,c=0;o>0;)n+=c=y(r,s+n,t,a,o),a+=c,o-=c,s+=c=e.process(s,n),(n-=c)||(s=0);return this.pos=s,this.len=n,this},b.finish=function(){if(null!==this.result)throw new i("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};var S=null;class C extends v{constructor(t){(t=t||{}).hash instanceof m||(t.hash=(null===S&&(S=new m({heapSize:1048576})),S)),super(t)}reset(t){t=t||{},this.result=null,this.hash.reset();var e=t.password;if(void 0!==e){f(e)&&(e=h(e));var r=this.key=x(this.hash,e);this.hash.reset().asm.hmac_init(r[0]<<24|r[1]<<16|r[2]<<8|r[3],r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[8]<<24|r[9]<<16|r[10]<<8|r[11],r[12]<<24|r[13]<<16|r[14]<<8|r[15],r[16]<<24|r[17]<<16|r[18]<<8|r[19],r[20]<<24|r[21]<<16|r[22]<<8|r[23],r[24]<<24|r[25]<<16|r[26]<<8|r[27],r[28]<<24|r[29]<<16|r[30]<<8|r[31],r[32]<<24|r[33]<<16|r[34]<<8|r[35],r[36]<<24|r[37]<<16|r[38]<<8|r[39],r[40]<<24|r[41]<<16|r[42]<<8|r[43],r[44]<<24|r[45]<<16|r[46]<<8|r[47],r[48]<<24|r[49]<<16|r[50]<<8|r[51],r[52]<<24|r[53]<<16|r[54]<<8|r[55],r[56]<<24|r[57]<<16|r[58]<<8|r[59],r[60]<<24|r[61]<<16|r[62]<<8|r[63])}else this.hash.asm.hmac_reset();var s=t.verify;return void 0!==s?this._hmac_init_verify(s):this.verify=null,this}finish(){if(null===this.key)throw new i("no key is associated with the instance");if(null!==this.result)throw new i("state must be reset before processing new data");var t=this.hash,e=this.hash.asm,r=this.hash.heap;e.hmac_finish(t.pos,t.len,0);var s=this.verify,n=new Uint8Array(g);if(n.set(r.subarray(0,g)),s)if(s.length===n.length){for(var a=0,h=0;h>>24&255,a>>>16&255,a>>>8&255,255&a])).finish().result);this.result.set(c.subarray(0,o),h);for(var u=1;u