@ouro.bot/cli 0.1.0-alpha.1147 → 0.1.0-alpha.1148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.json +6 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/node_modules/@ouro.bot/friends/LICENSE +201 -0
- package/node_modules/@ouro.bot/friends/README.md +674 -0
- package/node_modules/@ouro.bot/friends/changelog.json +125 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/a2a-message.d.ts +39 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/a2a-message.js +54 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/adapter.d.ts +117 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/adapter.js +202 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/agent-card.d.ts +50 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/agent-card.js +32 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-key.d.ts +38 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-key.js +120 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-verifier.d.ts +195 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-verifier.js +342 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-web.d.ts +26 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-web.js +140 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/envelope-binding.d.ts +62 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/envelope-binding.js +79 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/index.d.ts +26 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/index.js +82 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/jcs.d.ts +5 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/jcs.js +84 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/reachability.d.ts +22 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/reachability.js +17 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/roster-verify.d.ts +15 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/roster-verify.js +61 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/seal.d.ts +47 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/seal.js +95 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sealed-envelope.d.ts +58 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sealed-envelope.js +113 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sign.d.ts +42 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sign.js +87 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sodium.d.ts +5 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sodium.js +19 -0
- package/node_modules/@ouro.bot/friends/dist/account-roster.d.ts +52 -0
- package/node_modules/@ouro.bot/friends/dist/account-roster.js +108 -0
- package/node_modules/@ouro.bot/friends/dist/agent-peer.d.ts +26 -0
- package/node_modules/@ouro.bot/friends/dist/agent-peer.js +138 -0
- package/node_modules/@ouro.bot/friends/dist/audit.d.ts +42 -0
- package/node_modules/@ouro.bot/friends/dist/audit.js +86 -0
- package/node_modules/@ouro.bot/friends/dist/channel.d.ts +11 -0
- package/node_modules/@ouro.bot/friends/dist/channel.js +161 -0
- package/node_modules/@ouro.bot/friends/dist/connect-authority.d.ts +43 -0
- package/node_modules/@ouro.bot/friends/dist/connect-authority.js +84 -0
- package/node_modules/@ouro.bot/friends/dist/connect.d.ts +56 -0
- package/node_modules/@ouro.bot/friends/dist/connect.js +163 -0
- package/node_modules/@ouro.bot/friends/dist/consent.d.ts +34 -0
- package/node_modules/@ouro.bot/friends/dist/consent.js +65 -0
- package/node_modules/@ouro.bot/friends/dist/coordination.d.ts +116 -0
- package/node_modules/@ouro.bot/friends/dist/coordination.js +329 -0
- package/node_modules/@ouro.bot/friends/dist/delegation-grant.d.ts +21 -0
- package/node_modules/@ouro.bot/friends/dist/delegation-grant.js +39 -0
- package/node_modules/@ouro.bot/friends/dist/file-bundle.d.ts +17 -0
- package/node_modules/@ouro.bot/friends/dist/file-bundle.js +27 -0
- package/node_modules/@ouro.bot/friends/dist/friend-lookup.d.ts +9 -0
- package/node_modules/@ouro.bot/friends/dist/friend-lookup.js +69 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store-file.d.ts +16 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store-file.js +136 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store.js +8 -0
- package/node_modules/@ouro.bot/friends/dist/grants.d.ts +39 -0
- package/node_modules/@ouro.bot/friends/dist/grants.js +84 -0
- package/node_modules/@ouro.bot/friends/dist/group-context.d.ts +21 -0
- package/node_modules/@ouro.bot/friends/dist/group-context.js +145 -0
- package/node_modules/@ouro.bot/friends/dist/identity.d.ts +17 -0
- package/node_modules/@ouro.bot/friends/dist/identity.js +68 -0
- package/node_modules/@ouro.bot/friends/dist/index.d.ts +73 -0
- package/node_modules/@ouro.bot/friends/dist/index.js +161 -0
- package/node_modules/@ouro.bot/friends/dist/link-identity.d.ts +14 -0
- package/node_modules/@ouro.bot/friends/dist/link-identity.js +157 -0
- package/node_modules/@ouro.bot/friends/dist/mailbox/index.d.ts +105 -0
- package/node_modules/@ouro.bot/friends/dist/mailbox/index.js +205 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/bin.d.ts +2 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/bin.js +16 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/dispatch.d.ts +40 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/dispatch.js +549 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/index.d.ts +6 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/index.js +14 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/run-main.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/run-main.js +48 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/schemas.d.ts +10 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/schemas.js +445 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/server.d.ts +30 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/server.js +194 -0
- package/node_modules/@ouro.bot/friends/dist/message.d.ts +75 -0
- package/node_modules/@ouro.bot/friends/dist/message.js +99 -0
- package/node_modules/@ouro.bot/friends/dist/mission-result.d.ts +82 -0
- package/node_modules/@ouro.bot/friends/dist/mission-result.js +200 -0
- package/node_modules/@ouro.bot/friends/dist/mission-share.d.ts +94 -0
- package/node_modules/@ouro.bot/friends/dist/mission-share.js +232 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store-file.d.ts +18 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store-file.js +161 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store.d.ts +10 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store.js +9 -0
- package/node_modules/@ouro.bot/friends/dist/missions.d.ts +31 -0
- package/node_modules/@ouro.bot/friends/dist/missions.js +98 -0
- package/node_modules/@ouro.bot/friends/dist/notes.d.ts +11 -0
- package/node_modules/@ouro.bot/friends/dist/notes.js +90 -0
- package/node_modules/@ouro.bot/friends/dist/observability.d.ts +27 -0
- package/node_modules/@ouro.bot/friends/dist/observability.js +31 -0
- package/node_modules/@ouro.bot/friends/dist/outcomes.d.ts +9 -0
- package/node_modules/@ouro.bot/friends/dist/outcomes.js +51 -0
- package/node_modules/@ouro.bot/friends/dist/resolver.d.ts +59 -0
- package/node_modules/@ouro.bot/friends/dist/resolver.js +276 -0
- package/node_modules/@ouro.bot/friends/dist/results.d.ts +10 -0
- package/node_modules/@ouro.bot/friends/dist/results.js +2 -0
- package/node_modules/@ouro.bot/friends/dist/room.d.ts +22 -0
- package/node_modules/@ouro.bot/friends/dist/room.js +40 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-file.d.ts +16 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-file.js +125 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-memory.d.ts +9 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-memory.js +20 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store.d.ts +29 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store.js +9 -0
- package/node_modules/@ouro.bot/friends/dist/roster-verifier.d.ts +23 -0
- package/node_modules/@ouro.bot/friends/dist/roster-verifier.js +47 -0
- package/node_modules/@ouro.bot/friends/dist/share.d.ts +108 -0
- package/node_modules/@ouro.bot/friends/dist/share.js +278 -0
- package/node_modules/@ouro.bot/friends/dist/standing.d.ts +83 -0
- package/node_modules/@ouro.bot/friends/dist/standing.js +111 -0
- package/node_modules/@ouro.bot/friends/dist/store-file.d.ts +82 -0
- package/node_modules/@ouro.bot/friends/dist/store-file.js +1074 -0
- package/node_modules/@ouro.bot/friends/dist/store.d.ts +43 -0
- package/node_modules/@ouro.bot/friends/dist/store.js +4 -0
- package/node_modules/@ouro.bot/friends/dist/tokens.d.ts +8 -0
- package/node_modules/@ouro.bot/friends/dist/tokens.js +26 -0
- package/node_modules/@ouro.bot/friends/dist/trust-explanation.d.ts +22 -0
- package/node_modules/@ouro.bot/friends/dist/trust-explanation.js +90 -0
- package/node_modules/@ouro.bot/friends/dist/trust-mutation.d.ts +16 -0
- package/node_modules/@ouro.bot/friends/dist/trust-mutation.js +67 -0
- package/node_modules/@ouro.bot/friends/dist/types.d.ts +321 -0
- package/node_modules/@ouro.bot/friends/dist/types.js +55 -0
- package/node_modules/@ouro.bot/friends/dist/util/cap-string.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/util/cap-string.js +35 -0
- package/node_modules/@ouro.bot/friends/dist/verifier.d.ts +11 -0
- package/node_modules/@ouro.bot/friends/dist/verifier.js +29 -0
- package/node_modules/@ouro.bot/friends/dist/whoami.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/whoami.js +39 -0
- package/node_modules/@ouro.bot/friends/package.json +81 -0
- package/node_modules/libsodium/LICENSE +16 -0
- package/node_modules/libsodium/README.md +281 -0
- package/node_modules/libsodium/dist/modules/libsodium.js +1 -0
- package/node_modules/libsodium/dist/modules-esm/libsodium.mjs +1 -0
- package/node_modules/libsodium/package.json +54 -0
- package/node_modules/libsodium-wrappers/LICENSE +16 -0
- package/node_modules/libsodium-wrappers/README.md +281 -0
- package/node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.d.ts +2155 -0
- package/node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.js +1 -0
- package/node_modules/libsodium-wrappers/dist/modules-esm/libsodium-wrappers.d.mts +2743 -0
- package/node_modules/libsodium-wrappers/dist/modules-esm/libsodium-wrappers.mjs +1 -0
- package/node_modules/libsodium-wrappers/package.json +74 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){function r(e,r){"use strict";var t,a=r.ready.then(function(){function a(){if(t._sodium_init()<0)throw new Error("libsodium was not correctly initialized.");for(var r=["crypto_aead_aegis128l_decrypt","crypto_aead_aegis128l_decrypt_detached","crypto_aead_aegis128l_encrypt","crypto_aead_aegis128l_encrypt_detached","crypto_aead_aegis128l_keygen","crypto_aead_aegis256_decrypt","crypto_aead_aegis256_decrypt_detached","crypto_aead_aegis256_encrypt","crypto_aead_aegis256_encrypt_detached","crypto_aead_aegis256_keygen","crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_final","crypto_auth_hmacsha256_init","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_update","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512256","crypto_auth_hmacsha512256_final","crypto_auth_hmacsha512256_init","crypto_auth_hmacsha512256_keygen","crypto_auth_hmacsha512256_update","crypto_auth_hmacsha512256_verify","crypto_auth_hmacsha512_final","crypto_auth_hmacsha512_init","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_update","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_beforenm","crypto_box_curve25519xchacha20poly1305_detached","crypto_box_curve25519xchacha20poly1305_detached_afternm","crypto_box_curve25519xchacha20poly1305_easy","crypto_box_curve25519xchacha20poly1305_easy_afternm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_open_detached","crypto_box_curve25519xchacha20poly1305_open_detached_afternm","crypto_box_curve25519xchacha20poly1305_open_easy","crypto_box_curve25519xchacha20poly1305_open_easy_afternm","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_curve25519xchacha20poly1305_seed_keypair","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_hchacha20","crypto_core_hsalsa20","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha3256","crypto_hash_sha3256_final","crypto_hash_sha3256_init","crypto_hash_sha3256_update","crypto_hash_sha3512","crypto_hash_sha3512_final","crypto_hash_sha3512_init","crypto_hash_sha3512_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_ipcrypt_decrypt","crypto_ipcrypt_encrypt","crypto_ipcrypt_keygen","crypto_ipcrypt_nd_decrypt","crypto_ipcrypt_nd_encrypt","crypto_ipcrypt_nd_keygen","crypto_ipcrypt_ndx_decrypt","crypto_ipcrypt_ndx_encrypt","crypto_ipcrypt_ndx_keygen","crypto_ipcrypt_pfx_decrypt","crypto_ipcrypt_pfx_encrypt","crypto_ipcrypt_pfx_keygen","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kem_dec","crypto_kem_enc","crypto_kem_keypair","crypto_kem_mlkem768_dec","crypto_kem_mlkem768_enc","crypto_kem_mlkem768_enc_deterministic","crypto_kem_mlkem768_keypair","crypto_kem_mlkem768_seed_keypair","crypto_kem_primitive","crypto_kem_seed_keypair","crypto_kem_xwing_dec","crypto_kem_xwing_enc","crypto_kem_xwing_enc_deterministic","crypto_kem_xwing_keypair","crypto_kem_xwing_seed_keypair","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","crypto_xof_shake128","crypto_xof_shake128_init","crypto_xof_shake128_init_with_domain","crypto_xof_shake128_squeeze","crypto_xof_shake128_update","crypto_xof_shake256","crypto_xof_shake256_init","crypto_xof_shake256_init_with_domain","crypto_xof_shake256_squeeze","crypto_xof_shake256_update","crypto_xof_turboshake128","crypto_xof_turboshake128_init","crypto_xof_turboshake128_init_with_domain","crypto_xof_turboshake128_squeeze","crypto_xof_turboshake128_update","crypto_xof_turboshake256","crypto_xof_turboshake256_init","crypto_xof_turboshake256_init_with_domain","crypto_xof_turboshake256_squeeze","crypto_xof_turboshake256_update","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_bin2ip","sodium_ip2bin","sodium_version_string"],a=[x,E,S,T,w,Y,B,K,A,I,M,N,L,O,U,C,P,R,X,D,G,F,V,q,H,z,W,j,J,Q,Z,$,ee,re,te,ae,_e,ne,se,ce,pe,oe,he,ye,ie,ue,le,de,ve,ge,be,fe,me,ke,xe,Ee,Se,Te,we,Ye,Be,Ke,Ae,Ie,Me,Ne,Le,Oe,Ue,Ce,Pe,Re,Xe,De,Ge,Fe,Ve,qe,He,ze,We,je,Je,Qe,Ze,$e,er,rr,tr,ar,_r,nr,sr,cr,pr,or,hr,yr,ir,ur,lr,dr,vr,gr,br,fr,mr,kr,xr,Er,Sr,Tr,wr,Yr,Br,Kr,Ar,Ir,Mr,Nr,Lr,Or,Ur,Cr,Pr,Rr,Xr,Dr,Gr,Fr,Vr,qr,Hr,zr,Wr,jr,Jr,Qr,Zr,$r,et,rt,tt,at,_t,nt,st,ct,pt,ot,ht,yt,it,ut,lt,dt,vt,gt,bt,ft,mt,kt,xt,Et,St,Tt,wt,Yt,Bt,Kt,At,It,Mt,Nt,Lt,Ot,Ut,Ct,Pt,Rt,Xt,Dt,Gt,Ft,Vt,qt,Ht,zt,Wt,jt,Jt,Qt,Zt,$t,ea,ra,ta,aa,_a,na,sa,ca,pa,oa,ha,ya,ia,ua,la,da,va,ga,ba,fa,ma,ka,xa,Ea,Sa,Ta,wa,Ya,Ba,Ka,Aa,Ia,Ma,Na,La,Oa,Ua,Ca,Pa,Ra,Xa,Da,Ga,Fa,Va,qa,Ha,za,Wa,ja,Ja],_=0;_<a.length;_++)"function"==typeof t["_"+r[_]]&&(e[r[_]]=a[_]);var n=["SODIUM_LIBRARY_VERSION_MAJOR","SODIUM_LIBRARY_VERSION_MINOR","crypto_aead_aegis128l_ABYTES","crypto_aead_aegis128l_KEYBYTES","crypto_aead_aegis128l_MESSAGEBYTES_MAX","crypto_aead_aegis128l_NPUBBYTES","crypto_aead_aegis128l_NSECBYTES","crypto_aead_aegis256_ABYTES","crypto_aead_aegis256_KEYBYTES","crypto_aead_aegis256_MESSAGEBYTES_MAX","crypto_aead_aegis256_NPUBBYTES","crypto_aead_aegis256_NSECBYTES","crypto_aead_aes256gcm_ABYTES","crypto_aead_aes256gcm_KEYBYTES","crypto_aead_aes256gcm_MESSAGEBYTES_MAX","crypto_aead_aes256gcm_NPUBBYTES","crypto_aead_aes256gcm_NSECBYTES","crypto_aead_chacha20poly1305_ABYTES","crypto_aead_chacha20poly1305_IETF_ABYTES","crypto_aead_chacha20poly1305_IETF_KEYBYTES","crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_IETF_NPUBBYTES","crypto_aead_chacha20poly1305_IETF_NSECBYTES","crypto_aead_chacha20poly1305_KEYBYTES","crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_NPUBBYTES","crypto_aead_chacha20poly1305_NSECBYTES","crypto_aead_chacha20poly1305_ietf_ABYTES","crypto_aead_chacha20poly1305_ietf_KEYBYTES","crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_ietf_NPUBBYTES","crypto_aead_chacha20poly1305_ietf_NSECBYTES","crypto_aead_xchacha20poly1305_IETF_ABYTES","crypto_aead_xchacha20poly1305_IETF_KEYBYTES","crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_IETF_NPUBBYTES","crypto_aead_xchacha20poly1305_IETF_NSECBYTES","crypto_aead_xchacha20poly1305_ietf_ABYTES","crypto_aead_xchacha20poly1305_ietf_KEYBYTES","crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_ietf_NPUBBYTES","crypto_aead_xchacha20poly1305_ietf_NSECBYTES","crypto_auth_BYTES","crypto_auth_KEYBYTES","crypto_auth_hmacsha256_BYTES","crypto_auth_hmacsha256_KEYBYTES","crypto_auth_hmacsha512256_BYTES","crypto_auth_hmacsha512256_KEYBYTES","crypto_auth_hmacsha512_BYTES","crypto_auth_hmacsha512_KEYBYTES","crypto_box_BEFORENMBYTES","crypto_box_MACBYTES","crypto_box_MESSAGEBYTES_MAX","crypto_box_NONCEBYTES","crypto_box_PUBLICKEYBYTES","crypto_box_SEALBYTES","crypto_box_SECRETKEYBYTES","crypto_box_SEEDBYTES","crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES","crypto_box_curve25519xchacha20poly1305_MACBYTES","crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xchacha20poly1305_NONCEBYTES","crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEALBYTES","crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEEDBYTES","crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES","crypto_box_curve25519xsalsa20poly1305_MACBYTES","crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xsalsa20poly1305_NONCEBYTES","crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SEEDBYTES","crypto_core_ed25519_BYTES","crypto_core_ed25519_HASHBYTES","crypto_core_ed25519_NONREDUCEDSCALARBYTES","crypto_core_ed25519_SCALARBYTES","crypto_core_ed25519_UNIFORMBYTES","crypto_core_hchacha20_CONSTBYTES","crypto_core_hchacha20_INPUTBYTES","crypto_core_hchacha20_KEYBYTES","crypto_core_hchacha20_OUTPUTBYTES","crypto_core_hsalsa20_CONSTBYTES","crypto_core_hsalsa20_INPUTBYTES","crypto_core_hsalsa20_KEYBYTES","crypto_core_hsalsa20_OUTPUTBYTES","crypto_core_ristretto255_BYTES","crypto_core_ristretto255_HASHBYTES","crypto_core_ristretto255_NONREDUCEDSCALARBYTES","crypto_core_ristretto255_SCALARBYTES","crypto_core_salsa2012_CONSTBYTES","crypto_core_salsa2012_INPUTBYTES","crypto_core_salsa2012_KEYBYTES","crypto_core_salsa2012_OUTPUTBYTES","crypto_core_salsa208_CONSTBYTES","crypto_core_salsa208_INPUTBYTES","crypto_core_salsa208_KEYBYTES","crypto_core_salsa208_OUTPUTBYTES","crypto_core_salsa20_CONSTBYTES","crypto_core_salsa20_INPUTBYTES","crypto_core_salsa20_KEYBYTES","crypto_core_salsa20_OUTPUTBYTES","crypto_generichash_BYTES","crypto_generichash_BYTES_MAX","crypto_generichash_BYTES_MIN","crypto_generichash_KEYBYTES","crypto_generichash_KEYBYTES_MAX","crypto_generichash_KEYBYTES_MIN","crypto_generichash_blake2b_BYTES","crypto_generichash_blake2b_BYTES_MAX","crypto_generichash_blake2b_BYTES_MIN","crypto_generichash_blake2b_KEYBYTES","crypto_generichash_blake2b_KEYBYTES_MAX","crypto_generichash_blake2b_KEYBYTES_MIN","crypto_generichash_blake2b_PERSONALBYTES","crypto_generichash_blake2b_SALTBYTES","crypto_hash_BYTES","crypto_hash_sha256_BYTES","crypto_hash_sha3256_BYTES","crypto_hash_sha3512_BYTES","crypto_hash_sha512_BYTES","crypto_ipcrypt_BYTES","crypto_ipcrypt_KEYBYTES","crypto_ipcrypt_NDX_INPUTBYTES","crypto_ipcrypt_NDX_KEYBYTES","crypto_ipcrypt_NDX_OUTPUTBYTES","crypto_ipcrypt_NDX_TWEAKBYTES","crypto_ipcrypt_ND_INPUTBYTES","crypto_ipcrypt_ND_KEYBYTES","crypto_ipcrypt_ND_OUTPUTBYTES","crypto_ipcrypt_ND_TWEAKBYTES","crypto_ipcrypt_PFX_BYTES","crypto_ipcrypt_PFX_KEYBYTES","crypto_kdf_BYTES_MAX","crypto_kdf_BYTES_MIN","crypto_kdf_CONTEXTBYTES","crypto_kdf_KEYBYTES","crypto_kdf_blake2b_BYTES_MAX","crypto_kdf_blake2b_BYTES_MIN","crypto_kdf_blake2b_CONTEXTBYTES","crypto_kdf_blake2b_KEYBYTES","crypto_kdf_hkdf_sha256_BYTES_MAX","crypto_kdf_hkdf_sha256_BYTES_MIN","crypto_kdf_hkdf_sha256_KEYBYTES","crypto_kdf_hkdf_sha512_BYTES_MAX","crypto_kdf_hkdf_sha512_BYTES_MIN","crypto_kdf_hkdf_sha512_KEYBYTES","crypto_kem_CIPHERTEXTBYTES","crypto_kem_PUBLICKEYBYTES","crypto_kem_SECRETKEYBYTES","crypto_kem_SEEDBYTES","crypto_kem_SHAREDSECRETBYTES","crypto_kem_mlkem768_CIPHERTEXTBYTES","crypto_kem_mlkem768_PUBLICKEYBYTES","crypto_kem_mlkem768_SECRETKEYBYTES","crypto_kem_mlkem768_SEEDBYTES","crypto_kem_mlkem768_SHAREDSECRETBYTES","crypto_kem_xwing_CIPHERTEXTBYTES","crypto_kem_xwing_PUBLICKEYBYTES","crypto_kem_xwing_SECRETKEYBYTES","crypto_kem_xwing_SEEDBYTES","crypto_kem_xwing_SHAREDSECRETBYTES","crypto_kx_PUBLICKEYBYTES","crypto_kx_SECRETKEYBYTES","crypto_kx_SEEDBYTES","crypto_kx_SESSIONKEYBYTES","crypto_onetimeauth_BYTES","crypto_onetimeauth_KEYBYTES","crypto_onetimeauth_poly1305_BYTES","crypto_onetimeauth_poly1305_KEYBYTES","crypto_pwhash_ALG_ARGON2I13","crypto_pwhash_ALG_ARGON2ID13","crypto_pwhash_ALG_DEFAULT","crypto_pwhash_BYTES_MAX","crypto_pwhash_BYTES_MIN","crypto_pwhash_MEMLIMIT_INTERACTIVE","crypto_pwhash_MEMLIMIT_MAX","crypto_pwhash_MEMLIMIT_MIN","crypto_pwhash_MEMLIMIT_MODERATE","crypto_pwhash_MEMLIMIT_SENSITIVE","crypto_pwhash_OPSLIMIT_INTERACTIVE","crypto_pwhash_OPSLIMIT_MAX","crypto_pwhash_OPSLIMIT_MIN","crypto_pwhash_OPSLIMIT_MODERATE","crypto_pwhash_OPSLIMIT_SENSITIVE","crypto_pwhash_PASSWD_MAX","crypto_pwhash_PASSWD_MIN","crypto_pwhash_SALTBYTES","crypto_pwhash_STRBYTES","crypto_pwhash_argon2i_BYTES_MAX","crypto_pwhash_argon2i_BYTES_MIN","crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2i_MEMLIMIT_MAX","crypto_pwhash_argon2i_MEMLIMIT_MIN","crypto_pwhash_argon2i_MEMLIMIT_MODERATE","crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2i_OPSLIMIT_MAX","crypto_pwhash_argon2i_OPSLIMIT_MIN","crypto_pwhash_argon2i_OPSLIMIT_MODERATE","crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2i_PASSWD_MAX","crypto_pwhash_argon2i_PASSWD_MIN","crypto_pwhash_argon2i_SALTBYTES","crypto_pwhash_argon2i_STRBYTES","crypto_pwhash_argon2id_BYTES_MAX","crypto_pwhash_argon2id_BYTES_MIN","crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2id_MEMLIMIT_MAX","crypto_pwhash_argon2id_MEMLIMIT_MIN","crypto_pwhash_argon2id_MEMLIMIT_MODERATE","crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2id_OPSLIMIT_MAX","crypto_pwhash_argon2id_OPSLIMIT_MIN","crypto_pwhash_argon2id_OPSLIMIT_MODERATE","crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2id_PASSWD_MAX","crypto_pwhash_argon2id_PASSWD_MIN","crypto_pwhash_argon2id_SALTBYTES","crypto_pwhash_argon2id_STRBYTES","crypto_pwhash_scryptsalsa208sha256_BYTES_MAX","crypto_pwhash_scryptsalsa208sha256_BYTES_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX","crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN","crypto_pwhash_scryptsalsa208sha256_SALTBYTES","crypto_pwhash_scryptsalsa208sha256_STRBYTES","crypto_scalarmult_BYTES","crypto_scalarmult_SCALARBYTES","crypto_scalarmult_curve25519_BYTES","crypto_scalarmult_curve25519_SCALARBYTES","crypto_scalarmult_ed25519_BYTES","crypto_scalarmult_ed25519_SCALARBYTES","crypto_scalarmult_ristretto255_BYTES","crypto_scalarmult_ristretto255_SCALARBYTES","crypto_secretbox_KEYBYTES","crypto_secretbox_MACBYTES","crypto_secretbox_MESSAGEBYTES_MAX","crypto_secretbox_NONCEBYTES","crypto_secretbox_xchacha20poly1305_KEYBYTES","crypto_secretbox_xchacha20poly1305_MACBYTES","crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xchacha20poly1305_NONCEBYTES","crypto_secretbox_xsalsa20poly1305_KEYBYTES","crypto_secretbox_xsalsa20poly1305_MACBYTES","crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xsalsa20poly1305_NONCEBYTES","crypto_secretstream_xchacha20poly1305_ABYTES","crypto_secretstream_xchacha20poly1305_HEADERBYTES","crypto_secretstream_xchacha20poly1305_KEYBYTES","crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretstream_xchacha20poly1305_TAG_FINAL","crypto_secretstream_xchacha20poly1305_TAG_MESSAGE","crypto_secretstream_xchacha20poly1305_TAG_PUSH","crypto_secretstream_xchacha20poly1305_TAG_REKEY","crypto_shorthash_BYTES","crypto_shorthash_KEYBYTES","crypto_shorthash_siphash24_BYTES","crypto_shorthash_siphash24_KEYBYTES","crypto_shorthash_siphashx24_BYTES","crypto_shorthash_siphashx24_KEYBYTES","crypto_sign_BYTES","crypto_sign_MESSAGEBYTES_MAX","crypto_sign_PUBLICKEYBYTES","crypto_sign_SECRETKEYBYTES","crypto_sign_SEEDBYTES","crypto_sign_ed25519_BYTES","crypto_sign_ed25519_MESSAGEBYTES_MAX","crypto_sign_ed25519_PUBLICKEYBYTES","crypto_sign_ed25519_SECRETKEYBYTES","crypto_sign_ed25519_SEEDBYTES","crypto_stream_KEYBYTES","crypto_stream_MESSAGEBYTES_MAX","crypto_stream_NONCEBYTES","crypto_stream_chacha20_IETF_KEYBYTES","crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX","crypto_stream_chacha20_IETF_NONCEBYTES","crypto_stream_chacha20_KEYBYTES","crypto_stream_chacha20_MESSAGEBYTES_MAX","crypto_stream_chacha20_NONCEBYTES","crypto_stream_chacha20_ietf_KEYBYTES","crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX","crypto_stream_chacha20_ietf_NONCEBYTES","crypto_stream_salsa2012_KEYBYTES","crypto_stream_salsa2012_MESSAGEBYTES_MAX","crypto_stream_salsa2012_NONCEBYTES","crypto_stream_salsa208_KEYBYTES","crypto_stream_salsa208_MESSAGEBYTES_MAX","crypto_stream_salsa208_NONCEBYTES","crypto_stream_salsa20_KEYBYTES","crypto_stream_salsa20_MESSAGEBYTES_MAX","crypto_stream_salsa20_NONCEBYTES","crypto_stream_xchacha20_KEYBYTES","crypto_stream_xchacha20_MESSAGEBYTES_MAX","crypto_stream_xchacha20_NONCEBYTES","crypto_stream_xsalsa20_KEYBYTES","crypto_stream_xsalsa20_MESSAGEBYTES_MAX","crypto_stream_xsalsa20_NONCEBYTES","crypto_verify_16_BYTES","crypto_verify_32_BYTES","crypto_verify_64_BYTES","crypto_xof_shake128_BLOCKBYTES","crypto_xof_shake128_STATEBYTES","crypto_xof_shake256_BLOCKBYTES","crypto_xof_shake256_STATEBYTES","crypto_xof_turboshake128_BLOCKBYTES","crypto_xof_turboshake128_STATEBYTES","crypto_xof_turboshake256_BLOCKBYTES","crypto_xof_turboshake256_STATEBYTES"];for(_=0;_<n.length;_++)"function"==typeof(c=t["_"+n[_].toLowerCase()])&&(e[n[_]]=c());var s=["SODIUM_VERSION_STRING","crypto_kem_PRIMITIVE","crypto_pwhash_STRPREFIX","crypto_pwhash_argon2i_STRPREFIX","crypto_pwhash_argon2id_STRPREFIX","crypto_pwhash_scryptsalsa208sha256_STRPREFIX"];for(_=0;_<s.length;_++){var c;"function"==typeof(c=t["_"+s[_].toLowerCase()])&&(e[s[_]]=t.UTF8ToString(c()))}}t=r;try{a();var _=new Uint8Array([98,97,108,108,115]),n=e.randombytes_buf(e.crypto_secretbox_NONCEBYTES),s=e.randombytes_buf(e.crypto_secretbox_KEYBYTES),c=e.crypto_secretbox_easy(_,n,s),p=e.crypto_secretbox_open_easy(c,n,s);if(e.memcmp(_,p))return}catch(e){if(null==t.useBackupModule)throw new Error("Both wasm and asm failed to load"+e)}return t.useBackupModule().then(function(){a()})});function _(e){if("function"==typeof TextEncoder)return(new TextEncoder).encode(e);e=unescape(encodeURIComponent(e));for(var r=new Uint8Array(e.length),t=0,a=e.length;t<a;t++)r[t]=e.charCodeAt(t);return r}function n(e){if("function"==typeof TextDecoder)return new TextDecoder("utf-8",{fatal:!0}).decode(e);var r=8192,t=Math.ceil(e.length/r);if(t<=1)try{return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}catch(e){throw new TypeError("The encoded data was not valid.")}for(var a="",_=0,s=0;s<t;s++){var c=Array.prototype.slice.call(e,s*r+_,(s+1)*r+_);if(0!==c.length){var p,o=c.length,h=0;do{var y=c[--o];y>=240?(h=4,p=!0):y>=224?(h=3,p=!0):y>=192?(h=2,p=!0):y<128&&(h=1,p=!0)}while(!p);for(var i=h-(c.length-o),u=0;u<i;u++)_--,c.pop();a+=n(c)}}return a}function s(e){e=k(null,e,"input");for(var r,t,a,_="",n=0;n<e.length;n++)a=87+(t=15&e[n])+(t-10>>8&-39)<<8|87+(r=e[n]>>>4)+(r-10>>8&-39),_+=String.fromCharCode(255&a)+String.fromCharCode(a>>>8);return _}var c={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function p(e){if(void 0===e)return c.URLSAFE_NO_PADDING;if(e!==c.ORIGINAL&&e!==c.ORIGINAL_NO_PADDING&&e!==c.URLSAFE&&e!==c.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return e}function o(e,r){r=p(r);var a=[];e=k(a,e,"input");var _,s=0|Math.floor(e.length/3),c=e.length-3*s,o=4*s+(0!==c?2&r?2+(c>>>1):4:0),h=new u(o+1),y=l(e);return a.push(y),a.push(h.address),0===t._sodium_bin2base64(h.address,h.length,y,e.length,r)&&b(a,"conversion failed"),h.length=o,_=n(h.to_Uint8Array()),g(a),_}function h(e,r){var t=r||"uint8array";if(!y(t))throw new Error(t+" output format is not available");if(e instanceof u){if("uint8array"===t)return e.to_Uint8Array();if("text"===t)return n(e.to_Uint8Array());if("hex"===t)return s(e.to_Uint8Array());if("base64"===t)return o(e.to_Uint8Array(),c.URLSAFE_NO_PADDING);throw new Error('What is output format "'+t+'"?')}if("object"==typeof e){for(var a=Object.keys(e),_={},p=0;p<a.length;p++)_[a[p]]=h(e[a[p]],t);return _}if("string"==typeof e)return e;throw new TypeError("Cannot format output")}function y(e){for(var r=["uint8array","text","hex","base64"],t=0;t<r.length;t++)if(r[t]===e)return!0;return!1}function i(e){if(e){if("string"!=typeof e)throw new TypeError("When defined, the output format must be a string");if(!y(e))throw new Error(e+" is not a supported output format")}}function u(e){this.length=e,this.address=d(e)}function l(e){var r=d(e.length);return t.HEAPU8.set(e,r),r}function d(e){var r=t._malloc(e);if(0===r)throw{message:"_malloc() failed",length:e};return r}function v(e){t._free(e)}function g(e){if(e)for(var r=0;r<e.length;r++)v(e[r])}function b(e,r){throw g(e),new Error(r)}function f(e,r){throw g(e),new TypeError(r)}function m(e,r,t){null==r&&f(e,t+" cannot be null or undefined")}function k(e,r,t){return m(e,r,t),r instanceof Uint8Array?r:"string"==typeof r?_(r):void f(e,"unsupported input type for "+t)}function x(e,r,a,_,n,s){var c=[];i(s);var p=null;null!=e&&(p=l(e=k(c,e,"secret_nonce")),e.length,c.push(p)),r=k(c,r,"ciphertext");var o,y=t._crypto_aead_aegis128l_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),o=l(r),c.push(o);var v=null,m=0;null!=a&&(v=l(a=k(c,a,"additional_data")),m=a.length,c.push(v)),_=k(c,_,"public_nonce");var x,E=0|t._crypto_aead_aegis128l_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),x=l(_),c.push(x),n=k(c,n,"key");var S,T=0|t._crypto_aead_aegis128l_keybytes();n.length!==T&&f(c,"invalid key length"),S=l(n),c.push(S);var w=new u(d-t._crypto_aead_aegis128l_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_aegis128l_decrypt(Y,null,p,o,d,0,v,m,0,x,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function E(e,r,a,_,n,s,c){var p=[];i(c);var o=null;null!=e&&(o=l(e=k(p,e,"secret_nonce")),e.length,p.push(o));var y=l(r=k(p,r,"ciphertext")),d=r.length;p.push(y),a=k(p,a,"mac");var v,m=0|t._crypto_aead_aegis128l_abytes();a.length!==m&&f(p,"invalid mac length"),v=l(a),p.push(v);var x=null,E=0;null!=_&&(x=l(_=k(p,_,"additional_data")),E=_.length,p.push(x)),n=k(p,n,"public_nonce");var S,T=0|t._crypto_aead_aegis128l_npubbytes();n.length!==T&&f(p,"invalid public_nonce length"),S=l(n),p.push(S),s=k(p,s,"key");var w,Y=0|t._crypto_aead_aegis128l_keybytes();s.length!==Y&&f(p,"invalid key length"),w=l(s),p.push(w);var B=new u(0|d),K=B.address;if(p.push(K),0===t._crypto_aead_aegis128l_decrypt_detached(K,o,y,d,0,v,x,E,0,S,w)){var A=h(B,c);return g(p),A}b(p,"ciphertext cannot be decrypted using that key")}function S(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_aegis128l_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_aegis128l_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(o+t._crypto_aead_aegis128l_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_aegis128l_encrypt(w,null,p,o,0,y,d,0,v,m,E)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function T(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_aegis128l_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_aegis128l_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(0|o),w=T.address;c.push(w);var Y=new u(0|t._crypto_aead_aegis128l_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_aegis128l_encrypt_detached(w,B,null,p,o,0,y,d,0,v,m,E)){var K=h({ciphertext:T,mac:Y},s);return g(c),K}b(c,"invalid usage")}function w(e){var r=[];i(e);var a=new u(0|t._crypto_aead_aegis128l_keybytes()),_=a.address;r.push(_),t._crypto_aead_aegis128l_keygen(_);var n=h(a,e);return g(r),n}function Y(e,r,a,_,n,s){var c=[];i(s);var p=null;null!=e&&(p=l(e=k(c,e,"secret_nonce")),e.length,c.push(p)),r=k(c,r,"ciphertext");var o,y=t._crypto_aead_aegis256_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),o=l(r),c.push(o);var v=null,m=0;null!=a&&(v=l(a=k(c,a,"additional_data")),m=a.length,c.push(v)),_=k(c,_,"public_nonce");var x,E=0|t._crypto_aead_aegis256_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),x=l(_),c.push(x),n=k(c,n,"key");var S,T=0|t._crypto_aead_aegis256_keybytes();n.length!==T&&f(c,"invalid key length"),S=l(n),c.push(S);var w=new u(d-t._crypto_aead_aegis256_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_aegis256_decrypt(Y,null,p,o,d,0,v,m,0,x,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function B(e,r,a,_,n,s,c){var p=[];i(c);var o=null;null!=e&&(o=l(e=k(p,e,"secret_nonce")),e.length,p.push(o));var y=l(r=k(p,r,"ciphertext")),d=r.length;p.push(y),a=k(p,a,"mac");var v,m=0|t._crypto_aead_aegis256_abytes();a.length!==m&&f(p,"invalid mac length"),v=l(a),p.push(v);var x=null,E=0;null!=_&&(x=l(_=k(p,_,"additional_data")),E=_.length,p.push(x)),n=k(p,n,"public_nonce");var S,T=0|t._crypto_aead_aegis256_npubbytes();n.length!==T&&f(p,"invalid public_nonce length"),S=l(n),p.push(S),s=k(p,s,"key");var w,Y=0|t._crypto_aead_aegis256_keybytes();s.length!==Y&&f(p,"invalid key length"),w=l(s),p.push(w);var B=new u(0|d),K=B.address;if(p.push(K),0===t._crypto_aead_aegis256_decrypt_detached(K,o,y,d,0,v,x,E,0,S,w)){var A=h(B,c);return g(p),A}b(p,"ciphertext cannot be decrypted using that key")}function K(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_aegis256_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_aegis256_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(o+t._crypto_aead_aegis256_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_aegis256_encrypt(w,null,p,o,0,y,d,0,v,m,E)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function A(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_aegis256_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_aegis256_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(0|o),w=T.address;c.push(w);var Y=new u(0|t._crypto_aead_aegis256_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_aegis256_encrypt_detached(w,B,null,p,o,0,y,d,0,v,m,E)){var K=h({ciphertext:T,mac:Y},s);return g(c),K}b(c,"invalid usage")}function I(e){var r=[];i(e);var a=new u(0|t._crypto_aead_aegis256_keybytes()),_=a.address;r.push(_),t._crypto_aead_aegis256_keygen(_);var n=h(a,e);return g(r),n}function M(e,r,a,_,n,s){var c=[];i(s);var p=null;null!=e&&(p=l(e=k(c,e,"secret_nonce")),e.length,c.push(p)),r=k(c,r,"ciphertext");var o,y=t._crypto_aead_chacha20poly1305_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),o=l(r),c.push(o);var v=null,m=0;null!=a&&(v=l(a=k(c,a,"additional_data")),m=a.length,c.push(v)),_=k(c,_,"public_nonce");var x,E=0|t._crypto_aead_chacha20poly1305_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),x=l(_),c.push(x),n=k(c,n,"key");var S,T=0|t._crypto_aead_chacha20poly1305_keybytes();n.length!==T&&f(c,"invalid key length"),S=l(n),c.push(S);var w=new u(d-t._crypto_aead_chacha20poly1305_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_chacha20poly1305_decrypt(Y,null,p,o,d,0,v,m,0,x,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function N(e,r,a,_,n,s,c){var p=[];i(c);var o=null;null!=e&&(o=l(e=k(p,e,"secret_nonce")),e.length,p.push(o));var y=l(r=k(p,r,"ciphertext")),d=r.length;p.push(y),a=k(p,a,"mac");var v,m=0|t._crypto_box_macbytes();a.length!==m&&f(p,"invalid mac length"),v=l(a),p.push(v);var x=null,E=0;null!=_&&(x=l(_=k(p,_,"additional_data")),E=_.length,p.push(x)),n=k(p,n,"public_nonce");var S,T=0|t._crypto_aead_chacha20poly1305_npubbytes();n.length!==T&&f(p,"invalid public_nonce length"),S=l(n),p.push(S),s=k(p,s,"key");var w,Y=0|t._crypto_aead_chacha20poly1305_keybytes();s.length!==Y&&f(p,"invalid key length"),w=l(s),p.push(w);var B=new u(0|d),K=B.address;if(p.push(K),0===t._crypto_aead_chacha20poly1305_decrypt_detached(K,o,y,d,0,v,x,E,0,S,w)){var A=h(B,c);return g(p),A}b(p,"ciphertext cannot be decrypted using that key")}function L(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_chacha20poly1305_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_chacha20poly1305_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(o+t._crypto_aead_chacha20poly1305_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_chacha20poly1305_encrypt(w,null,p,o,0,y,d,0,v,m,E)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function O(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_chacha20poly1305_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_chacha20poly1305_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(0|o),w=T.address;c.push(w);var Y=new u(0|t._crypto_aead_chacha20poly1305_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_chacha20poly1305_encrypt_detached(w,B,null,p,o,0,y,d,0,v,m,E)){var K=h({ciphertext:T,mac:Y},s);return g(c),K}b(c,"invalid usage")}function U(e,r,a,_,n,s){var c=[];i(s);var p=null;null!=e&&(p=l(e=k(c,e,"secret_nonce")),e.length,c.push(p)),r=k(c,r,"ciphertext");var o,y=t._crypto_aead_chacha20poly1305_ietf_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),o=l(r),c.push(o);var v=null,m=0;null!=a&&(v=l(a=k(c,a,"additional_data")),m=a.length,c.push(v)),_=k(c,_,"public_nonce");var x,E=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),x=l(_),c.push(x),n=k(c,n,"key");var S,T=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();n.length!==T&&f(c,"invalid key length"),S=l(n),c.push(S);var w=new u(d-t._crypto_aead_chacha20poly1305_ietf_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_chacha20poly1305_ietf_decrypt(Y,null,p,o,d,0,v,m,0,x,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function C(e,r,a,_,n,s,c){var p=[];i(c);var o=null;null!=e&&(o=l(e=k(p,e,"secret_nonce")),e.length,p.push(o));var y=l(r=k(p,r,"ciphertext")),d=r.length;p.push(y),a=k(p,a,"mac");var v,m=0|t._crypto_box_macbytes();a.length!==m&&f(p,"invalid mac length"),v=l(a),p.push(v);var x=null,E=0;null!=_&&(x=l(_=k(p,_,"additional_data")),E=_.length,p.push(x)),n=k(p,n,"public_nonce");var S,T=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();n.length!==T&&f(p,"invalid public_nonce length"),S=l(n),p.push(S),s=k(p,s,"key");var w,Y=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();s.length!==Y&&f(p,"invalid key length"),w=l(s),p.push(w);var B=new u(0|d),K=B.address;if(p.push(K),0===t._crypto_aead_chacha20poly1305_ietf_decrypt_detached(K,o,y,d,0,v,x,E,0,S,w)){var A=h(B,c);return g(p),A}b(p,"ciphertext cannot be decrypted using that key")}function P(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(o+t._crypto_aead_chacha20poly1305_ietf_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_chacha20poly1305_ietf_encrypt(w,null,p,o,0,y,d,0,v,m,E)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function R(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(0|o),w=T.address;c.push(w);var Y=new u(0|t._crypto_aead_chacha20poly1305_ietf_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_chacha20poly1305_ietf_encrypt_detached(w,B,null,p,o,0,y,d,0,v,m,E)){var K=h({ciphertext:T,mac:Y},s);return g(c),K}b(c,"invalid usage")}function X(e){var r=[];i(e);var a=new u(0|t._crypto_aead_chacha20poly1305_ietf_keybytes()),_=a.address;r.push(_),t._crypto_aead_chacha20poly1305_ietf_keygen(_);var n=h(a,e);return g(r),n}function D(e){var r=[];i(e);var a=new u(0|t._crypto_aead_chacha20poly1305_keybytes()),_=a.address;r.push(_),t._crypto_aead_chacha20poly1305_keygen(_);var n=h(a,e);return g(r),n}function G(e,r,a,_,n,s){var c=[];i(s);var p=null;null!=e&&(p=l(e=k(c,e,"secret_nonce")),e.length,c.push(p)),r=k(c,r,"ciphertext");var o,y=t._crypto_aead_xchacha20poly1305_ietf_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),o=l(r),c.push(o);var v=null,m=0;null!=a&&(v=l(a=k(c,a,"additional_data")),m=a.length,c.push(v)),_=k(c,_,"public_nonce");var x,E=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),x=l(_),c.push(x),n=k(c,n,"key");var S,T=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();n.length!==T&&f(c,"invalid key length"),S=l(n),c.push(S);var w=new u(d-t._crypto_aead_xchacha20poly1305_ietf_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_xchacha20poly1305_ietf_decrypt(Y,null,p,o,d,0,v,m,0,x,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function F(e,r,a,_,n,s,c){var p=[];i(c);var o=null;null!=e&&(o=l(e=k(p,e,"secret_nonce")),e.length,p.push(o));var y=l(r=k(p,r,"ciphertext")),d=r.length;p.push(y),a=k(p,a,"mac");var v,m=0|t._crypto_box_macbytes();a.length!==m&&f(p,"invalid mac length"),v=l(a),p.push(v);var x=null,E=0;null!=_&&(x=l(_=k(p,_,"additional_data")),E=_.length,p.push(x)),n=k(p,n,"public_nonce");var S,T=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();n.length!==T&&f(p,"invalid public_nonce length"),S=l(n),p.push(S),s=k(p,s,"key");var w,Y=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();s.length!==Y&&f(p,"invalid key length"),w=l(s),p.push(w);var B=new u(0|d),K=B.address;if(p.push(K),0===t._crypto_aead_xchacha20poly1305_ietf_decrypt_detached(K,o,y,d,0,v,x,E,0,S,w)){var A=h(B,c);return g(p),A}b(p,"ciphertext cannot be decrypted using that key")}function V(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(o+t._crypto_aead_xchacha20poly1305_ietf_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_xchacha20poly1305_ietf_encrypt(w,null,p,o,0,y,d,0,v,m,E)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function q(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"message")),o=e.length;c.push(p);var y=null,d=0;null!=r&&(y=l(r=k(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=l(a=k(c,a,"secret_nonce")),a.length,c.push(v)),_=k(c,_,"public_nonce");var m,x=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();_.length!==x&&f(c,"invalid public_nonce length"),m=l(_),c.push(m),n=k(c,n,"key");var E,S=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),E=l(n),c.push(E);var T=new u(0|o),w=T.address;c.push(w);var Y=new u(0|t._crypto_aead_xchacha20poly1305_ietf_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_xchacha20poly1305_ietf_encrypt_detached(w,B,null,p,o,0,y,d,0,v,m,E)){var K=h({ciphertext:T,mac:Y},s);return g(c),K}b(c,"invalid usage")}function H(e){var r=[];i(e);var a=new u(0|t._crypto_aead_xchacha20poly1305_ietf_keybytes()),_=a.address;r.push(_),t._crypto_aead_xchacha20poly1305_ietf_keygen(_);var n=h(a,e);return g(r),n}function z(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_auth_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_auth_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_auth(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function W(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_auth_hmacsha256_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_auth_hmacsha256_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_auth_hmacsha256(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function j(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_auth_hmacsha256_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_auth_hmacsha256_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function J(e,r){var a=[];i(r);var _=null,n=0;null!=e&&(_=l(e=k(a,e,"key")),n=e.length,a.push(_));var s=new u(208).address;if(!(0|t._crypto_auth_hmacsha256_init(s,_,n))){var c=s;return g(a),c}b(a,"invalid usage")}function Q(e){var r=[];i(e);var a=new u(0|t._crypto_auth_hmacsha256_keybytes()),_=a.address;r.push(_),t._crypto_auth_hmacsha256_keygen(_);var n=h(a,e);return g(r),n}function Z(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_auth_hmacsha256_update(e,n,s)&&b(_,"invalid usage"),g(_)}function $(e,r,a){var _=[];e=k(_,e,"tag");var n,s=0|t._crypto_auth_hmacsha256_bytes();e.length!==s&&f(_,"invalid tag length"),n=l(e),_.push(n);var c=l(r=k(_,r,"message")),p=r.length;_.push(c),a=k(_,a,"key");var o,h=0|t._crypto_auth_hmacsha256_keybytes();a.length!==h&&f(_,"invalid key length"),o=l(a),_.push(o);var y=!(0|t._crypto_auth_hmacsha256_verify(n,c,p,0,o));return g(_),y}function ee(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_auth_hmacsha512_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_auth_hmacsha512_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_auth_hmacsha512(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function re(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_auth_hmacsha512256_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_auth_hmacsha512256_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_auth_hmacsha512256(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function te(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_auth_hmacsha512256_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_auth_hmacsha512256_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function ae(e,r){var a=[];i(r);var _=null,n=0;null!=e&&(_=l(e=k(a,e,"key")),n=e.length,a.push(_));var s=new u(416).address;if(!(0|t._crypto_auth_hmacsha512256_init(s,_,n))){var c=s;return g(a),c}b(a,"invalid usage")}function _e(e){var r=[];i(e);var a=new u(0|t._crypto_auth_hmacsha512256_keybytes()),_=a.address;r.push(_),t._crypto_auth_hmacsha512256_keygen(_);var n=h(a,e);return g(r),n}function ne(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_auth_hmacsha512256_update(e,n,s)&&b(_,"invalid usage"),g(_)}function se(e,r,a){var _=[];e=k(_,e,"tag");var n,s=0|t._crypto_auth_hmacsha512256_bytes();e.length!==s&&f(_,"invalid tag length"),n=l(e),_.push(n);var c=l(r=k(_,r,"message")),p=r.length;_.push(c),a=k(_,a,"key");var o,h=0|t._crypto_auth_hmacsha512256_keybytes();a.length!==h&&f(_,"invalid key length"),o=l(a),_.push(o);var y=!(0|t._crypto_auth_hmacsha512256_verify(n,c,p,0,o));return g(_),y}function ce(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_auth_hmacsha512_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_auth_hmacsha512_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function pe(e,r){var a=[];i(r);var _=null,n=0;null!=e&&(_=l(e=k(a,e,"key")),n=e.length,a.push(_));var s=new u(416).address;if(!(0|t._crypto_auth_hmacsha512_init(s,_,n))){var c=s;return g(a),c}b(a,"invalid usage")}function oe(e){var r=[];i(e);var a=new u(0|t._crypto_auth_hmacsha512_keybytes()),_=a.address;r.push(_),t._crypto_auth_hmacsha512_keygen(_);var n=h(a,e);return g(r),n}function he(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_auth_hmacsha512_update(e,n,s)&&b(_,"invalid usage"),g(_)}function ye(e,r,a){var _=[];e=k(_,e,"tag");var n,s=0|t._crypto_auth_hmacsha512_bytes();e.length!==s&&f(_,"invalid tag length"),n=l(e),_.push(n);var c=l(r=k(_,r,"message")),p=r.length;_.push(c),a=k(_,a,"key");var o,h=0|t._crypto_auth_hmacsha512_keybytes();a.length!==h&&f(_,"invalid key length"),o=l(a),_.push(o);var y=!(0|t._crypto_auth_hmacsha512_verify(n,c,p,0,o));return g(_),y}function ie(e){var r=[];i(e);var a=new u(0|t._crypto_auth_keybytes()),_=a.address;r.push(_),t._crypto_auth_keygen(_);var n=h(a,e);return g(r),n}function ue(e,r,a){var _=[];e=k(_,e,"tag");var n,s=0|t._crypto_auth_bytes();e.length!==s&&f(_,"invalid tag length"),n=l(e),_.push(n);var c=l(r=k(_,r,"message")),p=r.length;_.push(c),a=k(_,a,"key");var o,h=0|t._crypto_auth_keybytes();a.length!==h&&f(_,"invalid key length"),o=l(a),_.push(o);var y=!(0|t._crypto_auth_verify(n,c,p,0,o));return g(_),y}function le(e,r,a){var _=[];i(a),e=k(_,e,"publicKey");var n,s=0|t._crypto_box_publickeybytes();e.length!==s&&f(_,"invalid publicKey length"),n=l(e),_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_box_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_box_beforenmbytes()),y=o.address;if(_.push(y),!(0|t._crypto_box_beforenm(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function de(e,r,a){var _=[];i(a),e=k(_,e,"publicKey");var n,s=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();e.length!==s&&f(_,"invalid publicKey length"),n=l(e),_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes()),y=o.address;if(_.push(y),!(0|t._crypto_box_curve25519xchacha20poly1305_beforenm(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function ve(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),a=k(s,a,"publicKey");var d,v=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==v&&f(s,"invalid publicKey length"),d=l(a),s.push(d),_=k(s,_,"privateKey");var m,x=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();_.length!==x&&f(s,"invalid privateKey length"),m=l(_),s.push(m);var E=new u(0|p),S=E.address;s.push(S);var T=new u(0|t._crypto_box_curve25519xchacha20poly1305_macbytes()),w=T.address;if(s.push(w),!(0|t._crypto_box_curve25519xchacha20poly1305_detached(S,w,c,p,0,o,d,m))){var Y=h({ciphertext:E,mac:T},n);return g(s),Y}b(s,"invalid usage")}function ge(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"sharedKey");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=l(a),n.push(y);var v=new u(0|c),m=v.address;n.push(m);var x=new u(0|t._crypto_box_curve25519xchacha20poly1305_macbytes()),E=x.address;if(n.push(E),!(0|t._crypto_box_curve25519xchacha20poly1305_detached_afternm(m,E,s,c,0,p,y))){var S=h({ciphertext:v,mac:x},_);return g(n),S}b(n,"invalid usage")}function be(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),a=k(s,a,"publicKey");var d,v=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==v&&f(s,"invalid publicKey length"),d=l(a),s.push(d),_=k(s,_,"privateKey");var m,x=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();_.length!==x&&f(s,"invalid privateKey length"),m=l(_),s.push(m);var E=new u(p+t._crypto_box_curve25519xchacha20poly1305_macbytes()|0),S=E.address;if(s.push(S),!(0|t._crypto_box_curve25519xchacha20poly1305_easy(S,c,p,0,o,d,m))){var T=h(E,n);return g(s),T}b(s,"invalid usage")}function fe(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"sharedKey");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=l(a),n.push(y);var v=new u(c+t._crypto_box_curve25519xchacha20poly1305_macbytes()|0),m=v.address;if(n.push(m),!(0|t._crypto_box_curve25519xchacha20poly1305_easy_afternm(m,s,c,0,p,y))){var x=h(v,_);return g(n),x}b(n,"invalid usage")}function me(e){var r=[];i(e);var a=new u(0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),s=n.address;r.push(s),t._crypto_box_curve25519xchacha20poly1305_keypair(_,s);var c=h({publicKey:a,privateKey:n,keyType:"curve25519"},e);return g(r),c}function ke(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"ciphertext")),o=e.length;c.push(p),r=k(c,r,"mac");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_macbytes();r.length!==d&&f(c,"invalid mac length"),y=l(r),c.push(y),a=k(c,a,"nonce");var v,m=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();a.length!==m&&f(c,"invalid nonce length"),v=l(a),c.push(v),_=k(c,_,"publicKey");var x,E=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();_.length!==E&&f(c,"invalid publicKey length"),x=l(_),c.push(x),n=k(c,n,"privateKey");var S,T=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();n.length!==T&&f(c,"invalid privateKey length"),S=l(n),c.push(S);var w=new u(0|o),Y=w.address;if(c.push(Y),!(0|t._crypto_box_curve25519xchacha20poly1305_open_detached(Y,p,y,o,0,v,x,S))){var B=h(w,s);return g(c),B}b(c,"incorrect key pair for the given ciphertext")}function xe(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"ciphertext")),p=e.length;s.push(c),r=k(s,r,"mac");var o,y=0|t._crypto_box_curve25519xchacha20poly1305_macbytes();r.length!==y&&f(s,"invalid mac length"),o=l(r),s.push(o),a=k(s,a,"nonce");var d,v=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();a.length!==v&&f(s,"invalid nonce length"),d=l(a),s.push(d),_=k(s,_,"sharedKey");var m,x=0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes();_.length!==x&&f(s,"invalid sharedKey length"),m=l(_),s.push(m);var E=new u(0|p),S=E.address;if(s.push(S),!(0|t._crypto_box_curve25519xchacha20poly1305_open_detached_afternm(S,c,o,p,0,d,m))){var T=h(E,n);return g(s),T}b(s,"incorrect secret key for the given ciphertext")}function Ee(e,r,a,_,n){var s=[];i(n),e=k(s,e,"ciphertext");var c,p=t._crypto_box_curve25519xchacha20poly1305_macbytes(),o=e.length;o<p&&f(s,"ciphertext is too short"),c=l(e),s.push(c),r=k(s,r,"nonce");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==d&&f(s,"invalid nonce length"),y=l(r),s.push(y),a=k(s,a,"publicKey");var v,m=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==m&&f(s,"invalid publicKey length"),v=l(a),s.push(v),_=k(s,_,"privateKey");var x,E=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();_.length!==E&&f(s,"invalid privateKey length"),x=l(_),s.push(x);var S=new u(o-t._crypto_box_curve25519xchacha20poly1305_macbytes()|0),T=S.address;if(s.push(T),!(0|t._crypto_box_curve25519xchacha20poly1305_open_easy(T,c,o,0,y,v,x))){var w=h(S,n);return g(s),w}b(s,"incorrect key pair for the given ciphertext")}function Se(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"ciphertext")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"sharedKey");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=l(a),n.push(y);var v=new u(c-t._crypto_box_curve25519xchacha20poly1305_macbytes()|0),m=v.address;if(n.push(m),!(0|t._crypto_box_curve25519xchacha20poly1305_open_easy_afternm(m,s,c,0,p,y))){var x=h(v,_);return g(n),x}b(n,"incorrect secret key for the given ciphertext")}function Te(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"publicKey");var c,p=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();r.length!==p&&f(_,"invalid publicKey length"),c=l(r),_.push(c);var o=new u(s+t._crypto_box_curve25519xchacha20poly1305_sealbytes()|0),y=o.address;_.push(y),t._crypto_box_curve25519xchacha20poly1305_seal(y,n,s,0,c);var d=h(o,a);return g(_),d}function we(e,r,a,_){var n=[];i(_),e=k(n,e,"ciphertext");var s,c=t._crypto_box_curve25519xchacha20poly1305_sealbytes(),p=e.length;p<c&&f(n,"ciphertext is too short"),s=l(e),n.push(s),r=k(n,r,"publicKey");var o,y=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();r.length!==y&&f(n,"invalid publicKey length"),o=l(r),n.push(o),a=k(n,a,"secretKey");var d,v=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();a.length!==v&&f(n,"invalid secretKey length"),d=l(a),n.push(d);var b=new u(p-t._crypto_box_curve25519xchacha20poly1305_sealbytes()|0),m=b.address;n.push(m),t._crypto_box_curve25519xchacha20poly1305_seal_open(m,s,p,0,o,d);var x=h(b,_);return g(n),x}function Ye(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_box_curve25519xchacha20poly1305_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_box_curve25519xchacha20poly1305_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"x25519"};return g(a),y}b(a,"invalid usage")}function Be(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_box_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),a=k(s,a,"publicKey");var d,v=0|t._crypto_box_publickeybytes();a.length!==v&&f(s,"invalid publicKey length"),d=l(a),s.push(d),_=k(s,_,"privateKey");var m,x=0|t._crypto_box_secretkeybytes();_.length!==x&&f(s,"invalid privateKey length"),m=l(_),s.push(m);var E=new u(0|p),S=E.address;s.push(S);var T=new u(0|t._crypto_box_macbytes()),w=T.address;if(s.push(w),!(0|t._crypto_box_detached(S,w,c,p,0,o,d,m))){var Y=h({ciphertext:E,mac:T},n);return g(s),Y}b(s,"invalid usage")}function Ke(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_box_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),a=k(s,a,"publicKey");var d,v=0|t._crypto_box_publickeybytes();a.length!==v&&f(s,"invalid publicKey length"),d=l(a),s.push(d),_=k(s,_,"privateKey");var m,x=0|t._crypto_box_secretkeybytes();_.length!==x&&f(s,"invalid privateKey length"),m=l(_),s.push(m);var E=new u(p+t._crypto_box_macbytes()|0),S=E.address;if(s.push(S),!(0|t._crypto_box_easy(S,c,p,0,o,d,m))){var T=h(E,n);return g(s),T}b(s,"invalid usage")}function Ae(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_box_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"sharedKey");var y,d=0|t._crypto_box_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=l(a),n.push(y);var v=new u(c+t._crypto_box_macbytes()|0),m=v.address;if(n.push(m),!(0|t._crypto_box_easy_afternm(m,s,c,0,p,y))){var x=h(v,_);return g(n),x}b(n,"invalid usage")}function Ie(e){var r=[];i(e);var a=new u(0|t._crypto_box_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_box_secretkeybytes()),s=n.address;if(r.push(s),!(0|t._crypto_box_keypair(_,s))){var c={publicKey:h(a,e),privateKey:h(n,e),keyType:"x25519"};return g(r),c}b(r,"internal error")}function Me(e,r,a,_,n,s){var c=[];i(s);var p=l(e=k(c,e,"ciphertext")),o=e.length;c.push(p),r=k(c,r,"mac");var y,d=0|t._crypto_box_macbytes();r.length!==d&&f(c,"invalid mac length"),y=l(r),c.push(y),a=k(c,a,"nonce");var v,m=0|t._crypto_box_noncebytes();a.length!==m&&f(c,"invalid nonce length"),v=l(a),c.push(v),_=k(c,_,"publicKey");var x,E=0|t._crypto_box_publickeybytes();_.length!==E&&f(c,"invalid publicKey length"),x=l(_),c.push(x),n=k(c,n,"privateKey");var S,T=0|t._crypto_box_secretkeybytes();n.length!==T&&f(c,"invalid privateKey length"),S=l(n),c.push(S);var w=new u(0|o),Y=w.address;if(c.push(Y),!(0|t._crypto_box_open_detached(Y,p,y,o,0,v,x,S))){var B=h(w,s);return g(c),B}b(c,"incorrect key pair for the given ciphertext")}function Ne(e,r,a,_,n){var s=[];i(n),e=k(s,e,"ciphertext");var c,p=t._crypto_box_macbytes(),o=e.length;o<p&&f(s,"ciphertext is too short"),c=l(e),s.push(c),r=k(s,r,"nonce");var y,d=0|t._crypto_box_noncebytes();r.length!==d&&f(s,"invalid nonce length"),y=l(r),s.push(y),a=k(s,a,"publicKey");var v,m=0|t._crypto_box_publickeybytes();a.length!==m&&f(s,"invalid publicKey length"),v=l(a),s.push(v),_=k(s,_,"privateKey");var x,E=0|t._crypto_box_secretkeybytes();_.length!==E&&f(s,"invalid privateKey length"),x=l(_),s.push(x);var S=new u(o-t._crypto_box_macbytes()|0),T=S.address;if(s.push(T),!(0|t._crypto_box_open_easy(T,c,o,0,y,v,x))){var w=h(S,n);return g(s),w}b(s,"incorrect key pair for the given ciphertext")}function Le(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"ciphertext")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_box_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"sharedKey");var y,d=0|t._crypto_box_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=l(a),n.push(y);var v=new u(c-t._crypto_box_macbytes()|0),m=v.address;if(n.push(m),!(0|t._crypto_box_open_easy_afternm(m,s,c,0,p,y))){var x=h(v,_);return g(n),x}b(n,"incorrect secret key for the given ciphertext")}function Oe(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"publicKey");var c,p=0|t._crypto_box_publickeybytes();r.length!==p&&f(_,"invalid publicKey length"),c=l(r),_.push(c);var o=new u(s+t._crypto_box_sealbytes()|0),y=o.address;if(_.push(y),!(0|t._crypto_box_seal(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function Ue(e,r,a,_){var n=[];i(_),e=k(n,e,"ciphertext");var s,c=t._crypto_box_sealbytes(),p=e.length;p<c&&f(n,"ciphertext is too short"),s=l(e),n.push(s),r=k(n,r,"publicKey");var o,y=0|t._crypto_box_publickeybytes();r.length!==y&&f(n,"invalid publicKey length"),o=l(r),n.push(o),a=k(n,a,"privateKey");var d,v=0|t._crypto_box_secretkeybytes();a.length!==v&&f(n,"invalid privateKey length"),d=l(a),n.push(d);var m=new u(p-t._crypto_box_sealbytes()|0),x=m.address;if(n.push(x),!(0|t._crypto_box_seal_open(x,s,p,0,o,d))){var E=h(m,_);return g(n),E}b(n,"incorrect key pair for the given ciphertext")}function Ce(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_box_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_box_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_box_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_box_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"x25519"};return g(a),y}b(a,"invalid usage")}function Pe(e,r,a){var _=[];i(a),e=k(_,e,"p");var n,s=0|t._crypto_core_ed25519_bytes();e.length!==s&&f(_,"invalid p length"),n=l(e),_.push(n),r=k(_,r,"q");var c,p=0|t._crypto_core_ed25519_bytes();r.length!==p&&f(_,"invalid q length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ed25519_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_core_ed25519_add(y,n,c))){var d=h(o,a);return g(_),d}b(_,"input is an invalid element")}function Re(e,r){var a=[];i(r);var _=l(e=k(a,e,"r"));e.length,a.push(_);var n=new u(0|t._crypto_core_ed25519_bytes()),s=n.address;if(a.push(s),!(0|t._crypto_core_ed25519_from_hash(s,_))){var c=h(n,r);return g(a),c}b(a,"invalid usage")}function Xe(e,r){var a=[];i(r);var _=l(e=k(a,e,"r"));e.length,a.push(_);var n=new u(0|t._crypto_core_ed25519_bytes()),s=n.address;if(a.push(s),!(0|t._crypto_core_ed25519_from_uniform(s,_))){var c=h(n,r);return g(a),c}b(a,"invalid usage")}function De(e,r){var a=[];i(r),e=k(a,e,"repr");var _,n=0|t._crypto_core_ed25519_bytes();e.length!==n&&f(a,"invalid repr length"),_=l(e),a.push(_);var s=1==(0|t._crypto_core_ed25519_is_valid_point(_));return g(a),s}function Ge(e){var r=[];i(e);var a=new u(0|t._crypto_core_ed25519_bytes()),_=a.address;r.push(_),t._crypto_core_ed25519_random(_);var n=h(a,e);return g(r),n}function Fe(e,r,a){var _=[];i(a),e=k(_,e,"x");var n,s=0|t._crypto_core_ed25519_scalarbytes();e.length!==s&&f(_,"invalid x length"),n=l(e),_.push(n),r=k(_,r,"y");var c,p=0|t._crypto_core_ed25519_scalarbytes();r.length!==p&&f(_,"invalid y length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ed25519_scalarbytes()),y=o.address;_.push(y),t._crypto_core_ed25519_scalar_add(y,n,c);var d=h(o,a);return g(_),d}function Ve(e,r){var a=[];i(r),e=k(a,e,"s");var _,n=0|t._crypto_core_ed25519_scalarbytes();e.length!==n&&f(a,"invalid s length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ed25519_scalarbytes()),c=s.address;a.push(c),t._crypto_core_ed25519_scalar_complement(c,_);var p=h(s,r);return g(a),p}function qe(e,r){var a=[];i(r),e=k(a,e,"s");var _,n=0|t._crypto_core_ed25519_scalarbytes();e.length!==n&&f(a,"invalid s length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ed25519_scalarbytes()),c=s.address;if(a.push(c),!(0|t._crypto_core_ed25519_scalar_invert(c,_))){var p=h(s,r);return g(a),p}b(a,"invalid reciprocate")}function He(e,r,a){var _=[];i(a),e=k(_,e,"x");var n,s=0|t._crypto_core_ed25519_scalarbytes();e.length!==s&&f(_,"invalid x length"),n=l(e),_.push(n),r=k(_,r,"y");var c,p=0|t._crypto_core_ed25519_scalarbytes();r.length!==p&&f(_,"invalid y length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ed25519_scalarbytes()),y=o.address;_.push(y),t._crypto_core_ed25519_scalar_mul(y,n,c);var d=h(o,a);return g(_),d}function ze(e,r){var a=[];i(r),e=k(a,e,"s");var _,n=0|t._crypto_core_ed25519_scalarbytes();e.length!==n&&f(a,"invalid s length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ed25519_scalarbytes()),c=s.address;a.push(c),t._crypto_core_ed25519_scalar_negate(c,_);var p=h(s,r);return g(a),p}function We(e){var r=[];i(e);var a=new u(0|t._crypto_core_ed25519_scalarbytes()),_=a.address;r.push(_),t._crypto_core_ed25519_scalar_random(_);var n=h(a,e);return g(r),n}function je(e,r){var a=[];i(r),e=k(a,e,"sample");var _,n=0|t._crypto_core_ed25519_nonreducedscalarbytes();e.length!==n&&f(a,"invalid sample length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ed25519_scalarbytes()),c=s.address;a.push(c),t._crypto_core_ed25519_scalar_reduce(c,_);var p=h(s,r);return g(a),p}function Je(e,r,a){var _=[];i(a),e=k(_,e,"x");var n,s=0|t._crypto_core_ed25519_scalarbytes();e.length!==s&&f(_,"invalid x length"),n=l(e),_.push(n),r=k(_,r,"y");var c,p=0|t._crypto_core_ed25519_scalarbytes();r.length!==p&&f(_,"invalid y length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ed25519_scalarbytes()),y=o.address;_.push(y),t._crypto_core_ed25519_scalar_sub(y,n,c);var d=h(o,a);return g(_),d}function Qe(e,r,a){var _=[];i(a),e=k(_,e,"p");var n,s=0|t._crypto_core_ed25519_bytes();e.length!==s&&f(_,"invalid p length"),n=l(e),_.push(n),r=k(_,r,"q");var c,p=0|t._crypto_core_ed25519_bytes();r.length!==p&&f(_,"invalid q length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ed25519_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_core_ed25519_sub(y,n,c))){var d=h(o,a);return g(_),d}b(_,"input is an invalid element")}function Ze(e,r,a,_){var n=[];i(_),e=k(n,e,"input");var s,c=0|t._crypto_core_hchacha20_inputbytes();e.length!==c&&f(n,"invalid input length"),s=l(e),n.push(s),r=k(n,r,"privateKey");var p,o=0|t._crypto_core_hchacha20_keybytes();r.length!==o&&f(n,"invalid privateKey length"),p=l(r),n.push(p);var y=null;null!=a&&(y=l(a=k(n,a,"constant")),a.length,n.push(y));var d=new u(0|t._crypto_core_hchacha20_outputbytes()),v=d.address;if(n.push(v),!(0|t._crypto_core_hchacha20(v,s,p,y))){var m=h(d,_);return g(n),m}b(n,"invalid usage")}function $e(e,r,a,_){var n=[];i(_),e=k(n,e,"input");var s,c=0|t._crypto_core_hsalsa20_inputbytes();e.length!==c&&f(n,"invalid input length"),s=l(e),n.push(s),r=k(n,r,"privateKey");var p,o=0|t._crypto_core_hsalsa20_keybytes();r.length!==o&&f(n,"invalid privateKey length"),p=l(r),n.push(p);var y=null;null!=a&&(y=l(a=k(n,a,"constant")),a.length,n.push(y));var d=new u(0|t._crypto_core_hsalsa20_outputbytes()),v=d.address;if(n.push(v),!(0|t._crypto_core_hsalsa20(v,s,p,y))){var m=h(d,_);return g(n),m}b(n,"invalid usage")}function er(e,r,a){var _=[];i(a),e=k(_,e,"p");var n,s=0|t._crypto_core_ristretto255_bytes();e.length!==s&&f(_,"invalid p length"),n=l(e),_.push(n),r=k(_,r,"q");var c,p=0|t._crypto_core_ristretto255_bytes();r.length!==p&&f(_,"invalid q length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ristretto255_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_core_ristretto255_add(y,n,c))){var d=h(o,a);return g(_),d}b(_,"input is an invalid element")}function rr(e,r){var a=[];i(r);var _=l(e=k(a,e,"r"));e.length,a.push(_);var n=new u(0|t._crypto_core_ristretto255_bytes()),s=n.address;if(a.push(s),!(0|t._crypto_core_ristretto255_from_hash(s,_))){var c=h(n,r);return g(a),c}b(a,"invalid usage")}function tr(e,r){var a=[];i(r),e=k(a,e,"repr");var _,n=0|t._crypto_core_ristretto255_bytes();e.length!==n&&f(a,"invalid repr length"),_=l(e),a.push(_);var s=1==(0|t._crypto_core_ristretto255_is_valid_point(_));return g(a),s}function ar(e){var r=[];i(e);var a=new u(0|t._crypto_core_ristretto255_bytes()),_=a.address;r.push(_),t._crypto_core_ristretto255_random(_);var n=h(a,e);return g(r),n}function _r(e,r,a){var _=[];i(a),e=k(_,e,"x");var n,s=0|t._crypto_core_ristretto255_scalarbytes();e.length!==s&&f(_,"invalid x length"),n=l(e),_.push(n),r=k(_,r,"y");var c,p=0|t._crypto_core_ristretto255_scalarbytes();r.length!==p&&f(_,"invalid y length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ristretto255_scalarbytes()),y=o.address;_.push(y),t._crypto_core_ristretto255_scalar_add(y,n,c);var d=h(o,a);return g(_),d}function nr(e,r){var a=[];i(r),e=k(a,e,"s");var _,n=0|t._crypto_core_ristretto255_scalarbytes();e.length!==n&&f(a,"invalid s length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ristretto255_scalarbytes()),c=s.address;a.push(c),t._crypto_core_ristretto255_scalar_complement(c,_);var p=h(s,r);return g(a),p}function sr(e,r){var a=[];i(r),e=k(a,e,"s");var _,n=0|t._crypto_core_ristretto255_scalarbytes();e.length!==n&&f(a,"invalid s length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ristretto255_scalarbytes()),c=s.address;if(a.push(c),!(0|t._crypto_core_ristretto255_scalar_invert(c,_))){var p=h(s,r);return g(a),p}b(a,"invalid reciprocate")}function cr(e,r,a){var _=[];i(a),e=k(_,e,"x");var n,s=0|t._crypto_core_ristretto255_scalarbytes();e.length!==s&&f(_,"invalid x length"),n=l(e),_.push(n),r=k(_,r,"y");var c,p=0|t._crypto_core_ristretto255_scalarbytes();r.length!==p&&f(_,"invalid y length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ristretto255_scalarbytes()),y=o.address;_.push(y),t._crypto_core_ristretto255_scalar_mul(y,n,c);var d=h(o,a);return g(_),d}function pr(e,r){var a=[];i(r),e=k(a,e,"s");var _,n=0|t._crypto_core_ristretto255_scalarbytes();e.length!==n&&f(a,"invalid s length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ristretto255_scalarbytes()),c=s.address;a.push(c),t._crypto_core_ristretto255_scalar_negate(c,_);var p=h(s,r);return g(a),p}function or(e){var r=[];i(e);var a=new u(0|t._crypto_core_ristretto255_scalarbytes()),_=a.address;r.push(_),t._crypto_core_ristretto255_scalar_random(_);var n=h(a,e);return g(r),n}function hr(e,r){var a=[];i(r),e=k(a,e,"sample");var _,n=0|t._crypto_core_ristretto255_nonreducedscalarbytes();e.length!==n&&f(a,"invalid sample length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ristretto255_scalarbytes()),c=s.address;a.push(c),t._crypto_core_ristretto255_scalar_reduce(c,_);var p=h(s,r);return g(a),p}function yr(e,r,a){var _=[];i(a),e=k(_,e,"x");var n,s=0|t._crypto_core_ristretto255_scalarbytes();e.length!==s&&f(_,"invalid x length"),n=l(e),_.push(n),r=k(_,r,"y");var c,p=0|t._crypto_core_ristretto255_scalarbytes();r.length!==p&&f(_,"invalid y length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ristretto255_scalarbytes()),y=o.address;_.push(y),t._crypto_core_ristretto255_scalar_sub(y,n,c);var d=h(o,a);return g(_),d}function ir(e,r,a){var _=[];i(a),e=k(_,e,"p");var n,s=0|t._crypto_core_ristretto255_bytes();e.length!==s&&f(_,"invalid p length"),n=l(e),_.push(n),r=k(_,r,"q");var c,p=0|t._crypto_core_ristretto255_bytes();r.length!==p&&f(_,"invalid q length"),c=l(r),_.push(c);var o=new u(0|t._crypto_core_ristretto255_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_core_ristretto255_sub(y,n,c))){var d=h(o,a);return g(_),d}b(_,"input is an invalid element")}function ur(e,r,a,_){var n=[];i(_),m(n,e,"hash_length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(n,"hash_length must be an unsigned integer");var s=l(r=k(n,r,"message")),c=r.length;n.push(s);var p=null,o=0;null!=a&&(p=l(a=k(n,a,"key")),o=a.length,n.push(p));var y=new u(e|=0),d=y.address;if(n.push(d),!(0|t._crypto_generichash(d,e,s,c,0,p,o))){var v=h(y,_);return g(n),v}b(n,"invalid usage")}function lr(e,r,a,_,n){var s=[];i(n),m(s,e,"subkey_len"),("number"!=typeof e||(0|e)!==e||e<0)&&f(s,"subkey_len must be an unsigned integer");var c=null,p=0;null!=r&&(c=l(r=k(s,r,"key")),p=r.length,s.push(c));var o=null,y=0;null!=a&&(a=k(s,a,"id"),y=0|t._crypto_generichash_blake2b_saltbytes(),a.length!==y&&f(s,"invalid id length"),o=l(a),s.push(o));var d=null,v=0;null!=_&&(_=k(s,_,"ctx"),v=0|t._crypto_generichash_blake2b_personalbytes(),_.length!==v&&f(s,"invalid ctx length"),d=l(_),s.push(d));var x=new u(0|e),E=x.address;if(s.push(E),!(0|t._crypto_generichash_blake2b_salt_personal(E,e,null,0,0,c,p,o,d))){var S=h(x,n);return g(s),S}b(s,"invalid usage")}function dr(e,r,a){var _=[];i(a),m(_,e,"state_address"),m(_,r,"hash_length"),("number"!=typeof r||(0|r)!==r||r<0)&&f(_,"hash_length must be an unsigned integer");var n=new u(r|=0),s=n.address;if(_.push(s),!(0|t._crypto_generichash_final(e,s,r))){var c=(t._free(e),h(n,a));return g(_),c}b(_,"invalid usage")}function vr(e,r,a){var _=[];i(a);var n=null,s=0;null!=e&&(n=l(e=k(_,e,"key")),s=e.length,_.push(n)),m(_,r,"hash_length"),("number"!=typeof r||(0|r)!==r||r<0)&&f(_,"hash_length must be an unsigned integer");var c=new u(357).address;if(!(0|t._crypto_generichash_init(c,n,s,r))){var p=c;return g(_),p}b(_,"invalid usage")}function gr(e){var r=[];i(e);var a=new u(0|t._crypto_generichash_keybytes()),_=a.address;r.push(_),t._crypto_generichash_keygen(_);var n=h(a,e);return g(r),n}function br(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_generichash_update(e,n,s)&&b(_,"invalid usage"),g(_)}function fr(e,r){var a=[];i(r);var _=l(e=k(a,e,"message")),n=e.length;a.push(_);var s=new u(0|t._crypto_hash_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_hash(c,_,n,0))){var p=h(s,r);return g(a),p}b(a,"invalid usage")}function mr(e,r){var a=[];i(r);var _=l(e=k(a,e,"message")),n=e.length;a.push(_);var s=new u(0|t._crypto_hash_sha256_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_hash_sha256(c,_,n,0))){var p=h(s,r);return g(a),p}b(a,"invalid usage")}function kr(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_hash_sha256_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_hash_sha256_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function xr(e){var r=[];i(e);var a=new u(104).address;if(!(0|t._crypto_hash_sha256_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Er(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_hash_sha256_update(e,n,s)&&b(_,"invalid usage"),g(_)}function Sr(e,r){var a=[];i(r);var _=l(e=k(a,e,"message")),n=e.length;a.push(_);var s=new u(0|t._crypto_hash_sha3256_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_hash_sha3256(c,_,n))){var p=h(s,r);return g(a),p}b(a,"invalid usage")}function Tr(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_hash_sha3256_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_hash_sha3256_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function wr(e){var r=[];i(e);var a=new u(256).address;if(!(0|t._crypto_hash_sha3256_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Yr(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_hash_sha3256_update(e,n,s)&&b(_,"invalid usage"),g(_)}function Br(e,r){var a=[];i(r);var _=l(e=k(a,e,"message")),n=e.length;a.push(_);var s=new u(0|t._crypto_hash_sha3512_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_hash_sha3512(c,_,n))){var p=h(s,r);return g(a),p}b(a,"invalid usage")}function Kr(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_hash_sha3512_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_hash_sha3512_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function Ar(e){var r=[];i(e);var a=new u(256).address;if(!(0|t._crypto_hash_sha3512_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Ir(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_hash_sha3512_update(e,n,s)&&b(_,"invalid usage"),g(_)}function Mr(e,r){var a=[];i(r);var _=l(e=k(a,e,"message")),n=e.length;a.push(_);var s=new u(0|t._crypto_hash_sha512_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_hash_sha512(c,_,n,0))){var p=h(s,r);return g(a),p}b(a,"invalid usage")}function Nr(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_hash_sha512_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_hash_sha512_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function Lr(e){var r=[];i(e);var a=new u(208).address;if(!(0|t._crypto_hash_sha512_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Or(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_hash_sha512_update(e,n,s)&&b(_,"invalid usage"),g(_)}function Ur(e,r,a){var _=[];i(a),e=k(_,e,"input");var n,s=0|t._crypto_ipcrypt_bytes();e.length!==s&&f(_,"invalid input length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_ipcrypt_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_ipcrypt_bytes()),y=o.address;_.push(y),t._crypto_ipcrypt_decrypt(y,n,c);var d=h(o,a);return g(_),d}function Cr(e,r,a){var _=[];i(a),e=k(_,e,"input");var n,s=0|t._crypto_ipcrypt_bytes();e.length!==s&&f(_,"invalid input length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_ipcrypt_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_ipcrypt_bytes()),y=o.address;_.push(y),t._crypto_ipcrypt_encrypt(y,n,c);var d=h(o,a);return g(_),d}function Pr(e){var r=[];i(e);var a=new u(0|t._crypto_ipcrypt_keybytes()),_=a.address;r.push(_),t._crypto_ipcrypt_keygen(_);var n=h(a,e);return g(r),n}function Rr(e,r,a){var _=[];i(a),e=k(_,e,"input");var n,s=0|t._crypto_ipcrypt_nd_outputbytes();e.length!==s&&f(_,"invalid input length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_ipcrypt_nd_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_ipcrypt_nd_inputbytes()),y=o.address;_.push(y),t._crypto_ipcrypt_nd_decrypt(y,n,c);var d=h(o,a);return g(_),d}function Xr(e,r,a,_){var n=[];i(_),e=k(n,e,"input");var s,c=0|t._crypto_ipcrypt_nd_inputbytes();e.length!==c&&f(n,"invalid input length"),s=l(e),n.push(s),r=k(n,r,"tweak");var p,o=0|t._crypto_ipcrypt_nd_tweakbytes();r.length!==o&&f(n,"invalid tweak length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_ipcrypt_nd_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(0|t._crypto_ipcrypt_nd_outputbytes()),b=v.address;n.push(b),t._crypto_ipcrypt_nd_encrypt(b,s,p,y);var m=h(v,_);return g(n),m}function Dr(e){var r=[];i(e);var a=new u(0|t._crypto_ipcrypt_nd_keybytes()),_=a.address;r.push(_),t._crypto_ipcrypt_nd_keygen(_);var n=h(a,e);return g(r),n}function Gr(e,r,a){var _=[];i(a),e=k(_,e,"input");var n,s=0|t._crypto_ipcrypt_ndx_outputbytes();e.length!==s&&f(_,"invalid input length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_ipcrypt_ndx_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_ipcrypt_ndx_inputbytes()),y=o.address;_.push(y),t._crypto_ipcrypt_ndx_decrypt(y,n,c);var d=h(o,a);return g(_),d}function Fr(e,r,a,_){var n=[];i(_),e=k(n,e,"input");var s,c=0|t._crypto_ipcrypt_ndx_inputbytes();e.length!==c&&f(n,"invalid input length"),s=l(e),n.push(s),r=k(n,r,"tweak");var p,o=0|t._crypto_ipcrypt_ndx_tweakbytes();r.length!==o&&f(n,"invalid tweak length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_ipcrypt_ndx_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(0|t._crypto_ipcrypt_ndx_outputbytes()),b=v.address;n.push(b),t._crypto_ipcrypt_ndx_encrypt(b,s,p,y);var m=h(v,_);return g(n),m}function Vr(e){var r=[];i(e);var a=new u(0|t._crypto_ipcrypt_ndx_keybytes()),_=a.address;r.push(_),t._crypto_ipcrypt_ndx_keygen(_);var n=h(a,e);return g(r),n}function qr(e,r,a){var _=[];i(a),e=k(_,e,"input");var n,s=0|t._crypto_ipcrypt_pfx_bytes();e.length!==s&&f(_,"invalid input length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_ipcrypt_pfx_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_ipcrypt_pfx_bytes()),y=o.address;_.push(y),t._crypto_ipcrypt_pfx_decrypt(y,n,c);var d=h(o,a);return g(_),d}function Hr(e,r,a){var _=[];i(a),e=k(_,e,"input");var n,s=0|t._crypto_ipcrypt_pfx_bytes();e.length!==s&&f(_,"invalid input length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_ipcrypt_pfx_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_ipcrypt_pfx_bytes()),y=o.address;_.push(y),t._crypto_ipcrypt_pfx_encrypt(y,n,c);var d=h(o,a);return g(_),d}function zr(e){var r=[];i(e);var a=new u(0|t._crypto_ipcrypt_pfx_keybytes()),_=a.address;r.push(_),t._crypto_ipcrypt_pfx_keygen(_);var n=h(a,e);return g(r),n}function Wr(e,r,a,n,s){var c=[];i(s),m(c,e,"subkey_len"),("number"!=typeof e||(0|e)!==e||e<0)&&f(c,"subkey_len must be an unsigned integer"),m(c,r,"subkey_id");var p,o=0;if("bigint"==typeof r&&r>=BigInt(0)){const e=r>>BigInt(32);e>BigInt(4294967295)&&f(c,"subkey_id cannot be more than 64 bits"),o=Number(e),p=Number(r&BigInt(4294967295))}else"number"==typeof r&&(0|r)===r&&r>=0?p=r:f(c,"subkey_id must be an unsigned integer or bigint");"string"!=typeof a&&f(c,"ctx must be a string"),(a=_(a+"\0")).length-1!==t._crypto_kdf_contextbytes()&&f(c,"invalid ctx length");var y=l(a);a.length,c.push(y),n=k(c,n,"key");var d,v=0|t._crypto_kdf_keybytes();n.length!==v&&f(c,"invalid key length"),d=l(n),c.push(d);var b=new u(0|e),x=b.address;c.push(x),t._crypto_kdf_derive_from_key(x,e,p,o,y,d);var E=h(b,s);return g(c),E}function jr(e){var r=[];i(e);var a=new u(0|t._crypto_kdf_keybytes()),_=a.address;r.push(_),t._crypto_kdf_keygen(_);var n=h(a,e);return g(r),n}function Jr(e,r,a){var _=[];i(a),e=k(_,e,"ciphertext");var n,s=0|t._crypto_kem_ciphertextbytes();e.length!==s&&f(_,"invalid ciphertext length"),n=l(e),_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_kem_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_kem_sharedsecretbytes()),y=o.address;if(_.push(y),!(0|t._crypto_kem_dec(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function Qr(e,r){var a=[];i(r),e=k(a,e,"publicKey");var _,n=0|t._crypto_kem_publickeybytes();e.length!==n&&f(a,"invalid publicKey length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kem_ciphertextbytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kem_sharedsecretbytes()),o=p.address;if(a.push(o),!(0|t._crypto_kem_enc(c,o,_))){var y=h({ciphertext:s,sharedSecret:p},r);return g(a),y}b(a,"invalid usage")}function Zr(e){var r=[];i(e);var a=new u(0|t._crypto_kem_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_kem_secretkeybytes()),s=n.address;if(r.push(s),!(0|t._crypto_kem_keypair(_,s))){var c={publicKey:h(a,e),privateKey:h(n,e),keyType:"xwing"};return g(r),c}b(r,"internal error")}function $r(e,r,a){var _=[];i(a),e=k(_,e,"ciphertext");var n,s=0|t._crypto_kem_mlkem768_ciphertextbytes();e.length!==s&&f(_,"invalid ciphertext length"),n=l(e),_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_kem_mlkem768_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_kem_mlkem768_sharedsecretbytes()),y=o.address;if(_.push(y),!(0|t._crypto_kem_mlkem768_dec(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function et(e,r){var a=[];i(r),e=k(a,e,"publicKey");var _,n=0|t._crypto_kem_mlkem768_publickeybytes();e.length!==n&&f(a,"invalid publicKey length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kem_mlkem768_ciphertextbytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kem_mlkem768_sharedsecretbytes()),o=p.address;if(a.push(o),!(0|t._crypto_kem_mlkem768_enc(c,o,_))){var y=h({ciphertext:s,sharedSecret:p},r);return g(a),y}b(a,"invalid usage")}function rt(e,r,a){var _=[];i(a),e=k(_,e,"publicKey");var n,s,c=0|t._crypto_kem_mlkem768_publickeybytes();e.length!==c&&f(_,"invalid publicKey length"),n=l(e),_.push(n),32!==(r=k(_,r,"seed")).length&&f(_,"invalid seed length"),s=l(r),_.push(s);var p=new u(0|t._crypto_kem_mlkem768_ciphertextbytes()),o=p.address;_.push(o);var y=new u(0|t._crypto_kem_mlkem768_sharedsecretbytes()),d=y.address;if(_.push(d),!(0|t._crypto_kem_mlkem768_enc_deterministic(o,d,n,s))){var v=h({ciphertext:p,sharedSecret:y},a);return g(_),v}b(_,"invalid usage")}function tt(e){var r=[];i(e);var a=new u(0|t._crypto_kem_mlkem768_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_kem_mlkem768_secretkeybytes()),s=n.address;if(r.push(s),!(0|t._crypto_kem_mlkem768_keypair(_,s))){var c={publicKey:h(a,e),privateKey:h(n,e),keyType:"ml-kem-768"};return g(r),c}b(r,"internal error")}function at(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_kem_mlkem768_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kem_mlkem768_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kem_mlkem768_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_kem_mlkem768_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"ml-kem-768"};return g(a),y}b(a,"invalid usage")}function _t(){var e=t._crypto_kem_primitive(),r=t.UTF8ToString(e);return g([]),r}function nt(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_kem_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kem_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kem_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_kem_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"xwing"};return g(a),y}b(a,"invalid usage")}function st(e,r,a){var _=[];i(a),e=k(_,e,"ciphertext");var n,s=0|t._crypto_kem_xwing_ciphertextbytes();e.length!==s&&f(_,"invalid ciphertext length"),n=l(e),_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_kem_xwing_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_kem_xwing_sharedsecretbytes()),y=o.address;if(_.push(y),!(0|t._crypto_kem_xwing_dec(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function ct(e,r){var a=[];i(r),e=k(a,e,"publicKey");var _,n=0|t._crypto_kem_xwing_publickeybytes();e.length!==n&&f(a,"invalid publicKey length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kem_xwing_ciphertextbytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kem_xwing_sharedsecretbytes()),o=p.address;if(a.push(o),!(0|t._crypto_kem_xwing_enc(c,o,_))){var y=h({ciphertext:s,sharedSecret:p},r);return g(a),y}b(a,"invalid usage")}function pt(e,r,a){var _=[];i(a),e=k(_,e,"publicKey");var n,s,c=0|t._crypto_kem_xwing_publickeybytes();e.length!==c&&f(_,"invalid publicKey length"),n=l(e),_.push(n),64!==(r=k(_,r,"seed")).length&&f(_,"invalid seed length"),s=l(r),_.push(s);var p=new u(0|t._crypto_kem_xwing_ciphertextbytes()),o=p.address;_.push(o);var y=new u(0|t._crypto_kem_xwing_sharedsecretbytes()),d=y.address;if(_.push(d),!(0|t._crypto_kem_xwing_enc_deterministic(o,d,n,s))){var v=h({ciphertext:p,sharedSecret:y},a);return g(_),v}b(_,"invalid usage")}function ot(e){var r=[];i(e);var a=new u(0|t._crypto_kem_xwing_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_kem_xwing_secretkeybytes()),s=n.address;if(r.push(s),!(0|t._crypto_kem_xwing_keypair(_,s))){var c={publicKey:h(a,e),privateKey:h(n,e),keyType:"xwing"};return g(r),c}b(r,"internal error")}function ht(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_kem_xwing_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kem_xwing_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kem_xwing_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_kem_xwing_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"xwing"};return g(a),y}b(a,"invalid usage")}function yt(e,r,a,_){var n=[];i(_),e=k(n,e,"clientPublicKey");var s,c=0|t._crypto_kx_publickeybytes();e.length!==c&&f(n,"invalid clientPublicKey length"),s=l(e),n.push(s),r=k(n,r,"clientSecretKey");var p,o=0|t._crypto_kx_secretkeybytes();r.length!==o&&f(n,"invalid clientSecretKey length"),p=l(r),n.push(p),a=k(n,a,"serverPublicKey");var y,d=0|t._crypto_kx_publickeybytes();a.length!==d&&f(n,"invalid serverPublicKey length"),y=l(a),n.push(y);var v=new u(0|t._crypto_kx_sessionkeybytes()),m=v.address;n.push(m);var x=new u(0|t._crypto_kx_sessionkeybytes()),E=x.address;if(n.push(E),!(0|t._crypto_kx_client_session_keys(m,E,s,p,y))){var S=h({sharedRx:v,sharedTx:x},_);return g(n),S}b(n,"invalid usage")}function it(e){var r=[];i(e);var a=new u(0|t._crypto_kx_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_kx_secretkeybytes()),s=n.address;if(r.push(s),!(0|t._crypto_kx_keypair(_,s))){var c={publicKey:h(a,e),privateKey:h(n,e),keyType:"x25519"};return g(r),c}b(r,"internal error")}function ut(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_kx_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_kx_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_kx_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_kx_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"x25519"};return g(a),y}b(a,"internal error")}function lt(e,r,a,_){var n=[];i(_),e=k(n,e,"serverPublicKey");var s,c=0|t._crypto_kx_publickeybytes();e.length!==c&&f(n,"invalid serverPublicKey length"),s=l(e),n.push(s),r=k(n,r,"serverSecretKey");var p,o=0|t._crypto_kx_secretkeybytes();r.length!==o&&f(n,"invalid serverSecretKey length"),p=l(r),n.push(p),a=k(n,a,"clientPublicKey");var y,d=0|t._crypto_kx_publickeybytes();a.length!==d&&f(n,"invalid clientPublicKey length"),y=l(a),n.push(y);var v=new u(0|t._crypto_kx_sessionkeybytes()),m=v.address;n.push(m);var x=new u(0|t._crypto_kx_sessionkeybytes()),E=x.address;if(n.push(E),!(0|t._crypto_kx_server_session_keys(m,E,s,p,y))){var S=h({sharedRx:v,sharedTx:x},_);return g(n),S}b(n,"invalid usage")}function dt(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_onetimeauth_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_onetimeauth_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_onetimeauth(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function vt(e,r){var a=[];i(r),m(a,e,"state_address");var _=new u(0|t._crypto_onetimeauth_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_onetimeauth_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function gt(e,r){var a=[];i(r);var _=null;null!=e&&(_=l(e=k(a,e,"key")),e.length,a.push(_));var n=new u(144).address;if(!(0|t._crypto_onetimeauth_init(n,_))){var s=n;return g(a),s}b(a,"invalid usage")}function bt(e){var r=[];i(e);var a=new u(0|t._crypto_onetimeauth_keybytes()),_=a.address;r.push(_),t._crypto_onetimeauth_keygen(_);var n=h(a,e);return g(r),n}function ft(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_onetimeauth_update(e,n,s)&&b(_,"invalid usage"),g(_)}function mt(e,r,a){var _=[];e=k(_,e,"hash");var n,s=0|t._crypto_onetimeauth_bytes();e.length!==s&&f(_,"invalid hash length"),n=l(e),_.push(n);var c=l(r=k(_,r,"message")),p=r.length;_.push(c),a=k(_,a,"key");var o,h=0|t._crypto_onetimeauth_keybytes();a.length!==h&&f(_,"invalid key length"),o=l(a),_.push(o);var y=!(0|t._crypto_onetimeauth_verify(n,c,p,0,o));return g(_),y}function kt(e,r,a,_,n,s,c){var p=[];i(c),m(p,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&f(p,"keyLength must be an unsigned integer");var o=l(r=k(p,r,"password")),y=r.length;p.push(o),a=k(p,a,"salt");var d,v=0|t._crypto_pwhash_saltbytes();a.length!==v&&f(p,"invalid salt length"),d=l(a),p.push(d),m(p,_,"opsLimit"),("number"!=typeof _||(0|_)!==_||_<0)&&f(p,"opsLimit must be an unsigned integer"),m(p,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&f(p,"memLimit must be an unsigned integer"),m(p,s,"algorithm"),("number"!=typeof s||(0|s)!==s||s<0)&&f(p,"algorithm must be an unsigned integer");var x=new u(0|e),E=x.address;if(p.push(E),!(0|t._crypto_pwhash(E,e,0,o,y,0,d,_,0,n,s))){var S=h(x,c);return g(p),S}b(p,"invalid usage")}function xt(e,r,a,_,n,s){var c=[];i(s),m(c,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&f(c,"keyLength must be an unsigned integer");var p=l(r=k(c,r,"password")),o=r.length;c.push(p),a=k(c,a,"salt");var y,d=0|t._crypto_pwhash_scryptsalsa208sha256_saltbytes();a.length!==d&&f(c,"invalid salt length"),y=l(a),c.push(y),m(c,_,"opsLimit"),("number"!=typeof _||(0|_)!==_||_<0)&&f(c,"opsLimit must be an unsigned integer"),m(c,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&f(c,"memLimit must be an unsigned integer");var v=new u(0|e),x=v.address;if(c.push(x),!(0|t._crypto_pwhash_scryptsalsa208sha256(x,e,0,p,o,0,y,_,0,n))){var E=h(v,s);return g(c),E}b(c,"invalid usage")}function Et(e,r,a,_,n,s,c){var p=[];i(c);var o=l(e=k(p,e,"password")),y=e.length;p.push(o);var d=l(r=k(p,r,"salt")),v=r.length;p.push(d),m(p,a,"opsLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&f(p,"opsLimit must be an unsigned integer"),m(p,_,"r"),("number"!=typeof _||(0|_)!==_||_<0)&&f(p,"r must be an unsigned integer"),m(p,n,"p"),("number"!=typeof n||(0|n)!==n||n<0)&&f(p,"p must be an unsigned integer"),m(p,s,"keyLength"),("number"!=typeof s||(0|s)!==s||s<0)&&f(p,"keyLength must be an unsigned integer");var x=new u(0|s),E=x.address;if(p.push(E),!(0|t._crypto_pwhash_scryptsalsa208sha256_ll(o,y,d,v,a,0,_,n,E,s))){var S=h(x,c);return g(p),S}b(p,"invalid usage")}function St(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"password")),c=e.length;n.push(s),m(n,r,"opsLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&f(n,"opsLimit must be an unsigned integer"),m(n,a,"memLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&f(n,"memLimit must be an unsigned integer");var p=new u(0|t._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(n.push(p),!(0|t._crypto_pwhash_scryptsalsa208sha256_str(p,s,c,0,r,0,a))){var o=t.UTF8ToString(p);return g(n),o}b(n,"invalid usage")}function Tt(e,r,a){var n=[];i(a),"string"!=typeof e&&f(n,"hashed_password must be a string");var s=l(e=_(e+"\0"));e.length,n.push(s);var c=l(r=k(n,r,"password")),p=r.length;n.push(c);var o=!(0|t._crypto_pwhash_scryptsalsa208sha256_str_verify(s,c,p,0));return g(n),o}function wt(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"password")),c=e.length;n.push(s),m(n,r,"opsLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&f(n,"opsLimit must be an unsigned integer"),m(n,a,"memLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&f(n,"memLimit must be an unsigned integer");var p=new u(0|t._crypto_pwhash_strbytes()).address;if(n.push(p),!(0|t._crypto_pwhash_str(p,s,c,0,r,0,a))){var o=t.UTF8ToString(p);return g(n),o}b(n,"invalid usage")}function Yt(e,r,a,n){var s=[];i(n),"string"!=typeof e&&f(s,"hashed_password must be a string");var c=l(e=_(e+"\0"));e.length,s.push(c),m(s,r,"opsLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&f(s,"opsLimit must be an unsigned integer"),m(s,a,"memLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&f(s,"memLimit must be an unsigned integer");var p=!!(0|t._crypto_pwhash_str_needs_rehash(c,r,0,a));return g(s),p}function Bt(e,r,a){var n=[];i(a),"string"!=typeof e&&f(n,"hashed_password must be a string");var s=l(e=_(e+"\0"));e.length,n.push(s);var c=l(r=k(n,r,"password")),p=r.length;n.push(c);var o=!(0|t._crypto_pwhash_str_verify(s,c,p,0));return g(n),o}function Kt(e,r,a){var _=[];i(a),e=k(_,e,"privateKey");var n,s=0|t._crypto_scalarmult_scalarbytes();e.length!==s&&f(_,"invalid privateKey length"),n=l(e),_.push(n),r=k(_,r,"publicKey");var c,p=0|t._crypto_scalarmult_bytes();r.length!==p&&f(_,"invalid publicKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_scalarmult_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_scalarmult(y,n,c))){var d=h(o,a);return g(_),d}b(_,"weak public key")}function At(e,r){var a=[];i(r),e=k(a,e,"privateKey");var _,n=0|t._crypto_scalarmult_scalarbytes();e.length!==n&&f(a,"invalid privateKey length"),_=l(e),a.push(_);var s=new u(0|t._crypto_scalarmult_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_scalarmult_base(c,_))){var p=h(s,r);return g(a),p}b(a,"unknown error")}function It(e,r,a){var _=[];i(a),e=k(_,e,"n");var n,s=0|t._crypto_scalarmult_ed25519_scalarbytes();e.length!==s&&f(_,"invalid n length"),n=l(e),_.push(n),r=k(_,r,"p");var c,p=0|t._crypto_scalarmult_ed25519_bytes();r.length!==p&&f(_,"invalid p length"),c=l(r),_.push(c);var o=new u(0|t._crypto_scalarmult_ed25519_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_scalarmult_ed25519(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid point or scalar is 0")}function Mt(e,r){var a=[];i(r),e=k(a,e,"scalar");var _,n=0|t._crypto_scalarmult_ed25519_scalarbytes();e.length!==n&&f(a,"invalid scalar length"),_=l(e),a.push(_);var s=new u(0|t._crypto_scalarmult_ed25519_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_scalarmult_ed25519_base(c,_))){var p=h(s,r);return g(a),p}b(a,"scalar is 0")}function Nt(e,r){var a=[];i(r),e=k(a,e,"scalar");var _,n=0|t._crypto_scalarmult_ed25519_scalarbytes();e.length!==n&&f(a,"invalid scalar length"),_=l(e),a.push(_);var s=new u(0|t._crypto_scalarmult_ed25519_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_scalarmult_ed25519_base_noclamp(c,_))){var p=h(s,r);return g(a),p}b(a,"scalar is 0")}function Lt(e,r,a){var _=[];i(a),e=k(_,e,"n");var n,s=0|t._crypto_scalarmult_ed25519_scalarbytes();e.length!==s&&f(_,"invalid n length"),n=l(e),_.push(n),r=k(_,r,"p");var c,p=0|t._crypto_scalarmult_ed25519_bytes();r.length!==p&&f(_,"invalid p length"),c=l(r),_.push(c);var o=new u(0|t._crypto_scalarmult_ed25519_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_scalarmult_ed25519_noclamp(y,n,c))){var d=h(o,a);return g(_),d}b(_,"invalid point or scalar is 0")}function Ot(e,r,a){var _=[];i(a),e=k(_,e,"scalar");var n,s=0|t._crypto_scalarmult_ristretto255_scalarbytes();e.length!==s&&f(_,"invalid scalar length"),n=l(e),_.push(n),r=k(_,r,"element");var c,p=0|t._crypto_scalarmult_ristretto255_bytes();r.length!==p&&f(_,"invalid element length"),c=l(r),_.push(c);var o=new u(0|t._crypto_scalarmult_ristretto255_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_scalarmult_ristretto255(y,n,c))){var d=h(o,a);return g(_),d}b(_,"result is identity element")}function Ut(e,r){var a=[];i(r),e=k(a,e,"scalar");var _,n=0|t._crypto_core_ristretto255_scalarbytes();e.length!==n&&f(a,"invalid scalar length"),_=l(e),a.push(_);var s=new u(0|t._crypto_core_ristretto255_bytes()),c=s.address;if(a.push(c),!(0|t._crypto_scalarmult_ristretto255_base(c,_))){var p=h(s,r);return g(a),p}b(a,"scalar is 0")}function Ct(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_secretbox_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_secretbox_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(0|c),m=v.address;n.push(m);var x=new u(0|t._crypto_secretbox_macbytes()),E=x.address;if(n.push(E),!(0|t._crypto_secretbox_detached(m,E,s,c,0,p,y))){var S=h({mac:x,cipher:v},_);return g(n),S}b(n,"invalid usage")}function Pt(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_secretbox_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_secretbox_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(c+t._crypto_secretbox_macbytes()|0),m=v.address;if(n.push(m),!(0|t._crypto_secretbox_easy(m,s,c,0,p,y))){var x=h(v,_);return g(n),x}b(n,"invalid usage")}function Rt(e){var r=[];i(e);var a=new u(0|t._crypto_secretbox_keybytes()),_=a.address;r.push(_),t._crypto_secretbox_keygen(_);var n=h(a,e);return g(r),n}function Xt(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"ciphertext")),p=e.length;s.push(c),r=k(s,r,"mac");var o,y=0|t._crypto_secretbox_macbytes();r.length!==y&&f(s,"invalid mac length"),o=l(r),s.push(o),a=k(s,a,"nonce");var d,v=0|t._crypto_secretbox_noncebytes();a.length!==v&&f(s,"invalid nonce length"),d=l(a),s.push(d),_=k(s,_,"key");var m,x=0|t._crypto_secretbox_keybytes();_.length!==x&&f(s,"invalid key length"),m=l(_),s.push(m);var E=new u(0|p),S=E.address;if(s.push(S),!(0|t._crypto_secretbox_open_detached(S,c,o,p,0,d,m))){var T=h(E,n);return g(s),T}b(s,"wrong secret key for the given ciphertext")}function Dt(e,r,a,_){var n=[];i(_),e=k(n,e,"ciphertext");var s,c=t._crypto_secretbox_macbytes(),p=e.length;p<c&&f(n,"ciphertext is too short"),s=l(e),n.push(s),r=k(n,r,"nonce");var o,y=0|t._crypto_secretbox_noncebytes();r.length!==y&&f(n,"invalid nonce length"),o=l(r),n.push(o),a=k(n,a,"key");var d,v=0|t._crypto_secretbox_keybytes();a.length!==v&&f(n,"invalid key length"),d=l(a),n.push(d);var m=new u(p-t._crypto_secretbox_macbytes()|0),x=m.address;if(n.push(x),!(0|t._crypto_secretbox_open_easy(x,s,p,0,o,d))){var E=h(m,_);return g(n),E}b(n,"wrong secret key for the given ciphertext")}function Gt(e,r,a){var _=[];i(a),e=k(_,e,"header");var n,s=0|t._crypto_secretstream_xchacha20poly1305_headerbytes();e.length!==s&&f(_,"invalid header length"),n=l(e),_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_secretstream_xchacha20poly1305_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(52).address;if(!(0|t._crypto_secretstream_xchacha20poly1305_init_pull(o,n,c))){var h=o;return g(_),h}b(_,"invalid usage")}function Ft(e,r){var a=[];i(r),e=k(a,e,"key");var _,n=0|t._crypto_secretstream_xchacha20poly1305_keybytes();e.length!==n&&f(a,"invalid key length"),_=l(e),a.push(_);var s=new u(52).address,c=new u(0|t._crypto_secretstream_xchacha20poly1305_headerbytes()),p=c.address;if(a.push(p),!(0|t._crypto_secretstream_xchacha20poly1305_init_push(s,p,_))){var o={state:s,header:h(c,r)};return g(a),o}b(a,"invalid usage")}function Vt(e){var r=[];i(e);var a=new u(0|t._crypto_secretstream_xchacha20poly1305_keybytes()),_=a.address;r.push(_),t._crypto_secretstream_xchacha20poly1305_keygen(_);var n=h(a,e);return g(r),n}function qt(e,r,a,_){var n=[];i(_),m(n,e,"state_address"),r=k(n,r,"cipher");var s,c=t._crypto_secretstream_xchacha20poly1305_abytes(),p=r.length;p<c&&f(n,"cipher is too short"),s=l(r),n.push(s);var o=null,y=0;null!=a&&(o=l(a=k(n,a,"ad")),y=a.length,n.push(o));var v=new u(p-t._crypto_secretstream_xchacha20poly1305_abytes()|0),b=v.address;n.push(b);var x,E=(x=d(1),n.push(x),(E=0===t._crypto_secretstream_xchacha20poly1305_pull(e,b,0,x,s,p,0,o,y)&&{tag:t.HEAPU8[x],message:v})&&{message:h(E.message,_),tag:E.tag});return g(n),E}function Ht(e,r,a,_,n){var s=[];i(n),m(s,e,"state_address");var c=l(r=k(s,r,"message_chunk")),p=r.length;s.push(c);var o=null,y=0;null!=a&&(o=l(a=k(s,a,"ad")),y=a.length,s.push(o)),m(s,_,"tag"),("number"!=typeof _||(0|_)!==_||_<0)&&f(s,"tag must be an unsigned integer");var d=new u(p+t._crypto_secretstream_xchacha20poly1305_abytes()|0),v=d.address;if(s.push(v),!(0|t._crypto_secretstream_xchacha20poly1305_push(e,v,0,c,p,0,o,y,0,_))){var x=h(d,n);return g(s),x}b(s,"invalid usage")}function zt(e,r){var a=[];return i(r),m(a,e,"state_address"),t._crypto_secretstream_xchacha20poly1305_rekey(e),g(a),!0}function Wt(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_shorthash_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_shorthash_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_shorthash(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function jt(e){var r=[];i(e);var a=new u(0|t._crypto_shorthash_keybytes()),_=a.address;r.push(_),t._crypto_shorthash_keygen(_);var n=h(a,e);return g(r),n}function Jt(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"key");var c,p=0|t._crypto_shorthash_siphashx24_keybytes();r.length!==p&&f(_,"invalid key length"),c=l(r),_.push(c);var o=new u(0|t._crypto_shorthash_siphashx24_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_shorthash_siphashx24(y,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function Qt(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_sign_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(e.length+t._crypto_sign_bytes()|0),y=o.address;if(_.push(y),!(0|t._crypto_sign(y,null,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function Zt(e,r,a){var _=[];i(a);var n=l(e=k(_,e,"message")),s=e.length;_.push(n),r=k(_,r,"privateKey");var c,p=0|t._crypto_sign_secretkeybytes();r.length!==p&&f(_,"invalid privateKey length"),c=l(r),_.push(c);var o=new u(0|t._crypto_sign_bytes()),y=o.address;if(_.push(y),!(0|t._crypto_sign_detached(y,null,n,s,0,c))){var d=h(o,a);return g(_),d}b(_,"invalid usage")}function $t(e,r){var a=[];i(r),e=k(a,e,"edPk");var _,n=0|t._crypto_sign_publickeybytes();e.length!==n&&f(a,"invalid edPk length"),_=l(e),a.push(_);var s=new u(0|t._crypto_scalarmult_scalarbytes()),c=s.address;if(a.push(c),!(0|t._crypto_sign_ed25519_pk_to_curve25519(c,_))){var p=h(s,r);return g(a),p}b(a,"invalid key")}function ea(e,r){var a=[];i(r),e=k(a,e,"edSk");var _,n=0|t._crypto_sign_secretkeybytes();e.length!==n&&f(a,"invalid edSk length"),_=l(e),a.push(_);var s=new u(0|t._crypto_scalarmult_scalarbytes()),c=s.address;if(a.push(c),!(0|t._crypto_sign_ed25519_sk_to_curve25519(c,_))){var p=h(s,r);return g(a),p}b(a,"invalid key")}function ra(e,r){var a=[];i(r),e=k(a,e,"privateKey");var _,n=0|t._crypto_sign_secretkeybytes();e.length!==n&&f(a,"invalid privateKey length"),_=l(e),a.push(_);var s=new u(0|t._crypto_sign_publickeybytes()),c=s.address;if(a.push(c),!(0|t._crypto_sign_ed25519_sk_to_pk(c,_))){var p=h(s,r);return g(a),p}b(a,"invalid key")}function ta(e,r){var a=[];i(r),e=k(a,e,"privateKey");var _,n=0|t._crypto_sign_secretkeybytes();e.length!==n&&f(a,"invalid privateKey length"),_=l(e),a.push(_);var s=new u(0|t._crypto_sign_seedbytes()),c=s.address;if(a.push(c),!(0|t._crypto_sign_ed25519_sk_to_seed(c,_))){var p=h(s,r);return g(a),p}b(a,"invalid key")}function aa(e,r,a){var _=[];i(a),m(_,e,"state_address"),r=k(_,r,"privateKey");var n,s=0|t._crypto_sign_secretkeybytes();r.length!==s&&f(_,"invalid privateKey length"),n=l(r),_.push(n);var c=new u(0|t._crypto_sign_bytes()),p=c.address;if(_.push(p),!(0|t._crypto_sign_final_create(e,p,null,n))){var o=(t._free(e),h(c,a));return g(_),o}b(_,"invalid usage")}function _a(e,r,a,_){var n=[];i(_),m(n,e,"state_address"),r=k(n,r,"signature");var s,c=0|t._crypto_sign_bytes();r.length!==c&&f(n,"invalid signature length"),s=l(r),n.push(s),a=k(n,a,"publicKey");var p,o=0|t._crypto_sign_publickeybytes();a.length!==o&&f(n,"invalid publicKey length"),p=l(a),n.push(p);var h=!(0|t._crypto_sign_final_verify(e,s,p));return g(n),h}function na(e){var r=[];i(e);var a=new u(208).address;if(!(0|t._crypto_sign_init(a))){var _=a;return g(r),_}b(r,"internal error")}function sa(e){var r=[];i(e);var a=new u(0|t._crypto_sign_publickeybytes()),_=a.address;r.push(_);var n=new u(0|t._crypto_sign_secretkeybytes()),s=n.address;if(r.push(s),!(0|t._crypto_sign_keypair(_,s))){var c={publicKey:h(a,e),privateKey:h(n,e),keyType:"ed25519"};return g(r),c}b(r,"internal error")}function ca(e,r,a){var _=[];i(a),e=k(_,e,"signedMessage");var n,s=t._crypto_sign_bytes(),c=e.length;c<s&&f(_,"signedMessage is too short"),n=l(e),_.push(n),r=k(_,r,"publicKey");var p,o=0|t._crypto_sign_publickeybytes();r.length!==o&&f(_,"invalid publicKey length"),p=l(r),_.push(p);var y=new u(c-t._crypto_sign_bytes()|0),d=y.address;if(_.push(d),!(0|t._crypto_sign_open(d,null,n,c,0,p))){var v=h(y,a);return g(_),v}b(_,"incorrect signature for the given public key")}function pa(e,r){var a=[];i(r),e=k(a,e,"seed");var _,n=0|t._crypto_sign_seedbytes();e.length!==n&&f(a,"invalid seed length"),_=l(e),a.push(_);var s=new u(0|t._crypto_sign_publickeybytes()),c=s.address;a.push(c);var p=new u(0|t._crypto_sign_secretkeybytes()),o=p.address;if(a.push(o),!(0|t._crypto_sign_seed_keypair(c,o,_))){var y={publicKey:h(s,r),privateKey:h(p,r),keyType:"ed25519"};return g(a),y}b(a,"invalid usage")}function oa(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_sign_update(e,n,s,0)&&b(_,"invalid usage"),g(_)}function ha(e,r,a){var _=[];e=k(_,e,"signature");var n,s=0|t._crypto_sign_bytes();e.length!==s&&f(_,"invalid signature length"),n=l(e),_.push(n);var c=l(r=k(_,r,"message")),p=r.length;_.push(c),a=k(_,a,"publicKey");var o,h=0|t._crypto_sign_publickeybytes();a.length!==h&&f(_,"invalid publicKey length"),o=l(a),_.push(o);var y=!(0|t._crypto_sign_verify_detached(n,c,p,0,o));return g(_),y}function ya(e,r,a,_){var n=[];i(_),m(n,e,"outLength"),("number"!=typeof e||(0|e)!==e||e<0)&&f(n,"outLength must be an unsigned integer"),r=k(n,r,"key");var s,c=0|t._crypto_stream_chacha20_keybytes();r.length!==c&&f(n,"invalid key length"),s=l(r),n.push(s),a=k(n,a,"nonce");var p,o=0|t._crypto_stream_chacha20_noncebytes();a.length!==o&&f(n,"invalid nonce length"),p=l(a),n.push(p);var y=new u(0|e),d=y.address;n.push(d),t._crypto_stream_chacha20(d,e,0,p,s);var v=h(y,_);return g(n),v}function ia(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"input_message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_stream_chacha20_ietf_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_stream_chacha20_ietf_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(0|c),m=v.address;if(n.push(m),0===t._crypto_stream_chacha20_ietf_xor(m,s,c,0,p,y)){var x=h(v,_);return g(n),x}b(n,"invalid usage")}function ua(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"input_message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_stream_chacha20_ietf_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),m(s,a,"nonce_increment"),("number"!=typeof a||(0|a)!==a||a<0)&&f(s,"nonce_increment must be an unsigned integer"),_=k(s,_,"key");var d,v=0|t._crypto_stream_chacha20_ietf_keybytes();_.length!==v&&f(s,"invalid key length"),d=l(_),s.push(d);var x=new u(0|p),E=x.address;if(s.push(E),0===t._crypto_stream_chacha20_ietf_xor_ic(E,c,p,0,o,a,d)){var S=h(x,n);return g(s),S}b(s,"invalid usage")}function la(e){var r=[];i(e);var a=new u(0|t._crypto_stream_chacha20_keybytes()),_=a.address;r.push(_),t._crypto_stream_chacha20_keygen(_);var n=h(a,e);return g(r),n}function da(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"input_message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_stream_chacha20_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_stream_chacha20_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(0|c),m=v.address;if(n.push(m),0===t._crypto_stream_chacha20_xor(m,s,c,0,p,y)){var x=h(v,_);return g(n),x}b(n,"invalid usage")}function va(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"input_message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_stream_chacha20_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),m(s,a,"nonce_increment"),("number"!=typeof a||(0|a)!==a||a<0)&&f(s,"nonce_increment must be an unsigned integer"),_=k(s,_,"key");var d,v=0|t._crypto_stream_chacha20_keybytes();_.length!==v&&f(s,"invalid key length"),d=l(_),s.push(d);var x=new u(0|p),E=x.address;if(s.push(E),0===t._crypto_stream_chacha20_xor_ic(E,c,p,0,o,a,0,d)){var S=h(x,n);return g(s),S}b(s,"invalid usage")}function ga(e){var r=[];i(e);var a=new u(0|t._crypto_stream_keybytes()),_=a.address;r.push(_),t._crypto_stream_keygen(_);var n=h(a,e);return g(r),n}function ba(e){var r=[];i(e);var a=new u(0|t._crypto_stream_xchacha20_keybytes()),_=a.address;r.push(_),t._crypto_stream_xchacha20_keygen(_);var n=h(a,e);return g(r),n}function fa(e,r,a,_){var n=[];i(_);var s=l(e=k(n,e,"input_message")),c=e.length;n.push(s),r=k(n,r,"nonce");var p,o=0|t._crypto_stream_xchacha20_noncebytes();r.length!==o&&f(n,"invalid nonce length"),p=l(r),n.push(p),a=k(n,a,"key");var y,d=0|t._crypto_stream_xchacha20_keybytes();a.length!==d&&f(n,"invalid key length"),y=l(a),n.push(y);var v=new u(0|c),m=v.address;if(n.push(m),0===t._crypto_stream_xchacha20_xor(m,s,c,0,p,y)){var x=h(v,_);return g(n),x}b(n,"invalid usage")}function ma(e,r,a,_,n){var s=[];i(n);var c=l(e=k(s,e,"input_message")),p=e.length;s.push(c),r=k(s,r,"nonce");var o,y=0|t._crypto_stream_xchacha20_noncebytes();r.length!==y&&f(s,"invalid nonce length"),o=l(r),s.push(o),m(s,a,"nonce_increment"),("number"!=typeof a||(0|a)!==a||a<0)&&f(s,"nonce_increment must be an unsigned integer"),_=k(s,_,"key");var d,v=0|t._crypto_stream_xchacha20_keybytes();_.length!==v&&f(s,"invalid key length"),d=l(_),s.push(d);var x=new u(0|p),E=x.address;if(s.push(E),0===t._crypto_stream_xchacha20_xor_ic(E,c,p,0,o,a,0,d)){var S=h(x,n);return g(s),S}b(s,"invalid usage")}function ka(e,r,a){var _=[];i(a),m(_,e,"out_length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(_,"out_length must be an unsigned integer");var n=l(r=k(_,r,"message")),s=r.length;_.push(n);var c=new u(e|=0),p=c.address;if(_.push(p),!(0|t._crypto_xof_shake128(p,e,n,s,0))){var o=h(c,a);return g(_),o}b(_,"invalid usage")}function xa(e){var r=[];i(e);var a=new u(256).address;if(!(0|t._crypto_xof_shake128_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Ea(e,r){var a=[];i(r),m(a,e,"domain"),("number"!=typeof e||(0|e)!==e||e<0)&&f(a,"domain must be an unsigned integer");var _=new u(256).address;if(!(0|t._crypto_xof_shake128_init_with_domain(_,e))){var n=_;return g(a),n}b(a,"invalid usage")}function Sa(e,r,a){var _=[];i(a),m(_,e,"state_address"),m(_,r,"out_length"),("number"!=typeof r||(0|r)!==r||r<0)&&f(_,"out_length must be an unsigned integer");var n=new u(r|=0),s=n.address;if(_.push(s),!(0|t._crypto_xof_shake128_squeeze(e,s,r))){var c=h(n,a);return g(_),c}b(_,"invalid usage")}function Ta(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_xof_shake128_update(e,n,s,0)&&b(_,"invalid usage"),g(_)}function wa(e,r,a){var _=[];i(a),m(_,e,"out_length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(_,"out_length must be an unsigned integer");var n=l(r=k(_,r,"message")),s=r.length;_.push(n);var c=new u(e|=0),p=c.address;if(_.push(p),!(0|t._crypto_xof_shake256(p,e,n,s,0))){var o=h(c,a);return g(_),o}b(_,"invalid usage")}function Ya(e){var r=[];i(e);var a=new u(256).address;if(!(0|t._crypto_xof_shake256_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Ba(e,r){var a=[];i(r),m(a,e,"domain"),("number"!=typeof e||(0|e)!==e||e<0)&&f(a,"domain must be an unsigned integer");var _=new u(256).address;if(!(0|t._crypto_xof_shake256_init_with_domain(_,e))){var n=_;return g(a),n}b(a,"invalid usage")}function Ka(e,r,a){var _=[];i(a),m(_,e,"state_address"),m(_,r,"out_length"),("number"!=typeof r||(0|r)!==r||r<0)&&f(_,"out_length must be an unsigned integer");var n=new u(r|=0),s=n.address;if(_.push(s),!(0|t._crypto_xof_shake256_squeeze(e,s,r))){var c=h(n,a);return g(_),c}b(_,"invalid usage")}function Aa(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_xof_shake256_update(e,n,s,0)&&b(_,"invalid usage"),g(_)}function Ia(e,r,a){var _=[];i(a),m(_,e,"out_length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(_,"out_length must be an unsigned integer");var n=l(r=k(_,r,"message")),s=r.length;_.push(n);var c=new u(e|=0),p=c.address;if(_.push(p),!(0|t._crypto_xof_turboshake128(p,e,n,s,0))){var o=h(c,a);return g(_),o}b(_,"invalid usage")}function Ma(e){var r=[];i(e);var a=new u(256).address;if(!(0|t._crypto_xof_turboshake128_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Na(e,r){var a=[];i(r),m(a,e,"domain"),("number"!=typeof e||(0|e)!==e||e<0)&&f(a,"domain must be an unsigned integer");var _=new u(256).address;if(!(0|t._crypto_xof_turboshake128_init_with_domain(_,e))){var n=_;return g(a),n}b(a,"invalid usage")}function La(e,r,a){var _=[];i(a),m(_,e,"state_address"),m(_,r,"out_length"),("number"!=typeof r||(0|r)!==r||r<0)&&f(_,"out_length must be an unsigned integer");var n=new u(r|=0),s=n.address;if(_.push(s),!(0|t._crypto_xof_turboshake128_squeeze(e,s,r))){var c=h(n,a);return g(_),c}b(_,"invalid usage")}function Oa(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_xof_turboshake128_update(e,n,s,0)&&b(_,"invalid usage"),g(_)}function Ua(e,r,a){var _=[];i(a),m(_,e,"out_length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(_,"out_length must be an unsigned integer");var n=l(r=k(_,r,"message")),s=r.length;_.push(n);var c=new u(e|=0),p=c.address;if(_.push(p),!(0|t._crypto_xof_turboshake256(p,e,n,s,0))){var o=h(c,a);return g(_),o}b(_,"invalid usage")}function Ca(e){var r=[];i(e);var a=new u(256).address;if(!(0|t._crypto_xof_turboshake256_init(a))){var _=a;return g(r),_}b(r,"invalid usage")}function Pa(e,r){var a=[];i(r),m(a,e,"domain"),("number"!=typeof e||(0|e)!==e||e<0)&&f(a,"domain must be an unsigned integer");var _=new u(256).address;if(!(0|t._crypto_xof_turboshake256_init_with_domain(_,e))){var n=_;return g(a),n}b(a,"invalid usage")}function Ra(e,r,a){var _=[];i(a),m(_,e,"state_address"),m(_,r,"out_length"),("number"!=typeof r||(0|r)!==r||r<0)&&f(_,"out_length must be an unsigned integer");var n=new u(r|=0),s=n.address;if(_.push(s),!(0|t._crypto_xof_turboshake256_squeeze(e,s,r))){var c=h(n,a);return g(_),c}b(_,"invalid usage")}function Xa(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=l(r=k(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_xof_turboshake256_update(e,n,s,0)&&b(_,"invalid usage"),g(_)}function Da(e,r){var a=[];i(r),m(a,e,"length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(a,"length must be an unsigned integer");var _=new u(0|e),n=_.address;a.push(n),t._randombytes_buf(n,e);var s=h(_,r);return g(a),s}function Ga(e,r,a){var _=[];i(a),m(_,e,"length"),("number"!=typeof e||(0|e)!==e||e<0)&&f(_,"length must be an unsigned integer"),r=k(_,r,"seed");var n,s=0|t._randombytes_seedbytes();r.length!==s&&f(_,"invalid seed length"),n=l(r),_.push(n);var c=new u(0|e),p=c.address;_.push(p),t._randombytes_buf_deterministic(p,e,n);var o=h(c,a);return g(_),o}function Fa(e){i(e),t._randombytes_close()}function Va(e){i(e);var r=t._randombytes_random()>>>0;return g([]),r}function qa(e,r){var a=[];i(r);for(var _=t._malloc(24),n=0;n<6;n++)t.setValue(_+4*n,t.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][n]]),"i32");0|t._randombytes_set_implementation(_)&&b(a,"unsupported implementation"),g(a)}function Ha(e){i(e),t._randombytes_stir()}function za(e,r){var a=[];i(r),m(a,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&f(a,"upper_bound must be an unsigned integer");var _=t._randombytes_uniform(e)>>>0;return g(a),_}function Wa(e){var r,a=[];16!==(e=k(a,e,"bin")).length&&f(a,"invalid bin length"),r=l(e),a.push(r);var _=new u(46).address;if(a.push(_),0!==t._sodium_bin2ip(_,46,r)){var n=t.UTF8ToString(_);return g(a),n}b(a,"conversion failed")}function ja(e,r){var a=[];i(r),"string"!=typeof e&&f(a,"ip must be a string");var n=l(e=_(e+"\0")),s=e.length-1;a.push(n);var c=new u(16),p=c.address;if(a.push(p),!(0|t._sodium_ip2bin(p,n,s))){var o=h(c,r);return g(a),o}b(a,"invalid IP address")}function Ja(){var e=t._sodium_version_string(),r=t.UTF8ToString(e);return g([]),r}return u.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(t.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,r){if(!(e instanceof Uint8Array&&r instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be added");var t=e.length,a=0,_=0;if(r.length!==e.length)throw new TypeError("Arguments must have the same length");for(_=0;_<t;_++)a>>=8,a+=e[_]+r[_],e[_]=255&a},e.base64_variants=c,e.compare=function(e,r){if(!(e instanceof Uint8Array&&r instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(e.length!==r.length)throw new TypeError("Only instances of identical length can be compared");for(var t=0,a=1,_=e.length;_-- >0;)t|=r[_]-e[_]>>8&a,a&=(r[_]^e[_])-1>>8;return t+t+a-1},e.from_base64=function(e,r){r=p(r);var a,_=[],n=new u(3*(e=k(_,e,"input")).length/4),s=l(e),c=d(4),o=d(4);return _.push(s),_.push(n.address),_.push(c),_.push(o),0!==t._sodium_base642bin(n.address,n.length,s,e.length,0,c,o,r)&&b(_,"invalid input"),t.getValue(o,"i32")-s!==e.length&&b(_,"incomplete input"),n.length=t.getValue(c,"i32"),a=n.to_Uint8Array(),g(_),a},e.from_hex=function(e){var r,a=[],_=new u((e=k(a,e,"input")).length/2),n=l(e),s=d(4);return a.push(n),a.push(_.address),a.push(s),0!==t._sodium_hex2bin(_.address,_.length,n,e.length,0,0,s)&&b(a,"invalid input"),t.getValue(s,"i32")-n!==e.length&&b(a,"incomplete input"),r=_.to_Uint8Array(),g(a),r},e.from_string=_,e.increment=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var r=256,t=0,a=e.length;t<a;t++)r>>=8,r+=e[t],e[t]=255&r},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var r=0,t=0,a=e.length;t<a;t++)r|=e[t];return 0===r},e.libsodium=r,e.memcmp=function(e,r){if(!(e instanceof Uint8Array&&r instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(e.length!==r.length)throw new TypeError("Only instances of identical length can be compared");for(var t=0,a=0,_=e.length;a<_;a++)t|=e[a]^r[a];return 0===t},e.memzero=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be wiped");for(var r=0,t=e.length;r<t;r++)e[r]=0},e.output_formats=function(){return["uint8array","text","hex","base64"]},e.pad=function(e,r){if(!(e instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((r|=0)<=0)throw new Error("block size must be > 0");var a,_=[],n=d(4),s=1,c=0,p=0|e.length,o=new u(p+r);_.push(n),_.push(o.address);for(var h=o.address,y=o.address+p+r;h<y;h++)t.HEAPU8[h]=e[c],c+=s=1&~((65535&((p-=s)>>>48|p>>>32|p>>>16|p))-1>>16);return 0!==t._sodium_pad(n,o.address,e.length,r,o.length)&&b(_,"internal error"),o.length=t.getValue(n,"i32"),a=o.to_Uint8Array(),g(_),a},e.unpad=function(e,r){if(!(e instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((r|=0)<=0)throw new Error("block size must be > 0");var a=[],_=l(e),n=d(4);return a.push(_),a.push(n),0!==t._sodium_unpad(n,_,e.length,r)&&b(a,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,t.getValue(n,"i32")),g(a),e},e.ready=a,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=o,e.to_hex=s,e.to_string=n,e}var t="object"==typeof e.sodium&&"function"==typeof e.sodium.onload?e.sodium.onload:null;"function"==typeof define&&define.amd?define(["exports","libsodium"],r):"object"==typeof exports&&"string"!=typeof exports.nodeName?r(exports,require("libsodium")):e.sodium=r(e.commonJsStrict={},e.libsodium),t&&e.sodium.ready.then(function(){t(e.sodium)})}(this);
|