diff --git a/.eslintrc.json b/.eslintrc.json index 666ee59..4f36cd9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -33,5 +33,10 @@ "no-console":0, "no-global-assign": ["error", {"exceptions": ["browser"]}], "no-native-reassign": ["error", {"exceptions": ["browser"]}] + }, + "settings": { + "polyfills": [ + "TextEncoder" + ] } } diff --git a/package-lock.json b/package-lock.json index f3133ea..2bcd4b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,9 @@ "version": "1.1.1", "license": "MIT", "dependencies": { - "spectre.css": "^0.5.9" + "fast-text-encoding": "^1.0.6", + "spectre.css": "^0.5.9", + "webcrypto-liner": "^1.4.2" }, "devDependencies": { "eslint": "^7.32.0", @@ -20,6 +22,12 @@ "wemf": "^1.3.0" } }, + "fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "extraneous": true + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -179,6 +187,60 @@ "integrity": "sha512-za4DOflM2h73Rs2ORnhS2IU73sVRjrN4x5ZmOZ8WgLCSOVuZ1+y1K0NQKy8xqaPW52ezN+ni2N2RBUKt532ULA==", "dev": true }, + "node_modules/@peculiar/asn1-schema": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", + "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", + "dependencies": { + "asn1js": "^3.0.5", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" + } + }, + "node_modules/@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@stablelib/binary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", + "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", + "dependencies": { + "@stablelib/int": "^1.0.1" + } + }, + "node_modules/@stablelib/hash": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", + "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==" + }, + "node_modules/@stablelib/int": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", + "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==" + }, + "node_modules/@stablelib/sha3": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/sha3/-/sha3-1.0.1.tgz", + "integrity": "sha512-82OHZcxWsJAS34L64VItIbqZdcdYgBJmeToYaou9lUA+iMjajdfOVZDDrditfV8C8yXUDrlS3BuMRWmKf9NQhQ==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/wipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", + "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -378,6 +440,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/asmcrypto.js": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz", + "integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA==" + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/ast-metadata-inferer": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/ast-metadata-inferer/-/ast-metadata-inferer-0.8.0.tgz", @@ -417,6 +497,11 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -427,6 +512,11 @@ "concat-map": "0.0.1" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, "node_modules/browserslist": { "version": "4.23.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", @@ -553,6 +643,16 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/core-js": { + "version": "3.36.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.36.1.tgz", + "integrity": "sha512-BTvUrwxVBezj5SZ3f10ImnX2oRByMxql3EimVqMysepbC9EeMUOpLwdy6Eoili2x6E4kf+ZUB5k/+Jv55alPfA==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -675,6 +775,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "node_modules/detect-indent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", @@ -711,6 +820,19 @@ "integrity": "sha512-ncfPC8UnGIyGFrPE03J5Xn6yTZ6R+clkcZbuG1PJbjAaZBFS4Kn3UKfzu8eilzru6SfC8TPsHuwv0p0eYVu+ww==", "dev": true }, + "node_modules/elliptic": { + "version": "6.5.0", + "resolved": "git+ssh://git@github.com/mahrud/elliptic.git#75637c76678e83c31682fd967c2fa9ff4761b3fc", + "dependencies": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -1329,6 +1451,11 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1620,6 +1747,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -1632,6 +1768,16 @@ "node": ">= 0.4" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -1679,8 +1825,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/internal-slot": { "version": "1.0.7", @@ -2067,6 +2212,16 @@ "node": ">=10" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2364,6 +2519,22 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dependencies": { + "tslib": "^2.6.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -2780,6 +2951,11 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2937,6 +3113,36 @@ "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", "dev": true }, + "node_modules/webcrypto-core": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", + "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.3.8", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.1", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" + } + }, + "node_modules/webcrypto-liner": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webcrypto-liner/-/webcrypto-liner-1.4.3.tgz", + "integrity": "sha512-gzlk7ciS5zqc8QZMwpzpRxxwkcQKDJDndhr/hHWQe18Rzafhji3a7CaSxIeA2jcL0bLcAK+P77K3lWS1QXMMYA==", + "dependencies": { + "@peculiar/asn1-schema": "^2.3.8", + "@peculiar/json-schema": "^1.1.12", + "@stablelib/sha3": "^1.0.1", + "asmcrypto.js": "^2.3.2", + "asn1js": "^3.0.5", + "core-js": "^3.35.1", + "des.js": "^1.1.0", + "elliptic": "git+https://github.com/mahrud/elliptic.git", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2", + "webcrypto-core": "^1.7.8" + } + }, "node_modules/wemf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/wemf/-/wemf-1.3.0.tgz", diff --git a/package.json b/package.json index d1d988b..ff212a6 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "Edge > 14" ], "scripts": { - "deps:update": "cp node_modules/spectre.css/dist/spectre.min.css wallabagger/css/spectre.min.css && cp node_modules/spectre.css/dist/spectre-exp.min.css wallabagger/css/spectre-exp.min.css", - "lint": "eslint wallabagger/js/*", + "deps:update": "cp node_modules/spectre.css/dist/spectre.min.css wallabagger/css/spectre.min.css && cp node_modules/spectre.css/dist/spectre-exp.min.css wallabagger/css/spectre-exp.min.css && cp node_modules/fast-text-encoding/text.min.js wallabagger/js/deps/text.min.js && cp node_modules/asmcrypto.js/asmcrypto.all.es5.min.js wallabagger/js/deps/asmcrypto.all.es5.min.js && cp node_modules/webcrypto-liner/build/webcrypto-liner.shim.min.js wallabagger/js/deps/webcrypto-liner.shim.min.js", + "lint": "eslint wallabagger/js/*.js", "locales:sort": "sort-json -i -d=1 wallabagger/_locales/**/messages.json", "manifest": "npm run manifest:firefox && npm run manifest:chrome", "manifest:firefox": "wemf --browser firefox --validate wallabagger/manifest.json", @@ -48,6 +48,8 @@ "wemf": "^1.3.0" }, "dependencies": { - "spectre.css": "^0.5.9" + "fast-text-encoding": "^1.0.6", + "spectre.css": "^0.5.9", + "webcrypto-liner": "^1.4.2" } } diff --git a/wallabagger/js/deps/asmcrypto.all.es5.min.js b/wallabagger/js/deps/asmcrypto.all.es5.min.js new file mode 100755 index 0000000..2e5186d --- /dev/null +++ b/wallabagger/js/deps/asmcrypto.all.es5.min.js @@ -0,0 +1 @@ +var asmCrypto=function(f){"use strict";var t="undefined"==typeof atob?function(f){return Buffer.from(f,"base64").toString("binary")}:atob,e="undefined"==typeof btoa?function(f){return Buffer.from(f,"binary").toString("base64")}:btoa;function r(f,t){void 0===t&&(t=!1);for(var e=f.length,r=new Uint8Array(t?4*e:e),n=0,i=0;n=e)throw new Error("Malformed string, low surrogate expected at position "+n);a=(55296^a)<<10|65536|56320^f.charCodeAt(n)}else if(!t&&a>>>8)throw new Error("Wide characters are not allowed.");!t||a<=127?r[i++]=a:(a<=2047?r[i++]=192|a>>6:(a<=65535?r[i++]=224|a>>12:(r[i++]=240|a>>18,r[i++]=128|a>>12&63),r[i++]=128|a>>6&63),r[i++]=128|63&a)}return r.subarray(0,i)}function n(f){var t=f.length;1&t&&(f="0"+f,t++);for(var e=new Uint8Array(t>>1),r=0;r>1]=parseInt(f.substr(r,2),16);return e}function i(f){return r(t(f))}function a(f,t){void 0===t&&(t=!1);for(var e=f.length,r=new Array(e),n=0,i=0;n>10,r[i++]=56320|1023&s)}}var o="",x=16384;for(n=0;n>>7),r^=e;return r^=99,r}i||a(),_=[],x=[],c=[[],[],[],[]],v=[[],[],[],[]];for(var t=0;t<256;t++){var e=f(t);_[t]=e,x[e]=t,c[0][t]=s(2,e)<<24|e<<16|e<<8|s(3,e),v[0][e]=s(14,t)<<24|s(9,t)<<16|s(13,t)<<8|s(11,t);for(var r=1;r<4;r++)c[r][t]=c[r-1][t]>>>8|c[r-1][t]<<24,v[r][e]=v[r-1][e]>>>8|v[r-1][e]<<24}h=!0}var f=function(f,t){h||u();var b=new Uint32Array(t);b.set(_,512),b.set(x,768);for(var e=0;e<4;e++)b.set(c[e],4096+1024*e>>2),b.set(v[e],8192+1024*e>>2);function r(f,t,e,r,n,i,a,s,o){var x=b.subarray(0,60),c=b.subarray(256,316);x.set([t,e,r,n,i,a,s,o]);for(var h=f,u=1;h<4*f+28;h++){var l=x[h-1];(h%f==0||8===f&&h%f==4)&&(l=_[l>>>24]<<24^_[l>>>16&255]<<16^_[l>>>8&255]<<8^_[255&l]),h%f==0&&(l=l<<8^l>>>24^u<<24,u=u<<1^(128&u?27:0)),x[h]=x[h-f]^l}for(var p=0;p>>24]]^v[1][_[l>>>16&255]]^v[2][_[l>>>8&255]]^v[3][_[255&l]]}g.set_rounds(f+5)}var n={Uint8Array:Uint8Array,Uint32Array:Uint32Array},g=function(f,t,e){"use asm";var b=0,g=0,_=0,v=0,p=0,y=0,d=0,w=0,n=0,i=0,a=0,s=0,o=0,x=0,c=0,h=0,A=0,m=0,E=0,C=0,u=0;var S=new f.Uint32Array(e),l=new f.Uint8Array(e);function U(f,t,e,r,n,i,a,s){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;var o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0;o=e|0x400,x=e|0x800,c=e|0xc00;n=n^S[(f|0)>>2],i=i^S[(f|4)>>2],a=a^S[(f|8)>>2],s=s^S[(f|12)>>2];for(y=16;(y|0)<=r<<4;y=y+16|0){h=S[(e|n>>22&1020)>>2]^S[(o|i>>14&1020)>>2]^S[(x|a>>6&1020)>>2]^S[(c|s<<2&1020)>>2]^S[(f|y|0)>>2],u=S[(e|i>>22&1020)>>2]^S[(o|a>>14&1020)>>2]^S[(x|s>>6&1020)>>2]^S[(c|n<<2&1020)>>2]^S[(f|y|4)>>2],l=S[(e|a>>22&1020)>>2]^S[(o|s>>14&1020)>>2]^S[(x|n>>6&1020)>>2]^S[(c|i<<2&1020)>>2]^S[(f|y|8)>>2],p=S[(e|s>>22&1020)>>2]^S[(o|n>>14&1020)>>2]^S[(x|i>>6&1020)>>2]^S[(c|a<<2&1020)>>2]^S[(f|y|12)>>2];n=h,i=u,a=l,s=p}b=S[(t|n>>22&1020)>>2]<<24^S[(t|i>>14&1020)>>2]<<16^S[(t|a>>6&1020)>>2]<<8^S[(t|s<<2&1020)>>2]^S[(f|y|0)>>2],g=S[(t|i>>22&1020)>>2]<<24^S[(t|a>>14&1020)>>2]<<16^S[(t|s>>6&1020)>>2]<<8^S[(t|n<<2&1020)>>2]^S[(f|y|4)>>2],_=S[(t|a>>22&1020)>>2]<<24^S[(t|s>>14&1020)>>2]<<16^S[(t|n>>6&1020)>>2]<<8^S[(t|i<<2&1020)>>2]^S[(f|y|8)>>2],v=S[(t|s>>22&1020)>>2]<<24^S[(t|n>>14&1020)>>2]<<16^S[(t|i>>6&1020)>>2]<<8^S[(t|a<<2&1020)>>2]^S[(f|y|12)>>2]}function r(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;U(0x0000,0x0800,0x1000,u,f,t,e,r)}function M(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var n=0;U(0x0400,0x0c00,0x2000,u,f,r,e,t);n=g,g=v,v=n}function O(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;U(0x0000,0x0800,0x1000,u,p^f,y^t,d^e,w^r);p=b,y=g,d=_,w=v}function H(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var n=0;U(0x0400,0x0c00,0x2000,u,f,r,e,t);n=g,g=v,v=n;b=b^p,g=g^y,_=_^d,v=v^w;p=f,y=t,d=e,w=r}function L(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;U(0x0000,0x0800,0x1000,u,p,y,d,w);p=b=b^f,y=g=g^t,d=_=_^e,w=v=v^r}function k(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;U(0x0000,0x0800,0x1000,u,p,y,d,w);b=b^f,g=g^t,_=_^e,v=v^r;p=f,y=t,d=e,w=r}function P(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;U(0x0000,0x0800,0x1000,u,p,y,d,w);p=b,y=g,d=_,w=v;b=b^f,g=g^t,_=_^e,v=v^r}function D(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;U(0x0000,0x0800,0x1000,u,n,i,a,s);s=~h&s|h&s+1;a=~c&a|c&a+((s|0)==0);i=~x&i|x&i+((a|0)==0);n=~o&n|o&n+((i|0)==0);b=b^f;g=g^t;_=_^e;v=v^r}function R(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var n=0,i=0,a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0;f=f^p,t=t^y,e=e^d,r=r^w;n=A|0,i=m|0,a=E|0,s=C|0;for(;(u|0)<128;u=u+1|0){if(n>>>31){o=o^f,x=x^t,c=c^e,h=h^r}n=n<<1|i>>>31,i=i<<1|a>>>31,a=a<<1|s>>>31,s=s<<1;l=r&1;r=r>>>1|e<<31,e=e>>>1|t<<31,t=t>>>1|f<<31,f=f>>>1;if(l)f=f^0xe1000000}p=o,y=x,d=c,w=h}function T(f){f=f|0;u=f}function Z(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;b=f,g=t,_=e,v=r}function B(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;p=f,y=t,d=e,w=r}function I(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;n=f,i=t,a=e,s=r}function z(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;o=f,x=t,c=e,h=r}function G(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;s=~h&s|h&r,a=~c&a|c&e,i=~x&i|x&t,n=~o&n|o&f}function N(f){f=f|0;if(f&15)return-1;l[f|0]=b>>>24,l[f|1]=b>>>16&255,l[f|2]=b>>>8&255,l[f|3]=b&255,l[f|4]=g>>>24,l[f|5]=g>>>16&255,l[f|6]=g>>>8&255,l[f|7]=g&255,l[f|8]=_>>>24,l[f|9]=_>>>16&255,l[f|10]=_>>>8&255,l[f|11]=_&255,l[f|12]=v>>>24,l[f|13]=v>>>16&255,l[f|14]=v>>>8&255,l[f|15]=v&255;return 16}function j(f){f=f|0;if(f&15)return-1;l[f|0]=p>>>24,l[f|1]=p>>>16&255,l[f|2]=p>>>8&255,l[f|3]=p&255,l[f|4]=y>>>24,l[f|5]=y>>>16&255,l[f|6]=y>>>8&255,l[f|7]=y&255,l[f|8]=d>>>24,l[f|9]=d>>>16&255,l[f|10]=d>>>8&255,l[f|11]=d&255,l[f|12]=w>>>24,l[f|13]=w>>>16&255,l[f|14]=w>>>8&255,l[f|15]=w&255;return 16}function F(){r(0,0,0,0);A=b,m=g,E=_,C=v}function q(f,t,e){f=f|0;t=t|0;e=e|0;var r=0;if(t&15)return-1;while((e|0)>=16){K[f&7](l[t|0]<<24|l[t|1]<<16|l[t|2]<<8|l[t|3],l[t|4]<<24|l[t|5]<<16|l[t|6]<<8|l[t|7],l[t|8]<<24|l[t|9]<<16|l[t|10]<<8|l[t|11],l[t|12]<<24|l[t|13]<<16|l[t|14]<<8|l[t|15]);l[t|0]=b>>>24,l[t|1]=b>>>16&255,l[t|2]=b>>>8&255,l[t|3]=b&255,l[t|4]=g>>>24,l[t|5]=g>>>16&255,l[t|6]=g>>>8&255,l[t|7]=g&255,l[t|8]=_>>>24,l[t|9]=_>>>16&255,l[t|10]=_>>>8&255,l[t|11]=_&255,l[t|12]=v>>>24,l[t|13]=v>>>16&255,l[t|14]=v>>>8&255,l[t|15]=v&255;r=r+16|0,t=t+16|0,e=e-16|0}return r|0}function V(f,t,e){f=f|0;t=t|0;e=e|0;var r=0;if(t&15)return-1;while((e|0)>=16){W[f&1](l[t|0]<<24|l[t|1]<<16|l[t|2]<<8|l[t|3],l[t|4]<<24|l[t|5]<<16|l[t|6]<<8|l[t|7],l[t|8]<<24|l[t|9]<<16|l[t|10]<<8|l[t|11],l[t|12]<<24|l[t|13]<<16|l[t|14]<<8|l[t|15]);r=r+16|0,t=t+16|0,e=e-16|0}return r|0}var K=[r,M,O,H,L,k,P,D];var W=[O,R];return{set_rounds:T,set_state:Z,set_iv:B,set_nonce:I,set_mask:z,set_counter:G,get_state:N,get_iv:j,gcm_init:F,cipher:q,mac:V}}(n,f,t);return g.set_key=r,g};return f.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},f.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},f.MAC={CBC:0,GCM:1},f.HEAP_DATA=16384,f}(),u=function(){function f(f,t,e,r){void 0===e&&(e=!0),this.pos=0,this.len=0,this.mode=r,this.heap=x().subarray(g.HEAP_DATA),this.asm=new g(null,this.heap.buffer),this.pos=0,this.len=0;var n=f.length;if(16!==n&&24!==n&&32!==n)throw new _("illegal key size");var i=new DataView(f.buffer,f.byteOffset,f.byteLength);if(this.asm.set_key(n>>2,i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12),16Math.pow(2,8*i.lengthSize)-16)throw new _("illegal dataLength value");if(void 0!==e){if(e.length>A)throw new _("illegal adata length");i.adata=e.length?e:void 0}return i.dataLength=n,i.counter=1,i.AES_CCM_calculate_iv(),i.AES_CTR_set_options(t,i.counter,8*i.lengthSize),i}return w(i,a),i.encrypt=function(f,t,e,r,n){return void 0===n&&(n=16),new i(t,e,r,n,f.length).encrypt(f)},i.decrypt=function(f,t,e,r,n){return void 0===n&&(n=16),new i(t,e,r,n,f.length-n).decrypt(f)},i.prototype.encrypt=function(f){this.dataLength=f.length||0;var t=this.AES_CCM_Encrypt_process(f),e=this.AES_CCM_Encrypt_finish(),r=new Uint8Array(t.length+e.length);return t.length&&r.set(t),e.length&&r.set(e,t.length),r},i.prototype.decrypt=function(f){this.dataLength=f.length||0;var t=this.AES_CCM_Decrypt_process(f),e=this.AES_CCM_Decrypt_finish(),r=new Uint8Array(t.length+e.length);return t.length&&r.set(t),e.length&&r.set(e,t.length),r},i.prototype.AES_CCM_calculate_iv=function(){var f=this.nonce,t=this.adata,e=this.tagSize,r=this.lengthSize,n=this.dataLength,i=new Uint8Array(16+(t?2+t.length:0));i[0]=(t?64:0)|e-2<<2|r-1,i.set(f,1),6>>16&15),5>>8&255),4>>24),2>>16&255),i[14]=n>>>8&255,i[15]=255&n,t&&(i[16]=t.length>>>8&255,i[17]=255&t.length,i.set(t,18)),this._cbc_mac_process(i),this.asm.get_state(g.HEAP_DATA);var a=new Uint8Array(this.heap.subarray(0,16)),s=new DataView(a.buffer,a.byteOffset,a.byteLength);this.asm.set_iv(s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12))},i.prototype._cbc_mac_process=function(f){for(var t=this.heap,e=this.asm,r=0,n=f.length||0,i=0;0>>4,x+=c,c>>4,x+=u,s=0,o=0;return 0=Math.pow(2,e))throw new _("illegal counter value");this.counter=t,this.asm.set_counter(0,0,t/4294967296|0,0|t)},i}(u),C=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,t){f.__proto__=t}||function(f,t){for(var e in t)t.hasOwnProperty(e)&&(f[e]=t[e])};return function(f,t){function e(){this.constructor=f}r(f,t),f.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}}(),S=function(r){function n(f,t){var e=r.call(this,f,t,!0,"CFB")||this;return delete e.padding,e}return C(n,r),n.encrypt=function(f,t,e){return new n(t,e).encrypt(f)},n.decrypt=function(f,t,e){return new n(t,e).decrypt(f)},n.prototype.encrypt=function(f){var t=this.AES_Encrypt_process(f),e=this.AES_Encrypt_finish();return c(t,e)},n.prototype.decrypt=function(f){var t=this.AES_Decrypt_process(f),e=this.AES_Decrypt_finish();return c(t,e)},n}(u),U=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,t){f.__proto__=t}||function(f,t){for(var e in t)t.hasOwnProperty(e)&&(f[e]=t[e])};return function(f,t){function e(){this.constructor=f}r(f,t),f.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}}(),M=function(e){function r(f,t){return void 0===t&&(t=!1),e.call(this,f,void 0,t,"ECB")||this}return U(r,e),r.encrypt=function(f,t,e){return void 0===e&&(e=!1),new r(t,e).encrypt(f)},r.decrypt=function(f,t,e){return void 0===e&&(e=!1),new r(t,e).decrypt(f)},r.prototype.encrypt=function(f){var t=this.AES_Encrypt_process(f),e=this.AES_Encrypt_finish();return c(t,e)},r.prototype.decrypt=function(f){var t=this.AES_Decrypt_process(f),e=this.AES_Decrypt_finish();return c(t,e)},r}(u);function O(f){for(var t=128&f[0],e=0;e<15;e++)f[e]=f[e]<<1^(128&f[e+1]?1:0);f[15]=f[15]<<1^(t?135:0)}var H=function(){function e(f){this.bufferLength=0,this.k=new M(f).encrypt(new Uint8Array(16)),O(this.k),this.cbc=new d(f,new Uint8Array(16),!1),this.buffer=new Uint8Array(16),this.result=null}return e.bytes=function(f,t){return new e(t).process(f).finish().result},e.prototype.process=function(f){if(16=Math.pow(2,e))throw new _("illegal counter value");this.asm.set_counter(0,0,t/4294967296|0,0|t)}},n}(u),P=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,t){f.__proto__=t}||function(f,t){for(var e in t)t.hasOwnProperty(e)&&(f[e]=t[e])};return function(f,t){function e(){this.constructor=f}r(f,t),f.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}}(),D=68719476704,R=function(o){function i(f,t,e,r){void 0===r&&(r=16);var n=o.call(this,f,void 0,!1,"CTR")||this;if(n.tagSize=r,n.gamma0=0,n.counter=1,n.asm.gcm_init(),n.tagSize<4||16>>29,n.heap[12]=i>>>21&255,n.heap[13]=i>>>13&255,n.heap[14]=i>>>5&255,n.heap[15]=i<<3&255,n.asm.mac(g.MAC.GCM,g.HEAP_DATA,16),n.asm.get_iv(g.HEAP_DATA),n.asm.set_iv(0,0,0,0),a.set(n.heap.subarray(0,16))):(a.set(t),a[15]=1);var s=new DataView(a.buffer);if(n.gamma0=s.getUint32(12),n.asm.set_nonce(s.getUint32(0),s.getUint32(4),s.getUint32(8),0),n.asm.set_mask(0,0,0,4294967295),void 0!==e){if(e.length>D)throw new _("illegal adata length");e.length?(n.adata=e,n._gcm_mac_process(e)):n.adata=void 0}else n.adata=void 0;if(n.counter<1||4294967295>>4,o+=c,c>>29,t[4]=x>>>21,t[5]=x>>>13&255,t[6]=x>>>5&255,t[7]=x<<3&255,t[8]=t[9]=t[10]=0,t[11]=c>>>29,t[12]=c>>>21&255,t[13]=c>>>13&255,t[14]=c>>>5&255,t[15]=c<<3&255,f.mac(g.MAC.GCM,g.HEAP_DATA,16),f.get_iv(g.HEAP_DATA),f.set_counter(0,0,0,this.gamma0),f.cipher(g.ENC.CTR,g.HEAP_DATA,16),s.set(t.subarray(0,r),a),this.counter=1,this.pos=0,this.len=0,s},i.prototype.AES_GCM_Decrypt_process=function(f){var t=0,e=f.length||0,r=this.asm,n=this.heap,i=this.counter,a=this.tagSize,s=this.pos,o=this.len,x=0,c=a>>4,x+=u,s=0,o=0;return 0>>29,t[4]=h>>>21,t[5]=h>>>13&255,t[6]=h>>>5&255,t[7]=h<<3&255,t[8]=t[9]=t[10]=0,t[11]=u>>>29,t[12]=u>>>21&255,t[13]=u>>>13&255,t[14]=u>>>5&255,t[15]=u<<3&255,f.mac(g.MAC.GCM,g.HEAP_DATA,16),f.get_iv(g.HEAP_DATA),f.set_counter(0,0,0,this.gamma0),f.cipher(g.ENC.CTR,g.HEAP_DATA,16);for(var l=0,p=0;p(e|0)){for(;(r|0)<(f|0);r=r+4|0){pf[e+r>>2]=pf[t+r>>2]}}else{for(r=f-4|0;(r|0)>=0;r=r-4|0){pf[e+r>>2]=pf[t+r>>2]}}}function m(f,t,e){f=f|0;t=t|0;e=e|0;var r=0;for(;(r|0)<(f|0);r=r+4|0){pf[e+r>>2]=t}}function i(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var n=0,i=0,a=0,s=0,o=0;if((r|0)<=0)r=t;if((r|0)<(t|0))t=r;i=1;for(;(o|0)<(t|0);o=o+4|0){n=~pf[f+o>>2];a=(n&0xffff)+i|0;s=(n>>>16)+(a>>>16)|0;pf[e+o>>2]=s<<16|a&0xffff;i=s>>>16}for(;(o|0)<(r|0);o=o+4|0){pf[e+o>>2]=i-1|0}return i|0}function E(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var n=0,i=0,a=0;if((t|0)>(r|0)){for(a=t-4|0;(a|0)>=(r|0);a=a-4|0){if(pf[f+a>>2]|0)return 1}}else{for(a=r-4|0;(a|0)>=(t|0);a=a-4|0){if(pf[e+a>>2]|0)return-1}}for(;(a|0)>=0;a=a-4|0){n=pf[f+a>>2]|0,i=pf[e+a>>2]|0;if(n>>>0>>0)return-1;if(n>>>0>i>>>0)return 1}return 0}function a(f,t){f=f|0;t=t|0;var e=0;for(e=t-4|0;(e|0)>=0;e=e-4|0){if(pf[f+e>>2]|0)return e+4|0}return 0}function s(f,t,e,r,n,i){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var a=0,s=0,o=0,x=0,c=0,h=0;if((t|0)<(r|0)){x=f,f=e,e=x;x=t,t=r,r=x}if((i|0)<=0)i=t+4|0;if((i|0)<(r|0))t=r=i;for(;(h|0)<(r|0);h=h+4|0){a=pf[f+h>>2]|0;s=pf[e+h>>2]|0;x=((a&0xffff)+(s&0xffff)|0)+o|0;c=((a>>>16)+(s>>>16)|0)+(x>>>16)|0;pf[n+h>>2]=x&0xffff|c<<16;o=c>>>16}for(;(h|0)<(t|0);h=h+4|0){a=pf[f+h>>2]|0;x=(a&0xffff)+o|0;c=(a>>>16)+(x>>>16)|0;pf[n+h>>2]=x&0xffff|c<<16;o=c>>>16}for(;(h|0)<(i|0);h=h+4|0){pf[n+h>>2]=o|0;o=0}return o|0}function C(f,t,e,r,n,i){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var a=0,s=0,o=0,x=0,c=0,h=0;if((i|0)<=0)i=(t|0)>(r|0)?t+4|0:r+4|0;if((i|0)<(t|0))t=i;if((i|0)<(r|0))r=i;if((t|0)<(r|0)){for(;(h|0)<(t|0);h=h+4|0){a=pf[f+h>>2]|0;s=pf[e+h>>2]|0;x=((a&0xffff)-(s&0xffff)|0)+o|0;c=((a>>>16)-(s>>>16)|0)+(x>>16)|0;pf[n+h>>2]=x&0xffff|c<<16;o=c>>16}for(;(h|0)<(r|0);h=h+4|0){s=pf[e+h>>2]|0;x=o-(s&0xffff)|0;c=(x>>16)-(s>>>16)|0;pf[n+h>>2]=x&0xffff|c<<16;o=c>>16}}else{for(;(h|0)<(r|0);h=h+4|0){a=pf[f+h>>2]|0;s=pf[e+h>>2]|0;x=((a&0xffff)-(s&0xffff)|0)+o|0;c=((a>>>16)-(s>>>16)|0)+(x>>16)|0;pf[n+h>>2]=x&0xffff|c<<16;o=c>>16}for(;(h|0)<(t|0);h=h+4|0){a=pf[f+h>>2]|0;x=(a&0xffff)+o|0;c=(a>>>16)+(x>>16)|0;pf[n+h>>2]=x&0xffff|c<<16;o=c>>16}}for(;(h|0)<(i|0);h=h+4|0){pf[n+h>>2]=o|0}return o|0}function o(f,t,e,r,n,i){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0,b=0,g=0,_=0,v=0,d=0,w=0,A=0,m=0,E=0,C=0,S=0,U=0,M=0,O=0,H=0,L=0,k=0,P=0,D=0,R=0,T=0,Z=0,B=0,I=0,z=0,G=0,N=0,j=0,F=0,q=0,V=0,K=0,W=0,J=0,Q=0,X=0,Y=0,$=0,ff=0,tf=0,ef=0,rf=0,nf=0,af=0,sf=0,of=0,xf=0;if((t|0)>(r|0)){ff=f,tf=t;f=e,t=r;e=ff,r=tf}rf=t+r|0;if((i|0)>(rf|0)|(i|0)<=0)i=rf;if((i|0)<(t|0))t=i;if((i|0)<(r|0))r=i;for(;(nf|0)<(t|0);nf=nf+32|0){af=f+nf|0;p=pf[(af|0)>>2]|0,y=pf[(af|4)>>2]|0,b=pf[(af|8)>>2]|0,g=pf[(af|12)>>2]|0,_=pf[(af|16)>>2]|0,v=pf[(af|20)>>2]|0,d=pf[(af|24)>>2]|0,w=pf[(af|28)>>2]|0,a=p&0xffff,s=y&0xffff,o=b&0xffff,x=g&0xffff,c=_&0xffff,h=v&0xffff,u=d&0xffff,l=w&0xffff,p=p>>>16,y=y>>>16,b=b>>>16,g=g>>>16,_=_>>>16,v=v>>>16,d=d>>>16,w=w>>>16;V=K=W=J=Q=X=Y=$=0;for(sf=0;(sf|0)<(r|0);sf=sf+32|0){of=e+sf|0;xf=n+(nf+sf|0)|0;H=pf[(of|0)>>2]|0,L=pf[(of|4)>>2]|0,k=pf[(of|8)>>2]|0,P=pf[(of|12)>>2]|0,D=pf[(of|16)>>2]|0,R=pf[(of|20)>>2]|0,T=pf[(of|24)>>2]|0,Z=pf[(of|28)>>2]|0,A=H&0xffff,m=L&0xffff,E=k&0xffff,C=P&0xffff,S=D&0xffff,U=R&0xffff,M=T&0xffff,O=Z&0xffff,H=H>>>16,L=L>>>16,k=k>>>16,P=P>>>16,D=D>>>16,R=R>>>16,T=T>>>16,Z=Z>>>16;B=pf[(xf|0)>>2]|0,I=pf[(xf|4)>>2]|0,z=pf[(xf|8)>>2]|0,G=pf[(xf|12)>>2]|0,N=pf[(xf|16)>>2]|0,j=pf[(xf|20)>>2]|0,F=pf[(xf|24)>>2]|0,q=pf[(xf|28)>>2]|0;ff=((yf(a,A)|0)+(V&0xffff)|0)+(B&0xffff)|0;tf=((yf(p,A)|0)+(V>>>16)|0)+(B>>>16)|0;ef=((yf(a,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;B=ef<<16|ff&0xffff;ff=((yf(a,m)|0)+(rf&0xffff)|0)+(I&0xffff)|0;tf=((yf(p,m)|0)+(rf>>>16)|0)+(I>>>16)|0;ef=((yf(a,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;I=ef<<16|ff&0xffff;ff=((yf(a,E)|0)+(rf&0xffff)|0)+(z&0xffff)|0;tf=((yf(p,E)|0)+(rf>>>16)|0)+(z>>>16)|0;ef=((yf(a,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;z=ef<<16|ff&0xffff;ff=((yf(a,C)|0)+(rf&0xffff)|0)+(G&0xffff)|0;tf=((yf(p,C)|0)+(rf>>>16)|0)+(G>>>16)|0;ef=((yf(a,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;G=ef<<16|ff&0xffff;ff=((yf(a,S)|0)+(rf&0xffff)|0)+(N&0xffff)|0;tf=((yf(p,S)|0)+(rf>>>16)|0)+(N>>>16)|0;ef=((yf(a,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;N=ef<<16|ff&0xffff;ff=((yf(a,U)|0)+(rf&0xffff)|0)+(j&0xffff)|0;tf=((yf(p,U)|0)+(rf>>>16)|0)+(j>>>16)|0;ef=((yf(a,R)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,R)|0)+(tf>>>16)|0)+(ef>>>16)|0;j=ef<<16|ff&0xffff;ff=((yf(a,M)|0)+(rf&0xffff)|0)+(F&0xffff)|0;tf=((yf(p,M)|0)+(rf>>>16)|0)+(F>>>16)|0;ef=((yf(a,T)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,T)|0)+(tf>>>16)|0)+(ef>>>16)|0;F=ef<<16|ff&0xffff;ff=((yf(a,O)|0)+(rf&0xffff)|0)+(q&0xffff)|0;tf=((yf(p,O)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(a,Z)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(p,Z)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;V=rf;ff=((yf(s,A)|0)+(K&0xffff)|0)+(I&0xffff)|0;tf=((yf(y,A)|0)+(K>>>16)|0)+(I>>>16)|0;ef=((yf(s,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;I=ef<<16|ff&0xffff;ff=((yf(s,m)|0)+(rf&0xffff)|0)+(z&0xffff)|0;tf=((yf(y,m)|0)+(rf>>>16)|0)+(z>>>16)|0;ef=((yf(s,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;z=ef<<16|ff&0xffff;ff=((yf(s,E)|0)+(rf&0xffff)|0)+(G&0xffff)|0;tf=((yf(y,E)|0)+(rf>>>16)|0)+(G>>>16)|0;ef=((yf(s,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;G=ef<<16|ff&0xffff;ff=((yf(s,C)|0)+(rf&0xffff)|0)+(N&0xffff)|0;tf=((yf(y,C)|0)+(rf>>>16)|0)+(N>>>16)|0;ef=((yf(s,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;N=ef<<16|ff&0xffff;ff=((yf(s,S)|0)+(rf&0xffff)|0)+(j&0xffff)|0;tf=((yf(y,S)|0)+(rf>>>16)|0)+(j>>>16)|0;ef=((yf(s,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;j=ef<<16|ff&0xffff;ff=((yf(s,U)|0)+(rf&0xffff)|0)+(F&0xffff)|0;tf=((yf(y,U)|0)+(rf>>>16)|0)+(F>>>16)|0;ef=((yf(s,R)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,R)|0)+(tf>>>16)|0)+(ef>>>16)|0;F=ef<<16|ff&0xffff;ff=((yf(s,M)|0)+(rf&0xffff)|0)+(q&0xffff)|0;tf=((yf(y,M)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(s,T)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,T)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(s,O)|0)+(rf&0xffff)|0)+(V&0xffff)|0;tf=((yf(y,O)|0)+(rf>>>16)|0)+(V>>>16)|0;ef=((yf(s,Z)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(y,Z)|0)+(tf>>>16)|0)+(ef>>>16)|0;V=ef<<16|ff&0xffff;K=rf;ff=((yf(o,A)|0)+(W&0xffff)|0)+(z&0xffff)|0;tf=((yf(b,A)|0)+(W>>>16)|0)+(z>>>16)|0;ef=((yf(o,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;z=ef<<16|ff&0xffff;ff=((yf(o,m)|0)+(rf&0xffff)|0)+(G&0xffff)|0;tf=((yf(b,m)|0)+(rf>>>16)|0)+(G>>>16)|0;ef=((yf(o,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;G=ef<<16|ff&0xffff;ff=((yf(o,E)|0)+(rf&0xffff)|0)+(N&0xffff)|0;tf=((yf(b,E)|0)+(rf>>>16)|0)+(N>>>16)|0;ef=((yf(o,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;N=ef<<16|ff&0xffff;ff=((yf(o,C)|0)+(rf&0xffff)|0)+(j&0xffff)|0;tf=((yf(b,C)|0)+(rf>>>16)|0)+(j>>>16)|0;ef=((yf(o,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;j=ef<<16|ff&0xffff;ff=((yf(o,S)|0)+(rf&0xffff)|0)+(F&0xffff)|0;tf=((yf(b,S)|0)+(rf>>>16)|0)+(F>>>16)|0;ef=((yf(o,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;F=ef<<16|ff&0xffff;ff=((yf(o,U)|0)+(rf&0xffff)|0)+(q&0xffff)|0;tf=((yf(b,U)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(o,R)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,R)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(o,M)|0)+(rf&0xffff)|0)+(V&0xffff)|0;tf=((yf(b,M)|0)+(rf>>>16)|0)+(V>>>16)|0;ef=((yf(o,T)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,T)|0)+(tf>>>16)|0)+(ef>>>16)|0;V=ef<<16|ff&0xffff;ff=((yf(o,O)|0)+(rf&0xffff)|0)+(K&0xffff)|0;tf=((yf(b,O)|0)+(rf>>>16)|0)+(K>>>16)|0;ef=((yf(o,Z)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(b,Z)|0)+(tf>>>16)|0)+(ef>>>16)|0;K=ef<<16|ff&0xffff;W=rf;ff=((yf(x,A)|0)+(J&0xffff)|0)+(G&0xffff)|0;tf=((yf(g,A)|0)+(J>>>16)|0)+(G>>>16)|0;ef=((yf(x,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;G=ef<<16|ff&0xffff;ff=((yf(x,m)|0)+(rf&0xffff)|0)+(N&0xffff)|0;tf=((yf(g,m)|0)+(rf>>>16)|0)+(N>>>16)|0;ef=((yf(x,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;N=ef<<16|ff&0xffff;ff=((yf(x,E)|0)+(rf&0xffff)|0)+(j&0xffff)|0;tf=((yf(g,E)|0)+(rf>>>16)|0)+(j>>>16)|0;ef=((yf(x,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;j=ef<<16|ff&0xffff;ff=((yf(x,C)|0)+(rf&0xffff)|0)+(F&0xffff)|0;tf=((yf(g,C)|0)+(rf>>>16)|0)+(F>>>16)|0;ef=((yf(x,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;F=ef<<16|ff&0xffff;ff=((yf(x,S)|0)+(rf&0xffff)|0)+(q&0xffff)|0;tf=((yf(g,S)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(x,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(x,U)|0)+(rf&0xffff)|0)+(V&0xffff)|0;tf=((yf(g,U)|0)+(rf>>>16)|0)+(V>>>16)|0;ef=((yf(x,R)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,R)|0)+(tf>>>16)|0)+(ef>>>16)|0;V=ef<<16|ff&0xffff;ff=((yf(x,M)|0)+(rf&0xffff)|0)+(K&0xffff)|0;tf=((yf(g,M)|0)+(rf>>>16)|0)+(K>>>16)|0;ef=((yf(x,T)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,T)|0)+(tf>>>16)|0)+(ef>>>16)|0;K=ef<<16|ff&0xffff;ff=((yf(x,O)|0)+(rf&0xffff)|0)+(W&0xffff)|0;tf=((yf(g,O)|0)+(rf>>>16)|0)+(W>>>16)|0;ef=((yf(x,Z)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(g,Z)|0)+(tf>>>16)|0)+(ef>>>16)|0;W=ef<<16|ff&0xffff;J=rf;ff=((yf(c,A)|0)+(Q&0xffff)|0)+(N&0xffff)|0;tf=((yf(_,A)|0)+(Q>>>16)|0)+(N>>>16)|0;ef=((yf(c,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;N=ef<<16|ff&0xffff;ff=((yf(c,m)|0)+(rf&0xffff)|0)+(j&0xffff)|0;tf=((yf(_,m)|0)+(rf>>>16)|0)+(j>>>16)|0;ef=((yf(c,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;j=ef<<16|ff&0xffff;ff=((yf(c,E)|0)+(rf&0xffff)|0)+(F&0xffff)|0;tf=((yf(_,E)|0)+(rf>>>16)|0)+(F>>>16)|0;ef=((yf(c,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;F=ef<<16|ff&0xffff;ff=((yf(c,C)|0)+(rf&0xffff)|0)+(q&0xffff)|0;tf=((yf(_,C)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(c,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(c,S)|0)+(rf&0xffff)|0)+(V&0xffff)|0;tf=((yf(_,S)|0)+(rf>>>16)|0)+(V>>>16)|0;ef=((yf(c,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;V=ef<<16|ff&0xffff;ff=((yf(c,U)|0)+(rf&0xffff)|0)+(K&0xffff)|0;tf=((yf(_,U)|0)+(rf>>>16)|0)+(K>>>16)|0;ef=((yf(c,R)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,R)|0)+(tf>>>16)|0)+(ef>>>16)|0;K=ef<<16|ff&0xffff;ff=((yf(c,M)|0)+(rf&0xffff)|0)+(W&0xffff)|0;tf=((yf(_,M)|0)+(rf>>>16)|0)+(W>>>16)|0;ef=((yf(c,T)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,T)|0)+(tf>>>16)|0)+(ef>>>16)|0;W=ef<<16|ff&0xffff;ff=((yf(c,O)|0)+(rf&0xffff)|0)+(J&0xffff)|0;tf=((yf(_,O)|0)+(rf>>>16)|0)+(J>>>16)|0;ef=((yf(c,Z)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(_,Z)|0)+(tf>>>16)|0)+(ef>>>16)|0;J=ef<<16|ff&0xffff;Q=rf;ff=((yf(h,A)|0)+(X&0xffff)|0)+(j&0xffff)|0;tf=((yf(v,A)|0)+(X>>>16)|0)+(j>>>16)|0;ef=((yf(h,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(v,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;j=ef<<16|ff&0xffff;ff=((yf(h,m)|0)+(rf&0xffff)|0)+(F&0xffff)|0;tf=((yf(v,m)|0)+(rf>>>16)|0)+(F>>>16)|0;ef=((yf(h,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(v,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;F=ef<<16|ff&0xffff;ff=((yf(h,E)|0)+(rf&0xffff)|0)+(q&0xffff)|0;tf=((yf(v,E)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(h,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(v,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(h,C)|0)+(rf&0xffff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)|0)+(q&0xffff)|0;tf=((yf(d,m)|0)+(rf>>>16)|0)+(q>>>16)|0;ef=((yf(u,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(u,E)|0)+(rf&0xffff)|0)+(V&0xffff)|0;tf=((yf(d,E)|0)+(rf>>>16)|0)+(V>>>16)|0;ef=((yf(u,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;V=ef<<16|ff&0xffff;ff=((yf(u,C)|0)+(rf&0xffff)|0)+(K&0xffff)|0;tf=((yf(d,C)|0)+(rf>>>16)|0)+(K>>>16)|0;ef=((yf(u,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;K=ef<<16|ff&0xffff;ff=((yf(u,S)|0)+(rf&0xffff)|0)+(W&0xffff)|0;tf=((yf(d,S)|0)+(rf>>>16)|0)+(W>>>16)|0;ef=((yf(u,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;W=ef<<16|ff&0xffff;ff=((yf(u,U)|0)+(rf&0xffff)|0)+(J&0xffff)|0;tf=((yf(d,U)|0)+(rf>>>16)|0)+(J>>>16)|0;ef=((yf(u,R)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,R)|0)+(tf>>>16)|0)+(ef>>>16)|0;J=ef<<16|ff&0xffff;ff=((yf(u,M)|0)+(rf&0xffff)|0)+(Q&0xffff)|0;tf=((yf(d,M)|0)+(rf>>>16)|0)+(Q>>>16)|0;ef=((yf(u,T)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,T)|0)+(tf>>>16)|0)+(ef>>>16)|0;Q=ef<<16|ff&0xffff;ff=((yf(u,O)|0)+(rf&0xffff)|0)+(X&0xffff)|0;tf=((yf(d,O)|0)+(rf>>>16)|0)+(X>>>16)|0;ef=((yf(u,Z)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(d,Z)|0)+(tf>>>16)|0)+(ef>>>16)|0;X=ef<<16|ff&0xffff;Y=rf;ff=((yf(l,A)|0)+($&0xffff)|0)+(q&0xffff)|0;tf=((yf(w,A)|0)+($>>>16)|0)+(q>>>16)|0;ef=((yf(l,H)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(w,H)|0)+(tf>>>16)|0)+(ef>>>16)|0;q=ef<<16|ff&0xffff;ff=((yf(l,m)|0)+(rf&0xffff)|0)+(V&0xffff)|0;tf=((yf(w,m)|0)+(rf>>>16)|0)+(V>>>16)|0;ef=((yf(l,L)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(w,L)|0)+(tf>>>16)|0)+(ef>>>16)|0;V=ef<<16|ff&0xffff;ff=((yf(l,E)|0)+(rf&0xffff)|0)+(K&0xffff)|0;tf=((yf(w,E)|0)+(rf>>>16)|0)+(K>>>16)|0;ef=((yf(l,k)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(w,k)|0)+(tf>>>16)|0)+(ef>>>16)|0;K=ef<<16|ff&0xffff;ff=((yf(l,C)|0)+(rf&0xffff)|0)+(W&0xffff)|0;tf=((yf(w,C)|0)+(rf>>>16)|0)+(W>>>16)|0;ef=((yf(l,P)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(w,P)|0)+(tf>>>16)|0)+(ef>>>16)|0;W=ef<<16|ff&0xffff;ff=((yf(l,S)|0)+(rf&0xffff)|0)+(J&0xffff)|0;tf=((yf(w,S)|0)+(rf>>>16)|0)+(J>>>16)|0;ef=((yf(l,D)|0)+(tf&0xffff)|0)+(ff>>>16)|0;rf=((yf(w,D)|0)+(tf>>>16)|0)+(ef>>>16)|0;J=ef<<16|ff&0xffff;ff=((yf(l,U)|0)+(rf&0xffff)|0)+(Q&0xffff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y>>>16)|0)+($>>>16)|0;R=$<<16|X&0xffff;X=(yf(r,d)|0)+(ef&0xffff)|0;Y=(yf(h,d)|0)+(ef>>>16)|0;$=((yf(r,M)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(h,M)|0)+(Y>>>16)|0)+($>>>16)|0;T=$<<16|X&0xffff;Z=ef;X=(yf(n,v)|0)+(T&0xffff)|0;Y=(yf(u,v)|0)+(T>>>16)|0;$=((yf(n,U)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(u,U)|0)+(Y>>>16)|0)+($>>>16)|0;T=$<<16|X&0xffff;X=((yf(n,d)|0)+(Z&0xffff)|0)+(ef&0xffff)|0;Y=((yf(u,d)|0)+(Z>>>16)|0)+(ef>>>16)|0;$=((yf(n,M)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(u,M)|0)+(Y>>>16)|0)+($>>>16)|0;Z=$<<16|X&0xffff;B=ef;rf=pf[(lf|8)>>2]|0;X=(rf&0xffff)+((R&0xffff)<<1)|0;$=((rf>>>16)+(R>>>16<<1)|0)+(X>>>16)|0;pf[(lf|8)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[(lf|12)>>2]|0;X=((rf&0xffff)+((T&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(T>>>16<<1)|0)+(X>>>16)|0;pf[(lf|12)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[(lf|16)>>2]|0;X=((rf&0xffff)+((Z&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(Z>>>16<<1)|0)+(X>>>16)|0;pf[(lf|16)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[(lf|20)>>2]|0;X=((rf&0xffff)+((B&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(B>>>16<<1)|0)+(X>>>16)|0;pf[(lf|20)>>2]=$<<16|X&0xffff;ff=$>>>16;for(cf=24;!!ff&(cf|0)<32;cf=cf+4|0){rf=pf[(lf|cf)>>2]|0;X=(r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0xffff)|0)+(ef&0xffff)|0;Y=((yf(l,A)|0)+(z>>>16)|0)+(ef>>>16)|0;$=((yf(i,H)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(l,H)|0)+(Y>>>16)|0)+($>>>16)|0;z=$<<16|X&0xffff;G=ef;X=(yf(a,v)|0)+(B&0xffff)|0;Y=(yf(p,v)|0)+(B>>>16)|0;$=((yf(a,U)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,U)|0)+(Y>>>16)|0)+($>>>16)|0;B=$<<16|X&0xffff;X=((yf(a,d)|0)+(I&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,d)|0)+(I>>>16)|0)+(ef>>>16)|0;$=((yf(a,M)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,M)|0)+(Y>>>16)|0)+($>>>16)|0;I=$<<16|X&0xffff;X=((yf(a,w)|0)+(z&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,w)|0)+(z>>>16)|0)+(ef>>>16)|0;$=((yf(a,O)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,O)|0)+(Y>>>16)|0)+($>>>16)|0;z=$<<16|X&0xffff;X=((yf(a,A)|0)+(G&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,A)|0)+(G>>>16)|0)+(ef>>>16)|0;$=((yf(a,H)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,H)|0)+(Y>>>16)|0)+($>>>16)|0;G=$<<16|X&0xffff;N=ef;rf=pf[(lf|16)>>2]|0;X=(rf&0xffff)+((R&0xffff)<<1)|0;$=((rf>>>16)+(R>>>16<<1)|0)+(X>>>16)|0;pf[(lf|16)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[(lf|20)>>2]|0;X=((rf&0xffff)+((T&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(T>>>16<<1)|0)+(X>>>16)|0;pf[(lf|20)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[(lf|24)>>2]|0;X=((rf&0xffff)+((Z&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(Z>>>16<<1)|0)+(X>>>16)|0;pf[(lf|24)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[(lf|28)>>2]|0;X=((rf&0xffff)+((B&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(B>>>16<<1)|0)+(X>>>16)|0;pf[(lf|28)>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[lf+32>>2]|0;X=((rf&0xffff)+((I&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(I>>>16<<1)|0)+(X>>>16)|0;pf[lf+32>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[lf+36>>2]|0;X=((rf&0xffff)+((z&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(z>>>16<<1)|0)+(X>>>16)|0;pf[lf+36>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[lf+40>>2]|0;X=((rf&0xffff)+((G&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(G>>>16<<1)|0)+(X>>>16)|0;pf[lf+40>>2]=$<<16|X&0xffff;ff=$>>>16;rf=pf[lf+44>>2]|0;X=((rf&0xffff)+((N&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(N>>>16<<1)|0)+(X>>>16)|0;pf[lf+44>>2]=$<<16|X&0xffff;ff=$>>>16;for(cf=48;!!ff&(cf|0)<64;cf=cf+4|0){rf=pf[lf+cf>>2]|0;X=(rf&0xffff)+ff|0;$=(rf>>>16)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16}}for(nf=32;(nf|0)<(t|0);nf=nf<<1){af=nf<<1;for(sf=0;(sf|0)<(t|0);sf=sf+af|0){lf=e+(sf<<1)|0;tf=0;for(of=0;(of|0)<(nf|0);of=of+32|0){hf=(f+sf|0)+of|0;h=pf[hf>>2]|0,r=h&0xffff,h=h>>>16,u=pf[(hf|4)>>2]|0,n=u&0xffff,u=u>>>16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=$<<16|X&0xffff;X=((yf(a,m)|0)+(N&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,m)|0)+(N>>>16)|0)+(ef>>>16)|0;$=((yf(a,L)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,L)|0)+(Y>>>16)|0)+($>>>16)|0;N=$<<16|X&0xffff;X=((yf(a,E)|0)+(j&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,E)|0)+(j>>>16)|0)+(ef>>>16)|0;$=((yf(a,k)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,k)|0)+(Y>>>16)|0)+($>>>16)|0;j=$<<16|X&0xffff;X=((yf(a,C)|0)+(F&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,C)|0)+(F>>>16)|0)+(ef>>>16)|0;$=((yf(a,P)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,P)|0)+(Y>>>16)|0)+($>>>16)|0;F=$<<16|X&0xffff;X=((yf(a,S)|0)+(q&0xffff)|0)+(ef&0xffff)|0;Y=((yf(p,S)|0)+(q>>>16)|0)+(ef>>>16)|0;$=((yf(a,D)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(p,D)|0)+(Y>>>16)|0)+($>>>16)|0;q=$<<16|X&0xffff;V=ef;X=((yf(s,v)|0)+(I&0xffff)|0)+(K&0xffff)|0;Y=((yf(y,v)|0)+(I>>>16)|0)+(K>>>16)|0;$=((yf(s,U)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(y,U)|0)+(Y>>>16)|0)+($>>>16)|0;I=$<<16|X&0xffff;X=((yf(s,d)|0)+(z&0xffff)|0)+(ef&0xffff)|0;Y=((yf(y,d)|0)+(z>>>16)|0)+(ef>>>16)|0;$=((yf(s,M)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(y,M)|0)+(Y>>>16)|0)+($>>>16)|0;z=$<<16|X&0xffff;X=((yf(s,w)|0)+(G&0xffff)|0)+(ef&0xffff)|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)+($>>>16)|0;V=$<<16|X&0xffff;X=((yf(o,S)|0)+(K&0xffff)|0)+(ef&0xffff)|0;Y=((yf(b,S)|0)+(K>>>16)|0)+(ef>>>16)|0;$=((yf(o,D)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(b,D)|0)+(Y>>>16)|0)+($>>>16)|0;K=$<<16|X&0xffff;W=ef;X=((yf(x,v)|0)+(G&0xffff)|0)+(J&0xffff)|0;Y=((yf(g,v)|0)+(G>>>16)|0)+(J>>>16)|0;$=((yf(x,U)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(g,U)|0)+(Y>>>16)|0)+($>>>16)|0;G=$<<16|X&0xffff;X=((yf(x,d)|0)+(N&0xffff)|0)+(ef&0xffff)|0;Y=((yf(g,d)|0)+(N>>>16)|0)+(ef>>>16)|0;$=((yf(x,M)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(g,M)|0)+(Y>>>16)|0)+($>>>16)|0;N=$<<16|X&0xffff;X=((yf(x,w)|0)+(j&0xffff)|0)+(ef&0xffff)|0;Y=((yf(g,w)|0)+(j>>>16)|0)+(ef>>>16)|0;$=((yf(x,O)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(g,O)|0)+(Y>>>16)|0)+($>>>16)|0;j=$<<16|X&0xffff;X=((yf(x,A)|0)+(F&0xffff)|0)+(ef&0xffff)|0;Y=((yf(g,A)|0)+(F>>>16)|0)+(ef>>>16)|0;$=((yf(x,H)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(g,H)|0)+(Y>>>16)|0)+($>>>16)|0;F=$<<16|X&0xffff;X=((yf(x,m)|0)+(q&0xffff)|0)+(ef&0xffff)|0;Y=((yf(g,m)|0)+(q>>>16)|0)+(ef>>>16)|0;$=((yf(x,L)|0)+(Y&0xffff)|0)+(X>>>16)|0;ef=((yf(g,L)|0)+(Y>>>16)|0)+($>>>16)|0;q=$<<16|X&0xffff;X=((yf(x,E)|0)+(V&0xffff)|0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=pf[lf+cf>>2]|0;X=((rf&0xffff)+((Z&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(Z>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((B&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(B>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((I&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(I>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((z&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(z>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((G&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(G>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((N&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(N>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16}cf=nf+(of+xf|0)|0;rf=pf[lf+cf>>2]|0;X=(((rf&0xffff)+((j&0xffff)<<1)|0)+ff|0)+tf|0;$=((rf>>>16)+(j>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((F&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(F>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((q&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(q>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((V&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(V>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((K&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(K>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((W&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(W>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((J&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(J>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;ff=$>>>16;cf=cf+4|0;rf=pf[lf+cf>>2]|0;X=((rf&0xffff)+((Q&0xffff)<<1)|0)+ff|0;$=((rf>>>16)+(Q>>>16<<1)|0)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;tf=$>>>16}for(cf=cf+4|0;!!tf&(cf|0)>2]|0;X=(rf&0xffff)+tf|0;$=(rf>>>16)+(X>>>16)|0;pf[lf+cf>>2]=$<<16|X&0xffff;tf=$>>>16}}}}function c(f,t,e,r,n){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;var i=0,a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0,b=0,g=0,_=0,v=0,d=0,w=0,A=0,m=0;for(w=t-1&-4;(w|0)>=0;w=w-4|0){i=pf[f+w>>2]|0;if(i){t=w;break}}for(w=r-1&-4;(w|0)>=0;w=w-4|0){a=pf[e+w>>2]|0;if(a){r=w;break}}while((a&0x80000000)==0){a=a<<1;s=s+1|0}x=pf[f+t>>2]|0;if(s){o=x>>>(32-s|0);for(w=t-4|0;(w|0)>=0;w=w-4|0){i=pf[f+w>>2]|0;pf[f+w+4>>2]=x<>>(32-s|0):0);x=i}pf[f>>2]=x<>2]|0;for(w=r-4|0;(w|0)>=0;w=w-4|0){a=pf[e+w>>2]|0;pf[e+w+4>>2]=c<>>(32-s|0);c=a}pf[e>>2]=c<>2]|0;h=c>>>16,u=c&0xffff;for(w=t;(w|0)>=(r|0);w=w-4|0){A=w-r|0;x=pf[f+w>>2]|0;l=(o>>>0)/(h>>>0)|0,y=(o>>>0)%(h>>>0)|0,g=yf(l,u)|0;while((l|0)==0x10000|g>>>0>(y<<16|x>>>16)>>>0){l=l-1|0,y=y+h|0,g=g-u|0;if((y|0)>=0x10000)break}v=0,d=0;for(m=0;(m|0)<=(r|0);m=m+4|0){a=pf[e+m>>2]|0;g=(yf(l,a&0xffff)|0)+(v>>>16)|0;_=(yf(l,a>>>16)|0)+(g>>>16)|0;a=v&0xffff|g<<16;v=_;i=pf[f+A+m>>2]|0;g=((i&0xffff)-(a&0xffff)|0)+d|0;_=((i>>>16)-(a>>>16)|0)+(g>>16)|0;pf[f+A+m>>2]=_<<16|g&0xffff;d=_>>16}g=((o&0xffff)-(v&0xffff)|0)+d|0;_=((o>>>16)-(v>>>16)|0)+(g>>16)|0;o=_<<16|g&0xffff;d=_>>16;if(d){l=l-1|0;d=0;for(m=0;(m|0)<=(r|0);m=m+4|0){a=pf[e+m>>2]|0;i=pf[f+A+m>>2]|0;g=(i&0xffff)+d|0;_=(i>>>16)+a+(g>>>16)|0;pf[f+A+m>>2]=_<<16|g&0xffff;d=_>>>16}o=o+d|0}x=pf[f+w>>2]|0;i=o<<16|x>>>16;p=(i>>>0)/(h>>>0)|0,b=(i>>>0)%(h>>>0)|0,g=yf(p,u)|0;while((p|0)==0x10000|g>>>0>(b<<16|x&0xffff)>>>0){p=p-1|0,b=b+h|0,g=g-u|0;if((b|0)>=0x10000)break}v=0,d=0;for(m=0;(m|0)<=(r|0);m=m+4|0){a=pf[e+m>>2]|0;g=(yf(p,a&0xffff)|0)+(v&0xffff)|0;_=((yf(p,a>>>16)|0)+(g>>>16)|0)+(v>>>16)|0;a=g&0xffff|_<<16;v=_>>>16;i=pf[f+A+m>>2]|0;g=((i&0xffff)-(a&0xffff)|0)+d|0;_=((i>>>16)-(a>>>16)|0)+(g>>16)|0;d=_>>16;pf[f+A+m>>2]=_<<16|g&0xffff}g=((o&0xffff)-(v&0xffff)|0)+d|0;_=((o>>>16)-(v>>>16)|0)+(g>>16)|0;d=_>>16;if(d){p=p-1|0;d=0;for(m=0;(m|0)<=(r|0);m=m+4|0){a=pf[e+m>>2]|0;i=pf[f+A+m>>2]|0;g=((i&0xffff)+(a&0xffff)|0)+d|0;_=((i>>>16)+(a>>>16)|0)+(g>>>16)|0;d=_>>>16;pf[f+A+m>>2]=g&0xffff|_<<16}}pf[n+A>>2]=l<<16|p;o=pf[f+w>>2]|0}if(s){x=pf[f>>2]|0;for(w=4;(w|0)<=(r|0);w=w+4|0){i=pf[f+w>>2]|0;pf[f+w-4>>2]=i<<(32-s|0)|x>>>s;x=i}pf[f+r>>2]=x>>>s}}function h(f,t,e,r,n,i){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0,b=0,g=0,_=0,v=0;a=d(r<<1)|0;m(r<<1,0,a);A(t,f,a);for(g=0;(g|0)<(r|0);g=g+4|0){o=pf[a+g>>2]|0,x=o&0xffff,o=o>>>16;h=n>>>16,c=n&0xffff;u=yf(x,c)|0,l=((yf(x,h)|0)+(yf(o,c)|0)|0)+(u>>>16)|0;x=u&0xffff,o=l&0xffff;b=0;for(_=0;(_|0)<(r|0);_=_+4|0){v=g+_|0;h=pf[e+_>>2]|0,c=h&0xffff,h=h>>>16;y=pf[a+v>>2]|0;u=((yf(x,c)|0)+(b&0xffff)|0)+(y&0xffff)|0;l=((yf(x,h)|0)+(b>>>16)|0)+(y>>>16)|0;p=((yf(o,c)|0)+(l&0xffff)|0)+(u>>>16)|0;b=((yf(o,h)|0)+(p>>>16)|0)+(l>>>16)|0;y=p<<16|u&0xffff;pf[a+v>>2]=y}v=g+_|0;y=pf[a+v>>2]|0;u=((y&0xffff)+(b&0xffff)|0)+s|0;l=((y>>>16)+(b>>>16)|0)+(u>>>16)|0;pf[a+v>>2]=l<<16|u&0xffff;s=l>>>16}A(r,a+r|0,i);w(r<<1);if(s|(E(e,r,i,r)|0)<=0){C(i,r,e,r,i,r)|0}}return{sreset:n,salloc:d,sfree:w,z:m,tst:a,neg:i,cmp:E,add:s,sub:C,mul:o,sqr:x,div:c,mredc:h}};function I(f,t){var e,r,n,i,a=f<0?-1:1,s=t<0?-1:1,o=1,x=0,c=0,h=1;for(f*=a,t*=s,i=f>5);for(var i=f.length-4;n<=i;i-=4)t[f.length-4-i>>2]=f[i]<<24|f[i+1]<<16|f[i+2]<<8|f[i+3];n-i==3?t[t.length-1]=f[n]:n-i==2?t[t.length-1]=f[n]<<8|f[n+1]:n-i==1&&(t[t.length-1]=f[n]<<16|f[n+1]<<8|f[n+2]),r=1}this.limbs=t,this.bitLength=e,this.sign=r}return g.fromString=function(f){var t=r(f);return new g(t)},g.fromNumber=function(f){var t=K,e=0,r=0,n=Math.abs(f);return 4294967295>5)-1;0<=n;n--){var i=t[n].toString(16);r+="00000000".substr(i.length),r+=i}return r=r.replace(/^0+/,""),r.length||(r="0"),this.sign<0&&(r="-"+r),r},g.prototype.toBytes=function(){var f=this.bitLength,t=this.limbs;if(0===f)return new Uint8Array(0);for(var e=f+7>>3,r=new Uint8Array(e),n=0;n>2]>>((3&i)<<3)}return r},g.prototype.valueOf=function(){var f=this.limbs,t=this.bitLength,e=this.sign;if(!e)return 0;if(t<=32)return e*(f[0]>>>0);if(t<=52)return e*(4294967296*(f[1]>>>0)+(f[0]>>>0));var r,n,i=0;for(r=f.length-1;0<=r;r--)if(0!==(n=f[r])){for(;0==(n<>>0):e*(1048576*((f[r]<>>32-i:0))>>>0)+((f[r-1]<>>32-i:0))>>>12))*Math.pow(2,32*r-i-52)},g.prototype.clamp=function(f){var t=this.limbs,e=this.bitLength;if(e<=f)return this;var r=new g,n=f+31>>5,i=f%32;return r.limbs=new Uint32Array(t.subarray(0,n)),r.bitLength=f,r.sign=this.sign,i&&(r.limbs[n-1]&=-1>>>32-i),r},g.prototype.slice=function(f,t){var e=this.limbs,r=this.bitLength;if(f<0)throw new RangeError("TODO");if(r<=f)return g.ZERO;(void 0===t||r-f>5,a=f+t+31>>5,s=t+31>>5,o=f%32,x=t%32,c=new Uint32Array(s);if(o){for(var h=0;h>>o|e[i+h+1]<<32-o;c[h]=e[i+h]>>>o}else c.set(e.subarray(i,a));return x&&(c[s-1]&=-1>>>32-x),n.limbs=c,n.bitLength=t,n.sign=this.sign,n},g.prototype.negate=function(){var f=new g;return f.limbs=this.limbs,f.bitLength=this.bitLength,f.sign=-1*this.sign,f},g.prototype.compare=function(f){var t=this.limbs,e=t.length,r=f.limbs,n=r.length,i=0;return this.signf.sign?1:(q.set(t,0),q.set(r,e),i=N.cmp(0,e<<2,e<<2,n<<2),i*this.sign)},g.prototype.add=function(f){if(!this.sign)return f;if(!f.sign)return this;var t,e,r,n,i=this.bitLength,a=this.limbs,s=a.length,o=this.sign,x=f.bitLength,c=f.limbs,h=c.length,u=f.sign,l=new g;t=(x>5,N.sreset();var p=N.salloc(s<<2),y=N.salloc(h<<2),b=N.salloc(e<<2);return N.z(b-p+(e<<2),0,p),q.set(a,p>>2),q.set(c,y>>2),0>2,(b>>2)+e)),l.bitLength=t,l.sign=r,l)},g.prototype.subtract=function(f){return this.add(f.negate())},g.prototype.square=function(){if(!this.sign)return g.ZERO;var f,t,e=this.bitLength,r=this.limbs,n=r.length,i=new g;f=e<<1,t=f+31>>5,N.sreset();var a=N.salloc(n<<2),s=N.salloc(t<<2);return N.z(s-a+(t<<2),0,a),q.set(r,a>>2),N.sqr(a,n<<2,s),i.limbs=new Uint32Array(q.subarray(s>>2,(s>>2)+t)),i.bitLength=f,i.sign=1,i},g.prototype.divide=function(f){var t,e,r=this.bitLength,n=this.limbs,i=n.length,a=f.bitLength,s=f.limbs,o=s.length,x=g.ZERO,c=g.ZERO;N.sreset();var h=N.salloc(i<<2),u=N.salloc(o<<2),l=N.salloc(i<<2);return N.z(l-h+(i<<2),0,h),q.set(n,h>>2),q.set(s,u>>2),N.div(h,i<<2,u,o<<2,l),t=N.tst(l,i<<2)>>2,t&&(x=new g,x.limbs=new Uint32Array(q.subarray(l>>2,(l>>2)+t)),x.bitLength=r>2,e&&(c=new g,c.limbs=new Uint32Array(q.subarray(h>>2,(h>>2)+e)),c.bitLength=a>5,N.sreset();var c=N.salloc(i<<2),h=N.salloc(o<<2),u=N.salloc(e<<2);return N.z(u-c+(e<<2),0,c),q.set(n,c>>2),q.set(s,h>>2),N.mul(c,i<<2,h,o<<2,u,e<<2),x.limbs=new Uint32Array(q.subarray(u>>2,(u>>2)+e)),x.sign=this.sign*f.sign,x.bitLength=t,x},g.prototype.isMillerRabinProbablePrime=function(f){var t=g.fromConfig(this),e=0;for(t.limbs[0]-=1;0===t.limbs[e>>5];)e+=32;for(;0==(t.limbs[e>>5]>>(31&e)&1);)e++;t=t.slice(e);for(var r=new J(this),n=this.subtract(g.ONE),i=g.fromConfig(this),a=this.limbs.length-1;0===i.limbs[a];)a--;for(;0<=--f;){for(G(i.limbs),i.limbs[0]<2&&(i.limbs[0]+=2);0<=i.compare(n);)i.limbs[a]>>>=1;var s=r.power(i,t);if(0!==s.compare(g.ONE)&&0!==s.compare(n)){for(var o=e;0<--o;){if(s=s.square().divide(r).remainder,0===s.compare(g.ONE))return!1;if(0===s.compare(n))break}if(0===o)return!1}}return!0},g.prototype.isProbablePrime=function(f){void 0===f&&(f=80);var t=this.limbs,e=0;if(0==(1&t[0]))return!1;if(f<=1)return!0;var r=0,n=0,i=0;for(e=0;e>>=2;for(var s=t[e];s;)n+=3&s,s>>>=2,n-=3&s,s>>>=2;for(var o=t[e];o;)i+=15&o,o>>>=4,i-=15&o,o>>>=4}return!!(r%3&&n%5&&i%17)&&(f<=2||this.isMillerRabinProbablePrime(f>>>1))},g.extGCD=z,g.ZERO=g.fromNumber(0),g.ONE=g.fromNumber(1),g}(),J=function(a){function p(f){var t,e=a.call(this)||this;if(e.limbs=f.limbs,e.bitLength=f.bitLength,e.sign=f.sign,e.valueOf()<1)throw new RangeError;if(e.bitLength<=32)return e;if(!(1&e.limbs[0]))return e;var r=1+(e.bitLength+31&-32),n=new Uint32Array(r+31>>5);n[n.length-1]=1,t=new W,t.sign=1,t.bitLength=r,t.limbs=n;var i=I(4294967296,e.limbs[0]).y;return e.coefficient=i<0?-i:4294967296-i,e.comodulus=t,e.comodulusRemainder=t.divide(e).remainder,e.comodulusRemainderSquare=t.square().divide(e).remainder,e}return j(p,a),p.prototype.reduce=function(f){return f.bitLength<=32&&this.bitLength<=32?W.fromNumber(f.valueOf()%this.valueOf()):f.compare(this)<0?f:f.divide(this).remainder},p.prototype.inverse=function(f){f=this.reduce(f);var t=z(this,f);if(1!==t.gcd.valueOf())throw new Error("GCD is not 1");return t.y.sign<0?t.y.add(this).clamp(this.bitLength):t.y},p.prototype.power=function(f,t){for(var e=0,r=0;r>>=1;var i=8;t.bitLength<=4536&&(i=7),t.bitLength<=1736&&(i=6),t.bitLength<=630&&(i=5),t.bitLength<=210&&(i=4),t.bitLength<=60&&(i=3),t.bitLength<=12&&(i=2),e<=1<>>32-i,u=i;0==(1&h);)h>>>=1,u--;for(var l=s[h>>>1];h;)h>>>=1,x!==o&&(x=p._Montgomery_reduce(x.square(),this));x=x!==o?p._Montgomery_reduce(x.multiply(l),this):l,n<<=u,c-=u}else x!==o&&(x=p._Montgomery_reduce(x.square(),this)),n<<=1,c--}return p._Montgomery_reduce(x,this)},p._Montgomery_reduce=function(f,t){var e=f.limbs,r=e.length,n=t.limbs,i=n.length,a=t.coefficient;N.sreset();var s=N.salloc(r<<2),o=N.salloc(i<<2),x=N.salloc(i<<2);N.z(x-s+(i<<2),0,s),q.set(e,s>>2),q.set(n,o>>2),N.mredc(s,r<<2,o,i<<2,a,x);var c=new W;return c.limbs=new Uint32Array(q.subarray(x>>2,(x>>2)+i)),c.bitLength=t.bitLength,c.sign=1,c},p}(W),Q=function(f,t,e){"use asm";var Df=0,Rf=0,Tf=0,Zf=0,Bf=0,b=0,g=0;var _=0,v=0,d=0,w=0,A=0,m=0,E=0,C=0,S=0,U=0;var y=new f.Uint8Array(e);function M(f,t,e,r,n,i,a,s,o,x,c,h,u,l,p,y){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;o=o|0;x=x|0;c=c|0;h=h|0;u=u|0;l=l|0;p=p|0;y=y|0;var b=0,g=0,_=0,v=0,d=0,w=0,A=0,m=0,E=0,C=0,S=0,U=0,M=0,O=0,H=0,L=0,k=0,P=0,D=0,R=0,T=0,Z=0,B=0,I=0,z=0,G=0,N=0,j=0,F=0,q=0,V=0,K=0,W=0,J=0,Q=0,X=0,Y=0,$=0,ff=0,tf=0,ef=0,rf=0,nf=0,af=0,sf=0,of=0,xf=0,cf=0,hf=0,uf=0,lf=0,pf=0,yf=0,bf=0,gf=0,_f=0,vf=0,df=0,wf=0,Af=0,mf=0,Ef=0,Cf=0,Sf=0,Uf=0,Mf=0,Of=0,Hf=0,Lf=0,kf=0,Pf=0;b=Df;g=Rf;_=Tf;v=Zf;d=Bf;A=f+(b<<5|b>>>27)+d+(g&_|~g&v)+0x5a827999|0;d=v;v=_;_=g<<30|g>>>2;g=b;b=A;A=t+(b<<5|b>>>27)+d+(g&_|~g&v)+0x5a827999|0;d=v;v=_;_=g<<30|g>>>2;g=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y[f|10]<<8|y[f|11],y[f|12]<<24|y[f|13]<<16|y[f|14]<<8|y[f|15],y[f|16]<<24|y[f|17]<<16|y[f|18]<<8|y[f|19],y[f|20]<<24|y[f|21]<<16|y[f|22]<<8|y[f|23],y[f|24]<<24|y[f|25]<<16|y[f|26]<<8|y[f|27],y[f|28]<<24|y[f|29]<<16|y[f|30]<<8|y[f|31],y[f|32]<<24|y[f|33]<<16|y[f|34]<<8|y[f|35],y[f|36]<<24|y[f|37]<<16|y[f|38]<<8|y[f|39],y[f|40]<<24|y[f|41]<<16|y[f|42]<<8|y[f|43],y[f|44]<<24|y[f|45]<<16|y[f|46]<<8|y[f|47],y[f|48]<<24|y[f|49]<<16|y[f|50]<<8|y[f|51],y[f|52]<<24|y[f|53]<<16|y[f|54]<<8|y[f|55],y[f|56]<<24|y[f|57]<<16|y[f|58]<<8|y[f|59],y[f|60]<<24|y[f|61]<<16|y[f|62]<<8|y[f|63])}function O(f){f=f|0;y[f|0]=Df>>>24;y[f|1]=Df>>>16&255;y[f|2]=Df>>>8&255;y[f|3]=Df&255;y[f|4]=Rf>>>24;y[f|5]=Rf>>>16&255;y[f|6]=Rf>>>8&255;y[f|7]=Rf&255;y[f|8]=Tf>>>24;y[f|9]=Tf>>>16&255;y[f|10]=Tf>>>8&255;y[f|11]=Tf&255;y[f|12]=Zf>>>24;y[f|13]=Zf>>>16&255;y[f|14]=Zf>>>8&255;y[f|15]=Zf&255;y[f|16]=Bf>>>24;y[f|17]=Bf>>>16&255;y[f|18]=Bf>>>8&255;y[f|19]=Bf&255}function H(){Df=0x67452301;Rf=0xefcdab89;Tf=0x98badcfe;Zf=0x10325476;Bf=0xc3d2e1f0;b=g=0}function r(f,t,e,r,n,i,a){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;Df=f;Rf=t;Tf=e;Zf=r;Bf=n;b=i;g=a}function a(f,t){f=f|0;t=t|0;var e=0;if(f&63)return-1;while((t|0)>=64){i(f);f=f+64|0;t=t-64|0;e=e+64|0}b=b+e|0;if(b>>>0>>0)g=g+1|0;return e|0}function x(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,n=0;if(f&63)return-1;if(~e)if(e&31)return-1;if((t|0)>=64){r=a(f,t)|0;if((r|0)==-1)return-1;f=f+r|0;t=t-r|0}r=r+t|0;b=b+t|0;if(b>>>0>>0)g=g+1|0;y[f|t]=0x80;if((t|0)>=56){for(n=t+1|0;(n|0)<64;n=n+1|0)y[f|n]=0x00;i(f);t=0;y[f|0]=0}for(n=t+1|0;(n|0)<59;n=n+1|0)y[f|n]=0;y[f|56]=g>>>21&255;y[f|57]=g>>>13&255;y[f|58]=g>>>5&255;y[f|59]=g<<3&255|b>>>29;y[f|60]=b>>>21&255;y[f|61]=b>>>13&255;y[f|62]=b>>>5&255;y[f|63]=b<<3&255;i(f);if(~e)O(e);return r|0}function L(){Df=_;Rf=v;Tf=d;Zf=w;Bf=A;b=64;g=0}function k(){Df=m;Rf=E;Tf=C;Zf=S;Bf=U;b=64;g=0}function n(f,t,e,r,n,i,a,s,o,x,c,h,u,l,p,y){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;o=o|0;x=x|0;c=c|0;h=h|0;u=u|0;l=l|0;p=p|0;y=y|0;H();M(f^0x5c5c5c5c,t^0x5c5c5c5c,e^0x5c5c5c5c,r^0x5c5c5c5c,n^0x5c5c5c5c,i^0x5c5c5c5c,a^0x5c5c5c5c,s^0x5c5c5c5c,o^0x5c5c5c5c,x^0x5c5c5c5c,c^0x5c5c5c5c,h^0x5c5c5c5c,u^0x5c5c5c5c,l^0x5c5c5c5c,p^0x5c5c5c5c,y^0x5c5c5c5c);m=Df;E=Rf;C=Tf;S=Zf;U=Bf;H();M(f^0x36363636,t^0x36363636,e^0x36363636,r^0x36363636,n^0x36363636,i^0x36363636,a^0x36363636,s^0x36363636,o^0x36363636,x^0x36363636,c^0x36363636,h^0x36363636,u^0x36363636,l^0x36363636,p^0x36363636,y^0x36363636);_=Df;v=Rf;d=Tf;w=Zf;A=Bf;b=64;g=0}function P(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,n=0,i=0,a=0,s=0,o=0;if(f&63)return-1;if(~e)if(e&31)return-1;o=x(f,t,-1)|0;r=Df,n=Rf,i=Tf,a=Zf,s=Bf;k();M(r,n,i,a,s,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~e)O(e);return o|0}function s(f,t,e,r,n){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;var i=0,a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0;if(f&63)return-1;if(~n)if(n&31)return-1;y[f+t|0]=e>>>24;y[f+t+1|0]=e>>>16&255;y[f+t+2|0]=e>>>8&255;y[f+t+3|0]=e&255;P(f,t+4|0,-1)|0;i=c=Df,a=h=Rf,s=u=Tf,o=l=Zf,x=p=Bf;r=r-1|0;while((r|0)>0){L();M(c,h,u,l,p,0x80000000,0,0,0,0,0,0,0,0,0,672);c=Df,h=Rf,u=Tf,l=Zf,p=Bf;k();M(c,h,u,l,p,0x80000000,0,0,0,0,0,0,0,0,0,672);c=Df,h=Rf,u=Tf,l=Zf,p=Bf;i=i^Df;a=a^Rf;s=s^Tf;o=o^Zf;x=x^Bf;r=r-1|0}Df=i;Rf=a;Tf=s;Zf=o;Bf=x;if(~n)O(n);return 0}return{reset:H,init:r,process:a,finish:x,hmac_reset:L,hmac_init:n,hmac_finish:P,pbkdf2_generate_block:s}},X=function(){function f(){this.pos=0,this.len=0}return f.prototype.reset=function(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this},f.prototype.process=function(f){if(null!==this.result)throw new b("state must be reset before processing new data");for(var t=this.asm,e=this.heap,r=this.pos,n=this.len,i=0,a=f.length,s=0;0>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0x428a2f98|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;A=t+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0x71374491|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;w=e+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0xb5c0fbcf|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;d=r+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0xe9b5dba5|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;v=n+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0x3956c25b|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;_=i+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0x59f111f1|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;g=a+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0x923f82a4|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;b=s+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0xab1c5ed5|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;m=o+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0xd807aa98|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;A=x+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0x12835b01|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;w=c+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0x243185be|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;d=h+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0x550c7dc3|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;v=u+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0x72be5d74|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;_=l+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0x80deb1fe|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;g=p+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0x9bdc06a7|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;b=y+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0xc19bf174|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;f=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+f+x|0;m=f+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0xe49b69c1|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+t+c|0;A=t+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0xefbe4786|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;e=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+e+h|0;w=e+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0x0fc19dc6|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;r=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+r+u|0;d=r+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0x240ca1cc|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;n=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+n+l|0;v=n+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0x2de92c6f|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;i=(a>>>7^a>>>18^a>>>3^a<<25^a<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+i+p|0;_=i+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0x4a7484aa|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;a=(s>>>7^s>>>18^s>>>3^s<<25^s<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+a+y|0;g=a+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0x5cb0a9dc|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;s=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+s+f|0;b=s+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0x76f988da|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;o=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(a>>>17^a>>>19^a>>>10^a<<15^a<<13)+o+t|0;m=o+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0x983e5152|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;x=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(s>>>17^s>>>19^s>>>10^s<<15^s<<13)+x+e|0;A=x+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0xa831c66d|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;c=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+c+r|0;w=c+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0xb00327c8|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;h=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+h+n|0;d=h+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0xbf597fc7|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;u=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+u+i|0;v=u+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0xc6e00bf3|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+l+a|0;_=l+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0xd5a79147|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+p+s|0;g=p+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0x06ca6351|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;y=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+y+o|0;b=y+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0x14292967|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;f=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+f+x|0;m=f+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0x27b70a85|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+t+c|0;A=t+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0x2e1b2138|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;e=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+e+h|0;w=e+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0x4d2c6dfc|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;r=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+r+u|0;d=r+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0x53380d13|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;n=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+n+l|0;v=n+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0x650a7354|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;i=(a>>>7^a>>>18^a>>>3^a<<25^a<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+i+p|0;_=i+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0x766a0abb|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;a=(s>>>7^s>>>18^s>>>3^s<<25^s<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+a+y|0;g=a+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0x81c2c92e|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;s=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+s+f|0;b=s+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0x92722c85|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;o=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(a>>>17^a>>>19^a>>>10^a<<15^a<<13)+o+t|0;m=o+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0xa2bfe8a1|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;x=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(s>>>17^s>>>19^s>>>10^s<<15^s<<13)+x+e|0;A=x+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0xa81a664b|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;c=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+c+r|0;w=c+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0xc24b8b70|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;h=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+h+n|0;d=h+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0xc76c51a3|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;u=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+u+i|0;v=u+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0xd192e819|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+l+a|0;_=l+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0xd6990624|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+p+s|0;g=p+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0xf40e3585|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;y=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+y+o|0;b=y+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0x106aa070|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;f=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+f+x|0;m=f+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0x19a4c116|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+t+c|0;A=t+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0x1e376c08|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;e=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+e+h|0;w=e+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0x2748774c|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;r=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+r+u|0;d=r+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0x34b0bcb5|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;n=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+n+l|0;v=n+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0x391c0cb3|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;i=(a>>>7^a>>>18^a>>>3^a<<25^a<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+i+p|0;_=i+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0x4ed8aa4a|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;a=(s>>>7^s>>>18^s>>>3^s<<25^s<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+a+y|0;g=a+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0x5b9cca4f|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;s=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+s+f|0;b=s+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0x682e6ff3|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;o=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(a>>>17^a>>>19^a>>>10^a<<15^a<<13)+o+t|0;m=o+m+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(A^d&(w^A))+0x748f82ee|0;v=v+m|0;m=m+(b&g^_&(b^g))+(b>>>2^b>>>13^b>>>22^b<<30^b<<19^b<<10)|0;x=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(s>>>17^s>>>19^s>>>10^s<<15^s<<13)+x+e|0;A=x+A+(v>>>6^v>>>11^v>>>25^v<<26^v<<21^v<<7)+(w^v&(d^w))+0x78a5636f|0;_=_+A|0;A=A+(m&b^g&(m^b))+(m>>>2^m>>>13^m>>>22^m<<30^m<<19^m<<10)|0;c=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+c+r|0;w=c+w+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(d^_&(v^d))+0x84c87814|0;g=g+w|0;w=w+(A&m^b&(A^m))+(A>>>2^A>>>13^A>>>22^A<<30^A<<19^A<<10)|0;h=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+h+n|0;d=h+d+(g>>>6^g>>>11^g>>>25^g<<26^g<<21^g<<7)+(v^g&(_^v))+0x8cc70208|0;b=b+d|0;d=d+(w&A^m&(w^A))+(w>>>2^w>>>13^w>>>22^w<<30^w<<19^w<<10)|0;u=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+u+i|0;v=u+v+(b>>>6^b>>>11^b>>>25^b<<26^b<<21^b<<7)+(_^b&(g^_))+0x90befffa|0;m=m+v|0;v=v+(d&w^A&(d^w))+(d>>>2^d>>>13^d>>>22^d<<30^d<<19^d<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+l+a|0;_=l+_+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(g^m&(b^g))+0xa4506ceb|0;A=A+_|0;_=_+(v&d^w&(v^d))+(v>>>2^v>>>13^v>>>22^v<<30^v<<19^v<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+p+s|0;g=p+g+(A>>>6^A>>>11^A>>>25^A<<26^A<<21^A<<7)+(b^A&(m^b))+0xbef9a3f7|0;w=w+g|0;g=g+(_&v^d&(_^v))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;y=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+y+o|0;b=y+b+(w>>>6^w>>>11^w>>>25^w<<26^w<<21^w<<7)+(m^w&(A^m))+0xc67178f2|0;d=d+b|0;b=b+(g&_^v&(g^_))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10)|0;E=E+b|0;C=C+g|0;S=S+_|0;U=U+v|0;M=M+d|0;O=O+w|0;H=H+A|0;L=L+m|0}function i(f){f=f|0;j(N[f|0]<<24|N[f|1]<<16|N[f|2]<<8|N[f|3],N[f|4]<<24|N[f|5]<<16|N[f|6]<<8|N[f|7],N[f|8]<<24|N[f|9]<<16|N[f|10]<<8|N[f|11],N[f|12]<<24|N[f|13]<<16|N[f|14]<<8|N[f|15],N[f|16]<<24|N[f|17]<<16|N[f|18]<<8|N[f|19],N[f|20]<<24|N[f|21]<<16|N[f|22]<<8|N[f|23],N[f|24]<<24|N[f|25]<<16|N[f|26]<<8|N[f|27],N[f|28]<<24|N[f|29]<<16|N[f|30]<<8|N[f|31],N[f|32]<<24|N[f|33]<<16|N[f|34]<<8|N[f|35],N[f|36]<<24|N[f|37]<<16|N[f|38]<<8|N[f|39],N[f|40]<<24|N[f|41]<<16|N[f|42]<<8|N[f|43],N[f|44]<<24|N[f|45]<<16|N[f|46]<<8|N[f|47],N[f|48]<<24|N[f|49]<<16|N[f|50]<<8|N[f|51],N[f|52]<<24|N[f|53]<<16|N[f|54]<<8|N[f|55],N[f|56]<<24|N[f|57]<<16|N[f|58]<<8|N[f|59],N[f|60]<<24|N[f|61]<<16|N[f|62]<<8|N[f|63])}function F(f){f=f|0;N[f|0]=E>>>24;N[f|1]=E>>>16&255;N[f|2]=E>>>8&255;N[f|3]=E&255;N[f|4]=C>>>24;N[f|5]=C>>>16&255;N[f|6]=C>>>8&255;N[f|7]=C&255;N[f|8]=S>>>24;N[f|9]=S>>>16&255;N[f|10]=S>>>8&255;N[f|11]=S&255;N[f|12]=U>>>24;N[f|13]=U>>>16&255;N[f|14]=U>>>8&255;N[f|15]=U&255;N[f|16]=M>>>24;N[f|17]=M>>>16&255;N[f|18]=M>>>8&255;N[f|19]=M&255;N[f|20]=O>>>24;N[f|21]=O>>>16&255;N[f|22]=O>>>8&255;N[f|23]=O&255;N[f|24]=H>>>24;N[f|25]=H>>>16&255;N[f|26]=H>>>8&255;N[f|27]=H&255;N[f|28]=L>>>24;N[f|29]=L>>>16&255;N[f|30]=L>>>8&255;N[f|31]=L&255}function q(){E=0x6a09e667;C=0xbb67ae85;S=0x3c6ef372;U=0xa54ff53a;M=0x510e527f;O=0x9b05688c;H=0x1f83d9ab;L=0x5be0cd19;b=g=0}function r(f,t,e,r,n,i,a,s,o,x){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;o=o|0;x=x|0;E=f;C=t;S=e;U=r;M=n;O=i;H=a;L=s;b=o;g=x}function a(f,t){f=f|0;t=t|0;var e=0;if(f&63)return-1;while((t|0)>=64){i(f);f=f+64|0;t=t-64|0;e=e+64|0}b=b+e|0;if(b>>>0>>0)g=g+1|0;return e|0}function u(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,n=0;if(f&63)return-1;if(~e)if(e&31)return-1;if((t|0)>=64){r=a(f,t)|0;if((r|0)==-1)return-1;f=f+r|0;t=t-r|0}r=r+t|0;b=b+t|0;if(b>>>0>>0)g=g+1|0;N[f|t]=0x80;if((t|0)>=56){for(n=t+1|0;(n|0)<64;n=n+1|0)N[f|n]=0x00;i(f);t=0;N[f|0]=0}for(n=t+1|0;(n|0)<59;n=n+1|0)N[f|n]=0;N[f|56]=g>>>21&255;N[f|57]=g>>>13&255;N[f|58]=g>>>5&255;N[f|59]=g<<3&255|b>>>29;N[f|60]=b>>>21&255;N[f|61]=b>>>13&255;N[f|62]=b>>>5&255;N[f|63]=b<<3&255;i(f);if(~e)F(e);return r|0}function V(){E=_;C=v;S=d;U=w;M=A;O=m;H=k;L=P;b=64;g=0}function K(){E=D;C=R;S=T;U=Z;M=B;O=I;H=z;L=G;b=64;g=0}function n(f,t,e,r,n,i,a,s,o,x,c,h,u,l,p,y){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;o=o|0;x=x|0;c=c|0;h=h|0;u=u|0;l=l|0;p=p|0;y=y|0;q();j(f^0x5c5c5c5c,t^0x5c5c5c5c,e^0x5c5c5c5c,r^0x5c5c5c5c,n^0x5c5c5c5c,i^0x5c5c5c5c,a^0x5c5c5c5c,s^0x5c5c5c5c,o^0x5c5c5c5c,x^0x5c5c5c5c,c^0x5c5c5c5c,h^0x5c5c5c5c,u^0x5c5c5c5c,l^0x5c5c5c5c,p^0x5c5c5c5c,y^0x5c5c5c5c);D=E;R=C;T=S;Z=U;B=M;I=O;z=H;G=L;q();j(f^0x36363636,t^0x36363636,e^0x36363636,r^0x36363636,n^0x36363636,i^0x36363636,a^0x36363636,s^0x36363636,o^0x36363636,x^0x36363636,c^0x36363636,h^0x36363636,u^0x36363636,l^0x36363636,p^0x36363636,y^0x36363636);_=E;v=C;d=S;w=U;A=M;m=O;k=H;P=L;b=64;g=0}function W(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,n=0,i=0,a=0,s=0,o=0,x=0,c=0,h=0;if(f&63)return-1;if(~e)if(e&31)return-1;h=u(f,t,-1)|0;r=E,n=C,i=S,a=U,s=M,o=O,x=H,c=L;K();j(r,n,i,a,s,o,x,c,0x80000000,0,0,0,0,0,0,768);if(~e)F(e);return h|0}function s(f,t,e,r,n){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;var i=0,a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0,b=0,g=0,_=0,v=0,d=0;if(f&63)return-1;if(~n)if(n&31)return-1;N[f+t|0]=e>>>24;N[f+t+1|0]=e>>>16&255;N[f+t+2|0]=e>>>8&255;N[f+t+3|0]=e&255;W(f,t+4|0,-1)|0;i=l=E,a=p=C,s=y=S,o=b=U,x=g=M,c=_=O,h=v=H,u=d=L;r=r-1|0;while((r|0)>0){V();j(l,p,y,b,g,_,v,d,0x80000000,0,0,0,0,0,0,768);l=E,p=C,y=S,b=U,g=M,_=O,v=H,d=L;K();j(l,p,y,b,g,_,v,d,0x80000000,0,0,0,0,0,0,768);l=E,p=C,y=S,b=U,g=M,_=O,v=H,d=L;i=i^E;a=a^C;s=s^S;o=o^U;x=x^M;c=c^O;h=h^H;u=u^L;r=r-1|0}E=i;C=a;S=s;U=o;M=x;O=c;H=h;L=u;if(~n)F(n);return 0}return{reset:q,init:r,process:a,finish:u,hmac_reset:V,hmac_init:n,hmac_finish:W,pbkdf2_generate_block:s}},rf=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,t){f.__proto__=t}||function(f,t){for(var e in t)t.hasOwnProperty(e)&&(f[e]=t[e])};return function(f,t){function e(){this.constructor=f}r(f,t),f.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}}(),nf=64,af=32,sf=function(t){function f(){var f=t.call(this)||this;return f.NAME="sha256",f.BLOCK_SIZE=nf,f.HASH_SIZE=af,f.heap=x(),f.asm=ef({Uint8Array:Uint8Array},null,f.heap.buffer),f.reset(),f}return rf(f,t),f.NAME="sha256",f}(X),of=function(f,t,e){"use asm";var X=0,Y=0,$=0,ff=0,tf=0,ef=0,rf=0,nf=0,af=0,sf=0,of=0,xf=0,cf=0,hf=0,uf=0,lf=0,k=0,P=0;var D=0,R=0,T=0,Z=0,B=0,I=0,z=0,G=0,N=0,j=0,F=0,q=0,V=0,K=0,W=0,J=0,Q=0,pf=0,yf=0,bf=0,gf=0,_f=0,vf=0,df=0,wf=0,Af=0,mf=0,Ef=0,Cf=0,Sf=0,Uf=0,Mf=0;var Of=new f.Uint8Array(e);function Hf(f,t,e,r,n,i,a,s,o,x,c,h,u,l,p,y,b,g,_,v,d,w,A,m,E,C,S,U,M,O,H,L){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;o=o|0;x=x|0;c=c|0;h=h|0;u=u|0;l=l|0;p=p|0;y=y|0;b=b|0;g=g|0;_=_|0;v=v|0;d=d|0;w=w|0;A=A|0;m=m|0;E=E|0;C=C|0;S=S|0;U=U|0;M=M|0;O=O|0;H=H|0;L=L|0;var k=0,P=0,D=0,R=0,T=0,Z=0,B=0,I=0,z=0,G=0,N=0,j=0,F=0,q=0,V=0,K=0,W=0,J=0,Q=0;k=X;P=Y;D=$;R=ff;T=tf;Z=ef;B=rf;I=nf;z=af;G=sf;N=of;j=xf;F=cf;q=hf;V=uf;K=lf;J=0xd728ae22+t|0;W=0x428a2f98+f+(J>>>0>>0?1:0)|0;J=J+K|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)|0;lf=lf+K|0;uf=uf+V+(lf>>>0>>0?1:0)|0}function i(f){f=f|0;Hf(Of[f|0]<<24|Of[f|1]<<16|Of[f|2]<<8|Of[f|3],Of[f|4]<<24|Of[f|5]<<16|Of[f|6]<<8|Of[f|7],Of[f|8]<<24|Of[f|9]<<16|Of[f|10]<<8|Of[f|11],Of[f|12]<<24|Of[f|13]<<16|Of[f|14]<<8|Of[f|15],Of[f|16]<<24|Of[f|17]<<16|Of[f|18]<<8|Of[f|19],Of[f|20]<<24|Of[f|21]<<16|Of[f|22]<<8|Of[f|23],Of[f|24]<<24|Of[f|25]<<16|Of[f|26]<<8|Of[f|27],Of[f|28]<<24|Of[f|29]<<16|Of[f|30]<<8|Of[f|31],Of[f|32]<<24|Of[f|33]<<16|Of[f|34]<<8|Of[f|35],Of[f|36]<<24|Of[f|37]<<16|Of[f|38]<<8|Of[f|39],Of[f|40]<<24|Of[f|41]<<16|Of[f|42]<<8|Of[f|43],Of[f|44]<<24|Of[f|45]<<16|Of[f|46]<<8|Of[f|47],Of[f|48]<<24|Of[f|49]<<16|Of[f|50]<<8|Of[f|51],Of[f|52]<<24|Of[f|53]<<16|Of[f|54]<<8|Of[f|55],Of[f|56]<<24|Of[f|57]<<16|Of[f|58]<<8|Of[f|59],Of[f|60]<<24|Of[f|61]<<16|Of[f|62]<<8|Of[f|63],Of[f|64]<<24|Of[f|65]<<16|Of[f|66]<<8|Of[f|67],Of[f|68]<<24|Of[f|69]<<16|Of[f|70]<<8|Of[f|71],Of[f|72]<<24|Of[f|73]<<16|Of[f|74]<<8|Of[f|75],Of[f|76]<<24|Of[f|77]<<16|Of[f|78]<<8|Of[f|79],Of[f|80]<<24|Of[f|81]<<16|Of[f|82]<<8|Of[f|83],Of[f|84]<<24|Of[f|85]<<16|Of[f|86]<<8|Of[f|87],Of[f|88]<<24|Of[f|89]<<16|Of[f|90]<<8|Of[f|91],Of[f|92]<<24|Of[f|93]<<16|Of[f|94]<<8|Of[f|95],Of[f|96]<<24|Of[f|97]<<16|Of[f|98]<<8|Of[f|99],Of[f|100]<<24|Of[f|101]<<16|Of[f|102]<<8|Of[f|103],Of[f|104]<<24|Of[f|105]<<16|Of[f|106]<<8|Of[f|107],Of[f|108]<<24|Of[f|109]<<16|Of[f|110]<<8|Of[f|111],Of[f|112]<<24|Of[f|113]<<16|Of[f|114]<<8|Of[f|115],Of[f|116]<<24|Of[f|117]<<16|Of[f|118]<<8|Of[f|119],Of[f|120]<<24|Of[f|121]<<16|Of[f|122]<<8|Of[f|123],Of[f|124]<<24|Of[f|125]<<16|Of[f|126]<<8|Of[f|127])}function Lf(f){f=f|0;Of[f|0]=X>>>24;Of[f|1]=X>>>16&255;Of[f|2]=X>>>8&255;Of[f|3]=X&255;Of[f|4]=Y>>>24;Of[f|5]=Y>>>16&255;Of[f|6]=Y>>>8&255;Of[f|7]=Y&255;Of[f|8]=$>>>24;Of[f|9]=$>>>16&255;Of[f|10]=$>>>8&255;Of[f|11]=$&255;Of[f|12]=ff>>>24;Of[f|13]=ff>>>16&255;Of[f|14]=ff>>>8&255;Of[f|15]=ff&255;Of[f|16]=tf>>>24;Of[f|17]=tf>>>16&255;Of[f|18]=tf>>>8&255;Of[f|19]=tf&255;Of[f|20]=ef>>>24;Of[f|21]=ef>>>16&255;Of[f|22]=ef>>>8&255;Of[f|23]=ef&255;Of[f|24]=rf>>>24;Of[f|25]=rf>>>16&255;Of[f|26]=rf>>>8&255;Of[f|27]=rf&255;Of[f|28]=nf>>>24;Of[f|29]=nf>>>16&255;Of[f|30]=nf>>>8&255;Of[f|31]=nf&255;Of[f|32]=af>>>24;Of[f|33]=af>>>16&255;Of[f|34]=af>>>8&255;Of[f|35]=af&255;Of[f|36]=sf>>>24;Of[f|37]=sf>>>16&255;Of[f|38]=sf>>>8&255;Of[f|39]=sf&255;Of[f|40]=of>>>24;Of[f|41]=of>>>16&255;Of[f|42]=of>>>8&255;Of[f|43]=of&255;Of[f|44]=xf>>>24;Of[f|45]=xf>>>16&255;Of[f|46]=xf>>>8&255;Of[f|47]=xf&255;Of[f|48]=cf>>>24;Of[f|49]=cf>>>16&255;Of[f|50]=cf>>>8&255;Of[f|51]=cf&255;Of[f|52]=hf>>>24;Of[f|53]=hf>>>16&255;Of[f|54]=hf>>>8&255;Of[f|55]=hf&255;Of[f|56]=uf>>>24;Of[f|57]=uf>>>16&255;Of[f|58]=uf>>>8&255;Of[f|59]=uf&255;Of[f|60]=lf>>>24;Of[f|61]=lf>>>16&255;Of[f|62]=lf>>>8&255;Of[f|63]=lf&255}function kf(){X=0x6a09e667;Y=0xf3bcc908;$=0xbb67ae85;ff=0x84caa73b;tf=0x3c6ef372;ef=0xfe94f82b;rf=0xa54ff53a;nf=0x5f1d36f1;af=0x510e527f;sf=0xade682d1;of=0x9b05688c;xf=0x2b3e6c1f;cf=0x1f83d9ab;hf=0xfb41bd6b;uf=0x5be0cd19;lf=0x137e2179;k=P=0}function r(f,t,e,r,n,i,a,s,o,x,c,h,u,l,p,y,b,g){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;s=s|0;o=o|0;x=x|0;c=c|0;h=h|0;u=u|0;l=l|0;p=p|0;y=y|0;b=b|0;g=g|0;X=f;Y=t;$=e;ff=r;tf=n;ef=i;rf=a;nf=s;af=o;sf=x;of=c;xf=h;cf=u;hf=l;uf=p;lf=y;k=b;P=g}function a(f,t){f=f|0;t=t|0;var e=0;if(f&127)return-1;while((t|0)>=128){i(f);f=f+128|0;t=t-128|0;e=e+128|0}k=k+e|0;if(k>>>0>>0)P=P+1|0;return e|0}function d(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,n=0;if(f&127)return-1;if(~e)if(e&63)return-1;if((t|0)>=128){r=a(f,t)|0;if((r|0)==-1)return-1;f=f+r|0;t=t-r|0}r=r+t|0;k=k+t|0;if(k>>>0>>0)P=P+1|0;Of[f|t]=0x80;if((t|0)>=112){for(n=t+1|0;(n|0)<128;n=n+1|0)Of[f|n]=0x00;i(f);t=0;Of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c,M^0x5c5c5c5c,O^0x5c5c5c5c,H^0x5c5c5c5c,L^0x5c5c5c5c);Q=X;pf=Y;yf=$;bf=ff;gf=tf;_f=ef;vf=rf;df=nf;wf=af;Af=sf;mf=of;Ef=xf;Cf=cf;Sf=hf;Uf=uf;Mf=lf;kf();Hf(f^0x36363636,t^0x36363636,e^0x36363636,r^0x36363636,n^0x36363636,i^0x36363636,a^0x36363636,s^0x36363636,o^0x36363636,x^0x36363636,c^0x36363636,h^0x36363636,u^0x36363636,l^0x36363636,p^0x36363636,y^0x36363636,b^0x36363636,g^0x36363636,_^0x36363636,v^0x36363636,d^0x36363636,w^0x36363636,A^0x36363636,m^0x36363636,E^0x36363636,C^0x36363636,S^0x36363636,U^0x36363636,M^0x36363636,O^0x36363636,H^0x36363636,L^0x36363636);D=X;R=Y;T=$;Z=ff;B=tf;I=ef;z=rf;G=nf;N=af;j=sf;F=of;q=xf;V=cf;K=hf;W=uf;J=lf;k=128;P=0}function Rf(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,n=0,i=0,a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0,b=0,g=0,_=0,v=0;if(f&127)return-1;if(~e)if(e&63)return-1;v=d(f,t,-1)|0;r=X;n=Y;i=$;a=ff;s=tf;o=ef;x=rf;c=nf;h=af;u=sf;l=of;p=xf;y=cf;b=hf;g=uf;_=lf;Df();Hf(r,n,i,a,s,o,x,c,h,u,l,p,y,b,g,_,0x80000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1536);if(~e)Lf(e);return v|0}function s(f,t,e,r,n){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;var i=0,a=0,s=0,o=0,x=0,c=0,h=0,u=0,l=0,p=0,y=0,b=0,g=0,_=0,v=0,d=0,w=0,A=0,m=0,E=0,C=0,S=0,U=0,M=0,O=0,H=0,L=0,k=0,P=0,D=0,R=0,T=0;if(f&127)return-1;if(~n)if(n&63)return-1;Of[f+t|0]=e>>>24;Of[f+t+1|0]=e>>>16&255;Of[f+t+2|0]=e>>>8&255;Of[f+t+3|0]=e&255;Rf(f,t+4|0,-1)|0;i=w=X;a=A=Y;s=m=$;o=E=ff;x=C=tf;c=S=ef;h=U=rf;u=M=nf;l=O=af;p=H=sf;y=L=of;b=k=xf;g=P=cf;_=D=hf;v=R=uf;d=T=lf;r=r-1|0;while((r|0)>0){Pf();Hf(w,A,m,E,C,S,U,M,O,H,L,k,P,D,R,T,0x80000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1536);w=X;A=Y;m=$;E=ff;C=tf;S=ef;U=rf;M=nf;O=af;H=sf;L=of;k=xf;P=cf;D=hf;R=uf;T=lf;Df();Hf(w,A,m,E,C,S,U,M,O,H,L,k,P,D,R,T,0x80000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1536);w=X;A=Y;m=$;E=ff;C=tf;S=ef;U=rf;M=nf;O=af;H=sf;L=of;k=xf;P=cf;D=hf;R=uf;T=lf;i=i^X;a=a^Y;s=s^$;o=o^ff;x=x^tf;c=c^ef;h=h^rf;u=u^nf;l=l^af;p=p^sf;y=y^of;b=b^xf;g=g^cf;_=_^hf;v=v^uf;d=d^lf;r=r-1|0}X=i;Y=a;$=s;ff=o;tf=x;ef=c;rf=h;nf=u;af=l;sf=p;of=y;xf=b;cf=g;hf=_;uf=v;lf=d;if(~n)Lf(n);return 0}return{reset:kf,init:r,process:a,finish:d,hmac_reset:Pf,hmac_init:n,hmac_finish:Rf,pbkdf2_generate_block:s}},xf=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,t){f.__proto__=t}||function(f,t){for(var e in t)t.hasOwnProperty(e)&&(f[e]=t[e])};return function(f,t){function e(){this.constructor=f}r(f,t),f.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}}(),cf=128,hf=64,uf=function(t){function f(){var f=t.call(this)||this;return f.NAME="sha512",f.BLOCK_SIZE=cf,f.HASH_SIZE=hf,f.heap=x(),f.asm=of({Uint8Array:Uint8Array},null,f.heap.buffer),f.reset(),f}return xf(f,t),f.NAME="sha512",f}(X),lf=function(){function f(f,t,e){if(!f.HASH_SIZE)throw new SyntaxError("option 'hash' supplied doesn't seem to be a valid hash function");this.hash=f,this.BLOCK_SIZE=this.hash.BLOCK_SIZE,this.HMAC_SIZE=this.hash.HASH_SIZE,this.result=null,this.key=pf(this.hash,t);for(var r=new Uint8Array(this.key),n=0;nf.BLOCK_SIZE?e.set(f.reset().process(t).finish().result):e.set(t),e}var yf=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,t){f.__proto__=t}||function(f,t){for(var e in t)t.hasOwnProperty(e)&&(f[e]=t[e])};return function(f,t){function e(){this.constructor=f}r(f,t),f.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}}(),bf=function(n){function f(f,t){var e=this,r=new tf;return e=n.call(this,r,f,t)||this,e.reset(),void 0!==t?e._hmac_init_verify(t):e.verify=null,e}return yf(f,n),f.prototype.reset=function(){this.result=null;var f=this.key;return this.hash.reset().asm.hmac_init(f[0]<<24|f[1]<<16|f[2]<<8|f[3],f[4]<<24|f[5]<<16|f[6]<<8|f[7],f[8]<<24|f[9]<<16|f[10]<<8|f[11],f[12]<<24|f[13]<<16|f[14]<<8|f[15],f[16]<<24|f[17]<<16|f[18]<<8|f[19],f[20]<<24|f[21]<<16|f[22]<<8|f[23],f[24]<<24|f[25]<<16|f[26]<<8|f[27],f[28]<<24|f[29]<<16|f[30]<<8|f[31],f[32]<<24|f[33]<<16|f[34]<<8|f[35],f[36]<<24|f[37]<<16|f[38]<<8|f[39],f[40]<<24|f[41]<<16|f[42]<<8|f[43],f[44]<<24|f[45]<<16|f[46]<<8|f[47],f[48]<<24|f[49]<<16|f[50]<<8|f[51],f[52]<<24|f[53]<<16|f[54]<<8|f[55],f[56]<<24|f[57]<<16|f[58]<<8|f[59],f[60]<<24|f[61]<<16|f[62]<<8|f[63]),this},f.prototype.finish=function(){if(null!==this.result)throw new b("state must be reset before processing new data");var f=this.hash,t=this.hash.asm,e=this.hash.heap;t.hmac_finish(f.pos,f.len,0);var r=this.verify,n=new Uint8Array(ff);if(n.set(e.subarray(0,ff)),r){if(r.length!==n.length)throw new Error("HMAC verification failed, lengths doesn't match");for(var i=0,a=0;a>3;if(r.length>3;if(t.lengthe-2*this.hash.HASH_SIZE-2)throw new _("data too large");var a=new Uint8Array(e),s=a.subarray(1,r+1),o=a.subarray(r+1);if(o.set(f,r+i+1),o.set(this.hash.process(this.label||new Uint8Array(0)).finish().result,0),o[r+i]=1,void 0!==t){if(s.length!==t.length)throw new _("random size must equal the hash size");s.set(t)}else G(s);for(var x=this.RSA_MGF1_generate(s,o.length),c=0;c>>24,n[1]=a>>>16&255,n[2]=a>>>8&255,n[3]=255&a;var s=r.subarray(a*e),o=this.hash.reset().process(f).process(n).finish().result;o.length>s.length&&(o=o.subarray(0,s.length)),s.set(o)}return r},f}(),Sf=function(){function f(f,t,e){if(void 0===e&&(e=4),this.rsa=new Ef(f),this.hash=t,this.saltLength=e,this.saltLength<0)throw new TypeError("saltLength should be a non-negative number");if(null!==this.rsa.key&&Math.ceil((this.rsa.key[0].bitLength-1)/8)>>b),this.rsa.decrypt(new W(s)),this.rsa.result},f.prototype.verify=function(f,t){var e=this.rsa.key[0].bitLength,r=this.hash.HASH_SIZE,n=Math.ceil((e-1)/8),i=this.saltLength,a=n-i-r-2;this.rsa.encrypt(new W(f));var s=this.rsa.result;if(188!==s[n-1])throw new v("bad signature");var o=s.subarray(n-r-1,n-1),x=s.subarray(0,n-r-1),c=x.subarray(a+1),h=8*n-e+1;if(h%8&&s[0]>>>8-h)throw new v("bad signature");for(var u=this.RSA_MGF1_generate(o,x.length),l=0;l>>h);for(l=0;l>>24,n[1]=a>>>16&255,n[2]=a>>>8&255,n[3]=255&a;var s=r.subarray(a*e),o=this.hash.reset().process(f).process(n).finish().result;o.length>s.length&&(o=o.subarray(0,s.length)),s.set(o)}return r},f}(),Uf=function(){function f(f,t){this.rsa=new Ef(f),this.hash=t}return f.prototype.sign=function(f){if(!this.rsa.key)throw new b("no key is associated with the instance");var t=Of(this.hash),e=this.hash.HASH_SIZE,r=t.length+e,n=this.rsa.key[0].bitLength+7>>3;if(n>3;if(i=f-1){var s=n.subarray(0,o),m=s;if(i.push(String.fromCharCode.apply(null,m)),!t)return i.join("");r=r.subarray(e),e=0,o=0}var a=r[e++];if((a&128)===0)n[o++]=a;else if((a&224)===192){var d=r[e++]&63;n[o++]=(a&31)<<6|d}else if((a&240)===224){var d=r[e++]&63,l=r[e++]&63;n[o++]=(a&31)<<12|d<<6|l}else if((a&248)===240){var d=r[e++]&63,l=r[e++]&63,R=r[e++]&63,c=(a&7)<<18|d<<12|l<<6|R;c>65535&&(c-=65536,n[o++]=c>>>10&1023|55296,c=56320|c&1023),n[o++]=c}}}function F(r){for(var e=0,f=r.length,n=0,i=Math.max(32,f+(f>>>1)+7),o=new Uint8Array(i>>>3<<3);e=55296&&t<=56319){if(e=55296&&t<=56319)continue}if(n+4>o.length){i+=8,i*=1+e/r.length*2,i=i>>>3<<3;var m=new Uint8Array(i);m.set(o),o=m}if((t&4294967168)===0){o[n++]=t;continue}else if((t&4294965248)===0)o[n++]=t>>>6&31|192;else if((t&4294901760)===0)o[n++]=t>>>12&15|224,o[n++]=t>>>6&63|128;else if((t&4292870144)===0)o[n++]=t>>>18&7|240,o[n++]=t>>>12&63|128,o[n++]=t>>>6&63|128;else continue;o[n++]=t&63|128}return o.slice?o.slice(0,n):o.subarray(0,n)}var u="Failed to ",p=function(r,e,f){if(r)throw new Error("".concat(u).concat(e,": the '").concat(f,"' option is unsupported."))};var x=typeof Buffer=="function"&&Buffer.from;var A=x?w:F;function v(){this.encoding="utf-8"}v.prototype.encode=function(r,e){return p(e&&e.stream,"encode","stream"),A(r)};function U(r){var e;try{var f=new Blob([r],{type:"text/plain;charset=UTF-8"});e=URL.createObjectURL(f);var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(),n.responseText}finally{e&&URL.revokeObjectURL(e)}}var O=!x&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",S=["utf-8","utf8","unicode-1-1-utf-8"],T=h;x?T=B:O&&(T=function(r){try{return U(r)}catch(e){return h(r)}});var y="construct 'TextDecoder'",E="".concat(u," ").concat(y,": the ");function g(r,e){p(e&&e.fatal,y,"fatal"),r=r||"utf-8";var f;if(x?f=Buffer.isEncoding(r):f=S.indexOf(r.toLowerCase())!==-1,!f)throw new RangeError("".concat(E," encoding label provided ('").concat(r,"') is invalid."));this.encoding=r,this.fatal=!1,this.ignoreBOM=!1}g.prototype.decode=function(r,e){p(e&&e.stream,"decode","stream");var f;return r instanceof Uint8Array?f=r:r.buffer instanceof ArrayBuffer?f=new Uint8Array(r.buffer):f=new Uint8Array(r),T(f,this.encoding)};scope.TextEncoder=scope.TextEncoder||v;scope.TextDecoder=scope.TextDecoder||g; +}(typeof window !== 'undefined' ? window : (typeof global !== 'undefined' ? global : this))); diff --git a/wallabagger/js/deps/webcrypto-liner.shim.min.js b/wallabagger/js/deps/webcrypto-liner.shim.min.js new file mode 100644 index 0000000..34c7e66 --- /dev/null +++ b/wallabagger/js/deps/webcrypto-liner.shim.min.js @@ -0,0 +1 @@ +var _excluded=["name","optional","primitiveSchema"],_excluded2=["value"],_excluded3=["isHexOnly"],_excluded4=["value","isIndefiniteForm"],_excluded5=["value"],_excluded6=["isConstructed"],_excluded7=["idBlock","lenBlock"],_excluded8=["unusedBits","isConstructed"],_excluded9=["idBlock","lenBlock"],_excluded10=["value"],_excluded11=["valueDec","isFirstSid"],_excluded12=["value"],_excluded13=["valueDec"],_excluded14=["value"],_excluded15=["value","valueDate"],_excluded16=["value"],_excluded17=["value","local"];function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),u=new A(i||[]);return n(o,"_invoke",{value:b(e,r,u)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h={};function f(){}function p(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,d=g&&g(g(x([])));d&&d!==t&&r.call(d,a)&&(y=d);var m=v.prototype=f.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(n,a,o,u){var s=l(e[n],e,a);if("throw"!==s.type){var c=s.arg,h=c.value;return h&&"object"==_typeof(h)&&r.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,o,u)}),(function(e){i("throw",e,o,u)})):t.resolve(h).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,u)}))}u(s.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return B()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var u=_(o,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,u,"next",e)}function u(e){asyncGeneratorStep(a,n,i,o,u,"throw",e)}o(void 0)}))}}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,e)},_wrapNativeSuper(e)}function _construct(e,t,r){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&_setPrototypeOf(i,r.prototype),i},_construct.apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _objectDestructuringEmpty(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1],r=s.toArrayBuffer(e),n=new DataView(r),i="",a=0;a1&&void 0!==arguments[1]&&arguments[1],r=new ArrayBuffer(2*e.length),n=new DataView(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:"utf8",r=s.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(r);case"binary":return this.ToBinary(r);case"hex":return this.ToHex(r);case"base64":return this.ToBase64(r);case"base64url":return this.ToBase64Url(r);case"utf16le":return l.toString(r,!0);case"utf16":case"utf16be":return l.toString(r);default:throw new Error("Unknown type of encoding '".concat(t,"'"))}}},{key:"FromString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return l.fromString(e,!0);case"utf16":case"utf16be":return l.fromString(e);default:throw new Error("Unknown type of encoding '".concat(t,"'"))}}},{key:"ToBase64",value:function(e){var t=s.toUint8Array(e);if("undefined"!=typeof btoa){var r=this.ToString(t,"binary");return btoa(r)}return Buffer.from(t).toString("base64")}},{key:"FromBase64",value:function(t){var r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!e.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(r)):new Uint8Array(Buffer.from(r,"base64")).buffer}},{key:"FromBase64Url",value:function(t){var r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!e.isBase64Url(r))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))}},{key:"ToBase64Url",value:function(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}},{key:"FromUtf8String",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_UTF8_ENCODING;switch(r){case"ascii":return this.FromBinary(t);case"utf8":return c.fromString(t);case"utf16":case"utf16be":return l.fromString(t);case"utf16le":case"usc2":return l.fromString(t,!0);default:throw new Error("Unknown type of encoding '".concat(r,"'"))}}},{key:"ToUtf8String",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_UTF8_ENCODING;switch(r){case"ascii":return this.ToBinary(t);case"utf8":return c.toString(t);case"utf16":case"utf16be":return l.toString(t);case"utf16le":case"usc2":return l.toString(t,!0);default:throw new Error("Unknown type of encoding '".concat(r,"'"))}}},{key:"FromBinary",value:function(e){for(var t=e.length,r=new Uint8Array(t),n=0;n1&&void 0!==arguments[1]&&arguments[1];return l.toString(e,t)}},{key:"FromUtf16String",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return l.fromString(e,t)}},{key:"Base64Padding",value:function(e){var t=4-e.length%4;if(t<4)for(var r=0;r=0;n--)r+=e[e.length-1-n]*Math.pow(2,t*n);return r}function v(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=e,i=0,a=Math.pow(2,t),o=1;o<8;o++){if(e=0;c--){var l=Math.pow(2,c*t);s[i-c-1]=Math.floor(n/l),n-=s[i-c-1]*l}return u}a*=Math.pow(2,t)}return new ArrayBuffer(0)}function y(){for(var e=0,t=0,r=arguments.length,n=new Array(r),i=0;i=2){var t=255===e[0]&&128&e[1],r=0===e[0]&&0==(128&e[1]);(t||r)&&this.warnings.push("Needlessly long format")}for(var n=new ArrayBuffer(this.valueHex.byteLength),i=new Uint8Array(n),a=0;a0&&void 0!==arguments[0]&&arguments[0];return this.isHexOnly?e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",I)}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{isHexOnly:this.isHexOnly,valueHex:h.ToHex(this.valueHexView)})}}]),r}(e),t.NAME="hexBlock",t}var D=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.blockLength,n=void 0===r?0:r,i=t.error,a=void 0===i?U:i,o=t.warnings,u=void 0===o?[]:o,c=t.valueBeforeDecode,l=void 0===c?L:c;_classCallCheck(this,e),this.blockLength=n,this.error=a,this.warnings=u,this.valueBeforeDecodeView=s.toUint8Array(l)}return _createClass(e,[{key:"valueBeforeDecode",get:function(){return this.valueBeforeDecodeView.slice().buffer},set:function(e){this.valueBeforeDecodeView=new Uint8Array(e)}},{key:"toJSON",value:function(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:h.ToHex(this.valueBeforeDecodeView)}}}],[{key:"blockName",value:function(){return this.NAME}}]),e}();D.NAME="baseBlock";var M=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"fromBER",value:function(e,t,r){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}},{key:"toBER",value:function(e,t){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}}]),r}(D);M.NAME="valueBlock";var F=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n,i,a,o,u=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).idBlock,c=void 0===u?{}:u;return _classCallCheck(this,r),e=t.call(this),c?(e.isHexOnly=null!==(n=c.isHexOnly)&&void 0!==n&&n,e.valueHexView=c.valueHex?s.toUint8Array(c.valueHex):L,e.tagClass=null!==(i=c.tagClass)&&void 0!==i?i:-1,e.tagNumber=null!==(a=c.tagNumber)&&void 0!==a?a:-1,e.isConstructed=null!==(o=c.isConstructed)&&void 0!==o&&o):(e.tagClass=-1,e.tagNumber=-1,e.isConstructed=!1),e}return _createClass(r,[{key:"toBER",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;switch(this.tagClass){case 1:t|=0;break;case 2:t|=64;break;case 3:t|=128;break;case 4:t|=192;break;default:return this.error="Unknown tag class",I}if(this.isConstructed&&(t|=32),this.tagNumber<31&&!this.isHexOnly){var r=new Uint8Array(1);if(!e){var n=this.tagNumber;t|=n&=31,r[0]=t}return r.buffer}if(!this.isHexOnly){var i=v(this.tagNumber,7),a=new Uint8Array(i),o=i.byteLength,u=new Uint8Array(o+1);if(u[0]=31|t,!e){for(var s=0;s=i.length)return this.error="End of input reached before message was fully decoded",-1;if(o===c){c+=255;for(var l=new Uint8Array(c),h=0;h0&&void 0!==arguments[0]?arguments[0]:{}).lenBlock,u=void 0===o?{}:o;return _classCallCheck(this,r),(e=t.call(this)).isIndefiniteForm=null!==(n=u.isIndefiniteForm)&&void 0!==n&&n,e.longFormUsed=null!==(i=u.longFormUsed)&&void 0!==i&&i,e.length=null!==(a=u.length)&&void 0!==a?a:0,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){var n=s.toUint8Array(e);if(!w(this,n,t,r))return-1;var i=n.subarray(t,t+r);if(0===i.length)return this.error="Zero buffer length",-1;if(255===i[0])return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=128===i[0],this.isIndefiniteForm)return this.blockLength=1,t+this.blockLength;if(this.longFormUsed=!!(128&i[0]),!1===this.longFormUsed)return this.length=i[0],this.blockLength=1,t+this.blockLength;var a=127&i[0];if(a>8)return this.error="Too big integer",-1;if(a+1>i.length)return this.error="End of input reached before message was fully decoded",-1;var o=t+1,u=n.subarray(o,o+a);return 0===u[a-1]&&this.warnings.push("Needlessly long encoded length"),this.length=p(u,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,t+this.blockLength}},{key:"toBER",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return e=new ArrayBuffer(1),!1===r&&((t=new Uint8Array(e))[0]=128),e;if(this.longFormUsed){var n=v(this.length,8);if(n.byteLength>127)return this.error="Too big length",I;if(e=new ArrayBuffer(n.byteLength+1),r)return e;var i=new Uint8Array(n);(t=new Uint8Array(e))[0]=128|n.byteLength;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=n.name,a=void 0===i?U:i,o=n.optional,u=void 0!==o&&o,s=n.primitiveSchema,c=_objectWithoutProperties(n,_excluded),l=arguments.length>1?arguments[1]:void 0;return _classCallCheck(this,r),(e=t.call(this,c)).name=a,e.optional=u,s&&(e.primitiveSchema=s),e.idBlock=new F(c),e.lenBlock=new J(c),e.valueBlock=l?new l(c):new M(c),e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){var n=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?r:this.lenBlock.length);return-1===n?(this.error=this.valueBlock.error,n):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),n)}},{key:"toBER",value:function(e,t){var r=t||new b;t||q(this);var n=this.idBlock.toBER(e);if(r.write(n),this.lenBlock.isIndefiniteForm)r.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(e,r),r.write(new ArrayBuffer(2));else{var i=this.valueBlock.toBER(e);this.lenBlock.length=i.byteLength;var a=this.lenBlock.toBER(e);r.write(a),r.write(i)}return t?I:r.final()}},{key:"toJSON",value:function(){var e=_objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional});return this.primitiveSchema&&(e.primitiveSchema=this.primitiveSchema.toJSON()),e}},{key:"toString",value:function(){return"ascii"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ascii")?this.onAsciiEncoding():h.ToHex(this.toBER())}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : ").concat(h.ToHex(this.valueBlock.valueBeforeDecodeView))}},{key:"isEqual",value:function(e){return this===e||e instanceof this.constructor&&function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=new Uint8Array(e),n=new Uint8Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=void 0===i?U:i,o=_objectWithoutProperties(n,_excluded2),u=arguments.length>1?arguments[1]:void 0;return _classCallCheck(this,r),e=t.call(this,o,u),a&&e.fromString(a),e}return _createClass(r,[{key:"getValue",value:function(){return this.valueBlock.value}},{key:"setValue",value:function(e){this.valueBlock.value=e}},{key:"fromBER",value:function(e,t,r){var n=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?r:this.lenBlock.length);return-1===n?(this.error=this.valueBlock.error,n):(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),n)}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : '").concat(this.valueBlock.value,"'")}}]),r}(z);W.NAME="BaseStringBlock";var X,Z=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.isHexOnly,a=void 0===i||i,o=_objectWithoutProperties(n,_excluded3);return _classCallCheck(this,r),(e=t.call(this,o)).isHexOnly=a,e}return _createClass(r)}(V(M));Z.NAME="PrimitiveValueBlock";var $=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,Z)).idBlock.isConstructed=!1,e}return _createClass(r)}(z);function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,n=t,i=new z({},M),a=new D;if(!w(a,e,t,r))return i.error=a.error,{offset:-1,result:i};if(!e.subarray(t,t+r).length)return i.error="Zero buffer length",{offset:-1,result:i};var o=i.idBlock.fromBER(e,t,r);if(i.idBlock.warnings.length&&i.warnings.concat(i.idBlock.warnings),-1===o)return i.error=i.idBlock.error,{offset:-1,result:i};if(t=o,r-=i.idBlock.blockLength,o=i.lenBlock.fromBER(e,t,r),i.lenBlock.warnings.length&&i.warnings.concat(i.lenBlock.warnings),-1===o)return i.error=i.lenBlock.error,{offset:-1,result:i};if(t=o,r-=i.lenBlock.blockLength,!i.idBlock.isConstructed&&i.lenBlock.isIndefiniteForm)return i.error="Indefinite length form used for primitive encoding form",{offset:-1,result:i};var u=z;if(1===i.idBlock.tagClass){if(i.idBlock.tagNumber>=37&&!1===i.idBlock.isHexOnly)return i.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:i};switch(i.idBlock.tagNumber){case 0:if(i.idBlock.isConstructed&&i.lenBlock.length>0)return i.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:i};u=G.EndOfContent;break;case 1:u=G.Boolean;break;case 2:u=G.Integer;break;case 3:u=G.BitString;break;case 4:u=G.OctetString;break;case 5:u=G.Null;break;case 6:u=G.ObjectIdentifier;break;case 10:u=G.Enumerated;break;case 12:u=G.Utf8String;break;case 13:u=G.RelativeObjectIdentifier;break;case 14:u=G.TIME;break;case 15:return i.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:i};case 16:u=G.Sequence;break;case 17:u=G.Set;break;case 18:u=G.NumericString;break;case 19:u=G.PrintableString;break;case 20:u=G.TeletexString;break;case 21:u=G.VideotexString;break;case 22:u=G.IA5String;break;case 23:u=G.UTCTime;break;case 24:u=G.GeneralizedTime;break;case 25:u=G.GraphicString;break;case 26:u=G.VisibleString;break;case 27:u=G.GeneralString;break;case 28:u=G.UniversalString;break;case 29:u=G.CharacterString;break;case 30:u=G.BmpString;break;case 31:u=G.DATE;break;case 32:u=G.TimeOfDay;break;case 33:u=G.DateTime;break;case 34:u=G.Duration;break;default:var s=i.idBlock.isConstructed?new G.Constructed:new G.Primitive;s.idBlock=i.idBlock,s.lenBlock=i.lenBlock,s.warnings=i.warnings,i=s}}else u=i.idBlock.isConstructed?G.Constructed:G.Primitive;return i=function(e,t){if(e instanceof t)return e;var r=new t;return r.idBlock=e.idBlock,r.lenBlock=e.lenBlock,r.warnings=e.warnings,r.valueBeforeDecodeView=e.valueBeforeDecodeView,r}(i,u),o=i.fromBER(e,t,i.lenBlock.isIndefiniteForm?r:i.lenBlock.length),i.valueBeforeDecodeView=e.subarray(n,n+i.blockLength),{offset:o,result:i}}function Q(e){if(!e.byteLength){var t=new z({},M);return t.error="Input buffer has zero length",{offset:-1,result:t}}return Y(s.toUint8Array(e).slice(),0,e.byteLength)}X=$,G.Primitive=X,$.NAME="PRIMITIVE";var ee,te=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=void 0===i?[]:i,o=n.isIndefiniteForm,u=void 0!==o&&o,s=_objectWithoutProperties(n,_excluded4);return _classCallCheck(this,r),(e=t.call(this,s)).value=a,e.isIndefiniteForm=u,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){var n=s.toUint8Array(e);if(!w(this,n,t,r))return-1;if(this.valueBeforeDecodeView=n.subarray(t,t+r),0===this.valueBeforeDecodeView.length)return this.warnings.push("Zero buffer length"),t;for(var i,a,o=t;i=this.isIndefiniteForm,a=r,(i?1:a)>0;){var u=Y(n,o,r);if(-1===u.offset)return this.error=u.result.error,this.warnings.concat(u.result.warnings),-1;if(o=u.offset,this.blockLength+=u.result.blockLength,r-=u.result.blockLength,this.value.push(u.result),this.isIndefiniteForm&&u.result.constructor.NAME===T)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===T?this.value.pop():this.warnings.push("No EndOfContent block encoded")),o}},{key:"toBER",value:function(e,t){for(var r=t||new b,n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,te)).idBlock.isConstructed=!0,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;var n=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?r:this.lenBlock.length);return-1===n?(this.error=this.valueBlock.error,n):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),n)}},{key:"onAsciiEncoding",value:function(){var e,t=[],r=_createForOfIteratorHelper(this.valueBlock.value);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push(n.toString("ascii").split("\n").map((function(e){return" ".concat(e)})).join("\n"))}}catch(e){r.e(e)}finally{r.f()}var i=3===this.idBlock.tagClass?"[".concat(this.idBlock.tagNumber,"]"):this.constructor.NAME;return t.length?"".concat(i," :\n").concat(t.join("\n")):"".concat(i," :")}}]),r}(z);ee=re,G.Constructed=ee,re.NAME="CONSTRUCTED";var ne,ie=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"fromBER",value:function(e,t,r){return t}},{key:"toBER",value:function(e){return I}}]),r}(M);ie.override="EndOfContentValueBlock";var ae,oe=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,ie)).idBlock.tagClass=1,e.idBlock.tagNumber=0,e}return _createClass(r)}(z);ne=oe,G.EndOfContent=ne,oe.NAME=T;var ue=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,M)).idBlock.tagClass=1,e.idBlock.tagNumber=5,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=r,t+r>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):t+r}},{key:"toBER",value:function(e,t){var r=new ArrayBuffer(2);if(!e){var n=new Uint8Array(r);n[0]=5,n[1]=0}return t&&t.write(r),r}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME)}}]),r}(z);ae=ue,G.Null=ae,ue.NAME="NULL";var se,ce=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=_objectWithoutProperties(n,_excluded5);return _classCallCheck(this,r),e=t.call(this,a),a.valueHex?e.valueHexView=s.toUint8Array(a.valueHex):e.valueHexView=new Uint8Array(1),i&&(e.value=i),e}return _createClass(r,[{key:"value",get:function(){var e,t=_createForOfIteratorHelper(this.valueHexView);try{for(t.s();!(e=t.n()).done;){if(e.value>0)return!0}}catch(e){t.e(e)}finally{t.f()}return!1},set:function(e){this.valueHexView[0]=e?255:0}},{key:"fromBER",value:function(e,t,r){var n=s.toUint8Array(e);return w(this,n,t,r)?(this.valueHexView=n.subarray(t,t+r),r>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,g.call(this),this.blockLength=r,t+r):-1}},{key:"toBER",value:function(){return this.valueHexView.slice()}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{value:this.value})}}]),r}(V(M));ce.NAME="BooleanValueBlock";var le=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,ce)).idBlock.tagClass=1,e.idBlock.tagNumber=1,e}return _createClass(r,[{key:"getValue",value:function(){return this.valueBlock.value}},{key:"setValue",value:function(e){this.valueBlock.value=e}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : ").concat(this.getValue)}}]),r}(z);se=le,G.Boolean=se,le.NAME="BOOLEAN";var he,fe=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.isConstructed,a=void 0!==i&&i,o=_objectWithoutProperties(n,_excluded6);return _classCallCheck(this,r),(e=t.call(this,o)).isConstructed=a,e}return _createClass(r,[{key:"fromBER",value:function(e,t,n){var i=0;if(this.isConstructed){if(this.isHexOnly=!1,-1===(i=te.prototype.fromBER.call(this,e,t,n)))return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},o=a.idBlock,u=void 0===o?{}:o,s=a.lenBlock,c=void 0===s?{}:s,l=_objectWithoutProperties(a,_excluded7);return _classCallCheck(this,r),null!==(n=l.isConstructed)&&void 0!==n||(l.isConstructed=!!(null===(i=l.value)||void 0===i?void 0:i.length)),(e=t.call(this,_objectSpread({idBlock:_objectSpread({isConstructed:l.isConstructed},u),lenBlock:_objectSpread(_objectSpread({},c),{},{isIndefiniteForm:!!l.isIndefiniteForm})},l),fe)).idBlock.tagClass=1,e.idBlock.tagNumber=4,e}return _createClass(r,[{key:"fromBER",value:function(e,t,n){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,0===n)return 0===this.idBlock.error.length&&(this.blockLength+=this.idBlock.blockLength),0===this.lenBlock.error.length&&(this.blockLength+=this.lenBlock.blockLength),t;if(!this.valueBlock.isConstructed){var i=(e instanceof ArrayBuffer?new Uint8Array(e):e).subarray(t,t+n);try{if(i.byteLength){var a=Y(i,0,i.byteLength);-1!==a.offset&&a.offset===n&&(this.valueBlock.value=[a.result])}}catch(e){}}return _get(_getPrototypeOf(r.prototype),"fromBER",this).call(this,e,t,n)}},{key:"onAsciiEncoding",value:function(){return this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length?re.prototype.onAsciiEncoding.call(this):"".concat(this.constructor.NAME," : ").concat(h.ToHex(this.valueBlock.valueHexView))}},{key:"getValue",value:function(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;var e,t=[],n=_createForOfIteratorHelper(this.valueBlock.value);try{for(n.s();!(e=n.n()).done;){var i=e.value;i instanceof r&&t.push(i.valueBlock.valueHexView)}}catch(e){n.e(e)}finally{n.f()}return s.concat(t)}}]),r}(z);he=pe,G.OctetString=he,pe.NAME=j;var ve,ye=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.unusedBits,a=void 0===i?0:i,o=n.isConstructed,u=void 0!==o&&o,s=_objectWithoutProperties(n,_excluded8);return _classCallCheck(this,r),(e=t.call(this,s)).unusedBits=a,e.isConstructed=u,e.blockLength=e.valueHexView.byteLength,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){if(!r)return t;var n=-1;if(this.isConstructed){if(-1===(n=te.prototype.fromBER.call(this,e,t,r)))return n;var i,a=_createForOfIteratorHelper(this.value);try{for(a.s();!(i=a.n()).done;){var o=i.value,u=o.constructor.NAME;if(u===T){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(u!==H)return this.error="BIT STRING may consists of BIT STRINGs only",-1;var c=o.valueBlock;if(this.unusedBits>0&&c.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=c.unusedBits}}catch(e){a.e(e)}finally{a.f()}return n}var l=s.toUint8Array(e);if(!w(this,l,t,r))return-1;var h=l.subarray(t,t+r);if(this.unusedBits=h[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){var f=h.subarray(1);try{if(f.byteLength){var p=Y(f,0,f.byteLength);-1!==p.offset&&p.offset===r-1&&(this.value=[p.result])}}catch(e){}}return this.valueHexView=h.subarray(1),this.blockLength=h.length,t+r}},{key:"toBER",value:function(e,t){if(this.isConstructed)return te.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return I;var r=new Uint8Array(this.valueHexView.length+1);return r[0]=this.unusedBits,r.set(this.valueHexView,1),r.buffer}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{unusedBits:this.unusedBits,isConstructed:this.isConstructed})}}]),r}(V(te));ye.NAME="BitStringValueBlock";var ge,de=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.idBlock,u=void 0===o?{}:o,s=a.lenBlock,c=void 0===s?{}:s,l=_objectWithoutProperties(a,_excluded9);return _classCallCheck(this,r),null!==(n=l.isConstructed)&&void 0!==n||(l.isConstructed=!!(null===(i=l.value)||void 0===i?void 0:i.length)),(e=t.call(this,_objectSpread({idBlock:_objectSpread({isConstructed:l.isConstructed},u),lenBlock:_objectSpread(_objectSpread({},c),{},{isIndefiniteForm:!!l.isIndefiniteForm})},l),ye)).idBlock.tagClass=1,e.idBlock.tagNumber=3,e}return _createClass(r,[{key:"fromBER",value:function(e,t,n){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,_get(_getPrototypeOf(r.prototype),"fromBER",this).call(this,e,t,n)}},{key:"onAsciiEncoding",value:function(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return re.prototype.onAsciiEncoding.call(this);var e,t=[],r=_createForOfIteratorHelper(this.valueBlock.valueHexView);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push(n.toString(2).padStart(8,"0"))}}catch(e){r.e(e)}finally{r.f()}var i=t.join("");return"".concat(this.constructor.NAME," : ").concat(i.substring(0,i.length-this.valueBlock.unusedBits))}}]),r}(z);function me(e,t){for(var r=new Uint8Array([0]),n=new Uint8Array(e),i=new Uint8Array(t),a=n.slice(0),o=a.length-1,u=i.slice(0),s=u.length-1,c=0,l=0,h=s=0;h--,l++){if(!0==l=a.length)a=y(new Uint8Array([c%10]),a);else a[o-l]=c%10}return r[0]>0&&(a=y(r,a)),a}function ke(e){if(e>=_.length)for(var t=_.length;t<=e;t++){for(var r=new Uint8Array([0]),n=_[t-1].slice(0),i=n.length-1;i>=0;i--){var a=new Uint8Array([(n[i]<<1)+r[0]]);r[0]=a[0]/10,n[i]=a[0]%10}r[0]>0&&(n=y(r,n)),_.push(n)}return _[e]}function we(e,t){for(var r,n=0,i=new Uint8Array(e),a=new Uint8Array(t),o=i.slice(0),u=o.length-1,s=a.slice(0),c=s.length-1,l=0,h=c;h>=0;h--,l++)if(!0==(r=o[u-l]-s[c-l]-n)<0)n=1,o[u-l]=r+10;else n=0,o[u-l]=r;if(n>0)for(var f=u-c+1;f>=0;f--,l++){if(!((r=o[u-l]-n)<0)){n=0,o[u-l]=r;break}n=1,o[u-l]=r+10}return o.slice()}ve=de,G.BitString=ve,de.NAME=H;var be,_e=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=_objectWithoutProperties(n,_excluded10);return _classCallCheck(this,r),(e=t.call(this,a))._valueDec=0,a.valueHex&&e.setValueHex(),void 0!==i&&(e.valueDec=i),e}return _createClass(r,[{key:"setValueHex",value:function(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=g.call(this)))}},{key:"valueDec",get:function(){return this._valueDec},set:function(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(function(e){for(var t=e<0?-1*e:e,r=128,n=1;n<8;n++){if(t<=r){if(e<0){var i=v(r-t,8,n);return new Uint8Array(i)[0]|=128,i}var a=v(t,8,n),o=new Uint8Array(a);if(128&o[0]){var u=a.slice(0),s=new Uint8Array(u);a=new ArrayBuffer(a.byteLength+1),o=new Uint8Array(a);for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:0,i=this.fromBER(e,t,r);if(-1===i)return i;var a=this.valueHexView;return 0===a[0]&&0!=(128&a[1])?this.valueHexView=a.subarray(1):0!==n&&a.length1&&(n=a.length+1),this.valueHexView=a.subarray(n-a.length)),i}},{key:"toDER",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.valueHexView;switch(!0){case 0!=(128&t[0]):var r=new Uint8Array(this.valueHexView.length+1);r[0]=0,r.set(t,1),this.valueHexView=r;break;case 0===t[0]&&0==(128&t[1]):this.valueHexView=this.valueHexView.subarray(1)}return this.toBER(e)}},{key:"fromBER",value:function(e,t,n){var i=_get(_getPrototypeOf(r.prototype),"fromBER",this).call(this,e,t,n);return-1===i||this.setValueHex(),i}},{key:"toBER",value:function(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{valueDec:this.valueDec})}},{key:"toString",value:function(){for(var e,t=8*this.valueHexView.length-1,r=new Uint8Array(8*this.valueHexView.length/3),n=0,i=this.valueHexView,a="",o=!1,u=i.byteLength-1;u>=0;u--){e=i[u];for(var s=0;s<8;s++){if(1==(1&e))if(n===t)r=we(ke(n),r),a="-";else r=me(r,ke(n));n++,e>>=1}}for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,_e)).idBlock.tagClass=1,e.idBlock.tagNumber=2,e}return _createClass(r,[{key:"toBigInt",value:function(){return m(),BigInt(this.valueBlock.toString())}},{key:"convertToDER",value:function(){var e=new r({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}},{key:"convertFromDER",value:function(){return new r({valueHex:0===this.valueBlock.valueHexView[0]?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString())}}],[{key:"fromBigInt",value:function(e){m();var t=BigInt(e),n=new b,i=t.toString(16).replace(/^-/,""),a=new Uint8Array(h.FromHex(i));if(t<0){var o=new Uint8Array(a.length+(128&a[0]?1:0));o[0]|=128;var u=BigInt("0x".concat(h.ToHex(o)))+t,c=s.toUint8Array(h.FromHex(u.toString(16)));c[0]|=128,n.write(c)}else 128&a[0]&&n.write(new Uint8Array([0])),n.write(a);return new r({valueHex:n.final()})}}]),r}(z);be=Se,G.Integer=be,Se.NAME="INTEGER";var Ae=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=10,e}return _createClass(r)}(Se);Ce=Ae,G.Enumerated=Ce,Ae.NAME="ENUMERATED";var xe=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.valueDec,a=void 0===i?-1:i,o=n.isFirstSid,u=void 0!==o&&o,s=_objectWithoutProperties(n,_excluded11);return _classCallCheck(this,r),(e=t.call(this,s)).valueDec=a,e.isFirstSid=u,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){if(!r)return t;var n=s.toUint8Array(e);if(!w(this,n,t,r))return-1;var i=n.subarray(t,t+r);this.valueHexView=new Uint8Array(r);for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=void 0===i?U:i,o=_objectWithoutProperties(n,_excluded12);return _classCallCheck(this,r),(e=t.call(this,o)).value=[],a&&e.fromString(a),e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){for(var n=t;r>0;){var i=new xe;if(-1===(n=i.fromBER(e,n,r)))return this.blockLength=0,this.error=i.error,n;0===this.value.length&&(i.isFirstSid=!0),this.blockLength+=i.blockLength,r-=i.blockLength,this.value.push(i)}return n}},{key:"toBER",value:function(e){for(var t=[],r=0;rNumber.MAX_SAFE_INTEGER){m();var c=BigInt(n);s.valueBigInt=c}else if(s.valueDec=parseInt(n,10),isNaN(s.valueDec))return;this.value.length||(s.isFirstSid=!0,i=!0),this.value.push(s)}}while(-1!==r)}},{key:"toString",value:function(){for(var e="",t=!1,r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,Ee)).idBlock.tagClass=1,e.idBlock.tagNumber=6,e}return _createClass(r,[{key:"getValue",value:function(){return this.valueBlock.toString()}},{key:"setValue",value:function(e){this.valueBlock.fromString(e)}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString()||"empty")}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{value:this.getValue()})}}]),r}(z);Be=Re,G.ObjectIdentifier=Be,Re.NAME="OBJECT IDENTIFIER";var Ke=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.valueDec,a=void 0===i?0:i,o=_objectWithoutProperties(n,_excluded13);return _classCallCheck(this,r),(e=t.call(this,o)).valueDec=a,e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){if(0===r)return t;var n=s.toUint8Array(e);if(!w(this,n,t,r))return-1;var i=n.subarray(t,t+r);this.valueHexView=new Uint8Array(r);for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=void 0===i?U:i,o=_objectWithoutProperties(n,_excluded14);return _classCallCheck(this,r),(e=t.call(this,o)).value=[],a&&e.fromString(a),e}return _createClass(r,[{key:"fromBER",value:function(e,t,r){for(var n=t;r>0;){var i=new Ke;if(-1===(n=i.fromBER(e,n,r)))return this.blockLength=0,this.error=i.error,n;this.blockLength+=i.blockLength,r-=i.blockLength,this.value.push(i)}return n}},{key:"toBER",value:function(e,t){for(var r=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n,Ne)).idBlock.tagClass=1,e.idBlock.tagNumber=13,e}return _createClass(r,[{key:"getValue",value:function(){return this.valueBlock.toString()}},{key:"setValue",value:function(e){this.valueBlock.fromString(e)}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString()||"empty")}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{value:this.getValue()})}}]),r}(z);Oe=Ue,G.RelativeObjectIdentifier=Oe,Ue.NAME="RelativeObjectIdentifier";var Ie,Le=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=16,e}return _createClass(r)}(re);Pe=Le,G.Sequence=Pe,Le.NAME="SEQUENCE";var Te=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=17,e}return _createClass(r)}(re);Ie=Te,G.Set=Ie,Te.NAME="SET";var je=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=Object.assign({},(_objectDestructuringEmpty(n),n));return _classCallCheck(this,r),(e=t.call(this,i)).isHexOnly=!0,e.value=U,e}return _createClass(r,[{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{value:this.value})}}]),r}(V(M));je.NAME="StringValueBlock";var He=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r)}(je);He.NAME="SimpleStringValueBlock";var Ve=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign({},(_objectDestructuringEmpty(e),e));return _classCallCheck(this,r),t.call(this,n,He)}return _createClass(r,[{key:"fromBuffer",value:function(e){this.valueBlock.value=String.fromCharCode.apply(null,s.toUint8Array(e))}},{key:"fromString",value:function(e){for(var t=e.length,r=this.valueBlock.valueHexView=new Uint8Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=12,e}return _createClass(r)}(Me);De=Fe,G.Utf8String=De,Fe.NAME="UTF8String";var Je,Ge=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"fromBuffer",value:function(e){this.valueBlock.value=h.ToUtf16String(e),this.valueBlock.valueHexView=s.toUint8Array(e)}},{key:"fromString",value:function(e){this.valueBlock.value=e,this.valueBlock.valueHexView=new Uint8Array(h.FromUtf16String(e))}}]),r}(Ve);Ge.NAME="BmpStringValueBlock";var ze=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=Object.assign({},(_objectDestructuringEmpty(n),n));return _classCallCheck(this,r),(e=t.call(this,i)).idBlock.tagClass=1,e.idBlock.tagNumber=30,e}return _createClass(r)}(Ge);Je=ze,G.BmpString=Je,ze.NAME="BMPString";var qe,We=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"fromBuffer",value:function(e){for(var t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0),r=new Uint8Array(t),n=0;n4))for(var o=4-a.length,u=a.length-1;u>=0;u--)r[4*n+u+o]=a[u]}this.valueBlock.value=e}}]),r}(Ve);We.NAME="UniversalStringValueBlock";var Xe,Ze=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=Object.assign({},(_objectDestructuringEmpty(n),n));return _classCallCheck(this,r),(e=t.call(this,i)).idBlock.tagClass=1,e.idBlock.tagNumber=28,e}return _createClass(r)}(We);qe=Ze,G.UniversalString=qe,Ze.NAME="UniversalString";var $e,Ye=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=18,e}return _createClass(r)}(Ve);Xe=Ye,G.NumericString=Xe,Ye.NAME="NumericString";var Qe,et=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=19,e}return _createClass(r)}(Ve);$e=et,G.PrintableString=$e,et.NAME="PrintableString";var tt,rt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=20,e}return _createClass(r)}(Ve);Qe=rt,G.TeletexString=Qe,rt.NAME="TeletexString";var nt,it=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=21,e}return _createClass(r)}(Ve);tt=it,G.VideotexString=tt,it.NAME="VideotexString";var at,ot=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=22,e}return _createClass(r)}(Ve);nt=ot,G.IA5String=nt,ot.NAME="IA5String";var ut,st=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=25,e}return _createClass(r)}(Ve);at=st,G.GraphicString=at,st.NAME="GraphicString";var ct,lt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=26,e}return _createClass(r)}(Ve);ut=lt,G.VisibleString=ut,lt.NAME="VisibleString";var ht,ft=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=27,e}return _createClass(r)}(Ve);ct=ft,G.GeneralString=ct,ft.NAME="GeneralString";var pt,vt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=29,e}return _createClass(r)}(Ve);ht=vt,G.CharacterString=ht,vt.NAME="CharacterString";var yt,gt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=n.valueDate,o=_objectWithoutProperties(n,_excluded15);if(_classCallCheck(this,r),(e=t.call(this,o)).year=0,e.month=0,e.day=0,e.hour=0,e.minute=0,e.second=0,i){e.fromString(i),e.valueBlock.valueHexView=new Uint8Array(i.length);for(var u=0;u=50?1900+r:2e3+r,this.month=parseInt(t[2],10),this.day=parseInt(t[3],10),this.hour=parseInt(t[4],10),this.minute=parseInt(t[5],10),this.second=parseInt(t[6],10)}else this.error="Wrong input string for conversion"}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"iso";if("iso"===e){var t=new Array(7);return t[0]=d(this.year<2e3?this.year-1900:this.year-2e3,2),t[1]=d(this.month,2),t[2]=d(this.day,2),t[3]=d(this.hour,2),t[4]=d(this.minute,2),t[5]=d(this.second,2),t[6]="Z",t.join("")}return _get(_getPrototypeOf(r.prototype),"toString",this).call(this,e)}},{key:"onAsciiEncoding",value:function(){return"".concat(this.constructor.NAME," : ").concat(this.toDate().toISOString())}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second})}}]),r}(lt);pt=gt,G.UTCTime=pt,gt.NAME="UTCTime";var dt,mt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),null!==(n=(e=t.call(this,i)).millisecond)&&void 0!==n||(e.millisecond=0),e.idBlock.tagClass=1,e.idBlock.tagNumber=24,e}return _createClass(r,[{key:"fromDate",value:function(e){_get(_getPrototypeOf(r.prototype),"fromDate",this).call(this,e),this.millisecond=e.getUTCMilliseconds()}},{key:"toDate",value:function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}},{key:"fromString",value:function(e){var t,r=!1,n="",i="",a=0,o=0,u=0;if("Z"===e[e.length-1])n=e.substring(0,e.length-1),r=!0;else{var s=new Number(e[e.length-1]);if(isNaN(s.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(r){if(-1!==n.indexOf("+"))throw new Error("Wrong input string for conversion");if(-1!==n.indexOf("-"))throw new Error("Wrong input string for conversion")}else{var c=1,l=n.indexOf("+"),h="";if(-1===l&&(l=n.indexOf("-"),c=-1),-1!==l){if(h=n.substring(l+1),n=n.substring(0,l),2!==h.length&&4!==h.length)throw new Error("Wrong input string for conversion");var f=parseInt(h.substring(0,2),10);if(isNaN(f.valueOf()))throw new Error("Wrong input string for conversion");if(o=c*f,4===h.length){if(f=parseInt(h.substring(2,4),10),isNaN(f.valueOf()))throw new Error("Wrong input string for conversion");u=c*f}}}var p=n.indexOf(".");if(-1===p&&(p=n.indexOf(",")),-1!==p){var v=new Number("0".concat(n.substring(p)));if(isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");a=v.valueOf(),i=n.substring(0,p)}else i=n;switch(!0){case 8===i.length:if(t=/(\d{4})(\d{2})(\d{2})/gi,-1!==p)throw new Error("Wrong input string for conversion");break;case 10===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})/gi,-1!==p){var y=60*a;this.minute=Math.floor(y),y=60*(y-this.minute),this.second=Math.floor(y),y=1e3*(y-this.second),this.millisecond=Math.floor(y)}break;case 12===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==p){var g=60*a;this.second=Math.floor(g),g=1e3*(g-this.second),this.millisecond=Math.floor(g)}break;case 14===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==p){var d=1e3*a;this.millisecond=Math.floor(d)}break;default:throw new Error("Wrong input string for conversion")}var m=t.exec(i);if(null===m)throw new Error("Wrong input string for conversion");for(var k=1;k0&&void 0!==arguments[0]?arguments[0]:"iso";if("iso"===e){var t=[];return t.push(d(this.year,4)),t.push(d(this.month,2)),t.push(d(this.day,2)),t.push(d(this.hour,2)),t.push(d(this.minute,2)),t.push(d(this.second,2)),0!==this.millisecond&&(t.push("."),t.push(d(this.millisecond,3))),t.push("Z"),t.join("")}return _get(_getPrototypeOf(r.prototype),"toString",this).call(this,e)}},{key:"toJSON",value:function(){return _objectSpread(_objectSpread({},_get(_getPrototypeOf(r.prototype),"toJSON",this).call(this)),{},{millisecond:this.millisecond})}}]),r}(gt);yt=mt,G.GeneralizedTime=yt,mt.NAME="GeneralizedTime";var kt,wt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=31,e}return _createClass(r)}(Fe);dt=wt,G.DATE=dt,wt.NAME="DATE";var bt,_t=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=32,e}return _createClass(r)}(Fe);kt=_t,G.TimeOfDay=kt,_t.NAME="TimeOfDay";var Ct,St=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=33,e}return _createClass(r)}(Fe);bt=St,G.DateTime=bt,St.NAME="DateTime";var At,xt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=34,e}return _createClass(r)}(Fe);Ct=xt,G.Duration=Ct,xt.NAME="Duration";var Bt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).idBlock.tagClass=1,e.idBlock.tagNumber=14,e}return _createClass(r)}(Fe);At=Bt,G.TIME=At,Bt.NAME="TIME";var Et=_createClass((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,n=void 0===r?U:r,i=t.optional,a=void 0!==i&&i;_classCallCheck(this,e),this.name=n,this.optional=a})),Rt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=void 0===i?[]:i,o=_objectWithoutProperties(n,_excluded16);return _classCallCheck(this,r),(e=t.call(this,o)).value=a,e}return _createClass(r)}(Et),Kt=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,a=void 0===i?new Et:i,o=n.local,u=void 0!==o&&o,s=_objectWithoutProperties(n,_excluded17);return _classCallCheck(this,r),(e=t.call(this,s)).value=a,e.local=u,e}return _createClass(r)}(Et),Ot=function(){function e(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).data,r=void 0===t?L:t;_classCallCheck(this,e),this.dataView=s.toUint8Array(r)}return _createClass(e,[{key:"data",get:function(){return this.dataView.slice().buffer},set:function(e){this.dataView=s.toUint8Array(e)}},{key:"fromBER",value:function(e,t,r){var n=t+r;return this.dataView=s.toUint8Array(e).subarray(t,n),n}},{key:"toBER",value:function(e){return this.dataView.slice().buffer}}]),e}();function Nt(e,t,r){if(r instanceof Rt){for(var n=0;n0&&r.valueBlock.value[0]instanceof Kt&&(h=t.valueBlock.value.length),0===h)return{verified:!0,result:e};if(0===t.valueBlock.value.length&&0!==r.valueBlock.value.length){for(var f=!0,p=0;p=t.valueBlock.value.length){if(!1===r.valueBlock.value[v].optional){var y={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,U),r.name&&(delete e[r.name],y.name=r.name)),y}}else if(r.valueBlock.value[0]instanceof Kt){if(!1===(l=Nt(e,t.valueBlock.value[v],r.valueBlock.value[0].value)).verified){if(!r.valueBlock.value[0].optional)return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,U),r.name&&delete e[r.name]),l;c++}if(S in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){var g={};void 0===(g=P in r.valueBlock.value[0]&&r.valueBlock.value[0].local?t:e)[r.valueBlock.value[0].name]&&(g[r.valueBlock.value[0].name]=[]),g[r.valueBlock.value[0].name].push(t.valueBlock.value[v])}}else if(!1===(l=Nt(e,t.valueBlock.value[v-c],r.valueBlock.value[v])).verified){if(!r.valueBlock.value[v].optional)return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,U),r.name&&delete e[r.name]),l;c++}if(!1===l.verified){var d={verified:!1,result:e};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,U),r.name&&(delete e[r.name],d.name=r.name)),d}return{verified:!0,result:e}}if(r.primitiveSchema&&A in t.valueBlock){var m=Y(t.valueBlock.valueHexView);if(-1===m.offset){var k={verified:!1,result:m.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,U),r.name&&(delete e[r.name],k.name=r.name)),k}return Nt(e,m.result,r.primitiveSchema)}return{verified:!0,result:e}}var Pt,Ut,It=Object.freeze({__proto__:null,Any:Et,BaseBlock:z,BaseStringBlock:W,BitString:de,BmpString:ze,Boolean:le,CharacterString:vt,Choice:Rt,Constructed:re,DATE:wt,DateTime:St,Duration:xt,EndOfContent:oe,Enumerated:Ae,GeneralString:ft,GeneralizedTime:mt,GraphicString:st,HexBlock:V,IA5String:ot,Integer:Se,Null:ue,NumericString:Ye,ObjectIdentifier:Re,OctetString:pe,Primitive:$,PrintableString:et,RawData:Ot,RelativeObjectIdentifier:Ue,Repeated:Kt,Sequence:Le,Set:Te,TIME:Bt,TeletexString:rt,TimeOfDay:_t,UTCTime:gt,UniversalString:Ze,Utf8String:Fe,ValueBlock:M,VideotexString:it,ViewWriter:b,VisibleString:lt,compareSchema:Nt,fromBER:Q,verifySchema:function(e,t){if(t instanceof Object==!1)return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};var r=Y(s.toUint8Array(e));return-1===r.offset?{verified:!1,result:r.result}:Nt(r.result,r.result,t)}});!function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"}(Pt||(Pt={})),function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"}(Ut||(Ut={}));var Lt=function(){function e(t){_classCallCheck(this,e),"number"==typeof t?this.buffer=new ArrayBuffer(t):s.isBufferSource(t)?this.buffer=s.toArrayBuffer(t):Array.isArray(t)?this.buffer=new Uint8Array(t):this.buffer=new ArrayBuffer(0)}return _createClass(e,[{key:"byteLength",get:function(){return this.buffer.byteLength}},{key:"byteOffset",get:function(){return 0}},{key:"fromASN",value:function(e){if(!(e instanceof pe))throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");return this.buffer=e.valueBlock.valueHex,this}},{key:"toASN",value:function(){return new pe({valueHex:this.buffer})}},{key:"toSchema",value:function(e){return new pe({name:e})}}]),e}(),Tt={fromASN:function(e){return e instanceof ue?null:e.valueBeforeDecodeView},toASN:function(e){if(null===e)return new ue;var t=Q(e);if(t.result.error)throw new Error(t.result.error);return t.result}},jt={fromASN:function(e){return e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec},toASN:function(e){return new Se({value:+e})}},Ht={fromASN:function(e){return e.valueBlock.valueDec},toASN:function(e){return new Ae({value:e})}},Vt={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new de({valueHex:e})}},Dt={fromASN:function(e){return e.valueBlock.toString()},toASN:function(e){return new Re({value:e})}},Mt={fromASN:function(e){return e.valueBlock.value},toASN:function(e){return new le({value:e})}},Ft={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new pe({valueHex:e})}};function Jt(e){return{fromASN:function(e){return e.valueBlock.value},toASN:function(t){return new e({value:t})}}}var Gt=Jt(Fe),zt=Jt(ze),qt=Jt(Ze),Wt=Jt(Ye),Xt=Jt(et),Zt=Jt(rt),$t=Jt(it),Yt=Jt(ot),Qt=Jt(st),er=Jt(lt),tr=Jt(ft),rr=Jt(vt),nr={fromASN:function(e){return e.toDate()},toASN:function(e){return new gt({valueDate:e})}},ir={fromASN:function(e){return e.toDate()},toASN:function(e){return new mt({valueDate:e})}},ar={fromASN:function(){return null},toASN:function(){return new ue}};function or(e){switch(e){case Ut.Any:return Tt;case Ut.BitString:return Vt;case Ut.BmpString:return zt;case Ut.Boolean:return Mt;case Ut.CharacterString:return rr;case Ut.Enumerated:return Ht;case Ut.GeneralString:return tr;case Ut.GeneralizedTime:return ir;case Ut.GraphicString:return Qt;case Ut.IA5String:return Yt;case Ut.Integer:return jt;case Ut.Null:return ar;case Ut.NumericString:return Wt;case Ut.ObjectIdentifier:return Dt;case Ut.OctetString:return Ft;case Ut.PrintableString:return Xt;case Ut.TeletexString:return Zt;case Ut.UTCTime:return nr;case Ut.UniversalString:return qt;case Ut.Utf8String:return Gt;case Ut.VideotexString:return $t;case Ut.VisibleString:return er;default:return null}}function ur(e){return"function"==typeof e&&e.prototype?!(!e.prototype.toASN||!e.prototype.fromASN)||ur(e.prototype):!!(e&&"object"===_typeof(e)&&"toASN"in e&&"fromASN"in e)}function sr(e){var t;if(e){var r=Object.getPrototypeOf(e);return(null===(t=null==r?void 0:r.prototype)||void 0===t?void 0:t.constructor)===Array||sr(r)}return!1}function cr(e,t){if(!e||!t)return!1;if(e.byteLength!==t.byteLength)return!1;for(var r=new Uint8Array(e),n=new Uint8Array(t),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=this.items.get(e);if(!r)throw new Error("Cannot get schema for '".concat(e.prototype.constructor.name,"' target"));if(t&&!r.schema)throw new Error("Schema '".concat(e.prototype.constructor.name,"' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'."));return r}},{key:"cache",value:function(e){var t=this.get(e);t.schema||(t.schema=this.create(e,!0))}},{key:"createDefault",value:function(e){var t={type:Pt.Sequence,items:{}},r=this.findParentSchema(e);return r&&(Object.assign(t,r),t.items=Object.assign({},t.items,r.items)),t}},{key:"create",value:function(e,t){var r=this.items.get(e)||this.createDefault(e),n=[];for(var i in r.items){var a=r.items[i],o=t?i:"",u=void 0;if("number"==typeof a.type){var s=Ut[a.type],c=It[s];if(!c)throw new Error("Cannot get ASN1 class by name '".concat(s,"'"));u=new c({name:o})}else if(ur(a.type)){u=(new a.type).toSchema(o)}else if(a.optional){this.get(a.type).type===Pt.Choice?u=new Et({name:o}):(u=this.create(a.type,!1)).name=o}else u=new Et({name:o});var l=!!a.optional||void 0!==a.defaultValue;if(a.repeated)u.name="",u=new("set"===a.repeated?Te:Le)({name:"",value:[new Kt({name:o,value:u})]});if(null!==a.context&&void 0!==a.context)if(a.implicit)if("number"==typeof a.type||ur(a.type)){var h=a.repeated?re:$;n.push(new h({name:o,optional:l,idBlock:{tagClass:3,tagNumber:a.context}}))}else{this.cache(a.type);var f=!!a.repeated,p=f?u:this.get(a.type,!0).schema;p="valueBlock"in p?p.valueBlock.value:p.value,n.push(new re({name:f?"":o,optional:l,idBlock:{tagClass:3,tagNumber:a.context},value:p}))}else n.push(new re({optional:l,idBlock:{tagClass:3,tagNumber:a.context},value:[u]}));else u.optional=l,n.push(u)}switch(r.type){case Pt.Sequence:return new Le({value:n,name:""});case Pt.Set:return new Te({value:n,name:""});case Pt.Choice:return new Rt({value:n,name:""});default:throw new Error("Unsupported ASN1 type in use")}}},{key:"set",value:function(e,t){return this.items.set(e,t),this}},{key:"findParentSchema",value:function(e){var t=Object.getPrototypeOf(e);return t?this.items.get(t)||this.findParentSchema(t):null}}]),e}(),hr=new lr,fr=function(e){return function(t){var r;hr.has(t)?r=hr.get(t):(r=hr.createDefault(t),hr.set(t,r)),Object.assign(r,e)}},pr=function(e){return function(t,r){var n;hr.has(t.constructor)?n=hr.get(t.constructor):(n=hr.createDefault(t.constructor),hr.set(t.constructor,n));var i=Object.assign({},e);if("number"==typeof i.type&&!i.converter){var a=or(e.type);if(!a)throw new Error("Cannot get default converter for property '".concat(r,"' of ").concat(t.constructor.name));i.converter=a}n.items[r]=i}},vr=function(e){_inherits(r,_wrapNativeSuper(Error));var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).schemas=[],e}return _createClass(r)}(),yr=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"parse",value:function(e,t){var r=Q(e);if(r.result.error)throw new Error(r.result.error);return this.fromASN(r.result,t)}},{key:"fromASN",value:function(e,t){var r,n=this;try{if(ur(t))return(new t).fromASN(e);var i=hr.get(t);hr.cache(t);var a=i.schema;if(e.constructor===re&&i.type!==Pt.Choice)for(var o in a=new re({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:i.schema.valueBlock.value}),i.items)delete e[o];var u=Nt({},e,a);if(!u.verified)throw new vr("Data does not match to ".concat(t.name," ASN1 schema. ").concat(u.result.error));var s=new t;if(sr(t)){if(!("value"in e.valueBlock)||!Array.isArray(e.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");var c=i.itemType;if("number"==typeof c){var l=or(c);if(!l)throw new Error("Cannot get default converter for array item of ".concat(t.name," ASN1 schema"));return t.from(e.valueBlock.value,(function(e){return l.fromASN(e)}))}return t.from(e.valueBlock.value,(function(e){return n.fromASN(e,c)}))}var h=function(){var e=u.result[f];if(!e)return"continue";var t=i.items[f],a=t.type;if("number"==typeof a||ur(a)){var o=null!==(r=t.converter)&&void 0!==r?r:ur(a)?new a:null;if(!o)throw new Error("Converter is empty");if(t.repeated)if(t.implicit){var c=new("sequence"===t.repeated?Le:Te);c.valueBlock=e.valueBlock;var l=Q(c.toBER(!1));if(-1===l.offset)throw new Error("Cannot parse the child item. ".concat(l.result.error));if(!("value"in l.result.valueBlock)||!Array.isArray(l.result.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");var h=l.result.valueBlock.value;s[f]=Array.from(h,(function(e){return o.fromASN(e)}))}else s[f]=Array.from(e,(function(e){return o.fromASN(e)}));else{var p=e;if(t.implicit){var v;if(ur(a))v=(new a).toSchema("");else{var y=Ut[a],g=It[y];if(!g)throw new Error("Cannot get '".concat(y,"' class from asn1js module"));v=new g}v.valueBlock=p.valueBlock,p=Q(v.toBER(!1)).result}s[f]=o.fromASN(p)}}else if(t.repeated){if(!Array.isArray(e))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");s[f]=Array.from(e,(function(e){return n.fromASN(e,a)}))}else s[f]=n.fromASN(e,a)};for(var f in i.items)h();return s}catch(e){throw e instanceof vr&&e.schemas.push(t.name),e}}}]),e}(),gr=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"serialize",value:function(e){return e instanceof z?e.toBER(!1):this.toASN(e).toBER(!1)}},{key:"toASN",value:function(t){var r=this;if(t&&"object"===_typeof(t)&&ur(t))return t.toASN();if(!t||"object"!==_typeof(t))throw new TypeError("Parameter 1 should be type of Object.");var n=t.constructor,i=hr.get(n);hr.cache(n);var a,o=[];if(i.itemType){if(!Array.isArray(t))throw new TypeError("Parameter 1 should be type of Array.");if("number"==typeof i.itemType){var u=or(i.itemType);if(!u)throw new Error("Cannot get default converter for array item of ".concat(n.name," ASN1 schema"));o=t.map((function(e){return u.toASN(e)}))}else o=t.map((function(e){return r.toAsnItem({type:i.itemType},"[]",n,e)}))}else for(var s in i.items){var c=i.items[s],l=t[s];if(!(void 0===l||c.defaultValue===l||"object"===_typeof(c.defaultValue)&&"object"===_typeof(l)&&cr(this.serialize(c.defaultValue),this.serialize(l)))){var h=e.toAsnItem(c,s,n,l);if("number"==typeof c.context)if(c.implicit)if(c.repeated||"number"!=typeof c.type&&!ur(c.type))o.push(new re({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:h.valueBlock.value}));else{var f={};f.valueHex=h instanceof ue?h.valueBeforeDecodeView:h.valueBlock.toBER(),o.push(new $(_objectSpread({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context}},f)))}else o.push(new re({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:[h]}));else c.repeated?o=o.concat(h):o.push(h)}}switch(i.type){case Pt.Sequence:a=new Le({value:o});break;case Pt.Set:a=new Te({value:o});break;case Pt.Choice:if(!o[0])throw new Error("Schema '".concat(n.name,"' has wrong data. Choice cannot be empty."));a=o[0]}return a}},{key:"toAsnItem",value:function(e,t,r,n){var i,a=this;if("number"==typeof e.type){var o=e.converter;if(!o)throw new Error("Property '".concat(t,"' doesn't have converter for type ").concat(Ut[e.type]," in schema '").concat(r.name,"'"));if(e.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");var u=Array.from(n,(function(e){return o.toASN(e)}));i=new("sequence"===e.repeated?Le:Te)({value:u})}else i=o.toASN(n)}else if(e.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");var s=Array.from(n,(function(e){return a.toASN(e)}));i=new("sequence"===e.repeated?Le:Te)({value:s})}else i=this.toASN(n);return i}}]),e}(),dr=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"serialize",value:function(e){return gr.serialize(e)}},{key:"parse",value:function(e,t){return yr.parse(e,t)}},{key:"toString",value:function(t){var r=Q(s.isBufferSource(t)?s.toArrayBuffer(t):e.serialize(t));if(-1===r.offset)throw new Error("Cannot decode ASN.1 data. ".concat(r.result.error));return r.result.toString()}}]),e}();function mr(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_typeof(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o}function kr(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,u)}s((n=n.apply(e,t||[])).next())}))}var wr,br=function(e){_inherits(r,_wrapNativeSuper(Error));var t=_createSuper(r);function r(e,n){var i;return _classCallCheck(this,r),(i=t.call(this,n?"".concat(e,". See the inner exception for more details."):e)).message=e,i.innerError=n,i}return _createClass(r)}(),_r=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){return _classCallCheck(this,r),t.call(this,e,"JSON doesn't match to '".concat(e.target.name,"' schema. ").concat(n),i)}return _createClass(r)}(function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck(this,r),(a=t.call(this,n,i)).schema=e,a}return _createClass(r)}(br)),Cr=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r)}(br),Sr=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck(this,r),(a=t.call(this,"Cannot serialize by '".concat(e,"' schema. ").concat(n),i)).schemaName=e,a}return _createClass(r)}(br),Ar=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return _classCallCheck(this,r),(i=t.call(this,e,"Some keys doesn't match to schema")).keys=n,i.errors=a,i}return _createClass(r)}(_r);function xr(e,t){if(!function(e,t){switch(t){case wr.Boolean:return"boolean"==typeof e;case wr.Number:return"number"==typeof e;case wr.String:return"string"==typeof e}return!0}(e,t))throw new TypeError("Value must be ".concat(wr[t]))}function Br(e){return e&&e.prototype?!(!e.prototype.toJSON||!e.prototype.fromJSON)||Br(e.prototype):!!(e&&e.toJSON&&e.fromJSON)}!function(e){e[e.Any=0]="Any",e[e.Boolean=1]="Boolean",e[e.Number=2]="Number",e[e.String=3]="String"}(wr||(wr={}));var Er=function(){function e(){_classCallCheck(this,e),this.items=new Map}return _createClass(e,[{key:"has",value:function(e){return this.items.has(e)||!!this.findParentSchema(e)}},{key:"get",value:function(e){var t=this.items.get(e)||this.findParentSchema(e);if(!t)throw new Error("Cannot get schema for current target");return t}},{key:"create",value:function(e){var t={names:{}},r=this.findParentSchema(e);if(r)for(var n in Object.assign(t,r),t.names={},r.names)t.names[n]=Object.assign({},r.names[n]);return t.target=e,t}},{key:"set",value:function(e,t){return this.items.set(e,t),this}},{key:"findParentSchema",value:function(e){var t=e.__proto__;return t?this.items.get(t)||this.findParentSchema(t):null}}]),e}(),Rr="default",Kr=new Er,Or=function(){function e(t){_classCallCheck(this,e),this.pattern=new RegExp(t)}return _createClass(e,[{key:"validate",value:function(e){var t=new RegExp(this.pattern.source,this.pattern.flags);if("string"!=typeof e)throw new Cr("Incoming value must be string");if(!t.exec(e))throw new Cr("Value doesn't match to pattern '".concat(t.toString(),"'"))}}]),e}(),Nr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.MIN_VALUE,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;_classCallCheck(this,e),this.min=t,this.max=r}return _createClass(e,[{key:"validate",value:function(e){if(xr(e,wr.Number),!(this.min<=e&&e<=this.max)){var t=this.min===Number.MIN_VALUE?"MIN":this.min,r=this.max===Number.MAX_VALUE?"MAX":this.max;throw new Cr("Value doesn't match to diapason [".concat(t,",").concat(r,"]"))}}}]),e}(),Pr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.MIN_VALUE,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;_classCallCheck(this,e),this.min=t,this.max=r}return _createClass(e,[{key:"validate",value:function(e){if(xr(e,wr.Number),!(this.minthis.maxLength)throw new Cr("Value length must be less than ".concat(this.maxLength,"."))}else if(e.length!==this.length)throw new Cr("Value length must be exactly ".concat(this.length,"."))}}]),e}(),Ir=function(){function e(t){_classCallCheck(this,e),this.enumeration=t}return _createClass(e,[{key:"validate",value:function(e){if(xr(e,wr.String),!this.enumeration.includes(e))throw new Cr("Value must be one of ".concat(this.enumeration.map((function(e){return"'".concat(e,"'")})).join(", ")))}}]),e}(),Lr=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"checkValues",value:function(e,t){var r,n=_createForOfIteratorHelper(Array.isArray(e)?e:[e]);try{for(n.s();!(r=n.n()).done;){var i,a=r.value,o=_createForOfIteratorHelper(t.validations);try{for(o.s();!(i=o.n()).done;){var u=i.value;u instanceof Ur&&t.repeated?u.validate(e):u.validate(a)}}catch(e){o.e(e)}finally{o.f()}}}catch(e){n.e(e)}finally{n.f()}}},{key:"checkTypes",value:function(e,t){if(t.repeated&&!Array.isArray(e))throw new TypeError("Value must be Array");if("number"==typeof t.type){var r,n=_createForOfIteratorHelper(Array.isArray(e)?e:[e]);try{for(n.s();!(r=n.n()).done;){xr(r.value,t.type)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"getSchemaByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rr;return _objectSpread(_objectSpread({},e.names[Rr]),e.names[t])}}]),e}(),Tr=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,null,[{key:"serialize",value:function(e,t,r,n){var i=this.toJSON(e,t);return JSON.stringify(i,r,n)}},{key:"toJSON",value:function(e){var t,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.targetSchema,a=n.schemaName||Rr;if(Br(e))return e.toJSON();if(Array.isArray(e)){t=[];var o,u=_createForOfIteratorHelper(e);try{for(u.s();!(o=u.n()).done;){var s=o.value;t.push(this.toJSON(s,n))}}catch(e){u.e(e)}finally{u.f()}}else if("object"===_typeof(e)){if(i&&!Kr.has(i))throw new br("Cannot get schema for `targetSchema` param");if(i=i||e.constructor,Kr.has(i)){var c=Kr.get(i);t={};var l=this.getSchemaByName(c,a),h=function(){try{var n,o=l[f],u=e[f];if(o.optional&&void 0===u||void 0!==o.defaultValue&&u===o.defaultValue)return"continue";if(!o.optional&&void 0===u)throw new Sr(i.name,"Property '".concat(f,"' is required."));n="number"==typeof o.type?o.converter?o.repeated?u.map((function(t){return o.converter.toJSON(t,e)})):o.converter.toJSON(u,e):u:o.repeated?u.map((function(e){return r.toJSON(e,{schemaName:a})})):r.toJSON(u,{schemaName:a}),r.checkTypes(n,o),r.checkValues(n,o),t[o.name||f]=n}catch(e){throw e instanceof Sr?e:new Sr(c.target.name,"Property '".concat(f,"' is wrong. ").concat(e.message),e)}};for(var f in l)h()}else for(var p in t={},e)t[p]=this.toJSON(e[p],{schemaName:a})}else t=e;return t}}]),r}(Lr),jr=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,null,[{key:"parse",value:function(e,t){var r=JSON.parse(e);return this.fromJSON(r,t)}},{key:"fromJSON",value:function(e,t){var n=this,i=t.targetSchema,a=t.schemaName||Rr,o=new i;if(Br(o))return o.fromJSON(e);var u=Kr.get(i),s=this.getSchemaByName(u,a),c={};t.strictProperty&&!Array.isArray(e)&&r.checkStrictProperty(e,s,u);var l=function(){try{var r=s[h],i=r.name||h,l=e[i];if(void 0===l&&(r.optional||void 0!==r.defaultValue))return"continue";if(!r.optional&&void 0===l)throw new _r(u,"Property '".concat(i,"' is required."));if(n.checkTypes(l,r),n.checkValues(l,r),"number"==typeof r.type)r.converter?r.repeated?o[h]=l.map((function(e){return r.converter.fromJSON(e,o)})):o[h]=r.converter.fromJSON(l,o):o[h]=l;else{var f=_objectSpread(_objectSpread({},t),{},{targetSchema:r.type,schemaName:a});r.repeated?o[h]=l.map((function(e){return n.fromJSON(e,f)})):o[h]=n.fromJSON(l,f)}}catch(e){if(e instanceof _r||(e=new _r(u,"Property '".concat(h,"' is wrong. ").concat(e.message),e)),!t.strictAllKeys)throw e;c[h]=e}};for(var h in s)l();var f=Object.keys(c);if(f.length)throw new Ar(u,f,c);return o}},{key:"checkStrictProperty",value:function(e,t,r){for(var n=Object.keys(e),i=Object.keys(t),a=[],o=0,u=n;o0&&void 0!==arguments[0]?arguments[0]:{};return function(t,r){var n,i="Cannot set type for ".concat(r," property of ").concat(t.constructor.name," schema");Kr.has(t.constructor)?(n=Kr.get(t.constructor)).target!==t.constructor&&(n=Kr.create(t.constructor),Kr.set(t.constructor,n)):(n=Kr.create(t.constructor),Kr.set(t.constructor,n));var a,o,u={type:wr.Any,validations:[]},s=Object.assign(u,e);if(s.validations=(o=[],(a=s).pattern&&o.push(new Or(a.pattern)),a.type!==wr.Number&&a.type!==wr.Any||(void 0===a.minInclusive&&void 0===a.maxInclusive||o.push(new Nr(a.minInclusive,a.maxInclusive)),void 0===a.minExclusive&&void 0===a.maxExclusive||o.push(new Pr(a.minExclusive,a.maxExclusive)),void 0!==a.enumeration&&o.push(new Ir(a.enumeration))),(a.type===wr.String||a.repeated||a.type===wr.Any)&&(void 0===a.length&&void 0===a.minLength&&void 0===a.maxLength||o.push(new Ur(a.length,a.minLength,a.maxLength))),o),"number"!=typeof s.type&&!Kr.has(s.type)&&!Br(s.type))throw new Error("".concat(i,". Assigning type doesn't have schema."));var c,l=_createForOfIteratorHelper(Array.isArray(e.schema)?e.schema:[e.schema||Rr]);try{for(l.s();!(c=l.n()).done;){var h=c.value;n.names[h]||(n.names[h]={}),n.names[h][r]=s}}catch(e){l.e(e)}finally{l.f()}}},Vr=function(e){_inherits(r,_wrapNativeSuper(Error));var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r)}(),Dr=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r)}(Vr),Mr=function(e){_inherits(r,e);var t=_createSuper(r);function r(e){return _classCallCheck(this,r),t.call(this,"Unsupported operation: ".concat(e?"".concat(e):""))}return _createClass(r)}(Vr),Fr=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r)}(Vr),Jr=function(e){_inherits(r,e);var t=_createSuper(r);function r(e){return _classCallCheck(this,r),t.call(this,"".concat(e,": Missing required property"))}return _createClass(r)}(Vr);function Gr(e){return"object"===_typeof(e)&&"kty"in e}var zr=function(){function e(){_classCallCheck(this,e)}var t,r,n,i,a,o,u,c,l,h,f,p,v,y,g,d,m,k;return _createClass(e,[{key:"digest",value:(k=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,r=new Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{};this.checkAlgorithmName(e),this.checkAlgorithmParams(e),this.checkCryptoKey(t,n.keyUsage?"encrypt":void 0)}},{key:"onEncrypt",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r,n){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Mr("encrypt");case 1:case"end":return e.stop()}}),e)}))),function(e,t,r){return l.apply(this,arguments)})},{key:"decrypt",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,r=new Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{};this.checkAlgorithmName(e),this.checkAlgorithmParams(e),this.checkCryptoKey(t,n.keyUsage?"decrypt":void 0)}},{key:"onDecrypt",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r,n){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Mr("decrypt");case 1:case"end":return e.stop()}}),e)}))),function(e,t,r){return u.apply(this,arguments)})},{key:"deriveBits",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,r=new Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{};if(this.checkAlgorithmName(e),this.checkAlgorithmParams(e),this.checkCryptoKey(t,n.keyUsage?"deriveBits":void 0),r%8!=0)throw new Fr("length: Is not multiple of 8")}},{key:"onDeriveBits",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r,n){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Mr("deriveBits");case 1:case"end":return e.stop()}}),e)}))),function(e,t,r){return a.apply(this,arguments)})},{key:"exportKey",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,r=new Array(t),n=0;n16384)throw new TypeError("The modulus length must be a multiple of 8 bits and >= 256 and <= 16384")}},{key:"checkImportParams",value:function(e){this.checkRequiredProperty(e,"hash"),this.checkHashAlgorithm(e.hash,this.hashAlgorithms)}}]),r}(zr),tn=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="RSASSA-PKCS1-v1_5",e.usages={privateKey:["sign"],publicKey:["verify"]},e}return _createClass(r)}(en),rn=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="RSA-PSS",e.usages={privateKey:["sign"],publicKey:["verify"]},e}return _createClass(r,[{key:"checkAlgorithmParams",value:function(e){if(this.checkRequiredProperty(e,"saltLength"),"number"!=typeof e.saltLength)throw new TypeError("saltLength: Is not a Number");if(e.saltLength<0)throw new RangeError("saltLength: Must be positive number")}}]),r}(en),nn=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="RSA-OAEP",e.usages={privateKey:["decrypt","unwrapKey"],publicKey:["encrypt","wrapKey"]},e}return _createClass(r,[{key:"checkAlgorithmParams",value:function(e){if(e.label&&!(e.label instanceof ArrayBuffer||ArrayBuffer.isView(e.label)))throw new TypeError("label: Is not of type '(ArrayBuffer or ArrayBufferView)'")}}]),r}(en),an=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"checkGenerateKeyParams",value:function(e){this.checkRequiredProperty(e,"namedCurve"),this.checkNamedCurve(e.namedCurve)}},{key:"checkNamedCurve",value:function(e){var t,r=_createForOfIteratorHelper(this.namedCurves);try{for(r.s();!(t=r.n()).done;){if(t.value.toLowerCase()===e.toLowerCase())return}}catch(e){r.e(e)}finally{r.f()}throw new Fr("namedCurve: Must be one of ".concat(this.namedCurves.join(", ")))}}]),r}(zr),on=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="ECDSA",e.hashAlgorithms=["SHA-1","SHA-256","SHA-384","SHA-512"],e.usages={privateKey:["sign"],publicKey:["verify"]},e.namedCurves=["P-256","P-384","P-521","K-256"],e}return _createClass(r,[{key:"checkAlgorithmParams",value:function(e){this.checkRequiredProperty(e,"hash"),this.checkHashAlgorithm(e.hash,this.hashAlgorithms)}}]),r}(an),un=["secret","private","public"],sn=function(e){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:Symbol.toStringTag,get:function(){return"CryptoKey"}}],[{key:"create",value:function(e,t,r,n){var i=new this;return i.algorithm=e,i.type=t,i.extractable=r,i.usages=n,i}},{key:"isKeyType",value:function(e){return-1!==un.indexOf(e)}}]),t}(),cn=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="ECDH",e.usages={privateKey:["deriveBits","deriveKey"],publicKey:[]},e.namedCurves=["P-256","P-384","P-521","K-256"],e}return _createClass(r,[{key:"checkAlgorithmParams",value:function(e){if(this.checkRequiredProperty(e,"public"),!(e.public instanceof sn))throw new TypeError("public: Is not a CryptoKey");if("public"!==e.public.type)throw new Fr("public: Is not a public key");if(e.public.algorithm.name!==this.name)throw new Fr("public: Is not ".concat(this.name," key"))}}]),r}(an),ln=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="ECDH-ES",e.namedCurves=["X25519","X448"],e}return _createClass(r)}(cn),hn=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="EdDSA",e.usages={privateKey:["sign"],publicKey:["verify"]},e.namedCurves=["Ed25519","Ed448"],e}return _createClass(r)}(an),fn=_createClass((function e(t){_classCallCheck(this,e),t&&(this.value=t)}));mr([pr({type:Ut.ObjectIdentifier})],fn.prototype,"value",void 0),fn=mr([fr({type:Pt.Choice})],fn);var pn=_createClass((function e(t){_classCallCheck(this,e),Object.assign(this,t)}));mr([pr({type:Ut.ObjectIdentifier})],pn.prototype,"algorithm",void 0),mr([pr({type:Ut.Any,optional:!0})],pn.prototype,"parameters",void 0);var vn=_createClass((function e(){_classCallCheck(this,e),this.version=0,this.privateKeyAlgorithm=new pn,this.privateKey=new ArrayBuffer(0)}));mr([pr({type:Ut.Integer})],vn.prototype,"version",void 0),mr([pr({type:pn})],vn.prototype,"privateKeyAlgorithm",void 0),mr([pr({type:Ut.OctetString})],vn.prototype,"privateKey",void 0),mr([pr({type:Ut.Any,optional:!0})],vn.prototype,"attributes",void 0);var yn=_createClass((function e(){_classCallCheck(this,e),this.publicKeyAlgorithm=new pn,this.publicKey=new ArrayBuffer(0)}));mr([pr({type:pn})],yn.prototype,"publicKeyAlgorithm",void 0),mr([pr({type:Ut.BitString})],yn.prototype,"publicKey",void 0);var gn={fromJSON:function(e){return h.FromBase64Url(e)},toJSON:function(e){return h.ToBase64Url(new Uint8Array(e))}},dn={fromASN:function(e){var t=e.valueBlock.valueHex;return new Uint8Array(t)[0]?e.valueBlock.valueHex:e.valueBlock.valueHex.slice(1)},toASN:function(e){var t=new Uint8Array(e)[0]>127?f(new Uint8Array([0]).buffer,e):e;return new Se({valueHex:t})}},mn=_createClass((function e(){_classCallCheck(this,e),this.version=0,this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),this.privateExponent=new ArrayBuffer(0),this.prime1=new ArrayBuffer(0),this.prime2=new ArrayBuffer(0),this.exponent1=new ArrayBuffer(0),this.exponent2=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0)}));mr([pr({type:Ut.Integer,converter:jt})],mn.prototype,"version",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"n",converter:gn})],mn.prototype,"modulus",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"e",converter:gn})],mn.prototype,"publicExponent",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"d",converter:gn})],mn.prototype,"privateExponent",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"p",converter:gn})],mn.prototype,"prime1",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"q",converter:gn})],mn.prototype,"prime2",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"dp",converter:gn})],mn.prototype,"exponent1",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"dq",converter:gn})],mn.prototype,"exponent2",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"qi",converter:gn})],mn.prototype,"coefficient",void 0),mr([pr({type:Ut.Any,optional:!0})],mn.prototype,"otherPrimeInfos",void 0);var kn=_createClass((function e(){_classCallCheck(this,e),this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0)}));mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"n",converter:gn})],kn.prototype,"modulus",void 0),mr([pr({type:Ut.Integer,converter:dn}),Hr({name:"e",converter:gn})],kn.prototype,"publicExponent",void 0);var wn=function(){function e(t){_classCallCheck(this,e),this.value=new ArrayBuffer(0),t&&(this.value=t)}return _createClass(e,[{key:"toJSON",value:function(){var e=new Uint8Array(this.value);if(4!==e[0])throw new Vr("Wrong ECPoint. Current version supports only Uncompressed (0x04) point");var t=(e=new Uint8Array(this.value.slice(1))).length/2;return{x:h.ToBase64Url(e.buffer.slice(0,0+t)),y:h.ToBase64Url(e.buffer.slice(0+t,0+t+t))}}},{key:"fromJSON",value:function(e){if(!("x"in e))throw new Error("x: Missing required property");if(!("y"in e))throw new Error("y: Missing required property");var t=h.FromBase64Url(e.x),r=h.FromBase64Url(e.y),n=f(new Uint8Array([4]).buffer,t,r);return this.value=new Uint8Array(n).buffer,this}}]),e}();mr([pr({type:Ut.OctetString})],wn.prototype,"value",void 0),wn=mr([fr({type:Pt.Choice})],wn);var bn=function(){function e(){_classCallCheck(this,e),this.version=1,this.privateKey=new ArrayBuffer(0)}return _createClass(e,[{key:"fromJSON",value:function(e){if(!("d"in e))throw new Error("d: Missing required property");if(this.privateKey=h.FromBase64Url(e.d),"x"in e){var t=new wn;t.fromJSON(e);var r=gr.toASN(t);"valueHex"in r.valueBlock&&(this.publicKey=r.valueBlock.valueHex)}return this}},{key:"toJSON",value:function(){var e={};return e.d=h.ToBase64Url(this.privateKey),this.publicKey&&Object.assign(e,new wn(this.publicKey).toJSON()),e}}]),e}();mr([pr({type:Ut.Integer,converter:jt})],bn.prototype,"version",void 0),mr([pr({type:Ut.OctetString})],bn.prototype,"privateKey",void 0),mr([pr({context:0,type:Ut.Any,optional:!0})],bn.prototype,"parameters",void 0),mr([pr({context:1,type:Ut.BitString,optional:!0})],bn.prototype,"publicKey",void 0);var _n={fromASN:function(e){var t=new Uint8Array(e.valueBlock.valueHex);return 0===t[0]?t.buffer.slice(1):t.buffer},toASN:function(e){var t=new Uint8Array(e);if(t[0]>127){var r=new Uint8Array(t.length+1);return r.set(t,1),new Se({valueHex:r.buffer})}return new Se({valueHex:e})}},Cn=Object.freeze({__proto__:null,AsnIntegerWithoutPaddingConverter:_n}),Sn=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"decodePoint",value:function(e,t){var r=s.toUint8Array(e);if(0===r.length||4!==r[0])throw new Error("Only uncompressed point format supported");var n=(r.length-1)/2;if(n!==Math.ceil(t/8))throw new Error("Point does not match field size");return{x:r.slice(1,n+1),y:r.slice(n+1,n+1+n)}}},{key:"encodePoint",value:function(e,t){var r=Math.ceil(t/8);if(e.x.byteLength!==r||e.y.byteLength!==r)throw new Error("X,Y coordinates don't match point size criteria");var n=s.toUint8Array(e.x),i=s.toUint8Array(e.y),a=new Uint8Array(2*r+1);return a[0]=4,a.set(n,1),a.set(i,r+1),a}},{key:"getSize",value:function(e){return Math.ceil(e/8)}},{key:"encodeSignature",value:function(e,t){var r=this.getSize(t),n=s.toUint8Array(e.r),i=s.toUint8Array(e.s),a=new Uint8Array(2*r);return a.set(this.padStart(n,r)),a.set(this.padStart(i,r),r),a}},{key:"decodeSignature",value:function(e,t){var r=this.getSize(t),n=s.toUint8Array(e);if(n.length!==2*r)throw new Error("Incorrect size of the signature");var i=n.slice(0,r),a=n.slice(r);return{r:this.trimStart(i),s:this.trimStart(a)}}},{key:"trimStart",value:function(e){for(var t=0;t4?a-4:0),u=4;u7?p-7:0),y=7;y2){var r=new Zn.RsaPrivateKey;r.privateExponent=e[2].buffer,r.prime1=e[3].buffer,r.prime2=e[4].buffer,r.exponent1=e[5].buffer,r.exponent2=e[6].buffer,r.coefficient=e[7].buffer,t=r}else t=new Zn.RsaPublicKey;return t.modulus=e[0].buffer,t.publicExponent=1===e[1][1]?e[1].buffer.slice(1):e[1].buffer.slice(3),t}},{key:"importAsmKey",value:function(e){var t=new Uint8Array(4-e.publicExponent.byteLength),r=[new Uint8Array(e.modulus),si(t,new Uint8Array(e.publicExponent))];return e instanceof Zn.RsaPrivateKey&&(r.push(new Uint8Array(e.privateExponent)),r.push(new Uint8Array(e.prime1)),r.push(new Uint8Array(e.prime2)),r.push(new Uint8Array(e.exponent1)),r.push(new Uint8Array(e.exponent2)),r.push(new Uint8Array(e.coefficient))),r}}]),t}();ki.RsaSsa="RSASSA-PKCS1-v1_5",ki.RsaPss="RSA-PSS",ki.RsaOaep="RSA-OAEP",ki.privateUsages=["sign","decrypt","unwrapKey"],ki.publicUsages=["verify","encrypt","wrapKey"];var wi=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"getDigest",value:function(e){switch(e){case"SHA-1":return new a.Sha1;case"SHA-256":return new a.Sha256;case"SHA-512":return new a.Sha512;default:throw new Dr("keyAlgorithm.hash: Is not recognized")}}},{key:"digest",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){var n,i;return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.getDigest(e.name),i=n.process(s.toUint8Array(t)).finish().result,r.abrupt("return",s.toArrayBuffer(i));case 3:case"end":return r.stop()}}),r,this)})))}}]),e}(),bi=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"onGenerateKey",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",ki.generateKey(e,t,r));case 1:case"end":return n.stop()}}),n)})))}},{key:"onExportKey",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",ki.exportKey(e,t));case 1:case"end":return r.stop()}}),r)})))}},{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function a(){return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",ki.importKey(e,t,r,n,i));case 1:case"end":return a.stop()}}),a)})))}},{key:"onEncrypt",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this.cipher(e,t,r));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"onDecrypt",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this.cipher(e,t,r));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"checkCryptoKey",value:function(e,t){_get(_getPrototypeOf(r.prototype),"checkCryptoKey",this).call(this,e,t),ki.checkCryptoKey(e)}},{key:"cipher",value:function(e,t,r){var n,i=wi.getDigest(t.algorithm.hash.name);e.label&&(n=s.toUint8Array(e.label));var o,u=new a.RSA_OAEP(t.data,i,n),c=s.toUint8Array(r);return o="public"===t.type?u.encrypt(c):u.decrypt(c),s.toArrayBuffer(o)}}]),r}(nn),_i=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"onGenerateKey",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",ki.generateKey(e,t,r));case 1:case"end":return n.stop()}}),n)})))}},{key:"onExportKey",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",ki.exportKey(e,t));case 1:case"end":return r.stop()}}),r)})))}},{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function a(){return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",ki.importKey(e,t,r,n,i));case 1:case"end":return a.stop()}}),a)})))}},{key:"onSign",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){var i,o;return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=new a.RSA_PSS(t.data,wi.getDigest(t.algorithm.hash.name),e.saltLength),o=i.sign(s.toUint8Array(r)),n.abrupt("return",s.toArrayBuffer(o));case 3:case"end":return n.stop()}}),n)})))}},{key:"onVerify",value:function(e,t,r,n){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function i(){var o;return _regeneratorRuntime().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=new a.RSA_PSS(t.data,wi.getDigest(t.algorithm.hash.name),e.saltLength),i.prev=1,o.verify(s.toUint8Array(r),s.toUint8Array(n)),i.next=8;break;case 5:return i.prev=5,i.t0=i.catch(1),i.abrupt("return",!1);case 8:return i.abrupt("return",!0);case 9:case"end":return i.stop()}}),i,null,[[1,5]])})))}},{key:"checkCryptoKey",value:function(e,t){_get(_getPrototypeOf(r.prototype),"checkCryptoKey",this).call(this,e,t),ki.checkCryptoKey(e)}}]),r}(rn),Ci=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"onGenerateKey",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",ki.generateKey(e,t,r));case 1:case"end":return n.stop()}}),n)})))}},{key:"onExportKey",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",ki.exportKey(e,t));case 1:case"end":return r.stop()}}),r)})))}},{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function a(){return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",ki.importKey(e,t,r,n,i));case 1:case"end":return a.stop()}}),a)})))}},{key:"onSign",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){var n,i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new a.RSA_PKCS1_v1_5(t.data,wi.getDigest(t.algorithm.hash.name)),i=n.sign(s.toUint8Array(r)),e.abrupt("return",s.toArrayBuffer(i));case 3:case"end":return e.stop()}}),e)})))}},{key:"onVerify",value:function(e,t,r,n){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){var i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=new a.RSA_PKCS1_v1_5(t.data,wi.getDigest(t.algorithm.hash.name)),e.prev=1,i.verify(s.toUint8Array(r),s.toUint8Array(n)),e.next=8;break;case 5:return e.prev=5,e.t0=e.catch(1),e.abrupt("return",!1);case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e,null,[[1,5]])})))}},{key:"checkCryptoKey",value:function(e,t){_get(_getPrototypeOf(r.prototype),"checkCryptoKey",this).call(this,e,t),ki.checkCryptoKey(e)}}]),r}(tn),Si=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="RSAES-PKCS1-v1_5",e.usages={publicKey:["encrypt","wrapKey"],privateKey:["decrypt","unwrapKey"]},e.hashAlgorithms=["SHA-1","SHA-256","SHA-384","SHA-512"],e}return _createClass(r,[{key:"onGenerateKey",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",ki.generateKey(e,t,r));case 1:case"end":return n.stop()}}),n)})))}},{key:"checkGenerateKeyParams",value:function(e){if(this.checkRequiredProperty(e,"publicExponent"),!(e.publicExponent&&e.publicExponent instanceof Uint8Array))throw new TypeError("publicExponent: Missing or not a Uint8Array");var t=h.ToBase64(e.publicExponent);if("Aw=="!==t&&"AQAB"!==t)throw new TypeError("publicExponent: Must be [3] or [1,0,1]");switch(this.checkRequiredProperty(e,"modulusLength"),e.modulusLength){case 1024:case 2048:case 4096:break;default:throw new TypeError("modulusLength: Must be 1024, 2048, or 4096")}}},{key:"onDecrypt",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){var n,i,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new a.RSA(t.data).decrypt(new a.BigNumber(s.toUint8Array(r))).result,i=t.algorithm.modulusLength>>3,r.byteLength===i){e.next=4;break}throw new Vr("Decryption error. Encrypted message size doesn't match to key length");case 4:if(o=0,!n[o++]&&2===n[o++]){e.next=7;break}throw new Vr("Decryption error");case 7:if(0!==n[o++]){e.next=9;break}return e.abrupt("break",10);case 9:if(o>3,!(r.byteLength>n-11)){e.next=3;break}throw new Vr("Message too long");case 3:return i=n-r.byteLength-3,o=ki.randomNonZeroValues(new Uint8Array(i)),(u=new Uint8Array(n))[0]=0,u[1]=2,u.set(o,2),u[2+i]=0,u.set(new Uint8Array(r),3+i),c=new a.RSA(t.data).encrypt(new a.BigNumber(u)).result,e.abrupt("return",s.toArrayBuffer(c));case 13:case"end":return e.stop()}}),e)})))}},{key:"onExportKey",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",ki.exportKey(e,t));case 1:case"end":return r.stop()}}),r)})))}},{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function a(){var o;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,ki.importKey(e,t,Object.assign(Object.assign({},r),{name:this.name}),n,i);case 2:return o=a.sent,a.abrupt("return",o);case 4:case"end":return a.stop()}}),a,this)})))}},{key:"checkCryptoKey",value:function(e,t){_get(_getPrototypeOf(r.prototype),"checkCryptoKey",this).call(this,e,t),ki.checkCryptoKey(e)}},{key:"prepareSignData",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){var n;return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=new Ro,r.abrupt("return",n.subtle.digest(e.hash,t));case 2:case"end":return r.stop()}}),r)})))}}]),r}(zr),Ai={"1.2.840.10045.3.1.7":"P-256","P-256":"1.2.840.10045.3.1.7","1.3.132.0.34":"P-384","P-384":"1.3.132.0.34","1.3.132.0.35":"P-521","P-521":"1.3.132.0.35","1.3.132.0.10":"K-256","K-256":"1.3.132.0.10","1.3.36.3.3.2.8.1.1.7":"brainpoolP256r1",brainpoolP256r1:"1.3.36.3.3.2.8.1.1.7","1.3.36.3.3.2.8.1.1.11":"brainpoolP384r1",brainpoolP384r1:"1.3.36.3.3.2.8.1.1.11","1.3.36.3.3.2.8.1.1.13":"brainpoolP512r1",brainpoolP512r1:"1.3.36.3.3.2.8.1.1.13"};function xi(e){var t=Ai[e];if(!t)throw new Fr("Cannot convert WebCrypto named curve '".concat(e,"' to OID"));return t}var Bi=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i,a,o){var u;return _classCallCheck(this,r),(u=t.call(this,e,n,i,a)).data=o,u}return _createClass(r)}(ci),Ei=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"checkLib",value:function(){if(void 0===o)throw new Fr("Cannot implement EC mechanism. Add 'https://peculiarventures.github.io/pv-webcrypto-tests/src/elliptic.js' script to your project")}},{key:"generateKey",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){var i,a,o,u,s=this;return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.checkLib(),i=this.initEcKey(e.namedCurve),(a=i.genKeyPair()).getPublic(),o=new Bi(Object.assign({},e),t,"private",r.filter((function(e){return~s.privateUsages.indexOf(e)})),a),u=new Bi(Object.assign({},e),!0,"public",r.filter((function(e){return~s.publicUsages.indexOf(e)})),a),n.abrupt("return",{privateKey:o,publicKey:u});case 7:case"end":return n.stop()}}),n,this)})))}},{key:"checkCryptoKey",value:function(e){if(!(e instanceof Bi))throw new TypeError("key: Is not EcCryptoKey")}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r-1)r=t.replace("-","").toLowerCase();else if("K-256"===t)r="secp256k1";else{if(!["brainpoolP256r1","brainpoolP384r1","brainpoolP512r1"].includes(e))throw new Fr("Unsupported named curve '".concat(e,"'"));r=e}return r}},{key:"initEcKey",value:function(e){return o.ec(this.getNamedCurve(e))}},{key:"exportPkcs8Key",value:function(e){var t=new Zn.PrivateKeyInfo;return t.privateKeyAlgorithm.algorithm=this.ASN_ALGORITHM,t.privateKeyAlgorithm.parameters=dr.serialize(new Zn.ObjectIdentifier(xi(e.algorithm.namedCurve))),t.privateKey=dr.serialize(this.exportEcKey(e)),dr.serialize(t)}},{key:"importPkcs8Key",value:function(e,t){var r=dr.parse(e,Zn.PrivateKeyInfo),n=dr.parse(r.privateKey,Zn.EcPrivateKey);return this.importEcKey(n,t)}},{key:"importSpkiKey",value:function(e,t){var r=dr.parse(e,Zn.PublicKeyInfo),n=new Zn.EcPublicKey(r.publicKey);return this.importEcKey(n,t)}},{key:"exportSpkiKey",value:function(e){var t=new Zn.EcPublicKey(new Uint8Array(e.data.getPublic("der")).buffer),r=new Zn.PublicKeyInfo;return r.publicKeyAlgorithm.algorithm=this.ASN_ALGORITHM,r.publicKeyAlgorithm.parameters=dr.serialize(new Zn.ObjectIdentifier(xi(e.algorithm.namedCurve))),r.publicKey=t.value,dr.serialize(r)}},{key:"importJwkKey",value:function(e){var t;return t=e.d?jr.fromJSON(e,{targetSchema:Zn.EcPrivateKey}):jr.fromJSON(e,{targetSchema:Zn.EcPublicKey}),this.importEcKey(t,e.crv)}},{key:"exportJwkKey",value:function(e){var t=this.exportEcKey(e),r=Tr.toJSON(t);return r.ext=!0,r.key_ops=e.usages,r.crv=e.algorithm.namedCurve,r.kty="EC",r}},{key:"exportEcKey",value:function(e){if("private"===e.type){var t=new Zn.EcPrivateKey,r=new Uint8Array(e.data.getPrivate("der").toArray()),n=new Uint8Array(this.getPointSize(e.algorithm.namedCurve)-r.length);return t.privateKey=si(n,r),t.publicKey=new Uint8Array(e.data.getPublic("der")),t}if(e.data.pub)return new Zn.EcPublicKey(new Uint8Array(e.data.getPublic("der")).buffer);throw new Error("Cannot get private or public key")}},{key:"importEcKey",value:function(e,t){var r=this.initEcKey(t);return e instanceof Zn.EcPublicKey?r.keyFromPublic(new Uint8Array(e.value)):r.keyFromPrivate(new Uint8Array(e.privateKey))}},{key:"getPointSize",value:function(e){switch(e){case"P-256":case"K-256":return 32;case"P-384":return 48;case"P-521":return 66}throw new Error("namedCurve: Is not recognized")}}]),e}();Ei.privateUsages=["sign","deriveKey","deriveBits"],Ei.publicUsages=["verify"],Ei.ASN_ALGORITHM="1.2.840.10045.2.1";var Ri=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).namedCurves=["P-256","P-384","P-521","K-256","brainpoolP256r1","brainpoolP384r1","brainpoolP512r1"],e}return _createClass(r,[{key:"onGenerateKey",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Ei.generateKey(e,t,r));case 1:case"end":return n.stop()}}),n)})))}},{key:"onExportKey",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Ei.exportKey(e,t));case 1:case"end":return r.stop()}}),r)})))}},{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function a(){return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",Ei.importKey(e,t,r,n,i));case 1:case"end":return a.stop()}}),a)})))}},{key:"onDeriveBits",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){var i,a,o,u;return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return Ei.checkLib(),i=t.data.derive(e.public.data.getPublic()),a=new Uint8Array(i.toArray()),o=(o=a.length)>32?o>48?66:48:32,a.length32?v>48?66:48:32,p.length>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(Gi),Object.defineProperty(Ji,"__esModule",{value:!0});var zi=Gi;function qi(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function Wi(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function Xi(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Zi(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function $i(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Yi(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Qi(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function ea(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function ta(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),Qi(e/4294967296>>>0,t,r),Qi(e>>>0,t,r+4),t}function ra(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),ea(e>>>0,t,r),ea(e/4294967296>>>0,t,r+4),t}Ji.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Ji.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Ji.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Ji.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Ji.writeUint16BE=qi,Ji.writeInt16BE=qi,Ji.writeUint16LE=Wi,Ji.writeInt16LE=Wi,Ji.readInt32BE=Xi,Ji.readUint32BE=Zi,Ji.readInt32LE=$i,Ji.readUint32LE=Yi,Ji.writeUint32BE=Qi,Ji.writeInt32BE=Qi,Ji.writeUint32LE=ea,Ji.writeInt32LE=ea,Ji.readInt64BE=function(e,t){void 0===t&&(t=0);var r=Xi(e,t),n=Xi(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},Ji.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*Zi(e,t)+Zi(e,t+4)},Ji.readInt64LE=function(e,t){void 0===t&&(t=0);var r=$i(e,t);return 4294967296*$i(e,t+4)+r-4294967296*(r>>31)},Ji.readUint64LE=function(e,t){void 0===t&&(t=0);var r=Yi(e,t);return 4294967296*Yi(e,t+4)+r},Ji.writeUint64BE=ta,Ji.writeInt64BE=ta,Ji.writeUint64LE=ra,Ji.writeInt64LE=ra,Ji.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,a=e/8+r-1;a>=r;a--)n+=t[a]*i,i*=256;return n},Ji.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,a=r;a=n;a--)r[a]=t/i&255,i*=256;return r},Ji.writeUintLE=function(e,t,r,n){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===n&&(n=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!zi.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,a=n;a128)throw new Error("SHA3: incorrect capacity");this.blockSize=200-e}return e.prototype.reset=function(){return ua.wipe(this._sh),ua.wipe(this._sl),ua.wipe(this._state),this._pos=0,this._finished=!1,this},e.prototype.update=function(e){if(this._finished)throw new Error("SHA3: can't update because hash was finished");for(var t=0;t=this.blockSize&&(Aa(this._sh,this._sl,this._state),this._pos=0);return this},e.prototype._padAndPermute=function(e){this._state[this._pos]^=e,this._state[this.blockSize-1]^=128,Aa(this._sh,this._sl,this._state),this._finished=!0,this._pos=0},e.prototype._squeeze=function(e){if(!this._finished)throw new Error("SHA3: squeezing before padAndPermute");for(var t=0;t>>31),v=(f=t[4]^t[9]^t[14]^t[19]^t[24])^(c<<1|i>>>31),e[0]^=p,e[5]^=p,e[10]^=p,e[15]^=p,e[20]^=p,t[0]^=v,t[5]^=v,t[10]^=v,t[15]^=v,t[20]^=v,p=n^(a<<1|l>>>31),v=s^(l<<1|a>>>31),e[1]^=p,e[6]^=p,e[11]^=p,e[16]^=p,e[21]^=p,t[1]^=v,t[6]^=v,t[11]^=v,t[16]^=v,t[21]^=v,p=i^(o<<1|h>>>31),v=c^(h<<1|o>>>31),e[2]^=p,e[7]^=p,e[12]^=p,e[17]^=p,e[22]^=p,t[2]^=v,t[7]^=v,t[12]^=v,t[17]^=v,t[22]^=v,p=a^(u<<1|f>>>31),v=l^(f<<1|u>>>31),e[3]^=p,t[3]^=v,e[8]^=p,t[8]^=v,e[13]^=p,t[13]^=v,e[18]^=p,t[18]^=v,e[23]^=p,t[23]^=v,p=o^(n<<1|s>>>31),v=h^(s<<1|n>>>31),e[4]^=p,e[9]^=p,e[14]^=p,e[19]^=p,e[24]^=p,t[4]^=v,t[9]^=v,t[14]^=v,t[19]^=v,t[24]^=v,p=e[1],v=t[1],n=e[10],s=t[10],e[10]=p<<1|v>>>31,t[10]=v<<1|p>>>31,p=n,v=s,n=e[7],s=t[7],e[7]=p<<3|v>>>29,t[7]=v<<3|p>>>29,p=n,v=s,n=e[11],s=t[11],e[11]=p<<6|v>>>26,t[11]=v<<6|p>>>26,p=n,v=s,n=e[17],s=t[17],e[17]=p<<10|v>>>22,t[17]=v<<10|p>>>22,p=n,v=s,n=e[18],s=t[18],e[18]=p<<15|v>>>17,t[18]=v<<15|p>>>17,p=n,v=s,n=e[3],s=t[3],e[3]=p<<21|v>>>11,t[3]=v<<21|p>>>11,p=n,v=s,n=e[5],s=t[5],e[5]=p<<28|v>>>4,t[5]=v<<28|p>>>4,p=n,v=s,n=e[16],s=t[16],e[16]=v<<4|p>>>28,t[16]=p<<4|v>>>28,p=n,v=s,n=e[8],s=t[8],e[8]=v<<13|p>>>19,t[8]=p<<13|v>>>19,p=n,v=s,n=e[21],s=t[21],e[21]=v<<23|p>>>9,t[21]=p<<23|v>>>9,p=n,v=s,n=e[24],s=t[24],e[24]=p<<2|v>>>30,t[24]=v<<2|p>>>30,p=n,v=s,n=e[4],s=t[4],e[4]=p<<14|v>>>18,t[4]=v<<14|p>>>18,p=n,v=s,n=e[15],s=t[15],e[15]=p<<27|v>>>5,t[15]=v<<27|p>>>5,p=n,v=s,n=e[23],s=t[23],e[23]=v<<9|p>>>23,t[23]=p<<9|v>>>23,p=n,v=s,n=e[19],s=t[19],e[19]=v<<24|p>>>8,t[19]=p<<24|v>>>8,p=n,v=s,n=e[13],s=t[13],e[13]=p<<8|v>>>24,t[13]=v<<8|p>>>24,p=n,v=s,n=e[12],s=t[12],e[12]=p<<25|v>>>7,t[12]=v<<25|p>>>7,p=n,v=s,n=e[2],s=t[2],e[2]=v<<11|p>>>21,t[2]=p<<11|v>>>21,p=n,v=s,n=e[20],s=t[20],e[20]=v<<30|p>>>2,t[20]=p<<30|v>>>2,p=n,v=s,n=e[14],s=t[14],e[14]=p<<18|v>>>14,t[14]=v<<18|p>>>14,p=n,v=s,n=e[22],s=t[22],e[22]=v<<7|p>>>25,t[22]=p<<7|v>>>25,p=n,v=s,n=e[9],s=t[9],e[9]=v<<29|p>>>3,t[9]=p<<29|v>>>3,p=n,v=s,n=e[6],s=t[6],e[6]=p<<20|v>>>12,t[6]=v<<20|p>>>12,p=n,v=s,n=e[1],s=t[1],e[1]=v<<12|p>>>20,t[1]=p<<12|v>>>20,p=n,v=s,n=e[0],i=e[1],a=e[2],o=e[3],u=e[4],e[0]^=~i&a,e[1]^=~a&o,e[2]^=~o&u,e[3]^=~u&n,e[4]^=~n&i,s=t[0],c=t[1],l=t[2],h=t[3],f=t[4],t[0]^=~c&l,t[1]^=~l&h,t[2]^=~h&f,t[3]^=~f&s,t[4]^=~s&c,n=e[5],i=e[6],a=e[7],o=e[8],u=e[9],e[5]^=~i&a,e[6]^=~a&o,e[7]^=~o&u,e[8]^=~u&n,e[9]^=~n&i,s=t[5],c=t[6],l=t[7],h=t[8],f=t[9],t[5]^=~c&l,t[6]^=~l&h,t[7]^=~h&f,t[8]^=~f&s,t[9]^=~s&c,n=e[10],i=e[11],a=e[12],o=e[13],u=e[14],e[10]^=~i&a,e[11]^=~a&o,e[12]^=~o&u,e[13]^=~u&n,e[14]^=~n&i,s=t[10],c=t[11],l=t[12],h=t[13],f=t[14],t[10]^=~c&l,t[11]^=~l&h,t[12]^=~h&f,t[13]^=~f&s,t[14]^=~s&c,n=e[15],i=e[16],a=e[17],o=e[18],u=e[19],e[15]^=~i&a,e[16]^=~a&o,e[17]^=~o&u,e[18]^=~u&n,e[19]^=~n&i,s=t[15],c=t[16],l=t[17],h=t[18],f=t[19],t[15]^=~c&l,t[16]^=~l&h,t[17]^=~h&f,t[18]^=~f&s,t[19]^=~s&c,n=e[20],i=e[21],a=e[22],o=e[23],u=e[24],e[20]^=~i&a,e[21]^=~a&o,e[22]^=~o&u,e[23]^=~u&n,e[24]^=~n&i,s=t[20],c=t[21],l=t[22],h=t[23],f=t[24],t[20]^=~c&l,t[21]^=~l&h,t[22]^=~h&f,t[23]^=~f&s,t[24]^=~s&c,e[0]^=Ca[g],t[0]^=Sa[g];for(y=0;y<25;y++)oa.writeUint32LE(t[y],r,8*y),oa.writeUint32LE(e[y],r,8*y+4)}var xa=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="SHA3-256",e.usages=[],e}return _createClass(r,[{key:"onDigest",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ya(new Uint8Array(t)).buffer);case 1:case"end":return e.stop()}}),e)})))}}]),r}(zr),Ba=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="SHA3-384",e.usages=[],e}return _createClass(r,[{key:"onDigest",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ga(new Uint8Array(t)).buffer);case 1:case"end":return e.stop()}}),e)})))}}]),r}(zr),Ea=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;return _classCallCheck(this,r),(e=t.apply(this,arguments)).name="SHA3-512",e.usages=[],e}return _createClass(r,[{key:"onDigest",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",da(new Uint8Array(t)).buffer);case 1:case"end":return e.stop()}}),e)})))}}]),r}(zr),Ra=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"onDigest",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){var n;return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=new Uint8Array(e.length),(new wa).update(new Uint8Array(t)).stream(n),r.abrupt("return",n.buffer);case 3:case"end":return r.stop()}}),r)})))}}]),r}(ri),Ka=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"onDigest",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){var n;return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=new Uint8Array(e.length),(new _a).update(new Uint8Array(t)).stream(n),r.abrupt("return",n.buffer);case 3:case"end":return r.stop()}}),r)})))}}]),r}(ni),Oa=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i,a){var o;return _classCallCheck(this,r),(o=t.call(this,e,n,"secret",i)).raw=a,o}return _createClass(r)}(ci),Na=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Oa(r,n,i,s.toUint8Array(t)));case 1:case"end":return e.stop()}}),e)})))}},{key:"onDeriveBits",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function n(){var i,o,u;return _regeneratorRuntime().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=s.toUint8Array(e.salt),u=t.raw,n.t0=e.hash.name.toUpperCase(),n.next="SHA-1"===n.t0?5:"SHA-256"===n.t0?7:"SHA-512"===n.t0?9:11;break;case 5:return i=a.Pbkdf2HmacSha1(u,o,e.iterations,r>>3),n.abrupt("break",12);case 7:return i=a.Pbkdf2HmacSha256(u,o,e.iterations,r>>3),n.abrupt("break",12);case 9:return i=a.Pbkdf2HmacSha512(u,o,e.iterations,r>>3),n.abrupt("break",12);case 11:throw new Fr("algorithm.hash: '".concat(e.hash.name,"' hash algorithm is not supported"));case 12:return n.abrupt("return",s.toArrayBuffer(i));case 13:case"end":return n.stop()}}),n)})))}},{key:"checkCryptoKey",value:function(e,t){if(_get(_getPrototypeOf(r.prototype),"checkCryptoKey",this).call(this,e,t),!(e instanceof Oa))throw new TypeError("key: Is not PbkdfCryptoKey")}}]),r}(ei),Pa={},Ua={readUInt32BE:function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},writeUInt32BE:function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},ip:function(e,t,r,n){for(var i=0,a=0,o=6;o>=0;o-=2){for(var u=0;u<=24;u+=8)i<<=1,i|=t>>>u+o&1;for(u=0;u<=24;u+=8)i<<=1,i|=e>>>u+o&1}for(o=6;o>=0;o-=2){for(u=1;u<=25;u+=8)a<<=1,a|=t>>>u+o&1;for(u=1;u<=25;u+=8)a<<=1,a|=e>>>u+o&1}r[n+0]=i>>>0,r[n+1]=a>>>0},rip:function(e,t,r,n){for(var i=0,a=0,o=0;o<4;o++)for(var u=24;u>=0;u-=8)i<<=1,i|=t>>>u+o&1,i<<=1,i|=e>>>u+o&1;for(o=4;o<8;o++)for(u=24;u>=0;u-=8)a<<=1,a|=t>>>u+o&1,a<<=1,a|=e>>>u+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},pc1:function(e,t,r,n){for(var i=0,a=0,o=7;o>=5;o--){for(var u=0;u<=24;u+=8)i<<=1,i|=t>>u+o&1;for(u=0;u<=24;u+=8)i<<=1,i|=e>>u+o&1}for(u=0;u<=24;u+=8)i<<=1,i|=t>>u+o&1;for(o=1;o<=3;o++){for(u=0;u<=24;u+=8)a<<=1,a|=t>>u+o&1;for(u=0;u<=24;u+=8)a<<=1,a|=e>>u+o&1}for(u=0;u<=24;u+=8)a<<=1,a|=e>>u+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},r28shl:function(e,t){return e<>>28-t}},Ia=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Ua.pc2=function(e,t,r,n){for(var i=0,a=0,o=Ia.length>>>1,u=0;u>>Ia[u]&1;for(u=o;u>>Ia[u]&1;r[n+0]=i>>>0,r[n+1]=a>>>0},Ua.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var La=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Ua.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=La[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=La[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var Ta=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Ua.permute=function(e){for(var t=0,r=0;r>>Ta[r]&1;return t>>>0},Ua.padSplit=function(e,t,r){for(var n=e.toString(2);n.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},Da.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},Da.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=Wa.r28shl(r,a),n=Wa.r28shl(n,a),Wa.pc2(r,n,e.keys,i)}},$a.prototype._update=function(e,t,r,n){var i=this._desState,a=Wa.readUInt32BE(e,t),o=Wa.readUInt32BE(e,t+4);Wa.ip(a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,o,i.tmp,0):this._decrypt(i,a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],Wa.writeUInt32BE(r,a,n),Wa.writeUInt32BE(r,o,n+4)},$a.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=h}Wa.rip(o,a,n,i)},$a.prototype._decrypt=function(e,t,r,n,i){for(var a=r,o=t,u=e.keys.length-2;u>=0;u-=2){var s=e.keys[u],c=e.keys[u+1];Wa.expand(a,e.tmp,0),s^=e.tmp[0],c^=e.tmp[1];var l=Wa.substitute(s,c),h=a;a=(o^Wa.permute(l))>>>0,o=h}Wa.rip(a,o,n,i)};var eo={},to=ja,ro=Ja,no={};function io(e){to.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{name:"HMAC"},i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Uint8Array(0);return _classCallCheck(this,r),(e=t.call(this,n,i,"secret",a)).kty="oct",e.data=o,e}return _createClass(r,[{key:"alg",get:function(){var e=this.algorithm.hash.name.toUpperCase();return"HS".concat(e.replace("SHA-",""))},set:function(e){}}]),r}(ci);mr([Hr({name:"ext",type:wr.Boolean,optional:!0})],So.prototype,"extractable",void 0),mr([Hr({name:"key_ops",type:wr.String,repeated:!0,optional:!0})],So.prototype,"usages",void 0),mr([Hr({name:"k",converter:Co})],So.prototype,"data",void 0),mr([Hr({type:wr.String})],So.prototype,"kty",void 0),mr([Hr({type:wr.String})],So.prototype,"alg",null);var Ao,xo=function(t){_inherits(n,t);var r=_createSuper(n);function n(){return _classCallCheck(this,n),r.apply(this,arguments)}return _createClass(n,[{key:"onGenerateKey",value:function(t,r,n){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function i(){var a,o,u;return _regeneratorRuntime().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return a=t.length||this.getDefaultLength(t.hash.name),o=e.nativeCrypto.getRandomValues(new Uint8Array(a>>3)),u=new So(t,r,n,o),i.abrupt("return",u);case 4:case"end":return i.stop()}}),i,this)})))}},{key:"onSign",value:function(e,t,r){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function e(){var n,i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.algorithm.hash.name.toUpperCase(),e.next="SHA-1"===e.t0?3:"SHA-256"===e.t0?5:"SHA-512"===e.t0?7:9;break;case 3:return n=a.HmacSha1,e.abrupt("break",10);case 5:return n=a.HmacSha256,e.abrupt("break",10);case 7:return n=a.HmacSha512,e.abrupt("break",10);case 9:throw new Fr("key.algorithm.hash: Is not recognized");case 10:return i=new n(t.data).process(s.toUint8Array(r)).finish().result,e.abrupt("return",s.toArrayBuffer(i));case 12:case"end":return e.stop()}}),e)})))}},{key:"onVerify",value:function(e,t,r,n){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function i(){var a;return _regeneratorRuntime().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.onSign(e,t,n);case 2:return a=i.sent,i.abrupt("return",h.ToHex(a)===h.ToHex(r));case 4:case"end":return i.stop()}}),i,this)})))}},{key:"onImportKey",value:function(e,t,r,n,i){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function a(){var o;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:a.t0=e.toLowerCase(),a.next="jwk"===a.t0?3:"raw"===a.t0?5:9;break;case 3:return o=jr.fromJSON(t,{targetSchema:So}),a.abrupt("break",10);case 5:if(s.isBufferSource(t)){a.next=7;break}throw new TypeError("keyData: Is not ArrayBuffer or ArrayBufferView");case 7:return o=new So(r,n,i,s.toUint8Array(t)),a.abrupt("break",10);case 9:throw new Fr("format: Must be 'jwk' or 'raw'");case 10:return o.algorithm={hash:{name:r.hash.name},name:this.name,length:o.data.length<<3},o.extractable=n,o.usages=i,a.abrupt("return",o);case 14:case"end":return a.stop()}}),a,this)})))}},{key:"onExportKey",value:function(e,t){return kr(this,void 0,void 0,_regeneratorRuntime().mark((function r(){var n;return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e.toLowerCase(),r.next="jwk"===r.t0?3:"raw"===r.t0?5:6;break;case 3:return n=Tr.toJSON(t),r.abrupt("return",n);case 5:return r.abrupt("return",new Uint8Array(t.data).buffer);case 6:throw new Fr("format: Must be 'jwk' or 'raw'");case 7:case"end":return r.stop()}}),r)})))}},{key:"checkCryptoKey",value:function(e,t){if(_get(_getPrototypeOf(n.prototype),"checkCryptoKey",this).call(this,e,t),!(e instanceof So))throw new TypeError("key: Is not HMAC CryptoKey")}}]),n}(Qn),Bo=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i,a,o){var u;return _classCallCheck(this,r),u=t.call(this,e,n,i,a),Ao.set(_assertThisInitialized(u),void 0),function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?i.call(e,r):i?i.value=r:t.set(e,r)}(_assertThisInitialized(u),Ao,o,"f"),u}return _createClass(r,[{key:"getNative",value:function(){return function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}(this,Ao,"f")}}]),r}(ci);Ao=new WeakMap;var Eo=function(t){_inherits(n,t);var r=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=r.call(this)).browserInfo=function(){var e={name:Yn.Unknown,version:"0"};if("undefined"==typeof self)return e;var t,r=self.navigator.userAgent;return(t=/edge\/([\d\.]+)/i.exec(r))?(e.name=Yn.Edge,e.version=t[1]):/msie/i.test(r)?(e.name=Yn.IE,e.version=/msie ([\d\.]+)/i.exec(r)[1]):/Trident/i.test(r)?(e.name=Yn.IE,e.version=/rv:([\d\.]+)/i.exec(r)[1]):/chrome/i.test(r)?(e.name=Yn.Chrome,e.version=/chrome\/([\d\.]+)/i.exec(r)[1]):/firefox/i.test(r)?(e.name=Yn.Firefox,e.version=/firefox\/([\d\.]+)/i.exec(r)[1]):/mobile/i.test(r)?(e.name=Yn.Mobile,e.version=/mobile\/([\w]+)/i.exec(r)[1]):/safari/i.test(r)&&(e.name=Yn.Safari,e.version=/version\/([\d\.]+)/i.exec(r)[1]),e}(),e.providers.set(new pi),e.providers.set(new gi),e.providers.set(new vi),e.providers.set(new yi),e.providers.set(new di),e.providers.set(new bo),e.providers.set(new _o),e.providers.set(new Ci),e.providers.set(new _i),e.providers.set(new bi),e.providers.set(new Si),e.providers.set(new Oi),e.providers.set(new Ri),e.providers.set(new Hi),e.providers.set(new Vi),e.providers.set(new Di),e.providers.set(new Na),e.providers.set(new xo),e.providers.set(new Ti),e.providers.set(new ji),e.providers.set(new xa),e.providers.set(new Ba),e.providers.set(new Ea),e.providers.set(new Ra),e.providers.set(new Ka),e}return _createClass(n,[{key:"digest",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1?i-1:0),o=1;o>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0});var Oo=self;e.nativeCrypto&&Object.freeze(e.nativeCrypto.getRandomValues);try{delete self.crypto,Oo.crypto=new Ro,Object.freeze(Oo.crypto)}catch(e){ui.error(e)}var No=Oo.crypto;return e.Crypto=Ro,e.CryptoKey=ci,e.crypto=No,e.setCrypto=function(t){e.nativeCrypto=t,e.nativeSubtle=t.subtle},e}({},self.asmCrypto,self.elliptic); diff --git a/wallabagger/js/wallabag-api.js b/wallabagger/js/wallabag-api.js index 72c4f55..74eb040 100644 --- a/wallabagger/js/wallabag-api.js +++ b/wallabagger/js/wallabag-api.js @@ -1,3 +1,19 @@ +/** + * @param {string} url + * @returns {Promise} + * @see https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string + */ +const hashUrl = function (url) { + const urlByteArray = new TextEncoder().encode(url); + return crypto.subtle.digest('SHA-1', urlByteArray).then(hashBuffer => { + const hashArray = Array.from(new Uint8Array(hashBuffer)); + const hashHex = hashArray + .map((b) => b.toString(16).padStart(2, '0')) + .join(''); // convert bytes to hex string + return hashHex; + }); +}; + const WallabagApi = function () { }; WallabagApi.prototype = { @@ -116,6 +132,20 @@ WallabagApi.prototype = { }); }, + /** + * @returns {Promise<[number, number, number]>} + */ + GetVersion: function () { + if (this.data.ApiVersion) return Promise.resolve(this.data.ApiVersion.split('.').map(Number)); + return this.CheckUrl().then(() => this.GetVersion()); + }, + + SupportsHashedUrl: function () { + return this.GetVersion().then(([major, minor]) => { + return (major > 2) || (major === 2 && minor >= 4); + }); + }, + SaveTitle: function (articleId, articleTitle) { return this.PatchArticle(articleId, { title: articleTitle }); }, @@ -270,13 +300,15 @@ WallabagApi.prototype = { }, EntryExists: function (url) { - const entriesUrl = `${this.data.Url}/api/entries/exists.json?url=${url}`; + const existsUrl = `${this.data.Url}/api/entries/exists.json`; - return this.CheckToken().then(a => - this.fetchApi.Get(entriesUrl, this.data.ApiToken) - ) + return this.CheckToken().then(() => this.SupportsHashedUrl()).then(useHashedUrl => { + const paramAsync = useHashedUrl ? hashUrl(url) : Promise.resolve(url); + return paramAsync.then(param => `${existsUrl}?${useHashedUrl ? 'hashed_url' : 'url'}=${encodeURIComponent(param)}`); + }) + .then(url => this.fetchApi.Get(url, this.data.ApiToken)) .catch(error => { - throw new Error(`Failed to check if exists ${entriesUrl} + throw new Error(`Failed to ask ${existsUrl} whether ${url} exists ${error.message}`); }); }, diff --git a/wallabagger/manifest.json b/wallabagger/manifest.json index dd9f837..a6ad43e 100644 --- a/wallabagger/manifest.json +++ b/wallabagger/manifest.json @@ -23,6 +23,9 @@ "background": { "scripts": [ "js/common.js", + "js/deps/text.min.js", + "js/deps/asmcrypto.all.es5.min.js", + "js/deps/webcrypto-liner.shim.min.js", "js/fetch-api.js", "js/wallabag-api.js", "js/background.js"