internxt-crypto 0.0.9-alpha → 0.0.11
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/README.md +3 -4
- package/dist/asymmetric-crypto-BORmLhnx.js +143 -0
- package/dist/asymmetric-crypto-BORmLhnx.js.map +1 -0
- package/dist/asymmetric-crypto-CyXsV4XT.mjs +102 -0
- package/dist/asymmetric-crypto-CyXsV4XT.mjs.map +1 -0
- package/dist/asymmetric-crypto.d.mts +47 -0
- package/dist/asymmetric-crypto.d.ts +47 -0
- package/dist/asymmetric-crypto.js +8 -0
- package/dist/asymmetric-crypto.mjs +3 -0
- package/dist/chunk-DWirmd9C.mjs +18 -0
- package/dist/chunk-Dt-PWiN7.js +60 -0
- package/dist/constants-Ccp21E03.js +208 -0
- package/dist/constants-Ccp21E03.js.map +1 -0
- package/dist/constants-kTeX-2T0.mjs +34 -0
- package/dist/constants-kTeX-2T0.mjs.map +1 -0
- package/dist/constants.d.mts +33 -0
- package/dist/constants.d.ts +33 -0
- package/dist/constants.js +31 -0
- package/dist/constants.mjs +3 -0
- package/dist/derive-key-Be7hS-cN.mjs +751 -0
- package/dist/derive-key-Be7hS-cN.mjs.map +1 -0
- package/dist/derive-key-CBf2WxJd.js +2513 -0
- package/dist/derive-key-CBf2WxJd.js.map +1 -0
- package/dist/derive-key.d.mts +97 -0
- package/dist/derive-key.d.ts +97 -0
- package/dist/derive-key.js +15 -0
- package/dist/derive-key.mjs +6 -0
- package/dist/email-crypto-BrT98taw.js +617 -0
- package/dist/email-crypto-BrT98taw.js.map +1 -0
- package/dist/email-crypto-DJUEjTxA.mjs +534 -0
- package/dist/email-crypto-DJUEjTxA.mjs.map +1 -0
- package/dist/email-crypto.d.mts +86 -0
- package/dist/email-crypto.d.ts +86 -0
- package/dist/email-crypto.js +17 -0
- package/dist/email-crypto.mjs +8 -0
- package/dist/email-search.d.mts +235 -0
- package/dist/email-search.d.ts +235 -0
- package/dist/email-search.js +637 -0
- package/dist/email-search.js.map +1 -0
- package/dist/email-search.mjs +608 -0
- package/dist/email-search.mjs.map +1 -0
- package/dist/hash-BoqwNkcd.js +190 -0
- package/dist/hash-BoqwNkcd.js.map +1 -0
- package/dist/hash-CXeGAwai.mjs +131 -0
- package/dist/hash-CXeGAwai.mjs.map +1 -0
- package/dist/hash.d.mts +65 -0
- package/dist/hash.d.ts +65 -0
- package/dist/hash.js +11 -0
- package/dist/hash.mjs +3 -0
- package/dist/index-CQqgKsbX.d.ts +50 -0
- package/dist/index-CintVUbp.d.ts +97 -0
- package/dist/index-D5pBU_A5.d.mts +50 -0
- package/dist/index-MaOov-ag.d.mts +97 -0
- package/dist/index.d.mts +52 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +116 -2055
- package/dist/index.mjs +15 -8712
- package/dist/keystore-crypto-B4yCVo9l.js +182 -0
- package/dist/keystore-crypto-B4yCVo9l.js.map +1 -0
- package/dist/keystore-crypto-Bjgriq9h.mjs +159 -0
- package/dist/keystore-crypto-Bjgriq9h.mjs.map +1 -0
- package/dist/keystore-crypto.d.mts +40 -0
- package/dist/keystore-crypto.d.ts +40 -0
- package/dist/keystore-crypto.js +11 -0
- package/dist/keystore-crypto.mjs +9 -0
- package/dist/keystore-service.d.mts +48 -0
- package/dist/keystore-service.d.ts +48 -0
- package/dist/keystore-service.js +122 -0
- package/dist/keystore-service.js.map +1 -0
- package/dist/keystore-service.mjs +114 -0
- package/dist/keystore-service.mjs.map +1 -0
- package/dist/post-quantum-crypto-CAi-cEkV.js +189 -0
- package/dist/post-quantum-crypto-CAi-cEkV.js.map +1 -0
- package/dist/post-quantum-crypto-Vv34t6gX.mjs +154 -0
- package/dist/post-quantum-crypto-Vv34t6gX.mjs.map +1 -0
- package/dist/post-quantum-crypto.d.mts +2 -0
- package/dist/post-quantum-crypto.d.ts +2 -0
- package/dist/post-quantum-crypto.js +17 -0
- package/dist/post-quantum-crypto.mjs +3 -0
- package/dist/storage-service-BgIK2aYZ.js +82 -0
- package/dist/storage-service-BgIK2aYZ.js.map +1 -0
- package/dist/storage-service-CubCbhY2.mjs +65 -0
- package/dist/storage-service-CubCbhY2.mjs.map +1 -0
- package/dist/storage-service.d.mts +2 -0
- package/dist/storage-service.d.ts +2 -0
- package/dist/storage-service.js +14 -0
- package/dist/storage-service.mjs +3 -0
- package/dist/symmetric-crypto-CrdS1Che.mjs +197 -0
- package/dist/symmetric-crypto-CrdS1Che.mjs.map +1 -0
- package/dist/symmetric-crypto-D65zB396.js +244 -0
- package/dist/symmetric-crypto-D65zB396.js.map +1 -0
- package/dist/symmetric-crypto.d.mts +60 -0
- package/dist/symmetric-crypto.d.ts +60 -0
- package/dist/symmetric-crypto.js +10 -0
- package/dist/symmetric-crypto.mjs +4 -0
- package/dist/types-52g887Zi.js +16 -0
- package/dist/types-52g887Zi.js.map +1 -0
- package/dist/types-BiEoleqw.mjs +10 -0
- package/dist/types-BiEoleqw.mjs.map +1 -0
- package/dist/types-Ds3ivE9W.d.ts +104 -0
- package/dist/types-DwQJtrTx.d.mts +104 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +3 -0
- package/dist/types.mjs +3 -0
- package/dist/utils-CNs3cyDj.js +263 -0
- package/dist/utils-CNs3cyDj.js.map +1 -0
- package/dist/utils-DS04iUcX.mjs +173 -0
- package/dist/utils-DS04iUcX.mjs.map +1 -0
- package/dist/utils.d.mts +99 -0
- package/dist/utils.d.ts +99 -0
- package/dist/utils.js +16 -0
- package/dist/utils.mjs +3 -0
- package/package.json +12 -11
- package/dist/__vite-browser-external-Dyvby5gX.js +0 -2
- package/dist/__vite-browser-external-Dyvby5gX.js.map +0 -1
- package/dist/__vite-browser-external-l0sNRNKZ.mjs +0 -2
- package/dist/__vite-browser-external-l0sNRNKZ.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2055 +1,116 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Me=require("hash-wasm"),qt=require("buffer"),Li=require("uuid");var xr=typeof document<"u"?document.currentScript:null;const ze="AES-GCM",G=256,Ks=128,_s=16,Wt="AES-KW",Ye="raw",Os="CRYPTO library 2025-08-22 18:10:00 key derived from ecc and kyber secrets",ft="X25519",Rs="CRYPTO library 2025-07-26 16:18:03 key for opening identity keystore",Cs="CRYPTO library 2025-07-30 16:18:03 key for opening encryption keys keystore",Ps="CRYPTO library 2025-07-30 16:20:00 key for account recovery",Is="CRYPTO library 2025-07-30 17:20:00 key for protecting current search indices",js="CRYPTO library 2025-08-27 17:08:00 derive one key from two keys",Pr="CRYPTO library 2025-08-28 18:27:00 ratchet media key",Fs="CRYPTO library 2025-08-26 18:29:00 prefix for commitment to media keys",Mi="CRYPTO library 2025-08-26 18:30:00 prefix for commitment to public keys",Ui="CRYPTO library 2025-08-26 18:45:00 prefix for commitment to identity keys",Bs=3,Ns=4,Ls=65536,Ms=16,Us=32,Qr="Identity keystore",en="Encryption keystore",tn="Key recovery keystroe",Di="Current encrypted indices",Hi=800,$i=1632,zi=1184,Yi=2400,Vi=1568,Ji=3168,Gi=64,dt=256,Ds=6e8,Ir=100,ee="email",Hs=1;async function rn(e,t){try{const r=await crypto.subtle.deriveBits({name:ft,public:e},t,G);return new Uint8Array(r)}catch(r){throw new Error("Failed to derive elliptic curve secret key",{cause:r})}}async function Zt(){try{return await crypto.subtle.generateKey({name:ft},!0,["deriveBits"])}catch(e){throw new Error("Failed to generate elliptic curve key pair",{cause:e})}}async function Qt(e){try{const t=await crypto.subtle.exportKey("spki",e);return new Uint8Array(t)}catch(t){throw new Error("Failed to export public key",{cause:t})}}async function er(e){try{return await crypto.subtle.importKey("spki",e,{name:ft},!0,[])}catch(t){throw new Error("Failed to import public key",{cause:t})}}async function nn(e){try{const t=await crypto.subtle.exportKey("pkcs8",e);return new Uint8Array(t)}catch(t){throw new Error("Failed to export private key",{cause:t})}}async function sn(e){try{return await crypto.subtle.importKey("pkcs8",e,{name:ft},!0,["deriveBits"])}catch(t){throw new Error("Failed to import private key",{cause:t})}}const Xi=Object.freeze(Object.defineProperty({__proto__:null,deriveSecretKey:rn,exportPrivateKey:nn,exportPublicKey:Qt,generateEccKeys:Zt,importPrivateKey:sn,importPublicKey:er},Symbol.toStringTag,{value:"Module"}));function nt(e){return qt.Buffer.from(e).toString("hex")}function tr(e){return new TextEncoder().encode(e)}function on(e){return new TextDecoder().decode(e)}function Bt(e){return new Uint8Array(qt.Buffer.from(e,"hex"))}function H(e){return qt.Buffer.from(e).toString("base64")}function D(e){return new Uint8Array(qt.Buffer.from(e,"base64"))}function Ce(e){try{const t=H(e.iv),r=H(e.ciphertext),n=JSON.stringify({ciphertext:r,iv:t});return btoa(n)}catch(t){throw new Error("Failed to convert ciphertext to base64",{cause:t})}}function rr(e){try{const t=atob(e),r=JSON.parse(t),n=D(r.iv);return{ciphertext:D(r.ciphertext),iv:n}}catch(t){throw new Error("Failed to convert base64 to ciphertext",{cause:t})}}async function $s(e){try{const t=await Qt(e.userPublicKey),r=await nn(e.userPrivateKey),n=JSON.stringify({userPublicKey:H(t),userPrivateKey:H(r)});return btoa(n)}catch(t){throw new Error("Failed to convert identity keys to base64",{cause:t})}}async function zs(e){try{const t=await Qt(e.userPublicKey),r=await nn(e.userPrivateKey),n=JSON.stringify({userPublicKey:H(t),userPrivateKey:H(r),userPublicKyberKey:H(e.userPublicKyberKey),userPrivateKyberKey:H(e.userPrivateKyberKey)});return btoa(n)}catch(t){throw new Error("Failed to convert identity keys to base64",{cause:t})}}function Ys(e){try{const t=Ce(e.encryptedKeys),r=JSON.stringify({userID:e.userID,type:e.type.toString(),encryptedKeys:t});return btoa(r)}catch(t){throw new Error("Failed to convert encrypted keystore to base64",{cause:t})}}async function Vs(e){try{const t=atob(e),r=JSON.parse(t),n=D(r.userPublicKey),s=D(r.userPrivateKey),o=await er(n),i=await sn(s);return{userPublicKey:o,userPrivateKey:i}}catch(t){throw new Error("Failed convert base64 to idenity key",{cause:t})}}async function cn(e){try{const t=atob(e),r=JSON.parse(t),n=D(r.userPublicKey),s=D(r.userPrivateKey),o=await er(n),i=await sn(s),c=D(r.userPublicKyberKey),a=D(r.userPrivateKyberKey);return{userPublicKey:o,userPrivateKey:i,userPublicKyberKey:c,userPrivateKyberKey:a}}catch(t){throw new Error("Failed to convert base64 to encryption key",{cause:t})}}function Js(e){try{const t=atob(e),r=JSON.parse(t),n=rr(r.encryptedKeys);return{userID:r.userID,type:r.type,encryptedKeys:n}}catch(t){throw new Error("Failed to convert base64 to encrypted keystore",{cause:t})}}function Gs(e){try{const t=JSON.stringify({olmKey:H(e.olmKey),pqKey:H(e.pqKey),index:e.index.toString(),userID:e.userID});return btoa(t)}catch(t){throw new Error("Failed to convert media keys to base64",{cause:t})}}async function qi(e){try{const t=atob(e),r=JSON.parse(t);return{olmKey:D(r.olmKey),pqKey:D(r.pqKey),index:Number(r.index),userID:r.userID}}catch(t){throw new Error("Failed convert base64 to media keys",{cause:t})}}async function Xs(e){try{const t=atob(e),r=JSON.parse(t),n=D(r.eccPublicKey),s=await er(n),o=D(r.kyberPublicKey);return{eccPublicKey:s,kyberPublicKey:o}}catch(t){throw new Error("Failed to convert base64 to PublicKeys",{cause:t})}}async function Wi(e){try{const t=await Qt(e.eccPublicKey),r=JSON.stringify({eccPublicKey:H(t),kyberPublicKey:H(e.kyberPublicKey)});return btoa(r)}catch(t){throw new Error("Failed to convert key of the type PublicKeys to base64",{cause:t})}}const je=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Zi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function jr(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function _e(e,...t){if(!Zi(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Nt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function qs(e,t){_e(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Ws(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function st(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function kr(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ce(e,t){return e<<32-t|e>>>t}const Qi=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ec(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function tc(e){for(let t=0;t<e.length;t++)e[t]=ec(e[t]);return e}const Un=Qi?e=>e:tc,rc=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ue={_0:48,_9:57,A:65,F:70,a:97,f:102};function Dn(e){if(e>=ue._0&&e<=ue._9)return e-ue._0;if(e>=ue.A&&e<=ue.F)return e-(ue.A-10);if(e>=ue.a&&e<=ue.f)return e-(ue.a-10)}function Z(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(rc)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let s=0,o=0;s<r;s++,o+=2){const i=Dn(e.charCodeAt(o)),c=Dn(e.charCodeAt(o+1));if(i===void 0||c===void 0){const a=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+a+'" at index '+o)}n[s]=i*16+c}return n}function nc(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function nr(e){return typeof e=="string"&&(e=nc(e)),_e(e),e}class Zs{}function Qs(e){const t=n=>e().update(nr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function sc(e){const t=(n,s)=>e(s).update(nr(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function eo(e=32){if(je&&typeof je.getRandomValues=="function")return je.getRandomValues(new Uint8Array(e));if(je&&typeof je.randomBytes=="function")return Uint8Array.from(je.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function oc(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const s=BigInt(32),o=BigInt(4294967295),i=Number(r>>s&o),c=Number(r&o),a=n?4:0,l=n?0:4;e.setUint32(t+a,i,n),e.setUint32(t+l,c,n)}function ic(e,t,r){return e&t^~e&r}function cc(e,t,r){return e&t^e&r^t&r}class ac extends Zs{constructor(t,r,n,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(t),this.view=kr(this.buffer)}update(t){Nt(this),t=nr(t),_e(t);const{view:r,buffer:n,blockLen:s}=this,o=t.length;for(let i=0;i<o;){const c=Math.min(s-this.pos,o-i);if(c===s){const a=kr(t);for(;s<=o-i;i+=s)this.process(a,i);continue}n.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Nt(this),qs(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:o}=this;let{pos:i}=this;r[i++]=128,st(this.buffer.subarray(i)),this.padOffset>s-i&&(this.process(n,0),i=0);for(let h=i;h<s;h++)r[h]=0;oc(n,s-8,BigInt(this.length*8),o),this.process(n,0);const c=kr(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)c.setUint32(4*h,u[h],o)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:o,destroyed:i,pos:c}=this;return t.destroyed=i,t.finished=o,t.length=s,t.pos=c,s%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const ye=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Et=BigInt(2**32-1),Hn=BigInt(32);function lc(e,t=!1){return t?{h:Number(e&Et),l:Number(e>>Hn&Et)}:{h:Number(e>>Hn&Et)|0,l:Number(e&Et)|0}}function uc(e,t=!1){const r=e.length;let n=new Uint32Array(r),s=new Uint32Array(r);for(let o=0;o<r;o++){const{h:i,l:c}=lc(e[o],t);[n[o],s[o]]=[i,c]}return[n,s]}const hc=(e,t,r)=>e<<r|t>>>32-r,fc=(e,t,r)=>t<<r|e>>>32-r,dc=(e,t,r)=>t<<r-32|e>>>64-r,pc=(e,t,r)=>e<<r-32|t>>>64-r,yc=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),me=new Uint32Array(64);class mc extends ac{constructor(t=32){super(64,t,8,!1),this.A=ye[0]|0,this.B=ye[1]|0,this.C=ye[2]|0,this.D=ye[3]|0,this.E=ye[4]|0,this.F=ye[5]|0,this.G=ye[6]|0,this.H=ye[7]|0}get(){const{A:t,B:r,C:n,D:s,E:o,F:i,G:c,H:a}=this;return[t,r,n,s,o,i,c,a]}set(t,r,n,s,o,i,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=o|0,this.F=i|0,this.G=c|0,this.H=a|0}process(t,r){for(let h=0;h<16;h++,r+=4)me[h]=t.getUint32(r,!1);for(let h=16;h<64;h++){const m=me[h-15],y=me[h-2],p=ce(m,7)^ce(m,18)^m>>>3,f=ce(y,17)^ce(y,19)^y>>>10;me[h]=f+me[h-7]+p+me[h-16]|0}let{A:n,B:s,C:o,D:i,E:c,F:a,G:l,H:u}=this;for(let h=0;h<64;h++){const m=ce(c,6)^ce(c,11)^ce(c,25),y=u+m+ic(c,a,l)+yc[h]+me[h]|0,f=(ce(n,2)^ce(n,13)^ce(n,22))+cc(n,s,o)|0;u=l,l=a,a=c,c=i+y|0,i=o,o=s,s=n,n=y+f|0}n=n+this.A|0,s=s+this.B|0,o=o+this.C|0,i=i+this.D|0,c=c+this.E|0,a=a+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,o,i,c,a,l,u)}roundClean(){st(me)}destroy(){this.set(0,0,0,0,0,0,0,0),st(this.buffer)}}const gc=Qs(()=>new mc);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Lt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function to(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(r=>typeof r=="string"):t.every(r=>Number.isSafeInteger(r)):!1}function wc(e){if(typeof e!="function")throw new Error("function expected");return!0}function Mt(e,t){if(typeof t!="string")throw new Error(`${e}: string expected`);return!0}function Ve(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function Ut(e){if(!Array.isArray(e))throw new Error("array expected")}function Dt(e,t){if(!to(!0,t))throw new Error(`${e}: array of strings expected`)}function ro(e,t){if(!to(!1,t))throw new Error(`${e}: array of numbers expected`)}function bc(...e){const t=o=>o,r=(o,i)=>c=>o(i(c)),n=e.map(o=>o.encode).reduceRight(r,t),s=e.map(o=>o.decode).reduce(r,t);return{encode:n,decode:s}}function Ec(e){const t=typeof e=="string"?e.split(""):e,r=t.length;Dt("alphabet",t);const n=new Map(t.map((s,o)=>[s,o]));return{encode:s=>(Ut(s),s.map(o=>{if(!Number.isSafeInteger(o)||o<0||o>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${o}". Allowed: ${e}`);return t[o]})),decode:s=>(Ut(s),s.map(o=>{Mt("alphabet.decode",o);const i=n.get(o);if(i===void 0)throw new Error(`Unknown letter: "${o}". Allowed: ${e}`);return i}))}}function xc(e=""){return Mt("join",e),{encode:t=>(Dt("join.decode",t),t.join(e)),decode:t=>(Mt("join.decode",t),t.split(e))}}function kc(e,t="="){return Ve(e),Mt("padding",t),{encode(r){for(Dt("padding.encode",r);r.length*e%8;)r.push(t);return r},decode(r){Dt("padding.decode",r);let n=r.length;if(n*e%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if((n-1)*e%8===0)throw new Error("padding: invalid, string has too much padding");return r.slice(0,n)}}}function Fr(e,t,r){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(Ut(e),!e.length)return[];let n=0;const s=[],o=Array.from(e,c=>{if(Ve(c),c<0||c>=t)throw new Error(`invalid integer: ${c}`);return c}),i=o.length;for(;;){let c=0,a=!0;for(let l=n;l<i;l++){const u=o[l],h=t*c,m=h+u;if(!Number.isSafeInteger(m)||h/t!==c||m-u!==h)throw new Error("convertRadix: carry overflow");const y=m/r;c=m%r;const p=Math.floor(y);if(o[l]=p,!Number.isSafeInteger(p)||p*r+c!==m)throw new Error("convertRadix: carry overflow");if(a)p?a=!1:n=l;else continue}if(s.push(c),a)break}for(let c=0;c<e.length-1&&e[c]===0;c++)s.push(0);return s.reverse()}const no=(e,t)=>t===0?e:no(t,e%t),Ht=(e,t)=>e+(t-no(e,t)),vr=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function Br(e,t,r,n){if(Ut(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(Ht(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${Ht(t,r)}`);let s=0,o=0;const i=vr[t],c=vr[r]-1,a=[];for(const l of e){if(Ve(l),l>=i)throw new Error(`convertRadix2: invalid data word=${l} from=${t}`);if(s=s<<t|l,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)a.push((s>>o-r&c)>>>0);const u=vr[o];if(u===void 0)throw new Error("invalid carry");s&=u-1}if(s=s<<r-o&c,!n&&o>=t)throw new Error("Excess padding");if(!n&&s>0)throw new Error(`Non-zero padding: ${s}`);return n&&o>0&&a.push(s>>>0),a}function vc(e){Ve(e);const t=2**8;return{encode:r=>{if(!Lt(r))throw new Error("radix.encode input should be Uint8Array");return Fr(Array.from(r),t,e)},decode:r=>(ro("radix.decode",r),Uint8Array.from(Fr(r,e,t)))}}function Sc(e,t=!1){if(Ve(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Ht(8,e)>32||Ht(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!Lt(r))throw new Error("radix2.encode input should be Uint8Array");return Br(Array.from(r),8,e,!t)},decode:r=>(ro("radix2.decode",r),Uint8Array.from(Br(r,e,8,t)))}}function Tc(e,t){return Ve(e),wc(t),{encode(r){if(!Lt(r))throw new Error("checksum.encode: input should be Uint8Array");const n=t(r).slice(0,e),s=new Uint8Array(r.length+e);return s.set(r),s.set(n,r.length),s},decode(r){if(!Lt(r))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),s=r.slice(-e),o=t(n).slice(0,e);for(let i=0;i<e;i++)if(o[i]!==s[i])throw new Error("Invalid checksum");return n}}}const xt={alphabet:Ec,chain:bc,checksum:Tc,convertRadix:Fr,convertRadix2:Br,radix:vc,radix2:Sc,join:xc,padding:kc};/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const Ac=e=>e[0]==="あいこくしん";function Kc(e){_e(e,16,20,24,28,32)}function _c(e,t=128){if(jr(t),t%32!==0||t>256)throw new TypeError("Invalid entropy");return Cc(eo(t/8),e)}const Oc=e=>{const t=8-e.length/4;return new Uint8Array([gc(e)[0]>>t<<t])};function Rc(e){if(!Array.isArray(e)||e.length!==2048||typeof e[0]!="string")throw new Error("Wordlist: expected array of 2048 strings");return e.forEach(t=>{if(typeof t!="string")throw new Error("wordlist: non-string element: "+t)}),xt.chain(xt.checksum(1,Oc),xt.radix2(11,!0),xt.alphabet(e))}function Cc(e,t){return Kc(e),Rc(t).encode(e).join(Ac(t)?" ":" ")}const Pc=`abandon
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
attend
|
|
118
|
-
attitude
|
|
119
|
-
attract
|
|
120
|
-
auction
|
|
121
|
-
audit
|
|
122
|
-
august
|
|
123
|
-
aunt
|
|
124
|
-
author
|
|
125
|
-
auto
|
|
126
|
-
autumn
|
|
127
|
-
average
|
|
128
|
-
avocado
|
|
129
|
-
avoid
|
|
130
|
-
awake
|
|
131
|
-
aware
|
|
132
|
-
away
|
|
133
|
-
awesome
|
|
134
|
-
awful
|
|
135
|
-
awkward
|
|
136
|
-
axis
|
|
137
|
-
baby
|
|
138
|
-
bachelor
|
|
139
|
-
bacon
|
|
140
|
-
badge
|
|
141
|
-
bag
|
|
142
|
-
balance
|
|
143
|
-
balcony
|
|
144
|
-
ball
|
|
145
|
-
bamboo
|
|
146
|
-
banana
|
|
147
|
-
banner
|
|
148
|
-
bar
|
|
149
|
-
barely
|
|
150
|
-
bargain
|
|
151
|
-
barrel
|
|
152
|
-
base
|
|
153
|
-
basic
|
|
154
|
-
basket
|
|
155
|
-
battle
|
|
156
|
-
beach
|
|
157
|
-
bean
|
|
158
|
-
beauty
|
|
159
|
-
because
|
|
160
|
-
become
|
|
161
|
-
beef
|
|
162
|
-
before
|
|
163
|
-
begin
|
|
164
|
-
behave
|
|
165
|
-
behind
|
|
166
|
-
believe
|
|
167
|
-
below
|
|
168
|
-
belt
|
|
169
|
-
bench
|
|
170
|
-
benefit
|
|
171
|
-
best
|
|
172
|
-
betray
|
|
173
|
-
better
|
|
174
|
-
between
|
|
175
|
-
beyond
|
|
176
|
-
bicycle
|
|
177
|
-
bid
|
|
178
|
-
bike
|
|
179
|
-
bind
|
|
180
|
-
biology
|
|
181
|
-
bird
|
|
182
|
-
birth
|
|
183
|
-
bitter
|
|
184
|
-
black
|
|
185
|
-
blade
|
|
186
|
-
blame
|
|
187
|
-
blanket
|
|
188
|
-
blast
|
|
189
|
-
bleak
|
|
190
|
-
bless
|
|
191
|
-
blind
|
|
192
|
-
blood
|
|
193
|
-
blossom
|
|
194
|
-
blouse
|
|
195
|
-
blue
|
|
196
|
-
blur
|
|
197
|
-
blush
|
|
198
|
-
board
|
|
199
|
-
boat
|
|
200
|
-
body
|
|
201
|
-
boil
|
|
202
|
-
bomb
|
|
203
|
-
bone
|
|
204
|
-
bonus
|
|
205
|
-
book
|
|
206
|
-
boost
|
|
207
|
-
border
|
|
208
|
-
boring
|
|
209
|
-
borrow
|
|
210
|
-
boss
|
|
211
|
-
bottom
|
|
212
|
-
bounce
|
|
213
|
-
box
|
|
214
|
-
boy
|
|
215
|
-
bracket
|
|
216
|
-
brain
|
|
217
|
-
brand
|
|
218
|
-
brass
|
|
219
|
-
brave
|
|
220
|
-
bread
|
|
221
|
-
breeze
|
|
222
|
-
brick
|
|
223
|
-
bridge
|
|
224
|
-
brief
|
|
225
|
-
bright
|
|
226
|
-
bring
|
|
227
|
-
brisk
|
|
228
|
-
broccoli
|
|
229
|
-
broken
|
|
230
|
-
bronze
|
|
231
|
-
broom
|
|
232
|
-
brother
|
|
233
|
-
brown
|
|
234
|
-
brush
|
|
235
|
-
bubble
|
|
236
|
-
buddy
|
|
237
|
-
budget
|
|
238
|
-
buffalo
|
|
239
|
-
build
|
|
240
|
-
bulb
|
|
241
|
-
bulk
|
|
242
|
-
bullet
|
|
243
|
-
bundle
|
|
244
|
-
bunker
|
|
245
|
-
burden
|
|
246
|
-
burger
|
|
247
|
-
burst
|
|
248
|
-
bus
|
|
249
|
-
business
|
|
250
|
-
busy
|
|
251
|
-
butter
|
|
252
|
-
buyer
|
|
253
|
-
buzz
|
|
254
|
-
cabbage
|
|
255
|
-
cabin
|
|
256
|
-
cable
|
|
257
|
-
cactus
|
|
258
|
-
cage
|
|
259
|
-
cake
|
|
260
|
-
call
|
|
261
|
-
calm
|
|
262
|
-
camera
|
|
263
|
-
camp
|
|
264
|
-
can
|
|
265
|
-
canal
|
|
266
|
-
cancel
|
|
267
|
-
candy
|
|
268
|
-
cannon
|
|
269
|
-
canoe
|
|
270
|
-
canvas
|
|
271
|
-
canyon
|
|
272
|
-
capable
|
|
273
|
-
capital
|
|
274
|
-
captain
|
|
275
|
-
car
|
|
276
|
-
carbon
|
|
277
|
-
card
|
|
278
|
-
cargo
|
|
279
|
-
carpet
|
|
280
|
-
carry
|
|
281
|
-
cart
|
|
282
|
-
case
|
|
283
|
-
cash
|
|
284
|
-
casino
|
|
285
|
-
castle
|
|
286
|
-
casual
|
|
287
|
-
cat
|
|
288
|
-
catalog
|
|
289
|
-
catch
|
|
290
|
-
category
|
|
291
|
-
cattle
|
|
292
|
-
caught
|
|
293
|
-
cause
|
|
294
|
-
caution
|
|
295
|
-
cave
|
|
296
|
-
ceiling
|
|
297
|
-
celery
|
|
298
|
-
cement
|
|
299
|
-
census
|
|
300
|
-
century
|
|
301
|
-
cereal
|
|
302
|
-
certain
|
|
303
|
-
chair
|
|
304
|
-
chalk
|
|
305
|
-
champion
|
|
306
|
-
change
|
|
307
|
-
chaos
|
|
308
|
-
chapter
|
|
309
|
-
charge
|
|
310
|
-
chase
|
|
311
|
-
chat
|
|
312
|
-
cheap
|
|
313
|
-
check
|
|
314
|
-
cheese
|
|
315
|
-
chef
|
|
316
|
-
cherry
|
|
317
|
-
chest
|
|
318
|
-
chicken
|
|
319
|
-
chief
|
|
320
|
-
child
|
|
321
|
-
chimney
|
|
322
|
-
choice
|
|
323
|
-
choose
|
|
324
|
-
chronic
|
|
325
|
-
chuckle
|
|
326
|
-
chunk
|
|
327
|
-
churn
|
|
328
|
-
cigar
|
|
329
|
-
cinnamon
|
|
330
|
-
circle
|
|
331
|
-
citizen
|
|
332
|
-
city
|
|
333
|
-
civil
|
|
334
|
-
claim
|
|
335
|
-
clap
|
|
336
|
-
clarify
|
|
337
|
-
claw
|
|
338
|
-
clay
|
|
339
|
-
clean
|
|
340
|
-
clerk
|
|
341
|
-
clever
|
|
342
|
-
click
|
|
343
|
-
client
|
|
344
|
-
cliff
|
|
345
|
-
climb
|
|
346
|
-
clinic
|
|
347
|
-
clip
|
|
348
|
-
clock
|
|
349
|
-
clog
|
|
350
|
-
close
|
|
351
|
-
cloth
|
|
352
|
-
cloud
|
|
353
|
-
clown
|
|
354
|
-
club
|
|
355
|
-
clump
|
|
356
|
-
cluster
|
|
357
|
-
clutch
|
|
358
|
-
coach
|
|
359
|
-
coast
|
|
360
|
-
coconut
|
|
361
|
-
code
|
|
362
|
-
coffee
|
|
363
|
-
coil
|
|
364
|
-
coin
|
|
365
|
-
collect
|
|
366
|
-
color
|
|
367
|
-
column
|
|
368
|
-
combine
|
|
369
|
-
come
|
|
370
|
-
comfort
|
|
371
|
-
comic
|
|
372
|
-
common
|
|
373
|
-
company
|
|
374
|
-
concert
|
|
375
|
-
conduct
|
|
376
|
-
confirm
|
|
377
|
-
congress
|
|
378
|
-
connect
|
|
379
|
-
consider
|
|
380
|
-
control
|
|
381
|
-
convince
|
|
382
|
-
cook
|
|
383
|
-
cool
|
|
384
|
-
copper
|
|
385
|
-
copy
|
|
386
|
-
coral
|
|
387
|
-
core
|
|
388
|
-
corn
|
|
389
|
-
correct
|
|
390
|
-
cost
|
|
391
|
-
cotton
|
|
392
|
-
couch
|
|
393
|
-
country
|
|
394
|
-
couple
|
|
395
|
-
course
|
|
396
|
-
cousin
|
|
397
|
-
cover
|
|
398
|
-
coyote
|
|
399
|
-
crack
|
|
400
|
-
cradle
|
|
401
|
-
craft
|
|
402
|
-
cram
|
|
403
|
-
crane
|
|
404
|
-
crash
|
|
405
|
-
crater
|
|
406
|
-
crawl
|
|
407
|
-
crazy
|
|
408
|
-
cream
|
|
409
|
-
credit
|
|
410
|
-
creek
|
|
411
|
-
crew
|
|
412
|
-
cricket
|
|
413
|
-
crime
|
|
414
|
-
crisp
|
|
415
|
-
critic
|
|
416
|
-
crop
|
|
417
|
-
cross
|
|
418
|
-
crouch
|
|
419
|
-
crowd
|
|
420
|
-
crucial
|
|
421
|
-
cruel
|
|
422
|
-
cruise
|
|
423
|
-
crumble
|
|
424
|
-
crunch
|
|
425
|
-
crush
|
|
426
|
-
cry
|
|
427
|
-
crystal
|
|
428
|
-
cube
|
|
429
|
-
culture
|
|
430
|
-
cup
|
|
431
|
-
cupboard
|
|
432
|
-
curious
|
|
433
|
-
current
|
|
434
|
-
curtain
|
|
435
|
-
curve
|
|
436
|
-
cushion
|
|
437
|
-
custom
|
|
438
|
-
cute
|
|
439
|
-
cycle
|
|
440
|
-
dad
|
|
441
|
-
damage
|
|
442
|
-
damp
|
|
443
|
-
dance
|
|
444
|
-
danger
|
|
445
|
-
daring
|
|
446
|
-
dash
|
|
447
|
-
daughter
|
|
448
|
-
dawn
|
|
449
|
-
day
|
|
450
|
-
deal
|
|
451
|
-
debate
|
|
452
|
-
debris
|
|
453
|
-
decade
|
|
454
|
-
december
|
|
455
|
-
decide
|
|
456
|
-
decline
|
|
457
|
-
decorate
|
|
458
|
-
decrease
|
|
459
|
-
deer
|
|
460
|
-
defense
|
|
461
|
-
define
|
|
462
|
-
defy
|
|
463
|
-
degree
|
|
464
|
-
delay
|
|
465
|
-
deliver
|
|
466
|
-
demand
|
|
467
|
-
demise
|
|
468
|
-
denial
|
|
469
|
-
dentist
|
|
470
|
-
deny
|
|
471
|
-
depart
|
|
472
|
-
depend
|
|
473
|
-
deposit
|
|
474
|
-
depth
|
|
475
|
-
deputy
|
|
476
|
-
derive
|
|
477
|
-
describe
|
|
478
|
-
desert
|
|
479
|
-
design
|
|
480
|
-
desk
|
|
481
|
-
despair
|
|
482
|
-
destroy
|
|
483
|
-
detail
|
|
484
|
-
detect
|
|
485
|
-
develop
|
|
486
|
-
device
|
|
487
|
-
devote
|
|
488
|
-
diagram
|
|
489
|
-
dial
|
|
490
|
-
diamond
|
|
491
|
-
diary
|
|
492
|
-
dice
|
|
493
|
-
diesel
|
|
494
|
-
diet
|
|
495
|
-
differ
|
|
496
|
-
digital
|
|
497
|
-
dignity
|
|
498
|
-
dilemma
|
|
499
|
-
dinner
|
|
500
|
-
dinosaur
|
|
501
|
-
direct
|
|
502
|
-
dirt
|
|
503
|
-
disagree
|
|
504
|
-
discover
|
|
505
|
-
disease
|
|
506
|
-
dish
|
|
507
|
-
dismiss
|
|
508
|
-
disorder
|
|
509
|
-
display
|
|
510
|
-
distance
|
|
511
|
-
divert
|
|
512
|
-
divide
|
|
513
|
-
divorce
|
|
514
|
-
dizzy
|
|
515
|
-
doctor
|
|
516
|
-
document
|
|
517
|
-
dog
|
|
518
|
-
doll
|
|
519
|
-
dolphin
|
|
520
|
-
domain
|
|
521
|
-
donate
|
|
522
|
-
donkey
|
|
523
|
-
donor
|
|
524
|
-
door
|
|
525
|
-
dose
|
|
526
|
-
double
|
|
527
|
-
dove
|
|
528
|
-
draft
|
|
529
|
-
dragon
|
|
530
|
-
drama
|
|
531
|
-
drastic
|
|
532
|
-
draw
|
|
533
|
-
dream
|
|
534
|
-
dress
|
|
535
|
-
drift
|
|
536
|
-
drill
|
|
537
|
-
drink
|
|
538
|
-
drip
|
|
539
|
-
drive
|
|
540
|
-
drop
|
|
541
|
-
drum
|
|
542
|
-
dry
|
|
543
|
-
duck
|
|
544
|
-
dumb
|
|
545
|
-
dune
|
|
546
|
-
during
|
|
547
|
-
dust
|
|
548
|
-
dutch
|
|
549
|
-
duty
|
|
550
|
-
dwarf
|
|
551
|
-
dynamic
|
|
552
|
-
eager
|
|
553
|
-
eagle
|
|
554
|
-
early
|
|
555
|
-
earn
|
|
556
|
-
earth
|
|
557
|
-
easily
|
|
558
|
-
east
|
|
559
|
-
easy
|
|
560
|
-
echo
|
|
561
|
-
ecology
|
|
562
|
-
economy
|
|
563
|
-
edge
|
|
564
|
-
edit
|
|
565
|
-
educate
|
|
566
|
-
effort
|
|
567
|
-
egg
|
|
568
|
-
eight
|
|
569
|
-
either
|
|
570
|
-
elbow
|
|
571
|
-
elder
|
|
572
|
-
electric
|
|
573
|
-
elegant
|
|
574
|
-
element
|
|
575
|
-
elephant
|
|
576
|
-
elevator
|
|
577
|
-
elite
|
|
578
|
-
else
|
|
579
|
-
embark
|
|
580
|
-
embody
|
|
581
|
-
embrace
|
|
582
|
-
emerge
|
|
583
|
-
emotion
|
|
584
|
-
employ
|
|
585
|
-
empower
|
|
586
|
-
empty
|
|
587
|
-
enable
|
|
588
|
-
enact
|
|
589
|
-
end
|
|
590
|
-
endless
|
|
591
|
-
endorse
|
|
592
|
-
enemy
|
|
593
|
-
energy
|
|
594
|
-
enforce
|
|
595
|
-
engage
|
|
596
|
-
engine
|
|
597
|
-
enhance
|
|
598
|
-
enjoy
|
|
599
|
-
enlist
|
|
600
|
-
enough
|
|
601
|
-
enrich
|
|
602
|
-
enroll
|
|
603
|
-
ensure
|
|
604
|
-
enter
|
|
605
|
-
entire
|
|
606
|
-
entry
|
|
607
|
-
envelope
|
|
608
|
-
episode
|
|
609
|
-
equal
|
|
610
|
-
equip
|
|
611
|
-
era
|
|
612
|
-
erase
|
|
613
|
-
erode
|
|
614
|
-
erosion
|
|
615
|
-
error
|
|
616
|
-
erupt
|
|
617
|
-
escape
|
|
618
|
-
essay
|
|
619
|
-
essence
|
|
620
|
-
estate
|
|
621
|
-
eternal
|
|
622
|
-
ethics
|
|
623
|
-
evidence
|
|
624
|
-
evil
|
|
625
|
-
evoke
|
|
626
|
-
evolve
|
|
627
|
-
exact
|
|
628
|
-
example
|
|
629
|
-
excess
|
|
630
|
-
exchange
|
|
631
|
-
excite
|
|
632
|
-
exclude
|
|
633
|
-
excuse
|
|
634
|
-
execute
|
|
635
|
-
exercise
|
|
636
|
-
exhaust
|
|
637
|
-
exhibit
|
|
638
|
-
exile
|
|
639
|
-
exist
|
|
640
|
-
exit
|
|
641
|
-
exotic
|
|
642
|
-
expand
|
|
643
|
-
expect
|
|
644
|
-
expire
|
|
645
|
-
explain
|
|
646
|
-
expose
|
|
647
|
-
express
|
|
648
|
-
extend
|
|
649
|
-
extra
|
|
650
|
-
eye
|
|
651
|
-
eyebrow
|
|
652
|
-
fabric
|
|
653
|
-
face
|
|
654
|
-
faculty
|
|
655
|
-
fade
|
|
656
|
-
faint
|
|
657
|
-
faith
|
|
658
|
-
fall
|
|
659
|
-
false
|
|
660
|
-
fame
|
|
661
|
-
family
|
|
662
|
-
famous
|
|
663
|
-
fan
|
|
664
|
-
fancy
|
|
665
|
-
fantasy
|
|
666
|
-
farm
|
|
667
|
-
fashion
|
|
668
|
-
fat
|
|
669
|
-
fatal
|
|
670
|
-
father
|
|
671
|
-
fatigue
|
|
672
|
-
fault
|
|
673
|
-
favorite
|
|
674
|
-
feature
|
|
675
|
-
february
|
|
676
|
-
federal
|
|
677
|
-
fee
|
|
678
|
-
feed
|
|
679
|
-
feel
|
|
680
|
-
female
|
|
681
|
-
fence
|
|
682
|
-
festival
|
|
683
|
-
fetch
|
|
684
|
-
fever
|
|
685
|
-
few
|
|
686
|
-
fiber
|
|
687
|
-
fiction
|
|
688
|
-
field
|
|
689
|
-
figure
|
|
690
|
-
file
|
|
691
|
-
film
|
|
692
|
-
filter
|
|
693
|
-
final
|
|
694
|
-
find
|
|
695
|
-
fine
|
|
696
|
-
finger
|
|
697
|
-
finish
|
|
698
|
-
fire
|
|
699
|
-
firm
|
|
700
|
-
first
|
|
701
|
-
fiscal
|
|
702
|
-
fish
|
|
703
|
-
fit
|
|
704
|
-
fitness
|
|
705
|
-
fix
|
|
706
|
-
flag
|
|
707
|
-
flame
|
|
708
|
-
flash
|
|
709
|
-
flat
|
|
710
|
-
flavor
|
|
711
|
-
flee
|
|
712
|
-
flight
|
|
713
|
-
flip
|
|
714
|
-
float
|
|
715
|
-
flock
|
|
716
|
-
floor
|
|
717
|
-
flower
|
|
718
|
-
fluid
|
|
719
|
-
flush
|
|
720
|
-
fly
|
|
721
|
-
foam
|
|
722
|
-
focus
|
|
723
|
-
fog
|
|
724
|
-
foil
|
|
725
|
-
fold
|
|
726
|
-
follow
|
|
727
|
-
food
|
|
728
|
-
foot
|
|
729
|
-
force
|
|
730
|
-
forest
|
|
731
|
-
forget
|
|
732
|
-
fork
|
|
733
|
-
fortune
|
|
734
|
-
forum
|
|
735
|
-
forward
|
|
736
|
-
fossil
|
|
737
|
-
foster
|
|
738
|
-
found
|
|
739
|
-
fox
|
|
740
|
-
fragile
|
|
741
|
-
frame
|
|
742
|
-
frequent
|
|
743
|
-
fresh
|
|
744
|
-
friend
|
|
745
|
-
fringe
|
|
746
|
-
frog
|
|
747
|
-
front
|
|
748
|
-
frost
|
|
749
|
-
frown
|
|
750
|
-
frozen
|
|
751
|
-
fruit
|
|
752
|
-
fuel
|
|
753
|
-
fun
|
|
754
|
-
funny
|
|
755
|
-
furnace
|
|
756
|
-
fury
|
|
757
|
-
future
|
|
758
|
-
gadget
|
|
759
|
-
gain
|
|
760
|
-
galaxy
|
|
761
|
-
gallery
|
|
762
|
-
game
|
|
763
|
-
gap
|
|
764
|
-
garage
|
|
765
|
-
garbage
|
|
766
|
-
garden
|
|
767
|
-
garlic
|
|
768
|
-
garment
|
|
769
|
-
gas
|
|
770
|
-
gasp
|
|
771
|
-
gate
|
|
772
|
-
gather
|
|
773
|
-
gauge
|
|
774
|
-
gaze
|
|
775
|
-
general
|
|
776
|
-
genius
|
|
777
|
-
genre
|
|
778
|
-
gentle
|
|
779
|
-
genuine
|
|
780
|
-
gesture
|
|
781
|
-
ghost
|
|
782
|
-
giant
|
|
783
|
-
gift
|
|
784
|
-
giggle
|
|
785
|
-
ginger
|
|
786
|
-
giraffe
|
|
787
|
-
girl
|
|
788
|
-
give
|
|
789
|
-
glad
|
|
790
|
-
glance
|
|
791
|
-
glare
|
|
792
|
-
glass
|
|
793
|
-
glide
|
|
794
|
-
glimpse
|
|
795
|
-
globe
|
|
796
|
-
gloom
|
|
797
|
-
glory
|
|
798
|
-
glove
|
|
799
|
-
glow
|
|
800
|
-
glue
|
|
801
|
-
goat
|
|
802
|
-
goddess
|
|
803
|
-
gold
|
|
804
|
-
good
|
|
805
|
-
goose
|
|
806
|
-
gorilla
|
|
807
|
-
gospel
|
|
808
|
-
gossip
|
|
809
|
-
govern
|
|
810
|
-
gown
|
|
811
|
-
grab
|
|
812
|
-
grace
|
|
813
|
-
grain
|
|
814
|
-
grant
|
|
815
|
-
grape
|
|
816
|
-
grass
|
|
817
|
-
gravity
|
|
818
|
-
great
|
|
819
|
-
green
|
|
820
|
-
grid
|
|
821
|
-
grief
|
|
822
|
-
grit
|
|
823
|
-
grocery
|
|
824
|
-
group
|
|
825
|
-
grow
|
|
826
|
-
grunt
|
|
827
|
-
guard
|
|
828
|
-
guess
|
|
829
|
-
guide
|
|
830
|
-
guilt
|
|
831
|
-
guitar
|
|
832
|
-
gun
|
|
833
|
-
gym
|
|
834
|
-
habit
|
|
835
|
-
hair
|
|
836
|
-
half
|
|
837
|
-
hammer
|
|
838
|
-
hamster
|
|
839
|
-
hand
|
|
840
|
-
happy
|
|
841
|
-
harbor
|
|
842
|
-
hard
|
|
843
|
-
harsh
|
|
844
|
-
harvest
|
|
845
|
-
hat
|
|
846
|
-
have
|
|
847
|
-
hawk
|
|
848
|
-
hazard
|
|
849
|
-
head
|
|
850
|
-
health
|
|
851
|
-
heart
|
|
852
|
-
heavy
|
|
853
|
-
hedgehog
|
|
854
|
-
height
|
|
855
|
-
hello
|
|
856
|
-
helmet
|
|
857
|
-
help
|
|
858
|
-
hen
|
|
859
|
-
hero
|
|
860
|
-
hidden
|
|
861
|
-
high
|
|
862
|
-
hill
|
|
863
|
-
hint
|
|
864
|
-
hip
|
|
865
|
-
hire
|
|
866
|
-
history
|
|
867
|
-
hobby
|
|
868
|
-
hockey
|
|
869
|
-
hold
|
|
870
|
-
hole
|
|
871
|
-
holiday
|
|
872
|
-
hollow
|
|
873
|
-
home
|
|
874
|
-
honey
|
|
875
|
-
hood
|
|
876
|
-
hope
|
|
877
|
-
horn
|
|
878
|
-
horror
|
|
879
|
-
horse
|
|
880
|
-
hospital
|
|
881
|
-
host
|
|
882
|
-
hotel
|
|
883
|
-
hour
|
|
884
|
-
hover
|
|
885
|
-
hub
|
|
886
|
-
huge
|
|
887
|
-
human
|
|
888
|
-
humble
|
|
889
|
-
humor
|
|
890
|
-
hundred
|
|
891
|
-
hungry
|
|
892
|
-
hunt
|
|
893
|
-
hurdle
|
|
894
|
-
hurry
|
|
895
|
-
hurt
|
|
896
|
-
husband
|
|
897
|
-
hybrid
|
|
898
|
-
ice
|
|
899
|
-
icon
|
|
900
|
-
idea
|
|
901
|
-
identify
|
|
902
|
-
idle
|
|
903
|
-
ignore
|
|
904
|
-
ill
|
|
905
|
-
illegal
|
|
906
|
-
illness
|
|
907
|
-
image
|
|
908
|
-
imitate
|
|
909
|
-
immense
|
|
910
|
-
immune
|
|
911
|
-
impact
|
|
912
|
-
impose
|
|
913
|
-
improve
|
|
914
|
-
impulse
|
|
915
|
-
inch
|
|
916
|
-
include
|
|
917
|
-
income
|
|
918
|
-
increase
|
|
919
|
-
index
|
|
920
|
-
indicate
|
|
921
|
-
indoor
|
|
922
|
-
industry
|
|
923
|
-
infant
|
|
924
|
-
inflict
|
|
925
|
-
inform
|
|
926
|
-
inhale
|
|
927
|
-
inherit
|
|
928
|
-
initial
|
|
929
|
-
inject
|
|
930
|
-
injury
|
|
931
|
-
inmate
|
|
932
|
-
inner
|
|
933
|
-
innocent
|
|
934
|
-
input
|
|
935
|
-
inquiry
|
|
936
|
-
insane
|
|
937
|
-
insect
|
|
938
|
-
inside
|
|
939
|
-
inspire
|
|
940
|
-
install
|
|
941
|
-
intact
|
|
942
|
-
interest
|
|
943
|
-
into
|
|
944
|
-
invest
|
|
945
|
-
invite
|
|
946
|
-
involve
|
|
947
|
-
iron
|
|
948
|
-
island
|
|
949
|
-
isolate
|
|
950
|
-
issue
|
|
951
|
-
item
|
|
952
|
-
ivory
|
|
953
|
-
jacket
|
|
954
|
-
jaguar
|
|
955
|
-
jar
|
|
956
|
-
jazz
|
|
957
|
-
jealous
|
|
958
|
-
jeans
|
|
959
|
-
jelly
|
|
960
|
-
jewel
|
|
961
|
-
job
|
|
962
|
-
join
|
|
963
|
-
joke
|
|
964
|
-
journey
|
|
965
|
-
joy
|
|
966
|
-
judge
|
|
967
|
-
juice
|
|
968
|
-
jump
|
|
969
|
-
jungle
|
|
970
|
-
junior
|
|
971
|
-
junk
|
|
972
|
-
just
|
|
973
|
-
kangaroo
|
|
974
|
-
keen
|
|
975
|
-
keep
|
|
976
|
-
ketchup
|
|
977
|
-
key
|
|
978
|
-
kick
|
|
979
|
-
kid
|
|
980
|
-
kidney
|
|
981
|
-
kind
|
|
982
|
-
kingdom
|
|
983
|
-
kiss
|
|
984
|
-
kit
|
|
985
|
-
kitchen
|
|
986
|
-
kite
|
|
987
|
-
kitten
|
|
988
|
-
kiwi
|
|
989
|
-
knee
|
|
990
|
-
knife
|
|
991
|
-
knock
|
|
992
|
-
know
|
|
993
|
-
lab
|
|
994
|
-
label
|
|
995
|
-
labor
|
|
996
|
-
ladder
|
|
997
|
-
lady
|
|
998
|
-
lake
|
|
999
|
-
lamp
|
|
1000
|
-
language
|
|
1001
|
-
laptop
|
|
1002
|
-
large
|
|
1003
|
-
later
|
|
1004
|
-
latin
|
|
1005
|
-
laugh
|
|
1006
|
-
laundry
|
|
1007
|
-
lava
|
|
1008
|
-
law
|
|
1009
|
-
lawn
|
|
1010
|
-
lawsuit
|
|
1011
|
-
layer
|
|
1012
|
-
lazy
|
|
1013
|
-
leader
|
|
1014
|
-
leaf
|
|
1015
|
-
learn
|
|
1016
|
-
leave
|
|
1017
|
-
lecture
|
|
1018
|
-
left
|
|
1019
|
-
leg
|
|
1020
|
-
legal
|
|
1021
|
-
legend
|
|
1022
|
-
leisure
|
|
1023
|
-
lemon
|
|
1024
|
-
lend
|
|
1025
|
-
length
|
|
1026
|
-
lens
|
|
1027
|
-
leopard
|
|
1028
|
-
lesson
|
|
1029
|
-
letter
|
|
1030
|
-
level
|
|
1031
|
-
liar
|
|
1032
|
-
liberty
|
|
1033
|
-
library
|
|
1034
|
-
license
|
|
1035
|
-
life
|
|
1036
|
-
lift
|
|
1037
|
-
light
|
|
1038
|
-
like
|
|
1039
|
-
limb
|
|
1040
|
-
limit
|
|
1041
|
-
link
|
|
1042
|
-
lion
|
|
1043
|
-
liquid
|
|
1044
|
-
list
|
|
1045
|
-
little
|
|
1046
|
-
live
|
|
1047
|
-
lizard
|
|
1048
|
-
load
|
|
1049
|
-
loan
|
|
1050
|
-
lobster
|
|
1051
|
-
local
|
|
1052
|
-
lock
|
|
1053
|
-
logic
|
|
1054
|
-
lonely
|
|
1055
|
-
long
|
|
1056
|
-
loop
|
|
1057
|
-
lottery
|
|
1058
|
-
loud
|
|
1059
|
-
lounge
|
|
1060
|
-
love
|
|
1061
|
-
loyal
|
|
1062
|
-
lucky
|
|
1063
|
-
luggage
|
|
1064
|
-
lumber
|
|
1065
|
-
lunar
|
|
1066
|
-
lunch
|
|
1067
|
-
luxury
|
|
1068
|
-
lyrics
|
|
1069
|
-
machine
|
|
1070
|
-
mad
|
|
1071
|
-
magic
|
|
1072
|
-
magnet
|
|
1073
|
-
maid
|
|
1074
|
-
mail
|
|
1075
|
-
main
|
|
1076
|
-
major
|
|
1077
|
-
make
|
|
1078
|
-
mammal
|
|
1079
|
-
man
|
|
1080
|
-
manage
|
|
1081
|
-
mandate
|
|
1082
|
-
mango
|
|
1083
|
-
mansion
|
|
1084
|
-
manual
|
|
1085
|
-
maple
|
|
1086
|
-
marble
|
|
1087
|
-
march
|
|
1088
|
-
margin
|
|
1089
|
-
marine
|
|
1090
|
-
market
|
|
1091
|
-
marriage
|
|
1092
|
-
mask
|
|
1093
|
-
mass
|
|
1094
|
-
master
|
|
1095
|
-
match
|
|
1096
|
-
material
|
|
1097
|
-
math
|
|
1098
|
-
matrix
|
|
1099
|
-
matter
|
|
1100
|
-
maximum
|
|
1101
|
-
maze
|
|
1102
|
-
meadow
|
|
1103
|
-
mean
|
|
1104
|
-
measure
|
|
1105
|
-
meat
|
|
1106
|
-
mechanic
|
|
1107
|
-
medal
|
|
1108
|
-
media
|
|
1109
|
-
melody
|
|
1110
|
-
melt
|
|
1111
|
-
member
|
|
1112
|
-
memory
|
|
1113
|
-
mention
|
|
1114
|
-
menu
|
|
1115
|
-
mercy
|
|
1116
|
-
merge
|
|
1117
|
-
merit
|
|
1118
|
-
merry
|
|
1119
|
-
mesh
|
|
1120
|
-
message
|
|
1121
|
-
metal
|
|
1122
|
-
method
|
|
1123
|
-
middle
|
|
1124
|
-
midnight
|
|
1125
|
-
milk
|
|
1126
|
-
million
|
|
1127
|
-
mimic
|
|
1128
|
-
mind
|
|
1129
|
-
minimum
|
|
1130
|
-
minor
|
|
1131
|
-
minute
|
|
1132
|
-
miracle
|
|
1133
|
-
mirror
|
|
1134
|
-
misery
|
|
1135
|
-
miss
|
|
1136
|
-
mistake
|
|
1137
|
-
mix
|
|
1138
|
-
mixed
|
|
1139
|
-
mixture
|
|
1140
|
-
mobile
|
|
1141
|
-
model
|
|
1142
|
-
modify
|
|
1143
|
-
mom
|
|
1144
|
-
moment
|
|
1145
|
-
monitor
|
|
1146
|
-
monkey
|
|
1147
|
-
monster
|
|
1148
|
-
month
|
|
1149
|
-
moon
|
|
1150
|
-
moral
|
|
1151
|
-
more
|
|
1152
|
-
morning
|
|
1153
|
-
mosquito
|
|
1154
|
-
mother
|
|
1155
|
-
motion
|
|
1156
|
-
motor
|
|
1157
|
-
mountain
|
|
1158
|
-
mouse
|
|
1159
|
-
move
|
|
1160
|
-
movie
|
|
1161
|
-
much
|
|
1162
|
-
muffin
|
|
1163
|
-
mule
|
|
1164
|
-
multiply
|
|
1165
|
-
muscle
|
|
1166
|
-
museum
|
|
1167
|
-
mushroom
|
|
1168
|
-
music
|
|
1169
|
-
must
|
|
1170
|
-
mutual
|
|
1171
|
-
myself
|
|
1172
|
-
mystery
|
|
1173
|
-
myth
|
|
1174
|
-
naive
|
|
1175
|
-
name
|
|
1176
|
-
napkin
|
|
1177
|
-
narrow
|
|
1178
|
-
nasty
|
|
1179
|
-
nation
|
|
1180
|
-
nature
|
|
1181
|
-
near
|
|
1182
|
-
neck
|
|
1183
|
-
need
|
|
1184
|
-
negative
|
|
1185
|
-
neglect
|
|
1186
|
-
neither
|
|
1187
|
-
nephew
|
|
1188
|
-
nerve
|
|
1189
|
-
nest
|
|
1190
|
-
net
|
|
1191
|
-
network
|
|
1192
|
-
neutral
|
|
1193
|
-
never
|
|
1194
|
-
news
|
|
1195
|
-
next
|
|
1196
|
-
nice
|
|
1197
|
-
night
|
|
1198
|
-
noble
|
|
1199
|
-
noise
|
|
1200
|
-
nominee
|
|
1201
|
-
noodle
|
|
1202
|
-
normal
|
|
1203
|
-
north
|
|
1204
|
-
nose
|
|
1205
|
-
notable
|
|
1206
|
-
note
|
|
1207
|
-
nothing
|
|
1208
|
-
notice
|
|
1209
|
-
novel
|
|
1210
|
-
now
|
|
1211
|
-
nuclear
|
|
1212
|
-
number
|
|
1213
|
-
nurse
|
|
1214
|
-
nut
|
|
1215
|
-
oak
|
|
1216
|
-
obey
|
|
1217
|
-
object
|
|
1218
|
-
oblige
|
|
1219
|
-
obscure
|
|
1220
|
-
observe
|
|
1221
|
-
obtain
|
|
1222
|
-
obvious
|
|
1223
|
-
occur
|
|
1224
|
-
ocean
|
|
1225
|
-
october
|
|
1226
|
-
odor
|
|
1227
|
-
off
|
|
1228
|
-
offer
|
|
1229
|
-
office
|
|
1230
|
-
often
|
|
1231
|
-
oil
|
|
1232
|
-
okay
|
|
1233
|
-
old
|
|
1234
|
-
olive
|
|
1235
|
-
olympic
|
|
1236
|
-
omit
|
|
1237
|
-
once
|
|
1238
|
-
one
|
|
1239
|
-
onion
|
|
1240
|
-
online
|
|
1241
|
-
only
|
|
1242
|
-
open
|
|
1243
|
-
opera
|
|
1244
|
-
opinion
|
|
1245
|
-
oppose
|
|
1246
|
-
option
|
|
1247
|
-
orange
|
|
1248
|
-
orbit
|
|
1249
|
-
orchard
|
|
1250
|
-
order
|
|
1251
|
-
ordinary
|
|
1252
|
-
organ
|
|
1253
|
-
orient
|
|
1254
|
-
original
|
|
1255
|
-
orphan
|
|
1256
|
-
ostrich
|
|
1257
|
-
other
|
|
1258
|
-
outdoor
|
|
1259
|
-
outer
|
|
1260
|
-
output
|
|
1261
|
-
outside
|
|
1262
|
-
oval
|
|
1263
|
-
oven
|
|
1264
|
-
over
|
|
1265
|
-
own
|
|
1266
|
-
owner
|
|
1267
|
-
oxygen
|
|
1268
|
-
oyster
|
|
1269
|
-
ozone
|
|
1270
|
-
pact
|
|
1271
|
-
paddle
|
|
1272
|
-
page
|
|
1273
|
-
pair
|
|
1274
|
-
palace
|
|
1275
|
-
palm
|
|
1276
|
-
panda
|
|
1277
|
-
panel
|
|
1278
|
-
panic
|
|
1279
|
-
panther
|
|
1280
|
-
paper
|
|
1281
|
-
parade
|
|
1282
|
-
parent
|
|
1283
|
-
park
|
|
1284
|
-
parrot
|
|
1285
|
-
party
|
|
1286
|
-
pass
|
|
1287
|
-
patch
|
|
1288
|
-
path
|
|
1289
|
-
patient
|
|
1290
|
-
patrol
|
|
1291
|
-
pattern
|
|
1292
|
-
pause
|
|
1293
|
-
pave
|
|
1294
|
-
payment
|
|
1295
|
-
peace
|
|
1296
|
-
peanut
|
|
1297
|
-
pear
|
|
1298
|
-
peasant
|
|
1299
|
-
pelican
|
|
1300
|
-
pen
|
|
1301
|
-
penalty
|
|
1302
|
-
pencil
|
|
1303
|
-
people
|
|
1304
|
-
pepper
|
|
1305
|
-
perfect
|
|
1306
|
-
permit
|
|
1307
|
-
person
|
|
1308
|
-
pet
|
|
1309
|
-
phone
|
|
1310
|
-
photo
|
|
1311
|
-
phrase
|
|
1312
|
-
physical
|
|
1313
|
-
piano
|
|
1314
|
-
picnic
|
|
1315
|
-
picture
|
|
1316
|
-
piece
|
|
1317
|
-
pig
|
|
1318
|
-
pigeon
|
|
1319
|
-
pill
|
|
1320
|
-
pilot
|
|
1321
|
-
pink
|
|
1322
|
-
pioneer
|
|
1323
|
-
pipe
|
|
1324
|
-
pistol
|
|
1325
|
-
pitch
|
|
1326
|
-
pizza
|
|
1327
|
-
place
|
|
1328
|
-
planet
|
|
1329
|
-
plastic
|
|
1330
|
-
plate
|
|
1331
|
-
play
|
|
1332
|
-
please
|
|
1333
|
-
pledge
|
|
1334
|
-
pluck
|
|
1335
|
-
plug
|
|
1336
|
-
plunge
|
|
1337
|
-
poem
|
|
1338
|
-
poet
|
|
1339
|
-
point
|
|
1340
|
-
polar
|
|
1341
|
-
pole
|
|
1342
|
-
police
|
|
1343
|
-
pond
|
|
1344
|
-
pony
|
|
1345
|
-
pool
|
|
1346
|
-
popular
|
|
1347
|
-
portion
|
|
1348
|
-
position
|
|
1349
|
-
possible
|
|
1350
|
-
post
|
|
1351
|
-
potato
|
|
1352
|
-
pottery
|
|
1353
|
-
poverty
|
|
1354
|
-
powder
|
|
1355
|
-
power
|
|
1356
|
-
practice
|
|
1357
|
-
praise
|
|
1358
|
-
predict
|
|
1359
|
-
prefer
|
|
1360
|
-
prepare
|
|
1361
|
-
present
|
|
1362
|
-
pretty
|
|
1363
|
-
prevent
|
|
1364
|
-
price
|
|
1365
|
-
pride
|
|
1366
|
-
primary
|
|
1367
|
-
print
|
|
1368
|
-
priority
|
|
1369
|
-
prison
|
|
1370
|
-
private
|
|
1371
|
-
prize
|
|
1372
|
-
problem
|
|
1373
|
-
process
|
|
1374
|
-
produce
|
|
1375
|
-
profit
|
|
1376
|
-
program
|
|
1377
|
-
project
|
|
1378
|
-
promote
|
|
1379
|
-
proof
|
|
1380
|
-
property
|
|
1381
|
-
prosper
|
|
1382
|
-
protect
|
|
1383
|
-
proud
|
|
1384
|
-
provide
|
|
1385
|
-
public
|
|
1386
|
-
pudding
|
|
1387
|
-
pull
|
|
1388
|
-
pulp
|
|
1389
|
-
pulse
|
|
1390
|
-
pumpkin
|
|
1391
|
-
punch
|
|
1392
|
-
pupil
|
|
1393
|
-
puppy
|
|
1394
|
-
purchase
|
|
1395
|
-
purity
|
|
1396
|
-
purpose
|
|
1397
|
-
purse
|
|
1398
|
-
push
|
|
1399
|
-
put
|
|
1400
|
-
puzzle
|
|
1401
|
-
pyramid
|
|
1402
|
-
quality
|
|
1403
|
-
quantum
|
|
1404
|
-
quarter
|
|
1405
|
-
question
|
|
1406
|
-
quick
|
|
1407
|
-
quit
|
|
1408
|
-
quiz
|
|
1409
|
-
quote
|
|
1410
|
-
rabbit
|
|
1411
|
-
raccoon
|
|
1412
|
-
race
|
|
1413
|
-
rack
|
|
1414
|
-
radar
|
|
1415
|
-
radio
|
|
1416
|
-
rail
|
|
1417
|
-
rain
|
|
1418
|
-
raise
|
|
1419
|
-
rally
|
|
1420
|
-
ramp
|
|
1421
|
-
ranch
|
|
1422
|
-
random
|
|
1423
|
-
range
|
|
1424
|
-
rapid
|
|
1425
|
-
rare
|
|
1426
|
-
rate
|
|
1427
|
-
rather
|
|
1428
|
-
raven
|
|
1429
|
-
raw
|
|
1430
|
-
razor
|
|
1431
|
-
ready
|
|
1432
|
-
real
|
|
1433
|
-
reason
|
|
1434
|
-
rebel
|
|
1435
|
-
rebuild
|
|
1436
|
-
recall
|
|
1437
|
-
receive
|
|
1438
|
-
recipe
|
|
1439
|
-
record
|
|
1440
|
-
recycle
|
|
1441
|
-
reduce
|
|
1442
|
-
reflect
|
|
1443
|
-
reform
|
|
1444
|
-
refuse
|
|
1445
|
-
region
|
|
1446
|
-
regret
|
|
1447
|
-
regular
|
|
1448
|
-
reject
|
|
1449
|
-
relax
|
|
1450
|
-
release
|
|
1451
|
-
relief
|
|
1452
|
-
rely
|
|
1453
|
-
remain
|
|
1454
|
-
remember
|
|
1455
|
-
remind
|
|
1456
|
-
remove
|
|
1457
|
-
render
|
|
1458
|
-
renew
|
|
1459
|
-
rent
|
|
1460
|
-
reopen
|
|
1461
|
-
repair
|
|
1462
|
-
repeat
|
|
1463
|
-
replace
|
|
1464
|
-
report
|
|
1465
|
-
require
|
|
1466
|
-
rescue
|
|
1467
|
-
resemble
|
|
1468
|
-
resist
|
|
1469
|
-
resource
|
|
1470
|
-
response
|
|
1471
|
-
result
|
|
1472
|
-
retire
|
|
1473
|
-
retreat
|
|
1474
|
-
return
|
|
1475
|
-
reunion
|
|
1476
|
-
reveal
|
|
1477
|
-
review
|
|
1478
|
-
reward
|
|
1479
|
-
rhythm
|
|
1480
|
-
rib
|
|
1481
|
-
ribbon
|
|
1482
|
-
rice
|
|
1483
|
-
rich
|
|
1484
|
-
ride
|
|
1485
|
-
ridge
|
|
1486
|
-
rifle
|
|
1487
|
-
right
|
|
1488
|
-
rigid
|
|
1489
|
-
ring
|
|
1490
|
-
riot
|
|
1491
|
-
ripple
|
|
1492
|
-
risk
|
|
1493
|
-
ritual
|
|
1494
|
-
rival
|
|
1495
|
-
river
|
|
1496
|
-
road
|
|
1497
|
-
roast
|
|
1498
|
-
robot
|
|
1499
|
-
robust
|
|
1500
|
-
rocket
|
|
1501
|
-
romance
|
|
1502
|
-
roof
|
|
1503
|
-
rookie
|
|
1504
|
-
room
|
|
1505
|
-
rose
|
|
1506
|
-
rotate
|
|
1507
|
-
rough
|
|
1508
|
-
round
|
|
1509
|
-
route
|
|
1510
|
-
royal
|
|
1511
|
-
rubber
|
|
1512
|
-
rude
|
|
1513
|
-
rug
|
|
1514
|
-
rule
|
|
1515
|
-
run
|
|
1516
|
-
runway
|
|
1517
|
-
rural
|
|
1518
|
-
sad
|
|
1519
|
-
saddle
|
|
1520
|
-
sadness
|
|
1521
|
-
safe
|
|
1522
|
-
sail
|
|
1523
|
-
salad
|
|
1524
|
-
salmon
|
|
1525
|
-
salon
|
|
1526
|
-
salt
|
|
1527
|
-
salute
|
|
1528
|
-
same
|
|
1529
|
-
sample
|
|
1530
|
-
sand
|
|
1531
|
-
satisfy
|
|
1532
|
-
satoshi
|
|
1533
|
-
sauce
|
|
1534
|
-
sausage
|
|
1535
|
-
save
|
|
1536
|
-
say
|
|
1537
|
-
scale
|
|
1538
|
-
scan
|
|
1539
|
-
scare
|
|
1540
|
-
scatter
|
|
1541
|
-
scene
|
|
1542
|
-
scheme
|
|
1543
|
-
school
|
|
1544
|
-
science
|
|
1545
|
-
scissors
|
|
1546
|
-
scorpion
|
|
1547
|
-
scout
|
|
1548
|
-
scrap
|
|
1549
|
-
screen
|
|
1550
|
-
script
|
|
1551
|
-
scrub
|
|
1552
|
-
sea
|
|
1553
|
-
search
|
|
1554
|
-
season
|
|
1555
|
-
seat
|
|
1556
|
-
second
|
|
1557
|
-
secret
|
|
1558
|
-
section
|
|
1559
|
-
security
|
|
1560
|
-
seed
|
|
1561
|
-
seek
|
|
1562
|
-
segment
|
|
1563
|
-
select
|
|
1564
|
-
sell
|
|
1565
|
-
seminar
|
|
1566
|
-
senior
|
|
1567
|
-
sense
|
|
1568
|
-
sentence
|
|
1569
|
-
series
|
|
1570
|
-
service
|
|
1571
|
-
session
|
|
1572
|
-
settle
|
|
1573
|
-
setup
|
|
1574
|
-
seven
|
|
1575
|
-
shadow
|
|
1576
|
-
shaft
|
|
1577
|
-
shallow
|
|
1578
|
-
share
|
|
1579
|
-
shed
|
|
1580
|
-
shell
|
|
1581
|
-
sheriff
|
|
1582
|
-
shield
|
|
1583
|
-
shift
|
|
1584
|
-
shine
|
|
1585
|
-
ship
|
|
1586
|
-
shiver
|
|
1587
|
-
shock
|
|
1588
|
-
shoe
|
|
1589
|
-
shoot
|
|
1590
|
-
shop
|
|
1591
|
-
short
|
|
1592
|
-
shoulder
|
|
1593
|
-
shove
|
|
1594
|
-
shrimp
|
|
1595
|
-
shrug
|
|
1596
|
-
shuffle
|
|
1597
|
-
shy
|
|
1598
|
-
sibling
|
|
1599
|
-
sick
|
|
1600
|
-
side
|
|
1601
|
-
siege
|
|
1602
|
-
sight
|
|
1603
|
-
sign
|
|
1604
|
-
silent
|
|
1605
|
-
silk
|
|
1606
|
-
silly
|
|
1607
|
-
silver
|
|
1608
|
-
similar
|
|
1609
|
-
simple
|
|
1610
|
-
since
|
|
1611
|
-
sing
|
|
1612
|
-
siren
|
|
1613
|
-
sister
|
|
1614
|
-
situate
|
|
1615
|
-
six
|
|
1616
|
-
size
|
|
1617
|
-
skate
|
|
1618
|
-
sketch
|
|
1619
|
-
ski
|
|
1620
|
-
skill
|
|
1621
|
-
skin
|
|
1622
|
-
skirt
|
|
1623
|
-
skull
|
|
1624
|
-
slab
|
|
1625
|
-
slam
|
|
1626
|
-
sleep
|
|
1627
|
-
slender
|
|
1628
|
-
slice
|
|
1629
|
-
slide
|
|
1630
|
-
slight
|
|
1631
|
-
slim
|
|
1632
|
-
slogan
|
|
1633
|
-
slot
|
|
1634
|
-
slow
|
|
1635
|
-
slush
|
|
1636
|
-
small
|
|
1637
|
-
smart
|
|
1638
|
-
smile
|
|
1639
|
-
smoke
|
|
1640
|
-
smooth
|
|
1641
|
-
snack
|
|
1642
|
-
snake
|
|
1643
|
-
snap
|
|
1644
|
-
sniff
|
|
1645
|
-
snow
|
|
1646
|
-
soap
|
|
1647
|
-
soccer
|
|
1648
|
-
social
|
|
1649
|
-
sock
|
|
1650
|
-
soda
|
|
1651
|
-
soft
|
|
1652
|
-
solar
|
|
1653
|
-
soldier
|
|
1654
|
-
solid
|
|
1655
|
-
solution
|
|
1656
|
-
solve
|
|
1657
|
-
someone
|
|
1658
|
-
song
|
|
1659
|
-
soon
|
|
1660
|
-
sorry
|
|
1661
|
-
sort
|
|
1662
|
-
soul
|
|
1663
|
-
sound
|
|
1664
|
-
soup
|
|
1665
|
-
source
|
|
1666
|
-
south
|
|
1667
|
-
space
|
|
1668
|
-
spare
|
|
1669
|
-
spatial
|
|
1670
|
-
spawn
|
|
1671
|
-
speak
|
|
1672
|
-
special
|
|
1673
|
-
speed
|
|
1674
|
-
spell
|
|
1675
|
-
spend
|
|
1676
|
-
sphere
|
|
1677
|
-
spice
|
|
1678
|
-
spider
|
|
1679
|
-
spike
|
|
1680
|
-
spin
|
|
1681
|
-
spirit
|
|
1682
|
-
split
|
|
1683
|
-
spoil
|
|
1684
|
-
sponsor
|
|
1685
|
-
spoon
|
|
1686
|
-
sport
|
|
1687
|
-
spot
|
|
1688
|
-
spray
|
|
1689
|
-
spread
|
|
1690
|
-
spring
|
|
1691
|
-
spy
|
|
1692
|
-
square
|
|
1693
|
-
squeeze
|
|
1694
|
-
squirrel
|
|
1695
|
-
stable
|
|
1696
|
-
stadium
|
|
1697
|
-
staff
|
|
1698
|
-
stage
|
|
1699
|
-
stairs
|
|
1700
|
-
stamp
|
|
1701
|
-
stand
|
|
1702
|
-
start
|
|
1703
|
-
state
|
|
1704
|
-
stay
|
|
1705
|
-
steak
|
|
1706
|
-
steel
|
|
1707
|
-
stem
|
|
1708
|
-
step
|
|
1709
|
-
stereo
|
|
1710
|
-
stick
|
|
1711
|
-
still
|
|
1712
|
-
sting
|
|
1713
|
-
stock
|
|
1714
|
-
stomach
|
|
1715
|
-
stone
|
|
1716
|
-
stool
|
|
1717
|
-
story
|
|
1718
|
-
stove
|
|
1719
|
-
strategy
|
|
1720
|
-
street
|
|
1721
|
-
strike
|
|
1722
|
-
strong
|
|
1723
|
-
struggle
|
|
1724
|
-
student
|
|
1725
|
-
stuff
|
|
1726
|
-
stumble
|
|
1727
|
-
style
|
|
1728
|
-
subject
|
|
1729
|
-
submit
|
|
1730
|
-
subway
|
|
1731
|
-
success
|
|
1732
|
-
such
|
|
1733
|
-
sudden
|
|
1734
|
-
suffer
|
|
1735
|
-
sugar
|
|
1736
|
-
suggest
|
|
1737
|
-
suit
|
|
1738
|
-
summer
|
|
1739
|
-
sun
|
|
1740
|
-
sunny
|
|
1741
|
-
sunset
|
|
1742
|
-
super
|
|
1743
|
-
supply
|
|
1744
|
-
supreme
|
|
1745
|
-
sure
|
|
1746
|
-
surface
|
|
1747
|
-
surge
|
|
1748
|
-
surprise
|
|
1749
|
-
surround
|
|
1750
|
-
survey
|
|
1751
|
-
suspect
|
|
1752
|
-
sustain
|
|
1753
|
-
swallow
|
|
1754
|
-
swamp
|
|
1755
|
-
swap
|
|
1756
|
-
swarm
|
|
1757
|
-
swear
|
|
1758
|
-
sweet
|
|
1759
|
-
swift
|
|
1760
|
-
swim
|
|
1761
|
-
swing
|
|
1762
|
-
switch
|
|
1763
|
-
sword
|
|
1764
|
-
symbol
|
|
1765
|
-
symptom
|
|
1766
|
-
syrup
|
|
1767
|
-
system
|
|
1768
|
-
table
|
|
1769
|
-
tackle
|
|
1770
|
-
tag
|
|
1771
|
-
tail
|
|
1772
|
-
talent
|
|
1773
|
-
talk
|
|
1774
|
-
tank
|
|
1775
|
-
tape
|
|
1776
|
-
target
|
|
1777
|
-
task
|
|
1778
|
-
taste
|
|
1779
|
-
tattoo
|
|
1780
|
-
taxi
|
|
1781
|
-
teach
|
|
1782
|
-
team
|
|
1783
|
-
tell
|
|
1784
|
-
ten
|
|
1785
|
-
tenant
|
|
1786
|
-
tennis
|
|
1787
|
-
tent
|
|
1788
|
-
term
|
|
1789
|
-
test
|
|
1790
|
-
text
|
|
1791
|
-
thank
|
|
1792
|
-
that
|
|
1793
|
-
theme
|
|
1794
|
-
then
|
|
1795
|
-
theory
|
|
1796
|
-
there
|
|
1797
|
-
they
|
|
1798
|
-
thing
|
|
1799
|
-
this
|
|
1800
|
-
thought
|
|
1801
|
-
three
|
|
1802
|
-
thrive
|
|
1803
|
-
throw
|
|
1804
|
-
thumb
|
|
1805
|
-
thunder
|
|
1806
|
-
ticket
|
|
1807
|
-
tide
|
|
1808
|
-
tiger
|
|
1809
|
-
tilt
|
|
1810
|
-
timber
|
|
1811
|
-
time
|
|
1812
|
-
tiny
|
|
1813
|
-
tip
|
|
1814
|
-
tired
|
|
1815
|
-
tissue
|
|
1816
|
-
title
|
|
1817
|
-
toast
|
|
1818
|
-
tobacco
|
|
1819
|
-
today
|
|
1820
|
-
toddler
|
|
1821
|
-
toe
|
|
1822
|
-
together
|
|
1823
|
-
toilet
|
|
1824
|
-
token
|
|
1825
|
-
tomato
|
|
1826
|
-
tomorrow
|
|
1827
|
-
tone
|
|
1828
|
-
tongue
|
|
1829
|
-
tonight
|
|
1830
|
-
tool
|
|
1831
|
-
tooth
|
|
1832
|
-
top
|
|
1833
|
-
topic
|
|
1834
|
-
topple
|
|
1835
|
-
torch
|
|
1836
|
-
tornado
|
|
1837
|
-
tortoise
|
|
1838
|
-
toss
|
|
1839
|
-
total
|
|
1840
|
-
tourist
|
|
1841
|
-
toward
|
|
1842
|
-
tower
|
|
1843
|
-
town
|
|
1844
|
-
toy
|
|
1845
|
-
track
|
|
1846
|
-
trade
|
|
1847
|
-
traffic
|
|
1848
|
-
tragic
|
|
1849
|
-
train
|
|
1850
|
-
transfer
|
|
1851
|
-
trap
|
|
1852
|
-
trash
|
|
1853
|
-
travel
|
|
1854
|
-
tray
|
|
1855
|
-
treat
|
|
1856
|
-
tree
|
|
1857
|
-
trend
|
|
1858
|
-
trial
|
|
1859
|
-
tribe
|
|
1860
|
-
trick
|
|
1861
|
-
trigger
|
|
1862
|
-
trim
|
|
1863
|
-
trip
|
|
1864
|
-
trophy
|
|
1865
|
-
trouble
|
|
1866
|
-
truck
|
|
1867
|
-
true
|
|
1868
|
-
truly
|
|
1869
|
-
trumpet
|
|
1870
|
-
trust
|
|
1871
|
-
truth
|
|
1872
|
-
try
|
|
1873
|
-
tube
|
|
1874
|
-
tuition
|
|
1875
|
-
tumble
|
|
1876
|
-
tuna
|
|
1877
|
-
tunnel
|
|
1878
|
-
turkey
|
|
1879
|
-
turn
|
|
1880
|
-
turtle
|
|
1881
|
-
twelve
|
|
1882
|
-
twenty
|
|
1883
|
-
twice
|
|
1884
|
-
twin
|
|
1885
|
-
twist
|
|
1886
|
-
two
|
|
1887
|
-
type
|
|
1888
|
-
typical
|
|
1889
|
-
ugly
|
|
1890
|
-
umbrella
|
|
1891
|
-
unable
|
|
1892
|
-
unaware
|
|
1893
|
-
uncle
|
|
1894
|
-
uncover
|
|
1895
|
-
under
|
|
1896
|
-
undo
|
|
1897
|
-
unfair
|
|
1898
|
-
unfold
|
|
1899
|
-
unhappy
|
|
1900
|
-
uniform
|
|
1901
|
-
unique
|
|
1902
|
-
unit
|
|
1903
|
-
universe
|
|
1904
|
-
unknown
|
|
1905
|
-
unlock
|
|
1906
|
-
until
|
|
1907
|
-
unusual
|
|
1908
|
-
unveil
|
|
1909
|
-
update
|
|
1910
|
-
upgrade
|
|
1911
|
-
uphold
|
|
1912
|
-
upon
|
|
1913
|
-
upper
|
|
1914
|
-
upset
|
|
1915
|
-
urban
|
|
1916
|
-
urge
|
|
1917
|
-
usage
|
|
1918
|
-
use
|
|
1919
|
-
used
|
|
1920
|
-
useful
|
|
1921
|
-
useless
|
|
1922
|
-
usual
|
|
1923
|
-
utility
|
|
1924
|
-
vacant
|
|
1925
|
-
vacuum
|
|
1926
|
-
vague
|
|
1927
|
-
valid
|
|
1928
|
-
valley
|
|
1929
|
-
valve
|
|
1930
|
-
van
|
|
1931
|
-
vanish
|
|
1932
|
-
vapor
|
|
1933
|
-
various
|
|
1934
|
-
vast
|
|
1935
|
-
vault
|
|
1936
|
-
vehicle
|
|
1937
|
-
velvet
|
|
1938
|
-
vendor
|
|
1939
|
-
venture
|
|
1940
|
-
venue
|
|
1941
|
-
verb
|
|
1942
|
-
verify
|
|
1943
|
-
version
|
|
1944
|
-
very
|
|
1945
|
-
vessel
|
|
1946
|
-
veteran
|
|
1947
|
-
viable
|
|
1948
|
-
vibrant
|
|
1949
|
-
vicious
|
|
1950
|
-
victory
|
|
1951
|
-
video
|
|
1952
|
-
view
|
|
1953
|
-
village
|
|
1954
|
-
vintage
|
|
1955
|
-
violin
|
|
1956
|
-
virtual
|
|
1957
|
-
virus
|
|
1958
|
-
visa
|
|
1959
|
-
visit
|
|
1960
|
-
visual
|
|
1961
|
-
vital
|
|
1962
|
-
vivid
|
|
1963
|
-
vocal
|
|
1964
|
-
voice
|
|
1965
|
-
void
|
|
1966
|
-
volcano
|
|
1967
|
-
volume
|
|
1968
|
-
vote
|
|
1969
|
-
voyage
|
|
1970
|
-
wage
|
|
1971
|
-
wagon
|
|
1972
|
-
wait
|
|
1973
|
-
walk
|
|
1974
|
-
wall
|
|
1975
|
-
walnut
|
|
1976
|
-
want
|
|
1977
|
-
warfare
|
|
1978
|
-
warm
|
|
1979
|
-
warrior
|
|
1980
|
-
wash
|
|
1981
|
-
wasp
|
|
1982
|
-
waste
|
|
1983
|
-
water
|
|
1984
|
-
wave
|
|
1985
|
-
way
|
|
1986
|
-
wealth
|
|
1987
|
-
weapon
|
|
1988
|
-
wear
|
|
1989
|
-
weasel
|
|
1990
|
-
weather
|
|
1991
|
-
web
|
|
1992
|
-
wedding
|
|
1993
|
-
weekend
|
|
1994
|
-
weird
|
|
1995
|
-
welcome
|
|
1996
|
-
west
|
|
1997
|
-
wet
|
|
1998
|
-
whale
|
|
1999
|
-
what
|
|
2000
|
-
wheat
|
|
2001
|
-
wheel
|
|
2002
|
-
when
|
|
2003
|
-
where
|
|
2004
|
-
whip
|
|
2005
|
-
whisper
|
|
2006
|
-
wide
|
|
2007
|
-
width
|
|
2008
|
-
wife
|
|
2009
|
-
wild
|
|
2010
|
-
will
|
|
2011
|
-
win
|
|
2012
|
-
window
|
|
2013
|
-
wine
|
|
2014
|
-
wing
|
|
2015
|
-
wink
|
|
2016
|
-
winner
|
|
2017
|
-
winter
|
|
2018
|
-
wire
|
|
2019
|
-
wisdom
|
|
2020
|
-
wise
|
|
2021
|
-
wish
|
|
2022
|
-
witness
|
|
2023
|
-
wolf
|
|
2024
|
-
woman
|
|
2025
|
-
wonder
|
|
2026
|
-
wood
|
|
2027
|
-
wool
|
|
2028
|
-
word
|
|
2029
|
-
work
|
|
2030
|
-
world
|
|
2031
|
-
worry
|
|
2032
|
-
worth
|
|
2033
|
-
wrap
|
|
2034
|
-
wreck
|
|
2035
|
-
wrestle
|
|
2036
|
-
wrist
|
|
2037
|
-
write
|
|
2038
|
-
wrong
|
|
2039
|
-
yard
|
|
2040
|
-
year
|
|
2041
|
-
yellow
|
|
2042
|
-
you
|
|
2043
|
-
young
|
|
2044
|
-
youth
|
|
2045
|
-
zebra
|
|
2046
|
-
zero
|
|
2047
|
-
zone
|
|
2048
|
-
zoo`.split(`
|
|
2049
|
-
`);function so(e){return _c(Pc,e)}const Ic=Object.freeze(Object.defineProperty({__proto__:null,UTF8ToUint8:tr,base64ToCiphertext:rr,base64ToEncryptedKeystore:Js,base64ToEncryptionKeys:cn,base64ToIdentityKeys:Vs,base64ToMediaKeys:qi,base64ToPublicKey:Xs,base64ToUint8Array:D,ciphertextToBase64:Ce,encryptedKeystoreToBase64:Ys,encryptionKeysToBase64:zs,genMnemonic:so,hexToUint8Array:Bt,identityKeysToBase64:$s,mediaKeysToBase64:Gs,publicKeyToBase64:Wi,uint8ArrayToBase64:H,uint8ArrayToHex:nt,uint8ToUTF8:on},Symbol.toStringTag,{value:"Module"}));async function an(e,t){try{const r=await Me.createBLAKE3(e);r.init();for(const n of t)r.update(n);return r}catch(r){throw new Error("Failed to compute hash",{cause:r})}}async function jc(e,t,r){try{const n=await Me.createBLAKE3(e,t);n.init();for(const s of r)n.update(s);return n}catch(n){throw new Error("Failed to compute keyed hash",{cause:n})}}async function Fc(e){try{return(await an(dt,e)).digest()}catch(t){throw new Error("Failed to compute hash",{cause:t})}}async function oo(e,t){try{return(await an(e,t)).digest("binary")}catch(r){throw new Error("Failed to get bits from data",{cause:r})}}async function Je(e,t){try{return(await an(e,[t])).digest("binary")}catch(r){throw new Error("Failed to get bits from string",{cause:r})}}async function Bc(e){try{const t=Gs(e),r=await oo(dt,[Fs,t]);return nt(r)}catch(t){throw new Error("Failed to compute commitment to media keys",{cause:t})}}async function Nc(e,t){try{const r=await Je(G,e);return(await jc(dt,r,t)).digest()}catch(r){throw new Error("Failed to compute mac",{cause:r})}}const Lc=Object.freeze(Object.defineProperty({__proto__:null,comitToMediaKey:Bc,computeMac:Nc,getBitsFromData:oo,getBitsFromString:Je,hashData:Fc},Symbol.toStringTag,{value:"Module"}));async function sr(e){return crypto.subtle.importKey(Ye,new Uint8Array(e),{name:ze,length:G},!0,["encrypt","decrypt"])}async function Mc(e){try{const t=await crypto.subtle.exportKey(Ye,e);return new Uint8Array(t)}catch(t){throw new Error("Failed to export symmetric CryptoKey",{cause:t})}}async function ln(){return crypto.subtle.generateKey({name:ze,length:G},!0,["encrypt","decrypt"])}function Uc(){try{const e=new Uint8Array(G/8);return crypto.getRandomValues(e),e}catch(e){throw new Error("Failed to generate symmetric key",{cause:e})}}async function Dc(e){try{const t=await Je(G,e);return sr(t)}catch(t){throw new Error("Failed to derive CryptoKey from the given key material",{cause:t})}}const Hc=BigInt(0),Ze=BigInt(1),$c=BigInt(2),zc=BigInt(7),Yc=BigInt(256),Vc=BigInt(113),io=[],co=[],ao=[];for(let e=0,t=Ze,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],io.push(2*(5*n+r)),co.push((e+1)*(e+2)/2%64);let s=Hc;for(let o=0;o<7;o++)t=(t<<Ze^(t>>zc)*Vc)%Yc,t&$c&&(s^=Ze<<(Ze<<BigInt(o))-Ze);ao.push(s)}const lo=uc(ao,!0),Jc=lo[0],Gc=lo[1],$n=(e,t,r)=>r>32?dc(e,t,r):hc(e,t,r),zn=(e,t,r)=>r>32?pc(e,t,r):fc(e,t,r);function Xc(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const c=(i+8)%10,a=(i+2)%10,l=r[a],u=r[a+1],h=$n(l,u,1)^r[c],m=zn(l,u,1)^r[c+1];for(let y=0;y<50;y+=10)e[i+y]^=h,e[i+y+1]^=m}let s=e[2],o=e[3];for(let i=0;i<24;i++){const c=co[i],a=$n(s,o,c),l=zn(s,o,c),u=io[i];s=e[u],o=e[u+1],e[u]=a,e[u+1]=l}for(let i=0;i<50;i+=10){for(let c=0;c<10;c++)r[c]=e[i+c];for(let c=0;c<10;c++)e[i+c]^=~r[(c+2)%10]&r[(c+4)%10]}e[0]^=Jc[n],e[1]^=Gc[n]}st(r)}class or extends Zs{constructor(t,r,n,s=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=o,jr(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ws(this.state)}clone(){return this._cloneInto()}keccak(){Un(this.state32),Xc(this.state32,this.rounds),Un(this.state32),this.posOut=0,this.pos=0}update(t){Nt(this),t=nr(t),_e(t);const{blockLen:r,state:n}=this,s=t.length;for(let o=0;o<s;){const i=Math.min(r-this.pos,s-o);for(let c=0;c<i;c++)n[this.pos++]^=t[o++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:n,blockLen:s}=this;t[n]^=r,(r&128)!==0&&n===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){Nt(this,!1),_e(t),this.finish();const r=this.state,{blockLen:n}=this;for(let s=0,o=t.length;s<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-s);t.set(r.subarray(this.posOut,this.posOut+i),s),this.posOut+=i,s+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return jr(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(qs(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,st(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:o,enableXOF:i}=this;return t||(t=new or(r,n,s,i,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=s,t.enableXOF=i,t.destroyed=this.destroyed,t}}const uo=(e,t,r)=>Qs(()=>new or(t,e,r)),qc=uo(6,136,256/8),Wc=uo(6,72,512/8),ho=(e,t,r)=>sc((n={})=>new or(t,e,n.dkLen===void 0?r:n.dkLen,!0)),Zc=ho(31,168,128/8),fo=ho(31,136,256/8);/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */const fe=_e,$t=eo;function Yn(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return r===0}function _t(...e){const t=n=>typeof n=="number"?n:n.bytesLen,r=e.reduce((n,s)=>n+t(s),0);return{bytesLen:r,encode:n=>{const s=new Uint8Array(r);for(let o=0,i=0;o<e.length;o++){const c=e[o],a=t(c),l=typeof c=="number"?n[o]:c.encode(n[o]);fe(l,a),s.set(l,i),typeof c!="number"&&l.fill(0),i+=a}return s},decode:n=>{fe(n,r);const s=[];for(const o of e){const i=t(o),c=n.subarray(0,i);s.push(typeof o=="number"?c:o.decode(c)),n=n.subarray(i)}return s}}}function Sr(e,t){const r=t*e.bytesLen;return{bytesLen:r,encode:n=>{if(n.length!==t)throw new Error(`vecCoder.encode: wrong length=${n.length}. Expected: ${t}`);const s=new Uint8Array(r);for(let o=0,i=0;o<n.length;o++){const c=e.encode(n[o]);s.set(c,i),c.fill(0),i+=c.length}return s},decode:n=>{fe(n,r);const s=[];for(let o=0;o<n.length;o+=e.bytesLen)s.push(e.decode(n.subarray(o,o+e.bytesLen)));return s}}}function Te(...e){for(const t of e)if(Array.isArray(t))for(const r of t)r.fill(0);else t.fill(0)}function Vn(e){return(1<<e)-1}Z("0609608648016503040201"),Z("0609608648016503040202"),Z("0609608648016503040203"),Z("0609608648016503040204"),Z("0609608648016503040205"),Z("0609608648016503040206"),Z("0609608648016503040207"),Z("0609608648016503040208"),Z("0609608648016503040209"),Z("060960864801650304020A"),Z("060960864801650304020B"),Z("060960864801650304020C");async function Qc(e){try{if(!e)return $t(_s);const t=new Uint8Array(16),r=$t(12);t.set(r,0);const n=await Je(32,e);return t.set(n,12),t}catch(t){throw new Error("Failed to create IV",{cause:t})}}async function po(e){return Je(Ks,e)}async function ea(e,t,r,n){try{const s=await crypto.subtle.encrypt({name:ze,iv:r,additionalData:n},t,e);return new Uint8Array(s)}catch(s){throw new Error("Failed to encrypt symmetrically",{cause:s})}}async function ta(e,t,r,n){try{const s=await crypto.subtle.decrypt({name:ze,iv:t,additionalData:n},r,e);return new Uint8Array(s)}catch(s){throw new Error("Failed to decrypt symmetrically",{cause:s})}}async function ir(e,t,r,n){try{const s=await Qc(n),o=await po(r);return{ciphertext:await ea(t,e,s,o),iv:s}}catch(s){throw new Error("Failed to encrypt symmetrically",{cause:s})}}async function ot(e,t,r){try{const n=await po(r);return await ta(t.ciphertext,t.iv,e,n)}catch(n){throw new Error("Failed to decrypt symmetrically",{cause:n})}}const ra=Object.freeze(Object.defineProperty({__proto__:null,decryptSymmetrically:ot,deriveSymmetricCryptoKey:Dc,encryptSymmetrically:ir,exportSymmetricCryptoKey:Mc,genSymmetricCryptoKey:ln,genSymmetricKey:Uc,importSymmetricCryptoKey:sr},Symbol.toStringTag,{value:"Module"}));async function it(e,t){try{const r=await Me.blake3(e),n=Bt(r),s=await Me.blake3(t,G,n);return Bt(s)}catch(r){throw new Error("Failed to derive key from base key and context",{cause:r})}}async function pt(e,t){try{if(t.length!=G/8)throw new Error(`Base key length must be exactly ${G/8} bytes`);if(!e)throw new Error("Context is empry");const r=await it(e,t);return await sr(r)}catch(r){throw new Error("Failed to derive CryptoKey from base key and context",{cause:r})}}async function yo(e,t,r=Bs,n=Ns,s=Ls,o=Us){return Me.argon2id({password:e,salt:t,parallelism:r,iterations:n,memorySize:s,hashLength:o,outputType:"binary"})}function na(){try{const e=new Uint8Array(Ms);return crypto.getRandomValues(e),e}catch(e){throw new Error("Failed to sample salt",{cause:e})}}async function mo(e,t,r){try{if(t.length!=G/8||e.length!=G/8)throw new Error(`Input key length must be exactly ${G/8} bytes`);const n=await Me.blake3(e,dt,t);return await it(r,n)}catch(n){throw new Error("Failed to derive symmetric key from two keys",{cause:n})}}async function un(e){try{if(!e)throw new Error("No password given");const t=na();return{key:await yo(e,t),salt:t}}catch(t){throw new Error("Failed to derive key from password",{cause:t})}}async function hn(e,t){try{if(!t.length)throw new Error("No salt given");if(!e)throw new Error("No password given");return await yo(e,t)}catch(r){throw new Error("Failed to derive key from password and salt",{cause:r})}}async function sa(e){try{const{key:t,salt:r}=await un(e);return{keyHex:nt(t),saltHex:nt(r)}}catch(t){throw new Error("Failed to derive key from password",{cause:t})}}async function go(e,t){try{const r=Bt(t),n=await hn(e,r);return nt(n)}catch(r){throw new Error("Failed to derive key from password and salt",{cause:r})}}async function oa(e,t,r){const n=await go(e,t);return r===n}async function wo(e,t){return await mo(e,t,js)}async function ia(e,t){try{const r=await wo(e,t);return await sr(r)}catch(r){throw new Error("Failed to derive symmetric CryptoKey from two keys",{cause:r})}}async function ca(e){try{const t=await it(Pr,e.olmKey),r=await it(Pr,e.pqKey),n=e.index+1,s=e.userID;return{olmKey:t,pqKey:r,index:n,userID:s}}catch(t){throw new Error("Failed to ratchet media key",{cause:t})}}const aa=Object.freeze(Object.defineProperty({__proto__:null,deriveSymmetricCryptoKeyFromContext:pt,deriveSymmetricCryptoKeyFromTwoKeys:ia,deriveSymmetricKeyFromContext:it,deriveSymmetricKeyFromTwoKeys:wo,getKeyFromPassword:un,getKeyFromPasswordAndSalt:hn,getKeyFromPasswordAndSaltHex:go,getKeyFromPasswordHex:sa,ratchetMediaKey:ca,verifyKeyFromPasswordHex:oa},Symbol.toStringTag,{value:"Module"}));function Ot(e){try{const t=JSON.stringify(e);return btoa(t)}catch(t){throw new Error("Failed to convert User to base64",{cause:t})}}function Rt(e){try{const t=atob(e);return JSON.parse(t)}catch(t){throw new Error("Failed to convert base64 to User",{cause:t})}}function bo(e){try{const t=JSON.stringify(e);return tr(t)}catch(t){throw new Error("Failed to convert EmailBody to Uint8Array",{cause:t})}}function fn(e){try{const t=on(e);return JSON.parse(t)}catch(t){throw new Error("Failed to convert Uint8Array to EmailBody",{cause:t})}}function Eo(e){try{const t=JSON.stringify({kyberCiphertext:H(e.kyberCiphertext),encryptedKey:H(e.encryptedKey)});return btoa(t)}catch(t){throw new Error("Failed to convert hybrid key to base64",{cause:t})}}function la(e){try{const t=atob(e),r=JSON.parse(t);return{encryptedKey:D(r.encryptedKey),kyberCiphertext:D(r.kyberCiphertext)}}catch(t){throw new Error("Failed to convert base64 to hybrid key",{cause:t})}}function xo(e){try{const t=JSON.stringify({encryptedKey:H(e.encryptedKey),salt:H(e.salt)});return btoa(t)}catch(t){throw new Error("Failed to convert password-protected key to base64",{cause:t})}}function ua(e){try{const t=atob(e),r=JSON.parse(t);return{encryptedKey:D(r.encryptedKey),salt:D(r.salt)}}catch(t){throw new Error("Failed to convert base64 to password-protected key",{cause:t})}}function ha(e){try{const t=JSON.stringify({...e,sender:Ot(e.sender),recipient:Ot(e.recipient),recipients:e.recipients?.map(Ot)});return btoa(t)}catch(t){throw new Error("Failed to convert email public parameters to base64",{cause:t})}}function fa(e){try{const t=atob(e),r=JSON.parse(t);return{...r,sender:Rt(r.sender),recipient:Rt(r.recipient),recipients:r.recipients?.map(Rt)}}catch(t){throw new Error("Failed to convert base64 to email params",{cause:t})}}function ko(e){try{const t=JSON.stringify({encryptedKey:Eo(e.encryptedKey),enc:Ce(e.enc),recipientEmail:e.recipientEmail});return btoa(t)}catch(t){throw new Error("Failed to convert hybrid email to base64",{cause:t})}}function vo(e){try{const t=JSON.stringify({encryptedKey:xo(e.encryptedKey),enc:Ce(e.enc)});return btoa(t)}catch(t){throw new Error("Failed to convert pwd protected email to base64",{cause:t})}}function So(e){try{const t=JSON.stringify(e);return tr(t)}catch(t){throw new Error("Failed to convert EmailBody to Uint8Array",{cause:t})}}/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */function da(e,t=8){const s=e.toString(2).padStart(8,"0").slice(-t).padStart(7,"0").split("").reverse().join("");return Number.parseInt(s,2)}const pa=e=>{const{newPoly:t,N:r,Q:n,F:s,ROOT_OF_UNITY:o,brvBits:i}=e,c=(f,d=n)=>{const w=f%d|0;return(w>=0?w|0:d+w|0)|0},a=(f,d=n)=>{const w=c(f,d)|0;return(w>d>>1?w-d|0:w)|0};function l(){const f=t(r);for(let d=0;d<r;d++){const w=da(d,i),b=BigInt(o)**BigInt(w)%BigInt(n);f[d]=Number(b)|0}return f}const u=l(),h=128,m=1;return{mod:c,smod:a,nttZetas:u,NTT:{encode:f=>{for(let d=1,w=128;w>m;w>>=1)for(let b=0;b<r;b+=2*w){const E=u[d++];for(let x=b;x<b+w;x++){const k=c(E*f[x+w]);f[x+w]=c(f[x]-k)|0,f[x]=c(f[x]+k)|0}}return f},decode:f=>{for(let d=h-1,w=1+m;w<h+m;w<<=1)for(let b=0;b<r;b+=2*w){const E=u[d--];for(let x=b;x<b+w;x++){const k=f[x];f[x]=c(k+f[x+w]),f[x+w]=c(E*(f[x+w]-k))}}for(let d=0;d<f.length;d++)f[d]=c(s*f[d]);return f}},bitsCoder:(f,d)=>{const w=Vn(f),b=f*(r/8);return{bytesLen:b,encode:E=>{const x=new Uint8Array(b);for(let k=0,S=0,v=0,T=0;k<E.length;k++)for(S|=(d.encode(E[k])&w)<<v,v+=f;v>=8;v-=8,S>>=8)x[T++]=S&Vn(v);return x},decode:E=>{const x=t(r);for(let k=0,S=0,v=0,T=0;k<E.length;k++)for(S|=E[k]<<v,v+=8;v>=f;v-=f,S>>=f)x[T++]=d.decode(S&w);return x}}}}},ya=e=>(t,r)=>{r||(r=e.blockLen);const n=new Uint8Array(t.length+2);n.set(t);const s=t.length,o=new Uint8Array(r);let i=e.create({}),c=0,a=0;return{stats:()=>({calls:c,xofs:a}),get:(l,u)=>(n[s+0]=l,n[s+1]=u,i.destroy(),i=e.create({}).update(n),c++,()=>(a++,i.xofInto(o))),clean:()=>{i.destroy(),o.fill(0),n.fill(0)}}},ma=ya(Zc);/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */const J=256,de=3329,ga=3303,wa=17,{mod:ct,nttZetas:ba,NTT:ke,bitsCoder:Ea}=pa({N:J,Q:de,F:ga,ROOT_OF_UNITY:wa,newPoly:e=>new Uint16Array(e),brvBits:7}),dn={512:{N:J,Q:de,K:2,ETA1:3,ETA2:2,du:10,dv:4,RBGstrength:128},768:{N:J,Q:de,K:3,ETA1:2,ETA2:2,du:10,dv:4,RBGstrength:192},1024:{N:J,Q:de,K:4,ETA1:2,ETA2:2,du:11,dv:5,RBGstrength:256}},xa=e=>{if(e>=12)return{encode:r=>r,decode:r=>r};const t=2**(e-1);return{encode:r=>((r<<e)+de/2)/de,decode:r=>r*de+t>>>e}},Qe=e=>Ea(e,xa(e));function ve(e,t){for(let r=0;r<J;r++)e[r]=ct(e[r]+t[r])}function ka(e,t){for(let r=0;r<J;r++)e[r]=ct(e[r]-t[r])}function va(e,t,r,n,s){const o=ct(t*n*s+e*r),i=ct(e*n+t*r);return{c0:o,c1:i}}function kt(e,t){for(let r=0;r<J/2;r++){let n=ba[64+(r>>1)];r&1&&(n=-n);const{c0:s,c1:o}=va(e[2*r+0],e[2*r+1],t[2*r+0],t[2*r+1],n);e[2*r+0]=s,e[2*r+1]=o}return e}function Jn(e){const t=new Uint16Array(J);for(let r=0;r<J;){const n=e();if(n.length%3)throw new Error("SampleNTT: unaligned block");for(let s=0;r<J&&s+3<=n.length;s+=3){const o=(n[s+0]>>0|n[s+1]<<8)&4095,i=(n[s+1]>>4|n[s+2]<<4)&4095;o<de&&(t[r++]=o),r<J&&i<de&&(t[r++]=i)}}return t}function et(e,t,r,n){const s=e(n*J/4,t,r),o=new Uint16Array(J),i=Ws(s);let c=0;for(let a=0,l=0,u=0,h=0;a<i.length;a++){let m=i[a];for(let y=0;y<32;y++)u+=m&1,m>>=1,c+=1,c===n?(h=u,u=0):c===2*n&&(o[l++]=ct(h-u),u=0,c=0)}if(c)throw new Error(`sampleCBD: leftover bits: ${c}`);return o}const Sa=e=>{const{K:t,PRF:r,XOF:n,HASH512:s,ETA1:o,ETA2:i,du:c,dv:a}=e,l=Qe(1),u=Qe(a),h=Qe(c),m=_t(Sr(Qe(12),t),32),y=Sr(Qe(12),t),p=_t(Sr(h,t),u),f=_t(32,32);return{secretCoder:y,secretKeyLen:y.bytesLen,publicKeyLen:m.bytesLen,cipherTextLen:p.bytesLen,keygen:d=>{fe(d,32);const w=new Uint8Array(33);w.set(d),w[32]=t;const b=s(w),[E,x]=f.decode(b),k=[],S=[];for(let K=0;K<t;K++)k.push(ke.encode(et(r,x,K,o)));const v=n(E);for(let K=0;K<t;K++){const C=ke.encode(et(r,x,t+K,o));for(let O=0;O<t;O++){const P=Jn(v.get(O,K));ve(C,kt(P,k[O]))}S.push(C)}v.clean();const T={publicKey:m.encode([S,E]),secretKey:y.encode(k)};return Te(E,x,k,S,w,b),T},encrypt:(d,w,b)=>{const[E,x]=m.decode(d),k=[];for(let O=0;O<t;O++)k.push(ke.encode(et(r,b,O,o)));const S=n(x),v=new Uint16Array(J),T=[];for(let O=0;O<t;O++){const P=et(r,b,t+O,i),F=new Uint16Array(J);for(let I=0;I<t;I++){const B=Jn(S.get(O,I));ve(F,kt(B,k[I]))}ve(P,ke.decode(F)),T.push(P),ve(v,kt(E[O],k[O])),F.fill(0)}S.clean();const K=et(r,b,2*t,i);ve(K,ke.decode(v));const C=l.decode(w);return ve(C,K),Te(E,k,v,K),p.encode([T,C])},decrypt:(d,w)=>{const[b,E]=p.decode(d),x=y.decode(w),k=new Uint16Array(J);for(let S=0;S<t;S++)ve(k,kt(x[S],ke.encode(b[S])));return ka(E,ke.decode(k)),Te(k,x,b),l.encode(E)}}};function pn(e){const t=Sa(e),{HASH256:r,HASH512:n,KDF:s}=e,{secretCoder:o,cipherTextLen:i}=t,c=t.publicKeyLen,a=_t(t.secretKeyLen,t.publicKeyLen,32,32),l=a.bytesLen,u=32;return{publicKeyLen:c,msgLen:u,keygen:(h=$t(64))=>{fe(h,64);const{publicKey:m,secretKey:y}=t.keygen(h.subarray(0,32)),p=r(m),f=a.encode([y,m,p,h.subarray(32)]);return Te(y,p),{publicKey:m,secretKey:f}},encapsulate:(h,m=$t(32))=>{fe(h,c),fe(m,u);const y=h.subarray(0,384*e.K),p=o.encode(o.decode(y.slice()));if(!Yn(p,y))throw Te(p),new Error("ML-KEM.encapsulate: wrong publicKey modulus");Te(p);const f=n.create().update(m).update(r(h)).digest(),d=t.encrypt(h,m,f.subarray(32,64));return f.subarray(32).fill(0),{cipherText:d,sharedSecret:f.subarray(0,32)}},decapsulate:(h,m)=>{fe(m,l),fe(h,i);const[y,p,f,d]=a.decode(m),w=t.decrypt(h,y),b=n.create().update(w).update(f).digest(),E=b.subarray(0,32),x=t.encrypt(p,w,b.subarray(32,64)),k=Yn(h,x),S=s.create({dkLen:32}).update(d).update(h).digest();return Te(w,x,k?S:E),k?E:S}}}function Ta(e,t,r){return fo.create({dkLen:e}).update(t).update(new Uint8Array([r])).digest()}const yn={HASH256:qc,HASH512:Wc,KDF:fo,XOF:ma,PRF:Ta},mn=pn({...yn,...dn[512]}),gn=pn({...yn,...dn[768]}),wn=pn({...yn,...dn[1024]});function bn(e){try{return gn.keygen(e)}catch(t){throw new Error("Failed to generate Kyber keys",{cause:t})}}function To(e){try{return gn.encapsulate(e)}catch(t){throw new Error("Failed to encapsulate",{cause:t})}}function Ao(e,t){try{return gn.decapsulate(e,t)}catch(r){throw new Error("Failed to decapsulate",{cause:r})}}function Aa(e){try{return mn.keygen(e)}catch(t){throw new Error("Failed to generate Kyber keys",{cause:t})}}function Ka(e){try{return mn.encapsulate(e)}catch(t){throw new Error("Failed to encapsulate",{cause:t})}}function _a(e,t){try{return mn.decapsulate(e,t)}catch(r){throw new Error("Failed to decapsulate",{cause:r})}}const Oa=Object.freeze(Object.defineProperty({__proto__:null,decapsulateKyber:_a,encapsulateKyber:Ka,generateKyberKeys:Aa},Symbol.toStringTag,{value:"Module"}));function Ra(e){try{return wn.keygen(e)}catch(t){throw new Error("Failed to generate Kyber keys",{cause:t})}}function Ca(e){try{return wn.encapsulate(e)}catch(t){throw new Error("Failed to encapsulate",{cause:t})}}function Pa(e,t){try{return wn.decapsulate(e,t)}catch(r){throw new Error("Failed to decapsulate",{cause:r})}}const Ia=Object.freeze(Object.defineProperty({__proto__:null,decapsulateKyber:Pa,encapsulateKyber:Ca,generateKyberKeys:Ra},Symbol.toStringTag,{value:"Module"})),ja=Object.freeze(Object.defineProperty({__proto__:null,decapsulateKyber:Ao,encapsulateKyber:To,generateKyberKeys:bn,kyber1024:Ia,kyber512:Oa},Symbol.toStringTag,{value:"Module"}));async function cr(e){try{return await crypto.subtle.importKey(Ye,e,Wt,!1,["wrapKey","unwrapKey"])}catch(t){throw new Error("Failed to import wrapping key",{cause:t})}}async function En(e,t){try{if(e.length!==t.length)throw new Error("secrets must have equal length");const r=await mo(e,t,Os);return await cr(r)}catch(r){throw new Error("Failed to derive wrapping key",{cause:r})}}async function xn(e,t){try{return await crypto.subtle.unwrapKey(Ye,e,t,Wt,ze,!1,["encrypt","decrypt"])}catch(r){throw new Error("Failed to unwrap key",{cause:r})}}async function kn(e,t){try{const r=await crypto.subtle.wrapKey(Ye,e,t,Wt);return new Uint8Array(r)}catch(r){throw new Error("Failed to wrap key",{cause:r})}}const Fa=Object.freeze(Object.defineProperty({__proto__:null,deriveWrappingKey:En,importWrappingKey:cr,unwrapKey:xn,wrapKey:kn},Symbol.toStringTag,{value:"Module"}));async function vn(e,t,r){try{const n=await ln();return{enc:await ar(e,n,t,r),encryptionKey:n}}catch(n){throw new Error("Failed to symmetrically encrypt email",{cause:n})}}async function Sn(e,t,r,n){try{const s=await ln(),o=await ar(e,s,r,n),i=tr(t),c=await ir(s,i,r);return{enc:o,encryptionKey:s,subjectEnc:c}}catch(s){throw new Error("Failed to symmetrically encrypt email and subject",{cause:s})}}async function Ko(e,t,r,n){try{const s=await ot(r,e,n),o=await ot(r,t,n);return{body:fn(s),subject:on(o)}}catch(s){throw new Error("Failed to symmetrically decrypt email and subject",{cause:s})}}async function ar(e,t,r,n){try{const s=bo(e);return await ir(t,s,r,n)}catch(s){throw new Error("Failed to symmetrically encrypt email with the given key",{cause:s})}}async function lr(e,t,r){try{const n=await ot(t,e,r);return fn(n)}catch(n){throw new Error("Failed to symmetrically decrypt email",{cause:n})}}async function ur(e,t,r){try{const n=await rn(t.eccPublicKey,r.eccPrivateKey),{cipherText:s,sharedSecret:o}=To(t.kyberPublicKey),i=await En(n,o);return{encryptedKey:await kn(e,i),kyberCiphertext:s}}catch(n){throw new Error("Failed to encrypt email key using hybrid encryption",{cause:n})}}async function _o(e,t,r){try{const n=await rn(t.eccPublicKey,r.eccPrivateKey),s=Ao(e.kyberCiphertext,r.kyberPrivateKey),o=await En(n,s);return await xn(e.encryptedKey,o)}catch(n){throw new Error("Failed to decrypt email key encrypted via hybrid encryption",{cause:n})}}async function Oo(e,t){try{const{key:r,salt:n}=await un(t),s=await cr(r);return{encryptedKey:await kn(e,s),salt:n}}catch(r){throw new Error("Failed to password-protect email key",{cause:r})}}async function Ro(e,t){try{const r=await hn(t,e.salt),n=await cr(r);return await xn(e.encryptedKey,n)}catch(r){throw new Error("Failed to remove password-protection from email key",{cause:r})}}function le(e){try{const{subject:t,replyToEmailID:r,sender:n,recipients:s}=e;return JSON.stringify({subject:t,replyToEmailID:r,sender:n,recipients:s})}catch(t){throw new Error("Failed to create aux",{cause:t})}}function Ge(e){try{const{replyToEmailID:t,sender:r,recipients:n}=e;return JSON.stringify({replyToEmailID:t,sender:r,recipients:n})}catch(t){throw new Error("Failed to create aux without subject",{cause:t})}}function Ba(){return Li.v4()}async function Na(e,t,r){try{const n=le(e.params),{enc:s,encryptionKey:o}=await vn(e.body,n,e.id),i=await ur(o,t.publicKeys,r);return{enc:s,encryptedKey:i,recipientEmail:t.email,params:e.params,id:e.id}}catch(n){throw new Error("Failed to encrypt email with hybrid encryption",{cause:n})}}async function La(e,t,r){try{const n=le(e.params),{enc:s,encryptionKey:o}=await vn(e.body,n,e.id),i=[];for(const c of t){const a=await ur(o,c.publicKeys,r);i.push({enc:s,encryptedKey:a,recipientEmail:c.email,params:e.params,id:e.id})}return i}catch(n){throw new Error("Failed to encrypt email to multiple recipients with hybrid encryption",{cause:n})}}async function Ma(e,t,r){try{const n=le(e.params),s=await _o(e.encryptedKey,t,r);return{body:await lr(e.enc,s,n),params:e.params,id:e.id}}catch(n){throw new Error("Failed to decrypt email with hybrid encryption",{cause:n})}}async function Ua(e,t,r){try{const n=Ge(e.params),{enc:s,encryptionKey:o,subjectEnc:i}=await Sn(e.body,e.params.subject,n,e.id),c=Ce(i),a=await ur(o,t.publicKeys,r),l={...e.params,subject:c};return{enc:s,encryptedKey:a,recipientEmail:t.email,params:l,id:e.id}}catch(n){throw new Error("Failed to encrypt the email and its subject with hybrid encryption",{cause:n})}}async function Da(e,t,r){try{const n=Ge(e.params),{enc:s,encryptionKey:o,subjectEnc:i}=await Sn(e.body,e.params.subject,n,e.id),c=Ce(i),a=[];for(const l of t){const u=await ur(o,l.publicKeys,r),h={...e.params,subject:c};a.push({enc:s,encryptedKey:u,recipientEmail:l.email,params:h,id:e.id})}return a}catch(n){throw new Error("Failed to encrypt the email and its subject to multiple recipients with hybrid encryption",{cause:n})}}async function Ha(e,t,r){try{const n=Ge(e.params),s=await _o(e.encryptedKey,t,r),o=rr(e.params.subject),{body:i,subject:c}=await Ko(e.enc,o,s,n),a={...e.params,subject:c};return{body:i,params:a,id:e.id}}catch(n){throw new Error("Failed to decrypt the email and its subject with hybrid encryption",{cause:n})}}async function $a(e,t){try{if(!e?.body||!e.params)throw new Error("Failed to password-protect email: Invalid email structure");const r=le(e.params),{enc:n,encryptionKey:s}=await vn(e.body,r,e.id),o=await Oo(s,t);return{enc:n,encryptedKey:o,params:e.params,id:e.id}}catch(r){throw new Error("Failed to password-protect email",{cause:r})}}async function za(e,t){try{const r=le(e.params),n=await Ro(e.encryptedKey,t);return{body:await lr(e.enc,n,r),params:e.params,id:e.id}}catch(r){throw new Error("Failed to decrypt password-protect email",{cause:r})}}async function Ya(e,t){try{if(!e?.body||!e.params)throw new Error("Failed to password-protect email and subject: Invalid email structure");const r=Ge(e.params),{enc:n,encryptionKey:s,subjectEnc:o}=await Sn(e.body,e.params.subject,r,e.id),i=await Oo(s,t),c=Ce(o),a={...e.params,subject:c};return{enc:n,encryptedKey:i,params:a,id:e.id}}catch(r){throw new Error("Failed to password-protect email and subject",{cause:r})}}async function Va(e,t){try{const r=Ge(e.params),n=await Ro(e.encryptedKey,t),s=rr(e.params.subject),{body:o,subject:i}=await Ko(e.enc,s,n,r),c={...e.params,subject:i};return{body:o,params:c,id:e.id}}catch(r){throw new Error("Failed to decrypt password-protect email",{cause:r})}}async function Ja(){try{const e=bn(),t=await Zt(),r={eccPrivateKey:t.privateKey,kyberPrivateKey:e.secretKey};return{publicKeys:{eccPublicKey:t.publicKey,kyberPublicKey:e.publicKey},privateKeys:r}}catch(e){throw new Error("Failed to generate keys for email service",{cause:e})}}const Ga=Object.freeze(Object.defineProperty({__proto__:null,base64ToEncHybridKey:la,base64ToParams:fa,base64ToPwdProtectedKey:ua,base64ToUser:Rt,binaryToEmailBody:fn,createPwdProtectedEmail:$a,createPwdProtectedEmailAndSubject:Ya,decryptEmailAndSubjectHybrid:Ha,decryptEmailHybrid:Ma,decryptPwdProtectedEmail:za,decryptPwdProtectedEmailAndSubject:Va,emailBodyToBinary:bo,emailToBinary:So,encHybridKeyToBase64:Eo,encryptEmailAndSubjectHybrid:Ua,encryptEmailAndSubjectHybridForMultipleRecipients:Da,encryptEmailHybrid:Na,encryptEmailHybridForMultipleRecipients:La,generateEmailID:Ba,generateEmailKeys:Ja,getAux:le,getAuxWithoutSubject:Ge,hybridEncyptedEmailToBase64:ko,paramsToBase64:ha,pwdProtectedEmailToBase64:vo,pwdProtectedKeyToBase64:xo,userToBase64:Ot},Symbol.toStringTag,{value:"Module"})),Nr=(e,t)=>t.some(r=>e instanceof r);let Gn,Xn;function Xa(){return Gn||(Gn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function qa(){return Xn||(Xn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Lr=new WeakMap,Tr=new WeakMap,hr=new WeakMap;function Wa(e){const t=new Promise((r,n)=>{const s=()=>{e.removeEventListener("success",o),e.removeEventListener("error",i)},o=()=>{r(we(e.result)),s()},i=()=>{n(e.error),s()};e.addEventListener("success",o),e.addEventListener("error",i)});return hr.set(t,e),t}function Za(e){if(Lr.has(e))return;const t=new Promise((r,n)=>{const s=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=()=>{r(),s()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)});Lr.set(e,t)}let Mr={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Lr.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return we(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Co(e){Mr=e(Mr)}function Qa(e){return qa().includes(e)?function(...t){return e.apply(Ur(this),t),we(this.request)}:function(...t){return we(e.apply(Ur(this),t))}}function el(e){return typeof e=="function"?Qa(e):(e instanceof IDBTransaction&&Za(e),Nr(e,Xa())?new Proxy(e,Mr):e)}function we(e){if(e instanceof IDBRequest)return Wa(e);if(Tr.has(e))return Tr.get(e);const t=el(e);return t!==e&&(Tr.set(e,t),hr.set(t,e)),t}const Ur=e=>hr.get(e);function tl(e,t,{blocked:r,upgrade:n,blocking:s,terminated:o}={}){const i=indexedDB.open(e,t),c=we(i);return n&&i.addEventListener("upgradeneeded",a=>{n(we(i.result),a.oldVersion,a.newVersion,we(i.transaction),a)}),r&&i.addEventListener("blocked",a=>r(a.oldVersion,a.newVersion,a)),c.then(a=>{o&&a.addEventListener("close",()=>o()),s&&a.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function rl(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&r.addEventListener("blocked",n=>t(n.oldVersion,n)),we(r).then(()=>{})}const nl=["get","getKey","getAll","getAllKeys","count"],sl=["put","add","delete","clear"],Ar=new Map;function qn(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ar.get(t))return Ar.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=sl.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||nl.includes(r)))return;const o=async function(i,...c){const a=this.transaction(i,s?"readwrite":"readonly");let l=a.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[r](...c),s&&a.done]))[0]};return Ar.set(t,o),o}Co(e=>({...e,get:(t,r,n)=>qn(t,r)||e.get(t,r,n),has:(t,r)=>!!qn(t,r)||e.has(t,r)}));const ol=["continue","continuePrimaryKey","advance"],Wn={},Dr=new WeakMap,Po=new WeakMap,il={get(e,t){if(!ol.includes(t))return e[t];let r=Wn[t];return r||(r=Wn[t]=function(...n){Dr.set(this,Po.get(this)[t](...n))}),r}};async function*cl(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,il);for(Po.set(r,t),hr.set(r,Ur(t));t;)yield r,t=await(Dr.get(r)||t.continue()),Dr.delete(r)}function Zn(e,t){return t===Symbol.asyncIterator&&Nr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Nr(e,[IDBIndex,IDBObjectStore])}Co(e=>({...e,get(t,r,n){return Zn(t,r)?cl:e.get(t,r,n)},has(t,r){return Zn(t,r)||e.has(t,r)}}));const Io=e=>`ES:${e}:DB`,al=async e=>{try{const t=Io(e);return tl(t,Hs,{upgrade(r){r.objectStoreNames.contains(ee)||r.createObjectStore(ee,{keyPath:"id"}).createIndex("byTime","params.createdAt")}})}catch(t){throw new Error(`Cannot open a database for the user ${e}`,{cause:t})}},ll=e=>e.close(),ul=async e=>{const t=Io(e);return rl(t)},hl=async e=>pt(Is,e),fl=async(e,t,r)=>{try{const n=le(e.params),o={content:await ar(e.body,t,n,e.id),params:e.params,id:e.id};await r.put(ee,o)}catch(n){throw new Error("Cannot encrypt and add the given email to the database",{cause:n})}},dl=async(e,t,r)=>{try{const n=await Promise.all(e.map(async o=>{const i=le(o.params);return{content:await ar(o.body,t,i,o.id),params:o.params,id:o.id}})),s=r.transaction(ee,"readwrite");await Promise.all([...n.map(o=>s.store.put(o)),s.done])}catch(n){throw new Error("Cannot encrypt and add emails to the database",{cause:n})}},Tn=async(e,t)=>{try{const r=le(t.params);return{body:await lr(t.content,e,r),params:t.params,id:t.id}}catch(r){throw new Error("Cannot decrypt the given email",{cause:r})}},pl=async(e,t,r)=>{try{const n=await r.get(ee,e);if(!n)throw new Error(`DB cannot find email with id ${e}`);return Tn(t,n)}catch(n){throw new Error(`Cannot fetch the email ${e} from the database`,{cause:n})}},yl=async(e,t)=>{try{const r=await t.getAll(ee);return(await Promise.all(r.map(async s=>{const o=le(s.params);return{body:await lr(s.content,e,o),params:s.params,id:s.id}}))).filter(s=>s!==null)}catch(r){throw new Error("Cannot fetch and decrypt all emails from the database",{cause:r})}},ml=async(e,t)=>{await t.delete(ee,e)},An=async e=>await e.count(ee),jo=async(e,t)=>{try{const r=t.transaction(ee,"readwrite");let s=await r.store.index("byTime").openCursor(),o=0;for(;s&&o<e;)await s.delete(),o++,s=await s.continue();await r.done}catch(r){throw new Error(`Cannot delete ${e} oldests emails from the database`,{cause:r})}},gl=async(e,t)=>{try{const r=await An(e);if(r<=t)return;await jo(r-t,e)}catch(r){throw new Error(`Cannot enforce the maximum of ${t} emails on the database`,{cause:r})}},Fo=async(e,t,r)=>{try{const s=e.transaction(ee,"readonly").store.index("byTime"),o=[];let i=await s.openCursor(null,r);for(;i;)o.push(i.value),i=await i.continue();return await Promise.all(o.map(a=>Tn(t,a)))}catch(n){throw new Error("Cannot fetch emails from database",{cause:n})}},Bo=async(e,t)=>Fo(e,t,"prev"),wl=async(e,t)=>Fo(e,t,"next"),No=async(e,t,r,n)=>{try{const o=e.transaction(ee,"readonly").store.index("byTime"),i=[];let c;if(n){const h=IDBKeyRange.upperBound(n,!0);c=await o.openCursor(h,"prev")}else c=await o.openCursor(null,"prev");let a=0,l;for(;c&&a<r;)i.push(c.value),l=c.key,a++,c=await c.continue();return{emails:await Promise.all(i.map(h=>Tn(t,h))),nextCursor:a===r?l:void 0}}catch(s){throw new Error(`Cannot fetch email batch of ${r} from the database`,{cause:s})}};function Lo(e){return So(e).byteLength}function bl(){return{esCache:new Map,cacheSize:0,isCacheLimited:!1,isCacheReady:!0}}const El=async(e,t)=>{const r=bl();r.isCacheReady=!1;try{const n=await An(t);if(!n)return r.isCacheReady=!0,r;if(n<=Ir){const s=await Bo(t,e);Hr(s,r)}else{let s,o=!1;for(;!o;){const{emails:i,nextCursor:c}=await No(t,e,Ir,s);if(!c||!i.length)break;s=c,Hr(i,r)||(o=!0)}}return r}catch(n){throw new Error(`Email caching failed: ${n}`)}},Mo=async(e,t)=>{const r=t.esCache.get(e);if(!r)throw new Error(`Email not found in cache for ID: ${e}`);return r},xl=async(e,t)=>{try{const r=await Mo(e,t),n=Lo(r);t.esCache.delete(e)&&(t.cacheSize-=n)}catch(r){throw new Error(`Failed to delete email with ID ${e}`,{cause:r})}};function Hr(e,t){try{for(const r of e){const n=Uo(r,t);if(!n.success)return n}return{success:!0}}catch(r){throw new Error("Failed to add emails to the cache",{cause:r})}}const Uo=(e,t)=>{try{if(t.esCache.has(e.id))return{success:!1,reason:"email already exists in cache"};const r=Lo(e);return t.cacheSize+r>Ds?(t.isCacheLimited=!0,{success:!1,reason:"hit cache limit"}):(t.esCache.set(e.id,e),t.cacheSize+=r,{success:!0})}catch(r){throw new Error("Failed to add email to the cache",{cause:r})}};var A;function $(e,t,r){const n=typeof r,s=typeof e;if(n!=="undefined"){if(s!=="undefined"){if(r){if(s==="function"&&n===s)return function(c){return e(r(c))};if(t=e.constructor,t===r.constructor){if(t===Array)return r.concat(e);if(t===Map){var o=new Map(r);for(var i of e)o.set(i[0],i[1]);return o}if(t===Set){i=new Set(r);for(o of e.values())i.add(o);return i}}}return e}return r}return s==="undefined"?t:e}function Fe(e,t){return typeof e>"u"?t:e}function U(){return Object.create(null)}function re(e){return typeof e=="string"}function at(e){return typeof e=="object"}function lt(e,t){if(re(t))e=e[t];else for(let r=0;e&&r<t.length;r++)e=e[t[r]];return e}const kl=/[^\p{L}\p{N}]+/u,vl=/(\d{3})/g,Sl=/(\D)(\d{3})/g,Tl=/(\d{3})(\D)/g,Qn=/[\u0300-\u036f]/g;function ut(e={}){if(!this||this.constructor!==ut)return new ut(...arguments);if(arguments.length)for(e=0;e<arguments.length;e++)this.assign(arguments[e]);else this.assign(e)}A=ut.prototype;A.assign=function(e){this.normalize=$(e.normalize,!0,this.normalize);let t=e.include,r=t||e.exclude||e.split,n;if(r||r===""){if(typeof r=="object"&&r.constructor!==RegExp){let s="";n=!t,t||(s+="\\p{Z}"),r.letter&&(s+="\\p{L}"),r.number&&(s+="\\p{N}",n=!!t),r.symbol&&(s+="\\p{S}"),r.punctuation&&(s+="\\p{P}"),r.control&&(s+="\\p{C}"),(r=r.char)&&(s+=typeof r=="object"?r.join(""):r);try{this.split=new RegExp("["+(t?"^":"")+s+"]+","u")}catch{this.split=/\s+/}}else this.split=r,n=r===!1||"a1a".split(r).length<2;this.numeric=$(e.numeric,n)}else{try{this.split=$(this.split,kl)}catch{this.split=/\s+/}this.numeric=$(e.numeric,$(this.numeric,!0))}if(this.prepare=$(e.prepare,null,this.prepare),this.finalize=$(e.finalize,null,this.finalize),r=e.filter,this.filter=typeof r=="function"?r:$(r&&new Set(r),null,this.filter),this.dedupe=$(e.dedupe,!0,this.dedupe),this.matcher=$((r=e.matcher)&&new Map(r),null,this.matcher),this.mapper=$((r=e.mapper)&&new Map(r),null,this.mapper),this.stemmer=$((r=e.stemmer)&&new Map(r),null,this.stemmer),this.replacer=$(e.replacer,null,this.replacer),this.minlength=$(e.minlength,1,this.minlength),this.maxlength=$(e.maxlength,1024,this.maxlength),this.rtl=$(e.rtl,!1,this.rtl),(this.cache=r=$(e.cache,!0,this.cache))&&(this.F=null,this.L=typeof r=="number"?r:2e5,this.B=new Map,this.D=new Map,this.I=this.H=128),this.h="",this.J=null,this.A="",this.K=null,this.matcher)for(const s of this.matcher.keys())this.h+=(this.h?"|":"")+s;if(this.stemmer)for(const s of this.stemmer.keys())this.A+=(this.A?"|":"")+s;return this};A.addStemmer=function(e,t){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(e,t),this.A+=(this.A?"|":"")+e,this.K=null,this.cache&&Oe(this),this};A.addFilter=function(e){return typeof e=="function"?this.filter=e:(this.filter||(this.filter=new Set),this.filter.add(e)),this.cache&&Oe(this),this};A.addMapper=function(e,t){return typeof e=="object"?this.addReplacer(e,t):e.length>1?this.addMatcher(e,t):(this.mapper||(this.mapper=new Map),this.mapper.set(e,t),this.cache&&Oe(this),this)};A.addMatcher=function(e,t){return typeof e=="object"?this.addReplacer(e,t):e.length<2&&(this.dedupe||this.mapper)?this.addMapper(e,t):(this.matcher||(this.matcher=new Map),this.matcher.set(e,t),this.h+=(this.h?"|":"")+e,this.J=null,this.cache&&Oe(this),this)};A.addReplacer=function(e,t){return typeof e=="string"?this.addMatcher(e,t):(this.replacer||(this.replacer=[]),this.replacer.push(e,t),this.cache&&Oe(this),this)};A.encode=function(e,t){if(this.cache&&e.length<=this.H)if(this.F){if(this.B.has(e))return this.B.get(e)}else this.F=setTimeout(Oe,50,this);this.normalize&&(typeof this.normalize=="function"?e=this.normalize(e):e=Qn?e.normalize("NFKD").replace(Qn,"").toLowerCase():e.toLowerCase()),this.prepare&&(e=this.prepare(e)),this.numeric&&e.length>3&&(e=e.replace(Sl,"$1 $2").replace(Tl,"$1 $2").replace(vl,"$1 "));const r=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n=[],s=U(),o,i,c=this.split||this.split===""?e.split(this.split):[e];for(let l=0,u,h;l<c.length;l++)if((u=h=c[l])&&!(u.length<this.minlength||u.length>this.maxlength)){if(t){if(s[u])continue;s[u]=1}else{if(o===u)continue;o=u}if(r)n.push(u);else if(!this.filter||(typeof this.filter=="function"?this.filter(u):!this.filter.has(u))){if(this.cache&&u.length<=this.I)if(this.F){var a=this.D.get(u);if(a||a===""){a&&n.push(a);continue}}else this.F=setTimeout(Oe,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let m;for(;m!==u&&u.length>2;)m=u,u=u.replace(this.K,y=>this.stemmer.get(y))}if(u&&(this.mapper||this.dedupe&&u.length>1)){a="";for(let m=0,y="",p,f;m<u.length;m++)p=u.charAt(m),p===y&&this.dedupe||((f=this.mapper&&this.mapper.get(p))||f===""?f===y&&this.dedupe||!(y=f)||(a+=f):a+=y=p);u=a}if(this.matcher&&u.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),u=u.replace(this.J,m=>this.matcher.get(m))),u&&this.replacer)for(a=0;u&&a<this.replacer.length;a+=2)u=u.replace(this.replacer[a],this.replacer[a+1]);if(this.cache&&h.length<=this.I&&(this.D.set(h,u),this.D.size>this.L&&(this.D.clear(),this.I=this.I/1.1|0)),u){if(u!==h)if(t){if(s[u])continue;s[u]=1}else{if(i===u)continue;i=u}n.push(u)}}}return this.finalize&&(n=this.finalize(n)||n),this.cache&&e.length<=this.H&&(this.B.set(e,n),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),n};function Oe(e){e.F=null,e.B.clear(),e.D.clear()}function Kn(e,t,r){r||(t||typeof e!="object"?typeof t=="object"&&(r=t,t=0):r=e),r&&(e=r.query||e,t=r.limit||t);let n=""+(t||0);r&&(n+=(r.offset||0)+!!r.context+!!r.suggest+(r.resolve!==!1)+(r.resolution||this.resolution)+(r.boost||0)),e=(""+e).toLowerCase(),this.cache||(this.cache=new Pe);let s=this.cache.get(e+n);if(!s){const o=r&&r.cache;o&&(r.cache=!1),s=this.search(e,t,r),o&&(r.cache=o),this.cache.set(e+n,s)}return s}function Pe(e){this.limit=e&&e!==!0?e:1e3,this.cache=new Map,this.h=""}Pe.prototype.set=function(e,t){this.cache.set(this.h=e,t),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};Pe.prototype.get=function(e){const t=this.cache.get(e);return t&&this.h!==e&&(this.cache.delete(e),this.cache.set(this.h=e,t)),t};Pe.prototype.remove=function(e){for(const t of this.cache){const r=t[0];t[1].includes(e)&&this.cache.delete(r)}};Pe.prototype.clear=function(){this.cache.clear(),this.h=""};const es={normalize:!1,numeric:!1,dedupe:!1},vt={},Kr=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),ts=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),rs=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ns={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,ß:2,d:3,t:3,l:4,m:5,n:5,r:6};var Do={Exact:es,Default:vt,Normalize:vt,LatinBalance:{mapper:Kr},LatinAdvanced:{mapper:Kr,matcher:ts,replacer:rs},LatinExtra:{mapper:Kr,replacer:rs.concat([/(?!^)[aeo]/g,""]),matcher:ts},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(e){for(let r=0;r<e.length;r++){var t=e[r];let n=t.charAt(0),s=ns[n];for(let o=1,i;o<t.length&&(i=t.charAt(o),i==="h"||i==="w"||!(i=ns[i])||i===s||(n+=i,s=i,n.length!==4));o++);e[r]=n}}},CJK:{split:""},LatinExact:es,LatinDefault:vt,LatinSimple:vt};function ss(e,t,r,n){let s=[];for(let o=0,i;o<e.index.length;o++)if(i=e.index[o],t>=i.length)t-=i.length;else{t=i[n?"splice":"slice"](t,r);const c=t.length;if(c&&(s=s.length?s.concat(t):t,r-=c,n&&(e.length-=c),!r))break;t=0}return s}function Ue(e){if(!this||this.constructor!==Ue)return new Ue(e);this.index=e?[e]:[],this.length=e?e.length:0;const t=this;return new Proxy([],{get(r,n){if(n==="length")return t.length;if(n==="push")return function(s){t.index[t.index.length-1].push(s),t.length++};if(n==="pop")return function(){if(t.length)return t.length--,t.index[t.index.length-1].pop()};if(n==="indexOf")return function(s){let o=0;for(let i=0,c,a;i<t.index.length;i++){if(c=t.index[i],a=c.indexOf(s),a>=0)return o+a;o+=c.length}return-1};if(n==="includes")return function(s){for(let o=0;o<t.index.length;o++)if(t.index[o].includes(s))return!0;return!1};if(n==="slice")return function(s,o){return ss(t,s||0,o||t.length,!1)};if(n==="splice")return function(s,o){return ss(t,s||0,o||t.length,!0)};if(n==="constructor")return Array;if(typeof n!="symbol")return(r=t.index[n/2**31|0])&&r[n]},set(r,n,s){return r=n/2**31|0,(t.index[r]||(t.index[r]=[]))[n]=s,t.length++,!0}})}Ue.prototype.clear=function(){this.index.length=0};Ue.prototype.push=function(){};function ne(e=8){if(!this||this.constructor!==ne)return new ne(e);this.index=U(),this.h=[],this.size=0,e>32?(this.B=$o,this.A=BigInt(e)):(this.B=Ho,this.A=e)}ne.prototype.get=function(e){const t=this.index[this.B(e)];return t&&t.get(e)};ne.prototype.set=function(e,t){var r=this.B(e);let n=this.index[r];n?(r=n.size,n.set(e,t),(r-=n.size)&&this.size++):(this.index[r]=n=new Map([[e,t]]),this.h.push(n),this.size++)};function se(e=8){if(!this||this.constructor!==se)return new se(e);this.index=U(),this.h=[],this.size=0,e>32?(this.B=$o,this.A=BigInt(e)):(this.B=Ho,this.A=e)}se.prototype.add=function(e){var t=this.B(e);let r=this.index[t];r?(t=r.size,r.add(e),(t-=r.size)&&this.size++):(this.index[t]=r=new Set([e]),this.h.push(r),this.size++)};A=ne.prototype;A.has=se.prototype.has=function(e){const t=this.index[this.B(e)];return t&&t.has(e)};A.delete=se.prototype.delete=function(e){const t=this.index[this.B(e)];t&&t.delete(e)&&this.size--};A.clear=se.prototype.clear=function(){this.index=U(),this.h=[],this.size=0};A.values=se.prototype.values=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].values())yield t};A.keys=se.prototype.keys=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].keys())yield t};A.entries=se.prototype.entries=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].entries())yield t};function Ho(e){let t=2**this.A-1;if(typeof e=="number")return e&t;let r=0,n=this.A+1;for(let s=0;s<e.length;s++)r=(r*n^e.charCodeAt(s))&t;return this.A===32?r+2**31:r}function $o(e){let t=BigInt(2)**this.A-BigInt(1);var r=typeof e;if(r==="bigint")return e&t;if(r==="number")return BigInt(e)&t;r=BigInt(0);let n=this.A+BigInt(1);for(let s=0;s<e.length;s++)r=(r*n^BigInt(e.charCodeAt(s)))&t;return r}let Be,tt;async function Al(e){e=e.data;var t=e.task;const r=e.id;let n=e.args;switch(t){case"init":tt=e.options||{},(t=e.factory)?(Function("return "+t)()(self),Be=new self.FlexSearch.Index(tt),delete self.FlexSearch):Be=new oe(tt),postMessage({id:r});break;default:let s;t==="export"&&(n[1]?(n[0]=tt.export,n[2]=0,n[3]=1):n=null),t==="import"?n[0]&&(e=await tt.import.call(Be,n[0]),Be.import(n[0],e)):((s=n&&Be[t].apply(Be,n))&&s.then&&(s=await s),s&&s.await&&(s=await s.await),t==="search"&&s.result&&(s=s.result)),postMessage(t==="search"?{id:r,msg:s}:{id:r})}}function _n(e){Ne.call(e,"add"),Ne.call(e,"append"),Ne.call(e,"search"),Ne.call(e,"update"),Ne.call(e,"remove"),Ne.call(e,"searchCache")}let $r,os,Ct;function Kl(){$r=Ct=0}function Ne(e){this[e+"Async"]=function(){const t=arguments;var r=t[t.length-1];let n;if(typeof r=="function"&&(n=r,delete t[t.length-1]),$r?Ct||(Ct=Date.now()-os>=this.priority*this.priority*3):($r=setTimeout(Kl,0),os=Date.now()),Ct){const o=this;return new Promise(i=>{setTimeout(function(){i(o[e+"Async"].apply(o,t))},0)})}const s=this[e].apply(this,t);return r=s.then?s:new Promise(o=>o(s)),n&&r.then(n),r}}let ge=0;function De(e={},t){function r(c){function a(l){l=l.data||l;const u=l.id,h=u&&o.h[u];h&&(h(l.msg),delete o.h[u])}if(this.worker=c,this.h=U(),this.worker)return s?this.worker.on("message",a):this.worker.onmessage=a,e.config?new Promise(function(l){ge>1e9&&(ge=0),o.h[++ge]=function(){l(o)},o.worker.postMessage({id:ge,task:"init",factory:n,options:e})}):(this.priority=e.priority||4,this.encoder=t||null,this.worker.postMessage({task:"init",factory:n,options:e}),this)}if(!this||this.constructor!==De)return new De(e);let n=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;n&&(n=n.toString());const s=typeof window>"u",o=this,i=_l(n,s,e.worker);return i.then?i.then(function(c){return r.call(o,c)}):r.call(this,i)}be("add");be("append");be("search");be("update");be("remove");be("clear");be("export");be("import");De.prototype.searchCache=Kn;_n(De.prototype);function be(e){De.prototype[e]=function(){const t=this,r=[].slice.call(arguments);var n=r[r.length-1];let s;return typeof n=="function"&&(s=n,r.pop()),n=new Promise(function(o){e==="export"&&typeof r[0]=="function"&&(r[0]=null),ge>1e9&&(ge=0),t.h[++ge]=o,t.worker.postMessage({task:e,id:ge,args:r})}),s?(n.then(s),this):n}}function _l(e,t,r){return t?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>require("./__vite-browser-external-Dyvby5gX.js")).then(function(n){return new n.Worker("undefined/node/node.mjs")}):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Al.toString()],{type:"text/javascript"}))):new window.Worker(typeof r=="string"?r:(typeof document>"u"?require("url").pathToFileURL(__filename).href:xr&&xr.tagName.toUpperCase()==="SCRIPT"&&xr.src||new URL("index.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}He.prototype.add=function(e,t,r){if(at(e)&&(t=e,e=lt(t,this.key)),t&&(e||e===0)){if(!r&&this.reg.has(e))return this.update(e,t);for(let c=0,a;c<this.field.length;c++){a=this.B[c];var n=this.index.get(this.field[c]);if(typeof a=="function"){var s=a(t);s&&n.add(e,s,r,!0)}else s=a.G,(!s||s(t))&&(a.constructor===String?a=[""+a]:re(a)&&(a=[a]),Yr(t,a,this.D,0,n,e,a[0],r))}if(this.tag)for(n=0;n<this.A.length;n++){var o=this.A[n];s=this.tag.get(this.F[n]);let c=U();if(typeof o=="function"){if(o=o(t),!o)continue}else{var i=o.G;if(i&&!i(t))continue;o.constructor===String&&(o=""+o),o=lt(t,o)}if(s&&o){re(o)&&(o=[o]);for(let a=0,l,u;a<o.length;a++)if(l=o[a],!c[l]&&(c[l]=1,(i=s.get(l))?u=i:s.set(l,u=[]),!r||!u.includes(e))){if(u.length===2**31-1){if(i=new Ue(u),this.fastupdate)for(let h of this.reg.values())h.includes(u)&&(h[h.indexOf(u)]=i);s.set(l,u=i)}u.push(e),this.fastupdate&&((i=this.reg.get(e))?i.push(u):this.reg.set(e,[u]))}}}if(this.store&&(!r||!this.store.has(e))){let c;if(this.h){c=U();for(let a=0,l;a<this.h.length;a++){if(l=this.h[a],(r=l.G)&&!r(t))continue;let u;if(typeof l=="function"){if(u=l(t),!u)continue;l=[l.O]}else if(re(l)||l.constructor===String){c[l]=t[l];continue}zr(t,c,l,0,l[0],u)}}this.store.set(e,c||t)}this.worker&&(this.fastupdate||this.reg.add(e))}return this};function zr(e,t,r,n,s,o){if(e=e[s],n===r.length-1)t[s]=o||e;else if(e)if(e.constructor===Array)for(t=t[s]=Array(e.length),s=0;s<e.length;s++)zr(e,t,r,n,s);else t=t[s]||(t[s]=U()),s=r[++n],zr(e,t,r,n,s)}function Yr(e,t,r,n,s,o,i,c){if(e=e[i])if(n===t.length-1){if(e.constructor===Array){if(r[n]){for(t=0;t<e.length;t++)s.add(o,e[t],!0,!0);return}e=e.join(" ")}s.add(o,e,c,!0)}else if(e.constructor===Array)for(i=0;i<e.length;i++)Yr(e,t,r,n,s,o,i,c);else i=t[++n],Yr(e,t,r,n,s,o,i,c)}function On(e,t,r,n){if(!e.length)return e;if(e.length===1)return e=e[0],e=r||e.length>t?e.slice(r,r+t):e,n?Le.call(this,e):e;let s=[];for(let o=0,i,c;o<e.length;o++)if((i=e[o])&&(c=i.length)){if(r){if(r>=c){r-=c;continue}i=i.slice(r,r+t),c=i.length,r=0}if(c>t&&(i=i.slice(0,t),c=t),!s.length&&c>=t)return n?Le.call(this,i):i;if(s.push(i),t-=c,!t)break}return s=s.length>1?[].concat.apply([],s):s[0],n?Le.call(this,s):s}function fr(e,t,r,n){var s=n[0];if(s[0]&&s[0].query)return e[t].apply(e,s);if(!(t!=="and"&&t!=="not"||e.result.length||e.await||s.suggest))return n.length>1&&(s=n[n.length-1]),(n=s.resolve)?e.await||e.result:e;let o=[],i=0,c=0,a,l,u,h,m;for(t=0;t<n.length;t++)if(s=n[t]){var y=void 0;if(s.constructor===N)y=s.await||s.result;else if(s.then||s.constructor===Array)y=s;else{i=s.limit||0,c=s.offset||0,u=s.suggest,l=s.resolve,a=((h=s.highlight||e.highlight)||s.enrich)&&l,y=s.queue;let p=s.async||y,f=s.index,d=s.query;if(f?e.index||(e.index=f):f=e.index,d||s.tag){const w=s.field||s.pluck;if(w&&(!d||e.query&&!h||(e.query=d,e.field=w,e.highlight=h),f=f.index.get(w)),y&&(m||e.await)){m=1;let b;const E=e.C.length,x=new Promise(function(k){b=k});(function(k,S){x.h=function(){S.index=null,S.resolve=!1;let v=p?k.searchAsync(S):k.search(S);return v.then?v.then(function(T){return e.C[E]=T=T.result||T,b(T),T}):(v=v.result||v,b(v),v)}})(f,Object.assign({},s)),e.C.push(x),o[t]=x;continue}else s.resolve=!1,s.index=null,y=p?f.searchAsync(s):f.search(s),s.resolve=l,s.index=f}else if(s.and)y=St(s,"and",f);else if(s.or)y=St(s,"or",f);else if(s.not)y=St(s,"not",f);else if(s.xor)y=St(s,"xor",f);else continue}y.await?(m=1,y=y.await):y.then?(m=1,y=y.then(function(p){return p.result||p})):y=y.result||y,o[t]=y}if(m&&!e.await&&(e.await=new Promise(function(p){e.return=p})),m){const p=Promise.all(o).then(function(f){for(let d=0;d<e.C.length;d++)if(e.C[d]===p){e.C[d]=function(){return r.call(e,f,i,c,a,l,u,h)};break}Rn(e)});e.C.push(p)}else if(e.await)e.C.push(function(){return r.call(e,o,i,c,a,l,u,h)});else return r.call(e,o,i,c,a,l,u,h);return l?e.await||e.result:e}function St(e,t,r){e=e[t];const n=e[0]||e;return n.index||(n.index=r),r=new N(n),e.length>1&&(r=r[t].apply(r,e.slice(1))),r}N.prototype.or=function(){return fr(this,"or",Ol,arguments)};function Ol(e,t,r,n,s,o,i){return e.length&&(this.result.length&&e.push(this.result),e.length<2?this.result=e[0]:(this.result=zo(e,t,r,!1,this.h),r=0)),s&&(this.await=null),s?this.resolve(t,r,n,i):this}N.prototype.and=function(){return fr(this,"and",Rl,arguments)};function Rl(e,t,r,n,s,o,i){if(!o&&!this.result.length)return s?this.result:this;let c;if(e.length)if(this.result.length&&e.unshift(this.result),e.length<2)this.result=e[0];else{let a=0;for(let l=0,u,h;l<e.length;l++)if((u=e[l])&&(h=u.length))a<h&&(a=h);else if(!o){a=0;break}a?(this.result=zt(e,a,t,r,o,this.h,s),c=!0):this.result=[]}else o||(this.result=e);return s&&(this.await=null),s?this.resolve(t,r,n,i,c):this}N.prototype.xor=function(){return fr(this,"xor",Cl,arguments)};function Cl(e,t,r,n,s,o,i){if(e.length)if(this.result.length&&e.unshift(this.result),e.length<2)this.result=e[0];else{e:{o=r;var c=this.h;const a=[],l=U();let u=0;for(let h=0,m;h<e.length;h++)if(m=e[h]){u<m.length&&(u=m.length);for(let y=0,p;y<m.length;y++)if(p=m[y])for(let f=0,d;f<p.length;f++)d=p[f],l[d]=l[d]?2:1}for(let h=0,m,y=0;h<u;h++)for(let p=0,f;p<e.length;p++)if((f=e[p])&&(m=f[h])){for(let d=0,w;d<m.length;d++)if(w=m[d],l[w]===1)if(o)o--;else if(s){if(a.push(w),a.length===t){e=a;break e}}else{const b=h+(p?c:0);if(a[b]||(a[b]=[]),a[b].push(w),++y===t){e=a;break e}}}e=a}this.result=e,c=!0}else o||(this.result=e);return s&&(this.await=null),s?this.resolve(t,r,n,i,c):this}N.prototype.not=function(){return fr(this,"not",Pl,arguments)};function Pl(e,t,r,n,s,o,i){if(!o&&!this.result.length)return s?this.result:this;if(e.length&&this.result.length){e:{o=r;var c=[];e=new Set(e.flat().flat());for(let a=0,l,u=0;a<this.result.length;a++)if(l=this.result[a]){for(let h=0,m;h<l.length;h++)if(m=l[h],!e.has(m)){if(o)o--;else if(s){if(c.push(m),c.length===t){e=c;break e}}else if(c[a]||(c[a]=[]),c[a].push(m),++u===t){e=c;break e}}}e=c}this.result=e,c=!0}return s&&(this.await=null),s?this.resolve(t,r,n,i,c):this}function Pt(e,t,r,n,s){let o,i,c;typeof s=="string"?(o=s,s=""):o=s.template,i=o.indexOf("$1"),c=o.substring(i+2),i=o.substring(0,i);let a=s&&s.boundary,l=!s||s.clip!==!1,u=s&&s.merge&&c&&i&&new RegExp(c+" "+i,"g");s=s&&s.ellipsis;var h=0;if(typeof s=="object"){var m=s.template;h=m.length-2,s=s.pattern}typeof s!="string"&&(s=s===!1?"":"..."),h&&(s=m.replace("$1",s)),m=s.length-h;let y,p;typeof a=="object"&&(y=a.before,y===0&&(y=-1),p=a.after,p===0&&(p=-1),a=a.total||9e5),h=new Map;for(let Ie=0,Y,We,xe;Ie<t.length;Ie++){let X;if(n)X=t,xe=n;else{var f=t[Ie];if(xe=f.field,!xe)continue;X=f.result}We=r.get(xe),Y=We.encoder,f=h.get(Y),typeof f!="string"&&(f=Y.encode(e),h.set(Y,f));for(let te=0;te<X.length;te++){var d=X[te].doc;if(!d||(d=lt(d,xe),!d))continue;var w=d.trim().split(/\s+/);if(!w.length)continue;d="";var b=[];let pe=[];for(var E=-1,x=-1,k=0,S=0;S<w.length;S++){var v=w[S],T=Y.encode(v);T=T.length>1?T.join(" "):T[0];let _;if(T&&v){for(var K=v.length,C=(Y.split?v.replace(Y.split,""):v).length-T.length,O="",P=0,F=0;F<f.length;F++){var I=f[F];if(I){var B=I.length;B+=C<0?0:C,P&&B<=P||(I=T.indexOf(I),I>-1&&(O=(I?v.substring(0,I):"")+i+v.substring(I,I+B)+c+(I+B<K?v.substring(I+B):""),P=B,_=!0))}}O&&(a&&(E<0&&(E=d.length+(d?1:0)),x=d.length+(d?1:0)+O.length,k+=K,pe.push(b.length),b.push({match:O})),d+=(d?" ":"")+O)}if(!_)v=w[S],d+=(d?" ":"")+v,a&&b.push({text:v});else if(a&&k>=a)break}if(k=pe.length*(o.length-2),y||p||a&&d.length-k>a)if(k=a+k-m*2,S=x-E,y>0&&(S+=y),p>0&&(S+=p),S<=k)w=y?E-(y>0?y:0):E-((k-S)/2|0),b=p?x+(p>0?p:0):w+k,l||(w>0&&d.charAt(w)!==" "&&d.charAt(w-1)!==" "&&(w=d.indexOf(" ",w),w<0&&(w=0)),b<d.length&&d.charAt(b-1)!==" "&&d.charAt(b)!==" "&&(b=d.lastIndexOf(" ",b),b<x?b=x:++b)),d=(w?s:"")+d.substring(w,b)+(b<d.length?s:"");else{for(x=[],E={},k={},S={},v={},T={},O=C=K=0,F=P=1;;){var M=void 0;for(let _=0,L;_<pe.length;_++){if(L=pe[_],O)if(C!==O){if(S[_+1])continue;if(L+=O,E[L]){K-=m,k[_+1]=1,S[_+1]=1;continue}if(L>=b.length-1){if(L>=b.length){S[_+1]=1,L>=w.length&&(k[_+1]=1);continue}K-=m}if(d=b[L].text,B=p&&T[_])if(B>0){if(d.length>B)if(S[_+1]=1,l)d=d.substring(0,B);else continue;(B-=d.length)||(B=-1),T[_]=B}else{S[_+1]=1;continue}if(K+d.length+1<=a)d=" "+d,x[_]+=d;else if(l)M=a-K-1,M>0&&(d=" "+d.substring(0,M),x[_]+=d),S[_+1]=1;else{S[_+1]=1;continue}}else{if(S[_])continue;if(L-=C,E[L]){K-=m,S[_]=1,k[_]=1;continue}if(L<=0){if(L<0){S[_]=1,k[_]=1;continue}K-=m}if(d=b[L].text,B=y&&v[_])if(B>0){if(d.length>B)if(S[_]=1,l)d=d.substring(d.length-B);else continue;(B-=d.length)||(B=-1),v[_]=B}else{S[_]=1;continue}if(K+d.length+1<=a)d+=" ",x[_]=d+x[_];else if(l)M=d.length+1-(a-K),M>=0&&M<d.length&&(d=d.substring(M)+" ",x[_]=d+x[_]),S[_]=1;else{S[_]=1;continue}}else{d=b[L].match,y&&(v[_]=y),p&&(T[_]=p),_&&K++;let Er;if(L?!_&&m&&(K+=m):(k[_]=1,S[_]=1),L>=w.length-1||L<b.length-1&&b[L+1].match?Er=1:m&&(K+=m),K-=o.length-2,!_||K+d.length<=a)x[_]=d;else{M=P=F=k[_]=0;break}Er&&(k[_+1]=1,S[_+1]=1)}K+=d.length,M=E[L]=1}if(M)C===O?O++:C++;else{if(C===O?P=0:F=0,!P&&!F)break;P?(C++,O=C):O++}}d="";for(let _=0,L;_<x.length;_++)L=(k[_]?_?" ":"":(_&&!s?" ":"")+s)+x[_],d+=L;s&&!k[x.length]&&(d+=s)}u&&(d=d.replace(u," ")),X[te].highlight=d}if(n)break}return t}function N(e,t){if(!this||this.constructor!==N)return new N(e,t);let r=0,n,s,o,i,c,a;if(e&&e.index){const l=e;if(t=l.index,r=l.boost||0,s=l.query){o=l.field||l.pluck,i=l.highlight;const u=l.resolve;e=l.async||l.queue,l.resolve=!1,l.index=null,e=e?t.searchAsync(l):t.search(l),l.resolve=u,l.index=t,e=e.result||e}else e=[]}if(e&&e.then){const l=this;e=e.then(function(u){l.C[0]=l.result=u.result||u,Rn(l)}),n=[e],e=[],c=new Promise(function(u){a=u})}this.index=t||null,this.result=e||[],this.h=r,this.C=n||[],this.await=c||null,this.return=a||null,this.highlight=i||null,this.query=s||"",this.field=o||""}A=N.prototype;A.limit=function(e){if(this.await){const t=this;this.C.push(function(){return t.limit(e).result})}else if(this.result.length){const t=[];for(let r=0,n;r<this.result.length;r++)if(n=this.result[r])if(n.length<=e){if(t[r]=n,e-=n.length,!e)break}else{t[r]=n.slice(0,e);break}this.result=t}return this};A.offset=function(e){if(this.await){const t=this;this.C.push(function(){return t.offset(e).result})}else if(this.result.length){const t=[];for(let r=0,n;r<this.result.length;r++)(n=this.result[r])&&(n.length<=e?e-=n.length:(t[r]=n.slice(e),e=0));this.result=t}return this};A.boost=function(e){if(this.await){const t=this;this.C.push(function(){return t.boost(e).result})}else this.h+=e;return this};function Rn(e,t){let r=e.result;var n=e.await;e.await=null;for(let s=0,o;s<e.C.length;s++)if(o=e.C[s]){if(typeof o=="function")r=o(),e.C[s]=r=r.result||r,s--;else if(o.h)r=o.h(),e.C[s]=r=r.result||r,s--;else if(o.then)return e.await=n}return n=e.return,e.C=[],e.return=null,t||n(r),r}A.resolve=function(e,t,r,n,s){let o=this.await?Rn(this,!0):this.result;if(o.then){const i=this;return o.then(function(){return i.resolve(e,t,r,n,s)})}return o.length&&(typeof e=="object"?(n=e.highlight||this.highlight,r=!!n||e.enrich,t=e.offset,e=e.limit):(n=n||this.highlight,r=!!n||r),o=s?r?Le.call(this.index,o):o:On.call(this.index,o,e||100,t,r)),this.finalize(o,n)};A.finalize=function(e,t){if(e.then){const n=this;return e.then(function(s){return n.finalize(s,t)})}t&&e.length&&this.query&&(e=Pt(this.query,e,this.index.index,this.field,t));const r=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",r&&r(e),e};function zt(e,t,r,n,s,o,i){const c=e.length;let a=[],l,u;l=U();for(let h=0,m,y,p,f;h<t;h++)for(let d=0;d<c;d++)if(p=e[d],h<p.length&&(m=p[h]))for(let w=0;w<m.length;w++){if(y=m[w],(u=l[y])?l[y]++:(u=0,l[y]=1),f=a[u]||(a[u]=[]),!i){let b=h+(d||!s?0:o||0);f=f[b]||(f[b]=[])}if(f.push(y),i&&r&&u===c-1&&f.length-n===r)return n?f.slice(n):f}if(e=a.length)if(s)a=a.length>1?zo(a,r,n,i,o):(a=a[0])&&r&&a.length>r||n?a.slice(n,r+n):a;else{if(e<c)return[];if(a=a[e-1],r||n)if(i)(a.length>r||n)&&(a=a.slice(n,r+n));else{s=[];for(let h=0,m;h<a.length;h++)if(m=a[h]){if(n&&m.length>n)n-=m.length;else if((r&&m.length>r||n)&&(m=m.slice(n,r+n),r-=m.length,n&&(n-=m.length)),s.push(m),!r)break}a=s}}return a}function zo(e,t,r,n,s){const o=[],i=U();let c;var a=e.length;let l;if(n){for(s=a-1;s>=0;s--)if(l=(n=e[s])&&n.length){for(a=0;a<l;a++)if(c=n[a],!i[c]){if(i[c]=1,r)r--;else if(o.push(c),o.length===t)return o}}}else for(let u=a-1,h,m=0;u>=0;u--){h=e[u];for(let y=0;y<h.length;y++)if(l=(n=h[y])&&n.length){for(let p=0;p<l;p++)if(c=n[p],!i[c])if(i[c]=1,r)r--;else{let f=(y+(u<a-1&&s||0))/(u+1)|0;if((o[f]||(o[f]=[])).push(c),++m===t)return o}}}return o}function Il(e,t,r,n,s){const o=U(),i=[];for(let c=0,a;c<t.length;c++){a=t[c];for(let l=0;l<a.length;l++)o[a[l]]=1}if(s){for(let c=0,a;c<e.length;c++)if(a=e[c],o[a]){if(n)n--;else if(i.push(a),o[a]=0,r&&--r===0)break}}else for(let c=0,a,l;c<e.result.length;c++)for(a=e.result[c],t=0;t<a.length;t++)l=a[t],o[l]&&((i[c]||(i[c]=[])).push(l),o[l]=0);return i}He.prototype.search=function(e,t,r,n){r||(!t&&at(e)?(r=e,e=""):at(t)&&(r=t,t=0));let s=[];var o=[];let i,c,a,l,u,h,m=0,y=!0,p;if(r){r.constructor===Array&&(r={index:r}),e=r.query||e,i=r.pluck,c=r.merge,l=r.boost,h=i||r.field||(h=r.index)&&(h.index?null:h);var f=this.tag&&r.tag;a=r.suggest,y=r.resolve!==!1,u=r.cache,p=y&&this.store&&r.highlight;var d=!!p||y&&this.store&&r.enrich;t=r.limit||t;var w=r.offset||0;if(t||(t=y?100:0),f&&(!this.db||!n)){f.constructor!==Array&&(f=[f]);var b=[];for(let v=0,T;v<f.length;v++)if(T=f[v],T.field&&T.tag){var E=T.tag;if(E.constructor===Array)for(var x=0;x<E.length;x++)b.push(T.field,E[x]);else b.push(T.field,E)}else{E=Object.keys(T);for(let K=0,C,O;K<E.length;K++)if(C=E[K],O=T[C],O.constructor===Array)for(x=0;x<O.length;x++)b.push(C,O[x]);else b.push(C,O)}if(f=b,!e){if(o=[],b.length)for(f=0;f<b.length;f+=2){if(this.db){if(n=this.index.get(b[f]),!n)continue;o.push(n=n.db.tag(b[f+1],t,w,d))}else n=jl.call(this,b[f],b[f+1],t,w,d);s.push(y?{field:b[f],tag:b[f+1],result:n}:[n])}if(o.length){const v=this;return Promise.all(o).then(function(T){for(let K=0;K<T.length;K++)y?s[K].result=T[K]:s[K]=T[K];return y?s:new N(s.length>1?zt(s,1,0,0,a,l):s[0],v)})}return y?s:new N(s.length>1?zt(s,1,0,0,a,l):s[0],this)}}y||i||!(h=h||this.field)||(re(h)?i=h:(h.constructor===Array&&h.length===1&&(h=h[0]),i=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let k;b=(this.worker||this.db)&&!n&&[];for(let v=0,T,K,C;v<h.length;v++){if(K=h[v],this.db&&this.tag&&!this.B[v])continue;let O;if(re(K)||(O=K,K=O.field,e=O.query||e,t=Fe(O.limit,t),w=Fe(O.offset,w),a=Fe(O.suggest,a),p=y&&this.store&&Fe(O.highlight,p),d=!!p||y&&this.store&&Fe(O.enrich,d),u=Fe(O.cache,u)),n)T=n[v];else{E=O||r||{},x=E.enrich;var S=this.index.get(K);if(f&&(this.db&&(E.tag=f,E.field=h,k=S.db.support_tag_search),!k&&x&&(E.enrich=!1),k||(E.limit=0,E.offset=0)),T=u?S.searchCache(e,f&&!k?0:t,E):S.search(e,f&&!k?0:t,E),f&&!k&&(E.limit=t,E.offset=w),x&&(E.enrich=x),b){b[v]=T;continue}}if(C=(T=T.result||T)&&T.length,f&&C){if(E=[],x=0,this.db&&n){if(!k)for(S=h.length;S<n.length;S++){let P=n[S];if(P&&P.length)x++,E.push(P);else if(!a)return y?s:new N(s,this)}}else for(let P=0,F,I;P<f.length;P+=2){if(F=this.tag.get(f[P]),!F){if(a)continue;return y?s:new N(s,this)}if(I=(F=F&&F.get(f[P+1]))&&F.length)x++,E.push(F);else if(!a)return y?s:new N(s,this)}if(x){if(T=Il(T,E,t,w,y),C=T.length,!C&&!a)return y?T:new N(T,this);x--}}if(C)o[m]=K,s.push(T),m++;else if(h.length===1)return y?s:new N(s,this)}if(b){if(this.db&&f&&f.length&&!k)for(d=0;d<f.length;d+=2){if(o=this.index.get(f[d]),!o){if(a)continue;return y?s:new N(s,this)}b.push(o.db.tag(f[d+1],t,w,!1))}const v=this;return Promise.all(b).then(function(T){return r&&(r.resolve=y),T.length&&(T=v.search(e,t,r,T)),T})}if(!m)return y?s:new N(s,this);if(i&&(!d||!this.store))return s=s[0],y?s:new N(s,this);for(b=[],w=0;w<o.length;w++){if(f=s[w],d&&f.length&&typeof f[0].doc>"u"&&(this.db?b.push(f=this.index.get(this.field[0]).db.enrich(f)):f=Le.call(this,f)),i)return y?p?Pt(e,f,this.index,i,p):f:new N(f,this);s[w]={field:o[w],result:f}}if(d&&this.db&&b.length){const v=this;return Promise.all(b).then(function(T){for(let K=0;K<T.length;K++)s[K].result=T[K];return p&&(s=Pt(e,s,v.index,i,p)),c?is(s):s})}return p&&(s=Pt(e,s,this.index,i,p)),c?is(s):s};function is(e){const t=[],r=U(),n=U();for(let s=0,o,i,c,a,l,u,h;s<e.length;s++){o=e[s],i=o.field,c=o.result;for(let m=0;m<c.length;m++)l=c[m],typeof l!="object"?l={id:a=l}:a=l.id,(u=r[a])?u.push(i):(l.field=r[a]=[i],t.push(l)),(h=l.highlight)&&(u=n[a],u||(n[a]=u={},l.highlight=u),u[i]=h)}return t}function jl(e,t,r,n,s){return e=this.tag.get(e),e?(e=e.get(t),e?(t=e.length-n,t>0&&((r&&t>r||n)&&(e=e.slice(n,n+r)),s&&(e=Le.call(this,e))),e):[]):[]}function Le(e){if(!this||!this.store)return e;if(this.db)return this.index.get(this.field[0]).db.enrich(e);const t=Array(e.length);for(let r=0,n;r<e.length;r++)n=e[r],t[r]={id:n,doc:this.store.get(n)};return t}function He(e){if(!this||this.constructor!==He)return new He(e);const t=e.document||e.doc||e;let r,n;if(this.B=[],this.field=[],this.D=[],this.key=(r=t.key||t.id)&&Yt(r,this.D)||"id",(n=e.keystore||0)&&(this.keystore=n),this.fastupdate=!!e.fastupdate,this.reg=!this.fastupdate||e.worker||e.db?n?new se(n):new Set:n?new ne(n):new Map,this.h=(r=t.store||null)&&r&&r!==!0&&[],this.store=r?n?new ne(n):new Map:null,this.cache=(r=e.cache||null)&&new Pe(r),e.cache=!1,this.worker=e.worker||!1,this.priority=e.priority||4,this.index=Fl.call(this,e,t),this.tag=null,(r=t.tag)&&(typeof r=="string"&&(r=[r]),r.length)){this.tag=new Map,this.A=[],this.F=[];for(let s=0,o,i;s<r.length;s++){if(o=r[s],i=o.field||o,!i)throw Error("The tag field from the document descriptor is undefined.");o.custom?this.A[s]=o.custom:(this.A[s]=Yt(i,this.D),o.filter&&(typeof this.A[s]=="string"&&(this.A[s]=new String(this.A[s])),this.A[s].G=o.filter)),this.F[s]=i,this.tag.set(i,new Map)}}if(this.worker){this.fastupdate=!1,e=[];for(const s of this.index.values())s.then&&e.push(s);if(e.length){const s=this;return Promise.all(e).then(function(o){let i=0;for(const c of s.index.entries()){const a=c[0];let l=c[1];l.then&&(l=o[i],s.index.set(a,l),i++)}return s})}}else e.db&&(this.fastupdate=!1,this.mount(e.db))}A=He.prototype;A.mount=function(e){let t=this.field;if(this.tag)for(let o=0,i;o<this.F.length;o++){i=this.F[o];var r=void 0;this.index.set(i,r=new oe({},this.reg)),t===this.field&&(t=t.slice(0)),t.push(i),r.tag=this.tag.get(i)}r=[];const n={db:e.db,type:e.type,fastupdate:e.fastupdate};for(let o=0,i,c;o<t.length;o++){n.field=c=t[o],i=this.index.get(c);const a=new e.constructor(e.id,n);a.id=e.id,r[o]=a.mount(i),i.document=!0,o?i.bypass=!0:i.store=this.store}const s=this;return this.db=Promise.all(r).then(function(){s.db=!0})};A.commit=async function(){const e=[];for(const t of this.index.values())e.push(t.commit());await Promise.all(e),this.reg.clear()};A.destroy=function(){const e=[];for(const t of this.index.values())e.push(t.destroy());return Promise.all(e)};function Fl(e,t){const r=new Map;let n=t.index||t.field||t;re(n)&&(n=[n]);for(let o=0,i,c;o<n.length;o++){if(i=n[o],re(i)||(c=i,i=i.field),c=at(c)?Object.assign({},e,c):e,this.worker){var s=void 0;s=(s=c.encoder)&&s.encode?s:new ut(typeof s=="string"?Do[s]:s||{}),s=new De(c,s),r.set(i,s)}this.worker||r.set(i,new oe(c,this.reg)),c.custom?this.B[o]=c.custom:(this.B[o]=Yt(i,this.D),c.filter&&(typeof this.B[o]=="string"&&(this.B[o]=new String(this.B[o])),this.B[o].G=c.filter)),this.field[o]=i}if(this.h){e=t.store,re(e)&&(e=[e]);for(let o=0,i,c;o<e.length;o++)i=e[o],c=i.field||i,i.custom?(this.h[o]=i.custom,i.custom.O=c):(this.h[o]=Yt(c,this.D),i.filter&&(typeof this.h[o]=="string"&&(this.h[o]=new String(this.h[o])),this.h[o].G=i.filter))}return r}function Yt(e,t){const r=e.split(":");let n=0;for(let s=0;s<r.length;s++)e=r[s],e[e.length-1]==="]"&&(e=e.substring(0,e.length-2))&&(t[n]=!0),e&&(r[n++]=e);return n<r.length&&(r.length=n),n>1?r:r[0]}A.append=function(e,t){return this.add(e,t,!0)};A.update=function(e,t){return this.remove(e).add(e,t)};A.remove=function(e){at(e)&&(e=lt(e,this.key));for(var t of this.index.values())t.remove(e,!0);if(this.reg.has(e)){if(this.tag&&!this.fastupdate)for(let r of this.tag.values())for(let n of r){t=n[0];const s=n[1],o=s.indexOf(e);o>-1&&(s.length>1?s.splice(o,1):r.delete(t))}this.store&&this.store.delete(e),this.reg.delete(e)}return this.cache&&this.cache.remove(e),this};A.clear=function(){const e=[];for(const t of this.index.values()){const r=t.clear();r.then&&e.push(r)}if(this.tag)for(const t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),e.length?Promise.all(e):this};A.contain=function(e){return this.db?this.index.get(this.field[0]).db.has(e):this.reg.has(e)};A.cleanup=function(){for(const e of this.index.values())e.cleanup();return this};A.get=function(e){return this.db?this.index.get(this.field[0]).db.enrich(e).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(e)||null};A.set=function(e,t){return typeof e=="object"&&(t=e,e=lt(t,this.key)),this.store.set(e,t),this};A.searchCache=Kn;A.export=Bl;A.import=Nl;_n(He.prototype);function Cn(e,t=0){let r=[],n=[];t&&(t=25e4/t*5e3|0);for(const s of e.entries())n.push(s),n.length===t&&(r.push(n),n=[]);return n.length&&r.push(n),r}function Pn(e,t){t||(t=new Map);for(let r=0,n;r<e.length;r++)n=e[r],t.set(n[0],n[1]);return t}function Yo(e,t=0){let r=[],n=[];t&&(t=25e4/t*1e3|0);for(const s of e.entries())n.push([s[0],Cn(s[1])[0]||[]]),n.length===t&&(r.push(n),n=[]);return n.length&&r.push(n),r}function Vo(e,t){t||(t=new Map);for(let r=0,n,s;r<e.length;r++)n=e[r],s=t.get(n[0]),t.set(n[0],Pn(n[1],s));return t}function Jo(e){let t=[],r=[];for(const n of e.keys())r.push(n),r.length===25e4&&(t.push(r),r=[]);return r.length&&t.push(r),t}function Go(e,t){t||(t=new Set);for(let r=0;r<e.length;r++)t.add(e[r]);return t}function Vt(e,t,r,n,s,o,i=0){const c=n&&n.constructor===Array;var a=c?n.shift():n;if(!a)return this.export(e,t,s,o+1);if((a=e((t?t+".":"")+(i+1)+"."+r,JSON.stringify(a)))&&a.then){const l=this;return a.then(function(){return Vt.call(l,e,t,r,c?n:null,s,o,i+1)})}return Vt.call(this,e,t,r,c?n:null,s,o,i+1)}function Bl(e,t,r=0,n=0){if(r<this.field.length){const i=this.field[r];if((t=this.index.get(i).export(e,i,r,n=1))&&t.then){const c=this;return t.then(function(){return c.export(e,i,r+1)})}return this.export(e,i,r+1)}let s,o;switch(n){case 0:s="reg",o=Jo(this.reg),t=null;break;case 1:s="tag",o=this.tag&&Yo(this.tag,this.reg.size),t=null;break;case 2:s="doc",o=this.store&&Cn(this.store),t=null;break;default:return}return Vt.call(this,e,t,s,o||null,r,n)}function Nl(e,t){var r=e.split(".");r[r.length-1]==="json"&&r.pop();const n=r.length>2?r[0]:"";if(r=r.length>2?r[2]:r[1],this.worker&&n)return this.index.get(n).import(e);if(t){if(typeof t=="string"&&(t=JSON.parse(t)),n)return this.index.get(n).import(r,t);switch(r){case"reg":this.fastupdate=!1,this.reg=Go(t,this.reg);for(let s=0,o;s<this.field.length;s++)o=this.index.get(this.field[s]),o.fastupdate=!1,o.reg=this.reg;if(this.worker){t=[];for(const s of this.index.values())t.push(s.import(e));return Promise.all(t)}break;case"tag":this.tag=Vo(t,this.tag);break;case"doc":this.store=Pn(t,this.store)}}}function cs(e,t){let r="";for(const n of e.entries()){e=n[0];const s=n[1];let o="";for(let i=0,c;i<s.length;i++){c=s[i]||[""];let a="";for(let l=0;l<c.length;l++)a+=(a?",":"")+(t==="string"?'"'+c[l]+'"':c[l]);a="["+a+"]",o+=(o?",":"")+a}o='["'+e+'",['+o+"]]",r+=(r?",":"")+o}return r}oe.prototype.remove=function(e,t){const r=this.reg.size&&(this.fastupdate?this.reg.get(e):this.reg.has(e));if(r){if(this.fastupdate){for(let n=0,s,o;n<r.length;n++)if((s=r[n])&&(o=s.length))if(s[o-1]===e)s.pop();else{const i=s.indexOf(e);i>=0&&s.splice(i,1)}}else ht(this.map,e),this.depth&&ht(this.ctx,e);t||this.reg.delete(e)}return this.db&&(this.commit_task.push({del:e}),this.M&&Xo(this)),this.cache&&this.cache.remove(e),this};function ht(e,t){let r=0;var n=typeof t>"u";if(e.constructor===Array){for(let s=0,o,i,c;s<e.length;s++)if((o=e[s])&&o.length){if(n)return 1;if(i=o.indexOf(t),i>=0){if(o.length>1)return o.splice(i,1),1;if(delete e[s],r)return 1;c=1}else{if(c)return 1;r++}}}else for(let s of e.entries())n=s[0],ht(s[1],t)?r++:e.delete(n);return r}const Ll={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};oe.prototype.add=function(e,t,r,n){if(t&&(e||e===0)){if(!n&&!r&&this.reg.has(e))return this.update(e,t);n=this.depth,t=this.encoder.encode(t,!n);const l=t.length;if(l){const u=U(),h=U(),m=this.resolution;for(let y=0;y<l;y++){let p=t[this.rtl?l-1-y:y];var s=p.length;if(s&&(n||!h[p])){var o=this.score?this.score(t,p,y,null,0):Tt(m,l,y),i="";switch(this.tokenize){case"tolerant":if(he(this,h,p,o,e,r),s>2){for(let f=1,d,w,b,E;f<s-1;f++)d=p.charAt(f),w=p.charAt(f+1),b=p.substring(0,f)+w,E=p.substring(f+2),i=b+d+E,he(this,h,i,o,e,r),i=b+E,he(this,h,i,o,e,r);he(this,h,p.substring(0,p.length-1),o,e,r)}break;case"full":if(s>2){for(let f=0,d;f<s;f++)for(o=s;o>f;o--){i=p.substring(f,o),d=this.rtl?s-1-f:f;var c=this.score?this.score(t,p,y,i,d):Tt(m,l,y,s,d);he(this,h,i,c,e,r)}break}case"bidirectional":case"reverse":if(s>1){for(c=s-1;c>0;c--){i=p[this.rtl?s-1-c:c]+i;var a=this.score?this.score(t,p,y,i,c):Tt(m,l,y,s,c);he(this,h,i,a,e,r)}i=""}case"forward":if(s>1){for(c=0;c<s;c++)i+=p[this.rtl?s-1-c:c],he(this,h,i,o,e,r);break}default:if(he(this,h,p,o,e,r),n&&l>1&&y<l-1)for(s=this.N,i=p,o=Math.min(n+1,this.rtl?y+1:l-y),c=1;c<o;c++){p=t[this.rtl?l-1-y-c:y+c],a=this.bidirectional&&p>i;const f=this.score?this.score(t,i,y,p,c-1):Tt(s+(l/2>s?0:1),l,y,o-1,c-1);he(this,u,a?i:p,f,e,r,a?p:i)}}}}this.fastupdate||this.reg.add(e)}}return this.db&&(this.commit_task.push(r?{ins:e}:{del:e}),this.M&&Xo(this)),this};function he(e,t,r,n,s,o,i){let c,a;if(!(c=t[r])||i&&!c[i]){if(i?(t=c||(t[r]=U()),t[i]=1,a=e.ctx,(c=a.get(i))?a=c:a.set(i,a=e.keystore?new ne(e.keystore):new Map)):(a=e.map,t[r]=1),(c=a.get(r))?a=c:a.set(r,a=c=[]),o){for(let l=0,u;l<c.length;l++)if((u=c[l])&&u.includes(s)){if(l<=n)return;u.splice(u.indexOf(s),1),e.fastupdate&&(t=e.reg.get(s))&&t.splice(t.indexOf(u),1);break}}if(a=a[n]||(a[n]=[]),a.push(s),a.length===2**31-1){if(t=new Ue(a),e.fastupdate)for(let l of e.reg.values())l.includes(a)&&(l[l.indexOf(a)]=t);c[n]=a=t}e.fastupdate&&((n=e.reg.get(s))?n.push(a):e.reg.set(s,[a]))}}function Tt(e,t,r,n,s){return r&&e>1?t+(n||0)<=e?r+(s||0):(e-1)/(t+(n||0))*(r+(s||0))+1|0:0}oe.prototype.search=function(e,t,r){if(r||(t||typeof e!="object"?typeof t=="object"&&(r=t,t=0):(r=e,e="")),r&&r.cache)return r.cache=!1,e=this.searchCache(e,t,r),r.cache=!0,e;let n=[],s,o,i,c=0,a,l,u,h,m;r&&(e=r.query||e,t=r.limit||t,c=r.offset||0,o=r.context,i=r.suggest,m=(a=r.resolve)&&r.enrich,u=r.boost,h=r.resolution,l=this.db&&r.tag),typeof a>"u"&&(a=this.resolve),o=this.depth&&o!==!1;let y=this.encoder.encode(e,!o);if(s=y.length,t=t||(a?100:0),s===1)return ls.call(this,y[0],"",t,c,a,m,l);if(s===2&&o&&!i)return ls.call(this,y[1],y[0],t,c,a,m,l);let p=U(),f=0,d;if(o&&(d=y[0],f=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(r=this.db.search(this,y,t,c,i,a,m,l),r!==!1))return r;const w=this;return(async function(){for(let b,E;f<s;f++){if((E=y[f])&&!p[E]){if(p[E]=1,b=await Vr(w,E,d,0,0,!1,!1),b=us(b,n,i,h)){n=b;break}d&&(i&&b&&n.length||(d=E))}i&&d&&f===s-1&&!n.length&&(h=w.resolution,d="",f=-1,p=U())}return as(n,h,t,c,i,u,a)})()}for(let w,b;f<s;f++){if((b=y[f])&&!p[b]){if(p[b]=1,w=Vr(this,b,d,0,0,!1,!1),w=us(w,n,i,h)){n=w;break}d&&(i&&w&&n.length||(d=b))}i&&d&&f===s-1&&!n.length&&(h=this.resolution,d="",f=-1,p=U())}return as(n,h,t,c,i,u,a)};function as(e,t,r,n,s,o,i){let c=e.length,a=e;if(c>1)a=zt(e,t,r,n,s,o,i);else if(c===1)return i?On.call(null,e[0],r,n):new N(e[0],this);return i?a:new N(a,this)}function ls(e,t,r,n,s,o,i){return e=Vr(this,e,t,r,n,s,o,i),this.db?e.then(function(c){return s?c||[]:new N(c,this)}):e&&e.length?s?On.call(this,e,r,n):new N(e,this):s?[]:new N([],this)}function us(e,t,r,n){let s=[];if(e&&e.length){if(e.length<=n){t.push(e);return}for(let o=0,i;o<n;o++)(i=e[o])&&(s[o]=i);if(s.length){t.push(s);return}}if(!r)return s}function Vr(e,t,r,n,s,o,i,c){let a;return r&&(a=e.bidirectional&&t>r)&&(a=r,r=t,t=a),e.db?e.db.get(t,r,n,s,o,i,c):(e=r?(e=e.ctx.get(r))&&e.get(t):e.map.get(t),e)}function oe(e,t){if(!this||this.constructor!==oe)return new oe(e);if(e){var r=re(e)?e:e.preset;r&&(e=Object.assign({},Ll[r],e))}else e={};r=e.context;const n=r===!0?{depth:1}:r||{},s=re(e.encoder)?Do[e.encoder]:e.encode||e.encoder||{};this.encoder=s.encode?s:typeof s=="object"?new ut(s):{encode:s},this.resolution=e.resolution||9,this.tokenize=r=(r=e.tokenize)&&r!=="default"&&r!=="exact"&&r||"strict",this.depth=r==="strict"&&n.depth||0,this.bidirectional=n.bidirectional!==!1,this.fastupdate=!!e.fastupdate,this.score=e.score||null,(r=e.keystore||0)&&(this.keystore=r),this.map=r?new ne(r):new Map,this.ctx=r?new ne(r):new Map,this.reg=t||(this.fastupdate?r?new ne(r):new Map:r?new se(r):new Set),this.N=n.resolution||3,this.rtl=s.rtl||e.rtl||!1,this.cache=(r=e.cache||null)&&new Pe(r),this.resolve=e.resolve!==!1,(r=e.db)&&(this.db=this.mount(r)),this.M=e.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=e.priority||4}A=oe.prototype;A.mount=function(e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),e.mount(this)};A.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};A.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function Xo(e){e.commit_timer||(e.commit_timer=setTimeout(function(){e.commit_timer=null,e.db.commit(e)},1))}A.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};A.append=function(e,t){return this.add(e,t,!0)};A.contain=function(e){return this.db?this.db.has(e):this.reg.has(e)};A.update=function(e,t){const r=this,n=this.remove(e);return n&&n.then?n.then(()=>r.add(e,t)):this.add(e,t)};A.cleanup=function(){return this.fastupdate?(ht(this.map),this.depth&&ht(this.ctx),this):this};A.searchCache=Kn;A.export=function(e,t,r=0,n=0){let s,o;switch(n){case 0:s="reg",o=Jo(this.reg);break;case 1:s="cfg",o=null;break;case 2:s="map",o=Cn(this.map,this.reg.size);break;case 3:s="ctx",o=Yo(this.ctx,this.reg.size);break;default:return}return Vt.call(this,e,t,s,o,r,n)};A.import=function(e,t){if(t)switch(typeof t=="string"&&(t=JSON.parse(t)),e=e.split("."),e[e.length-1]==="json"&&e.pop(),e.length===3&&e.shift(),e=e.length>1?e[1]:e[0],e){case"reg":this.fastupdate=!1,this.reg=Go(t,this.reg);break;case"map":this.map=Pn(t,this.map);break;case"ctx":this.ctx=Vo(t,this.ctx)}};A.serialize=function(e=!0){let t="",r="",n="";if(this.reg.size){let o;for(var s of this.reg.keys())o||(o=typeof s),t+=(t?",":"")+(o==="string"?'"'+s+'"':s);t="index.reg=new Set(["+t+"]);",r=cs(this.map,o),r="index.map=new Map(["+r+"]);";for(const i of this.ctx.entries()){s=i[0];let c=cs(i[1],o);c="new Map(["+c+"])",c='["'+s+'",'+c+"]",n+=(n?",":"")+c}n="index.ctx=new Map(["+n+"]);"}return e?"function inject(index){"+t+r+n+"}":t+r+n};_n(oe.prototype);const qo=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Jt=["map","ctx","tag","reg","cfg"],Se=U();function Jr(e,t={}){if(!this||this.constructor!==Jr)return new Jr(e,t);typeof e=="object"&&(t=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=t.field?t.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=t.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}A=Jr.prototype;A.mount=function(e){return e.index?e.mount(this):(e.db=this,this.open())};A.open=function(){if(this.db)return this.db;let e=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),Se[e.id]||(Se[e.id]=[]),Se[e.id].push(e.field);const t=qo.open(e.id,1);return t.onupgradeneeded=function(){const r=e.db=this.result;for(let n=0,s;n<Jt.length;n++){s=Jt[n];for(let o=0,i;o<Se[e.id].length;o++)i=Se[e.id][o],r.objectStoreNames.contains(s+(s!=="reg"&&i?":"+i:""))||r.createObjectStore(s+(s!=="reg"&&i?":"+i:""))}},e.db=Ee(t,function(r){e.db=r,e.db.onversionchange=function(){e.close()}})};A.close=function(){this.db&&this.db.close(),this.db=null};A.destroy=function(){const e=qo.deleteDatabase(this.id);return Ee(e)};A.clear=function(){const e=[];for(let r=0,n;r<Jt.length;r++){n=Jt[r];for(let s=0,o;s<Se[this.id].length;s++)o=Se[this.id][s],e.push(n+(n!=="reg"&&o?":"+o:""))}const t=this.db.transaction(e,"readwrite");for(let r=0;r<e.length;r++)t.objectStore(e[r]).clear();return Ee(t)};A.get=function(e,t,r=0,n=0,s=!0,o=!1){e=this.db.transaction((t?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((t?"ctx":"map")+(this.field?":"+this.field:"")).get(t?t+":"+e:e);const i=this;return Ee(e).then(function(c){let a=[];if(!c||!c.length)return a;if(s){if(!r&&!n&&c.length===1)return c[0];for(let l=0,u;l<c.length;l++)if((u=c[l])&&u.length){if(n>=u.length){n-=u.length;continue}const h=r?n+Math.min(u.length-n,r):u.length;for(let m=n;m<h;m++)a.push(u[m]);if(n=0,a.length===r)break}return o?i.enrich(a):a}return c})};A.tag=function(e,t=0,r=0,n=!1){e=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(e);const s=this;return Ee(e).then(function(o){return!o||!o.length||r>=o.length?[]:!t&&!r?o:(o=o.slice(r,r+t),n?s.enrich(o):o)})};A.enrich=function(e){typeof e!="object"&&(e=[e]);const t=this.db.transaction("reg","readonly").objectStore("reg"),r=[];for(let n=0;n<e.length;n++)r[n]=Ee(t.get(e[n]));return Promise.all(r).then(function(n){for(let s=0;s<n.length;s++)n[s]={id:e[s],doc:n[s]?JSON.parse(n[s]):null};return n})};A.has=function(e){return e=this.db.transaction("reg","readonly").objectStore("reg").getKey(e),Ee(e).then(function(t){return!!t})};A.search=null;A.info=function(){};A.transaction=function(e,t,r){e+=e!=="reg"&&this.field?":"+this.field:"";let n=this.h[e+":"+t];if(n)return r.call(this,n);let s=this.db.transaction(e,t);this.h[e+":"+t]=n=s.objectStore(e);const o=r.call(this,n);return this.h[e+":"+t]=null,Ee(s).finally(function(){return o})};A.commit=async function(e){let t=e.commit_task,r=[];e.commit_task=[];for(let n=0,s;n<t.length;n++)s=t[n],s.del&&r.push(s.del);r.length&&await this.remove(r),e.reg.size&&(await this.transaction("map","readwrite",function(n){for(const s of e.map){const o=s[0],i=s[1];i.length&&(n.get(o).onsuccess=function(){let c=this.result;var a;if(c&&c.length){const l=Math.max(c.length,i.length);for(let u=0,h,m;u<l;u++)if((m=i[u])&&m.length){if((h=c[u])&&h.length)for(a=0;a<m.length;a++)h.push(m[a]);else c[u]=m;a=1}}else c=i,a=1;a&&n.put(c,o)})}}),await this.transaction("ctx","readwrite",function(n){for(const s of e.ctx){const o=s[0],i=s[1];for(const c of i){const a=c[0],l=c[1];l.length&&(n.get(o+":"+a).onsuccess=function(){let u=this.result;var h;if(u&&u.length){const m=Math.max(u.length,l.length);for(let y=0,p,f;y<m;y++)if((f=l[y])&&f.length){if((p=u[y])&&p.length)for(h=0;h<f.length;h++)p.push(f[h]);else u[y]=f;h=1}}else u=l,h=1;h&&n.put(u,o+":"+a)})}}}),e.store?await this.transaction("reg","readwrite",function(n){for(const s of e.store){const o=s[0],i=s[1];n.put(typeof i=="object"?JSON.stringify(i):1,o)}}):e.bypass||await this.transaction("reg","readwrite",function(n){for(const s of e.reg.keys())n.put(1,s)}),e.tag&&await this.transaction("tag","readwrite",function(n){for(const s of e.tag){const o=s[0],i=s[1];i.length&&(n.get(o).onsuccess=function(){let c=this.result;c=c&&c.length?c.concat(i):i,n.put(c,o)})}}),e.map.clear(),e.ctx.clear(),e.tag&&e.tag.clear(),e.store&&e.store.clear(),e.document||e.reg.clear())};function _r(e,t,r){const n=e.value;let s,o=0;for(let i=0,c;i<n.length;i++){if(c=r?n:n[i]){for(let a=0,l,u;a<t.length;a++)if(u=t[a],l=c.indexOf(u),l>=0)if(s=1,c.length>1)c.splice(l,1);else{n[i]=[];break}o+=c.length}if(r)break}o?s&&e.update(n):e.delete(),e.continue()}A.remove=function(e){return typeof e!="object"&&(e=[e]),Promise.all([this.transaction("map","readwrite",function(t){t.openCursor().onsuccess=function(){const r=this.result;r&&_r(r,e)}}),this.transaction("ctx","readwrite",function(t){t.openCursor().onsuccess=function(){const r=this.result;r&&_r(r,e)}}),this.transaction("tag","readwrite",function(t){t.openCursor().onsuccess=function(){const r=this.result;r&&_r(r,e,!0)}}),this.transaction("reg","readwrite",function(t){for(let r=0;r<e.length;r++)t.delete(e[r])})])};function Ee(e,t){return new Promise((r,n)=>{e.onsuccess=e.oncomplete=function(){t&&t(this.result),t=null,r(this.result)},e.onerror=e.onblocked=n,e=null})}const At=oe,dr={preset:"match",tokenize:"forward",resolution:9,minlength:2,optimize:!0,fastupdate:!0,cache:!0},Ml={...dr,minlength:3,resolution:6},Ul={...dr,tokenize:"strict",minlength:1},Dl={...dr,tokenize:"strict",minlength:1},Hl=()=>({subjectIndex:new At(dr),bodyIndex:new At(Ml),fromIndex:new At(Ul),toIndex:new At(Dl),isReady:!1}),Wo=(e,t)=>{try{const r=e.id;if(e.params.subject&&t.subjectIndex.add(r,e.params.subject),e.body?.text&&t.bodyIndex.add(r,e.body.text),e.params.sender){const o=`${e.params.sender.name||""} ${e.params.sender.email||""}`.trim();t.fromIndex.add(r,o)}const s=(e.params.recipients?.length?e.params.recipients:[e.params.recipient]).map(o=>`${o.name||""} ${o.email||""}`.trim()).join(" ");t.toIndex.add(r,s)}catch(r){throw new Error("Failed to add email to the search index",{cause:r})}},$l=(e,t)=>{try{t.subjectIndex.remove(e),t.bodyIndex.remove(e),t.fromIndex.remove(e),t.toIndex.remove(e)}catch(r){throw new Error(`Failed to remove email with ID ${e} from the search index`,{cause:r})}},zl=async e=>{try{const t=Hl();t.isReady=!1;for(const r of e.esCache.values())Wo(r,t);return t.isReady=!0,t}catch(t){throw new Error("Failed build an email search index from the cache",{cause:t})}},Yl=async(e,t,r,n={})=>{try{if(!r.isReady||!e.trim())return[];const{fields:s=["subject","body","from","to"],limit:o=50,boost:i={subject:3,body:1,from:2,to:2}}=n,c=new Map,a=s.map(async u=>{let h;switch(u){case"subject":h=await r.subjectIndex.searchAsync(e);break;case"body":h=await r.bodyIndex.searchAsync(e);break;case"from":h=await r.fromIndex.searchAsync(e);break;case"to":h=await r.toIndex.searchAsync(e);break;default:return}const m=i[u]||1;h.forEach(y=>{const p=c.get(String(y))||0;c.set(String(y),p+m)})});await Promise.all(a);const l=[];for(const[u,h]of c){const m=t.esCache.get(u);m&&l.push({email:m,score:h})}return l.sort((u,h)=>(h.score||0)-(u.score||0)),l.slice(0,o)}catch(s){throw new Error("Email search failed",{cause:s})}},Vl=Object.freeze(Object.defineProperty({__proto__:null,addEmailToCache:Uo,addEmailToSearchIndex:Wo,addEmailsToCache:Hr,buildSearchIndexFromCache:zl,closeDatabase:ll,createCacheFromDB:El,deleteDatabase:ul,deleteEmail:ml,deleteEmailFromCache:xl,deleteOldestEmails:jo,deriveIndexKey:hl,encryptAndStoreEmail:fl,encryptAndStoreManyEmail:dl,enforceMaxEmailNumber:gl,getAllEmailsSortedNewestFirst:Bo,getAllEmailsSortedOldestFirst:wl,getAndDecryptAllEmails:yl,getAndDecryptEmail:pl,getEmailBatch:No,getEmailCount:An,getEmailFromCache:Mo,openDatabase:al,removeEmailFromSearchIndex:$l,searchEmails:Yl},Symbol.toStringTag,{value:"Module"}));class yt{constructor(t=0,r="Network Error"){this.status=t,this.text=r}}const Jl=()=>{if(!(typeof localStorage>"u"))return{get:e=>Promise.resolve(localStorage.getItem(e)),set:(e,t)=>Promise.resolve(localStorage.setItem(e,t)),remove:e=>Promise.resolve(localStorage.removeItem(e))}},z={origin:"https://api.emailjs.com",blockHeadless:!1,storageProvider:Jl()},In=e=>e?typeof e=="string"?{publicKey:e}:e.toString()==="[object Object]"?e:{}:{},Gl=(e,t="https://api.emailjs.com")=>{if(!e)return;const r=In(e);z.publicKey=r.publicKey,z.blockHeadless=r.blockHeadless,z.storageProvider=r.storageProvider,z.blockList=r.blockList,z.limitRate=r.limitRate,z.origin=r.origin||t},Zo=async(e,t,r={})=>{const n=await fetch(z.origin+e,{method:"POST",headers:r,body:t}),s=await n.text(),o=new yt(n.status,s);if(n.ok)return o;throw o},Qo=(e,t,r)=>{if(!e||typeof e!="string")throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!t||typeof t!="string")throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!r||typeof r!="string")throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates"},Xl=e=>{if(e&&e.toString()!=="[object Object]")throw"The template params have to be the object. Visit https://www.emailjs.com/docs/sdk/send/"},ei=e=>e.webdriver||!e.languages||e.languages.length===0,ti=()=>new yt(451,"Unavailable For Headless Browser"),ql=(e,t)=>{if(!Array.isArray(e))throw"The BlockList list has to be an array";if(typeof t!="string")throw"The BlockList watchVariable has to be a string"},Wl=e=>!e.list?.length||!e.watchVariable,Zl=(e,t)=>e instanceof FormData?e.get(t):e[t],ri=(e,t)=>{if(Wl(e))return!1;ql(e.list,e.watchVariable);const r=Zl(t,e.watchVariable);return typeof r!="string"?!1:e.list.includes(r)},ni=()=>new yt(403,"Forbidden"),Ql=(e,t)=>{if(typeof e!="number"||e<0)throw"The LimitRate throttle has to be a positive number";if(t&&typeof t!="string")throw"The LimitRate ID has to be a non-empty string"},eu=async(e,t,r)=>{const n=Number(await r.get(e)||0);return t-Date.now()+n},si=async(e,t,r)=>{if(!t.throttle||!r)return!1;Ql(t.throttle,t.id);const n=t.id||e;return await eu(n,t.throttle,r)>0?!0:(await r.set(n,Date.now().toString()),!1)},oi=()=>new yt(429,"Too Many Requests"),tu=async(e,t,r,n)=>{const s=In(n),o=s.publicKey||z.publicKey,i=s.blockHeadless||z.blockHeadless,c=s.storageProvider||z.storageProvider,a={...z.blockList,...s.blockList},l={...z.limitRate,...s.limitRate};return i&&ei(navigator)?Promise.reject(ti()):(Qo(o,e,t),Xl(r),r&&ri(a,r)?Promise.reject(ni()):await si(location.pathname,l,c)?Promise.reject(oi()):Zo("/api/v1.0/email/send",JSON.stringify({lib_version:"4.4.1",user_id:o,service_id:e,template_id:t,template_params:r}),{"Content-type":"application/json"}))},ru=e=>{if(!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of the form"},nu=e=>typeof e=="string"?document.querySelector(e):e,su=async(e,t,r,n)=>{const s=In(n),o=s.publicKey||z.publicKey,i=s.blockHeadless||z.blockHeadless,c=z.storageProvider||s.storageProvider,a={...z.blockList,...s.blockList},l={...z.limitRate,...s.limitRate};if(i&&ei(navigator))return Promise.reject(ti());const u=nu(r);Qo(o,e,t),ru(u);const h=new FormData(u);return ri(a,h)?Promise.reject(ni()):await si(location.pathname,l,c)?Promise.reject(oi()):(h.append("lib_version","4.4.1"),h.append("service_id",e),h.append("template_id",t),h.append("user_id",o),Zo("/api/v1.0/email/send-form",h))},ou={init:Gl,send:tu,sendForm:su,EmailJSResponseStatus:yt};class ii{constructor(t,r,n){this.serviceId=t,this.templateId=r,this.publicKey=n}async sendEmail(t,r){try{const n={from_email:r.sender.email,from_name:r.sender.name,to_email:r.recipient.email,to_name:r.recipient.name,email_subject:r.subject,email_body:t,timestamp:new Date().toISOString()};await ou.send(this.serviceId,this.templateId,n,this.publicKey)}catch(n){throw new Error(`Failed to send an email ${n.message}`,{cause:n})}}async sendHybridEmail(t){try{if(t.recipientEmail!==t.params.recipient.email)throw new Error("Email is encrypted for another recipient");const r=ko(t);await this.sendEmail(r,t.params)}catch(r){throw new Error(`Failed to email to the recipient: ${r.message}`,{cause:r})}}async sendPwdProtectedEmail(t){try{const r=vo(t);await this.sendEmail(r,t.params)}catch(r){throw new Error(`Failed to email to the recipient ${r.message}`,{cause:r})}}}function iu(e,t,r){return new ii(e,t,r)}const cu=Object.freeze(Object.defineProperty({__proto__:null,EmailServiceAPI:ii,getEmailServiceAPI:iu},Symbol.toStringTag,{value:"Module"}));var Q=(e=>(e.IDENTITY="identity",e.ENCRYPTION="encryption",e.RECOVERY="recovery",e.INDEX="index",e))(Q||{});function au(e){return sessionStorage.getItem(e)}function lu(e,t){return sessionStorage.setItem(e,t)}function uu(e){sessionStorage.removeItem(e)}function hu(e){return!!sessionStorage.getItem(e)}function fu(){sessionStorage.clear()}const jn={set:lu,get:au,removeItem:uu,exists:hu,clear:fu},du=Object.freeze(Object.defineProperty({__proto__:null,default:jn},Symbol.toStringTag,{value:"Module"}));async function Gr(e,t,r,n){try{const s=r+n,o=D(t);return await ir(e,o,s)}catch(s){throw new Error("Failed to encrypt keystore content",{cause:s})}}async function Fn(e,t,r,n){try{const s=r+n,o=await ot(e,t,s);return H(o)}catch(s){throw new Error("Failed to decrypt keystore content",{cause:s})}}function Gt(){try{const e=jn.get("userID");if(!e)throw new Error("No UserID");return e}catch(e){throw new Error("Failed to get UserID from session storage",{cause:e})}}function pr(){try{const e=jn.get("baseKey");if(!e)throw new Error("No base key");return D(e)}catch(e){throw new Error("Failed to get base key from session storage",{cause:e})}}async function ci(e){return pt(Rs,e)}async function ai(e){const t=await Je(G,e);return pt(Ps,t)}async function li(e){return pt(Cs,e)}function ui(){return so(G)}async function hi(){try{const e=await Zt(),t=bn();return{userPrivateKey:e.privateKey,userPublicKey:e.publicKey,userPublicKyberKey:t.publicKey,userPrivateKyberKey:t.secretKey}}catch(e){throw new Error("Failed to generate encryption keys",{cause:e})}}async function pu(){try{const e=Gt(),t=pr(),r=await hi(),n=await zs(r),s=await li(t),o=await Gr(s,n,e,en),i={userID:e,type:Q.ENCRYPTION,encryptedKeys:o},c=ui(),a=await ai(c),l=await Gr(a,n,e,tn),u={userID:e,type:Q.RECOVERY,encryptedKeys:l};return{encryptionKeystore:i,recoveryKeystore:u,recoveryCodes:c}}catch(e){throw new Error("Failed to create encryption and recovery keystores",{cause:e})}}async function yu(e){try{if(e.type!=Q.ENCRYPTION)throw new Error("Input is invalid");const t=pr(),r=await li(t),n=await Fn(r,e.encryptedKeys,e.userID,en);return await cn(n)}catch(t){throw new Error("Failed to open encryption keystore",{cause:t})}}async function mu(e,t){try{if(t.type!=Q.RECOVERY)throw new Error("Input is invalid");const r=await ai(e),n=await Fn(r,t.encryptedKeys,t.userID,tn);return await cn(n)}catch(r){throw new Error("Failed to open recovery keystore",{cause:r})}}async function fi(){try{const e=await Zt();return{userPrivateKey:e.privateKey,userPublicKey:e.publicKey}}catch(e){throw new Error("Failed to generate idenity keys",{cause:e})}}async function gu(){try{const e=Q.IDENTITY,t=Gt(),r=pr(),n=await fi(),s=await $s(n),o=await ci(r),i=await Gr(o,s,t,Qr);return{userID:t,type:e,encryptedKeys:i}}catch(e){throw new Error("Failed to create identity keystore",{cause:e})}}async function wu(e){try{if(e.type!=Q.IDENTITY)throw new Error("Input is invalid");const t=pr(),r=await ci(t),n=await Fn(r,e.encryptedKeys,e.userID,Qr);return await Vs(n)}catch(t){throw new Error("Failed to open identity keystore",{cause:t})}}const bu=Object.freeze(Object.defineProperty({__proto__:null,createEncryptionAndRecoveryKeystores:pu,createIdentityKeystore:gu,generateEncryptionKeys:hi,generateIdentityKeys:fi,generateRecoveryCodes:ui,openEncryptionKeystore:yu,openIdentityKeystore:wu,openRecoveryKeystore:mu},Symbol.toStringTag,{value:"Module"}));function di(e,t){return function(){return e.apply(t,arguments)}}const{toString:Eu}=Object.prototype,{getPrototypeOf:Bn}=Object,{iterator:yr,toStringTag:pi}=Symbol,mr=(e=>t=>{const r=Eu.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ie=e=>(e=e.toLowerCase(),t=>mr(t)===e),gr=e=>t=>typeof t===e,{isArray:Xe}=Array,$e=gr("undefined");function mt(e){return e!==null&&!$e(e)&&e.constructor!==null&&!$e(e.constructor)&&q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yi=ie("ArrayBuffer");function xu(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yi(e.buffer),t}const ku=gr("string"),q=gr("function"),mi=gr("number"),gt=e=>e!==null&&typeof e=="object",vu=e=>e===!0||e===!1,It=e=>{if(mr(e)!=="object")return!1;const t=Bn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pi in e)&&!(yr in e)},Su=e=>{if(!gt(e)||mt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Tu=ie("Date"),Au=ie("File"),Ku=ie("Blob"),_u=ie("FileList"),Ou=e=>gt(e)&&q(e.pipe),Ru=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||q(e.append)&&((t=mr(e))==="formdata"||t==="object"&&q(e.toString)&&e.toString()==="[object FormData]"))},Cu=ie("URLSearchParams"),[Pu,Iu,ju,Fu]=["ReadableStream","Request","Response","Headers"].map(ie),Bu=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Xe(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(mt(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(n=0;n<i;n++)c=o[n],t.call(null,e[c],c,e)}}function gi(e,t){if(mt(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const Ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,wi=e=>!$e(e)&&e!==Ae;function Xr(){const{caseless:e,skipUndefined:t}=wi(this)&&this||{},r={},n=(s,o)=>{const i=e&&gi(r,o)||o;It(r[i])&&It(s)?r[i]=Xr(r[i],s):It(s)?r[i]=Xr({},s):Xe(s)?r[i]=s.slice():(!t||!$e(s))&&(r[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&wt(arguments[s],n);return r}const Nu=(e,t,r,{allOwnKeys:n}={})=>(wt(t,(s,o)=>{r&&q(s)?e[o]=di(s,r):e[o]=s},{allOwnKeys:n}),e),Lu=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mu=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Uu=(e,t,r,n)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Bn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Du=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Hu=e=>{if(!e)return null;if(Xe(e))return e;let t=e.length;if(!mi(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},$u=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bn(Uint8Array)),zu=(e,t)=>{const n=(e&&e[yr]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Yu=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Vu=ie("HTMLFormElement"),Ju=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),hs=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Gu=ie("RegExp"),bi=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};wt(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},Xu=e=>{bi(e,(t,r)=>{if(q(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(q(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qu=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return Xe(e)?n(e):n(String(e).split(t)),r},Wu=()=>{},Zu=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qu(e){return!!(e&&q(e.append)&&e[pi]==="FormData"&&e[yr])}const eh=e=>{const t=new Array(10),r=(n,s)=>{if(gt(n)){if(t.indexOf(n)>=0)return;if(mt(n))return n;if(!("toJSON"in n)){t[s]=n;const o=Xe(n)?[]:{};return wt(n,(i,c)=>{const a=r(i,s+1);!$e(a)&&(o[c]=a)}),t[s]=void 0,o}}return n};return r(e,0)},th=ie("AsyncFunction"),rh=e=>e&&(gt(e)||q(e))&&q(e.then)&&q(e.catch),Ei=((e,t)=>e?setImmediate:t?((r,n)=>(Ae.addEventListener("message",({source:s,data:o})=>{s===Ae&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Ae.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",q(Ae.postMessage)),nh=typeof queueMicrotask<"u"?queueMicrotask.bind(Ae):typeof process<"u"&&process.nextTick||Ei,sh=e=>e!=null&&q(e[yr]),g={isArray:Xe,isArrayBuffer:yi,isBuffer:mt,isFormData:Ru,isArrayBufferView:xu,isString:ku,isNumber:mi,isBoolean:vu,isObject:gt,isPlainObject:It,isEmptyObject:Su,isReadableStream:Pu,isRequest:Iu,isResponse:ju,isHeaders:Fu,isUndefined:$e,isDate:Tu,isFile:Au,isBlob:Ku,isRegExp:Gu,isFunction:q,isStream:Ou,isURLSearchParams:Cu,isTypedArray:$u,isFileList:_u,forEach:wt,merge:Xr,extend:Nu,trim:Bu,stripBOM:Lu,inherits:Mu,toFlatObject:Uu,kindOf:mr,kindOfTest:ie,endsWith:Du,toArray:Hu,forEachEntry:zu,matchAll:Yu,isHTMLForm:Vu,hasOwnProperty:hs,hasOwnProp:hs,reduceDescriptors:bi,freezeMethods:Xu,toObjectSet:qu,toCamelCase:Ju,noop:Wu,toFiniteNumber:Zu,findKey:gi,global:Ae,isContextDefined:wi,isSpecCompliantForm:Qu,toJSONObject:eh,isAsyncFn:th,isThenable:rh,setImmediate:Ei,asap:nh,isIterable:sh};function R(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}g.inherits(R,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:g.toJSONObject(this.config),code:this.code,status:this.status}}});const xi=R.prototype,ki={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ki[e]={value:e}});Object.defineProperties(R,ki);Object.defineProperty(xi,"isAxiosError",{value:!0});R.from=(e,t,r,n,s,o)=>{const i=Object.create(xi);g.toFlatObject(e,i,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const c=e&&e.message?e.message:"Error",a=t==null&&e?e.code:t;return R.call(i,c,a,r,n,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const oh=null;function qr(e){return g.isPlainObject(e)||g.isArray(e)}function vi(e){return g.endsWith(e,"[]")?e.slice(0,-2):e}function fs(e,t,r){return e?e.concat(t).map(function(s,o){return s=vi(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function ih(e){return g.isArray(e)&&!e.some(qr)}const ch=g.toFlatObject(g,{},null,function(t){return/^is[A-Z]/.test(t)});function wr(e,t,r){if(!g.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=g.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,d){return!g.isUndefined(d[f])});const n=r.metaTokens,s=r.visitor||u,o=r.dots,i=r.indexes,a=(r.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(t);if(!g.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(g.isDate(p))return p.toISOString();if(g.isBoolean(p))return p.toString();if(!a&&g.isBlob(p))throw new R("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(p)||g.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,f,d){let w=p;if(p&&!d&&typeof p=="object"){if(g.endsWith(f,"{}"))f=n?f:f.slice(0,-2),p=JSON.stringify(p);else if(g.isArray(p)&&ih(p)||(g.isFileList(p)||g.endsWith(f,"[]"))&&(w=g.toArray(p)))return f=vi(f),w.forEach(function(E,x){!(g.isUndefined(E)||E===null)&&t.append(i===!0?fs([f],x,o):i===null?f:f+"[]",l(E))}),!1}return qr(p)?!0:(t.append(fs(d,f,o),l(p)),!1)}const h=[],m=Object.assign(ch,{defaultVisitor:u,convertValue:l,isVisitable:qr});function y(p,f){if(!g.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+f.join("."));h.push(p),g.forEach(p,function(w,b){(!(g.isUndefined(w)||w===null)&&s.call(t,w,g.isString(b)?b.trim():b,f,m))===!0&&y(w,f?f.concat(b):[b])}),h.pop()}}if(!g.isObject(e))throw new TypeError("data must be an object");return y(e),t}function ds(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Nn(e,t){this._pairs=[],e&&wr(e,this,t)}const Si=Nn.prototype;Si.append=function(t,r){this._pairs.push([t,r])};Si.toString=function(t){const r=t?function(n){return t.call(this,n,ds)}:ds;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function ah(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ti(e,t,r){if(!t)return e;const n=r&&r.encode||ah;g.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let o;if(s?o=s(t,r):o=g.isURLSearchParams(t)?t.toString():new Nn(t,r).toString(n),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class ps{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){g.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Ai={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lh=typeof URLSearchParams<"u"?URLSearchParams:Nn,uh=typeof FormData<"u"?FormData:null,hh=typeof Blob<"u"?Blob:null,fh={isBrowser:!0,classes:{URLSearchParams:lh,FormData:uh,Blob:hh},protocols:["http","https","file","blob","url","data"]},Ln=typeof window<"u"&&typeof document<"u",Wr=typeof navigator=="object"&&navigator||void 0,dh=Ln&&(!Wr||["ReactNative","NativeScript","NS"].indexOf(Wr.product)<0),ph=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yh=Ln&&window.location.href||"http://localhost",mh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ln,hasStandardBrowserEnv:dh,hasStandardBrowserWebWorkerEnv:ph,navigator:Wr,origin:yh},Symbol.toStringTag,{value:"Module"})),V={...mh,...fh};function gh(e,t){return wr(e,new V.classes.URLSearchParams,{visitor:function(r,n,s,o){return V.isNode&&g.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function wh(e){return g.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bh(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Ki(e){function t(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),a=o>=r.length;return i=!i&&g.isArray(s)?s.length:i,a?(g.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!c):((!s[i]||!g.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&g.isArray(s[i])&&(s[i]=bh(s[i])),!c)}if(g.isFormData(e)&&g.isFunction(e.entries)){const r={};return g.forEachEntry(e,(n,s)=>{t(wh(n),s,r,0)}),r}return null}function Eh(e,t,r){if(g.isString(e))try{return(t||JSON.parse)(e),g.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const bt={transitional:Ai,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=g.isObject(t);if(o&&g.isHTMLForm(t)&&(t=new FormData(t)),g.isFormData(t))return s?JSON.stringify(Ki(t)):t;if(g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)||g.isReadableStream(t))return t;if(g.isArrayBufferView(t))return t.buffer;if(g.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return gh(t,this.formSerializer).toString();if((c=g.isFileList(t))||n.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return wr(c?{"files[]":t}:t,a&&new a,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Eh(t)):t}],transformResponse:[function(t){const r=this.transitional||bt.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(g.isResponse(t)||g.isReadableStream(t))return t;if(t&&g.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?R.from(c,R.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:V.classes.FormData,Blob:V.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],e=>{bt.headers[e]={}});const xh=g.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kh=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2050
|
-
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&xh[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},ys=Symbol("internals");function rt(e){return e&&String(e).trim().toLowerCase()}function jt(e){return e===!1||e==null?e:g.isArray(e)?e.map(jt):String(e)}function vh(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Sh=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Or(e,t,r,n,s){if(g.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!g.isString(t)){if(g.isString(n))return t.indexOf(n)!==-1;if(g.isRegExp(n))return n.test(t)}}function Th(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Ah(e,t){const r=g.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}let W=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(c,a,l){const u=rt(a);if(!u)throw new Error("header name must be a non-empty string");const h=g.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||a]=jt(c))}const i=(c,a)=>g.forEach(c,(l,u)=>o(l,u,a));if(g.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(g.isString(t)&&(t=t.trim())&&!Sh(t))i(kh(t),r);else if(g.isObject(t)&&g.isIterable(t)){let c={},a,l;for(const u of t){if(!g.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(a=c[l])?g.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}i(c,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=rt(t),t){const n=g.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return vh(s);if(g.isFunction(r))return r.call(this,s,n);if(g.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=rt(t),t){const n=g.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Or(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=rt(i),i){const c=g.findKey(n,i);c&&(!r||Or(n,n[c],c,r))&&(delete n[c],s=!0)}}return g.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||Or(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return g.forEach(this,(s,o)=>{const i=g.findKey(n,o);if(i){r[i]=jt(s),delete r[o];return}const c=t?Th(o):String(o).trim();c!==o&&delete r[o],r[c]=jt(s),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return g.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&g.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
2051
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[ys]=this[ys]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=rt(i);n[c]||(Ah(s,i),n[c]=!0)}return g.isArray(t)?t.forEach(o):o(t),this}};W.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);g.reduceDescriptors(W.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});g.freezeMethods(W);function Rr(e,t){const r=this||bt,n=t||r,s=W.from(n.headers);let o=n.data;return g.forEach(e,function(c){o=c.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function _i(e){return!!(e&&e.__CANCEL__)}function qe(e,t,r){R.call(this,e??"canceled",R.ERR_CANCELED,t,r),this.name="CanceledError"}g.inherits(qe,R,{__CANCEL__:!0});function Oi(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new R("Request failed with status code "+r.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Kh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function _h(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(a){const l=Date.now(),u=n[o];i||(i=l),r[s]=a,n[s]=l;let h=o,m=0;for(;h!==s;)m+=r[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const y=u&&l-u;return y?Math.round(m*1e3/y):void 0}}function Oh(e,t){let r=0,n=1e3/t,s,o;const i=(l,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const u=Date.now(),h=u-r;h>=n?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},n-h)))},()=>s&&i(s)]}const Xt=(e,t,r=3)=>{let n=0;const s=_h(50,250);return Oh(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,a=i-n,l=s(a),u=i<=c;n=i;const h={loaded:i,total:c,progress:c?i/c:void 0,bytes:a,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},ms=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},gs=e=>(...t)=>g.asap(()=>e(...t)),Rh=V.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,V.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(V.origin),V.navigator&&/(msie|trident)/i.test(V.navigator.userAgent)):()=>!0,Ch=V.hasStandardBrowserEnv?{write(e,t,r,n,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];g.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),g.isString(n)&&c.push(`path=${n}`),g.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),g.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ph(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ih(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ri(e,t,r){let n=!Ph(t);return e&&(n||r==!1)?Ih(e,t):t}const ws=e=>e instanceof W?{...e}:e;function Re(e,t){t=t||{};const r={};function n(l,u,h,m){return g.isPlainObject(l)&&g.isPlainObject(u)?g.merge.call({caseless:m},l,u):g.isPlainObject(u)?g.merge({},u):g.isArray(u)?u.slice():u}function s(l,u,h,m){if(g.isUndefined(u)){if(!g.isUndefined(l))return n(void 0,l,h,m)}else return n(l,u,h,m)}function o(l,u){if(!g.isUndefined(u))return n(void 0,u)}function i(l,u){if(g.isUndefined(u)){if(!g.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function c(l,u,h){if(h in t)return n(l,u);if(h in e)return n(void 0,l)}const a={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u,h)=>s(ws(l),ws(u),h,!0)};return g.forEach(Object.keys({...e,...t}),function(u){const h=a[u]||s,m=h(e[u],t[u],u);g.isUndefined(m)&&h!==c||(r[u]=m)}),r}const Ci=e=>{const t=Re({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=W.from(i),t.url=Ti(Ri(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),g.isFormData(r)){if(V.hasStandardBrowserEnv||V.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(g.isFunction(r.getHeaders)){const a=r.getHeaders(),l=["content-type","content-length"];Object.entries(a).forEach(([u,h])=>{l.includes(u.toLowerCase())&&i.set(u,h)})}}if(V.hasStandardBrowserEnv&&(n&&g.isFunction(n)&&(n=n(t)),n||n!==!1&&Rh(t.url))){const a=s&&o&&Ch.read(o);a&&i.set(s,a)}return t},jh=typeof XMLHttpRequest<"u",Fh=jh&&function(e){return new Promise(function(r,n){const s=Ci(e);let o=s.data;const i=W.from(s.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:l}=s,u,h,m,y,p;function f(){y&&y(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(s.method.toUpperCase(),s.url,!0),d.timeout=s.timeout;function w(){if(!d)return;const E=W.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),k={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:E,config:e,request:d};Oi(function(v){r(v),f()},function(v){n(v),f()},k),d=null}"onloadend"in d?d.onloadend=w:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(w)},d.onabort=function(){d&&(n(new R("Request aborted",R.ECONNABORTED,e,d)),d=null)},d.onerror=function(x){const k=x&&x.message?x.message:"Network Error",S=new R(k,R.ERR_NETWORK,e,d);S.event=x||null,n(S),d=null},d.ontimeout=function(){let x=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const k=s.transitional||Ai;s.timeoutErrorMessage&&(x=s.timeoutErrorMessage),n(new R(x,k.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,d)),d=null},o===void 0&&i.setContentType(null),"setRequestHeader"in d&&g.forEach(i.toJSON(),function(x,k){d.setRequestHeader(k,x)}),g.isUndefined(s.withCredentials)||(d.withCredentials=!!s.withCredentials),c&&c!=="json"&&(d.responseType=s.responseType),l&&([m,p]=Xt(l,!0),d.addEventListener("progress",m)),a&&d.upload&&([h,y]=Xt(a),d.upload.addEventListener("progress",h),d.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(u=E=>{d&&(n(!E||E.type?new qe(null,e,d):E),d.abort(),d=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const b=Kh(s.url);if(b&&V.protocols.indexOf(b)===-1){n(new R("Unsupported protocol "+b+":",R.ERR_BAD_REQUEST,e));return}d.send(o||null)})},Bh=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;n.abort(u instanceof R?u:new qe(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new R(`timeout ${t} of ms exceeded`,R.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>g.asap(c),a}},Nh=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Lh=async function*(e,t){for await(const r of Mh(e))yield*Nh(r,t)},Mh=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},bs=(e,t,r,n)=>{const s=Lh(e,t);let o=0,i,c=a=>{i||(i=!0,n&&n(a))};return new ReadableStream({async pull(a){try{const{done:l,value:u}=await s.next();if(l){c(),a.close();return}let h=u.byteLength;if(r){let m=o+=h;r(m)}a.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(a){return c(a),s.return()}},{highWaterMark:2})},Es=64*1024,{isFunction:Kt}=g,Uh=(({Request:e,Response:t})=>({Request:e,Response:t}))(g.global),{ReadableStream:xs,TextEncoder:ks}=g.global,vs=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dh=e=>{e=g.merge.call({skipUndefined:!0},Uh,e);const{fetch:t,Request:r,Response:n}=e,s=t?Kt(t):typeof fetch=="function",o=Kt(r),i=Kt(n);if(!s)return!1;const c=s&&Kt(xs),a=s&&(typeof ks=="function"?(p=>f=>p.encode(f))(new ks):async p=>new Uint8Array(await new r(p).arrayBuffer())),l=o&&c&&vs(()=>{let p=!1;const f=new r(V.origin,{body:new xs,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!f}),u=i&&c&&vs(()=>g.isReadableStream(new n("").body)),h={stream:u&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(f,d)=>{let w=f&&f[p];if(w)return w.call(f);throw new R(`Response type '${p}' is not supported`,R.ERR_NOT_SUPPORT,d)})});const m=async p=>{if(p==null)return 0;if(g.isBlob(p))return p.size;if(g.isSpecCompliantForm(p))return(await new r(V.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(g.isArrayBufferView(p)||g.isArrayBuffer(p))return p.byteLength;if(g.isURLSearchParams(p)&&(p=p+""),g.isString(p))return(await a(p)).byteLength},y=async(p,f)=>{const d=g.toFiniteNumber(p.getContentLength());return d??m(f)};return async p=>{let{url:f,method:d,data:w,signal:b,cancelToken:E,timeout:x,onDownloadProgress:k,onUploadProgress:S,responseType:v,headers:T,withCredentials:K="same-origin",fetchOptions:C}=Ci(p),O=t||fetch;v=v?(v+"").toLowerCase():"text";let P=Bh([b,E&&E.toAbortSignal()],x),F=null;const I=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let B;try{if(S&&l&&d!=="get"&&d!=="head"&&(B=await y(T,w))!==0){let X=new r(f,{method:"POST",body:w,duplex:"half"}),te;if(g.isFormData(w)&&(te=X.headers.get("content-type"))&&T.setContentType(te),X.body){const[pe,_]=ms(B,Xt(gs(S)));w=bs(X.body,Es,pe,_)}}g.isString(K)||(K=K?"include":"omit");const M=o&&"credentials"in r.prototype,Ie={...C,signal:P,method:d.toUpperCase(),headers:T.normalize().toJSON(),body:w,duplex:"half",credentials:M?K:void 0};F=o&&new r(f,Ie);let Y=await(o?O(F,C):O(f,Ie));const We=u&&(v==="stream"||v==="response");if(u&&(k||We&&I)){const X={};["status","statusText","headers"].forEach(L=>{X[L]=Y[L]});const te=g.toFiniteNumber(Y.headers.get("content-length")),[pe,_]=k&&ms(te,Xt(gs(k),!0))||[];Y=new n(bs(Y.body,Es,pe,()=>{_&&_(),I&&I()}),X)}v=v||"text";let xe=await h[g.findKey(h,v)||"text"](Y,p);return!We&&I&&I(),await new Promise((X,te)=>{Oi(X,te,{data:xe,headers:W.from(Y.headers),status:Y.status,statusText:Y.statusText,config:p,request:F})})}catch(M){throw I&&I(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,p,F),{cause:M.cause||M}):R.from(M,M&&M.code,p,F)}}},Hh=new Map,Pi=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let i=o.length,c=i,a,l,u=Hh;for(;c--;)a=o[c],l=u.get(a),l===void 0&&u.set(a,l=c?new Map:Dh(t)),u=l;return l};Pi();const Mn={http:oh,xhr:Fh,fetch:{get:Pi}};g.forEach(Mn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ss=e=>`- ${e}`,$h=e=>g.isFunction(e)||e===null||e===!1;function zh(e,t){e=g.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let i=0;i<r;i++){n=e[i];let c;if(s=n,!$h(n)&&(s=Mn[(c=String(n)).toLowerCase()],s===void 0))throw new R(`Unknown adapter '${c}'`);if(s&&(g.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=r?i.length>1?`since :
|
|
2052
|
-
`+i.map(Ss).join(`
|
|
2053
|
-
`):" "+Ss(i[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Ii={getAdapter:zh,adapters:Mn};function Cr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qe(null,e)}function Ts(e){return Cr(e),e.headers=W.from(e.headers),e.data=Rr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ii.getAdapter(e.adapter||bt.adapter,e)(e).then(function(n){return Cr(e),n.data=Rr.call(e,e.transformResponse,n),n.headers=W.from(n.headers),n},function(n){return _i(n)||(Cr(e),n&&n.response&&(n.response.data=Rr.call(e,e.transformResponse,n.response),n.response.headers=W.from(n.response.headers))),Promise.reject(n)})}const ji="1.13.1",br={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{br[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const As={};br.transitional=function(t,r,n){function s(o,i){return"[Axios v"+ji+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,c)=>{if(t===!1)throw new R(s(i," has been removed"+(r?" in "+r:"")),R.ERR_DEPRECATED);return r&&!As[i]&&(As[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,c):!0}};br.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Yh(e,t,r){if(typeof e!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=t[o];if(i){const c=e[o],a=c===void 0||i(c,o,e);if(a!==!0)throw new R("option "+o+" must be "+a,R.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}const Ft={assertOptions:Yh,validators:br},ae=Ft.validators;let Ke=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ps,response:new ps}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
2054
|
-
`+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Re(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&Ft.assertOptions(n,{silentJSONParsing:ae.transitional(ae.boolean),forcedJSONParsing:ae.transitional(ae.boolean),clarifyTimeoutError:ae.transitional(ae.boolean)},!1),s!=null&&(g.isFunction(s)?r.paramsSerializer={serialize:s}:Ft.assertOptions(s,{encode:ae.function,serialize:ae.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ft.assertOptions(r,{baseUrl:ae.spelling("baseURL"),withXsrfToken:ae.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&g.merge(o.common,o[r.method]);o&&g.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),r.headers=W.concat(i,o);const c=[];let a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(a=a&&f.synchronous,c.unshift(f.fulfilled,f.rejected))});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let u,h=0,m;if(!a){const p=[Ts.bind(this),void 0];for(p.unshift(...c),p.push(...l),m=p.length,u=Promise.resolve(r);h<m;)u=u.then(p[h++],p[h++]);return u}m=c.length;let y=r;for(;h<m;){const p=c[h++],f=c[h++];try{y=p(y)}catch(d){f.call(this,d);break}}try{u=Ts.call(this,y)}catch(p){return Promise.reject(p)}for(h=0,m=l.length;h<m;)u=u.then(l[h++],l[h++]);return u}getUri(t){t=Re(this.defaults,t);const r=Ri(t.baseURL,t.url,t.allowAbsoluteUrls);return Ti(r,t.params,t.paramsSerializer)}};g.forEach(["delete","get","head","options"],function(t){Ke.prototype[t]=function(r,n){return this.request(Re(n||{},{method:t,url:r,data:(n||{}).data}))}});g.forEach(["post","put","patch"],function(t){function r(n){return function(o,i,c){return this.request(Re(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Ke.prototype[t]=r(),Ke.prototype[t+"Form"]=r(!0)});let Vh=class Fi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{n.subscribe(c),o=c}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,c){n.reason||(n.reason=new qe(o,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Fi(function(s){t=s}),cancel:t}}};function Jh(e){return function(r){return e.apply(null,r)}}function Gh(e){return g.isObject(e)&&e.isAxiosError===!0}const Zr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Zr).forEach(([e,t])=>{Zr[t]=e});function Bi(e){const t=new Ke(e),r=di(Ke.prototype.request,t);return g.extend(r,Ke.prototype,t,{allOwnKeys:!0}),g.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Bi(Re(e,s))},r}const j=Bi(bt);j.Axios=Ke;j.CanceledError=qe;j.CancelToken=Vh;j.isCancel=_i;j.VERSION=ji;j.toFormData=wr;j.AxiosError=R;j.Cancel=j.CanceledError;j.all=function(t){return Promise.all(t)};j.spread=Jh;j.isAxiosError=Gh;j.mergeConfig=Re;j.AxiosHeaders=W;j.formToJSON=e=>Ki(g.isHTMLForm(e)?new FormData(e):e);j.getAdapter=Ii.getAdapter;j.HttpStatusCode=Zr;j.default=j;const{Axios:af,AxiosError:lf,CanceledError:uf,isCancel:hf,CancelToken:ff,VERSION:df,all:pf,Cancel:yf,isAxiosError:mf,spread:gf,toFormData:wf,AxiosHeaders:bf,HttpStatusCode:Ef,formToJSON:xf,getAdapter:kf,mergeConfig:vf}=j;class Ni{constructor(t){this.baseUrl=t}normalizeError(t){let r;throw t.response?.status===401?r="Unauthorized: Invalid or expired token":t.response?.status===403?r="Forbidden: Insufficient permissions":t.response?.status===404?r="Keystore not found for the specified user":r="AxiosError:"+(t.message??"Unknown error"),new Error(r)}async sendEncryptedKeystoreToServer(t,r){try{return await j.post(this.baseUrl+`${r}`,{encryptedKeystore:t},{withCredentials:!0,headers:{"Content-Type":"application/json"}})}catch(n){throw j.isAxiosError(n)&&this.normalizeError(n),new Error("Failed to send keystore",{cause:n})}}async requestEncryptedKeystore(t,r){try{const n=`/downloadKeystore/${t}/${r.toString()}`;return(await j.get(this.baseUrl+`${n}`,{withCredentials:!0,headers:{"Content-Type":"application/json"}})).data}catch(n){throw j.isAxiosError(n)&&this.normalizeError(n),new Error("Failed to retrive keystore",{cause:n})}}async uploadKeystoreToServer(t){try{const r=Gt(),n=t.type,s=`/uploadKeystore/${r}/${n}`,o=Ys(t);return await this.sendEncryptedKeystoreToServer(o,s)}catch(r){throw new Error("Failed to upload keystore to the server",{cause:r})}}async getEncryptionKeystoreFromServer(){return this.getKeystoreFromServer(Q.ENCRYPTION)}async getIdentityKeystoreFromServer(){return this.getKeystoreFromServer(Q.IDENTITY)}async getRecoveryKeystoreFromServer(){return this.getKeystoreFromServer(Q.RECOVERY)}async getIndexKeystoreFromServer(){return this.getKeystoreFromServer(Q.INDEX)}async getKeystoreFromServer(t){try{const r=Gt(),n=await this.requestEncryptedKeystore(r,t);return Js(n)}catch(r){throw new Error("Failed to retrieve keystore from the server",{cause:r})}}async getRecipientsPublicKeysFromServer(t){try{return(await j.get("/api/getPublicKeys",{params:{emails:t},withCredentials:!0,headers:{"Content-Type":"application/json"}})).data}catch(r){throw j.isAxiosError(r)&&this.normalizeError(r),new Error("Failed to retrieve public keys",{cause:r})}}async getRecipientsPublicKeys(t){try{const r=await this.getRecipientsPublicKeysFromServer(t),n=[];for(const s of r){const o=await Xs(s);n.push(o)}return n}catch(r){throw new Error("Failed to get recipients public keys",{cause:r})}}}function Xh(e){return new Ni(e)}const qh=Object.freeze(Object.defineProperty({__proto__:null,KeyServiceAPI:Ni,getKeyServiceAPI:Xh},Symbol.toStringTag,{value:"Module"}));function Wh(e){return localStorage.getItem(e)}function Zh(e,t){return localStorage.setItem(e,t)}function Qh(e){localStorage.removeItem(e)}function ef(e){return!!localStorage.getItem(e)}function tf(){localStorage.clear()}const rf={set:Zh,get:Wh,removeItem:Qh,exists:ef,clear:tf},nf=Object.freeze(Object.defineProperty({__proto__:null,default:rf},Symbol.toStringTag,{value:"Module"})),sf=Object.freeze(Object.defineProperty({__proto__:null,localStorageService:nf,sessionStorageService:du},Symbol.toStringTag,{value:"Module"}));exports.AES_ALGORITHM=ze;exports.AES_KEY_BIT_LENGTH=G;exports.ARGON2ID_ITERATIONS=Ns;exports.ARGON2ID_MEMORY_SIZE=Ls;exports.ARGON2ID_OUTPUT_BYTE_LENGTH=Us;exports.ARGON2ID_PARALLELISM=Bs;exports.ARGON2ID_SALT_BYTE_LENGTH=Ms;exports.AUX_LEN=Ks;exports.CONTEXT_DERIVE=js;exports.CONTEXT_ENC_KEYSTORE=Cs;exports.CONTEXT_INDEX=Is;exports.CONTEXT_LOGIN=Rs;exports.CONTEXT_RATCHET=Pr;exports.CONTEXT_RECOVERY=Ps;exports.CONTEXT_WRAPPING=Os;exports.DB_LABEL=ee;exports.DB_VERSION=Hs;exports.ECC_ALGORITHM=ft;exports.ENCRYPTION_KEYSTORE_TAG=en;exports.HASH_BIT_LEN=dt;exports.IDENTITY_KEYSTORE_TAG=Qr;exports.INDEX_KEYSTORE_TAG=Di;exports.IV_LEN_BYTES=_s;exports.KEY_FORMAT=Ye;exports.KEY_WRAPPING_ALGORITHM=Wt;exports.KYBER1024_PUBLIC_KEY_LENGTH=Vi;exports.KYBER1024_SECRET_KEY_LENGTH=Ji;exports.KYBER512_PUBLIC_KEY_LENGTH=Hi;exports.KYBER512_SECRET_KEY_LENGTH=$i;exports.KYBER768_PUBLIC_KEY_LENGTH=zi;exports.KYBER768_SECRET_KEY_LENGTH=Yi;exports.KYBER_SEED_LENGTH=Gi;exports.KeystoreType=Q;exports.MAX_CACHE_SIZE=Ds;exports.MAX_EMAIL_PER_BATCH=Ir;exports.PREFIX_IDENTITY_KEY_COMMITMENT=Ui;exports.PREFIX_MEDIA_KEY_COMMITMENT=Fs;exports.PREFIX_PUBLIC_KEY_COMMITMENT=Mi;exports.RECOVERY_KEYSTORE_TAG=tn;exports.asymmetric=Xi;exports.deriveKey=aa;exports.emailCrypto=Ga;exports.emailSearch=Vl;exports.emailService=cu;exports.hash=Lc;exports.keyWrapper=Fa;exports.keystoreCrypto=bu;exports.keystoreService=qh;exports.pq=ja;exports.storage=sf;exports.symmetric=ra;exports.utils=Ic;
|
|
2055
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
const require_constants = require('./constants-Ccp21E03.js');
|
|
2
|
+
const require_asymmetric_crypto = require('./asymmetric-crypto-BORmLhnx.js');
|
|
3
|
+
const require_utils = require('./utils-CNs3cyDj.js');
|
|
4
|
+
const require_hash = require('./hash-BoqwNkcd.js');
|
|
5
|
+
const require_symmetric_crypto = require('./symmetric-crypto-D65zB396.js');
|
|
6
|
+
const require_derive_key = require('./derive-key-CBf2WxJd.js');
|
|
7
|
+
const require_post_quantum_crypto = require('./post-quantum-crypto-CAi-cEkV.js');
|
|
8
|
+
const require_email_crypto = require('./email-crypto-BrT98taw.js');
|
|
9
|
+
const require_email_search = require('./email-search.js');
|
|
10
|
+
const require_types = require('./types-52g887Zi.js');
|
|
11
|
+
const require_keystore_crypto = require('./keystore-crypto-B4yCVo9l.js');
|
|
12
|
+
const require_keystore_service = require('./keystore-service.js');
|
|
13
|
+
const require_storage_service = require('./storage-service-BgIK2aYZ.js');
|
|
14
|
+
|
|
15
|
+
exports.AES_ALGORITHM = require_constants.AES_ALGORITHM;
|
|
16
|
+
exports.AES_KEY_BIT_LENGTH = require_constants.AES_KEY_BIT_LENGTH;
|
|
17
|
+
exports.ARGON2ID_ITERATIONS = require_constants.ARGON2ID_ITERATIONS;
|
|
18
|
+
exports.ARGON2ID_MEMORY_SIZE = require_constants.ARGON2ID_MEMORY_SIZE;
|
|
19
|
+
exports.ARGON2ID_OUTPUT_BYTE_LENGTH = require_constants.ARGON2ID_OUTPUT_BYTE_LENGTH;
|
|
20
|
+
exports.ARGON2ID_PARALLELISM = require_constants.ARGON2ID_PARALLELISM;
|
|
21
|
+
exports.ARGON2ID_SALT_BYTE_LENGTH = require_constants.ARGON2ID_SALT_BYTE_LENGTH;
|
|
22
|
+
exports.AUX_BYTE_LEN = require_constants.AUX_BYTE_LEN;
|
|
23
|
+
exports.CONTEXT_DERIVE = require_constants.CONTEXT_DERIVE;
|
|
24
|
+
exports.CONTEXT_ENC_KEYSTORE = require_constants.CONTEXT_ENC_KEYSTORE;
|
|
25
|
+
exports.CONTEXT_INDEX = require_constants.CONTEXT_INDEX;
|
|
26
|
+
exports.CONTEXT_RECOVERY = require_constants.CONTEXT_RECOVERY;
|
|
27
|
+
exports.CONTEXT_WRAPPING = require_constants.CONTEXT_WRAPPING;
|
|
28
|
+
exports.DB_LABEL = require_constants.DB_LABEL;
|
|
29
|
+
exports.DB_VERSION = require_constants.DB_VERSION;
|
|
30
|
+
exports.ECC_ALGORITHM = require_constants.ECC_ALGORITHM;
|
|
31
|
+
exports.HASH_BIT_LEN = require_constants.HASH_BIT_LEN;
|
|
32
|
+
exports.IV_LEN_BYTES = require_constants.IV_LEN_BYTES;
|
|
33
|
+
exports.KEY_FORMAT = require_constants.KEY_FORMAT;
|
|
34
|
+
exports.KEY_WRAPPING_ALGORITHM = require_constants.KEY_WRAPPING_ALGORITHM;
|
|
35
|
+
exports.KYBER1024_PUBLIC_KEY_LENGTH = require_constants.KYBER1024_PUBLIC_KEY_LENGTH;
|
|
36
|
+
exports.KYBER1024_SECRET_KEY_LENGTH = require_constants.KYBER1024_SECRET_KEY_LENGTH;
|
|
37
|
+
exports.KYBER512_PUBLIC_KEY_LENGTH = require_constants.KYBER512_PUBLIC_KEY_LENGTH;
|
|
38
|
+
exports.KYBER512_SECRET_KEY_LENGTH = require_constants.KYBER512_SECRET_KEY_LENGTH;
|
|
39
|
+
exports.KYBER768_PUBLIC_KEY_LENGTH = require_constants.KYBER768_PUBLIC_KEY_LENGTH;
|
|
40
|
+
exports.KYBER768_SECRET_KEY_LENGTH = require_constants.KYBER768_SECRET_KEY_LENGTH;
|
|
41
|
+
exports.KYBER_SEED_LENGTH = require_constants.KYBER_SEED_LENGTH;
|
|
42
|
+
exports.KeystoreType = require_types.KeystoreType;
|
|
43
|
+
exports.MAX_CACHE_SIZE = require_constants.MAX_CACHE_SIZE;
|
|
44
|
+
exports.MAX_EMAIL_PER_BATCH = require_constants.MAX_EMAIL_PER_BATCH;
|
|
45
|
+
Object.defineProperty(exports, 'asymmetric', {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () {
|
|
48
|
+
return require_asymmetric_crypto.asymmetric_crypto_exports;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, 'deriveKey', {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return require_derive_key.derive_key_exports;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, 'emailCrypto', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return require_email_crypto.email_crypto_exports;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, 'emailSearch', {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () {
|
|
66
|
+
return require_email_search.email_search_exports;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, 'hash', {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () {
|
|
72
|
+
return require_hash.hash_exports;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, 'keyWrapper', {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () {
|
|
78
|
+
return require_email_crypto.key_wrapper_exports;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, 'keystoreCrypto', {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () {
|
|
84
|
+
return require_keystore_crypto.keystore_crypto_exports;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, 'keystoreService', {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return require_keystore_service.keystore_service_exports;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, 'pq', {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () {
|
|
96
|
+
return require_post_quantum_crypto.post_quantum_crypto_exports;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, 'storage', {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () {
|
|
102
|
+
return require_storage_service.storage_service_exports;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, 'symmetric', {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () {
|
|
108
|
+
return require_symmetric_crypto.symmetric_crypto_exports;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, 'utils', {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () {
|
|
114
|
+
return require_utils.utils_exports;
|
|
115
|
+
}
|
|
116
|
+
});
|