diff --git a/CHANGELOG.md b/CHANGELOG.md index fd1a798..96b20b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.0.1] - 2024-09-01 +### Fixed +- Issue where Discord claims can have a null string + ## [2.0.0] - 2024-08-12 ### Added - Discord identity claims diff --git a/dist/doip.core.js b/dist/doip.core.js index 9678ef1..5f24fba 100644 --- a/dist/doip.core.js +++ b/dist/doip.core.js @@ -6155,7 +6155,7 @@ var doip = (function (exports, openpgp$2, fetcher) { homepage: 'https://discord.com' }, profile: { - display: null, + display: 'Unknown username', uri: null, qr: null }, diff --git a/dist/doip.core.min.js b/dist/doip.core.min.js index e74dc69..22a2bd5 100644 --- a/dist/doip.core.min.js +++ b/dist/doip.core.min.js @@ -3,4 +3,4 @@ var doip=function(e,t,r){"use strict";function i(e){var t=Object.create(null);re * hash-wasm (https://www.npmjs.com/package/hash-wasm) * (c) Dani Biro * @license MIT - */function nt(e,t,r,i){return new(r||(r=Promise))((function(o,n){function A(e){try{a(i.next(e))}catch(e){n(e)}}function s(e){try{a(i.throw(e))}catch(e){n(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,s)}a((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class At{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then((()=>new Promise(e))),new Promise((t=>{e=t}))}dispatch(e){return nt(this,void 0,void 0,(function*(){const t=yield this.lock();try{return yield Promise.resolve(e())}finally{t()}}))}}const st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:ue,at=null!==(it=st.Buffer)&&void 0!==it?it:null,ct=st.TextEncoder?new st.TextEncoder:null;function ht(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}function ut(e,t){const r=t.length>>1;for(let i=0;i>>4;e[i++]=r>9?r+lt:r+gt,r=15&t[o],e[i++]=r>9?r+lt:r+gt}return String.fromCharCode.apply(null,e)}const It=null!==at?e=>{if("string"==typeof e){const t=at.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(at.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return ct.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dt=new Uint8Array(256);for(let e=0;e>18&63)+pt.charAt(r>>12&63)+pt.charAt(r>>6&63)+pt.charAt(63&r);o.push(i)}if(1===i){const i=e[r-1],n=pt.charAt(i>>2),A=pt.charAt(i<<4&63);o.push(`${n}${A}`),t&&o.push("==")}else if(2===i){const i=(e[r-2]<<8)+e[r-1],n=pt.charAt(i>>10),A=pt.charAt(i>>4&63),s=pt.charAt(i<<2&63);o.push(`${n}${A}${s}`),t&&o.push("=")}return o.join("")}function wt(e){let t=Math.floor(.75*e.length);const r=e.length;return"="===e[r-1]&&(t-=1,"="===e[r-2]&&(t-=1)),t}function Ct(e){const t=wt(e),r=e.length,i=new Uint8Array(t);let o=0;for(let t=0;t>4,o+=1,i[o]=(15&n)<<4|A>>2,o+=1,i[o]=(3&A)<<6|63&s,o+=1}return i}const Qt=16384,Et=4,mt=new At,yt=new Map;function bt(e,t){return nt(this,void 0,void 0,(function*(){let r=null,i=null,o=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const n=()=>new DataView(r.exports.memory.buffer).getUint32(r.exports.STATE_SIZE,!0),A=mt.dispatch((()=>nt(this,void 0,void 0,(function*(){if(!yt.has(e.name)){const t=Ct(e.data),r=WebAssembly.compile(t);yt.set(e.name,r)}const t=yield yt.get(e.name);r=yield WebAssembly.instantiate(t,{})})))),s=(e=null)=>{o=!0,r.exports.Hash_Init(e)},a=e=>{if(!o)throw new Error("update() called before init()");(e=>{let t=0;for(;t{if(!o)throw new Error("digest() called before init()");return o=!1,r.exports.Hash_Final(n),"binary"===e?i.slice(0,t):ft(c,i,t)},u=e=>"string"==typeof e?e.length!0;break;case"blake2b":case"blake2s":l=(e,t)=>t<=512&&u(e);break;case"blake3":l=(e,t)=>0===t&&u(e);break;case"xxhash64":case"xxhash3":case"xxhash128":l=()=>!1}return yield(()=>nt(this,void 0,void 0,(function*(){r||(yield A);const e=r.exports.Hash_GetBuffer(),t=r.exports.memory.buffer;i=new Uint8Array(t,e,Qt)})))(),{getMemory:()=>i,writeMemory:(e,t=0)=>{i.set(e,t)},getExports:()=>r.exports,setMemorySize:e=>{r.exports.Hash_SetMemorySize(e);const t=r.exports.Hash_GetBuffer(),o=r.exports.memory.buffer;i=new Uint8Array(o,t,e)},init:s,update:a,digest:h,save:()=>{if(!o)throw new Error("save() can only be called after init() and before digest()");const t=r.exports.Hash_GetState(),i=n(),A=r.exports.memory.buffer,s=new Uint8Array(A,t,i),a=new Uint8Array(Et+i);return ut(a,e.hash),a.set(s,Et),a},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const i=r.exports.Hash_GetState(),A=n(),s=Et+A,a=r.exports.memory.buffer;if(t.length!==s)throw new Error(`Bad state length (expected ${s} bytes, got ${t.length})`);if(!function(e,t){if(e.length!==2*t.length)return!1;for(let r=0;r{if(!l(e,o))return s(o),a(e),h("hex",n);const A=It(e);return i.set(A),r.exports.Hash_Calculate(A.length,o,n),ft(c,i,t)},hashLength:t}}))}new At;var Ft={name:"blake2b",data:"AGFzbQEAAAABEQRgAAF/YAJ/fwBgAX8AYAAAAwoJAAECAwECAgABBQQBAQICBg4CfwFBsIsFC38AQYAICwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZ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AkIANwNAIAJCADcDOCACQgA3AzAgAkIANwMoIAJCADcDICACQgA3AxggAkIANwMQIAJCADcDCCACQgA3AwBBACEEA0AgAiAAaiAAQYAJai0AADoAACAAQQFqIQAgBEEBaiIEQf8BcSABSA0ACyACQYABEAELIAJBgAFqJAALEgAgAEEDdkH/P3EgAEEQdhAECwkAQYAJIAAQAQsGAEGAiQELGwAgAUEDdkH/P3EgAUEQdhAEQYAJIAAQARADCwsLAQBBgAgLBPAAAAA=",hash:"656e0f66"};function St(e){return!Number.isInteger(e)||e<8||e>512||e%8!=0?new Error("Invalid variant! Valid values: 8, 16, ..., 512"):null}function kt(e=512,t=null){if(St(e))return Promise.reject(St(e));let r=null,i=e;if(null!==t){if(r=It(t),r.length>64)return Promise.reject(new Error("Max key length is 64 bytes"));o=e,n=r.length,i=o|n<<16}var o,n;const A=e/8;return bt(Ft,A).then((e=>{i>512&&e.writeMemory(r),e.init(i);const t={init:i>512?()=>(e.writeMemory(r),e.init(i),t):()=>(e.init(i),t),update:r=>(e.update(r),t),digest:t=>e.digest(t),save:()=>e.save(),load:r=>(e.load(r),t),blockSize:128,digestSize:A};return t}))}new At;var Ut={name:"argon2",data:"AGFzbQEAAAABKQVgAX8Bf2AAAX9gEH9/f39/f39/f39/f39/f38AYAR/f39/AGACf38AAwYFAAECAwQFBgEBAoCAAgYIAX8BQZCoBAsHQQQGbWVtb3J5AgASSGFzaF9TZXRNZW1vcnlTaXplAAAOSGFzaF9HZXRCdWZmZXIAAQ5IYXNoX0NhbGN1bGF0ZQAECvkyBVgBAn9BACEBAkBBACgCiAgiAiAARg0AAkAgACACayIAQRB2IABBgIB8cSAASWoiAEAAQX9HDQBB/wHADwtBACEBQQBBACkDiAggAEEQdK18NwOICAsgAcALcAECfwJAQQAoAoAIIgANAEEAPwBBEHQiADYCgAhBACgCiAgiAUGAgCBGDQACQEGAgCAgAWsiAEEQdiAAQYCAfHEgAElqIgBAAEF/Rw0AQQAPC0EAQQApA4gIIABBEHStfDcDiAhBACgCgAghAAsgAAvcDgECfiAAIAQpAwAiECAAKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAMIBAgDCkDAIVCIIkiEDcDACAIIBAgCCkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgBCAQIAQpAwCFQiiJIhA3AwAgACAQIAApAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIAwgECAMKQMAhUIwiSIQNwMAIAggECAIKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAEIBAgBCkDAIVCAYk3AwAgASAFKQMAIhAgASkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgDSAQIA0pAwCFQiCJIhA3AwAgCSAQIAkpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAUgECAFKQMAhUIoiSIQNwMAIAEgECABKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACANIBAgDSkDAIVCMIkiEDcDACAJIBAgCSkDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgBSAQIAUpAwCFQgGJNwMAIAIgBikDACIQIAIpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIA4gECAOKQMAhUIgiSIQNwMAIAogECAKKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAGIBAgBikDAIVCKIkiEDcDACACIBAgAikDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgDiAQIA4pAwCFQjCJIhA3AwAgCiAQIAopAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIAYgECAGKQMAhUIBiTcDACADIAcpAwAiECADKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAPIBAgDykDAIVCIIkiEDcDACALIBAgCykDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgByAQIAcpAwCFQiiJIhA3AwAgAyAQIAMpAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIA8gECAPKQMAhUIwiSIQNwMAIAsgECALKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAHIBAgBykDAIVCAYk3AwAgACAFKQMAIhAgACkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgDyAQIA8pAwCFQiCJIhA3AwAgCiAQIAopAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAUgECAFKQMAhUIoiSIQNwMAIAAgECAAKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAPIBAgDykDAIVCMIkiEDcDACAKIBAgCikDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgBSAQIAUpAwCFQgGJNwMAIAEgBikDACIQIAEpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAwgECAMKQMAhUIgiSIQNwMAIAsgECALKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAGIBAgBikDAIVCKIkiEDcDACABIBAgASkDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgDCAQIAwpAwCFQjCJIhA3AwAgCyAQIAspAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIAYgECAGKQMAhUIBiTcDACACIAcpAwAiECACKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACANIBAgDSkDAIVCIIkiEDcDACAIIBAgCCkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgByAQIAcpAwCFQiiJIhA3AwAgAiAQIAIpAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIA0gECANKQMAhUIwiSIQNwMAIAggECAIKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAHIBAgBykDAIVCAYk3AwAgAyAEKQMAIhAgAykDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgDiAQIA4pAwCFQiCJIhA3AwAgCSAQIAkpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAQgECAEKQMAhUIoiSIQNwMAIAMgECADKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAOIBAgDikDAIVCMIkiEDcDACAJIBAgCSkDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgBCAQIAQpAwCFQgGJNwMAC98aAQN/QQAhBEEAIAIpAwAgASkDAIU3A5AIQQAgAikDCCABKQMIhTcDmAhBACACKQMQIAEpAxCFNwOgCEEAIAIpAxggASkDGIU3A6gIQQAgAikDICABKQMghTcDsAhBACACKQMoIAEpAyiFNwO4CEEAIAIpAzAgASkDMIU3A8AIQQAgAikDOCABKQM4hTcDyAhBACACKQNAIAEpA0CFNwPQCEEAIAIpA0ggASkDSIU3A9gIQQAgAikDUCABKQNQhTcD4AhBACACKQNYIAEpA1iFNwPoCEEAIAIpA2AgASkDYIU3A/AIQQAgAikDaCABKQNohTcD+AhBACACKQNwIAEpA3CFNwOACUEAIAIpA3ggASkDeIU3A4gJQQAgAikDgAEgASkDgAGFNwOQCUEAIAIpA4gBIAEpA4gBhTcDmAlBACACKQOQASABKQOQAYU3A6AJQQAgAikDmAEgASkDmAGFNwOoCUEAIAIpA6ABIAEpA6ABhTcDsAlBACACKQOoASABKQOoAYU3A7gJQQAgAikDsAEgASkDsAGFNwPACUEAIAIpA7gBIAEpA7gBhTcDyAlBACACKQPAASABKQPAAYU3A9AJQQAgAikDyAEgASkDyAGFNwPYCUEAIAIpA9ABIAEpA9ABhTcD4AlBACACKQPYASABKQPYAYU3A+gJQQAgAikD4AEgASkD4AGFNwPwCUEAIAIpA+gBIAEpA+gBhTcD+AlBACACKQPwASABKQPwAYU3A4AKQQAgAikD+AEgASkD+AGFNwOICkEAIAIpA4ACIAEpA4AChTcDkApBACACKQOIAiABKQOIAoU3A5gKQQAgAikDkAIgASkDkAKFNwOgCkEAIAIpA5gCIAEpA5gChTcDqApBACACKQOgAiABKQOgAoU3A7AKQQAgAikDq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IgiKcgBXAgHCAYGyIeIARsIAEgAUEAIBsgHq1RIh4bIgogHRsgGWogCiALaiARGyABRSAecmsiHSAXaq0gH0L/////D4MiHyAffkIgiCAdrX5CIIh9IAyCp2pBCnRqQQEQAyADQQFqIQMgCCABQQFqIgFHDQALCyAbQgF8IhsgDVINAAsgFEIBfCIUpyEBIBRCBFINAAsgEEIBfCIQIAdSDQALCyAJQQx0QYB4aiEZQQAoAoAIIQIgBUF/aiIKRQ0CDAELQQBCAzcDoBBBACAEQX9qrTcDkBBBgHghGQsgAiAZaiEdIAhBDHQhCEEAIR4DQCAIIB5BAWoiHmxBgHhqIQRBACEBA0AgHSABaiIDIAMpAwAgAiAEIAFqaikDAIU3AwAgA0EIaiIDIAMpAwAgAiAEIAFBCHJqaikDAIU3AwAgAUEIaiEDIAFBEGohASADQfgHSQ0ACyAeIApHDQALCyACIBlqIR1BeCEBA0AgAiABaiIDQQhqIB0gAWoiBEEIaikDADcDACADQRBqIARBEGopAwA3AwAgA0EYaiAEQRhqKQMANwMAIANBIGogBEEgaikDADcDACABQSBqIgFB+AdJDQALCws=",hash:"7ab14c91"};const Ht=new DataView(new ArrayBuffer(4));function Rt(e){return Ht.setInt32(0,e,!0),new Uint8Array(Ht.buffer)}function Dt(e,t,r){return nt(this,void 0,void 0,(function*(){if(r<=64){const e=yield kt(8*r);return e.update(Rt(r)),e.update(t),e.digest("binary")}const i=Math.ceil(r/32)-2,o=new Uint8Array(r);e.init(),e.update(Rt(r)),e.update(t);let n=e.digest("binary");o.set(n.subarray(0,32),0);for(let t=1;t{if(!e||"object"!=typeof e)throw new Error("Invalid options parameter. It requires an object.");if(void 0===e.hash||"string"!=typeof e.hash)throw new Error("Hash should be specified")})(e);const t=((e,t,r)=>{const i=t.match(/^\$argon2(id|i|d)\$v=([0-9]+)\$((?:[mtp]=[0-9]+,){2}[mtp]=[0-9]+)\$([A-Za-z0-9+/]+)\$([A-Za-z0-9+/]+)$/);if(!i)throw new Error("Invalid hash");const[,o,n,A,s,a]=i;if("19"!==n)throw new Error(`Unsupported version: ${n}`);const c={},h={m:"memorySize",p:"parallelism",t:"iterations"};return A.split(",").forEach((e=>{const[t,r]=e.split("=");c[h[t]]=parseInt(r,10)})),Object.assign(Object.assign({},c),{password:e,secret:r,hashType:o,salt:Ct(s),hashLength:wt(a),outputType:"encoded"})})(e.password,e.hash,e.secret);(e=>{var t;if(!e||"object"!=typeof e)throw new Error("Invalid options parameter. It requires an object.");if(!e.password)throw new Error("Password must be specified");if(e.password=It(e.password),e.password.length<1)throw new Error("Password must be specified");if(!e.salt)throw new Error("Salt must be specified");if(e.salt=It(e.salt),e.salt.length<8)throw new Error("Salt should be at least 8 bytes long");if(e.secret=It(null!==(t=e.secret)&&void 0!==t?t:""),!Number.isInteger(e.iterations)||e.iterations<1)throw new Error("Iterations should be a positive number");if(!Number.isInteger(e.parallelism)||e.parallelism<1)throw new Error("Parallelism should be a positive number");if(!Number.isInteger(e.hashLength)||e.hashLength<4)throw new Error("Hash length should be at least 4 bytes.");if(!Number.isInteger(e.memorySize))throw new Error("Memory size should be specified.");if(e.memorySize<8*e.parallelism)throw new Error("Memory size should be at least 8 * parallelism.");if(void 0===e.outputType&&(e.outputType="hex"),!["hex","binary","encoded"].includes(e.outputType))throw new Error(`Insupported output type ${e.outputType}. Valid values: ['hex', 'binary', 'encoded']`)})(t);const r=e.hash.lastIndexOf("$")+1;return(yield vt(t)).substring(r)===e.hash.substring(r)}))}new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At;var Ot={name:"bcrypt",data:"AGFzbQEAAAABFwRgAAF/YAR/f39/AGADf39/AGABfwF/AwUEAAECAwUEAQECAgYIAX8BQZCrBQsHNAQGbWVtb3J5AgAOSGFzaF9HZXRCdWZmZXIAAAZiY3J5cHQAAg1iY3J5cHRfdmVyaWZ5AAMK+GAEBQBBgCsL3lkEFH8Bfgh/AX4jAEHwAGshBCACQQA6AAIgAkGq4AA7AAACQCABLQAA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gbfwHSzLvjtGt+aqLdRf9ZOkQKNT7VzbS8qM7qcruEZPquEmaNR288v2Pkm9KeXS9UG3fCrnBjTvaNDQ50VxNb53EWcvhdfVOvCMtAQMzitE5qRtI0hK8VASgEsOEdOpiVtJ+4Bkigbs6COz9vgqsgNUsdGgH4J3InsWAVYdw/k+creTq7vSVFNOE5iKBLec5Rt8kyL8m6H6B+yBzg9tHHvMMRAc/HquihSYeQGpq9T9TL3trQONoK1SrDOQNnNpHGfDH5jU8rseC3WZ73Orv1Q/8Z1fKcRdknLCKXvyr85hVx/JEPJRWUm2GT5frrnLbOWWSowtGouhJeB8G2DGoF42VQ0hBCpAPLDm7s4DvbmBa+oJhMZOl4MjKVH5/fktPgKzSg0x7ycYlBdAobjDSjSyBxvsXYMnbDjZ813y4vmZtHbwvmHfHjD1TaTOWR2Noez3lizm9+Ps1msRgWBR0s/cXSj4SZIvv2V/Mj9SN2MqYxNaiTAs3MVmKB8Ky163ValzYWbsxz0oiSYpbe0Em5gRuQUEwUVsZxvcfG5goUejIG0OFFmnvyw/1TqskAD6hi4r8lu/bSvTUFaRJxIgIEsnzPy7YrnHbNwD4RU9PjQBZgvas48K1HJZwgOLp2zkb3xaGvd2BgdSBO/suF2I3oirD5qnp+qvlMXMJIGYyK+wLkasMB+eHr1mn41JCg3lymLSUJP5/mCMIyYU63W+J3zuPfj1fmcsM6iGo/JNMIo4UuihkTRHNwAyI4CaTQMZ8pmPouCIlsTuzmIShFdxPQOM9mVL5sDOk0tymswN1QfMm11YQ/FwlHtdnVFpIb+3mJ",hash:"497b89b2"};const Pt=e=>{if(!e||"object"!=typeof e)throw new Error("Invalid options parameter. It requires an object.");if(void 0===e.hash||"string"!=typeof e.hash)throw new Error("Hash should be specified");if(60!==e.hash.length)throw new Error("Hash should be 60 bytes long");if(t=e.hash,!/^\$2[axyb]\$[0-3][0-9]\$[./A-Za-z0-9]{53}$/.test(t)||"0"===t[4]&&parseInt(t[5],10)<4||"3"===t[4]&&parseInt(t[5],10)>1)throw new Error("Invalid hash");var t;if(e.password=It(e.password),e.password.length<1)throw new Error("Password should be at least 1 byte long");if(e.password.length>72)throw new Error("Password should be at most 72 bytes long")};function Gt(e){return nt(this,void 0,void 0,(function*(){Pt(e);const{hash:t,password:r}=e,i=yield bt(Ot,0);i.writeMemory(It(t),0);const o=It(r);return i.writeMemory(o,60),!!i.getExports().bcrypt_verify(o.length)}))}new At,new At;var qt,Kt=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),xt=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));const Tt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Mt=null!==(qt=String.fromCodePoint)&&void 0!==qt?qt:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var Jt;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(Jt||(Jt={}));var _t,Zt,Lt;function Vt(e){return e>=Jt.ZERO&&e<=Jt.NINE}function Wt(e){return e===Jt.EQUALS||function(e){return e>=Jt.UPPER_A&&e<=Jt.UPPER_Z||e>=Jt.LOWER_A&&e<=Jt.LOWER_Z||Vt(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(_t||(_t={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(Zt||(Zt={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(Lt||(Lt={}));class jt{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=Zt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Lt.Strict}startEntity(e){this.decodeMode=e,this.state=Zt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Zt.EntityStart:return e.charCodeAt(t)===Jt.NUM?(this.state=Zt.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Zt.NamedEntity,this.stateNamedEntity(e,t));case Zt.NumericStart:return this.stateNumericStart(e,t);case Zt.NumericDecimal:return this.stateNumericDecimal(e,t);case Zt.NumericHex:return this.stateNumericHex(e,t);case Zt.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Jt.LOWER_X?(this.state=Zt.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Zt.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,i){if(t!==r){const o=r-t;this.result=this.result*Math.pow(i,o)+parseInt(e.substr(t,o),i),this.consumed+=o}}stateNumericHex(e,t){const r=t;for(;t=Jt.UPPER_A&&i<=Jt.UPPER_F||i>=Jt.LOWER_A&&i<=Jt.LOWER_F)))return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(o,3);t+=1}var i;return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){const r=t;for(;t=55296&&e<=57343||e>1114111?65533:null!==(t=Tt.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Jt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&_t.VALUE_LENGTH)>>14;for(;t>14,0!==o){if(n===Jt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Lt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,i=(r[t]&_t.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,i,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:i}=this;return this.emitCodePoint(1===t?i[e]&~_t.VALUE_LENGTH:i[e+1],r),3===t&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Zt.NamedEntity:return 0===this.result||this.decodeMode===Lt.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case Zt.NumericDecimal:return this.emitNumericEntity(0,2);case Zt.NumericHex:return this.emitNumericEntity(0,3);case Zt.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Zt.EntityStart:return 0}}}function Yt(e){let t="";const r=new jt(e,(e=>t+=Mt(e)));return function(e,i){let o=0,n=0;for(;(n=e.indexOf("&",n))>=0;){t+=e.slice(o,n),r.startEntity(i);const A=r.write(e,n+1);if(A<0){o=n+r.end();break}o=n+A,n=0===A?o+1:o}const A=t+e.slice(o);return t="",A}}function zt(e,t,r,i){const o=(t&_t.BRANCH_LENGTH)>>7,n=t&_t.JUMP_TABLE;if(0===o)return 0!==n&&i===n?r:-1;if(n){const t=i-n;return t<0||t>=o?-1:e[r+t]-1}let A=r,s=A+o-1;for(;A<=s;){const t=A+s>>>1,r=e[t];if(ri))return e[t+o];s=t-1}}return-1}const Xt=Yt(Kt),$t=Yt(xt);function er(e,t=Lt.Legacy){return Xt(e,t)}const tr=async(e,t)=>{const r=Ve(t.target,t.claimFormat),i=Ve(t.target,h.URI);let o=!1;switch(t.proofEncodingFormat){case s.HTML:e=er(e);break;case s.XML:e=$t(e,Lt.Strict)}if(o=-1!==(e=er(e)).replace(/\r?\n|\r/g,"").replace(/\s/g,"").toLowerCase().indexOf(r.toLowerCase()),!o){const t=/\$(argon2(?:id|d|i)|2a|2b|2y)(?:\$[a-zA-Z0-9=+\-,./]+)+/g;let r;for(;!o&&null!=(r=t.exec(e));){let e;const t=new Promise(((t,r)=>{e=setTimeout((()=>{t(!1)}),1e3)}));switch(r[1]){case"2a":case"2b":case"2y":try{if(parseInt(r[0].split("$")[2])>12)continue;const n=Gt({password:i.toLowerCase(),hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}if(!o)try{if(parseInt(r[0].split("$")[2])>12)continue;const n=Gt({password:i,hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}break;case"argon2":case"argon2i":case"argon2d":case"argon2id":try{const n=Nt({password:i.toLowerCase(),hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}if(!o)try{const n=Nt({password:i,hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}}}}if(!o){const t=We(e);for(let e=0;e{}));A&&(200===A.status&&A.headers.get("ariadne-identity-proof")&&(o=-1!==A.headers.get("ariadne-identity-proof").toLowerCase().indexOf(i.toLowerCase())))}}return o},rr=async(e,t,r)=>{if(!e)return!1;if(Array.isArray(e)){let i=!1;for(let o=0;o{const i=`https://${new URL(e.proof.request.uri).hostname}/api/forgejo/v1/version`,n=await o.http.fn({url:i,format:c.JSON},r);return n&&"version"in n}};const br=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;const Fr=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/;const Sr=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;const kr=/^https:\/\/(.*)\/?/;const Ur={postprocess:async(e,t,r)=>{switch(t.result.type){case"Note":{e.profile.uri=t.result.attributedTo,e.profile.display=t.result.attributedTo;const i=await o.activitypub.fn({url:t.result.attributedTo},r).catch((e=>null));i&&(e.profile.display=`@${i.preferredUsername}@${new URL(e.proof.request.uri).hostname}`);break}case"Person":e.profile.display=`@${t.result.preferredUsername}@${new URL(e.proof.request.uri).hostname}`}const i=await Hr(new URL(e.proof.request.uri).hostname);return i&&(e.about.name=i.software.name,e.about.id=i.software.name,e.about.homepage=i.software.homepage),{claimData:e,proofData:t}}},Hr=async e=>{const t=await fetch(`https://${e}/.well-known/nodeinfo`).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).catch((e=>null));if(!t)return null;{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:e.software.homepage||"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}};const Rr=/^https:\/\/(.*)\/u\/(.*)\/?/;const Dr=/^https:\/\/(.*)/;const vr=/^https:\/\/(.*(?:askubuntu|mathoverflow|serverfault|stackapps|stackoverflow|superuser)|.+\.stackexchange)\.com\/users\/(\d+)/,Nr=/\.stackexchange$/;const Or=/^https:\/\/keybase.io\/(.*)\/?/;const Pr=/^https:\/\/opencollective\.com\/(.*)\/?/;const Gr=/^https:\/\/orcid\.org\/(.*)\/?/;const qr=/^https:\/\/pronouns\.cc\/@(.*)\/?/;const Kr=/^https:\/\/(?:discord\.gg|discord\.com\/invite)\/(.+)/;const xr={aspe:Ar,openpgp:hr,dns:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ur);return new Ye({about:{id:"dns",name:"DNS"},profile:{display:t[1],uri:`https://${t[1]}`,qr:null},claim:{uriRegularExpression:ur.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:A.DNS,accessRestriction:a.SERVER,data:{domain:t[1]}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["records","txt"]}]}})},reURI:ur,tests:[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]}),irc:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(lr);return new Ye({about:{id:"irc",name:"IRC"},profile:{display:`${t[1]}/${t[2]}`,uri:e,qr:null},claim:{uriRegularExpression:lr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:A.IRC,accessRestriction:a.SERVER,data:{domain:t[1],nick:t[2]}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:[]}]}})},reURI:lr,tests:[{uri:"irc://chat.ircserver.org/Alice1",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice?param=123",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice_bob",shouldMatch:!0},{uri:"https://chat.ircserver.org/alice",shouldMatch:!1}]}),xmpp:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(gr);return new Ye({about:{id:"xmpp",name:"XMPP",homepage:"https://xmpp.org"},profile:{display:`${t[1]}@${t[2]}`,uri:e,qr:e},claim:{uriRegularExpression:gr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:A.XMPP,accessRestriction:a.SERVER,data:{id:`${t[1]}@${t[2]}`}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:[]}]}})},reURI:gr,tests:[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]}),matrix:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(fr);if(!t[2])return null;const r=new URLSearchParams(t[2]);if(!r.has("org.keyoxide.e")||!r.has("org.keyoxide.r"))return null;const i=`${"!"!==r.get("org.keyoxide.r")[0]?"!":""}${r.get("org.keyoxide.r")}`,o=`${"$"!==r.get("org.keyoxide.e")[0]?"$":""}${r.get("org.keyoxide.e")}`,n=`https://matrix.to/#/@${t[1]}`,l=`https://matrix.to/#/${i}/${o}`;return new Ye({about:{id:"matrix",name:"Matrix",homepage:"https://matrix.org"},profile:{display:`@${t[1]}`,uri:n,qr:null},claim:{uriRegularExpression:fr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:l,fetcher:A.MATRIX,accessRestriction:a.GRANTED,data:{eventId:o,roomId:i}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["content","body"]}]}})},reURI:fr,tests:[{uri:"matrix:u/alice:matrix.domain.org?org.keyoxide.r=123:domain.org&org.keyoxide.e=123",shouldMatch:!0},{uri:"matrix:u/alice:matrix.domain.org",shouldMatch:!0},{uri:"matrix:u/@alice:matrix.domain.org?org.keyoxide.r=!123:domain.org&org.keyoxide.e=$123",shouldMatch:!0},{uri:"xmpp:alice@domain.org",shouldMatch:!1},{uri:"https://domain.org/@alice",shouldMatch:!1}]}),telegram:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ir);return new Ye({about:{id:"telegram",name:"Telegram",homepage:"https://telegram.org"},profile:{display:`@${t[1]}`,uri:`https://t.me/${t[1]}`,qr:`https://t.me/${t[1]}`},claim:{uriRegularExpression:Ir.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://t.me/${t[2]}`,fetcher:A.TELEGRAM,accessRestriction:a.GRANTED,data:{user:t[1],chat:t[2]}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["text"]}]}})},reURI:Ir,tests:[{uri:"https://t.me/alice?proof=foobar",shouldMatch:!0},{uri:"https://t.me/complex_user_1234?proof=complex_chat_1234",shouldMatch:!0},{uri:"https://t.me/foobar",shouldMatch:!1},{uri:"https://t.me/foobar?proof=",shouldMatch:!1},{uri:"https://t.me/?proof=foobar",shouldMatch:!1}]}),twitter:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(pr),r=new URLSearchParams;return r.set("url",t[0]),r.set("omit_script","1"),new Ye({about:{id:"twitter",name:"Twitter",homepage:"https://twitter.com"},profile:{display:`@${t[1]}`,uri:`https://twitter.com/${t[1]}`,qr:null},claim:{uriRegularExpression:pr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://publish.twitter.com/oembed?${r}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["html"]}]}})},reURI:pr,tests:[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]}),reddit:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(dr);return new Ye({about:{id:"reddit",name:"Reddit",homepage:"https://reddit.com"},profile:{display:t[1],uri:`https://www.reddit.com/user/${t[1]}`,qr:null},claim:{uriRegularExpression:dr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://www.reddit.com/user/${t[1]}/comments/${t[2]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["data","children","data","selftext"]}]}})},reURI:dr,tests:[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]}),liberapay:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Br);return new Ye({about:{id:"liberapay",name:"Liberapay",homepage:"https://liberapay.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Br.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://liberapay.com/${t[1]}/public.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["statements","content"]}]}})},reURI:Br,tests:[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),lichess:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(wr);return new Ye({about:{id:"lichess",name:"Lichess",homepage:"https://lichess.org"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:wr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lichess.org/api/user/${t[1]}`,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://lichess.org/api/user/${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.FINGERPRINT,encoding:s.PLAIN,relation:u.CONTAINS,path:["profile","links"]}]}})},reURI:wr,tests:[{uri:"https://lichess.org/@/Alice",shouldMatch:!0},{uri:"https://lichess.org/@/Alice/",shouldMatch:!0},{uri:"https://domain.org/@/Alice",shouldMatch:!1}]}),hackernews:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Cr);return new Ye({about:{id:"hackernews",name:"Hacker News",homepage:"https://news.ycombinator.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Cr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.HTML,relation:u.CONTAINS,path:["about"]}]}})},reURI:Cr,tests:[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]}),lobsters:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Qr);return new Ye({about:{id:"lobsters",name:"Lobsters",homepage:"https://lobste.rs"},profile:{display:t[1],uri:`https://lobste.rs/~${t[1]}`,qr:null},claim:{uriRegularExpression:Qr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lobste.rs/~${t[1]}.json`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://lobste.rs/~${t[1]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["about"]}]}})},reURI:Qr,tests:[{uri:"https://lobste.rs/~Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/~Alice",shouldMatch:!1},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]}),forem:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Er);return new Ye({about:{id:"forem",name:"Forem",homepage:"https://www.forem.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Er.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/api/articles/${t[2]}/${t[3]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["body_markdown"]}]}})},reURI:Er,tests:[{uri:"https://domain.org/alice/post",shouldMatch:!0},{uri:"https://domain.org/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),forgejo:Object.freeze({__proto__:null,functions:yr,processURI:function(e){const t=e.match(mr);return new Ye({about:{id:"forgejo",name:"Forgejo",homepage:"https://forgejo.org"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:mr.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["description"]}]}})},reURI:mr,tests:[{uri:"https://domain.org/alice/forgejo_proof",shouldMatch:!0},{uri:"https://domain.org/alice/forgejo_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),gitea:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(br);return new Ye({about:{id:"gitea",name:"Gitea",homepage:"https://about.gitea.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:br.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["description"]}]}})},reURI:br,tests:[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),gitlab:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Fr);return new Ye({about:{id:"gitlab",name:"GitLab",homepage:"https://about.gitlab.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Fr.toString(),uriIsAmbiguous:!0},proof:{request:{fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://${t[1]}/api/v4/projects/${t[2]}%2Fgitlab_proof`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["description"]}]}})},reURI:Fr,tests:[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]}),github:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Sr);return new Ye({about:{id:"github",name:"GitHub",homepage:"https://github.com"},profile:{display:t[1],uri:`https://github.com/${t[1]}`,qr:null},claim:{uriRegularExpression:Sr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://api.github.com/gists/${t[2]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["files","proof.md","content"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["files","openpgp.md","content"]}]}})},reURI:Sr,tests:[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]}),activitypub:Object.freeze({__proto__:null,functions:Ur,processURI:function(e){return new Ye({about:{id:"activitypub",name:"ActivityPub",homepage:"https://activitypub.rocks"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:kr.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.ACTIVITYPUB,accessRestriction:a.NONE,data:{url:e}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["summary"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["attachment","value"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["content"]}]}})},reURI:kr,tests:[{uri:"https://domain.org",shouldMatch:!0},{uri:"https://domain.org/@/alice/",shouldMatch:!0},{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/123456",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/123456",shouldMatch:!0},{uri:"http://domain.org/alice",shouldMatch:!1}]}),discourse:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Rr);return new Ye({about:{id:"discourse",name:"Discourse",homepage:"https://www.discourse.org"},profile:{display:`${t[2]}@${t[1]}`,uri:e,qr:null},claim:{uriRegularExpression:Rr.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/u/${t[2]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["user","bio_raw"]}]}})},reURI:Rr,tests:[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),owncast:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Dr);return new Ye({about:{id:"owncast",name:"Owncast",homepage:"https://owncast.online"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Dr.toString(),uriIsAmbiguous:!0},proof:{request:{uri:`${e}/api/config`,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`${e}/api/config`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.FINGERPRINT,encoding:s.PLAIN,relation:u.CONTAINS,path:["socialHandles","url"]}]}})},reURI:Dr,tests:[{uri:"https://live.domain.org",shouldMatch:!0},{uri:"https://live.domain.org/",shouldMatch:!0},{uri:"https://domain.org/live",shouldMatch:!0},{uri:"https://domain.org/live/",shouldMatch:!0}]}),stackexchange:Object.freeze({__proto__:null,processURI:function(e){const[,t,r]=e.match(vr),i=t.replace(Nr,"");return new Ye({about:{id:"stackexchange",name:"Stack Exchange",homepage:"https://stackexchange.com"},profile:{display:`${r}@${i}`,uri:e,qr:null},claim:{uriRegularExpression:vr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://${t}.com/users/${r}?tab=profile`,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://api.stackexchange.com/2.3/users/${r}?site=${i}&filter=!AH)b5JqVyImf`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["items","about_me"]}]}})},reURI:vr,tests:[{uri:"https://stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234?tab=topactivity",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice?tab=profile",shouldMatch:!0},{uri:"https://meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://serverfault.com/users/1234",shouldMatch:!0},{uri:"https://meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://gaming.meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://stackexchange.com/users/1234",shouldMatch:!1},{uri:"https://domain.com/users/1234",shouldMatch:!1},{uri:"https://meta.domain.com/users/1234",shouldMatch:!1}]}),keybase:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Or);return new Ye({about:{id:"keybase",name:"keybase",homepage:"https://keybase.io"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Or.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.FINGERPRINT,encoding:s.PLAIN,relation:u.CONTAINS,path:["them","public_keys","primary","key_fingerprint"]}]}})},reURI:Or,tests:[{uri:"https://keybase.io/Alice",shouldMatch:!0},{uri:"https://keybase.io/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]}),opencollective:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Pr);return new Ye({about:{id:"opencollective",name:"Open Collective",homepage:"https://opencollective.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Pr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.GRAPHQL,accessRestriction:a.NOCORS,data:{url:"https://api.opencollective.com/graphql/v2",query:`{ "query": "query { account(slug: \\"${t[1]}\\") { longDescription } }" }`}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["data","account","longDescription"]}]}})},reURI:Pr,tests:[{uri:"https://opencollective.com/Alice",shouldMatch:!0},{uri:"https://opencollective.com/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]}),orcid:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Gr);return new Ye({about:{id:"orcid",name:"ORCiD",homepage:"https://orcid.org/"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Gr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:e,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["person","biography","content"]},{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["person","researcher-urls","researcher-url","url","value"]},{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["person","keywords","keyword","content"]}]}})},reURI:Gr,tests:[{uri:"https://orcid.org/0000-0000-0000-0000",shouldMatch:!0},{uri:"https://orcid.org/0000-0000-0000-0000/",shouldMatch:!0},{uri:"https://domain.org/0000-0000-0000-0000",shouldMatch:!1}]}),pronounscc:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(qr);return new Ye({about:{id:"pronounscc",name:"pronouns.cc",homepage:"https://pronouns.cc"},profile:{display:`@${t[1]}`,uri:`https://pronouns.cc/@${t[1]}`,qr:null},claim:{uriRegularExpression:qr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://pronouns.cc/api/v1/users/${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["links"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["bio"]}]}})},reURI:qr,tests:[{uri:"https://pronouns.cc/@Alice",shouldMatch:!0},{uri:"https://pronouns.cc/@Alice/",shouldMatch:!0},{uri:"https://pronouns.cc/Alice",shouldMatch:!1},{uri:"https://pronouns.cc/Alice/",shouldMatch:!1}]}),discord:Object.freeze({__proto__:null,functions:{postprocess:async(e,t,r)=>(e.profile.display=t.result.inviter.username,{claimData:e,proofData:t})},processURI:function(e){const t=e.match(Kr);return new Ye({about:{id:"discord",name:"Discord",homepage:"https://discord.com"},profile:{display:null,uri:null,qr:null},claim:{uriRegularExpression:Kr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://discord.com/api/v10/invites/${t[1]}`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://discord.com/api/v10/invites/${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["guild","description"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["guild","name"]}]}})},reURI:Kr,tests:[{uri:"https://discord.com/invite/AbCdEf",shouldMatch:!0},{uri:"https://discord.com/invite/AbCdEfGh",shouldMatch:!0},{uri:"https://discord.gg/AbCdEf",shouldMatch:!0},{uri:"https://discord.gg/AbCdEfGh",shouldMatch:!0},{uri:"https://domain.com/invite/AbCdEf",shouldMatch:!1},{uri:"https://domain.gg/AbCdEf",shouldMatch:!1},{uri:"https://discord.com/invite/",shouldMatch:!1},{uri:"https://discord.gg/",shouldMatch:!1}]})},Tr=Object.keys(xr);var Mr=Object.freeze({__proto__:null,data:xr,list:Tr});const Jr={proxy:{hostname:null,policy:n.NEVER},claims:{activitypub:{url:null,privateKey:null},irc:{nick:null},matrix:{instance:null,accessToken:null},telegram:{token:null},xmpp:{service:null,username:null,password:null}}};var _r=Object.freeze({__proto__:null,opts:Jr});class Zr{constructor(e,t){if(e&&!z.isUri(e))throw new Error("Invalid URI");if(t)try{Z.default(t)}catch(e){throw new Error("Invalid fingerprint")}this._uri=e||"",this._fingerprint=t||"",this._status=l.INIT,this._matches=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"claimVersion"in e)switch(e.claimVersion){case 1:if(r=function(e){if(!("claimVersion"in e)||1!==e.claimVersion)return new Error("Invalid claim");const t=new Zr;t._uri=e.uri,t._fingerprint=e.fingerprint,t._matches=e.matches.map((e=>new Ye(e))),"init"===e.status&&(t._status=100);"matched"===e.status&&(0===e.matches.length&&(t._status=301),t._status=101);"result"in e.verification&&"errors"in e.verification||(t._status=400);e.verification.errors.length>0&&(t._status=400);e.verification.result&&e.verification.proof.viaProxy&&(t._status=201);e.verification.result&&!e.verification.proof.viaProxy&&(t._status=200);return t}(e),r instanceof Error)throw r;t=r;break;case 2:if(r=function(e){if(!("claimVersion"in e)||2!==e.claimVersion)return new Error("Invalid claim");const t=new Zr;return t._uri=e.uri,t._fingerprint=e.proofs[0],t._matches=e.matches.map((e=>new Ye(e))),t._status=e.status,t}(e),r instanceof Error)throw r;t=r;break;default:throw new Error("Invalid claim version")}return t}get uri(){return this._uri}get fingerprint(){return this._fingerprint}get status(){return this._status}get matches(){if(this._status===l.INIT)throw new Error("This claim has not yet been matched");return this._matches}set uri(e){if(this._status!==l.INIT)throw new Error("Cannot change the URI, this claim has already been matched");if(e.length>0&&!z.isUri(e))throw new Error("The URI was invalid");e=e.replace(/^\s+|\s+$/g,""),this._uri=e}set fingerprint(e){if(this._status===l.VERIFIED)throw new Error("Cannot change the fingerprint, this claim has already been verified");this._fingerprint=e}set status(e){throw new Error("Cannot change a claim's status")}set matches(e){throw new Error("Cannot change a claim's matches")}match(){if(this._status!==l.INIT)throw new Error("This claim was already matched");if(0===this._uri.length||!z.isUri(this._uri))throw new Error("This claim has no URI");this._matches=[],Tr.every(((e,t)=>{const r=xr[e];if(!r.reURI.test(this._uri))return!0;const i=r.processURI(this._uri);return!i||(i.claim.uriIsAmbiguous?(this._matches.push(i),!0):(this._matches=[i],!1))})),this._status=0===this._matches.length?l.NO_MATCHES:l.MATCHED}async verify(e){if(this._status===l.INIT)throw new Error("This claim has not yet been matched");if(this._status>=200)throw new Error("This claim has already been verified");if(0===this._fingerprint.length)throw new Error("This claim has no fingerprint");e=he(Jr,e||{}),0===this._matches.length&&(this.status=l.NO_MATCHES);for(let t=0;t=200)continue;let r,i=this._matches[t],o=null,n=null;try{n=await ze(i,e)}catch(e){r=e}if(n){o=await ir(n.result,i,this._fingerprint),o.proof={fetcher:n.fetcher,viaProxy:n.viaProxy};const t=xr[i.about.id];if(t.functions?.validate&&o.completed&&o.result)try{o.result=await t.functions.validate(i,n,o,e)}catch(e){}if(t.functions?.postprocess)try{({claimData:i,proofData:n}=await t.functions.postprocess(i,n,e))}catch(e){}}else o=o||{result:!1,completed:!0,proof:null,errors:[r]};this.isAmbiguous()&&!o.result||o.result&&(this._status=o.proof.viaProxy?l.VERIFIED_VIA_PROXY:l.VERIFIED,this._matches=[i])}this._status=this._status>=200?this._status:l.NO_PROOF_FOUND}isAmbiguous(){if(this._status=200&&this._status<300)&&(this._matches.length>1||this._matches[0].claim.uriIsAmbiguous)}toJSON(){let e=this._uri,t=null,r=null,i=null,o=null;return this._status>=l.MATCHED&&this._matches.length>0&&!this.isAmbiguous()&&(e=this._matches[0].profile.display,t=this._matches[0].profile.uri,r=this._matches[0].proof.request.uri,i=this._matches[0].about.name,o=this._matches[0].about.id),{claimVersion:2,uri:this._uri,proofs:[this._fingerprint],matches:this._matches.map((e=>e.toJSON())),status:this._status,display:{profileName:e,profileUrl:t,proofUrl:r,serviceProviderName:i,serviceProviderId:o}}}}class Lr{constructor(e,t){this.identifier=null,this.name=e,this.email=null,this.description=null,this.avatarUrl=null,this.themeColor=null,this.claims=t,this.isRevoked=!1}static fromJSON(e,t){let r,i;if("object"==typeof e&&t){if(2!==t)throw new Error("Invalid persona version");if(i=function(e){const t=e.claims.map((e=>Zr.fromJSON(e))),r=new Lr(e.name,t);return r.identifier=e.identifier,r.email=e.email,r.description=e.description,r.avatarUrl=e.avatarUrl,r.themeColor=e.avatarUrl,r.isRevoked=e.isRevoked,r}(e),i instanceof Error)throw i;r=i}return r}setIdentifier(e){this.identifier=e}setDescription(e){this.description=e}setEmailAddress(e){this.email=e}setAvatarUrl(e){this.avatarUrl=e}addClaim(e){this.claims.push(e)}revoke(){this.isRevoked=!0}toJSON(){return{identifier:this.identifier,name:this.name,email:this.email,description:this.description,avatarUrl:this.avatarUrl,themeColor:this.themeColor,isRevoked:this.isRevoked,claims:this.claims.map((e=>e.toJSON()))}}}class Vr{constructor(e,t,r){this.profileVersion=2,this.profileType=e,this.identifier=t,this.personas=r||[],this.primaryPersonaIndex=r.length>0?0:-1,this.publicKey={keyType:f.NONE,fingerprint:null,encoding:I.NONE,encodedKey:null,key:null,fetch:{method:p.NONE,query:null,resolvedUrl:null}},this.verifiers=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"profileVersion"in e){if(2!==e.profileVersion)throw new Error("Invalid profile version");if(r=function(e){if(!("profileVersion"in e)||2!==e.profileVersion)return new Error("Invalid profile");const t=e.personas.map((e=>Lr.fromJSON(e,2))),r=new Vr(e.profileType,e.identifier,t);return r.primaryPersonaIndex=e.primaryPersonaIndex,r.publicKey=e.publicKey,r.verifiers=e.verifiers,r}(e),r instanceof Error)throw r;t=r}return t}addVerifier(e,t){this.verifiers.push({name:e,url:t})}toJSON(){return{profileVersion:this.profileVersion,profileType:this.profileType,identifier:this.identifier,personas:this.personas.map((e=>e.toJSON())),primaryPersonaIndex:this.primaryPersonaIndex,publicKey:{keyType:this.publicKey.keyType,fingerprint:this.publicKey.fingerprint,encoding:this.publicKey.encoding,encodedKey:this.publicKey.encodedKey,fetch:{method:this.publicKey.fetch.method,query:this.publicKey.fetch.query,resolvedUrl:this.publicKey.fetch.resolvedUrl}},verifiers:this.verifiers}}}function Wr(e,t){return function(){return e.apply(t,arguments)}}const{toString:jr}=Object.prototype,{getPrototypeOf:Yr}=Object,zr=(Xr=Object.create(null),e=>{const t=jr.call(e);return Xr[t]||(Xr[t]=t.slice(8,-1).toLowerCase())});var Xr;const $r=e=>(e=e.toLowerCase(),t=>zr(t)===e),ei=e=>t=>typeof t===e,{isArray:ti}=Array,ri=ei("undefined");const ii=$r("ArrayBuffer");const oi=ei("string"),ni=ei("function"),Ai=ei("number"),si=e=>null!==e&&"object"==typeof e,ai=e=>{if("object"!==zr(e))return!1;const t=Yr(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ci=$r("Date"),hi=$r("File"),ui=$r("Blob"),li=$r("FileList"),gi=$r("URLSearchParams");function fi(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let i,o;if("object"!=typeof e&&(e=[e]),ti(e))for(i=0,o=e.length;i0;)if(i=r[o],t===i.toLowerCase())return i;return null}const pi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:ue,di=e=>!ri(e)&&e!==pi;const Bi=(wi="undefined"!=typeof Uint8Array&&Yr(Uint8Array),e=>wi&&e instanceof wi);var wi;const Ci=$r("HTMLFormElement"),Qi=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ei=$r("RegExp"),mi=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};fi(r,((r,o)=>{let n;!1!==(n=t(r,o,e))&&(i[o]=n||r)})),Object.defineProperties(e,i)},yi="abcdefghijklmnopqrstuvwxyz",bi="0123456789",Fi={DIGIT:bi,ALPHA:yi,ALPHA_DIGIT:yi+yi.toUpperCase()+bi};const Si=$r("AsyncFunction");var ki={isArray:ti,isArrayBuffer:ii,isBuffer:function(e){return null!==e&&!ri(e)&&null!==e.constructor&&!ri(e.constructor)&&ni(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ni(e.append)&&("formdata"===(t=zr(e))||"object"===t&&ni(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ii(e.buffer),t},isString:oi,isNumber:Ai,isBoolean:e=>!0===e||!1===e,isObject:si,isPlainObject:ai,isUndefined:ri,isDate:ci,isFile:hi,isBlob:ui,isRegExp:Ei,isFunction:ni,isStream:e=>si(e)&&ni(e.pipe),isURLSearchParams:gi,isTypedArray:Bi,isFileList:li,forEach:fi,merge:function e(){const{caseless:t}=di(this)&&this||{},r={},i=(i,o)=>{const n=t&&Ii(r,o)||o;ai(r[n])&&ai(i)?r[n]=e(r[n],i):ai(i)?r[n]=e({},i):ti(i)?r[n]=i.slice():r[n]=i};for(let e=0,t=arguments.length;e(fi(t,((t,i)=>{r&&ni(t)?e[i]=Wr(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,i)=>{let o,n,A;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),n=o.length;n-- >0;)A=o[n],i&&!i(A,e,t)||s[A]||(t[A]=e[A],s[A]=!0);e=!1!==r&&Yr(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:zr,kindOfTest:$r,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return-1!==i&&i===r},toArray:e=>{if(!e)return null;if(ti(e))return e;let t=e.length;if(!Ai(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const r=i.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const i=[];for(;null!==(r=e.exec(t));)i.push(r);return i},isHTMLForm:Ci,hasOwnProperty:Qi,hasOwnProp:Qi,reduceDescriptors:mi,freezeMethods:e=>{mi(e,((t,r)=>{if(ni(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const i=e[r];ni(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},i=e=>{e.forEach((e=>{r[e]=!0}))};return ti(e)?i(e):i(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Ii,global:pi,isContextDefined:di,ALPHABET:Fi,generateString:(e=16,t=Fi.ALPHA_DIGIT)=>{let r="";const{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r},isSpecCompliantForm:function(e){return!!(e&&ni(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,i)=>{if(si(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const o=ti(e)?[]:{};return fi(e,((e,t)=>{const n=r(e,i+1);!ri(n)&&(o[t]=n)})),t[i]=void 0,o}}return e};return r(e,0)},isAsyncFn:Si,isThenable:e=>e&&(si(e)||ni(e))&&ni(e.then)&&ni(e.catch)},Ui=[],Hi=[],Ri="undefined"!=typeof Uint8Array?Uint8Array:Array,Di=!1;function vi(){Di=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)Ui[t]=e[t],Hi[e.charCodeAt(t)]=t;Hi["-".charCodeAt(0)]=62,Hi["_".charCodeAt(0)]=63}function Ni(e,t,r){for(var i,o,n=[],A=t;A>18&63]+Ui[o>>12&63]+Ui[o>>6&63]+Ui[63&o]);return n.join("")}function Oi(e){var t;Di||vi();for(var r=e.length,i=r%3,o="",n=[],A=16383,s=0,a=r-i;sa?a:s+A));return 1===i?(t=e[r-1],o+=Ui[t>>2],o+=Ui[t<<4&63],o+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],o+=Ui[t>>10],o+=Ui[t>>4&63],o+=Ui[t<<2&63],o+="="),n.push(o),n.join("")}function Pi(e,t,r,i,o){var n,A,s=8*o-i-1,a=(1<>1,h=-7,u=r?o-1:0,l=r?-1:1,g=e[t+u];for(u+=l,n=g&(1<<-h)-1,g>>=-h,h+=s;h>0;n=256*n+e[t+u],u+=l,h-=8);for(A=n&(1<<-h)-1,n>>=-h,h+=i;h>0;A=256*A+e[t+u],u+=l,h-=8);if(0===n)n=1-c;else{if(n===a)return A?NaN:1/0*(g?-1:1);A+=Math.pow(2,i),n-=c}return(g?-1:1)*A*Math.pow(2,n-i)}function Gi(e,t,r,i,o,n){var A,s,a,c=8*n-o-1,h=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:n-1,f=i?1:-1,I=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,A=h):(A=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-A))<1&&(A--,a*=2),(t+=A+u>=1?l/a:l*Math.pow(2,1-u))*a>=2&&(A++,a/=2),A+u>=h?(s=0,A=h):A+u>=1?(s=(t*a-1)*Math.pow(2,o),A+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,o),A=0));o>=8;e[r+g]=255&s,g+=f,s/=256,o-=8);for(A=A<0;e[r+g]=255&A,g+=f,A/=256,c-=8);e[r+g-f]|=128*I}var qi={}.toString,Ki=Array.isArray||function(e){return"[object Array]"==qi.call(e)};function xi(){return Mi.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ti(e,t){if(xi()=xi())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xi().toString(16)+" bytes");return 0|e}function Wi(e){return!(null==e||!e._isBuffer)}function ji(e,t){if(Wi(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return mo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return yo(e).length;default:if(i)return mo(e).length;t=(""+t).toLowerCase(),i=!0}}function Yi(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return uo(this,t,r);case"utf8":case"utf-8":return so(this,t,r);case"ascii":return co(this,t,r);case"latin1":case"binary":return ho(this,t,r);case"base64":return Ao(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lo(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function zi(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function Xi(e,t,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Mi.from(t,i)),Wi(t))return 0===t.length?-1:$i(e,t,r,i,o);if("number"==typeof t)return t&=255,Mi.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):$i(e,[t],r,i,o);throw new TypeError("val must be string, number or Buffer")}function $i(e,t,r,i,o){var n,A=1,s=e.length,a=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;A=2,s/=2,a/=2,r/=2}function c(e,t){return 1===A?e[t]:e.readUInt16BE(t*A)}if(o){var h=-1;for(n=r;ns&&(r=s-a),n=r;n>=0;n--){for(var u=!0,l=0;lo&&(i=o):i=o;var n=t.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var A=0;A>8,o=r%256,n.push(o),n.push(i);return n}(t,e.length-r),e,r,i)}function Ao(e,t,r){return 0===t&&r===e.length?Oi(e):Oi(e.slice(t,r))}function so(e,t,r){r=Math.min(e.length,r);for(var i=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+u<=r)switch(u){case 1:c<128&&(h=c);break;case 2:128==(192&(n=e[o+1]))&&(a=(31&c)<<6|63&n)>127&&(h=a);break;case 3:n=e[o+1],A=e[o+2],128==(192&n)&&128==(192&A)&&(a=(15&c)<<12|(63&n)<<6|63&A)>2047&&(a<55296||a>57343)&&(h=a);break;case 4:n=e[o+1],A=e[o+2],s=e[o+3],128==(192&n)&&128==(192&A)&&128==(192&s)&&(a=(15&c)<<18|(63&n)<<12|(63&A)<<6|63&s)>65535&&a<1114112&&(h=a)}null===h?(h=65533,u=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),o+=u}return function(e){var t=e.length;if(t<=ao)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Mi.prototype.compare=function(e,t,r,i,o){if(!Wi(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=r)return 0;if(i>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var n=(o>>>=0)-(i>>>=0),A=(r>>>=0)-(t>>>=0),s=Math.min(n,A),a=this.slice(i,o),c=e.slice(t,r),h=0;ho)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var n=!1;;)switch(i){case"hex":return eo(this,e,t,r);case"utf8":case"utf-8":return to(this,e,t,r);case"ascii":return ro(this,e,t,r);case"latin1":case"binary":return io(this,e,t,r);case"base64":return oo(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,e,t,r);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),n=!0}},Mi.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ao=4096;function co(e,t,r){var i="";r=Math.min(e.length,r);for(var o=t;oi)&&(r=i);for(var o="",n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function fo(e,t,r,i,o,n){if(!Wi(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function Io(e,t,r,i){t<0&&(t=65535+t+1);for(var o=0,n=Math.min(e.length-r,2);o>>8*(i?o:1-o)}function po(e,t,r,i){t<0&&(t=4294967295+t+1);for(var o=0,n=Math.min(e.length-r,4);o>>8*(i?o:3-o)&255}function Bo(e,t,r,i,o,n){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function wo(e,t,r,i,o){return o||Bo(e,0,r,4),Gi(e,t,r,i,23,4),r+4}function Co(e,t,r,i,o){return o||Bo(e,0,r,8),Gi(e,t,r,i,52,8),r+8}Mi.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(o*=256);)i+=this[e+--t]*o;return i},Mi.prototype.readUInt8=function(e,t){return t||go(e,1,this.length),this[e]},Mi.prototype.readUInt16LE=function(e,t){return t||go(e,2,this.length),this[e]|this[e+1]<<8},Mi.prototype.readUInt16BE=function(e,t){return t||go(e,2,this.length),this[e]<<8|this[e+1]},Mi.prototype.readUInt32LE=function(e,t){return t||go(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Mi.prototype.readUInt32BE=function(e,t){return t||go(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Mi.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||go(e,t,this.length);for(var i=this[e],o=1,n=0;++n=(o*=128)&&(i-=Math.pow(2,8*t)),i},Mi.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||go(e,t,this.length);for(var i=t,o=1,n=this[e+--i];i>0&&(o*=256);)n+=this[e+--i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},Mi.prototype.readInt8=function(e,t){return t||go(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Mi.prototype.readInt16LE=function(e,t){t||go(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Mi.prototype.readInt16BE=function(e,t){t||go(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Mi.prototype.readInt32LE=function(e,t){return t||go(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Mi.prototype.readInt32BE=function(e,t){return t||go(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Mi.prototype.readFloatLE=function(e,t){return t||go(e,4,this.length),Pi(this,e,!0,23,4)},Mi.prototype.readFloatBE=function(e,t){return t||go(e,4,this.length),Pi(this,e,!1,23,4)},Mi.prototype.readDoubleLE=function(e,t){return t||go(e,8,this.length),Pi(this,e,!0,52,8)},Mi.prototype.readDoubleBE=function(e,t){return t||go(e,8,this.length),Pi(this,e,!1,52,8)},Mi.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||fo(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,n=0;for(this[t]=255&e;++n=0&&(n*=256);)this[t+o]=e/n&255;return t+r},Mi.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,1,255,0),Mi.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Mi.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,65535,0),Mi.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Io(this,e,t,!0),t+2},Mi.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,65535,0),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Io(this,e,t,!1),t+2},Mi.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,4294967295,0),Mi.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):po(this,e,t,!0),t+4},Mi.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,4294967295,0),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):po(this,e,t,!1),t+4},Mi.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*r-1);fo(this,e,t,r,o-1,-o)}var n=0,A=1,s=0;for(this[t]=255&e;++n>0)-s&255;return t+r},Mi.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*r-1);fo(this,e,t,r,o-1,-o)}var n=r-1,A=1,s=0;for(this[t+n]=255&e;--n>=0&&(A*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/A>>0)-s&255;return t+r},Mi.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,1,127,-128),Mi.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Mi.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,32767,-32768),Mi.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Io(this,e,t,!0),t+2},Mi.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,32767,-32768),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Io(this,e,t,!1),t+2},Mi.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,2147483647,-2147483648),Mi.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):po(this,e,t,!0),t+4},Mi.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):po(this,e,t,!1),t+4},Mi.prototype.writeFloatLE=function(e,t,r){return wo(this,e,t,!0,r)},Mi.prototype.writeFloatBE=function(e,t,r){return wo(this,e,t,!1,r)},Mi.prototype.writeDoubleLE=function(e,t,r){return Co(this,e,t,!0,r)},Mi.prototype.writeDoubleBE=function(e,t,r){return Co(this,e,t,!1,r)},Mi.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(n<1e3||!Mi.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(A+1===i){(t-=3)>-1&&n.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&n.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&n.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;n.push(r)}else if(r<2048){if((t-=2)<0)break;n.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;n.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return n}function yo(e){return function(e){var t,r,i,o,n,A;Di||vi();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");n="="===e[s-2]?2:"="===e[s-1]?1:0,A=new Ri(3*s/4-n),i=n>0?s-4:s;var a=0;for(t=0,r=0;t>16&255,A[a++]=o>>8&255,A[a++]=255&o;return 2===n?(o=Hi[e.charCodeAt(t)]<<2|Hi[e.charCodeAt(t+1)]>>4,A[a++]=255&o):1===n&&(o=Hi[e.charCodeAt(t)]<<10|Hi[e.charCodeAt(t+1)]<<4|Hi[e.charCodeAt(t+2)]>>2,A[a++]=o>>8&255,A[a++]=255&o),A}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Qo,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function bo(e,t,r,i){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Fo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function So(e,t,r,i,o){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),i&&(this.request=i),o&&(this.response=o)}ki.inherits(So,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:ki.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ko=So.prototype,Uo={};["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=>{Uo[e]={value:e}})),Object.defineProperties(So,Uo),Object.defineProperty(ko,"isAxiosError",{value:!0}),So.from=(e,t,r,i,o,n)=>{const A=Object.create(ko);return ki.toFlatObject(e,A,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),So.call(A,e.message,t,r,i,o),A.cause=e,A.name=e.name,n&&Object.assign(A,n),A};function Ho(e){return ki.isPlainObject(e)||ki.isArray(e)}function Ro(e){return ki.endsWith(e,"[]")?e.slice(0,-2):e}function Do(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ro(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const vo=ki.toFlatObject(ki,{},null,(function(e){return/^is[A-Z]/.test(e)}));function No(e,t,r){if(!ki.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(r=ki.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ki.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,n=r.dots,A=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ki.isSpecCompliantForm(t);if(!ki.isFunction(o))throw new TypeError("visitor must be a function");function a(e){if(null===e)return"";if(ki.isDate(e))return e.toISOString();if(!s&&ki.isBlob(e))throw new So("Blob is not supported. Use a Buffer instead.");return ki.isArrayBuffer(e)||ki.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Mi.from(e):e}function c(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(ki.endsWith(r,"{}"))r=i?r:r.slice(0,-2),e=JSON.stringify(e);else if(ki.isArray(e)&&function(e){return ki.isArray(e)&&!e.some(Ho)}(e)||(ki.isFileList(e)||ki.endsWith(r,"[]"))&&(s=ki.toArray(e)))return r=Ro(r),s.forEach((function(e,i){!ki.isUndefined(e)&&null!==e&&t.append(!0===A?Do([r],i,n):null===A?r:r+"[]",a(e))})),!1;return!!Ho(e)||(t.append(Do(o,r,n),a(e)),!1)}const h=[],u=Object.assign(vo,{defaultVisitor:c,convertValue:a,isVisitable:Ho});if(!ki.isObject(e))throw new TypeError("data must be an object");return function e(r,i){if(!ki.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+i.join("."));h.push(r),ki.forEach(r,(function(r,n){!0===(!(ki.isUndefined(r)||null===r)&&o.call(t,r,ki.isString(n)?n.trim():n,i,u))&&e(r,i?i.concat(n):[n])})),h.pop()}}(e),t}function Oo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Po(e,t){this._pairs=[],e&&No(e,this,t)}const Go=Po.prototype;function qo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ko(e,t,r){if(!t)return e;const i=r&&r.encode||qo,o=r&&r.serialize;let n;if(n=o?o(t,r):ki.isURLSearchParams(t)?t.toString():new Po(t,r).toString(i),n){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}Go.append=function(e,t){this._pairs.push([e,t])},Go.toString=function(e){const t=e?function(t){return e.call(this,t,Oo)}:Oo;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var xo=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ki.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},To={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Po,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Jo="undefined"!=typeof window&&"undefined"!=typeof document,_o=(Zo="undefined"!=typeof navigator&&navigator.product,Jo&&["ReactNative","NativeScript","NS"].indexOf(Zo)<0);var Zo;const Lo="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var Vo={...Object.freeze({__proto__:null,hasBrowserEnv:Jo,hasStandardBrowserEnv:_o,hasStandardBrowserWebWorkerEnv:Lo}),...Mo};function Wo(e){function t(e,r,i,o){let n=e[o++];if("__proto__"===n)return!0;const A=Number.isFinite(+n),s=o>=e.length;if(n=!n&&ki.isArray(i)?i.length:n,s)return ki.hasOwnProp(i,n)?i[n]=[i[n],r]:i[n]=r,!A;i[n]&&ki.isObject(i[n])||(i[n]=[]);return t(e,r,i[n],o)&&ki.isArray(i[n])&&(i[n]=function(e){const t={},r=Object.keys(e);let i;const o=r.length;let n;for(i=0;i{t(function(e){return ki.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,r,0)})),r}return null}const jo={transitional:To,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=ki.isObject(e);o&&ki.isHTMLForm(e)&&(e=new FormData(e));if(ki.isFormData(e))return i&&i?JSON.stringify(Wo(e)):e;if(ki.isArrayBuffer(e)||ki.isBuffer(e)||ki.isStream(e)||ki.isFile(e)||ki.isBlob(e))return e;if(ki.isArrayBufferView(e))return e.buffer;if(ki.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return No(e,new Vo.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,i){return Vo.isNode&&ki.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=ki.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return No(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(ki.isString(e))try{return(t||JSON.parse)(e),ki.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||jo.transitional,r=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&ki.isString(e)&&(r&&!this.responseType||i)){const r=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw So.from(e,So.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vo.classes.FormData,Blob:Vo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ki.forEach(["delete","get","head","post","put","patch"],(e=>{jo.headers[e]={}}));var Yo=jo;const zo=ki.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"]);const Xo=Symbol("internals");function $o(e){return e&&String(e).trim().toLowerCase()}function en(e){return!1===e||null==e?e:ki.isArray(e)?e.map(en):String(e)}function tn(e,t,r,i,o){return ki.isFunction(i)?i.call(this,t,r):(o&&(t=r),ki.isString(t)?ki.isString(i)?-1!==t.indexOf(i):ki.isRegExp(i)?i.test(t):void 0:void 0)}class rn{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(e,t,r){const o=$o(t);if(!o)throw new Error("header name must be a non-empty string");const n=ki.findKey(i,o);(!n||void 0===i[n]||!0===r||void 0===r&&!1!==i[n])&&(i[n||t]=en(e))}const n=(e,t)=>ki.forEach(e,((e,r)=>o(e,r,t)));return ki.isPlainObject(e)||e instanceof this.constructor?n(e,t):ki.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?n((e=>{const t={};let r,i,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),i=e.substring(o+1).trim(),!r||t[r]&&zo[r]||("set-cookie"===r?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=$o(e)){const r=ki.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}(e);if(ki.isFunction(t))return t.call(this,e,r);if(ki.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$o(e)){const r=ki.findKey(this,e);return!(!r||void 0===this[r]||t&&!tn(0,this[r],r,t))}return!1}delete(e,t){const r=this;let i=!1;function o(e){if(e=$o(e)){const o=ki.findKey(r,e);!o||t&&!tn(0,r[o],o,t)||(delete r[o],i=!0)}}return ki.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];e&&!tn(0,this[o],o,e,!0)||(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return ki.forEach(this,((i,o)=>{const n=ki.findKey(r,o);if(n)return t[n]=en(i),void delete t[o];const A=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();A!==o&&delete t[o],t[A]=en(i),r[A]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ki.forEach(this,((r,i)=>{null!=r&&!1!==r&&(t[i]=e&&ki.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Xo]=this[Xo]={accessors:{}}).accessors,r=this.prototype;function i(e){const i=$o(e);t[i]||(!function(e,t){const r=ki.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+r,{value:function(e,r,o){return this[i].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[i]=!0)}return ki.isArray(e)?e.forEach(i):i(e),this}}rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ki.reduceDescriptors(rn.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),ki.freezeMethods(rn);var on=rn;function nn(e,t){const r=this||Yo,i=t||r,o=on.from(i.headers);let n=i.data;return ki.forEach(e,(function(e){n=e.call(r,n,o.normalize(),t?t.status:void 0)})),o.normalize(),n}function An(e){return!(!e||!e.__CANCEL__)}function sn(e,t,r){So.call(this,null==e?"canceled":e,So.ERR_CANCELED,t,r),this.name="CanceledError"}ki.inherits(sn,So,{__CANCEL__:!0});var an=Vo.hasStandardBrowserEnv?{write(e,t,r,i,o,n){const A=[e+"="+encodeURIComponent(t)];ki.isNumber(r)&&A.push("expires="+new Date(r).toGMTString()),ki.isString(i)&&A.push("path="+i),ki.isString(o)&&A.push("domain="+o),!0===n&&A.push("secure"),document.cookie=A.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function cn(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var hn=Vo.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function i(r){let i=r;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=i(window.location.href),function(e){const t=ki.isString(e)?i(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function un(e,t){let r=0;const i=function(e,t){e=e||10;const r=new Array(e),i=new Array(e);let o,n=0,A=0;return t=void 0!==t?t:1e3,function(s){const a=Date.now(),c=i[A];o||(o=a),r[n]=s,i[n]=a;let h=A,u=0;for(;h!==n;)u+=r[h++],h%=e;if(n=(n+1)%e,n===A&&(A=(A+1)%e),a-o{const n=o.loaded,A=o.lengthComputable?o.total:void 0,s=n-r,a=i(s);r=n;const c={loaded:n,total:A,progress:A?n/A:void 0,bytes:s,rate:a||void 0,estimated:a&&A&&n<=A?(A-n)/a:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}var ln="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let i=e.data;const o=on.from(e.headers).normalize();let n,A,{responseType:s,withXSRFToken:a}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}if(ki.isFormData(i))if(Vo.hasStandardBrowserEnv||Vo.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(A=o.getContentType())){const[e,...t]=A?A.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=cn(e.baseURL,e.url);function l(){if(!h)return;const i=on.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new So("Request failed with status code "+r.status,[So.ERR_BAD_REQUEST,So.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:i,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Ko(u,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=l:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(l)},h.onabort=function(){h&&(r(new So("Request aborted",So.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new So("Network Error",So.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||To;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new So(t,i.clarifyTimeoutError?So.ETIMEDOUT:So.ECONNABORTED,e,h)),h=null},Vo.hasStandardBrowserEnv&&(a&&ki.isFunction(a)&&(a=a(e)),a||!1!==a&&hn(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&an.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===i&&o.setContentType(null),"setRequestHeader"in h&&ki.forEach(o.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),ki.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",un(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",un(e.onUploadProgress)),(e.cancelToken||e.signal)&&(n=t=>{h&&(r(!t||t.type?new sn(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);g&&-1===Vo.protocols.indexOf(g)?r(new So("Unsupported protocol "+g+":",So.ERR_BAD_REQUEST,e)):h.send(i||null)}))};const gn={http:null,xhr:ln};ki.forEach(gn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const fn=e=>`- ${e}`,In=e=>ki.isFunction(e)||null===e||!1===e;var pn=e=>{e=ki.isArray(e)?e:[e];const{length:t}=e;let r,i;const o={};for(let n=0;n`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new So("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(fn).join("\n"):" "+fn(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function dn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sn(null,e)}function Bn(e){dn(e),e.headers=on.from(e.headers),e.data=nn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return pn(e.adapter||Yo.adapter)(e).then((function(t){return dn(e),t.data=nn.call(e,e.transformResponse,t),t.headers=on.from(t.headers),t}),(function(t){return An(t)||(dn(e),t&&t.response&&(t.response.data=nn.call(e,e.transformResponse,t.response),t.response.headers=on.from(t.response.headers))),Promise.reject(t)}))}const wn=e=>e instanceof on?e.toJSON():e;function Cn(e,t){t=t||{};const r={};function i(e,t,r){return ki.isPlainObject(e)&&ki.isPlainObject(t)?ki.merge.call({caseless:r},e,t):ki.isPlainObject(t)?ki.merge({},t):ki.isArray(t)?t.slice():t}function o(e,t,r){return ki.isUndefined(t)?ki.isUndefined(e)?void 0:i(void 0,e,r):i(e,t,r)}function n(e,t){if(!ki.isUndefined(t))return i(void 0,t)}function A(e,t){return ki.isUndefined(t)?ki.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(r,o,n){return n in t?i(r,o):n in e?i(void 0,r):void 0}const a={url:n,method:n,data:n,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,responseEncoding:A,validateStatus:s,headers:(e,t)=>o(wn(e),wn(t),!0)};return ki.forEach(Object.keys(Object.assign({},e,t)),(function(i){const n=a[i]||o,A=n(e[i],t[i],i);ki.isUndefined(A)&&n!==s||(r[i]=A)})),r}const Qn="1.6.5",En={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{En[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const mn={};En.transitional=function(e,t,r){function i(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,n)=>{if(!1===e)throw new So(i(o," has been removed"+(t?" in "+t:"")),So.ERR_DEPRECATED);return t&&!mn[o]&&(mn[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,n)}};var yn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new So("options must be an object",So.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const n=i[o],A=t[n];if(A){const t=e[n],r=void 0===t||A(t,n,e);if(!0!==r)throw new So("option "+n+" must be "+r,So.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new So("Unknown option "+n,So.ERR_BAD_OPTION)}},validators:En};const bn=yn.validators;class Fn{constructor(e){this.defaults=e,this.interceptors={request:new xo,response:new xo}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Cn(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;void 0!==r&&yn.assertOptions(r,{silentJSONParsing:bn.transitional(bn.boolean),forcedJSONParsing:bn.transitional(bn.boolean),clarifyTimeoutError:bn.transitional(bn.boolean)},!1),null!=i&&(ki.isFunction(i)?t.paramsSerializer={serialize:i}:yn.assertOptions(i,{encode:bn.function,serialize:bn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=o&&ki.merge(o.common,o[t.method]);o&&ki.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=on.concat(n,o);const A=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,A.unshift(e.fulfilled,e.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)}));let h,u=0;if(!s){const e=[Bn.bind(this),void 0];for(e.unshift.apply(e,A),e.push.apply(e,a),h=e.length,c=Promise.resolve(t);u{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{r.subscribe(e),t=e})).then(e);return i.cancel=function(){r.unsubscribe(t)},i},e((function(e,i,o){r.reason||(r.reason=new sn(e,i,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new kn((function(t){e=t})),cancel:e}}}var Un=kn;const Hn={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};Object.entries(Hn).forEach((([e,t])=>{Hn[t]=e}));var Rn=Hn;const Dn=function e(t){const r=new Sn(t),i=Wr(Sn.prototype.request,r);return ki.extend(i,Sn.prototype,r,{allOwnKeys:!0}),ki.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Cn(t,r))},i}(Yo);Dn.Axios=Sn,Dn.CanceledError=sn,Dn.CancelToken=Un,Dn.isCancel=An,Dn.VERSION=Qn,Dn.toFormData=No,Dn.AxiosError=So,Dn.Cancel=Dn.CanceledError,Dn.all=function(e){return Promise.all(e)},Dn.spread=function(e){return function(t){return e.apply(null,t)}},Dn.isAxiosError=function(e){return ki.isObject(e)&&!0===e.isAxiosError},Dn.mergeConfig=Cn,Dn.AxiosHeaders=on,Dn.formToJSON=e=>Wo(ki.isHTMLForm(e)?new FormData(e):e),Dn.getAdapter=pn,Dn.HttpStatusCode=Rn,Dn.default=Dn;var vn=Dn,Nn=Q(Object.freeze({__proto__:null,default:{}}));var On=C(class{constructor(e="https://keyserver.ubuntu.com"){this._baseUrl=e,this._fetch="function"==typeof globalThis.fetch?globalThis.fetch:Nn}lookup(e){let t=this._baseUrl+"/pks/lookup?op=get&options=mr&search=";const r=this._fetch;if(e.keyId)t+="0x"+encodeURIComponent(e.keyId);else{if(!e.query)throw new Error("You must provide a query parameter!");t+=encodeURIComponent(e.query)}return r(t).then((function(e){if(200===e.status)return e.text()})).then((function(e){if(e&&!(e.indexOf("-----END PGP PUBLIC KEY BLOCK-----")<0))return e.trim()}))}upload(e){const t=this._baseUrl+"/pks/add";return(0,this._fetch)(t,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"keytext="+encodeURIComponent(e)})}}),Pn=Q(Object.freeze({__proto__:null,default:{}}));var Gn=class{constructor(){this._fetch="function"==typeof globalThis.fetch?globalThis.fetch:Nn;const{subtle:e}=globalThis.crypto||Pn.webcrypto||new Nn.Crypto;this._subtle=e}async lookup(e){const t=this._fetch;if(!e.email)throw new Error("You must provide an email parameter!");if("string"!=typeof e.email||!e.email.includes("@"))throw new Error("Invalid e-mail address.");const[r,i]=e.email.split("@"),o=(new TextEncoder).encode(r.toLowerCase()),n=function(e){if(0===e.length)return"";const t="ybndrfg8ejkmcpqxot1uwisza345h769",r=5,i=31;let o=e[0],n=1,A=8,s="";for(;A>0||n>A]}return s}(new Uint8Array(await this._subtle.digest("SHA-1",o))),A=encodeURIComponent(r),s=`https://openpgpkey.${i}/.well-known/openpgpkey/${i}/hu/${n}?l=${A}`,a=`https://${i}/.well-known/openpgpkey/hu/${n}?l=${A}`;let c;try{if(c=await t(s),200!==c.status)throw new Error("Advanced WKD lookup failed: "+c.statusText)}catch(e){if(c=await t(a),200!==c.status)throw new Error("Direct WKD lookup failed: "+c.statusText)}return new Uint8Array(await c.arrayBuffer())}},qn=C(Gn);async function Kn(e,r="keys.openpgp.org"){const i=new On(`https://${r??"keys.openpgp.org"}`),o={query:e},n=await i.lookup(o).catch((e=>{throw new Error(`Key does not exist or could not be fetched (${e})`)}));if(!n)throw new Error("Key does not exist or could not be fetched");const A=await t.readKey({armoredKey:n}).catch((e=>{throw new Error(`Key could not be read (${e})`)})),s=await _n(A);return s.publicKey.fetch.method=p.HKP,s.publicKey.fetch.query=e,s}async function xn(e){const r=new qn,i={email:e},o=await r.lookup(i).catch((e=>{throw new Error(`Key does not exist or could not be fetched (${e})`)}));if(!o)throw new Error("Key does not exist or could not be fetched");const n=await t.readKey({binaryKey:o}).catch((e=>{throw new Error(`Key could not be read (${e})`)})),A=await _n(n);return A.publicKey.fetch.method=p.WKD,A.publicKey.fetch.query=e,A}async function Tn(e,r){const i=`https://keybase.io/${e}/pgp_keys.asc?fingerprint=${r}`;let o;try{o=await vn.get(i,{responseType:"text"}).then((e=>{if(200===e.status)return e})).then((e=>e.data))}catch(e){throw new Error(`Error fetching Keybase key: ${e.message}`)}const n=await t.readKey({armoredKey:o}).catch((e=>{throw new Error(`Key does not exist or could not be fetched (${e})`)})),A=await _n(n);return A.publicKey.fetch.method=p.HTTP,A.publicKey.fetch.query=null,A.publicKey.fetch.resolvedUrl=i,A}async function Mn(e){const r=await t.readKey({armoredKey:e}).catch((e=>{throw new Error(`Key could not be read (${e})`)}));return await _n(r)}async function Jn(e){if(!z.isUri(e))throw new Error("Invalid URI");const t=e.match(/([a-zA-Z0-9]*):([a-zA-Z0-9@._=+-]*)(?::([a-zA-Z0-9@._=+-]*))?/);if(!t[1])throw new Error("Invalid URI");switch(t[1]){case"hkp":return await Kn(t[3]?t[3]:t[2],t[3]?t[2]:null);case"wkd":return await xn(t[2]);case"kb":return await Tn(t[2],t.length>=4?t[3]:null);default:throw new Error("Invalid URI protocol")}}async function _n(e){if(!(e&&e instanceof t.PublicKey))throw new Error("Invalid public key");const r=e.getFingerprint(),i=await e.getPrimaryUser(),o=e.users,n=[];o.forEach(((e,t)=>{if(!e.userID)return;const i=new Lr(e.userID.name,[]);if(i.setIdentifier(e.userID.userID),i.setDescription(e.userID.comment),i.setEmailAddress(e.userID.email),"selfCertifications"in e&&e.selfCertifications.length>0){const t=e.selfCertifications.sort(((e,t)=>t.created.getTime()-e.created.getTime()))[0];t.revoked&&i.revoke();const o=t.rawNotations;i.claims=o.filter((({name:e,humanReadable:t})=>t&&("proof@ariadne.id"===e||"proof@metacode.biz"===e))).map((({value:e})=>new Zr((new TextDecoder).decode(e),`openpgp4fpr:${r}`)))}n.push(i)}));const A=new Vr(g.OPENPGP,`openpgp4fpr:${r}`,n);return A.primaryPersonaIndex=i.index,A.publicKey.keyType=f.OPENPGP,A.publicKey.fingerprint=r,A.publicKey.encoding=I.ARMORED_PGP,A.publicKey.encodedKey=e.armor(),A.publicKey.key=e,A}var Zn=Object.freeze({__proto__:null,fetch:async function(e){const t=e.match(/([a-zA-Z0-9@._=+-]*)(?::([a-zA-Z0-9@._=+-]*))?/);let r=null;try{r=await Mn(e)}catch(e){}if(!r&&e.includes("@"))try{r=await xn(t[1])}catch(e){}if(r||(r=await Kn(t[2]?t[2]:t[1],t[2]?t[1]:null)),!r)throw new Error("Key does not exist or could not be fetched");return r},fetchHKP:Kn,fetchKeybase:Tn,fetchPlaintext:Mn,fetchURI:Jn,fetchWKD:xn,parsePublicKey:_n}),Ln=crypto;const Vn=e=>e instanceof CryptoKey;var Wn=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await Ln.subtle.digest(r,t))};const jn=new TextEncoder,Yn=new TextDecoder;const zn=e=>(e=>{let t=e;"string"==typeof t&&(t=jn.encode(t));const r=[];for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=Yn.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;ee.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function cA(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var hA=(e,...t)=>cA("Key must be ",e,...t);function uA(e,t,...r){return cA(`Key for the ${e} algorithm must be `,t,...r)}var lA=e=>Vn(e);const gA=["CryptoKey"];var fA=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function IA(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var pA=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:i,keyUsages:o}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new tA(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new tA('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),n=[i,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:o];if("PBKDF2"===i.name)return Ln.subtle.importKey("raw",Xn(e.k),...n);const A={...e};return delete A.alg,delete A.use,Ln.subtle.importKey("jwk",A,...n)};var dA=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!lA(t))throw new TypeError(uA(e,t,...gA,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${gA.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!lA(t))throw new TypeError(uA(e,t,...gA));if("secret"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};var BA=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var wA=async(e,t,r,i)=>{const o=await function(e,t,r){if(Vn(t))return aA(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(hA(t,...gA));return Ln.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(hA(t,...gA,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,o);const n=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new tA(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,o.algorithm);try{return await Ln.subtle.verify(n,o,r,i)}catch(e){return!1}};async function CA(e,t,r){var i;if(!IA(e))throw new rA("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new rA('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new rA("JWS Protected Header incorrect type");if(void 0===e.payload)throw new rA("JWS Payload missing");if("string"!=typeof e.signature)throw new rA("JWS Signature missing or incorrect type");if(void 0!==e.header&&!IA(e.header))throw new rA("JWS Unprotected Header incorrect type");let o={};if(e.protected)try{const t=Xn(e.protected);o=JSON.parse(Yn.decode(t))}catch(e){throw new rA("JWS Protected Header is invalid")}if(!fA(o,e.header))throw new rA("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...o,...e.header},A=function(e,t,r,i,o){if(void 0!==o.crit&&void 0===i.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return new Set;if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n;n=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of i.crit){if(!n.has(t))throw new tA(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n.get(t)&&void 0===i[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(i.crit)}(rA,new Map([["b64",!0]]),null==r?void 0:r.crit,o,n);let s=!0;if(A.has("b64")&&(s=o.b64,"boolean"!=typeof s))throw new rA('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:a}=n;if("string"!=typeof a||!a)throw new rA('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=r&&BA("algorithms",r.algorithms);if(c&&!c.has(a))throw new eA('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new rA("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new rA("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(o,e),h=!0),dA(a,t,"verify");const u=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let i=0;return e.forEach((e=>{r.set(e,i),i+=e.length})),r}(jn.encode(null!==(i=e.protected)&&void 0!==i?i:""),jn.encode("."),"string"==typeof e.payload?jn.encode(e.payload):e.payload);let l;try{l=Xn(e.signature)}catch(e){throw new rA("Failed to base64url decode the signature")}if(!await wA(a,t,l,u))throw new oA;let g;if(s)try{g=Xn(e.payload)}catch(e){throw new rA("Failed to base64url decode the payload")}else g="string"==typeof e.payload?jn.encode(e.payload):e.payload;const f={payload:g};return void 0!==e.protected&&(f.protectedHeader=o),void 0!==e.header&&(f.unprotectedHeader=e.header),h?{...f,key:t}:f}const QA=(e,t)=>{if("string"!=typeof e||!e)throw new iA(`${t} missing or invalid`)};const EA=Xn;function mA(e,t,r){var i;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var o=0;o=8&&(s-=8,A[c++]=255&a>>s)}if(s>=t.bits||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return A}function yA(e,t,r){void 0===r&&(r={});for(var i=r.pad,o=void 0===i||i,n=(1<t.bits;)s-=t.bits,A+=t.chars[n&a>>s];if(s&&(A+=t.chars[n&a<new Zr(e,t))),l=new Lr(a,u);c&&l.setDescription(c),h&&/^#([0-9A-F]{3}){1,2}$/i.test(h)&&(l.themeColor=h);const p=new Vr(g.ASP,t,[l]);switch(p.publicKey.fingerprint=n,p.publicKey.encoding=I.JWK,p.publicKey.encodedKey=JSON.stringify(i.jwk),p.publicKey.key=i.jwk,i.alg){case"ES256":p.publicKey.keyType=f.ES256;break;case"EdDSA":p.publicKey.keyType=f.EDDSA;break;default:p.publicKey.keyType=f.UNKNOWN}return p}async function RA(e){const t=await async function(e,t){if(!IA(e))throw new TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":QA(e.crv,'"crv" (Curve) Parameter'),QA(e.x,'"x" (X Coordinate) Parameter'),QA(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":QA(e.crv,'"crv" (Subtype of Key Pair) Parameter'),QA(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":QA(e.e,'"e" (Exponent) Parameter'),QA(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":QA(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new tA('"kty" (Key Type) Parameter missing or unsupported')}const i=jn.encode(JSON.stringify(r));return zn(await Wn(t,i))}(e,"sha512"),r=kA.parse(t,{loose:!0}).slice(0,16);return SA.stringify(r,{pad:!1})}var DA=Object.freeze({__proto__:null,computeJwkFingerprint:RA,fetchASPE:async function(e){const t=/aspe:(.*):(.*)/;if(!t.test(e))throw new Error("Invalid ASPE URI");const r=e.match(t),i=`https://${r[1]}/.well-known/aspe/id/${r[2].toUpperCase()}`;let o;try{o=await vn.get(i,{responseType:"text"}).then((e=>{if(200===e.status)return e})).then((e=>e.data))}catch(e){throw new Error(`Error fetching Keybase key: ${e.message}`)}const n=await HA(o,e);return n.publicKey.fetch.method=p.ASPE,n.publicKey.fetch.query=e,n.publicKey.fetch.resolvedUrl=i,n},parseProfileJws:HA});var vA=Object.freeze({__proto__:null,parse:async function(e){let r;try{r=await t.readCleartextMessage({cleartextMessage:e})}catch(e){throw new Error(`Signature could not be read (${e.message})`)}const i=r.signature.packets[0].issuerKeyID.toHex(),o=r.signature.packets[0].signersUserID,n=r.signature.packets[0].preferredKeyServer||"https://keys.openpgp.org/",A=r.getText(),s=[],a=[];A.split("\n").forEach(((e,t)=>{const r=e.match(/^([a-zA-Z0-9]*)=(.*)$/i);if(r)switch(r[1].toLowerCase()){case"key":s.push(r[2]);break;case"proof":a.push(new Zr(r[2]))}}));const c={query:null,data:null,method:null};if(s.length>0)try{c.query=s[0],c.data=(await Jn(c.query)).publicKey.key,c.method=c.query.split(":")[0]}catch(e){}if(!c.data&&o)try{c.query=o,c.data=(await Jn(`wkd:${o}`)).publicKey.key,c.method="wkd"}catch(e){}if(!c.data)try{const e=n.match(/^(.*:\/\/)?([^/]*)(?:\/)?$/i);c.query=i||o,c.data=(await Jn(`hkp:${e[2]}:${c.query}`)).publicKey.key,c.method="hkp"}catch(e){throw new Error("Public key not found")}const h=await c.data.getPrimaryUser(),u=c.data.getFingerprint(),l=await t.verify({message:r,verificationKeys:c.data}),{verified:p}=l.signatures[0];try{await p}catch(e){throw new Error(`Signature could not be verified (${e.message})`)}const d=new Lr(h.user.userID.name,[]);d.setIdentifier(h.user.userID.userID),d.setDescription(h.user.userID.comment||null),d.setEmailAddress(h.user.userID.email||null),d.claims=a.map((({value:e})=>new Zr((new TextDecoder).decode(e),`openpgp4fpr:${u}`)));const B=new Vr(g.OPENPGP,`openpgp4fpr:${u}`,[d]);return B.publicKey.keyType=f.OPENPGP,B.publicKey.encoding=I.ARMORED_PGP,B.publicKey.encodedKey=c.data.armor(),B.publicKey.key=c.data,B.publicKey.fetch.method=c.method,B.publicKey.fetch.query=c.query,B}});var NA=Object.freeze({__proto__:null,claim:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/claim.schema.json",title:"Identity claim",description:"Verifiable online identity claim",type:"object",properties:{claimVersion:{description:"The version of the claim",type:"integer"},uri:{description:"The claim URI",type:"string"},proofs:{description:"The proofs that would verify the claim",type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},matches:{description:"Service providers matched to the claim",type:"array",items:{$ref:"https://spec.keyoxide.org/2/serviceprovider.schema.json"},uniqueItems:!0},status:{type:"integer",description:"Claim status code"},display:{type:"object",properties:{profileName:{type:"string",description:"Account name to display in the user interface"},profileUrl:{type:["string","null"],description:"Profile URL to link to in the user interface"},proofUrl:{type:["string","null"],description:"Proof URL to link to in the user interface"},serviceProviderName:{type:["string","null"],description:"Name of the service provider to display in the user interface"},serviceProviderId:{type:["string","null"],description:"Id of the service provider"}}}},required:["claimVersion","uri","proofs","status","display"],additionalProperties:!1},persona:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/persona.schema.json",title:"Profile",description:"Keyoxide persona with identity claims",type:"object",properties:{identifier:{description:"Identifier of the persona",type:["string","null"]},name:{description:"Name of the persona",type:"string"},email:{description:"Email address of the persona",type:["string","null"]},description:{description:"Description of the persona",type:["string","null"]},avatarUrl:{description:"URL to an avatar image",type:["string","null"]},themeColor:{description:"Profile page theme color",type:["string","null"]},isRevoked:{type:"boolean"},claims:{description:"A list of identity claims",type:"array",items:{$ref:"https://spec.keyoxide.org/2/claim.schema.json"},uniqueItems:!0}},required:["name","claims"],additionalProperties:!1},profile:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/profile.schema.json",title:"Profile",description:"Keyoxide profile with personas",type:"object",properties:{profileVersion:{description:"The version of the profile",type:"integer"},profileType:{description:"The type of the profile [openpgp, asp]",type:"string"},identifier:{description:"Identifier of the profile (email, fingerprint, URI)",type:"string"},personas:{description:"The personas inside the profile",type:"array",items:{$ref:"https://spec.keyoxide.org/2/persona.schema.json"},minItems:1,uniqueItems:!0},primaryPersonaIndex:{description:"The index of the primary persona",type:"integer"},publicKey:{description:"The cryptographic key associated with the profile",type:"object",properties:{keyType:{description:"The type of cryptographic key [eddsa, es256, openpgp, none]",type:"string"},encoding:{description:"The encoding of the cryptographic key [pem, jwk, armored_pgp, none]",type:"string"},encodedKey:{description:"The encoded cryptographic key (PEM, stringified JWK, ...)",type:["string","null"]},fetch:{description:"Details on how to fetch the public key",type:"object",properties:{method:{description:"The method to fetch the key [aspe, hkp, wkd, http, none]",type:"string"},query:{description:"The query to fetch the key",type:["string","null"]},resolvedUrl:{description:"The URL the method eventually resolved to",type:["string","null"]}}}},required:["keyType","fetch"]},verifiers:{description:"A list of links to verifiers",type:"array",items:{type:"object",properties:{name:{description:"Name of the verifier site",type:"string"},url:{description:"URL to the profile page on the verifier site",type:"string"}}},uniqueItems:!0}},required:["profileVersion","profileType","identifier","personas","primaryPersonaIndex","publicKey","verifiers"],additionalProperties:!1},serviceprovider:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/serviceprovider.schema.json",title:"Service provider",description:"A service provider that can be matched to identity claims",type:"object",properties:{about:{description:"Details about the service provider",type:"object",properties:{name:{description:"Full name of the service provider",type:"string"},id:{description:"Identifier of the service provider (no whitespace or symbols, lowercase)",type:"string"},homepage:{description:"URL to the homepage of the service provider",type:["string","null"]}}},profile:{description:"What the profile would look like if the match is correct",type:"object",properties:{display:{description:"Profile name to be displayed",type:"string"},uri:{description:"URI or URL for public access to the profile",type:"string"},qr:{description:"URI or URL associated with the profile usually served as a QR code",type:["string","null"]}}},claim:{description:"Details from the claim matching process",type:"object",properties:{uriRegularExpression:{description:"Regular expression used to parse the URI",type:"string"},uriIsAmbiguous:{description:"Whether this match automatically excludes other matches",type:"boolean"}}},proof:{description:"Information for the proof verification process",type:"object",properties:{request:{description:"Details to request the potential proof",type:"object",properties:{uri:{description:"Location of the proof",type:["string","null"]},accessRestriction:{description:"Type of access restriction [none, nocors, granted, server]",type:"string"},fetcher:{description:"Name of the fetcher to use",type:"string"},data:{description:"Data needed by the fetcher or proxy to request the proof",type:"object",additionalProperties:!0}}},response:{description:"Details about the expected response",type:"object",properties:{format:{description:"Expected format of the proof [text, json]",type:"string"}}},target:{description:"Details about the target located in the response",type:"array",items:{type:"object",properties:{format:{description:"How is the proof formatted [uri, fingerprint]",type:"string"},encoding:{description:"How is the proof encoded [plain, html, xml]",type:"string"},relation:{description:"How are the response and the target related [contains, equals]",type:"string"},path:{description:"Path to the target location if the response is JSON",type:"array",items:{type:"string"}}}}}}}},required:["about","profile","claim","proof"],additionalProperties:!1}});return e.fetcher=o,e.Claim=Zr,e.Persona=Lr,e.Profile=Vr,e.ServiceProvider=Ye,e.ServiceProviderDefinitions=Mr,e.asp=DA,e.defaults=_r,e.enums=B,e.openpgp=Zn,e.proofs=ot,e.schemas=NA,e.signatures=vA,e.utils=je,e.verifications=or,e}({},openpgp); + */function nt(e,t,r,i){return new(r||(r=Promise))((function(o,n){function A(e){try{a(i.next(e))}catch(e){n(e)}}function s(e){try{a(i.throw(e))}catch(e){n(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,s)}a((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class At{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then((()=>new Promise(e))),new Promise((t=>{e=t}))}dispatch(e){return nt(this,void 0,void 0,(function*(){const t=yield this.lock();try{return yield Promise.resolve(e())}finally{t()}}))}}const st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:ue,at=null!==(it=st.Buffer)&&void 0!==it?it:null,ct=st.TextEncoder?new st.TextEncoder:null;function ht(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}function ut(e,t){const r=t.length>>1;for(let i=0;i>>4;e[i++]=r>9?r+lt:r+gt,r=15&t[o],e[i++]=r>9?r+lt:r+gt}return String.fromCharCode.apply(null,e)}const It=null!==at?e=>{if("string"==typeof e){const t=at.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(at.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return ct.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dt=new Uint8Array(256);for(let e=0;e>18&63)+pt.charAt(r>>12&63)+pt.charAt(r>>6&63)+pt.charAt(63&r);o.push(i)}if(1===i){const i=e[r-1],n=pt.charAt(i>>2),A=pt.charAt(i<<4&63);o.push(`${n}${A}`),t&&o.push("==")}else if(2===i){const i=(e[r-2]<<8)+e[r-1],n=pt.charAt(i>>10),A=pt.charAt(i>>4&63),s=pt.charAt(i<<2&63);o.push(`${n}${A}${s}`),t&&o.push("=")}return o.join("")}function wt(e){let t=Math.floor(.75*e.length);const r=e.length;return"="===e[r-1]&&(t-=1,"="===e[r-2]&&(t-=1)),t}function Ct(e){const t=wt(e),r=e.length,i=new Uint8Array(t);let o=0;for(let t=0;t>4,o+=1,i[o]=(15&n)<<4|A>>2,o+=1,i[o]=(3&A)<<6|63&s,o+=1}return i}const Qt=16384,Et=4,mt=new At,yt=new Map;function bt(e,t){return nt(this,void 0,void 0,(function*(){let r=null,i=null,o=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const n=()=>new DataView(r.exports.memory.buffer).getUint32(r.exports.STATE_SIZE,!0),A=mt.dispatch((()=>nt(this,void 0,void 0,(function*(){if(!yt.has(e.name)){const t=Ct(e.data),r=WebAssembly.compile(t);yt.set(e.name,r)}const t=yield yt.get(e.name);r=yield WebAssembly.instantiate(t,{})})))),s=(e=null)=>{o=!0,r.exports.Hash_Init(e)},a=e=>{if(!o)throw new Error("update() called before init()");(e=>{let t=0;for(;t{if(!o)throw new Error("digest() called before init()");return o=!1,r.exports.Hash_Final(n),"binary"===e?i.slice(0,t):ft(c,i,t)},u=e=>"string"==typeof e?e.length!0;break;case"blake2b":case"blake2s":l=(e,t)=>t<=512&&u(e);break;case"blake3":l=(e,t)=>0===t&&u(e);break;case"xxhash64":case"xxhash3":case"xxhash128":l=()=>!1}return yield(()=>nt(this,void 0,void 0,(function*(){r||(yield A);const e=r.exports.Hash_GetBuffer(),t=r.exports.memory.buffer;i=new Uint8Array(t,e,Qt)})))(),{getMemory:()=>i,writeMemory:(e,t=0)=>{i.set(e,t)},getExports:()=>r.exports,setMemorySize:e=>{r.exports.Hash_SetMemorySize(e);const t=r.exports.Hash_GetBuffer(),o=r.exports.memory.buffer;i=new Uint8Array(o,t,e)},init:s,update:a,digest:h,save:()=>{if(!o)throw new Error("save() can only be called after init() and before digest()");const t=r.exports.Hash_GetState(),i=n(),A=r.exports.memory.buffer,s=new Uint8Array(A,t,i),a=new Uint8Array(Et+i);return ut(a,e.hash),a.set(s,Et),a},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const i=r.exports.Hash_GetState(),A=n(),s=Et+A,a=r.exports.memory.buffer;if(t.length!==s)throw new Error(`Bad state length (expected ${s} bytes, got ${t.length})`);if(!function(e,t){if(e.length!==2*t.length)return!1;for(let r=0;r{if(!l(e,o))return s(o),a(e),h("hex",n);const A=It(e);return i.set(A),r.exports.Hash_Calculate(A.length,o,n),ft(c,i,t)},hashLength:t}}))}new At;var Ft={name:"blake2b",data:"AGFzbQEAAAABEQRgAAF/YAJ/fwBgAX8AYAAAAwoJAAECAwECAgABBQQBAQICBg4CfwFBsIsFC38AQYAICwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZlcgAACkhhc2hfRmluYWwAAwlIYXNoX0luaXQABQtIYXNoX1VwZGF0ZQAGDUhhc2hfR2V0U3RhdGUABw5IYXNoX0NhbGN1bGF0ZQAIClNUQVRFX1NJWkUDAQrTOAkFAEGACQvrAgIFfwF+AkAgAUEBSA0AAkACQAJAQYABQQAoAuCKASICayIDIAFIDQAgASEEDAELQQBBADYC4IoBAkAgAkH/AEoNACACQeCJAWohBSAAIQRBACEGA0AgBSAELQAAOgAAIARBAWohBCAFQQFqIQUgAyAGQQFqIgZB/wFxSg0ACwtBAEEAKQPAiQEiB0KAAXw3A8CJAUEAQQApA8iJASAHQv9+Vq18NwPIiQFB4IkBEAIgACADaiEAAkAgASADayIEQYEBSA0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3AxAgAEEAKQOYiQE3AxggAEEAKQOgiQE3AyAgAEEAKQOoiQE3AyggAEEAKQOwiQE3AzAgAEEAKQO4iQE3AzhBACgC5IoBIgVBAUgNAEEAIQRBACECA0AgBEGACWogACAEai0AADoAACAEQQFqIQQgBSACQQFqIgJB/wFxSg0ACwsgAEHAAGokAAv9AwMBfwF+AX8jAEGAAWsiAiQAQQBBgQI7AfKKAUEAIAE6APGKAUEAIAA6APCKAUGQfiEAA0AgAEGAiwFqQgA3AAAgAEH4igFqQgA3AAAgAEHwigFqQgA3AAAgAEEYaiIADQALQQAhAEEAQQApA/CKASIDQoiS853/zPmE6gCFNwOAiQFBAEEAKQP4igFCu86qptjQ67O7f4U3A4iJAUEAQQApA4CLAUKr8NP0r+68tzyFNwOQiQFBAEEAKQOIiwFC8e30+KWn/aelf4U3A5iJAUEAQQApA5CLAULRhZrv+s+Uh9EAhTcDoIkBQQBBACkDmIsBQp/Y+dnCkdqCm3+FNwOoiQFBAEEAKQOgiwFC6/qG2r+19sEfhTcDsIkBQQBBACkDqIsBQvnC+JuRo7Pw2wCFNwO4iQFBACADp0H/AXE2AuSKAQJAIAFBAUgNACACQgA3A3ggAkIANwNwIAJCADcDaCACQgA3A2AgAkIANwNYIAJCADcDUCACQgA3A0ggAkIANwNAIAJCADcDOCACQgA3AzAgAkIANwMoIAJCADcDICACQgA3AxggAkIANwMQIAJCADcDCCACQgA3AwBBACEEA0AgAiAAaiAAQYAJai0AADoAACAAQQFqIQAgBEEBaiIEQf8BcSABSA0ACyACQYABEAELIAJBgAFqJAALEgAgAEEDdkH/P3EgAEEQdhAECwkAQYAJIAAQAQsGAEGAiQELGwAgAUEDdkH/P3EgAUEQdhAEQYAJIAAQARADCwsLAQBBgAgLBPAAAAA=",hash:"656e0f66"};function St(e){return!Number.isInteger(e)||e<8||e>512||e%8!=0?new Error("Invalid variant! Valid values: 8, 16, ..., 512"):null}function kt(e=512,t=null){if(St(e))return Promise.reject(St(e));let r=null,i=e;if(null!==t){if(r=It(t),r.length>64)return Promise.reject(new Error("Max key length is 64 bytes"));o=e,n=r.length,i=o|n<<16}var o,n;const A=e/8;return bt(Ft,A).then((e=>{i>512&&e.writeMemory(r),e.init(i);const t={init:i>512?()=>(e.writeMemory(r),e.init(i),t):()=>(e.init(i),t),update:r=>(e.update(r),t),digest:t=>e.digest(t),save:()=>e.save(),load:r=>(e.load(r),t),blockSize:128,digestSize:A};return t}))}new At;var Ut={name:"argon2",data:"AGFzbQEAAAABKQVgAX8Bf2AAAX9gEH9/f39/f39/f39/f39/f38AYAR/f39/AGACf38AAwYFAAECAwQFBgEBAoCAAgYIAX8BQZCoBAsHQQQGbWVtb3J5AgASSGFzaF9TZXRNZW1vcnlTaXplAAAOSGFzaF9HZXRCdWZmZXIAAQ5IYXNoX0NhbGN1bGF0ZQAECvkyBVgBAn9BACEBAkBBACgCiAgiAiAARg0AAkAgACACayIAQRB2IABBgIB8cSAASWoiAEAAQX9HDQBB/wHADwtBACEBQQBBACkDiAggAEEQdK18NwOICAsgAcALcAECfwJAQQAoAoAIIgANAEEAPwBBEHQiADYCgAhBACgCiAgiAUGAgCBGDQACQEGAgCAgAWsiAEEQdiAAQYCAfHEgAElqIgBAAEF/Rw0AQQAPC0EAQQApA4gIIABBEHStfDcDiAhBACgCgAghAAsgAAvcDgECfiAAIAQpAwAiECAAKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAMIBAgDCkDAIVCIIkiEDcDACAIIBAgCCkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgBCAQIAQpAwCFQiiJIhA3AwAgACAQIAApAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIAwgECAMKQMAhUIwiSIQNwMAIAggECAIKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAEIBAgBCkDAIVCAYk3AwAgASAFKQMAIhAgASkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgDSAQIA0pAwCFQiCJIhA3AwAgCSAQIAkpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAUgECAFKQMAhUIoiSIQNwMAIAEgECABKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACANIBAgDSkDAIVCMIkiEDcDACAJIBAgCSkDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgBSAQIAUpAwCFQgGJNwMAIAIgBikDACIQIAIpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIA4gECAOKQMAhUIgiSIQNwMAIAogECAKKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAGIBAgBikDAIVCKIkiEDcDACACIBAgAikDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgDiAQIA4pAwCFQjCJIhA3AwAgCiAQIAopAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIAYgECAGKQMAhUIBiTcDACADIAcpAwAiECADKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAPIBAgDykDAIVCIIkiEDcDACALIBAgCykDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgByAQIAcpAwCFQiiJIhA3AwAgAyAQIAMpAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIA8gECAPKQMAhUIwiSIQNwMAIAsgECALKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAHIBAgBykDAIVCAYk3AwAgACAFKQMAIhAgACkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgDyAQIA8pAwCFQiCJIhA3AwAgCiAQIAopAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAUgECAFKQMAhUIoiSIQNwMAIAAgECAAKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAPIBAgDykDAIVCMIkiEDcDACAKIBAgCikDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgBSAQIAUpAwCFQgGJNwMAIAEgBikDACIQIAEpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAwgECAMKQMAhUIgiSIQNwMAIAsgECALKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACAGIBAgBikDAIVCKIkiEDcDACABIBAgASkDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgDCAQIAwpAwCFQjCJIhA3AwAgCyAQIAspAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIAYgECAGKQMAhUIBiTcDACACIAcpAwAiECACKQMAIhF8IBFCAYZC/v///x+DIBBC/////w+DfnwiEDcDACANIBAgDSkDAIVCIIkiEDcDACAIIBAgCCkDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgByAQIAcpAwCFQiiJIhA3AwAgAiAQIAIpAwAiEXwgEEL/////D4MgEUIBhkL+////H4N+fCIQNwMAIA0gECANKQMAhUIwiSIQNwMAIAggECAIKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAHIBAgBykDAIVCAYk3AwAgAyAEKQMAIhAgAykDACIRfCARQgGGQv7///8fgyAQQv////8Pg358IhA3AwAgDiAQIA4pAwCFQiCJIhA3AwAgCSAQIAkpAwAiEXwgEUIBhkL+////H4MgEEL/////D4N+fCIQNwMAIAQgECAEKQMAhUIoiSIQNwMAIAMgECADKQMAIhF8IBBC/////w+DIBFCAYZC/v///x+DfnwiEDcDACAOIBAgDikDAIVCMIkiEDcDACAJIBAgCSkDACIRfCAQQv////8PgyARQgGGQv7///8fg358IhA3AwAgBCAQIAQpAwCFQgGJNwMAC98aAQN/QQAhBEEAIAIpAwAgASkDAIU3A5AIQQAgAikDCCABKQMIhTcDmAhBACACKQMQIAEpAxCFNwOgCEEAIAIpAxggASkDGIU3A6gIQQAgAikDICABKQMghTcDsAhBACACKQMoIAEpAyiFNwO4CEEAIAIpAzAgASkDMIU3A8AIQQAgAikDOCABKQM4hTcDyAhBACACKQ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0EIaiIDIAMpAwAgAiAEIAFBCHJqaikDAIU3AwAgAUEIaiEDIAFBEGohASADQfgHSQ0ACyAeIApHDQALCyACIBlqIR1BeCEBA0AgAiABaiIDQQhqIB0gAWoiBEEIaikDADcDACADQRBqIARBEGopAwA3AwAgA0EYaiAEQRhqKQMANwMAIANBIGogBEEgaikDADcDACABQSBqIgFB+AdJDQALCws=",hash:"7ab14c91"};const Ht=new DataView(new ArrayBuffer(4));function Rt(e){return Ht.setInt32(0,e,!0),new Uint8Array(Ht.buffer)}function Dt(e,t,r){return nt(this,void 0,void 0,(function*(){if(r<=64){const e=yield kt(8*r);return e.update(Rt(r)),e.update(t),e.digest("binary")}const i=Math.ceil(r/32)-2,o=new Uint8Array(r);e.init(),e.update(Rt(r)),e.update(t);let n=e.digest("binary");o.set(n.subarray(0,32),0);for(let t=1;t{if(!e||"object"!=typeof e)throw new Error("Invalid options parameter. It requires an object.");if(void 0===e.hash||"string"!=typeof e.hash)throw new Error("Hash should be specified")})(e);const t=((e,t,r)=>{const i=t.match(/^\$argon2(id|i|d)\$v=([0-9]+)\$((?:[mtp]=[0-9]+,){2}[mtp]=[0-9]+)\$([A-Za-z0-9+/]+)\$([A-Za-z0-9+/]+)$/);if(!i)throw new Error("Invalid hash");const[,o,n,A,s,a]=i;if("19"!==n)throw new Error(`Unsupported version: ${n}`);const c={},h={m:"memorySize",p:"parallelism",t:"iterations"};return A.split(",").forEach((e=>{const[t,r]=e.split("=");c[h[t]]=parseInt(r,10)})),Object.assign(Object.assign({},c),{password:e,secret:r,hashType:o,salt:Ct(s),hashLength:wt(a),outputType:"encoded"})})(e.password,e.hash,e.secret);(e=>{var t;if(!e||"object"!=typeof e)throw new Error("Invalid options parameter. It requires an object.");if(!e.password)throw new Error("Password must be specified");if(e.password=It(e.password),e.password.length<1)throw new Error("Password must be specified");if(!e.salt)throw new Error("Salt must be specified");if(e.salt=It(e.salt),e.salt.length<8)throw new Error("Salt should be at least 8 bytes long");if(e.secret=It(null!==(t=e.secret)&&void 0!==t?t:""),!Number.isInteger(e.iterations)||e.iterations<1)throw new Error("Iterations should be a positive number");if(!Number.isInteger(e.parallelism)||e.parallelism<1)throw new Error("Parallelism should be a positive number");if(!Number.isInteger(e.hashLength)||e.hashLength<4)throw new Error("Hash length should be at least 4 bytes.");if(!Number.isInteger(e.memorySize))throw new Error("Memory size should be specified.");if(e.memorySize<8*e.parallelism)throw new Error("Memory size should be at least 8 * parallelism.");if(void 0===e.outputType&&(e.outputType="hex"),!["hex","binary","encoded"].includes(e.outputType))throw new Error(`Insupported output type ${e.outputType}. Valid values: ['hex', 'binary', 'encoded']`)})(t);const r=e.hash.lastIndexOf("$")+1;return(yield vt(t)).substring(r)===e.hash.substring(r)}))}new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At,new At;var Ot={name:"bcrypt",data:"AGFzbQEAAAABFwRgAAF/YAR/f39/AGADf39/AGABfwF/AwUEAAECAwUEAQECAgYIAX8BQZCrBQsHNAQGbWVtb3J5AgAOSGFzaF9HZXRCdWZmZXIAAAZiY3J5cHQAAg1iY3J5cHRfdmVyaWZ5AAMK+GAEBQBBgCsL3lkEFH8Bfgh/AX4jAEHwAGshBCACQQA6AAIgAkGq4AA7AAACQCABLQAAQSpHDQAgAS0AAUEwRw0AIAJBMToAAQsCQCABLAAFIAEsAARBCmxqQfB7aiIFQQRJDQAgAS0AB0FgaiIGQd8ASw0AIAZBkAlqLQAAIgZBP0sNACABLQAIQWBqIgdB3wBLDQAgB0GQCWotAAAiB0E/Sw0AIAQgB0EEdiAGQQJ0cjoACCABLQAJQWBqIgZB3wBLDQAgBkGQCWotAAAiBkE/Sw0AIAQgBkECdiAHQQR0cjoACSABLQAKQWBqIgdB3wBLDQAgB0GQCWotAAAiB0E/Sw0AIAQgByAGQQZ0cjoACiABLQALQWBqIgZB3wBLDQAgBkGQCWotAAAiBkE/Sw0AIAEtAAxBYGoiB0HfAEsNACAHQZAJai0AACIHQT9LDQAg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KzSg0x7ycYlBdAobjDSjSyBxvsXYMnbDjZ813y4vmZtHbwvmHfHjD1TaTOWR2Noez3lizm9+Ps1msRgWBR0s/cXSj4SZIvv2V/Mj9SN2MqYxNaiTAs3MVmKB8Ky163ValzYWbsxz0oiSYpbe0Em5gRuQUEwUVsZxvcfG5goUejIG0OFFmnvyw/1TqskAD6hi4r8lu/bSvTUFaRJxIgIEsnzPy7YrnHbNwD4RU9PjQBZgvas48K1HJZwgOLp2zkb3xaGvd2BgdSBO/suF2I3oirD5qnp+qvlMXMJIGYyK+wLkasMB+eHr1mn41JCg3lymLSUJP5/mCMIyYU63W+J3zuPfj1fmcsM6iGo/JNMIo4UuihkTRHNwAyI4CaTQMZ8pmPouCIlsTuzmIShFdxPQOM9mVL5sDOk0tymswN1QfMm11YQ/FwlHtdnVFpIb+3mJ",hash:"497b89b2"};const Pt=e=>{if(!e||"object"!=typeof e)throw new Error("Invalid options parameter. It requires an object.");if(void 0===e.hash||"string"!=typeof e.hash)throw new Error("Hash should be specified");if(60!==e.hash.length)throw new Error("Hash should be 60 bytes long");if(t=e.hash,!/^\$2[axyb]\$[0-3][0-9]\$[./A-Za-z0-9]{53}$/.test(t)||"0"===t[4]&&parseInt(t[5],10)<4||"3"===t[4]&&parseInt(t[5],10)>1)throw new Error("Invalid hash");var t;if(e.password=It(e.password),e.password.length<1)throw new Error("Password should be at least 1 byte long");if(e.password.length>72)throw new Error("Password should be at most 72 bytes long")};function Gt(e){return nt(this,void 0,void 0,(function*(){Pt(e);const{hash:t,password:r}=e,i=yield bt(Ot,0);i.writeMemory(It(t),0);const o=It(r);return i.writeMemory(o,60),!!i.getExports().bcrypt_verify(o.length)}))}new At,new At;var qt,Kt=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),xt=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));const Tt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Mt=null!==(qt=String.fromCodePoint)&&void 0!==qt?qt:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var Jt;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(Jt||(Jt={}));var _t,Zt,Lt;function Vt(e){return e>=Jt.ZERO&&e<=Jt.NINE}function Wt(e){return e===Jt.EQUALS||function(e){return e>=Jt.UPPER_A&&e<=Jt.UPPER_Z||e>=Jt.LOWER_A&&e<=Jt.LOWER_Z||Vt(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(_t||(_t={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(Zt||(Zt={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(Lt||(Lt={}));class jt{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=Zt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Lt.Strict}startEntity(e){this.decodeMode=e,this.state=Zt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Zt.EntityStart:return e.charCodeAt(t)===Jt.NUM?(this.state=Zt.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Zt.NamedEntity,this.stateNamedEntity(e,t));case Zt.NumericStart:return this.stateNumericStart(e,t);case Zt.NumericDecimal:return this.stateNumericDecimal(e,t);case Zt.NumericHex:return this.stateNumericHex(e,t);case Zt.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Jt.LOWER_X?(this.state=Zt.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Zt.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,i){if(t!==r){const o=r-t;this.result=this.result*Math.pow(i,o)+parseInt(e.substr(t,o),i),this.consumed+=o}}stateNumericHex(e,t){const r=t;for(;t=Jt.UPPER_A&&i<=Jt.UPPER_F||i>=Jt.LOWER_A&&i<=Jt.LOWER_F)))return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(o,3);t+=1}var i;return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){const r=t;for(;t=55296&&e<=57343||e>1114111?65533:null!==(t=Tt.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Jt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&_t.VALUE_LENGTH)>>14;for(;t>14,0!==o){if(n===Jt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Lt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,i=(r[t]&_t.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,i,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:i}=this;return this.emitCodePoint(1===t?i[e]&~_t.VALUE_LENGTH:i[e+1],r),3===t&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Zt.NamedEntity:return 0===this.result||this.decodeMode===Lt.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case Zt.NumericDecimal:return this.emitNumericEntity(0,2);case Zt.NumericHex:return this.emitNumericEntity(0,3);case Zt.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Zt.EntityStart:return 0}}}function Yt(e){let t="";const r=new jt(e,(e=>t+=Mt(e)));return function(e,i){let o=0,n=0;for(;(n=e.indexOf("&",n))>=0;){t+=e.slice(o,n),r.startEntity(i);const A=r.write(e,n+1);if(A<0){o=n+r.end();break}o=n+A,n=0===A?o+1:o}const A=t+e.slice(o);return t="",A}}function zt(e,t,r,i){const o=(t&_t.BRANCH_LENGTH)>>7,n=t&_t.JUMP_TABLE;if(0===o)return 0!==n&&i===n?r:-1;if(n){const t=i-n;return t<0||t>=o?-1:e[r+t]-1}let A=r,s=A+o-1;for(;A<=s;){const t=A+s>>>1,r=e[t];if(ri))return e[t+o];s=t-1}}return-1}const Xt=Yt(Kt),$t=Yt(xt);function er(e,t=Lt.Legacy){return Xt(e,t)}const tr=async(e,t)=>{const r=Ve(t.target,t.claimFormat),i=Ve(t.target,h.URI);let o=!1;switch(t.proofEncodingFormat){case s.HTML:e=er(e);break;case s.XML:e=$t(e,Lt.Strict)}if(o=-1!==(e=er(e)).replace(/\r?\n|\r/g,"").replace(/\s/g,"").toLowerCase().indexOf(r.toLowerCase()),!o){const t=/\$(argon2(?:id|d|i)|2a|2b|2y)(?:\$[a-zA-Z0-9=+\-,./]+)+/g;let r;for(;!o&&null!=(r=t.exec(e));){let e;const t=new Promise(((t,r)=>{e=setTimeout((()=>{t(!1)}),1e3)}));switch(r[1]){case"2a":case"2b":case"2y":try{if(parseInt(r[0].split("$")[2])>12)continue;const n=Gt({password:i.toLowerCase(),hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}if(!o)try{if(parseInt(r[0].split("$")[2])>12)continue;const n=Gt({password:i,hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}break;case"argon2":case"argon2i":case"argon2d":case"argon2id":try{const n=Nt({password:i.toLowerCase(),hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}if(!o)try{const n=Nt({password:i,hash:r[0]}).then((e=>e)).catch((e=>!1));o=await Promise.race([n,t]).then((t=>(clearTimeout(e),t)))}catch(e){o=!1}}}}if(!o){const t=We(e);for(let e=0;e{}));A&&(200===A.status&&A.headers.get("ariadne-identity-proof")&&(o=-1!==A.headers.get("ariadne-identity-proof").toLowerCase().indexOf(i.toLowerCase())))}}return o},rr=async(e,t,r)=>{if(!e)return!1;if(Array.isArray(e)){let i=!1;for(let o=0;o{const i=`https://${new URL(e.proof.request.uri).hostname}/api/forgejo/v1/version`,n=await o.http.fn({url:i,format:c.JSON},r);return n&&"version"in n}};const br=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;const Fr=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/;const Sr=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;const kr=/^https:\/\/(.*)\/?/;const Ur={postprocess:async(e,t,r)=>{switch(t.result.type){case"Note":{e.profile.uri=t.result.attributedTo,e.profile.display=t.result.attributedTo;const i=await o.activitypub.fn({url:t.result.attributedTo},r).catch((e=>null));i&&(e.profile.display=`@${i.preferredUsername}@${new URL(e.proof.request.uri).hostname}`);break}case"Person":e.profile.display=`@${t.result.preferredUsername}@${new URL(e.proof.request.uri).hostname}`}const i=await Hr(new URL(e.proof.request.uri).hostname);return i&&(e.about.name=i.software.name,e.about.id=i.software.name,e.about.homepage=i.software.homepage),{claimData:e,proofData:t}}},Hr=async e=>{const t=await fetch(`https://${e}/.well-known/nodeinfo`).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).catch((e=>null));if(!t)return null;{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:e.software.homepage||"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}};const Rr=/^https:\/\/(.*)\/u\/(.*)\/?/;const Dr=/^https:\/\/(.*)/;const vr=/^https:\/\/(.*(?:askubuntu|mathoverflow|serverfault|stackapps|stackoverflow|superuser)|.+\.stackexchange)\.com\/users\/(\d+)/,Nr=/\.stackexchange$/;const Or=/^https:\/\/keybase.io\/(.*)\/?/;const Pr=/^https:\/\/opencollective\.com\/(.*)\/?/;const Gr=/^https:\/\/orcid\.org\/(.*)\/?/;const qr=/^https:\/\/pronouns\.cc\/@(.*)\/?/;const Kr=/^https:\/\/(?:discord\.gg|discord\.com\/invite)\/(.+)/;const xr={aspe:Ar,openpgp:hr,dns:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ur);return new Ye({about:{id:"dns",name:"DNS"},profile:{display:t[1],uri:`https://${t[1]}`,qr:null},claim:{uriRegularExpression:ur.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:A.DNS,accessRestriction:a.SERVER,data:{domain:t[1]}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["records","txt"]}]}})},reURI:ur,tests:[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]}),irc:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(lr);return new Ye({about:{id:"irc",name:"IRC"},profile:{display:`${t[1]}/${t[2]}`,uri:e,qr:null},claim:{uriRegularExpression:lr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:A.IRC,accessRestriction:a.SERVER,data:{domain:t[1],nick:t[2]}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:[]}]}})},reURI:lr,tests:[{uri:"irc://chat.ircserver.org/Alice1",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice?param=123",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice_bob",shouldMatch:!0},{uri:"https://chat.ircserver.org/alice",shouldMatch:!1}]}),xmpp:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(gr);return new Ye({about:{id:"xmpp",name:"XMPP",homepage:"https://xmpp.org"},profile:{display:`${t[1]}@${t[2]}`,uri:e,qr:e},claim:{uriRegularExpression:gr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:A.XMPP,accessRestriction:a.SERVER,data:{id:`${t[1]}@${t[2]}`}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:[]}]}})},reURI:gr,tests:[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]}),matrix:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(fr);if(!t[2])return null;const r=new URLSearchParams(t[2]);if(!r.has("org.keyoxide.e")||!r.has("org.keyoxide.r"))return null;const i=`${"!"!==r.get("org.keyoxide.r")[0]?"!":""}${r.get("org.keyoxide.r")}`,o=`${"$"!==r.get("org.keyoxide.e")[0]?"$":""}${r.get("org.keyoxide.e")}`,n=`https://matrix.to/#/@${t[1]}`,l=`https://matrix.to/#/${i}/${o}`;return new Ye({about:{id:"matrix",name:"Matrix",homepage:"https://matrix.org"},profile:{display:`@${t[1]}`,uri:n,qr:null},claim:{uriRegularExpression:fr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:l,fetcher:A.MATRIX,accessRestriction:a.GRANTED,data:{eventId:o,roomId:i}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["content","body"]}]}})},reURI:fr,tests:[{uri:"matrix:u/alice:matrix.domain.org?org.keyoxide.r=123:domain.org&org.keyoxide.e=123",shouldMatch:!0},{uri:"matrix:u/alice:matrix.domain.org",shouldMatch:!0},{uri:"matrix:u/@alice:matrix.domain.org?org.keyoxide.r=!123:domain.org&org.keyoxide.e=$123",shouldMatch:!0},{uri:"xmpp:alice@domain.org",shouldMatch:!1},{uri:"https://domain.org/@alice",shouldMatch:!1}]}),telegram:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ir);return new Ye({about:{id:"telegram",name:"Telegram",homepage:"https://telegram.org"},profile:{display:`@${t[1]}`,uri:`https://t.me/${t[1]}`,qr:`https://t.me/${t[1]}`},claim:{uriRegularExpression:Ir.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://t.me/${t[2]}`,fetcher:A.TELEGRAM,accessRestriction:a.GRANTED,data:{user:t[1],chat:t[2]}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["text"]}]}})},reURI:Ir,tests:[{uri:"https://t.me/alice?proof=foobar",shouldMatch:!0},{uri:"https://t.me/complex_user_1234?proof=complex_chat_1234",shouldMatch:!0},{uri:"https://t.me/foobar",shouldMatch:!1},{uri:"https://t.me/foobar?proof=",shouldMatch:!1},{uri:"https://t.me/?proof=foobar",shouldMatch:!1}]}),twitter:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(pr),r=new URLSearchParams;return r.set("url",t[0]),r.set("omit_script","1"),new Ye({about:{id:"twitter",name:"Twitter",homepage:"https://twitter.com"},profile:{display:`@${t[1]}`,uri:`https://twitter.com/${t[1]}`,qr:null},claim:{uriRegularExpression:pr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://publish.twitter.com/oembed?${r}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["html"]}]}})},reURI:pr,tests:[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]}),reddit:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(dr);return new Ye({about:{id:"reddit",name:"Reddit",homepage:"https://reddit.com"},profile:{display:t[1],uri:`https://www.reddit.com/user/${t[1]}`,qr:null},claim:{uriRegularExpression:dr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://www.reddit.com/user/${t[1]}/comments/${t[2]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["data","children","data","selftext"]}]}})},reURI:dr,tests:[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]}),liberapay:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Br);return new Ye({about:{id:"liberapay",name:"Liberapay",homepage:"https://liberapay.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Br.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://liberapay.com/${t[1]}/public.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["statements","content"]}]}})},reURI:Br,tests:[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),lichess:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(wr);return new Ye({about:{id:"lichess",name:"Lichess",homepage:"https://lichess.org"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:wr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lichess.org/api/user/${t[1]}`,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://lichess.org/api/user/${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.FINGERPRINT,encoding:s.PLAIN,relation:u.CONTAINS,path:["profile","links"]}]}})},reURI:wr,tests:[{uri:"https://lichess.org/@/Alice",shouldMatch:!0},{uri:"https://lichess.org/@/Alice/",shouldMatch:!0},{uri:"https://domain.org/@/Alice",shouldMatch:!1}]}),hackernews:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Cr);return new Ye({about:{id:"hackernews",name:"Hacker News",homepage:"https://news.ycombinator.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Cr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.HTML,relation:u.CONTAINS,path:["about"]}]}})},reURI:Cr,tests:[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]}),lobsters:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Qr);return new Ye({about:{id:"lobsters",name:"Lobsters",homepage:"https://lobste.rs"},profile:{display:t[1],uri:`https://lobste.rs/~${t[1]}`,qr:null},claim:{uriRegularExpression:Qr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lobste.rs/~${t[1]}.json`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://lobste.rs/~${t[1]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["about"]}]}})},reURI:Qr,tests:[{uri:"https://lobste.rs/~Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/~Alice",shouldMatch:!1},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]}),forem:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Er);return new Ye({about:{id:"forem",name:"Forem",homepage:"https://www.forem.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Er.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/api/articles/${t[2]}/${t[3]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["body_markdown"]}]}})},reURI:Er,tests:[{uri:"https://domain.org/alice/post",shouldMatch:!0},{uri:"https://domain.org/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),forgejo:Object.freeze({__proto__:null,functions:yr,processURI:function(e){const t=e.match(mr);return new Ye({about:{id:"forgejo",name:"Forgejo",homepage:"https://forgejo.org"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:mr.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["description"]}]}})},reURI:mr,tests:[{uri:"https://domain.org/alice/forgejo_proof",shouldMatch:!0},{uri:"https://domain.org/alice/forgejo_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),gitea:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(br);return new Ye({about:{id:"gitea",name:"Gitea",homepage:"https://about.gitea.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:br.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["description"]}]}})},reURI:br,tests:[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),gitlab:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Fr);return new Ye({about:{id:"gitlab",name:"GitLab",homepage:"https://about.gitlab.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Fr.toString(),uriIsAmbiguous:!0},proof:{request:{fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://${t[1]}/api/v4/projects/${t[2]}%2Fgitlab_proof`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["description"]}]}})},reURI:Fr,tests:[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]}),github:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Sr);return new Ye({about:{id:"github",name:"GitHub",homepage:"https://github.com"},profile:{display:t[1],uri:`https://github.com/${t[1]}`,qr:null},claim:{uriRegularExpression:Sr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://api.github.com/gists/${t[2]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["files","proof.md","content"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["files","openpgp.md","content"]}]}})},reURI:Sr,tests:[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]}),activitypub:Object.freeze({__proto__:null,functions:Ur,processURI:function(e){return new Ye({about:{id:"activitypub",name:"ActivityPub",homepage:"https://activitypub.rocks"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:kr.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.ACTIVITYPUB,accessRestriction:a.NONE,data:{url:e}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["summary"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["attachment","value"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["content"]}]}})},reURI:kr,tests:[{uri:"https://domain.org",shouldMatch:!0},{uri:"https://domain.org/@/alice/",shouldMatch:!0},{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/123456",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/123456",shouldMatch:!0},{uri:"http://domain.org/alice",shouldMatch:!1}]}),discourse:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Rr);return new Ye({about:{id:"discourse",name:"Discourse",homepage:"https://www.discourse.org"},profile:{display:`${t[2]}@${t[1]}`,uri:e,qr:null},claim:{uriRegularExpression:Rr.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://${t[1]}/u/${t[2]}.json`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["user","bio_raw"]}]}})},reURI:Rr,tests:[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]}),owncast:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Dr);return new Ye({about:{id:"owncast",name:"Owncast",homepage:"https://owncast.online"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Dr.toString(),uriIsAmbiguous:!0},proof:{request:{uri:`${e}/api/config`,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`${e}/api/config`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.FINGERPRINT,encoding:s.PLAIN,relation:u.CONTAINS,path:["socialHandles","url"]}]}})},reURI:Dr,tests:[{uri:"https://live.domain.org",shouldMatch:!0},{uri:"https://live.domain.org/",shouldMatch:!0},{uri:"https://domain.org/live",shouldMatch:!0},{uri:"https://domain.org/live/",shouldMatch:!0}]}),stackexchange:Object.freeze({__proto__:null,processURI:function(e){const[,t,r]=e.match(vr),i=t.replace(Nr,"");return new Ye({about:{id:"stackexchange",name:"Stack Exchange",homepage:"https://stackexchange.com"},profile:{display:`${r}@${i}`,uri:e,qr:null},claim:{uriRegularExpression:vr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://${t}.com/users/${r}?tab=profile`,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:`https://api.stackexchange.com/2.3/users/${r}?site=${i}&filter=!AH)b5JqVyImf`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["items","about_me"]}]}})},reURI:vr,tests:[{uri:"https://stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234?tab=topactivity",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice?tab=profile",shouldMatch:!0},{uri:"https://meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://serverfault.com/users/1234",shouldMatch:!0},{uri:"https://meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://gaming.meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://stackexchange.com/users/1234",shouldMatch:!1},{uri:"https://domain.com/users/1234",shouldMatch:!1},{uri:"https://meta.domain.com/users/1234",shouldMatch:!1}]}),keybase:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Or);return new Ye({about:{id:"keybase",name:"keybase",homepage:"https://keybase.io"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Or.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.FINGERPRINT,encoding:s.PLAIN,relation:u.CONTAINS,path:["them","public_keys","primary","key_fingerprint"]}]}})},reURI:Or,tests:[{uri:"https://keybase.io/Alice",shouldMatch:!0},{uri:"https://keybase.io/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]}),opencollective:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Pr);return new Ye({about:{id:"opencollective",name:"Open Collective",homepage:"https://opencollective.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Pr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.GRAPHQL,accessRestriction:a.NOCORS,data:{url:"https://api.opencollective.com/graphql/v2",query:`{ "query": "query { account(slug: \\"${t[1]}\\") { longDescription } }" }`}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["data","account","longDescription"]}]}})},reURI:Pr,tests:[{uri:"https://opencollective.com/Alice",shouldMatch:!0},{uri:"https://opencollective.com/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]}),orcid:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Gr);return new Ye({about:{id:"orcid",name:"ORCiD",homepage:"https://orcid.org/"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Gr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NONE,data:{url:e,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["person","biography","content"]},{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["person","researcher-urls","researcher-url","url","value"]},{format:h.URI,encoding:s.PLAIN,relation:u.EQUALS,path:["person","keywords","keyword","content"]}]}})},reURI:Gr,tests:[{uri:"https://orcid.org/0000-0000-0000-0000",shouldMatch:!0},{uri:"https://orcid.org/0000-0000-0000-0000/",shouldMatch:!0},{uri:"https://domain.org/0000-0000-0000-0000",shouldMatch:!1}]}),pronounscc:Object.freeze({__proto__:null,processURI:function(e){const t=e.match(qr);return new Ye({about:{id:"pronounscc",name:"pronouns.cc",homepage:"https://pronouns.cc"},profile:{display:`@${t[1]}`,uri:`https://pronouns.cc/@${t[1]}`,qr:null},claim:{uriRegularExpression:qr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://pronouns.cc/api/v1/users/${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["links"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["bio"]}]}})},reURI:qr,tests:[{uri:"https://pronouns.cc/@Alice",shouldMatch:!0},{uri:"https://pronouns.cc/@Alice/",shouldMatch:!0},{uri:"https://pronouns.cc/Alice",shouldMatch:!1},{uri:"https://pronouns.cc/Alice/",shouldMatch:!1}]}),discord:Object.freeze({__proto__:null,functions:{postprocess:async(e,t,r)=>(e.profile.display=t.result.inviter.username,{claimData:e,proofData:t})},processURI:function(e){const t=e.match(Kr);return new Ye({about:{id:"discord",name:"Discord",homepage:"https://discord.com"},profile:{display:"Unknown username",uri:null,qr:null},claim:{uriRegularExpression:Kr.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://discord.com/api/v10/invites/${t[1]}`,fetcher:A.HTTP,accessRestriction:a.NOCORS,data:{url:`https://discord.com/api/v10/invites/${t[1]}`,format:c.JSON}},response:{format:c.JSON},target:[{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["guild","description"]},{format:h.URI,encoding:s.PLAIN,relation:u.CONTAINS,path:["guild","name"]}]}})},reURI:Kr,tests:[{uri:"https://discord.com/invite/AbCdEf",shouldMatch:!0},{uri:"https://discord.com/invite/AbCdEfGh",shouldMatch:!0},{uri:"https://discord.gg/AbCdEf",shouldMatch:!0},{uri:"https://discord.gg/AbCdEfGh",shouldMatch:!0},{uri:"https://domain.com/invite/AbCdEf",shouldMatch:!1},{uri:"https://domain.gg/AbCdEf",shouldMatch:!1},{uri:"https://discord.com/invite/",shouldMatch:!1},{uri:"https://discord.gg/",shouldMatch:!1}]})},Tr=Object.keys(xr);var Mr=Object.freeze({__proto__:null,data:xr,list:Tr});const Jr={proxy:{hostname:null,policy:n.NEVER},claims:{activitypub:{url:null,privateKey:null},irc:{nick:null},matrix:{instance:null,accessToken:null},telegram:{token:null},xmpp:{service:null,username:null,password:null}}};var _r=Object.freeze({__proto__:null,opts:Jr});class Zr{constructor(e,t){if(e&&!z.isUri(e))throw new Error("Invalid URI");if(t)try{Z.default(t)}catch(e){throw new Error("Invalid fingerprint")}this._uri=e||"",this._fingerprint=t||"",this._status=l.INIT,this._matches=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"claimVersion"in e)switch(e.claimVersion){case 1:if(r=function(e){if(!("claimVersion"in e)||1!==e.claimVersion)return new Error("Invalid claim");const t=new Zr;t._uri=e.uri,t._fingerprint=e.fingerprint,t._matches=e.matches.map((e=>new Ye(e))),"init"===e.status&&(t._status=100);"matched"===e.status&&(0===e.matches.length&&(t._status=301),t._status=101);"result"in e.verification&&"errors"in e.verification||(t._status=400);e.verification.errors.length>0&&(t._status=400);e.verification.result&&e.verification.proof.viaProxy&&(t._status=201);e.verification.result&&!e.verification.proof.viaProxy&&(t._status=200);return t}(e),r instanceof Error)throw r;t=r;break;case 2:if(r=function(e){if(!("claimVersion"in e)||2!==e.claimVersion)return new Error("Invalid claim");const t=new Zr;return t._uri=e.uri,t._fingerprint=e.proofs[0],t._matches=e.matches.map((e=>new Ye(e))),t._status=e.status,t}(e),r instanceof Error)throw r;t=r;break;default:throw new Error("Invalid claim version")}return t}get uri(){return this._uri}get fingerprint(){return this._fingerprint}get status(){return this._status}get matches(){if(this._status===l.INIT)throw new Error("This claim has not yet been matched");return this._matches}set uri(e){if(this._status!==l.INIT)throw new Error("Cannot change the URI, this claim has already been matched");if(e.length>0&&!z.isUri(e))throw new Error("The URI was invalid");e=e.replace(/^\s+|\s+$/g,""),this._uri=e}set fingerprint(e){if(this._status===l.VERIFIED)throw new Error("Cannot change the fingerprint, this claim has already been verified");this._fingerprint=e}set status(e){throw new Error("Cannot change a claim's status")}set matches(e){throw new Error("Cannot change a claim's matches")}match(){if(this._status!==l.INIT)throw new Error("This claim was already matched");if(0===this._uri.length||!z.isUri(this._uri))throw new Error("This claim has no URI");this._matches=[],Tr.every(((e,t)=>{const r=xr[e];if(!r.reURI.test(this._uri))return!0;const i=r.processURI(this._uri);return!i||(i.claim.uriIsAmbiguous?(this._matches.push(i),!0):(this._matches=[i],!1))})),this._status=0===this._matches.length?l.NO_MATCHES:l.MATCHED}async verify(e){if(this._status===l.INIT)throw new Error("This claim has not yet been matched");if(this._status>=200)throw new Error("This claim has already been verified");if(0===this._fingerprint.length)throw new Error("This claim has no fingerprint");e=he(Jr,e||{}),0===this._matches.length&&(this.status=l.NO_MATCHES);for(let t=0;t=200)continue;let r,i=this._matches[t],o=null,n=null;try{n=await ze(i,e)}catch(e){r=e}if(n){o=await ir(n.result,i,this._fingerprint),o.proof={fetcher:n.fetcher,viaProxy:n.viaProxy};const t=xr[i.about.id];if(t.functions?.validate&&o.completed&&o.result)try{o.result=await t.functions.validate(i,n,o,e)}catch(e){}if(t.functions?.postprocess)try{({claimData:i,proofData:n}=await t.functions.postprocess(i,n,e))}catch(e){}}else o=o||{result:!1,completed:!0,proof:null,errors:[r]};this.isAmbiguous()&&!o.result||o.result&&(this._status=o.proof.viaProxy?l.VERIFIED_VIA_PROXY:l.VERIFIED,this._matches=[i])}this._status=this._status>=200?this._status:l.NO_PROOF_FOUND}isAmbiguous(){if(this._status=200&&this._status<300)&&(this._matches.length>1||this._matches[0].claim.uriIsAmbiguous)}toJSON(){let e=this._uri,t=null,r=null,i=null,o=null;return this._status>=l.MATCHED&&this._matches.length>0&&!this.isAmbiguous()&&(e=this._matches[0].profile.display,t=this._matches[0].profile.uri,r=this._matches[0].proof.request.uri,i=this._matches[0].about.name,o=this._matches[0].about.id),{claimVersion:2,uri:this._uri,proofs:[this._fingerprint],matches:this._matches.map((e=>e.toJSON())),status:this._status,display:{profileName:e,profileUrl:t,proofUrl:r,serviceProviderName:i,serviceProviderId:o}}}}class Lr{constructor(e,t){this.identifier=null,this.name=e,this.email=null,this.description=null,this.avatarUrl=null,this.themeColor=null,this.claims=t,this.isRevoked=!1}static fromJSON(e,t){let r,i;if("object"==typeof e&&t){if(2!==t)throw new Error("Invalid persona version");if(i=function(e){const t=e.claims.map((e=>Zr.fromJSON(e))),r=new Lr(e.name,t);return r.identifier=e.identifier,r.email=e.email,r.description=e.description,r.avatarUrl=e.avatarUrl,r.themeColor=e.avatarUrl,r.isRevoked=e.isRevoked,r}(e),i instanceof Error)throw i;r=i}return r}setIdentifier(e){this.identifier=e}setDescription(e){this.description=e}setEmailAddress(e){this.email=e}setAvatarUrl(e){this.avatarUrl=e}addClaim(e){this.claims.push(e)}revoke(){this.isRevoked=!0}toJSON(){return{identifier:this.identifier,name:this.name,email:this.email,description:this.description,avatarUrl:this.avatarUrl,themeColor:this.themeColor,isRevoked:this.isRevoked,claims:this.claims.map((e=>e.toJSON()))}}}class Vr{constructor(e,t,r){this.profileVersion=2,this.profileType=e,this.identifier=t,this.personas=r||[],this.primaryPersonaIndex=r.length>0?0:-1,this.publicKey={keyType:f.NONE,fingerprint:null,encoding:I.NONE,encodedKey:null,key:null,fetch:{method:p.NONE,query:null,resolvedUrl:null}},this.verifiers=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"profileVersion"in e){if(2!==e.profileVersion)throw new Error("Invalid profile version");if(r=function(e){if(!("profileVersion"in e)||2!==e.profileVersion)return new Error("Invalid profile");const t=e.personas.map((e=>Lr.fromJSON(e,2))),r=new Vr(e.profileType,e.identifier,t);return r.primaryPersonaIndex=e.primaryPersonaIndex,r.publicKey=e.publicKey,r.verifiers=e.verifiers,r}(e),r instanceof Error)throw r;t=r}return t}addVerifier(e,t){this.verifiers.push({name:e,url:t})}toJSON(){return{profileVersion:this.profileVersion,profileType:this.profileType,identifier:this.identifier,personas:this.personas.map((e=>e.toJSON())),primaryPersonaIndex:this.primaryPersonaIndex,publicKey:{keyType:this.publicKey.keyType,fingerprint:this.publicKey.fingerprint,encoding:this.publicKey.encoding,encodedKey:this.publicKey.encodedKey,fetch:{method:this.publicKey.fetch.method,query:this.publicKey.fetch.query,resolvedUrl:this.publicKey.fetch.resolvedUrl}},verifiers:this.verifiers}}}function Wr(e,t){return function(){return e.apply(t,arguments)}}const{toString:jr}=Object.prototype,{getPrototypeOf:Yr}=Object,zr=(Xr=Object.create(null),e=>{const t=jr.call(e);return Xr[t]||(Xr[t]=t.slice(8,-1).toLowerCase())});var Xr;const $r=e=>(e=e.toLowerCase(),t=>zr(t)===e),ei=e=>t=>typeof t===e,{isArray:ti}=Array,ri=ei("undefined");const ii=$r("ArrayBuffer");const oi=ei("string"),ni=ei("function"),Ai=ei("number"),si=e=>null!==e&&"object"==typeof e,ai=e=>{if("object"!==zr(e))return!1;const t=Yr(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ci=$r("Date"),hi=$r("File"),ui=$r("Blob"),li=$r("FileList"),gi=$r("URLSearchParams");function fi(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let i,o;if("object"!=typeof e&&(e=[e]),ti(e))for(i=0,o=e.length;i0;)if(i=r[o],t===i.toLowerCase())return i;return null}const pi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:ue,di=e=>!ri(e)&&e!==pi;const Bi=(wi="undefined"!=typeof Uint8Array&&Yr(Uint8Array),e=>wi&&e instanceof wi);var wi;const Ci=$r("HTMLFormElement"),Qi=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ei=$r("RegExp"),mi=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};fi(r,((r,o)=>{let n;!1!==(n=t(r,o,e))&&(i[o]=n||r)})),Object.defineProperties(e,i)},yi="abcdefghijklmnopqrstuvwxyz",bi="0123456789",Fi={DIGIT:bi,ALPHA:yi,ALPHA_DIGIT:yi+yi.toUpperCase()+bi};const Si=$r("AsyncFunction");var ki={isArray:ti,isArrayBuffer:ii,isBuffer:function(e){return null!==e&&!ri(e)&&null!==e.constructor&&!ri(e.constructor)&&ni(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ni(e.append)&&("formdata"===(t=zr(e))||"object"===t&&ni(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ii(e.buffer),t},isString:oi,isNumber:Ai,isBoolean:e=>!0===e||!1===e,isObject:si,isPlainObject:ai,isUndefined:ri,isDate:ci,isFile:hi,isBlob:ui,isRegExp:Ei,isFunction:ni,isStream:e=>si(e)&&ni(e.pipe),isURLSearchParams:gi,isTypedArray:Bi,isFileList:li,forEach:fi,merge:function e(){const{caseless:t}=di(this)&&this||{},r={},i=(i,o)=>{const n=t&&Ii(r,o)||o;ai(r[n])&&ai(i)?r[n]=e(r[n],i):ai(i)?r[n]=e({},i):ti(i)?r[n]=i.slice():r[n]=i};for(let e=0,t=arguments.length;e(fi(t,((t,i)=>{r&&ni(t)?e[i]=Wr(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,i)=>{let o,n,A;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),n=o.length;n-- >0;)A=o[n],i&&!i(A,e,t)||s[A]||(t[A]=e[A],s[A]=!0);e=!1!==r&&Yr(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:zr,kindOfTest:$r,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return-1!==i&&i===r},toArray:e=>{if(!e)return null;if(ti(e))return e;let t=e.length;if(!Ai(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const r=i.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const i=[];for(;null!==(r=e.exec(t));)i.push(r);return i},isHTMLForm:Ci,hasOwnProperty:Qi,hasOwnProp:Qi,reduceDescriptors:mi,freezeMethods:e=>{mi(e,((t,r)=>{if(ni(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const i=e[r];ni(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},i=e=>{e.forEach((e=>{r[e]=!0}))};return ti(e)?i(e):i(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Ii,global:pi,isContextDefined:di,ALPHABET:Fi,generateString:(e=16,t=Fi.ALPHA_DIGIT)=>{let r="";const{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r},isSpecCompliantForm:function(e){return!!(e&&ni(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,i)=>{if(si(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const o=ti(e)?[]:{};return fi(e,((e,t)=>{const n=r(e,i+1);!ri(n)&&(o[t]=n)})),t[i]=void 0,o}}return e};return r(e,0)},isAsyncFn:Si,isThenable:e=>e&&(si(e)||ni(e))&&ni(e.then)&&ni(e.catch)},Ui=[],Hi=[],Ri="undefined"!=typeof Uint8Array?Uint8Array:Array,Di=!1;function vi(){Di=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)Ui[t]=e[t],Hi[e.charCodeAt(t)]=t;Hi["-".charCodeAt(0)]=62,Hi["_".charCodeAt(0)]=63}function Ni(e,t,r){for(var i,o,n=[],A=t;A>18&63]+Ui[o>>12&63]+Ui[o>>6&63]+Ui[63&o]);return n.join("")}function Oi(e){var t;Di||vi();for(var r=e.length,i=r%3,o="",n=[],A=16383,s=0,a=r-i;sa?a:s+A));return 1===i?(t=e[r-1],o+=Ui[t>>2],o+=Ui[t<<4&63],o+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],o+=Ui[t>>10],o+=Ui[t>>4&63],o+=Ui[t<<2&63],o+="="),n.push(o),n.join("")}function Pi(e,t,r,i,o){var n,A,s=8*o-i-1,a=(1<>1,h=-7,u=r?o-1:0,l=r?-1:1,g=e[t+u];for(u+=l,n=g&(1<<-h)-1,g>>=-h,h+=s;h>0;n=256*n+e[t+u],u+=l,h-=8);for(A=n&(1<<-h)-1,n>>=-h,h+=i;h>0;A=256*A+e[t+u],u+=l,h-=8);if(0===n)n=1-c;else{if(n===a)return A?NaN:1/0*(g?-1:1);A+=Math.pow(2,i),n-=c}return(g?-1:1)*A*Math.pow(2,n-i)}function Gi(e,t,r,i,o,n){var A,s,a,c=8*n-o-1,h=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:n-1,f=i?1:-1,I=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,A=h):(A=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-A))<1&&(A--,a*=2),(t+=A+u>=1?l/a:l*Math.pow(2,1-u))*a>=2&&(A++,a/=2),A+u>=h?(s=0,A=h):A+u>=1?(s=(t*a-1)*Math.pow(2,o),A+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,o),A=0));o>=8;e[r+g]=255&s,g+=f,s/=256,o-=8);for(A=A<0;e[r+g]=255&A,g+=f,A/=256,c-=8);e[r+g-f]|=128*I}var qi={}.toString,Ki=Array.isArray||function(e){return"[object Array]"==qi.call(e)};function xi(){return Mi.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ti(e,t){if(xi()=xi())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xi().toString(16)+" bytes");return 0|e}function Wi(e){return!(null==e||!e._isBuffer)}function ji(e,t){if(Wi(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return mo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return yo(e).length;default:if(i)return mo(e).length;t=(""+t).toLowerCase(),i=!0}}function Yi(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return uo(this,t,r);case"utf8":case"utf-8":return so(this,t,r);case"ascii":return co(this,t,r);case"latin1":case"binary":return ho(this,t,r);case"base64":return Ao(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lo(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function zi(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function Xi(e,t,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Mi.from(t,i)),Wi(t))return 0===t.length?-1:$i(e,t,r,i,o);if("number"==typeof t)return t&=255,Mi.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):$i(e,[t],r,i,o);throw new TypeError("val must be string, number or Buffer")}function $i(e,t,r,i,o){var n,A=1,s=e.length,a=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;A=2,s/=2,a/=2,r/=2}function c(e,t){return 1===A?e[t]:e.readUInt16BE(t*A)}if(o){var h=-1;for(n=r;ns&&(r=s-a),n=r;n>=0;n--){for(var u=!0,l=0;lo&&(i=o):i=o;var n=t.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var A=0;A>8,o=r%256,n.push(o),n.push(i);return n}(t,e.length-r),e,r,i)}function Ao(e,t,r){return 0===t&&r===e.length?Oi(e):Oi(e.slice(t,r))}function so(e,t,r){r=Math.min(e.length,r);for(var i=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+u<=r)switch(u){case 1:c<128&&(h=c);break;case 2:128==(192&(n=e[o+1]))&&(a=(31&c)<<6|63&n)>127&&(h=a);break;case 3:n=e[o+1],A=e[o+2],128==(192&n)&&128==(192&A)&&(a=(15&c)<<12|(63&n)<<6|63&A)>2047&&(a<55296||a>57343)&&(h=a);break;case 4:n=e[o+1],A=e[o+2],s=e[o+3],128==(192&n)&&128==(192&A)&&128==(192&s)&&(a=(15&c)<<18|(63&n)<<12|(63&A)<<6|63&s)>65535&&a<1114112&&(h=a)}null===h?(h=65533,u=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),o+=u}return function(e){var t=e.length;if(t<=ao)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Mi.prototype.compare=function(e,t,r,i,o){if(!Wi(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=r)return 0;if(i>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var n=(o>>>=0)-(i>>>=0),A=(r>>>=0)-(t>>>=0),s=Math.min(n,A),a=this.slice(i,o),c=e.slice(t,r),h=0;ho)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var n=!1;;)switch(i){case"hex":return eo(this,e,t,r);case"utf8":case"utf-8":return to(this,e,t,r);case"ascii":return ro(this,e,t,r);case"latin1":case"binary":return io(this,e,t,r);case"base64":return oo(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,e,t,r);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),n=!0}},Mi.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ao=4096;function co(e,t,r){var i="";r=Math.min(e.length,r);for(var o=t;oi)&&(r=i);for(var o="",n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function fo(e,t,r,i,o,n){if(!Wi(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function Io(e,t,r,i){t<0&&(t=65535+t+1);for(var o=0,n=Math.min(e.length-r,2);o>>8*(i?o:1-o)}function po(e,t,r,i){t<0&&(t=4294967295+t+1);for(var o=0,n=Math.min(e.length-r,4);o>>8*(i?o:3-o)&255}function Bo(e,t,r,i,o,n){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function wo(e,t,r,i,o){return o||Bo(e,0,r,4),Gi(e,t,r,i,23,4),r+4}function Co(e,t,r,i,o){return o||Bo(e,0,r,8),Gi(e,t,r,i,52,8),r+8}Mi.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(o*=256);)i+=this[e+--t]*o;return i},Mi.prototype.readUInt8=function(e,t){return t||go(e,1,this.length),this[e]},Mi.prototype.readUInt16LE=function(e,t){return t||go(e,2,this.length),this[e]|this[e+1]<<8},Mi.prototype.readUInt16BE=function(e,t){return t||go(e,2,this.length),this[e]<<8|this[e+1]},Mi.prototype.readUInt32LE=function(e,t){return t||go(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Mi.prototype.readUInt32BE=function(e,t){return t||go(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Mi.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||go(e,t,this.length);for(var i=this[e],o=1,n=0;++n=(o*=128)&&(i-=Math.pow(2,8*t)),i},Mi.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||go(e,t,this.length);for(var i=t,o=1,n=this[e+--i];i>0&&(o*=256);)n+=this[e+--i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},Mi.prototype.readInt8=function(e,t){return t||go(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Mi.prototype.readInt16LE=function(e,t){t||go(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Mi.prototype.readInt16BE=function(e,t){t||go(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Mi.prototype.readInt32LE=function(e,t){return t||go(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Mi.prototype.readInt32BE=function(e,t){return t||go(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Mi.prototype.readFloatLE=function(e,t){return t||go(e,4,this.length),Pi(this,e,!0,23,4)},Mi.prototype.readFloatBE=function(e,t){return t||go(e,4,this.length),Pi(this,e,!1,23,4)},Mi.prototype.readDoubleLE=function(e,t){return t||go(e,8,this.length),Pi(this,e,!0,52,8)},Mi.prototype.readDoubleBE=function(e,t){return t||go(e,8,this.length),Pi(this,e,!1,52,8)},Mi.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||fo(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,n=0;for(this[t]=255&e;++n=0&&(n*=256);)this[t+o]=e/n&255;return t+r},Mi.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,1,255,0),Mi.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Mi.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,65535,0),Mi.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Io(this,e,t,!0),t+2},Mi.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,65535,0),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Io(this,e,t,!1),t+2},Mi.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,4294967295,0),Mi.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):po(this,e,t,!0),t+4},Mi.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,4294967295,0),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):po(this,e,t,!1),t+4},Mi.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*r-1);fo(this,e,t,r,o-1,-o)}var n=0,A=1,s=0;for(this[t]=255&e;++n>0)-s&255;return t+r},Mi.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*r-1);fo(this,e,t,r,o-1,-o)}var n=r-1,A=1,s=0;for(this[t+n]=255&e;--n>=0&&(A*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/A>>0)-s&255;return t+r},Mi.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,1,127,-128),Mi.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Mi.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,32767,-32768),Mi.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Io(this,e,t,!0),t+2},Mi.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,2,32767,-32768),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Io(this,e,t,!1),t+2},Mi.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,2147483647,-2147483648),Mi.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):po(this,e,t,!0),t+4},Mi.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||fo(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Mi.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):po(this,e,t,!1),t+4},Mi.prototype.writeFloatLE=function(e,t,r){return wo(this,e,t,!0,r)},Mi.prototype.writeFloatBE=function(e,t,r){return wo(this,e,t,!1,r)},Mi.prototype.writeDoubleLE=function(e,t,r){return Co(this,e,t,!0,r)},Mi.prototype.writeDoubleBE=function(e,t,r){return Co(this,e,t,!1,r)},Mi.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(n<1e3||!Mi.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(A+1===i){(t-=3)>-1&&n.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&n.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&n.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;n.push(r)}else if(r<2048){if((t-=2)<0)break;n.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;n.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return n}function yo(e){return function(e){var t,r,i,o,n,A;Di||vi();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");n="="===e[s-2]?2:"="===e[s-1]?1:0,A=new Ri(3*s/4-n),i=n>0?s-4:s;var a=0;for(t=0,r=0;t>16&255,A[a++]=o>>8&255,A[a++]=255&o;return 2===n?(o=Hi[e.charCodeAt(t)]<<2|Hi[e.charCodeAt(t+1)]>>4,A[a++]=255&o):1===n&&(o=Hi[e.charCodeAt(t)]<<10|Hi[e.charCodeAt(t+1)]<<4|Hi[e.charCodeAt(t+2)]>>2,A[a++]=o>>8&255,A[a++]=255&o),A}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Qo,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function bo(e,t,r,i){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Fo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function So(e,t,r,i,o){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),i&&(this.request=i),o&&(this.response=o)}ki.inherits(So,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:ki.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ko=So.prototype,Uo={};["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=>{Uo[e]={value:e}})),Object.defineProperties(So,Uo),Object.defineProperty(ko,"isAxiosError",{value:!0}),So.from=(e,t,r,i,o,n)=>{const A=Object.create(ko);return ki.toFlatObject(e,A,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),So.call(A,e.message,t,r,i,o),A.cause=e,A.name=e.name,n&&Object.assign(A,n),A};function Ho(e){return ki.isPlainObject(e)||ki.isArray(e)}function Ro(e){return ki.endsWith(e,"[]")?e.slice(0,-2):e}function Do(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ro(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const vo=ki.toFlatObject(ki,{},null,(function(e){return/^is[A-Z]/.test(e)}));function No(e,t,r){if(!ki.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(r=ki.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ki.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,n=r.dots,A=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ki.isSpecCompliantForm(t);if(!ki.isFunction(o))throw new TypeError("visitor must be a function");function a(e){if(null===e)return"";if(ki.isDate(e))return e.toISOString();if(!s&&ki.isBlob(e))throw new So("Blob is not supported. Use a Buffer instead.");return ki.isArrayBuffer(e)||ki.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Mi.from(e):e}function c(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(ki.endsWith(r,"{}"))r=i?r:r.slice(0,-2),e=JSON.stringify(e);else if(ki.isArray(e)&&function(e){return ki.isArray(e)&&!e.some(Ho)}(e)||(ki.isFileList(e)||ki.endsWith(r,"[]"))&&(s=ki.toArray(e)))return r=Ro(r),s.forEach((function(e,i){!ki.isUndefined(e)&&null!==e&&t.append(!0===A?Do([r],i,n):null===A?r:r+"[]",a(e))})),!1;return!!Ho(e)||(t.append(Do(o,r,n),a(e)),!1)}const h=[],u=Object.assign(vo,{defaultVisitor:c,convertValue:a,isVisitable:Ho});if(!ki.isObject(e))throw new TypeError("data must be an object");return function e(r,i){if(!ki.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+i.join("."));h.push(r),ki.forEach(r,(function(r,n){!0===(!(ki.isUndefined(r)||null===r)&&o.call(t,r,ki.isString(n)?n.trim():n,i,u))&&e(r,i?i.concat(n):[n])})),h.pop()}}(e),t}function Oo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Po(e,t){this._pairs=[],e&&No(e,this,t)}const Go=Po.prototype;function qo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ko(e,t,r){if(!t)return e;const i=r&&r.encode||qo,o=r&&r.serialize;let n;if(n=o?o(t,r):ki.isURLSearchParams(t)?t.toString():new Po(t,r).toString(i),n){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}Go.append=function(e,t){this._pairs.push([e,t])},Go.toString=function(e){const t=e?function(t){return e.call(this,t,Oo)}:Oo;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var xo=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ki.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},To={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Po,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Jo="undefined"!=typeof window&&"undefined"!=typeof document,_o=(Zo="undefined"!=typeof navigator&&navigator.product,Jo&&["ReactNative","NativeScript","NS"].indexOf(Zo)<0);var Zo;const Lo="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var Vo={...Object.freeze({__proto__:null,hasBrowserEnv:Jo,hasStandardBrowserEnv:_o,hasStandardBrowserWebWorkerEnv:Lo}),...Mo};function Wo(e){function t(e,r,i,o){let n=e[o++];if("__proto__"===n)return!0;const A=Number.isFinite(+n),s=o>=e.length;if(n=!n&&ki.isArray(i)?i.length:n,s)return ki.hasOwnProp(i,n)?i[n]=[i[n],r]:i[n]=r,!A;i[n]&&ki.isObject(i[n])||(i[n]=[]);return t(e,r,i[n],o)&&ki.isArray(i[n])&&(i[n]=function(e){const t={},r=Object.keys(e);let i;const o=r.length;let n;for(i=0;i{t(function(e){return ki.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,r,0)})),r}return null}const jo={transitional:To,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=ki.isObject(e);o&&ki.isHTMLForm(e)&&(e=new FormData(e));if(ki.isFormData(e))return i&&i?JSON.stringify(Wo(e)):e;if(ki.isArrayBuffer(e)||ki.isBuffer(e)||ki.isStream(e)||ki.isFile(e)||ki.isBlob(e))return e;if(ki.isArrayBufferView(e))return e.buffer;if(ki.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return No(e,new Vo.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,i){return Vo.isNode&&ki.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=ki.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return No(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(ki.isString(e))try{return(t||JSON.parse)(e),ki.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||jo.transitional,r=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&ki.isString(e)&&(r&&!this.responseType||i)){const r=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw So.from(e,So.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vo.classes.FormData,Blob:Vo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ki.forEach(["delete","get","head","post","put","patch"],(e=>{jo.headers[e]={}}));var Yo=jo;const zo=ki.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"]);const Xo=Symbol("internals");function $o(e){return e&&String(e).trim().toLowerCase()}function en(e){return!1===e||null==e?e:ki.isArray(e)?e.map(en):String(e)}function tn(e,t,r,i,o){return ki.isFunction(i)?i.call(this,t,r):(o&&(t=r),ki.isString(t)?ki.isString(i)?-1!==t.indexOf(i):ki.isRegExp(i)?i.test(t):void 0:void 0)}class rn{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(e,t,r){const o=$o(t);if(!o)throw new Error("header name must be a non-empty string");const n=ki.findKey(i,o);(!n||void 0===i[n]||!0===r||void 0===r&&!1!==i[n])&&(i[n||t]=en(e))}const n=(e,t)=>ki.forEach(e,((e,r)=>o(e,r,t)));return ki.isPlainObject(e)||e instanceof this.constructor?n(e,t):ki.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?n((e=>{const t={};let r,i,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),i=e.substring(o+1).trim(),!r||t[r]&&zo[r]||("set-cookie"===r?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=$o(e)){const r=ki.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}(e);if(ki.isFunction(t))return t.call(this,e,r);if(ki.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$o(e)){const r=ki.findKey(this,e);return!(!r||void 0===this[r]||t&&!tn(0,this[r],r,t))}return!1}delete(e,t){const r=this;let i=!1;function o(e){if(e=$o(e)){const o=ki.findKey(r,e);!o||t&&!tn(0,r[o],o,t)||(delete r[o],i=!0)}}return ki.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];e&&!tn(0,this[o],o,e,!0)||(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return ki.forEach(this,((i,o)=>{const n=ki.findKey(r,o);if(n)return t[n]=en(i),void delete t[o];const A=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();A!==o&&delete t[o],t[A]=en(i),r[A]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ki.forEach(this,((r,i)=>{null!=r&&!1!==r&&(t[i]=e&&ki.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Xo]=this[Xo]={accessors:{}}).accessors,r=this.prototype;function i(e){const i=$o(e);t[i]||(!function(e,t){const r=ki.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+r,{value:function(e,r,o){return this[i].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[i]=!0)}return ki.isArray(e)?e.forEach(i):i(e),this}}rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ki.reduceDescriptors(rn.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),ki.freezeMethods(rn);var on=rn;function nn(e,t){const r=this||Yo,i=t||r,o=on.from(i.headers);let n=i.data;return ki.forEach(e,(function(e){n=e.call(r,n,o.normalize(),t?t.status:void 0)})),o.normalize(),n}function An(e){return!(!e||!e.__CANCEL__)}function sn(e,t,r){So.call(this,null==e?"canceled":e,So.ERR_CANCELED,t,r),this.name="CanceledError"}ki.inherits(sn,So,{__CANCEL__:!0});var an=Vo.hasStandardBrowserEnv?{write(e,t,r,i,o,n){const A=[e+"="+encodeURIComponent(t)];ki.isNumber(r)&&A.push("expires="+new Date(r).toGMTString()),ki.isString(i)&&A.push("path="+i),ki.isString(o)&&A.push("domain="+o),!0===n&&A.push("secure"),document.cookie=A.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function cn(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var hn=Vo.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function i(r){let i=r;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=i(window.location.href),function(e){const t=ki.isString(e)?i(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function un(e,t){let r=0;const i=function(e,t){e=e||10;const r=new Array(e),i=new Array(e);let o,n=0,A=0;return t=void 0!==t?t:1e3,function(s){const a=Date.now(),c=i[A];o||(o=a),r[n]=s,i[n]=a;let h=A,u=0;for(;h!==n;)u+=r[h++],h%=e;if(n=(n+1)%e,n===A&&(A=(A+1)%e),a-o{const n=o.loaded,A=o.lengthComputable?o.total:void 0,s=n-r,a=i(s);r=n;const c={loaded:n,total:A,progress:A?n/A:void 0,bytes:s,rate:a||void 0,estimated:a&&A&&n<=A?(A-n)/a:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}var ln="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let i=e.data;const o=on.from(e.headers).normalize();let n,A,{responseType:s,withXSRFToken:a}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}if(ki.isFormData(i))if(Vo.hasStandardBrowserEnv||Vo.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(A=o.getContentType())){const[e,...t]=A?A.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=cn(e.baseURL,e.url);function l(){if(!h)return;const i=on.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new So("Request failed with status code "+r.status,[So.ERR_BAD_REQUEST,So.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:i,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Ko(u,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=l:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(l)},h.onabort=function(){h&&(r(new So("Request aborted",So.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new So("Network Error",So.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||To;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new So(t,i.clarifyTimeoutError?So.ETIMEDOUT:So.ECONNABORTED,e,h)),h=null},Vo.hasStandardBrowserEnv&&(a&&ki.isFunction(a)&&(a=a(e)),a||!1!==a&&hn(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&an.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===i&&o.setContentType(null),"setRequestHeader"in h&&ki.forEach(o.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),ki.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",un(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",un(e.onUploadProgress)),(e.cancelToken||e.signal)&&(n=t=>{h&&(r(!t||t.type?new sn(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);g&&-1===Vo.protocols.indexOf(g)?r(new So("Unsupported protocol "+g+":",So.ERR_BAD_REQUEST,e)):h.send(i||null)}))};const gn={http:null,xhr:ln};ki.forEach(gn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const fn=e=>`- ${e}`,In=e=>ki.isFunction(e)||null===e||!1===e;var pn=e=>{e=ki.isArray(e)?e:[e];const{length:t}=e;let r,i;const o={};for(let n=0;n`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new So("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(fn).join("\n"):" "+fn(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function dn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sn(null,e)}function Bn(e){dn(e),e.headers=on.from(e.headers),e.data=nn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return pn(e.adapter||Yo.adapter)(e).then((function(t){return dn(e),t.data=nn.call(e,e.transformResponse,t),t.headers=on.from(t.headers),t}),(function(t){return An(t)||(dn(e),t&&t.response&&(t.response.data=nn.call(e,e.transformResponse,t.response),t.response.headers=on.from(t.response.headers))),Promise.reject(t)}))}const wn=e=>e instanceof on?e.toJSON():e;function Cn(e,t){t=t||{};const r={};function i(e,t,r){return ki.isPlainObject(e)&&ki.isPlainObject(t)?ki.merge.call({caseless:r},e,t):ki.isPlainObject(t)?ki.merge({},t):ki.isArray(t)?t.slice():t}function o(e,t,r){return ki.isUndefined(t)?ki.isUndefined(e)?void 0:i(void 0,e,r):i(e,t,r)}function n(e,t){if(!ki.isUndefined(t))return i(void 0,t)}function A(e,t){return ki.isUndefined(t)?ki.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(r,o,n){return n in t?i(r,o):n in e?i(void 0,r):void 0}const a={url:n,method:n,data:n,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,responseEncoding:A,validateStatus:s,headers:(e,t)=>o(wn(e),wn(t),!0)};return ki.forEach(Object.keys(Object.assign({},e,t)),(function(i){const n=a[i]||o,A=n(e[i],t[i],i);ki.isUndefined(A)&&n!==s||(r[i]=A)})),r}const Qn="1.6.5",En={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{En[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const mn={};En.transitional=function(e,t,r){function i(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,n)=>{if(!1===e)throw new So(i(o," has been removed"+(t?" in "+t:"")),So.ERR_DEPRECATED);return t&&!mn[o]&&(mn[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,n)}};var yn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new So("options must be an object",So.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const n=i[o],A=t[n];if(A){const t=e[n],r=void 0===t||A(t,n,e);if(!0!==r)throw new So("option "+n+" must be "+r,So.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new So("Unknown option "+n,So.ERR_BAD_OPTION)}},validators:En};const bn=yn.validators;class Fn{constructor(e){this.defaults=e,this.interceptors={request:new xo,response:new xo}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Cn(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;void 0!==r&&yn.assertOptions(r,{silentJSONParsing:bn.transitional(bn.boolean),forcedJSONParsing:bn.transitional(bn.boolean),clarifyTimeoutError:bn.transitional(bn.boolean)},!1),null!=i&&(ki.isFunction(i)?t.paramsSerializer={serialize:i}:yn.assertOptions(i,{encode:bn.function,serialize:bn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=o&&ki.merge(o.common,o[t.method]);o&&ki.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=on.concat(n,o);const A=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,A.unshift(e.fulfilled,e.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)}));let h,u=0;if(!s){const e=[Bn.bind(this),void 0];for(e.unshift.apply(e,A),e.push.apply(e,a),h=e.length,c=Promise.resolve(t);u{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{r.subscribe(e),t=e})).then(e);return i.cancel=function(){r.unsubscribe(t)},i},e((function(e,i,o){r.reason||(r.reason=new sn(e,i,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new kn((function(t){e=t})),cancel:e}}}var Un=kn;const Hn={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};Object.entries(Hn).forEach((([e,t])=>{Hn[t]=e}));var Rn=Hn;const Dn=function e(t){const r=new Sn(t),i=Wr(Sn.prototype.request,r);return ki.extend(i,Sn.prototype,r,{allOwnKeys:!0}),ki.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Cn(t,r))},i}(Yo);Dn.Axios=Sn,Dn.CanceledError=sn,Dn.CancelToken=Un,Dn.isCancel=An,Dn.VERSION=Qn,Dn.toFormData=No,Dn.AxiosError=So,Dn.Cancel=Dn.CanceledError,Dn.all=function(e){return Promise.all(e)},Dn.spread=function(e){return function(t){return e.apply(null,t)}},Dn.isAxiosError=function(e){return ki.isObject(e)&&!0===e.isAxiosError},Dn.mergeConfig=Cn,Dn.AxiosHeaders=on,Dn.formToJSON=e=>Wo(ki.isHTMLForm(e)?new FormData(e):e),Dn.getAdapter=pn,Dn.HttpStatusCode=Rn,Dn.default=Dn;var vn=Dn,Nn=Q(Object.freeze({__proto__:null,default:{}}));var On=C(class{constructor(e="https://keyserver.ubuntu.com"){this._baseUrl=e,this._fetch="function"==typeof globalThis.fetch?globalThis.fetch:Nn}lookup(e){let t=this._baseUrl+"/pks/lookup?op=get&options=mr&search=";const r=this._fetch;if(e.keyId)t+="0x"+encodeURIComponent(e.keyId);else{if(!e.query)throw new Error("You must provide a query parameter!");t+=encodeURIComponent(e.query)}return r(t).then((function(e){if(200===e.status)return e.text()})).then((function(e){if(e&&!(e.indexOf("-----END PGP PUBLIC KEY BLOCK-----")<0))return e.trim()}))}upload(e){const t=this._baseUrl+"/pks/add";return(0,this._fetch)(t,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"keytext="+encodeURIComponent(e)})}}),Pn=Q(Object.freeze({__proto__:null,default:{}}));var Gn=class{constructor(){this._fetch="function"==typeof globalThis.fetch?globalThis.fetch:Nn;const{subtle:e}=globalThis.crypto||Pn.webcrypto||new Nn.Crypto;this._subtle=e}async lookup(e){const t=this._fetch;if(!e.email)throw new Error("You must provide an email parameter!");if("string"!=typeof e.email||!e.email.includes("@"))throw new Error("Invalid e-mail address.");const[r,i]=e.email.split("@"),o=(new TextEncoder).encode(r.toLowerCase()),n=function(e){if(0===e.length)return"";const t="ybndrfg8ejkmcpqxot1uwisza345h769",r=5,i=31;let o=e[0],n=1,A=8,s="";for(;A>0||n>A]}return s}(new Uint8Array(await this._subtle.digest("SHA-1",o))),A=encodeURIComponent(r),s=`https://openpgpkey.${i}/.well-known/openpgpkey/${i}/hu/${n}?l=${A}`,a=`https://${i}/.well-known/openpgpkey/hu/${n}?l=${A}`;let c;try{if(c=await t(s),200!==c.status)throw new Error("Advanced WKD lookup failed: "+c.statusText)}catch(e){if(c=await t(a),200!==c.status)throw new Error("Direct WKD lookup failed: "+c.statusText)}return new Uint8Array(await c.arrayBuffer())}},qn=C(Gn);async function Kn(e,r="keys.openpgp.org"){const i=new On(`https://${r??"keys.openpgp.org"}`),o={query:e},n=await i.lookup(o).catch((e=>{throw new Error(`Key does not exist or could not be fetched (${e})`)}));if(!n)throw new Error("Key does not exist or could not be fetched");const A=await t.readKey({armoredKey:n}).catch((e=>{throw new Error(`Key could not be read (${e})`)})),s=await _n(A);return s.publicKey.fetch.method=p.HKP,s.publicKey.fetch.query=e,s}async function xn(e){const r=new qn,i={email:e},o=await r.lookup(i).catch((e=>{throw new Error(`Key does not exist or could not be fetched (${e})`)}));if(!o)throw new Error("Key does not exist or could not be fetched");const n=await t.readKey({binaryKey:o}).catch((e=>{throw new Error(`Key could not be read (${e})`)})),A=await _n(n);return A.publicKey.fetch.method=p.WKD,A.publicKey.fetch.query=e,A}async function Tn(e,r){const i=`https://keybase.io/${e}/pgp_keys.asc?fingerprint=${r}`;let o;try{o=await vn.get(i,{responseType:"text"}).then((e=>{if(200===e.status)return e})).then((e=>e.data))}catch(e){throw new Error(`Error fetching Keybase key: ${e.message}`)}const n=await t.readKey({armoredKey:o}).catch((e=>{throw new Error(`Key does not exist or could not be fetched (${e})`)})),A=await _n(n);return A.publicKey.fetch.method=p.HTTP,A.publicKey.fetch.query=null,A.publicKey.fetch.resolvedUrl=i,A}async function Mn(e){const r=await t.readKey({armoredKey:e}).catch((e=>{throw new Error(`Key could not be read (${e})`)}));return await _n(r)}async function Jn(e){if(!z.isUri(e))throw new Error("Invalid URI");const t=e.match(/([a-zA-Z0-9]*):([a-zA-Z0-9@._=+-]*)(?::([a-zA-Z0-9@._=+-]*))?/);if(!t[1])throw new Error("Invalid URI");switch(t[1]){case"hkp":return await Kn(t[3]?t[3]:t[2],t[3]?t[2]:null);case"wkd":return await xn(t[2]);case"kb":return await Tn(t[2],t.length>=4?t[3]:null);default:throw new Error("Invalid URI protocol")}}async function _n(e){if(!(e&&e instanceof t.PublicKey))throw new Error("Invalid public key");const r=e.getFingerprint(),i=await e.getPrimaryUser(),o=e.users,n=[];o.forEach(((e,t)=>{if(!e.userID)return;const i=new Lr(e.userID.name,[]);if(i.setIdentifier(e.userID.userID),i.setDescription(e.userID.comment),i.setEmailAddress(e.userID.email),"selfCertifications"in e&&e.selfCertifications.length>0){const t=e.selfCertifications.sort(((e,t)=>t.created.getTime()-e.created.getTime()))[0];t.revoked&&i.revoke();const o=t.rawNotations;i.claims=o.filter((({name:e,humanReadable:t})=>t&&("proof@ariadne.id"===e||"proof@metacode.biz"===e))).map((({value:e})=>new Zr((new TextDecoder).decode(e),`openpgp4fpr:${r}`)))}n.push(i)}));const A=new Vr(g.OPENPGP,`openpgp4fpr:${r}`,n);return A.primaryPersonaIndex=i.index,A.publicKey.keyType=f.OPENPGP,A.publicKey.fingerprint=r,A.publicKey.encoding=I.ARMORED_PGP,A.publicKey.encodedKey=e.armor(),A.publicKey.key=e,A}var Zn=Object.freeze({__proto__:null,fetch:async function(e){const t=e.match(/([a-zA-Z0-9@._=+-]*)(?::([a-zA-Z0-9@._=+-]*))?/);let r=null;try{r=await Mn(e)}catch(e){}if(!r&&e.includes("@"))try{r=await xn(t[1])}catch(e){}if(r||(r=await Kn(t[2]?t[2]:t[1],t[2]?t[1]:null)),!r)throw new Error("Key does not exist or could not be fetched");return r},fetchHKP:Kn,fetchKeybase:Tn,fetchPlaintext:Mn,fetchURI:Jn,fetchWKD:xn,parsePublicKey:_n}),Ln=crypto;const Vn=e=>e instanceof CryptoKey;var Wn=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await Ln.subtle.digest(r,t))};const jn=new TextEncoder,Yn=new TextDecoder;const zn=e=>(e=>{let t=e;"string"==typeof t&&(t=jn.encode(t));const r=[];for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=Yn.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;ee.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function cA(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var hA=(e,...t)=>cA("Key must be ",e,...t);function uA(e,t,...r){return cA(`Key for the ${e} algorithm must be `,t,...r)}var lA=e=>Vn(e);const gA=["CryptoKey"];var fA=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function IA(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var pA=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:i,keyUsages:o}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new tA(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new tA('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new tA('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),n=[i,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:o];if("PBKDF2"===i.name)return Ln.subtle.importKey("raw",Xn(e.k),...n);const A={...e};return delete A.alg,delete A.use,Ln.subtle.importKey("jwk",A,...n)};var dA=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!lA(t))throw new TypeError(uA(e,t,...gA,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${gA.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!lA(t))throw new TypeError(uA(e,t,...gA));if("secret"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${gA.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};var BA=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var wA=async(e,t,r,i)=>{const o=await function(e,t,r){if(Vn(t))return aA(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(hA(t,...gA));return Ln.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(hA(t,...gA,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,o);const n=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new tA(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,o.algorithm);try{return await Ln.subtle.verify(n,o,r,i)}catch(e){return!1}};async function CA(e,t,r){var i;if(!IA(e))throw new rA("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new rA('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new rA("JWS Protected Header incorrect type");if(void 0===e.payload)throw new rA("JWS Payload missing");if("string"!=typeof e.signature)throw new rA("JWS Signature missing or incorrect type");if(void 0!==e.header&&!IA(e.header))throw new rA("JWS Unprotected Header incorrect type");let o={};if(e.protected)try{const t=Xn(e.protected);o=JSON.parse(Yn.decode(t))}catch(e){throw new rA("JWS Protected Header is invalid")}if(!fA(o,e.header))throw new rA("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...o,...e.header},A=function(e,t,r,i,o){if(void 0!==o.crit&&void 0===i.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return new Set;if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n;n=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of i.crit){if(!n.has(t))throw new tA(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n.get(t)&&void 0===i[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(i.crit)}(rA,new Map([["b64",!0]]),null==r?void 0:r.crit,o,n);let s=!0;if(A.has("b64")&&(s=o.b64,"boolean"!=typeof s))throw new rA('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:a}=n;if("string"!=typeof a||!a)throw new rA('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=r&&BA("algorithms",r.algorithms);if(c&&!c.has(a))throw new eA('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new rA("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new rA("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(o,e),h=!0),dA(a,t,"verify");const u=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let i=0;return e.forEach((e=>{r.set(e,i),i+=e.length})),r}(jn.encode(null!==(i=e.protected)&&void 0!==i?i:""),jn.encode("."),"string"==typeof e.payload?jn.encode(e.payload):e.payload);let l;try{l=Xn(e.signature)}catch(e){throw new rA("Failed to base64url decode the signature")}if(!await wA(a,t,l,u))throw new oA;let g;if(s)try{g=Xn(e.payload)}catch(e){throw new rA("Failed to base64url decode the payload")}else g="string"==typeof e.payload?jn.encode(e.payload):e.payload;const f={payload:g};return void 0!==e.protected&&(f.protectedHeader=o),void 0!==e.header&&(f.unprotectedHeader=e.header),h?{...f,key:t}:f}const QA=(e,t)=>{if("string"!=typeof e||!e)throw new iA(`${t} missing or invalid`)};const EA=Xn;function mA(e,t,r){var i;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var o=0;o=8&&(s-=8,A[c++]=255&a>>s)}if(s>=t.bits||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return A}function yA(e,t,r){void 0===r&&(r={});for(var i=r.pad,o=void 0===i||i,n=(1<t.bits;)s-=t.bits,A+=t.chars[n&a>>s];if(s&&(A+=t.chars[n&a<new Zr(e,t))),l=new Lr(a,u);c&&l.setDescription(c),h&&/^#([0-9A-F]{3}){1,2}$/i.test(h)&&(l.themeColor=h);const p=new Vr(g.ASP,t,[l]);switch(p.publicKey.fingerprint=n,p.publicKey.encoding=I.JWK,p.publicKey.encodedKey=JSON.stringify(i.jwk),p.publicKey.key=i.jwk,i.alg){case"ES256":p.publicKey.keyType=f.ES256;break;case"EdDSA":p.publicKey.keyType=f.EDDSA;break;default:p.publicKey.keyType=f.UNKNOWN}return p}async function RA(e){const t=await async function(e,t){if(!IA(e))throw new TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":QA(e.crv,'"crv" (Curve) Parameter'),QA(e.x,'"x" (X Coordinate) Parameter'),QA(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":QA(e.crv,'"crv" (Subtype of Key Pair) Parameter'),QA(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":QA(e.e,'"e" (Exponent) Parameter'),QA(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":QA(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new tA('"kty" (Key Type) Parameter missing or unsupported')}const i=jn.encode(JSON.stringify(r));return zn(await Wn(t,i))}(e,"sha512"),r=kA.parse(t,{loose:!0}).slice(0,16);return SA.stringify(r,{pad:!1})}var DA=Object.freeze({__proto__:null,computeJwkFingerprint:RA,fetchASPE:async function(e){const t=/aspe:(.*):(.*)/;if(!t.test(e))throw new Error("Invalid ASPE URI");const r=e.match(t),i=`https://${r[1]}/.well-known/aspe/id/${r[2].toUpperCase()}`;let o;try{o=await vn.get(i,{responseType:"text"}).then((e=>{if(200===e.status)return e})).then((e=>e.data))}catch(e){throw new Error(`Error fetching Keybase key: ${e.message}`)}const n=await HA(o,e);return n.publicKey.fetch.method=p.ASPE,n.publicKey.fetch.query=e,n.publicKey.fetch.resolvedUrl=i,n},parseProfileJws:HA});var vA=Object.freeze({__proto__:null,parse:async function(e){let r;try{r=await t.readCleartextMessage({cleartextMessage:e})}catch(e){throw new Error(`Signature could not be read (${e.message})`)}const i=r.signature.packets[0].issuerKeyID.toHex(),o=r.signature.packets[0].signersUserID,n=r.signature.packets[0].preferredKeyServer||"https://keys.openpgp.org/",A=r.getText(),s=[],a=[];A.split("\n").forEach(((e,t)=>{const r=e.match(/^([a-zA-Z0-9]*)=(.*)$/i);if(r)switch(r[1].toLowerCase()){case"key":s.push(r[2]);break;case"proof":a.push(new Zr(r[2]))}}));const c={query:null,data:null,method:null};if(s.length>0)try{c.query=s[0],c.data=(await Jn(c.query)).publicKey.key,c.method=c.query.split(":")[0]}catch(e){}if(!c.data&&o)try{c.query=o,c.data=(await Jn(`wkd:${o}`)).publicKey.key,c.method="wkd"}catch(e){}if(!c.data)try{const e=n.match(/^(.*:\/\/)?([^/]*)(?:\/)?$/i);c.query=i||o,c.data=(await Jn(`hkp:${e[2]}:${c.query}`)).publicKey.key,c.method="hkp"}catch(e){throw new Error("Public key not found")}const h=await c.data.getPrimaryUser(),u=c.data.getFingerprint(),l=await t.verify({message:r,verificationKeys:c.data}),{verified:p}=l.signatures[0];try{await p}catch(e){throw new Error(`Signature could not be verified (${e.message})`)}const d=new Lr(h.user.userID.name,[]);d.setIdentifier(h.user.userID.userID),d.setDescription(h.user.userID.comment||null),d.setEmailAddress(h.user.userID.email||null),d.claims=a.map((({value:e})=>new Zr((new TextDecoder).decode(e),`openpgp4fpr:${u}`)));const B=new Vr(g.OPENPGP,`openpgp4fpr:${u}`,[d]);return B.publicKey.keyType=f.OPENPGP,B.publicKey.encoding=I.ARMORED_PGP,B.publicKey.encodedKey=c.data.armor(),B.publicKey.key=c.data,B.publicKey.fetch.method=c.method,B.publicKey.fetch.query=c.query,B}});var NA=Object.freeze({__proto__:null,claim:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/claim.schema.json",title:"Identity claim",description:"Verifiable online identity claim",type:"object",properties:{claimVersion:{description:"The version of the claim",type:"integer"},uri:{description:"The claim URI",type:"string"},proofs:{description:"The proofs that would verify the claim",type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},matches:{description:"Service providers matched to the claim",type:"array",items:{$ref:"https://spec.keyoxide.org/2/serviceprovider.schema.json"},uniqueItems:!0},status:{type:"integer",description:"Claim status code"},display:{type:"object",properties:{profileName:{type:"string",description:"Account name to display in the user interface"},profileUrl:{type:["string","null"],description:"Profile URL to link to in the user interface"},proofUrl:{type:["string","null"],description:"Proof URL to link to in the user interface"},serviceProviderName:{type:["string","null"],description:"Name of the service provider to display in the user interface"},serviceProviderId:{type:["string","null"],description:"Id of the service provider"}}}},required:["claimVersion","uri","proofs","status","display"],additionalProperties:!1},persona:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/persona.schema.json",title:"Profile",description:"Keyoxide persona with identity claims",type:"object",properties:{identifier:{description:"Identifier of the persona",type:["string","null"]},name:{description:"Name of the persona",type:"string"},email:{description:"Email address of the persona",type:["string","null"]},description:{description:"Description of the persona",type:["string","null"]},avatarUrl:{description:"URL to an avatar image",type:["string","null"]},themeColor:{description:"Profile page theme color",type:["string","null"]},isRevoked:{type:"boolean"},claims:{description:"A list of identity claims",type:"array",items:{$ref:"https://spec.keyoxide.org/2/claim.schema.json"},uniqueItems:!0}},required:["name","claims"],additionalProperties:!1},profile:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/profile.schema.json",title:"Profile",description:"Keyoxide profile with personas",type:"object",properties:{profileVersion:{description:"The version of the profile",type:"integer"},profileType:{description:"The type of the profile [openpgp, asp]",type:"string"},identifier:{description:"Identifier of the profile (email, fingerprint, URI)",type:"string"},personas:{description:"The personas inside the profile",type:"array",items:{$ref:"https://spec.keyoxide.org/2/persona.schema.json"},minItems:1,uniqueItems:!0},primaryPersonaIndex:{description:"The index of the primary persona",type:"integer"},publicKey:{description:"The cryptographic key associated with the profile",type:"object",properties:{keyType:{description:"The type of cryptographic key [eddsa, es256, openpgp, none]",type:"string"},encoding:{description:"The encoding of the cryptographic key [pem, jwk, armored_pgp, none]",type:"string"},encodedKey:{description:"The encoded cryptographic key (PEM, stringified JWK, ...)",type:["string","null"]},fetch:{description:"Details on how to fetch the public key",type:"object",properties:{method:{description:"The method to fetch the key [aspe, hkp, wkd, http, none]",type:"string"},query:{description:"The query to fetch the key",type:["string","null"]},resolvedUrl:{description:"The URL the method eventually resolved to",type:["string","null"]}}}},required:["keyType","fetch"]},verifiers:{description:"A list of links to verifiers",type:"array",items:{type:"object",properties:{name:{description:"Name of the verifier site",type:"string"},url:{description:"URL to the profile page on the verifier site",type:"string"}}},uniqueItems:!0}},required:["profileVersion","profileType","identifier","personas","primaryPersonaIndex","publicKey","verifiers"],additionalProperties:!1},serviceprovider:{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://spec.keyoxide.org/2/serviceprovider.schema.json",title:"Service provider",description:"A service provider that can be matched to identity claims",type:"object",properties:{about:{description:"Details about the service provider",type:"object",properties:{name:{description:"Full name of the service provider",type:"string"},id:{description:"Identifier of the service provider (no whitespace or symbols, lowercase)",type:"string"},homepage:{description:"URL to the homepage of the service provider",type:["string","null"]}}},profile:{description:"What the profile would look like if the match is correct",type:"object",properties:{display:{description:"Profile name to be displayed",type:"string"},uri:{description:"URI or URL for public access to the profile",type:"string"},qr:{description:"URI or URL associated with the profile usually served as a QR code",type:["string","null"]}}},claim:{description:"Details from the claim matching process",type:"object",properties:{uriRegularExpression:{description:"Regular expression used to parse the URI",type:"string"},uriIsAmbiguous:{description:"Whether this match automatically excludes other matches",type:"boolean"}}},proof:{description:"Information for the proof verification process",type:"object",properties:{request:{description:"Details to request the potential proof",type:"object",properties:{uri:{description:"Location of the proof",type:["string","null"]},accessRestriction:{description:"Type of access restriction [none, nocors, granted, server]",type:"string"},fetcher:{description:"Name of the fetcher to use",type:"string"},data:{description:"Data needed by the fetcher or proxy to request the proof",type:"object",additionalProperties:!0}}},response:{description:"Details about the expected response",type:"object",properties:{format:{description:"Expected format of the proof [text, json]",type:"string"}}},target:{description:"Details about the target located in the response",type:"array",items:{type:"object",properties:{format:{description:"How is the proof formatted [uri, fingerprint]",type:"string"},encoding:{description:"How is the proof encoded [plain, html, xml]",type:"string"},relation:{description:"How are the response and the target related [contains, equals]",type:"string"},path:{description:"Path to the target location if the response is JSON",type:"array",items:{type:"string"}}}}}}}},required:["about","profile","claim","proof"],additionalProperties:!1}});return e.fetcher=o,e.Claim=Zr,e.Persona=Lr,e.Profile=Vr,e.ServiceProvider=Ye,e.ServiceProviderDefinitions=Mr,e.asp=DA,e.defaults=_r,e.enums=B,e.openpgp=Zn,e.proofs=ot,e.schemas=NA,e.signatures=vA,e.utils=je,e.verifications=or,e}({},openpgp); diff --git a/dist/doip.fetchers.js b/dist/doip.fetchers.js index 384c822..c2e710c 100644 --- a/dist/doip.fetchers.js +++ b/dist/doip.fetchers.js @@ -6002,7 +6002,7 @@ var doipFetchers = (function (exports) { * doip.js library version * @constant {string} */ - const version = '2.0.0'; + const version = '2.0.1'; /* Copyright 2022 Yarmo Mackenbach @@ -11161,7 +11161,7 @@ var doipFetchers = (function (exports) { homepage: 'https://discord.com' }, profile: { - display: null, + display: 'Unknown username', uri: null, qr: null }, diff --git a/dist/doip.fetchers.min.js b/dist/doip.fetchers.min.js index f5002dd..3dc75fa 100644 --- a/dist/doip.fetchers.min.js +++ b/dist/doip.fetchers.min.js @@ -1,4 +1,4 @@ -var doipFetchers=function(e){"use strict";var t=Object.freeze({__proto__:null,get activitypub(){return Or},get aspe(){return Ww},get dns(){return Jw},get graphql(){return Vw},get http(){return Xw},get irc(){return MB},get matrix(){return UB},get openpgp(){return DB},get telegram(){return RB},get xmpp(){return cS}}),r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,o=(s=Object.create(null),e=>{const t=i.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const c=e=>(e=e.toLowerCase(),t=>o(t)===e),u=e=>t=>typeof t===e,{isArray:h}=Array,l=u("undefined");const f=c("ArrayBuffer");const d=u("string"),p=u("function"),g=u("number"),A=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==o(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=c("Date"),b=c("File"),w=c("Blob"),v=c("FileList"),I=c("URLSearchParams");function E(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),h(e))for(n=0,i=e.length;n0;)if(n=r[i],t===n.toLowerCase())return n;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r,_=e=>!l(e)&&e!==C;const k=(S="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>S&&e instanceof S);var S;const Q=c("HTMLFormElement"),x=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),P=c("RegExp"),M=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};E(r,((r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)})),Object.defineProperties(e,n)},U="abcdefghijklmnopqrstuvwxyz",D="0123456789",R={DIGIT:D,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+D};const F=c("AsyncFunction");var T={isArray:h,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:d,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:y,isUndefined:l,isDate:m,isFile:b,isBlob:w,isRegExp:P,isFunction:p,isStream:e=>A(e)&&p(e.pipe),isURLSearchParams:I,isTypedArray:k,isFileList:v,forEach:E,merge:function e(){const{caseless:t}=_(this)&&this||{},r={},n=(n,i)=>{const a=t&&B(r,i)||i;y(r[a])&&y(n)?r[a]=e(r[a],n):y(n)?r[a]=e({},n):h(n)?r[a]=n.slice():r[a]=n};for(let e=0,t=arguments.length;e(E(t,((t,i)=>{r&&p(t)?e[i]=n(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(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)},toFlatObject:(e,t,r,n)=>{let i,o,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:c,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Q,hasOwnProperty:x,hasOwnProp:x,reduceDescriptors:M,freezeMethods:e=>{M(e,((t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return h(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:B,global:C,isContextDefined:_,ALPHABET:R,generateString:(e=16,t=R.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(A(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=h(e)?[]:{};return E(e,((e,t)=>{const a=r(e,n+1);!l(a)&&(i[t]=a)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:F,isThenable:e=>e&&(A(e)||p(e))&&p(e.then)&&p(e.catch)},q=[],O=[],K="undefined"!=typeof Uint8Array?Uint8Array:Array,H=!1;function N(){H=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)q[t]=e[t],O[e.charCodeAt(t)]=t;O["-".charCodeAt(0)]=62,O["_".charCodeAt(0)]=63}function L(e,t,r){for(var n,i,a=[],o=t;o>18&63]+q[i>>12&63]+q[i>>6&63]+q[63&i]);return a.join("")}function G(e){var t;H||N();for(var r=e.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;sc?c:s+o));return 1===n?(t=e[r-1],i+=q[t>>2],i+=q[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=q[t>>10],i+=q[t>>4&63],i+=q[t<<2&63],i+="="),a.push(i),a.join("")}function j(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,h=-7,l=r?i-1:0,f=r?-1:1,d=e[t+l];for(l+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+l],l+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+e[t+l],l+=f,h-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)}function z(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,h=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?f/c:f*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=h?(s=0,o=h):o+l>=1?(s=(t*c-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*g}var W={}.toString,Z=Array.isArray||function(e){return"[object Array]"==W.call(e)};$.TYPED_ARRAY_SUPPORT=void 0===r.TYPED_ARRAY_SUPPORT||r.TYPED_ARRAY_SUPPORT;var J=V();function V(){return $.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Y(e,t){if(V()=V())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V().toString(16)+" bytes");return 0|e}function ie(e){return!(null==e||!e._isBuffer)}function ae(e,t){if(ie(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Me(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ue(e).length;default:if(n)return Me(e).length;t=(""+t).toLowerCase(),n=!0}}function oe(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ve(this,t,r);case"utf8":case"utf-8":return ye(this,t,r);case"ascii":return be(this,t,r);case"latin1":case"binary":return we(this,t,r);case"base64":return Ae(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function se(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ce(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=$.from(t,n)),ie(t))return 0===t.length?-1:ue(e,t,r,n,i);if("number"==typeof t)return t&=255,$.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ue(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ue(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var h=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var l=!0,f=0;fi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function Ae(e,t,r){return 0===t&&r===e.length?G(e):G(e.slice(t,r))}function ye(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(h=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(h=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(h=c)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(e){var t=e.length;if(t<=me)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},$.prototype.compare=function(e,t,r,n,i){if(!ie(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return he(this,e,t,r);case"utf8":case"utf-8":return le(this,e,t,r);case"ascii":return fe(this,e,t,r);case"latin1":case"binary":return de(this,e,t,r);case"base64":return pe(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},$.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var me=4096;function be(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function Be(e,t,r,n,i,a){if(!ie(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Ce(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function _e(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function ke(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Se(e,t,r,n,i){return i||ke(e,0,r,4),z(e,t,r,n,23,4),r+4}function Qe(e,t,r,n,i){return i||ke(e,0,r,8),z(e,t,r,n,52,8),r+8}$.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},$.prototype.readUInt8=function(e,t){return t||Ee(e,1,this.length),this[e]},$.prototype.readUInt16LE=function(e,t){return t||Ee(e,2,this.length),this[e]|this[e+1]<<8},$.prototype.readUInt16BE=function(e,t){return t||Ee(e,2,this.length),this[e]<<8|this[e+1]},$.prototype.readUInt32LE=function(e,t){return t||Ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},$.prototype.readUInt32BE=function(e,t){return t||Ee(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},$.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},$.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},$.prototype.readInt8=function(e,t){return t||Ee(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},$.prototype.readInt16LE=function(e,t){t||Ee(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},$.prototype.readInt16BE=function(e,t){t||Ee(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},$.prototype.readInt32LE=function(e,t){return t||Ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},$.prototype.readInt32BE=function(e,t){return t||Ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},$.prototype.readFloatLE=function(e,t){return t||Ee(e,4,this.length),j(this,e,!0,23,4)},$.prototype.readFloatBE=function(e,t){return t||Ee(e,4,this.length),j(this,e,!1,23,4)},$.prototype.readDoubleLE=function(e,t){return t||Ee(e,8,this.length),j(this,e,!0,52,8)},$.prototype.readDoubleBE=function(e,t){return t||Ee(e,8,this.length),j(this,e,!1,52,8)},$.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Be(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},$.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,1,255,0),$.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},$.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,65535,0),$.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ce(this,e,t,!0),t+2},$.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,65535,0),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ce(this,e,t,!1),t+2},$.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,4294967295,0),$.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):_e(this,e,t,!0),t+4},$.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,4294967295,0),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):_e(this,e,t,!1),t+4},$.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Be(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},$.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Be(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},$.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,1,127,-128),$.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},$.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,32767,-32768),$.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ce(this,e,t,!0),t+2},$.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,32767,-32768),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ce(this,e,t,!1),t+2},$.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,2147483647,-2147483648),$.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):_e(this,e,t,!0),t+4},$.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):_e(this,e,t,!1),t+4},$.prototype.writeFloatLE=function(e,t,r){return Se(this,e,t,!0,r)},$.prototype.writeFloatBE=function(e,t,r){return Se(this,e,t,!1,r)},$.prototype.writeDoubleLE=function(e,t,r){return Qe(this,e,t,!0,r)},$.prototype.writeDoubleBE=function(e,t,r){return Qe(this,e,t,!1,r)},$.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!$.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Ue(e){return function(e){var t,r,n,i,a,o;H||N();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new K(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=O[e.charCodeAt(t)]<<2|O[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=O[e.charCodeAt(t)]<<10|O[e.charCodeAt(t+1)]<<4|O[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(xe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function De(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Re(e){return null!=e&&(!!e._isBuffer||Fe(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Fe(e.slice(0,0))}(e))}function Fe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Te=Object.freeze({__proto__:null,Buffer:$,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),$.alloc(+e)},isBuffer:Re,kMaxLength:J});function qe(e,t,r,n,i){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),i&&(this.response=i)}T.inherits(qe,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:T.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Oe=qe.prototype,Ke={};["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=>{Ke[e]={value:e}})),Object.defineProperties(qe,Ke),Object.defineProperty(Oe,"isAxiosError",{value:!0}),qe.from=(e,t,r,n,i,a)=>{const o=Object.create(Oe);return T.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),qe.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};function He(e){return T.isPlainObject(e)||T.isArray(e)}function Ne(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function Le(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ne(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Ge=T.toFlatObject(T,{},null,(function(e){return/^is[A-Z]/.test(e)}));function je(e,t,r){if(!T.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=T.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!T.isUndefined(t[e])}))).metaTokens,i=r.visitor||u,a=r.dots,o=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&T.isSpecCompliantForm(t);if(!T.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(T.isDate(e))return e.toISOString();if(!s&&T.isBlob(e))throw new qe("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(e)||T.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):$.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(T.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(T.isArray(e)&&function(e){return T.isArray(e)&&!e.some(He)}(e)||(T.isFileList(e)||T.endsWith(r,"[]"))&&(s=T.toArray(e)))return r=Ne(r),s.forEach((function(e,n){!T.isUndefined(e)&&null!==e&&t.append(!0===o?Le([r],n,a):null===o?r:r+"[]",c(e))})),!1;return!!He(e)||(t.append(Le(i,r,a),c(e)),!1)}const h=[],l=Object.assign(Ge,{defaultVisitor:u,convertValue:c,isVisitable:He});if(!T.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!T.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),T.forEach(r,(function(r,a){!0===(!(T.isUndefined(r)||null===r)&&i.call(t,r,T.isString(a)?a.trim():a,n,l))&&e(r,n?n.concat(a):[a])})),h.pop()}}(e),t}function ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function We(e,t){this._pairs=[],e&&je(e,this,t)}const Ze=We.prototype;function Je(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ve(e,t,r){if(!t)return e;const n=r&&r.encode||Je,i=r&&r.serialize;let a;if(a=i?i(t,r):T.isURLSearchParams(t)?t.toString():new We(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Ze.append=function(e,t){this._pairs.push([e,t])},Ze.toString=function(e){const t=e?function(t){return e.call(this,t,ze)}:ze;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Ye=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){T.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$e={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:We,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const et="undefined"!=typeof window&&"undefined"!=typeof document,tt=(rt="undefined"!=typeof navigator&&navigator.product,et&&["ReactNative","NativeScript","NS"].indexOf(rt)<0);var rt;const nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var it={...Object.freeze({__proto__:null,hasBrowserEnv:et,hasStandardBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:nt}),...Xe};function at(e){function t(e,r,n,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&T.isArray(n)?n.length:a,s)return T.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!o;n[a]&&T.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],i)&&T.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n{t(function(e){return T.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const ot={transitional:$e,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=T.isObject(e);i&&T.isHTMLForm(e)&&(e=new FormData(e));if(T.isFormData(e))return n&&n?JSON.stringify(at(e)):e;if(T.isArrayBuffer(e)||T.isBuffer(e)||T.isStream(e)||T.isFile(e)||T.isBlob(e))return e;if(T.isArrayBufferView(e))return e.buffer;if(T.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return je(e,new it.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return it.isNode&&T.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=T.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return je(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(T.isString(e))try{return(t||JSON.parse)(e),T.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ot.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&T.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw qe.from(e,qe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:it.classes.FormData,Blob:it.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],(e=>{ot.headers[e]={}}));var st=ot;const ct=T.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"]);const ut=Symbol("internals");function ht(e){return e&&String(e).trim().toLowerCase()}function lt(e){return!1===e||null==e?e:T.isArray(e)?e.map(lt):String(e)}function ft(e,t,r,n,i){return T.isFunction(n)?n.call(this,t,r):(i&&(t=r),T.isString(t)?T.isString(n)?-1!==t.indexOf(n):T.isRegExp(n)?n.test(t):void 0:void 0)}class dt{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=ht(t);if(!i)throw new Error("header name must be a non-empty string");const a=T.findKey(n,i);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=lt(e))}const a=(e,t)=>T.forEach(e,((e,r)=>i(e,r,t)));return T.isPlainObject(e)||e instanceof this.constructor?a(e,t):T.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&ct[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=ht(e)){const r=T.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(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}(e);if(T.isFunction(t))return t.call(this,e,r);if(T.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ht(e)){const r=T.findKey(this,e);return!(!r||void 0===this[r]||t&&!ft(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=ht(e)){const i=T.findKey(r,e);!i||t&&!ft(0,r[i],i,t)||(delete r[i],n=!0)}}return T.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!ft(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return T.forEach(this,((n,i)=>{const a=T.findKey(r,i);if(a)return t[a]=lt(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();o!==i&&delete t[i],t[o]=lt(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return T.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&T.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ut]=this[ut]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ht(e);t[n]||(!function(e,t){const r=T.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return T.isArray(e)?e.forEach(n):n(e),this}}dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),T.reduceDescriptors(dt.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),T.freezeMethods(dt);var pt=dt;function gt(e,t){const r=this||st,n=t||r,i=pt.from(n.headers);let a=n.data;return T.forEach(e,(function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function At(e){return!(!e||!e.__CANCEL__)}function yt(e,t,r){qe.call(this,null==e?"canceled":e,qe.ERR_CANCELED,t,r),this.name="CanceledError"}T.inherits(yt,qe,{__CANCEL__:!0});var mt=it.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];T.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),T.isString(n)&&o.push("path="+n),T.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function bt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var wt=it.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=T.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function vt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[o];i||(i=c),r[a]=s,n[a]=c;let h=o,l=0;for(;h!==a;)l+=r[h++],h%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-i{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-r,c=n(s);r=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var It="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=pt.from(e.headers).normalize();let a,o,{responseType:s,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(T.isFormData(n))if(it.hasStandardBrowserEnv||it.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(o=i.getContentType())){const[e,...t]=o?o.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const l=bt(e.baseURL,e.url);function f(){if(!h)return;const n=pt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new qe("Request failed with status code "+r.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Ve(l,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=f:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(f)},h.onabort=function(){h&&(r(new qe("Request aborted",qe.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new qe("Network Error",qe.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||$e;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new qe(t,n.clarifyTimeoutError?qe.ETIMEDOUT:qe.ECONNABORTED,e,h)),h=null},it.hasStandardBrowserEnv&&(c&&T.isFunction(c)&&(c=c(e)),c||!1!==c&&wt(l))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&mt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in h&&T.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),T.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",vt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",vt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{h&&(r(!t||t.type?new yt(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);d&&-1===it.protocols.indexOf(d)?r(new qe("Unsupported protocol "+d+":",qe.ERR_BAD_REQUEST,e)):h.send(n||null)}))};const Et={http:null,xhr:It};T.forEach(Et,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Bt=e=>`- ${e}`,Ct=e=>T.isFunction(e)||null===e||!1===e;var _t=e=>{e=T.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new qe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Bt).join("\n"):" "+Bt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function kt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yt(null,e)}function St(e){kt(e),e.headers=pt.from(e.headers),e.data=gt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return _t(e.adapter||st.adapter)(e).then((function(t){return kt(e),t.data=gt.call(e,e.transformResponse,t),t.headers=pt.from(t.headers),t}),(function(t){return At(t)||(kt(e),t&&t.response&&(t.response.data=gt.call(e,e.transformResponse,t.response),t.response.headers=pt.from(t.response.headers))),Promise.reject(t)}))}const Qt=e=>e instanceof pt?e.toJSON():e;function xt(e,t){t=t||{};const r={};function n(e,t,r){return T.isPlainObject(e)&&T.isPlainObject(t)?T.merge.call({caseless:r},e,t):T.isPlainObject(t)?T.merge({},t):T.isArray(t)?t.slice():t}function i(e,t,r){return T.isUndefined(t)?T.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function a(e,t){if(!T.isUndefined(t))return n(void 0,t)}function o(e,t){return T.isUndefined(t)?T.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t)=>i(Qt(e),Qt(t),!0)};return T.forEach(Object.keys(Object.assign({},e,t)),(function(n){const a=c[n]||i,o=a(e[n],t[n],n);T.isUndefined(o)&&a!==s||(r[n]=o)})),r}const Pt="1.6.5",Mt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Mt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Ut={};Mt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new qe(n(i," has been removed"+(t?" in "+t:"")),qe.ERR_DEPRECATED);return t&&!Ut[i]&&(Ut[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var Dt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new qe("option "+a+" must be "+r,qe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new qe("Unknown option "+a,qe.ERR_BAD_OPTION)}},validators:Mt};const Rt=Dt.validators;class Ft{constructor(e){this.defaults=e,this.interceptors={request:new Ye,response:new Ye}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=xt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Dt.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),null!=n&&(T.isFunction(n)?t.paramsSerializer={serialize:n}:Dt.assertOptions(n,{encode:Rt.function,serialize:Rt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&T.merge(i.common,i[t.method]);i&&T.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=pt.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let h,l=0;if(!s){const e=[St.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),h=e.length,u=Promise.resolve(t);l{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new yt(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new qt((function(t){e=t}));return{token:t,cancel:e}}}var Ot=qt;const Kt={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};Object.entries(Kt).forEach((([e,t])=>{Kt[t]=e}));var Ht=Kt;const Nt=function e(t){const r=new Tt(t),i=n(Tt.prototype.request,r);return T.extend(i,Tt.prototype,r,{allOwnKeys:!0}),T.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(xt(t,r))},i}(st);Nt.Axios=Tt,Nt.CanceledError=yt,Nt.CancelToken=Ot,Nt.isCancel=At,Nt.VERSION=Pt,Nt.toFormData=je,Nt.AxiosError=qe,Nt.Cancel=Nt.CanceledError,Nt.all=function(e){return Promise.all(e)},Nt.spread=function(e){return function(t){return e.apply(null,t)}},Nt.isAxiosError=function(e){return T.isObject(e)&&!0===e.isAxiosError},Nt.mergeConfig=xt,Nt.AxiosHeaders=pt,Nt.formToJSON=e=>at(T.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=_t,Nt.HttpStatusCode=Ht,Nt.default=Nt;var Lt=Nt,Gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Wt={exports:{}},Zt={exports:{}};!function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var n=r(e);throw null===e?n="null":"object"===n&&(n=e.constructor.name),new TypeError("Expected a string but received a ".concat(n))}},e.exports=t.default,e.exports.default=t.default}(Zt,Zt.exports);var Jt=Zt.exports,Vt={exports:{}},Yt={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default}(Yt,Yt.exports);var $t=Yt.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,n.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var i=e.split("."),o=i[i.length-1];if(t.require_tld){if(i.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/\s/.test(o))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(o))return!1;return i.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var r=i(Jt),n=i($t);function i(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(Vt,Vt.exports);var Xt=Vt.exports,er=jt(Xt),tr={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(t),r=String(r),!r)return e(t,4)||e(t,6);if("4"===r)return o.test(t);if("6"===r)return c.test(t);return!1};var r,n=(r=Jt)&&r.__esModule?r:{default:r};var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),o=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(tr,tr.exports);var rr=tr.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,a.default)(t,c)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var o,l,f,d,p,g,A,y;if(A=e.split("#"),e=A.shift(),A=e.split("?"),e=A.shift(),(A=e.split("://")).length>1){if(o=A.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(o))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;A[0]=e.slice(2)}}if(""===(e=A.join("://")))return!1;if(A=e.split("/"),""===(e=A.shift())&&!t.require_host)return!0;if((A=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===A[0])return!1;if((l=A.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.split(":"),2),b=m[0],w=m[1];if(""===b&&""===w)return!1}d=A.join("@"),g=null,y=null;var v=d.match(u);v?(f="",y=v[1],g=v[2]||null):(f=(A=d.split(":")).shift(),A.length&&(g=A.join(":")));if(null!==g&&g.length>0){if(p=parseInt(g,10),!/^[0-9]+$/.test(g)||p<=0||p>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return h(f,t.host_whitelist);if(""===f&&!t.require_host)return!0;if(!((0,i.default)(f)||(0,n.default)(f,t)||y&&(0,i.default)(y,6)))return!1;if(f=f||y,t.host_blacklist&&h(f,t.host_blacklist))return!1;return!0};var r=o(Jt),n=o(Xt),i=o(rr),a=o($t);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)for(var r=1;r{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:5e3)})),i=new Promise(((r,n)=>{(async()=>{let i=!1;try{nr(t.claims.activitypub.url),i=!0}catch(e){}const a=new Date,{host:o,pathname:s,search:c}=new URL(e.url),u={host:o,date:a.toUTCString(),accept:"application/activity+json","User-Agent":`doipjs/${Tr}`};if(i&&Rr){const e=`(request-target): get ${s}${c}\nhost: ${o}\ndate: ${a.toUTCString()}`,r=Fr.createSign("SHA256");r.write(e),r.end();const n=r.sign(t.claims.activitypub.privateKey.replace(/\\n/g,"\n"),"base64");u.signature=`keyId="${t.claims.activitypub.url}#main-key",headers="(request-target) host date",signature="${n}",algorithm="rsa-sha256"`}Lt.get(e.url,{headers:u}).then((e=>e.data)).then((e=>{r(e)})).catch((e=>{n(e)}))})()}));return Promise.race([i,n]).finally((()=>{clearTimeout(r)}))}var Or=Object.freeze({__proto__:null,fn:qr,timeout:5e3}),Kr=crypto;const Hr=e=>e instanceof CryptoKey;var Nr=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await Kr.subtle.digest(r,t))};const Lr=new TextEncoder,Gr=new TextDecoder;const jr=e=>(e=>{let t=e;"string"==typeof t&&(t=Lr.encode(t));const r=[];for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=Gr.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;ee.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function nn(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var an=(e,...t)=>nn("Key must be ",e,...t);function on(e,t,...r){return nn(`Key for the ${e} algorithm must be `,t,...r)}var sn=e=>Hr(e);const cn=["CryptoKey"];var un=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function hn(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var ln=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new Jr(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Jr('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:i];if("PBKDF2"===n.name)return Kr.subtle.importKey("raw",zr(e.k),...a);const o={...e};return delete o.alg,delete o.use,Kr.subtle.importKey("jwk",o,...a)};var fn=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!sn(t))throw new TypeError(on(e,t,...cn,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${cn.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!sn(t))throw new TypeError(on(e,t,...cn));if("secret"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};var dn=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var pn=async(e,t,r,n)=>{const i=await function(e,t,r){if(Hr(t))return rn(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(an(t,...cn));return Kr.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(an(t,...cn,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,i);const a=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Jr(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,i.algorithm);try{return await Kr.subtle.verify(a,i,r,n)}catch(e){return!1}};async function gn(e,t,r){var n;if(!hn(e))throw new Vr("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Vr('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Vr("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Vr("JWS Payload missing");if("string"!=typeof e.signature)throw new Vr("JWS Signature missing or incorrect type");if(void 0!==e.header&&!hn(e.header))throw new Vr("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=zr(e.protected);i=JSON.parse(Gr.decode(t))}catch(e){throw new Vr("JWS Protected Header is invalid")}if(!un(i,e.header))throw new Vr("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a={...i,...e.header},o=function(e,t,r,n,i){if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of n.crit){if(!a.has(t))throw new Jr(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===n[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(n.crit)}(Vr,new Map([["b64",!0]]),null==r?void 0:r.crit,i,a);let s=!0;if(o.has("b64")&&(s=i.b64,"boolean"!=typeof s))throw new Vr('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:c}=a;if("string"!=typeof c||!c)throw new Vr('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=r&&dn("algorithms",r.algorithms);if(u&&!u.has(c))throw new Zr('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new Vr("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Vr("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(i,e),h=!0),fn(c,t,"verify");const l=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}(Lr.encode(null!==(n=e.protected)&&void 0!==n?n:""),Lr.encode("."),"string"==typeof e.payload?Lr.encode(e.payload):e.payload);let f;try{f=zr(e.signature)}catch(e){throw new Vr("Failed to base64url decode the signature")}if(!await pn(c,t,f,l))throw new $r;let d;if(s)try{d=zr(e.payload)}catch(e){throw new Vr("Failed to base64url decode the payload")}else d="string"==typeof e.payload?Lr.encode(e.payload):e.payload;const p={payload:d};return void 0!==e.protected&&(p.protectedHeader=i),void 0!==e.header&&(p.unprotectedHeader=e.header),h?{...p,key:t}:p}const An=(e,t)=>{if("string"!=typeof e||!e)throw new Yr(`${t} missing or invalid`)};const yn=zr;function mn(e,t,r){var n;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var i=0;i=8&&(s-=8,o[u++]=255&c>>s)}if(s>=t.bits||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o}function bn(e,t,r){void 0===r&&(r={});for(var n=r.pad,i=void 0===n||n,a=(1<t.bits;)s-=t.bits,o+=t.chars[a&c>>s];if(s&&(o+=t.chars[a&c<1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,Wn.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,"");else{if("string"!=typeof i)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in Zn.alphanumeric)return Zn.alphanumeric[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))};Bn.locales=void 0;var zn,Wn=(zn=Jt)&&zn.__esModule?zn:{default:zn},Zn=Cn;var Jn=Object.keys(Zn.alphanumeric);Bn.locales=Jn;var Vn={exports:{}};(function(e){e.exports.is_uri=r,e.exports.is_http_uri=n,e.exports.is_https_uri=i,e.exports.is_web_uri=a,e.exports.isUri=r,e.exports.isHttpUri=n,e.exports.isHttpsUri=i,e.exports.isWebUri=a;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var r,n,i,a,o,s="",c="";if(s=(r=t(e))[1],n=r[2],i=r[3],a=r[4],o=r[5],s&&s.length&&i.length>=0){if(n&&n.length){if(0!==i.length&&!/^\//.test(i))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return c+=s+":",n&&n.length&&(c+="//"+n),c+=i,a&&a.length&&(c+="?"+a),o&&o.length&&(c+="#"+o),c}}}function n(e,n){if(r(e)){var i,a,o,s,c="",u="",h="",l="";if(c=(i=t(e))[1],u=i[2],a=i[3],o=i[4],s=i[5],c){if(n){if("https"!=c.toLowerCase())return}else if("http"!=c.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(h=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),l+=c+":",l+="//"+u,h&&(l+=h),l+=a,o&&o.length&&(l+="?"+o),s&&s.length&&(l+="#"+s),l}}}function i(e){return n(e,!0)}function a(e){return n(e)||i(e)}})(Vn);var Yn=Vn.exports;const $n=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},{hasOwnProperty:Xn}=Object.prototype,{propertyIsEnumerable:ei}=Object,ti=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),ri=Gt,ni={concatArrays:!1,ignoreUndefined:!1},ii=e=>{const t=[];for(const r in e)Xn.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(const n of r)ei.call(e,n)&&t.push(n)}return t};function ai(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return ii(e).forEach((r=>{ti(t,r,ai(e[r]))})),t}(e):$n(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return ii(e).forEach((r=>{ti(t,r,ai(e[r]))})),t}(e):e}const oi=(e,t,r,n)=>(r.forEach((r=>{void 0===t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?ti(e,r,ci(e[r],t[r],n)):ti(e,r,ai(t[r])))})),e),si=(e,t,r)=>{let n=e.slice(0,0),i=0;return[e,t].forEach((t=>{const a=[];for(let r=0;r!a.includes(e))),r)})),n};function ci(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?si(e,t,r):$n(t)&&$n(e)?oi(e,t,ii(t),r):ai(t)}var ui=function(...e){const t=ci(ai(ni),this!==ri&&this||{},ni);let r={_:{}};for(const n of e)if(void 0!==n){if(!$n(n))throw new TypeError("`"+n+"` is not an Option Object");r=ci(r,{_:n},t)}return r._},hi=jt(ui);const li="adaptive",fi="always",di="never",pi="activitypub",gi="aspe",Ai="dns",yi="graphql",mi="http",bi="irc",wi="matrix",vi="openpgp",Ii="telegram",Ei="xmpp",Bi="plain",Ci="html",_i="xml",ki="none",Si="nocors",Qi="granted",xi="server",Pi="json",Mi="text",Ui="uri",Di="fingerprint",Ri="contains",Fi="equals",Ti="oneof",qi=100,Oi=101,Ki=200,Hi=201,Ni=301,Li=401,Gi={ASP:"asp",OPENPGP:"openpgp"},ji={EDDSA:"eddsa",ES256:"es256",OPENPGP:"openpgp",UNKNOWN:"unknown",NONE:"none"},zi={PEM:"pem",JWK:"jwk",ARMORED_PGP:"armored_pgp",NONE:"none"},Wi="none",Zi="hkp",Ji="wkd";class Vi{constructor(e,t){this.identifier=null,this.name=e,this.email=null,this.description=null,this.avatarUrl=null,this.themeColor=null,this.claims=t,this.isRevoked=!1}static fromJSON(e,t){let r,n;if("object"==typeof e&&t){if(2!==t)throw new Error("Invalid persona version");if(n=function(e){const t=e.claims.map((e=>Lw.fromJSON(e))),r=new Vi(e.name,t);return r.identifier=e.identifier,r.email=e.email,r.description=e.description,r.avatarUrl=e.avatarUrl,r.themeColor=e.avatarUrl,r.isRevoked=e.isRevoked,r}(e),n instanceof Error)throw n;r=n}return r}setIdentifier(e){this.identifier=e}setDescription(e){this.description=e}setEmailAddress(e){this.email=e}setAvatarUrl(e){this.avatarUrl=e}addClaim(e){this.claims.push(e)}revoke(){this.isRevoked=!0}toJSON(){return{identifier:this.identifier,name:this.name,email:this.email,description:this.description,avatarUrl:this.avatarUrl,themeColor:this.themeColor,isRevoked:this.isRevoked,claims:this.claims.map((e=>e.toJSON()))}}}class Yi{constructor(e,t,r){this.profileVersion=2,this.profileType=e,this.identifier=t,this.personas=r||[],this.primaryPersonaIndex=r.length>0?0:-1,this.publicKey={keyType:ji.NONE,fingerprint:null,encoding:zi.NONE,encodedKey:null,key:null,fetch:{method:Wi,query:null,resolvedUrl:null}},this.verifiers=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"profileVersion"in e){if(2!==e.profileVersion)throw new Error("Invalid profile version");if(r=function(e){if(!("profileVersion"in e)||2!==e.profileVersion)return new Error("Invalid profile");const t=e.personas.map((e=>Vi.fromJSON(e,2))),r=new Yi(e.profileType,e.identifier,t);return r.primaryPersonaIndex=e.primaryPersonaIndex,r.publicKey=e.publicKey,r.verifiers=e.verifiers,r}(e),r instanceof Error)throw r;t=r}return t}addVerifier(e,t){this.verifiers.push({name:e,url:t})}toJSON(){return{profileVersion:this.profileVersion,profileType:this.profileType,identifier:this.identifier,personas:this.personas.map((e=>e.toJSON())),primaryPersonaIndex:this.primaryPersonaIndex,publicKey:{keyType:this.publicKey.keyType,fingerprint:this.publicKey.fingerprint,encoding:this.publicKey.encoding,encodedKey:this.publicKey.encodedKey,fetch:{method:this.publicKey.fetch.method,query:this.publicKey.fetch.query,resolvedUrl:this.publicKey.fetch.resolvedUrl}},verifiers:this.verifiers}}}class $i{constructor(e){this.about=e.about,this.profile=e.profile,this.claim=e.claim,this.proof=e.proof}toJSON(){return{about:this.about,profile:this.profile,claim:this.claim,proof:this.proof}}}const Xi=/^aspe:([a-zA-Z0-9.\-_]*):([a-zA-Z0-9]*)/;var ea=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Xi);return er(t[1])?new $i({about:{id:"aspe",name:"ASPE"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:Xi.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:gi,accessRestriction:ki,data:{aspeUri:e}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["claims"]}]}}):null},reURI:Xi,tests:[{uri:"aspe:domain.tld:abc123def456",shouldMatch:!0},{uri:"aspe:domain.tld",shouldMatch:!1},{uri:"dns:domain.tld",shouldMatch:!1},{uri:"https://domain.tld",shouldMatch:!1}]});const ta=/^openpgp4fpr:(?:0x)?([a-zA-Z0-9.\-_]*)/,ra=/^https:\/\/(.*)\/.well-known\/openpgpkey\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/,na=/^https:\/\/(openpgpkey.*)\/.well-known\/openpgpkey\/(.*)\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/;var ia=Object.freeze({__proto__:null,processURI:function(e){let t=null,r=null,n=null;ta.test(e)&&(t=ta,r=Zi,n=e.match(t)),!r&&na.test(e)&&(t=na,r=Ji,n=e.match(t)),!r&&ra.test(e)&&(t=ra,r=Ji,n=e.match(t));let i=null;switch(r){case Zi:i=new $i({about:{id:"openpgp",name:"OpenPGP"},profile:{display:`openpgp4fpr:${n[1]}`,uri:`https://keys.openpgp.org/search?q=${n[1]}`,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,fetcher:vi,accessRestriction:ki,data:{url:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,protocol:Zi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["notations","proof@ariadne.id"]}]}});break;case Ji:i=new $i({about:{id:"openpgp",name:"OpenPGP"},profile:{display:"unknown fingerprint",uri:e,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:vi,accessRestriction:ki,data:{url:e,protocol:Ji}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["notations","proof@ariadne.id"]}]}})}return i},reURI:/^(.*)/,tests:[{uri:"openpgp4fpr:123456789",shouldMatch:!0},{uri:"openpgp4fpr:abcdef123",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/123abc456def?l=name",shouldMatch:!0}]});const aa=/^dns:([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var oa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(aa);return new $i({about:{id:"dns",name:"DNS"},profile:{display:t[1],uri:`https://${t[1]}`,qr:null},claim:{uriRegularExpression:aa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:Ai,accessRestriction:xi,data:{domain:t[1]}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["records","txt"]}]}})},reURI:aa,tests:[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const sa=/^irc:\/\/(.*)\/([a-zA-Z0-9\-[\]\\`_^{|}]*)/;var ca=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(sa);return new $i({about:{id:"irc",name:"IRC"},profile:{display:`${t[1]}/${t[2]}`,uri:e,qr:null},claim:{uriRegularExpression:sa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:bi,accessRestriction:xi,data:{domain:t[1],nick:t[2]}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:[]}]}})},reURI:sa,tests:[{uri:"irc://chat.ircserver.org/Alice1",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice?param=123",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice_bob",shouldMatch:!0},{uri:"https://chat.ircserver.org/alice",shouldMatch:!1}]});const ua=/^xmpp:([a-zA-Z0-9.\-_]*)@([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var ha=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ua);return new $i({about:{id:"xmpp",name:"XMPP",homepage:"https://xmpp.org"},profile:{display:`${t[1]}@${t[2]}`,uri:e,qr:e},claim:{uriRegularExpression:ua.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:Ei,accessRestriction:xi,data:{id:`${t[1]}@${t[2]}`}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:[]}]}})},reURI:ua,tests:[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const la=/^matrix:u\/(?:@)?([^@:]*:[^?]*)(\?.*)?/;var fa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(la);if(!t[2])return null;const r=new URLSearchParams(t[2]);if(!r.has("org.keyoxide.e")||!r.has("org.keyoxide.r"))return null;const n=`${"!"!==r.get("org.keyoxide.r")[0]?"!":""}${r.get("org.keyoxide.r")}`,i=`${"$"!==r.get("org.keyoxide.e")[0]?"$":""}${r.get("org.keyoxide.e")}`,a=`https://matrix.to/#/@${t[1]}`,o=`https://matrix.to/#/${n}/${i}`;return new $i({about:{id:"matrix",name:"Matrix",homepage:"https://matrix.org"},profile:{display:`@${t[1]}`,uri:a,qr:null},claim:{uriRegularExpression:la.toString(),uriIsAmbiguous:!1},proof:{request:{uri:o,fetcher:wi,accessRestriction:Qi,data:{eventId:i,roomId:n}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["content","body"]}]}})},reURI:la,tests:[{uri:"matrix:u/alice:matrix.domain.org?org.keyoxide.r=123:domain.org&org.keyoxide.e=123",shouldMatch:!0},{uri:"matrix:u/alice:matrix.domain.org",shouldMatch:!0},{uri:"matrix:u/@alice:matrix.domain.org?org.keyoxide.r=!123:domain.org&org.keyoxide.e=$123",shouldMatch:!0},{uri:"xmpp:alice@domain.org",shouldMatch:!1},{uri:"https://domain.org/@alice",shouldMatch:!1}]});const da=/https:\/\/t.me\/([A-Za-z0-9_]{5,32})\?proof=([A-Za-z0-9_]{5,32})/;var pa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(da);return new $i({about:{id:"telegram",name:"Telegram",homepage:"https://telegram.org"},profile:{display:`@${t[1]}`,uri:`https://t.me/${t[1]}`,qr:`https://t.me/${t[1]}`},claim:{uriRegularExpression:da.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://t.me/${t[2]}`,fetcher:Ii,accessRestriction:Qi,data:{user:t[1],chat:t[2]}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["text"]}]}})},reURI:da,tests:[{uri:"https://t.me/alice?proof=foobar",shouldMatch:!0},{uri:"https://t.me/complex_user_1234?proof=complex_chat_1234",shouldMatch:!0},{uri:"https://t.me/foobar",shouldMatch:!1},{uri:"https://t.me/foobar?proof=",shouldMatch:!1},{uri:"https://t.me/?proof=foobar",shouldMatch:!1}]});const ga=/^https:\/\/twitter\.com\/(.*)\/status\/([0-9]*)(?:\?.*)?/;var Aa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ga),r=new URLSearchParams;return r.set("url",t[0]),r.set("omit_script","1"),new $i({about:{id:"twitter",name:"Twitter",homepage:"https://twitter.com"},profile:{display:`@${t[1]}`,uri:`https://twitter.com/${t[1]}`,qr:null},claim:{uriRegularExpression:ga.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://publish.twitter.com/oembed?${r}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["html"]}]}})},reURI:ga,tests:[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]});const ya=/^https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/(.*)\/?/;var ma=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ya);return new $i({about:{id:"reddit",name:"Reddit",homepage:"https://reddit.com"},profile:{display:t[1],uri:`https://www.reddit.com/user/${t[1]}`,qr:null},claim:{uriRegularExpression:ya.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://www.reddit.com/user/${t[1]}/comments/${t[2]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["data","children","data","selftext"]}]}})},reURI:ya,tests:[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]});const ba=/^https:\/\/liberapay\.com\/(.*)\/?/;var wa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ba);return new $i({about:{id:"liberapay",name:"Liberapay",homepage:"https://liberapay.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:ba.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:ki,data:{url:`https://liberapay.com/${t[1]}/public.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["statements","content"]}]}})},reURI:ba,tests:[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const va=/^https:\/\/lichess\.org\/@\/(.*)\/?/;var Ia=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(va);return new $i({about:{id:"lichess",name:"Lichess",homepage:"https://lichess.org"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:va.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lichess.org/api/user/${t[1]}`,fetcher:mi,accessRestriction:ki,data:{url:`https://lichess.org/api/user/${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Di,encoding:Bi,relation:Ri,path:["profile","links"]}]}})},reURI:va,tests:[{uri:"https://lichess.org/@/Alice",shouldMatch:!0},{uri:"https://lichess.org/@/Alice/",shouldMatch:!0},{uri:"https://domain.org/@/Alice",shouldMatch:!1}]});const Ea=/^https:\/\/news\.ycombinator\.com\/user\?id=(.*)\/?/;var Ba=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ea);return new $i({about:{id:"hackernews",name:"Hacker News",homepage:"https://news.ycombinator.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ea.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,fetcher:mi,accessRestriction:Si,data:{url:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Ci,relation:Ri,path:["about"]}]}})},reURI:Ea,tests:[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]});const Ca=/^https:\/\/lobste\.rs\/(?:~|u\/)(.*)\/?/;var _a=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ca);return new $i({about:{id:"lobsters",name:"Lobsters",homepage:"https://lobste.rs"},profile:{display:t[1],uri:`https://lobste.rs/~${t[1]}`,qr:null},claim:{uriRegularExpression:Ca.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lobste.rs/~${t[1]}.json`,fetcher:mi,accessRestriction:Si,data:{url:`https://lobste.rs/~${t[1]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["about"]}]}})},reURI:Ca,tests:[{uri:"https://lobste.rs/~Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/~Alice",shouldMatch:!1},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]});const ka=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var Sa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ka);return new $i({about:{id:"forem",name:"Forem",homepage:"https://www.forem.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:ka.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/api/articles/${t[2]}/${t[3]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["body_markdown"]}]}})},reURI:ka,tests:[{uri:"https://domain.org/alice/post",shouldMatch:!0},{uri:"https://domain.org/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Qa=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;const xa={validate:async(e,t,r)=>{const n=`https://${new URL(e.proof.request.uri).hostname}/api/forgejo/v1/version`,i=await $w({url:n,format:Pi});return i&&"version"in i}};var Pa=Object.freeze({__proto__:null,functions:xa,processURI:function(e){const t=e.match(Qa);return new $i({about:{id:"forgejo",name:"Forgejo",homepage:"https://forgejo.org"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Qa.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["description"]}]}})},reURI:Qa,tests:[{uri:"https://domain.org/alice/forgejo_proof",shouldMatch:!0},{uri:"https://domain.org/alice/forgejo_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Ma=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var Ua=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ma);return new $i({about:{id:"gitea",name:"Gitea",homepage:"https://about.gitea.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Ma.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["description"]}]}})},reURI:Ma,tests:[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Da=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/;var Ra=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Da);return new $i({about:{id:"gitlab",name:"GitLab",homepage:"https://about.gitlab.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Da.toString(),uriIsAmbiguous:!0},proof:{request:{fetcher:mi,accessRestriction:ki,data:{url:`https://${t[1]}/api/v4/projects/${t[2]}%2Fgitlab_proof`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["description"]}]}})},reURI:Da,tests:[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]});const Fa=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;var Ta=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Fa);return new $i({about:{id:"github",name:"GitHub",homepage:"https://github.com"},profile:{display:t[1],uri:`https://github.com/${t[1]}`,qr:null},claim:{uriRegularExpression:Fa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:ki,data:{url:`https://api.github.com/gists/${t[2]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["files","proof.md","content"]},{format:Ui,encoding:Bi,relation:Ri,path:["files","openpgp.md","content"]}]}})},reURI:Fa,tests:[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]});const qa=/^https:\/\/(.*)\/?/;const Oa={postprocess:async(e,t,r)=>{switch(t.result.type){case"Note":{e.profile.uri=t.result.attributedTo,e.profile.display=t.result.attributedTo;const n=await qr({url:t.result.attributedTo},r).catch((e=>null));n&&(e.profile.display=`@${n.preferredUsername}@${new URL(e.proof.request.uri).hostname}`);break}case"Person":e.profile.display=`@${t.result.preferredUsername}@${new URL(e.proof.request.uri).hostname}`}const n=await Ka(new URL(e.proof.request.uri).hostname);return n&&(e.about.name=n.software.name,e.about.id=n.software.name,e.about.homepage=n.software.homepage),{claimData:e,proofData:t}}},Ka=async e=>{const t=await fetch(`https://${e}/.well-known/nodeinfo`).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).catch((e=>null));if(!t)return null;{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:e.software.homepage||"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}};var Ha=Object.freeze({__proto__:null,functions:Oa,processURI:function(e){return new $i({about:{id:"activitypub",name:"ActivityPub",homepage:"https://activitypub.rocks"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:qa.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:pi,accessRestriction:ki,data:{url:e}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["summary"]},{format:Ui,encoding:Bi,relation:Ri,path:["attachment","value"]},{format:Ui,encoding:Bi,relation:Ri,path:["content"]}]}})},reURI:qa,tests:[{uri:"https://domain.org",shouldMatch:!0},{uri:"https://domain.org/@/alice/",shouldMatch:!0},{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/123456",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/123456",shouldMatch:!0},{uri:"http://domain.org/alice",shouldMatch:!1}]});const Na=/^https:\/\/(.*)\/u\/(.*)\/?/;var La=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Na);return new $i({about:{id:"discourse",name:"Discourse",homepage:"https://www.discourse.org"},profile:{display:`${t[2]}@${t[1]}`,uri:e,qr:null},claim:{uriRegularExpression:Na.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/u/${t[2]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["user","bio_raw"]}]}})},reURI:Na,tests:[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Ga=/^https:\/\/(.*)/;var ja=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ga);return new $i({about:{id:"owncast",name:"Owncast",homepage:"https://owncast.online"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ga.toString(),uriIsAmbiguous:!0},proof:{request:{uri:`${e}/api/config`,fetcher:mi,accessRestriction:ki,data:{url:`${e}/api/config`,format:Pi}},response:{format:Pi},target:[{format:Di,encoding:Bi,relation:Ri,path:["socialHandles","url"]}]}})},reURI:Ga,tests:[{uri:"https://live.domain.org",shouldMatch:!0},{uri:"https://live.domain.org/",shouldMatch:!0},{uri:"https://domain.org/live",shouldMatch:!0},{uri:"https://domain.org/live/",shouldMatch:!0}]});const za=/^https:\/\/(.*(?:askubuntu|mathoverflow|serverfault|stackapps|stackoverflow|superuser)|.+\.stackexchange)\.com\/users\/(\d+)/,Wa=/\.stackexchange$/;var Za=Object.freeze({__proto__:null,processURI:function(e){const[,t,r]=e.match(za),n=t.replace(Wa,"");return new $i({about:{id:"stackexchange",name:"Stack Exchange",homepage:"https://stackexchange.com"},profile:{display:`${r}@${n}`,uri:e,qr:null},claim:{uriRegularExpression:za.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://${t}.com/users/${r}?tab=profile`,fetcher:mi,accessRestriction:ki,data:{url:`https://api.stackexchange.com/2.3/users/${r}?site=${n}&filter=!AH)b5JqVyImf`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["items","about_me"]}]}})},reURI:za,tests:[{uri:"https://stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234?tab=topactivity",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice?tab=profile",shouldMatch:!0},{uri:"https://meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://serverfault.com/users/1234",shouldMatch:!0},{uri:"https://meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://gaming.meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://stackexchange.com/users/1234",shouldMatch:!1},{uri:"https://domain.com/users/1234",shouldMatch:!1},{uri:"https://meta.domain.com/users/1234",shouldMatch:!1}]});const Ja=/^https:\/\/keybase.io\/(.*)\/?/;var Va=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ja);return new $i({about:{id:"keybase",name:"keybase",homepage:"https://keybase.io"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ja.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,fetcher:mi,accessRestriction:Si,data:{url:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Di,encoding:Bi,relation:Ri,path:["them","public_keys","primary","key_fingerprint"]}]}})},reURI:Ja,tests:[{uri:"https://keybase.io/Alice",shouldMatch:!0},{uri:"https://keybase.io/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const Ya=/^https:\/\/opencollective\.com\/(.*)\/?/;var $a=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ya);return new $i({about:{id:"opencollective",name:"Open Collective",homepage:"https://opencollective.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ya.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:Si,data:{url:"https://api.opencollective.com/graphql/v2",query:`{ "query": "query { account(slug: \\"${t[1]}\\") { longDescription } }" }`}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["data","account","longDescription"]}]}})},reURI:Ya,tests:[{uri:"https://opencollective.com/Alice",shouldMatch:!0},{uri:"https://opencollective.com/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const Xa=/^https:\/\/orcid\.org\/(.*)\/?/;var eo=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Xa);return new $i({about:{id:"orcid",name:"ORCiD",homepage:"https://orcid.org/"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Xa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:ki,data:{url:e,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["person","biography","content"]},{format:Ui,encoding:Bi,relation:Fi,path:["person","researcher-urls","researcher-url","url","value"]},{format:Ui,encoding:Bi,relation:Fi,path:["person","keywords","keyword","content"]}]}})},reURI:Xa,tests:[{uri:"https://orcid.org/0000-0000-0000-0000",shouldMatch:!0},{uri:"https://orcid.org/0000-0000-0000-0000/",shouldMatch:!0},{uri:"https://domain.org/0000-0000-0000-0000",shouldMatch:!1}]});const to=/^https:\/\/pronouns\.cc\/@(.*)\/?/;var ro=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(to);return new $i({about:{id:"pronounscc",name:"pronouns.cc",homepage:"https://pronouns.cc"},profile:{display:`@${t[1]}`,uri:`https://pronouns.cc/@${t[1]}`,qr:null},claim:{uriRegularExpression:to.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://pronouns.cc/api/v1/users/${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["links"]},{format:Ui,encoding:Bi,relation:Ri,path:["bio"]}]}})},reURI:to,tests:[{uri:"https://pronouns.cc/@Alice",shouldMatch:!0},{uri:"https://pronouns.cc/@Alice/",shouldMatch:!0},{uri:"https://pronouns.cc/Alice",shouldMatch:!1},{uri:"https://pronouns.cc/Alice/",shouldMatch:!1}]});const no=/^https:\/\/(?:discord\.gg|discord\.com\/invite)\/(.+)/;var io=Object.freeze({__proto__:null,functions:{postprocess:async(e,t,r)=>(e.profile.display=t.result.inviter.username,{claimData:e,proofData:t})},processURI:function(e){const t=e.match(no);return new $i({about:{id:"discord",name:"Discord",homepage:"https://discord.com"},profile:{display:null,uri:null,qr:null},claim:{uriRegularExpression:no.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://discord.com/api/v10/invites/${t[1]}`,fetcher:mi,accessRestriction:Si,data:{url:`https://discord.com/api/v10/invites/${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["guild","description"]},{format:Ui,encoding:Bi,relation:Ri,path:["guild","name"]}]}})},reURI:no,tests:[{uri:"https://discord.com/invite/AbCdEf",shouldMatch:!0},{uri:"https://discord.com/invite/AbCdEfGh",shouldMatch:!0},{uri:"https://discord.gg/AbCdEf",shouldMatch:!0},{uri:"https://discord.gg/AbCdEfGh",shouldMatch:!0},{uri:"https://domain.com/invite/AbCdEf",shouldMatch:!1},{uri:"https://domain.gg/AbCdEf",shouldMatch:!1},{uri:"https://discord.com/invite/",shouldMatch:!1},{uri:"https://discord.gg/",shouldMatch:!1}]});const ao={aspe:ea,openpgp:ia,dns:oa,irc:ca,xmpp:ha,matrix:fa,telegram:pa,twitter:Aa,reddit:ma,liberapay:wa,lichess:Ia,hackernews:Ba,lobsters:_a,forem:Sa,forgejo:Pa,gitea:Ua,gitlab:Ra,github:Ta,activitypub:Ha,discourse:La,owncast:ja,stackexchange:Za,keybase:Va,opencollective:$a,orcid:eo,pronounscc:ro,discord:io},oo=Object.keys(ao),so="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},co=Symbol("doneWritingPromise"),uo=Symbol("doneWritingResolve"),ho=Symbol("doneWritingReject"),lo=Symbol("readingIndex");class fo extends Array{constructor(){super(),this[co]=new Promise(((e,t)=>{this[uo]=e,this[ho]=t})),this[co].catch((()=>{}))}}function po(e){return e&&e.getReader&&Array.isArray(e)}function go(e){if(!po(e)){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=()=>{t.closed.catch((function(){})),r.call(t)},t}this.stream=e}fo.prototype.getReader=function(){return void 0===this[lo]&&(this[lo]=0),{read:async()=>(await this[co],this[lo]===this.length?{value:void 0,done:!0}:{value:this[this[lo]++],done:!1})}},fo.prototype.readToEnd=async function(e){await this[co];const t=e(this.slice(this[lo]));return this.length=0,t},fo.prototype.clone=function(){const e=new fo;return e[co]=this[co].then((()=>{e.push(...this)})),e},go.prototype.write=async function(e){this.stream.push(e)},go.prototype.close=async function(){this.stream[uo]()},go.prototype.abort=async function(e){return this.stream[ho](e),e},go.prototype.releaseLock=function(){};const Ao="object"==typeof so.process&&"object"==typeof so.process.versions,yo=Ao&&void 0;function mo(e){return po(e)?"array":so.ReadableStream&&so.ReadableStream.prototype.isPrototypeOf(e)?"web":Qo&&Qo.prototype.isPrototypeOf(e)?"ponyfill":yo&&yo.prototype.isPrototypeOf(e)?"node":!(!e||!e.getReader)&&"web-like"}function bo(e){return Uint8Array.prototype.isPrototypeOf(e)}function wo(e){if(1===e.length)return e[0];let t=0;for(let r=0;r{t||(vo.isBuffer(n)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),r.enqueue(n),e.pause())})),e.on("end",(()=>{t||r.close()})),e.on("error",(e=>r.error(e)))},pull(){e.resume()},cancel(r){t=!0,e.destroy(r)}})};class e extends Io{constructor(e,t){super(t),this._reader=Fo(e)}async _read(e){try{for(;;){const{done:e,value:t}=await this._reader.read();if(e){this.push(null);break}if(!this.push(t))break}}catch(e){this.destroy(e)}}async _destroy(e,t){this._reader.cancel(e).then(t,t)}}Bo=function(t,r){return new e(t,r)}}const Co=new WeakSet,_o=Symbol("externalBuffer");function ko(e){if(this.stream=e,e[_o]&&(this[_o]=e[_o].slice()),po(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{},void(this._cancel=async()=>{})}let t=mo(e);if("node"===t&&(e=Eo(e)),t){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{t.closed.catch((function(){})),t.releaseLock()},void(this._cancel=t.cancel.bind(t))}let r=!1;this._read=async()=>r||Co.has(e)?{value:void 0,done:!0}:(r=!0,{value:e,done:!1}),this._releaseLock=()=>{if(r)try{Co.add(e)}catch(e){}}}ko.prototype.read=async function(){return this[_o]&&this[_o].length?{done:!1,value:this[_o].shift()}:this._read()},ko.prototype.releaseLock=function(){this[_o]&&(this.stream[_o]=this[_o]),this._releaseLock()},ko.prototype.cancel=function(e){return this._cancel(e)},ko.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:r,value:n}=await this.read();if(n+="",r)return t.length?Ro(t):void 0;const i=n.indexOf("\n")+1;i&&(e=Ro(t.concat(n.substr(0,i))),t=[]),i!==n.length&&t.push(n.substr(i))}return this.unshift(...t),e},ko.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const r=t[0];return this.unshift(zo(t,1)),r},ko.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){const{done:n,value:i}=await this.read();if(n)return t.length?Ro(t):void 0;if(t.push(i),r+=i.length,r>=e){const r=Ro(t);return this.unshift(zo(r,e)),zo(r,0,e)}}},ko.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},ko.prototype.unshift=function(...e){this[_o]||(this[_o]=[]),1===e.length&&bo(e[0])&&this[_o].length&&e[0].length&&this[_o][0].byteOffset>=e[0].length?this[_o][0]=new Uint8Array(this[_o][0].buffer,this[_o][0].byteOffset-e[0].length,this[_o][0].byteLength+e[0].length):this[_o].unshift(...e.filter((e=>e&&e.length)))},ko.prototype.readToEnd=async function(e=Ro){const t=[];for(;;){const{done:e,value:r}=await this.read();if(e)break;t.push(r)}return e(t)};let So,{ReadableStream:Qo,WritableStream:xo,TransformStream:Po}=so;const Mo=Ao&&void 0;function Uo(e){let t=mo(e);return"node"===t?Eo(e):"web"===t&&So?So(e):t?e:new Qo({start(t){t.enqueue(e),t.close()}})}function Do(e){if(mo(e))return e;const t=new fo;return(async()=>{const r=To(t);await r.write(e),await r.close()})(),t}function Ro(e){return e.some((e=>mo(e)&&!po(e)))?function(e){e=e.map(Uo);const t=Ko((async function(e){await Promise.all(n.map((t=>async function(e,t){if(mo(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}(t,e))))}));let r=Promise.resolve();const n=e.map(((n,i)=>No(n,((n,a)=>(r=r.then((()=>qo(n,t.writable,{preventClose:i!==e.length-1}))),r)))));return t.readable}(e):e.some((e=>po(e)))?function(e){const t=new fo;let r=Promise.resolve();return e.forEach(((n,i)=>(r=r.then((()=>qo(n,t,{preventClose:i!==e.length-1}))),r))),t}(e):"string"==typeof e[0]?e.join(""):Mo&&Mo.isBuffer(e[0])?Mo.concat(e):wo(e)}function Fo(e){return new ko(e)}function To(e){return new go(e)}async function qo(e,t,{preventClose:r=!1,preventAbort:n=!1,preventCancel:i=!1}={}){if(mo(e)&&!po(e)){e=Uo(e);try{if(e[_o]){const r=To(t);for(let t=0;t{t=e})),t=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function Ho(e,t=(()=>{}),r=(()=>{})){if(po(e)){const n=new fo;return(async()=>{const i=To(n);try{const n=await Wo(e),a=t(n),o=r();let s;s=void 0!==a&&void 0!==o?Ro([a,o]):void 0!==a?a:o,await i.write(s),await i.close()}catch(e){await i.abort(e)}})(),n}if(mo(e))return Oo(e,{async transform(e,r){try{const n=await t(e);void 0!==n&&r.enqueue(n)}catch(e){r.error(e)}},async flush(e){try{const t=await r();void 0!==t&&e.enqueue(t)}catch(t){e.error(t)}}});const n=t(e),i=r();return void 0!==n&&void 0!==i?Ro([n,i]):void 0!==n?n:i}function No(e,t){if(mo(e)&&!po(e)){let r;const n=new Po({start(e){r=e}}),i=qo(e,n.writable),a=Ko((async function(e){r.error(e),await i,await new Promise(setTimeout)}));return t(n.readable,a.writable),a.readable}e=Do(e);const r=new fo;return t(e,r),r}function Lo(e){if(po(e))return e.clone();if(mo(e)){const t=function(e){if(po(e))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(mo(e)){const t=Uo(e).tee();return t[0][_o]=t[1][_o]=e[_o],t}return[zo(e),zo(e)]}(e);return jo(e,t[0]),t[1]}return zo(e)}function Go(e){return po(e)?Lo(e):mo(e)?new Qo({start(t){const r=No(e,(async(e,r)=>{const n=Fo(e),i=To(r);try{for(;;){await i.ready;const{done:r,value:a}=await n.read();if(r){try{t.close()}catch(e){}return void await i.close()}try{t.enqueue(a)}catch(e){}await i.write(a)}}catch(e){t.error(e),await i.abort(e)}}));jo(e,r)}}):zo(e)}function jo(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach((([r,n])=>{"constructor"!==r&&(n.value?n.value=n.value.bind(t):n.get=n.get.bind(t),Object.defineProperty(e,r,n))}))}function zo(e,t=0,r=1/0){if(po(e))throw Error("Not implemented");if(mo(e)){if(t>=0&&r>=0){let n=0;return Oo(e,{transform(e,i){n=t&&i.enqueue(zo(e,Math.max(t-n,0),r-n)),n+=e.length):i.terminate()}})}if(t<0&&(r<0||r===1/0)){let n=[];return Ho(e,(e=>{e.length>=-t?n=[e]:n.push(e)}),(()=>zo(Ro(n),t,r)))}if(0===t&&r<0){let n;return Ho(e,(e=>{const i=n?Ro([n,e]):e;if(i.length>=-r)return n=zo(i,r),zo(i,t,r);n=i}))}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),Zo((async()=>zo(await Wo(e),t,r)))}return e[_o]&&(e=Ro(e[_o].concat([e]))),!bo(e)||Mo&&Mo.isBuffer(e)?e.slice(t,r):(r===1/0&&(r=e.length),e.subarray(t,r))}async function Wo(e,t=Ro){return po(e)?e.readToEnd(t):mo(e)?Fo(e).readToEnd(t):e}function Zo(e){const t=new fo;return(async()=>{const r=To(t);try{await r.write(await e()),await r.close()}catch(e){await r.abort(e)}})(),t}class Jo{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");if(e instanceof Uint8Array){const t=e,r=Array(t.length);for(let e=0;eBigInt(0);){const e=r&BigInt(1);r>>=BigInt(1);const a=i*n%t.value;i=e?a:i,n=n*n%t.value}return new Jo(i)}modInv(e){const{gcd:t,x:r}=this._egcd(e);if(!t.isOne())throw Error("Inverse does not exist");return r.add(e).mod(e)}_egcd(e){let t=BigInt(0),r=BigInt(1),n=BigInt(1),i=BigInt(0),a=this.value;for(e=e.value;e!==BigInt(0);){const o=a/e;let s=t;t=n-o*t,n=s,s=r,r=i-o*r,i=s,s=e,e=a%e,a=s}return{x:new Jo(n),y:new Jo(i),gcd:new Jo(a)}}gcd(e){let t=this.value;for(e=e.value;e!==BigInt(0);){const r=e;e=t%e,t=r}return new Jo(t)}ileftShift(e){return this.value<<=e.value,this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value>>=e.value,this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value===e.value}lt(e){return this.valuee.value}gte(e){return this.value>=e.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.valueNumber.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return e}getBit(e){return(this.value>>BigInt(e)&BigInt(1))===BigInt(0)?0:1}bitLength(){const e=new Jo(0),t=new Jo(1),r=new Jo(-1),n=this.isNegative()?r:e;let i=1;const a=this.clone();for(;!a.irightShift(t).equal(n);)i++;return i}byteLength(){const e=new Jo(0),t=new Jo(-1),r=this.isNegative()?t:e,n=new Jo(8);let i=1;const a=this.clone();for(;!a.irightShift(n).equal(r);)i++;return i}toUint8Array(e="be",t){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const n=r.length/2,i=new Uint8Array(t||n),a=t?t-n:0;let o=0;for(;o{e[Vo][r]=t}))),void 0!==e[Vo][t])return e[Vo][t];throw Error("Invalid enum value.")}};const $o=(()=>{try{return"development"===process.env.NODE_ENV}catch(e){}return!1})(),Xo={isString:function(e){return"string"==typeof e||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:bo,isStream:mo,readNumber:function(e){let t=0;for(let r=0;r>8*(t-n-1)&255;return r},readDate:function(e){const t=Xo.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return Xo.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=7+(e[0]<<8|e[1])>>>3;return e.subarray(2,2+t)},leftPad(e,t){const r=new Uint8Array(t),n=t-e.length;return r.set(e,n),r},uint8ArrayToMPI:function(e){const t=Xo.uint8ArrayBitLength(e);if(0===t)throw Error("Zero MPI");const r=e.subarray(e.length-Math.ceil(t/8)),n=new Uint8Array([(65280&t)>>8,255&t]);return Xo.concatUint8Array([n,r])},uint8ArrayBitLength:function(e){let t;for(t=0;t>1);for(let r=0;r>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],r=e.length;let n,i=0;for(;i{if(!Xo.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;rr("",!0)))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return Ho(e,r,(()=>r(new Uint8Array,!0)))},concat:Ro,concatUint8Array:wo,equalsUint8Array:function(e,t){if(!Xo.isUint8Array(e)||!Xo.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r>>16;return 0!==r&&(e=r,t+=16),r=e>>8,0!==r&&(e=r,t+=8),r=e>>4,0!==r&&(e=r,t+=4),r=e>>2,0!==r&&(e=r,t+=2),r=e>>1,0!==r&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let n=0;n>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){return void 0!==so&&so.crypto&&so.crypto.subtle},getBigInteger:async function(){if("undefined"!=typeof BigInt)return Jo;{const{default:e}=await Promise.resolve().then((function(){return Am}));return e}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return"undefined"!=typeof navigator?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(e){return!!Xo.isString(e)&&/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}[0-9]*|xn--[a-zA-Z\-0-9]+)))$/.test(e)},canonicalizeEOL:function(e){let t=!1;return Ho(e,(e=>{let r;t&&(e=Xo.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const n=[];for(let t=0;r=e.indexOf(10,t)+1,r;t=r)13!==e[r-2]&&n.push(r);if(!n.length)return e;const i=new Uint8Array(e.length+n.length);let a=0;for(let t=0;tt?new Uint8Array([13]):void 0))},nativeEOL:function(e){let t=!1;return Ho(e,(e=>{let r;13===(e=t&&10!==e[0]?Xo.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let n=0;for(let t=0;t!==e.length;t=r){r=e.indexOf(13,t)+1,r||(r=e.length);const i=r-(10===e[r]?1:0);t&&e.copyWithin(n,t,i),n+=i-t}return e.subarray(0,n)}),(()=>t?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(e){return e.split("\n").map((e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]||"\r"===e[t]);t--);return e.substr(0,t+1)})).join("\n")},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch(e){}return t},constructAllowedPackets:function(e){const t={};return e.forEach((e=>{if(!e.tag)throw Error("Invalid input: expected a packet class");t[e.tag]=e})),t},anyPromise:function(e){return new Promise((async(t,r)=>{let n;await Promise.all(e.map((async e=>{try{t(await e)}catch(e){n=e}}))),r(n)}))},selectUint8Array:function(e,t,r){const n=Math.max(t.length,r.length),i=new Uint8Array(n);let a=0;for(let n=0;n{t=Xo.concatUint8Array([t,e]);const r=[],n=Math.floor(t.length/45),i=45*n,a=ts(t.subarray(0,i));for(let e=0;et.length?ts(t)+"\n":""))}function is(e){let t="";return Ho(e,(e=>{t+=e;let r=0;const n=[" ","\t","\r","\n"];for(let e=0;e0&&(i-r)%4!=0;i--)n.includes(t[i])&&r--;const a=rs(t.substr(0,i));return t=t.substr(i),a}),(()=>rs(t)))}function as(e){return is(e.replace(/-/g,"+").replace(/_/g,"/"))}function os(e,t){let r=ns(e).replace(/[\r\n]/g,"");return t&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r}es?(ts=e=>es.from(e).toString("base64"),rs=e=>{const t=es.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}):(ts=e=>btoa(Xo.uint8ArrayToString(e)),rs=e=>Xo.stringToUint8Array(atob(e)));var ss={preferredHashAlgorithm:Yo.hash.sha256,preferredSymmetricAlgorithm:Yo.symmetric.aes256,preferredCompressionAlgorithm:Yo.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:Yo.aead.eax,aeadChunkSizeByte:12,v5Keys:!1,s2kIterationCountByte:224,allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,checksumRequired:!1,minRSABits:2047,passwordCollisionCheck:!1,revocationsExpire:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([Yo.symmetric.aes128,Yo.symmetric.aes192,Yo.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,additionalAllowedPackets:[],showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.11.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([Yo.hash.md5,Yo.hash.ripemd]),rejectMessageHashAlgorithms:new Set([Yo.hash.md5,Yo.hash.ripemd,Yo.hash.sha1]),rejectPublicKeyAlgorithms:new Set([Yo.publicKey.elgamal,Yo.publicKey.dsa]),rejectCurves:new Set([Yo.curve.secp256k1])};function cs(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?Yo.armor.multipartSection:/MESSAGE, PART \d+/.test(t[1])?Yo.armor.multipartLast:/SIGNED MESSAGE/.test(t[1])?Yo.armor.signed:/MESSAGE/.test(t[1])?Yo.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?Yo.armor.publicKey:/PRIVATE KEY BLOCK/.test(t[1])?Yo.armor.privateKey:/SIGNATURE/.test(t[1])?Yo.armor.signature:void 0}function us(e,t){let r="";return t.showVersion&&(r+="Version: "+t.versionString+"\n"),t.showComment&&(r+="Comment: "+t.commentString+"\n"),e&&(r+="Comment: "+e+"\n"),r+="\n",r}function hs(e){return ns(function(e){let t=13501623;return Ho(e,(e=>{const r=fs?Math.floor(e.length/4):0,n=new Uint32Array(e.buffer,e.byteOffset,r);for(let e=0;e>24&255]^ls[1][t>>16&255]^ls[2][t>>8&255]^ls[3][t>>0&255];for(let n=4*r;n>8^ls[0][255&t^e[n]]}),(()=>new Uint8Array([t,t>>8,t>>16])))}(e))}const ls=[Array(255),Array(255),Array(255),Array(255)];for(let e=0;e<=255;e++){let t=e<<16;for(let e=0;e<8;e++)t=t<<1^(0!=(8388608&t)?8801531:0);ls[0][e]=(16711680&t)>>16|65280&t|(255&t)<<16}for(let e=0;e<=255;e++)ls[1][e]=ls[0][e]>>8^ls[0][255&ls[0][e]];for(let e=0;e<=255;e++)ls[2][e]=ls[1][e]>>8^ls[0][255&ls[1][e]];for(let e=0;e<=255;e++)ls[3][e]=ls[2][e]>>8^ls[0][255&ls[2][e]];const fs=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function ds(e){for(let t=0;t=0&&n!==e.length-1&&(t=e.slice(0,n),r=e.slice(n+1).substr(0,4)),{body:t,checksum:r}}function gs(e,t=ss){return new Promise((async(r,n)=>{try{const i=/^-----[^-]+-----$/m,a=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let o;const s=[];let c,u,h,l=s,f=[],d=is(No(e,(async(e,t)=>{const p=Fo(e);try{for(;;){let e=await p.readLine();if(void 0===e)throw Error("Misformed armored text");if(e=Xo.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),o)if(c)u||2!==o||(i.test(e)?(f=f.join("\r\n"),u=!0,ds(l),l=[],c=!1):f.push(e.replace(/^- /,"")));else if(i.test(e)&&n(Error("Mandatory blank line missing between armor headers and armor data")),a.test(e)){if(ds(l),c=!0,u||2!==o){r({text:f,data:d,headers:s,type:o});break}}else l.push(e);else i.test(e)&&(o=cs(e))}}catch(e){return void n(e)}const g=To(t);try{for(;;){await g.ready;const{done:e,value:t}=await p.read();if(e)throw Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await p.readToEnd();e.length||(e=""),e=r+e,e=Xo.removeTrailingSpaces(e.replace(/\r/g,""));const t=e.split(i);if(1===t.length)throw Error("Misformed armored text");const n=ps(t[0].slice(0,-1));h=n.checksum,await g.write(n.body);break}await g.write(r)}await g.ready,await g.close()}catch(e){await g.abort(e)}})));d=No(d,(async(e,r)=>{const n=Wo(hs(Go(e)));n.catch((()=>{})),await qo(e,r,{preventClose:!0});const i=To(r);try{const e=(await n).replace("\n","");if(h!==e&&(h||t.checksumRequired))throw Error("Ascii armor integrity check failed");await i.ready,await i.close()}catch(e){await i.abort(e)}}))}catch(e){n(e)}})).then((async e=>(po(e.data)&&(e.data=await Wo(e.data)),e)))}function As(e,t,r,n,i,a=ss){let o,s;e===Yo.armor.signed&&(o=t.text,s=t.hash,t=t.data);const c=Go(t),u=[];switch(e){case Yo.armor.multipartSection:u.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+n+"-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP MESSAGE, PART "+r+"/"+n+"-----\n");break;case Yo.armor.multipartLast:u.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP MESSAGE, PART "+r+"-----\n");break;case Yo.armor.signed:u.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),u.push("Hash: "+s+"\n\n"),u.push(o.replace(/^-/gm,"- -")),u.push("\n-----BEGIN PGP SIGNATURE-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP SIGNATURE-----\n");break;case Yo.armor.message:u.push("-----BEGIN PGP MESSAGE-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP MESSAGE-----\n");break;case Yo.armor.publicKey:u.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case Yo.armor.privateKey:u.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case Yo.armor.signature:u.push("-----BEGIN PGP SIGNATURE-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP SIGNATURE-----\n")}return Xo.concat(u)}class ys{constructor(){this.bytes=""}read(e){return this.bytes=Xo.uint8ArrayToString(e.subarray(0,8)),this.bytes.length}write(){return Xo.stringToUint8Array(this.bytes)}toHex(){return Xo.uint8ArrayToHex(Xo.stringToUint8Array(this.bytes))}equals(e,t=!1){return t&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(e){return e.toHex()}static fromID(e){const t=new ys;return t.read(Xo.hexToUint8Array(e)),t}static wildcard(){const e=new ys;return e.read(new Uint8Array(8)),e}}var ms=function(){var e,t,r=!1;function n(r,n){var i=e[(t[r]+t[n])%255];return 0!==r&&0!==n||(i=0),i}var i,a,o,s,c=!1;function u(){function u(r){var n,i,a;for(i=a=function(r){var n=e[255-t[r]];return 0===r&&(n=0),n}(r),n=0;n<4;n++)a^=i=255&(i<<1|i>>>7);return 99^a}r||function(){e=[],t=[];var n,i,a=1;for(n=0;n<255;n++)e[n]=a,i=128&a,a<<=1,a&=255,128===i&&(a^=27),a^=e[n],t[e[n]]=n;e[255]=e[0],t[0]=0,r=!0}(),i=[],a=[],o=[[],[],[],[]],s=[[],[],[],[]];for(var h=0;h<256;h++){var l=u(h);i[h]=l,a[l]=h,o[0][h]=n(2,l)<<24|l<<16|l<<8|n(3,l),s[0][l]=n(14,h)<<24|n(9,h)<<16|n(13,h)<<8|n(11,h);for(var f=1;f<4;f++)o[f][h]=o[f-1][h]>>>8|o[f-1][h]<<24,s[f][l]=s[f-1][l]>>>8|s[f-1][l]<<24}c=!0}var h=function(e,t){c||u();var r=new Uint32Array(t);r.set(i,512),r.set(a,768);for(var n=0;n<4;n++)r.set(o[n],4096+1024*n>>2),r.set(s[n],8192+1024*n>>2);var h=function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0;var B=new e.Uint32Array(r),C=new e.Uint8Array(r);function _(e,t,r,s,c,u,h,l){e=e|0;t=t|0;r=r|0;s=s|0;c=c|0;u=u|0;h=h|0;l=l|0;var f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;f=r|0x400,d=r|0x800,p=r|0xc00;c=c^B[(e|0)>>2],u=u^B[(e|4)>>2],h=h^B[(e|8)>>2],l=l^B[(e|12)>>2];for(b=16;(b|0)<=s<<4;b=b+16|0){g=B[(r|c>>22&1020)>>2]^B[(f|u>>14&1020)>>2]^B[(d|h>>6&1020)>>2]^B[(p|l<<2&1020)>>2]^B[(e|b|0)>>2],A=B[(r|u>>22&1020)>>2]^B[(f|h>>14&1020)>>2]^B[(d|l>>6&1020)>>2]^B[(p|c<<2&1020)>>2]^B[(e|b|4)>>2],y=B[(r|h>>22&1020)>>2]^B[(f|l>>14&1020)>>2]^B[(d|c>>6&1020)>>2]^B[(p|u<<2&1020)>>2]^B[(e|b|8)>>2],m=B[(r|l>>22&1020)>>2]^B[(f|c>>14&1020)>>2]^B[(d|u>>6&1020)>>2]^B[(p|h<<2&1020)>>2]^B[(e|b|12)>>2];c=g,u=A,h=y,l=m}n=B[(t|c>>22&1020)>>2]<<24^B[(t|u>>14&1020)>>2]<<16^B[(t|h>>6&1020)>>2]<<8^B[(t|l<<2&1020)>>2]^B[(e|b|0)>>2],i=B[(t|u>>22&1020)>>2]<<24^B[(t|h>>14&1020)>>2]<<16^B[(t|l>>6&1020)>>2]<<8^B[(t|c<<2&1020)>>2]^B[(e|b|4)>>2],a=B[(t|h>>22&1020)>>2]<<24^B[(t|l>>14&1020)>>2]<<16^B[(t|c>>6&1020)>>2]<<8^B[(t|u<<2&1020)>>2]^B[(e|b|8)>>2],o=B[(t|l>>22&1020)>>2]<<24^B[(t|c>>14&1020)>>2]<<16^B[(t|u>>6&1020)>>2]<<8^B[(t|h<<2&1020)>>2]^B[(e|b|12)>>2]}function k(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;_(0x0000,0x0800,0x1000,E,e,t,r,n)}function S(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var a=0;_(0x0400,0x0c00,0x2000,E,e,n,r,t);a=i,i=o,o=a}function Q(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s^e,c^t,u^r,h^l);s=n,c=i,u=a,h=o}function x(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;var f=0;_(0x0400,0x0c00,0x2000,E,e,l,r,t);f=i,i=o,o=f;n=n^s,i=i^c,a=a^u,o=o^h;s=e,c=t,u=r,h=l}function P(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n=n^e,c=i=i^t,u=a=a^r,h=o=o^l}function M(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);n=n^e,i=i^t,a=a^r,o=o^l;s=e,c=t,u=r,h=l}function U(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n,c=i,u=a,h=o;n=n^e,i=i^t,a=a^r,o=o^l}function D(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;_(0x0000,0x0800,0x1000,E,l,f,d,p);p=~m&p|m&p+1;d=~y&d|y&d+((p|0)==0);f=~A&f|A&f+((d|0)==0);l=~g&l|g&l+((f|0)==0);n=n^e;i=i^t;a=a^r;o=o^s}function R(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0;e=e^s,t=t^c,r=r^u,n=n^h;i=b|0,a=w|0,o=v|0,l=I|0;for(;(A|0)<128;A=A+1|0){if(i>>>31){f=f^e,d=d^t,p=p^r,g=g^n}i=i<<1|a>>>31,a=a<<1|o>>>31,o=o<<1|l>>>31,l=l<<1;y=n&1;n=n>>>1|r<<31,r=r>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(y)e=e^0xe1000000}s=f,c=d,u=p,h=g}function F(e){e=e|0;E=e}function T(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;n=e,i=t,a=r,o=s}function q(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;s=e,c=t,u=r,h=n}function O(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;l=e,f=t,d=r,p=n}function K(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;g=e,A=t,y=r,m=n}function H(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;p=~m&p|m&n,d=~y&d|y&r,f=~A&f|A&t,l=~g&l|g&e}function N(e){e=e|0;if(e&15)return-1;C[e|0]=n>>>24,C[e|1]=n>>>16&255,C[e|2]=n>>>8&255,C[e|3]=n&255,C[e|4]=i>>>24,C[e|5]=i>>>16&255,C[e|6]=i>>>8&255,C[e|7]=i&255,C[e|8]=a>>>24,C[e|9]=a>>>16&255,C[e|10]=a>>>8&255,C[e|11]=a&255,C[e|12]=o>>>24,C[e|13]=o>>>16&255,C[e|14]=o>>>8&255,C[e|15]=o&255;return 16}function L(e){e=e|0;if(e&15)return-1;C[e|0]=s>>>24,C[e|1]=s>>>16&255,C[e|2]=s>>>8&255,C[e|3]=s&255,C[e|4]=c>>>24,C[e|5]=c>>>16&255,C[e|6]=c>>>8&255,C[e|7]=c&255,C[e|8]=u>>>24,C[e|9]=u>>>16&255,C[e|10]=u>>>8&255,C[e|11]=u&255,C[e|12]=h>>>24,C[e|13]=h>>>16&255,C[e|14]=h>>>8&255,C[e|15]=h&255;return 16}function G(){k(0,0,0,0);b=n,w=i,v=a,I=o}function j(e,t,r){e=e|0;t=t|0;r=r|0;var s=0;if(t&15)return-1;while((r|0)>=16){W[e&7](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);C[t|0]=n>>>24,C[t|1]=n>>>16&255,C[t|2]=n>>>8&255,C[t|3]=n&255,C[t|4]=i>>>24,C[t|5]=i>>>16&255,C[t|6]=i>>>8&255,C[t|7]=i&255,C[t|8]=a>>>24,C[t|9]=a>>>16&255,C[t|10]=a>>>8&255,C[t|11]=a&255,C[t|12]=o>>>24,C[t|13]=o>>>16&255,C[t|14]=o>>>8&255,C[t|15]=o&255;s=s+16|0,t=t+16|0,r=r-16|0}return s|0}function z(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;if(t&15)return-1;while((r|0)>=16){Z[e&1](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);n=n+16|0,t=t+16|0,r=r-16|0}return n|0}var W=[k,S,Q,x,P,M,U,D];var Z=[Q,R];return{set_rounds:F,set_state:T,set_iv:q,set_nonce:O,set_mask:K,set_counter:H,get_state:N,get_iv:L,gcm_init:G,cipher:j,mac:z}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return h.set_key=function(e,t,n,a,o,c,u,l,f){var d=r.subarray(0,60),p=r.subarray(256,316);d.set([t,n,a,o,c,u,l,f]);for(var g=e,A=1;g<4*e+28;g++){var y=d[g-1];(g%e==0||8===e&&g%e==4)&&(y=i[y>>>24]<<24^i[y>>>16&255]<<16^i[y>>>8&255]<<8^i[255&y]),g%e==0&&(y=y<<8^y>>>24^A<<24,A=A<<1^(128&A?27:0)),d[g]=d[g-e]^y}for(var m=0;m=g-4?y:s[0][i[y>>>24]]^s[1][i[y>>>16&255]]^s[2][i[y>>>8&255]]^s[3][i[255&y]];h.set_rounds(e+5)},h};return h.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},h.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},h.MAC={CBC:0,GCM:1},h.HEAP_DATA=16384,h}();function bs(e){return e instanceof Uint8Array}function ws(e,t){const r=e?e.byteLength:t||65536;if(4095&r||r<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e||new Uint8Array(new ArrayBuffer(r))}function vs(e,t,r,n,i){const a=e.length-t,o=ae+t.length),0),r=new Uint8Array(t);let n=0;for(let t=0;t>2,i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12),n>16?i.getUint32(16):0,n>16?i.getUint32(20):0,n>24?i.getUint32(24):0,n>24?i.getUint32(28):0),void 0!==t){if(16!==t.length)throw new Bs("illegal iv size");let e=new DataView(t.buffer,t.byteOffset,t.byteLength);r.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(e){if(!bs(e))throw new TypeError("data isn't of expected type");let{heap:t,asm:r}=this.acquire_asm(),n=ms.ENC[this.mode],i=ms.HEAP_DATA,a=this.pos,o=this.len,s=0,c=e.length||0,u=0,h=0,l=new Uint8Array(o+c&-16);for(;c>0;)h=vs(t,a+o,e,s,c),o+=h,s+=h,c-=h,h=r.cipher(n,i+a,o),h&&l.set(t.subarray(a,a+h),u),u+=h,h0;)f=vs(t,a+o,e,s,c),o+=f,s+=f,c-=f,f=r.cipher(n,i+a,o-(c?0:l)),f&&d.set(t.subarray(a,a+f),u),u+=f,f0){if(a%16){if(this.hasOwnProperty("padding"))throw new Bs("data length must be a multiple of the block size");a+=16-a%16}if(t.cipher(r,n+i,a),this.hasOwnProperty("padding")&&this.padding){let t=e[i+o-1];if(t<1||t>16||t>o)throw new Cs("bad padding");let r=0;for(let n=t;n>1;n--)r|=t^e[i+o-n];if(r)throw new Cs("bad padding");o-=t}}const s=new Uint8Array(o);return o>0&&s.set(e.subarray(i,i+o)),this.pos=0,this.len=0,this.release_asm(),s}}class Qs{static encrypt(e,t,r=!1){return new Qs(t,r).encrypt(e)}static decrypt(e,t,r=!1){return new Qs(t,r).decrypt(e)}constructor(e,t=!1,r){this.aes=r||new Ss(e,void 0,t,"ECB")}encrypt(e){return Is(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Is(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function xs(e){const t=function(e){const t=new Qs(e);this.encrypt=function(e){return t.encrypt(e)},this.decrypt=function(e){return t.decrypt(e)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function Ps(e,t,r,n,i,a){const o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],c=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],d=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let p,g,A,y,m,b,w,v,I,E,B,C,_,k,S=0,Q=t.length;const x=32===e.length?3:9;v=3===x?r?[0,32,2]:[30,-2,-2]:r?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],r&&(t=function(e,t){const r=8-e.length%8;let n;if(2===t&&r<8)n=32;else if(1===t)n=r;else{if(t||!(r<8)){if(8===r)return e;throw Error("des: invalid padding")}n=0}const i=new Uint8Array(e.length+r);for(let t=0;t>>4^w),w^=A,b^=A<<4,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,b=b<<1|b>>>31,w=w<<1|w>>>31,g=0;g>>4|w<<28)^e[p+1],A=b,b=w,w=A^(s[y>>>24&63]|u[y>>>16&63]|l[y>>>8&63]|d[63&y]|o[m>>>24&63]|c[m>>>16&63]|h[m>>>8&63]|f[63&m]);A=b,b=w,w=A}b=b>>>1|b<<31,w=w>>>1|w<<31,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=252645135&(b>>>4^w),w^=A,b^=A<<4,1===n&&(r?(I=b,B=w):(b^=E,w^=C)),P[M++]=b>>>24,P[M++]=b>>>16&255,P[M++]=b>>>8&255,P[M++]=255&b,P[M++]=w>>>24,P[M++]=w>>>16&255,P[M++]=w>>>8&255,P[M++]=255&w}return r||(P=function(e,t){let r,n=null;if(2===t)r=32;else if(1===t)n=e[e.length-1];else{if(t)throw Error("des: invalid padding");r=0}if(!n){for(n=1;e[e.length-n]===r;)n++;n--}return e.subarray(0,e.length-n)}(P,a)),P}function Ms(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],s=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],l=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],f=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length>8?3:1,A=Array(32*g),y=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let m,b,w,v=0,I=0;for(let E=0;E>>4^E),E^=w,g^=w<<4,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=858993459&(g>>>2^E),E^=w,g^=w<<2,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=16711935&(E>>>8^g),g^=w,E^=w<<8,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=g<<8|E>>>20&240,g=E<<24|E<<8&16711680|E>>>8&65280|E>>>24&240,E=w;for(let e=0;e<16;e++)y[e]?(g=g<<2|g>>>26,E=E<<2|E>>>26):(g=g<<1|g>>>27,E=E<<1|E>>>27),g&=-15,E&=-15,m=t[g>>>28]|r[g>>>24&15]|n[g>>>20&15]|i[g>>>16&15]|a[g>>>12&15]|o[g>>>8&15]|s[g>>>4&15],b=c[E>>>28]|u[E>>>24&15]|h[E>>>20&15]|l[E>>>16&15]|f[E>>>12&15]|d[E>>>8&15]|p[E>>>4&15],w=65535&(b>>>16^m),A[I++]=m^w,A[I++]=b^w<<16}return A}function Us(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(e){return Ps(Ms(this.key[2]),Ps(Ms(this.key[1]),Ps(Ms(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function Ds(){this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),e.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(let e=0;e<16;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>>16&255,t[a+6]=s>>>8&255,t[a+7]=255&s}return t},this.decrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>16&255,t[a+6]=s>>8&255,t[a+7]=255&s}return t};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function r(e,t,r){const n=t+e,i=n<>>32-r;return(a[0][i>>>24]^a[1][i>>>16&255])-a[2][i>>>8&255]+a[3][255&i]}function n(e,t,r){const n=t^e,i=n<>>32-r;return a[0][i>>>24]-a[1][i>>>16&255]+a[2][i>>>8&255]^a[3][255&i]}function i(e,t,r){const n=t-e,i=n<>>32-r;return(a[0][i>>>24]+a[1][i>>>16&255]^a[2][i>>>8&255])-a[3][255&i]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(r){const n=[,,,,,,,,],i=Array(32);let o;for(let e=0;e<4;e++)o=4*e,n[e]=r[o]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3];const s=[6,7,4,5];let c,u=0;for(let r=0;r<2;r++)for(let r=0;r<4;r++){for(o=0;o<4;o++){const t=e[r][o];c=n[t[1]],c^=a[4][n[t[2]>>>2]>>>24-8*(3&t[2])&255],c^=a[5][n[t[3]>>>2]>>>24-8*(3&t[3])&255],c^=a[6][n[t[4]>>>2]>>>24-8*(3&t[4])&255],c^=a[7][n[t[5]>>>2]>>>24-8*(3&t[5])&255],c^=a[s[o]][n[t[6]>>>2]>>>24-8*(3&t[6])&255],n[t[0]]=c}for(o=0;o<4;o++){const e=t[r][o];c=a[4][n[e[0]>>>2]>>>24-8*(3&e[0])&255],c^=a[5][n[e[1]>>>2]>>>24-8*(3&e[1])&255],c^=a[6][n[e[2]>>>2]>>>24-8*(3&e[2])&255],c^=a[7][n[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=a[4+o][n[e[4]>>>2]>>>24-8*(3&e[4])&255],i[u]=c,u++}}for(let e=0;e<16;e++)this.masking[e]=i[e],this.rotate[e]=31&i[16+e]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Rs(e){this.cast5=new Ds,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}Us.keySize=Us.prototype.keySize=24,Us.blockSize=Us.prototype.blockSize=8,Rs.blockSize=Rs.prototype.blockSize=8,Rs.keySize=Rs.prototype.keySize=16;const Fs=4294967295;function Ts(e,t){return(e<>>32-t)&Fs}function qs(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Os(e,t,r){e.splice(t,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function Ks(e,t){return e>>>8*t&255}function Hs(e){this.tf=function(){let e=null,t=null,r=-1,n=[],i=[[],[],[],[]];function a(e){return i[0][Ks(e,0)]^i[1][Ks(e,1)]^i[2][Ks(e,2)]^i[3][Ks(e,3)]}function o(e){return i[0][Ks(e,3)]^i[1][Ks(e,0)]^i[2][Ks(e,1)]^i[3][Ks(e,2)]}function s(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Ts(t[2]^r+i+n[4*e+8]&Fs,31),t[3]=Ts(t[3],1)^r+2*i+n[4*e+9]&Fs,r=a(t[2]),i=o(t[3]),t[0]=Ts(t[0]^r+i+n[4*e+10]&Fs,31),t[1]=Ts(t[1],1)^r+2*i+n[4*e+11]&Fs}function c(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Ts(t[2],1)^r+i+n[4*e+10]&Fs,t[3]=Ts(t[3]^r+2*i+n[4*e+11]&Fs,31),r=a(t[2]),i=o(t[3]),t[0]=Ts(t[0],1)^r+i+n[4*e+8]&Fs,t[1]=Ts(t[1]^r+2*i+n[4*e+9]&Fs,31)}return{name:"twofish",blocksize:16,open:function(t){let r,a,o,s,c;e=t;const u=[],h=[],l=[];let f;const d=[];let p,g,A;const y=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],m=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],b=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],w=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],v=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],I=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],E=[[],[]],B=[[],[],[],[]];function C(e){return e^e>>2^[0,90,180,238][3&e]}function _(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function k(e,t){let r,n,i;for(r=0;r<8;r++)n=t>>>24,t=t<<8&Fs|e>>>24,e=e<<8&Fs,i=n<<1,128&n&&(i^=333),t^=n^i<<16,i^=n>>>1,1&n&&(i^=166),t^=i<<24|i<<8;return t}function S(e,t){const r=t>>4,n=15&t,i=y[e][r^n],a=m[e][v[n]^I[r]];return w[e][v[a]^I[i]]<<4|b[e][i^a]}function Q(e,t){let r=Ks(e,0),n=Ks(e,1),i=Ks(e,2),a=Ks(e,3);switch(f){case 4:r=E[1][r]^Ks(t[3],0),n=E[0][n]^Ks(t[3],1),i=E[0][i]^Ks(t[3],2),a=E[1][a]^Ks(t[3],3);case 3:r=E[1][r]^Ks(t[2],0),n=E[1][n]^Ks(t[2],1),i=E[0][i]^Ks(t[2],2),a=E[0][a]^Ks(t[2],3);case 2:r=E[0][E[0][r]^Ks(t[1],0)]^Ks(t[0],0),n=E[0][E[1][n]^Ks(t[1],1)]^Ks(t[0],1),i=E[1][E[0][i]^Ks(t[1],2)]^Ks(t[0],2),a=E[1][E[1][a]^Ks(t[1],3)]^Ks(t[0],3)}return B[0][r]^B[1][n]^B[2][i]^B[3][a]}for(e=e.slice(0,32),r=e.length;16!==r&&24!==r&&32!==r;)e[r++]=0;for(r=0;r>2]=qs(e,r);for(r=0;r<256;r++)E[0][r]=S(0,r),E[1][r]=S(1,r);for(r=0;r<256;r++)p=E[1][r],g=C(p),A=_(p),B[0][r]=p+(g<<8)+(A<<16)+(A<<24),B[2][r]=g+(A<<8)+(p<<16)+(A<<24),p=E[0][r],g=C(p),A=_(p),B[1][r]=A+(A<<8)+(g<<16)+(p<<24),B[3][r]=g+(p<<8)+(A<<16)+(g<<24);for(f=l.length/2,r=0;r=0;e--)c(e,a);Os(t,r,a[2]^n[0]),Os(t,r+4,a[3]^n[1]),Os(t,r+8,a[0]^n[2]),Os(t,r+12,a[1]^n[3]),r+=16},finalize:function(){return t}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}function Ns(){}function Ls(e){this.bf=new Ns,this.bf.init(e),this.encrypt=function(e){return this.bf.encryptBlock(e)}}Hs.keySize=Hs.prototype.keySize=32,Hs.blockSize=Hs.prototype.blockSize=16,Ns.prototype.BLOCKSIZE=8,Ns.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Ns.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Ns.prototype.NN=16,Ns.prototype._clean=function(e){return e<0&&(e=2147483648+(2147483647&e)),e},Ns.prototype._F=function(e){let t;const r=255&e,n=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][n],t+=this.sboxes[3][r],t},Ns.prototype._encryptBlock=function(e){let t,r=e[0],n=e[1];for(t=0;t>>24-8*t&255,i[t+n]=r[1]>>>24-8*t&255;return i},Ns.prototype._decryptBlock=function(e){let t,r=e[0],n=e[1];for(t=this.NN+1;t>1;--t){r^=this.parray[t],n=this._F(r)^n;const e=r;r=n,n=e}r^=this.parray[1],n^=this.parray[0],e[0]=this._clean(n),e[1]=this._clean(r)},Ns.prototype.init=function(e){let t,r=0;for(this.parray=[],t=0;t=e.length&&(r=0);this.parray[t]=this.PARRAY[t]^n}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],r=0;r<256;++r)this.sboxes[t][r]=this.SBOXES[t][r];const n=[0,0];for(t=0;t>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=t+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=r+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=c+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=u+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=h+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2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e|42]<<8|w[e|43],w[e|44]<<24|w[e|45]<<16|w[e|46]<<8|w[e|47],w[e|48]<<24|w[e|49]<<16|w[e|50]<<8|w[e|51],w[e|52]<<24|w[e|53]<<16|w[e|54]<<8|w[e|55],w[e|56]<<24|w[e|57]<<16|w[e|58]<<8|w[e|59],w[e|60]<<24|w[e|61]<<16|w[e|62]<<8|w[e|63])}function E(e){e=e|0;w[e|0]=n>>>24;w[e|1]=n>>>16&255;w[e|2]=n>>>8&255;w[e|3]=n&255;w[e|4]=i>>>24;w[e|5]=i>>>16&255;w[e|6]=i>>>8&255;w[e|7]=i&255;w[e|8]=a>>>24;w[e|9]=a>>>16&255;w[e|10]=a>>>8&255;w[e|11]=a&255;w[e|12]=o>>>24;w[e|13]=o>>>16&255;w[e|14]=o>>>8&255;w[e|15]=o&255;w[e|16]=s>>>24;w[e|17]=s>>>16&255;w[e|18]=s>>>8&255;w[e|19]=s&255}function B(){n=0x67452301;i=0xefcdab89;a=0x98badcfe;o=0x10325476;s=0xc3d2e1f0;c=u=0}function C(e,t,r,h,l,f,d){e=e|0;t=t|0;r=r|0;h=h|0;l=l|0;f=f|0;d=d|0;n=e;i=t;a=r;o=h;s=l;c=f;u=d}function _(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){I(e);e=e+64|0;t=t-64|0;r=r+64|0}c=c+r|0;if(c>>>0>>0)u=u+1|0;return r|0}function k(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=_(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;c=c+t|0;if(c>>>0>>0)u=u+1|0;w[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)w[e|i]=0x00;I(e);t=0;w[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)w[e|i]=0;w[e|56]=u>>>21&255;w[e|57]=u>>>13&255;w[e|58]=u>>>5&255;w[e|59]=u<<3&255|c>>>29;w[e|60]=c>>>21&255;w[e|61]=c>>>13&255;w[e|62]=c>>>5&255;w[e|63]=c<<3&255;I(e);if(~r)E(r);return n|0}function S(){n=h;i=l;a=f;o=d;s=p;c=64;u=0}function Q(){n=g;i=A;a=y;o=m;s=b;c=64;u=0}function x(e,t,r,w,I,E,C,_,k,S,Q,x,P,M,U,D){e=e|0;t=t|0;r=r|0;w=w|0;I=I|0;E=E|0;C=C|0;_=_|0;k=k|0;S=S|0;Q=Q|0;x=x|0;P=P|0;M=M|0;U=U|0;D=D|0;B();v(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,w^0x5c5c5c5c,I^0x5c5c5c5c,E^0x5c5c5c5c,C^0x5c5c5c5c,_^0x5c5c5c5c,k^0x5c5c5c5c,S^0x5c5c5c5c,Q^0x5c5c5c5c,x^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,U^0x5c5c5c5c,D^0x5c5c5c5c);g=n;A=i;y=a;m=o;b=s;B();v(e^0x36363636,t^0x36363636,r^0x36363636,w^0x36363636,I^0x36363636,E^0x36363636,C^0x36363636,_^0x36363636,k^0x36363636,S^0x36363636,Q^0x36363636,x^0x36363636,P^0x36363636,M^0x36363636,U^0x36363636,D^0x36363636);h=n;l=i;f=a;d=o;p=s;c=64;u=0}function P(e,t,r){e=e|0;t=t|0;r=r|0;var c=0,u=0,h=0,l=0,f=0,d=0;if(e&63)return-1;if(~r)if(r&31)return-1;d=k(e,t,-1)|0;c=n,u=i,h=a,l=o,f=s;Q();v(c,u,h,l,f,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~r)E(r);return d|0}function M(e,t,r,c,u){e=e|0;t=t|0;r=r|0;c=c|0;u=u|0;var h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~u)if(u&31)return-1;w[e+t|0]=r>>>24;w[e+t+1|0]=r>>>16&255;w[e+t+2|0]=r>>>8&255;w[e+t+3|0]=r&255;P(e,t+4|0,-1)|0;h=g=n,l=A=i,f=y=a,d=m=o,p=b=s;c=c-1|0;while((c|0)>0){S();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;Q();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;h=h^n;l=l^i;f=f^a;d=d^o;p=p^s;c=c-1|0}n=h;i=l;a=f;o=d;s=p;if(~u)E(u);return 0}return{reset:B,init:C,process:_,finish:k,hmac_reset:S,hmac_init:x,hmac_finish:P,pbkdf2_generate_block:M}};class Js{constructor(){this.pos=0,this.len=0}reset(){const{asm:e}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,e.reset(),this}process(e){if(null!==this.result)throw new Es("state must be reset before processing new data");const{asm:t,heap:r}=this.acquire_asm();let n=this.pos,i=this.len,a=0,o=e.length,s=0;for(;o>0;)s=vs(r,n+i,e,a,o),i+=s,a+=s,o-=s,s=t.process(n,i),n+=s,i-=s,i||(n=0);return this.pos=n,this.len=i,this}finish(){if(null!==this.result)throw new Es("state must be reset before processing new data");const{asm:e,heap:t}=this.acquire_asm();return e.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(t.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const Vs=[],Ys=[];class $s extends Js{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Vs.pop()||ws(),this.asm=Ys.pop()||Zs({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Vs.push(this.heap),Ys.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new $s).process(e).finish().result}}$s.NAME="sha1",$s.heap_pool=[],$s.asm_pool=[],$s.asm_function=Zs;const Xs=[],ec=[];class tc extends Js{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Xs.pop()||ws(),this.asm=ec.pop()||function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0,Q=new e.Uint8Array(r);function x(e,t,r,l,f,d,p,g,A,y,m,b,w,v,I,E){e=e|0;t=t|0;r=r|0;l=l|0;f=f|0;d=d|0;p=p|0;g=g|0;A=A|0;y=y|0;m=m|0;b=b|0;w=w|0;v=v|0;I=I|0;E=E|0;var B=0,C=0,_=0,k=0,S=0,Q=0,x=0,P=0;B=n;C=i;_=a;k=o;S=s;Q=c;x=u;P=h;P=e+P+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(x^S&(Q^x))+0x428a2f98|0;k=k+P|0;P=P+(B&C^_&(B^C))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0;x=t+x+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(Q^k&(S^Q))+0x71374491|0;_=_+x|0;x=x+(P&B^C&(P^B))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;Q=r+Q+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(S^_&(k^S))+0xb5c0fbcf|0;C=C+Q|0;Q=Q+(x&P^B&(x^P))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;S=l+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(_^k))+0xe9b5dba5|0;B=B+S|0;S=S+(Q&x^P&(Q^x))+(Q>>>2^Q>>>13^Q>>>22^Q<<30^Q<<19^Q<<10)|0;k=f+k+(B>>>6^B>>>11^B>>>25^B<<26^B<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30^S<<19^S<<10)|0;v=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+v+p|0;_=v+_+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(C^P&(B^C))+0xd6990624|0;x=x+_|0;_=_+(k&S^Q&(k^S))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;I=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+I+g|0;C=I+C+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(B^x&(P^B))+0xf40e3585|0;Q=Q+C|0;C=C+(_&k^S&(_^k))+(_>>>2^_>>>13^_>>>22^_<<30^_<<19^_<<10)|0;E=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+E+A|0;B=E+B+(Q>>>6^Q>>>11^Q>>>25^Q<<26^Q<<21^Q<<7)+(P^Q&(x^P))+0x106aa070|0;S=S+B|0;B=B+(C&_^k&(C^_))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+e+y|0;P=e+P+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(x^S&(Q^x))+0x19a4c116|0;k=k+P|0;P=P+(B&C^_&(B^C))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+t+m|0;x=t+x+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(Q^k&(S^Q))+0x1e376c08|0;_=_+x|0;x=x+(P&B^C&(P^B))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;r=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17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[e|28]<<24|Q[e|29]<<16|Q[e|30]<<8|Q[e|31],Q[e|32]<<24|Q[e|33]<<16|Q[e|34]<<8|Q[e|35],Q[e|36]<<24|Q[e|37]<<16|Q[e|38]<<8|Q[e|39],Q[e|40]<<24|Q[e|41]<<16|Q[e|42]<<8|Q[e|43],Q[e|44]<<24|Q[e|45]<<16|Q[e|46]<<8|Q[e|47],Q[e|48]<<24|Q[e|49]<<16|Q[e|50]<<8|Q[e|51],Q[e|52]<<24|Q[e|53]<<16|Q[e|54]<<8|Q[e|55],Q[e|56]<<24|Q[e|57]<<16|Q[e|58]<<8|Q[e|59],Q[e|60]<<24|Q[e|61]<<16|Q[e|62]<<8|Q[e|63])}function M(e){e=e|0;Q[e|0]=n>>>24;Q[e|1]=n>>>16&255;Q[e|2]=n>>>8&255;Q[e|3]=n&255;Q[e|4]=i>>>24;Q[e|5]=i>>>16&255;Q[e|6]=i>>>8&255;Q[e|7]=i&255;Q[e|8]=a>>>24;Q[e|9]=a>>>16&255;Q[e|10]=a>>>8&255;Q[e|11]=a&255;Q[e|12]=o>>>24;Q[e|13]=o>>>16&255;Q[e|14]=o>>>8&255;Q[e|15]=o&255;Q[e|16]=s>>>24;Q[e|17]=s>>>16&255;Q[e|18]=s>>>8&255;Q[e|19]=s&255;Q[e|20]=c>>>24;Q[e|21]=c>>>16&255;Q[e|22]=c>>>8&255;Q[e|23]=c&255;Q[e|24]=u>>>24;Q[e|25]=u>>>16&255;Q[e|26]=u>>>8&255;Q[e|27]=u&255;Q[e|28]=h>>>24;Q[e|29]=h>>>16&255;Q[e|30]=h>>>8&255;Q[e|31]=h&255}function U(){n=0x6a09e667;i=0xbb67ae85;a=0x3c6ef372;o=0xa54ff53a;s=0x510e527f;c=0x9b05688c;u=0x1f83d9ab;h=0x5be0cd19;l=f=0}function D(e,t,r,d,p,g,A,y,m,b){e=e|0;t=t|0;r=r|0;d=d|0;p=p|0;g=g|0;A=A|0;y=y|0;m=m|0;b=b|0;n=e;i=t;a=r;o=d;s=p;c=g;u=A;h=y;l=m;f=b}function R(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){P(e);e=e+64|0;t=t-64|0;r=r+64|0}l=l+r|0;if(l>>>0>>0)f=f+1|0;return r|0}function F(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=R(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;l=l+t|0;if(l>>>0>>0)f=f+1|0;Q[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)Q[e|i]=0x00;P(e);t=0;Q[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)Q[e|i]=0;Q[e|56]=f>>>21&255;Q[e|57]=f>>>13&255;Q[e|58]=f>>>5&255;Q[e|59]=f<<3&255|l>>>29;Q[e|60]=l>>>21&255;Q[e|61]=l>>>13&255;Q[e|62]=l>>>5&255;Q[e|63]=l<<3&255;P(e);if(~r)M(r);return n|0}function T(){n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;l=64;f=0}function q(){n=v;i=I;a=E;o=B;s=C;c=_;u=k;h=S;l=64;f=0}function O(e,t,r,Q,P,M,D,R,F,T,q,O,K,H,N,L){e=e|0;t=t|0;r=r|0;Q=Q|0;P=P|0;M=M|0;D=D|0;R=R|0;F=F|0;T=T|0;q=q|0;O=O|0;K=K|0;H=H|0;N=N|0;L=L|0;U();x(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,Q^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,D^0x5c5c5c5c,R^0x5c5c5c5c,F^0x5c5c5c5c,T^0x5c5c5c5c,q^0x5c5c5c5c,O^0x5c5c5c5c,K^0x5c5c5c5c,H^0x5c5c5c5c,N^0x5c5c5c5c,L^0x5c5c5c5c);v=n;I=i;E=a;B=o;C=s;_=c;k=u;S=h;U();x(e^0x36363636,t^0x36363636,r^0x36363636,Q^0x36363636,P^0x36363636,M^0x36363636,D^0x36363636,R^0x36363636,F^0x36363636,T^0x36363636,q^0x36363636,O^0x36363636,K^0x36363636,H^0x36363636,N^0x36363636,L^0x36363636);d=n;p=i;g=a;A=o;y=s;m=c;b=u;w=h;l=64;f=0}function K(e,t,r){e=e|0;t=t|0;r=r|0;var l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~r)if(r&31)return-1;b=F(e,t,-1)|0;l=n,f=i,d=a,p=o,g=s,A=c,y=u,m=h;q();x(l,f,d,p,g,A,y,m,0x80000000,0,0,0,0,0,0,768);if(~r)M(r);return b|0}function H(e,t,r,l,f){e=e|0;t=t|0;r=r|0;l=l|0;f=f|0;var d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0;if(e&63)return-1;if(~f)if(f&31)return-1;Q[e+t|0]=r>>>24;Q[e+t+1|0]=r>>>16&255;Q[e+t+2|0]=r>>>8&255;Q[e+t+3|0]=r&255;K(e,t+4|0,-1)|0;d=v=n,p=I=i,g=E=a,A=B=o,y=C=s,m=_=c,b=k=u,w=S=h;l=l-1|0;while((l|0)>0){T();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;q();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;d=d^n;p=p^i;g=g^a;A=A^o;y=y^s;m=m^c;b=b^u;w=w^h;l=l-1|0}n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;if(~f)M(f);return 0}return{reset:U,init:D,process:R,finish:F,hmac_reset:T,hmac_init:O,hmac_finish:K,pbkdf2_generate_block:H}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Xs.push(this.heap),ec.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new tc).process(e).finish().result}}tc.NAME="sha256";var rc=nc;function nc(e,t){if(!e)throw Error(t||"Assertion failed")}nc.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var ic=void 0!==so?so:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ac(e,t){return e(t={exports:{}},t.exports),t.exports}function oc(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var sc=ac((function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}));function cc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function uc(e){return 1===e.length?"0"+e:e}function hc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var lc={inherits:sc,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return a},split32:function(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,n){return e+t+r+n>>>0},sum32_5:function(e,t,r,n,i){return e+t+r+n+i>>>0},sum64:function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},sum64_hi:function(e,t,r,n){return(t+n>>>0>>0},sum64_lo:function(e,t,r,n){return t+n>>>0},sum64_4_hi:function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},sum64_5_hi:function(e,t,r,n,i,a,o,s,c,u){var h=0,l=t;return h+=(l=l+n>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function fc(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var dc=fc;fc.prototype.update=function(e,t){if(e=lc.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=lc.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a>>3},Cc=function(e){return gc(e,17)^gc(e,19)^e>>>10},_c=lc.sum32,kc=lc.sum32_4,Sc=lc.sum32_5,Qc=wc,xc=vc,Pc=Ic,Mc=Ec,Uc=Bc,Dc=Cc,Rc=pc.BlockHash,Fc=[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];function Tc(){if(!(this instanceof Tc))return new Tc;Rc.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Fc,this.W=Array(64)}lc.inherits(Tc,Rc);var qc=Tc;function Oc(){if(!(this instanceof Oc))return new Oc;qc.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Tc.blockSize=512,Tc.outSize=256,Tc.hmacStrength=192,Tc.padLength=64,Tc.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>>32-i,r)}function Uu(e,t,r,n,i,a,o){return Mu(t&r|~t&n,e,t,i,a,o)}function Du(e,t,r,n,i,a,o){return Mu(t&n|r&~n,e,t,i,a,o)}function Ru(e,t,r,n,i,a,o){return Mu(t^r^n,e,t,i,a,o)}function Fu(e,t,r,n,i,a,o){return Mu(r^(t|~n),e,t,i,a,o)}function Tu(e){const t=[];let r;for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}const qu="0123456789abcdef".split("");function Ou(e){let t="",r=0;for(;r<4;r++)t+=qu[e>>8*r+4&15]+qu[e>>8*r&15];return t}function Ku(e,t){return e+t&4294967295}const Hu=Xo.getWebCrypto(),Nu=Xo.getNodeCrypto(),Lu=Nu&&Nu.getHashes();function Gu(e){if(Nu&&Lu.includes(e))return async function(t){const r=Nu.createHash(e);return Ho(t,(e=>{r.update(e)}),(()=>new Uint8Array(r.digest())))}}function ju(e,t){return async function(r,n=ss){if(po(r)&&(r=await Wo(r)),!Xo.isStream(r)&&Hu&&t&&r.length>=n.minBytesForWebCrypto)return new Uint8Array(await Hu.digest(t,r));const i=e();return Ho(r,(e=>{i.update(e)}),(()=>new Uint8Array(i.digest())))}}function zu(e,t){return async function(r,n=ss){if(po(r)&&(r=await Wo(r)),Xo.isStream(r)){const t=new e;return Ho(r,(e=>{t.process(e)}),(()=>t.finish().result))}return Hu&&t&&r.length>=n.minBytesForWebCrypto?new Uint8Array(await Hu.digest(t,r)):e.bytes(r)}}const Wu={md5:Gu("md5")||async function(e){const t=function(e){const t=e.length,r=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)Pu(r,Tu(e.substring(n-64,n)));e=e.substring(n-64);const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n>2]|=e.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(Pu(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*t,Pu(r,i),r}(Xo.uint8ArrayToString(e));return Xo.hexToUint8Array(function(e){for(let t=0;tnew Uint8Array(a.update(e))))}(e,t,r,n);if(Xo.isAES(e))return function(e,t,r,n,i){if(Xo.getWebCrypto()&&24!==t.length&&!Xo.isStream(r)&&r.length>=3e3*i.minBytesForWebCrypto)return async function(e,t,r,n){const i="AES-CBC",a=await Yu.importKey("raw",t,{name:i},!1,["encrypt"]),{blockSize:o}=Vu(e),s=Xo.concatUint8Array([new Uint8Array(o),r]),c=new Uint8Array(await Yu.encrypt({name:i,iv:n},a,s)).subarray(0,r.length);return function(e,t){for(let r=0;ra.aes.AES_Encrypt_process(e)),(()=>a.aes.AES_Encrypt_finish()))}(e,t,r,n,i);const o=new(Vu(e))(t),s=o.blockSize,c=n.slice();let u=new Uint8Array;const h=e=>{e&&(u=Xo.concatUint8Array([u,e]));const t=new Uint8Array(u.length);let r,n=0;for(;e?u.length>=s:u.length;){const e=o.encrypt(c);for(r=0;rnew Uint8Array(a.update(e))))}(e,t,r,n);if(Xo.isAES(e))return function(e,t,r,n){if(Xo.isStream(r)){const e=new Ju(t,n);return Ho(r,(t=>e.aes.AES_Decrypt_process(t)),(()=>e.aes.AES_Decrypt_finish()))}return Ju.decrypt(r,t,n)}(0,t,r,n);const a=new(Vu(e))(t),o=a.blockSize;let s=n,c=new Uint8Array;const u=e=>{e&&(c=Xo.concatUint8Array([c,e]));const t=new Uint8Array(c.length);let r,n=0;for(;e?c.length>=o:c.length;){const e=a.encrypt(s);for(s=c.subarray(0,o),r=0;r48)throw new Bs("illegal counter size");let e=Math.pow(2,r)-1;n.set_mask(0,0,e/4294967296|0,0|e)}else r=48,n.set_mask(0,0,65535,4294967295);if(void 0===e)throw Error("nonce is required");{let t=e.length;if(!t||t>16)throw new Bs("illegal nonce size");let r=new DataView(new ArrayBuffer(16));new Uint8Array(r.buffer).set(e),n.set_nonce(r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12))}if(void 0!==t){if(t<0||t>=Math.pow(2,r))throw new Bs("illegal counter value");n.set_counter(0,0,t/4294967296|0,0|t)}}}class nh{static encrypt(e,t,r=!0,n){return new nh(t,n,r).encrypt(e)}static decrypt(e,t,r=!0,n){return new nh(t,n,r).decrypt(e)}constructor(e,t,r=!0,n){this.aes=n||new Ss(e,t,r,"CBC")}encrypt(e){return Is(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Is(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}const ih=Xo.getWebCrypto(),ah=Xo.getNodeCrypto(),oh=16;function sh(e,t){const r=e.length-oh;for(let n=0;n>3),17+(u>>3)),8-(7&u)).subarray(1),d=new Uint8Array(vh),p=new Uint8Array(t.length+Ih);let g,A=0;for(g=0;g16)throw new Bs("illegal tagSize value");const s=t.length||0,c=new Uint8Array(16);12!==s?(this._gcm_mac_process(t),o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=s>>>29,o[12]=s>>>21&255,o[13]=s>>>13&255,o[14]=s>>>5&255,o[15]=s<<3&255,a.mac(ms.MAC.GCM,ms.HEAP_DATA,16),a.get_iv(ms.HEAP_DATA),a.set_iv(0,0,0,0),c.set(o.subarray(0,16))):(c.set(t),c[15]=1);const u=new DataView(c.buffer);if(this.gamma0=u.getUint32(12),a.set_nonce(u.getUint32(0),u.getUint32(4),u.getUint32(8),0),a.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>Qh)throw new Bs("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");a.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(e,t,r,n,i){return new xh(t,r,n,i).encrypt(e)}static decrypt(e,t,r,n,i){return new xh(t,r,n,i).decrypt(e)}encrypt(e){return this.AES_GCM_encrypt(e)}decrypt(e){return this.AES_GCM_decrypt(e)}AES_GCM_Encrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.aes.pos,s=this.aes.len,c=0,u=s+r&-16,h=0;if((a-1<<4)+s+r>Qh)throw new RangeError("counter overflow");const l=new Uint8Array(u);for(;r>0;)h=vs(i,o+s,e,t,r),s+=h,t+=h,r-=h,h=n.cipher(ms.ENC.CTR,ms.HEAP_DATA+o,s),h=n.mac(ms.MAC.GCM,ms.HEAP_DATA+o,h),h&&l.set(i.subarray(o,o+h),c),a+=h>>>4,c+=h,h>>29,t[4]=u>>>21,t[5]=u>>>13&255,t[6]=u>>>5&255,t[7]=u<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(ms.MAC.GCM,ms.HEAP_DATA,16),e.get_iv(ms.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ms.ENC.CTR,ms.HEAP_DATA,16),s.set(t.subarray(0,n),o),this.counter=1,this.aes.pos=0,this.aes.len=0,s}AES_GCM_Decrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.tagSize,s=this.aes.pos,c=this.aes.len,u=0,h=c+r>o?c+r-o&-16:0,l=c+r-h,f=0;if((a-1<<4)+c+r>Qh)throw new RangeError("counter overflow");const d=new Uint8Array(h);for(;r>l;)f=vs(i,s+c,e,t,r-l),c+=f,t+=f,r-=f,f=n.mac(ms.MAC.GCM,ms.HEAP_DATA+s,f),f=n.cipher(ms.DEC.CTR,ms.HEAP_DATA+s,f),f&&d.set(i.subarray(s,s+f),u),a+=f>>>4,u+=f,s=0,c=0;return r>0&&(c+=vs(i,0,e,t,r)),this.counter=a,this.aes.pos=s,this.aes.len=c,d}AES_GCM_Decrypt_finish(){let{asm:e,heap:t}=this.aes.acquire_asm(),r=this.tagSize,n=this.adata,i=this.counter,a=this.aes.pos,o=this.aes.len,s=o-r;if(o>>29,t[4]=l>>>21,t[5]=l>>>13&255,t[6]=l>>>5&255,t[7]=l<<3&255,t[8]=t[9]=t[10]=0,t[11]=f>>>29,t[12]=f>>>21&255,t[13]=f>>>13&255,t[14]=f>>>5&255,t[15]=f<<3&255,e.mac(ms.MAC.GCM,ms.HEAP_DATA,16),e.get_iv(ms.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ms.ENC.CTR,ms.HEAP_DATA,16);let d=0;for(let e=0;e0;){for(a=vs(r,0,e,n,i),n+=a,i-=a;15&a;)r[a++]=0;t.mac(ms.MAC.GCM,ms.HEAP_DATA,a)}}}const Ph=Xo.getWebCrypto(),Mh=Xo.getNodeCrypto(),Uh=Xo.getNodeBuffer(),Dh=16,Rh="AES-GCM";async function Fh(e,t){if(e!==Yo.symmetric.aes128&&e!==Yo.symmetric.aes192&&e!==Yo.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Xo.getNodeCrypto())return{encrypt:async function(e,r,n=new Uint8Array){const i=new Mh.createCipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n);const a=Uh.concat([i.update(e),i.final(),i.getAuthTag()]);return new Uint8Array(a)},decrypt:async function(e,r,n=new Uint8Array){const i=new Mh.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n),i.setAuthTag(e.slice(e.length-Dh,e.length));const a=Uh.concat([i.update(e.slice(0,e.length-Dh)),i.final()]);return new Uint8Array(a)}};if(Xo.getWebCrypto()&&24!==t.length){const e=await Ph.importKey("raw",t,{name:Rh},!1,["encrypt","decrypt"]);return{encrypt:async function(r,n,i=new Uint8Array){if(!r.length)return xh.encrypt(r,t,n,i);const a=await Ph.encrypt({name:Rh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)},decrypt:async function(r,n,i=new Uint8Array){if(r.length===Dh)return xh.decrypt(r,t,n,i);const a=await Ph.decrypt({name:Rh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)}}}return{encrypt:async function(e,r,n){return xh.encrypt(e,t,r,n)},decrypt:async function(e,r,n){return xh.decrypt(e,t,r,n)}}}Fh.getNonce=function(e,t){const r=e.slice();for(let e=0;e>>8)-1}(e,t,r,n)}function d(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function p(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function g(e,t,r){for(var n,i=~(r-1),a=0;a<16;a++)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function A(e,r){var n,i,a,o=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(p(s),p(s),p(s),i=0;i<2;i++){for(o[0]=s[0]-65517,n=1;n<15;n++)o[n]=s[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,g(s,o,1-a)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function y(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return A(r,e),A(n,t),f(r,0,n,0)}function m(e){var t=new Uint8Array(32);return A(t,e),1&t[0]}function b(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function w(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function v(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function I(e,t,r){var n,i,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0,Q=0,x=0,P=0,M=0,U=0,D=0,R=0,F=r[0],T=r[1],q=r[2],O=r[3],K=r[4],H=r[5],N=r[6],L=r[7],G=r[8],j=r[9],z=r[10],W=r[11],Z=r[12],J=r[13],V=r[14],Y=r[15];a+=(n=t[0])*F,o+=n*T,s+=n*q,c+=n*O,u+=n*K,h+=n*H,l+=n*N,f+=n*L,d+=n*G,p+=n*j,g+=n*z,A+=n*W,y+=n*Z,m+=n*J,b+=n*V,w+=n*Y,o+=(n=t[1])*F,s+=n*T,c+=n*q,u+=n*O,h+=n*K,l+=n*H,f+=n*N,d+=n*L,p+=n*G,g+=n*j,A+=n*z,y+=n*W,m+=n*Z,b+=n*J,w+=n*V,v+=n*Y,s+=(n=t[2])*F,c+=n*T,u+=n*q,h+=n*O,l+=n*K,f+=n*H,d+=n*N,p+=n*L,g+=n*G,A+=n*j,y+=n*z,m+=n*W,b+=n*Z,w+=n*J,v+=n*V,I+=n*Y,c+=(n=t[3])*F,u+=n*T,h+=n*q,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,S+=n*Z,Q+=n*J,x+=n*V,P+=n*Y,y+=(n=t[12])*F,m+=n*T,b+=n*q,w+=n*O,v+=n*K,I+=n*H,E+=n*N,B+=n*L,C+=n*G,_+=n*j,k+=n*z,S+=n*W,Q+=n*Z,x+=n*J,P+=n*V,M+=n*Y,m+=(n=t[13])*F,b+=n*T,w+=n*q,v+=n*O,I+=n*K,E+=n*H,B+=n*N,C+=n*L,_+=n*G,k+=n*j,S+=n*z,Q+=n*W,x+=n*Z,P+=n*J,M+=n*V,U+=n*Y,b+=(n=t[14])*F,w+=n*T,v+=n*q,I+=n*O,E+=n*K,B+=n*H,C+=n*N,_+=n*L,k+=n*G,S+=n*j,Q+=n*z,x+=n*W,P+=n*Z,M+=n*J,U+=n*V,D+=n*Y,w+=(n=t[15])*F,o+=38*(I+=n*q),s+=38*(E+=n*O),c+=38*(B+=n*K),u+=38*(C+=n*H),h+=38*(_+=n*N),l+=38*(k+=n*L),f+=38*(S+=n*G),d+=38*(Q+=n*j),p+=38*(x+=n*z),g+=38*(P+=n*W),A+=38*(M+=n*Z),y+=38*(U+=n*J),m+=38*(D+=n*V),b+=38*(R+=n*Y),a=(n=(a+=38*(v+=n*T))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=h,e[6]=l,e[7]=f,e[8]=d,e[9]=p,e[10]=g,e[11]=A,e[12]=y,e[13]=m,e[14]=b,e[15]=w}function E(e,t){I(e,t,t)}function B(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)E(i,i),2!==n&&4!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function C(e,r,n){var i,a,s=new Uint8Array(32),c=new Float64Array(80),u=t(),h=t(),l=t(),f=t(),d=t(),p=t();for(a=0;a<31;a++)s[a]=r[a];for(s[31]=127&r[31]|64,s[0]&=248,b(c,n),a=0;a<16;a++)h[a]=c[a],f[a]=u[a]=l[a]=0;for(u[0]=f[0]=1,a=254;a>=0;--a)g(u,h,i=s[a>>>3]>>>(7&a)&1),g(l,f,i),w(d,u,l),v(u,u,l),w(l,h,f),v(h,h,f),E(f,d),E(p,u),I(u,l,u),I(l,h,d),w(d,u,l),v(u,u,l),E(h,u),v(l,f,p),I(u,l,o),w(u,u,f),I(l,l,u),I(u,f,p),I(f,h,c),E(h,d),g(u,h,i),g(l,f,i);for(a=0;a<16;a++)c[a+16]=u[a],c[a+32]=l[a],c[a+48]=h[a],c[a+64]=f[a];var y=c.subarray(32),m=c.subarray(16);return B(y,y),I(m,m,y),A(e,m),0}function _(e,t){return C(e,t,n)}function k(e,r){var n=t(),i=t(),a=t(),o=t(),s=t(),u=t(),h=t(),l=t(),f=t();v(n,e[1],e[0]),v(f,r[1],r[0]),I(n,n,f),w(i,e[0],e[1]),w(f,r[0],r[1]),I(i,i,f),I(a,e[3],r[3]),I(a,a,c),I(o,e[2],r[2]),w(o,o,o),v(s,i,n),v(u,o,a),w(h,o,a),w(l,i,n),I(e[0],s,u),I(e[1],l,h),I(e[2],h,u),I(e[3],s,l)}function S(e,t,r){var n;for(n=0;n<4;n++)g(e[n],t[n],r)}function Q(e,r){var n=t(),i=t(),a=t();B(a,r[2]),I(n,r[0],a),I(i,r[1],a),A(e,i),e[31]^=m(n)<<7}function x(e,t,r){var n,o;for(d(e[0],i),d(e[1],a),d(e[2],a),d(e[3],i),o=255;o>=0;--o)S(e,t,n=r[o/8|0]>>(7&o)&1),k(t,e),k(e,e),S(e,t,n)}function P(e,r){var n=[t(),t(),t(),t()];d(n[0],u),d(n[1],h),d(n[2],a),I(n[3],u,h),x(e,n,r)}function M(n,i,a){var o,s,c=[t(),t(),t(),t()];for(a||r(i,32),(o=e.hash(i.subarray(0,32)))[0]&=248,o[31]&=127,o[31]|=64,P(c,o),Q(n,c),s=0;s<32;s++)i[s+32]=n[s];return 0}var U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function D(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i>4)*U[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*U[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function R(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;D(e,r)}function F(e,r){var n=t(),o=t(),c=t(),u=t(),h=t(),f=t(),p=t();return d(e[2],a),b(e[1],r),E(c,e[1]),I(u,c,s),v(c,c,e[2]),w(u,e[2],u),E(h,u),E(f,h),I(p,f,h),I(n,p,c),I(n,n,u),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)E(i,i),1!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),I(n,n,c),I(n,n,u),I(n,n,u),I(e[0],n,u),E(o,e[0]),I(o,o,u),y(o,c)&&I(e[0],e[0],l),E(o,e[0]),I(o,o,u),y(o,c)?-1:(m(e[0])===r[31]>>7&&v(e[0],i,e[0]),I(e[3],e[0],e[1]),0)}var T=64;function q(){for(var e=0;e=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return M(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(q(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;re&&(c.imod(a.leftShift(i)).iadd(a),u=c.mod(o).toNumber())}while(!await Gh(c,t,r));return c}async function Gh(e,t,r){return!(t&&!e.dec().gcd(t).isOne()||!await async function(e){const t=await Xo.getBigInteger();return jh.every((r=>0!==e.mod(new t(r))))}(e)||!await async function(e,t){const r=await Xo.getBigInteger();return(t=t||new r(2)).modExp(e.dec(),e).isOne()}(e)||!await async function(e,t,r){const n=await Xo.getBigInteger(),i=e.bitLength();t||(t=Math.max(1,i/48|0));const a=e.dec();let o=0;for(;!a.getBit(o);)o++;const s=e.rightShift(new n(o));for(;t>0;t--){let t,r=(await Hh(new n(2),a)).modExp(s,e);if(!r.isOne()&&!r.equal(a)){for(t=1;tt-11)throw Error("Message too long");const n=function(e){const t=new Uint8Array(e);let r=0;for(;r=8&!n;if(t)return Xo.selectUint8Array(o,a,t);if(o)return a;throw Error("Decryption error")}async function Jh(e,t,r){let n;if(t.length!==Zu.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(zh[e].length);for(n=0;n{$h.generateKeyPair("rsa",r,((r,n,i)=>{r?t(r):e(el.decode(i,"der"))}))}));return{n:n.modulus.toArrayLike(Uint8Array),e:n.publicExponent.toArrayLike(Uint8Array),d:n.privateExponent.toArrayLike(Uint8Array),p:n.prime2.toArrayLike(Uint8Array),q:n.prime1.toArrayLike(Uint8Array),u:n.coefficient.toArrayLike(Uint8Array)}}let r,n,i;do{n=await Lh(e-(e>>1),t,40),r=await Lh(e>>1,t,40),i=r.mul(n)}while(i.bitLength()!==e);const a=r.dec().imul(n.dec());return n.lt(r)&&([r,n]=[n,r]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:r.toUint8Array(),q:n.toUint8Array(),u:r.modInv(n).toUint8Array()}},validateParams:async function(e,t,r,n,i,a){const o=await Xo.getBigInteger();if(e=new o(e),n=new o(n),i=new o(i),!n.mul(i).equal(e))return!1;const s=new o(2);if(a=new o(a),!n.mul(a).mod(i).isOne())return!1;t=new o(t),r=new o(r);const c=new o(Math.floor(e.bitLength()/3)),u=await Hh(s,s.leftShift(c)),h=u.mul(r).mul(t);return!(!h.mod(n.dec()).equal(u)||!h.mod(i.dec()).equal(u))}}),nl=Object.freeze({__proto__:null,encrypt:async function(e,t,r,n){const i=await Xo.getBigInteger();t=new i(t),r=new i(r),n=new i(n);const a=new i(Wh(e,t.byteLength())),o=await Hh(new i(1),t.dec());return{c1:r.modExp(o,t).toUint8Array(),c2:n.modExp(o,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,r,n,i){const a=await Xo.getBigInteger();return e=new a(e),t=new a(t),r=new a(r),n=new a(n),Zh(e.modExp(n,r).modInv(r).imul(t).imod(r).toUint8Array("be",r.byteLength()),i)},validateParams:async function(e,t,r,n){const i=await Xo.getBigInteger();e=new i(e),t=new i(t),r=new i(r);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const o=new i(e.bitLength()),s=new i(1023);if(o.lt(s))return!1;if(!t.modExp(e.dec(),e).isOne())return!1;let c=t;const u=new i(1),h=new i(2).leftShift(new i(17));for(;u.lt(h);){if(c=c.mul(t).imod(e),c.isOne())return!1;u.iinc()}n=new i(n);const l=new i(2),f=await Hh(l.leftShift(o.dec()),l.leftShift(o)),d=e.dec().imul(f).iadd(n);return!!r.equal(t.modExp(d,e))}});class il{constructor(e){if(e instanceof il)this.oid=e.oid;else if(Xo.isArray(e)||Xo.isUint8Array(e)){if(6===(e=new Uint8Array(e))[0]){if(e[1]!==e.length-2)throw Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.oid=e.subarray(1,1+t),1+this.oid.length}throw Error("Invalid oid")}write(){return Xo.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Xo.uint8ArrayToHex(this.oid)}getName(){const e=this.toHex();if(Yo.curve[e])return Yo.write(Yo.curve,e);throw Error("Unknown curve object identifier.")}}function al(e,t){return e.keyPair({priv:t})}function ol(e,t){const r=e.keyPair({pub:t});if(!0!==r.validate().result)throw Error("Invalid elliptic public key");return r}async function sl(e){if(!ss.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await Promise.resolve().then((function(){return Mb}));return new t.ec(e)}function cl(e){let t,r=0;const n=e[0];return n<192?([r]=e,t=1):n<255?(r=(e[0]-192<<8)+e[1]+192,t=2):255===n&&(r=Xo.readNumber(e.subarray(1,5)),t=5),{len:r,offset:t}}function ul(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Xo.concatUint8Array([new Uint8Array([255]),Xo.writeNumber(e,4)])}function hl(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function ll(e){return new Uint8Array([192|e])}function fl(e,t){return Xo.concatUint8Array([ll(e),ul(t)])}function dl(e){return[Yo.packet.literalData,Yo.packet.compressedData,Yo.packet.symmetricallyEncryptedData,Yo.packet.symEncryptedIntegrityProtectedData,Yo.packet.aeadEncryptedData].includes(e)}async function pl(e,t){const r=Fo(e);let n,i;try{const a=await r.peekBytes(2);if(!a||a.length<2||0==(128&a[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const o=await r.readByte();let s,c,u=-1,h=-1;h=0,0!=(64&o)&&(h=1),h?u=63&o:(u=(63&o)>>2,c=3&o);const l=dl(u);let f,d=null;if(l){if("array"===Xo.isStream(e)){const e=new fo;n=To(e),d=e}else{const e=new Po;n=To(e.writable),d=e.readable}i=t({tag:u,packet:d})}else d=[];do{if(h){const e=await r.readByte();if(f=!1,e<192)s=e;else if(e>=192&&e<224)s=(e-192<<8)+await r.readByte()+192;else if(e>223&&e<255){if(s=1<<(31&e),f=!0,!l)throw new TypeError("This packet type does not support partial lengths.")}else s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte()}else switch(c){case 0:s=await r.readByte();break;case 1:s=await r.readByte()<<8|await r.readByte();break;case 2:s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte();break;default:s=1/0}if(s>0){let e=0;for(;;){n&&await n.ready;const{done:t,value:i}=await r.read();if(t){if(s===1/0)break;throw Error("Unexpected end of packet")}const a=s===1/0?i:i.subarray(0,s-e);if(n?await n.write(a):d.push(a),e+=i.length,e>=s){r.unshift(i.subarray(s-e+i.length));break}}}}while(f);const p=await r.peekBytes(l?1/0:2);return n?(await n.ready,await n.close()):(d=Xo.concatUint8Array(d),await t({tag:u,packet:d})),!p||!p.length}catch(e){if(n)return await n.abort(e),!0;throw e}finally{n&&await i,r.releaseLock()}}class gl extends Error{constructor(...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,gl),this.name="UnsupportedError"}}class Al{constructor(e,t){this.tag=e,this.rawContent=t}write(){return this.rawContent}}const yl=Xo.getWebCrypto(),ml=Xo.getNodeCrypto(),bl={p256:"P-256",p384:"P-384",p521:"P-521"},wl=ml?ml.getCurves():[],vl=ml?{secp256k1:wl.includes("secp256k1")?"secp256k1":void 0,p256:wl.includes("prime256v1")?"prime256v1":void 0,p384:wl.includes("secp384r1")?"secp384r1":void 0,p521:wl.includes("secp521r1")?"secp521r1":void 0,ed25519:wl.includes("ED25519")?"ED25519":void 0,curve25519:wl.includes("X25519")?"X25519":void 0,brainpoolP256r1:wl.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:wl.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:wl.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Il={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:vl.p256,web:bl.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha384,cipher:Yo.symmetric.aes192,node:vl.p384,web:bl.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha512,cipher:Yo.symmetric.aes256,node:vl.p521,web:bl.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:vl.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:Yo.publicKey.eddsaLegacy,hash:Yo.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:Yo.publicKey.ecdh,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:vl.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha384,cipher:Yo.symmetric.aes192,node:vl.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha512,cipher:Yo.symmetric.aes256,node:vl.brainpoolP512r1,payloadSize:64}};class El{constructor(e,t){try{(Xo.isArray(e)||Xo.isUint8Array(e))&&(e=new il(e)),e instanceof il&&(e=e.getName()),this.name=Yo.write(Yo.curve,e)}catch(e){throw new gl("Unknown curve")}t=t||Il[this.name],this.keyType=t.keyType,this.oid=t.oid,this.hash=t.hash,this.cipher=t.cipher,this.node=t.node&&Il[this.name],this.web=t.web&&Il[this.name],this.payloadSize=t.payloadSize,this.web&&Xo.getWebCrypto()?this.type="web":this.node&&Xo.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let e;switch(this.type){case"web":try{return await async function(e){const t=await yl.generateKey({name:"ECDSA",namedCurve:bl[e]},!0,["sign","verify"]),r=await yl.exportKey("jwk",t.privateKey);return{publicKey:Cl(await yl.exportKey("jwk",t.publicKey)),privateKey:as(r.d)}}(this.name)}catch(e){Xo.printDebugError("Browser did not support generating ec key "+e.message);break}case"node":return async function(e){const t=ml.createECDH(vl[e]);return await t.generateKeys(),{publicKey:new Uint8Array(t.getPublicKey()),privateKey:new Uint8Array(t.getPrivateKey())}}(this.name);case"curve25519":{const t=Kh(32);t[0]=127&t[0]|64,t[31]&=248;const r=t.slice().reverse();return e=qh.box.keyPair.fromSecretKey(r),{publicKey:Xo.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:t}}case"ed25519":{const e=Kh(32),t=qh.sign.keyPair.fromSeed(e);return{publicKey:Xo.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:e}}}const t=await sl(this.name);return e=await t.genKeyPair({entropy:Xo.uint8ArrayToString(Kh(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}}}async function Bl(e,t,r,n){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===Yo.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if("curve25519"===a){n=n.slice().reverse();const{publicKey:e}=qh.box.keyPair.fromSecretKey(n);r=new Uint8Array(r);const t=new Uint8Array([64,...e]);return!!Xo.equalsUint8Array(t,r)}const o=await sl(a);try{r=ol(o,r).getPublic()}catch(e){return!1}return!!al(o,n).getPublic().eq(r)}function Cl(e){const t=as(e.x),r=as(e.y),n=new Uint8Array(t.length+r.length+1);return n[0]=4,n.set(t,1),n.set(r,t.length+1),n}function _l(e,t,r){const n=e,i=r.slice(1,n+1),a=r.slice(n+1,2*n+1);return{kty:"EC",crv:t,x:os(i,!0),y:os(a,!0),ext:!0}}function kl(e,t,r,n){const i=_l(e,t,r);return i.d=os(n,!0),i}const Sl=Xo.getWebCrypto(),Ql=Xo.getNodeCrypto();async function xl(e,t,r,n,i,a){const o=new El(e);if(r&&!Xo.isStream(r)){const a={publicKey:n,privateKey:i};switch(o.type){case"web":try{return await async function(e,t,r,n){const i=e.payloadSize,a=kl(e.payloadSize,bl[e.name],n.publicKey,n.privateKey),o=await Sl.importKey("jwk",a,{name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,e.hash)}},!1,["sign"]),s=new Uint8Array(await Sl.sign({name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,t)}},o,r));return{r:s.slice(0,i),s:s.slice(i,i<<1)}}(o,t,r,a)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;Xo.printDebugError("Browser did not support signing: "+e.message)}break;case"node":{const e=await async function(e,t,r,n){const i=Ql.createSign(Yo.read(Yo.hash,t));i.write(r),i.end();const a=Dl.encode({version:1,parameters:e.oid,privateKey:Array.from(n.privateKey),publicKey:{unused:0,data:Array.from(n.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return Ul.decode(i.sign(a),"der")}(o,t,r,a);return{r:e.r.toArrayLike(Uint8Array),s:e.s.toArrayLike(Uint8Array)}}}}return async function(e,t,r){const n=al(await sl(e.name),r).sign(t);return{r:n.r.toArrayLike(Uint8Array),s:n.s.toArrayLike(Uint8Array)}}(o,a,i)}async function Pl(e,t,r,n,i,a){const o=new El(e);if(n&&!Xo.isStream(n))switch(o.type){case"web":try{return await async function(e,t,{r:r,s:n},i,a){const o=_l(e.payloadSize,bl[e.name],a),s=await Sl.importKey("jwk",o,{name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,e.hash)}},!1,["verify"]),c=Xo.concatUint8Array([r,n]).buffer;return Sl.verify({name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,t)}},s,c,i)}(o,t,r,n,i)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;Xo.printDebugError("Browser did not support verifying: "+e.message)}break;case"node":return async function(e,t,{r:r,s:n},i,a){const{default:o}=await Promise.resolve().then((function(){return dm})),s=Ql.createVerify(Yo.read(Yo.hash,t));s.write(i),s.end();const c=Fl.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:e.oid},subjectPublicKey:{unused:0,data:Array.from(a)}},"pem",{label:"PUBLIC KEY"}),u=Ul.encode({r:new o(r),s:new o(n)},"der");try{return s.verify(c,u)}catch(e){return!1}}(o,t,r,n,i)}return async function(e,t,r,n){return ol(await sl(e.name),n).verify(r,t)}(o,r,void 0===t?n:a,i)}const Ml=void 0,Ul=Ql?Ml.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,Dl=Ql?Ml.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())})):void 0,Rl=Ql?Ml.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,Fl=Ql?Ml.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Rl),this.key("subjectPublicKey").bitstr())})):void 0;var Tl=Object.freeze({__proto__:null,sign:xl,verify:Pl,validateParams:async function(e,t,r){const n=new El(e);if(n.keyType!==Yo.publicKey.ecdsa)return!1;switch(n.type){case"web":case"node":{const n=Kh(8),i=Yo.hash.sha256,a=await Zu.digest(i,n);try{const o=await xl(e,i,n,t,r,a);return await Pl(e,i,o,n,t,a)}catch(e){return!1}}default:return Bl(Yo.publicKey.ecdsa,e,t,r)}}});qh.hash=e=>new Uint8Array(tu().update(e).digest());var ql=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){if(Zu.getHashByteLength(t)new Uint8Array(tu().update(e).digest());var Kl=Object.freeze({__proto__:null,generate:async function(e){if(e===Yo.publicKey.ed25519){const e=Kh(32),{publicKey:t}=qh.sign.keyPair.fromSeed(e);return{A:t,seed:e}}throw Error("Unsupported EdDSA algorithm")},sign:async function(e,t,r,n,i,a){if(Zu.getHashByteLength(t)=0;--e)for(let t=s-1;t>=0;--t)c[1]=s*e+(t+1),u[0]=a[0]^c[0],u[1]=a[1]^c[1],u[2]=o[2*t],u[3]=o[2*t+1],u=Ll(r.decrypt(Gl(u))),a=u.subarray(0,2),o[2*t]=u[2],o[2*t+1]=u[3];if(a[0]===n[0]&&a[1]===n[1])return Gl(o);throw Error("Key Data Integrity failed")}function Ll(e){const{length:t}=e,r=function(e){if(Xo.isString(e)){const{length:t}=e,r=new ArrayBuffer(t),n=new Uint8Array(r);for(let r=0;r0){const r=e[t-1];if(r>=1){const n=e.subarray(t-r),i=new Uint8Array(r).fill(r);if(Xo.equalsUint8Array(n,i))return e.subarray(0,t-r)}}throw Error("Invalid padding")}var Zl=Object.freeze({__proto__:null,encode:zl,decode:Wl});const Jl=Xo.getWebCrypto(),Vl=Xo.getNodeCrypto();function Yl(e,t,r,n){return Xo.concatUint8Array([t.write(),new Uint8Array([e]),r.write(),Xo.stringToUint8Array("Anonymous Sender "),n.subarray(0,20)])}async function $l(e,t,r,n,i=!1,a=!1){let o;if(i){for(o=0;o=0&&0===t[o];o--);t=t.subarray(0,o+1)}return(await Zu.digest(e,Xo.concatUint8Array([new Uint8Array([0,0,0,1]),t,n]))).subarray(0,r)}async function Xl(e,t,r,n){if(n.length!==e.payloadSize){const t=new Uint8Array(e.payloadSize);t.set(n,e.payloadSize-n.length),n=t}switch(e.type){case"curve25519":{const e=n.slice().reverse();return{secretKey:e,sharedKey:qh.scalarMult(e,t.subarray(1))}}case"web":if(e.web&&Xo.getWebCrypto())try{return await async function(e,t,r,n){const i=kl(e.payloadSize,e.web.web,r,n);let a=Jl.importKey("jwk",i,{name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]);const o=_l(e.payloadSize,e.web.web,t);let s=Jl.importKey("jwk",o,{name:"ECDH",namedCurve:e.web.web},!0,[]);[a,s]=await Promise.all([a,s]);let c=Jl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:s},a,e.web.sharedSize),u=Jl.exportKey("jwk",a);[c,u]=await Promise.all([c,u]);const h=new Uint8Array(c);return{secretKey:as(u.d),sharedKey:h}}(e,t,r,n)}catch(e){Xo.printDebugError(e)}break;case"node":return async function(e,t,r){const n=Vl.createECDH(e.node.node);n.setPrivateKey(r);const i=new Uint8Array(n.computeSecret(t));return{secretKey:new Uint8Array(n.getPrivateKey()),sharedKey:i}}(e,t,n)}return async function(e,t,r){const n=await sl(e.name);t=ol(n,t),r=al(n,r);const i=new Uint8Array(r.getPrivate()),a=r.derive(t.getPublic()),o=n.curve.p.byteLength();return{secretKey:i,sharedKey:a.toArrayLike(Uint8Array,"be",o)}}(e,t,n)}var ef=Object.freeze({__proto__:null,validateParams:async function(e,t,r){return Bl(Yo.publicKey.ecdh,e,t,r)},encrypt:async function(e,t,r,n,i){const a=zl(r),o=new El(e),{publicKey:s,sharedKey:c}=await async function(e,t){switch(e.type){case"curve25519":{const r=Kh(32),{secretKey:n,sharedKey:i}=await Xl(e,t,null,r);let{publicKey:a}=qh.box.keyPair.fromSecretKey(n);return a=Xo.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&Xo.getWebCrypto())try{return await async function(e,t){const r=_l(e.payloadSize,e.web.web,t);let n=Jl.generateKey({name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]),i=Jl.importKey("jwk",r,{name:"ECDH",namedCurve:e.web.web},!1,[]);[n,i]=await Promise.all([n,i]);let a=Jl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:i},n.privateKey,e.web.sharedSize),o=Jl.exportKey("jwk",n.publicKey);[a,o]=await Promise.all([a,o]);const s=new Uint8Array(a);return{publicKey:new Uint8Array(Cl(o)),sharedKey:s}}(e,t)}catch(e){Xo.printDebugError(e)}break;case"node":return async function(e,t){const r=Vl.createECDH(e.node.node);r.generateKeys();const n=new Uint8Array(r.computeSecret(t));return{publicKey:new Uint8Array(r.getPublicKey()),sharedKey:n}}(e,t)}return async function(e,t){const r=await sl(e.name),n=await e.genKeyPair();t=ol(r,t);const i=al(r,n.privateKey),a=n.publicKey,o=i.derive(t.getPublic()),s=r.curve.p.byteLength();return{publicKey:a,sharedKey:o.toArrayLike(Uint8Array,"be",s)}}(e,t)}(o,n),u=Yl(Yo.publicKey.ecdh,e,t,i),{keySize:h}=Vu(t.cipher);return{publicKey:s,wrappedKey:Hl(await $l(t.hash,c,h,u),a)}},decrypt:async function(e,t,r,n,i,a,o){const s=new El(e),{sharedKey:c}=await Xl(s,r,i,a),u=Yl(Yo.publicKey.ecdh,e,t,o),{keySize:h}=Vu(t.cipher);let l;for(let r=0;r<3;r++)try{return Wl(Nl(await $l(t.hash,c,h,u,1===r,2===r),n))}catch(e){l=e}throw l}});const tf=Xo.getWebCrypto(),rf=Xo.getNodeCrypto(),nf=rf&&rf.webcrypto&&rf.webcrypto.subtle;async function af(e,t,r,n,i){const a=Yo.read(Yo.webHash,e);if(!a)throw Error("Hash algo not supported with HKDF");if(tf||nf){const e=tf||nf,o=await e.importKey("raw",t,"HKDF",!1,["deriveBits"]),s=await e.deriveBits({name:"HKDF",hash:a,salt:r,info:n},o,8*i);return new Uint8Array(s)}if(rf){const a=Yo.read(Yo.hash,e),o=(e,t)=>rf.createHmac(a,e).update(t).digest(),s=o(r,t),c=s.length,u=Math.ceil(i/c),h=new Uint8Array(u*c),l=new Uint8Array(c+n.length+1);l.set(n,c);for(let e=0;e0?l:l.subarray(c));l.set(t,0),h.set(t,e*c)}return h.subarray(0,i)}throw Error("No HKDF implementation available")}const of={x25519:Xo.encodeUTF8("OpenPGP X25519")};var sf=Object.freeze({__proto__:null,generate:async function(e){if(e===Yo.publicKey.x25519){const e=Kh(32),{publicKey:t}=qh.box.keyPair.fromSecretKey(e);return{A:t,k:e}}throw Error("Unsupported ECDH algorithm")},validateParams:async function(e,t,r){if(e===Yo.publicKey.x25519){const{publicKey:e}=qh.box.keyPair.fromSecretKey(r);return Xo.equalsUint8Array(t,e)}return!1},encrypt:async function(e,t,r){if(e===Yo.publicKey.x25519){const e=Kh(32),n=qh.scalarMult(e,r),{publicKey:i}=qh.box.keyPair.fromSecretKey(e),a=Xo.concatUint8Array([i,r,n]),{keySize:o}=Vu(Yo.symmetric.aes128);return{ephemeralPublicKey:i,wrappedKey:Hl(await af(Yo.hash.sha256,a,new Uint8Array,of.x25519,o),t)}}throw Error("Unsupported ECDH algorithm")},decrypt:async function(e,t,r,n,i){if(e===Yo.publicKey.x25519){const e=qh.scalarMult(i,t),a=Xo.concatUint8Array([t,n,e]),{keySize:o}=Vu(Yo.symmetric.aes128);return Nl(await af(Yo.hash.sha256,a,new Uint8Array,of.x25519,o),r)}throw Error("Unsupported ECDH algorithm")}}),cf=Object.freeze({__proto__:null,CurveWithOID:El,ecdh:ef,ecdhX:sf,ecdsa:Tl,eddsaLegacy:ql,eddsa:Kl,generate:async function(e){const t=await Xo.getBigInteger();e=new El(e);const r=await e.genKeyPair(),n=new t(r.publicKey).toUint8Array(),i=new t(r.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:n,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return Il[Yo.write(Yo.curve,e.toHex())].hash}}),uf=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){const o=await Xo.getBigInteger(),s=new o(1);let c,u,h,l;n=new o(n),i=new o(i),r=new o(r),a=new o(a),r=r.mod(n),a=a.mod(i);const f=new o(t.subarray(0,i.byteLength())).mod(i);for(;;){if(c=await Hh(s,i),u=r.modExp(c,n).imod(i),u.isZero())continue;const e=a.mul(u).imod(i);if(l=f.add(e).imod(i),h=c.modInv(i).imul(l).imod(i),!h.isZero())break}return{r:u.toUint8Array("be",i.byteLength()),s:h.toUint8Array("be",i.byteLength())}},verify:async function(e,t,r,n,i,a,o,s){const c=await Xo.getBigInteger(),u=new c(0);if(t=new c(t),r=new c(r),a=new c(a),o=new c(o),i=new c(i),s=new c(s),t.lte(u)||t.gte(o)||r.lte(u)||r.gte(o))return Xo.printDebug("invalid DSA Signature"),!1;const h=new c(n.subarray(0,o.byteLength())).imod(o),l=r.modInv(o);if(l.isZero())return Xo.printDebug("invalid DSA Signature"),!1;i=i.mod(a),s=s.mod(a);const f=h.mul(l).imod(o),d=t.mul(l).imod(o),p=i.modExp(f,a),g=s.modExp(d,a);return p.mul(g).imod(a).imod(o).equal(t)},validateParams:async function(e,t,r,n,i){const a=await Xo.getBigInteger();e=new a(e),t=new a(t),r=new a(r),n=new a(n);const o=new a(1);if(r.lte(o)||r.gte(e))return!1;if(!e.dec().mod(t).isZero())return!1;if(!r.modExp(t,e).isOne())return!1;const s=new a(t.bitLength()),c=new a(150);if(s.lt(c)||!await Gh(t,null,32))return!1;i=new a(i);const u=new a(2),h=await Hh(u.leftShift(s.dec()),u.leftShift(s)),l=t.mul(h).add(i);return!!n.equal(r.modExp(l,e))}}),hf={rsa:rl,elgamal:nl,elliptic:cf,dsa:uf,nacl:qh},lf=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let r=0;switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaSign:return{s:Xo.readMPI(t.subarray(r))};case Yo.publicKey.dsa:case Yo.publicKey.ecdsa:{const e=Xo.readMPI(t.subarray(r));return r+=e.length+2,{r:e,s:Xo.readMPI(t.subarray(r))}}case Yo.publicKey.eddsaLegacy:{let e=Xo.readMPI(t.subarray(r));r+=e.length+2,e=Xo.leftPad(e,32);let n=Xo.readMPI(t.subarray(r));return n=Xo.leftPad(n,32),{r:e,s:n}}case Yo.publicKey.ed25519:{const e=t.subarray(r,r+64);return r+=e.length,{RS:e}}default:throw new gl("Unknown signature algorithm.")}},verify:async function(e,t,r,n,i,a){switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaSign:{const{n:e,e:o}=n,s=Xo.leftPad(r.s,e.length);return hf.rsa.verify(t,i,s,e,o,a)}case Yo.publicKey.dsa:{const{g:e,p:i,q:o,y:s}=n,{r:c,s:u}=r;return hf.dsa.verify(t,c,u,a,e,i,o,s)}case Yo.publicKey.ecdsa:{const{oid:e,Q:o}=n,s=new hf.elliptic.CurveWithOID(e).payloadSize,c=Xo.leftPad(r.r,s),u=Xo.leftPad(r.s,s);return hf.elliptic.ecdsa.verify(e,t,{r:c,s:u},i,o,a)}case Yo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=n;return hf.elliptic.eddsaLegacy.verify(e,t,r,i,o,a)}case Yo.publicKey.ed25519:{const{A:o}=n;return hf.elliptic.eddsa.verify(e,t,r,i,o,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,r,n,i,a){if(!r||!n)throw Error("Missing key parameters");switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaSign:{const{n:e,e:o}=r,{d:s,p:c,q:u,u:h}=n;return{s:await hf.rsa.sign(t,i,e,o,s,c,u,h,a)}}case Yo.publicKey.dsa:{const{g:e,p:i,q:o}=r,{x:s}=n;return hf.dsa.sign(t,a,e,i,o,s)}case Yo.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case Yo.publicKey.ecdsa:{const{oid:e,Q:o}=r,{d:s}=n;return hf.elliptic.ecdsa.sign(e,t,i,o,s,a)}case Yo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=r,{seed:s}=n;return hf.elliptic.eddsaLegacy.sign(e,t,i,o,s,a)}case Yo.publicKey.ed25519:{const{A:o}=r,{seed:s}=n;return hf.elliptic.eddsa.sign(e,t,i,o,s,a)}default:throw Error("Unknown signature algorithm.")}}});class ff{constructor(e){e&&(this.data=e)}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.data=e.subarray(1,1+t),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Xo.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class df{constructor(e){if(e){const{hash:t,cipher:r}=e;this.hash=t,this.cipher=r}else this.hash=null,this.cipher=null}read(e){if(e.length<4||3!==e[0]||1!==e[1])throw new gl("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}class pf{static fromObject({wrappedKey:e,algorithm:t}){const r=new pf;return r.wrappedKey=e,r.algorithm=t,r}read(e){let t=0,r=e[t++];this.algorithm=r%2?e[t++]:null,r-=r%2,this.wrappedKey=e.subarray(t,t+r),t+=r}write(){return Xo.concatUint8Array([this.algorithm?new Uint8Array([this.wrappedKey.length+1,this.algorithm]):new Uint8Array([this.wrappedKey.length]),this.wrappedKey])}}function gf(e){try{e.getName()}catch(e){throw new gl("Unknown curve OID")}}var Af=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,r,n,i){switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:{const{n:e,e:t}=r;return{c:await hf.rsa.encrypt(n,e,t)}}case Yo.publicKey.elgamal:{const{p:e,g:t,y:i}=r;return hf.elgamal.encrypt(n,e,t,i)}case Yo.publicKey.ecdh:{const{oid:e,Q:t,kdfParams:a}=r,{publicKey:o,wrappedKey:s}=await hf.elliptic.ecdh.encrypt(e,a,n,t,i);return{V:o,C:new ff(s)}}case Yo.publicKey.x25519:{if(!Xo.isAES(t))throw Error("X25519 keys can only encrypt AES session keys");const{A:i}=r,{ephemeralPublicKey:a,wrappedKey:o}=await hf.elliptic.ecdhX.encrypt(e,n,i);return{ephemeralPublicKey:a,C:pf.fromObject({algorithm:t,wrappedKey:o})}}default:return[]}},publicKeyDecrypt:async function(e,t,r,n,i,a){switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:{const{c:e}=n,{n:i,e:o}=t,{d:s,p:c,q:u,u:h}=r;return hf.rsa.decrypt(e,i,o,s,c,u,h,a)}case Yo.publicKey.elgamal:{const{c1:e,c2:i}=n,o=t.p,s=r.x;return hf.elgamal.decrypt(e,i,o,s,a)}case Yo.publicKey.ecdh:{const{oid:e,Q:a,kdfParams:o}=t,{d:s}=r,{V:c,C:u}=n;return hf.elliptic.ecdh.decrypt(e,o,c,u.data,a,s,i)}case Yo.publicKey.x25519:{const{A:i}=t,{k:a}=r,{ephemeralPublicKey:o,C:s}=n;if(!Xo.isAES(s.algorithm))throw Error("AES session key expected");return hf.elliptic.ecdhX.decrypt(e,o,s.wrappedKey,i,a)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let r=0;switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=Xo.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{n:e,e:n}}}case Yo.publicKey.dsa:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=Xo.readMPI(t.subarray(r));r+=n.length+2;const i=Xo.readMPI(t.subarray(r));r+=i.length+2;const a=Xo.readMPI(t.subarray(r));return r+=a.length+2,{read:r,publicParams:{p:e,q:n,g:i,y:a}}}case Yo.publicKey.elgamal:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=Xo.readMPI(t.subarray(r));r+=n.length+2;const i=Xo.readMPI(t.subarray(r));return r+=i.length+2,{read:r,publicParams:{p:e,g:n,y:i}}}case Yo.publicKey.ecdsa:{const e=new il;r+=e.read(t),gf(e);const n=Xo.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{oid:e,Q:n}}}case Yo.publicKey.eddsaLegacy:{const e=new il;r+=e.read(t),gf(e);let n=Xo.readMPI(t.subarray(r));return r+=n.length+2,n=Xo.leftPad(n,33),{read:r,publicParams:{oid:e,Q:n}}}case Yo.publicKey.ecdh:{const e=new il;r+=e.read(t),gf(e);const n=Xo.readMPI(t.subarray(r));r+=n.length+2;const i=new df;return r+=i.read(t.subarray(r)),{read:r,publicParams:{oid:e,Q:n,kdfParams:i}}}case Yo.publicKey.ed25519:case Yo.publicKey.x25519:{const e=t.subarray(r,r+32);return r+=e.length,{read:r,publicParams:{A:e}}}default:throw new gl("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,r){let n=0;switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:{const e=Xo.readMPI(t.subarray(n));n+=e.length+2;const r=Xo.readMPI(t.subarray(n));n+=r.length+2;const i=Xo.readMPI(t.subarray(n));n+=i.length+2;const a=Xo.readMPI(t.subarray(n));return n+=a.length+2,{read:n,privateParams:{d:e,p:r,q:i,u:a}}}case Yo.publicKey.dsa:case Yo.publicKey.elgamal:{const e=Xo.readMPI(t.subarray(n));return n+=e.length+2,{read:n,privateParams:{x:e}}}case Yo.publicKey.ecdsa:case Yo.publicKey.ecdh:{const e=new El(r.oid);let i=Xo.readMPI(t.subarray(n));return n+=i.length+2,i=Xo.leftPad(i,e.payloadSize),{read:n,privateParams:{d:i}}}case Yo.publicKey.eddsaLegacy:{const e=new El(r.oid);let i=Xo.readMPI(t.subarray(n));return n+=i.length+2,i=Xo.leftPad(i,e.payloadSize),{read:n,privateParams:{seed:i}}}case Yo.publicKey.ed25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{seed:e}}}case Yo.publicKey.x25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{k:e}}}default:throw new gl("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let r=0;switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:return{c:Xo.readMPI(t.subarray(r))};case Yo.publicKey.elgamal:{const e=Xo.readMPI(t.subarray(r));return r+=e.length+2,{c1:e,c2:Xo.readMPI(t.subarray(r))}}case Yo.publicKey.ecdh:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=new ff;return n.read(t.subarray(r)),{V:e,C:n}}case Yo.publicKey.x25519:{const e=t.subarray(r,r+32);r+=e.length;const n=new pf;return n.read(t.subarray(r)),{ephemeralPublicKey:e,C:n}}default:throw new gl("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const r=new Set([Yo.publicKey.ed25519,Yo.publicKey.x25519]),n=Object.keys(t).map((n=>{const i=t[n];return Xo.isUint8Array(i)?r.has(e)?i:Xo.uint8ArrayToMPI(i):i.write()}));return Xo.concatUint8Array(n)},generateParams:function(e,t,r){switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:return hf.rsa.generate(t,65537).then((({n:e,e:t,d:r,p:n,q:i,u:a})=>({privateParams:{d:r,p:n,q:i,u:a},publicParams:{n:e,e:t}})));case Yo.publicKey.ecdsa:return hf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{d:r},publicParams:{oid:new il(e),Q:t}})));case Yo.publicKey.eddsaLegacy:return hf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{seed:r},publicParams:{oid:new il(e),Q:t}})));case Yo.publicKey.ecdh:return hf.elliptic.generate(r).then((({oid:e,Q:t,secret:r,hash:n,cipher:i})=>({privateParams:{d:r},publicParams:{oid:new il(e),Q:t,kdfParams:new df({hash:n,cipher:i})}})));case Yo.publicKey.ed25519:return hf.elliptic.eddsa.generate(e).then((({A:e,seed:t})=>({privateParams:{seed:t},publicParams:{A:e}})));case Yo.publicKey.x25519:return hf.elliptic.ecdhX.generate(e).then((({A:e,k:t})=>({privateParams:{k:t},publicParams:{A:e}})));case Yo.publicKey.dsa:case Yo.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,r){if(!t||!r)throw Error("Missing key parameters");switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:{const{n:e,e:n}=t,{d:i,p:a,q:o,u:s}=r;return hf.rsa.validateParams(e,n,i,a,o,s)}case Yo.publicKey.dsa:{const{p:e,q:n,g:i,y:a}=t,{x:o}=r;return hf.dsa.validateParams(e,n,i,a,o)}case Yo.publicKey.elgamal:{const{p:e,g:n,y:i}=t,{x:a}=r;return hf.elgamal.validateParams(e,n,i,a)}case Yo.publicKey.ecdsa:case Yo.publicKey.ecdh:{const n=hf.elliptic[Yo.read(Yo.publicKey,e)],{oid:i,Q:a}=t,{d:o}=r;return n.validateParams(i,a,o)}case Yo.publicKey.eddsaLegacy:{const{Q:e,oid:n}=t,{seed:i}=r;return hf.elliptic.eddsaLegacy.validateParams(n,e,i)}case Yo.publicKey.ed25519:{const{A:n}=t,{seed:i}=r;return hf.elliptic.eddsa.validateParams(e,n,i)}case Yo.publicKey.x25519:{const{A:n}=t,{k:i}=r;return hf.elliptic.ecdhX.validateParams(e,n,i)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=Vu(e),r=await Kh(t),n=new Uint8Array([r[r.length-2],r[r.length-1]]);return Xo.concat([r,n])},generateSessionKey:function(e){const{keySize:t}=Vu(e);return Kh(t)},getAEADMode:function(e){const t=Yo.read(Yo.aead,e);return Th[t]},getCipher:Vu,getPreferredCurveHashAlgo:function(e,t){switch(e){case Yo.publicKey.ecdsa:case Yo.publicKey.eddsaLegacy:return hf.elliptic.getPreferredHashAlgo(t);case Yo.publicKey.ed25519:return hf.elliptic.eddsa.getPreferredHashAlgo(e);default:throw Error("Unknown elliptic signing algo")}}});const yf={cipher:Ws,hash:Zu,mode:Th,publicKey:hf,signature:lf,random:Nh,pkcs1:Vh,pkcs5:Zl,aesKW:jl};Object.assign(yf,Af);var mf="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;const bf={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(let a=0;a=0;)e[t]=0}const Sf=0,Qf=1,xf=2,Pf=29,Mf=256,Uf=Mf+1+Pf,Df=30,Rf=19,Ff=2*Uf+1,Tf=15,qf=16,Of=256,Kf=16,Hf=17,Nf=18,Lf=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Gf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],jf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],zf=Array(2*(Uf+2));kf(zf);const Wf=Array(2*Df);kf(Wf);const Zf=Array(512);kf(Zf);const Jf=Array(256);kf(Jf);const Vf=Array(Pf);kf(Vf);const Yf=Array(Df);function $f(e){return e<256?Zf[e]:Zf[256+(e>>>7)]}function Xf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ed(e,t,r){e.bi_valid>qf-r?(e.bi_buf|=t<>qf-e.bi_valid,e.bi_valid+=r-qf):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function nd(e,t,r){const n=Array(Tf+1);let i,a,o=0;for(i=1;i<=Tf;i++)n[i]=o=o+r[i-1]<<1;for(a=0;a<=t;a++){const t=e[2*a+1];0!==t&&(e[2*a]=rd(n[t]++,t))}}function id(e){let t;for(t=0;t8?Xf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function od(e,t,r,n){const i=2*t,a=2*r;return e[i]>1;o>=1;o--)sd(e,r,o);c=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],sd(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[2*c]=r[2*o]+r[2*s],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[2*o+1]=r[2*s+1]=c,e.heap[1]=c++,sd(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,h,l,f,d,p,g=0;for(f=0;f<=Tf;f++)e.bl_count[f]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;uc&&(f=c,g++),r[2*h+1]=f,h>n||(e.bl_count[f]++,d=0,h>=s&&(d=o[h-s]),p=r[2*h],e.opt_len+=p*(f+d),a&&(e.static_len+=p*(i[2*h+1]+d)));if(0!==g){do{for(f=c-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(f=c;0!==f;f--)for(h=e.bl_count[f];0!==h;)l=e.heap[--u],l>n||(r[2*l+1]!==f&&(e.opt_len+=(f-r[2*l+1])*r[2*l],r[2*l+1]=f),h--)}}(e,t),nd(r,u,e.bl_count)}function hd(e,t,r){let n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Jf[r]+Mf+1)]++,e.dyn_dtree[2*$f(t)]++),e.last_lit===e.lit_bufsize-1}function pd(e,t,r,n){let i=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{i=i+t[n++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}const gd=function(){let e;const t=[];for(let r=0;r<256;r++){e=r;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();function Ad(e,t,r,n){const i=gd,a=n+r;e^=-1;for(let r=n;r>>8^i[255&(e^t[r])];return-1^e}const yd=3,md=258,bd=md+yd+1;function wd(e){const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(If(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function vd(e,t){(function(e,t,r,n){let i,a,o=0;e.level>0?(e.strm.data_type===_f&&(e.strm.data_type=function(e){let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Bf;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Cf;for(t=32;t=3&&0===e.bl_tree[2*jf[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?fd(e,t,r,n):e.strategy===Ef||a===i?(ed(e,(Qf<<1)+(n?1:0),3),cd(e,zf,Wf)):(ed(e,(xf<<1)+(n?1:0),3),function(e,t,r,n){let i;for(ed(e,t-257,5),ed(e,r-1,5),ed(e,n-4,4),i=0;i=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wd(e.strm)}function Id(e,t,r,n){let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,If(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=pd(e.adler,t,i,r):2===e.state.wrap&&(e.adler=Ad(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Ed(e,t){let r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-bd?e.strstart-(e.w_size-bd):0,u=e.window,h=e.w_mask,l=e.prev,f=e.strstart+md;let d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(r=t,u[r+o]===p&&u[r+o-1]===d&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=l[t&h])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Bd(e){const t=e.w_size;let r,n,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-bd)){If(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do{i=e.head[--r],e.head[r]=i>=t?i-t:0}while(--n);n=t,r=n;do{i=e.prev[--r],e.prev[r]=i>=t?i-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=Id(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=yd)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=yd&&(e.ins_h=(e.ins_h<=yd)if(n=dd(e,e.strstart-e.match_start,e.match_length-yd),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=yd){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=yd&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=yd-1)),e.prev_length>=yd&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-yd,n=dd(e,e.strstart-1-e.prev_match,e.prev_length-yd),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Bd(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,vd(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-bd&&(vd(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(vd(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(vd(e,!1),e.strm.avail_out),1)})),new kd(4,4,8,4,Cd),new kd(4,5,16,8,Cd),new kd(4,6,32,32,Cd),new kd(4,4,16,16,_d),new kd(8,16,32,32,_d),new kd(8,16,128,128,_d),new kd(8,32,128,256,_d),new kd(32,128,258,1024,_d),new kd(32,258,258,4096,_d);try{String.fromCharCode.call(null,0)}catch(so){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(so){}const Sd=new vf(256);for(let e=0;e<256;e++)Sd[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Sd[254]=Sd[254]=1;var Qd=[0,1,3,7,15,31,63,127,255],xd=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};xd.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},xd.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Qd[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var n=r-e;t|=(this.curByte&Qd[e]<>n,this.bitOffset+=e,e=0}}return t},xd.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1},xd.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+e.toString(16)).slice(-2))).join("")}(t)};var Pd=xd,Md=function(){};Md.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Md.prototype.read=function(e,t,r){for(var n=0;n>>0},this.updateCRC=function(t){e=e<<8^Ud[255&(e>>>24^t)]},this.updateCRCRun=function(t,r){for(;r-- >0;)e=e<<8^Ud[255&(e>>>24^t)]}}),Rd=function(e,t){var r,n=e[t];for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},Fd=-2,Td=-3,qd=-4,Od=-5,Kd=-6,Hd=-7,Nd={"-1":"Bad file checksum"};Nd[Fd]="Not bzip data",Nd[Td]="Unexpected input EOF",Nd[qd]="Unexpected output EOF",Nd[Od]="Data error",Nd[Kd]="Out of memory",Nd[Hd]="Obsolete (pre 0.9.5) bzip format not supported.";var Ld=function(e,t){var r=Nd[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},Gd=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Gd.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new Dd,!0):(this.writeCount=-1,!1)},Gd.prototype._start_bunzip=function(e,t){var r=new Uint8Array(4);4===e.read(r,0,4)&&"BZh"===String.fromCharCode(r[0],r[1],r[2])||Ld(Fd,"bad magic");var n=r[3]-48;(n<1||n>9)&&Ld(Fd,"level out of range"),this.reader=new Pd(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Gd.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if("177245385090"===i)return!1;"314159265359"!==i&&Ld(Fd),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&Ld(Hd);var a=n.read(24);a>this.dbufSize&&Ld(Od,"initial position out of bounds");var o=n.read(16),s=new Uint8Array(256),c=0;for(e=0;e<16;e++)if(o&1<<15-e){var u=16*e;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(s[c++]=u+t)}var h=n.read(3);(h<2||h>6)&&Ld(Od);var l=n.read(15);0===l&&Ld(Od);var f=new Uint8Array(256);for(e=0;e=h&&Ld(Od);d[e]=Rd(f,t)}var p,g=c+2,A=[];for(t=0;t20)&&Ld(Od),n.read(1);)n.read(1)?o--:o++;b[e]=o}for(y=m=b[0],e=1;em?m=b[e]:b[e]=l&&Ld(Od),p=A[d[_++]]),e=p.minLen,t=n.read(e);e>p.maxLen&&Ld(Od),!(t<=p.limit[e]);e++)t=t<<1|n.read(1);((t-=p.base[e])<0||t>=258)&&Ld(Od);var S=p.permute[t];if(0!==S&&1!==S){if(B)for(B=0,C+o>this.dbufSize&&Ld(Od),I[E=s[f[0]]]+=o;o--;)k[C++]=E;if(S>c)break;C>=this.dbufSize&&Ld(Od),I[E=s[E=Rd(f,e=S-1)]]++,k[C++]=E}else B||(B=1,o=0),o+=0===S?B:2*B,B<<=1}for((a<0||a>=C)&&Ld(Od),t=0,e=0;e<256;e++)r=t+I[e],I[e]=t,t=r;for(e=0;e>=8,P=-1),this.writePos=Q,this.writeCurrent=x,this.writeCount=C,this.writeRun=P,!0},Gd.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;var a=this.dbuf,o=this.writePos,s=this.writeCurrent,c=this.writeCount;this.outputsize;for(var u=this.writeRun;c;){for(c--,n=s,s=255&(o=a[o]),o>>=8,3==u++?(r=s,i=n,s=-1):(r=1,i=s),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;s!=n&&(u=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Ld(Od,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};const jd=Symbol("verified"),zd=new Set([Yo.signatureSubpacket.issuer,Yo.signatureSubpacket.issuerFingerprint,Yo.signatureSubpacket.embeddedSignature]);class Wd{static get tag(){return Yo.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new ys,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[jd]=null}read(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new gl(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=e[t++],this.publicKeyAlgorithm=e[t++],this.hashAlgorithm=e[t++],t+=this.readSubPackets(e.subarray(t,e.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=e.subarray(0,t),t+=this.readSubPackets(e.subarray(t,e.length),!1),this.signedHashValue=e.subarray(t,t+2),t+=2,this.params=yf.signature.parseSignatureParams(this.publicKeyAlgorithm,e.subarray(t,e.length))}writeParams(){return this.params instanceof Promise?Zo((async()=>yf.serializeParams(this.publicKeyAlgorithm,await this.params))):yf.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const e=[];return e.push(this.signatureData),e.push(this.writeUnhashedSubPackets()),e.push(this.signedHashValue),e.push(this.writeParams()),Xo.concat(e)}async sign(e,t,r=new Date,n=!1){5===e.version?this.version=5:this.version=4;const i=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Xo.normalizeDate(r),this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyID=e.getKeyID(),i.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Xo.concat(i);const a=this.toHash(this.signatureType,t,n),o=await this.hash(this.signatureType,t,a,n);this.signedHashValue=zo(Lo(o),0,2);const s=async()=>yf.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,e.publicParams,e.privateParams,a,await Wo(o));Xo.isStream(o)?this.params=s():(this.params=await s(),this[jd]=!0)}writeHashedSubPackets(){const e=Yo.signatureSubpacket,t=[];let r;if(null===this.created)throw Error("Missing signature creation time");t.push(Zd(e.signatureCreationTime,!0,Xo.writeDate(this.created))),null!==this.signatureExpirationTime&&t.push(Zd(e.signatureExpirationTime,!0,Xo.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&t.push(Zd(e.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),t.push(Zd(e.trustSignature,!0,r))),null!==this.regularExpression&&t.push(Zd(e.regularExpression,!0,this.regularExpression)),null!==this.revocable&&t.push(Zd(e.revocable,!0,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&t.push(Zd(e.keyExpirationTime,!0,Xo.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredSymmetricAlgorithms)),t.push(Zd(e.preferredSymmetricAlgorithms,!1,r))),null!==this.revocationKeyClass&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Xo.concat([r,this.revocationKeyFingerprint]),t.push(Zd(e.revocationKey,!1,r))),this.issuerKeyID.isNull()||5===this.issuerKeyVersion||t.push(Zd(e.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach((({name:n,value:i,humanReadable:a,critical:o})=>{r=[new Uint8Array([a?128:0,0,0,0])];const s=Xo.encodeUTF8(n);r.push(Xo.writeNumber(s.length,2)),r.push(Xo.writeNumber(i.length,2)),r.push(s),r.push(i),r=Xo.concat(r),t.push(Zd(e.notationData,o,r))})),null!==this.preferredHashAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredHashAlgorithms)),t.push(Zd(e.preferredHashAlgorithms,!1,r))),null!==this.preferredCompressionAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredCompressionAlgorithms)),t.push(Zd(e.preferredCompressionAlgorithms,!1,r))),null!==this.keyServerPreferences&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.keyServerPreferences)),t.push(Zd(e.keyServerPreferences,!1,r))),null!==this.preferredKeyServer&&t.push(Zd(e.preferredKeyServer,!1,Xo.encodeUTF8(this.preferredKeyServer))),null!==this.isPrimaryUserID&&t.push(Zd(e.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&t.push(Zd(e.policyURI,!1,Xo.encodeUTF8(this.policyURI))),null!==this.keyFlags&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.keyFlags)),t.push(Zd(e.keyFlags,!0,r))),null!==this.signersUserID&&t.push(Zd(e.signersUserID,!1,Xo.encodeUTF8(this.signersUserID))),null!==this.reasonForRevocationFlag&&(r=Xo.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),t.push(Zd(e.reasonForRevocation,!0,r))),null!==this.features&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.features)),t.push(Zd(e.features,!1,r))),null!==this.signatureTargetPublicKeyAlgorithm&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Xo.stringToUint8Array(this.signatureTargetHash)),r=Xo.concat(r),t.push(Zd(e.signatureTarget,!0,r))),null!==this.embeddedSignature&&t.push(Zd(e.embeddedSignature,!0,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Xo.concat(r),t.push(Zd(e.issuerFingerprint,5===this.version,r))),null!==this.preferredAEADAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredAEADAlgorithms)),t.push(Zd(e.preferredAEADAlgorithms,!1,r)));const n=Xo.concat(t),i=Xo.writeNumber(n.length,2);return Xo.concat([i,n])}writeUnhashedSubPackets(){const e=[];this.unhashedSubpackets.forEach((t=>{e.push(ul(t.length)),e.push(t)}));const t=Xo.concat(e),r=Xo.writeNumber(t.length,2);return Xo.concat([r,t])}readSubPacket(e,t=!0){let r=0;const n=!!(128&e[r]),i=127&e[r];if(t||(this.unhashedSubpackets.push(e.subarray(r,e.length)),zd.has(i)))switch(r++,i){case Yo.signatureSubpacket.signatureCreationTime:this.created=Xo.readDate(e.subarray(r,e.length));break;case Yo.signatureSubpacket.signatureExpirationTime:{const t=Xo.readNumber(e.subarray(r,e.length));this.signatureNeverExpires=0===t,this.signatureExpirationTime=t;break}case Yo.signatureSubpacket.exportableCertification:this.exportable=1===e[r++];break;case Yo.signatureSubpacket.trustSignature:this.trustLevel=e[r++],this.trustAmount=e[r++];break;case Yo.signatureSubpacket.regularExpression:this.regularExpression=e[r];break;case Yo.signatureSubpacket.revocable:this.revocable=1===e[r++];break;case Yo.signatureSubpacket.keyExpirationTime:{const t=Xo.readNumber(e.subarray(r,e.length));this.keyExpirationTime=t,this.keyNeverExpires=0===t;break}case Yo.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.revocationKey:this.revocationKeyClass=e[r++],this.revocationKeyAlgorithm=e[r++],this.revocationKeyFingerprint=e.subarray(r,r+20);break;case Yo.signatureSubpacket.issuer:this.issuerKeyID.read(e.subarray(r,e.length));break;case Yo.signatureSubpacket.notationData:{const t=!!(128&e[r]);r+=4;const i=Xo.readNumber(e.subarray(r,r+2));r+=2;const a=Xo.readNumber(e.subarray(r,r+2));r+=2;const o=Xo.decodeUTF8(e.subarray(r,r+i)),s=e.subarray(r+i,r+i+a);this.rawNotations.push({name:o,humanReadable:t,value:s,critical:n}),t&&(this.notations[o]=Xo.decodeUTF8(s));break}case Yo.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==e[r++];break;case Yo.signatureSubpacket.policyURI:this.policyURI=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.keyFlags:this.keyFlags=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.signersUserID:this.signersUserID=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=e[r++],this.reasonForRevocationString=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.features:this.features=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=e[r++],this.signatureTargetHashAlgorithm=e[r++];const t=yf.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Xo.uint8ArrayToString(e.subarray(r,r+t));break}case Yo.signatureSubpacket.embeddedSignature:this.embeddedSignature=new Wd,this.embeddedSignature.read(e.subarray(r,e.length));break;case Yo.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=e[r++],this.issuerFingerprint=e.subarray(r,e.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case Yo.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...e.subarray(r,e.length)];break;default:{const e=Error("Unknown signature subpacket type "+i);if(n)throw e;Xo.printDebug(e)}}}readSubPackets(e,t=!0,r){const n=Xo.readNumber(e.subarray(0,2));let i=2;for(;i<2+n;){const n=cl(e.subarray(i,e.length));i+=n.offset,this.readSubPacket(e.subarray(i,i+n.len),t,r),i+=n.len}return i}toSign(e,t){const r=Yo.signature;switch(e){case r.binary:return null!==t.text?Xo.encodeUTF8(t.getText(!0)):t.getBytes(!0);case r.text:{const e=t.getBytes(!0);return Xo.canonicalizeEOL(e)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let e,n;if(t.userID)n=180,e=t.userID;else{if(!t.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");n=209,e=t.userAttribute}const i=e.write();return Xo.concat([this.toSign(r.key,t),new Uint8Array([n]),Xo.writeNumber(i.length,4),i])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Xo.concat([this.toSign(r.key,t),this.toSign(r.key,{key:t.bind})]);case r.key:if(void 0===t.key)throw Error("Key packet is required for this signature.");return t.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,t);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(e,t){let r=0;return Ho(Lo(this.signatureData),(e=>{r+=e.length}),(()=>{const n=[];return 5!==this.version||this.signatureType!==Yo.signature.binary&&this.signatureType!==Yo.signature.text||(t?n.push(new Uint8Array(6)):n.push(e.writeHeader())),n.push(new Uint8Array([this.version,255])),5===this.version&&n.push(new Uint8Array(4)),n.push(Xo.writeNumber(r,4)),Xo.concat(n)}))}toHash(e,t,r=!1){const n=this.toSign(e,t);return Xo.concat([n,this.signatureData,this.calculateTrailer(t,r)])}async hash(e,t,r,n=!1){return r||(r=this.toHash(e,t,n)),yf.hash.digest(this.hashAlgorithm,r)}async verify(e,t,r,n=new Date,i=!1,a=ss){if(!this.issuerKeyID.equals(e.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const o=t===Yo.signature.binary||t===Yo.signature.text;if(!this[jd]||o){let n,a;if(this.hashed?a=await this.hashed:(n=this.toHash(t,r,i),a=await this.hash(t,r,n)),a=await Wo(a),this.signedHashValue[0]!==a[0]||this.signedHashValue[1]!==a[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[jd]=await yf.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,e.publicParams,n,a),!this[jd])throw Error("Signature verification failed")}const s=Xo.normalizeDate(n);if(s&&this.created>s)throw Error("Signature creation time is in the future");if(s&&s>=this.getExpirationTime())throw Error("Signature is expired");if(a.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+Yo.read(Yo.hash,this.hashAlgorithm).toUpperCase());if(a.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[Yo.signature.binary,Yo.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+Yo.read(Yo.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:e,critical:t})=>{if(t&&a.knownNotations.indexOf(e)<0)throw Error("Unknown critical notation: "+e)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(e=new Date){const t=Xo.normalizeDate(e);return null!==t&&!(this.created<=t&&tWd.prototype.calculateTrailer.apply(await this.correspondingSig,e)))}async verify(){const e=await this.correspondingSig;if(!e||e.constructor.tag!==Yo.packet.signature)throw Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)}}function Vd(e,t){if(!t[e]){let r;try{r=Yo.read(Yo.packet,e)}catch(t){throw new gl("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+r)}return new t[e]}Jd.prototype.hash=Wd.prototype.hash,Jd.prototype.toHash=Wd.prototype.toHash,Jd.prototype.toSign=Wd.prototype.toSign;class Yd extends Array{static async fromBinary(e,t,r=ss){const n=new Yd;return await n.read(e,t,r),n}async read(e,t,r=ss){r.additionalAllowedPackets.length&&(t={...t,...Xo.constructAllowedPackets(r.additionalAllowedPackets)}),this.stream=No(e,(async(e,n)=>{const i=To(n);try{for(;;)if(await i.ready,await pl(e,(async e=>{try{if(e.tag===Yo.packet.marker||e.tag===Yo.packet.trust)return;const n=Vd(e.tag,t);n.packets=new Yd,n.fromStream=Xo.isStream(e.packet),await n.read(e.packet,r),await i.write(n)}catch(t){const n=!r.ignoreUnsupportedPackets&&t instanceof gl,a=!(r.ignoreMalformedPackets||t instanceof gl);if(n||a||dl(e.tag))await i.abort(t);else{const t=new Al(e.tag,e.packet);await i.write(t)}Xo.printDebugError(t)}})))return await i.ready,void await i.close()}catch(e){await i.abort(e)}}));const n=Fo(this.stream);for(;;){const{done:e,value:t}=await n.read();if(e?this.stream=null:this.push(t),e||dl(t.constructor.tag))break}n.releaseLock()}write(){const e=[];for(let t=0;t{if(t.push(e),i+=e.length,i>=a){const e=Math.min(Math.log(i)/Math.LN2|0,30),r=2**e,n=Xo.concat([hl(e)].concat(t));return t=[n.subarray(1+r)],i=t[0].length,n.subarray(0,1+r)}}),(()=>Xo.concat([ul(i)].concat(t)))))}else{if(Xo.isStream(n)){let t=0;e.push(Ho(Lo(n),(e=>{t+=e.length}),(()=>fl(r,t))))}else e.push(fl(r,n.length));e.push(n)}}return Xo.concat(e)}filterByTag(...e){const t=new Yd,r=e=>t=>e===t;for(let n=0;nt.constructor.tag===e))}indexOfTag(...e){const t=[],r=this,n=e=>t=>e===t;for(let i=0;i>4)}read(e){let t=0;try{this.type=Yo.read(Yo.s2k,e[t++])}catch(e){throw new gl("Unknown S2K type.")}switch(this.algorithm=e[t++],this.type){case"simple":break;case"salted":this.salt=e.subarray(t,t+8),t+=8;break;case"iterated":this.salt=e.subarray(t,t+8),t+=8,this.c=e[t++];break;case"gnu":if("GNU"!==Xo.uint8ArrayToString(e.subarray(t,t+3)))throw new gl("Unknown s2k type.");if(t+=3,1001!==1e3+e[t++])throw new gl("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw new gl("Unknown s2k type.")}return t}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...Xo.stringToUint8Array("GNU"),1]);const e=[new Uint8Array([Yo.write(Yo.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return Xo.concatUint8Array(e)}async produceKey(e,t){e=Xo.encodeUTF8(e);const r=[];let n=0,i=0;for(;n{this.privateParams[e].fill(0),delete this.privateParams[e]})),this.privateParams=null,this.isEncrypted=!0)}}async function ip(e,t,r){const{keySize:n}=yf.getCipher(r);return e.produceKey(t,n)}var ap=ac((function(e){!function(t){function r(e){function t(){return Ee0&&(t.semantic=" "),t}}function A(e,t){return function(){var n,a,s,u,h;for(u=r(),n=o("star"),s=0,h=void 0===t?0:t;null!==(a=e());)s+=1,c(n,a);return s>=h?n:(i(u),null)}}function y(e){return e.charCodeAt(0)>=128}function m(){return s("cr",h("\r")())}function b(){return s("crlf",l(m,I)())}function w(){return s("dquote",h('"')())}function v(){return s("htab",h("\t")())}function I(){return s("lf",h("\n")())}function E(){return s("sp",h(" ")())}function B(){return s("vchar",u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n})))}function C(){return s("wsp",f(E,v)())}function _(){var e=s("quoted-pair",f(l(h("\\"),f(B,C)),ne)());return null===e?null:(e.semantic=e.semantic[1],e)}function k(){return s("fws",f(ae,l(d(l(A(C),p(b))),A(C,1)))())}function S(){return s("ctext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=39||42<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),te)())}function Q(){return s("ccontent",f(S,_,x)())}function x(){return s("comment",l(h("("),A(l(d(k),Q)),d(k),h(")"))())}function P(){return s("cfws",f(l(A(l(d(k),x),1),d(k)),k)())}function M(){return s("atext",u((function(t){var r="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(r=r||y(t)),r})))}function U(){return s("atom",l(g(d(P)),A(M,1),g(d(P)))())}function D(){var e,t;return null===(e=s("dot-atom-text",A(M,1)()))||null!==(t=A(l(h("."),A(M,1)))())&&c(e,t),e}function R(){return s("dot-atom",l(p(d(P)),D,p(d(P)))())}function F(){return s("qtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33===r||35<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),re)())}function T(){return s("qcontent",f(F,_)())}function q(){return s("quoted-string",l(p(d(P)),p(w),A(l(d(g(k)),T)),d(p(k)),p(w),p(d(P)))())}function O(){return s("word",f(U,q)())}function K(){return s("address",f(H,G)())}function H(){return s("mailbox",f(N,X)())}function N(){return s("name-addr",l(d(j),L)())}function L(){return s("angle-addr",f(l(p(d(P)),h("<"),X,h(">"),p(d(P))),oe)())}function G(){return s("group",l(j,h(":"),d(Z),h(";"),p(d(P)))())}function j(){return s("display-name",(null!==(e=s("phrase",f(ie,A(O,1))()))&&(e.semantic=function(e){return e.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(e.semantic)),e));var e}function z(){return s("mailbox-list",f(l(H,A(l(h(","),H))),ue)())}function W(){return s("address-list",f(l(K,A(l(h(","),K))),he)())}function Z(){return s("group-list",f(z,p(P),le)())}function J(){return s("local-part",f(fe,R,q)())}function V(){return s("dtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=90||94<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),pe)())}function Y(){return s("domain-literal",l(p(d(P)),h("["),A(l(d(k),V)),d(k),h("]"),p(d(P)))())}function $(){return s("domain",(t=f(de,R,Y)(),e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)));var t}function X(){return s("addr-spec",l(J,h("@"),$)())}function ee(){return e.strict?null:s("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function te(){return e.strict?null:s("obs-ctext",ee())}function re(){return e.strict?null:s("obs-qtext",ee())}function ne(){return e.strict?null:s("obs-qp",l(h("\\"),f(h("\0"),ee,I,m))())}function ie(){return e.strict?null:e.atInDisplayName?s("obs-phrase",l(O,A(f(O,h("."),h("@"),g(P))))()):s("obs-phrase",l(O,A(f(O,h("."),g(P))))())}function ae(){return e.strict?null:s("obs-FWS",A(l(p(d(b)),C),1)())}function oe(){return e.strict?null:s("obs-angle-addr",l(p(d(P)),h("<"),se,X,h(">"),p(d(P)))())}function se(){return e.strict?null:s("obs-route",l(ce,h(":"))())}function ce(){return e.strict?null:s("obs-domain-list",l(A(f(p(P),h(","))),h("@"),$,A(l(h(","),p(d(P)),d(l(h("@"),$)))))())}function ue(){return e.strict?null:s("obs-mbox-list",l(A(l(p(d(P)),h(","))),H,A(l(h(","),d(l(H,p(P))))))())}function he(){return e.strict?null:s("obs-addr-list",l(A(l(p(d(P)),h(","))),K,A(l(h(","),d(l(K,p(P))))))())}function le(){return e.strict?null:s("obs-group-list",l(A(l(p(d(P)),h(",")),1),p(d(P)))())}function fe(){return e.strict?null:s("obs-local-part",l(O,A(l(h("."),O)))())}function de(){return e.strict?null:s("obs-domain",l(U,A(l(h("."),U)))())}function pe(){return e.strict?null:s("obs-dtext",f(ee,_)())}function ge(e,t){var r,n,i;if(null==t)return null;for(n=[t];n.length>0;){if((i=n.pop()).name===e)return i;for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r])}return null}function Ae(e,t){var r,n,i,a,o;if(null==t)return null;for(n=[t],a=[],o={},r=0;r0;)if((i=n.pop()).name in o)a.push(i);else for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}function ye(t){var r,n,i,a,o;if(null===t)return null;for(r=[],n=Ae(["group","mailbox"],t),i=0;i1?null:t.addresses&&t.addresses[0]:null}(o):e.simple?o&&o.addresses:o}function me(e){var t,r=ge("display-name",e),n=[],i=Ae(["mailbox"],e);for(t=0;t0;)for("cfws"===(i=n.pop()).name&&a.push(i),r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}(0,e),i=Ae(["comment"],e),a=ge("local-part",r),o=ge("domain",r);return{node:e,parts:{name:t,address:r,local:a,domain:o,comments:n},type:e.name,name:we(t),address:we(r),local:we(a),domain:we(o),comments:ve(i),groupName:we(e.groupName)}}function we(e){return null!=e?e.semantic:null}function ve(e){var t="";if(e)for(var r=0;r`),t.userID=r.join(" "),t}read(e,t=ss){const r=Xo.decodeUTF8(e);if(r.length>t.maxUserIDLength)throw Error("User ID string is too long");try{const{name:e,address:t,comments:n}=ap.parseOneAddress({input:r,atInDisplayName:!0});this.comment=n.replace(/^\(|\)$/g,""),this.name=e,this.email=t}catch(e){}this.userID=r}write(){return Xo.encodeUTF8(this.userID)}equals(e){return e&&e.userID===this.userID}}class sp extends np{static get tag(){return Yo.packet.secretSubkey}constructor(e=new Date,t=ss){super(e,t)}}async function cp(e,t,r,n,i=new Date,a){let o,s;for(let c=e.length-1;c>=0;c--)try{(!o||e[c].created>=o.created)&&(await e[c].verify(t,r,n,i,void 0,a),o=e[c])}catch(e){s=e}if(!o)throw Xo.wrapError(`Could not find valid ${Yo.read(Yo.signature,r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((e,t,r)=>t+" "+r.toLowerCase())),s);return o}function up(e,t,r=new Date){const n=Xo.normalizeDate(r);if(null!==n){const r=dp(e,t);return!(e.created<=n&&ne.equals(i.issuerKeyID)))||i.revoked||!1,i.revoked):c.length>0}function dp(e,t){let r;return!1===t.keyNeverExpires&&(r=e.created.getTime()+1e3*t.keyExpirationTime),r?new Date(r):1/0}function pp(e,t){const r=e.algorithm;return r!==Yo.publicKey.rsaEncrypt&&r!==Yo.publicKey.elgamal&&r!==Yo.publicKey.ecdh&&r!==Yo.publicKey.x25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Yo.keyFlags.signData))}function gp(e,t){const r=e.algorithm;return r!==Yo.publicKey.dsa&&r!==Yo.publicKey.rsaSign&&r!==Yo.publicKey.ecdsa&&r!==Yo.publicKey.eddsaLegacy&&r!==Yo.publicKey.ed25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Yo.keyFlags.encryptCommunication)||0!=(t.keyFlags[0]&Yo.keyFlags.encryptStorage))}function Ap(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||!e.keyFlags||0!=(e.keyFlags[0]&Yo.keyFlags.encryptCommunication)||0!=(e.keyFlags[0]&Yo.keyFlags.encryptStorage)}function yp(e,t){const r=Yo.write(Yo.publicKey,e.algorithm),n=e.getAlgorithmInfo();if(t.rejectPublicKeyAlgorithms.has(r))throw Error(n.algorithm+" keys are considered too weak.");switch(r){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:case Yo.publicKey.rsaEncrypt:if(n.bitse.getKeys(s).length>0));return 0===c.length?null:(await Promise.all(c.map((async t=>{const a=await t.getSigningKey(s,e.created,void 0,n);if(e.revoked||await i.isRevoked(e,a.keyPacket,r,n))throw Error("User certificate is revoked");try{await e.verify(a.keyPacket,Yo.signature.certGeneric,o,r,void 0,n)}catch(e){throw Xo.wrapError("User certificate is invalid",e)}}))),!0)}async verifyAllCertifications(e,t=new Date,r){const n=this,i=this.selfCertifications.concat(this.otherCertifications);return Promise.all(i.map((async i=>({keyID:i.issuerKeyID,valid:await n.verifyCertificate(i,e,t,r).catch((()=>!1))}))))}async verify(e=new Date,t){if(!this.selfCertifications.length)throw Error("No self-certifications found");const r=this,n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};let a;for(let o=this.selfCertifications.length-1;o>=0;o--)try{const a=this.selfCertifications[o];if(a.revoked||await r.isRevoked(a,void 0,e,t))throw Error("Self-certification is revoked");try{await a.verify(n,Yo.signature.certGeneric,i,e,void 0,t)}catch(e){throw Xo.wrapError("Self-certification is invalid",e)}return!0}catch(e){a=e}throw a}async update(e,t,r){const n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};await lp(e,this,"selfCertifications",t,(async function(e){try{return await e.verify(n,Yo.signature.certGeneric,i,t,!1,r),!0}catch(e){return!1}})),await lp(e,this,"otherCertifications",t),await lp(e,this,"revocationSignatures",t,(function(e){return fp(n,Yo.signature.certRevocation,i,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Yo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=ss){const a={userID:this.userID,userAttribute:this.userAttribute,key:e},o=new mp(a.userID||a.userAttribute,this.mainKey);return o.revocationSignatures.push(await hp(a,null,e,{signatureType:Yo.signature.certRevocation,reasonForRevocationFlag:Yo.write(Yo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}}class bp{constructor(e,t){this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=t}toPacketList(){const e=new Yd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.bindingSignatures),e}clone(){const e=new bp(this.keyPacket,this.mainKey);return e.bindingSignatures=[...this.bindingSignatures],e.revocationSignatures=[...this.revocationSignatures],e}async isRevoked(e,t,r=new Date,n=ss){const i=this.mainKey.keyPacket;return fp(i,Yo.signature.subkeyRevocation,{key:i,bind:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verify(e=new Date,t=ss){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket},i=await cp(this.bindingSignatures,r,Yo.signature.subkeyBinding,n,e,t);if(i.revoked||await this.isRevoked(i,null,e,t))throw Error("Subkey is revoked");if(up(this.keyPacket,i,e))throw Error("Subkey is expired");return i}async getExpirationTime(e=new Date,t=ss){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket};let i;try{i=await cp(this.bindingSignatures,r,Yo.signature.subkeyBinding,n,e,t)}catch(e){return null}const a=dp(this.keyPacket,i),o=i.getExpirationTime();return ai.bindingSignatures[t].created&&(i.bindingSignatures[t]=e),!1;try{return await e.verify(n,Yo.signature.subkeyBinding,a,t,void 0,r),!0}catch(e){return!1}})),await lp(e,this,"revocationSignatures",t,(function(e){return fp(n,Yo.signature.subkeyRevocation,a,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Yo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=ss){const a={key:e,bind:this.keyPacket},o=new bp(this.keyPacket,this.mainKey);return o.revocationSignatures.push(await hp(a,null,e,{signatureType:Yo.signature.subkeyRevocation,reasonForRevocationFlag:Yo.write(Yo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((e=>{bp.prototype[e]=function(){return this.keyPacket[e]()}}));const wp=Xo.constructAllowedPackets([Wd]),vp=new Set([Yo.packet.publicKey,Yo.packet.privateKey]),Ip=new Set([Yo.packet.publicKey,Yo.packet.privateKey,Yo.packet.publicSubkey,Yo.packet.privateSubkey]);class Ep{packetListToStructure(e,t=new Set){let r,n,i,a;for(const o of e){if(o instanceof Al){Ip.has(o.tag)&&!a&&(a=vp.has(o.tag)?vp:Ip);continue}const e=o.constructor.tag;if(a){if(!a.has(e))continue;a=null}if(t.has(e))throw Error("Unexpected packet type: "+e);switch(e){case Yo.packet.publicKey:case Yo.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=o,n=this.getKeyID(),!n)throw Error("Missing Key ID");break;case Yo.packet.userID:case Yo.packet.userAttribute:r=new mp(o,this),this.users.push(r);break;case Yo.packet.publicSubkey:case Yo.packet.secretSubkey:r=null,i=new bp(o,this),this.subkeys.push(i);break;case Yo.packet.signature:switch(o.signatureType){case Yo.signature.certGeneric:case Yo.signature.certPersona:case Yo.signature.certCasual:case Yo.signature.certPositive:if(!r){Xo.printDebug("Dropping certification signatures without preceding user packet");continue}o.issuerKeyID.equals(n)?r.selfCertifications.push(o):r.otherCertifications.push(o);break;case Yo.signature.certRevocation:r?r.revocationSignatures.push(o):this.directSignatures.push(o);break;case Yo.signature.key:this.directSignatures.push(o);break;case Yo.signature.subkeyBinding:if(!i){Xo.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}i.bindingSignatures.push(o);break;case Yo.signature.keyRevocation:this.revocationSignatures.push(o);break;case Yo.signature.subkeyRevocation:if(!i){Xo.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}i.revocationSignatures.push(o)}}}}toPacketList(){const e=new Yd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map((t=>e.push(...t.toPacketList()))),this.subkeys.map((t=>e.push(...t.toPacketList()))),e}clone(e=!1){const t=new this.constructor(this.toPacketList());return e&&t.getKeys().forEach((e=>{if(e.keyPacket=Object.create(Object.getPrototypeOf(e.keyPacket),Object.getOwnPropertyDescriptors(e.keyPacket)),!e.keyPacket.isDecrypted())return;const t={};Object.keys(e.keyPacket.privateParams).forEach((r=>{t[r]=new Uint8Array(e.keyPacket.privateParams[r])})),e.keyPacket.privateParams=t})),t}getSubkeys(e=null){return this.subkeys.filter((t=>!e||t.getKeyID().equals(e,!0)))}getKeys(e=null){const t=[];return e&&!this.getKeyID().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map((e=>e.getKeyID()))}getUserIDs(){return this.users.map((e=>e.userID?e.userID.userID:null)).filter((e=>null!==e))}write(){return this.toPacketList().write()}async getSigningKey(e=null,t=new Date,r={},n=ss){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await cp(r.bindingSignatures,i,Yo.signature.subkeyBinding,e,t,n);if(!pp(r.keyPacket,a))continue;if(!a.embeddedSignature)throw Error("Missing embedded signature");return await cp([a.embeddedSignature],r.keyPacket,Yo.signature.keyBinding,e,t,n),yp(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&pp(i,a.selfCertification))return yp(i,n),this}catch(e){o=e}throw Xo.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),o)}async getEncryptionKey(e,t=new Date,r={},n=ss){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await cp(r.bindingSignatures,i,Yo.signature.subkeyBinding,e,t,n);if(gp(r.keyPacket,a))return yp(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&gp(i,a.selfCertification))return yp(i,n),this}catch(e){o=e}throw Xo.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),o)}async isRevoked(e,t,r=new Date,n=ss){return fp(this.keyPacket,Yo.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verifyPrimaryKey(e=new Date,t={},r=ss){const n=this.keyPacket;if(await this.isRevoked(null,null,e,r))throw Error("Primary key is revoked");const{selfCertification:i}=await this.getPrimaryUser(e,t,r);if(up(n,i,e))throw Error("Primary key is expired");const a=await cp(this.directSignatures,n,Yo.signature.key,{key:n},e,r).catch((()=>{}));if(a&&up(n,a,e))throw Error("Primary key is expired")}async getExpirationTime(e,t=ss){let r;try{const{selfCertification:n}=await this.getPrimaryUser(null,e,t),i=dp(this.keyPacket,n),a=n.getExpirationTime(),o=await cp(this.directSignatures,this.keyPacket,Yo.signature.key,{key:this.keyPacket},null,t).catch((()=>{}));if(o){const e=dp(this.keyPacket,o);r=Math.min(i,a,e)}else r=ie.subkeys.some((e=>t.hasSameFingerprintAs(e))))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,r)}const n=this.clone();return await lp(e,n,"revocationSignatures",t,(i=>fp(n.keyPacket,Yo.signature.keyRevocation,n,[i],null,e.keyPacket,t,r))),await lp(e,n,"directSignatures",t),await Promise.all(e.users.map((async e=>{const i=n.users.filter((t=>e.userID&&e.userID.equals(t.userID)||e.userAttribute&&e.userAttribute.equals(t.userAttribute)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.users.push(t)}}))),await Promise.all(e.subkeys.map((async e=>{const i=n.subkeys.filter((t=>t.hasSameFingerprintAs(e)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.subkeys.push(t)}}))),n}async getRevocationCertificate(e=new Date,t=ss){const r={key:this.keyPacket},n=await cp(this.revocationSignatures,this.keyPacket,Yo.signature.keyRevocation,r,e,t),i=new Yd;return i.push(n),As(Yo.armor.publicKey,i.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,t=new Date,r=ss){const n=await gs(e,r),i=(await Yd.fromBinary(n.data,wp,r)).findPacket(Yo.packet.signature);if(!i||i.signatureType!==Yo.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!i.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await i.verify(this.keyPacket,Yo.signature.keyRevocation,{key:this.keyPacket},t,void 0,r)}catch(e){throw Xo.wrapError("Could not verify revocation signature",e)}const a=this.clone();return a.revocationSignatures.push(i),a}async signPrimaryUser(e,t,r,n=ss){const{index:i,user:a}=await this.getPrimaryUser(t,r,n),o=await a.certify(e,t,n),s=this.clone();return s.users[i]=o,s}async signAllUsers(e,t=new Date,r=ss){const n=this.clone();return n.users=await Promise.all(this.users.map((function(n){return n.certify(e,t,r)}))),n}async verifyPrimaryUser(e,t=new Date,r,n=ss){const i=this.keyPacket,{user:a}=await this.getPrimaryUser(t,r,n);return e?await a.verifyAllCertifications(e,t,n):[{keyID:i.getKeyID(),valid:await a.verify(t,n).catch((()=>!1))}]}async verifyAllUsers(e,t=new Date,r=ss){const n=this.keyPacket,i=[];return await Promise.all(this.users.map((async a=>{const o=e?await a.verifyAllCertifications(e,t,r):[{keyID:n.getKeyID(),valid:await a.verify(t,r).catch((()=>!1))}];i.push(...o.map((e=>({userID:a.userID?a.userID.userID:null,userAttribute:a.userAttribute,keyID:e.keyID,valid:e.valid}))))}))),i}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((e=>{Ep.prototype[e]=bp.prototype[e]}));class Bp extends Ep{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([Yo.packet.secretKey,Yo.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=ss){return As(Yo.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class Cp extends Bp{constructor(e){if(super(),this.packetListToStructure(e,new Set([Yo.packet.publicKey,Yo.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new Yd,t=this.toPacketList();for(const r of t)switch(r.constructor.tag){case Yo.packet.secretKey:{const t=ep.fromSecretKeyPacket(r);e.push(t);break}case Yo.packet.secretSubkey:{const t=tp.fromSecretSubkeyPacket(r);e.push(t);break}default:e.push(r)}return new Bp(e)}armor(e=ss){return As(Yo.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,t=new Date,r={},n=ss){const i=this.keyPacket,a=[];for(let r=0;re.isDecrypted()))}async validate(e=ss){if(!this.isPrivate())throw Error("Cannot validate a public key");let t;if(this.keyPacket.isDummy()){const r=await this.getSigningKey(null,null,void 0,{...e,rejectPublicKeyAlgorithms:new Set,minRSABits:0});r&&!r.keyPacket.isDummy()&&(t=r.keyPacket)}else t=this.keyPacket;if(t)return t.validate();{const e=this.getKeys(),t=e.map((e=>e.keyPacket.isDummy())).every(Boolean);if(t)throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(e.map((async e=>e.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()}))}async revoke({flag:e=Yo.reasonForRevocation.noReason,string:t=""}={},r=new Date,n=ss){if(!this.isPrivate())throw Error("Need private key for revoking");const i={key:this.keyPacket},a=this.clone();return a.revocationSignatures.push(await hp(i,null,this.keyPacket,{signatureType:Yo.signature.keyRevocation,reasonForRevocationFlag:Yo.write(Yo.reasonForRevocation,e),reasonForRevocationString:t},r,void 0,void 0,void 0,n)),a}async addSubkey(e={}){const t={...ss,...e.config};if(e.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(e.rsaBits0&&(a.keyExpirationTime=r.keyExpirationTime,a.keyNeverExpires=!1),await hp(i,null,t,a,r.date,void 0,void 0,void 0,n)}(i,r,e,t),o=this.toPacketList();return o.push(i,a),new Cp(o)}}const _p=Xo.constructAllowedPackets([ep,tp,np,sp,op,rp,Wd]);async function kp({armoredKey:e,binaryKey:t,config:r,...n}){if(r={...ss,...r},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!Xo.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!Xo.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const i=Object.keys(n);if(i.length>0)throw Error("Unknown option: "+i.join(", "));let a;if(e){const{type:t,data:n}=await gs(e,r);if(t!==Yo.armor.publicKey&&t!==Yo.armor.privateKey)throw Error("Armored text not of type key");a=n}else a=t;return function(e){for(const t of e)switch(t.constructor.tag){case Yo.packet.secretKey:return new Cp(e);case Yo.packet.publicKey:return new Bp(e)}throw Error("No key packet found")}(await Yd.fromBinary(a,_p,r))}Object.keys(ss).length;const Sp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function Qp(){}const xp="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function Pp(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Mp=Qp,Up=Promise,Dp=Promise.prototype.then,Rp=Promise.resolve.bind(Up),Fp=Promise.reject.bind(Up);function Tp(e){return new Up(e)}function qp(e){return Rp(e)}function Op(e){return Fp(e)}function Kp(e,t,r){return Dp.call(e,t,r)}function Hp(e,t,r){Kp(Kp(e,t,r),void 0,Mp)}function Np(e,t){Hp(e,t)}function Lp(e,t){Hp(e,void 0,t)}function Gp(e,t,r){return Kp(e,t,r)}function jp(e){Kp(e,void 0,Mp)}const zp=(()=>{const e=xp&&xp.queueMicrotask;if("function"==typeof e)return e;const t=qp(void 0);return e=>Kp(t,e)})();function Wp(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Zp(e,t,r){try{return qp(Wp(e,t,r))}catch(e){return Op(e)}}class Jp{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,a=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}function Vp(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?eg(e):"closed"===t._state?function(e){eg(e),ng(e)}(e):tg(e,t._storedError)}function Yp(e,t){return My(e._ownerReadableStream,t)}function $p(e){"readable"===e._ownerReadableStream._state?rg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){tg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function Xp(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function eg(e){e._closedPromise=Tp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function tg(e,t){eg(e),rg(e,t)}function rg(e,t){void 0!==e._closedPromise_reject&&(jp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function ng(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const ig=Sp("[[AbortSteps]]"),ag=Sp("[[ErrorSteps]]"),og=Sp("[[CancelSteps]]"),sg=Sp("[[PullSteps]]"),cg=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},ug=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function hg(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(t+" is not an object.");var r}function lg(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function fg(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function dg(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function pg(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function gg(e){return Number(e)}function Ag(e){return 0===e?0:e}function yg(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=Ag(n),!cg(n))throw new TypeError(t+" is not a finite number");if(n=function(e){return Ag(ug(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return cg(n)&&0!==n?n:0}function mg(e,t){if(!xy(e))throw new TypeError(t+" is not a ReadableStream.")}function bg(e){return new Bg(e)}function wg(e,t){e._reader._readRequests.push(t)}function vg(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function Ig(e){return e._reader._readRequests.length}function Eg(e){const t=e._reader;return void 0!==t&&!!Cg(t)}class Bg{constructor(e){if(dg(e,1,"ReadableStreamDefaultReader"),mg(e,"First parameter"),Py(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Vp(this,e),this._readRequests=new Jp}get closed(){return Cg(this)?this._closedPromise:Op(kg("closed"))}cancel(e=void 0){return Cg(this)?void 0===this._ownerReadableStream?Op(Xp("cancel")):Yp(this,e):Op(kg("cancel"))}read(){if(!Cg(this))return Op(kg("read"));if(void 0===this._ownerReadableStream)return Op(Xp("read from"));let e,t;const r=Tp(((r,n)=>{e=r,t=n}));return _g(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!Cg(this))throw kg("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$p(this)}}}function Cg(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function _g(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[sg](t)}function kg(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let Sg;Object.defineProperties(Bg.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Bg.prototype,Sp.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof Sp.asyncIterator&&(Sg={[Sp.asyncIterator](){return this}},Object.defineProperty(Sg,Sp.asyncIterator,{enumerable:!1}));class Qg{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Gp(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Gp(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(void 0===e._ownerReadableStream)return Op(Xp("iterate"));let t,r;const n=Tp(((e,n)=>{t=e,r=n}));return _g(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,zp((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,$p(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,$p(e),r(t)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t._ownerReadableStream)return Op(Xp("finish iterating"));if(!this._preventCancel){const r=Yp(t,e);return $p(t),Gp(r,(()=>({value:e,done:!0})))}return $p(t),qp({value:e,done:!0})}}const xg={next(){return Pg(this)?this._asyncIteratorImpl.next():Op(Mg("next"))},return(e){return Pg(this)?this._asyncIteratorImpl.return(e):Op(Mg("return"))}};function Pg(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function Mg(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}void 0!==Sg&&Object.setPrototypeOf(xg,Sg);const Ug=Number.isNaN||function(e){return e!=e};function Dg(e){return!!function(e){return"number"==typeof e&&(!Ug(e)&&!(e<0))}(e)&&e!==1/0}function Rg(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Fg(e,t,r){if(!Dg(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Tg(e){e._queue=new Jp,e._queueTotalSize=0}function qg(e){return e.slice()}class Og{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ng(this))throw nA("view");return this._view}respond(e){if(!Ng(this))throw nA("respond");if(dg(e,1,"respond"),e=yg(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!Dg(t=Number(t)))throw new RangeError("bytesWritten must be a finite");$g(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Ng(this))throw nA("respondWithNewView");if(dg(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){const r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,$g(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(Og.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Og.prototype,Sp.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Kg{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Hg(this))throw iA("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Og.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest}get desiredSize(){if(!Hg(this))throw iA("desiredSize");return rA(this)}close(){if(!Hg(this))throw iA("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw tA(e,t),t}eA(e),Uy(t)}}(this)}enqueue(e){if(!Hg(this))throw iA("enqueue");if(dg(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,a=t.byteLength,o=n;Eg(r)?0===Ig(r)?zg(e,o,i,a):vg(r,new Uint8Array(o,i,a),!1):sA(r)?(zg(e,o,i,a),Yg(e)):zg(e,o,i,a),Lg(e)}(this,e)}error(e=void 0){if(!Hg(this))throw iA("error");tA(this,e)}[og](e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),Tg(this);const t=this._cancelAlgorithm(e);return eA(this),t}[sg](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();this._queueTotalSize-=t.byteLength,Jg(this);const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return void e._chunkSteps(r)}const r=this._autoAllocateChunkSize;if(void 0!==r){let n;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:n,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}wg(t,e),Lg(this)}}function Hg(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Ng(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Lg(e){const t=function(e){const t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Eg(t)&&Ig(t)>0)return!0;if(sA(t)&&oA(t)>0)return!0;return rA(e)>0}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Hp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Lg(e))}),(t=>{tA(e,t)}))))}function Gg(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=jg(t);"default"===t.readerType?vg(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function jg(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function zg(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Wg(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r;let s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);const u=e._queue;for(;s>0;){const r=u.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;h=t.buffer,l=i,f=r.buffer,d=r.byteOffset,p=n,new Uint8Array(h).set(new Uint8Array(f,d,p),l),r.byteLength===n?u.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,Zg(e,n,t),s-=n}var h,l,f,d,p;return c}function Zg(e,t,r){Vg(e),r.bytesFilled+=t}function Jg(e){0===e._queueTotalSize&&e._closeRequested?(eA(e),Uy(e._controlledReadableByteStream)):Lg(e)}function Vg(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Yg(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();Wg(e,t)&&(Xg(e),Gg(e._controlledReadableByteStream,t))}}function $g(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=t.buffer;const r=e._controlledReadableByteStream;if(sA(r))for(;oA(r)>0;)Gg(r,Xg(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Zg(e,t,r),r.bytesFilled0){const t=r.byteOffset+r.bytesFilled,i=r.buffer.slice(t-n,t);zg(e,i,0,i.byteLength)}r.buffer=r.buffer,r.bytesFilled-=n,Gg(e._controlledReadableByteStream,r),Yg(e)}(e,t,r);Lg(e)}function Xg(e){const t=e._pendingPullIntos.shift();return Vg(e),t}function eA(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function tA(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(function(e){Vg(e),e._pendingPullIntos=new Jp}(e),Tg(e),eA(e),Dy(r,t))}function rA(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function nA(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function iA(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function aA(e,t){e._reader._readIntoRequests.push(t)}function oA(e){return e._reader._readIntoRequests.length}function sA(e){const t=e._reader;return void 0!==t&&!!uA(t)}Object.defineProperties(Kg.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Kg.prototype,Sp.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class cA{constructor(e){if(dg(e,1,"ReadableStreamBYOBReader"),mg(e,"First parameter"),Py(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Hg(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Vp(this,e),this._readIntoRequests=new Jp}get closed(){return uA(this)?this._closedPromise:Op(hA("closed"))}cancel(e=void 0){return uA(this)?void 0===this._ownerReadableStream?Op(Xp("cancel")):Yp(this,e):Op(hA("cancel"))}read(e){if(!uA(this))return Op(hA("read"));if(!ArrayBuffer.isView(e))return Op(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return Op(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return Op(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return Op(Xp("read from"));let t,r;const n=Tp(((e,n)=>{t=e,r=n}));return function(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,o={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),void aA(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Wg(e,o)){const t=jg(o);return Jg(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return tA(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(o),aA(n,r),Lg(e)}else{const e=new a(o.buffer,o.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!uA(this))throw hA("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$p(this)}}}function uA(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function hA(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function lA(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(Ug(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function fA(e){const{size:t}=e;return t||(()=>1)}function dA(e,t){hg(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:gg(r),size:void 0===n?void 0:pA(n,t+" has member 'size' that")}}function pA(e,t){return lg(e,t),t=>gg(e(t))}function gA(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function AA(e,t,r){return lg(e,r),()=>Zp(e,t,[])}function yA(e,t,r){return lg(e,r),r=>Wp(e,t,[r])}function mA(e,t,r){return lg(e,r),(r,n)=>Zp(e,t,[r,n])}function bA(e,t){if(!EA(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(cA.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(cA.prototype,Sp.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class wA{constructor(e={},t={}){void 0===e?e=null:fg(e,"First parameter");const r=dA(t,"Second parameter"),n=function(e,t){hg(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,a=null==e?void 0:e.type,o=null==e?void 0:e.write;return{abort:void 0===r?void 0:gA(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:AA(n,e,t+" has member 'close' that"),start:void 0===i?void 0:yA(i,e,t+" has member 'start' that"),write:void 0===o?void 0:mA(o,e,t+" has member 'write' that"),type:a}}(e,"First parameter");if(IA(this),void 0!==n.type)throw new RangeError("Invalid type is specified");const i=fA(r);!function(e,t,r,n){const i=Object.create(KA.prototype);let a=()=>{},o=()=>qp(void 0),s=()=>qp(void 0),c=()=>qp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.write&&(o=e=>t.write(e,i)),void 0!==t.close&&(s=()=>t.close()),void 0!==t.abort&&(c=e=>t.abort(e)),HA(e,i,a,o,s,c,r,n)}(this,n,lA(r,1),i)}get locked(){if(!EA(this))throw ZA("locked");return BA(this)}abort(e=void 0){return EA(this)?BA(this)?Op(new TypeError("Cannot abort a stream that already has a writer")):CA(this,e):Op(ZA("abort"))}close(){return EA(this)?BA(this)?Op(new TypeError("Cannot close a stream that already has a writer")):xA(this)?Op(new TypeError("Cannot close an already-closing stream")):_A(this):Op(ZA("close"))}getWriter(){if(!EA(this))throw ZA("getWriter");return vA(this)}}function vA(e){return new UA(e)}function IA(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new Jp,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function EA(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function BA(e){return void 0!==e._writer}function CA(e,t){const r=e._state;if("closed"===r||"errored"===r)return qp(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let n=!1;"erroring"===r&&(n=!0,t=void 0);const i=Tp(((r,i)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,n||SA(e,t),i}function _A(e){const t=e._state;if("closed"===t||"errored"===t)return Op(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=Tp(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&ay(n),Fg(i=e._writableStreamController,OA,0),GA(i),r}function kA(e,t){"writable"!==e._state?QA(e):SA(e,t)}function SA(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&FA(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&QA(e)}function QA(e){e._state="errored",e._writableStreamController[ag]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Jp,void 0===e._pendingAbortRequest)return void PA(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void PA(e);Hp(e._writableStreamController[ig](r._reason),(()=>{r._resolve(),PA(e)}),(t=>{r._reject(t),PA(e)}))}function xA(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function PA(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&XA(t,e._storedError)}function MA(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){ty(e)}(r):ay(r)),e._backpressure=t}Object.defineProperties(wA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(wA.prototype,Sp.toStringTag,{value:"WritableStream",configurable:!0});class UA{constructor(e){if(dg(e,1,"WritableStreamDefaultWriter"),bA(e,"First parameter"),BA(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!xA(e)&&e._backpressure?ty(this):ny(this),YA(this);else if("erroring"===t)ry(this,e._storedError),YA(this);else if("closed"===t)ny(this),YA(this),ey(this);else{const t=e._storedError;ry(this,t),$A(this,t)}}get closed(){return DA(this)?this._closedPromise:Op(JA("closed"))}get desiredSize(){if(!DA(this))throw JA("desiredSize");if(void 0===this._ownerWritableStream)throw VA("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:LA(t._writableStreamController)}(this)}get ready(){return DA(this)?this._readyPromise:Op(JA("ready"))}abort(e=void 0){return DA(this)?void 0===this._ownerWritableStream?Op(VA("abort")):function(e,t){return CA(e._ownerWritableStream,t)}(this,e):Op(JA("abort"))}close(){if(!DA(this))return Op(JA("close"));const e=this._ownerWritableStream;return void 0===e?Op(VA("close")):xA(e)?Op(new TypeError("Cannot close an already-closing stream")):RA(this)}releaseLock(){if(!DA(this))throw JA("releaseLock");void 0!==this._ownerWritableStream&&TA(this)}write(e=void 0){return DA(this)?void 0===this._ownerWritableStream?Op(VA("write to")):qA(this,e):Op(JA("write"))}}function DA(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function RA(e){return _A(e._ownerWritableStream)}function FA(e,t){"pending"===e._readyPromiseState?iy(e,t):function(e,t){ry(e,t)}(e,t)}function TA(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");FA(e,r),function(e,t){"pending"===e._closedPromiseState?XA(e,t):function(e,t){$A(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function qA(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return jA(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Op(VA("write to"));const a=r._state;if("errored"===a)return Op(r._storedError);if(xA(r)||"closed"===a)return Op(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Op(r._storedError);const o=function(e){return Tp(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{Fg(e,t,r)}catch(t){return void jA(e,t)}const n=e._controlledWritableStream;xA(n)||"writable"!==n._state||MA(n,zA(e)),GA(e)}(n,t,i),o}Object.defineProperties(UA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(UA.prototype,Sp.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const OA={};class KA{constructor(){throw new TypeError("Illegal constructor")}error(e=void 0){if(!function(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&WA(this,e)}[ig](e){const t=this._abortAlgorithm(e);return NA(this),t}[ag](){Tg(this)}}function HA(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Tg(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;const c=zA(t);MA(e,c),Hp(qp(r()),(()=>{t._started=!0,GA(t)}),(r=>{t._started=!0,kA(e,r)}))}function NA(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function LA(e){return e._strategyHWM-e._queueTotalSize}function GA(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void QA(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===OA?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Rg(e);const r=e._closeAlgorithm();NA(e),Hp(r,(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&ey(t)}(t)}),(e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),kA(e,t)}(t,e)}))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r);Hp(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(Rg(e),!xA(r)&&"writable"===t){const t=zA(e);MA(r,t)}GA(e)}),(t=>{"writable"===r._state&&NA(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,kA(e,t)}(r,t)}))}(e,r)}function jA(e,t){"writable"===e._controlledWritableStream._state&&WA(e,t)}function zA(e){return LA(e)<=0}function WA(e,t){const r=e._controlledWritableStream;NA(e),SA(r,t)}function ZA(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function JA(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function VA(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function YA(e){e._closedPromise=Tp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function $A(e,t){YA(e),XA(e,t)}function XA(e,t){void 0!==e._closedPromise_reject&&(jp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function ey(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function ty(e){e._readyPromise=Tp(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function ry(e,t){ty(e),iy(e,t)}function ny(e){ty(e),ay(e)}function iy(e,t){void 0!==e._readyPromise_reject&&(jp(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function ay(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(KA.prototype,{error:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(KA.prototype,Sp.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const oy="undefined"!=typeof DOMException?DOMException:void 0,sy=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(oy)?oy:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(e.prototype=Object.create(Error.prototype),"constructor",{value:e,writable:!0,configurable:!0}),e}();function cy(e,t,r,n,i,a){const o=bg(e),s=vA(t);e._disturbed=!0;let c=!1,u=qp(void 0);return Tp(((h,l)=>{let f;if(void 0!==a){if(f=()=>{const r=new sy("Aborted","AbortError"),a=[];n||a.push((()=>"writable"===t._state?CA(t,r):qp(void 0))),i||a.push((()=>"readable"===e._state?My(e,r):qp(void 0))),g((()=>Promise.all(a.map((e=>e())))),!0,r)},a.aborted)return void f();a.addEventListener("abort",f)}if(p(e,o._closedPromise,(e=>{n?A(!0,e):g((()=>CA(t,e)),!0,e)})),p(t,s._closedPromise,(t=>{i?A(!0,t):g((()=>My(e,t)),!0,t)})),function(e,t,r){"closed"===e._state?r():Np(t,r)}(e,o._closedPromise,(()=>{r?A():g((()=>function(e){const t=e._ownerWritableStream,r=t._state;return xA(t)||"closed"===r?qp(void 0):"errored"===r?Op(t._storedError):RA(e)}(s)))})),xA(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");i?A(!0,t):g((()=>My(e,t)),!0,t)}function d(){const e=u;return Kp(u,(()=>e!==u?d():void 0))}function p(e,t,r){"errored"===e._state?r(e._storedError):Lp(t,r)}function g(e,r,n){function i(){Hp(e(),(()=>y(r,n)),(e=>y(!0,e)))}c||(c=!0,"writable"!==t._state||xA(t)?i():Np(d(),i))}function A(e,r){c||(c=!0,"writable"!==t._state||xA(t)?y(e,r):Np(d(),(()=>y(e,r))))}function y(e,t){TA(s),$p(o),void 0!==a&&a.removeEventListener("abort",f),e?l(t):h(void 0)}jp(Tp(((e,t)=>{!function r(n){n?e():Kp(c?qp(!0):Kp(s._readyPromise,(()=>Tp(((e,t)=>{_g(o,{_chunkSteps:t=>{u=Kp(qA(s,t),void 0,Qp),e(!1)},_closeSteps:()=>e(!0),_errorSteps:t})})))),r,t)}(!1)})))}))}class uy{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!hy(this))throw wy("desiredSize");return yy(this)}close(){if(!hy(this))throw wy("close");if(!my(this))throw new TypeError("The stream is not in a state that permits close");py(this)}enqueue(e=void 0){if(!hy(this))throw wy("enqueue");if(!my(this))throw new TypeError("The stream is not in a state that permits enqueue");return gy(this,e)}error(e=void 0){if(!hy(this))throw wy("error");Ay(this,e)}[og](e){Tg(this);const t=this._cancelAlgorithm(e);return dy(this),t}[sg](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=Rg(this);this._closeRequested&&0===this._queue.length?(dy(this),Uy(t)):ly(this),e._chunkSteps(r)}else wg(t,e),ly(this)}}function hy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function ly(e){fy(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Hp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,ly(e))}),(t=>{Ay(e,t)}))))}function fy(e){const t=e._controlledReadableStream;return!!my(e)&&(!!e._started&&(!!(Py(t)&&Ig(t)>0)||yy(e)>0))}function dy(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function py(e){if(!my(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(dy(e),Uy(t))}function gy(e,t){if(!my(e))return;const r=e._controlledReadableStream;if(Py(r)&&Ig(r)>0)vg(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw Ay(e,t),t}try{Fg(e,t,r)}catch(t){throw Ay(e,t),t}}ly(e)}function Ay(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(Tg(e),dy(e),Dy(r,t))}function yy(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function my(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function by(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Tg(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,Hp(qp(r()),(()=>{t._started=!0,ly(t)}),(e=>{Ay(t,e)}))}function wy(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function vy(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function Iy(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function Ey(e,t,r){return lg(e,r),r=>Wp(e,t,[r])}function By(e,t){if("bytes"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function Cy(e,t){if("byob"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function _y(e,t){hg(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal;return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(a,t+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!n,preventClose:!!i,signal:a}}Object.defineProperties(uy.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(uy.prototype,Sp.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class ky{constructor(e={},t={}){void 0===e?e=null:fg(e,"First parameter");const r=dA(t,"Second parameter"),n=function(e,t){hg(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,o=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:yg(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===i?void 0:vy(i,r,t+" has member 'cancel' that"),pull:void 0===a?void 0:Iy(a,r,t+" has member 'pull' that"),start:void 0===o?void 0:Ey(o,r,t+" has member 'start' that"),type:void 0===s?void 0:By(s,t+" has member 'type' that")}}(e,"First parameter");if(Qy(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(Kg.prototype);let i=()=>{},a=()=>qp(void 0),o=()=>qp(void 0);void 0!==t.start&&(i=()=>t.start(n)),void 0!==t.pull&&(a=()=>t.pull(n)),void 0!==t.cancel&&(o=e=>t.cancel(e));const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Tg(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new Jp,e._readableStreamController=t,Hp(qp(r()),(()=>{t._started=!0,Lg(t)}),(e=>{tA(t,e)}))}(e,n,i,a,o,r,s)}(this,n,lA(r,0))}else{const e=fA(r);!function(e,t,r,n){const i=Object.create(uy.prototype);let a=()=>{},o=()=>qp(void 0),s=()=>qp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.pull&&(o=()=>t.pull(i)),void 0!==t.cancel&&(s=e=>t.cancel(e)),by(e,i,a,o,s,r,n)}(this,n,lA(r,1),e)}}get locked(){if(!xy(this))throw Ry("locked");return Py(this)}cancel(e=void 0){return xy(this)?Py(this)?Op(new TypeError("Cannot cancel a stream that already has a reader")):My(this,e):Op(Ry("cancel"))}getReader(e=void 0){if(!xy(this))throw Ry("getReader");const t=function(e,t){hg(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:Cy(r,t+" has member 'mode' that")}}(e,"First parameter");return void 0===t.mode?bg(this):function(e){return new cA(e)}(this)}pipeThrough(e,t={}){if(!xy(this))throw Ry("pipeThrough");dg(e,1,"pipeThrough");const r=function(e,t){hg(e,t);const r=null==e?void 0:e.readable;pg(r,"readable","ReadableWritablePair"),mg(r,t+" has member 'readable' that");const n=null==e?void 0:e.writable;return pg(n,"writable","ReadableWritablePair"),bA(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=_y(t,"Second parameter");if(Py(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(BA(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return jp(cy(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!xy(this))return Op(Ry("pipeTo"));if(void 0===e)return Op("Parameter 1 is required in 'pipeTo'.");if(!EA(e))return Op(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=_y(t,"Second parameter")}catch(e){return Op(e)}return Py(this)?Op(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):BA(e)?Op(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):cy(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!xy(this))throw Ry("tee");const e=function(e,t){const r=bg(e);let n,i,a,o,s,c=!1,u=!1,h=!1;const l=Tp((e=>{s=e}));function f(){return c||(c=!0,_g(r,{_chunkSteps:e=>{zp((()=>{c=!1;const t=e,r=e;u||gy(a._readableStreamController,t),h||gy(o._readableStreamController,r)}))},_closeSteps:()=>{c=!1,u||py(a._readableStreamController),h||py(o._readableStreamController),u&&h||s(void 0)},_errorSteps:()=>{c=!1}})),qp(void 0)}function d(){}return a=Sy(d,f,(function(t){if(u=!0,n=t,h){const t=qg([n,i]),r=My(e,t);s(r)}return l})),o=Sy(d,f,(function(t){if(h=!0,i=t,u){const t=qg([n,i]),r=My(e,t);s(r)}return l})),Lp(r._closedPromise,(e=>{Ay(a._readableStreamController,e),Ay(o._readableStreamController,e),u&&h||s(void 0)})),[a,o]}(this);return qg(e)}values(e=void 0){if(!xy(this))throw Ry("values");return function(e,t){const r=bg(e),n=new Qg(r,t),i=Object.create(xg);return i._asyncIteratorImpl=n,i}(this,function(e,t){return hg(e,"First parameter"),{preventCancel:!!(null==e?void 0:e.preventCancel)}}(e).preventCancel)}}function Sy(e,t,r,n=1,i=(()=>1)){const a=Object.create(ky.prototype);return Qy(a),by(a,Object.create(uy.prototype),e,t,r,n,i),a}function Qy(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function xy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Py(e){return void 0!==e._reader}function My(e,t){return e._disturbed=!0,"closed"===e._state?qp(void 0):"errored"===e._state?Op(e._storedError):(Uy(e),Gp(e._readableStreamController[og](t),Qp))}function Uy(e){e._state="closed";const t=e._reader;void 0!==t&&(ng(t),Cg(t)&&(t._readRequests.forEach((e=>{e._closeSteps()})),t._readRequests=new Jp))}function Dy(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(rg(r,t),Cg(r)?(r._readRequests.forEach((e=>{e._errorSteps(t)})),r._readRequests=new Jp):(r._readIntoRequests.forEach((e=>{e._errorSteps(t)})),r._readIntoRequests=new Jp))}function Ry(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Fy(e,t){hg(e,t);const r=null==e?void 0:e.highWaterMark;return pg(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:gg(r)}}Object.defineProperties(ky.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(ky.prototype,Sp.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof Sp.asyncIterator&&Object.defineProperty(ky.prototype,Sp.asyncIterator,{value:ky.prototype.values,writable:!0,configurable:!0});const Ty=function(e){return e.byteLength};class qy{constructor(e){dg(e,1,"ByteLengthQueuingStrategy"),e=Fy(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Ky(this))throw Oy("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Ky(this))throw Oy("size");return Ty}}function Oy(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Ky(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(qy.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(qy.prototype,Sp.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Hy=function(){return 1};class Ny{constructor(e){dg(e,1,"CountQueuingStrategy"),e=Fy(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Gy(this))throw Ly("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Gy(this))throw Ly("size");return Hy}}function Ly(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Gy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function jy(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function zy(e,t,r){return lg(e,r),r=>Wp(e,t,[r])}function Wy(e,t,r){return lg(e,r),(r,n)=>Zp(e,t,[r,n])}Object.defineProperties(Ny.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Ny.prototype,Sp.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Zy{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=dA(t,"Second parameter"),i=dA(r,"Third parameter"),a=function(e,t){hg(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,a=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:jy(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===i?void 0:zy(i,e,t+" has member 'start' that"),transform:void 0===a?void 0:Wy(a,e,t+" has member 'transform' that"),writableType:o}}(e,"First parameter");if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified");const o=lA(i,0),s=fA(i),c=lA(n,1),u=fA(n);let h;!function(e,t,r,n,i,a){function o(){return t}e._writable=function(e,t,r,n,i=1,a=(()=>1)){const o=Object.create(wA.prototype);return IA(o),HA(o,Object.create(KA.prototype),e,t,r,n,i,a),o}(o,(function(t){return function(e,t){const r=e._transformStreamController;return e._backpressure?Gp(e._backpressureChangePromise,(()=>{const n=e._writable;if("erroring"===n._state)throw n._storedError;return nm(r,t)})):nm(r,t)}(e,t)}),(function(){return function(e){const t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return tm(r),Gp(n,(()=>{if("errored"===t._state)throw t._storedError;py(t._readableStreamController)}),(r=>{throw Vy(e,r),t._storedError}))}(e)}),(function(t){return function(e,t){return Vy(e,t),qp(void 0)}(e,t)}),r,n),e._readable=Sy(o,(function(){return function(e){return $y(e,!1),e._backpressureChangePromise}(e)}),(function(t){return Yy(e,t),qp(void 0)}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,$y(e,!0),e._transformStreamController=void 0}(this,Tp((e=>{h=e})),c,u,o,s),function(e,t){const r=Object.create(Xy.prototype);let n=e=>{try{return rm(r,e),qp(void 0)}catch(e){return Op(e)}},i=()=>qp(void 0);void 0!==t.transform&&(n=e=>t.transform(e,r)),void 0!==t.flush&&(i=()=>t.flush(r)),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,a),void 0!==a.start?h(a.start(this._transformStreamController)):h(void 0)}get readable(){if(!Jy(this))throw am("readable");return this._readable}get writable(){if(!Jy(this))throw am("writable");return this._writable}}function Jy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Vy(e,t){Ay(e._readable._readableStreamController,t),Yy(e,t)}function Yy(e,t){tm(e._transformStreamController),jA(e._writable._writableStreamController,t),e._backpressure&&$y(e,!1)}function $y(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=Tp((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Zy.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Zy.prototype,Sp.toStringTag,{value:"TransformStream",configurable:!0});class Xy{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!em(this))throw im("desiredSize");return yy(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!em(this))throw im("enqueue");rm(this,e)}error(e=void 0){if(!em(this))throw im("error");var t;t=e,Vy(this._controlledTransformStream,t)}terminate(){if(!em(this))throw im("terminate");!function(e){const t=e._controlledTransformStream;py(t._readable._readableStreamController),Yy(t,new TypeError("TransformStream terminated"))}(this)}}function em(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function tm(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function rm(e,t){const r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!my(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{gy(n,t)}catch(e){throw Yy(r,e),r._readable._storedError}const i=function(e){return!fy(e)}(n);i!==r._backpressure&&$y(r,!0)}function nm(e,t){return Gp(e._transformAlgorithm(t),void 0,(t=>{throw Vy(e._controlledTransformStream,t),t}))}function im(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function am(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties(Xy.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Xy.prototype,Sp.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var om=function(e,t){return om=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},om(e,t) +var doipFetchers=function(e){"use strict";var t=Object.freeze({__proto__:null,get activitypub(){return Or},get aspe(){return Ww},get dns(){return Jw},get graphql(){return Vw},get http(){return Xw},get irc(){return MB},get matrix(){return UB},get openpgp(){return DB},get telegram(){return RB},get xmpp(){return cS}}),r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,o=(s=Object.create(null),e=>{const t=i.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const c=e=>(e=e.toLowerCase(),t=>o(t)===e),u=e=>t=>typeof t===e,{isArray:h}=Array,l=u("undefined");const f=c("ArrayBuffer");const d=u("string"),p=u("function"),g=u("number"),A=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==o(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=c("Date"),b=c("File"),w=c("Blob"),v=c("FileList"),I=c("URLSearchParams");function E(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),h(e))for(n=0,i=e.length;n0;)if(n=r[i],t===n.toLowerCase())return n;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r,_=e=>!l(e)&&e!==C;const k=(S="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>S&&e instanceof S);var S;const Q=c("HTMLFormElement"),x=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),P=c("RegExp"),M=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};E(r,((r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)})),Object.defineProperties(e,n)},U="abcdefghijklmnopqrstuvwxyz",D="0123456789",R={DIGIT:D,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+D};const F=c("AsyncFunction");var T={isArray:h,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:d,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:y,isUndefined:l,isDate:m,isFile:b,isBlob:w,isRegExp:P,isFunction:p,isStream:e=>A(e)&&p(e.pipe),isURLSearchParams:I,isTypedArray:k,isFileList:v,forEach:E,merge:function e(){const{caseless:t}=_(this)&&this||{},r={},n=(n,i)=>{const a=t&&B(r,i)||i;y(r[a])&&y(n)?r[a]=e(r[a],n):y(n)?r[a]=e({},n):h(n)?r[a]=n.slice():r[a]=n};for(let e=0,t=arguments.length;e(E(t,((t,i)=>{r&&p(t)?e[i]=n(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(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)},toFlatObject:(e,t,r,n)=>{let i,o,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:c,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Q,hasOwnProperty:x,hasOwnProp:x,reduceDescriptors:M,freezeMethods:e=>{M(e,((t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return h(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:B,global:C,isContextDefined:_,ALPHABET:R,generateString:(e=16,t=R.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(A(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=h(e)?[]:{};return E(e,((e,t)=>{const a=r(e,n+1);!l(a)&&(i[t]=a)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:F,isThenable:e=>e&&(A(e)||p(e))&&p(e.then)&&p(e.catch)},q=[],O=[],K="undefined"!=typeof Uint8Array?Uint8Array:Array,H=!1;function N(){H=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)q[t]=e[t],O[e.charCodeAt(t)]=t;O["-".charCodeAt(0)]=62,O["_".charCodeAt(0)]=63}function L(e,t,r){for(var n,i,a=[],o=t;o>18&63]+q[i>>12&63]+q[i>>6&63]+q[63&i]);return a.join("")}function G(e){var t;H||N();for(var r=e.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;sc?c:s+o));return 1===n?(t=e[r-1],i+=q[t>>2],i+=q[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=q[t>>10],i+=q[t>>4&63],i+=q[t<<2&63],i+="="),a.push(i),a.join("")}function j(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,h=-7,l=r?i-1:0,f=r?-1:1,d=e[t+l];for(l+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+l],l+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+e[t+l],l+=f,h-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)}function z(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,h=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?f/c:f*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=h?(s=0,o=h):o+l>=1?(s=(t*c-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*g}var W={}.toString,Z=Array.isArray||function(e){return"[object Array]"==W.call(e)};$.TYPED_ARRAY_SUPPORT=void 0===r.TYPED_ARRAY_SUPPORT||r.TYPED_ARRAY_SUPPORT;var J=V();function V(){return $.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Y(e,t){if(V()=V())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V().toString(16)+" bytes");return 0|e}function ie(e){return!(null==e||!e._isBuffer)}function ae(e,t){if(ie(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Me(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ue(e).length;default:if(n)return Me(e).length;t=(""+t).toLowerCase(),n=!0}}function oe(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ve(this,t,r);case"utf8":case"utf-8":return ye(this,t,r);case"ascii":return be(this,t,r);case"latin1":case"binary":return we(this,t,r);case"base64":return Ae(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function se(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ce(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=$.from(t,n)),ie(t))return 0===t.length?-1:ue(e,t,r,n,i);if("number"==typeof t)return t&=255,$.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ue(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ue(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var h=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var l=!0,f=0;fi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function Ae(e,t,r){return 0===t&&r===e.length?G(e):G(e.slice(t,r))}function ye(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(h=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(h=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(h=c)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(e){var t=e.length;if(t<=me)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},$.prototype.compare=function(e,t,r,n,i){if(!ie(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return he(this,e,t,r);case"utf8":case"utf-8":return le(this,e,t,r);case"ascii":return fe(this,e,t,r);case"latin1":case"binary":return de(this,e,t,r);case"base64":return pe(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},$.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var me=4096;function be(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function Be(e,t,r,n,i,a){if(!ie(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Ce(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function _e(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function ke(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Se(e,t,r,n,i){return i||ke(e,0,r,4),z(e,t,r,n,23,4),r+4}function Qe(e,t,r,n,i){return i||ke(e,0,r,8),z(e,t,r,n,52,8),r+8}$.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},$.prototype.readUInt8=function(e,t){return t||Ee(e,1,this.length),this[e]},$.prototype.readUInt16LE=function(e,t){return t||Ee(e,2,this.length),this[e]|this[e+1]<<8},$.prototype.readUInt16BE=function(e,t){return t||Ee(e,2,this.length),this[e]<<8|this[e+1]},$.prototype.readUInt32LE=function(e,t){return t||Ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},$.prototype.readUInt32BE=function(e,t){return t||Ee(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},$.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},$.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},$.prototype.readInt8=function(e,t){return t||Ee(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},$.prototype.readInt16LE=function(e,t){t||Ee(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},$.prototype.readInt16BE=function(e,t){t||Ee(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},$.prototype.readInt32LE=function(e,t){return t||Ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},$.prototype.readInt32BE=function(e,t){return t||Ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},$.prototype.readFloatLE=function(e,t){return t||Ee(e,4,this.length),j(this,e,!0,23,4)},$.prototype.readFloatBE=function(e,t){return t||Ee(e,4,this.length),j(this,e,!1,23,4)},$.prototype.readDoubleLE=function(e,t){return t||Ee(e,8,this.length),j(this,e,!0,52,8)},$.prototype.readDoubleBE=function(e,t){return t||Ee(e,8,this.length),j(this,e,!1,52,8)},$.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Be(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},$.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,1,255,0),$.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},$.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,65535,0),$.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ce(this,e,t,!0),t+2},$.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,65535,0),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ce(this,e,t,!1),t+2},$.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,4294967295,0),$.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):_e(this,e,t,!0),t+4},$.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,4294967295,0),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):_e(this,e,t,!1),t+4},$.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Be(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},$.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Be(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},$.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,1,127,-128),$.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},$.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,32767,-32768),$.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ce(this,e,t,!0),t+2},$.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,2,32767,-32768),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ce(this,e,t,!1),t+2},$.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,2147483647,-2147483648),$.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):_e(this,e,t,!0),t+4},$.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Be(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),$.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):_e(this,e,t,!1),t+4},$.prototype.writeFloatLE=function(e,t,r){return Se(this,e,t,!0,r)},$.prototype.writeFloatBE=function(e,t,r){return Se(this,e,t,!1,r)},$.prototype.writeDoubleLE=function(e,t,r){return Qe(this,e,t,!0,r)},$.prototype.writeDoubleBE=function(e,t,r){return Qe(this,e,t,!1,r)},$.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!$.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Ue(e){return function(e){var t,r,n,i,a,o;H||N();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new K(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=O[e.charCodeAt(t)]<<2|O[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=O[e.charCodeAt(t)]<<10|O[e.charCodeAt(t+1)]<<4|O[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(xe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function De(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Re(e){return null!=e&&(!!e._isBuffer||Fe(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Fe(e.slice(0,0))}(e))}function Fe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Te=Object.freeze({__proto__:null,Buffer:$,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),$.alloc(+e)},isBuffer:Re,kMaxLength:J});function qe(e,t,r,n,i){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),i&&(this.response=i)}T.inherits(qe,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:T.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Oe=qe.prototype,Ke={};["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=>{Ke[e]={value:e}})),Object.defineProperties(qe,Ke),Object.defineProperty(Oe,"isAxiosError",{value:!0}),qe.from=(e,t,r,n,i,a)=>{const o=Object.create(Oe);return T.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),qe.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};function He(e){return T.isPlainObject(e)||T.isArray(e)}function Ne(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function Le(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ne(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Ge=T.toFlatObject(T,{},null,(function(e){return/^is[A-Z]/.test(e)}));function je(e,t,r){if(!T.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=T.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!T.isUndefined(t[e])}))).metaTokens,i=r.visitor||u,a=r.dots,o=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&T.isSpecCompliantForm(t);if(!T.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(T.isDate(e))return e.toISOString();if(!s&&T.isBlob(e))throw new qe("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(e)||T.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):$.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(T.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(T.isArray(e)&&function(e){return T.isArray(e)&&!e.some(He)}(e)||(T.isFileList(e)||T.endsWith(r,"[]"))&&(s=T.toArray(e)))return r=Ne(r),s.forEach((function(e,n){!T.isUndefined(e)&&null!==e&&t.append(!0===o?Le([r],n,a):null===o?r:r+"[]",c(e))})),!1;return!!He(e)||(t.append(Le(i,r,a),c(e)),!1)}const h=[],l=Object.assign(Ge,{defaultVisitor:u,convertValue:c,isVisitable:He});if(!T.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!T.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),T.forEach(r,(function(r,a){!0===(!(T.isUndefined(r)||null===r)&&i.call(t,r,T.isString(a)?a.trim():a,n,l))&&e(r,n?n.concat(a):[a])})),h.pop()}}(e),t}function ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function We(e,t){this._pairs=[],e&&je(e,this,t)}const Ze=We.prototype;function Je(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ve(e,t,r){if(!t)return e;const n=r&&r.encode||Je,i=r&&r.serialize;let a;if(a=i?i(t,r):T.isURLSearchParams(t)?t.toString():new We(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Ze.append=function(e,t){this._pairs.push([e,t])},Ze.toString=function(e){const t=e?function(t){return e.call(this,t,ze)}:ze;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Ye=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){T.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$e={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:We,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const et="undefined"!=typeof window&&"undefined"!=typeof document,tt=(rt="undefined"!=typeof navigator&&navigator.product,et&&["ReactNative","NativeScript","NS"].indexOf(rt)<0);var rt;const nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var it={...Object.freeze({__proto__:null,hasBrowserEnv:et,hasStandardBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:nt}),...Xe};function at(e){function t(e,r,n,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&T.isArray(n)?n.length:a,s)return T.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!o;n[a]&&T.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],i)&&T.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n{t(function(e){return T.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const ot={transitional:$e,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=T.isObject(e);i&&T.isHTMLForm(e)&&(e=new FormData(e));if(T.isFormData(e))return n&&n?JSON.stringify(at(e)):e;if(T.isArrayBuffer(e)||T.isBuffer(e)||T.isStream(e)||T.isFile(e)||T.isBlob(e))return e;if(T.isArrayBufferView(e))return e.buffer;if(T.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return je(e,new it.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return it.isNode&&T.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=T.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return je(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(T.isString(e))try{return(t||JSON.parse)(e),T.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ot.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&T.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw qe.from(e,qe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:it.classes.FormData,Blob:it.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],(e=>{ot.headers[e]={}}));var st=ot;const ct=T.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"]);const ut=Symbol("internals");function ht(e){return e&&String(e).trim().toLowerCase()}function lt(e){return!1===e||null==e?e:T.isArray(e)?e.map(lt):String(e)}function ft(e,t,r,n,i){return T.isFunction(n)?n.call(this,t,r):(i&&(t=r),T.isString(t)?T.isString(n)?-1!==t.indexOf(n):T.isRegExp(n)?n.test(t):void 0:void 0)}class dt{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=ht(t);if(!i)throw new Error("header name must be a non-empty string");const a=T.findKey(n,i);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=lt(e))}const a=(e,t)=>T.forEach(e,((e,r)=>i(e,r,t)));return T.isPlainObject(e)||e instanceof this.constructor?a(e,t):T.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&ct[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=ht(e)){const r=T.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(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}(e);if(T.isFunction(t))return t.call(this,e,r);if(T.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ht(e)){const r=T.findKey(this,e);return!(!r||void 0===this[r]||t&&!ft(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=ht(e)){const i=T.findKey(r,e);!i||t&&!ft(0,r[i],i,t)||(delete r[i],n=!0)}}return T.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!ft(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return T.forEach(this,((n,i)=>{const a=T.findKey(r,i);if(a)return t[a]=lt(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();o!==i&&delete t[i],t[o]=lt(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return T.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&T.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ut]=this[ut]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ht(e);t[n]||(!function(e,t){const r=T.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return T.isArray(e)?e.forEach(n):n(e),this}}dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),T.reduceDescriptors(dt.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),T.freezeMethods(dt);var pt=dt;function gt(e,t){const r=this||st,n=t||r,i=pt.from(n.headers);let a=n.data;return T.forEach(e,(function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function At(e){return!(!e||!e.__CANCEL__)}function yt(e,t,r){qe.call(this,null==e?"canceled":e,qe.ERR_CANCELED,t,r),this.name="CanceledError"}T.inherits(yt,qe,{__CANCEL__:!0});var mt=it.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];T.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),T.isString(n)&&o.push("path="+n),T.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function bt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var wt=it.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=T.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function vt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[o];i||(i=c),r[a]=s,n[a]=c;let h=o,l=0;for(;h!==a;)l+=r[h++],h%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-i{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-r,c=n(s);r=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var It="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=pt.from(e.headers).normalize();let a,o,{responseType:s,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(T.isFormData(n))if(it.hasStandardBrowserEnv||it.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(o=i.getContentType())){const[e,...t]=o?o.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const l=bt(e.baseURL,e.url);function f(){if(!h)return;const n=pt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new qe("Request failed with status code "+r.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Ve(l,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=f:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(f)},h.onabort=function(){h&&(r(new qe("Request aborted",qe.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new qe("Network Error",qe.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||$e;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new qe(t,n.clarifyTimeoutError?qe.ETIMEDOUT:qe.ECONNABORTED,e,h)),h=null},it.hasStandardBrowserEnv&&(c&&T.isFunction(c)&&(c=c(e)),c||!1!==c&&wt(l))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&mt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in h&&T.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),T.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",vt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",vt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{h&&(r(!t||t.type?new yt(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);d&&-1===it.protocols.indexOf(d)?r(new qe("Unsupported protocol "+d+":",qe.ERR_BAD_REQUEST,e)):h.send(n||null)}))};const Et={http:null,xhr:It};T.forEach(Et,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Bt=e=>`- ${e}`,Ct=e=>T.isFunction(e)||null===e||!1===e;var _t=e=>{e=T.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new qe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Bt).join("\n"):" "+Bt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function kt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yt(null,e)}function St(e){kt(e),e.headers=pt.from(e.headers),e.data=gt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return _t(e.adapter||st.adapter)(e).then((function(t){return kt(e),t.data=gt.call(e,e.transformResponse,t),t.headers=pt.from(t.headers),t}),(function(t){return At(t)||(kt(e),t&&t.response&&(t.response.data=gt.call(e,e.transformResponse,t.response),t.response.headers=pt.from(t.response.headers))),Promise.reject(t)}))}const Qt=e=>e instanceof pt?e.toJSON():e;function xt(e,t){t=t||{};const r={};function n(e,t,r){return T.isPlainObject(e)&&T.isPlainObject(t)?T.merge.call({caseless:r},e,t):T.isPlainObject(t)?T.merge({},t):T.isArray(t)?t.slice():t}function i(e,t,r){return T.isUndefined(t)?T.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function a(e,t){if(!T.isUndefined(t))return n(void 0,t)}function o(e,t){return T.isUndefined(t)?T.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t)=>i(Qt(e),Qt(t),!0)};return T.forEach(Object.keys(Object.assign({},e,t)),(function(n){const a=c[n]||i,o=a(e[n],t[n],n);T.isUndefined(o)&&a!==s||(r[n]=o)})),r}const Pt="1.6.5",Mt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Mt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Ut={};Mt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new qe(n(i," has been removed"+(t?" in "+t:"")),qe.ERR_DEPRECATED);return t&&!Ut[i]&&(Ut[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var Dt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new qe("option "+a+" must be "+r,qe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new qe("Unknown option "+a,qe.ERR_BAD_OPTION)}},validators:Mt};const Rt=Dt.validators;class Ft{constructor(e){this.defaults=e,this.interceptors={request:new Ye,response:new Ye}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=xt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Dt.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),null!=n&&(T.isFunction(n)?t.paramsSerializer={serialize:n}:Dt.assertOptions(n,{encode:Rt.function,serialize:Rt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&T.merge(i.common,i[t.method]);i&&T.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=pt.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let h,l=0;if(!s){const e=[St.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),h=e.length,u=Promise.resolve(t);l{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new yt(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new qt((function(t){e=t}));return{token:t,cancel:e}}}var Ot=qt;const Kt={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};Object.entries(Kt).forEach((([e,t])=>{Kt[t]=e}));var Ht=Kt;const Nt=function e(t){const r=new Tt(t),i=n(Tt.prototype.request,r);return T.extend(i,Tt.prototype,r,{allOwnKeys:!0}),T.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(xt(t,r))},i}(st);Nt.Axios=Tt,Nt.CanceledError=yt,Nt.CancelToken=Ot,Nt.isCancel=At,Nt.VERSION=Pt,Nt.toFormData=je,Nt.AxiosError=qe,Nt.Cancel=Nt.CanceledError,Nt.all=function(e){return Promise.all(e)},Nt.spread=function(e){return function(t){return e.apply(null,t)}},Nt.isAxiosError=function(e){return T.isObject(e)&&!0===e.isAxiosError},Nt.mergeConfig=xt,Nt.AxiosHeaders=pt,Nt.formToJSON=e=>at(T.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=_t,Nt.HttpStatusCode=Ht,Nt.default=Nt;var Lt=Nt,Gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Wt={exports:{}},Zt={exports:{}};!function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var n=r(e);throw null===e?n="null":"object"===n&&(n=e.constructor.name),new TypeError("Expected a string but received a ".concat(n))}},e.exports=t.default,e.exports.default=t.default}(Zt,Zt.exports);var Jt=Zt.exports,Vt={exports:{}},Yt={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default}(Yt,Yt.exports);var $t=Yt.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,n.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var i=e.split("."),o=i[i.length-1];if(t.require_tld){if(i.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/\s/.test(o))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(o))return!1;return i.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var r=i(Jt),n=i($t);function i(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(Vt,Vt.exports);var Xt=Vt.exports,er=jt(Xt),tr={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(t),r=String(r),!r)return e(t,4)||e(t,6);if("4"===r)return o.test(t);if("6"===r)return c.test(t);return!1};var r,n=(r=Jt)&&r.__esModule?r:{default:r};var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),o=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(tr,tr.exports);var rr=tr.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,a.default)(t,c)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var o,l,f,d,p,g,A,y;if(A=e.split("#"),e=A.shift(),A=e.split("?"),e=A.shift(),(A=e.split("://")).length>1){if(o=A.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(o))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;A[0]=e.slice(2)}}if(""===(e=A.join("://")))return!1;if(A=e.split("/"),""===(e=A.shift())&&!t.require_host)return!0;if((A=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===A[0])return!1;if((l=A.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.split(":"),2),b=m[0],w=m[1];if(""===b&&""===w)return!1}d=A.join("@"),g=null,y=null;var v=d.match(u);v?(f="",y=v[1],g=v[2]||null):(f=(A=d.split(":")).shift(),A.length&&(g=A.join(":")));if(null!==g&&g.length>0){if(p=parseInt(g,10),!/^[0-9]+$/.test(g)||p<=0||p>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return h(f,t.host_whitelist);if(""===f&&!t.require_host)return!0;if(!((0,i.default)(f)||(0,n.default)(f,t)||y&&(0,i.default)(y,6)))return!1;if(f=f||y,t.host_blacklist&&h(f,t.host_blacklist))return!1;return!0};var r=o(Jt),n=o(Xt),i=o(rr),a=o($t);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)for(var r=1;r{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:5e3)})),i=new Promise(((r,n)=>{(async()=>{let i=!1;try{nr(t.claims.activitypub.url),i=!0}catch(e){}const a=new Date,{host:o,pathname:s,search:c}=new URL(e.url),u={host:o,date:a.toUTCString(),accept:"application/activity+json","User-Agent":`doipjs/${Tr}`};if(i&&Rr){const e=`(request-target): get ${s}${c}\nhost: ${o}\ndate: ${a.toUTCString()}`,r=Fr.createSign("SHA256");r.write(e),r.end();const n=r.sign(t.claims.activitypub.privateKey.replace(/\\n/g,"\n"),"base64");u.signature=`keyId="${t.claims.activitypub.url}#main-key",headers="(request-target) host date",signature="${n}",algorithm="rsa-sha256"`}Lt.get(e.url,{headers:u}).then((e=>e.data)).then((e=>{r(e)})).catch((e=>{n(e)}))})()}));return Promise.race([i,n]).finally((()=>{clearTimeout(r)}))}var Or=Object.freeze({__proto__:null,fn:qr,timeout:5e3}),Kr=crypto;const Hr=e=>e instanceof CryptoKey;var Nr=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await Kr.subtle.digest(r,t))};const Lr=new TextEncoder,Gr=new TextDecoder;const jr=e=>(e=>{let t=e;"string"==typeof t&&(t=Lr.encode(t));const r=[];for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=Gr.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;ee.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function nn(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var an=(e,...t)=>nn("Key must be ",e,...t);function on(e,t,...r){return nn(`Key for the ${e} algorithm must be `,t,...r)}var sn=e=>Hr(e);const cn=["CryptoKey"];var un=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function hn(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var ln=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new Jr(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Jr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Jr('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:i];if("PBKDF2"===n.name)return Kr.subtle.importKey("raw",zr(e.k),...a);const o={...e};return delete o.alg,delete o.use,Kr.subtle.importKey("jwk",o,...a)};var fn=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!sn(t))throw new TypeError(on(e,t,...cn,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${cn.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!sn(t))throw new TypeError(on(e,t,...cn));if("secret"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${cn.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};var dn=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var pn=async(e,t,r,n)=>{const i=await function(e,t,r){if(Hr(t))return rn(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(an(t,...cn));return Kr.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(an(t,...cn,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,i);const a=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Jr(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,i.algorithm);try{return await Kr.subtle.verify(a,i,r,n)}catch(e){return!1}};async function gn(e,t,r){var n;if(!hn(e))throw new Vr("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Vr('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Vr("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Vr("JWS Payload missing");if("string"!=typeof e.signature)throw new Vr("JWS Signature missing or incorrect type");if(void 0!==e.header&&!hn(e.header))throw new Vr("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=zr(e.protected);i=JSON.parse(Gr.decode(t))}catch(e){throw new Vr("JWS Protected Header is invalid")}if(!un(i,e.header))throw new Vr("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a={...i,...e.header},o=function(e,t,r,n,i){if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of n.crit){if(!a.has(t))throw new Jr(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===n[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(n.crit)}(Vr,new Map([["b64",!0]]),null==r?void 0:r.crit,i,a);let s=!0;if(o.has("b64")&&(s=i.b64,"boolean"!=typeof s))throw new Vr('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:c}=a;if("string"!=typeof c||!c)throw new Vr('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=r&&dn("algorithms",r.algorithms);if(u&&!u.has(c))throw new Zr('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new Vr("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Vr("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(i,e),h=!0),fn(c,t,"verify");const l=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}(Lr.encode(null!==(n=e.protected)&&void 0!==n?n:""),Lr.encode("."),"string"==typeof e.payload?Lr.encode(e.payload):e.payload);let f;try{f=zr(e.signature)}catch(e){throw new Vr("Failed to base64url decode the signature")}if(!await pn(c,t,f,l))throw new $r;let d;if(s)try{d=zr(e.payload)}catch(e){throw new Vr("Failed to base64url decode the payload")}else d="string"==typeof e.payload?Lr.encode(e.payload):e.payload;const p={payload:d};return void 0!==e.protected&&(p.protectedHeader=i),void 0!==e.header&&(p.unprotectedHeader=e.header),h?{...p,key:t}:p}const An=(e,t)=>{if("string"!=typeof e||!e)throw new Yr(`${t} missing or invalid`)};const yn=zr;function mn(e,t,r){var n;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var i=0;i=8&&(s-=8,o[u++]=255&c>>s)}if(s>=t.bits||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o}function bn(e,t,r){void 0===r&&(r={});for(var n=r.pad,i=void 0===n||n,a=(1<t.bits;)s-=t.bits,o+=t.chars[a&c>>s];if(s&&(o+=t.chars[a&c<1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,Wn.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,"");else{if("string"!=typeof i)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in Zn.alphanumeric)return Zn.alphanumeric[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))};Bn.locales=void 0;var zn,Wn=(zn=Jt)&&zn.__esModule?zn:{default:zn},Zn=Cn;var Jn=Object.keys(Zn.alphanumeric);Bn.locales=Jn;var Vn={exports:{}};(function(e){e.exports.is_uri=r,e.exports.is_http_uri=n,e.exports.is_https_uri=i,e.exports.is_web_uri=a,e.exports.isUri=r,e.exports.isHttpUri=n,e.exports.isHttpsUri=i,e.exports.isWebUri=a;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var r,n,i,a,o,s="",c="";if(s=(r=t(e))[1],n=r[2],i=r[3],a=r[4],o=r[5],s&&s.length&&i.length>=0){if(n&&n.length){if(0!==i.length&&!/^\//.test(i))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return c+=s+":",n&&n.length&&(c+="//"+n),c+=i,a&&a.length&&(c+="?"+a),o&&o.length&&(c+="#"+o),c}}}function n(e,n){if(r(e)){var i,a,o,s,c="",u="",h="",l="";if(c=(i=t(e))[1],u=i[2],a=i[3],o=i[4],s=i[5],c){if(n){if("https"!=c.toLowerCase())return}else if("http"!=c.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(h=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),l+=c+":",l+="//"+u,h&&(l+=h),l+=a,o&&o.length&&(l+="?"+o),s&&s.length&&(l+="#"+s),l}}}function i(e){return n(e,!0)}function a(e){return n(e)||i(e)}})(Vn);var Yn=Vn.exports;const $n=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},{hasOwnProperty:Xn}=Object.prototype,{propertyIsEnumerable:ei}=Object,ti=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),ri=Gt,ni={concatArrays:!1,ignoreUndefined:!1},ii=e=>{const t=[];for(const r in e)Xn.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(const n of r)ei.call(e,n)&&t.push(n)}return t};function ai(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return ii(e).forEach((r=>{ti(t,r,ai(e[r]))})),t}(e):$n(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return ii(e).forEach((r=>{ti(t,r,ai(e[r]))})),t}(e):e}const oi=(e,t,r,n)=>(r.forEach((r=>{void 0===t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?ti(e,r,ci(e[r],t[r],n)):ti(e,r,ai(t[r])))})),e),si=(e,t,r)=>{let n=e.slice(0,0),i=0;return[e,t].forEach((t=>{const a=[];for(let r=0;r!a.includes(e))),r)})),n};function ci(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?si(e,t,r):$n(t)&&$n(e)?oi(e,t,ii(t),r):ai(t)}var ui=function(...e){const t=ci(ai(ni),this!==ri&&this||{},ni);let r={_:{}};for(const n of e)if(void 0!==n){if(!$n(n))throw new TypeError("`"+n+"` is not an Option Object");r=ci(r,{_:n},t)}return r._},hi=jt(ui);const li="adaptive",fi="always",di="never",pi="activitypub",gi="aspe",Ai="dns",yi="graphql",mi="http",bi="irc",wi="matrix",vi="openpgp",Ii="telegram",Ei="xmpp",Bi="plain",Ci="html",_i="xml",ki="none",Si="nocors",Qi="granted",xi="server",Pi="json",Mi="text",Ui="uri",Di="fingerprint",Ri="contains",Fi="equals",Ti="oneof",qi=100,Oi=101,Ki=200,Hi=201,Ni=301,Li=401,Gi={ASP:"asp",OPENPGP:"openpgp"},ji={EDDSA:"eddsa",ES256:"es256",OPENPGP:"openpgp",UNKNOWN:"unknown",NONE:"none"},zi={PEM:"pem",JWK:"jwk",ARMORED_PGP:"armored_pgp",NONE:"none"},Wi="none",Zi="hkp",Ji="wkd";class Vi{constructor(e,t){this.identifier=null,this.name=e,this.email=null,this.description=null,this.avatarUrl=null,this.themeColor=null,this.claims=t,this.isRevoked=!1}static fromJSON(e,t){let r,n;if("object"==typeof e&&t){if(2!==t)throw new Error("Invalid persona version");if(n=function(e){const t=e.claims.map((e=>Lw.fromJSON(e))),r=new Vi(e.name,t);return r.identifier=e.identifier,r.email=e.email,r.description=e.description,r.avatarUrl=e.avatarUrl,r.themeColor=e.avatarUrl,r.isRevoked=e.isRevoked,r}(e),n instanceof Error)throw n;r=n}return r}setIdentifier(e){this.identifier=e}setDescription(e){this.description=e}setEmailAddress(e){this.email=e}setAvatarUrl(e){this.avatarUrl=e}addClaim(e){this.claims.push(e)}revoke(){this.isRevoked=!0}toJSON(){return{identifier:this.identifier,name:this.name,email:this.email,description:this.description,avatarUrl:this.avatarUrl,themeColor:this.themeColor,isRevoked:this.isRevoked,claims:this.claims.map((e=>e.toJSON()))}}}class Yi{constructor(e,t,r){this.profileVersion=2,this.profileType=e,this.identifier=t,this.personas=r||[],this.primaryPersonaIndex=r.length>0?0:-1,this.publicKey={keyType:ji.NONE,fingerprint:null,encoding:zi.NONE,encodedKey:null,key:null,fetch:{method:Wi,query:null,resolvedUrl:null}},this.verifiers=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"profileVersion"in e){if(2!==e.profileVersion)throw new Error("Invalid profile version");if(r=function(e){if(!("profileVersion"in e)||2!==e.profileVersion)return new Error("Invalid profile");const t=e.personas.map((e=>Vi.fromJSON(e,2))),r=new Yi(e.profileType,e.identifier,t);return r.primaryPersonaIndex=e.primaryPersonaIndex,r.publicKey=e.publicKey,r.verifiers=e.verifiers,r}(e),r instanceof Error)throw r;t=r}return t}addVerifier(e,t){this.verifiers.push({name:e,url:t})}toJSON(){return{profileVersion:this.profileVersion,profileType:this.profileType,identifier:this.identifier,personas:this.personas.map((e=>e.toJSON())),primaryPersonaIndex:this.primaryPersonaIndex,publicKey:{keyType:this.publicKey.keyType,fingerprint:this.publicKey.fingerprint,encoding:this.publicKey.encoding,encodedKey:this.publicKey.encodedKey,fetch:{method:this.publicKey.fetch.method,query:this.publicKey.fetch.query,resolvedUrl:this.publicKey.fetch.resolvedUrl}},verifiers:this.verifiers}}}class $i{constructor(e){this.about=e.about,this.profile=e.profile,this.claim=e.claim,this.proof=e.proof}toJSON(){return{about:this.about,profile:this.profile,claim:this.claim,proof:this.proof}}}const Xi=/^aspe:([a-zA-Z0-9.\-_]*):([a-zA-Z0-9]*)/;var ea=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Xi);return er(t[1])?new $i({about:{id:"aspe",name:"ASPE"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:Xi.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:gi,accessRestriction:ki,data:{aspeUri:e}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["claims"]}]}}):null},reURI:Xi,tests:[{uri:"aspe:domain.tld:abc123def456",shouldMatch:!0},{uri:"aspe:domain.tld",shouldMatch:!1},{uri:"dns:domain.tld",shouldMatch:!1},{uri:"https://domain.tld",shouldMatch:!1}]});const ta=/^openpgp4fpr:(?:0x)?([a-zA-Z0-9.\-_]*)/,ra=/^https:\/\/(.*)\/.well-known\/openpgpkey\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/,na=/^https:\/\/(openpgpkey.*)\/.well-known\/openpgpkey\/(.*)\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/;var ia=Object.freeze({__proto__:null,processURI:function(e){let t=null,r=null,n=null;ta.test(e)&&(t=ta,r=Zi,n=e.match(t)),!r&&na.test(e)&&(t=na,r=Ji,n=e.match(t)),!r&&ra.test(e)&&(t=ra,r=Ji,n=e.match(t));let i=null;switch(r){case Zi:i=new $i({about:{id:"openpgp",name:"OpenPGP"},profile:{display:`openpgp4fpr:${n[1]}`,uri:`https://keys.openpgp.org/search?q=${n[1]}`,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,fetcher:vi,accessRestriction:ki,data:{url:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,protocol:Zi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["notations","proof@ariadne.id"]}]}});break;case Ji:i=new $i({about:{id:"openpgp",name:"OpenPGP"},profile:{display:"unknown fingerprint",uri:e,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:vi,accessRestriction:ki,data:{url:e,protocol:Ji}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["notations","proof@ariadne.id"]}]}})}return i},reURI:/^(.*)/,tests:[{uri:"openpgp4fpr:123456789",shouldMatch:!0},{uri:"openpgp4fpr:abcdef123",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/123abc456def?l=name",shouldMatch:!0}]});const aa=/^dns:([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var oa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(aa);return new $i({about:{id:"dns",name:"DNS"},profile:{display:t[1],uri:`https://${t[1]}`,qr:null},claim:{uriRegularExpression:aa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:Ai,accessRestriction:xi,data:{domain:t[1]}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["records","txt"]}]}})},reURI:aa,tests:[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const sa=/^irc:\/\/(.*)\/([a-zA-Z0-9\-[\]\\`_^{|}]*)/;var ca=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(sa);return new $i({about:{id:"irc",name:"IRC"},profile:{display:`${t[1]}/${t[2]}`,uri:e,qr:null},claim:{uriRegularExpression:sa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:bi,accessRestriction:xi,data:{domain:t[1],nick:t[2]}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:[]}]}})},reURI:sa,tests:[{uri:"irc://chat.ircserver.org/Alice1",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice?param=123",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice_bob",shouldMatch:!0},{uri:"https://chat.ircserver.org/alice",shouldMatch:!1}]});const ua=/^xmpp:([a-zA-Z0-9.\-_]*)@([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var ha=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ua);return new $i({about:{id:"xmpp",name:"XMPP",homepage:"https://xmpp.org"},profile:{display:`${t[1]}@${t[2]}`,uri:e,qr:e},claim:{uriRegularExpression:ua.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:Ei,accessRestriction:xi,data:{id:`${t[1]}@${t[2]}`}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:[]}]}})},reURI:ua,tests:[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const la=/^matrix:u\/(?:@)?([^@:]*:[^?]*)(\?.*)?/;var fa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(la);if(!t[2])return null;const r=new URLSearchParams(t[2]);if(!r.has("org.keyoxide.e")||!r.has("org.keyoxide.r"))return null;const n=`${"!"!==r.get("org.keyoxide.r")[0]?"!":""}${r.get("org.keyoxide.r")}`,i=`${"$"!==r.get("org.keyoxide.e")[0]?"$":""}${r.get("org.keyoxide.e")}`,a=`https://matrix.to/#/@${t[1]}`,o=`https://matrix.to/#/${n}/${i}`;return new $i({about:{id:"matrix",name:"Matrix",homepage:"https://matrix.org"},profile:{display:`@${t[1]}`,uri:a,qr:null},claim:{uriRegularExpression:la.toString(),uriIsAmbiguous:!1},proof:{request:{uri:o,fetcher:wi,accessRestriction:Qi,data:{eventId:i,roomId:n}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["content","body"]}]}})},reURI:la,tests:[{uri:"matrix:u/alice:matrix.domain.org?org.keyoxide.r=123:domain.org&org.keyoxide.e=123",shouldMatch:!0},{uri:"matrix:u/alice:matrix.domain.org",shouldMatch:!0},{uri:"matrix:u/@alice:matrix.domain.org?org.keyoxide.r=!123:domain.org&org.keyoxide.e=$123",shouldMatch:!0},{uri:"xmpp:alice@domain.org",shouldMatch:!1},{uri:"https://domain.org/@alice",shouldMatch:!1}]});const da=/https:\/\/t.me\/([A-Za-z0-9_]{5,32})\?proof=([A-Za-z0-9_]{5,32})/;var pa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(da);return new $i({about:{id:"telegram",name:"Telegram",homepage:"https://telegram.org"},profile:{display:`@${t[1]}`,uri:`https://t.me/${t[1]}`,qr:`https://t.me/${t[1]}`},claim:{uriRegularExpression:da.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://t.me/${t[2]}`,fetcher:Ii,accessRestriction:Qi,data:{user:t[1],chat:t[2]}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["text"]}]}})},reURI:da,tests:[{uri:"https://t.me/alice?proof=foobar",shouldMatch:!0},{uri:"https://t.me/complex_user_1234?proof=complex_chat_1234",shouldMatch:!0},{uri:"https://t.me/foobar",shouldMatch:!1},{uri:"https://t.me/foobar?proof=",shouldMatch:!1},{uri:"https://t.me/?proof=foobar",shouldMatch:!1}]});const ga=/^https:\/\/twitter\.com\/(.*)\/status\/([0-9]*)(?:\?.*)?/;var Aa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ga),r=new URLSearchParams;return r.set("url",t[0]),r.set("omit_script","1"),new $i({about:{id:"twitter",name:"Twitter",homepage:"https://twitter.com"},profile:{display:`@${t[1]}`,uri:`https://twitter.com/${t[1]}`,qr:null},claim:{uriRegularExpression:ga.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://publish.twitter.com/oembed?${r}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["html"]}]}})},reURI:ga,tests:[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]});const ya=/^https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/(.*)\/?/;var ma=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ya);return new $i({about:{id:"reddit",name:"Reddit",homepage:"https://reddit.com"},profile:{display:t[1],uri:`https://www.reddit.com/user/${t[1]}`,qr:null},claim:{uriRegularExpression:ya.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://www.reddit.com/user/${t[1]}/comments/${t[2]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["data","children","data","selftext"]}]}})},reURI:ya,tests:[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]});const ba=/^https:\/\/liberapay\.com\/(.*)\/?/;var wa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ba);return new $i({about:{id:"liberapay",name:"Liberapay",homepage:"https://liberapay.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:ba.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:ki,data:{url:`https://liberapay.com/${t[1]}/public.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["statements","content"]}]}})},reURI:ba,tests:[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const va=/^https:\/\/lichess\.org\/@\/(.*)\/?/;var Ia=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(va);return new $i({about:{id:"lichess",name:"Lichess",homepage:"https://lichess.org"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:va.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lichess.org/api/user/${t[1]}`,fetcher:mi,accessRestriction:ki,data:{url:`https://lichess.org/api/user/${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Di,encoding:Bi,relation:Ri,path:["profile","links"]}]}})},reURI:va,tests:[{uri:"https://lichess.org/@/Alice",shouldMatch:!0},{uri:"https://lichess.org/@/Alice/",shouldMatch:!0},{uri:"https://domain.org/@/Alice",shouldMatch:!1}]});const Ea=/^https:\/\/news\.ycombinator\.com\/user\?id=(.*)\/?/;var Ba=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ea);return new $i({about:{id:"hackernews",name:"Hacker News",homepage:"https://news.ycombinator.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ea.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,fetcher:mi,accessRestriction:Si,data:{url:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Ci,relation:Ri,path:["about"]}]}})},reURI:Ea,tests:[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]});const Ca=/^https:\/\/lobste\.rs\/(?:~|u\/)(.*)\/?/;var _a=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ca);return new $i({about:{id:"lobsters",name:"Lobsters",homepage:"https://lobste.rs"},profile:{display:t[1],uri:`https://lobste.rs/~${t[1]}`,qr:null},claim:{uriRegularExpression:Ca.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lobste.rs/~${t[1]}.json`,fetcher:mi,accessRestriction:Si,data:{url:`https://lobste.rs/~${t[1]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["about"]}]}})},reURI:Ca,tests:[{uri:"https://lobste.rs/~Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/~Alice",shouldMatch:!1},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]});const ka=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var Sa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ka);return new $i({about:{id:"forem",name:"Forem",homepage:"https://www.forem.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:ka.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/api/articles/${t[2]}/${t[3]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["body_markdown"]}]}})},reURI:ka,tests:[{uri:"https://domain.org/alice/post",shouldMatch:!0},{uri:"https://domain.org/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Qa=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;const xa={validate:async(e,t,r)=>{const n=`https://${new URL(e.proof.request.uri).hostname}/api/forgejo/v1/version`,i=await $w({url:n,format:Pi});return i&&"version"in i}};var Pa=Object.freeze({__proto__:null,functions:xa,processURI:function(e){const t=e.match(Qa);return new $i({about:{id:"forgejo",name:"Forgejo",homepage:"https://forgejo.org"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Qa.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["description"]}]}})},reURI:Qa,tests:[{uri:"https://domain.org/alice/forgejo_proof",shouldMatch:!0},{uri:"https://domain.org/alice/forgejo_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Ma=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var Ua=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ma);return new $i({about:{id:"gitea",name:"Gitea",homepage:"https://about.gitea.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Ma.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["description"]}]}})},reURI:Ma,tests:[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Da=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/;var Ra=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Da);return new $i({about:{id:"gitlab",name:"GitLab",homepage:"https://about.gitlab.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Da.toString(),uriIsAmbiguous:!0},proof:{request:{fetcher:mi,accessRestriction:ki,data:{url:`https://${t[1]}/api/v4/projects/${t[2]}%2Fgitlab_proof`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Fi,path:["description"]}]}})},reURI:Da,tests:[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]});const Fa=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;var Ta=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Fa);return new $i({about:{id:"github",name:"GitHub",homepage:"https://github.com"},profile:{display:t[1],uri:`https://github.com/${t[1]}`,qr:null},claim:{uriRegularExpression:Fa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:ki,data:{url:`https://api.github.com/gists/${t[2]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["files","proof.md","content"]},{format:Ui,encoding:Bi,relation:Ri,path:["files","openpgp.md","content"]}]}})},reURI:Fa,tests:[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]});const qa=/^https:\/\/(.*)\/?/;const Oa={postprocess:async(e,t,r)=>{switch(t.result.type){case"Note":{e.profile.uri=t.result.attributedTo,e.profile.display=t.result.attributedTo;const n=await qr({url:t.result.attributedTo},r).catch((e=>null));n&&(e.profile.display=`@${n.preferredUsername}@${new URL(e.proof.request.uri).hostname}`);break}case"Person":e.profile.display=`@${t.result.preferredUsername}@${new URL(e.proof.request.uri).hostname}`}const n=await Ka(new URL(e.proof.request.uri).hostname);return n&&(e.about.name=n.software.name,e.about.id=n.software.name,e.about.homepage=n.software.homepage),{claimData:e,proofData:t}}},Ka=async e=>{const t=await fetch(`https://${e}/.well-known/nodeinfo`).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).catch((e=>null));if(!t)return null;{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:e.software.homepage||"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}};var Ha=Object.freeze({__proto__:null,functions:Oa,processURI:function(e){return new $i({about:{id:"activitypub",name:"ActivityPub",homepage:"https://activitypub.rocks"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:qa.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:pi,accessRestriction:ki,data:{url:e}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["summary"]},{format:Ui,encoding:Bi,relation:Ri,path:["attachment","value"]},{format:Ui,encoding:Bi,relation:Ri,path:["content"]}]}})},reURI:qa,tests:[{uri:"https://domain.org",shouldMatch:!0},{uri:"https://domain.org/@/alice/",shouldMatch:!0},{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/123456",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/123456",shouldMatch:!0},{uri:"http://domain.org/alice",shouldMatch:!1}]});const Na=/^https:\/\/(.*)\/u\/(.*)\/?/;var La=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Na);return new $i({about:{id:"discourse",name:"Discourse",homepage:"https://www.discourse.org"},profile:{display:`${t[2]}@${t[1]}`,uri:e,qr:null},claim:{uriRegularExpression:Na.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://${t[1]}/u/${t[2]}.json`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["user","bio_raw"]}]}})},reURI:Na,tests:[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Ga=/^https:\/\/(.*)/;var ja=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ga);return new $i({about:{id:"owncast",name:"Owncast",homepage:"https://owncast.online"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ga.toString(),uriIsAmbiguous:!0},proof:{request:{uri:`${e}/api/config`,fetcher:mi,accessRestriction:ki,data:{url:`${e}/api/config`,format:Pi}},response:{format:Pi},target:[{format:Di,encoding:Bi,relation:Ri,path:["socialHandles","url"]}]}})},reURI:Ga,tests:[{uri:"https://live.domain.org",shouldMatch:!0},{uri:"https://live.domain.org/",shouldMatch:!0},{uri:"https://domain.org/live",shouldMatch:!0},{uri:"https://domain.org/live/",shouldMatch:!0}]});const za=/^https:\/\/(.*(?:askubuntu|mathoverflow|serverfault|stackapps|stackoverflow|superuser)|.+\.stackexchange)\.com\/users\/(\d+)/,Wa=/\.stackexchange$/;var Za=Object.freeze({__proto__:null,processURI:function(e){const[,t,r]=e.match(za),n=t.replace(Wa,"");return new $i({about:{id:"stackexchange",name:"Stack Exchange",homepage:"https://stackexchange.com"},profile:{display:`${r}@${n}`,uri:e,qr:null},claim:{uriRegularExpression:za.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://${t}.com/users/${r}?tab=profile`,fetcher:mi,accessRestriction:ki,data:{url:`https://api.stackexchange.com/2.3/users/${r}?site=${n}&filter=!AH)b5JqVyImf`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["items","about_me"]}]}})},reURI:za,tests:[{uri:"https://stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234?tab=topactivity",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice?tab=profile",shouldMatch:!0},{uri:"https://meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://serverfault.com/users/1234",shouldMatch:!0},{uri:"https://meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://gaming.meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://stackexchange.com/users/1234",shouldMatch:!1},{uri:"https://domain.com/users/1234",shouldMatch:!1},{uri:"https://meta.domain.com/users/1234",shouldMatch:!1}]});const Ja=/^https:\/\/keybase.io\/(.*)\/?/;var Va=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ja);return new $i({about:{id:"keybase",name:"keybase",homepage:"https://keybase.io"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ja.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,fetcher:mi,accessRestriction:Si,data:{url:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Di,encoding:Bi,relation:Ri,path:["them","public_keys","primary","key_fingerprint"]}]}})},reURI:Ja,tests:[{uri:"https://keybase.io/Alice",shouldMatch:!0},{uri:"https://keybase.io/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const Ya=/^https:\/\/opencollective\.com\/(.*)\/?/;var $a=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ya);return new $i({about:{id:"opencollective",name:"Open Collective",homepage:"https://opencollective.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ya.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:Si,data:{url:"https://api.opencollective.com/graphql/v2",query:`{ "query": "query { account(slug: \\"${t[1]}\\") { longDescription } }" }`}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["data","account","longDescription"]}]}})},reURI:Ya,tests:[{uri:"https://opencollective.com/Alice",shouldMatch:!0},{uri:"https://opencollective.com/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const Xa=/^https:\/\/orcid\.org\/(.*)\/?/;var eo=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Xa);return new $i({about:{id:"orcid",name:"ORCiD",homepage:"https://orcid.org/"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Xa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:ki,data:{url:e,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["person","biography","content"]},{format:Ui,encoding:Bi,relation:Fi,path:["person","researcher-urls","researcher-url","url","value"]},{format:Ui,encoding:Bi,relation:Fi,path:["person","keywords","keyword","content"]}]}})},reURI:Xa,tests:[{uri:"https://orcid.org/0000-0000-0000-0000",shouldMatch:!0},{uri:"https://orcid.org/0000-0000-0000-0000/",shouldMatch:!0},{uri:"https://domain.org/0000-0000-0000-0000",shouldMatch:!1}]});const to=/^https:\/\/pronouns\.cc\/@(.*)\/?/;var ro=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(to);return new $i({about:{id:"pronounscc",name:"pronouns.cc",homepage:"https://pronouns.cc"},profile:{display:`@${t[1]}`,uri:`https://pronouns.cc/@${t[1]}`,qr:null},claim:{uriRegularExpression:to.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:mi,accessRestriction:Si,data:{url:`https://pronouns.cc/api/v1/users/${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["links"]},{format:Ui,encoding:Bi,relation:Ri,path:["bio"]}]}})},reURI:to,tests:[{uri:"https://pronouns.cc/@Alice",shouldMatch:!0},{uri:"https://pronouns.cc/@Alice/",shouldMatch:!0},{uri:"https://pronouns.cc/Alice",shouldMatch:!1},{uri:"https://pronouns.cc/Alice/",shouldMatch:!1}]});const no=/^https:\/\/(?:discord\.gg|discord\.com\/invite)\/(.+)/;var io=Object.freeze({__proto__:null,functions:{postprocess:async(e,t,r)=>(e.profile.display=t.result.inviter.username,{claimData:e,proofData:t})},processURI:function(e){const t=e.match(no);return new $i({about:{id:"discord",name:"Discord",homepage:"https://discord.com"},profile:{display:"Unknown username",uri:null,qr:null},claim:{uriRegularExpression:no.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://discord.com/api/v10/invites/${t[1]}`,fetcher:mi,accessRestriction:Si,data:{url:`https://discord.com/api/v10/invites/${t[1]}`,format:Pi}},response:{format:Pi},target:[{format:Ui,encoding:Bi,relation:Ri,path:["guild","description"]},{format:Ui,encoding:Bi,relation:Ri,path:["guild","name"]}]}})},reURI:no,tests:[{uri:"https://discord.com/invite/AbCdEf",shouldMatch:!0},{uri:"https://discord.com/invite/AbCdEfGh",shouldMatch:!0},{uri:"https://discord.gg/AbCdEf",shouldMatch:!0},{uri:"https://discord.gg/AbCdEfGh",shouldMatch:!0},{uri:"https://domain.com/invite/AbCdEf",shouldMatch:!1},{uri:"https://domain.gg/AbCdEf",shouldMatch:!1},{uri:"https://discord.com/invite/",shouldMatch:!1},{uri:"https://discord.gg/",shouldMatch:!1}]});const ao={aspe:ea,openpgp:ia,dns:oa,irc:ca,xmpp:ha,matrix:fa,telegram:pa,twitter:Aa,reddit:ma,liberapay:wa,lichess:Ia,hackernews:Ba,lobsters:_a,forem:Sa,forgejo:Pa,gitea:Ua,gitlab:Ra,github:Ta,activitypub:Ha,discourse:La,owncast:ja,stackexchange:Za,keybase:Va,opencollective:$a,orcid:eo,pronounscc:ro,discord:io},oo=Object.keys(ao),so="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},co=Symbol("doneWritingPromise"),uo=Symbol("doneWritingResolve"),ho=Symbol("doneWritingReject"),lo=Symbol("readingIndex");class fo extends Array{constructor(){super(),this[co]=new Promise(((e,t)=>{this[uo]=e,this[ho]=t})),this[co].catch((()=>{}))}}function po(e){return e&&e.getReader&&Array.isArray(e)}function go(e){if(!po(e)){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=()=>{t.closed.catch((function(){})),r.call(t)},t}this.stream=e}fo.prototype.getReader=function(){return void 0===this[lo]&&(this[lo]=0),{read:async()=>(await this[co],this[lo]===this.length?{value:void 0,done:!0}:{value:this[this[lo]++],done:!1})}},fo.prototype.readToEnd=async function(e){await this[co];const t=e(this.slice(this[lo]));return this.length=0,t},fo.prototype.clone=function(){const e=new fo;return e[co]=this[co].then((()=>{e.push(...this)})),e},go.prototype.write=async function(e){this.stream.push(e)},go.prototype.close=async function(){this.stream[uo]()},go.prototype.abort=async function(e){return this.stream[ho](e),e},go.prototype.releaseLock=function(){};const Ao="object"==typeof so.process&&"object"==typeof so.process.versions,yo=Ao&&void 0;function mo(e){return po(e)?"array":so.ReadableStream&&so.ReadableStream.prototype.isPrototypeOf(e)?"web":Qo&&Qo.prototype.isPrototypeOf(e)?"ponyfill":yo&&yo.prototype.isPrototypeOf(e)?"node":!(!e||!e.getReader)&&"web-like"}function bo(e){return Uint8Array.prototype.isPrototypeOf(e)}function wo(e){if(1===e.length)return e[0];let t=0;for(let r=0;r{t||(vo.isBuffer(n)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),r.enqueue(n),e.pause())})),e.on("end",(()=>{t||r.close()})),e.on("error",(e=>r.error(e)))},pull(){e.resume()},cancel(r){t=!0,e.destroy(r)}})};class e extends Io{constructor(e,t){super(t),this._reader=Fo(e)}async _read(e){try{for(;;){const{done:e,value:t}=await this._reader.read();if(e){this.push(null);break}if(!this.push(t))break}}catch(e){this.destroy(e)}}async _destroy(e,t){this._reader.cancel(e).then(t,t)}}Bo=function(t,r){return new e(t,r)}}const Co=new WeakSet,_o=Symbol("externalBuffer");function ko(e){if(this.stream=e,e[_o]&&(this[_o]=e[_o].slice()),po(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{},void(this._cancel=async()=>{})}let t=mo(e);if("node"===t&&(e=Eo(e)),t){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{t.closed.catch((function(){})),t.releaseLock()},void(this._cancel=t.cancel.bind(t))}let r=!1;this._read=async()=>r||Co.has(e)?{value:void 0,done:!0}:(r=!0,{value:e,done:!1}),this._releaseLock=()=>{if(r)try{Co.add(e)}catch(e){}}}ko.prototype.read=async function(){return this[_o]&&this[_o].length?{done:!1,value:this[_o].shift()}:this._read()},ko.prototype.releaseLock=function(){this[_o]&&(this.stream[_o]=this[_o]),this._releaseLock()},ko.prototype.cancel=function(e){return this._cancel(e)},ko.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:r,value:n}=await this.read();if(n+="",r)return t.length?Ro(t):void 0;const i=n.indexOf("\n")+1;i&&(e=Ro(t.concat(n.substr(0,i))),t=[]),i!==n.length&&t.push(n.substr(i))}return this.unshift(...t),e},ko.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const r=t[0];return this.unshift(zo(t,1)),r},ko.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){const{done:n,value:i}=await this.read();if(n)return t.length?Ro(t):void 0;if(t.push(i),r+=i.length,r>=e){const r=Ro(t);return this.unshift(zo(r,e)),zo(r,0,e)}}},ko.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},ko.prototype.unshift=function(...e){this[_o]||(this[_o]=[]),1===e.length&&bo(e[0])&&this[_o].length&&e[0].length&&this[_o][0].byteOffset>=e[0].length?this[_o][0]=new Uint8Array(this[_o][0].buffer,this[_o][0].byteOffset-e[0].length,this[_o][0].byteLength+e[0].length):this[_o].unshift(...e.filter((e=>e&&e.length)))},ko.prototype.readToEnd=async function(e=Ro){const t=[];for(;;){const{done:e,value:r}=await this.read();if(e)break;t.push(r)}return e(t)};let So,{ReadableStream:Qo,WritableStream:xo,TransformStream:Po}=so;const Mo=Ao&&void 0;function Uo(e){let t=mo(e);return"node"===t?Eo(e):"web"===t&&So?So(e):t?e:new Qo({start(t){t.enqueue(e),t.close()}})}function Do(e){if(mo(e))return e;const t=new fo;return(async()=>{const r=To(t);await r.write(e),await r.close()})(),t}function Ro(e){return e.some((e=>mo(e)&&!po(e)))?function(e){e=e.map(Uo);const t=Ko((async function(e){await Promise.all(n.map((t=>async function(e,t){if(mo(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}(t,e))))}));let r=Promise.resolve();const n=e.map(((n,i)=>No(n,((n,a)=>(r=r.then((()=>qo(n,t.writable,{preventClose:i!==e.length-1}))),r)))));return t.readable}(e):e.some((e=>po(e)))?function(e){const t=new fo;let r=Promise.resolve();return e.forEach(((n,i)=>(r=r.then((()=>qo(n,t,{preventClose:i!==e.length-1}))),r))),t}(e):"string"==typeof e[0]?e.join(""):Mo&&Mo.isBuffer(e[0])?Mo.concat(e):wo(e)}function Fo(e){return new ko(e)}function To(e){return new go(e)}async function qo(e,t,{preventClose:r=!1,preventAbort:n=!1,preventCancel:i=!1}={}){if(mo(e)&&!po(e)){e=Uo(e);try{if(e[_o]){const r=To(t);for(let t=0;t{t=e})),t=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function Ho(e,t=(()=>{}),r=(()=>{})){if(po(e)){const n=new fo;return(async()=>{const i=To(n);try{const n=await Wo(e),a=t(n),o=r();let s;s=void 0!==a&&void 0!==o?Ro([a,o]):void 0!==a?a:o,await i.write(s),await i.close()}catch(e){await i.abort(e)}})(),n}if(mo(e))return Oo(e,{async transform(e,r){try{const n=await t(e);void 0!==n&&r.enqueue(n)}catch(e){r.error(e)}},async flush(e){try{const t=await r();void 0!==t&&e.enqueue(t)}catch(t){e.error(t)}}});const n=t(e),i=r();return void 0!==n&&void 0!==i?Ro([n,i]):void 0!==n?n:i}function No(e,t){if(mo(e)&&!po(e)){let r;const n=new Po({start(e){r=e}}),i=qo(e,n.writable),a=Ko((async function(e){r.error(e),await i,await new Promise(setTimeout)}));return t(n.readable,a.writable),a.readable}e=Do(e);const r=new fo;return t(e,r),r}function Lo(e){if(po(e))return e.clone();if(mo(e)){const t=function(e){if(po(e))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(mo(e)){const t=Uo(e).tee();return t[0][_o]=t[1][_o]=e[_o],t}return[zo(e),zo(e)]}(e);return jo(e,t[0]),t[1]}return zo(e)}function Go(e){return po(e)?Lo(e):mo(e)?new Qo({start(t){const r=No(e,(async(e,r)=>{const n=Fo(e),i=To(r);try{for(;;){await i.ready;const{done:r,value:a}=await n.read();if(r){try{t.close()}catch(e){}return void await i.close()}try{t.enqueue(a)}catch(e){}await i.write(a)}}catch(e){t.error(e),await i.abort(e)}}));jo(e,r)}}):zo(e)}function jo(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach((([r,n])=>{"constructor"!==r&&(n.value?n.value=n.value.bind(t):n.get=n.get.bind(t),Object.defineProperty(e,r,n))}))}function zo(e,t=0,r=1/0){if(po(e))throw Error("Not implemented");if(mo(e)){if(t>=0&&r>=0){let n=0;return Oo(e,{transform(e,i){n=t&&i.enqueue(zo(e,Math.max(t-n,0),r-n)),n+=e.length):i.terminate()}})}if(t<0&&(r<0||r===1/0)){let n=[];return Ho(e,(e=>{e.length>=-t?n=[e]:n.push(e)}),(()=>zo(Ro(n),t,r)))}if(0===t&&r<0){let n;return Ho(e,(e=>{const i=n?Ro([n,e]):e;if(i.length>=-r)return n=zo(i,r),zo(i,t,r);n=i}))}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),Zo((async()=>zo(await Wo(e),t,r)))}return e[_o]&&(e=Ro(e[_o].concat([e]))),!bo(e)||Mo&&Mo.isBuffer(e)?e.slice(t,r):(r===1/0&&(r=e.length),e.subarray(t,r))}async function Wo(e,t=Ro){return po(e)?e.readToEnd(t):mo(e)?Fo(e).readToEnd(t):e}function Zo(e){const t=new fo;return(async()=>{const r=To(t);try{await r.write(await e()),await r.close()}catch(e){await r.abort(e)}})(),t}class Jo{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");if(e instanceof Uint8Array){const t=e,r=Array(t.length);for(let e=0;eBigInt(0);){const e=r&BigInt(1);r>>=BigInt(1);const a=i*n%t.value;i=e?a:i,n=n*n%t.value}return new Jo(i)}modInv(e){const{gcd:t,x:r}=this._egcd(e);if(!t.isOne())throw Error("Inverse does not exist");return r.add(e).mod(e)}_egcd(e){let t=BigInt(0),r=BigInt(1),n=BigInt(1),i=BigInt(0),a=this.value;for(e=e.value;e!==BigInt(0);){const o=a/e;let s=t;t=n-o*t,n=s,s=r,r=i-o*r,i=s,s=e,e=a%e,a=s}return{x:new Jo(n),y:new Jo(i),gcd:new Jo(a)}}gcd(e){let t=this.value;for(e=e.value;e!==BigInt(0);){const r=e;e=t%e,t=r}return new Jo(t)}ileftShift(e){return this.value<<=e.value,this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value>>=e.value,this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value===e.value}lt(e){return this.valuee.value}gte(e){return this.value>=e.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.valueNumber.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return e}getBit(e){return(this.value>>BigInt(e)&BigInt(1))===BigInt(0)?0:1}bitLength(){const e=new Jo(0),t=new Jo(1),r=new Jo(-1),n=this.isNegative()?r:e;let i=1;const a=this.clone();for(;!a.irightShift(t).equal(n);)i++;return i}byteLength(){const e=new Jo(0),t=new Jo(-1),r=this.isNegative()?t:e,n=new Jo(8);let i=1;const a=this.clone();for(;!a.irightShift(n).equal(r);)i++;return i}toUint8Array(e="be",t){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const n=r.length/2,i=new Uint8Array(t||n),a=t?t-n:0;let o=0;for(;o{e[Vo][r]=t}))),void 0!==e[Vo][t])return e[Vo][t];throw Error("Invalid enum value.")}};const $o=(()=>{try{return"development"===process.env.NODE_ENV}catch(e){}return!1})(),Xo={isString:function(e){return"string"==typeof e||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:bo,isStream:mo,readNumber:function(e){let t=0;for(let r=0;r>8*(t-n-1)&255;return r},readDate:function(e){const t=Xo.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return Xo.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=7+(e[0]<<8|e[1])>>>3;return e.subarray(2,2+t)},leftPad(e,t){const r=new Uint8Array(t),n=t-e.length;return r.set(e,n),r},uint8ArrayToMPI:function(e){const t=Xo.uint8ArrayBitLength(e);if(0===t)throw Error("Zero MPI");const r=e.subarray(e.length-Math.ceil(t/8)),n=new Uint8Array([(65280&t)>>8,255&t]);return Xo.concatUint8Array([n,r])},uint8ArrayBitLength:function(e){let t;for(t=0;t>1);for(let r=0;r>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],r=e.length;let n,i=0;for(;i{if(!Xo.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;rr("",!0)))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return Ho(e,r,(()=>r(new Uint8Array,!0)))},concat:Ro,concatUint8Array:wo,equalsUint8Array:function(e,t){if(!Xo.isUint8Array(e)||!Xo.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r>>16;return 0!==r&&(e=r,t+=16),r=e>>8,0!==r&&(e=r,t+=8),r=e>>4,0!==r&&(e=r,t+=4),r=e>>2,0!==r&&(e=r,t+=2),r=e>>1,0!==r&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let n=0;n>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){return void 0!==so&&so.crypto&&so.crypto.subtle},getBigInteger:async function(){if("undefined"!=typeof BigInt)return Jo;{const{default:e}=await Promise.resolve().then((function(){return Am}));return e}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return"undefined"!=typeof navigator?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(e){return!!Xo.isString(e)&&/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}[0-9]*|xn--[a-zA-Z\-0-9]+)))$/.test(e)},canonicalizeEOL:function(e){let t=!1;return Ho(e,(e=>{let r;t&&(e=Xo.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const n=[];for(let t=0;r=e.indexOf(10,t)+1,r;t=r)13!==e[r-2]&&n.push(r);if(!n.length)return e;const i=new Uint8Array(e.length+n.length);let a=0;for(let t=0;tt?new Uint8Array([13]):void 0))},nativeEOL:function(e){let t=!1;return Ho(e,(e=>{let r;13===(e=t&&10!==e[0]?Xo.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let n=0;for(let t=0;t!==e.length;t=r){r=e.indexOf(13,t)+1,r||(r=e.length);const i=r-(10===e[r]?1:0);t&&e.copyWithin(n,t,i),n+=i-t}return e.subarray(0,n)}),(()=>t?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(e){return e.split("\n").map((e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]||"\r"===e[t]);t--);return e.substr(0,t+1)})).join("\n")},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch(e){}return t},constructAllowedPackets:function(e){const t={};return e.forEach((e=>{if(!e.tag)throw Error("Invalid input: expected a packet class");t[e.tag]=e})),t},anyPromise:function(e){return new Promise((async(t,r)=>{let n;await Promise.all(e.map((async e=>{try{t(await e)}catch(e){n=e}}))),r(n)}))},selectUint8Array:function(e,t,r){const n=Math.max(t.length,r.length),i=new Uint8Array(n);let a=0;for(let n=0;n{t=Xo.concatUint8Array([t,e]);const r=[],n=Math.floor(t.length/45),i=45*n,a=ts(t.subarray(0,i));for(let e=0;et.length?ts(t)+"\n":""))}function is(e){let t="";return Ho(e,(e=>{t+=e;let r=0;const n=[" ","\t","\r","\n"];for(let e=0;e0&&(i-r)%4!=0;i--)n.includes(t[i])&&r--;const a=rs(t.substr(0,i));return t=t.substr(i),a}),(()=>rs(t)))}function as(e){return is(e.replace(/-/g,"+").replace(/_/g,"/"))}function os(e,t){let r=ns(e).replace(/[\r\n]/g,"");return t&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r}es?(ts=e=>es.from(e).toString("base64"),rs=e=>{const t=es.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}):(ts=e=>btoa(Xo.uint8ArrayToString(e)),rs=e=>Xo.stringToUint8Array(atob(e)));var ss={preferredHashAlgorithm:Yo.hash.sha256,preferredSymmetricAlgorithm:Yo.symmetric.aes256,preferredCompressionAlgorithm:Yo.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:Yo.aead.eax,aeadChunkSizeByte:12,v5Keys:!1,s2kIterationCountByte:224,allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,checksumRequired:!1,minRSABits:2047,passwordCollisionCheck:!1,revocationsExpire:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([Yo.symmetric.aes128,Yo.symmetric.aes192,Yo.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,additionalAllowedPackets:[],showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.11.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([Yo.hash.md5,Yo.hash.ripemd]),rejectMessageHashAlgorithms:new Set([Yo.hash.md5,Yo.hash.ripemd,Yo.hash.sha1]),rejectPublicKeyAlgorithms:new Set([Yo.publicKey.elgamal,Yo.publicKey.dsa]),rejectCurves:new Set([Yo.curve.secp256k1])};function cs(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?Yo.armor.multipartSection:/MESSAGE, PART \d+/.test(t[1])?Yo.armor.multipartLast:/SIGNED MESSAGE/.test(t[1])?Yo.armor.signed:/MESSAGE/.test(t[1])?Yo.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?Yo.armor.publicKey:/PRIVATE KEY BLOCK/.test(t[1])?Yo.armor.privateKey:/SIGNATURE/.test(t[1])?Yo.armor.signature:void 0}function us(e,t){let r="";return t.showVersion&&(r+="Version: "+t.versionString+"\n"),t.showComment&&(r+="Comment: "+t.commentString+"\n"),e&&(r+="Comment: "+e+"\n"),r+="\n",r}function hs(e){return ns(function(e){let t=13501623;return Ho(e,(e=>{const r=fs?Math.floor(e.length/4):0,n=new Uint32Array(e.buffer,e.byteOffset,r);for(let e=0;e>24&255]^ls[1][t>>16&255]^ls[2][t>>8&255]^ls[3][t>>0&255];for(let n=4*r;n>8^ls[0][255&t^e[n]]}),(()=>new Uint8Array([t,t>>8,t>>16])))}(e))}const ls=[Array(255),Array(255),Array(255),Array(255)];for(let e=0;e<=255;e++){let t=e<<16;for(let e=0;e<8;e++)t=t<<1^(0!=(8388608&t)?8801531:0);ls[0][e]=(16711680&t)>>16|65280&t|(255&t)<<16}for(let e=0;e<=255;e++)ls[1][e]=ls[0][e]>>8^ls[0][255&ls[0][e]];for(let e=0;e<=255;e++)ls[2][e]=ls[1][e]>>8^ls[0][255&ls[1][e]];for(let e=0;e<=255;e++)ls[3][e]=ls[2][e]>>8^ls[0][255&ls[2][e]];const fs=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function ds(e){for(let t=0;t=0&&n!==e.length-1&&(t=e.slice(0,n),r=e.slice(n+1).substr(0,4)),{body:t,checksum:r}}function gs(e,t=ss){return new Promise((async(r,n)=>{try{const i=/^-----[^-]+-----$/m,a=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let o;const s=[];let c,u,h,l=s,f=[],d=is(No(e,(async(e,t)=>{const p=Fo(e);try{for(;;){let e=await p.readLine();if(void 0===e)throw Error("Misformed armored text");if(e=Xo.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),o)if(c)u||2!==o||(i.test(e)?(f=f.join("\r\n"),u=!0,ds(l),l=[],c=!1):f.push(e.replace(/^- /,"")));else if(i.test(e)&&n(Error("Mandatory blank line missing between armor headers and armor data")),a.test(e)){if(ds(l),c=!0,u||2!==o){r({text:f,data:d,headers:s,type:o});break}}else l.push(e);else i.test(e)&&(o=cs(e))}}catch(e){return void n(e)}const g=To(t);try{for(;;){await g.ready;const{done:e,value:t}=await p.read();if(e)throw Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await p.readToEnd();e.length||(e=""),e=r+e,e=Xo.removeTrailingSpaces(e.replace(/\r/g,""));const t=e.split(i);if(1===t.length)throw Error("Misformed armored text");const n=ps(t[0].slice(0,-1));h=n.checksum,await g.write(n.body);break}await g.write(r)}await g.ready,await g.close()}catch(e){await g.abort(e)}})));d=No(d,(async(e,r)=>{const n=Wo(hs(Go(e)));n.catch((()=>{})),await qo(e,r,{preventClose:!0});const i=To(r);try{const e=(await n).replace("\n","");if(h!==e&&(h||t.checksumRequired))throw Error("Ascii armor integrity check failed");await i.ready,await i.close()}catch(e){await i.abort(e)}}))}catch(e){n(e)}})).then((async e=>(po(e.data)&&(e.data=await Wo(e.data)),e)))}function As(e,t,r,n,i,a=ss){let o,s;e===Yo.armor.signed&&(o=t.text,s=t.hash,t=t.data);const c=Go(t),u=[];switch(e){case Yo.armor.multipartSection:u.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+n+"-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP MESSAGE, PART "+r+"/"+n+"-----\n");break;case Yo.armor.multipartLast:u.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP MESSAGE, PART "+r+"-----\n");break;case Yo.armor.signed:u.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),u.push("Hash: "+s+"\n\n"),u.push(o.replace(/^-/gm,"- -")),u.push("\n-----BEGIN PGP SIGNATURE-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP SIGNATURE-----\n");break;case Yo.armor.message:u.push("-----BEGIN PGP MESSAGE-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP MESSAGE-----\n");break;case Yo.armor.publicKey:u.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case Yo.armor.privateKey:u.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case Yo.armor.signature:u.push("-----BEGIN PGP SIGNATURE-----\n"),u.push(us(i,a)),u.push(ns(t)),u.push("=",hs(c)),u.push("-----END PGP SIGNATURE-----\n")}return Xo.concat(u)}class ys{constructor(){this.bytes=""}read(e){return this.bytes=Xo.uint8ArrayToString(e.subarray(0,8)),this.bytes.length}write(){return Xo.stringToUint8Array(this.bytes)}toHex(){return Xo.uint8ArrayToHex(Xo.stringToUint8Array(this.bytes))}equals(e,t=!1){return t&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(e){return e.toHex()}static fromID(e){const t=new ys;return t.read(Xo.hexToUint8Array(e)),t}static wildcard(){const e=new ys;return e.read(new Uint8Array(8)),e}}var ms=function(){var e,t,r=!1;function n(r,n){var i=e[(t[r]+t[n])%255];return 0!==r&&0!==n||(i=0),i}var i,a,o,s,c=!1;function u(){function u(r){var n,i,a;for(i=a=function(r){var n=e[255-t[r]];return 0===r&&(n=0),n}(r),n=0;n<4;n++)a^=i=255&(i<<1|i>>>7);return 99^a}r||function(){e=[],t=[];var n,i,a=1;for(n=0;n<255;n++)e[n]=a,i=128&a,a<<=1,a&=255,128===i&&(a^=27),a^=e[n],t[e[n]]=n;e[255]=e[0],t[0]=0,r=!0}(),i=[],a=[],o=[[],[],[],[]],s=[[],[],[],[]];for(var h=0;h<256;h++){var l=u(h);i[h]=l,a[l]=h,o[0][h]=n(2,l)<<24|l<<16|l<<8|n(3,l),s[0][l]=n(14,h)<<24|n(9,h)<<16|n(13,h)<<8|n(11,h);for(var f=1;f<4;f++)o[f][h]=o[f-1][h]>>>8|o[f-1][h]<<24,s[f][l]=s[f-1][l]>>>8|s[f-1][l]<<24}c=!0}var h=function(e,t){c||u();var r=new Uint32Array(t);r.set(i,512),r.set(a,768);for(var n=0;n<4;n++)r.set(o[n],4096+1024*n>>2),r.set(s[n],8192+1024*n>>2);var h=function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0;var B=new e.Uint32Array(r),C=new e.Uint8Array(r);function _(e,t,r,s,c,u,h,l){e=e|0;t=t|0;r=r|0;s=s|0;c=c|0;u=u|0;h=h|0;l=l|0;var f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;f=r|0x400,d=r|0x800,p=r|0xc00;c=c^B[(e|0)>>2],u=u^B[(e|4)>>2],h=h^B[(e|8)>>2],l=l^B[(e|12)>>2];for(b=16;(b|0)<=s<<4;b=b+16|0){g=B[(r|c>>22&1020)>>2]^B[(f|u>>14&1020)>>2]^B[(d|h>>6&1020)>>2]^B[(p|l<<2&1020)>>2]^B[(e|b|0)>>2],A=B[(r|u>>22&1020)>>2]^B[(f|h>>14&1020)>>2]^B[(d|l>>6&1020)>>2]^B[(p|c<<2&1020)>>2]^B[(e|b|4)>>2],y=B[(r|h>>22&1020)>>2]^B[(f|l>>14&1020)>>2]^B[(d|c>>6&1020)>>2]^B[(p|u<<2&1020)>>2]^B[(e|b|8)>>2],m=B[(r|l>>22&1020)>>2]^B[(f|c>>14&1020)>>2]^B[(d|u>>6&1020)>>2]^B[(p|h<<2&1020)>>2]^B[(e|b|12)>>2];c=g,u=A,h=y,l=m}n=B[(t|c>>22&1020)>>2]<<24^B[(t|u>>14&1020)>>2]<<16^B[(t|h>>6&1020)>>2]<<8^B[(t|l<<2&1020)>>2]^B[(e|b|0)>>2],i=B[(t|u>>22&1020)>>2]<<24^B[(t|h>>14&1020)>>2]<<16^B[(t|l>>6&1020)>>2]<<8^B[(t|c<<2&1020)>>2]^B[(e|b|4)>>2],a=B[(t|h>>22&1020)>>2]<<24^B[(t|l>>14&1020)>>2]<<16^B[(t|c>>6&1020)>>2]<<8^B[(t|u<<2&1020)>>2]^B[(e|b|8)>>2],o=B[(t|l>>22&1020)>>2]<<24^B[(t|c>>14&1020)>>2]<<16^B[(t|u>>6&1020)>>2]<<8^B[(t|h<<2&1020)>>2]^B[(e|b|12)>>2]}function k(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;_(0x0000,0x0800,0x1000,E,e,t,r,n)}function S(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var a=0;_(0x0400,0x0c00,0x2000,E,e,n,r,t);a=i,i=o,o=a}function Q(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s^e,c^t,u^r,h^l);s=n,c=i,u=a,h=o}function x(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;var f=0;_(0x0400,0x0c00,0x2000,E,e,l,r,t);f=i,i=o,o=f;n=n^s,i=i^c,a=a^u,o=o^h;s=e,c=t,u=r,h=l}function P(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n=n^e,c=i=i^t,u=a=a^r,h=o=o^l}function M(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);n=n^e,i=i^t,a=a^r,o=o^l;s=e,c=t,u=r,h=l}function U(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n,c=i,u=a,h=o;n=n^e,i=i^t,a=a^r,o=o^l}function D(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;_(0x0000,0x0800,0x1000,E,l,f,d,p);p=~m&p|m&p+1;d=~y&d|y&d+((p|0)==0);f=~A&f|A&f+((d|0)==0);l=~g&l|g&l+((f|0)==0);n=n^e;i=i^t;a=a^r;o=o^s}function R(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0;e=e^s,t=t^c,r=r^u,n=n^h;i=b|0,a=w|0,o=v|0,l=I|0;for(;(A|0)<128;A=A+1|0){if(i>>>31){f=f^e,d=d^t,p=p^r,g=g^n}i=i<<1|a>>>31,a=a<<1|o>>>31,o=o<<1|l>>>31,l=l<<1;y=n&1;n=n>>>1|r<<31,r=r>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(y)e=e^0xe1000000}s=f,c=d,u=p,h=g}function F(e){e=e|0;E=e}function T(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;n=e,i=t,a=r,o=s}function q(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;s=e,c=t,u=r,h=n}function O(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;l=e,f=t,d=r,p=n}function K(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;g=e,A=t,y=r,m=n}function H(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;p=~m&p|m&n,d=~y&d|y&r,f=~A&f|A&t,l=~g&l|g&e}function N(e){e=e|0;if(e&15)return-1;C[e|0]=n>>>24,C[e|1]=n>>>16&255,C[e|2]=n>>>8&255,C[e|3]=n&255,C[e|4]=i>>>24,C[e|5]=i>>>16&255,C[e|6]=i>>>8&255,C[e|7]=i&255,C[e|8]=a>>>24,C[e|9]=a>>>16&255,C[e|10]=a>>>8&255,C[e|11]=a&255,C[e|12]=o>>>24,C[e|13]=o>>>16&255,C[e|14]=o>>>8&255,C[e|15]=o&255;return 16}function L(e){e=e|0;if(e&15)return-1;C[e|0]=s>>>24,C[e|1]=s>>>16&255,C[e|2]=s>>>8&255,C[e|3]=s&255,C[e|4]=c>>>24,C[e|5]=c>>>16&255,C[e|6]=c>>>8&255,C[e|7]=c&255,C[e|8]=u>>>24,C[e|9]=u>>>16&255,C[e|10]=u>>>8&255,C[e|11]=u&255,C[e|12]=h>>>24,C[e|13]=h>>>16&255,C[e|14]=h>>>8&255,C[e|15]=h&255;return 16}function G(){k(0,0,0,0);b=n,w=i,v=a,I=o}function j(e,t,r){e=e|0;t=t|0;r=r|0;var s=0;if(t&15)return-1;while((r|0)>=16){W[e&7](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);C[t|0]=n>>>24,C[t|1]=n>>>16&255,C[t|2]=n>>>8&255,C[t|3]=n&255,C[t|4]=i>>>24,C[t|5]=i>>>16&255,C[t|6]=i>>>8&255,C[t|7]=i&255,C[t|8]=a>>>24,C[t|9]=a>>>16&255,C[t|10]=a>>>8&255,C[t|11]=a&255,C[t|12]=o>>>24,C[t|13]=o>>>16&255,C[t|14]=o>>>8&255,C[t|15]=o&255;s=s+16|0,t=t+16|0,r=r-16|0}return s|0}function z(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;if(t&15)return-1;while((r|0)>=16){Z[e&1](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);n=n+16|0,t=t+16|0,r=r-16|0}return n|0}var W=[k,S,Q,x,P,M,U,D];var Z=[Q,R];return{set_rounds:F,set_state:T,set_iv:q,set_nonce:O,set_mask:K,set_counter:H,get_state:N,get_iv:L,gcm_init:G,cipher:j,mac:z}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return h.set_key=function(e,t,n,a,o,c,u,l,f){var d=r.subarray(0,60),p=r.subarray(256,316);d.set([t,n,a,o,c,u,l,f]);for(var g=e,A=1;g<4*e+28;g++){var y=d[g-1];(g%e==0||8===e&&g%e==4)&&(y=i[y>>>24]<<24^i[y>>>16&255]<<16^i[y>>>8&255]<<8^i[255&y]),g%e==0&&(y=y<<8^y>>>24^A<<24,A=A<<1^(128&A?27:0)),d[g]=d[g-e]^y}for(var m=0;m=g-4?y:s[0][i[y>>>24]]^s[1][i[y>>>16&255]]^s[2][i[y>>>8&255]]^s[3][i[255&y]];h.set_rounds(e+5)},h};return h.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},h.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},h.MAC={CBC:0,GCM:1},h.HEAP_DATA=16384,h}();function bs(e){return e instanceof Uint8Array}function ws(e,t){const r=e?e.byteLength:t||65536;if(4095&r||r<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e||new Uint8Array(new ArrayBuffer(r))}function vs(e,t,r,n,i){const a=e.length-t,o=ae+t.length),0),r=new Uint8Array(t);let n=0;for(let t=0;t>2,i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12),n>16?i.getUint32(16):0,n>16?i.getUint32(20):0,n>24?i.getUint32(24):0,n>24?i.getUint32(28):0),void 0!==t){if(16!==t.length)throw new Bs("illegal iv size");let e=new DataView(t.buffer,t.byteOffset,t.byteLength);r.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(e){if(!bs(e))throw new TypeError("data isn't of expected type");let{heap:t,asm:r}=this.acquire_asm(),n=ms.ENC[this.mode],i=ms.HEAP_DATA,a=this.pos,o=this.len,s=0,c=e.length||0,u=0,h=0,l=new Uint8Array(o+c&-16);for(;c>0;)h=vs(t,a+o,e,s,c),o+=h,s+=h,c-=h,h=r.cipher(n,i+a,o),h&&l.set(t.subarray(a,a+h),u),u+=h,h0;)f=vs(t,a+o,e,s,c),o+=f,s+=f,c-=f,f=r.cipher(n,i+a,o-(c?0:l)),f&&d.set(t.subarray(a,a+f),u),u+=f,f0){if(a%16){if(this.hasOwnProperty("padding"))throw new Bs("data length must be a multiple of the block size");a+=16-a%16}if(t.cipher(r,n+i,a),this.hasOwnProperty("padding")&&this.padding){let t=e[i+o-1];if(t<1||t>16||t>o)throw new Cs("bad padding");let r=0;for(let n=t;n>1;n--)r|=t^e[i+o-n];if(r)throw new Cs("bad padding");o-=t}}const s=new Uint8Array(o);return o>0&&s.set(e.subarray(i,i+o)),this.pos=0,this.len=0,this.release_asm(),s}}class Qs{static encrypt(e,t,r=!1){return new Qs(t,r).encrypt(e)}static decrypt(e,t,r=!1){return new Qs(t,r).decrypt(e)}constructor(e,t=!1,r){this.aes=r||new Ss(e,void 0,t,"ECB")}encrypt(e){return Is(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Is(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function xs(e){const t=function(e){const t=new Qs(e);this.encrypt=function(e){return t.encrypt(e)},this.decrypt=function(e){return t.decrypt(e)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function Ps(e,t,r,n,i,a){const o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],c=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],d=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let p,g,A,y,m,b,w,v,I,E,B,C,_,k,S=0,Q=t.length;const x=32===e.length?3:9;v=3===x?r?[0,32,2]:[30,-2,-2]:r?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],r&&(t=function(e,t){const r=8-e.length%8;let n;if(2===t&&r<8)n=32;else if(1===t)n=r;else{if(t||!(r<8)){if(8===r)return e;throw Error("des: invalid padding")}n=0}const i=new Uint8Array(e.length+r);for(let t=0;t>>4^w),w^=A,b^=A<<4,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,b=b<<1|b>>>31,w=w<<1|w>>>31,g=0;g>>4|w<<28)^e[p+1],A=b,b=w,w=A^(s[y>>>24&63]|u[y>>>16&63]|l[y>>>8&63]|d[63&y]|o[m>>>24&63]|c[m>>>16&63]|h[m>>>8&63]|f[63&m]);A=b,b=w,w=A}b=b>>>1|b<<31,w=w>>>1|w<<31,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=252645135&(b>>>4^w),w^=A,b^=A<<4,1===n&&(r?(I=b,B=w):(b^=E,w^=C)),P[M++]=b>>>24,P[M++]=b>>>16&255,P[M++]=b>>>8&255,P[M++]=255&b,P[M++]=w>>>24,P[M++]=w>>>16&255,P[M++]=w>>>8&255,P[M++]=255&w}return r||(P=function(e,t){let r,n=null;if(2===t)r=32;else if(1===t)n=e[e.length-1];else{if(t)throw Error("des: invalid padding");r=0}if(!n){for(n=1;e[e.length-n]===r;)n++;n--}return e.subarray(0,e.length-n)}(P,a)),P}function Ms(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],s=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],l=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],f=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length>8?3:1,A=Array(32*g),y=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let m,b,w,v=0,I=0;for(let E=0;E>>4^E),E^=w,g^=w<<4,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=858993459&(g>>>2^E),E^=w,g^=w<<2,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=16711935&(E>>>8^g),g^=w,E^=w<<8,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=g<<8|E>>>20&240,g=E<<24|E<<8&16711680|E>>>8&65280|E>>>24&240,E=w;for(let e=0;e<16;e++)y[e]?(g=g<<2|g>>>26,E=E<<2|E>>>26):(g=g<<1|g>>>27,E=E<<1|E>>>27),g&=-15,E&=-15,m=t[g>>>28]|r[g>>>24&15]|n[g>>>20&15]|i[g>>>16&15]|a[g>>>12&15]|o[g>>>8&15]|s[g>>>4&15],b=c[E>>>28]|u[E>>>24&15]|h[E>>>20&15]|l[E>>>16&15]|f[E>>>12&15]|d[E>>>8&15]|p[E>>>4&15],w=65535&(b>>>16^m),A[I++]=m^w,A[I++]=b^w<<16}return A}function Us(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(e){return Ps(Ms(this.key[2]),Ps(Ms(this.key[1]),Ps(Ms(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function Ds(){this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),e.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(let e=0;e<16;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>>16&255,t[a+6]=s>>>8&255,t[a+7]=255&s}return t},this.decrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>16&255,t[a+6]=s>>8&255,t[a+7]=255&s}return t};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function r(e,t,r){const n=t+e,i=n<>>32-r;return(a[0][i>>>24]^a[1][i>>>16&255])-a[2][i>>>8&255]+a[3][255&i]}function n(e,t,r){const n=t^e,i=n<>>32-r;return a[0][i>>>24]-a[1][i>>>16&255]+a[2][i>>>8&255]^a[3][255&i]}function i(e,t,r){const n=t-e,i=n<>>32-r;return(a[0][i>>>24]+a[1][i>>>16&255]^a[2][i>>>8&255])-a[3][255&i]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(r){const n=[,,,,,,,,],i=Array(32);let o;for(let e=0;e<4;e++)o=4*e,n[e]=r[o]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3];const s=[6,7,4,5];let c,u=0;for(let r=0;r<2;r++)for(let r=0;r<4;r++){for(o=0;o<4;o++){const t=e[r][o];c=n[t[1]],c^=a[4][n[t[2]>>>2]>>>24-8*(3&t[2])&255],c^=a[5][n[t[3]>>>2]>>>24-8*(3&t[3])&255],c^=a[6][n[t[4]>>>2]>>>24-8*(3&t[4])&255],c^=a[7][n[t[5]>>>2]>>>24-8*(3&t[5])&255],c^=a[s[o]][n[t[6]>>>2]>>>24-8*(3&t[6])&255],n[t[0]]=c}for(o=0;o<4;o++){const e=t[r][o];c=a[4][n[e[0]>>>2]>>>24-8*(3&e[0])&255],c^=a[5][n[e[1]>>>2]>>>24-8*(3&e[1])&255],c^=a[6][n[e[2]>>>2]>>>24-8*(3&e[2])&255],c^=a[7][n[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=a[4+o][n[e[4]>>>2]>>>24-8*(3&e[4])&255],i[u]=c,u++}}for(let e=0;e<16;e++)this.masking[e]=i[e],this.rotate[e]=31&i[16+e]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Rs(e){this.cast5=new Ds,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}Us.keySize=Us.prototype.keySize=24,Us.blockSize=Us.prototype.blockSize=8,Rs.blockSize=Rs.prototype.blockSize=8,Rs.keySize=Rs.prototype.keySize=16;const Fs=4294967295;function Ts(e,t){return(e<>>32-t)&Fs}function qs(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Os(e,t,r){e.splice(t,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function Ks(e,t){return e>>>8*t&255}function Hs(e){this.tf=function(){let e=null,t=null,r=-1,n=[],i=[[],[],[],[]];function a(e){return i[0][Ks(e,0)]^i[1][Ks(e,1)]^i[2][Ks(e,2)]^i[3][Ks(e,3)]}function o(e){return i[0][Ks(e,3)]^i[1][Ks(e,0)]^i[2][Ks(e,1)]^i[3][Ks(e,2)]}function s(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Ts(t[2]^r+i+n[4*e+8]&Fs,31),t[3]=Ts(t[3],1)^r+2*i+n[4*e+9]&Fs,r=a(t[2]),i=o(t[3]),t[0]=Ts(t[0]^r+i+n[4*e+10]&Fs,31),t[1]=Ts(t[1],1)^r+2*i+n[4*e+11]&Fs}function c(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Ts(t[2],1)^r+i+n[4*e+10]&Fs,t[3]=Ts(t[3]^r+2*i+n[4*e+11]&Fs,31),r=a(t[2]),i=o(t[3]),t[0]=Ts(t[0],1)^r+i+n[4*e+8]&Fs,t[1]=Ts(t[1]^r+2*i+n[4*e+9]&Fs,31)}return{name:"twofish",blocksize:16,open:function(t){let r,a,o,s,c;e=t;const u=[],h=[],l=[];let f;const d=[];let p,g,A;const y=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],m=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],b=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],w=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],v=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],I=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],E=[[],[]],B=[[],[],[],[]];function C(e){return e^e>>2^[0,90,180,238][3&e]}function _(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function k(e,t){let r,n,i;for(r=0;r<8;r++)n=t>>>24,t=t<<8&Fs|e>>>24,e=e<<8&Fs,i=n<<1,128&n&&(i^=333),t^=n^i<<16,i^=n>>>1,1&n&&(i^=166),t^=i<<24|i<<8;return t}function S(e,t){const r=t>>4,n=15&t,i=y[e][r^n],a=m[e][v[n]^I[r]];return w[e][v[a]^I[i]]<<4|b[e][i^a]}function Q(e,t){let r=Ks(e,0),n=Ks(e,1),i=Ks(e,2),a=Ks(e,3);switch(f){case 4:r=E[1][r]^Ks(t[3],0),n=E[0][n]^Ks(t[3],1),i=E[0][i]^Ks(t[3],2),a=E[1][a]^Ks(t[3],3);case 3:r=E[1][r]^Ks(t[2],0),n=E[1][n]^Ks(t[2],1),i=E[0][i]^Ks(t[2],2),a=E[0][a]^Ks(t[2],3);case 2:r=E[0][E[0][r]^Ks(t[1],0)]^Ks(t[0],0),n=E[0][E[1][n]^Ks(t[1],1)]^Ks(t[0],1),i=E[1][E[0][i]^Ks(t[1],2)]^Ks(t[0],2),a=E[1][E[1][a]^Ks(t[1],3)]^Ks(t[0],3)}return B[0][r]^B[1][n]^B[2][i]^B[3][a]}for(e=e.slice(0,32),r=e.length;16!==r&&24!==r&&32!==r;)e[r++]=0;for(r=0;r>2]=qs(e,r);for(r=0;r<256;r++)E[0][r]=S(0,r),E[1][r]=S(1,r);for(r=0;r<256;r++)p=E[1][r],g=C(p),A=_(p),B[0][r]=p+(g<<8)+(A<<16)+(A<<24),B[2][r]=g+(A<<8)+(p<<16)+(A<<24),p=E[0][r],g=C(p),A=_(p),B[1][r]=A+(A<<8)+(g<<16)+(p<<24),B[3][r]=g+(p<<8)+(A<<16)+(g<<24);for(f=l.length/2,r=0;r=0;e--)c(e,a);Os(t,r,a[2]^n[0]),Os(t,r+4,a[3]^n[1]),Os(t,r+8,a[0]^n[2]),Os(t,r+12,a[1]^n[3]),r+=16},finalize:function(){return t}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}function Ns(){}function Ls(e){this.bf=new Ns,this.bf.init(e),this.encrypt=function(e){return this.bf.encryptBlock(e)}}Hs.keySize=Hs.prototype.keySize=32,Hs.blockSize=Hs.prototype.blockSize=16,Ns.prototype.BLOCKSIZE=8,Ns.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Ns.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Ns.prototype.NN=16,Ns.prototype._clean=function(e){return e<0&&(e=2147483648+(2147483647&e)),e},Ns.prototype._F=function(e){let t;const r=255&e,n=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][n],t+=this.sboxes[3][r],t},Ns.prototype._encryptBlock=function(e){let t,r=e[0],n=e[1];for(t=0;t>>24-8*t&255,i[t+n]=r[1]>>>24-8*t&255;return i},Ns.prototype._decryptBlock=function(e){let t,r=e[0],n=e[1];for(t=this.NN+1;t>1;--t){r^=this.parray[t],n=this._F(r)^n;const e=r;r=n,n=e}r^=this.parray[1],n^=this.parray[0],e[0]=this._clean(n),e[1]=this._clean(r)},Ns.prototype.init=function(e){let t,r=0;for(this.parray=[],t=0;t=e.length&&(r=0);this.parray[t]=this.PARRAY[t]^n}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],r=0;r<256;++r)this.sboxes[t][r]=this.SBOXES[t][r];const n=[0,0];for(t=0;t>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=t+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2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e|12]<<24|w[e|13]<<16|w[e|14]<<8|w[e|15],w[e|16]<<24|w[e|17]<<16|w[e|18]<<8|w[e|19],w[e|20]<<24|w[e|21]<<16|w[e|22]<<8|w[e|23],w[e|24]<<24|w[e|25]<<16|w[e|26]<<8|w[e|27],w[e|28]<<24|w[e|29]<<16|w[e|30]<<8|w[e|31],w[e|32]<<24|w[e|33]<<16|w[e|34]<<8|w[e|35],w[e|36]<<24|w[e|37]<<16|w[e|38]<<8|w[e|39],w[e|40]<<24|w[e|41]<<16|w[e|42]<<8|w[e|43],w[e|44]<<24|w[e|45]<<16|w[e|46]<<8|w[e|47],w[e|48]<<24|w[e|49]<<16|w[e|50]<<8|w[e|51],w[e|52]<<24|w[e|53]<<16|w[e|54]<<8|w[e|55],w[e|56]<<24|w[e|57]<<16|w[e|58]<<8|w[e|59],w[e|60]<<24|w[e|61]<<16|w[e|62]<<8|w[e|63])}function E(e){e=e|0;w[e|0]=n>>>24;w[e|1]=n>>>16&255;w[e|2]=n>>>8&255;w[e|3]=n&255;w[e|4]=i>>>24;w[e|5]=i>>>16&255;w[e|6]=i>>>8&255;w[e|7]=i&255;w[e|8]=a>>>24;w[e|9]=a>>>16&255;w[e|10]=a>>>8&255;w[e|11]=a&255;w[e|12]=o>>>24;w[e|13]=o>>>16&255;w[e|14]=o>>>8&255;w[e|15]=o&255;w[e|16]=s>>>24;w[e|17]=s>>>16&255;w[e|18]=s>>>8&255;w[e|19]=s&255}function B(){n=0x67452301;i=0xefcdab89;a=0x98badcfe;o=0x10325476;s=0xc3d2e1f0;c=u=0}function C(e,t,r,h,l,f,d){e=e|0;t=t|0;r=r|0;h=h|0;l=l|0;f=f|0;d=d|0;n=e;i=t;a=r;o=h;s=l;c=f;u=d}function _(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){I(e);e=e+64|0;t=t-64|0;r=r+64|0}c=c+r|0;if(c>>>0>>0)u=u+1|0;return r|0}function k(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=_(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;c=c+t|0;if(c>>>0>>0)u=u+1|0;w[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)w[e|i]=0x00;I(e);t=0;w[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)w[e|i]=0;w[e|56]=u>>>21&255;w[e|57]=u>>>13&255;w[e|58]=u>>>5&255;w[e|59]=u<<3&255|c>>>29;w[e|60]=c>>>21&255;w[e|61]=c>>>13&255;w[e|62]=c>>>5&255;w[e|63]=c<<3&255;I(e);if(~r)E(r);return n|0}function S(){n=h;i=l;a=f;o=d;s=p;c=64;u=0}function Q(){n=g;i=A;a=y;o=m;s=b;c=64;u=0}function x(e,t,r,w,I,E,C,_,k,S,Q,x,P,M,U,D){e=e|0;t=t|0;r=r|0;w=w|0;I=I|0;E=E|0;C=C|0;_=_|0;k=k|0;S=S|0;Q=Q|0;x=x|0;P=P|0;M=M|0;U=U|0;D=D|0;B();v(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,w^0x5c5c5c5c,I^0x5c5c5c5c,E^0x5c5c5c5c,C^0x5c5c5c5c,_^0x5c5c5c5c,k^0x5c5c5c5c,S^0x5c5c5c5c,Q^0x5c5c5c5c,x^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,U^0x5c5c5c5c,D^0x5c5c5c5c);g=n;A=i;y=a;m=o;b=s;B();v(e^0x36363636,t^0x36363636,r^0x36363636,w^0x36363636,I^0x36363636,E^0x36363636,C^0x36363636,_^0x36363636,k^0x36363636,S^0x36363636,Q^0x36363636,x^0x36363636,P^0x36363636,M^0x36363636,U^0x36363636,D^0x36363636);h=n;l=i;f=a;d=o;p=s;c=64;u=0}function P(e,t,r){e=e|0;t=t|0;r=r|0;var c=0,u=0,h=0,l=0,f=0,d=0;if(e&63)return-1;if(~r)if(r&31)return-1;d=k(e,t,-1)|0;c=n,u=i,h=a,l=o,f=s;Q();v(c,u,h,l,f,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~r)E(r);return d|0}function M(e,t,r,c,u){e=e|0;t=t|0;r=r|0;c=c|0;u=u|0;var h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~u)if(u&31)return-1;w[e+t|0]=r>>>24;w[e+t+1|0]=r>>>16&255;w[e+t+2|0]=r>>>8&255;w[e+t+3|0]=r&255;P(e,t+4|0,-1)|0;h=g=n,l=A=i,f=y=a,d=m=o,p=b=s;c=c-1|0;while((c|0)>0){S();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;Q();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;h=h^n;l=l^i;f=f^a;d=d^o;p=p^s;c=c-1|0}n=h;i=l;a=f;o=d;s=p;if(~u)E(u);return 0}return{reset:B,init:C,process:_,finish:k,hmac_reset:S,hmac_init:x,hmac_finish:P,pbkdf2_generate_block:M}};class Js{constructor(){this.pos=0,this.len=0}reset(){const{asm:e}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,e.reset(),this}process(e){if(null!==this.result)throw new Es("state must be reset before processing new data");const{asm:t,heap:r}=this.acquire_asm();let n=this.pos,i=this.len,a=0,o=e.length,s=0;for(;o>0;)s=vs(r,n+i,e,a,o),i+=s,a+=s,o-=s,s=t.process(n,i),n+=s,i-=s,i||(n=0);return this.pos=n,this.len=i,this}finish(){if(null!==this.result)throw new Es("state must be reset before processing new data");const{asm:e,heap:t}=this.acquire_asm();return e.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(t.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const Vs=[],Ys=[];class $s extends Js{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Vs.pop()||ws(),this.asm=Ys.pop()||Zs({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Vs.push(this.heap),Ys.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new $s).process(e).finish().result}}$s.NAME="sha1",$s.heap_pool=[],$s.asm_pool=[],$s.asm_function=Zs;const Xs=[],ec=[];class tc extends Js{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Xs.pop()||ws(),this.asm=ec.pop()||function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0,Q=new e.Uint8Array(r);function x(e,t,r,l,f,d,p,g,A,y,m,b,w,v,I,E){e=e|0;t=t|0;r=r|0;l=l|0;f=f|0;d=d|0;p=p|0;g=g|0;A=A|0;y=y|0;m=m|0;b=b|0;w=w|0;v=v|0;I=I|0;E=E|0;var B=0,C=0,_=0,k=0,S=0,Q=0,x=0,P=0;B=n;C=i;_=a;k=o;S=s;Q=c;x=u;P=h;P=e+P+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(x^S&(Q^x))+0x428a2f98|0;k=k+P|0;P=P+(B&C^_&(B^C))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0;x=t+x+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(Q^k&(S^Q))+0x71374491|0;_=_+x|0;x=x+(P&B^C&(P^B))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;Q=r+Q+(_>>>6^_>>>11^_>>>25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|26]=u>>>8&255;Q[e|27]=u&255;Q[e|28]=h>>>24;Q[e|29]=h>>>16&255;Q[e|30]=h>>>8&255;Q[e|31]=h&255}function U(){n=0x6a09e667;i=0xbb67ae85;a=0x3c6ef372;o=0xa54ff53a;s=0x510e527f;c=0x9b05688c;u=0x1f83d9ab;h=0x5be0cd19;l=f=0}function D(e,t,r,d,p,g,A,y,m,b){e=e|0;t=t|0;r=r|0;d=d|0;p=p|0;g=g|0;A=A|0;y=y|0;m=m|0;b=b|0;n=e;i=t;a=r;o=d;s=p;c=g;u=A;h=y;l=m;f=b}function R(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){P(e);e=e+64|0;t=t-64|0;r=r+64|0}l=l+r|0;if(l>>>0>>0)f=f+1|0;return r|0}function F(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=R(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;l=l+t|0;if(l>>>0>>0)f=f+1|0;Q[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)Q[e|i]=0x00;P(e);t=0;Q[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)Q[e|i]=0;Q[e|56]=f>>>21&255;Q[e|57]=f>>>13&255;Q[e|58]=f>>>5&255;Q[e|59]=f<<3&255|l>>>29;Q[e|60]=l>>>21&255;Q[e|61]=l>>>13&255;Q[e|62]=l>>>5&255;Q[e|63]=l<<3&255;P(e);if(~r)M(r);return n|0}function T(){n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;l=64;f=0}function q(){n=v;i=I;a=E;o=B;s=C;c=_;u=k;h=S;l=64;f=0}function O(e,t,r,Q,P,M,D,R,F,T,q,O,K,H,N,L){e=e|0;t=t|0;r=r|0;Q=Q|0;P=P|0;M=M|0;D=D|0;R=R|0;F=F|0;T=T|0;q=q|0;O=O|0;K=K|0;H=H|0;N=N|0;L=L|0;U();x(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,Q^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,D^0x5c5c5c5c,R^0x5c5c5c5c,F^0x5c5c5c5c,T^0x5c5c5c5c,q^0x5c5c5c5c,O^0x5c5c5c5c,K^0x5c5c5c5c,H^0x5c5c5c5c,N^0x5c5c5c5c,L^0x5c5c5c5c);v=n;I=i;E=a;B=o;C=s;_=c;k=u;S=h;U();x(e^0x36363636,t^0x36363636,r^0x36363636,Q^0x36363636,P^0x36363636,M^0x36363636,D^0x36363636,R^0x36363636,F^0x36363636,T^0x36363636,q^0x36363636,O^0x36363636,K^0x36363636,H^0x36363636,N^0x36363636,L^0x36363636);d=n;p=i;g=a;A=o;y=s;m=c;b=u;w=h;l=64;f=0}function K(e,t,r){e=e|0;t=t|0;r=r|0;var l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~r)if(r&31)return-1;b=F(e,t,-1)|0;l=n,f=i,d=a,p=o,g=s,A=c,y=u,m=h;q();x(l,f,d,p,g,A,y,m,0x80000000,0,0,0,0,0,0,768);if(~r)M(r);return b|0}function H(e,t,r,l,f){e=e|0;t=t|0;r=r|0;l=l|0;f=f|0;var d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0;if(e&63)return-1;if(~f)if(f&31)return-1;Q[e+t|0]=r>>>24;Q[e+t+1|0]=r>>>16&255;Q[e+t+2|0]=r>>>8&255;Q[e+t+3|0]=r&255;K(e,t+4|0,-1)|0;d=v=n,p=I=i,g=E=a,A=B=o,y=C=s,m=_=c,b=k=u,w=S=h;l=l-1|0;while((l|0)>0){T();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;q();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;d=d^n;p=p^i;g=g^a;A=A^o;y=y^s;m=m^c;b=b^u;w=w^h;l=l-1|0}n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;if(~f)M(f);return 0}return{reset:U,init:D,process:R,finish:F,hmac_reset:T,hmac_init:O,hmac_finish:K,pbkdf2_generate_block:H}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Xs.push(this.heap),ec.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new tc).process(e).finish().result}}tc.NAME="sha256";var rc=nc;function nc(e,t){if(!e)throw Error(t||"Assertion failed")}nc.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var ic=void 0!==so?so:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ac(e,t){return e(t={exports:{}},t.exports),t.exports}function oc(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var sc=ac((function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}));function cc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function uc(e){return 1===e.length?"0"+e:e}function hc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var lc={inherits:sc,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return a},split32:function(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,n){return e+t+r+n>>>0},sum32_5:function(e,t,r,n,i){return e+t+r+n+i>>>0},sum64:function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},sum64_hi:function(e,t,r,n){return(t+n>>>0>>0},sum64_lo:function(e,t,r,n){return t+n>>>0},sum64_4_hi:function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},sum64_5_hi:function(e,t,r,n,i,a,o,s,c,u){var h=0,l=t;return h+=(l=l+n>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function fc(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var dc=fc;fc.prototype.update=function(e,t){if(e=lc.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=lc.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a>>3},Cc=function(e){return gc(e,17)^gc(e,19)^e>>>10},_c=lc.sum32,kc=lc.sum32_4,Sc=lc.sum32_5,Qc=wc,xc=vc,Pc=Ic,Mc=Ec,Uc=Bc,Dc=Cc,Rc=pc.BlockHash,Fc=[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];function Tc(){if(!(this instanceof Tc))return new Tc;Rc.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Fc,this.W=Array(64)}lc.inherits(Tc,Rc);var qc=Tc;function Oc(){if(!(this instanceof Oc))return new Oc;qc.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Tc.blockSize=512,Tc.outSize=256,Tc.hmacStrength=192,Tc.padLength=64,Tc.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>>32-i,r)}function Uu(e,t,r,n,i,a,o){return Mu(t&r|~t&n,e,t,i,a,o)}function Du(e,t,r,n,i,a,o){return Mu(t&n|r&~n,e,t,i,a,o)}function Ru(e,t,r,n,i,a,o){return Mu(t^r^n,e,t,i,a,o)}function Fu(e,t,r,n,i,a,o){return Mu(r^(t|~n),e,t,i,a,o)}function Tu(e){const t=[];let r;for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}const qu="0123456789abcdef".split("");function Ou(e){let t="",r=0;for(;r<4;r++)t+=qu[e>>8*r+4&15]+qu[e>>8*r&15];return t}function Ku(e,t){return e+t&4294967295}const Hu=Xo.getWebCrypto(),Nu=Xo.getNodeCrypto(),Lu=Nu&&Nu.getHashes();function Gu(e){if(Nu&&Lu.includes(e))return async function(t){const r=Nu.createHash(e);return Ho(t,(e=>{r.update(e)}),(()=>new Uint8Array(r.digest())))}}function ju(e,t){return async function(r,n=ss){if(po(r)&&(r=await Wo(r)),!Xo.isStream(r)&&Hu&&t&&r.length>=n.minBytesForWebCrypto)return new Uint8Array(await Hu.digest(t,r));const i=e();return Ho(r,(e=>{i.update(e)}),(()=>new Uint8Array(i.digest())))}}function zu(e,t){return async function(r,n=ss){if(po(r)&&(r=await Wo(r)),Xo.isStream(r)){const t=new e;return Ho(r,(e=>{t.process(e)}),(()=>t.finish().result))}return Hu&&t&&r.length>=n.minBytesForWebCrypto?new Uint8Array(await Hu.digest(t,r)):e.bytes(r)}}const Wu={md5:Gu("md5")||async function(e){const t=function(e){const t=e.length,r=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)Pu(r,Tu(e.substring(n-64,n)));e=e.substring(n-64);const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n>2]|=e.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(Pu(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*t,Pu(r,i),r}(Xo.uint8ArrayToString(e));return Xo.hexToUint8Array(function(e){for(let t=0;tnew Uint8Array(a.update(e))))}(e,t,r,n);if(Xo.isAES(e))return function(e,t,r,n,i){if(Xo.getWebCrypto()&&24!==t.length&&!Xo.isStream(r)&&r.length>=3e3*i.minBytesForWebCrypto)return async function(e,t,r,n){const i="AES-CBC",a=await Yu.importKey("raw",t,{name:i},!1,["encrypt"]),{blockSize:o}=Vu(e),s=Xo.concatUint8Array([new Uint8Array(o),r]),c=new Uint8Array(await Yu.encrypt({name:i,iv:n},a,s)).subarray(0,r.length);return function(e,t){for(let r=0;ra.aes.AES_Encrypt_process(e)),(()=>a.aes.AES_Encrypt_finish()))}(e,t,r,n,i);const o=new(Vu(e))(t),s=o.blockSize,c=n.slice();let u=new Uint8Array;const h=e=>{e&&(u=Xo.concatUint8Array([u,e]));const t=new Uint8Array(u.length);let r,n=0;for(;e?u.length>=s:u.length;){const e=o.encrypt(c);for(r=0;rnew Uint8Array(a.update(e))))}(e,t,r,n);if(Xo.isAES(e))return function(e,t,r,n){if(Xo.isStream(r)){const e=new Ju(t,n);return Ho(r,(t=>e.aes.AES_Decrypt_process(t)),(()=>e.aes.AES_Decrypt_finish()))}return Ju.decrypt(r,t,n)}(0,t,r,n);const a=new(Vu(e))(t),o=a.blockSize;let s=n,c=new Uint8Array;const u=e=>{e&&(c=Xo.concatUint8Array([c,e]));const t=new Uint8Array(c.length);let r,n=0;for(;e?c.length>=o:c.length;){const e=a.encrypt(s);for(s=c.subarray(0,o),r=0;r48)throw new Bs("illegal counter size");let e=Math.pow(2,r)-1;n.set_mask(0,0,e/4294967296|0,0|e)}else r=48,n.set_mask(0,0,65535,4294967295);if(void 0===e)throw Error("nonce is required");{let t=e.length;if(!t||t>16)throw new Bs("illegal nonce size");let r=new DataView(new ArrayBuffer(16));new Uint8Array(r.buffer).set(e),n.set_nonce(r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12))}if(void 0!==t){if(t<0||t>=Math.pow(2,r))throw new Bs("illegal counter value");n.set_counter(0,0,t/4294967296|0,0|t)}}}class nh{static encrypt(e,t,r=!0,n){return new nh(t,n,r).encrypt(e)}static decrypt(e,t,r=!0,n){return new nh(t,n,r).decrypt(e)}constructor(e,t,r=!0,n){this.aes=n||new Ss(e,t,r,"CBC")}encrypt(e){return Is(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Is(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}const ih=Xo.getWebCrypto(),ah=Xo.getNodeCrypto(),oh=16;function sh(e,t){const r=e.length-oh;for(let n=0;n>3),17+(u>>3)),8-(7&u)).subarray(1),d=new Uint8Array(vh),p=new Uint8Array(t.length+Ih);let g,A=0;for(g=0;g16)throw new Bs("illegal tagSize value");const s=t.length||0,c=new Uint8Array(16);12!==s?(this._gcm_mac_process(t),o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=s>>>29,o[12]=s>>>21&255,o[13]=s>>>13&255,o[14]=s>>>5&255,o[15]=s<<3&255,a.mac(ms.MAC.GCM,ms.HEAP_DATA,16),a.get_iv(ms.HEAP_DATA),a.set_iv(0,0,0,0),c.set(o.subarray(0,16))):(c.set(t),c[15]=1);const u=new DataView(c.buffer);if(this.gamma0=u.getUint32(12),a.set_nonce(u.getUint32(0),u.getUint32(4),u.getUint32(8),0),a.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>Qh)throw new Bs("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");a.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(e,t,r,n,i){return new xh(t,r,n,i).encrypt(e)}static decrypt(e,t,r,n,i){return new xh(t,r,n,i).decrypt(e)}encrypt(e){return this.AES_GCM_encrypt(e)}decrypt(e){return this.AES_GCM_decrypt(e)}AES_GCM_Encrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.aes.pos,s=this.aes.len,c=0,u=s+r&-16,h=0;if((a-1<<4)+s+r>Qh)throw new RangeError("counter overflow");const l=new Uint8Array(u);for(;r>0;)h=vs(i,o+s,e,t,r),s+=h,t+=h,r-=h,h=n.cipher(ms.ENC.CTR,ms.HEAP_DATA+o,s),h=n.mac(ms.MAC.GCM,ms.HEAP_DATA+o,h),h&&l.set(i.subarray(o,o+h),c),a+=h>>>4,c+=h,h>>29,t[4]=u>>>21,t[5]=u>>>13&255,t[6]=u>>>5&255,t[7]=u<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(ms.MAC.GCM,ms.HEAP_DATA,16),e.get_iv(ms.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ms.ENC.CTR,ms.HEAP_DATA,16),s.set(t.subarray(0,n),o),this.counter=1,this.aes.pos=0,this.aes.len=0,s}AES_GCM_Decrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.tagSize,s=this.aes.pos,c=this.aes.len,u=0,h=c+r>o?c+r-o&-16:0,l=c+r-h,f=0;if((a-1<<4)+c+r>Qh)throw new RangeError("counter overflow");const d=new Uint8Array(h);for(;r>l;)f=vs(i,s+c,e,t,r-l),c+=f,t+=f,r-=f,f=n.mac(ms.MAC.GCM,ms.HEAP_DATA+s,f),f=n.cipher(ms.DEC.CTR,ms.HEAP_DATA+s,f),f&&d.set(i.subarray(s,s+f),u),a+=f>>>4,u+=f,s=0,c=0;return r>0&&(c+=vs(i,0,e,t,r)),this.counter=a,this.aes.pos=s,this.aes.len=c,d}AES_GCM_Decrypt_finish(){let{asm:e,heap:t}=this.aes.acquire_asm(),r=this.tagSize,n=this.adata,i=this.counter,a=this.aes.pos,o=this.aes.len,s=o-r;if(o>>29,t[4]=l>>>21,t[5]=l>>>13&255,t[6]=l>>>5&255,t[7]=l<<3&255,t[8]=t[9]=t[10]=0,t[11]=f>>>29,t[12]=f>>>21&255,t[13]=f>>>13&255,t[14]=f>>>5&255,t[15]=f<<3&255,e.mac(ms.MAC.GCM,ms.HEAP_DATA,16),e.get_iv(ms.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ms.ENC.CTR,ms.HEAP_DATA,16);let d=0;for(let e=0;e0;){for(a=vs(r,0,e,n,i),n+=a,i-=a;15&a;)r[a++]=0;t.mac(ms.MAC.GCM,ms.HEAP_DATA,a)}}}const Ph=Xo.getWebCrypto(),Mh=Xo.getNodeCrypto(),Uh=Xo.getNodeBuffer(),Dh=16,Rh="AES-GCM";async function Fh(e,t){if(e!==Yo.symmetric.aes128&&e!==Yo.symmetric.aes192&&e!==Yo.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Xo.getNodeCrypto())return{encrypt:async function(e,r,n=new Uint8Array){const i=new Mh.createCipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n);const a=Uh.concat([i.update(e),i.final(),i.getAuthTag()]);return new Uint8Array(a)},decrypt:async function(e,r,n=new Uint8Array){const i=new Mh.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n),i.setAuthTag(e.slice(e.length-Dh,e.length));const a=Uh.concat([i.update(e.slice(0,e.length-Dh)),i.final()]);return new Uint8Array(a)}};if(Xo.getWebCrypto()&&24!==t.length){const e=await Ph.importKey("raw",t,{name:Rh},!1,["encrypt","decrypt"]);return{encrypt:async function(r,n,i=new Uint8Array){if(!r.length)return xh.encrypt(r,t,n,i);const a=await Ph.encrypt({name:Rh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)},decrypt:async function(r,n,i=new Uint8Array){if(r.length===Dh)return xh.decrypt(r,t,n,i);const a=await Ph.decrypt({name:Rh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)}}}return{encrypt:async function(e,r,n){return xh.encrypt(e,t,r,n)},decrypt:async function(e,r,n){return xh.decrypt(e,t,r,n)}}}Fh.getNonce=function(e,t){const r=e.slice();for(let e=0;e>>8)-1}(e,t,r,n)}function d(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function p(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function g(e,t,r){for(var n,i=~(r-1),a=0;a<16;a++)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function A(e,r){var n,i,a,o=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(p(s),p(s),p(s),i=0;i<2;i++){for(o[0]=s[0]-65517,n=1;n<15;n++)o[n]=s[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,g(s,o,1-a)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function y(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return A(r,e),A(n,t),f(r,0,n,0)}function m(e){var t=new Uint8Array(32);return A(t,e),1&t[0]}function b(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function w(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function v(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function I(e,t,r){var n,i,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0,Q=0,x=0,P=0,M=0,U=0,D=0,R=0,F=r[0],T=r[1],q=r[2],O=r[3],K=r[4],H=r[5],N=r[6],L=r[7],G=r[8],j=r[9],z=r[10],W=r[11],Z=r[12],J=r[13],V=r[14],Y=r[15];a+=(n=t[0])*F,o+=n*T,s+=n*q,c+=n*O,u+=n*K,h+=n*H,l+=n*N,f+=n*L,d+=n*G,p+=n*j,g+=n*z,A+=n*W,y+=n*Z,m+=n*J,b+=n*V,w+=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=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=h,e[6]=l,e[7]=f,e[8]=d,e[9]=p,e[10]=g,e[11]=A,e[12]=y,e[13]=m,e[14]=b,e[15]=w}function E(e,t){I(e,t,t)}function B(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)E(i,i),2!==n&&4!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function C(e,r,n){var i,a,s=new Uint8Array(32),c=new Float64Array(80),u=t(),h=t(),l=t(),f=t(),d=t(),p=t();for(a=0;a<31;a++)s[a]=r[a];for(s[31]=127&r[31]|64,s[0]&=248,b(c,n),a=0;a<16;a++)h[a]=c[a],f[a]=u[a]=l[a]=0;for(u[0]=f[0]=1,a=254;a>=0;--a)g(u,h,i=s[a>>>3]>>>(7&a)&1),g(l,f,i),w(d,u,l),v(u,u,l),w(l,h,f),v(h,h,f),E(f,d),E(p,u),I(u,l,u),I(l,h,d),w(d,u,l),v(u,u,l),E(h,u),v(l,f,p),I(u,l,o),w(u,u,f),I(l,l,u),I(u,f,p),I(f,h,c),E(h,d),g(u,h,i),g(l,f,i);for(a=0;a<16;a++)c[a+16]=u[a],c[a+32]=l[a],c[a+48]=h[a],c[a+64]=f[a];var y=c.subarray(32),m=c.subarray(16);return B(y,y),I(m,m,y),A(e,m),0}function _(e,t){return C(e,t,n)}function k(e,r){var n=t(),i=t(),a=t(),o=t(),s=t(),u=t(),h=t(),l=t(),f=t();v(n,e[1],e[0]),v(f,r[1],r[0]),I(n,n,f),w(i,e[0],e[1]),w(f,r[0],r[1]),I(i,i,f),I(a,e[3],r[3]),I(a,a,c),I(o,e[2],r[2]),w(o,o,o),v(s,i,n),v(u,o,a),w(h,o,a),w(l,i,n),I(e[0],s,u),I(e[1],l,h),I(e[2],h,u),I(e[3],s,l)}function S(e,t,r){var n;for(n=0;n<4;n++)g(e[n],t[n],r)}function Q(e,r){var n=t(),i=t(),a=t();B(a,r[2]),I(n,r[0],a),I(i,r[1],a),A(e,i),e[31]^=m(n)<<7}function x(e,t,r){var n,o;for(d(e[0],i),d(e[1],a),d(e[2],a),d(e[3],i),o=255;o>=0;--o)S(e,t,n=r[o/8|0]>>(7&o)&1),k(t,e),k(e,e),S(e,t,n)}function P(e,r){var n=[t(),t(),t(),t()];d(n[0],u),d(n[1],h),d(n[2],a),I(n[3],u,h),x(e,n,r)}function M(n,i,a){var o,s,c=[t(),t(),t(),t()];for(a||r(i,32),(o=e.hash(i.subarray(0,32)))[0]&=248,o[31]&=127,o[31]|=64,P(c,o),Q(n,c),s=0;s<32;s++)i[s+32]=n[s];return 0}var U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function D(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i>4)*U[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*U[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function R(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;D(e,r)}function F(e,r){var n=t(),o=t(),c=t(),u=t(),h=t(),f=t(),p=t();return d(e[2],a),b(e[1],r),E(c,e[1]),I(u,c,s),v(c,c,e[2]),w(u,e[2],u),E(h,u),E(f,h),I(p,f,h),I(n,p,c),I(n,n,u),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)E(i,i),1!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),I(n,n,c),I(n,n,u),I(n,n,u),I(e[0],n,u),E(o,e[0]),I(o,o,u),y(o,c)&&I(e[0],e[0],l),E(o,e[0]),I(o,o,u),y(o,c)?-1:(m(e[0])===r[31]>>7&&v(e[0],i,e[0]),I(e[3],e[0],e[1]),0)}var T=64;function q(){for(var e=0;e=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return M(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(q(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;re&&(c.imod(a.leftShift(i)).iadd(a),u=c.mod(o).toNumber())}while(!await Gh(c,t,r));return c}async function Gh(e,t,r){return!(t&&!e.dec().gcd(t).isOne()||!await async function(e){const t=await Xo.getBigInteger();return jh.every((r=>0!==e.mod(new t(r))))}(e)||!await async function(e,t){const r=await Xo.getBigInteger();return(t=t||new r(2)).modExp(e.dec(),e).isOne()}(e)||!await async function(e,t,r){const n=await Xo.getBigInteger(),i=e.bitLength();t||(t=Math.max(1,i/48|0));const a=e.dec();let o=0;for(;!a.getBit(o);)o++;const s=e.rightShift(new n(o));for(;t>0;t--){let t,r=(await Hh(new n(2),a)).modExp(s,e);if(!r.isOne()&&!r.equal(a)){for(t=1;tt-11)throw Error("Message too long");const n=function(e){const t=new Uint8Array(e);let r=0;for(;r=8&!n;if(t)return Xo.selectUint8Array(o,a,t);if(o)return a;throw Error("Decryption error")}async function Jh(e,t,r){let n;if(t.length!==Zu.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(zh[e].length);for(n=0;n{$h.generateKeyPair("rsa",r,((r,n,i)=>{r?t(r):e(el.decode(i,"der"))}))}));return{n:n.modulus.toArrayLike(Uint8Array),e:n.publicExponent.toArrayLike(Uint8Array),d:n.privateExponent.toArrayLike(Uint8Array),p:n.prime2.toArrayLike(Uint8Array),q:n.prime1.toArrayLike(Uint8Array),u:n.coefficient.toArrayLike(Uint8Array)}}let r,n,i;do{n=await Lh(e-(e>>1),t,40),r=await Lh(e>>1,t,40),i=r.mul(n)}while(i.bitLength()!==e);const a=r.dec().imul(n.dec());return n.lt(r)&&([r,n]=[n,r]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:r.toUint8Array(),q:n.toUint8Array(),u:r.modInv(n).toUint8Array()}},validateParams:async function(e,t,r,n,i,a){const o=await Xo.getBigInteger();if(e=new o(e),n=new o(n),i=new o(i),!n.mul(i).equal(e))return!1;const s=new o(2);if(a=new o(a),!n.mul(a).mod(i).isOne())return!1;t=new o(t),r=new o(r);const c=new o(Math.floor(e.bitLength()/3)),u=await Hh(s,s.leftShift(c)),h=u.mul(r).mul(t);return!(!h.mod(n.dec()).equal(u)||!h.mod(i.dec()).equal(u))}}),nl=Object.freeze({__proto__:null,encrypt:async function(e,t,r,n){const i=await Xo.getBigInteger();t=new i(t),r=new i(r),n=new i(n);const a=new i(Wh(e,t.byteLength())),o=await Hh(new i(1),t.dec());return{c1:r.modExp(o,t).toUint8Array(),c2:n.modExp(o,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,r,n,i){const a=await Xo.getBigInteger();return e=new a(e),t=new a(t),r=new a(r),n=new a(n),Zh(e.modExp(n,r).modInv(r).imul(t).imod(r).toUint8Array("be",r.byteLength()),i)},validateParams:async function(e,t,r,n){const i=await Xo.getBigInteger();e=new i(e),t=new i(t),r=new i(r);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const o=new i(e.bitLength()),s=new i(1023);if(o.lt(s))return!1;if(!t.modExp(e.dec(),e).isOne())return!1;let c=t;const u=new i(1),h=new i(2).leftShift(new i(17));for(;u.lt(h);){if(c=c.mul(t).imod(e),c.isOne())return!1;u.iinc()}n=new i(n);const l=new i(2),f=await Hh(l.leftShift(o.dec()),l.leftShift(o)),d=e.dec().imul(f).iadd(n);return!!r.equal(t.modExp(d,e))}});class il{constructor(e){if(e instanceof il)this.oid=e.oid;else if(Xo.isArray(e)||Xo.isUint8Array(e)){if(6===(e=new Uint8Array(e))[0]){if(e[1]!==e.length-2)throw Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.oid=e.subarray(1,1+t),1+this.oid.length}throw Error("Invalid oid")}write(){return Xo.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Xo.uint8ArrayToHex(this.oid)}getName(){const e=this.toHex();if(Yo.curve[e])return Yo.write(Yo.curve,e);throw Error("Unknown curve object identifier.")}}function al(e,t){return e.keyPair({priv:t})}function ol(e,t){const r=e.keyPair({pub:t});if(!0!==r.validate().result)throw Error("Invalid elliptic public key");return r}async function sl(e){if(!ss.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await Promise.resolve().then((function(){return Mb}));return new t.ec(e)}function cl(e){let t,r=0;const n=e[0];return n<192?([r]=e,t=1):n<255?(r=(e[0]-192<<8)+e[1]+192,t=2):255===n&&(r=Xo.readNumber(e.subarray(1,5)),t=5),{len:r,offset:t}}function ul(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Xo.concatUint8Array([new Uint8Array([255]),Xo.writeNumber(e,4)])}function hl(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function ll(e){return new Uint8Array([192|e])}function fl(e,t){return Xo.concatUint8Array([ll(e),ul(t)])}function dl(e){return[Yo.packet.literalData,Yo.packet.compressedData,Yo.packet.symmetricallyEncryptedData,Yo.packet.symEncryptedIntegrityProtectedData,Yo.packet.aeadEncryptedData].includes(e)}async function pl(e,t){const r=Fo(e);let n,i;try{const a=await r.peekBytes(2);if(!a||a.length<2||0==(128&a[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const o=await r.readByte();let s,c,u=-1,h=-1;h=0,0!=(64&o)&&(h=1),h?u=63&o:(u=(63&o)>>2,c=3&o);const l=dl(u);let f,d=null;if(l){if("array"===Xo.isStream(e)){const e=new fo;n=To(e),d=e}else{const e=new Po;n=To(e.writable),d=e.readable}i=t({tag:u,packet:d})}else d=[];do{if(h){const e=await r.readByte();if(f=!1,e<192)s=e;else if(e>=192&&e<224)s=(e-192<<8)+await r.readByte()+192;else if(e>223&&e<255){if(s=1<<(31&e),f=!0,!l)throw new TypeError("This packet type does not support partial lengths.")}else s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte()}else switch(c){case 0:s=await r.readByte();break;case 1:s=await r.readByte()<<8|await r.readByte();break;case 2:s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte();break;default:s=1/0}if(s>0){let e=0;for(;;){n&&await n.ready;const{done:t,value:i}=await r.read();if(t){if(s===1/0)break;throw Error("Unexpected end of packet")}const a=s===1/0?i:i.subarray(0,s-e);if(n?await n.write(a):d.push(a),e+=i.length,e>=s){r.unshift(i.subarray(s-e+i.length));break}}}}while(f);const p=await r.peekBytes(l?1/0:2);return n?(await n.ready,await n.close()):(d=Xo.concatUint8Array(d),await t({tag:u,packet:d})),!p||!p.length}catch(e){if(n)return await n.abort(e),!0;throw e}finally{n&&await i,r.releaseLock()}}class gl extends Error{constructor(...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,gl),this.name="UnsupportedError"}}class Al{constructor(e,t){this.tag=e,this.rawContent=t}write(){return this.rawContent}}const yl=Xo.getWebCrypto(),ml=Xo.getNodeCrypto(),bl={p256:"P-256",p384:"P-384",p521:"P-521"},wl=ml?ml.getCurves():[],vl=ml?{secp256k1:wl.includes("secp256k1")?"secp256k1":void 0,p256:wl.includes("prime256v1")?"prime256v1":void 0,p384:wl.includes("secp384r1")?"secp384r1":void 0,p521:wl.includes("secp521r1")?"secp521r1":void 0,ed25519:wl.includes("ED25519")?"ED25519":void 0,curve25519:wl.includes("X25519")?"X25519":void 0,brainpoolP256r1:wl.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:wl.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:wl.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Il={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:vl.p256,web:bl.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha384,cipher:Yo.symmetric.aes192,node:vl.p384,web:bl.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha512,cipher:Yo.symmetric.aes256,node:vl.p521,web:bl.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:vl.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:Yo.publicKey.eddsaLegacy,hash:Yo.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:Yo.publicKey.ecdh,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha256,cipher:Yo.symmetric.aes128,node:vl.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha384,cipher:Yo.symmetric.aes192,node:vl.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:Yo.publicKey.ecdsa,hash:Yo.hash.sha512,cipher:Yo.symmetric.aes256,node:vl.brainpoolP512r1,payloadSize:64}};class El{constructor(e,t){try{(Xo.isArray(e)||Xo.isUint8Array(e))&&(e=new il(e)),e instanceof il&&(e=e.getName()),this.name=Yo.write(Yo.curve,e)}catch(e){throw new gl("Unknown curve")}t=t||Il[this.name],this.keyType=t.keyType,this.oid=t.oid,this.hash=t.hash,this.cipher=t.cipher,this.node=t.node&&Il[this.name],this.web=t.web&&Il[this.name],this.payloadSize=t.payloadSize,this.web&&Xo.getWebCrypto()?this.type="web":this.node&&Xo.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let e;switch(this.type){case"web":try{return await async function(e){const t=await yl.generateKey({name:"ECDSA",namedCurve:bl[e]},!0,["sign","verify"]),r=await yl.exportKey("jwk",t.privateKey);return{publicKey:Cl(await yl.exportKey("jwk",t.publicKey)),privateKey:as(r.d)}}(this.name)}catch(e){Xo.printDebugError("Browser did not support generating ec key "+e.message);break}case"node":return async function(e){const t=ml.createECDH(vl[e]);return await t.generateKeys(),{publicKey:new Uint8Array(t.getPublicKey()),privateKey:new Uint8Array(t.getPrivateKey())}}(this.name);case"curve25519":{const t=Kh(32);t[0]=127&t[0]|64,t[31]&=248;const r=t.slice().reverse();return e=qh.box.keyPair.fromSecretKey(r),{publicKey:Xo.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:t}}case"ed25519":{const e=Kh(32),t=qh.sign.keyPair.fromSeed(e);return{publicKey:Xo.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:e}}}const t=await sl(this.name);return e=await t.genKeyPair({entropy:Xo.uint8ArrayToString(Kh(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}}}async function Bl(e,t,r,n){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===Yo.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if("curve25519"===a){n=n.slice().reverse();const{publicKey:e}=qh.box.keyPair.fromSecretKey(n);r=new Uint8Array(r);const t=new Uint8Array([64,...e]);return!!Xo.equalsUint8Array(t,r)}const o=await sl(a);try{r=ol(o,r).getPublic()}catch(e){return!1}return!!al(o,n).getPublic().eq(r)}function Cl(e){const t=as(e.x),r=as(e.y),n=new Uint8Array(t.length+r.length+1);return n[0]=4,n.set(t,1),n.set(r,t.length+1),n}function _l(e,t,r){const n=e,i=r.slice(1,n+1),a=r.slice(n+1,2*n+1);return{kty:"EC",crv:t,x:os(i,!0),y:os(a,!0),ext:!0}}function kl(e,t,r,n){const i=_l(e,t,r);return i.d=os(n,!0),i}const Sl=Xo.getWebCrypto(),Ql=Xo.getNodeCrypto();async function xl(e,t,r,n,i,a){const o=new El(e);if(r&&!Xo.isStream(r)){const a={publicKey:n,privateKey:i};switch(o.type){case"web":try{return await async function(e,t,r,n){const i=e.payloadSize,a=kl(e.payloadSize,bl[e.name],n.publicKey,n.privateKey),o=await Sl.importKey("jwk",a,{name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,e.hash)}},!1,["sign"]),s=new Uint8Array(await Sl.sign({name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,t)}},o,r));return{r:s.slice(0,i),s:s.slice(i,i<<1)}}(o,t,r,a)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;Xo.printDebugError("Browser did not support signing: "+e.message)}break;case"node":{const e=await async function(e,t,r,n){const i=Ql.createSign(Yo.read(Yo.hash,t));i.write(r),i.end();const a=Dl.encode({version:1,parameters:e.oid,privateKey:Array.from(n.privateKey),publicKey:{unused:0,data:Array.from(n.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return Ul.decode(i.sign(a),"der")}(o,t,r,a);return{r:e.r.toArrayLike(Uint8Array),s:e.s.toArrayLike(Uint8Array)}}}}return async function(e,t,r){const n=al(await sl(e.name),r).sign(t);return{r:n.r.toArrayLike(Uint8Array),s:n.s.toArrayLike(Uint8Array)}}(o,a,i)}async function Pl(e,t,r,n,i,a){const o=new El(e);if(n&&!Xo.isStream(n))switch(o.type){case"web":try{return await async function(e,t,{r:r,s:n},i,a){const o=_l(e.payloadSize,bl[e.name],a),s=await Sl.importKey("jwk",o,{name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,e.hash)}},!1,["verify"]),c=Xo.concatUint8Array([r,n]).buffer;return Sl.verify({name:"ECDSA",namedCurve:bl[e.name],hash:{name:Yo.read(Yo.webHash,t)}},s,c,i)}(o,t,r,n,i)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;Xo.printDebugError("Browser did not support verifying: "+e.message)}break;case"node":return async function(e,t,{r:r,s:n},i,a){const{default:o}=await Promise.resolve().then((function(){return dm})),s=Ql.createVerify(Yo.read(Yo.hash,t));s.write(i),s.end();const c=Fl.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:e.oid},subjectPublicKey:{unused:0,data:Array.from(a)}},"pem",{label:"PUBLIC KEY"}),u=Ul.encode({r:new o(r),s:new o(n)},"der");try{return s.verify(c,u)}catch(e){return!1}}(o,t,r,n,i)}return async function(e,t,r,n){return ol(await sl(e.name),n).verify(r,t)}(o,r,void 0===t?n:a,i)}const Ml=void 0,Ul=Ql?Ml.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,Dl=Ql?Ml.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())})):void 0,Rl=Ql?Ml.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,Fl=Ql?Ml.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Rl),this.key("subjectPublicKey").bitstr())})):void 0;var Tl=Object.freeze({__proto__:null,sign:xl,verify:Pl,validateParams:async function(e,t,r){const n=new El(e);if(n.keyType!==Yo.publicKey.ecdsa)return!1;switch(n.type){case"web":case"node":{const n=Kh(8),i=Yo.hash.sha256,a=await Zu.digest(i,n);try{const o=await xl(e,i,n,t,r,a);return await Pl(e,i,o,n,t,a)}catch(e){return!1}}default:return Bl(Yo.publicKey.ecdsa,e,t,r)}}});qh.hash=e=>new Uint8Array(tu().update(e).digest());var ql=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){if(Zu.getHashByteLength(t)new Uint8Array(tu().update(e).digest());var Kl=Object.freeze({__proto__:null,generate:async function(e){if(e===Yo.publicKey.ed25519){const e=Kh(32),{publicKey:t}=qh.sign.keyPair.fromSeed(e);return{A:t,seed:e}}throw Error("Unsupported EdDSA algorithm")},sign:async function(e,t,r,n,i,a){if(Zu.getHashByteLength(t)=0;--e)for(let t=s-1;t>=0;--t)c[1]=s*e+(t+1),u[0]=a[0]^c[0],u[1]=a[1]^c[1],u[2]=o[2*t],u[3]=o[2*t+1],u=Ll(r.decrypt(Gl(u))),a=u.subarray(0,2),o[2*t]=u[2],o[2*t+1]=u[3];if(a[0]===n[0]&&a[1]===n[1])return Gl(o);throw Error("Key Data Integrity failed")}function Ll(e){const{length:t}=e,r=function(e){if(Xo.isString(e)){const{length:t}=e,r=new ArrayBuffer(t),n=new Uint8Array(r);for(let r=0;r0){const r=e[t-1];if(r>=1){const n=e.subarray(t-r),i=new Uint8Array(r).fill(r);if(Xo.equalsUint8Array(n,i))return e.subarray(0,t-r)}}throw Error("Invalid padding")}var Zl=Object.freeze({__proto__:null,encode:zl,decode:Wl});const Jl=Xo.getWebCrypto(),Vl=Xo.getNodeCrypto();function Yl(e,t,r,n){return Xo.concatUint8Array([t.write(),new Uint8Array([e]),r.write(),Xo.stringToUint8Array("Anonymous Sender "),n.subarray(0,20)])}async function $l(e,t,r,n,i=!1,a=!1){let o;if(i){for(o=0;o=0&&0===t[o];o--);t=t.subarray(0,o+1)}return(await Zu.digest(e,Xo.concatUint8Array([new Uint8Array([0,0,0,1]),t,n]))).subarray(0,r)}async function Xl(e,t,r,n){if(n.length!==e.payloadSize){const t=new Uint8Array(e.payloadSize);t.set(n,e.payloadSize-n.length),n=t}switch(e.type){case"curve25519":{const e=n.slice().reverse();return{secretKey:e,sharedKey:qh.scalarMult(e,t.subarray(1))}}case"web":if(e.web&&Xo.getWebCrypto())try{return await async function(e,t,r,n){const i=kl(e.payloadSize,e.web.web,r,n);let a=Jl.importKey("jwk",i,{name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]);const o=_l(e.payloadSize,e.web.web,t);let s=Jl.importKey("jwk",o,{name:"ECDH",namedCurve:e.web.web},!0,[]);[a,s]=await Promise.all([a,s]);let c=Jl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:s},a,e.web.sharedSize),u=Jl.exportKey("jwk",a);[c,u]=await Promise.all([c,u]);const h=new Uint8Array(c);return{secretKey:as(u.d),sharedKey:h}}(e,t,r,n)}catch(e){Xo.printDebugError(e)}break;case"node":return async function(e,t,r){const n=Vl.createECDH(e.node.node);n.setPrivateKey(r);const i=new Uint8Array(n.computeSecret(t));return{secretKey:new Uint8Array(n.getPrivateKey()),sharedKey:i}}(e,t,n)}return async function(e,t,r){const n=await sl(e.name);t=ol(n,t),r=al(n,r);const i=new Uint8Array(r.getPrivate()),a=r.derive(t.getPublic()),o=n.curve.p.byteLength();return{secretKey:i,sharedKey:a.toArrayLike(Uint8Array,"be",o)}}(e,t,n)}var ef=Object.freeze({__proto__:null,validateParams:async function(e,t,r){return Bl(Yo.publicKey.ecdh,e,t,r)},encrypt:async function(e,t,r,n,i){const a=zl(r),o=new El(e),{publicKey:s,sharedKey:c}=await async function(e,t){switch(e.type){case"curve25519":{const r=Kh(32),{secretKey:n,sharedKey:i}=await Xl(e,t,null,r);let{publicKey:a}=qh.box.keyPair.fromSecretKey(n);return a=Xo.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&Xo.getWebCrypto())try{return await async function(e,t){const r=_l(e.payloadSize,e.web.web,t);let n=Jl.generateKey({name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]),i=Jl.importKey("jwk",r,{name:"ECDH",namedCurve:e.web.web},!1,[]);[n,i]=await Promise.all([n,i]);let a=Jl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:i},n.privateKey,e.web.sharedSize),o=Jl.exportKey("jwk",n.publicKey);[a,o]=await Promise.all([a,o]);const s=new Uint8Array(a);return{publicKey:new Uint8Array(Cl(o)),sharedKey:s}}(e,t)}catch(e){Xo.printDebugError(e)}break;case"node":return async function(e,t){const r=Vl.createECDH(e.node.node);r.generateKeys();const n=new Uint8Array(r.computeSecret(t));return{publicKey:new Uint8Array(r.getPublicKey()),sharedKey:n}}(e,t)}return async function(e,t){const r=await sl(e.name),n=await e.genKeyPair();t=ol(r,t);const i=al(r,n.privateKey),a=n.publicKey,o=i.derive(t.getPublic()),s=r.curve.p.byteLength();return{publicKey:a,sharedKey:o.toArrayLike(Uint8Array,"be",s)}}(e,t)}(o,n),u=Yl(Yo.publicKey.ecdh,e,t,i),{keySize:h}=Vu(t.cipher);return{publicKey:s,wrappedKey:Hl(await $l(t.hash,c,h,u),a)}},decrypt:async function(e,t,r,n,i,a,o){const s=new El(e),{sharedKey:c}=await Xl(s,r,i,a),u=Yl(Yo.publicKey.ecdh,e,t,o),{keySize:h}=Vu(t.cipher);let l;for(let r=0;r<3;r++)try{return Wl(Nl(await $l(t.hash,c,h,u,1===r,2===r),n))}catch(e){l=e}throw l}});const tf=Xo.getWebCrypto(),rf=Xo.getNodeCrypto(),nf=rf&&rf.webcrypto&&rf.webcrypto.subtle;async function af(e,t,r,n,i){const a=Yo.read(Yo.webHash,e);if(!a)throw Error("Hash algo not supported with HKDF");if(tf||nf){const e=tf||nf,o=await e.importKey("raw",t,"HKDF",!1,["deriveBits"]),s=await e.deriveBits({name:"HKDF",hash:a,salt:r,info:n},o,8*i);return new Uint8Array(s)}if(rf){const a=Yo.read(Yo.hash,e),o=(e,t)=>rf.createHmac(a,e).update(t).digest(),s=o(r,t),c=s.length,u=Math.ceil(i/c),h=new Uint8Array(u*c),l=new Uint8Array(c+n.length+1);l.set(n,c);for(let e=0;e0?l:l.subarray(c));l.set(t,0),h.set(t,e*c)}return h.subarray(0,i)}throw Error("No HKDF implementation available")}const of={x25519:Xo.encodeUTF8("OpenPGP X25519")};var sf=Object.freeze({__proto__:null,generate:async function(e){if(e===Yo.publicKey.x25519){const e=Kh(32),{publicKey:t}=qh.box.keyPair.fromSecretKey(e);return{A:t,k:e}}throw Error("Unsupported ECDH algorithm")},validateParams:async function(e,t,r){if(e===Yo.publicKey.x25519){const{publicKey:e}=qh.box.keyPair.fromSecretKey(r);return Xo.equalsUint8Array(t,e)}return!1},encrypt:async function(e,t,r){if(e===Yo.publicKey.x25519){const e=Kh(32),n=qh.scalarMult(e,r),{publicKey:i}=qh.box.keyPair.fromSecretKey(e),a=Xo.concatUint8Array([i,r,n]),{keySize:o}=Vu(Yo.symmetric.aes128);return{ephemeralPublicKey:i,wrappedKey:Hl(await af(Yo.hash.sha256,a,new Uint8Array,of.x25519,o),t)}}throw Error("Unsupported ECDH algorithm")},decrypt:async function(e,t,r,n,i){if(e===Yo.publicKey.x25519){const e=qh.scalarMult(i,t),a=Xo.concatUint8Array([t,n,e]),{keySize:o}=Vu(Yo.symmetric.aes128);return Nl(await af(Yo.hash.sha256,a,new Uint8Array,of.x25519,o),r)}throw Error("Unsupported ECDH algorithm")}}),cf=Object.freeze({__proto__:null,CurveWithOID:El,ecdh:ef,ecdhX:sf,ecdsa:Tl,eddsaLegacy:ql,eddsa:Kl,generate:async function(e){const t=await Xo.getBigInteger();e=new El(e);const r=await e.genKeyPair(),n=new t(r.publicKey).toUint8Array(),i=new t(r.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:n,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return Il[Yo.write(Yo.curve,e.toHex())].hash}}),uf=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){const o=await Xo.getBigInteger(),s=new o(1);let c,u,h,l;n=new o(n),i=new o(i),r=new o(r),a=new o(a),r=r.mod(n),a=a.mod(i);const f=new o(t.subarray(0,i.byteLength())).mod(i);for(;;){if(c=await Hh(s,i),u=r.modExp(c,n).imod(i),u.isZero())continue;const e=a.mul(u).imod(i);if(l=f.add(e).imod(i),h=c.modInv(i).imul(l).imod(i),!h.isZero())break}return{r:u.toUint8Array("be",i.byteLength()),s:h.toUint8Array("be",i.byteLength())}},verify:async function(e,t,r,n,i,a,o,s){const c=await Xo.getBigInteger(),u=new c(0);if(t=new c(t),r=new c(r),a=new c(a),o=new c(o),i=new c(i),s=new c(s),t.lte(u)||t.gte(o)||r.lte(u)||r.gte(o))return Xo.printDebug("invalid DSA Signature"),!1;const h=new c(n.subarray(0,o.byteLength())).imod(o),l=r.modInv(o);if(l.isZero())return Xo.printDebug("invalid DSA Signature"),!1;i=i.mod(a),s=s.mod(a);const f=h.mul(l).imod(o),d=t.mul(l).imod(o),p=i.modExp(f,a),g=s.modExp(d,a);return p.mul(g).imod(a).imod(o).equal(t)},validateParams:async function(e,t,r,n,i){const a=await Xo.getBigInteger();e=new a(e),t=new a(t),r=new a(r),n=new a(n);const o=new a(1);if(r.lte(o)||r.gte(e))return!1;if(!e.dec().mod(t).isZero())return!1;if(!r.modExp(t,e).isOne())return!1;const s=new a(t.bitLength()),c=new a(150);if(s.lt(c)||!await Gh(t,null,32))return!1;i=new a(i);const u=new a(2),h=await Hh(u.leftShift(s.dec()),u.leftShift(s)),l=t.mul(h).add(i);return!!n.equal(r.modExp(l,e))}}),hf={rsa:rl,elgamal:nl,elliptic:cf,dsa:uf,nacl:qh},lf=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let r=0;switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaSign:return{s:Xo.readMPI(t.subarray(r))};case Yo.publicKey.dsa:case Yo.publicKey.ecdsa:{const e=Xo.readMPI(t.subarray(r));return r+=e.length+2,{r:e,s:Xo.readMPI(t.subarray(r))}}case Yo.publicKey.eddsaLegacy:{let e=Xo.readMPI(t.subarray(r));r+=e.length+2,e=Xo.leftPad(e,32);let n=Xo.readMPI(t.subarray(r));return n=Xo.leftPad(n,32),{r:e,s:n}}case Yo.publicKey.ed25519:{const e=t.subarray(r,r+64);return r+=e.length,{RS:e}}default:throw new gl("Unknown signature algorithm.")}},verify:async function(e,t,r,n,i,a){switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaSign:{const{n:e,e:o}=n,s=Xo.leftPad(r.s,e.length);return hf.rsa.verify(t,i,s,e,o,a)}case Yo.publicKey.dsa:{const{g:e,p:i,q:o,y:s}=n,{r:c,s:u}=r;return hf.dsa.verify(t,c,u,a,e,i,o,s)}case Yo.publicKey.ecdsa:{const{oid:e,Q:o}=n,s=new hf.elliptic.CurveWithOID(e).payloadSize,c=Xo.leftPad(r.r,s),u=Xo.leftPad(r.s,s);return hf.elliptic.ecdsa.verify(e,t,{r:c,s:u},i,o,a)}case Yo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=n;return hf.elliptic.eddsaLegacy.verify(e,t,r,i,o,a)}case Yo.publicKey.ed25519:{const{A:o}=n;return hf.elliptic.eddsa.verify(e,t,r,i,o,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,r,n,i,a){if(!r||!n)throw Error("Missing key parameters");switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaSign:{const{n:e,e:o}=r,{d:s,p:c,q:u,u:h}=n;return{s:await hf.rsa.sign(t,i,e,o,s,c,u,h,a)}}case Yo.publicKey.dsa:{const{g:e,p:i,q:o}=r,{x:s}=n;return hf.dsa.sign(t,a,e,i,o,s)}case Yo.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case Yo.publicKey.ecdsa:{const{oid:e,Q:o}=r,{d:s}=n;return hf.elliptic.ecdsa.sign(e,t,i,o,s,a)}case Yo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=r,{seed:s}=n;return hf.elliptic.eddsaLegacy.sign(e,t,i,o,s,a)}case Yo.publicKey.ed25519:{const{A:o}=r,{seed:s}=n;return hf.elliptic.eddsa.sign(e,t,i,o,s,a)}default:throw Error("Unknown signature algorithm.")}}});class ff{constructor(e){e&&(this.data=e)}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.data=e.subarray(1,1+t),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Xo.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class df{constructor(e){if(e){const{hash:t,cipher:r}=e;this.hash=t,this.cipher=r}else this.hash=null,this.cipher=null}read(e){if(e.length<4||3!==e[0]||1!==e[1])throw new gl("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}class pf{static fromObject({wrappedKey:e,algorithm:t}){const r=new pf;return r.wrappedKey=e,r.algorithm=t,r}read(e){let t=0,r=e[t++];this.algorithm=r%2?e[t++]:null,r-=r%2,this.wrappedKey=e.subarray(t,t+r),t+=r}write(){return Xo.concatUint8Array([this.algorithm?new Uint8Array([this.wrappedKey.length+1,this.algorithm]):new Uint8Array([this.wrappedKey.length]),this.wrappedKey])}}function gf(e){try{e.getName()}catch(e){throw new gl("Unknown curve OID")}}var Af=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,r,n,i){switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:{const{n:e,e:t}=r;return{c:await hf.rsa.encrypt(n,e,t)}}case Yo.publicKey.elgamal:{const{p:e,g:t,y:i}=r;return hf.elgamal.encrypt(n,e,t,i)}case Yo.publicKey.ecdh:{const{oid:e,Q:t,kdfParams:a}=r,{publicKey:o,wrappedKey:s}=await hf.elliptic.ecdh.encrypt(e,a,n,t,i);return{V:o,C:new ff(s)}}case Yo.publicKey.x25519:{if(!Xo.isAES(t))throw Error("X25519 keys can only encrypt AES session keys");const{A:i}=r,{ephemeralPublicKey:a,wrappedKey:o}=await hf.elliptic.ecdhX.encrypt(e,n,i);return{ephemeralPublicKey:a,C:pf.fromObject({algorithm:t,wrappedKey:o})}}default:return[]}},publicKeyDecrypt:async function(e,t,r,n,i,a){switch(e){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaEncrypt:{const{c:e}=n,{n:i,e:o}=t,{d:s,p:c,q:u,u:h}=r;return hf.rsa.decrypt(e,i,o,s,c,u,h,a)}case Yo.publicKey.elgamal:{const{c1:e,c2:i}=n,o=t.p,s=r.x;return hf.elgamal.decrypt(e,i,o,s,a)}case Yo.publicKey.ecdh:{const{oid:e,Q:a,kdfParams:o}=t,{d:s}=r,{V:c,C:u}=n;return hf.elliptic.ecdh.decrypt(e,o,c,u.data,a,s,i)}case Yo.publicKey.x25519:{const{A:i}=t,{k:a}=r,{ephemeralPublicKey:o,C:s}=n;if(!Xo.isAES(s.algorithm))throw Error("AES session key expected");return hf.elliptic.ecdhX.decrypt(e,o,s.wrappedKey,i,a)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let r=0;switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=Xo.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{n:e,e:n}}}case Yo.publicKey.dsa:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=Xo.readMPI(t.subarray(r));r+=n.length+2;const i=Xo.readMPI(t.subarray(r));r+=i.length+2;const a=Xo.readMPI(t.subarray(r));return r+=a.length+2,{read:r,publicParams:{p:e,q:n,g:i,y:a}}}case Yo.publicKey.elgamal:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=Xo.readMPI(t.subarray(r));r+=n.length+2;const i=Xo.readMPI(t.subarray(r));return r+=i.length+2,{read:r,publicParams:{p:e,g:n,y:i}}}case Yo.publicKey.ecdsa:{const e=new il;r+=e.read(t),gf(e);const n=Xo.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{oid:e,Q:n}}}case Yo.publicKey.eddsaLegacy:{const e=new il;r+=e.read(t),gf(e);let n=Xo.readMPI(t.subarray(r));return r+=n.length+2,n=Xo.leftPad(n,33),{read:r,publicParams:{oid:e,Q:n}}}case Yo.publicKey.ecdh:{const e=new il;r+=e.read(t),gf(e);const n=Xo.readMPI(t.subarray(r));r+=n.length+2;const i=new df;return r+=i.read(t.subarray(r)),{read:r,publicParams:{oid:e,Q:n,kdfParams:i}}}case Yo.publicKey.ed25519:case Yo.publicKey.x25519:{const e=t.subarray(r,r+32);return r+=e.length,{read:r,publicParams:{A:e}}}default:throw new gl("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,r){let n=0;switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:{const e=Xo.readMPI(t.subarray(n));n+=e.length+2;const r=Xo.readMPI(t.subarray(n));n+=r.length+2;const i=Xo.readMPI(t.subarray(n));n+=i.length+2;const a=Xo.readMPI(t.subarray(n));return n+=a.length+2,{read:n,privateParams:{d:e,p:r,q:i,u:a}}}case Yo.publicKey.dsa:case Yo.publicKey.elgamal:{const e=Xo.readMPI(t.subarray(n));return n+=e.length+2,{read:n,privateParams:{x:e}}}case Yo.publicKey.ecdsa:case Yo.publicKey.ecdh:{const e=new El(r.oid);let i=Xo.readMPI(t.subarray(n));return n+=i.length+2,i=Xo.leftPad(i,e.payloadSize),{read:n,privateParams:{d:i}}}case Yo.publicKey.eddsaLegacy:{const e=new El(r.oid);let i=Xo.readMPI(t.subarray(n));return n+=i.length+2,i=Xo.leftPad(i,e.payloadSize),{read:n,privateParams:{seed:i}}}case Yo.publicKey.ed25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{seed:e}}}case Yo.publicKey.x25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{k:e}}}default:throw new gl("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let r=0;switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:return{c:Xo.readMPI(t.subarray(r))};case Yo.publicKey.elgamal:{const e=Xo.readMPI(t.subarray(r));return r+=e.length+2,{c1:e,c2:Xo.readMPI(t.subarray(r))}}case Yo.publicKey.ecdh:{const e=Xo.readMPI(t.subarray(r));r+=e.length+2;const n=new ff;return n.read(t.subarray(r)),{V:e,C:n}}case Yo.publicKey.x25519:{const e=t.subarray(r,r+32);r+=e.length;const n=new pf;return n.read(t.subarray(r)),{ephemeralPublicKey:e,C:n}}default:throw new gl("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const r=new Set([Yo.publicKey.ed25519,Yo.publicKey.x25519]),n=Object.keys(t).map((n=>{const i=t[n];return Xo.isUint8Array(i)?r.has(e)?i:Xo.uint8ArrayToMPI(i):i.write()}));return Xo.concatUint8Array(n)},generateParams:function(e,t,r){switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:return hf.rsa.generate(t,65537).then((({n:e,e:t,d:r,p:n,q:i,u:a})=>({privateParams:{d:r,p:n,q:i,u:a},publicParams:{n:e,e:t}})));case Yo.publicKey.ecdsa:return hf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{d:r},publicParams:{oid:new il(e),Q:t}})));case Yo.publicKey.eddsaLegacy:return hf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{seed:r},publicParams:{oid:new il(e),Q:t}})));case Yo.publicKey.ecdh:return hf.elliptic.generate(r).then((({oid:e,Q:t,secret:r,hash:n,cipher:i})=>({privateParams:{d:r},publicParams:{oid:new il(e),Q:t,kdfParams:new df({hash:n,cipher:i})}})));case Yo.publicKey.ed25519:return hf.elliptic.eddsa.generate(e).then((({A:e,seed:t})=>({privateParams:{seed:t},publicParams:{A:e}})));case Yo.publicKey.x25519:return hf.elliptic.ecdhX.generate(e).then((({A:e,k:t})=>({privateParams:{k:t},publicParams:{A:e}})));case Yo.publicKey.dsa:case Yo.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,r){if(!t||!r)throw Error("Missing key parameters");switch(e){case Yo.publicKey.rsaEncrypt:case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:{const{n:e,e:n}=t,{d:i,p:a,q:o,u:s}=r;return hf.rsa.validateParams(e,n,i,a,o,s)}case Yo.publicKey.dsa:{const{p:e,q:n,g:i,y:a}=t,{x:o}=r;return hf.dsa.validateParams(e,n,i,a,o)}case Yo.publicKey.elgamal:{const{p:e,g:n,y:i}=t,{x:a}=r;return hf.elgamal.validateParams(e,n,i,a)}case Yo.publicKey.ecdsa:case Yo.publicKey.ecdh:{const n=hf.elliptic[Yo.read(Yo.publicKey,e)],{oid:i,Q:a}=t,{d:o}=r;return n.validateParams(i,a,o)}case Yo.publicKey.eddsaLegacy:{const{Q:e,oid:n}=t,{seed:i}=r;return hf.elliptic.eddsaLegacy.validateParams(n,e,i)}case Yo.publicKey.ed25519:{const{A:n}=t,{seed:i}=r;return hf.elliptic.eddsa.validateParams(e,n,i)}case Yo.publicKey.x25519:{const{A:n}=t,{k:i}=r;return hf.elliptic.ecdhX.validateParams(e,n,i)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=Vu(e),r=await Kh(t),n=new Uint8Array([r[r.length-2],r[r.length-1]]);return Xo.concat([r,n])},generateSessionKey:function(e){const{keySize:t}=Vu(e);return Kh(t)},getAEADMode:function(e){const t=Yo.read(Yo.aead,e);return Th[t]},getCipher:Vu,getPreferredCurveHashAlgo:function(e,t){switch(e){case Yo.publicKey.ecdsa:case Yo.publicKey.eddsaLegacy:return hf.elliptic.getPreferredHashAlgo(t);case Yo.publicKey.ed25519:return hf.elliptic.eddsa.getPreferredHashAlgo(e);default:throw Error("Unknown elliptic signing algo")}}});const yf={cipher:Ws,hash:Zu,mode:Th,publicKey:hf,signature:lf,random:Nh,pkcs1:Vh,pkcs5:Zl,aesKW:jl};Object.assign(yf,Af);var mf="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;const bf={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(let a=0;a=0;)e[t]=0}const Sf=0,Qf=1,xf=2,Pf=29,Mf=256,Uf=Mf+1+Pf,Df=30,Rf=19,Ff=2*Uf+1,Tf=15,qf=16,Of=256,Kf=16,Hf=17,Nf=18,Lf=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Gf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],jf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],zf=Array(2*(Uf+2));kf(zf);const Wf=Array(2*Df);kf(Wf);const Zf=Array(512);kf(Zf);const Jf=Array(256);kf(Jf);const Vf=Array(Pf);kf(Vf);const Yf=Array(Df);function $f(e){return e<256?Zf[e]:Zf[256+(e>>>7)]}function Xf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ed(e,t,r){e.bi_valid>qf-r?(e.bi_buf|=t<>qf-e.bi_valid,e.bi_valid+=r-qf):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function nd(e,t,r){const n=Array(Tf+1);let i,a,o=0;for(i=1;i<=Tf;i++)n[i]=o=o+r[i-1]<<1;for(a=0;a<=t;a++){const t=e[2*a+1];0!==t&&(e[2*a]=rd(n[t]++,t))}}function id(e){let t;for(t=0;t8?Xf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function od(e,t,r,n){const i=2*t,a=2*r;return e[i]>1;o>=1;o--)sd(e,r,o);c=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],sd(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[2*c]=r[2*o]+r[2*s],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[2*o+1]=r[2*s+1]=c,e.heap[1]=c++,sd(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,h,l,f,d,p,g=0;for(f=0;f<=Tf;f++)e.bl_count[f]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;uc&&(f=c,g++),r[2*h+1]=f,h>n||(e.bl_count[f]++,d=0,h>=s&&(d=o[h-s]),p=r[2*h],e.opt_len+=p*(f+d),a&&(e.static_len+=p*(i[2*h+1]+d)));if(0!==g){do{for(f=c-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(f=c;0!==f;f--)for(h=e.bl_count[f];0!==h;)l=e.heap[--u],l>n||(r[2*l+1]!==f&&(e.opt_len+=(f-r[2*l+1])*r[2*l],r[2*l+1]=f),h--)}}(e,t),nd(r,u,e.bl_count)}function hd(e,t,r){let n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Jf[r]+Mf+1)]++,e.dyn_dtree[2*$f(t)]++),e.last_lit===e.lit_bufsize-1}function pd(e,t,r,n){let i=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{i=i+t[n++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}const gd=function(){let e;const t=[];for(let r=0;r<256;r++){e=r;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();function Ad(e,t,r,n){const i=gd,a=n+r;e^=-1;for(let r=n;r>>8^i[255&(e^t[r])];return-1^e}const yd=3,md=258,bd=md+yd+1;function wd(e){const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(If(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function vd(e,t){(function(e,t,r,n){let i,a,o=0;e.level>0?(e.strm.data_type===_f&&(e.strm.data_type=function(e){let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Bf;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Cf;for(t=32;t=3&&0===e.bl_tree[2*jf[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?fd(e,t,r,n):e.strategy===Ef||a===i?(ed(e,(Qf<<1)+(n?1:0),3),cd(e,zf,Wf)):(ed(e,(xf<<1)+(n?1:0),3),function(e,t,r,n){let i;for(ed(e,t-257,5),ed(e,r-1,5),ed(e,n-4,4),i=0;i=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wd(e.strm)}function Id(e,t,r,n){let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,If(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=pd(e.adler,t,i,r):2===e.state.wrap&&(e.adler=Ad(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Ed(e,t){let r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-bd?e.strstart-(e.w_size-bd):0,u=e.window,h=e.w_mask,l=e.prev,f=e.strstart+md;let d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(r=t,u[r+o]===p&&u[r+o-1]===d&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=l[t&h])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Bd(e){const t=e.w_size;let r,n,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-bd)){If(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do{i=e.head[--r],e.head[r]=i>=t?i-t:0}while(--n);n=t,r=n;do{i=e.prev[--r],e.prev[r]=i>=t?i-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=Id(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=yd)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=yd&&(e.ins_h=(e.ins_h<=yd)if(n=dd(e,e.strstart-e.match_start,e.match_length-yd),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=yd){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=yd&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=yd-1)),e.prev_length>=yd&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-yd,n=dd(e,e.strstart-1-e.prev_match,e.prev_length-yd),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Bd(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,vd(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-bd&&(vd(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(vd(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(vd(e,!1),e.strm.avail_out),1)})),new kd(4,4,8,4,Cd),new kd(4,5,16,8,Cd),new kd(4,6,32,32,Cd),new kd(4,4,16,16,_d),new kd(8,16,32,32,_d),new kd(8,16,128,128,_d),new kd(8,32,128,256,_d),new kd(32,128,258,1024,_d),new kd(32,258,258,4096,_d);try{String.fromCharCode.call(null,0)}catch(so){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(so){}const Sd=new vf(256);for(let e=0;e<256;e++)Sd[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Sd[254]=Sd[254]=1;var Qd=[0,1,3,7,15,31,63,127,255],xd=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};xd.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},xd.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Qd[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var n=r-e;t|=(this.curByte&Qd[e]<>n,this.bitOffset+=e,e=0}}return t},xd.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1},xd.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+e.toString(16)).slice(-2))).join("")}(t)};var Pd=xd,Md=function(){};Md.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Md.prototype.read=function(e,t,r){for(var n=0;n>>0},this.updateCRC=function(t){e=e<<8^Ud[255&(e>>>24^t)]},this.updateCRCRun=function(t,r){for(;r-- >0;)e=e<<8^Ud[255&(e>>>24^t)]}}),Rd=function(e,t){var r,n=e[t];for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},Fd=-2,Td=-3,qd=-4,Od=-5,Kd=-6,Hd=-7,Nd={"-1":"Bad file checksum"};Nd[Fd]="Not bzip data",Nd[Td]="Unexpected input EOF",Nd[qd]="Unexpected output EOF",Nd[Od]="Data error",Nd[Kd]="Out of memory",Nd[Hd]="Obsolete (pre 0.9.5) bzip format not supported.";var Ld=function(e,t){var r=Nd[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},Gd=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Gd.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new Dd,!0):(this.writeCount=-1,!1)},Gd.prototype._start_bunzip=function(e,t){var r=new Uint8Array(4);4===e.read(r,0,4)&&"BZh"===String.fromCharCode(r[0],r[1],r[2])||Ld(Fd,"bad magic");var n=r[3]-48;(n<1||n>9)&&Ld(Fd,"level out of range"),this.reader=new Pd(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Gd.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if("177245385090"===i)return!1;"314159265359"!==i&&Ld(Fd),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&Ld(Hd);var a=n.read(24);a>this.dbufSize&&Ld(Od,"initial position out of bounds");var o=n.read(16),s=new Uint8Array(256),c=0;for(e=0;e<16;e++)if(o&1<<15-e){var u=16*e;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(s[c++]=u+t)}var h=n.read(3);(h<2||h>6)&&Ld(Od);var l=n.read(15);0===l&&Ld(Od);var f=new Uint8Array(256);for(e=0;e=h&&Ld(Od);d[e]=Rd(f,t)}var p,g=c+2,A=[];for(t=0;t20)&&Ld(Od),n.read(1);)n.read(1)?o--:o++;b[e]=o}for(y=m=b[0],e=1;em?m=b[e]:b[e]=l&&Ld(Od),p=A[d[_++]]),e=p.minLen,t=n.read(e);e>p.maxLen&&Ld(Od),!(t<=p.limit[e]);e++)t=t<<1|n.read(1);((t-=p.base[e])<0||t>=258)&&Ld(Od);var S=p.permute[t];if(0!==S&&1!==S){if(B)for(B=0,C+o>this.dbufSize&&Ld(Od),I[E=s[f[0]]]+=o;o--;)k[C++]=E;if(S>c)break;C>=this.dbufSize&&Ld(Od),I[E=s[E=Rd(f,e=S-1)]]++,k[C++]=E}else B||(B=1,o=0),o+=0===S?B:2*B,B<<=1}for((a<0||a>=C)&&Ld(Od),t=0,e=0;e<256;e++)r=t+I[e],I[e]=t,t=r;for(e=0;e>=8,P=-1),this.writePos=Q,this.writeCurrent=x,this.writeCount=C,this.writeRun=P,!0},Gd.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;var a=this.dbuf,o=this.writePos,s=this.writeCurrent,c=this.writeCount;this.outputsize;for(var u=this.writeRun;c;){for(c--,n=s,s=255&(o=a[o]),o>>=8,3==u++?(r=s,i=n,s=-1):(r=1,i=s),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;s!=n&&(u=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Ld(Od,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};const jd=Symbol("verified"),zd=new Set([Yo.signatureSubpacket.issuer,Yo.signatureSubpacket.issuerFingerprint,Yo.signatureSubpacket.embeddedSignature]);class Wd{static get tag(){return Yo.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new ys,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[jd]=null}read(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new gl(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=e[t++],this.publicKeyAlgorithm=e[t++],this.hashAlgorithm=e[t++],t+=this.readSubPackets(e.subarray(t,e.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=e.subarray(0,t),t+=this.readSubPackets(e.subarray(t,e.length),!1),this.signedHashValue=e.subarray(t,t+2),t+=2,this.params=yf.signature.parseSignatureParams(this.publicKeyAlgorithm,e.subarray(t,e.length))}writeParams(){return this.params instanceof Promise?Zo((async()=>yf.serializeParams(this.publicKeyAlgorithm,await this.params))):yf.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const e=[];return e.push(this.signatureData),e.push(this.writeUnhashedSubPackets()),e.push(this.signedHashValue),e.push(this.writeParams()),Xo.concat(e)}async sign(e,t,r=new Date,n=!1){5===e.version?this.version=5:this.version=4;const i=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Xo.normalizeDate(r),this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyID=e.getKeyID(),i.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Xo.concat(i);const a=this.toHash(this.signatureType,t,n),o=await this.hash(this.signatureType,t,a,n);this.signedHashValue=zo(Lo(o),0,2);const s=async()=>yf.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,e.publicParams,e.privateParams,a,await Wo(o));Xo.isStream(o)?this.params=s():(this.params=await s(),this[jd]=!0)}writeHashedSubPackets(){const e=Yo.signatureSubpacket,t=[];let r;if(null===this.created)throw Error("Missing signature creation time");t.push(Zd(e.signatureCreationTime,!0,Xo.writeDate(this.created))),null!==this.signatureExpirationTime&&t.push(Zd(e.signatureExpirationTime,!0,Xo.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&t.push(Zd(e.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),t.push(Zd(e.trustSignature,!0,r))),null!==this.regularExpression&&t.push(Zd(e.regularExpression,!0,this.regularExpression)),null!==this.revocable&&t.push(Zd(e.revocable,!0,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&t.push(Zd(e.keyExpirationTime,!0,Xo.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredSymmetricAlgorithms)),t.push(Zd(e.preferredSymmetricAlgorithms,!1,r))),null!==this.revocationKeyClass&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Xo.concat([r,this.revocationKeyFingerprint]),t.push(Zd(e.revocationKey,!1,r))),this.issuerKeyID.isNull()||5===this.issuerKeyVersion||t.push(Zd(e.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach((({name:n,value:i,humanReadable:a,critical:o})=>{r=[new Uint8Array([a?128:0,0,0,0])];const s=Xo.encodeUTF8(n);r.push(Xo.writeNumber(s.length,2)),r.push(Xo.writeNumber(i.length,2)),r.push(s),r.push(i),r=Xo.concat(r),t.push(Zd(e.notationData,o,r))})),null!==this.preferredHashAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredHashAlgorithms)),t.push(Zd(e.preferredHashAlgorithms,!1,r))),null!==this.preferredCompressionAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredCompressionAlgorithms)),t.push(Zd(e.preferredCompressionAlgorithms,!1,r))),null!==this.keyServerPreferences&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.keyServerPreferences)),t.push(Zd(e.keyServerPreferences,!1,r))),null!==this.preferredKeyServer&&t.push(Zd(e.preferredKeyServer,!1,Xo.encodeUTF8(this.preferredKeyServer))),null!==this.isPrimaryUserID&&t.push(Zd(e.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&t.push(Zd(e.policyURI,!1,Xo.encodeUTF8(this.policyURI))),null!==this.keyFlags&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.keyFlags)),t.push(Zd(e.keyFlags,!0,r))),null!==this.signersUserID&&t.push(Zd(e.signersUserID,!1,Xo.encodeUTF8(this.signersUserID))),null!==this.reasonForRevocationFlag&&(r=Xo.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),t.push(Zd(e.reasonForRevocation,!0,r))),null!==this.features&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.features)),t.push(Zd(e.features,!1,r))),null!==this.signatureTargetPublicKeyAlgorithm&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Xo.stringToUint8Array(this.signatureTargetHash)),r=Xo.concat(r),t.push(Zd(e.signatureTarget,!0,r))),null!==this.embeddedSignature&&t.push(Zd(e.embeddedSignature,!0,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Xo.concat(r),t.push(Zd(e.issuerFingerprint,5===this.version,r))),null!==this.preferredAEADAlgorithms&&(r=Xo.stringToUint8Array(Xo.uint8ArrayToString(this.preferredAEADAlgorithms)),t.push(Zd(e.preferredAEADAlgorithms,!1,r)));const n=Xo.concat(t),i=Xo.writeNumber(n.length,2);return Xo.concat([i,n])}writeUnhashedSubPackets(){const e=[];this.unhashedSubpackets.forEach((t=>{e.push(ul(t.length)),e.push(t)}));const t=Xo.concat(e),r=Xo.writeNumber(t.length,2);return Xo.concat([r,t])}readSubPacket(e,t=!0){let r=0;const n=!!(128&e[r]),i=127&e[r];if(t||(this.unhashedSubpackets.push(e.subarray(r,e.length)),zd.has(i)))switch(r++,i){case Yo.signatureSubpacket.signatureCreationTime:this.created=Xo.readDate(e.subarray(r,e.length));break;case Yo.signatureSubpacket.signatureExpirationTime:{const t=Xo.readNumber(e.subarray(r,e.length));this.signatureNeverExpires=0===t,this.signatureExpirationTime=t;break}case Yo.signatureSubpacket.exportableCertification:this.exportable=1===e[r++];break;case Yo.signatureSubpacket.trustSignature:this.trustLevel=e[r++],this.trustAmount=e[r++];break;case Yo.signatureSubpacket.regularExpression:this.regularExpression=e[r];break;case Yo.signatureSubpacket.revocable:this.revocable=1===e[r++];break;case Yo.signatureSubpacket.keyExpirationTime:{const t=Xo.readNumber(e.subarray(r,e.length));this.keyExpirationTime=t,this.keyNeverExpires=0===t;break}case Yo.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.revocationKey:this.revocationKeyClass=e[r++],this.revocationKeyAlgorithm=e[r++],this.revocationKeyFingerprint=e.subarray(r,r+20);break;case Yo.signatureSubpacket.issuer:this.issuerKeyID.read(e.subarray(r,e.length));break;case Yo.signatureSubpacket.notationData:{const t=!!(128&e[r]);r+=4;const i=Xo.readNumber(e.subarray(r,r+2));r+=2;const a=Xo.readNumber(e.subarray(r,r+2));r+=2;const o=Xo.decodeUTF8(e.subarray(r,r+i)),s=e.subarray(r+i,r+i+a);this.rawNotations.push({name:o,humanReadable:t,value:s,critical:n}),t&&(this.notations[o]=Xo.decodeUTF8(s));break}case Yo.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==e[r++];break;case Yo.signatureSubpacket.policyURI:this.policyURI=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.keyFlags:this.keyFlags=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.signersUserID:this.signersUserID=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=e[r++],this.reasonForRevocationString=Xo.decodeUTF8(e.subarray(r,e.length));break;case Yo.signatureSubpacket.features:this.features=[...e.subarray(r,e.length)];break;case Yo.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=e[r++],this.signatureTargetHashAlgorithm=e[r++];const t=yf.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Xo.uint8ArrayToString(e.subarray(r,r+t));break}case Yo.signatureSubpacket.embeddedSignature:this.embeddedSignature=new Wd,this.embeddedSignature.read(e.subarray(r,e.length));break;case Yo.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=e[r++],this.issuerFingerprint=e.subarray(r,e.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case Yo.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...e.subarray(r,e.length)];break;default:{const e=Error("Unknown signature subpacket type "+i);if(n)throw e;Xo.printDebug(e)}}}readSubPackets(e,t=!0,r){const n=Xo.readNumber(e.subarray(0,2));let i=2;for(;i<2+n;){const n=cl(e.subarray(i,e.length));i+=n.offset,this.readSubPacket(e.subarray(i,i+n.len),t,r),i+=n.len}return i}toSign(e,t){const r=Yo.signature;switch(e){case r.binary:return null!==t.text?Xo.encodeUTF8(t.getText(!0)):t.getBytes(!0);case r.text:{const e=t.getBytes(!0);return Xo.canonicalizeEOL(e)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let e,n;if(t.userID)n=180,e=t.userID;else{if(!t.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");n=209,e=t.userAttribute}const i=e.write();return Xo.concat([this.toSign(r.key,t),new Uint8Array([n]),Xo.writeNumber(i.length,4),i])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Xo.concat([this.toSign(r.key,t),this.toSign(r.key,{key:t.bind})]);case r.key:if(void 0===t.key)throw Error("Key packet is required for this signature.");return t.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,t);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(e,t){let r=0;return Ho(Lo(this.signatureData),(e=>{r+=e.length}),(()=>{const n=[];return 5!==this.version||this.signatureType!==Yo.signature.binary&&this.signatureType!==Yo.signature.text||(t?n.push(new Uint8Array(6)):n.push(e.writeHeader())),n.push(new Uint8Array([this.version,255])),5===this.version&&n.push(new Uint8Array(4)),n.push(Xo.writeNumber(r,4)),Xo.concat(n)}))}toHash(e,t,r=!1){const n=this.toSign(e,t);return Xo.concat([n,this.signatureData,this.calculateTrailer(t,r)])}async hash(e,t,r,n=!1){return r||(r=this.toHash(e,t,n)),yf.hash.digest(this.hashAlgorithm,r)}async verify(e,t,r,n=new Date,i=!1,a=ss){if(!this.issuerKeyID.equals(e.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const o=t===Yo.signature.binary||t===Yo.signature.text;if(!this[jd]||o){let n,a;if(this.hashed?a=await this.hashed:(n=this.toHash(t,r,i),a=await this.hash(t,r,n)),a=await Wo(a),this.signedHashValue[0]!==a[0]||this.signedHashValue[1]!==a[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[jd]=await yf.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,e.publicParams,n,a),!this[jd])throw Error("Signature verification failed")}const s=Xo.normalizeDate(n);if(s&&this.created>s)throw Error("Signature creation time is in the future");if(s&&s>=this.getExpirationTime())throw Error("Signature is expired");if(a.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+Yo.read(Yo.hash,this.hashAlgorithm).toUpperCase());if(a.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[Yo.signature.binary,Yo.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+Yo.read(Yo.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:e,critical:t})=>{if(t&&a.knownNotations.indexOf(e)<0)throw Error("Unknown critical notation: "+e)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(e=new Date){const t=Xo.normalizeDate(e);return null!==t&&!(this.created<=t&&tWd.prototype.calculateTrailer.apply(await this.correspondingSig,e)))}async verify(){const e=await this.correspondingSig;if(!e||e.constructor.tag!==Yo.packet.signature)throw Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)}}function Vd(e,t){if(!t[e]){let r;try{r=Yo.read(Yo.packet,e)}catch(t){throw new gl("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+r)}return new t[e]}Jd.prototype.hash=Wd.prototype.hash,Jd.prototype.toHash=Wd.prototype.toHash,Jd.prototype.toSign=Wd.prototype.toSign;class Yd extends Array{static async fromBinary(e,t,r=ss){const n=new Yd;return await n.read(e,t,r),n}async read(e,t,r=ss){r.additionalAllowedPackets.length&&(t={...t,...Xo.constructAllowedPackets(r.additionalAllowedPackets)}),this.stream=No(e,(async(e,n)=>{const i=To(n);try{for(;;)if(await i.ready,await pl(e,(async e=>{try{if(e.tag===Yo.packet.marker||e.tag===Yo.packet.trust)return;const n=Vd(e.tag,t);n.packets=new Yd,n.fromStream=Xo.isStream(e.packet),await n.read(e.packet,r),await i.write(n)}catch(t){const n=!r.ignoreUnsupportedPackets&&t instanceof gl,a=!(r.ignoreMalformedPackets||t instanceof gl);if(n||a||dl(e.tag))await i.abort(t);else{const t=new Al(e.tag,e.packet);await i.write(t)}Xo.printDebugError(t)}})))return await i.ready,void await i.close()}catch(e){await i.abort(e)}}));const n=Fo(this.stream);for(;;){const{done:e,value:t}=await n.read();if(e?this.stream=null:this.push(t),e||dl(t.constructor.tag))break}n.releaseLock()}write(){const e=[];for(let t=0;t{if(t.push(e),i+=e.length,i>=a){const e=Math.min(Math.log(i)/Math.LN2|0,30),r=2**e,n=Xo.concat([hl(e)].concat(t));return t=[n.subarray(1+r)],i=t[0].length,n.subarray(0,1+r)}}),(()=>Xo.concat([ul(i)].concat(t)))))}else{if(Xo.isStream(n)){let t=0;e.push(Ho(Lo(n),(e=>{t+=e.length}),(()=>fl(r,t))))}else e.push(fl(r,n.length));e.push(n)}}return Xo.concat(e)}filterByTag(...e){const t=new Yd,r=e=>t=>e===t;for(let n=0;nt.constructor.tag===e))}indexOfTag(...e){const t=[],r=this,n=e=>t=>e===t;for(let i=0;i>4)}read(e){let t=0;try{this.type=Yo.read(Yo.s2k,e[t++])}catch(e){throw new gl("Unknown S2K type.")}switch(this.algorithm=e[t++],this.type){case"simple":break;case"salted":this.salt=e.subarray(t,t+8),t+=8;break;case"iterated":this.salt=e.subarray(t,t+8),t+=8,this.c=e[t++];break;case"gnu":if("GNU"!==Xo.uint8ArrayToString(e.subarray(t,t+3)))throw new gl("Unknown s2k type.");if(t+=3,1001!==1e3+e[t++])throw new gl("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw new gl("Unknown s2k type.")}return t}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...Xo.stringToUint8Array("GNU"),1]);const e=[new Uint8Array([Yo.write(Yo.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return Xo.concatUint8Array(e)}async produceKey(e,t){e=Xo.encodeUTF8(e);const r=[];let n=0,i=0;for(;n{this.privateParams[e].fill(0),delete this.privateParams[e]})),this.privateParams=null,this.isEncrypted=!0)}}async function ip(e,t,r){const{keySize:n}=yf.getCipher(r);return e.produceKey(t,n)}var ap=ac((function(e){!function(t){function r(e){function t(){return Ee0&&(t.semantic=" "),t}}function A(e,t){return function(){var n,a,s,u,h;for(u=r(),n=o("star"),s=0,h=void 0===t?0:t;null!==(a=e());)s+=1,c(n,a);return s>=h?n:(i(u),null)}}function y(e){return e.charCodeAt(0)>=128}function m(){return s("cr",h("\r")())}function b(){return s("crlf",l(m,I)())}function w(){return s("dquote",h('"')())}function v(){return s("htab",h("\t")())}function I(){return s("lf",h("\n")())}function E(){return s("sp",h(" ")())}function B(){return s("vchar",u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n})))}function C(){return s("wsp",f(E,v)())}function _(){var e=s("quoted-pair",f(l(h("\\"),f(B,C)),ne)());return null===e?null:(e.semantic=e.semantic[1],e)}function k(){return s("fws",f(ae,l(d(l(A(C),p(b))),A(C,1)))())}function S(){return s("ctext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=39||42<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),te)())}function Q(){return s("ccontent",f(S,_,x)())}function x(){return s("comment",l(h("("),A(l(d(k),Q)),d(k),h(")"))())}function P(){return s("cfws",f(l(A(l(d(k),x),1),d(k)),k)())}function M(){return s("atext",u((function(t){var r="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(r=r||y(t)),r})))}function U(){return s("atom",l(g(d(P)),A(M,1),g(d(P)))())}function D(){var e,t;return null===(e=s("dot-atom-text",A(M,1)()))||null!==(t=A(l(h("."),A(M,1)))())&&c(e,t),e}function R(){return s("dot-atom",l(p(d(P)),D,p(d(P)))())}function F(){return s("qtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33===r||35<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),re)())}function T(){return s("qcontent",f(F,_)())}function q(){return s("quoted-string",l(p(d(P)),p(w),A(l(d(g(k)),T)),d(p(k)),p(w),p(d(P)))())}function O(){return s("word",f(U,q)())}function K(){return s("address",f(H,G)())}function H(){return s("mailbox",f(N,X)())}function N(){return s("name-addr",l(d(j),L)())}function L(){return s("angle-addr",f(l(p(d(P)),h("<"),X,h(">"),p(d(P))),oe)())}function G(){return s("group",l(j,h(":"),d(Z),h(";"),p(d(P)))())}function j(){return s("display-name",(null!==(e=s("phrase",f(ie,A(O,1))()))&&(e.semantic=function(e){return e.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(e.semantic)),e));var e}function z(){return s("mailbox-list",f(l(H,A(l(h(","),H))),ue)())}function W(){return s("address-list",f(l(K,A(l(h(","),K))),he)())}function Z(){return s("group-list",f(z,p(P),le)())}function J(){return s("local-part",f(fe,R,q)())}function V(){return s("dtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=90||94<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),pe)())}function Y(){return s("domain-literal",l(p(d(P)),h("["),A(l(d(k),V)),d(k),h("]"),p(d(P)))())}function $(){return s("domain",(t=f(de,R,Y)(),e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)));var t}function X(){return s("addr-spec",l(J,h("@"),$)())}function ee(){return e.strict?null:s("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function te(){return e.strict?null:s("obs-ctext",ee())}function re(){return e.strict?null:s("obs-qtext",ee())}function ne(){return e.strict?null:s("obs-qp",l(h("\\"),f(h("\0"),ee,I,m))())}function ie(){return e.strict?null:e.atInDisplayName?s("obs-phrase",l(O,A(f(O,h("."),h("@"),g(P))))()):s("obs-phrase",l(O,A(f(O,h("."),g(P))))())}function ae(){return e.strict?null:s("obs-FWS",A(l(p(d(b)),C),1)())}function oe(){return e.strict?null:s("obs-angle-addr",l(p(d(P)),h("<"),se,X,h(">"),p(d(P)))())}function se(){return e.strict?null:s("obs-route",l(ce,h(":"))())}function ce(){return e.strict?null:s("obs-domain-list",l(A(f(p(P),h(","))),h("@"),$,A(l(h(","),p(d(P)),d(l(h("@"),$)))))())}function ue(){return e.strict?null:s("obs-mbox-list",l(A(l(p(d(P)),h(","))),H,A(l(h(","),d(l(H,p(P))))))())}function he(){return e.strict?null:s("obs-addr-list",l(A(l(p(d(P)),h(","))),K,A(l(h(","),d(l(K,p(P))))))())}function le(){return e.strict?null:s("obs-group-list",l(A(l(p(d(P)),h(",")),1),p(d(P)))())}function fe(){return e.strict?null:s("obs-local-part",l(O,A(l(h("."),O)))())}function de(){return e.strict?null:s("obs-domain",l(U,A(l(h("."),U)))())}function pe(){return e.strict?null:s("obs-dtext",f(ee,_)())}function ge(e,t){var r,n,i;if(null==t)return null;for(n=[t];n.length>0;){if((i=n.pop()).name===e)return i;for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r])}return null}function Ae(e,t){var r,n,i,a,o;if(null==t)return null;for(n=[t],a=[],o={},r=0;r0;)if((i=n.pop()).name in o)a.push(i);else for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}function ye(t){var r,n,i,a,o;if(null===t)return null;for(r=[],n=Ae(["group","mailbox"],t),i=0;i1?null:t.addresses&&t.addresses[0]:null}(o):e.simple?o&&o.addresses:o}function me(e){var t,r=ge("display-name",e),n=[],i=Ae(["mailbox"],e);for(t=0;t0;)for("cfws"===(i=n.pop()).name&&a.push(i),r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}(0,e),i=Ae(["comment"],e),a=ge("local-part",r),o=ge("domain",r);return{node:e,parts:{name:t,address:r,local:a,domain:o,comments:n},type:e.name,name:we(t),address:we(r),local:we(a),domain:we(o),comments:ve(i),groupName:we(e.groupName)}}function we(e){return null!=e?e.semantic:null}function ve(e){var t="";if(e)for(var r=0;r`),t.userID=r.join(" "),t}read(e,t=ss){const r=Xo.decodeUTF8(e);if(r.length>t.maxUserIDLength)throw Error("User ID string is too long");try{const{name:e,address:t,comments:n}=ap.parseOneAddress({input:r,atInDisplayName:!0});this.comment=n.replace(/^\(|\)$/g,""),this.name=e,this.email=t}catch(e){}this.userID=r}write(){return Xo.encodeUTF8(this.userID)}equals(e){return e&&e.userID===this.userID}}class sp extends np{static get tag(){return Yo.packet.secretSubkey}constructor(e=new Date,t=ss){super(e,t)}}async function cp(e,t,r,n,i=new Date,a){let o,s;for(let c=e.length-1;c>=0;c--)try{(!o||e[c].created>=o.created)&&(await e[c].verify(t,r,n,i,void 0,a),o=e[c])}catch(e){s=e}if(!o)throw Xo.wrapError(`Could not find valid ${Yo.read(Yo.signature,r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((e,t,r)=>t+" "+r.toLowerCase())),s);return o}function up(e,t,r=new Date){const n=Xo.normalizeDate(r);if(null!==n){const r=dp(e,t);return!(e.created<=n&&ne.equals(i.issuerKeyID)))||i.revoked||!1,i.revoked):c.length>0}function dp(e,t){let r;return!1===t.keyNeverExpires&&(r=e.created.getTime()+1e3*t.keyExpirationTime),r?new Date(r):1/0}function pp(e,t){const r=e.algorithm;return r!==Yo.publicKey.rsaEncrypt&&r!==Yo.publicKey.elgamal&&r!==Yo.publicKey.ecdh&&r!==Yo.publicKey.x25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Yo.keyFlags.signData))}function gp(e,t){const r=e.algorithm;return r!==Yo.publicKey.dsa&&r!==Yo.publicKey.rsaSign&&r!==Yo.publicKey.ecdsa&&r!==Yo.publicKey.eddsaLegacy&&r!==Yo.publicKey.ed25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Yo.keyFlags.encryptCommunication)||0!=(t.keyFlags[0]&Yo.keyFlags.encryptStorage))}function Ap(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||!e.keyFlags||0!=(e.keyFlags[0]&Yo.keyFlags.encryptCommunication)||0!=(e.keyFlags[0]&Yo.keyFlags.encryptStorage)}function yp(e,t){const r=Yo.write(Yo.publicKey,e.algorithm),n=e.getAlgorithmInfo();if(t.rejectPublicKeyAlgorithms.has(r))throw Error(n.algorithm+" keys are considered too weak.");switch(r){case Yo.publicKey.rsaEncryptSign:case Yo.publicKey.rsaSign:case Yo.publicKey.rsaEncrypt:if(n.bitse.getKeys(s).length>0));return 0===c.length?null:(await Promise.all(c.map((async t=>{const a=await t.getSigningKey(s,e.created,void 0,n);if(e.revoked||await i.isRevoked(e,a.keyPacket,r,n))throw Error("User certificate is revoked");try{await e.verify(a.keyPacket,Yo.signature.certGeneric,o,r,void 0,n)}catch(e){throw Xo.wrapError("User certificate is invalid",e)}}))),!0)}async verifyAllCertifications(e,t=new Date,r){const n=this,i=this.selfCertifications.concat(this.otherCertifications);return Promise.all(i.map((async i=>({keyID:i.issuerKeyID,valid:await n.verifyCertificate(i,e,t,r).catch((()=>!1))}))))}async verify(e=new Date,t){if(!this.selfCertifications.length)throw Error("No self-certifications found");const r=this,n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};let a;for(let o=this.selfCertifications.length-1;o>=0;o--)try{const a=this.selfCertifications[o];if(a.revoked||await r.isRevoked(a,void 0,e,t))throw Error("Self-certification is revoked");try{await a.verify(n,Yo.signature.certGeneric,i,e,void 0,t)}catch(e){throw Xo.wrapError("Self-certification is invalid",e)}return!0}catch(e){a=e}throw a}async update(e,t,r){const n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};await lp(e,this,"selfCertifications",t,(async function(e){try{return await e.verify(n,Yo.signature.certGeneric,i,t,!1,r),!0}catch(e){return!1}})),await lp(e,this,"otherCertifications",t),await lp(e,this,"revocationSignatures",t,(function(e){return fp(n,Yo.signature.certRevocation,i,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Yo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=ss){const a={userID:this.userID,userAttribute:this.userAttribute,key:e},o=new mp(a.userID||a.userAttribute,this.mainKey);return o.revocationSignatures.push(await hp(a,null,e,{signatureType:Yo.signature.certRevocation,reasonForRevocationFlag:Yo.write(Yo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}}class bp{constructor(e,t){this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=t}toPacketList(){const e=new Yd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.bindingSignatures),e}clone(){const e=new bp(this.keyPacket,this.mainKey);return e.bindingSignatures=[...this.bindingSignatures],e.revocationSignatures=[...this.revocationSignatures],e}async isRevoked(e,t,r=new Date,n=ss){const i=this.mainKey.keyPacket;return fp(i,Yo.signature.subkeyRevocation,{key:i,bind:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verify(e=new Date,t=ss){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket},i=await cp(this.bindingSignatures,r,Yo.signature.subkeyBinding,n,e,t);if(i.revoked||await this.isRevoked(i,null,e,t))throw Error("Subkey is revoked");if(up(this.keyPacket,i,e))throw Error("Subkey is expired");return i}async getExpirationTime(e=new Date,t=ss){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket};let i;try{i=await cp(this.bindingSignatures,r,Yo.signature.subkeyBinding,n,e,t)}catch(e){return null}const a=dp(this.keyPacket,i),o=i.getExpirationTime();return ai.bindingSignatures[t].created&&(i.bindingSignatures[t]=e),!1;try{return await e.verify(n,Yo.signature.subkeyBinding,a,t,void 0,r),!0}catch(e){return!1}})),await lp(e,this,"revocationSignatures",t,(function(e){return fp(n,Yo.signature.subkeyRevocation,a,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Yo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=ss){const a={key:e,bind:this.keyPacket},o=new bp(this.keyPacket,this.mainKey);return o.revocationSignatures.push(await hp(a,null,e,{signatureType:Yo.signature.subkeyRevocation,reasonForRevocationFlag:Yo.write(Yo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((e=>{bp.prototype[e]=function(){return this.keyPacket[e]()}}));const wp=Xo.constructAllowedPackets([Wd]),vp=new Set([Yo.packet.publicKey,Yo.packet.privateKey]),Ip=new Set([Yo.packet.publicKey,Yo.packet.privateKey,Yo.packet.publicSubkey,Yo.packet.privateSubkey]);class Ep{packetListToStructure(e,t=new Set){let r,n,i,a;for(const o of e){if(o instanceof Al){Ip.has(o.tag)&&!a&&(a=vp.has(o.tag)?vp:Ip);continue}const e=o.constructor.tag;if(a){if(!a.has(e))continue;a=null}if(t.has(e))throw Error("Unexpected packet type: "+e);switch(e){case Yo.packet.publicKey:case Yo.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=o,n=this.getKeyID(),!n)throw Error("Missing Key ID");break;case Yo.packet.userID:case Yo.packet.userAttribute:r=new mp(o,this),this.users.push(r);break;case Yo.packet.publicSubkey:case Yo.packet.secretSubkey:r=null,i=new bp(o,this),this.subkeys.push(i);break;case Yo.packet.signature:switch(o.signatureType){case Yo.signature.certGeneric:case Yo.signature.certPersona:case Yo.signature.certCasual:case Yo.signature.certPositive:if(!r){Xo.printDebug("Dropping certification signatures without preceding user packet");continue}o.issuerKeyID.equals(n)?r.selfCertifications.push(o):r.otherCertifications.push(o);break;case Yo.signature.certRevocation:r?r.revocationSignatures.push(o):this.directSignatures.push(o);break;case Yo.signature.key:this.directSignatures.push(o);break;case Yo.signature.subkeyBinding:if(!i){Xo.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}i.bindingSignatures.push(o);break;case Yo.signature.keyRevocation:this.revocationSignatures.push(o);break;case Yo.signature.subkeyRevocation:if(!i){Xo.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}i.revocationSignatures.push(o)}}}}toPacketList(){const e=new Yd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map((t=>e.push(...t.toPacketList()))),this.subkeys.map((t=>e.push(...t.toPacketList()))),e}clone(e=!1){const t=new this.constructor(this.toPacketList());return e&&t.getKeys().forEach((e=>{if(e.keyPacket=Object.create(Object.getPrototypeOf(e.keyPacket),Object.getOwnPropertyDescriptors(e.keyPacket)),!e.keyPacket.isDecrypted())return;const t={};Object.keys(e.keyPacket.privateParams).forEach((r=>{t[r]=new Uint8Array(e.keyPacket.privateParams[r])})),e.keyPacket.privateParams=t})),t}getSubkeys(e=null){return this.subkeys.filter((t=>!e||t.getKeyID().equals(e,!0)))}getKeys(e=null){const t=[];return e&&!this.getKeyID().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map((e=>e.getKeyID()))}getUserIDs(){return this.users.map((e=>e.userID?e.userID.userID:null)).filter((e=>null!==e))}write(){return this.toPacketList().write()}async getSigningKey(e=null,t=new Date,r={},n=ss){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await cp(r.bindingSignatures,i,Yo.signature.subkeyBinding,e,t,n);if(!pp(r.keyPacket,a))continue;if(!a.embeddedSignature)throw Error("Missing embedded signature");return await cp([a.embeddedSignature],r.keyPacket,Yo.signature.keyBinding,e,t,n),yp(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&pp(i,a.selfCertification))return yp(i,n),this}catch(e){o=e}throw Xo.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),o)}async getEncryptionKey(e,t=new Date,r={},n=ss){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await cp(r.bindingSignatures,i,Yo.signature.subkeyBinding,e,t,n);if(gp(r.keyPacket,a))return yp(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&gp(i,a.selfCertification))return yp(i,n),this}catch(e){o=e}throw Xo.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),o)}async isRevoked(e,t,r=new Date,n=ss){return fp(this.keyPacket,Yo.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verifyPrimaryKey(e=new Date,t={},r=ss){const n=this.keyPacket;if(await this.isRevoked(null,null,e,r))throw Error("Primary key is revoked");const{selfCertification:i}=await this.getPrimaryUser(e,t,r);if(up(n,i,e))throw Error("Primary key is expired");const a=await cp(this.directSignatures,n,Yo.signature.key,{key:n},e,r).catch((()=>{}));if(a&&up(n,a,e))throw Error("Primary key is expired")}async getExpirationTime(e,t=ss){let r;try{const{selfCertification:n}=await this.getPrimaryUser(null,e,t),i=dp(this.keyPacket,n),a=n.getExpirationTime(),o=await cp(this.directSignatures,this.keyPacket,Yo.signature.key,{key:this.keyPacket},null,t).catch((()=>{}));if(o){const e=dp(this.keyPacket,o);r=Math.min(i,a,e)}else r=ie.subkeys.some((e=>t.hasSameFingerprintAs(e))))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,r)}const n=this.clone();return await lp(e,n,"revocationSignatures",t,(i=>fp(n.keyPacket,Yo.signature.keyRevocation,n,[i],null,e.keyPacket,t,r))),await lp(e,n,"directSignatures",t),await Promise.all(e.users.map((async e=>{const i=n.users.filter((t=>e.userID&&e.userID.equals(t.userID)||e.userAttribute&&e.userAttribute.equals(t.userAttribute)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.users.push(t)}}))),await Promise.all(e.subkeys.map((async e=>{const i=n.subkeys.filter((t=>t.hasSameFingerprintAs(e)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.subkeys.push(t)}}))),n}async getRevocationCertificate(e=new Date,t=ss){const r={key:this.keyPacket},n=await cp(this.revocationSignatures,this.keyPacket,Yo.signature.keyRevocation,r,e,t),i=new Yd;return i.push(n),As(Yo.armor.publicKey,i.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,t=new Date,r=ss){const n=await gs(e,r),i=(await Yd.fromBinary(n.data,wp,r)).findPacket(Yo.packet.signature);if(!i||i.signatureType!==Yo.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!i.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await i.verify(this.keyPacket,Yo.signature.keyRevocation,{key:this.keyPacket},t,void 0,r)}catch(e){throw Xo.wrapError("Could not verify revocation signature",e)}const a=this.clone();return a.revocationSignatures.push(i),a}async signPrimaryUser(e,t,r,n=ss){const{index:i,user:a}=await this.getPrimaryUser(t,r,n),o=await a.certify(e,t,n),s=this.clone();return s.users[i]=o,s}async signAllUsers(e,t=new Date,r=ss){const n=this.clone();return n.users=await Promise.all(this.users.map((function(n){return n.certify(e,t,r)}))),n}async verifyPrimaryUser(e,t=new Date,r,n=ss){const i=this.keyPacket,{user:a}=await this.getPrimaryUser(t,r,n);return e?await a.verifyAllCertifications(e,t,n):[{keyID:i.getKeyID(),valid:await a.verify(t,n).catch((()=>!1))}]}async verifyAllUsers(e,t=new Date,r=ss){const n=this.keyPacket,i=[];return await Promise.all(this.users.map((async a=>{const o=e?await a.verifyAllCertifications(e,t,r):[{keyID:n.getKeyID(),valid:await a.verify(t,r).catch((()=>!1))}];i.push(...o.map((e=>({userID:a.userID?a.userID.userID:null,userAttribute:a.userAttribute,keyID:e.keyID,valid:e.valid}))))}))),i}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((e=>{Ep.prototype[e]=bp.prototype[e]}));class Bp extends Ep{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([Yo.packet.secretKey,Yo.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=ss){return As(Yo.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class Cp extends Bp{constructor(e){if(super(),this.packetListToStructure(e,new Set([Yo.packet.publicKey,Yo.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new Yd,t=this.toPacketList();for(const r of t)switch(r.constructor.tag){case Yo.packet.secretKey:{const t=ep.fromSecretKeyPacket(r);e.push(t);break}case Yo.packet.secretSubkey:{const t=tp.fromSecretSubkeyPacket(r);e.push(t);break}default:e.push(r)}return new Bp(e)}armor(e=ss){return As(Yo.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,t=new Date,r={},n=ss){const i=this.keyPacket,a=[];for(let r=0;re.isDecrypted()))}async validate(e=ss){if(!this.isPrivate())throw Error("Cannot validate a public key");let t;if(this.keyPacket.isDummy()){const r=await this.getSigningKey(null,null,void 0,{...e,rejectPublicKeyAlgorithms:new Set,minRSABits:0});r&&!r.keyPacket.isDummy()&&(t=r.keyPacket)}else t=this.keyPacket;if(t)return t.validate();{const e=this.getKeys(),t=e.map((e=>e.keyPacket.isDummy())).every(Boolean);if(t)throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(e.map((async e=>e.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()}))}async revoke({flag:e=Yo.reasonForRevocation.noReason,string:t=""}={},r=new Date,n=ss){if(!this.isPrivate())throw Error("Need private key for revoking");const i={key:this.keyPacket},a=this.clone();return a.revocationSignatures.push(await hp(i,null,this.keyPacket,{signatureType:Yo.signature.keyRevocation,reasonForRevocationFlag:Yo.write(Yo.reasonForRevocation,e),reasonForRevocationString:t},r,void 0,void 0,void 0,n)),a}async addSubkey(e={}){const t={...ss,...e.config};if(e.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(e.rsaBits0&&(a.keyExpirationTime=r.keyExpirationTime,a.keyNeverExpires=!1),await hp(i,null,t,a,r.date,void 0,void 0,void 0,n)}(i,r,e,t),o=this.toPacketList();return o.push(i,a),new Cp(o)}}const _p=Xo.constructAllowedPackets([ep,tp,np,sp,op,rp,Wd]);async function kp({armoredKey:e,binaryKey:t,config:r,...n}){if(r={...ss,...r},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!Xo.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!Xo.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const i=Object.keys(n);if(i.length>0)throw Error("Unknown option: "+i.join(", "));let a;if(e){const{type:t,data:n}=await gs(e,r);if(t!==Yo.armor.publicKey&&t!==Yo.armor.privateKey)throw Error("Armored text not of type key");a=n}else a=t;return function(e){for(const t of e)switch(t.constructor.tag){case Yo.packet.secretKey:return new Cp(e);case Yo.packet.publicKey:return new Bp(e)}throw Error("No key packet found")}(await Yd.fromBinary(a,_p,r))}Object.keys(ss).length;const Sp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function Qp(){}const xp="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function Pp(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Mp=Qp,Up=Promise,Dp=Promise.prototype.then,Rp=Promise.resolve.bind(Up),Fp=Promise.reject.bind(Up);function Tp(e){return new Up(e)}function qp(e){return Rp(e)}function Op(e){return Fp(e)}function Kp(e,t,r){return Dp.call(e,t,r)}function Hp(e,t,r){Kp(Kp(e,t,r),void 0,Mp)}function Np(e,t){Hp(e,t)}function Lp(e,t){Hp(e,void 0,t)}function Gp(e,t,r){return Kp(e,t,r)}function jp(e){Kp(e,void 0,Mp)}const zp=(()=>{const e=xp&&xp.queueMicrotask;if("function"==typeof e)return e;const t=qp(void 0);return e=>Kp(t,e)})();function Wp(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Zp(e,t,r){try{return qp(Wp(e,t,r))}catch(e){return Op(e)}}class Jp{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,a=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}function Vp(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?eg(e):"closed"===t._state?function(e){eg(e),ng(e)}(e):tg(e,t._storedError)}function Yp(e,t){return My(e._ownerReadableStream,t)}function $p(e){"readable"===e._ownerReadableStream._state?rg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){tg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function Xp(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function eg(e){e._closedPromise=Tp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function tg(e,t){eg(e),rg(e,t)}function rg(e,t){void 0!==e._closedPromise_reject&&(jp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function ng(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const ig=Sp("[[AbortSteps]]"),ag=Sp("[[ErrorSteps]]"),og=Sp("[[CancelSteps]]"),sg=Sp("[[PullSteps]]"),cg=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},ug=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function hg(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(t+" is not an object.");var r}function lg(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function fg(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function dg(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function pg(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function gg(e){return Number(e)}function Ag(e){return 0===e?0:e}function yg(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=Ag(n),!cg(n))throw new TypeError(t+" is not a finite number");if(n=function(e){return Ag(ug(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return cg(n)&&0!==n?n:0}function mg(e,t){if(!xy(e))throw new TypeError(t+" is not a ReadableStream.")}function bg(e){return new Bg(e)}function wg(e,t){e._reader._readRequests.push(t)}function vg(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function Ig(e){return e._reader._readRequests.length}function Eg(e){const t=e._reader;return void 0!==t&&!!Cg(t)}class Bg{constructor(e){if(dg(e,1,"ReadableStreamDefaultReader"),mg(e,"First parameter"),Py(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Vp(this,e),this._readRequests=new Jp}get closed(){return Cg(this)?this._closedPromise:Op(kg("closed"))}cancel(e=void 0){return Cg(this)?void 0===this._ownerReadableStream?Op(Xp("cancel")):Yp(this,e):Op(kg("cancel"))}read(){if(!Cg(this))return Op(kg("read"));if(void 0===this._ownerReadableStream)return Op(Xp("read from"));let e,t;const r=Tp(((r,n)=>{e=r,t=n}));return _g(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!Cg(this))throw kg("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$p(this)}}}function Cg(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function _g(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[sg](t)}function kg(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let Sg;Object.defineProperties(Bg.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Bg.prototype,Sp.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof Sp.asyncIterator&&(Sg={[Sp.asyncIterator](){return this}},Object.defineProperty(Sg,Sp.asyncIterator,{enumerable:!1}));class Qg{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Gp(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Gp(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(void 0===e._ownerReadableStream)return Op(Xp("iterate"));let t,r;const n=Tp(((e,n)=>{t=e,r=n}));return _g(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,zp((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,$p(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,$p(e),r(t)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t._ownerReadableStream)return Op(Xp("finish iterating"));if(!this._preventCancel){const r=Yp(t,e);return $p(t),Gp(r,(()=>({value:e,done:!0})))}return $p(t),qp({value:e,done:!0})}}const xg={next(){return Pg(this)?this._asyncIteratorImpl.next():Op(Mg("next"))},return(e){return Pg(this)?this._asyncIteratorImpl.return(e):Op(Mg("return"))}};function Pg(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function Mg(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}void 0!==Sg&&Object.setPrototypeOf(xg,Sg);const Ug=Number.isNaN||function(e){return e!=e};function Dg(e){return!!function(e){return"number"==typeof e&&(!Ug(e)&&!(e<0))}(e)&&e!==1/0}function Rg(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Fg(e,t,r){if(!Dg(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Tg(e){e._queue=new Jp,e._queueTotalSize=0}function qg(e){return e.slice()}class Og{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ng(this))throw nA("view");return this._view}respond(e){if(!Ng(this))throw nA("respond");if(dg(e,1,"respond"),e=yg(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!Dg(t=Number(t)))throw new RangeError("bytesWritten must be a finite");$g(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Ng(this))throw nA("respondWithNewView");if(dg(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){const r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,$g(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(Og.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Og.prototype,Sp.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Kg{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Hg(this))throw iA("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Og.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest}get desiredSize(){if(!Hg(this))throw iA("desiredSize");return rA(this)}close(){if(!Hg(this))throw iA("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw tA(e,t),t}eA(e),Uy(t)}}(this)}enqueue(e){if(!Hg(this))throw iA("enqueue");if(dg(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,a=t.byteLength,o=n;Eg(r)?0===Ig(r)?zg(e,o,i,a):vg(r,new Uint8Array(o,i,a),!1):sA(r)?(zg(e,o,i,a),Yg(e)):zg(e,o,i,a),Lg(e)}(this,e)}error(e=void 0){if(!Hg(this))throw iA("error");tA(this,e)}[og](e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),Tg(this);const t=this._cancelAlgorithm(e);return eA(this),t}[sg](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();this._queueTotalSize-=t.byteLength,Jg(this);const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return void e._chunkSteps(r)}const r=this._autoAllocateChunkSize;if(void 0!==r){let n;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:n,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}wg(t,e),Lg(this)}}function Hg(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Ng(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Lg(e){const t=function(e){const t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Eg(t)&&Ig(t)>0)return!0;if(sA(t)&&oA(t)>0)return!0;return rA(e)>0}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Hp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Lg(e))}),(t=>{tA(e,t)}))))}function Gg(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=jg(t);"default"===t.readerType?vg(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function jg(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function zg(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Wg(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r;let s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);const u=e._queue;for(;s>0;){const r=u.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;h=t.buffer,l=i,f=r.buffer,d=r.byteOffset,p=n,new Uint8Array(h).set(new Uint8Array(f,d,p),l),r.byteLength===n?u.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,Zg(e,n,t),s-=n}var h,l,f,d,p;return c}function Zg(e,t,r){Vg(e),r.bytesFilled+=t}function Jg(e){0===e._queueTotalSize&&e._closeRequested?(eA(e),Uy(e._controlledReadableByteStream)):Lg(e)}function Vg(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Yg(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();Wg(e,t)&&(Xg(e),Gg(e._controlledReadableByteStream,t))}}function $g(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=t.buffer;const r=e._controlledReadableByteStream;if(sA(r))for(;oA(r)>0;)Gg(r,Xg(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Zg(e,t,r),r.bytesFilled0){const t=r.byteOffset+r.bytesFilled,i=r.buffer.slice(t-n,t);zg(e,i,0,i.byteLength)}r.buffer=r.buffer,r.bytesFilled-=n,Gg(e._controlledReadableByteStream,r),Yg(e)}(e,t,r);Lg(e)}function Xg(e){const t=e._pendingPullIntos.shift();return Vg(e),t}function eA(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function tA(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(function(e){Vg(e),e._pendingPullIntos=new Jp}(e),Tg(e),eA(e),Dy(r,t))}function rA(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function nA(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function iA(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function aA(e,t){e._reader._readIntoRequests.push(t)}function oA(e){return e._reader._readIntoRequests.length}function sA(e){const t=e._reader;return void 0!==t&&!!uA(t)}Object.defineProperties(Kg.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Kg.prototype,Sp.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class cA{constructor(e){if(dg(e,1,"ReadableStreamBYOBReader"),mg(e,"First parameter"),Py(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Hg(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Vp(this,e),this._readIntoRequests=new Jp}get closed(){return uA(this)?this._closedPromise:Op(hA("closed"))}cancel(e=void 0){return uA(this)?void 0===this._ownerReadableStream?Op(Xp("cancel")):Yp(this,e):Op(hA("cancel"))}read(e){if(!uA(this))return Op(hA("read"));if(!ArrayBuffer.isView(e))return Op(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return Op(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return Op(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return Op(Xp("read from"));let t,r;const n=Tp(((e,n)=>{t=e,r=n}));return function(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,o={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),void aA(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Wg(e,o)){const t=jg(o);return Jg(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return tA(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(o),aA(n,r),Lg(e)}else{const e=new a(o.buffer,o.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!uA(this))throw hA("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$p(this)}}}function uA(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function hA(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function lA(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(Ug(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function fA(e){const{size:t}=e;return t||(()=>1)}function dA(e,t){hg(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:gg(r),size:void 0===n?void 0:pA(n,t+" has member 'size' that")}}function pA(e,t){return lg(e,t),t=>gg(e(t))}function gA(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function AA(e,t,r){return lg(e,r),()=>Zp(e,t,[])}function yA(e,t,r){return lg(e,r),r=>Wp(e,t,[r])}function mA(e,t,r){return lg(e,r),(r,n)=>Zp(e,t,[r,n])}function bA(e,t){if(!EA(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(cA.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(cA.prototype,Sp.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class wA{constructor(e={},t={}){void 0===e?e=null:fg(e,"First parameter");const r=dA(t,"Second parameter"),n=function(e,t){hg(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,a=null==e?void 0:e.type,o=null==e?void 0:e.write;return{abort:void 0===r?void 0:gA(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:AA(n,e,t+" has member 'close' that"),start:void 0===i?void 0:yA(i,e,t+" has member 'start' that"),write:void 0===o?void 0:mA(o,e,t+" has member 'write' that"),type:a}}(e,"First parameter");if(IA(this),void 0!==n.type)throw new RangeError("Invalid type is specified");const i=fA(r);!function(e,t,r,n){const i=Object.create(KA.prototype);let a=()=>{},o=()=>qp(void 0),s=()=>qp(void 0),c=()=>qp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.write&&(o=e=>t.write(e,i)),void 0!==t.close&&(s=()=>t.close()),void 0!==t.abort&&(c=e=>t.abort(e)),HA(e,i,a,o,s,c,r,n)}(this,n,lA(r,1),i)}get locked(){if(!EA(this))throw ZA("locked");return BA(this)}abort(e=void 0){return EA(this)?BA(this)?Op(new TypeError("Cannot abort a stream that already has a writer")):CA(this,e):Op(ZA("abort"))}close(){return EA(this)?BA(this)?Op(new TypeError("Cannot close a stream that already has a writer")):xA(this)?Op(new TypeError("Cannot close an already-closing stream")):_A(this):Op(ZA("close"))}getWriter(){if(!EA(this))throw ZA("getWriter");return vA(this)}}function vA(e){return new UA(e)}function IA(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new Jp,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function EA(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function BA(e){return void 0!==e._writer}function CA(e,t){const r=e._state;if("closed"===r||"errored"===r)return qp(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let n=!1;"erroring"===r&&(n=!0,t=void 0);const i=Tp(((r,i)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,n||SA(e,t),i}function _A(e){const t=e._state;if("closed"===t||"errored"===t)return Op(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=Tp(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&ay(n),Fg(i=e._writableStreamController,OA,0),GA(i),r}function kA(e,t){"writable"!==e._state?QA(e):SA(e,t)}function SA(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&FA(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&QA(e)}function QA(e){e._state="errored",e._writableStreamController[ag]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Jp,void 0===e._pendingAbortRequest)return void PA(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void PA(e);Hp(e._writableStreamController[ig](r._reason),(()=>{r._resolve(),PA(e)}),(t=>{r._reject(t),PA(e)}))}function xA(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function PA(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&XA(t,e._storedError)}function MA(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){ty(e)}(r):ay(r)),e._backpressure=t}Object.defineProperties(wA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(wA.prototype,Sp.toStringTag,{value:"WritableStream",configurable:!0});class UA{constructor(e){if(dg(e,1,"WritableStreamDefaultWriter"),bA(e,"First parameter"),BA(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!xA(e)&&e._backpressure?ty(this):ny(this),YA(this);else if("erroring"===t)ry(this,e._storedError),YA(this);else if("closed"===t)ny(this),YA(this),ey(this);else{const t=e._storedError;ry(this,t),$A(this,t)}}get closed(){return DA(this)?this._closedPromise:Op(JA("closed"))}get desiredSize(){if(!DA(this))throw JA("desiredSize");if(void 0===this._ownerWritableStream)throw VA("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:LA(t._writableStreamController)}(this)}get ready(){return DA(this)?this._readyPromise:Op(JA("ready"))}abort(e=void 0){return DA(this)?void 0===this._ownerWritableStream?Op(VA("abort")):function(e,t){return CA(e._ownerWritableStream,t)}(this,e):Op(JA("abort"))}close(){if(!DA(this))return Op(JA("close"));const e=this._ownerWritableStream;return void 0===e?Op(VA("close")):xA(e)?Op(new TypeError("Cannot close an already-closing stream")):RA(this)}releaseLock(){if(!DA(this))throw JA("releaseLock");void 0!==this._ownerWritableStream&&TA(this)}write(e=void 0){return DA(this)?void 0===this._ownerWritableStream?Op(VA("write to")):qA(this,e):Op(JA("write"))}}function DA(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function RA(e){return _A(e._ownerWritableStream)}function FA(e,t){"pending"===e._readyPromiseState?iy(e,t):function(e,t){ry(e,t)}(e,t)}function TA(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");FA(e,r),function(e,t){"pending"===e._closedPromiseState?XA(e,t):function(e,t){$A(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function qA(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return jA(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Op(VA("write to"));const a=r._state;if("errored"===a)return Op(r._storedError);if(xA(r)||"closed"===a)return Op(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Op(r._storedError);const o=function(e){return Tp(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{Fg(e,t,r)}catch(t){return void jA(e,t)}const n=e._controlledWritableStream;xA(n)||"writable"!==n._state||MA(n,zA(e)),GA(e)}(n,t,i),o}Object.defineProperties(UA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(UA.prototype,Sp.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const OA={};class KA{constructor(){throw new TypeError("Illegal constructor")}error(e=void 0){if(!function(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&WA(this,e)}[ig](e){const t=this._abortAlgorithm(e);return NA(this),t}[ag](){Tg(this)}}function HA(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Tg(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;const c=zA(t);MA(e,c),Hp(qp(r()),(()=>{t._started=!0,GA(t)}),(r=>{t._started=!0,kA(e,r)}))}function NA(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function LA(e){return e._strategyHWM-e._queueTotalSize}function GA(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void QA(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===OA?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Rg(e);const r=e._closeAlgorithm();NA(e),Hp(r,(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&ey(t)}(t)}),(e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),kA(e,t)}(t,e)}))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r);Hp(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(Rg(e),!xA(r)&&"writable"===t){const t=zA(e);MA(r,t)}GA(e)}),(t=>{"writable"===r._state&&NA(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,kA(e,t)}(r,t)}))}(e,r)}function jA(e,t){"writable"===e._controlledWritableStream._state&&WA(e,t)}function zA(e){return LA(e)<=0}function WA(e,t){const r=e._controlledWritableStream;NA(e),SA(r,t)}function ZA(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function JA(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function VA(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function YA(e){e._closedPromise=Tp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function $A(e,t){YA(e),XA(e,t)}function XA(e,t){void 0!==e._closedPromise_reject&&(jp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function ey(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function ty(e){e._readyPromise=Tp(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function ry(e,t){ty(e),iy(e,t)}function ny(e){ty(e),ay(e)}function iy(e,t){void 0!==e._readyPromise_reject&&(jp(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function ay(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(KA.prototype,{error:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(KA.prototype,Sp.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const oy="undefined"!=typeof DOMException?DOMException:void 0,sy=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(oy)?oy:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(e.prototype=Object.create(Error.prototype),"constructor",{value:e,writable:!0,configurable:!0}),e}();function cy(e,t,r,n,i,a){const o=bg(e),s=vA(t);e._disturbed=!0;let c=!1,u=qp(void 0);return Tp(((h,l)=>{let f;if(void 0!==a){if(f=()=>{const r=new sy("Aborted","AbortError"),a=[];n||a.push((()=>"writable"===t._state?CA(t,r):qp(void 0))),i||a.push((()=>"readable"===e._state?My(e,r):qp(void 0))),g((()=>Promise.all(a.map((e=>e())))),!0,r)},a.aborted)return void f();a.addEventListener("abort",f)}if(p(e,o._closedPromise,(e=>{n?A(!0,e):g((()=>CA(t,e)),!0,e)})),p(t,s._closedPromise,(t=>{i?A(!0,t):g((()=>My(e,t)),!0,t)})),function(e,t,r){"closed"===e._state?r():Np(t,r)}(e,o._closedPromise,(()=>{r?A():g((()=>function(e){const t=e._ownerWritableStream,r=t._state;return xA(t)||"closed"===r?qp(void 0):"errored"===r?Op(t._storedError):RA(e)}(s)))})),xA(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");i?A(!0,t):g((()=>My(e,t)),!0,t)}function d(){const e=u;return Kp(u,(()=>e!==u?d():void 0))}function p(e,t,r){"errored"===e._state?r(e._storedError):Lp(t,r)}function g(e,r,n){function i(){Hp(e(),(()=>y(r,n)),(e=>y(!0,e)))}c||(c=!0,"writable"!==t._state||xA(t)?i():Np(d(),i))}function A(e,r){c||(c=!0,"writable"!==t._state||xA(t)?y(e,r):Np(d(),(()=>y(e,r))))}function y(e,t){TA(s),$p(o),void 0!==a&&a.removeEventListener("abort",f),e?l(t):h(void 0)}jp(Tp(((e,t)=>{!function r(n){n?e():Kp(c?qp(!0):Kp(s._readyPromise,(()=>Tp(((e,t)=>{_g(o,{_chunkSteps:t=>{u=Kp(qA(s,t),void 0,Qp),e(!1)},_closeSteps:()=>e(!0),_errorSteps:t})})))),r,t)}(!1)})))}))}class uy{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!hy(this))throw wy("desiredSize");return yy(this)}close(){if(!hy(this))throw wy("close");if(!my(this))throw new TypeError("The stream is not in a state that permits close");py(this)}enqueue(e=void 0){if(!hy(this))throw wy("enqueue");if(!my(this))throw new TypeError("The stream is not in a state that permits enqueue");return gy(this,e)}error(e=void 0){if(!hy(this))throw wy("error");Ay(this,e)}[og](e){Tg(this);const t=this._cancelAlgorithm(e);return dy(this),t}[sg](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=Rg(this);this._closeRequested&&0===this._queue.length?(dy(this),Uy(t)):ly(this),e._chunkSteps(r)}else wg(t,e),ly(this)}}function hy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function ly(e){fy(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Hp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,ly(e))}),(t=>{Ay(e,t)}))))}function fy(e){const t=e._controlledReadableStream;return!!my(e)&&(!!e._started&&(!!(Py(t)&&Ig(t)>0)||yy(e)>0))}function dy(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function py(e){if(!my(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(dy(e),Uy(t))}function gy(e,t){if(!my(e))return;const r=e._controlledReadableStream;if(Py(r)&&Ig(r)>0)vg(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw Ay(e,t),t}try{Fg(e,t,r)}catch(t){throw Ay(e,t),t}}ly(e)}function Ay(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(Tg(e),dy(e),Dy(r,t))}function yy(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function my(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function by(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Tg(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,Hp(qp(r()),(()=>{t._started=!0,ly(t)}),(e=>{Ay(t,e)}))}function wy(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function vy(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function Iy(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function Ey(e,t,r){return lg(e,r),r=>Wp(e,t,[r])}function By(e,t){if("bytes"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function Cy(e,t){if("byob"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function _y(e,t){hg(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal;return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(a,t+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!n,preventClose:!!i,signal:a}}Object.defineProperties(uy.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(uy.prototype,Sp.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class ky{constructor(e={},t={}){void 0===e?e=null:fg(e,"First parameter");const r=dA(t,"Second parameter"),n=function(e,t){hg(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,o=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:yg(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===i?void 0:vy(i,r,t+" has member 'cancel' that"),pull:void 0===a?void 0:Iy(a,r,t+" has member 'pull' that"),start:void 0===o?void 0:Ey(o,r,t+" has member 'start' that"),type:void 0===s?void 0:By(s,t+" has member 'type' that")}}(e,"First parameter");if(Qy(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(Kg.prototype);let i=()=>{},a=()=>qp(void 0),o=()=>qp(void 0);void 0!==t.start&&(i=()=>t.start(n)),void 0!==t.pull&&(a=()=>t.pull(n)),void 0!==t.cancel&&(o=e=>t.cancel(e));const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Tg(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new Jp,e._readableStreamController=t,Hp(qp(r()),(()=>{t._started=!0,Lg(t)}),(e=>{tA(t,e)}))}(e,n,i,a,o,r,s)}(this,n,lA(r,0))}else{const e=fA(r);!function(e,t,r,n){const i=Object.create(uy.prototype);let a=()=>{},o=()=>qp(void 0),s=()=>qp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.pull&&(o=()=>t.pull(i)),void 0!==t.cancel&&(s=e=>t.cancel(e)),by(e,i,a,o,s,r,n)}(this,n,lA(r,1),e)}}get locked(){if(!xy(this))throw Ry("locked");return Py(this)}cancel(e=void 0){return xy(this)?Py(this)?Op(new TypeError("Cannot cancel a stream that already has a reader")):My(this,e):Op(Ry("cancel"))}getReader(e=void 0){if(!xy(this))throw Ry("getReader");const t=function(e,t){hg(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:Cy(r,t+" has member 'mode' that")}}(e,"First parameter");return void 0===t.mode?bg(this):function(e){return new cA(e)}(this)}pipeThrough(e,t={}){if(!xy(this))throw Ry("pipeThrough");dg(e,1,"pipeThrough");const r=function(e,t){hg(e,t);const r=null==e?void 0:e.readable;pg(r,"readable","ReadableWritablePair"),mg(r,t+" has member 'readable' that");const n=null==e?void 0:e.writable;return pg(n,"writable","ReadableWritablePair"),bA(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=_y(t,"Second parameter");if(Py(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(BA(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return jp(cy(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!xy(this))return Op(Ry("pipeTo"));if(void 0===e)return Op("Parameter 1 is required in 'pipeTo'.");if(!EA(e))return Op(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=_y(t,"Second parameter")}catch(e){return Op(e)}return Py(this)?Op(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):BA(e)?Op(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):cy(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!xy(this))throw Ry("tee");const e=function(e,t){const r=bg(e);let n,i,a,o,s,c=!1,u=!1,h=!1;const l=Tp((e=>{s=e}));function f(){return c||(c=!0,_g(r,{_chunkSteps:e=>{zp((()=>{c=!1;const t=e,r=e;u||gy(a._readableStreamController,t),h||gy(o._readableStreamController,r)}))},_closeSteps:()=>{c=!1,u||py(a._readableStreamController),h||py(o._readableStreamController),u&&h||s(void 0)},_errorSteps:()=>{c=!1}})),qp(void 0)}function d(){}return a=Sy(d,f,(function(t){if(u=!0,n=t,h){const t=qg([n,i]),r=My(e,t);s(r)}return l})),o=Sy(d,f,(function(t){if(h=!0,i=t,u){const t=qg([n,i]),r=My(e,t);s(r)}return l})),Lp(r._closedPromise,(e=>{Ay(a._readableStreamController,e),Ay(o._readableStreamController,e),u&&h||s(void 0)})),[a,o]}(this);return qg(e)}values(e=void 0){if(!xy(this))throw Ry("values");return function(e,t){const r=bg(e),n=new Qg(r,t),i=Object.create(xg);return i._asyncIteratorImpl=n,i}(this,function(e,t){return hg(e,"First parameter"),{preventCancel:!!(null==e?void 0:e.preventCancel)}}(e).preventCancel)}}function Sy(e,t,r,n=1,i=(()=>1)){const a=Object.create(ky.prototype);return Qy(a),by(a,Object.create(uy.prototype),e,t,r,n,i),a}function Qy(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function xy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Py(e){return void 0!==e._reader}function My(e,t){return e._disturbed=!0,"closed"===e._state?qp(void 0):"errored"===e._state?Op(e._storedError):(Uy(e),Gp(e._readableStreamController[og](t),Qp))}function Uy(e){e._state="closed";const t=e._reader;void 0!==t&&(ng(t),Cg(t)&&(t._readRequests.forEach((e=>{e._closeSteps()})),t._readRequests=new Jp))}function Dy(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(rg(r,t),Cg(r)?(r._readRequests.forEach((e=>{e._errorSteps(t)})),r._readRequests=new Jp):(r._readIntoRequests.forEach((e=>{e._errorSteps(t)})),r._readIntoRequests=new Jp))}function Ry(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Fy(e,t){hg(e,t);const r=null==e?void 0:e.highWaterMark;return pg(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:gg(r)}}Object.defineProperties(ky.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(ky.prototype,Sp.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof Sp.asyncIterator&&Object.defineProperty(ky.prototype,Sp.asyncIterator,{value:ky.prototype.values,writable:!0,configurable:!0});const Ty=function(e){return e.byteLength};class qy{constructor(e){dg(e,1,"ByteLengthQueuingStrategy"),e=Fy(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Ky(this))throw Oy("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Ky(this))throw Oy("size");return Ty}}function Oy(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Ky(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(qy.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(qy.prototype,Sp.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Hy=function(){return 1};class Ny{constructor(e){dg(e,1,"CountQueuingStrategy"),e=Fy(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Gy(this))throw Ly("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Gy(this))throw Ly("size");return Hy}}function Ly(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Gy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function jy(e,t,r){return lg(e,r),r=>Zp(e,t,[r])}function zy(e,t,r){return lg(e,r),r=>Wp(e,t,[r])}function Wy(e,t,r){return lg(e,r),(r,n)=>Zp(e,t,[r,n])}Object.defineProperties(Ny.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Ny.prototype,Sp.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Zy{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=dA(t,"Second parameter"),i=dA(r,"Third parameter"),a=function(e,t){hg(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,a=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:jy(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===i?void 0:zy(i,e,t+" has member 'start' that"),transform:void 0===a?void 0:Wy(a,e,t+" has member 'transform' that"),writableType:o}}(e,"First parameter");if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified");const o=lA(i,0),s=fA(i),c=lA(n,1),u=fA(n);let h;!function(e,t,r,n,i,a){function o(){return t}e._writable=function(e,t,r,n,i=1,a=(()=>1)){const o=Object.create(wA.prototype);return IA(o),HA(o,Object.create(KA.prototype),e,t,r,n,i,a),o}(o,(function(t){return function(e,t){const r=e._transformStreamController;return e._backpressure?Gp(e._backpressureChangePromise,(()=>{const n=e._writable;if("erroring"===n._state)throw n._storedError;return nm(r,t)})):nm(r,t)}(e,t)}),(function(){return function(e){const t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return tm(r),Gp(n,(()=>{if("errored"===t._state)throw t._storedError;py(t._readableStreamController)}),(r=>{throw Vy(e,r),t._storedError}))}(e)}),(function(t){return function(e,t){return Vy(e,t),qp(void 0)}(e,t)}),r,n),e._readable=Sy(o,(function(){return function(e){return $y(e,!1),e._backpressureChangePromise}(e)}),(function(t){return Yy(e,t),qp(void 0)}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,$y(e,!0),e._transformStreamController=void 0}(this,Tp((e=>{h=e})),c,u,o,s),function(e,t){const r=Object.create(Xy.prototype);let n=e=>{try{return rm(r,e),qp(void 0)}catch(e){return Op(e)}},i=()=>qp(void 0);void 0!==t.transform&&(n=e=>t.transform(e,r)),void 0!==t.flush&&(i=()=>t.flush(r)),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,a),void 0!==a.start?h(a.start(this._transformStreamController)):h(void 0)}get readable(){if(!Jy(this))throw am("readable");return this._readable}get writable(){if(!Jy(this))throw am("writable");return this._writable}}function Jy(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Vy(e,t){Ay(e._readable._readableStreamController,t),Yy(e,t)}function Yy(e,t){tm(e._transformStreamController),jA(e._writable._writableStreamController,t),e._backpressure&&$y(e,!1)}function $y(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=Tp((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Zy.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Zy.prototype,Sp.toStringTag,{value:"TransformStream",configurable:!0});class Xy{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!em(this))throw im("desiredSize");return yy(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!em(this))throw im("enqueue");rm(this,e)}error(e=void 0){if(!em(this))throw im("error");var t;t=e,Vy(this._controlledTransformStream,t)}terminate(){if(!em(this))throw im("terminate");!function(e){const t=e._controlledTransformStream;py(t._readable._readableStreamController),Yy(t,new TypeError("TransformStream terminated"))}(this)}}function em(e){return!!Pp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function tm(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function rm(e,t){const r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!my(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{gy(n,t)}catch(e){throw Yy(r,e),r._readable._storedError}const i=function(e){return!fy(e)}(n);i!==r._backpressure&&$y(r,!0)}function nm(e,t){return Gp(e._transformAlgorithm(t),void 0,(t=>{throw Vy(e._controlledTransformStream,t),t}))}function im(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function am(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties(Xy.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Sp.toStringTag&&Object.defineProperty(Xy.prototype,Sp.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var om=function(e,t){return om=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},om(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. diff --git a/dist/doip.fetchers.minimal.js b/dist/doip.fetchers.minimal.js index 66c437c..663ab5b 100644 --- a/dist/doip.fetchers.minimal.js +++ b/dist/doip.fetchers.minimal.js @@ -5988,7 +5988,7 @@ var doipFetchers = (function (exports) { * doip.js library version * @constant {string} */ - const version = '2.0.0'; + const version = '2.0.1'; /* Copyright 2022 Yarmo Mackenbach @@ -11147,7 +11147,7 @@ var doipFetchers = (function (exports) { homepage: 'https://discord.com' }, profile: { - display: null, + display: 'Unknown username', uri: null, qr: null }, diff --git a/dist/doip.fetchers.minimal.min.js b/dist/doip.fetchers.minimal.min.js index a35985c..8eb41d5 100644 --- a/dist/doip.fetchers.minimal.min.js +++ b/dist/doip.fetchers.minimal.min.js @@ -1,4 +1,4 @@ -var doipFetchers=function(e){"use strict";var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:n}=Object.prototype,{getPrototypeOf:i}=Object,a=(o=Object.create(null),e=>{const t=n.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())});var o;const s=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,h=c("undefined");const l=s("ArrayBuffer");const f=c("string"),d=c("function"),p=c("number"),g=e=>null!==e&&"object"==typeof e,A=e=>{if("object"!==a(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},y=s("Date"),m=s("File"),b=s("Blob"),w=s("FileList"),v=s("URLSearchParams");function I(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),u(e))for(n=0,i=e.length;n0;)if(n=r[i],t===n.toLowerCase())return n;return null}const B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,C=e=>!h(e)&&e!==B;const _=(k="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>k&&e instanceof k);var k;const S=s("HTMLFormElement"),Q=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),x=s("RegExp"),P=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};I(r,((r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)})),Object.defineProperties(e,n)},M="abcdefghijklmnopqrstuvwxyz",U="0123456789",D={DIGIT:U,ALPHA:M,ALPHA_DIGIT:M+M.toUpperCase()+U};const R=s("AsyncFunction");var F={isArray:u,isArrayBuffer:l,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&d(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||d(e.append)&&("formdata"===(t=a(e))||"object"===t&&d(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer),t},isString:f,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:A,isUndefined:h,isDate:y,isFile:m,isBlob:b,isRegExp:x,isFunction:d,isStream:e=>g(e)&&d(e.pipe),isURLSearchParams:v,isTypedArray:_,isFileList:w,forEach:I,merge:function e(){const{caseless:t}=C(this)&&this||{},r={},n=(n,i)=>{const a=t&&E(r,i)||i;A(r[a])&&A(n)?r[a]=e(r[a],n):A(n)?r[a]=e({},n):u(n)?r[a]=n.slice():r[a]=n};for(let e=0,t=arguments.length;e(I(t,((t,i)=>{n&&d(t)?e[i]=r(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(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)},toFlatObject:(e,t,r,n)=>{let a,o,s;const c={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],n&&!n(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&i(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!p(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:S,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:P,freezeMethods:e=>{P(e,((t,r)=>{if(d(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];d(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return u(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:E,global:B,isContextDefined:C,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&d(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=u(e)?[]:{};return I(e,((e,t)=>{const a=r(e,n+1);!h(a)&&(i[t]=a)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:R,isThenable:e=>e&&(g(e)||d(e))&&d(e.then)&&d(e.catch)},T=[],q=[],O="undefined"!=typeof Uint8Array?Uint8Array:Array,K=!1;function H(){K=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)T[t]=e[t],q[e.charCodeAt(t)]=t;q["-".charCodeAt(0)]=62,q["_".charCodeAt(0)]=63}function N(e,t,r){for(var n,i,a=[],o=t;o>18&63]+T[i>>12&63]+T[i>>6&63]+T[63&i]);return a.join("")}function L(e){var t;K||H();for(var r=e.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;sc?c:s+o));return 1===n?(t=e[r-1],i+=T[t>>2],i+=T[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=T[t>>10],i+=T[t>>4&63],i+=T[t<<2&63],i+="="),a.push(i),a.join("")}function G(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,h=-7,l=r?i-1:0,f=r?-1:1,d=e[t+l];for(l+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+l],l+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+e[t+l],l+=f,h-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)}function j(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,h=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?f/c:f*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=h?(s=0,o=h):o+l>=1?(s=(t*c-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*g}var z={}.toString,W=Array.isArray||function(e){return"[object Array]"==z.call(e)};Y.TYPED_ARRAY_SUPPORT=void 0===t.TYPED_ARRAY_SUPPORT||t.TYPED_ARRAY_SUPPORT;var Z=J();function J(){return Y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function V(e,t){if(J()=J())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+J().toString(16)+" bytes");return 0|e}function ne(e){return!(null==e||!e._isBuffer)}function ie(e,t){if(ne(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Pe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Me(e).length;default:if(n)return Pe(e).length;t=(""+t).toLowerCase(),n=!0}}function ae(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return we(this,t,r);case"utf8":case"utf-8":return Ae(this,t,r);case"ascii":return me(this,t,r);case"latin1":case"binary":return be(this,t,r);case"base64":return ge(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function oe(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function se(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Y.from(t,n)),ne(t))return 0===t.length?-1:ce(e,t,r,n,i);if("number"==typeof t)return t&=255,Y.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ce(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ce(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var h=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var l=!0,f=0;fi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function ge(e,t,r){return 0===t&&r===e.length?L(e):L(e.slice(t,r))}function Ae(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(h=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(h=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(h=c)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(e){var t=e.length;if(t<=ye)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Y.prototype.compare=function(e,t,r,n,i){if(!ne(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return ue(this,e,t,r);case"utf8":case"utf-8":return he(this,e,t,r);case"ascii":return le(this,e,t,r);case"latin1":case"binary":return fe(this,e,t,r);case"base64":return de(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ye=4096;function me(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function Ee(e,t,r,n,i,a){if(!ne(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Be(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function Ce(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function _e(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ke(e,t,r,n,i){return i||_e(e,0,r,4),j(e,t,r,n,23,4),r+4}function Se(e,t,r,n,i){return i||_e(e,0,r,8),j(e,t,r,n,52,8),r+8}Y.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},Y.prototype.readUInt8=function(e,t){return t||Ie(e,1,this.length),this[e]},Y.prototype.readUInt16LE=function(e,t){return t||Ie(e,2,this.length),this[e]|this[e+1]<<8},Y.prototype.readUInt16BE=function(e,t){return t||Ie(e,2,this.length),this[e]<<8|this[e+1]},Y.prototype.readUInt32LE=function(e,t){return t||Ie(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Y.prototype.readUInt32BE=function(e,t){return t||Ie(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Y.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ie(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},Y.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ie(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Y.prototype.readInt8=function(e,t){return t||Ie(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Y.prototype.readInt16LE=function(e,t){t||Ie(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Y.prototype.readInt16BE=function(e,t){t||Ie(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Y.prototype.readInt32LE=function(e,t){return t||Ie(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Y.prototype.readInt32BE=function(e,t){return t||Ie(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Y.prototype.readFloatLE=function(e,t){return t||Ie(e,4,this.length),G(this,e,!0,23,4)},Y.prototype.readFloatBE=function(e,t){return t||Ie(e,4,this.length),G(this,e,!1,23,4)},Y.prototype.readDoubleLE=function(e,t){return t||Ie(e,8,this.length),G(this,e,!0,52,8)},Y.prototype.readDoubleBE=function(e,t){return t||Ie(e,8,this.length),G(this,e,!1,52,8)},Y.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Ee(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},Y.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,1,255,0),Y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Y.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,65535,0),Y.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Be(this,e,t,!0),t+2},Y.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,65535,0),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Be(this,e,t,!1),t+2},Y.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,4294967295,0),Y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Ce(this,e,t,!0),t+4},Y.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,4294967295,0),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Ce(this,e,t,!1),t+4},Y.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Ee(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},Y.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Ee(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Y.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,1,127,-128),Y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Y.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,32767,-32768),Y.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Be(this,e,t,!0),t+2},Y.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,32767,-32768),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Be(this,e,t,!1),t+2},Y.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,2147483647,-2147483648),Y.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Ce(this,e,t,!0),t+4},Y.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Ce(this,e,t,!1),t+4},Y.prototype.writeFloatLE=function(e,t,r){return ke(this,e,t,!0,r)},Y.prototype.writeFloatBE=function(e,t,r){return ke(this,e,t,!1,r)},Y.prototype.writeDoubleLE=function(e,t,r){return Se(this,e,t,!0,r)},Y.prototype.writeDoubleBE=function(e,t,r){return Se(this,e,t,!1,r)},Y.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!Y.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Me(e){return function(e){var t,r,n,i,a,o;K||H();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new O(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=q[e.charCodeAt(t)]<<2|q[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=q[e.charCodeAt(t)]<<10|q[e.charCodeAt(t+1)]<<4|q[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Qe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Ue(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function De(e){return null!=e&&(!!e._isBuffer||Re(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Re(e.slice(0,0))}(e))}function Re(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Fe=Object.freeze({__proto__:null,Buffer:Y,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),Y.alloc(+e)},isBuffer:De,kMaxLength:Z});function Te(e,t,r,n,i){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),i&&(this.response=i)}F.inherits(Te,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:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qe=Te.prototype,Oe={};["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=>{Oe[e]={value:e}})),Object.defineProperties(Te,Oe),Object.defineProperty(qe,"isAxiosError",{value:!0}),Te.from=(e,t,r,n,i,a)=>{const o=Object.create(qe);return F.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Te.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};function Ke(e){return F.isPlainObject(e)||F.isArray(e)}function He(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,r){return e?e.concat(t).map((function(e,t){return e=He(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Le=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Ge(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,i=r.visitor||u,a=r.dots,o=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!s&&F.isBlob(e))throw new Te("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Y.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(F.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(Ke)}(e)||(F.isFileList(e)||F.endsWith(r,"[]"))&&(s=F.toArray(e)))return r=He(r),s.forEach((function(e,n){!F.isUndefined(e)&&null!==e&&t.append(!0===o?Ne([r],n,a):null===o?r:r+"[]",c(e))})),!1;return!!Ke(e)||(t.append(Ne(i,r,a),c(e)),!1)}const h=[],l=Object.assign(Le,{defaultVisitor:u,convertValue:c,isVisitable:Ke});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!F.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),F.forEach(r,(function(r,a){!0===(!(F.isUndefined(r)||null===r)&&i.call(t,r,F.isString(a)?a.trim():a,n,l))&&e(r,n?n.concat(a):[a])})),h.pop()}}(e),t}function je(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ze(e,t){this._pairs=[],e&&Ge(e,this,t)}const We=ze.prototype;function Ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,r){if(!t)return e;const n=r&&r.encode||Ze,i=r&&r.serialize;let a;if(a=i?i(t,r):F.isURLSearchParams(t)?t.toString():new ze(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}We.append=function(e,t){this._pairs.push([e,t])},We.toString=function(e){const t=e?function(t){return e.call(this,t,je)}:je;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Ve=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ye={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$e={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ze,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Xe="undefined"!=typeof window&&"undefined"!=typeof document,et=(tt="undefined"!=typeof navigator&&navigator.product,Xe&&["ReactNative","NativeScript","NS"].indexOf(tt)<0);var tt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var nt={...Object.freeze({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:et,hasStandardBrowserWebWorkerEnv:rt}),...$e};function it(e){function t(e,r,n,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&F.isArray(n)?n.length:a,s)return F.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!o;n[a]&&F.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],i)&&F.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const at={transitional:Ye,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=F.isObject(e);i&&F.isHTMLForm(e)&&(e=new FormData(e));if(F.isFormData(e))return n&&n?JSON.stringify(it(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ge(e,new nt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return nt.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=F.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ge(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||at.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&F.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Te.from(e,Te.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nt.classes.FormData,Blob:nt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{at.headers[e]={}}));var ot=at;const st=F.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"]);const ct=Symbol("internals");function ut(e){return e&&String(e).trim().toLowerCase()}function ht(e){return!1===e||null==e?e:F.isArray(e)?e.map(ht):String(e)}function lt(e,t,r,n,i){return F.isFunction(n)?n.call(this,t,r):(i&&(t=r),F.isString(t)?F.isString(n)?-1!==t.indexOf(n):F.isRegExp(n)?n.test(t):void 0:void 0)}class ft{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=ut(t);if(!i)throw new Error("header name must be a non-empty string");const a=F.findKey(n,i);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=ht(e))}const a=(e,t)=>F.forEach(e,((e,r)=>i(e,r,t)));return F.isPlainObject(e)||e instanceof this.constructor?a(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&st[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=ut(e)){const r=F.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(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}(e);if(F.isFunction(t))return t.call(this,e,r);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ut(e)){const r=F.findKey(this,e);return!(!r||void 0===this[r]||t&&!lt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=ut(e)){const i=F.findKey(r,e);!i||t&&!lt(0,r[i],i,t)||(delete r[i],n=!0)}}return F.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!lt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return F.forEach(this,((n,i)=>{const a=F.findKey(r,i);if(a)return t[a]=ht(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();o!==i&&delete t[i],t[o]=ht(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&F.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ct]=this[ct]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ut(e);t[n]||(!function(e,t){const r=F.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return F.isArray(e)?e.forEach(n):n(e),this}}ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(ft.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),F.freezeMethods(ft);var dt=ft;function pt(e,t){const r=this||ot,n=t||r,i=dt.from(n.headers);let a=n.data;return F.forEach(e,(function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function gt(e){return!(!e||!e.__CANCEL__)}function At(e,t,r){Te.call(this,null==e?"canceled":e,Te.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(At,Te,{__CANCEL__:!0});var yt=nt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];F.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),F.isString(n)&&o.push("path="+n),F.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var bt=nt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=F.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function wt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[o];i||(i=c),r[a]=s,n[a]=c;let h=o,l=0;for(;h!==a;)l+=r[h++],h%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-i{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-r,c=n(s);r=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var vt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=dt.from(e.headers).normalize();let a,o,{responseType:s,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(F.isFormData(n))if(nt.hasStandardBrowserEnv||nt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(o=i.getContentType())){const[e,...t]=o?o.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const l=mt(e.baseURL,e.url);function f(){if(!h)return;const n=dt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Te("Request failed with status code "+r.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Je(l,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=f:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(f)},h.onabort=function(){h&&(r(new Te("Request aborted",Te.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Te("Network Error",Te.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Ye;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new Te(t,n.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,h)),h=null},nt.hasStandardBrowserEnv&&(c&&F.isFunction(c)&&(c=c(e)),c||!1!==c&&bt(l))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&yt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in h&&F.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",wt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",wt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{h&&(r(!t||t.type?new At(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);d&&-1===nt.protocols.indexOf(d)?r(new Te("Unsupported protocol "+d+":",Te.ERR_BAD_REQUEST,e)):h.send(n||null)}))};const It={http:null,xhr:vt};F.forEach(It,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Et=e=>`- ${e}`,Bt=e=>F.isFunction(e)||null===e||!1===e;var Ct=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Te("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Et).join("\n"):" "+Et(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function _t(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new At(null,e)}function kt(e){_t(e),e.headers=dt.from(e.headers),e.data=pt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ct(e.adapter||ot.adapter)(e).then((function(t){return _t(e),t.data=pt.call(e,e.transformResponse,t),t.headers=dt.from(t.headers),t}),(function(t){return gt(t)||(_t(e),t&&t.response&&(t.response.data=pt.call(e,e.transformResponse,t.response),t.response.headers=dt.from(t.response.headers))),Promise.reject(t)}))}const St=e=>e instanceof dt?e.toJSON():e;function Qt(e,t){t=t||{};const r={};function n(e,t,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,r){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function a(e,t){if(!F.isUndefined(t))return n(void 0,t)}function o(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t)=>i(St(e),St(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(n){const a=c[n]||i,o=a(e[n],t[n],n);F.isUndefined(o)&&a!==s||(r[n]=o)})),r}const xt="1.6.5",Pt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Pt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Mt={};Pt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new Te(n(i," has been removed"+(t?" in "+t:"")),Te.ERR_DEPRECATED);return t&&!Mt[i]&&(Mt[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var Ut={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new Te("option "+a+" must be "+r,Te.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Te("Unknown option "+a,Te.ERR_BAD_OPTION)}},validators:Pt};const Dt=Ut.validators;class Rt{constructor(e){this.defaults=e,this.interceptors={request:new Ve,response:new Ve}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Qt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Ut.assertOptions(r,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=n&&(F.isFunction(n)?t.paramsSerializer={serialize:n}:Ut.assertOptions(n,{encode:Dt.function,serialize:Dt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&F.merge(i.common,i[t.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=dt.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let h,l=0;if(!s){const e=[kt.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),h=e.length,u=Promise.resolve(t);l{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new At(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Tt((function(t){e=t}));return{token:t,cancel:e}}}var qt=Tt;const Ot={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};Object.entries(Ot).forEach((([e,t])=>{Ot[t]=e}));var Kt=Ot;const Ht=function e(t){const n=new Ft(t),i=r(Ft.prototype.request,n);return F.extend(i,Ft.prototype,n,{allOwnKeys:!0}),F.extend(i,n,null,{allOwnKeys:!0}),i.create=function(r){return e(Qt(t,r))},i}(ot);Ht.Axios=Ft,Ht.CanceledError=At,Ht.CancelToken=qt,Ht.isCancel=gt,Ht.VERSION=xt,Ht.toFormData=Ge,Ht.AxiosError=Te,Ht.Cancel=Ht.CanceledError,Ht.all=function(e){return Promise.all(e)},Ht.spread=function(e){return function(t){return e.apply(null,t)}},Ht.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},Ht.mergeConfig=Qt,Ht.AxiosHeaders=dt,Ht.formToJSON=e=>it(F.isHTMLForm(e)?new FormData(e):e),Ht.getAdapter=Ct,Ht.HttpStatusCode=Kt,Ht.default=Ht;var Nt=Ht,Lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Gt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var zt={exports:{}},Wt={exports:{}};!function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var n=r(e);throw null===e?n="null":"object"===n&&(n=e.constructor.name),new TypeError("Expected a string but received a ".concat(n))}},e.exports=t.default,e.exports.default=t.default}(Wt,Wt.exports);var Zt=Wt.exports,Jt={exports:{}},Vt={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default}(Vt,Vt.exports);var Yt=Vt.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,n.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var i=e.split("."),o=i[i.length-1];if(t.require_tld){if(i.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/\s/.test(o))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(o))return!1;return i.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var r=i(Zt),n=i(Yt);function i(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(Jt,Jt.exports);var $t=Jt.exports,Xt=Gt($t),er={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(t),r=String(r),!r)return e(t,4)||e(t,6);if("4"===r)return o.test(t);if("6"===r)return c.test(t);return!1};var r,n=(r=Zt)&&r.__esModule?r:{default:r};var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),o=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(er,er.exports);var tr=er.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,a.default)(t,c)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var o,l,f,d,p,g,A,y;if(A=e.split("#"),e=A.shift(),A=e.split("?"),e=A.shift(),(A=e.split("://")).length>1){if(o=A.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(o))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;A[0]=e.slice(2)}}if(""===(e=A.join("://")))return!1;if(A=e.split("/"),""===(e=A.shift())&&!t.require_host)return!0;if((A=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===A[0])return!1;if((l=A.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.split(":"),2),b=m[0],w=m[1];if(""===b&&""===w)return!1}d=A.join("@"),g=null,y=null;var v=d.match(u);v?(f="",y=v[1],g=v[2]||null):(f=(A=d.split(":")).shift(),A.length&&(g=A.join(":")));if(null!==g&&g.length>0){if(p=parseInt(g,10),!/^[0-9]+$/.test(g)||p<=0||p>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return h(f,t.host_whitelist);if(""===f&&!t.require_host)return!0;if(!((0,i.default)(f)||(0,n.default)(f,t)||y&&(0,i.default)(y,6)))return!1;if(f=f||y,t.host_blacklist&&h(f,t.host_blacklist))return!1;return!0};var r=o(Zt),n=o($t),i=o(tr),a=o(Yt);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)for(var r=1;r{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:5e3)})),i=new Promise(((r,n)=>{(async()=>{let i=!1;try{rr(t.claims.activitypub.url),i=!0}catch(e){}const a=new Date,{host:o,pathname:s,search:c}=new URL(e.url),u={host:o,date:a.toUTCString(),accept:"application/activity+json","User-Agent":`doipjs/${Fr}`};if(i&&Dr){const e=`(request-target): get ${s}${c}\nhost: ${o}\ndate: ${a.toUTCString()}`,r=Rr.createSign("SHA256");r.write(e),r.end();const n=r.sign(t.claims.activitypub.privateKey.replace(/\\n/g,"\n"),"base64");u.signature=`keyId="${t.claims.activitypub.url}#main-key",headers="(request-target) host date",signature="${n}",algorithm="rsa-sha256"`}Nt.get(e.url,{headers:u}).then((e=>e.data)).then((e=>{r(e)})).catch((e=>{n(e)}))})()}));return Promise.race([i,n]).finally((()=>{clearTimeout(r)}))}var qr=Object.freeze({__proto__:null,fn:Tr,timeout:5e3}),Or=crypto;const Kr=e=>e instanceof CryptoKey;var Hr=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await Or.subtle.digest(r,t))};const Nr=new TextEncoder,Lr=new TextDecoder;const Gr=e=>(e=>{let t=e;"string"==typeof t&&(t=Nr.encode(t));const r=[];for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=Lr.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;ee.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function rn(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var nn=(e,...t)=>rn("Key must be ",e,...t);function an(e,t,...r){return rn(`Key for the ${e} algorithm must be `,t,...r)}var on=e=>Kr(e);const sn=["CryptoKey"];var cn=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function un(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var hn=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new Zr(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Zr('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:i];if("PBKDF2"===n.name)return Or.subtle.importKey("raw",jr(e.k),...a);const o={...e};return delete o.alg,delete o.use,Or.subtle.importKey("jwk",o,...a)};var ln=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!on(t))throw new TypeError(an(e,t,...sn,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${sn.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!on(t))throw new TypeError(an(e,t,...sn));if("secret"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};var fn=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var dn=async(e,t,r,n)=>{const i=await function(e,t,r){if(Kr(t))return tn(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(nn(t,...sn));return Or.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(nn(t,...sn,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,i);const a=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Zr(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,i.algorithm);try{return await Or.subtle.verify(a,i,r,n)}catch(e){return!1}};async function pn(e,t,r){var n;if(!un(e))throw new Jr("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Jr('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Jr("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Jr("JWS Payload missing");if("string"!=typeof e.signature)throw new Jr("JWS Signature missing or incorrect type");if(void 0!==e.header&&!un(e.header))throw new Jr("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=jr(e.protected);i=JSON.parse(Lr.decode(t))}catch(e){throw new Jr("JWS Protected Header is invalid")}if(!cn(i,e.header))throw new Jr("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a={...i,...e.header},o=function(e,t,r,n,i){if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of n.crit){if(!a.has(t))throw new Zr(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===n[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(n.crit)}(Jr,new Map([["b64",!0]]),null==r?void 0:r.crit,i,a);let s=!0;if(o.has("b64")&&(s=i.b64,"boolean"!=typeof s))throw new Jr('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:c}=a;if("string"!=typeof c||!c)throw new Jr('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=r&&fn("algorithms",r.algorithms);if(u&&!u.has(c))throw new Wr('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new Jr("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Jr("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(i,e),h=!0),ln(c,t,"verify");const l=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}(Nr.encode(null!==(n=e.protected)&&void 0!==n?n:""),Nr.encode("."),"string"==typeof e.payload?Nr.encode(e.payload):e.payload);let f;try{f=jr(e.signature)}catch(e){throw new Jr("Failed to base64url decode the signature")}if(!await dn(c,t,f,l))throw new Yr;let d;if(s)try{d=jr(e.payload)}catch(e){throw new Jr("Failed to base64url decode the payload")}else d="string"==typeof e.payload?Nr.encode(e.payload):e.payload;const p={payload:d};return void 0!==e.protected&&(p.protectedHeader=i),void 0!==e.header&&(p.unprotectedHeader=e.header),h?{...p,key:t}:p}const gn=(e,t)=>{if("string"!=typeof e||!e)throw new Vr(`${t} missing or invalid`)};const An=jr;function yn(e,t,r){var n;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var i=0;i=8&&(s-=8,o[u++]=255&c>>s)}if(s>=t.bits||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o}function mn(e,t,r){void 0===r&&(r={});for(var n=r.pad,i=void 0===n||n,a=(1<t.bits;)s-=t.bits,o+=t.chars[a&c>>s];if(s&&(o+=t.chars[a&c<1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,zn.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,"");else{if("string"!=typeof i)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in Wn.alphanumeric)return Wn.alphanumeric[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))};En.locales=void 0;var jn,zn=(jn=Zt)&&jn.__esModule?jn:{default:jn},Wn=Bn;var Zn=Object.keys(Wn.alphanumeric);En.locales=Zn;var Jn={exports:{}};(function(e){e.exports.is_uri=r,e.exports.is_http_uri=n,e.exports.is_https_uri=i,e.exports.is_web_uri=a,e.exports.isUri=r,e.exports.isHttpUri=n,e.exports.isHttpsUri=i,e.exports.isWebUri=a;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var r,n,i,a,o,s="",c="";if(s=(r=t(e))[1],n=r[2],i=r[3],a=r[4],o=r[5],s&&s.length&&i.length>=0){if(n&&n.length){if(0!==i.length&&!/^\//.test(i))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return c+=s+":",n&&n.length&&(c+="//"+n),c+=i,a&&a.length&&(c+="?"+a),o&&o.length&&(c+="#"+o),c}}}function n(e,n){if(r(e)){var i,a,o,s,c="",u="",h="",l="";if(c=(i=t(e))[1],u=i[2],a=i[3],o=i[4],s=i[5],c){if(n){if("https"!=c.toLowerCase())return}else if("http"!=c.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(h=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),l+=c+":",l+="//"+u,h&&(l+=h),l+=a,o&&o.length&&(l+="?"+o),s&&s.length&&(l+="#"+s),l}}}function i(e){return n(e,!0)}function a(e){return n(e)||i(e)}})(Jn);var Vn=Jn.exports;const Yn=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},{hasOwnProperty:$n}=Object.prototype,{propertyIsEnumerable:Xn}=Object,ei=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),ti=Lt,ri={concatArrays:!1,ignoreUndefined:!1},ni=e=>{const t=[];for(const r in e)$n.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(const n of r)Xn.call(e,n)&&t.push(n)}return t};function ii(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return ni(e).forEach((r=>{ei(t,r,ii(e[r]))})),t}(e):Yn(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return ni(e).forEach((r=>{ei(t,r,ii(e[r]))})),t}(e):e}const ai=(e,t,r,n)=>(r.forEach((r=>{void 0===t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?ei(e,r,si(e[r],t[r],n)):ei(e,r,ii(t[r])))})),e),oi=(e,t,r)=>{let n=e.slice(0,0),i=0;return[e,t].forEach((t=>{const a=[];for(let r=0;r!a.includes(e))),r)})),n};function si(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?oi(e,t,r):Yn(t)&&Yn(e)?ai(e,t,ni(t),r):ii(t)}var ci=function(...e){const t=si(ii(ri),this!==ti&&this||{},ri);let r={_:{}};for(const n of e)if(void 0!==n){if(!Yn(n))throw new TypeError("`"+n+"` is not an Option Object");r=si(r,{_:n},t)}return r._},ui=Gt(ci);const hi="adaptive",li="always",fi="never",di="activitypub",pi="aspe",gi="dns",Ai="graphql",yi="http",mi="irc",bi="matrix",wi="openpgp",vi="telegram",Ii="xmpp",Ei="plain",Bi="html",Ci="xml",_i="none",ki="nocors",Si="granted",Qi="server",xi="json",Pi="text",Mi="uri",Ui="fingerprint",Di="contains",Ri="equals",Fi="oneof",Ti=100,qi=101,Oi=200,Ki=201,Hi=301,Ni=401,Li={ASP:"asp",OPENPGP:"openpgp"},Gi={EDDSA:"eddsa",ES256:"es256",OPENPGP:"openpgp",UNKNOWN:"unknown",NONE:"none"},ji={PEM:"pem",JWK:"jwk",ARMORED_PGP:"armored_pgp",NONE:"none"},zi="none",Wi="hkp",Zi="wkd";class Ji{constructor(e,t){this.identifier=null,this.name=e,this.email=null,this.description=null,this.avatarUrl=null,this.themeColor=null,this.claims=t,this.isRevoked=!1}static fromJSON(e,t){let r,n;if("object"==typeof e&&t){if(2!==t)throw new Error("Invalid persona version");if(n=function(e){const t=e.claims.map((e=>iS.fromJSON(e))),r=new Ji(e.name,t);return r.identifier=e.identifier,r.email=e.email,r.description=e.description,r.avatarUrl=e.avatarUrl,r.themeColor=e.avatarUrl,r.isRevoked=e.isRevoked,r}(e),n instanceof Error)throw n;r=n}return r}setIdentifier(e){this.identifier=e}setDescription(e){this.description=e}setEmailAddress(e){this.email=e}setAvatarUrl(e){this.avatarUrl=e}addClaim(e){this.claims.push(e)}revoke(){this.isRevoked=!0}toJSON(){return{identifier:this.identifier,name:this.name,email:this.email,description:this.description,avatarUrl:this.avatarUrl,themeColor:this.themeColor,isRevoked:this.isRevoked,claims:this.claims.map((e=>e.toJSON()))}}}class Vi{constructor(e,t,r){this.profileVersion=2,this.profileType=e,this.identifier=t,this.personas=r||[],this.primaryPersonaIndex=r.length>0?0:-1,this.publicKey={keyType:Gi.NONE,fingerprint:null,encoding:ji.NONE,encodedKey:null,key:null,fetch:{method:zi,query:null,resolvedUrl:null}},this.verifiers=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"profileVersion"in e){if(2!==e.profileVersion)throw new Error("Invalid profile version");if(r=function(e){if(!("profileVersion"in e)||2!==e.profileVersion)return new Error("Invalid profile");const t=e.personas.map((e=>Ji.fromJSON(e,2))),r=new Vi(e.profileType,e.identifier,t);return r.primaryPersonaIndex=e.primaryPersonaIndex,r.publicKey=e.publicKey,r.verifiers=e.verifiers,r}(e),r instanceof Error)throw r;t=r}return t}addVerifier(e,t){this.verifiers.push({name:e,url:t})}toJSON(){return{profileVersion:this.profileVersion,profileType:this.profileType,identifier:this.identifier,personas:this.personas.map((e=>e.toJSON())),primaryPersonaIndex:this.primaryPersonaIndex,publicKey:{keyType:this.publicKey.keyType,fingerprint:this.publicKey.fingerprint,encoding:this.publicKey.encoding,encodedKey:this.publicKey.encodedKey,fetch:{method:this.publicKey.fetch.method,query:this.publicKey.fetch.query,resolvedUrl:this.publicKey.fetch.resolvedUrl}},verifiers:this.verifiers}}}class Yi{constructor(e){this.about=e.about,this.profile=e.profile,this.claim=e.claim,this.proof=e.proof}toJSON(){return{about:this.about,profile:this.profile,claim:this.claim,proof:this.proof}}}const $i=/^aspe:([a-zA-Z0-9.\-_]*):([a-zA-Z0-9]*)/;var Xi=Object.freeze({__proto__:null,processURI:function(e){const t=e.match($i);return Xt(t[1])?new Yi({about:{id:"aspe",name:"ASPE"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:$i.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:pi,accessRestriction:_i,data:{aspeUri:e}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["claims"]}]}}):null},reURI:$i,tests:[{uri:"aspe:domain.tld:abc123def456",shouldMatch:!0},{uri:"aspe:domain.tld",shouldMatch:!1},{uri:"dns:domain.tld",shouldMatch:!1},{uri:"https://domain.tld",shouldMatch:!1}]});const ea=/^openpgp4fpr:(?:0x)?([a-zA-Z0-9.\-_]*)/,ta=/^https:\/\/(.*)\/.well-known\/openpgpkey\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/,ra=/^https:\/\/(openpgpkey.*)\/.well-known\/openpgpkey\/(.*)\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/;var na=Object.freeze({__proto__:null,processURI:function(e){let t=null,r=null,n=null;ea.test(e)&&(t=ea,r=Wi,n=e.match(t)),!r&&ra.test(e)&&(t=ra,r=Zi,n=e.match(t)),!r&&ta.test(e)&&(t=ta,r=Zi,n=e.match(t));let i=null;switch(r){case Wi:i=new Yi({about:{id:"openpgp",name:"OpenPGP"},profile:{display:`openpgp4fpr:${n[1]}`,uri:`https://keys.openpgp.org/search?q=${n[1]}`,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,fetcher:wi,accessRestriction:_i,data:{url:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,protocol:Wi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["notations","proof@ariadne.id"]}]}});break;case Zi:i=new Yi({about:{id:"openpgp",name:"OpenPGP"},profile:{display:"unknown fingerprint",uri:e,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:wi,accessRestriction:_i,data:{url:e,protocol:Zi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["notations","proof@ariadne.id"]}]}})}return i},reURI:/^(.*)/,tests:[{uri:"openpgp4fpr:123456789",shouldMatch:!0},{uri:"openpgp4fpr:abcdef123",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/123abc456def?l=name",shouldMatch:!0}]});const ia=/^dns:([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var aa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ia);return new Yi({about:{id:"dns",name:"DNS"},profile:{display:t[1],uri:`https://${t[1]}`,qr:null},claim:{uriRegularExpression:ia.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:gi,accessRestriction:Qi,data:{domain:t[1]}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["records","txt"]}]}})},reURI:ia,tests:[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const oa=/^irc:\/\/(.*)\/([a-zA-Z0-9\-[\]\\`_^{|}]*)/;var sa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(oa);return new Yi({about:{id:"irc",name:"IRC"},profile:{display:`${t[1]}/${t[2]}`,uri:e,qr:null},claim:{uriRegularExpression:oa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:mi,accessRestriction:Qi,data:{domain:t[1],nick:t[2]}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:[]}]}})},reURI:oa,tests:[{uri:"irc://chat.ircserver.org/Alice1",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice?param=123",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice_bob",shouldMatch:!0},{uri:"https://chat.ircserver.org/alice",shouldMatch:!1}]});const ca=/^xmpp:([a-zA-Z0-9.\-_]*)@([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var ua=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ca);return new Yi({about:{id:"xmpp",name:"XMPP",homepage:"https://xmpp.org"},profile:{display:`${t[1]}@${t[2]}`,uri:e,qr:e},claim:{uriRegularExpression:ca.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:Ii,accessRestriction:Qi,data:{id:`${t[1]}@${t[2]}`}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:[]}]}})},reURI:ca,tests:[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const ha=/^matrix:u\/(?:@)?([^@:]*:[^?]*)(\?.*)?/;var la=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ha);if(!t[2])return null;const r=new URLSearchParams(t[2]);if(!r.has("org.keyoxide.e")||!r.has("org.keyoxide.r"))return null;const n=`${"!"!==r.get("org.keyoxide.r")[0]?"!":""}${r.get("org.keyoxide.r")}`,i=`${"$"!==r.get("org.keyoxide.e")[0]?"$":""}${r.get("org.keyoxide.e")}`,a=`https://matrix.to/#/@${t[1]}`,o=`https://matrix.to/#/${n}/${i}`;return new Yi({about:{id:"matrix",name:"Matrix",homepage:"https://matrix.org"},profile:{display:`@${t[1]}`,uri:a,qr:null},claim:{uriRegularExpression:ha.toString(),uriIsAmbiguous:!1},proof:{request:{uri:o,fetcher:bi,accessRestriction:Si,data:{eventId:i,roomId:n}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["content","body"]}]}})},reURI:ha,tests:[{uri:"matrix:u/alice:matrix.domain.org?org.keyoxide.r=123:domain.org&org.keyoxide.e=123",shouldMatch:!0},{uri:"matrix:u/alice:matrix.domain.org",shouldMatch:!0},{uri:"matrix:u/@alice:matrix.domain.org?org.keyoxide.r=!123:domain.org&org.keyoxide.e=$123",shouldMatch:!0},{uri:"xmpp:alice@domain.org",shouldMatch:!1},{uri:"https://domain.org/@alice",shouldMatch:!1}]});const fa=/https:\/\/t.me\/([A-Za-z0-9_]{5,32})\?proof=([A-Za-z0-9_]{5,32})/;var da=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(fa);return new Yi({about:{id:"telegram",name:"Telegram",homepage:"https://telegram.org"},profile:{display:`@${t[1]}`,uri:`https://t.me/${t[1]}`,qr:`https://t.me/${t[1]}`},claim:{uriRegularExpression:fa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://t.me/${t[2]}`,fetcher:vi,accessRestriction:Si,data:{user:t[1],chat:t[2]}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["text"]}]}})},reURI:fa,tests:[{uri:"https://t.me/alice?proof=foobar",shouldMatch:!0},{uri:"https://t.me/complex_user_1234?proof=complex_chat_1234",shouldMatch:!0},{uri:"https://t.me/foobar",shouldMatch:!1},{uri:"https://t.me/foobar?proof=",shouldMatch:!1},{uri:"https://t.me/?proof=foobar",shouldMatch:!1}]});const pa=/^https:\/\/twitter\.com\/(.*)\/status\/([0-9]*)(?:\?.*)?/;var ga=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(pa),r=new URLSearchParams;return r.set("url",t[0]),r.set("omit_script","1"),new Yi({about:{id:"twitter",name:"Twitter",homepage:"https://twitter.com"},profile:{display:`@${t[1]}`,uri:`https://twitter.com/${t[1]}`,qr:null},claim:{uriRegularExpression:pa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://publish.twitter.com/oembed?${r}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["html"]}]}})},reURI:pa,tests:[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]});const Aa=/^https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/(.*)\/?/;var ya=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Aa);return new Yi({about:{id:"reddit",name:"Reddit",homepage:"https://reddit.com"},profile:{display:t[1],uri:`https://www.reddit.com/user/${t[1]}`,qr:null},claim:{uriRegularExpression:Aa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://www.reddit.com/user/${t[1]}/comments/${t[2]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["data","children","data","selftext"]}]}})},reURI:Aa,tests:[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]});const ma=/^https:\/\/liberapay\.com\/(.*)\/?/;var ba=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ma);return new Yi({about:{id:"liberapay",name:"Liberapay",homepage:"https://liberapay.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:ma.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:_i,data:{url:`https://liberapay.com/${t[1]}/public.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["statements","content"]}]}})},reURI:ma,tests:[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const wa=/^https:\/\/lichess\.org\/@\/(.*)\/?/;var va=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(wa);return new Yi({about:{id:"lichess",name:"Lichess",homepage:"https://lichess.org"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:wa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lichess.org/api/user/${t[1]}`,fetcher:yi,accessRestriction:_i,data:{url:`https://lichess.org/api/user/${t[1]}`,format:xi}},response:{format:xi},target:[{format:Ui,encoding:Ei,relation:Di,path:["profile","links"]}]}})},reURI:wa,tests:[{uri:"https://lichess.org/@/Alice",shouldMatch:!0},{uri:"https://lichess.org/@/Alice/",shouldMatch:!0},{uri:"https://domain.org/@/Alice",shouldMatch:!1}]});const Ia=/^https:\/\/news\.ycombinator\.com\/user\?id=(.*)\/?/;var Ea=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ia);return new Yi({about:{id:"hackernews",name:"Hacker News",homepage:"https://news.ycombinator.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ia.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,fetcher:yi,accessRestriction:ki,data:{url:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Bi,relation:Di,path:["about"]}]}})},reURI:Ia,tests:[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]});const Ba=/^https:\/\/lobste\.rs\/(?:~|u\/)(.*)\/?/;var Ca=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ba);return new Yi({about:{id:"lobsters",name:"Lobsters",homepage:"https://lobste.rs"},profile:{display:t[1],uri:`https://lobste.rs/~${t[1]}`,qr:null},claim:{uriRegularExpression:Ba.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lobste.rs/~${t[1]}.json`,fetcher:yi,accessRestriction:ki,data:{url:`https://lobste.rs/~${t[1]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["about"]}]}})},reURI:Ba,tests:[{uri:"https://lobste.rs/~Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/~Alice",shouldMatch:!1},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]});const _a=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var ka=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(_a);return new Yi({about:{id:"forem",name:"Forem",homepage:"https://www.forem.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:_a.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/api/articles/${t[2]}/${t[3]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["body_markdown"]}]}})},reURI:_a,tests:[{uri:"https://domain.org/alice/post",shouldMatch:!0},{uri:"https://domain.org/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Sa=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;const Qa={validate:async(e,t,r)=>{const n=`https://${new URL(e.proof.request.uri).hostname}/api/forgejo/v1/version`,i=await Kw({url:n,format:xi});return i&&"version"in i}};var xa=Object.freeze({__proto__:null,functions:Qa,processURI:function(e){const t=e.match(Sa);return new Yi({about:{id:"forgejo",name:"Forgejo",homepage:"https://forgejo.org"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Sa.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["description"]}]}})},reURI:Sa,tests:[{uri:"https://domain.org/alice/forgejo_proof",shouldMatch:!0},{uri:"https://domain.org/alice/forgejo_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Pa=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var Ma=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Pa);return new Yi({about:{id:"gitea",name:"Gitea",homepage:"https://about.gitea.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Pa.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["description"]}]}})},reURI:Pa,tests:[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Ua=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/;var Da=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ua);return new Yi({about:{id:"gitlab",name:"GitLab",homepage:"https://about.gitlab.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Ua.toString(),uriIsAmbiguous:!0},proof:{request:{fetcher:yi,accessRestriction:_i,data:{url:`https://${t[1]}/api/v4/projects/${t[2]}%2Fgitlab_proof`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["description"]}]}})},reURI:Ua,tests:[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]});const Ra=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;var Fa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ra);return new Yi({about:{id:"github",name:"GitHub",homepage:"https://github.com"},profile:{display:t[1],uri:`https://github.com/${t[1]}`,qr:null},claim:{uriRegularExpression:Ra.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:_i,data:{url:`https://api.github.com/gists/${t[2]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["files","proof.md","content"]},{format:Mi,encoding:Ei,relation:Di,path:["files","openpgp.md","content"]}]}})},reURI:Ra,tests:[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]});const Ta=/^https:\/\/(.*)\/?/;const qa={postprocess:async(e,t,r)=>{switch(t.result.type){case"Note":{e.profile.uri=t.result.attributedTo,e.profile.display=t.result.attributedTo;const n=await Tr({url:t.result.attributedTo},r).catch((e=>null));n&&(e.profile.display=`@${n.preferredUsername}@${new URL(e.proof.request.uri).hostname}`);break}case"Person":e.profile.display=`@${t.result.preferredUsername}@${new URL(e.proof.request.uri).hostname}`}const n=await Oa(new URL(e.proof.request.uri).hostname);return n&&(e.about.name=n.software.name,e.about.id=n.software.name,e.about.homepage=n.software.homepage),{claimData:e,proofData:t}}},Oa=async e=>{const t=await fetch(`https://${e}/.well-known/nodeinfo`).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).catch((e=>null));if(!t)return null;{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:e.software.homepage||"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}};var Ka=Object.freeze({__proto__:null,functions:qa,processURI:function(e){return new Yi({about:{id:"activitypub",name:"ActivityPub",homepage:"https://activitypub.rocks"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:Ta.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:di,accessRestriction:_i,data:{url:e}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["summary"]},{format:Mi,encoding:Ei,relation:Di,path:["attachment","value"]},{format:Mi,encoding:Ei,relation:Di,path:["content"]}]}})},reURI:Ta,tests:[{uri:"https://domain.org",shouldMatch:!0},{uri:"https://domain.org/@/alice/",shouldMatch:!0},{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/123456",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/123456",shouldMatch:!0},{uri:"http://domain.org/alice",shouldMatch:!1}]});const Ha=/^https:\/\/(.*)\/u\/(.*)\/?/;var Na=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ha);return new Yi({about:{id:"discourse",name:"Discourse",homepage:"https://www.discourse.org"},profile:{display:`${t[2]}@${t[1]}`,uri:e,qr:null},claim:{uriRegularExpression:Ha.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/u/${t[2]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["user","bio_raw"]}]}})},reURI:Ha,tests:[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const La=/^https:\/\/(.*)/;var Ga=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(La);return new Yi({about:{id:"owncast",name:"Owncast",homepage:"https://owncast.online"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:La.toString(),uriIsAmbiguous:!0},proof:{request:{uri:`${e}/api/config`,fetcher:yi,accessRestriction:_i,data:{url:`${e}/api/config`,format:xi}},response:{format:xi},target:[{format:Ui,encoding:Ei,relation:Di,path:["socialHandles","url"]}]}})},reURI:La,tests:[{uri:"https://live.domain.org",shouldMatch:!0},{uri:"https://live.domain.org/",shouldMatch:!0},{uri:"https://domain.org/live",shouldMatch:!0},{uri:"https://domain.org/live/",shouldMatch:!0}]});const ja=/^https:\/\/(.*(?:askubuntu|mathoverflow|serverfault|stackapps|stackoverflow|superuser)|.+\.stackexchange)\.com\/users\/(\d+)/,za=/\.stackexchange$/;var Wa=Object.freeze({__proto__:null,processURI:function(e){const[,t,r]=e.match(ja),n=t.replace(za,"");return new Yi({about:{id:"stackexchange",name:"Stack Exchange",homepage:"https://stackexchange.com"},profile:{display:`${r}@${n}`,uri:e,qr:null},claim:{uriRegularExpression:ja.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://${t}.com/users/${r}?tab=profile`,fetcher:yi,accessRestriction:_i,data:{url:`https://api.stackexchange.com/2.3/users/${r}?site=${n}&filter=!AH)b5JqVyImf`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["items","about_me"]}]}})},reURI:ja,tests:[{uri:"https://stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234?tab=topactivity",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice?tab=profile",shouldMatch:!0},{uri:"https://meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://serverfault.com/users/1234",shouldMatch:!0},{uri:"https://meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://gaming.meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://stackexchange.com/users/1234",shouldMatch:!1},{uri:"https://domain.com/users/1234",shouldMatch:!1},{uri:"https://meta.domain.com/users/1234",shouldMatch:!1}]});const Za=/^https:\/\/keybase.io\/(.*)\/?/;var Ja=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Za);return new Yi({about:{id:"keybase",name:"keybase",homepage:"https://keybase.io"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Za.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,fetcher:yi,accessRestriction:ki,data:{url:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,format:xi}},response:{format:xi},target:[{format:Ui,encoding:Ei,relation:Di,path:["them","public_keys","primary","key_fingerprint"]}]}})},reURI:Za,tests:[{uri:"https://keybase.io/Alice",shouldMatch:!0},{uri:"https://keybase.io/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const Va=/^https:\/\/opencollective\.com\/(.*)\/?/;var Ya=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Va);return new Yi({about:{id:"opencollective",name:"Open Collective",homepage:"https://opencollective.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Va.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:Ai,accessRestriction:ki,data:{url:"https://api.opencollective.com/graphql/v2",query:`{ "query": "query { account(slug: \\"${t[1]}\\") { longDescription } }" }`}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["data","account","longDescription"]}]}})},reURI:Va,tests:[{uri:"https://opencollective.com/Alice",shouldMatch:!0},{uri:"https://opencollective.com/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const $a=/^https:\/\/orcid\.org\/(.*)\/?/;var Xa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match($a);return new Yi({about:{id:"orcid",name:"ORCiD",homepage:"https://orcid.org/"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:$a.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:_i,data:{url:e,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["person","biography","content"]},{format:Mi,encoding:Ei,relation:Ri,path:["person","researcher-urls","researcher-url","url","value"]},{format:Mi,encoding:Ei,relation:Ri,path:["person","keywords","keyword","content"]}]}})},reURI:$a,tests:[{uri:"https://orcid.org/0000-0000-0000-0000",shouldMatch:!0},{uri:"https://orcid.org/0000-0000-0000-0000/",shouldMatch:!0},{uri:"https://domain.org/0000-0000-0000-0000",shouldMatch:!1}]});const eo=/^https:\/\/pronouns\.cc\/@(.*)\/?/;var to=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(eo);return new Yi({about:{id:"pronounscc",name:"pronouns.cc",homepage:"https://pronouns.cc"},profile:{display:`@${t[1]}`,uri:`https://pronouns.cc/@${t[1]}`,qr:null},claim:{uriRegularExpression:eo.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://pronouns.cc/api/v1/users/${t[1]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["links"]},{format:Mi,encoding:Ei,relation:Di,path:["bio"]}]}})},reURI:eo,tests:[{uri:"https://pronouns.cc/@Alice",shouldMatch:!0},{uri:"https://pronouns.cc/@Alice/",shouldMatch:!0},{uri:"https://pronouns.cc/Alice",shouldMatch:!1},{uri:"https://pronouns.cc/Alice/",shouldMatch:!1}]});const ro=/^https:\/\/(?:discord\.gg|discord\.com\/invite)\/(.+)/;var no=Object.freeze({__proto__:null,functions:{postprocess:async(e,t,r)=>(e.profile.display=t.result.inviter.username,{claimData:e,proofData:t})},processURI:function(e){const t=e.match(ro);return new Yi({about:{id:"discord",name:"Discord",homepage:"https://discord.com"},profile:{display:null,uri:null,qr:null},claim:{uriRegularExpression:ro.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://discord.com/api/v10/invites/${t[1]}`,fetcher:yi,accessRestriction:ki,data:{url:`https://discord.com/api/v10/invites/${t[1]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["guild","description"]},{format:Mi,encoding:Ei,relation:Di,path:["guild","name"]}]}})},reURI:ro,tests:[{uri:"https://discord.com/invite/AbCdEf",shouldMatch:!0},{uri:"https://discord.com/invite/AbCdEfGh",shouldMatch:!0},{uri:"https://discord.gg/AbCdEf",shouldMatch:!0},{uri:"https://discord.gg/AbCdEfGh",shouldMatch:!0},{uri:"https://domain.com/invite/AbCdEf",shouldMatch:!1},{uri:"https://domain.gg/AbCdEf",shouldMatch:!1},{uri:"https://discord.com/invite/",shouldMatch:!1},{uri:"https://discord.gg/",shouldMatch:!1}]});const io={aspe:Xi,openpgp:na,dns:aa,irc:sa,xmpp:ua,matrix:la,telegram:da,twitter:ga,reddit:ya,liberapay:ba,lichess:va,hackernews:Ea,lobsters:Ca,forem:ka,forgejo:xa,gitea:Ma,gitlab:Da,github:Fa,activitypub:Ka,discourse:Na,owncast:Ga,stackexchange:Wa,keybase:Ja,opencollective:Ya,orcid:Xa,pronounscc:to,discord:no},ao=Object.keys(io),oo="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},so=Symbol("doneWritingPromise"),co=Symbol("doneWritingResolve"),uo=Symbol("doneWritingReject"),ho=Symbol("readingIndex");class lo extends Array{constructor(){super(),this[so]=new Promise(((e,t)=>{this[co]=e,this[uo]=t})),this[so].catch((()=>{}))}}function fo(e){return e&&e.getReader&&Array.isArray(e)}function po(e){if(!fo(e)){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=()=>{t.closed.catch((function(){})),r.call(t)},t}this.stream=e}lo.prototype.getReader=function(){return void 0===this[ho]&&(this[ho]=0),{read:async()=>(await this[so],this[ho]===this.length?{value:void 0,done:!0}:{value:this[this[ho]++],done:!1})}},lo.prototype.readToEnd=async function(e){await this[so];const t=e(this.slice(this[ho]));return this.length=0,t},lo.prototype.clone=function(){const e=new lo;return e[so]=this[so].then((()=>{e.push(...this)})),e},po.prototype.write=async function(e){this.stream.push(e)},po.prototype.close=async function(){this.stream[co]()},po.prototype.abort=async function(e){return this.stream[uo](e),e},po.prototype.releaseLock=function(){};const go="object"==typeof oo.process&&"object"==typeof oo.process.versions,Ao=go&&void 0;function yo(e){return fo(e)?"array":oo.ReadableStream&&oo.ReadableStream.prototype.isPrototypeOf(e)?"web":So&&So.prototype.isPrototypeOf(e)?"ponyfill":Ao&&Ao.prototype.isPrototypeOf(e)?"node":!(!e||!e.getReader)&&"web-like"}function mo(e){return Uint8Array.prototype.isPrototypeOf(e)}function bo(e){if(1===e.length)return e[0];let t=0;for(let r=0;r{t||(wo.isBuffer(n)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),r.enqueue(n),e.pause())})),e.on("end",(()=>{t||r.close()})),e.on("error",(e=>r.error(e)))},pull(){e.resume()},cancel(r){t=!0,e.destroy(r)}})};class e extends vo{constructor(e,t){super(t),this._reader=Ro(e)}async _read(e){try{for(;;){const{done:e,value:t}=await this._reader.read();if(e){this.push(null);break}if(!this.push(t))break}}catch(e){this.destroy(e)}}async _destroy(e,t){this._reader.cancel(e).then(t,t)}}Eo=function(t,r){return new e(t,r)}}const Bo=new WeakSet,Co=Symbol("externalBuffer");function _o(e){if(this.stream=e,e[Co]&&(this[Co]=e[Co].slice()),fo(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{},void(this._cancel=async()=>{})}let t=yo(e);if("node"===t&&(e=Io(e)),t){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{t.closed.catch((function(){})),t.releaseLock()},void(this._cancel=t.cancel.bind(t))}let r=!1;this._read=async()=>r||Bo.has(e)?{value:void 0,done:!0}:(r=!0,{value:e,done:!1}),this._releaseLock=()=>{if(r)try{Bo.add(e)}catch(e){}}}_o.prototype.read=async function(){return this[Co]&&this[Co].length?{done:!1,value:this[Co].shift()}:this._read()},_o.prototype.releaseLock=function(){this[Co]&&(this.stream[Co]=this[Co]),this._releaseLock()},_o.prototype.cancel=function(e){return this._cancel(e)},_o.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:r,value:n}=await this.read();if(n+="",r)return t.length?Do(t):void 0;const i=n.indexOf("\n")+1;i&&(e=Do(t.concat(n.substr(0,i))),t=[]),i!==n.length&&t.push(n.substr(i))}return this.unshift(...t),e},_o.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const r=t[0];return this.unshift(jo(t,1)),r},_o.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){const{done:n,value:i}=await this.read();if(n)return t.length?Do(t):void 0;if(t.push(i),r+=i.length,r>=e){const r=Do(t);return this.unshift(jo(r,e)),jo(r,0,e)}}},_o.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},_o.prototype.unshift=function(...e){this[Co]||(this[Co]=[]),1===e.length&&mo(e[0])&&this[Co].length&&e[0].length&&this[Co][0].byteOffset>=e[0].length?this[Co][0]=new Uint8Array(this[Co][0].buffer,this[Co][0].byteOffset-e[0].length,this[Co][0].byteLength+e[0].length):this[Co].unshift(...e.filter((e=>e&&e.length)))},_o.prototype.readToEnd=async function(e=Do){const t=[];for(;;){const{done:e,value:r}=await this.read();if(e)break;t.push(r)}return e(t)};let ko,{ReadableStream:So,WritableStream:Qo,TransformStream:xo}=oo;const Po=go&&void 0;function Mo(e){let t=yo(e);return"node"===t?Io(e):"web"===t&&ko?ko(e):t?e:new So({start(t){t.enqueue(e),t.close()}})}function Uo(e){if(yo(e))return e;const t=new lo;return(async()=>{const r=Fo(t);await r.write(e),await r.close()})(),t}function Do(e){return e.some((e=>yo(e)&&!fo(e)))?function(e){e=e.map(Mo);const t=Oo((async function(e){await Promise.all(n.map((t=>async function(e,t){if(yo(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}(t,e))))}));let r=Promise.resolve();const n=e.map(((n,i)=>Ho(n,((n,a)=>(r=r.then((()=>To(n,t.writable,{preventClose:i!==e.length-1}))),r)))));return t.readable}(e):e.some((e=>fo(e)))?function(e){const t=new lo;let r=Promise.resolve();return e.forEach(((n,i)=>(r=r.then((()=>To(n,t,{preventClose:i!==e.length-1}))),r))),t}(e):"string"==typeof e[0]?e.join(""):Po&&Po.isBuffer(e[0])?Po.concat(e):bo(e)}function Ro(e){return new _o(e)}function Fo(e){return new po(e)}async function To(e,t,{preventClose:r=!1,preventAbort:n=!1,preventCancel:i=!1}={}){if(yo(e)&&!fo(e)){e=Mo(e);try{if(e[Co]){const r=Fo(t);for(let t=0;t{t=e})),t=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function Ko(e,t=(()=>{}),r=(()=>{})){if(fo(e)){const n=new lo;return(async()=>{const i=Fo(n);try{const n=await zo(e),a=t(n),o=r();let s;s=void 0!==a&&void 0!==o?Do([a,o]):void 0!==a?a:o,await i.write(s),await i.close()}catch(e){await i.abort(e)}})(),n}if(yo(e))return qo(e,{async transform(e,r){try{const n=await t(e);void 0!==n&&r.enqueue(n)}catch(e){r.error(e)}},async flush(e){try{const t=await r();void 0!==t&&e.enqueue(t)}catch(t){e.error(t)}}});const n=t(e),i=r();return void 0!==n&&void 0!==i?Do([n,i]):void 0!==n?n:i}function Ho(e,t){if(yo(e)&&!fo(e)){let r;const n=new xo({start(e){r=e}}),i=To(e,n.writable),a=Oo((async function(e){r.error(e),await i,await new Promise(setTimeout)}));return t(n.readable,a.writable),a.readable}e=Uo(e);const r=new lo;return t(e,r),r}function No(e){if(fo(e))return e.clone();if(yo(e)){const t=function(e){if(fo(e))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(yo(e)){const t=Mo(e).tee();return t[0][Co]=t[1][Co]=e[Co],t}return[jo(e),jo(e)]}(e);return Go(e,t[0]),t[1]}return jo(e)}function Lo(e){return fo(e)?No(e):yo(e)?new So({start(t){const r=Ho(e,(async(e,r)=>{const n=Ro(e),i=Fo(r);try{for(;;){await i.ready;const{done:r,value:a}=await n.read();if(r){try{t.close()}catch(e){}return void await i.close()}try{t.enqueue(a)}catch(e){}await i.write(a)}}catch(e){t.error(e),await i.abort(e)}}));Go(e,r)}}):jo(e)}function Go(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach((([r,n])=>{"constructor"!==r&&(n.value?n.value=n.value.bind(t):n.get=n.get.bind(t),Object.defineProperty(e,r,n))}))}function jo(e,t=0,r=1/0){if(fo(e))throw Error("Not implemented");if(yo(e)){if(t>=0&&r>=0){let n=0;return qo(e,{transform(e,i){n=t&&i.enqueue(jo(e,Math.max(t-n,0),r-n)),n+=e.length):i.terminate()}})}if(t<0&&(r<0||r===1/0)){let n=[];return Ko(e,(e=>{e.length>=-t?n=[e]:n.push(e)}),(()=>jo(Do(n),t,r)))}if(0===t&&r<0){let n;return Ko(e,(e=>{const i=n?Do([n,e]):e;if(i.length>=-r)return n=jo(i,r),jo(i,t,r);n=i}))}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),Wo((async()=>jo(await zo(e),t,r)))}return e[Co]&&(e=Do(e[Co].concat([e]))),!mo(e)||Po&&Po.isBuffer(e)?e.slice(t,r):(r===1/0&&(r=e.length),e.subarray(t,r))}async function zo(e,t=Do){return fo(e)?e.readToEnd(t):yo(e)?Ro(e).readToEnd(t):e}function Wo(e){const t=new lo;return(async()=>{const r=Fo(t);try{await r.write(await e()),await r.close()}catch(e){await r.abort(e)}})(),t}class Zo{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");if(e instanceof Uint8Array){const t=e,r=Array(t.length);for(let e=0;eBigInt(0);){const e=r&BigInt(1);r>>=BigInt(1);const a=i*n%t.value;i=e?a:i,n=n*n%t.value}return new Zo(i)}modInv(e){const{gcd:t,x:r}=this._egcd(e);if(!t.isOne())throw Error("Inverse does not exist");return r.add(e).mod(e)}_egcd(e){let t=BigInt(0),r=BigInt(1),n=BigInt(1),i=BigInt(0),a=this.value;for(e=e.value;e!==BigInt(0);){const o=a/e;let s=t;t=n-o*t,n=s,s=r,r=i-o*r,i=s,s=e,e=a%e,a=s}return{x:new Zo(n),y:new Zo(i),gcd:new Zo(a)}}gcd(e){let t=this.value;for(e=e.value;e!==BigInt(0);){const r=e;e=t%e,t=r}return new Zo(t)}ileftShift(e){return this.value<<=e.value,this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value>>=e.value,this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value===e.value}lt(e){return this.valuee.value}gte(e){return this.value>=e.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.valueNumber.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return e}getBit(e){return(this.value>>BigInt(e)&BigInt(1))===BigInt(0)?0:1}bitLength(){const e=new Zo(0),t=new Zo(1),r=new Zo(-1),n=this.isNegative()?r:e;let i=1;const a=this.clone();for(;!a.irightShift(t).equal(n);)i++;return i}byteLength(){const e=new Zo(0),t=new Zo(-1),r=this.isNegative()?t:e,n=new Zo(8);let i=1;const a=this.clone();for(;!a.irightShift(n).equal(r);)i++;return i}toUint8Array(e="be",t){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const n=r.length/2,i=new Uint8Array(t||n),a=t?t-n:0;let o=0;for(;o{e[Jo][r]=t}))),void 0!==e[Jo][t])return e[Jo][t];throw Error("Invalid enum value.")}};const Yo=(()=>{try{return"development"===process.env.NODE_ENV}catch(e){}return!1})(),$o={isString:function(e){return"string"==typeof e||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:mo,isStream:yo,readNumber:function(e){let t=0;for(let r=0;r>8*(t-n-1)&255;return r},readDate:function(e){const t=$o.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return $o.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=7+(e[0]<<8|e[1])>>>3;return e.subarray(2,2+t)},leftPad(e,t){const r=new Uint8Array(t),n=t-e.length;return r.set(e,n),r},uint8ArrayToMPI:function(e){const t=$o.uint8ArrayBitLength(e);if(0===t)throw Error("Zero MPI");const r=e.subarray(e.length-Math.ceil(t/8)),n=new Uint8Array([(65280&t)>>8,255&t]);return $o.concatUint8Array([n,r])},uint8ArrayBitLength:function(e){let t;for(t=0;t>1);for(let r=0;r>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],r=e.length;let n,i=0;for(;i{if(!$o.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;rr("",!0)))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return Ko(e,r,(()=>r(new Uint8Array,!0)))},concat:Do,concatUint8Array:bo,equalsUint8Array:function(e,t){if(!$o.isUint8Array(e)||!$o.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r>>16;return 0!==r&&(e=r,t+=16),r=e>>8,0!==r&&(e=r,t+=8),r=e>>4,0!==r&&(e=r,t+=4),r=e>>2,0!==r&&(e=r,t+=2),r=e>>1,0!==r&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let n=0;n>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){return void 0!==oo&&oo.crypto&&oo.crypto.subtle},getBigInteger:async function(){if("undefined"!=typeof BigInt)return Zo;{const{default:e}=await Promise.resolve().then((function(){return gm}));return e}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return"undefined"!=typeof navigator?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(e){return!!$o.isString(e)&&/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}[0-9]*|xn--[a-zA-Z\-0-9]+)))$/.test(e)},canonicalizeEOL:function(e){let t=!1;return Ko(e,(e=>{let r;t&&(e=$o.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const n=[];for(let t=0;r=e.indexOf(10,t)+1,r;t=r)13!==e[r-2]&&n.push(r);if(!n.length)return e;const i=new Uint8Array(e.length+n.length);let a=0;for(let t=0;tt?new Uint8Array([13]):void 0))},nativeEOL:function(e){let t=!1;return Ko(e,(e=>{let r;13===(e=t&&10!==e[0]?$o.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let n=0;for(let t=0;t!==e.length;t=r){r=e.indexOf(13,t)+1,r||(r=e.length);const i=r-(10===e[r]?1:0);t&&e.copyWithin(n,t,i),n+=i-t}return e.subarray(0,n)}),(()=>t?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(e){return e.split("\n").map((e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]||"\r"===e[t]);t--);return e.substr(0,t+1)})).join("\n")},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch(e){}return t},constructAllowedPackets:function(e){const t={};return e.forEach((e=>{if(!e.tag)throw Error("Invalid input: expected a packet class");t[e.tag]=e})),t},anyPromise:function(e){return new Promise((async(t,r)=>{let n;await Promise.all(e.map((async e=>{try{t(await e)}catch(e){n=e}}))),r(n)}))},selectUint8Array:function(e,t,r){const n=Math.max(t.length,r.length),i=new Uint8Array(n);let a=0;for(let n=0;n{t=$o.concatUint8Array([t,e]);const r=[],n=Math.floor(t.length/45),i=45*n,a=es(t.subarray(0,i));for(let e=0;et.length?es(t)+"\n":""))}function ns(e){let t="";return Ko(e,(e=>{t+=e;let r=0;const n=[" ","\t","\r","\n"];for(let e=0;e0&&(i-r)%4!=0;i--)n.includes(t[i])&&r--;const a=ts(t.substr(0,i));return t=t.substr(i),a}),(()=>ts(t)))}function is(e){return ns(e.replace(/-/g,"+").replace(/_/g,"/"))}function as(e,t){let r=rs(e).replace(/[\r\n]/g,"");return t&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r}Xo?(es=e=>Xo.from(e).toString("base64"),ts=e=>{const t=Xo.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}):(es=e=>btoa($o.uint8ArrayToString(e)),ts=e=>$o.stringToUint8Array(atob(e)));var os={preferredHashAlgorithm:Vo.hash.sha256,preferredSymmetricAlgorithm:Vo.symmetric.aes256,preferredCompressionAlgorithm:Vo.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:Vo.aead.eax,aeadChunkSizeByte:12,v5Keys:!1,s2kIterationCountByte:224,allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,checksumRequired:!1,minRSABits:2047,passwordCollisionCheck:!1,revocationsExpire:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([Vo.symmetric.aes128,Vo.symmetric.aes192,Vo.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,additionalAllowedPackets:[],showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.11.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([Vo.hash.md5,Vo.hash.ripemd]),rejectMessageHashAlgorithms:new Set([Vo.hash.md5,Vo.hash.ripemd,Vo.hash.sha1]),rejectPublicKeyAlgorithms:new Set([Vo.publicKey.elgamal,Vo.publicKey.dsa]),rejectCurves:new Set([Vo.curve.secp256k1])};function ss(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?Vo.armor.multipartSection:/MESSAGE, PART \d+/.test(t[1])?Vo.armor.multipartLast:/SIGNED MESSAGE/.test(t[1])?Vo.armor.signed:/MESSAGE/.test(t[1])?Vo.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?Vo.armor.publicKey:/PRIVATE KEY BLOCK/.test(t[1])?Vo.armor.privateKey:/SIGNATURE/.test(t[1])?Vo.armor.signature:void 0}function cs(e,t){let r="";return t.showVersion&&(r+="Version: "+t.versionString+"\n"),t.showComment&&(r+="Comment: "+t.commentString+"\n"),e&&(r+="Comment: "+e+"\n"),r+="\n",r}function us(e){return rs(function(e){let t=13501623;return Ko(e,(e=>{const r=ls?Math.floor(e.length/4):0,n=new Uint32Array(e.buffer,e.byteOffset,r);for(let e=0;e>24&255]^hs[1][t>>16&255]^hs[2][t>>8&255]^hs[3][t>>0&255];for(let n=4*r;n>8^hs[0][255&t^e[n]]}),(()=>new Uint8Array([t,t>>8,t>>16])))}(e))}const hs=[Array(255),Array(255),Array(255),Array(255)];for(let e=0;e<=255;e++){let t=e<<16;for(let e=0;e<8;e++)t=t<<1^(0!=(8388608&t)?8801531:0);hs[0][e]=(16711680&t)>>16|65280&t|(255&t)<<16}for(let e=0;e<=255;e++)hs[1][e]=hs[0][e]>>8^hs[0][255&hs[0][e]];for(let e=0;e<=255;e++)hs[2][e]=hs[1][e]>>8^hs[0][255&hs[1][e]];for(let e=0;e<=255;e++)hs[3][e]=hs[2][e]>>8^hs[0][255&hs[2][e]];const ls=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function fs(e){for(let t=0;t=0&&n!==e.length-1&&(t=e.slice(0,n),r=e.slice(n+1).substr(0,4)),{body:t,checksum:r}}function ps(e,t=os){return new Promise((async(r,n)=>{try{const i=/^-----[^-]+-----$/m,a=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let o;const s=[];let c,u,h,l=s,f=[],d=ns(Ho(e,(async(e,t)=>{const p=Ro(e);try{for(;;){let e=await p.readLine();if(void 0===e)throw Error("Misformed armored text");if(e=$o.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),o)if(c)u||2!==o||(i.test(e)?(f=f.join("\r\n"),u=!0,fs(l),l=[],c=!1):f.push(e.replace(/^- /,"")));else if(i.test(e)&&n(Error("Mandatory blank line missing between armor headers and armor data")),a.test(e)){if(fs(l),c=!0,u||2!==o){r({text:f,data:d,headers:s,type:o});break}}else l.push(e);else i.test(e)&&(o=ss(e))}}catch(e){return void n(e)}const g=Fo(t);try{for(;;){await g.ready;const{done:e,value:t}=await p.read();if(e)throw Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await p.readToEnd();e.length||(e=""),e=r+e,e=$o.removeTrailingSpaces(e.replace(/\r/g,""));const t=e.split(i);if(1===t.length)throw Error("Misformed armored text");const n=ds(t[0].slice(0,-1));h=n.checksum,await g.write(n.body);break}await g.write(r)}await g.ready,await g.close()}catch(e){await g.abort(e)}})));d=Ho(d,(async(e,r)=>{const n=zo(us(Lo(e)));n.catch((()=>{})),await To(e,r,{preventClose:!0});const i=Fo(r);try{const e=(await n).replace("\n","");if(h!==e&&(h||t.checksumRequired))throw Error("Ascii armor integrity check failed");await i.ready,await i.close()}catch(e){await i.abort(e)}}))}catch(e){n(e)}})).then((async e=>(fo(e.data)&&(e.data=await zo(e.data)),e)))}function gs(e,t,r,n,i,a=os){let o,s;e===Vo.armor.signed&&(o=t.text,s=t.hash,t=t.data);const c=Lo(t),u=[];switch(e){case Vo.armor.multipartSection:u.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+n+"-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP MESSAGE, PART "+r+"/"+n+"-----\n");break;case Vo.armor.multipartLast:u.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP MESSAGE, PART "+r+"-----\n");break;case Vo.armor.signed:u.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),u.push("Hash: "+s+"\n\n"),u.push(o.replace(/^-/gm,"- -")),u.push("\n-----BEGIN PGP SIGNATURE-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP SIGNATURE-----\n");break;case Vo.armor.message:u.push("-----BEGIN PGP MESSAGE-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP MESSAGE-----\n");break;case Vo.armor.publicKey:u.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case Vo.armor.privateKey:u.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case Vo.armor.signature:u.push("-----BEGIN PGP SIGNATURE-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP SIGNATURE-----\n")}return $o.concat(u)}class As{constructor(){this.bytes=""}read(e){return this.bytes=$o.uint8ArrayToString(e.subarray(0,8)),this.bytes.length}write(){return $o.stringToUint8Array(this.bytes)}toHex(){return $o.uint8ArrayToHex($o.stringToUint8Array(this.bytes))}equals(e,t=!1){return t&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(e){return e.toHex()}static fromID(e){const t=new As;return t.read($o.hexToUint8Array(e)),t}static wildcard(){const e=new As;return e.read(new Uint8Array(8)),e}}var ys=function(){var e,t,r=!1;function n(r,n){var i=e[(t[r]+t[n])%255];return 0!==r&&0!==n||(i=0),i}var i,a,o,s,c=!1;function u(){function u(r){var n,i,a;for(i=a=function(r){var n=e[255-t[r]];return 0===r&&(n=0),n}(r),n=0;n<4;n++)a^=i=255&(i<<1|i>>>7);return 99^a}r||function(){e=[],t=[];var n,i,a=1;for(n=0;n<255;n++)e[n]=a,i=128&a,a<<=1,a&=255,128===i&&(a^=27),a^=e[n],t[e[n]]=n;e[255]=e[0],t[0]=0,r=!0}(),i=[],a=[],o=[[],[],[],[]],s=[[],[],[],[]];for(var h=0;h<256;h++){var l=u(h);i[h]=l,a[l]=h,o[0][h]=n(2,l)<<24|l<<16|l<<8|n(3,l),s[0][l]=n(14,h)<<24|n(9,h)<<16|n(13,h)<<8|n(11,h);for(var f=1;f<4;f++)o[f][h]=o[f-1][h]>>>8|o[f-1][h]<<24,s[f][l]=s[f-1][l]>>>8|s[f-1][l]<<24}c=!0}var h=function(e,t){c||u();var r=new Uint32Array(t);r.set(i,512),r.set(a,768);for(var n=0;n<4;n++)r.set(o[n],4096+1024*n>>2),r.set(s[n],8192+1024*n>>2);var h=function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0;var B=new e.Uint32Array(r),C=new e.Uint8Array(r);function _(e,t,r,s,c,u,h,l){e=e|0;t=t|0;r=r|0;s=s|0;c=c|0;u=u|0;h=h|0;l=l|0;var f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;f=r|0x400,d=r|0x800,p=r|0xc00;c=c^B[(e|0)>>2],u=u^B[(e|4)>>2],h=h^B[(e|8)>>2],l=l^B[(e|12)>>2];for(b=16;(b|0)<=s<<4;b=b+16|0){g=B[(r|c>>22&1020)>>2]^B[(f|u>>14&1020)>>2]^B[(d|h>>6&1020)>>2]^B[(p|l<<2&1020)>>2]^B[(e|b|0)>>2],A=B[(r|u>>22&1020)>>2]^B[(f|h>>14&1020)>>2]^B[(d|l>>6&1020)>>2]^B[(p|c<<2&1020)>>2]^B[(e|b|4)>>2],y=B[(r|h>>22&1020)>>2]^B[(f|l>>14&1020)>>2]^B[(d|c>>6&1020)>>2]^B[(p|u<<2&1020)>>2]^B[(e|b|8)>>2],m=B[(r|l>>22&1020)>>2]^B[(f|c>>14&1020)>>2]^B[(d|u>>6&1020)>>2]^B[(p|h<<2&1020)>>2]^B[(e|b|12)>>2];c=g,u=A,h=y,l=m}n=B[(t|c>>22&1020)>>2]<<24^B[(t|u>>14&1020)>>2]<<16^B[(t|h>>6&1020)>>2]<<8^B[(t|l<<2&1020)>>2]^B[(e|b|0)>>2],i=B[(t|u>>22&1020)>>2]<<24^B[(t|h>>14&1020)>>2]<<16^B[(t|l>>6&1020)>>2]<<8^B[(t|c<<2&1020)>>2]^B[(e|b|4)>>2],a=B[(t|h>>22&1020)>>2]<<24^B[(t|l>>14&1020)>>2]<<16^B[(t|c>>6&1020)>>2]<<8^B[(t|u<<2&1020)>>2]^B[(e|b|8)>>2],o=B[(t|l>>22&1020)>>2]<<24^B[(t|c>>14&1020)>>2]<<16^B[(t|u>>6&1020)>>2]<<8^B[(t|h<<2&1020)>>2]^B[(e|b|12)>>2]}function k(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;_(0x0000,0x0800,0x1000,E,e,t,r,n)}function S(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var a=0;_(0x0400,0x0c00,0x2000,E,e,n,r,t);a=i,i=o,o=a}function Q(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s^e,c^t,u^r,h^l);s=n,c=i,u=a,h=o}function x(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;var f=0;_(0x0400,0x0c00,0x2000,E,e,l,r,t);f=i,i=o,o=f;n=n^s,i=i^c,a=a^u,o=o^h;s=e,c=t,u=r,h=l}function P(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n=n^e,c=i=i^t,u=a=a^r,h=o=o^l}function M(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);n=n^e,i=i^t,a=a^r,o=o^l;s=e,c=t,u=r,h=l}function U(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n,c=i,u=a,h=o;n=n^e,i=i^t,a=a^r,o=o^l}function D(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;_(0x0000,0x0800,0x1000,E,l,f,d,p);p=~m&p|m&p+1;d=~y&d|y&d+((p|0)==0);f=~A&f|A&f+((d|0)==0);l=~g&l|g&l+((f|0)==0);n=n^e;i=i^t;a=a^r;o=o^s}function R(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0;e=e^s,t=t^c,r=r^u,n=n^h;i=b|0,a=w|0,o=v|0,l=I|0;for(;(A|0)<128;A=A+1|0){if(i>>>31){f=f^e,d=d^t,p=p^r,g=g^n}i=i<<1|a>>>31,a=a<<1|o>>>31,o=o<<1|l>>>31,l=l<<1;y=n&1;n=n>>>1|r<<31,r=r>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(y)e=e^0xe1000000}s=f,c=d,u=p,h=g}function F(e){e=e|0;E=e}function T(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;n=e,i=t,a=r,o=s}function q(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;s=e,c=t,u=r,h=n}function O(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;l=e,f=t,d=r,p=n}function K(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;g=e,A=t,y=r,m=n}function H(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;p=~m&p|m&n,d=~y&d|y&r,f=~A&f|A&t,l=~g&l|g&e}function N(e){e=e|0;if(e&15)return-1;C[e|0]=n>>>24,C[e|1]=n>>>16&255,C[e|2]=n>>>8&255,C[e|3]=n&255,C[e|4]=i>>>24,C[e|5]=i>>>16&255,C[e|6]=i>>>8&255,C[e|7]=i&255,C[e|8]=a>>>24,C[e|9]=a>>>16&255,C[e|10]=a>>>8&255,C[e|11]=a&255,C[e|12]=o>>>24,C[e|13]=o>>>16&255,C[e|14]=o>>>8&255,C[e|15]=o&255;return 16}function L(e){e=e|0;if(e&15)return-1;C[e|0]=s>>>24,C[e|1]=s>>>16&255,C[e|2]=s>>>8&255,C[e|3]=s&255,C[e|4]=c>>>24,C[e|5]=c>>>16&255,C[e|6]=c>>>8&255,C[e|7]=c&255,C[e|8]=u>>>24,C[e|9]=u>>>16&255,C[e|10]=u>>>8&255,C[e|11]=u&255,C[e|12]=h>>>24,C[e|13]=h>>>16&255,C[e|14]=h>>>8&255,C[e|15]=h&255;return 16}function G(){k(0,0,0,0);b=n,w=i,v=a,I=o}function j(e,t,r){e=e|0;t=t|0;r=r|0;var s=0;if(t&15)return-1;while((r|0)>=16){W[e&7](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);C[t|0]=n>>>24,C[t|1]=n>>>16&255,C[t|2]=n>>>8&255,C[t|3]=n&255,C[t|4]=i>>>24,C[t|5]=i>>>16&255,C[t|6]=i>>>8&255,C[t|7]=i&255,C[t|8]=a>>>24,C[t|9]=a>>>16&255,C[t|10]=a>>>8&255,C[t|11]=a&255,C[t|12]=o>>>24,C[t|13]=o>>>16&255,C[t|14]=o>>>8&255,C[t|15]=o&255;s=s+16|0,t=t+16|0,r=r-16|0}return s|0}function z(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;if(t&15)return-1;while((r|0)>=16){Z[e&1](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);n=n+16|0,t=t+16|0,r=r-16|0}return n|0}var W=[k,S,Q,x,P,M,U,D];var Z=[Q,R];return{set_rounds:F,set_state:T,set_iv:q,set_nonce:O,set_mask:K,set_counter:H,get_state:N,get_iv:L,gcm_init:G,cipher:j,mac:z}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return h.set_key=function(e,t,n,a,o,c,u,l,f){var d=r.subarray(0,60),p=r.subarray(256,316);d.set([t,n,a,o,c,u,l,f]);for(var g=e,A=1;g<4*e+28;g++){var y=d[g-1];(g%e==0||8===e&&g%e==4)&&(y=i[y>>>24]<<24^i[y>>>16&255]<<16^i[y>>>8&255]<<8^i[255&y]),g%e==0&&(y=y<<8^y>>>24^A<<24,A=A<<1^(128&A?27:0)),d[g]=d[g-e]^y}for(var m=0;m=g-4?y:s[0][i[y>>>24]]^s[1][i[y>>>16&255]]^s[2][i[y>>>8&255]]^s[3][i[255&y]];h.set_rounds(e+5)},h};return h.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},h.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},h.MAC={CBC:0,GCM:1},h.HEAP_DATA=16384,h}();function ms(e){return e instanceof Uint8Array}function bs(e,t){const r=e?e.byteLength:t||65536;if(4095&r||r<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e||new Uint8Array(new ArrayBuffer(r))}function ws(e,t,r,n,i){const a=e.length-t,o=ae+t.length),0),r=new Uint8Array(t);let n=0;for(let t=0;t>2,i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12),n>16?i.getUint32(16):0,n>16?i.getUint32(20):0,n>24?i.getUint32(24):0,n>24?i.getUint32(28):0),void 0!==t){if(16!==t.length)throw new Es("illegal iv size");let e=new DataView(t.buffer,t.byteOffset,t.byteLength);r.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(e){if(!ms(e))throw new TypeError("data isn't of expected type");let{heap:t,asm:r}=this.acquire_asm(),n=ys.ENC[this.mode],i=ys.HEAP_DATA,a=this.pos,o=this.len,s=0,c=e.length||0,u=0,h=0,l=new Uint8Array(o+c&-16);for(;c>0;)h=ws(t,a+o,e,s,c),o+=h,s+=h,c-=h,h=r.cipher(n,i+a,o),h&&l.set(t.subarray(a,a+h),u),u+=h,h0;)f=ws(t,a+o,e,s,c),o+=f,s+=f,c-=f,f=r.cipher(n,i+a,o-(c?0:l)),f&&d.set(t.subarray(a,a+f),u),u+=f,f0){if(a%16){if(this.hasOwnProperty("padding"))throw new Es("data length must be a multiple of the block size");a+=16-a%16}if(t.cipher(r,n+i,a),this.hasOwnProperty("padding")&&this.padding){let t=e[i+o-1];if(t<1||t>16||t>o)throw new Bs("bad padding");let r=0;for(let n=t;n>1;n--)r|=t^e[i+o-n];if(r)throw new Bs("bad padding");o-=t}}const s=new Uint8Array(o);return o>0&&s.set(e.subarray(i,i+o)),this.pos=0,this.len=0,this.release_asm(),s}}class Ss{static encrypt(e,t,r=!1){return new Ss(t,r).encrypt(e)}static decrypt(e,t,r=!1){return new Ss(t,r).decrypt(e)}constructor(e,t=!1,r){this.aes=r||new ks(e,void 0,t,"ECB")}encrypt(e){return vs(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return vs(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function Qs(e){const t=function(e){const t=new Ss(e);this.encrypt=function(e){return t.encrypt(e)},this.decrypt=function(e){return t.decrypt(e)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function xs(e,t,r,n,i,a){const o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],c=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],d=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let p,g,A,y,m,b,w,v,I,E,B,C,_,k,S=0,Q=t.length;const x=32===e.length?3:9;v=3===x?r?[0,32,2]:[30,-2,-2]:r?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],r&&(t=function(e,t){const r=8-e.length%8;let n;if(2===t&&r<8)n=32;else if(1===t)n=r;else{if(t||!(r<8)){if(8===r)return e;throw Error("des: invalid padding")}n=0}const i=new Uint8Array(e.length+r);for(let t=0;t>>4^w),w^=A,b^=A<<4,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,b=b<<1|b>>>31,w=w<<1|w>>>31,g=0;g>>4|w<<28)^e[p+1],A=b,b=w,w=A^(s[y>>>24&63]|u[y>>>16&63]|l[y>>>8&63]|d[63&y]|o[m>>>24&63]|c[m>>>16&63]|h[m>>>8&63]|f[63&m]);A=b,b=w,w=A}b=b>>>1|b<<31,w=w>>>1|w<<31,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=252645135&(b>>>4^w),w^=A,b^=A<<4,1===n&&(r?(I=b,B=w):(b^=E,w^=C)),P[M++]=b>>>24,P[M++]=b>>>16&255,P[M++]=b>>>8&255,P[M++]=255&b,P[M++]=w>>>24,P[M++]=w>>>16&255,P[M++]=w>>>8&255,P[M++]=255&w}return r||(P=function(e,t){let r,n=null;if(2===t)r=32;else if(1===t)n=e[e.length-1];else{if(t)throw Error("des: invalid padding");r=0}if(!n){for(n=1;e[e.length-n]===r;)n++;n--}return e.subarray(0,e.length-n)}(P,a)),P}function Ps(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],s=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],l=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],f=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length>8?3:1,A=Array(32*g),y=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let m,b,w,v=0,I=0;for(let E=0;E>>4^E),E^=w,g^=w<<4,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=858993459&(g>>>2^E),E^=w,g^=w<<2,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=16711935&(E>>>8^g),g^=w,E^=w<<8,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=g<<8|E>>>20&240,g=E<<24|E<<8&16711680|E>>>8&65280|E>>>24&240,E=w;for(let e=0;e<16;e++)y[e]?(g=g<<2|g>>>26,E=E<<2|E>>>26):(g=g<<1|g>>>27,E=E<<1|E>>>27),g&=-15,E&=-15,m=t[g>>>28]|r[g>>>24&15]|n[g>>>20&15]|i[g>>>16&15]|a[g>>>12&15]|o[g>>>8&15]|s[g>>>4&15],b=c[E>>>28]|u[E>>>24&15]|h[E>>>20&15]|l[E>>>16&15]|f[E>>>12&15]|d[E>>>8&15]|p[E>>>4&15],w=65535&(b>>>16^m),A[I++]=m^w,A[I++]=b^w<<16}return A}function Ms(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(e){return xs(Ps(this.key[2]),xs(Ps(this.key[1]),xs(Ps(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function Us(){this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),e.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(let e=0;e<16;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>>16&255,t[a+6]=s>>>8&255,t[a+7]=255&s}return t},this.decrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>16&255,t[a+6]=s>>8&255,t[a+7]=255&s}return t};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function r(e,t,r){const n=t+e,i=n<>>32-r;return(a[0][i>>>24]^a[1][i>>>16&255])-a[2][i>>>8&255]+a[3][255&i]}function n(e,t,r){const n=t^e,i=n<>>32-r;return a[0][i>>>24]-a[1][i>>>16&255]+a[2][i>>>8&255]^a[3][255&i]}function i(e,t,r){const n=t-e,i=n<>>32-r;return(a[0][i>>>24]+a[1][i>>>16&255]^a[2][i>>>8&255])-a[3][255&i]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(r){const n=[,,,,,,,,],i=Array(32);let o;for(let e=0;e<4;e++)o=4*e,n[e]=r[o]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3];const s=[6,7,4,5];let c,u=0;for(let r=0;r<2;r++)for(let r=0;r<4;r++){for(o=0;o<4;o++){const t=e[r][o];c=n[t[1]],c^=a[4][n[t[2]>>>2]>>>24-8*(3&t[2])&255],c^=a[5][n[t[3]>>>2]>>>24-8*(3&t[3])&255],c^=a[6][n[t[4]>>>2]>>>24-8*(3&t[4])&255],c^=a[7][n[t[5]>>>2]>>>24-8*(3&t[5])&255],c^=a[s[o]][n[t[6]>>>2]>>>24-8*(3&t[6])&255],n[t[0]]=c}for(o=0;o<4;o++){const e=t[r][o];c=a[4][n[e[0]>>>2]>>>24-8*(3&e[0])&255],c^=a[5][n[e[1]>>>2]>>>24-8*(3&e[1])&255],c^=a[6][n[e[2]>>>2]>>>24-8*(3&e[2])&255],c^=a[7][n[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=a[4+o][n[e[4]>>>2]>>>24-8*(3&e[4])&255],i[u]=c,u++}}for(let e=0;e<16;e++)this.masking[e]=i[e],this.rotate[e]=31&i[16+e]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Ds(e){this.cast5=new Us,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}Ms.keySize=Ms.prototype.keySize=24,Ms.blockSize=Ms.prototype.blockSize=8,Ds.blockSize=Ds.prototype.blockSize=8,Ds.keySize=Ds.prototype.keySize=16;const Rs=4294967295;function Fs(e,t){return(e<>>32-t)&Rs}function Ts(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function qs(e,t,r){e.splice(t,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function Os(e,t){return e>>>8*t&255}function Ks(e){this.tf=function(){let e=null,t=null,r=-1,n=[],i=[[],[],[],[]];function a(e){return i[0][Os(e,0)]^i[1][Os(e,1)]^i[2][Os(e,2)]^i[3][Os(e,3)]}function o(e){return i[0][Os(e,3)]^i[1][Os(e,0)]^i[2][Os(e,1)]^i[3][Os(e,2)]}function s(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Fs(t[2]^r+i+n[4*e+8]&Rs,31),t[3]=Fs(t[3],1)^r+2*i+n[4*e+9]&Rs,r=a(t[2]),i=o(t[3]),t[0]=Fs(t[0]^r+i+n[4*e+10]&Rs,31),t[1]=Fs(t[1],1)^r+2*i+n[4*e+11]&Rs}function c(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Fs(t[2],1)^r+i+n[4*e+10]&Rs,t[3]=Fs(t[3]^r+2*i+n[4*e+11]&Rs,31),r=a(t[2]),i=o(t[3]),t[0]=Fs(t[0],1)^r+i+n[4*e+8]&Rs,t[1]=Fs(t[1]^r+2*i+n[4*e+9]&Rs,31)}return{name:"twofish",blocksize:16,open:function(t){let r,a,o,s,c;e=t;const u=[],h=[],l=[];let f;const d=[];let p,g,A;const y=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],m=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],b=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],w=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],v=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],I=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],E=[[],[]],B=[[],[],[],[]];function C(e){return e^e>>2^[0,90,180,238][3&e]}function _(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function k(e,t){let r,n,i;for(r=0;r<8;r++)n=t>>>24,t=t<<8&Rs|e>>>24,e=e<<8&Rs,i=n<<1,128&n&&(i^=333),t^=n^i<<16,i^=n>>>1,1&n&&(i^=166),t^=i<<24|i<<8;return t}function S(e,t){const r=t>>4,n=15&t,i=y[e][r^n],a=m[e][v[n]^I[r]];return w[e][v[a]^I[i]]<<4|b[e][i^a]}function Q(e,t){let r=Os(e,0),n=Os(e,1),i=Os(e,2),a=Os(e,3);switch(f){case 4:r=E[1][r]^Os(t[3],0),n=E[0][n]^Os(t[3],1),i=E[0][i]^Os(t[3],2),a=E[1][a]^Os(t[3],3);case 3:r=E[1][r]^Os(t[2],0),n=E[1][n]^Os(t[2],1),i=E[0][i]^Os(t[2],2),a=E[0][a]^Os(t[2],3);case 2:r=E[0][E[0][r]^Os(t[1],0)]^Os(t[0],0),n=E[0][E[1][n]^Os(t[1],1)]^Os(t[0],1),i=E[1][E[0][i]^Os(t[1],2)]^Os(t[0],2),a=E[1][E[1][a]^Os(t[1],3)]^Os(t[0],3)}return B[0][r]^B[1][n]^B[2][i]^B[3][a]}for(e=e.slice(0,32),r=e.length;16!==r&&24!==r&&32!==r;)e[r++]=0;for(r=0;r>2]=Ts(e,r);for(r=0;r<256;r++)E[0][r]=S(0,r),E[1][r]=S(1,r);for(r=0;r<256;r++)p=E[1][r],g=C(p),A=_(p),B[0][r]=p+(g<<8)+(A<<16)+(A<<24),B[2][r]=g+(A<<8)+(p<<16)+(A<<24),p=E[0][r],g=C(p),A=_(p),B[1][r]=A+(A<<8)+(g<<16)+(p<<24),B[3][r]=g+(p<<8)+(A<<16)+(g<<24);for(f=l.length/2,r=0;r=0;e--)c(e,a);qs(t,r,a[2]^n[0]),qs(t,r+4,a[3]^n[1]),qs(t,r+8,a[0]^n[2]),qs(t,r+12,a[1]^n[3]),r+=16},finalize:function(){return t}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}function Hs(){}function Ns(e){this.bf=new Hs,this.bf.init(e),this.encrypt=function(e){return this.bf.encryptBlock(e)}}Ks.keySize=Ks.prototype.keySize=32,Ks.blockSize=Ks.prototype.blockSize=16,Hs.prototype.BLOCKSIZE=8,Hs.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Hs.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Hs.prototype.NN=16,Hs.prototype._clean=function(e){return e<0&&(e=2147483648+(2147483647&e)),e},Hs.prototype._F=function(e){let t;const r=255&e,n=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][n],t+=this.sboxes[3][r],t},Hs.prototype._encryptBlock=function(e){let t,r=e[0],n=e[1];for(t=0;t>>24-8*t&255,i[t+n]=r[1]>>>24-8*t&255;return i},Hs.prototype._decryptBlock=function(e){let t,r=e[0],n=e[1];for(t=this.NN+1;t>1;--t){r^=this.parray[t],n=this._F(r)^n;const e=r;r=n,n=e}r^=this.parray[1],n^=this.parray[0],e[0]=this._clean(n),e[1]=this._clean(r)},Hs.prototype.init=function(e){let t,r=0;for(this.parray=[],t=0;t=e.length&&(r=0);this.parray[t]=this.PARRAY[t]^n}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],r=0;r<256;++r)this.sboxes[t][r]=this.SBOXES[t][r];const n=[0,0];for(t=0;t>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=t+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=r+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=c+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=u+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=h+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=l+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=f+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=d+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=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>2;I=v;v=k;_=Pe^_e^we^me;De=_<<1|_>>>31;k=De+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;_=Me^ke^ve^be;Re=_<<1|_>>>31;k=Re+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;_=Ue^Se^Ie^we;Fe=_<<1|_>>>31;k=Fe+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;_=De^Qe^Ee^ve;Te=_<<1|_>>>31;k=Te+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;n=n+v|0;i=i+I|0;a=a+E|0;o=o+B|0;s=s+C|0}function I(e){e=e|0;v(w[e|0]<<24|w[e|1]<<16|w[e|2]<<8|w[e|3],w[e|4]<<24|w[e|5]<<16|w[e|6]<<8|w[e|7],w[e|8]<<24|w[e|9]<<16|w[e|10]<<8|w[e|11],w[e|12]<<24|w[e|13]<<16|w[e|14]<<8|w[e|15],w[e|16]<<24|w[e|17]<<16|w[e|18]<<8|w[e|19],w[e|20]<<24|w[e|21]<<16|w[e|22]<<8|w[e|23],w[e|24]<<24|w[e|25]<<16|w[e|26]<<8|w[e|27],w[e|28]<<24|w[e|29]<<16|w[e|30]<<8|w[e|31],w[e|32]<<24|w[e|33]<<16|w[e|34]<<8|w[e|35],w[e|36]<<24|w[e|37]<<16|w[e|38]<<8|w[e|39],w[e|40]<<24|w[e|41]<<16|w[e|42]<<8|w[e|43],w[e|44]<<24|w[e|45]<<16|w[e|46]<<8|w[e|47],w[e|48]<<24|w[e|49]<<16|w[e|50]<<8|w[e|51],w[e|52]<<24|w[e|53]<<16|w[e|54]<<8|w[e|55],w[e|56]<<24|w[e|57]<<16|w[e|58]<<8|w[e|59],w[e|60]<<24|w[e|61]<<16|w[e|62]<<8|w[e|63])}function E(e){e=e|0;w[e|0]=n>>>24;w[e|1]=n>>>16&255;w[e|2]=n>>>8&255;w[e|3]=n&255;w[e|4]=i>>>24;w[e|5]=i>>>16&255;w[e|6]=i>>>8&255;w[e|7]=i&255;w[e|8]=a>>>24;w[e|9]=a>>>16&255;w[e|10]=a>>>8&255;w[e|11]=a&255;w[e|12]=o>>>24;w[e|13]=o>>>16&255;w[e|14]=o>>>8&255;w[e|15]=o&255;w[e|16]=s>>>24;w[e|17]=s>>>16&255;w[e|18]=s>>>8&255;w[e|19]=s&255}function B(){n=0x67452301;i=0xefcdab89;a=0x98badcfe;o=0x10325476;s=0xc3d2e1f0;c=u=0}function C(e,t,r,h,l,f,d){e=e|0;t=t|0;r=r|0;h=h|0;l=l|0;f=f|0;d=d|0;n=e;i=t;a=r;o=h;s=l;c=f;u=d}function _(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){I(e);e=e+64|0;t=t-64|0;r=r+64|0}c=c+r|0;if(c>>>0>>0)u=u+1|0;return r|0}function k(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=_(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;c=c+t|0;if(c>>>0>>0)u=u+1|0;w[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)w[e|i]=0x00;I(e);t=0;w[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)w[e|i]=0;w[e|56]=u>>>21&255;w[e|57]=u>>>13&255;w[e|58]=u>>>5&255;w[e|59]=u<<3&255|c>>>29;w[e|60]=c>>>21&255;w[e|61]=c>>>13&255;w[e|62]=c>>>5&255;w[e|63]=c<<3&255;I(e);if(~r)E(r);return n|0}function S(){n=h;i=l;a=f;o=d;s=p;c=64;u=0}function Q(){n=g;i=A;a=y;o=m;s=b;c=64;u=0}function x(e,t,r,w,I,E,C,_,k,S,Q,x,P,M,U,D){e=e|0;t=t|0;r=r|0;w=w|0;I=I|0;E=E|0;C=C|0;_=_|0;k=k|0;S=S|0;Q=Q|0;x=x|0;P=P|0;M=M|0;U=U|0;D=D|0;B();v(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,w^0x5c5c5c5c,I^0x5c5c5c5c,E^0x5c5c5c5c,C^0x5c5c5c5c,_^0x5c5c5c5c,k^0x5c5c5c5c,S^0x5c5c5c5c,Q^0x5c5c5c5c,x^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,U^0x5c5c5c5c,D^0x5c5c5c5c);g=n;A=i;y=a;m=o;b=s;B();v(e^0x36363636,t^0x36363636,r^0x36363636,w^0x36363636,I^0x36363636,E^0x36363636,C^0x36363636,_^0x36363636,k^0x36363636,S^0x36363636,Q^0x36363636,x^0x36363636,P^0x36363636,M^0x36363636,U^0x36363636,D^0x36363636);h=n;l=i;f=a;d=o;p=s;c=64;u=0}function P(e,t,r){e=e|0;t=t|0;r=r|0;var c=0,u=0,h=0,l=0,f=0,d=0;if(e&63)return-1;if(~r)if(r&31)return-1;d=k(e,t,-1)|0;c=n,u=i,h=a,l=o,f=s;Q();v(c,u,h,l,f,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~r)E(r);return d|0}function M(e,t,r,c,u){e=e|0;t=t|0;r=r|0;c=c|0;u=u|0;var h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~u)if(u&31)return-1;w[e+t|0]=r>>>24;w[e+t+1|0]=r>>>16&255;w[e+t+2|0]=r>>>8&255;w[e+t+3|0]=r&255;P(e,t+4|0,-1)|0;h=g=n,l=A=i,f=y=a,d=m=o,p=b=s;c=c-1|0;while((c|0)>0){S();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;Q();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;h=h^n;l=l^i;f=f^a;d=d^o;p=p^s;c=c-1|0}n=h;i=l;a=f;o=d;s=p;if(~u)E(u);return 0}return{reset:B,init:C,process:_,finish:k,hmac_reset:S,hmac_init:x,hmac_finish:P,pbkdf2_generate_block:M}};class Zs{constructor(){this.pos=0,this.len=0}reset(){const{asm:e}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,e.reset(),this}process(e){if(null!==this.result)throw new Is("state must be reset before processing new data");const{asm:t,heap:r}=this.acquire_asm();let n=this.pos,i=this.len,a=0,o=e.length,s=0;for(;o>0;)s=ws(r,n+i,e,a,o),i+=s,a+=s,o-=s,s=t.process(n,i),n+=s,i-=s,i||(n=0);return this.pos=n,this.len=i,this}finish(){if(null!==this.result)throw new Is("state must be reset before processing new data");const{asm:e,heap:t}=this.acquire_asm();return e.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(t.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const Js=[],Vs=[];class Ys extends Zs{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Js.pop()||bs(),this.asm=Vs.pop()||Ws({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Js.push(this.heap),Vs.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new Ys).process(e).finish().result}}Ys.NAME="sha1",Ys.heap_pool=[],Ys.asm_pool=[],Ys.asm_function=Ws;const $s=[],Xs=[];class ec extends Zs{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=$s.pop()||bs(),this.asm=Xs.pop()||function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,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<8|Q[e|47],Q[e|48]<<24|Q[e|49]<<16|Q[e|50]<<8|Q[e|51],Q[e|52]<<24|Q[e|53]<<16|Q[e|54]<<8|Q[e|55],Q[e|56]<<24|Q[e|57]<<16|Q[e|58]<<8|Q[e|59],Q[e|60]<<24|Q[e|61]<<16|Q[e|62]<<8|Q[e|63])}function M(e){e=e|0;Q[e|0]=n>>>24;Q[e|1]=n>>>16&255;Q[e|2]=n>>>8&255;Q[e|3]=n&255;Q[e|4]=i>>>24;Q[e|5]=i>>>16&255;Q[e|6]=i>>>8&255;Q[e|7]=i&255;Q[e|8]=a>>>24;Q[e|9]=a>>>16&255;Q[e|10]=a>>>8&255;Q[e|11]=a&255;Q[e|12]=o>>>24;Q[e|13]=o>>>16&255;Q[e|14]=o>>>8&255;Q[e|15]=o&255;Q[e|16]=s>>>24;Q[e|17]=s>>>16&255;Q[e|18]=s>>>8&255;Q[e|19]=s&255;Q[e|20]=c>>>24;Q[e|21]=c>>>16&255;Q[e|22]=c>>>8&255;Q[e|23]=c&255;Q[e|24]=u>>>24;Q[e|25]=u>>>16&255;Q[e|26]=u>>>8&255;Q[e|27]=u&255;Q[e|28]=h>>>24;Q[e|29]=h>>>16&255;Q[e|30]=h>>>8&255;Q[e|31]=h&255}function U(){n=0x6a09e667;i=0xbb67ae85;a=0x3c6ef372;o=0xa54ff53a;s=0x510e527f;c=0x9b05688c;u=0x1f83d9ab;h=0x5be0cd19;l=f=0}function D(e,t,r,d,p,g,A,y,m,b){e=e|0;t=t|0;r=r|0;d=d|0;p=p|0;g=g|0;A=A|0;y=y|0;m=m|0;b=b|0;n=e;i=t;a=r;o=d;s=p;c=g;u=A;h=y;l=m;f=b}function R(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){P(e);e=e+64|0;t=t-64|0;r=r+64|0}l=l+r|0;if(l>>>0>>0)f=f+1|0;return r|0}function F(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=R(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;l=l+t|0;if(l>>>0>>0)f=f+1|0;Q[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)Q[e|i]=0x00;P(e);t=0;Q[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)Q[e|i]=0;Q[e|56]=f>>>21&255;Q[e|57]=f>>>13&255;Q[e|58]=f>>>5&255;Q[e|59]=f<<3&255|l>>>29;Q[e|60]=l>>>21&255;Q[e|61]=l>>>13&255;Q[e|62]=l>>>5&255;Q[e|63]=l<<3&255;P(e);if(~r)M(r);return n|0}function T(){n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;l=64;f=0}function q(){n=v;i=I;a=E;o=B;s=C;c=_;u=k;h=S;l=64;f=0}function O(e,t,r,Q,P,M,D,R,F,T,q,O,K,H,N,L){e=e|0;t=t|0;r=r|0;Q=Q|0;P=P|0;M=M|0;D=D|0;R=R|0;F=F|0;T=T|0;q=q|0;O=O|0;K=K|0;H=H|0;N=N|0;L=L|0;U();x(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,Q^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,D^0x5c5c5c5c,R^0x5c5c5c5c,F^0x5c5c5c5c,T^0x5c5c5c5c,q^0x5c5c5c5c,O^0x5c5c5c5c,K^0x5c5c5c5c,H^0x5c5c5c5c,N^0x5c5c5c5c,L^0x5c5c5c5c);v=n;I=i;E=a;B=o;C=s;_=c;k=u;S=h;U();x(e^0x36363636,t^0x36363636,r^0x36363636,Q^0x36363636,P^0x36363636,M^0x36363636,D^0x36363636,R^0x36363636,F^0x36363636,T^0x36363636,q^0x36363636,O^0x36363636,K^0x36363636,H^0x36363636,N^0x36363636,L^0x36363636);d=n;p=i;g=a;A=o;y=s;m=c;b=u;w=h;l=64;f=0}function K(e,t,r){e=e|0;t=t|0;r=r|0;var l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~r)if(r&31)return-1;b=F(e,t,-1)|0;l=n,f=i,d=a,p=o,g=s,A=c,y=u,m=h;q();x(l,f,d,p,g,A,y,m,0x80000000,0,0,0,0,0,0,768);if(~r)M(r);return b|0}function H(e,t,r,l,f){e=e|0;t=t|0;r=r|0;l=l|0;f=f|0;var d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0;if(e&63)return-1;if(~f)if(f&31)return-1;Q[e+t|0]=r>>>24;Q[e+t+1|0]=r>>>16&255;Q[e+t+2|0]=r>>>8&255;Q[e+t+3|0]=r&255;K(e,t+4|0,-1)|0;d=v=n,p=I=i,g=E=a,A=B=o,y=C=s,m=_=c,b=k=u,w=S=h;l=l-1|0;while((l|0)>0){T();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;q();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;d=d^n;p=p^i;g=g^a;A=A^o;y=y^s;m=m^c;b=b^u;w=w^h;l=l-1|0}n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;if(~f)M(f);return 0}return{reset:U,init:D,process:R,finish:F,hmac_reset:T,hmac_init:O,hmac_finish:K,pbkdf2_generate_block:H}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&($s.push(this.heap),Xs.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new ec).process(e).finish().result}}ec.NAME="sha256";var tc=rc;function rc(e,t){if(!e)throw Error(t||"Assertion failed")}rc.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var nc=void 0!==oo?oo:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ic(e,t){return e(t={exports:{}},t.exports),t.exports}function ac(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var oc=ic((function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}));function sc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function cc(e){return 1===e.length?"0"+e:e}function uc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var hc={inherits:oc,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return a},split32:function(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,n){return e+t+r+n>>>0},sum32_5:function(e,t,r,n,i){return e+t+r+n+i>>>0},sum64:function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},sum64_hi:function(e,t,r,n){return(t+n>>>0>>0},sum64_lo:function(e,t,r,n){return t+n>>>0},sum64_4_hi:function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},sum64_5_hi:function(e,t,r,n,i,a,o,s,c,u){var h=0,l=t;return h+=(l=l+n>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function lc(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var fc=lc;lc.prototype.update=function(e,t){if(e=hc.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=hc.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a>>3},Bc=function(e){return pc(e,17)^pc(e,19)^e>>>10},Cc=hc.sum32,_c=hc.sum32_4,kc=hc.sum32_5,Sc=bc,Qc=wc,xc=vc,Pc=Ic,Mc=Ec,Uc=Bc,Dc=dc.BlockHash,Rc=[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];function Fc(){if(!(this instanceof Fc))return new Fc;Dc.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Rc,this.W=Array(64)}hc.inherits(Fc,Dc);var Tc=Fc;function qc(){if(!(this instanceof qc))return new qc;Tc.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Fc.blockSize=512,Fc.outSize=256,Fc.hmacStrength=192,Fc.padLength=64,Fc.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>>32-i,r)}function Mu(e,t,r,n,i,a,o){return Pu(t&r|~t&n,e,t,i,a,o)}function Uu(e,t,r,n,i,a,o){return Pu(t&n|r&~n,e,t,i,a,o)}function Du(e,t,r,n,i,a,o){return Pu(t^r^n,e,t,i,a,o)}function Ru(e,t,r,n,i,a,o){return Pu(r^(t|~n),e,t,i,a,o)}function Fu(e){const t=[];let r;for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}const Tu="0123456789abcdef".split("");function qu(e){let t="",r=0;for(;r<4;r++)t+=Tu[e>>8*r+4&15]+Tu[e>>8*r&15];return t}function Ou(e,t){return e+t&4294967295}const Ku=$o.getWebCrypto(),Hu=$o.getNodeCrypto(),Nu=Hu&&Hu.getHashes();function Lu(e){if(Hu&&Nu.includes(e))return async function(t){const r=Hu.createHash(e);return Ko(t,(e=>{r.update(e)}),(()=>new Uint8Array(r.digest())))}}function Gu(e,t){return async function(r,n=os){if(fo(r)&&(r=await zo(r)),!$o.isStream(r)&&Ku&&t&&r.length>=n.minBytesForWebCrypto)return new Uint8Array(await Ku.digest(t,r));const i=e();return Ko(r,(e=>{i.update(e)}),(()=>new Uint8Array(i.digest())))}}function ju(e,t){return async function(r,n=os){if(fo(r)&&(r=await zo(r)),$o.isStream(r)){const t=new e;return Ko(r,(e=>{t.process(e)}),(()=>t.finish().result))}return Ku&&t&&r.length>=n.minBytesForWebCrypto?new Uint8Array(await Ku.digest(t,r)):e.bytes(r)}}const zu={md5:Lu("md5")||async function(e){const t=function(e){const t=e.length,r=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)xu(r,Fu(e.substring(n-64,n)));e=e.substring(n-64);const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n>2]|=e.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(xu(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*t,xu(r,i),r}($o.uint8ArrayToString(e));return $o.hexToUint8Array(function(e){for(let t=0;tnew Uint8Array(a.update(e))))}(e,t,r,n);if($o.isAES(e))return function(e,t,r,n,i){if($o.getWebCrypto()&&24!==t.length&&!$o.isStream(r)&&r.length>=3e3*i.minBytesForWebCrypto)return async function(e,t,r,n){const i="AES-CBC",a=await Vu.importKey("raw",t,{name:i},!1,["encrypt"]),{blockSize:o}=Ju(e),s=$o.concatUint8Array([new Uint8Array(o),r]),c=new Uint8Array(await Vu.encrypt({name:i,iv:n},a,s)).subarray(0,r.length);return function(e,t){for(let r=0;ra.aes.AES_Encrypt_process(e)),(()=>a.aes.AES_Encrypt_finish()))}(e,t,r,n,i);const o=new(Ju(e))(t),s=o.blockSize,c=n.slice();let u=new Uint8Array;const h=e=>{e&&(u=$o.concatUint8Array([u,e]));const t=new Uint8Array(u.length);let r,n=0;for(;e?u.length>=s:u.length;){const e=o.encrypt(c);for(r=0;rnew Uint8Array(a.update(e))))}(e,t,r,n);if($o.isAES(e))return function(e,t,r,n){if($o.isStream(r)){const e=new Zu(t,n);return Ko(r,(t=>e.aes.AES_Decrypt_process(t)),(()=>e.aes.AES_Decrypt_finish()))}return Zu.decrypt(r,t,n)}(0,t,r,n);const a=new(Ju(e))(t),o=a.blockSize;let s=n,c=new Uint8Array;const u=e=>{e&&(c=$o.concatUint8Array([c,e]));const t=new Uint8Array(c.length);let r,n=0;for(;e?c.length>=o:c.length;){const e=a.encrypt(s);for(s=c.subarray(0,o),r=0;r48)throw new Es("illegal counter size");let e=Math.pow(2,r)-1;n.set_mask(0,0,e/4294967296|0,0|e)}else r=48,n.set_mask(0,0,65535,4294967295);if(void 0===e)throw Error("nonce is required");{let t=e.length;if(!t||t>16)throw new Es("illegal nonce size");let r=new DataView(new ArrayBuffer(16));new Uint8Array(r.buffer).set(e),n.set_nonce(r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12))}if(void 0!==t){if(t<0||t>=Math.pow(2,r))throw new Es("illegal counter value");n.set_counter(0,0,t/4294967296|0,0|t)}}}class rh{static encrypt(e,t,r=!0,n){return new rh(t,n,r).encrypt(e)}static decrypt(e,t,r=!0,n){return new rh(t,n,r).decrypt(e)}constructor(e,t,r=!0,n){this.aes=n||new ks(e,t,r,"CBC")}encrypt(e){return vs(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return vs(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}const nh=$o.getWebCrypto(),ih=$o.getNodeCrypto(),ah=16;function oh(e,t){const r=e.length-ah;for(let n=0;n>3),17+(u>>3)),8-(7&u)).subarray(1),d=new Uint8Array(wh),p=new Uint8Array(t.length+vh);let g,A=0;for(g=0;g16)throw new Es("illegal tagSize value");const s=t.length||0,c=new Uint8Array(16);12!==s?(this._gcm_mac_process(t),o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=s>>>29,o[12]=s>>>21&255,o[13]=s>>>13&255,o[14]=s>>>5&255,o[15]=s<<3&255,a.mac(ys.MAC.GCM,ys.HEAP_DATA,16),a.get_iv(ys.HEAP_DATA),a.set_iv(0,0,0,0),c.set(o.subarray(0,16))):(c.set(t),c[15]=1);const u=new DataView(c.buffer);if(this.gamma0=u.getUint32(12),a.set_nonce(u.getUint32(0),u.getUint32(4),u.getUint32(8),0),a.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>Sh)throw new Es("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");a.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(e,t,r,n,i){return new Qh(t,r,n,i).encrypt(e)}static decrypt(e,t,r,n,i){return new Qh(t,r,n,i).decrypt(e)}encrypt(e){return this.AES_GCM_encrypt(e)}decrypt(e){return this.AES_GCM_decrypt(e)}AES_GCM_Encrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.aes.pos,s=this.aes.len,c=0,u=s+r&-16,h=0;if((a-1<<4)+s+r>Sh)throw new RangeError("counter overflow");const l=new Uint8Array(u);for(;r>0;)h=ws(i,o+s,e,t,r),s+=h,t+=h,r-=h,h=n.cipher(ys.ENC.CTR,ys.HEAP_DATA+o,s),h=n.mac(ys.MAC.GCM,ys.HEAP_DATA+o,h),h&&l.set(i.subarray(o,o+h),c),a+=h>>>4,c+=h,h>>29,t[4]=u>>>21,t[5]=u>>>13&255,t[6]=u>>>5&255,t[7]=u<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(ys.MAC.GCM,ys.HEAP_DATA,16),e.get_iv(ys.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ys.ENC.CTR,ys.HEAP_DATA,16),s.set(t.subarray(0,n),o),this.counter=1,this.aes.pos=0,this.aes.len=0,s}AES_GCM_Decrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.tagSize,s=this.aes.pos,c=this.aes.len,u=0,h=c+r>o?c+r-o&-16:0,l=c+r-h,f=0;if((a-1<<4)+c+r>Sh)throw new RangeError("counter overflow");const d=new Uint8Array(h);for(;r>l;)f=ws(i,s+c,e,t,r-l),c+=f,t+=f,r-=f,f=n.mac(ys.MAC.GCM,ys.HEAP_DATA+s,f),f=n.cipher(ys.DEC.CTR,ys.HEAP_DATA+s,f),f&&d.set(i.subarray(s,s+f),u),a+=f>>>4,u+=f,s=0,c=0;return r>0&&(c+=ws(i,0,e,t,r)),this.counter=a,this.aes.pos=s,this.aes.len=c,d}AES_GCM_Decrypt_finish(){let{asm:e,heap:t}=this.aes.acquire_asm(),r=this.tagSize,n=this.adata,i=this.counter,a=this.aes.pos,o=this.aes.len,s=o-r;if(o>>29,t[4]=l>>>21,t[5]=l>>>13&255,t[6]=l>>>5&255,t[7]=l<<3&255,t[8]=t[9]=t[10]=0,t[11]=f>>>29,t[12]=f>>>21&255,t[13]=f>>>13&255,t[14]=f>>>5&255,t[15]=f<<3&255,e.mac(ys.MAC.GCM,ys.HEAP_DATA,16),e.get_iv(ys.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ys.ENC.CTR,ys.HEAP_DATA,16);let d=0;for(let e=0;e0;){for(a=ws(r,0,e,n,i),n+=a,i-=a;15&a;)r[a++]=0;t.mac(ys.MAC.GCM,ys.HEAP_DATA,a)}}}const xh=$o.getWebCrypto(),Ph=$o.getNodeCrypto(),Mh=$o.getNodeBuffer(),Uh=16,Dh="AES-GCM";async function Rh(e,t){if(e!==Vo.symmetric.aes128&&e!==Vo.symmetric.aes192&&e!==Vo.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if($o.getNodeCrypto())return{encrypt:async function(e,r,n=new Uint8Array){const i=new Ph.createCipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n);const a=Mh.concat([i.update(e),i.final(),i.getAuthTag()]);return new Uint8Array(a)},decrypt:async function(e,r,n=new Uint8Array){const i=new Ph.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n),i.setAuthTag(e.slice(e.length-Uh,e.length));const a=Mh.concat([i.update(e.slice(0,e.length-Uh)),i.final()]);return new Uint8Array(a)}};if($o.getWebCrypto()&&24!==t.length){const e=await xh.importKey("raw",t,{name:Dh},!1,["encrypt","decrypt"]);return{encrypt:async function(r,n,i=new Uint8Array){if(!r.length)return Qh.encrypt(r,t,n,i);const a=await xh.encrypt({name:Dh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)},decrypt:async function(r,n,i=new Uint8Array){if(r.length===Uh)return Qh.decrypt(r,t,n,i);const a=await xh.decrypt({name:Dh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)}}}return{encrypt:async function(e,r,n){return Qh.encrypt(e,t,r,n)},decrypt:async function(e,r,n){return Qh.decrypt(e,t,r,n)}}}Rh.getNonce=function(e,t){const r=e.slice();for(let e=0;e>>8)-1}(e,t,r,n)}function d(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function p(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function g(e,t,r){for(var n,i=~(r-1),a=0;a<16;a++)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function A(e,r){var n,i,a,o=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(p(s),p(s),p(s),i=0;i<2;i++){for(o[0]=s[0]-65517,n=1;n<15;n++)o[n]=s[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,g(s,o,1-a)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function y(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return A(r,e),A(n,t),f(r,0,n,0)}function m(e){var t=new Uint8Array(32);return A(t,e),1&t[0]}function b(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function w(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function v(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function I(e,t,r){var n,i,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0,Q=0,x=0,P=0,M=0,U=0,D=0,R=0,F=r[0],T=r[1],q=r[2],O=r[3],K=r[4],H=r[5],N=r[6],L=r[7],G=r[8],j=r[9],z=r[10],W=r[11],Z=r[12],J=r[13],V=r[14],Y=r[15];a+=(n=t[0])*F,o+=n*T,s+=n*q,c+=n*O,u+=n*K,h+=n*H,l+=n*N,f+=n*L,d+=n*G,p+=n*j,g+=n*z,A+=n*W,y+=n*Z,m+=n*J,b+=n*V,w+=n*Y,o+=(n=t[1])*F,s+=n*T,c+=n*q,u+=n*O,h+=n*K,l+=n*H,f+=n*N,d+=n*L,p+=n*G,g+=n*j,A+=n*z,y+=n*W,m+=n*Z,b+=n*J,w+=n*V,v+=n*Y,s+=(n=t[2])*F,c+=n*T,u+=n*q,h+=n*O,l+=n*K,f+=n*H,d+=n*N,p+=n*L,g+=n*G,A+=n*j,y+=n*z,m+=n*W,b+=n*Z,w+=n*J,v+=n*V,I+=n*Y,c+=(n=t[3])*F,u+=n*T,h+=n*q,l+=n*O,f+=n*K,d+=n*H,p+=n*N,g+=n*L,A+=n*G,y+=n*j,m+=n*z,b+=n*W,w+=n*Z,v+=n*J,I+=n*V,E+=n*Y,u+=(n=t[4])*F,h+=n*T,l+=n*q,f+=n*O,d+=n*K,p+=n*H,g+=n*N,A+=n*L,y+=n*G,m+=n*j,b+=n*z,w+=n*W,v+=n*Z,I+=n*J,E+=n*V,B+=n*Y,h+=(n=t[5])*F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n*j,S+=n*z,Q+=n*W,x+=n*Z,P+=n*J,M+=n*V,U+=n*Y,b+=(n=t[14])*F,w+=n*T,v+=n*q,I+=n*O,E+=n*K,B+=n*H,C+=n*N,_+=n*L,k+=n*G,S+=n*j,Q+=n*z,x+=n*W,P+=n*Z,M+=n*J,U+=n*V,D+=n*Y,w+=(n=t[15])*F,o+=38*(I+=n*q),s+=38*(E+=n*O),c+=38*(B+=n*K),u+=38*(C+=n*H),h+=38*(_+=n*N),l+=38*(k+=n*L),f+=38*(S+=n*G),d+=38*(Q+=n*j),p+=38*(x+=n*z),g+=38*(P+=n*W),A+=38*(M+=n*Z),y+=38*(U+=n*J),m+=38*(D+=n*V),b+=38*(R+=n*Y),a=(n=(a+=38*(v+=n*T))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=h,e[6]=l,e[7]=f,e[8]=d,e[9]=p,e[10]=g,e[11]=A,e[12]=y,e[13]=m,e[14]=b,e[15]=w}function E(e,t){I(e,t,t)}function B(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)E(i,i),2!==n&&4!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function C(e,r,n){var i,a,s=new Uint8Array(32),c=new Float64Array(80),u=t(),h=t(),l=t(),f=t(),d=t(),p=t();for(a=0;a<31;a++)s[a]=r[a];for(s[31]=127&r[31]|64,s[0]&=248,b(c,n),a=0;a<16;a++)h[a]=c[a],f[a]=u[a]=l[a]=0;for(u[0]=f[0]=1,a=254;a>=0;--a)g(u,h,i=s[a>>>3]>>>(7&a)&1),g(l,f,i),w(d,u,l),v(u,u,l),w(l,h,f),v(h,h,f),E(f,d),E(p,u),I(u,l,u),I(l,h,d),w(d,u,l),v(u,u,l),E(h,u),v(l,f,p),I(u,l,o),w(u,u,f),I(l,l,u),I(u,f,p),I(f,h,c),E(h,d),g(u,h,i),g(l,f,i);for(a=0;a<16;a++)c[a+16]=u[a],c[a+32]=l[a],c[a+48]=h[a],c[a+64]=f[a];var y=c.subarray(32),m=c.subarray(16);return B(y,y),I(m,m,y),A(e,m),0}function _(e,t){return C(e,t,n)}function k(e,r){var n=t(),i=t(),a=t(),o=t(),s=t(),u=t(),h=t(),l=t(),f=t();v(n,e[1],e[0]),v(f,r[1],r[0]),I(n,n,f),w(i,e[0],e[1]),w(f,r[0],r[1]),I(i,i,f),I(a,e[3],r[3]),I(a,a,c),I(o,e[2],r[2]),w(o,o,o),v(s,i,n),v(u,o,a),w(h,o,a),w(l,i,n),I(e[0],s,u),I(e[1],l,h),I(e[2],h,u),I(e[3],s,l)}function S(e,t,r){var n;for(n=0;n<4;n++)g(e[n],t[n],r)}function Q(e,r){var n=t(),i=t(),a=t();B(a,r[2]),I(n,r[0],a),I(i,r[1],a),A(e,i),e[31]^=m(n)<<7}function x(e,t,r){var n,o;for(d(e[0],i),d(e[1],a),d(e[2],a),d(e[3],i),o=255;o>=0;--o)S(e,t,n=r[o/8|0]>>(7&o)&1),k(t,e),k(e,e),S(e,t,n)}function P(e,r){var n=[t(),t(),t(),t()];d(n[0],u),d(n[1],h),d(n[2],a),I(n[3],u,h),x(e,n,r)}function M(n,i,a){var o,s,c=[t(),t(),t(),t()];for(a||r(i,32),(o=e.hash(i.subarray(0,32)))[0]&=248,o[31]&=127,o[31]|=64,P(c,o),Q(n,c),s=0;s<32;s++)i[s+32]=n[s];return 0}var U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function D(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i>4)*U[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*U[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function R(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;D(e,r)}function F(e,r){var n=t(),o=t(),c=t(),u=t(),h=t(),f=t(),p=t();return d(e[2],a),b(e[1],r),E(c,e[1]),I(u,c,s),v(c,c,e[2]),w(u,e[2],u),E(h,u),E(f,h),I(p,f,h),I(n,p,c),I(n,n,u),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)E(i,i),1!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),I(n,n,c),I(n,n,u),I(n,n,u),I(e[0],n,u),E(o,e[0]),I(o,o,u),y(o,c)&&I(e[0],e[0],l),E(o,e[0]),I(o,o,u),y(o,c)?-1:(m(e[0])===r[31]>>7&&v(e[0],i,e[0]),I(e[3],e[0],e[1]),0)}var T=64;function q(){for(var e=0;e=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return M(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(q(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;re&&(c.imod(a.leftShift(i)).iadd(a),u=c.mod(o).toNumber())}while(!await Lh(c,t,r));return c}async function Lh(e,t,r){return!(t&&!e.dec().gcd(t).isOne()||!await async function(e){const t=await $o.getBigInteger();return Gh.every((r=>0!==e.mod(new t(r))))}(e)||!await async function(e,t){const r=await $o.getBigInteger();return(t=t||new r(2)).modExp(e.dec(),e).isOne()}(e)||!await async function(e,t,r){const n=await $o.getBigInteger(),i=e.bitLength();t||(t=Math.max(1,i/48|0));const a=e.dec();let o=0;for(;!a.getBit(o);)o++;const s=e.rightShift(new n(o));for(;t>0;t--){let t,r=(await Kh(new n(2),a)).modExp(s,e);if(!r.isOne()&&!r.equal(a)){for(t=1;tt-11)throw Error("Message too long");const n=function(e){const t=new Uint8Array(e);let r=0;for(;r=8&!n;if(t)return $o.selectUint8Array(o,a,t);if(o)return a;throw Error("Decryption error")}async function Zh(e,t,r){let n;if(t.length!==Wu.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(jh[e].length);for(n=0;n{Yh.generateKeyPair("rsa",r,((r,n,i)=>{r?t(r):e(Xh.decode(i,"der"))}))}));return{n:n.modulus.toArrayLike(Uint8Array),e:n.publicExponent.toArrayLike(Uint8Array),d:n.privateExponent.toArrayLike(Uint8Array),p:n.prime2.toArrayLike(Uint8Array),q:n.prime1.toArrayLike(Uint8Array),u:n.coefficient.toArrayLike(Uint8Array)}}let r,n,i;do{n=await Nh(e-(e>>1),t,40),r=await Nh(e>>1,t,40),i=r.mul(n)}while(i.bitLength()!==e);const a=r.dec().imul(n.dec());return n.lt(r)&&([r,n]=[n,r]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:r.toUint8Array(),q:n.toUint8Array(),u:r.modInv(n).toUint8Array()}},validateParams:async function(e,t,r,n,i,a){const o=await $o.getBigInteger();if(e=new o(e),n=new o(n),i=new o(i),!n.mul(i).equal(e))return!1;const s=new o(2);if(a=new o(a),!n.mul(a).mod(i).isOne())return!1;t=new o(t),r=new o(r);const c=new o(Math.floor(e.bitLength()/3)),u=await Kh(s,s.leftShift(c)),h=u.mul(r).mul(t);return!(!h.mod(n.dec()).equal(u)||!h.mod(i.dec()).equal(u))}}),rl=Object.freeze({__proto__:null,encrypt:async function(e,t,r,n){const i=await $o.getBigInteger();t=new i(t),r=new i(r),n=new i(n);const a=new i(zh(e,t.byteLength())),o=await Kh(new i(1),t.dec());return{c1:r.modExp(o,t).toUint8Array(),c2:n.modExp(o,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,r,n,i){const a=await $o.getBigInteger();return e=new a(e),t=new a(t),r=new a(r),n=new a(n),Wh(e.modExp(n,r).modInv(r).imul(t).imod(r).toUint8Array("be",r.byteLength()),i)},validateParams:async function(e,t,r,n){const i=await $o.getBigInteger();e=new i(e),t=new i(t),r=new i(r);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const o=new i(e.bitLength()),s=new i(1023);if(o.lt(s))return!1;if(!t.modExp(e.dec(),e).isOne())return!1;let c=t;const u=new i(1),h=new i(2).leftShift(new i(17));for(;u.lt(h);){if(c=c.mul(t).imod(e),c.isOne())return!1;u.iinc()}n=new i(n);const l=new i(2),f=await Kh(l.leftShift(o.dec()),l.leftShift(o)),d=e.dec().imul(f).iadd(n);return!!r.equal(t.modExp(d,e))}});class nl{constructor(e){if(e instanceof nl)this.oid=e.oid;else if($o.isArray(e)||$o.isUint8Array(e)){if(6===(e=new Uint8Array(e))[0]){if(e[1]!==e.length-2)throw Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.oid=e.subarray(1,1+t),1+this.oid.length}throw Error("Invalid oid")}write(){return $o.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return $o.uint8ArrayToHex(this.oid)}getName(){const e=this.toHex();if(Vo.curve[e])return Vo.write(Vo.curve,e);throw Error("Unknown curve object identifier.")}}function il(e,t){return e.keyPair({priv:t})}function al(e,t){const r=e.keyPair({pub:t});if(!0!==r.validate().result)throw Error("Invalid elliptic public key");return r}async function ol(e){if(!os.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await Promise.resolve().then((function(){return Pb}));return new t.ec(e)}function sl(e){let t,r=0;const n=e[0];return n<192?([r]=e,t=1):n<255?(r=(e[0]-192<<8)+e[1]+192,t=2):255===n&&(r=$o.readNumber(e.subarray(1,5)),t=5),{len:r,offset:t}}function cl(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):$o.concatUint8Array([new Uint8Array([255]),$o.writeNumber(e,4)])}function ul(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function hl(e){return new Uint8Array([192|e])}function ll(e,t){return $o.concatUint8Array([hl(e),cl(t)])}function fl(e){return[Vo.packet.literalData,Vo.packet.compressedData,Vo.packet.symmetricallyEncryptedData,Vo.packet.symEncryptedIntegrityProtectedData,Vo.packet.aeadEncryptedData].includes(e)}async function dl(e,t){const r=Ro(e);let n,i;try{const a=await r.peekBytes(2);if(!a||a.length<2||0==(128&a[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const o=await r.readByte();let s,c,u=-1,h=-1;h=0,0!=(64&o)&&(h=1),h?u=63&o:(u=(63&o)>>2,c=3&o);const l=fl(u);let f,d=null;if(l){if("array"===$o.isStream(e)){const e=new lo;n=Fo(e),d=e}else{const e=new xo;n=Fo(e.writable),d=e.readable}i=t({tag:u,packet:d})}else d=[];do{if(h){const e=await r.readByte();if(f=!1,e<192)s=e;else if(e>=192&&e<224)s=(e-192<<8)+await r.readByte()+192;else if(e>223&&e<255){if(s=1<<(31&e),f=!0,!l)throw new TypeError("This packet type does not support partial lengths.")}else s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte()}else switch(c){case 0:s=await r.readByte();break;case 1:s=await r.readByte()<<8|await r.readByte();break;case 2:s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte();break;default:s=1/0}if(s>0){let e=0;for(;;){n&&await n.ready;const{done:t,value:i}=await r.read();if(t){if(s===1/0)break;throw Error("Unexpected end of packet")}const a=s===1/0?i:i.subarray(0,s-e);if(n?await n.write(a):d.push(a),e+=i.length,e>=s){r.unshift(i.subarray(s-e+i.length));break}}}}while(f);const p=await r.peekBytes(l?1/0:2);return n?(await n.ready,await n.close()):(d=$o.concatUint8Array(d),await t({tag:u,packet:d})),!p||!p.length}catch(e){if(n)return await n.abort(e),!0;throw e}finally{n&&await i,r.releaseLock()}}class pl extends Error{constructor(...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,pl),this.name="UnsupportedError"}}class gl{constructor(e,t){this.tag=e,this.rawContent=t}write(){return this.rawContent}}const Al=$o.getWebCrypto(),yl=$o.getNodeCrypto(),ml={p256:"P-256",p384:"P-384",p521:"P-521"},bl=yl?yl.getCurves():[],wl=yl?{secp256k1:bl.includes("secp256k1")?"secp256k1":void 0,p256:bl.includes("prime256v1")?"prime256v1":void 0,p384:bl.includes("secp384r1")?"secp384r1":void 0,p521:bl.includes("secp521r1")?"secp521r1":void 0,ed25519:bl.includes("ED25519")?"ED25519":void 0,curve25519:bl.includes("X25519")?"X25519":void 0,brainpoolP256r1:bl.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:bl.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:bl.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},vl={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:wl.p256,web:ml.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha384,cipher:Vo.symmetric.aes192,node:wl.p384,web:ml.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha512,cipher:Vo.symmetric.aes256,node:wl.p521,web:ml.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:wl.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:Vo.publicKey.eddsaLegacy,hash:Vo.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:Vo.publicKey.ecdh,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:wl.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha384,cipher:Vo.symmetric.aes192,node:wl.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha512,cipher:Vo.symmetric.aes256,node:wl.brainpoolP512r1,payloadSize:64}};class Il{constructor(e,t){try{($o.isArray(e)||$o.isUint8Array(e))&&(e=new nl(e)),e instanceof nl&&(e=e.getName()),this.name=Vo.write(Vo.curve,e)}catch(e){throw new pl("Unknown curve")}t=t||vl[this.name],this.keyType=t.keyType,this.oid=t.oid,this.hash=t.hash,this.cipher=t.cipher,this.node=t.node&&vl[this.name],this.web=t.web&&vl[this.name],this.payloadSize=t.payloadSize,this.web&&$o.getWebCrypto()?this.type="web":this.node&&$o.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let e;switch(this.type){case"web":try{return await async function(e){const t=await Al.generateKey({name:"ECDSA",namedCurve:ml[e]},!0,["sign","verify"]),r=await Al.exportKey("jwk",t.privateKey);return{publicKey:Bl(await Al.exportKey("jwk",t.publicKey)),privateKey:is(r.d)}}(this.name)}catch(e){$o.printDebugError("Browser did not support generating ec key "+e.message);break}case"node":return async function(e){const t=yl.createECDH(wl[e]);return await t.generateKeys(),{publicKey:new Uint8Array(t.getPublicKey()),privateKey:new Uint8Array(t.getPrivateKey())}}(this.name);case"curve25519":{const t=Oh(32);t[0]=127&t[0]|64,t[31]&=248;const r=t.slice().reverse();return e=Th.box.keyPair.fromSecretKey(r),{publicKey:$o.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:t}}case"ed25519":{const e=Oh(32),t=Th.sign.keyPair.fromSeed(e);return{publicKey:$o.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:e}}}const t=await ol(this.name);return e=await t.genKeyPair({entropy:$o.uint8ArrayToString(Oh(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}}}async function El(e,t,r,n){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===Vo.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if("curve25519"===a){n=n.slice().reverse();const{publicKey:e}=Th.box.keyPair.fromSecretKey(n);r=new Uint8Array(r);const t=new Uint8Array([64,...e]);return!!$o.equalsUint8Array(t,r)}const o=await ol(a);try{r=al(o,r).getPublic()}catch(e){return!1}return!!il(o,n).getPublic().eq(r)}function Bl(e){const t=is(e.x),r=is(e.y),n=new Uint8Array(t.length+r.length+1);return n[0]=4,n.set(t,1),n.set(r,t.length+1),n}function Cl(e,t,r){const n=e,i=r.slice(1,n+1),a=r.slice(n+1,2*n+1);return{kty:"EC",crv:t,x:as(i,!0),y:as(a,!0),ext:!0}}function _l(e,t,r,n){const i=Cl(e,t,r);return i.d=as(n,!0),i}const kl=$o.getWebCrypto(),Sl=$o.getNodeCrypto();async function Ql(e,t,r,n,i,a){const o=new Il(e);if(r&&!$o.isStream(r)){const a={publicKey:n,privateKey:i};switch(o.type){case"web":try{return await async function(e,t,r,n){const i=e.payloadSize,a=_l(e.payloadSize,ml[e.name],n.publicKey,n.privateKey),o=await kl.importKey("jwk",a,{name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,e.hash)}},!1,["sign"]),s=new Uint8Array(await kl.sign({name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,t)}},o,r));return{r:s.slice(0,i),s:s.slice(i,i<<1)}}(o,t,r,a)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;$o.printDebugError("Browser did not support signing: "+e.message)}break;case"node":{const e=await async function(e,t,r,n){const i=Sl.createSign(Vo.read(Vo.hash,t));i.write(r),i.end();const a=Ul.encode({version:1,parameters:e.oid,privateKey:Array.from(n.privateKey),publicKey:{unused:0,data:Array.from(n.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return Ml.decode(i.sign(a),"der")}(o,t,r,a);return{r:e.r.toArrayLike(Uint8Array),s:e.s.toArrayLike(Uint8Array)}}}}return async function(e,t,r){const n=il(await ol(e.name),r).sign(t);return{r:n.r.toArrayLike(Uint8Array),s:n.s.toArrayLike(Uint8Array)}}(o,a,i)}async function xl(e,t,r,n,i,a){const o=new Il(e);if(n&&!$o.isStream(n))switch(o.type){case"web":try{return await async function(e,t,{r:r,s:n},i,a){const o=Cl(e.payloadSize,ml[e.name],a),s=await kl.importKey("jwk",o,{name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,e.hash)}},!1,["verify"]),c=$o.concatUint8Array([r,n]).buffer;return kl.verify({name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,t)}},s,c,i)}(o,t,r,n,i)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;$o.printDebugError("Browser did not support verifying: "+e.message)}break;case"node":return async function(e,t,{r:r,s:n},i,a){const{default:o}=await Promise.resolve().then((function(){return fm})),s=Sl.createVerify(Vo.read(Vo.hash,t));s.write(i),s.end();const c=Rl.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:e.oid},subjectPublicKey:{unused:0,data:Array.from(a)}},"pem",{label:"PUBLIC KEY"}),u=Ml.encode({r:new o(r),s:new o(n)},"der");try{return s.verify(c,u)}catch(e){return!1}}(o,t,r,n,i)}return async function(e,t,r,n){return al(await ol(e.name),n).verify(r,t)}(o,r,void 0===t?n:a,i)}const Pl=void 0,Ml=Sl?Pl.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,Ul=Sl?Pl.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())})):void 0,Dl=Sl?Pl.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,Rl=Sl?Pl.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Dl),this.key("subjectPublicKey").bitstr())})):void 0;var Fl=Object.freeze({__proto__:null,sign:Ql,verify:xl,validateParams:async function(e,t,r){const n=new Il(e);if(n.keyType!==Vo.publicKey.ecdsa)return!1;switch(n.type){case"web":case"node":{const n=Oh(8),i=Vo.hash.sha256,a=await Wu.digest(i,n);try{const o=await Ql(e,i,n,t,r,a);return await xl(e,i,o,n,t,a)}catch(e){return!1}}default:return El(Vo.publicKey.ecdsa,e,t,r)}}});Th.hash=e=>new Uint8Array(eu().update(e).digest());var Tl=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){if(Wu.getHashByteLength(t)new Uint8Array(eu().update(e).digest());var Ol=Object.freeze({__proto__:null,generate:async function(e){if(e===Vo.publicKey.ed25519){const e=Oh(32),{publicKey:t}=Th.sign.keyPair.fromSeed(e);return{A:t,seed:e}}throw Error("Unsupported EdDSA algorithm")},sign:async function(e,t,r,n,i,a){if(Wu.getHashByteLength(t)=0;--e)for(let t=s-1;t>=0;--t)c[1]=s*e+(t+1),u[0]=a[0]^c[0],u[1]=a[1]^c[1],u[2]=o[2*t],u[3]=o[2*t+1],u=Nl(r.decrypt(Ll(u))),a=u.subarray(0,2),o[2*t]=u[2],o[2*t+1]=u[3];if(a[0]===n[0]&&a[1]===n[1])return Ll(o);throw Error("Key Data Integrity failed")}function Nl(e){const{length:t}=e,r=function(e){if($o.isString(e)){const{length:t}=e,r=new ArrayBuffer(t),n=new Uint8Array(r);for(let r=0;r0){const r=e[t-1];if(r>=1){const n=e.subarray(t-r),i=new Uint8Array(r).fill(r);if($o.equalsUint8Array(n,i))return e.subarray(0,t-r)}}throw Error("Invalid padding")}var Wl=Object.freeze({__proto__:null,encode:jl,decode:zl});const Zl=$o.getWebCrypto(),Jl=$o.getNodeCrypto();function Vl(e,t,r,n){return $o.concatUint8Array([t.write(),new Uint8Array([e]),r.write(),$o.stringToUint8Array("Anonymous Sender "),n.subarray(0,20)])}async function Yl(e,t,r,n,i=!1,a=!1){let o;if(i){for(o=0;o=0&&0===t[o];o--);t=t.subarray(0,o+1)}return(await Wu.digest(e,$o.concatUint8Array([new Uint8Array([0,0,0,1]),t,n]))).subarray(0,r)}async function $l(e,t,r,n){if(n.length!==e.payloadSize){const t=new Uint8Array(e.payloadSize);t.set(n,e.payloadSize-n.length),n=t}switch(e.type){case"curve25519":{const e=n.slice().reverse();return{secretKey:e,sharedKey:Th.scalarMult(e,t.subarray(1))}}case"web":if(e.web&&$o.getWebCrypto())try{return await async function(e,t,r,n){const i=_l(e.payloadSize,e.web.web,r,n);let a=Zl.importKey("jwk",i,{name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]);const o=Cl(e.payloadSize,e.web.web,t);let s=Zl.importKey("jwk",o,{name:"ECDH",namedCurve:e.web.web},!0,[]);[a,s]=await Promise.all([a,s]);let c=Zl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:s},a,e.web.sharedSize),u=Zl.exportKey("jwk",a);[c,u]=await Promise.all([c,u]);const h=new Uint8Array(c);return{secretKey:is(u.d),sharedKey:h}}(e,t,r,n)}catch(e){$o.printDebugError(e)}break;case"node":return async function(e,t,r){const n=Jl.createECDH(e.node.node);n.setPrivateKey(r);const i=new Uint8Array(n.computeSecret(t));return{secretKey:new Uint8Array(n.getPrivateKey()),sharedKey:i}}(e,t,n)}return async function(e,t,r){const n=await ol(e.name);t=al(n,t),r=il(n,r);const i=new Uint8Array(r.getPrivate()),a=r.derive(t.getPublic()),o=n.curve.p.byteLength();return{secretKey:i,sharedKey:a.toArrayLike(Uint8Array,"be",o)}}(e,t,n)}var Xl=Object.freeze({__proto__:null,validateParams:async function(e,t,r){return El(Vo.publicKey.ecdh,e,t,r)},encrypt:async function(e,t,r,n,i){const a=jl(r),o=new Il(e),{publicKey:s,sharedKey:c}=await async function(e,t){switch(e.type){case"curve25519":{const r=Oh(32),{secretKey:n,sharedKey:i}=await $l(e,t,null,r);let{publicKey:a}=Th.box.keyPair.fromSecretKey(n);return a=$o.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&$o.getWebCrypto())try{return await async function(e,t){const r=Cl(e.payloadSize,e.web.web,t);let n=Zl.generateKey({name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]),i=Zl.importKey("jwk",r,{name:"ECDH",namedCurve:e.web.web},!1,[]);[n,i]=await Promise.all([n,i]);let a=Zl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:i},n.privateKey,e.web.sharedSize),o=Zl.exportKey("jwk",n.publicKey);[a,o]=await Promise.all([a,o]);const s=new Uint8Array(a);return{publicKey:new Uint8Array(Bl(o)),sharedKey:s}}(e,t)}catch(e){$o.printDebugError(e)}break;case"node":return async function(e,t){const r=Jl.createECDH(e.node.node);r.generateKeys();const n=new Uint8Array(r.computeSecret(t));return{publicKey:new Uint8Array(r.getPublicKey()),sharedKey:n}}(e,t)}return async function(e,t){const r=await ol(e.name),n=await e.genKeyPair();t=al(r,t);const i=il(r,n.privateKey),a=n.publicKey,o=i.derive(t.getPublic()),s=r.curve.p.byteLength();return{publicKey:a,sharedKey:o.toArrayLike(Uint8Array,"be",s)}}(e,t)}(o,n),u=Vl(Vo.publicKey.ecdh,e,t,i),{keySize:h}=Ju(t.cipher);return{publicKey:s,wrappedKey:Kl(await Yl(t.hash,c,h,u),a)}},decrypt:async function(e,t,r,n,i,a,o){const s=new Il(e),{sharedKey:c}=await $l(s,r,i,a),u=Vl(Vo.publicKey.ecdh,e,t,o),{keySize:h}=Ju(t.cipher);let l;for(let r=0;r<3;r++)try{return zl(Hl(await Yl(t.hash,c,h,u,1===r,2===r),n))}catch(e){l=e}throw l}});const ef=$o.getWebCrypto(),tf=$o.getNodeCrypto(),rf=tf&&tf.webcrypto&&tf.webcrypto.subtle;async function nf(e,t,r,n,i){const a=Vo.read(Vo.webHash,e);if(!a)throw Error("Hash algo not supported with HKDF");if(ef||rf){const e=ef||rf,o=await e.importKey("raw",t,"HKDF",!1,["deriveBits"]),s=await e.deriveBits({name:"HKDF",hash:a,salt:r,info:n},o,8*i);return new Uint8Array(s)}if(tf){const a=Vo.read(Vo.hash,e),o=(e,t)=>tf.createHmac(a,e).update(t).digest(),s=o(r,t),c=s.length,u=Math.ceil(i/c),h=new Uint8Array(u*c),l=new Uint8Array(c+n.length+1);l.set(n,c);for(let e=0;e0?l:l.subarray(c));l.set(t,0),h.set(t,e*c)}return h.subarray(0,i)}throw Error("No HKDF implementation available")}const af={x25519:$o.encodeUTF8("OpenPGP X25519")};var of=Object.freeze({__proto__:null,generate:async function(e){if(e===Vo.publicKey.x25519){const e=Oh(32),{publicKey:t}=Th.box.keyPair.fromSecretKey(e);return{A:t,k:e}}throw Error("Unsupported ECDH algorithm")},validateParams:async function(e,t,r){if(e===Vo.publicKey.x25519){const{publicKey:e}=Th.box.keyPair.fromSecretKey(r);return $o.equalsUint8Array(t,e)}return!1},encrypt:async function(e,t,r){if(e===Vo.publicKey.x25519){const e=Oh(32),n=Th.scalarMult(e,r),{publicKey:i}=Th.box.keyPair.fromSecretKey(e),a=$o.concatUint8Array([i,r,n]),{keySize:o}=Ju(Vo.symmetric.aes128);return{ephemeralPublicKey:i,wrappedKey:Kl(await nf(Vo.hash.sha256,a,new Uint8Array,af.x25519,o),t)}}throw Error("Unsupported ECDH algorithm")},decrypt:async function(e,t,r,n,i){if(e===Vo.publicKey.x25519){const e=Th.scalarMult(i,t),a=$o.concatUint8Array([t,n,e]),{keySize:o}=Ju(Vo.symmetric.aes128);return Hl(await nf(Vo.hash.sha256,a,new Uint8Array,af.x25519,o),r)}throw Error("Unsupported ECDH algorithm")}}),sf=Object.freeze({__proto__:null,CurveWithOID:Il,ecdh:Xl,ecdhX:of,ecdsa:Fl,eddsaLegacy:Tl,eddsa:Ol,generate:async function(e){const t=await $o.getBigInteger();e=new Il(e);const r=await e.genKeyPair(),n=new t(r.publicKey).toUint8Array(),i=new t(r.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:n,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return vl[Vo.write(Vo.curve,e.toHex())].hash}}),cf=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){const o=await $o.getBigInteger(),s=new o(1);let c,u,h,l;n=new o(n),i=new o(i),r=new o(r),a=new o(a),r=r.mod(n),a=a.mod(i);const f=new o(t.subarray(0,i.byteLength())).mod(i);for(;;){if(c=await Kh(s,i),u=r.modExp(c,n).imod(i),u.isZero())continue;const e=a.mul(u).imod(i);if(l=f.add(e).imod(i),h=c.modInv(i).imul(l).imod(i),!h.isZero())break}return{r:u.toUint8Array("be",i.byteLength()),s:h.toUint8Array("be",i.byteLength())}},verify:async function(e,t,r,n,i,a,o,s){const c=await $o.getBigInteger(),u=new c(0);if(t=new c(t),r=new c(r),a=new c(a),o=new c(o),i=new c(i),s=new c(s),t.lte(u)||t.gte(o)||r.lte(u)||r.gte(o))return $o.printDebug("invalid DSA Signature"),!1;const h=new c(n.subarray(0,o.byteLength())).imod(o),l=r.modInv(o);if(l.isZero())return $o.printDebug("invalid DSA Signature"),!1;i=i.mod(a),s=s.mod(a);const f=h.mul(l).imod(o),d=t.mul(l).imod(o),p=i.modExp(f,a),g=s.modExp(d,a);return p.mul(g).imod(a).imod(o).equal(t)},validateParams:async function(e,t,r,n,i){const a=await $o.getBigInteger();e=new a(e),t=new a(t),r=new a(r),n=new a(n);const o=new a(1);if(r.lte(o)||r.gte(e))return!1;if(!e.dec().mod(t).isZero())return!1;if(!r.modExp(t,e).isOne())return!1;const s=new a(t.bitLength()),c=new a(150);if(s.lt(c)||!await Lh(t,null,32))return!1;i=new a(i);const u=new a(2),h=await Kh(u.leftShift(s.dec()),u.leftShift(s)),l=t.mul(h).add(i);return!!n.equal(r.modExp(l,e))}}),uf={rsa:tl,elgamal:rl,elliptic:sf,dsa:cf,nacl:Th},hf=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let r=0;switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaSign:return{s:$o.readMPI(t.subarray(r))};case Vo.publicKey.dsa:case Vo.publicKey.ecdsa:{const e=$o.readMPI(t.subarray(r));return r+=e.length+2,{r:e,s:$o.readMPI(t.subarray(r))}}case Vo.publicKey.eddsaLegacy:{let e=$o.readMPI(t.subarray(r));r+=e.length+2,e=$o.leftPad(e,32);let n=$o.readMPI(t.subarray(r));return n=$o.leftPad(n,32),{r:e,s:n}}case Vo.publicKey.ed25519:{const e=t.subarray(r,r+64);return r+=e.length,{RS:e}}default:throw new pl("Unknown signature algorithm.")}},verify:async function(e,t,r,n,i,a){switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaSign:{const{n:e,e:o}=n,s=$o.leftPad(r.s,e.length);return uf.rsa.verify(t,i,s,e,o,a)}case Vo.publicKey.dsa:{const{g:e,p:i,q:o,y:s}=n,{r:c,s:u}=r;return uf.dsa.verify(t,c,u,a,e,i,o,s)}case Vo.publicKey.ecdsa:{const{oid:e,Q:o}=n,s=new uf.elliptic.CurveWithOID(e).payloadSize,c=$o.leftPad(r.r,s),u=$o.leftPad(r.s,s);return uf.elliptic.ecdsa.verify(e,t,{r:c,s:u},i,o,a)}case Vo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=n;return uf.elliptic.eddsaLegacy.verify(e,t,r,i,o,a)}case Vo.publicKey.ed25519:{const{A:o}=n;return uf.elliptic.eddsa.verify(e,t,r,i,o,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,r,n,i,a){if(!r||!n)throw Error("Missing key parameters");switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaSign:{const{n:e,e:o}=r,{d:s,p:c,q:u,u:h}=n;return{s:await uf.rsa.sign(t,i,e,o,s,c,u,h,a)}}case Vo.publicKey.dsa:{const{g:e,p:i,q:o}=r,{x:s}=n;return uf.dsa.sign(t,a,e,i,o,s)}case Vo.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case Vo.publicKey.ecdsa:{const{oid:e,Q:o}=r,{d:s}=n;return uf.elliptic.ecdsa.sign(e,t,i,o,s,a)}case Vo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=r,{seed:s}=n;return uf.elliptic.eddsaLegacy.sign(e,t,i,o,s,a)}case Vo.publicKey.ed25519:{const{A:o}=r,{seed:s}=n;return uf.elliptic.eddsa.sign(e,t,i,o,s,a)}default:throw Error("Unknown signature algorithm.")}}});class lf{constructor(e){e&&(this.data=e)}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.data=e.subarray(1,1+t),1+this.data.length}throw Error("Invalid symmetric key")}write(){return $o.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class ff{constructor(e){if(e){const{hash:t,cipher:r}=e;this.hash=t,this.cipher=r}else this.hash=null,this.cipher=null}read(e){if(e.length<4||3!==e[0]||1!==e[1])throw new pl("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}class df{static fromObject({wrappedKey:e,algorithm:t}){const r=new df;return r.wrappedKey=e,r.algorithm=t,r}read(e){let t=0,r=e[t++];this.algorithm=r%2?e[t++]:null,r-=r%2,this.wrappedKey=e.subarray(t,t+r),t+=r}write(){return $o.concatUint8Array([this.algorithm?new Uint8Array([this.wrappedKey.length+1,this.algorithm]):new Uint8Array([this.wrappedKey.length]),this.wrappedKey])}}function pf(e){try{e.getName()}catch(e){throw new pl("Unknown curve OID")}}var gf=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,r,n,i){switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:{const{n:e,e:t}=r;return{c:await uf.rsa.encrypt(n,e,t)}}case Vo.publicKey.elgamal:{const{p:e,g:t,y:i}=r;return uf.elgamal.encrypt(n,e,t,i)}case Vo.publicKey.ecdh:{const{oid:e,Q:t,kdfParams:a}=r,{publicKey:o,wrappedKey:s}=await uf.elliptic.ecdh.encrypt(e,a,n,t,i);return{V:o,C:new lf(s)}}case Vo.publicKey.x25519:{if(!$o.isAES(t))throw Error("X25519 keys can only encrypt AES session keys");const{A:i}=r,{ephemeralPublicKey:a,wrappedKey:o}=await uf.elliptic.ecdhX.encrypt(e,n,i);return{ephemeralPublicKey:a,C:df.fromObject({algorithm:t,wrappedKey:o})}}default:return[]}},publicKeyDecrypt:async function(e,t,r,n,i,a){switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:{const{c:e}=n,{n:i,e:o}=t,{d:s,p:c,q:u,u:h}=r;return uf.rsa.decrypt(e,i,o,s,c,u,h,a)}case Vo.publicKey.elgamal:{const{c1:e,c2:i}=n,o=t.p,s=r.x;return uf.elgamal.decrypt(e,i,o,s,a)}case Vo.publicKey.ecdh:{const{oid:e,Q:a,kdfParams:o}=t,{d:s}=r,{V:c,C:u}=n;return uf.elliptic.ecdh.decrypt(e,o,c,u.data,a,s,i)}case Vo.publicKey.x25519:{const{A:i}=t,{k:a}=r,{ephemeralPublicKey:o,C:s}=n;if(!$o.isAES(s.algorithm))throw Error("AES session key expected");return uf.elliptic.ecdhX.decrypt(e,o,s.wrappedKey,i,a)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let r=0;switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=$o.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{n:e,e:n}}}case Vo.publicKey.dsa:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=$o.readMPI(t.subarray(r));r+=n.length+2;const i=$o.readMPI(t.subarray(r));r+=i.length+2;const a=$o.readMPI(t.subarray(r));return r+=a.length+2,{read:r,publicParams:{p:e,q:n,g:i,y:a}}}case Vo.publicKey.elgamal:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=$o.readMPI(t.subarray(r));r+=n.length+2;const i=$o.readMPI(t.subarray(r));return r+=i.length+2,{read:r,publicParams:{p:e,g:n,y:i}}}case Vo.publicKey.ecdsa:{const e=new nl;r+=e.read(t),pf(e);const n=$o.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{oid:e,Q:n}}}case Vo.publicKey.eddsaLegacy:{const e=new nl;r+=e.read(t),pf(e);let n=$o.readMPI(t.subarray(r));return r+=n.length+2,n=$o.leftPad(n,33),{read:r,publicParams:{oid:e,Q:n}}}case Vo.publicKey.ecdh:{const e=new nl;r+=e.read(t),pf(e);const n=$o.readMPI(t.subarray(r));r+=n.length+2;const i=new ff;return r+=i.read(t.subarray(r)),{read:r,publicParams:{oid:e,Q:n,kdfParams:i}}}case Vo.publicKey.ed25519:case Vo.publicKey.x25519:{const e=t.subarray(r,r+32);return r+=e.length,{read:r,publicParams:{A:e}}}default:throw new pl("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,r){let n=0;switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:{const e=$o.readMPI(t.subarray(n));n+=e.length+2;const r=$o.readMPI(t.subarray(n));n+=r.length+2;const i=$o.readMPI(t.subarray(n));n+=i.length+2;const a=$o.readMPI(t.subarray(n));return n+=a.length+2,{read:n,privateParams:{d:e,p:r,q:i,u:a}}}case Vo.publicKey.dsa:case Vo.publicKey.elgamal:{const e=$o.readMPI(t.subarray(n));return n+=e.length+2,{read:n,privateParams:{x:e}}}case Vo.publicKey.ecdsa:case Vo.publicKey.ecdh:{const e=new Il(r.oid);let i=$o.readMPI(t.subarray(n));return n+=i.length+2,i=$o.leftPad(i,e.payloadSize),{read:n,privateParams:{d:i}}}case Vo.publicKey.eddsaLegacy:{const e=new Il(r.oid);let i=$o.readMPI(t.subarray(n));return n+=i.length+2,i=$o.leftPad(i,e.payloadSize),{read:n,privateParams:{seed:i}}}case Vo.publicKey.ed25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{seed:e}}}case Vo.publicKey.x25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{k:e}}}default:throw new pl("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let r=0;switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:return{c:$o.readMPI(t.subarray(r))};case Vo.publicKey.elgamal:{const e=$o.readMPI(t.subarray(r));return r+=e.length+2,{c1:e,c2:$o.readMPI(t.subarray(r))}}case Vo.publicKey.ecdh:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=new lf;return n.read(t.subarray(r)),{V:e,C:n}}case Vo.publicKey.x25519:{const e=t.subarray(r,r+32);r+=e.length;const n=new df;return n.read(t.subarray(r)),{ephemeralPublicKey:e,C:n}}default:throw new pl("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const r=new Set([Vo.publicKey.ed25519,Vo.publicKey.x25519]),n=Object.keys(t).map((n=>{const i=t[n];return $o.isUint8Array(i)?r.has(e)?i:$o.uint8ArrayToMPI(i):i.write()}));return $o.concatUint8Array(n)},generateParams:function(e,t,r){switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:return uf.rsa.generate(t,65537).then((({n:e,e:t,d:r,p:n,q:i,u:a})=>({privateParams:{d:r,p:n,q:i,u:a},publicParams:{n:e,e:t}})));case Vo.publicKey.ecdsa:return uf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{d:r},publicParams:{oid:new nl(e),Q:t}})));case Vo.publicKey.eddsaLegacy:return uf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{seed:r},publicParams:{oid:new nl(e),Q:t}})));case Vo.publicKey.ecdh:return uf.elliptic.generate(r).then((({oid:e,Q:t,secret:r,hash:n,cipher:i})=>({privateParams:{d:r},publicParams:{oid:new nl(e),Q:t,kdfParams:new ff({hash:n,cipher:i})}})));case Vo.publicKey.ed25519:return uf.elliptic.eddsa.generate(e).then((({A:e,seed:t})=>({privateParams:{seed:t},publicParams:{A:e}})));case Vo.publicKey.x25519:return uf.elliptic.ecdhX.generate(e).then((({A:e,k:t})=>({privateParams:{k:t},publicParams:{A:e}})));case Vo.publicKey.dsa:case Vo.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,r){if(!t||!r)throw Error("Missing key parameters");switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:{const{n:e,e:n}=t,{d:i,p:a,q:o,u:s}=r;return uf.rsa.validateParams(e,n,i,a,o,s)}case Vo.publicKey.dsa:{const{p:e,q:n,g:i,y:a}=t,{x:o}=r;return uf.dsa.validateParams(e,n,i,a,o)}case Vo.publicKey.elgamal:{const{p:e,g:n,y:i}=t,{x:a}=r;return uf.elgamal.validateParams(e,n,i,a)}case Vo.publicKey.ecdsa:case Vo.publicKey.ecdh:{const n=uf.elliptic[Vo.read(Vo.publicKey,e)],{oid:i,Q:a}=t,{d:o}=r;return n.validateParams(i,a,o)}case Vo.publicKey.eddsaLegacy:{const{Q:e,oid:n}=t,{seed:i}=r;return uf.elliptic.eddsaLegacy.validateParams(n,e,i)}case Vo.publicKey.ed25519:{const{A:n}=t,{seed:i}=r;return uf.elliptic.eddsa.validateParams(e,n,i)}case Vo.publicKey.x25519:{const{A:n}=t,{k:i}=r;return uf.elliptic.ecdhX.validateParams(e,n,i)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=Ju(e),r=await Oh(t),n=new Uint8Array([r[r.length-2],r[r.length-1]]);return $o.concat([r,n])},generateSessionKey:function(e){const{keySize:t}=Ju(e);return Oh(t)},getAEADMode:function(e){const t=Vo.read(Vo.aead,e);return Fh[t]},getCipher:Ju,getPreferredCurveHashAlgo:function(e,t){switch(e){case Vo.publicKey.ecdsa:case Vo.publicKey.eddsaLegacy:return uf.elliptic.getPreferredHashAlgo(t);case Vo.publicKey.ed25519:return uf.elliptic.eddsa.getPreferredHashAlgo(e);default:throw Error("Unknown elliptic signing algo")}}});const Af={cipher:zs,hash:Wu,mode:Fh,publicKey:uf,signature:hf,random:Hh,pkcs1:Jh,pkcs5:Wl,aesKW:Gl};Object.assign(Af,gf);var yf="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;const mf={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(let a=0;a=0;)e[t]=0}const kf=0,Sf=1,Qf=2,xf=29,Pf=256,Mf=Pf+1+xf,Uf=30,Df=19,Rf=2*Mf+1,Ff=15,Tf=16,qf=256,Of=16,Kf=17,Hf=18,Nf=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Lf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Gf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],jf=Array(2*(Mf+2));_f(jf);const zf=Array(2*Uf);_f(zf);const Wf=Array(512);_f(Wf);const Zf=Array(256);_f(Zf);const Jf=Array(xf);_f(Jf);const Vf=Array(Uf);function Yf(e){return e<256?Wf[e]:Wf[256+(e>>>7)]}function $f(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Xf(e,t,r){e.bi_valid>Tf-r?(e.bi_buf|=t<>Tf-e.bi_valid,e.bi_valid+=r-Tf):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function rd(e,t,r){const n=Array(Ff+1);let i,a,o=0;for(i=1;i<=Ff;i++)n[i]=o=o+r[i-1]<<1;for(a=0;a<=t;a++){const t=e[2*a+1];0!==t&&(e[2*a]=td(n[t]++,t))}}function nd(e){let t;for(t=0;t8?$f(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ad(e,t,r,n){const i=2*t,a=2*r;return e[i]>1;o>=1;o--)od(e,r,o);c=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],od(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[2*c]=r[2*o]+r[2*s],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[2*o+1]=r[2*s+1]=c,e.heap[1]=c++,od(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,h,l,f,d,p,g=0;for(f=0;f<=Ff;f++)e.bl_count[f]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;uc&&(f=c,g++),r[2*h+1]=f,h>n||(e.bl_count[f]++,d=0,h>=s&&(d=o[h-s]),p=r[2*h],e.opt_len+=p*(f+d),a&&(e.static_len+=p*(i[2*h+1]+d)));if(0!==g){do{for(f=c-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(f=c;0!==f;f--)for(h=e.bl_count[f];0!==h;)l=e.heap[--u],l>n||(r[2*l+1]!==f&&(e.opt_len+=(f-r[2*l+1])*r[2*l],r[2*l+1]=f),h--)}}(e,t),rd(r,u,e.bl_count)}function ud(e,t,r){let n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Zf[r]+Pf+1)]++,e.dyn_dtree[2*Yf(t)]++),e.last_lit===e.lit_bufsize-1}function dd(e,t,r,n){let i=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{i=i+t[n++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}const pd=function(){let e;const t=[];for(let r=0;r<256;r++){e=r;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();function gd(e,t,r,n){const i=pd,a=n+r;e^=-1;for(let r=n;r>>8^i[255&(e^t[r])];return-1^e}const Ad=3,yd=258,md=yd+Ad+1;function bd(e){const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(vf(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function wd(e,t){(function(e,t,r,n){let i,a,o=0;e.level>0?(e.strm.data_type===Cf&&(e.strm.data_type=function(e){let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Ef;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Bf;for(t=32;t=3&&0===e.bl_tree[2*Gf[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?ld(e,t,r,n):e.strategy===If||a===i?(Xf(e,(Sf<<1)+(n?1:0),3),sd(e,jf,zf)):(Xf(e,(Qf<<1)+(n?1:0),3),function(e,t,r,n){let i;for(Xf(e,t-257,5),Xf(e,r-1,5),Xf(e,n-4,4),i=0;i=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,bd(e.strm)}function vd(e,t,r,n){let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,vf(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=dd(e.adler,t,i,r):2===e.state.wrap&&(e.adler=gd(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Id(e,t){let r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-md?e.strstart-(e.w_size-md):0,u=e.window,h=e.w_mask,l=e.prev,f=e.strstart+yd;let d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(r=t,u[r+o]===p&&u[r+o-1]===d&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=l[t&h])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Ed(e){const t=e.w_size;let r,n,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-md)){vf(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do{i=e.head[--r],e.head[r]=i>=t?i-t:0}while(--n);n=t,r=n;do{i=e.prev[--r],e.prev[r]=i>=t?i-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=vd(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=Ad)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=Ad&&(e.ins_h=(e.ins_h<=Ad)if(n=fd(e,e.strstart-e.match_start,e.match_length-Ad),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ad){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=Ad&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=Ad-1)),e.prev_length>=Ad&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Ad,n=fd(e,e.strstart-1-e.prev_match,e.prev_length-Ad),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ed(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,wd(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-md&&(wd(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wd(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wd(e,!1),e.strm.avail_out),1)})),new _d(4,4,8,4,Bd),new _d(4,5,16,8,Bd),new _d(4,6,32,32,Bd),new _d(4,4,16,16,Cd),new _d(8,16,32,32,Cd),new _d(8,16,128,128,Cd),new _d(8,32,128,256,Cd),new _d(32,128,258,1024,Cd),new _d(32,258,258,4096,Cd);try{String.fromCharCode.call(null,0)}catch(oo){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(oo){}const kd=new wf(256);for(let e=0;e<256;e++)kd[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;kd[254]=kd[254]=1;var Sd=[0,1,3,7,15,31,63,127,255],Qd=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Qd.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Qd.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Sd[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var n=r-e;t|=(this.curByte&Sd[e]<>n,this.bitOffset+=e,e=0}}return t},Qd.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1},Qd.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+e.toString(16)).slice(-2))).join("")}(t)};var xd=Qd,Pd=function(){};Pd.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Pd.prototype.read=function(e,t,r){for(var n=0;n>>0},this.updateCRC=function(t){e=e<<8^Md[255&(e>>>24^t)]},this.updateCRCRun=function(t,r){for(;r-- >0;)e=e<<8^Md[255&(e>>>24^t)]}}),Dd=function(e,t){var r,n=e[t];for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},Rd=-2,Fd=-3,Td=-4,qd=-5,Od=-6,Kd=-7,Hd={"-1":"Bad file checksum"};Hd[Rd]="Not bzip data",Hd[Fd]="Unexpected input EOF",Hd[Td]="Unexpected output EOF",Hd[qd]="Data error",Hd[Od]="Out of memory",Hd[Kd]="Obsolete (pre 0.9.5) bzip format not supported.";var Nd=function(e,t){var r=Hd[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},Ld=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Ld.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new Ud,!0):(this.writeCount=-1,!1)},Ld.prototype._start_bunzip=function(e,t){var r=new Uint8Array(4);4===e.read(r,0,4)&&"BZh"===String.fromCharCode(r[0],r[1],r[2])||Nd(Rd,"bad magic");var n=r[3]-48;(n<1||n>9)&&Nd(Rd,"level out of range"),this.reader=new xd(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Ld.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if("177245385090"===i)return!1;"314159265359"!==i&&Nd(Rd),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&Nd(Kd);var a=n.read(24);a>this.dbufSize&&Nd(qd,"initial position out of bounds");var o=n.read(16),s=new Uint8Array(256),c=0;for(e=0;e<16;e++)if(o&1<<15-e){var u=16*e;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(s[c++]=u+t)}var h=n.read(3);(h<2||h>6)&&Nd(qd);var l=n.read(15);0===l&&Nd(qd);var f=new Uint8Array(256);for(e=0;e=h&&Nd(qd);d[e]=Dd(f,t)}var p,g=c+2,A=[];for(t=0;t20)&&Nd(qd),n.read(1);)n.read(1)?o--:o++;b[e]=o}for(y=m=b[0],e=1;em?m=b[e]:b[e]=l&&Nd(qd),p=A[d[_++]]),e=p.minLen,t=n.read(e);e>p.maxLen&&Nd(qd),!(t<=p.limit[e]);e++)t=t<<1|n.read(1);((t-=p.base[e])<0||t>=258)&&Nd(qd);var S=p.permute[t];if(0!==S&&1!==S){if(B)for(B=0,C+o>this.dbufSize&&Nd(qd),I[E=s[f[0]]]+=o;o--;)k[C++]=E;if(S>c)break;C>=this.dbufSize&&Nd(qd),I[E=s[E=Dd(f,e=S-1)]]++,k[C++]=E}else B||(B=1,o=0),o+=0===S?B:2*B,B<<=1}for((a<0||a>=C)&&Nd(qd),t=0,e=0;e<256;e++)r=t+I[e],I[e]=t,t=r;for(e=0;e>=8,P=-1),this.writePos=Q,this.writeCurrent=x,this.writeCount=C,this.writeRun=P,!0},Ld.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;var a=this.dbuf,o=this.writePos,s=this.writeCurrent,c=this.writeCount;this.outputsize;for(var u=this.writeRun;c;){for(c--,n=s,s=255&(o=a[o]),o>>=8,3==u++?(r=s,i=n,s=-1):(r=1,i=s),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;s!=n&&(u=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Nd(qd,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};const Gd=Symbol("verified"),jd=new Set([Vo.signatureSubpacket.issuer,Vo.signatureSubpacket.issuerFingerprint,Vo.signatureSubpacket.embeddedSignature]);class zd{static get tag(){return Vo.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new As,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[Gd]=null}read(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new pl(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=e[t++],this.publicKeyAlgorithm=e[t++],this.hashAlgorithm=e[t++],t+=this.readSubPackets(e.subarray(t,e.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=e.subarray(0,t),t+=this.readSubPackets(e.subarray(t,e.length),!1),this.signedHashValue=e.subarray(t,t+2),t+=2,this.params=Af.signature.parseSignatureParams(this.publicKeyAlgorithm,e.subarray(t,e.length))}writeParams(){return this.params instanceof Promise?Wo((async()=>Af.serializeParams(this.publicKeyAlgorithm,await this.params))):Af.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const e=[];return e.push(this.signatureData),e.push(this.writeUnhashedSubPackets()),e.push(this.signedHashValue),e.push(this.writeParams()),$o.concat(e)}async sign(e,t,r=new Date,n=!1){5===e.version?this.version=5:this.version=4;const i=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=$o.normalizeDate(r),this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyID=e.getKeyID(),i.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=$o.concat(i);const a=this.toHash(this.signatureType,t,n),o=await this.hash(this.signatureType,t,a,n);this.signedHashValue=jo(No(o),0,2);const s=async()=>Af.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,e.publicParams,e.privateParams,a,await zo(o));$o.isStream(o)?this.params=s():(this.params=await s(),this[Gd]=!0)}writeHashedSubPackets(){const e=Vo.signatureSubpacket,t=[];let r;if(null===this.created)throw Error("Missing signature creation time");t.push(Wd(e.signatureCreationTime,!0,$o.writeDate(this.created))),null!==this.signatureExpirationTime&&t.push(Wd(e.signatureExpirationTime,!0,$o.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&t.push(Wd(e.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),t.push(Wd(e.trustSignature,!0,r))),null!==this.regularExpression&&t.push(Wd(e.regularExpression,!0,this.regularExpression)),null!==this.revocable&&t.push(Wd(e.revocable,!0,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&t.push(Wd(e.keyExpirationTime,!0,$o.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredSymmetricAlgorithms)),t.push(Wd(e.preferredSymmetricAlgorithms,!1,r))),null!==this.revocationKeyClass&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=$o.concat([r,this.revocationKeyFingerprint]),t.push(Wd(e.revocationKey,!1,r))),this.issuerKeyID.isNull()||5===this.issuerKeyVersion||t.push(Wd(e.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach((({name:n,value:i,humanReadable:a,critical:o})=>{r=[new Uint8Array([a?128:0,0,0,0])];const s=$o.encodeUTF8(n);r.push($o.writeNumber(s.length,2)),r.push($o.writeNumber(i.length,2)),r.push(s),r.push(i),r=$o.concat(r),t.push(Wd(e.notationData,o,r))})),null!==this.preferredHashAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredHashAlgorithms)),t.push(Wd(e.preferredHashAlgorithms,!1,r))),null!==this.preferredCompressionAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredCompressionAlgorithms)),t.push(Wd(e.preferredCompressionAlgorithms,!1,r))),null!==this.keyServerPreferences&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.keyServerPreferences)),t.push(Wd(e.keyServerPreferences,!1,r))),null!==this.preferredKeyServer&&t.push(Wd(e.preferredKeyServer,!1,$o.encodeUTF8(this.preferredKeyServer))),null!==this.isPrimaryUserID&&t.push(Wd(e.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&t.push(Wd(e.policyURI,!1,$o.encodeUTF8(this.policyURI))),null!==this.keyFlags&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.keyFlags)),t.push(Wd(e.keyFlags,!0,r))),null!==this.signersUserID&&t.push(Wd(e.signersUserID,!1,$o.encodeUTF8(this.signersUserID))),null!==this.reasonForRevocationFlag&&(r=$o.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),t.push(Wd(e.reasonForRevocation,!0,r))),null!==this.features&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.features)),t.push(Wd(e.features,!1,r))),null!==this.signatureTargetPublicKeyAlgorithm&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push($o.stringToUint8Array(this.signatureTargetHash)),r=$o.concat(r),t.push(Wd(e.signatureTarget,!0,r))),null!==this.embeddedSignature&&t.push(Wd(e.embeddedSignature,!0,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=$o.concat(r),t.push(Wd(e.issuerFingerprint,5===this.version,r))),null!==this.preferredAEADAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredAEADAlgorithms)),t.push(Wd(e.preferredAEADAlgorithms,!1,r)));const n=$o.concat(t),i=$o.writeNumber(n.length,2);return $o.concat([i,n])}writeUnhashedSubPackets(){const e=[];this.unhashedSubpackets.forEach((t=>{e.push(cl(t.length)),e.push(t)}));const t=$o.concat(e),r=$o.writeNumber(t.length,2);return $o.concat([r,t])}readSubPacket(e,t=!0){let r=0;const n=!!(128&e[r]),i=127&e[r];if(t||(this.unhashedSubpackets.push(e.subarray(r,e.length)),jd.has(i)))switch(r++,i){case Vo.signatureSubpacket.signatureCreationTime:this.created=$o.readDate(e.subarray(r,e.length));break;case Vo.signatureSubpacket.signatureExpirationTime:{const t=$o.readNumber(e.subarray(r,e.length));this.signatureNeverExpires=0===t,this.signatureExpirationTime=t;break}case Vo.signatureSubpacket.exportableCertification:this.exportable=1===e[r++];break;case Vo.signatureSubpacket.trustSignature:this.trustLevel=e[r++],this.trustAmount=e[r++];break;case Vo.signatureSubpacket.regularExpression:this.regularExpression=e[r];break;case Vo.signatureSubpacket.revocable:this.revocable=1===e[r++];break;case Vo.signatureSubpacket.keyExpirationTime:{const t=$o.readNumber(e.subarray(r,e.length));this.keyExpirationTime=t,this.keyNeverExpires=0===t;break}case Vo.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.revocationKey:this.revocationKeyClass=e[r++],this.revocationKeyAlgorithm=e[r++],this.revocationKeyFingerprint=e.subarray(r,r+20);break;case Vo.signatureSubpacket.issuer:this.issuerKeyID.read(e.subarray(r,e.length));break;case Vo.signatureSubpacket.notationData:{const t=!!(128&e[r]);r+=4;const i=$o.readNumber(e.subarray(r,r+2));r+=2;const a=$o.readNumber(e.subarray(r,r+2));r+=2;const o=$o.decodeUTF8(e.subarray(r,r+i)),s=e.subarray(r+i,r+i+a);this.rawNotations.push({name:o,humanReadable:t,value:s,critical:n}),t&&(this.notations[o]=$o.decodeUTF8(s));break}case Vo.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==e[r++];break;case Vo.signatureSubpacket.policyURI:this.policyURI=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.keyFlags:this.keyFlags=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.signersUserID:this.signersUserID=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=e[r++],this.reasonForRevocationString=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.features:this.features=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=e[r++],this.signatureTargetHashAlgorithm=e[r++];const t=Af.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=$o.uint8ArrayToString(e.subarray(r,r+t));break}case Vo.signatureSubpacket.embeddedSignature:this.embeddedSignature=new zd,this.embeddedSignature.read(e.subarray(r,e.length));break;case Vo.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=e[r++],this.issuerFingerprint=e.subarray(r,e.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case Vo.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...e.subarray(r,e.length)];break;default:{const e=Error("Unknown signature subpacket type "+i);if(n)throw e;$o.printDebug(e)}}}readSubPackets(e,t=!0,r){const n=$o.readNumber(e.subarray(0,2));let i=2;for(;i<2+n;){const n=sl(e.subarray(i,e.length));i+=n.offset,this.readSubPacket(e.subarray(i,i+n.len),t,r),i+=n.len}return i}toSign(e,t){const r=Vo.signature;switch(e){case r.binary:return null!==t.text?$o.encodeUTF8(t.getText(!0)):t.getBytes(!0);case r.text:{const e=t.getBytes(!0);return $o.canonicalizeEOL(e)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let e,n;if(t.userID)n=180,e=t.userID;else{if(!t.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");n=209,e=t.userAttribute}const i=e.write();return $o.concat([this.toSign(r.key,t),new Uint8Array([n]),$o.writeNumber(i.length,4),i])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return $o.concat([this.toSign(r.key,t),this.toSign(r.key,{key:t.bind})]);case r.key:if(void 0===t.key)throw Error("Key packet is required for this signature.");return t.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,t);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(e,t){let r=0;return Ko(No(this.signatureData),(e=>{r+=e.length}),(()=>{const n=[];return 5!==this.version||this.signatureType!==Vo.signature.binary&&this.signatureType!==Vo.signature.text||(t?n.push(new Uint8Array(6)):n.push(e.writeHeader())),n.push(new Uint8Array([this.version,255])),5===this.version&&n.push(new Uint8Array(4)),n.push($o.writeNumber(r,4)),$o.concat(n)}))}toHash(e,t,r=!1){const n=this.toSign(e,t);return $o.concat([n,this.signatureData,this.calculateTrailer(t,r)])}async hash(e,t,r,n=!1){return r||(r=this.toHash(e,t,n)),Af.hash.digest(this.hashAlgorithm,r)}async verify(e,t,r,n=new Date,i=!1,a=os){if(!this.issuerKeyID.equals(e.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const o=t===Vo.signature.binary||t===Vo.signature.text;if(!this[Gd]||o){let n,a;if(this.hashed?a=await this.hashed:(n=this.toHash(t,r,i),a=await this.hash(t,r,n)),a=await zo(a),this.signedHashValue[0]!==a[0]||this.signedHashValue[1]!==a[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[Gd]=await Af.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,e.publicParams,n,a),!this[Gd])throw Error("Signature verification failed")}const s=$o.normalizeDate(n);if(s&&this.created>s)throw Error("Signature creation time is in the future");if(s&&s>=this.getExpirationTime())throw Error("Signature is expired");if(a.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+Vo.read(Vo.hash,this.hashAlgorithm).toUpperCase());if(a.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[Vo.signature.binary,Vo.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+Vo.read(Vo.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:e,critical:t})=>{if(t&&a.knownNotations.indexOf(e)<0)throw Error("Unknown critical notation: "+e)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(e=new Date){const t=$o.normalizeDate(e);return null!==t&&!(this.created<=t&&tzd.prototype.calculateTrailer.apply(await this.correspondingSig,e)))}async verify(){const e=await this.correspondingSig;if(!e||e.constructor.tag!==Vo.packet.signature)throw Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)}}function Jd(e,t){if(!t[e]){let r;try{r=Vo.read(Vo.packet,e)}catch(t){throw new pl("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+r)}return new t[e]}Zd.prototype.hash=zd.prototype.hash,Zd.prototype.toHash=zd.prototype.toHash,Zd.prototype.toSign=zd.prototype.toSign;class Vd extends Array{static async fromBinary(e,t,r=os){const n=new Vd;return await n.read(e,t,r),n}async read(e,t,r=os){r.additionalAllowedPackets.length&&(t={...t,...$o.constructAllowedPackets(r.additionalAllowedPackets)}),this.stream=Ho(e,(async(e,n)=>{const i=Fo(n);try{for(;;)if(await i.ready,await dl(e,(async e=>{try{if(e.tag===Vo.packet.marker||e.tag===Vo.packet.trust)return;const n=Jd(e.tag,t);n.packets=new Vd,n.fromStream=$o.isStream(e.packet),await n.read(e.packet,r),await i.write(n)}catch(t){const n=!r.ignoreUnsupportedPackets&&t instanceof pl,a=!(r.ignoreMalformedPackets||t instanceof pl);if(n||a||fl(e.tag))await i.abort(t);else{const t=new gl(e.tag,e.packet);await i.write(t)}$o.printDebugError(t)}})))return await i.ready,void await i.close()}catch(e){await i.abort(e)}}));const n=Ro(this.stream);for(;;){const{done:e,value:t}=await n.read();if(e?this.stream=null:this.push(t),e||fl(t.constructor.tag))break}n.releaseLock()}write(){const e=[];for(let t=0;t{if(t.push(e),i+=e.length,i>=a){const e=Math.min(Math.log(i)/Math.LN2|0,30),r=2**e,n=$o.concat([ul(e)].concat(t));return t=[n.subarray(1+r)],i=t[0].length,n.subarray(0,1+r)}}),(()=>$o.concat([cl(i)].concat(t)))))}else{if($o.isStream(n)){let t=0;e.push(Ko(No(n),(e=>{t+=e.length}),(()=>ll(r,t))))}else e.push(ll(r,n.length));e.push(n)}}return $o.concat(e)}filterByTag(...e){const t=new Vd,r=e=>t=>e===t;for(let n=0;nt.constructor.tag===e))}indexOfTag(...e){const t=[],r=this,n=e=>t=>e===t;for(let i=0;i>4)}read(e){let t=0;try{this.type=Vo.read(Vo.s2k,e[t++])}catch(e){throw new pl("Unknown S2K type.")}switch(this.algorithm=e[t++],this.type){case"simple":break;case"salted":this.salt=e.subarray(t,t+8),t+=8;break;case"iterated":this.salt=e.subarray(t,t+8),t+=8,this.c=e[t++];break;case"gnu":if("GNU"!==$o.uint8ArrayToString(e.subarray(t,t+3)))throw new pl("Unknown s2k type.");if(t+=3,1001!==1e3+e[t++])throw new pl("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw new pl("Unknown s2k type.")}return t}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...$o.stringToUint8Array("GNU"),1]);const e=[new Uint8Array([Vo.write(Vo.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return $o.concatUint8Array(e)}async produceKey(e,t){e=$o.encodeUTF8(e);const r=[];let n=0,i=0;for(;n{this.privateParams[e].fill(0),delete this.privateParams[e]})),this.privateParams=null,this.isEncrypted=!0)}}async function np(e,t,r){const{keySize:n}=Af.getCipher(r);return e.produceKey(t,n)}var ip=ic((function(e){!function(t){function r(e){function t(){return Ee0&&(t.semantic=" "),t}}function A(e,t){return function(){var n,a,s,u,h;for(u=r(),n=o("star"),s=0,h=void 0===t?0:t;null!==(a=e());)s+=1,c(n,a);return s>=h?n:(i(u),null)}}function y(e){return e.charCodeAt(0)>=128}function m(){return s("cr",h("\r")())}function b(){return s("crlf",l(m,I)())}function w(){return s("dquote",h('"')())}function v(){return s("htab",h("\t")())}function I(){return s("lf",h("\n")())}function E(){return s("sp",h(" ")())}function B(){return s("vchar",u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n})))}function C(){return s("wsp",f(E,v)())}function _(){var e=s("quoted-pair",f(l(h("\\"),f(B,C)),ne)());return null===e?null:(e.semantic=e.semantic[1],e)}function k(){return s("fws",f(ae,l(d(l(A(C),p(b))),A(C,1)))())}function S(){return s("ctext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=39||42<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),te)())}function Q(){return s("ccontent",f(S,_,x)())}function x(){return s("comment",l(h("("),A(l(d(k),Q)),d(k),h(")"))())}function P(){return s("cfws",f(l(A(l(d(k),x),1),d(k)),k)())}function M(){return s("atext",u((function(t){var r="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(r=r||y(t)),r})))}function U(){return s("atom",l(g(d(P)),A(M,1),g(d(P)))())}function D(){var e,t;return null===(e=s("dot-atom-text",A(M,1)()))||null!==(t=A(l(h("."),A(M,1)))())&&c(e,t),e}function R(){return s("dot-atom",l(p(d(P)),D,p(d(P)))())}function F(){return s("qtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33===r||35<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),re)())}function T(){return s("qcontent",f(F,_)())}function q(){return s("quoted-string",l(p(d(P)),p(w),A(l(d(g(k)),T)),d(p(k)),p(w),p(d(P)))())}function O(){return s("word",f(U,q)())}function K(){return s("address",f(H,G)())}function H(){return s("mailbox",f(N,X)())}function N(){return s("name-addr",l(d(j),L)())}function L(){return s("angle-addr",f(l(p(d(P)),h("<"),X,h(">"),p(d(P))),oe)())}function G(){return s("group",l(j,h(":"),d(Z),h(";"),p(d(P)))())}function j(){return s("display-name",(null!==(e=s("phrase",f(ie,A(O,1))()))&&(e.semantic=function(e){return e.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(e.semantic)),e));var e}function z(){return s("mailbox-list",f(l(H,A(l(h(","),H))),ue)())}function W(){return s("address-list",f(l(K,A(l(h(","),K))),he)())}function Z(){return s("group-list",f(z,p(P),le)())}function J(){return s("local-part",f(fe,R,q)())}function V(){return s("dtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=90||94<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),pe)())}function Y(){return s("domain-literal",l(p(d(P)),h("["),A(l(d(k),V)),d(k),h("]"),p(d(P)))())}function $(){return s("domain",(t=f(de,R,Y)(),e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)));var t}function X(){return s("addr-spec",l(J,h("@"),$)())}function ee(){return e.strict?null:s("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function te(){return e.strict?null:s("obs-ctext",ee())}function re(){return e.strict?null:s("obs-qtext",ee())}function ne(){return e.strict?null:s("obs-qp",l(h("\\"),f(h("\0"),ee,I,m))())}function ie(){return e.strict?null:e.atInDisplayName?s("obs-phrase",l(O,A(f(O,h("."),h("@"),g(P))))()):s("obs-phrase",l(O,A(f(O,h("."),g(P))))())}function ae(){return e.strict?null:s("obs-FWS",A(l(p(d(b)),C),1)())}function oe(){return e.strict?null:s("obs-angle-addr",l(p(d(P)),h("<"),se,X,h(">"),p(d(P)))())}function se(){return e.strict?null:s("obs-route",l(ce,h(":"))())}function ce(){return e.strict?null:s("obs-domain-list",l(A(f(p(P),h(","))),h("@"),$,A(l(h(","),p(d(P)),d(l(h("@"),$)))))())}function ue(){return e.strict?null:s("obs-mbox-list",l(A(l(p(d(P)),h(","))),H,A(l(h(","),d(l(H,p(P))))))())}function he(){return e.strict?null:s("obs-addr-list",l(A(l(p(d(P)),h(","))),K,A(l(h(","),d(l(K,p(P))))))())}function le(){return e.strict?null:s("obs-group-list",l(A(l(p(d(P)),h(",")),1),p(d(P)))())}function fe(){return e.strict?null:s("obs-local-part",l(O,A(l(h("."),O)))())}function de(){return e.strict?null:s("obs-domain",l(U,A(l(h("."),U)))())}function pe(){return e.strict?null:s("obs-dtext",f(ee,_)())}function ge(e,t){var r,n,i;if(null==t)return null;for(n=[t];n.length>0;){if((i=n.pop()).name===e)return i;for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r])}return null}function Ae(e,t){var r,n,i,a,o;if(null==t)return null;for(n=[t],a=[],o={},r=0;r0;)if((i=n.pop()).name in o)a.push(i);else for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}function ye(t){var r,n,i,a,o;if(null===t)return null;for(r=[],n=Ae(["group","mailbox"],t),i=0;i1?null:t.addresses&&t.addresses[0]:null}(o):e.simple?o&&o.addresses:o}function me(e){var t,r=ge("display-name",e),n=[],i=Ae(["mailbox"],e);for(t=0;t0;)for("cfws"===(i=n.pop()).name&&a.push(i),r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}(0,e),i=Ae(["comment"],e),a=ge("local-part",r),o=ge("domain",r);return{node:e,parts:{name:t,address:r,local:a,domain:o,comments:n},type:e.name,name:we(t),address:we(r),local:we(a),domain:we(o),comments:ve(i),groupName:we(e.groupName)}}function we(e){return null!=e?e.semantic:null}function ve(e){var t="";if(e)for(var r=0;r`),t.userID=r.join(" "),t}read(e,t=os){const r=$o.decodeUTF8(e);if(r.length>t.maxUserIDLength)throw Error("User ID string is too long");try{const{name:e,address:t,comments:n}=ip.parseOneAddress({input:r,atInDisplayName:!0});this.comment=n.replace(/^\(|\)$/g,""),this.name=e,this.email=t}catch(e){}this.userID=r}write(){return $o.encodeUTF8(this.userID)}equals(e){return e&&e.userID===this.userID}}class op extends rp{static get tag(){return Vo.packet.secretSubkey}constructor(e=new Date,t=os){super(e,t)}}async function sp(e,t,r,n,i=new Date,a){let o,s;for(let c=e.length-1;c>=0;c--)try{(!o||e[c].created>=o.created)&&(await e[c].verify(t,r,n,i,void 0,a),o=e[c])}catch(e){s=e}if(!o)throw $o.wrapError(`Could not find valid ${Vo.read(Vo.signature,r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((e,t,r)=>t+" "+r.toLowerCase())),s);return o}function cp(e,t,r=new Date){const n=$o.normalizeDate(r);if(null!==n){const r=fp(e,t);return!(e.created<=n&&ne.equals(i.issuerKeyID)))||i.revoked||!1,i.revoked):c.length>0}function fp(e,t){let r;return!1===t.keyNeverExpires&&(r=e.created.getTime()+1e3*t.keyExpirationTime),r?new Date(r):1/0}function dp(e,t){const r=e.algorithm;return r!==Vo.publicKey.rsaEncrypt&&r!==Vo.publicKey.elgamal&&r!==Vo.publicKey.ecdh&&r!==Vo.publicKey.x25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Vo.keyFlags.signData))}function pp(e,t){const r=e.algorithm;return r!==Vo.publicKey.dsa&&r!==Vo.publicKey.rsaSign&&r!==Vo.publicKey.ecdsa&&r!==Vo.publicKey.eddsaLegacy&&r!==Vo.publicKey.ed25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Vo.keyFlags.encryptCommunication)||0!=(t.keyFlags[0]&Vo.keyFlags.encryptStorage))}function gp(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||!e.keyFlags||0!=(e.keyFlags[0]&Vo.keyFlags.encryptCommunication)||0!=(e.keyFlags[0]&Vo.keyFlags.encryptStorage)}function Ap(e,t){const r=Vo.write(Vo.publicKey,e.algorithm),n=e.getAlgorithmInfo();if(t.rejectPublicKeyAlgorithms.has(r))throw Error(n.algorithm+" keys are considered too weak.");switch(r){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:case Vo.publicKey.rsaEncrypt:if(n.bitse.getKeys(s).length>0));return 0===c.length?null:(await Promise.all(c.map((async t=>{const a=await t.getSigningKey(s,e.created,void 0,n);if(e.revoked||await i.isRevoked(e,a.keyPacket,r,n))throw Error("User certificate is revoked");try{await e.verify(a.keyPacket,Vo.signature.certGeneric,o,r,void 0,n)}catch(e){throw $o.wrapError("User certificate is invalid",e)}}))),!0)}async verifyAllCertifications(e,t=new Date,r){const n=this,i=this.selfCertifications.concat(this.otherCertifications);return Promise.all(i.map((async i=>({keyID:i.issuerKeyID,valid:await n.verifyCertificate(i,e,t,r).catch((()=>!1))}))))}async verify(e=new Date,t){if(!this.selfCertifications.length)throw Error("No self-certifications found");const r=this,n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};let a;for(let o=this.selfCertifications.length-1;o>=0;o--)try{const a=this.selfCertifications[o];if(a.revoked||await r.isRevoked(a,void 0,e,t))throw Error("Self-certification is revoked");try{await a.verify(n,Vo.signature.certGeneric,i,e,void 0,t)}catch(e){throw $o.wrapError("Self-certification is invalid",e)}return!0}catch(e){a=e}throw a}async update(e,t,r){const n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};await hp(e,this,"selfCertifications",t,(async function(e){try{return await e.verify(n,Vo.signature.certGeneric,i,t,!1,r),!0}catch(e){return!1}})),await hp(e,this,"otherCertifications",t),await hp(e,this,"revocationSignatures",t,(function(e){return lp(n,Vo.signature.certRevocation,i,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Vo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=os){const a={userID:this.userID,userAttribute:this.userAttribute,key:e},o=new yp(a.userID||a.userAttribute,this.mainKey);return o.revocationSignatures.push(await up(a,null,e,{signatureType:Vo.signature.certRevocation,reasonForRevocationFlag:Vo.write(Vo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}}class mp{constructor(e,t){this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=t}toPacketList(){const e=new Vd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.bindingSignatures),e}clone(){const e=new mp(this.keyPacket,this.mainKey);return e.bindingSignatures=[...this.bindingSignatures],e.revocationSignatures=[...this.revocationSignatures],e}async isRevoked(e,t,r=new Date,n=os){const i=this.mainKey.keyPacket;return lp(i,Vo.signature.subkeyRevocation,{key:i,bind:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verify(e=new Date,t=os){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket},i=await sp(this.bindingSignatures,r,Vo.signature.subkeyBinding,n,e,t);if(i.revoked||await this.isRevoked(i,null,e,t))throw Error("Subkey is revoked");if(cp(this.keyPacket,i,e))throw Error("Subkey is expired");return i}async getExpirationTime(e=new Date,t=os){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket};let i;try{i=await sp(this.bindingSignatures,r,Vo.signature.subkeyBinding,n,e,t)}catch(e){return null}const a=fp(this.keyPacket,i),o=i.getExpirationTime();return ai.bindingSignatures[t].created&&(i.bindingSignatures[t]=e),!1;try{return await e.verify(n,Vo.signature.subkeyBinding,a,t,void 0,r),!0}catch(e){return!1}})),await hp(e,this,"revocationSignatures",t,(function(e){return lp(n,Vo.signature.subkeyRevocation,a,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Vo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=os){const a={key:e,bind:this.keyPacket},o=new mp(this.keyPacket,this.mainKey);return o.revocationSignatures.push(await up(a,null,e,{signatureType:Vo.signature.subkeyRevocation,reasonForRevocationFlag:Vo.write(Vo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((e=>{mp.prototype[e]=function(){return this.keyPacket[e]()}}));const bp=$o.constructAllowedPackets([zd]),wp=new Set([Vo.packet.publicKey,Vo.packet.privateKey]),vp=new Set([Vo.packet.publicKey,Vo.packet.privateKey,Vo.packet.publicSubkey,Vo.packet.privateSubkey]);class Ip{packetListToStructure(e,t=new Set){let r,n,i,a;for(const o of e){if(o instanceof gl){vp.has(o.tag)&&!a&&(a=wp.has(o.tag)?wp:vp);continue}const e=o.constructor.tag;if(a){if(!a.has(e))continue;a=null}if(t.has(e))throw Error("Unexpected packet type: "+e);switch(e){case Vo.packet.publicKey:case Vo.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=o,n=this.getKeyID(),!n)throw Error("Missing Key ID");break;case Vo.packet.userID:case Vo.packet.userAttribute:r=new yp(o,this),this.users.push(r);break;case Vo.packet.publicSubkey:case Vo.packet.secretSubkey:r=null,i=new mp(o,this),this.subkeys.push(i);break;case Vo.packet.signature:switch(o.signatureType){case Vo.signature.certGeneric:case Vo.signature.certPersona:case Vo.signature.certCasual:case Vo.signature.certPositive:if(!r){$o.printDebug("Dropping certification signatures without preceding user packet");continue}o.issuerKeyID.equals(n)?r.selfCertifications.push(o):r.otherCertifications.push(o);break;case Vo.signature.certRevocation:r?r.revocationSignatures.push(o):this.directSignatures.push(o);break;case Vo.signature.key:this.directSignatures.push(o);break;case Vo.signature.subkeyBinding:if(!i){$o.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}i.bindingSignatures.push(o);break;case Vo.signature.keyRevocation:this.revocationSignatures.push(o);break;case Vo.signature.subkeyRevocation:if(!i){$o.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}i.revocationSignatures.push(o)}}}}toPacketList(){const e=new Vd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map((t=>e.push(...t.toPacketList()))),this.subkeys.map((t=>e.push(...t.toPacketList()))),e}clone(e=!1){const t=new this.constructor(this.toPacketList());return e&&t.getKeys().forEach((e=>{if(e.keyPacket=Object.create(Object.getPrototypeOf(e.keyPacket),Object.getOwnPropertyDescriptors(e.keyPacket)),!e.keyPacket.isDecrypted())return;const t={};Object.keys(e.keyPacket.privateParams).forEach((r=>{t[r]=new Uint8Array(e.keyPacket.privateParams[r])})),e.keyPacket.privateParams=t})),t}getSubkeys(e=null){return this.subkeys.filter((t=>!e||t.getKeyID().equals(e,!0)))}getKeys(e=null){const t=[];return e&&!this.getKeyID().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map((e=>e.getKeyID()))}getUserIDs(){return this.users.map((e=>e.userID?e.userID.userID:null)).filter((e=>null!==e))}write(){return this.toPacketList().write()}async getSigningKey(e=null,t=new Date,r={},n=os){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await sp(r.bindingSignatures,i,Vo.signature.subkeyBinding,e,t,n);if(!dp(r.keyPacket,a))continue;if(!a.embeddedSignature)throw Error("Missing embedded signature");return await sp([a.embeddedSignature],r.keyPacket,Vo.signature.keyBinding,e,t,n),Ap(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&dp(i,a.selfCertification))return Ap(i,n),this}catch(e){o=e}throw $o.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),o)}async getEncryptionKey(e,t=new Date,r={},n=os){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await sp(r.bindingSignatures,i,Vo.signature.subkeyBinding,e,t,n);if(pp(r.keyPacket,a))return Ap(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&pp(i,a.selfCertification))return Ap(i,n),this}catch(e){o=e}throw $o.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),o)}async isRevoked(e,t,r=new Date,n=os){return lp(this.keyPacket,Vo.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verifyPrimaryKey(e=new Date,t={},r=os){const n=this.keyPacket;if(await this.isRevoked(null,null,e,r))throw Error("Primary key is revoked");const{selfCertification:i}=await this.getPrimaryUser(e,t,r);if(cp(n,i,e))throw Error("Primary key is expired");const a=await sp(this.directSignatures,n,Vo.signature.key,{key:n},e,r).catch((()=>{}));if(a&&cp(n,a,e))throw Error("Primary key is expired")}async getExpirationTime(e,t=os){let r;try{const{selfCertification:n}=await this.getPrimaryUser(null,e,t),i=fp(this.keyPacket,n),a=n.getExpirationTime(),o=await sp(this.directSignatures,this.keyPacket,Vo.signature.key,{key:this.keyPacket},null,t).catch((()=>{}));if(o){const e=fp(this.keyPacket,o);r=Math.min(i,a,e)}else r=ie.subkeys.some((e=>t.hasSameFingerprintAs(e))))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,r)}const n=this.clone();return await hp(e,n,"revocationSignatures",t,(i=>lp(n.keyPacket,Vo.signature.keyRevocation,n,[i],null,e.keyPacket,t,r))),await hp(e,n,"directSignatures",t),await Promise.all(e.users.map((async e=>{const i=n.users.filter((t=>e.userID&&e.userID.equals(t.userID)||e.userAttribute&&e.userAttribute.equals(t.userAttribute)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.users.push(t)}}))),await Promise.all(e.subkeys.map((async e=>{const i=n.subkeys.filter((t=>t.hasSameFingerprintAs(e)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.subkeys.push(t)}}))),n}async getRevocationCertificate(e=new Date,t=os){const r={key:this.keyPacket},n=await sp(this.revocationSignatures,this.keyPacket,Vo.signature.keyRevocation,r,e,t),i=new Vd;return i.push(n),gs(Vo.armor.publicKey,i.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,t=new Date,r=os){const n=await ps(e,r),i=(await Vd.fromBinary(n.data,bp,r)).findPacket(Vo.packet.signature);if(!i||i.signatureType!==Vo.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!i.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await i.verify(this.keyPacket,Vo.signature.keyRevocation,{key:this.keyPacket},t,void 0,r)}catch(e){throw $o.wrapError("Could not verify revocation signature",e)}const a=this.clone();return a.revocationSignatures.push(i),a}async signPrimaryUser(e,t,r,n=os){const{index:i,user:a}=await this.getPrimaryUser(t,r,n),o=await a.certify(e,t,n),s=this.clone();return s.users[i]=o,s}async signAllUsers(e,t=new Date,r=os){const n=this.clone();return n.users=await Promise.all(this.users.map((function(n){return n.certify(e,t,r)}))),n}async verifyPrimaryUser(e,t=new Date,r,n=os){const i=this.keyPacket,{user:a}=await this.getPrimaryUser(t,r,n);return e?await a.verifyAllCertifications(e,t,n):[{keyID:i.getKeyID(),valid:await a.verify(t,n).catch((()=>!1))}]}async verifyAllUsers(e,t=new Date,r=os){const n=this.keyPacket,i=[];return await Promise.all(this.users.map((async a=>{const o=e?await a.verifyAllCertifications(e,t,r):[{keyID:n.getKeyID(),valid:await a.verify(t,r).catch((()=>!1))}];i.push(...o.map((e=>({userID:a.userID?a.userID.userID:null,userAttribute:a.userAttribute,keyID:e.keyID,valid:e.valid}))))}))),i}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((e=>{Ip.prototype[e]=mp.prototype[e]}));class Ep extends Ip{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([Vo.packet.secretKey,Vo.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=os){return gs(Vo.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class Bp extends Ep{constructor(e){if(super(),this.packetListToStructure(e,new Set([Vo.packet.publicKey,Vo.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new Vd,t=this.toPacketList();for(const r of t)switch(r.constructor.tag){case Vo.packet.secretKey:{const t=Xd.fromSecretKeyPacket(r);e.push(t);break}case Vo.packet.secretSubkey:{const t=ep.fromSecretSubkeyPacket(r);e.push(t);break}default:e.push(r)}return new Ep(e)}armor(e=os){return gs(Vo.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,t=new Date,r={},n=os){const i=this.keyPacket,a=[];for(let r=0;re.isDecrypted()))}async validate(e=os){if(!this.isPrivate())throw Error("Cannot validate a public key");let t;if(this.keyPacket.isDummy()){const r=await this.getSigningKey(null,null,void 0,{...e,rejectPublicKeyAlgorithms:new Set,minRSABits:0});r&&!r.keyPacket.isDummy()&&(t=r.keyPacket)}else t=this.keyPacket;if(t)return t.validate();{const e=this.getKeys(),t=e.map((e=>e.keyPacket.isDummy())).every(Boolean);if(t)throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(e.map((async e=>e.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()}))}async revoke({flag:e=Vo.reasonForRevocation.noReason,string:t=""}={},r=new Date,n=os){if(!this.isPrivate())throw Error("Need private key for revoking");const i={key:this.keyPacket},a=this.clone();return a.revocationSignatures.push(await up(i,null,this.keyPacket,{signatureType:Vo.signature.keyRevocation,reasonForRevocationFlag:Vo.write(Vo.reasonForRevocation,e),reasonForRevocationString:t},r,void 0,void 0,void 0,n)),a}async addSubkey(e={}){const t={...os,...e.config};if(e.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(e.rsaBits0&&(a.keyExpirationTime=r.keyExpirationTime,a.keyNeverExpires=!1),await up(i,null,t,a,r.date,void 0,void 0,void 0,n)}(i,r,e,t),o=this.toPacketList();return o.push(i,a),new Bp(o)}}const Cp=$o.constructAllowedPackets([Xd,ep,rp,op,ap,tp,zd]);async function _p({armoredKey:e,binaryKey:t,config:r,...n}){if(r={...os,...r},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!$o.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!$o.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const i=Object.keys(n);if(i.length>0)throw Error("Unknown option: "+i.join(", "));let a;if(e){const{type:t,data:n}=await ps(e,r);if(t!==Vo.armor.publicKey&&t!==Vo.armor.privateKey)throw Error("Armored text not of type key");a=n}else a=t;return function(e){for(const t of e)switch(t.constructor.tag){case Vo.packet.secretKey:return new Bp(e);case Vo.packet.publicKey:return new Ep(e)}throw Error("No key packet found")}(await Vd.fromBinary(a,Cp,r))}Object.keys(os).length;const kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function Sp(){}const Qp="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function xp(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Pp=Sp,Mp=Promise,Up=Promise.prototype.then,Dp=Promise.resolve.bind(Mp),Rp=Promise.reject.bind(Mp);function Fp(e){return new Mp(e)}function Tp(e){return Dp(e)}function qp(e){return Rp(e)}function Op(e,t,r){return Up.call(e,t,r)}function Kp(e,t,r){Op(Op(e,t,r),void 0,Pp)}function Hp(e,t){Kp(e,t)}function Np(e,t){Kp(e,void 0,t)}function Lp(e,t,r){return Op(e,t,r)}function Gp(e){Op(e,void 0,Pp)}const jp=(()=>{const e=Qp&&Qp.queueMicrotask;if("function"==typeof e)return e;const t=Tp(void 0);return e=>Op(t,e)})();function zp(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Wp(e,t,r){try{return Tp(zp(e,t,r))}catch(e){return qp(e)}}class Zp{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,a=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}function Jp(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?Xp(e):"closed"===t._state?function(e){Xp(e),rg(e)}(e):eg(e,t._storedError)}function Vp(e,t){return Py(e._ownerReadableStream,t)}function Yp(e){"readable"===e._ownerReadableStream._state?tg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){eg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function $p(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Xp(e){e._closedPromise=Fp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function eg(e,t){Xp(e),tg(e,t)}function tg(e,t){void 0!==e._closedPromise_reject&&(Gp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function rg(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const ng=kp("[[AbortSteps]]"),ig=kp("[[ErrorSteps]]"),ag=kp("[[CancelSteps]]"),og=kp("[[PullSteps]]"),sg=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},cg=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function ug(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(t+" is not an object.");var r}function hg(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function lg(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function fg(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function dg(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function pg(e){return Number(e)}function gg(e){return 0===e?0:e}function Ag(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=gg(n),!sg(n))throw new TypeError(t+" is not a finite number");if(n=function(e){return gg(cg(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return sg(n)&&0!==n?n:0}function yg(e,t){if(!Qy(e))throw new TypeError(t+" is not a ReadableStream.")}function mg(e){return new Eg(e)}function bg(e,t){e._reader._readRequests.push(t)}function wg(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function vg(e){return e._reader._readRequests.length}function Ig(e){const t=e._reader;return void 0!==t&&!!Bg(t)}class Eg{constructor(e){if(fg(e,1,"ReadableStreamDefaultReader"),yg(e,"First parameter"),xy(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Jp(this,e),this._readRequests=new Zp}get closed(){return Bg(this)?this._closedPromise:qp(_g("closed"))}cancel(e=void 0){return Bg(this)?void 0===this._ownerReadableStream?qp($p("cancel")):Vp(this,e):qp(_g("cancel"))}read(){if(!Bg(this))return qp(_g("read"));if(void 0===this._ownerReadableStream)return qp($p("read from"));let e,t;const r=Fp(((r,n)=>{e=r,t=n}));return Cg(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!Bg(this))throw _g("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Yp(this)}}}function Bg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function Cg(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[og](t)}function _g(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let kg;Object.defineProperties(Eg.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Eg.prototype,kp.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof kp.asyncIterator&&(kg={[kp.asyncIterator](){return this}},Object.defineProperty(kg,kp.asyncIterator,{enumerable:!1}));class Sg{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Lp(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Lp(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(void 0===e._ownerReadableStream)return qp($p("iterate"));let t,r;const n=Fp(((e,n)=>{t=e,r=n}));return Cg(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,jp((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Yp(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,Yp(e),r(t)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t._ownerReadableStream)return qp($p("finish iterating"));if(!this._preventCancel){const r=Vp(t,e);return Yp(t),Lp(r,(()=>({value:e,done:!0})))}return Yp(t),Tp({value:e,done:!0})}}const Qg={next(){return xg(this)?this._asyncIteratorImpl.next():qp(Pg("next"))},return(e){return xg(this)?this._asyncIteratorImpl.return(e):qp(Pg("return"))}};function xg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function Pg(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}void 0!==kg&&Object.setPrototypeOf(Qg,kg);const Mg=Number.isNaN||function(e){return e!=e};function Ug(e){return!!function(e){return"number"==typeof e&&(!Mg(e)&&!(e<0))}(e)&&e!==1/0}function Dg(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Rg(e,t,r){if(!Ug(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Fg(e){e._queue=new Zp,e._queueTotalSize=0}function Tg(e){return e.slice()}class qg{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Hg(this))throw rA("view");return this._view}respond(e){if(!Hg(this))throw rA("respond");if(fg(e,1,"respond"),e=Ag(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!Ug(t=Number(t)))throw new RangeError("bytesWritten must be a finite");Yg(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Hg(this))throw rA("respondWithNewView");if(fg(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){const r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,Yg(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(qg.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(qg.prototype,kp.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Og{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Kg(this))throw nA("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(qg.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest}get desiredSize(){if(!Kg(this))throw nA("desiredSize");return tA(this)}close(){if(!Kg(this))throw nA("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw eA(e,t),t}Xg(e),My(t)}}(this)}enqueue(e){if(!Kg(this))throw nA("enqueue");if(fg(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,a=t.byteLength,o=n;Ig(r)?0===vg(r)?jg(e,o,i,a):wg(r,new Uint8Array(o,i,a),!1):oA(r)?(jg(e,o,i,a),Vg(e)):jg(e,o,i,a),Ng(e)}(this,e)}error(e=void 0){if(!Kg(this))throw nA("error");eA(this,e)}[ag](e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),Fg(this);const t=this._cancelAlgorithm(e);return Xg(this),t}[og](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();this._queueTotalSize-=t.byteLength,Zg(this);const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return void e._chunkSteps(r)}const r=this._autoAllocateChunkSize;if(void 0!==r){let n;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:n,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}bg(t,e),Ng(this)}}function Kg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Hg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Ng(e){const t=function(e){const t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Ig(t)&&vg(t)>0)return!0;if(oA(t)&&aA(t)>0)return!0;return tA(e)>0}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Kp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Ng(e))}),(t=>{eA(e,t)}))))}function Lg(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=Gg(t);"default"===t.readerType?wg(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Gg(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function jg(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function zg(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r;let s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);const u=e._queue;for(;s>0;){const r=u.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;h=t.buffer,l=i,f=r.buffer,d=r.byteOffset,p=n,new Uint8Array(h).set(new Uint8Array(f,d,p),l),r.byteLength===n?u.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,Wg(e,n,t),s-=n}var h,l,f,d,p;return c}function Wg(e,t,r){Jg(e),r.bytesFilled+=t}function Zg(e){0===e._queueTotalSize&&e._closeRequested?(Xg(e),My(e._controlledReadableByteStream)):Ng(e)}function Jg(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Vg(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();zg(e,t)&&($g(e),Lg(e._controlledReadableByteStream,t))}}function Yg(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=t.buffer;const r=e._controlledReadableByteStream;if(oA(r))for(;aA(r)>0;)Lg(r,$g(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Wg(e,t,r),r.bytesFilled0){const t=r.byteOffset+r.bytesFilled,i=r.buffer.slice(t-n,t);jg(e,i,0,i.byteLength)}r.buffer=r.buffer,r.bytesFilled-=n,Lg(e._controlledReadableByteStream,r),Vg(e)}(e,t,r);Ng(e)}function $g(e){const t=e._pendingPullIntos.shift();return Jg(e),t}function Xg(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function eA(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(function(e){Jg(e),e._pendingPullIntos=new Zp}(e),Fg(e),Xg(e),Uy(r,t))}function tA(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function rA(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function nA(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function iA(e,t){e._reader._readIntoRequests.push(t)}function aA(e){return e._reader._readIntoRequests.length}function oA(e){const t=e._reader;return void 0!==t&&!!cA(t)}Object.defineProperties(Og.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Og.prototype,kp.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class sA{constructor(e){if(fg(e,1,"ReadableStreamBYOBReader"),yg(e,"First parameter"),xy(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Kg(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Jp(this,e),this._readIntoRequests=new Zp}get closed(){return cA(this)?this._closedPromise:qp(uA("closed"))}cancel(e=void 0){return cA(this)?void 0===this._ownerReadableStream?qp($p("cancel")):Vp(this,e):qp(uA("cancel"))}read(e){if(!cA(this))return qp(uA("read"));if(!ArrayBuffer.isView(e))return qp(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return qp(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return qp(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return qp($p("read from"));let t,r;const n=Fp(((e,n)=>{t=e,r=n}));return function(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,o={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),void iA(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(zg(e,o)){const t=Gg(o);return Zg(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return eA(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(o),iA(n,r),Ng(e)}else{const e=new a(o.buffer,o.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!cA(this))throw uA("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Yp(this)}}}function cA(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function uA(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function hA(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(Mg(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function lA(e){const{size:t}=e;return t||(()=>1)}function fA(e,t){ug(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:pg(r),size:void 0===n?void 0:dA(n,t+" has member 'size' that")}}function dA(e,t){return hg(e,t),t=>pg(e(t))}function pA(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function gA(e,t,r){return hg(e,r),()=>Wp(e,t,[])}function AA(e,t,r){return hg(e,r),r=>zp(e,t,[r])}function yA(e,t,r){return hg(e,r),(r,n)=>Wp(e,t,[r,n])}function mA(e,t){if(!IA(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(sA.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(sA.prototype,kp.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class bA{constructor(e={},t={}){void 0===e?e=null:lg(e,"First parameter");const r=fA(t,"Second parameter"),n=function(e,t){ug(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,a=null==e?void 0:e.type,o=null==e?void 0:e.write;return{abort:void 0===r?void 0:pA(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:gA(n,e,t+" has member 'close' that"),start:void 0===i?void 0:AA(i,e,t+" has member 'start' that"),write:void 0===o?void 0:yA(o,e,t+" has member 'write' that"),type:a}}(e,"First parameter");if(vA(this),void 0!==n.type)throw new RangeError("Invalid type is specified");const i=lA(r);!function(e,t,r,n){const i=Object.create(OA.prototype);let a=()=>{},o=()=>Tp(void 0),s=()=>Tp(void 0),c=()=>Tp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.write&&(o=e=>t.write(e,i)),void 0!==t.close&&(s=()=>t.close()),void 0!==t.abort&&(c=e=>t.abort(e)),KA(e,i,a,o,s,c,r,n)}(this,n,hA(r,1),i)}get locked(){if(!IA(this))throw WA("locked");return EA(this)}abort(e=void 0){return IA(this)?EA(this)?qp(new TypeError("Cannot abort a stream that already has a writer")):BA(this,e):qp(WA("abort"))}close(){return IA(this)?EA(this)?qp(new TypeError("Cannot close a stream that already has a writer")):QA(this)?qp(new TypeError("Cannot close an already-closing stream")):CA(this):qp(WA("close"))}getWriter(){if(!IA(this))throw WA("getWriter");return wA(this)}}function wA(e){return new MA(e)}function vA(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new Zp,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function IA(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function EA(e){return void 0!==e._writer}function BA(e,t){const r=e._state;if("closed"===r||"errored"===r)return Tp(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let n=!1;"erroring"===r&&(n=!0,t=void 0);const i=Fp(((r,i)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,n||kA(e,t),i}function CA(e){const t=e._state;if("closed"===t||"errored"===t)return qp(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=Fp(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&iy(n),Rg(i=e._writableStreamController,qA,0),LA(i),r}function _A(e,t){"writable"!==e._state?SA(e):kA(e,t)}function kA(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&RA(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&SA(e)}function SA(e){e._state="errored",e._writableStreamController[ig]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Zp,void 0===e._pendingAbortRequest)return void xA(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void xA(e);Kp(e._writableStreamController[ng](r._reason),(()=>{r._resolve(),xA(e)}),(t=>{r._reject(t),xA(e)}))}function QA(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function xA(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&$A(t,e._storedError)}function PA(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){ey(e)}(r):iy(r)),e._backpressure=t}Object.defineProperties(bA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(bA.prototype,kp.toStringTag,{value:"WritableStream",configurable:!0});class MA{constructor(e){if(fg(e,1,"WritableStreamDefaultWriter"),mA(e,"First parameter"),EA(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!QA(e)&&e._backpressure?ey(this):ry(this),VA(this);else if("erroring"===t)ty(this,e._storedError),VA(this);else if("closed"===t)ry(this),VA(this),XA(this);else{const t=e._storedError;ty(this,t),YA(this,t)}}get closed(){return UA(this)?this._closedPromise:qp(ZA("closed"))}get desiredSize(){if(!UA(this))throw ZA("desiredSize");if(void 0===this._ownerWritableStream)throw JA("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:NA(t._writableStreamController)}(this)}get ready(){return UA(this)?this._readyPromise:qp(ZA("ready"))}abort(e=void 0){return UA(this)?void 0===this._ownerWritableStream?qp(JA("abort")):function(e,t){return BA(e._ownerWritableStream,t)}(this,e):qp(ZA("abort"))}close(){if(!UA(this))return qp(ZA("close"));const e=this._ownerWritableStream;return void 0===e?qp(JA("close")):QA(e)?qp(new TypeError("Cannot close an already-closing stream")):DA(this)}releaseLock(){if(!UA(this))throw ZA("releaseLock");void 0!==this._ownerWritableStream&&FA(this)}write(e=void 0){return UA(this)?void 0===this._ownerWritableStream?qp(JA("write to")):TA(this,e):qp(ZA("write"))}}function UA(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function DA(e){return CA(e._ownerWritableStream)}function RA(e,t){"pending"===e._readyPromiseState?ny(e,t):function(e,t){ty(e,t)}(e,t)}function FA(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");RA(e,r),function(e,t){"pending"===e._closedPromiseState?$A(e,t):function(e,t){YA(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function TA(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return GA(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return qp(JA("write to"));const a=r._state;if("errored"===a)return qp(r._storedError);if(QA(r)||"closed"===a)return qp(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return qp(r._storedError);const o=function(e){return Fp(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{Rg(e,t,r)}catch(t){return void GA(e,t)}const n=e._controlledWritableStream;QA(n)||"writable"!==n._state||PA(n,jA(e)),LA(e)}(n,t,i),o}Object.defineProperties(MA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(MA.prototype,kp.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const qA={};class OA{constructor(){throw new TypeError("Illegal constructor")}error(e=void 0){if(!function(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&zA(this,e)}[ng](e){const t=this._abortAlgorithm(e);return HA(this),t}[ig](){Fg(this)}}function KA(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Fg(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;const c=jA(t);PA(e,c),Kp(Tp(r()),(()=>{t._started=!0,LA(t)}),(r=>{t._started=!0,_A(e,r)}))}function HA(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function NA(e){return e._strategyHWM-e._queueTotalSize}function LA(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void SA(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===qA?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Dg(e);const r=e._closeAlgorithm();HA(e),Kp(r,(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&XA(t)}(t)}),(e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),_A(e,t)}(t,e)}))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r);Kp(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(Dg(e),!QA(r)&&"writable"===t){const t=jA(e);PA(r,t)}LA(e)}),(t=>{"writable"===r._state&&HA(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,_A(e,t)}(r,t)}))}(e,r)}function GA(e,t){"writable"===e._controlledWritableStream._state&&zA(e,t)}function jA(e){return NA(e)<=0}function zA(e,t){const r=e._controlledWritableStream;HA(e),kA(r,t)}function WA(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function ZA(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function JA(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function VA(e){e._closedPromise=Fp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function YA(e,t){VA(e),$A(e,t)}function $A(e,t){void 0!==e._closedPromise_reject&&(Gp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function XA(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function ey(e){e._readyPromise=Fp(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function ty(e,t){ey(e),ny(e,t)}function ry(e){ey(e),iy(e)}function ny(e,t){void 0!==e._readyPromise_reject&&(Gp(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function iy(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(OA.prototype,{error:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(OA.prototype,kp.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const ay="undefined"!=typeof DOMException?DOMException:void 0,oy=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(ay)?ay:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(e.prototype=Object.create(Error.prototype),"constructor",{value:e,writable:!0,configurable:!0}),e}();function sy(e,t,r,n,i,a){const o=mg(e),s=wA(t);e._disturbed=!0;let c=!1,u=Tp(void 0);return Fp(((h,l)=>{let f;if(void 0!==a){if(f=()=>{const r=new oy("Aborted","AbortError"),a=[];n||a.push((()=>"writable"===t._state?BA(t,r):Tp(void 0))),i||a.push((()=>"readable"===e._state?Py(e,r):Tp(void 0))),g((()=>Promise.all(a.map((e=>e())))),!0,r)},a.aborted)return void f();a.addEventListener("abort",f)}if(p(e,o._closedPromise,(e=>{n?A(!0,e):g((()=>BA(t,e)),!0,e)})),p(t,s._closedPromise,(t=>{i?A(!0,t):g((()=>Py(e,t)),!0,t)})),function(e,t,r){"closed"===e._state?r():Hp(t,r)}(e,o._closedPromise,(()=>{r?A():g((()=>function(e){const t=e._ownerWritableStream,r=t._state;return QA(t)||"closed"===r?Tp(void 0):"errored"===r?qp(t._storedError):DA(e)}(s)))})),QA(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");i?A(!0,t):g((()=>Py(e,t)),!0,t)}function d(){const e=u;return Op(u,(()=>e!==u?d():void 0))}function p(e,t,r){"errored"===e._state?r(e._storedError):Np(t,r)}function g(e,r,n){function i(){Kp(e(),(()=>y(r,n)),(e=>y(!0,e)))}c||(c=!0,"writable"!==t._state||QA(t)?i():Hp(d(),i))}function A(e,r){c||(c=!0,"writable"!==t._state||QA(t)?y(e,r):Hp(d(),(()=>y(e,r))))}function y(e,t){FA(s),Yp(o),void 0!==a&&a.removeEventListener("abort",f),e?l(t):h(void 0)}Gp(Fp(((e,t)=>{!function r(n){n?e():Op(c?Tp(!0):Op(s._readyPromise,(()=>Fp(((e,t)=>{Cg(o,{_chunkSteps:t=>{u=Op(TA(s,t),void 0,Sp),e(!1)},_closeSteps:()=>e(!0),_errorSteps:t})})))),r,t)}(!1)})))}))}class cy{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!uy(this))throw by("desiredSize");return Ay(this)}close(){if(!uy(this))throw by("close");if(!yy(this))throw new TypeError("The stream is not in a state that permits close");dy(this)}enqueue(e=void 0){if(!uy(this))throw by("enqueue");if(!yy(this))throw new TypeError("The stream is not in a state that permits enqueue");return py(this,e)}error(e=void 0){if(!uy(this))throw by("error");gy(this,e)}[ag](e){Fg(this);const t=this._cancelAlgorithm(e);return fy(this),t}[og](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=Dg(this);this._closeRequested&&0===this._queue.length?(fy(this),My(t)):hy(this),e._chunkSteps(r)}else bg(t,e),hy(this)}}function uy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function hy(e){ly(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Kp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,hy(e))}),(t=>{gy(e,t)}))))}function ly(e){const t=e._controlledReadableStream;return!!yy(e)&&(!!e._started&&(!!(xy(t)&&vg(t)>0)||Ay(e)>0))}function fy(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function dy(e){if(!yy(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(fy(e),My(t))}function py(e,t){if(!yy(e))return;const r=e._controlledReadableStream;if(xy(r)&&vg(r)>0)wg(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw gy(e,t),t}try{Rg(e,t,r)}catch(t){throw gy(e,t),t}}hy(e)}function gy(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(Fg(e),fy(e),Uy(r,t))}function Ay(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function yy(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function my(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Fg(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,Kp(Tp(r()),(()=>{t._started=!0,hy(t)}),(e=>{gy(t,e)}))}function by(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function wy(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function vy(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function Iy(e,t,r){return hg(e,r),r=>zp(e,t,[r])}function Ey(e,t){if("bytes"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function By(e,t){if("byob"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Cy(e,t){ug(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal;return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(a,t+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!n,preventClose:!!i,signal:a}}Object.defineProperties(cy.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(cy.prototype,kp.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class _y{constructor(e={},t={}){void 0===e?e=null:lg(e,"First parameter");const r=fA(t,"Second parameter"),n=function(e,t){ug(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,o=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:Ag(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===i?void 0:wy(i,r,t+" has member 'cancel' that"),pull:void 0===a?void 0:vy(a,r,t+" has member 'pull' that"),start:void 0===o?void 0:Iy(o,r,t+" has member 'start' that"),type:void 0===s?void 0:Ey(s,t+" has member 'type' that")}}(e,"First parameter");if(Sy(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(Og.prototype);let i=()=>{},a=()=>Tp(void 0),o=()=>Tp(void 0);void 0!==t.start&&(i=()=>t.start(n)),void 0!==t.pull&&(a=()=>t.pull(n)),void 0!==t.cancel&&(o=e=>t.cancel(e));const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Fg(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new Zp,e._readableStreamController=t,Kp(Tp(r()),(()=>{t._started=!0,Ng(t)}),(e=>{eA(t,e)}))}(e,n,i,a,o,r,s)}(this,n,hA(r,0))}else{const e=lA(r);!function(e,t,r,n){const i=Object.create(cy.prototype);let a=()=>{},o=()=>Tp(void 0),s=()=>Tp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.pull&&(o=()=>t.pull(i)),void 0!==t.cancel&&(s=e=>t.cancel(e)),my(e,i,a,o,s,r,n)}(this,n,hA(r,1),e)}}get locked(){if(!Qy(this))throw Dy("locked");return xy(this)}cancel(e=void 0){return Qy(this)?xy(this)?qp(new TypeError("Cannot cancel a stream that already has a reader")):Py(this,e):qp(Dy("cancel"))}getReader(e=void 0){if(!Qy(this))throw Dy("getReader");const t=function(e,t){ug(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:By(r,t+" has member 'mode' that")}}(e,"First parameter");return void 0===t.mode?mg(this):function(e){return new sA(e)}(this)}pipeThrough(e,t={}){if(!Qy(this))throw Dy("pipeThrough");fg(e,1,"pipeThrough");const r=function(e,t){ug(e,t);const r=null==e?void 0:e.readable;dg(r,"readable","ReadableWritablePair"),yg(r,t+" has member 'readable' that");const n=null==e?void 0:e.writable;return dg(n,"writable","ReadableWritablePair"),mA(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=Cy(t,"Second parameter");if(xy(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(EA(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Gp(sy(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!Qy(this))return qp(Dy("pipeTo"));if(void 0===e)return qp("Parameter 1 is required in 'pipeTo'.");if(!IA(e))return qp(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=Cy(t,"Second parameter")}catch(e){return qp(e)}return xy(this)?qp(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):EA(e)?qp(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sy(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!Qy(this))throw Dy("tee");const e=function(e,t){const r=mg(e);let n,i,a,o,s,c=!1,u=!1,h=!1;const l=Fp((e=>{s=e}));function f(){return c||(c=!0,Cg(r,{_chunkSteps:e=>{jp((()=>{c=!1;const t=e,r=e;u||py(a._readableStreamController,t),h||py(o._readableStreamController,r)}))},_closeSteps:()=>{c=!1,u||dy(a._readableStreamController),h||dy(o._readableStreamController),u&&h||s(void 0)},_errorSteps:()=>{c=!1}})),Tp(void 0)}function d(){}return a=ky(d,f,(function(t){if(u=!0,n=t,h){const t=Tg([n,i]),r=Py(e,t);s(r)}return l})),o=ky(d,f,(function(t){if(h=!0,i=t,u){const t=Tg([n,i]),r=Py(e,t);s(r)}return l})),Np(r._closedPromise,(e=>{gy(a._readableStreamController,e),gy(o._readableStreamController,e),u&&h||s(void 0)})),[a,o]}(this);return Tg(e)}values(e=void 0){if(!Qy(this))throw Dy("values");return function(e,t){const r=mg(e),n=new Sg(r,t),i=Object.create(Qg);return i._asyncIteratorImpl=n,i}(this,function(e,t){return ug(e,"First parameter"),{preventCancel:!!(null==e?void 0:e.preventCancel)}}(e).preventCancel)}}function ky(e,t,r,n=1,i=(()=>1)){const a=Object.create(_y.prototype);return Sy(a),my(a,Object.create(cy.prototype),e,t,r,n,i),a}function Sy(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Qy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function xy(e){return void 0!==e._reader}function Py(e,t){return e._disturbed=!0,"closed"===e._state?Tp(void 0):"errored"===e._state?qp(e._storedError):(My(e),Lp(e._readableStreamController[ag](t),Sp))}function My(e){e._state="closed";const t=e._reader;void 0!==t&&(rg(t),Bg(t)&&(t._readRequests.forEach((e=>{e._closeSteps()})),t._readRequests=new Zp))}function Uy(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(tg(r,t),Bg(r)?(r._readRequests.forEach((e=>{e._errorSteps(t)})),r._readRequests=new Zp):(r._readIntoRequests.forEach((e=>{e._errorSteps(t)})),r._readIntoRequests=new Zp))}function Dy(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Ry(e,t){ug(e,t);const r=null==e?void 0:e.highWaterMark;return dg(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:pg(r)}}Object.defineProperties(_y.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(_y.prototype,kp.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof kp.asyncIterator&&Object.defineProperty(_y.prototype,kp.asyncIterator,{value:_y.prototype.values,writable:!0,configurable:!0});const Fy=function(e){return e.byteLength};class Ty{constructor(e){fg(e,1,"ByteLengthQueuingStrategy"),e=Ry(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Oy(this))throw qy("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Oy(this))throw qy("size");return Fy}}function qy(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Oy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(Ty.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Ty.prototype,kp.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Ky=function(){return 1};class Hy{constructor(e){fg(e,1,"CountQueuingStrategy"),e=Ry(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Ly(this))throw Ny("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Ly(this))throw Ny("size");return Ky}}function Ny(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Ly(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function Gy(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function jy(e,t,r){return hg(e,r),r=>zp(e,t,[r])}function zy(e,t,r){return hg(e,r),(r,n)=>Wp(e,t,[r,n])}Object.defineProperties(Hy.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Hy.prototype,kp.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Wy{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=fA(t,"Second parameter"),i=fA(r,"Third parameter"),a=function(e,t){ug(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,a=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:Gy(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===i?void 0:jy(i,e,t+" has member 'start' that"),transform:void 0===a?void 0:zy(a,e,t+" has member 'transform' that"),writableType:o}}(e,"First parameter");if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified");const o=hA(i,0),s=lA(i),c=hA(n,1),u=lA(n);let h;!function(e,t,r,n,i,a){function o(){return t}e._writable=function(e,t,r,n,i=1,a=(()=>1)){const o=Object.create(bA.prototype);return vA(o),KA(o,Object.create(OA.prototype),e,t,r,n,i,a),o}(o,(function(t){return function(e,t){const r=e._transformStreamController;return e._backpressure?Lp(e._backpressureChangePromise,(()=>{const n=e._writable;if("erroring"===n._state)throw n._storedError;return rm(r,t)})):rm(r,t)}(e,t)}),(function(){return function(e){const t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return em(r),Lp(n,(()=>{if("errored"===t._state)throw t._storedError;dy(t._readableStreamController)}),(r=>{throw Jy(e,r),t._storedError}))}(e)}),(function(t){return function(e,t){return Jy(e,t),Tp(void 0)}(e,t)}),r,n),e._readable=ky(o,(function(){return function(e){return Yy(e,!1),e._backpressureChangePromise}(e)}),(function(t){return Vy(e,t),Tp(void 0)}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Yy(e,!0),e._transformStreamController=void 0}(this,Fp((e=>{h=e})),c,u,o,s),function(e,t){const r=Object.create($y.prototype);let n=e=>{try{return tm(r,e),Tp(void 0)}catch(e){return qp(e)}},i=()=>Tp(void 0);void 0!==t.transform&&(n=e=>t.transform(e,r)),void 0!==t.flush&&(i=()=>t.flush(r)),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,a),void 0!==a.start?h(a.start(this._transformStreamController)):h(void 0)}get readable(){if(!Zy(this))throw im("readable");return this._readable}get writable(){if(!Zy(this))throw im("writable");return this._writable}}function Zy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Jy(e,t){gy(e._readable._readableStreamController,t),Vy(e,t)}function Vy(e,t){em(e._transformStreamController),GA(e._writable._writableStreamController,t),e._backpressure&&Yy(e,!1)}function Yy(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=Fp((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Wy.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Wy.prototype,kp.toStringTag,{value:"TransformStream",configurable:!0});class $y{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Xy(this))throw nm("desiredSize");return Ay(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!Xy(this))throw nm("enqueue");tm(this,e)}error(e=void 0){if(!Xy(this))throw nm("error");var t;t=e,Jy(this._controlledTransformStream,t)}terminate(){if(!Xy(this))throw nm("terminate");!function(e){const t=e._controlledTransformStream;dy(t._readable._readableStreamController),Vy(t,new TypeError("TransformStream terminated"))}(this)}}function Xy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function em(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function tm(e,t){const r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!yy(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{py(n,t)}catch(e){throw Vy(r,e),r._readable._storedError}const i=function(e){return!ly(e)}(n);i!==r._backpressure&&Yy(r,!0)}function rm(e,t){return Lp(e._transformAlgorithm(t),void 0,(t=>{throw Jy(e._controlledTransformStream,t),t}))}function nm(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function im(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties($y.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty($y.prototype,kp.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var am=function(e,t){return am=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},am(e,t) +var doipFetchers=function(e){"use strict";var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:n}=Object.prototype,{getPrototypeOf:i}=Object,a=(o=Object.create(null),e=>{const t=n.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())});var o;const s=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,h=c("undefined");const l=s("ArrayBuffer");const f=c("string"),d=c("function"),p=c("number"),g=e=>null!==e&&"object"==typeof e,A=e=>{if("object"!==a(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},y=s("Date"),m=s("File"),b=s("Blob"),w=s("FileList"),v=s("URLSearchParams");function I(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),u(e))for(n=0,i=e.length;n0;)if(n=r[i],t===n.toLowerCase())return n;return null}const B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,C=e=>!h(e)&&e!==B;const _=(k="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>k&&e instanceof k);var k;const S=s("HTMLFormElement"),Q=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),x=s("RegExp"),P=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};I(r,((r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)})),Object.defineProperties(e,n)},M="abcdefghijklmnopqrstuvwxyz",U="0123456789",D={DIGIT:U,ALPHA:M,ALPHA_DIGIT:M+M.toUpperCase()+U};const R=s("AsyncFunction");var F={isArray:u,isArrayBuffer:l,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&d(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||d(e.append)&&("formdata"===(t=a(e))||"object"===t&&d(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer),t},isString:f,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:A,isUndefined:h,isDate:y,isFile:m,isBlob:b,isRegExp:x,isFunction:d,isStream:e=>g(e)&&d(e.pipe),isURLSearchParams:v,isTypedArray:_,isFileList:w,forEach:I,merge:function e(){const{caseless:t}=C(this)&&this||{},r={},n=(n,i)=>{const a=t&&E(r,i)||i;A(r[a])&&A(n)?r[a]=e(r[a],n):A(n)?r[a]=e({},n):u(n)?r[a]=n.slice():r[a]=n};for(let e=0,t=arguments.length;e(I(t,((t,i)=>{n&&d(t)?e[i]=r(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(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)},toFlatObject:(e,t,r,n)=>{let a,o,s;const c={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],n&&!n(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&i(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!p(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:S,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:P,freezeMethods:e=>{P(e,((t,r)=>{if(d(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];d(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return u(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:E,global:B,isContextDefined:C,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&d(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=u(e)?[]:{};return I(e,((e,t)=>{const a=r(e,n+1);!h(a)&&(i[t]=a)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:R,isThenable:e=>e&&(g(e)||d(e))&&d(e.then)&&d(e.catch)},T=[],q=[],O="undefined"!=typeof Uint8Array?Uint8Array:Array,K=!1;function H(){K=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)T[t]=e[t],q[e.charCodeAt(t)]=t;q["-".charCodeAt(0)]=62,q["_".charCodeAt(0)]=63}function N(e,t,r){for(var n,i,a=[],o=t;o>18&63]+T[i>>12&63]+T[i>>6&63]+T[63&i]);return a.join("")}function L(e){var t;K||H();for(var r=e.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;sc?c:s+o));return 1===n?(t=e[r-1],i+=T[t>>2],i+=T[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=T[t>>10],i+=T[t>>4&63],i+=T[t<<2&63],i+="="),a.push(i),a.join("")}function G(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,h=-7,l=r?i-1:0,f=r?-1:1,d=e[t+l];for(l+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+l],l+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+e[t+l],l+=f,h-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)}function j(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,h=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?f/c:f*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=h?(s=0,o=h):o+l>=1?(s=(t*c-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*g}var z={}.toString,W=Array.isArray||function(e){return"[object Array]"==z.call(e)};Y.TYPED_ARRAY_SUPPORT=void 0===t.TYPED_ARRAY_SUPPORT||t.TYPED_ARRAY_SUPPORT;var Z=J();function J(){return Y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function V(e,t){if(J()=J())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+J().toString(16)+" bytes");return 0|e}function ne(e){return!(null==e||!e._isBuffer)}function ie(e,t){if(ne(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Pe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Me(e).length;default:if(n)return Pe(e).length;t=(""+t).toLowerCase(),n=!0}}function ae(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return we(this,t,r);case"utf8":case"utf-8":return Ae(this,t,r);case"ascii":return me(this,t,r);case"latin1":case"binary":return be(this,t,r);case"base64":return ge(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function oe(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function se(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Y.from(t,n)),ne(t))return 0===t.length?-1:ce(e,t,r,n,i);if("number"==typeof t)return t&=255,Y.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ce(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ce(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var h=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var l=!0,f=0;fi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function ge(e,t,r){return 0===t&&r===e.length?L(e):L(e.slice(t,r))}function Ae(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(h=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(h=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(h=c)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(e){var t=e.length;if(t<=ye)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Y.prototype.compare=function(e,t,r,n,i){if(!ne(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return ue(this,e,t,r);case"utf8":case"utf-8":return he(this,e,t,r);case"ascii":return le(this,e,t,r);case"latin1":case"binary":return fe(this,e,t,r);case"base64":return de(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ye=4096;function me(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function Ee(e,t,r,n,i,a){if(!ne(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Be(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function Ce(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function _e(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ke(e,t,r,n,i){return i||_e(e,0,r,4),j(e,t,r,n,23,4),r+4}function Se(e,t,r,n,i){return i||_e(e,0,r,8),j(e,t,r,n,52,8),r+8}Y.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},Y.prototype.readUInt8=function(e,t){return t||Ie(e,1,this.length),this[e]},Y.prototype.readUInt16LE=function(e,t){return t||Ie(e,2,this.length),this[e]|this[e+1]<<8},Y.prototype.readUInt16BE=function(e,t){return t||Ie(e,2,this.length),this[e]<<8|this[e+1]},Y.prototype.readUInt32LE=function(e,t){return t||Ie(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Y.prototype.readUInt32BE=function(e,t){return t||Ie(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Y.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ie(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},Y.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ie(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Y.prototype.readInt8=function(e,t){return t||Ie(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Y.prototype.readInt16LE=function(e,t){t||Ie(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Y.prototype.readInt16BE=function(e,t){t||Ie(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Y.prototype.readInt32LE=function(e,t){return t||Ie(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Y.prototype.readInt32BE=function(e,t){return t||Ie(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Y.prototype.readFloatLE=function(e,t){return t||Ie(e,4,this.length),G(this,e,!0,23,4)},Y.prototype.readFloatBE=function(e,t){return t||Ie(e,4,this.length),G(this,e,!1,23,4)},Y.prototype.readDoubleLE=function(e,t){return t||Ie(e,8,this.length),G(this,e,!0,52,8)},Y.prototype.readDoubleBE=function(e,t){return t||Ie(e,8,this.length),G(this,e,!1,52,8)},Y.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Ee(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},Y.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,1,255,0),Y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Y.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,65535,0),Y.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Be(this,e,t,!0),t+2},Y.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,65535,0),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Be(this,e,t,!1),t+2},Y.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,4294967295,0),Y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Ce(this,e,t,!0),t+4},Y.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,4294967295,0),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Ce(this,e,t,!1),t+4},Y.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Ee(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},Y.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Ee(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Y.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,1,127,-128),Y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Y.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,32767,-32768),Y.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Be(this,e,t,!0),t+2},Y.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,2,32767,-32768),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Be(this,e,t,!1),t+2},Y.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,2147483647,-2147483648),Y.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Ce(this,e,t,!0),t+4},Y.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Ee(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Ce(this,e,t,!1),t+4},Y.prototype.writeFloatLE=function(e,t,r){return ke(this,e,t,!0,r)},Y.prototype.writeFloatBE=function(e,t,r){return ke(this,e,t,!1,r)},Y.prototype.writeDoubleLE=function(e,t,r){return Se(this,e,t,!0,r)},Y.prototype.writeDoubleBE=function(e,t,r){return Se(this,e,t,!1,r)},Y.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!Y.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Me(e){return function(e){var t,r,n,i,a,o;K||H();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new O(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=q[e.charCodeAt(t)]<<2|q[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=q[e.charCodeAt(t)]<<10|q[e.charCodeAt(t+1)]<<4|q[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Qe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Ue(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function De(e){return null!=e&&(!!e._isBuffer||Re(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Re(e.slice(0,0))}(e))}function Re(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Fe=Object.freeze({__proto__:null,Buffer:Y,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),Y.alloc(+e)},isBuffer:De,kMaxLength:Z});function Te(e,t,r,n,i){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),i&&(this.response=i)}F.inherits(Te,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:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qe=Te.prototype,Oe={};["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=>{Oe[e]={value:e}})),Object.defineProperties(Te,Oe),Object.defineProperty(qe,"isAxiosError",{value:!0}),Te.from=(e,t,r,n,i,a)=>{const o=Object.create(qe);return F.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Te.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};function Ke(e){return F.isPlainObject(e)||F.isArray(e)}function He(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,r){return e?e.concat(t).map((function(e,t){return e=He(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Le=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Ge(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,i=r.visitor||u,a=r.dots,o=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!s&&F.isBlob(e))throw new Te("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Y.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(F.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(Ke)}(e)||(F.isFileList(e)||F.endsWith(r,"[]"))&&(s=F.toArray(e)))return r=He(r),s.forEach((function(e,n){!F.isUndefined(e)&&null!==e&&t.append(!0===o?Ne([r],n,a):null===o?r:r+"[]",c(e))})),!1;return!!Ke(e)||(t.append(Ne(i,r,a),c(e)),!1)}const h=[],l=Object.assign(Le,{defaultVisitor:u,convertValue:c,isVisitable:Ke});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!F.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),F.forEach(r,(function(r,a){!0===(!(F.isUndefined(r)||null===r)&&i.call(t,r,F.isString(a)?a.trim():a,n,l))&&e(r,n?n.concat(a):[a])})),h.pop()}}(e),t}function je(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ze(e,t){this._pairs=[],e&&Ge(e,this,t)}const We=ze.prototype;function Ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,r){if(!t)return e;const n=r&&r.encode||Ze,i=r&&r.serialize;let a;if(a=i?i(t,r):F.isURLSearchParams(t)?t.toString():new ze(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}We.append=function(e,t){this._pairs.push([e,t])},We.toString=function(e){const t=e?function(t){return e.call(this,t,je)}:je;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Ve=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ye={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$e={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ze,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Xe="undefined"!=typeof window&&"undefined"!=typeof document,et=(tt="undefined"!=typeof navigator&&navigator.product,Xe&&["ReactNative","NativeScript","NS"].indexOf(tt)<0);var tt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var nt={...Object.freeze({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:et,hasStandardBrowserWebWorkerEnv:rt}),...$e};function it(e){function t(e,r,n,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&F.isArray(n)?n.length:a,s)return F.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!o;n[a]&&F.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],i)&&F.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const at={transitional:Ye,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=F.isObject(e);i&&F.isHTMLForm(e)&&(e=new FormData(e));if(F.isFormData(e))return n&&n?JSON.stringify(it(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ge(e,new nt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return nt.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=F.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ge(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||at.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&F.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Te.from(e,Te.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nt.classes.FormData,Blob:nt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{at.headers[e]={}}));var ot=at;const st=F.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"]);const ct=Symbol("internals");function ut(e){return e&&String(e).trim().toLowerCase()}function ht(e){return!1===e||null==e?e:F.isArray(e)?e.map(ht):String(e)}function lt(e,t,r,n,i){return F.isFunction(n)?n.call(this,t,r):(i&&(t=r),F.isString(t)?F.isString(n)?-1!==t.indexOf(n):F.isRegExp(n)?n.test(t):void 0:void 0)}class ft{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=ut(t);if(!i)throw new Error("header name must be a non-empty string");const a=F.findKey(n,i);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=ht(e))}const a=(e,t)=>F.forEach(e,((e,r)=>i(e,r,t)));return F.isPlainObject(e)||e instanceof this.constructor?a(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&st[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=ut(e)){const r=F.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(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}(e);if(F.isFunction(t))return t.call(this,e,r);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ut(e)){const r=F.findKey(this,e);return!(!r||void 0===this[r]||t&&!lt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=ut(e)){const i=F.findKey(r,e);!i||t&&!lt(0,r[i],i,t)||(delete r[i],n=!0)}}return F.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!lt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return F.forEach(this,((n,i)=>{const a=F.findKey(r,i);if(a)return t[a]=ht(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();o!==i&&delete t[i],t[o]=ht(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&F.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ct]=this[ct]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ut(e);t[n]||(!function(e,t){const r=F.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return F.isArray(e)?e.forEach(n):n(e),this}}ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(ft.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),F.freezeMethods(ft);var dt=ft;function pt(e,t){const r=this||ot,n=t||r,i=dt.from(n.headers);let a=n.data;return F.forEach(e,(function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function gt(e){return!(!e||!e.__CANCEL__)}function At(e,t,r){Te.call(this,null==e?"canceled":e,Te.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(At,Te,{__CANCEL__:!0});var yt=nt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];F.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),F.isString(n)&&o.push("path="+n),F.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var bt=nt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=F.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function wt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[o];i||(i=c),r[a]=s,n[a]=c;let h=o,l=0;for(;h!==a;)l+=r[h++],h%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-i{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-r,c=n(s);r=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var vt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=dt.from(e.headers).normalize();let a,o,{responseType:s,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(F.isFormData(n))if(nt.hasStandardBrowserEnv||nt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(o=i.getContentType())){const[e,...t]=o?o.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const l=mt(e.baseURL,e.url);function f(){if(!h)return;const n=dt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Te("Request failed with status code "+r.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Je(l,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=f:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(f)},h.onabort=function(){h&&(r(new Te("Request aborted",Te.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Te("Network Error",Te.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Ye;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new Te(t,n.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,h)),h=null},nt.hasStandardBrowserEnv&&(c&&F.isFunction(c)&&(c=c(e)),c||!1!==c&&bt(l))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&yt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in h&&F.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",wt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",wt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{h&&(r(!t||t.type?new At(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);d&&-1===nt.protocols.indexOf(d)?r(new Te("Unsupported protocol "+d+":",Te.ERR_BAD_REQUEST,e)):h.send(n||null)}))};const It={http:null,xhr:vt};F.forEach(It,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Et=e=>`- ${e}`,Bt=e=>F.isFunction(e)||null===e||!1===e;var Ct=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Te("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Et).join("\n"):" "+Et(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function _t(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new At(null,e)}function kt(e){_t(e),e.headers=dt.from(e.headers),e.data=pt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ct(e.adapter||ot.adapter)(e).then((function(t){return _t(e),t.data=pt.call(e,e.transformResponse,t),t.headers=dt.from(t.headers),t}),(function(t){return gt(t)||(_t(e),t&&t.response&&(t.response.data=pt.call(e,e.transformResponse,t.response),t.response.headers=dt.from(t.response.headers))),Promise.reject(t)}))}const St=e=>e instanceof dt?e.toJSON():e;function Qt(e,t){t=t||{};const r={};function n(e,t,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,r){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function a(e,t){if(!F.isUndefined(t))return n(void 0,t)}function o(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t)=>i(St(e),St(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(n){const a=c[n]||i,o=a(e[n],t[n],n);F.isUndefined(o)&&a!==s||(r[n]=o)})),r}const xt="1.6.5",Pt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Pt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Mt={};Pt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new Te(n(i," has been removed"+(t?" in "+t:"")),Te.ERR_DEPRECATED);return t&&!Mt[i]&&(Mt[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var Ut={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new Te("option "+a+" must be "+r,Te.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Te("Unknown option "+a,Te.ERR_BAD_OPTION)}},validators:Pt};const Dt=Ut.validators;class Rt{constructor(e){this.defaults=e,this.interceptors={request:new Ve,response:new Ve}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Qt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Ut.assertOptions(r,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=n&&(F.isFunction(n)?t.paramsSerializer={serialize:n}:Ut.assertOptions(n,{encode:Dt.function,serialize:Dt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&F.merge(i.common,i[t.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=dt.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let h,l=0;if(!s){const e=[kt.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),h=e.length,u=Promise.resolve(t);l{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new At(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Tt((function(t){e=t}));return{token:t,cancel:e}}}var qt=Tt;const Ot={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};Object.entries(Ot).forEach((([e,t])=>{Ot[t]=e}));var Kt=Ot;const Ht=function e(t){const n=new Ft(t),i=r(Ft.prototype.request,n);return F.extend(i,Ft.prototype,n,{allOwnKeys:!0}),F.extend(i,n,null,{allOwnKeys:!0}),i.create=function(r){return e(Qt(t,r))},i}(ot);Ht.Axios=Ft,Ht.CanceledError=At,Ht.CancelToken=qt,Ht.isCancel=gt,Ht.VERSION=xt,Ht.toFormData=Ge,Ht.AxiosError=Te,Ht.Cancel=Ht.CanceledError,Ht.all=function(e){return Promise.all(e)},Ht.spread=function(e){return function(t){return e.apply(null,t)}},Ht.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},Ht.mergeConfig=Qt,Ht.AxiosHeaders=dt,Ht.formToJSON=e=>it(F.isHTMLForm(e)?new FormData(e):e),Ht.getAdapter=Ct,Ht.HttpStatusCode=Kt,Ht.default=Ht;var Nt=Ht,Lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Gt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var zt={exports:{}},Wt={exports:{}};!function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var n=r(e);throw null===e?n="null":"object"===n&&(n=e.constructor.name),new TypeError("Expected a string but received a ".concat(n))}},e.exports=t.default,e.exports.default=t.default}(Wt,Wt.exports);var Zt=Wt.exports,Jt={exports:{}},Vt={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default}(Vt,Vt.exports);var Yt=Vt.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,n.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var i=e.split("."),o=i[i.length-1];if(t.require_tld){if(i.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/\s/.test(o))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(o))return!1;return i.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var r=i(Zt),n=i(Yt);function i(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(Jt,Jt.exports);var $t=Jt.exports,Xt=Gt($t),er={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(t),r=String(r),!r)return e(t,4)||e(t,6);if("4"===r)return o.test(t);if("6"===r)return c.test(t);return!1};var r,n=(r=Zt)&&r.__esModule?r:{default:r};var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),o=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(er,er.exports);var tr=er.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,a.default)(t,c)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var o,l,f,d,p,g,A,y;if(A=e.split("#"),e=A.shift(),A=e.split("?"),e=A.shift(),(A=e.split("://")).length>1){if(o=A.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(o))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;A[0]=e.slice(2)}}if(""===(e=A.join("://")))return!1;if(A=e.split("/"),""===(e=A.shift())&&!t.require_host)return!0;if((A=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===A[0])return!1;if((l=A.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.split(":"),2),b=m[0],w=m[1];if(""===b&&""===w)return!1}d=A.join("@"),g=null,y=null;var v=d.match(u);v?(f="",y=v[1],g=v[2]||null):(f=(A=d.split(":")).shift(),A.length&&(g=A.join(":")));if(null!==g&&g.length>0){if(p=parseInt(g,10),!/^[0-9]+$/.test(g)||p<=0||p>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return h(f,t.host_whitelist);if(""===f&&!t.require_host)return!0;if(!((0,i.default)(f)||(0,n.default)(f,t)||y&&(0,i.default)(y,6)))return!1;if(f=f||y,t.host_blacklist&&h(f,t.host_blacklist))return!1;return!0};var r=o(Zt),n=o($t),i=o(tr),a=o(Yt);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)for(var r=1;r{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:5e3)})),i=new Promise(((r,n)=>{(async()=>{let i=!1;try{rr(t.claims.activitypub.url),i=!0}catch(e){}const a=new Date,{host:o,pathname:s,search:c}=new URL(e.url),u={host:o,date:a.toUTCString(),accept:"application/activity+json","User-Agent":`doipjs/${Fr}`};if(i&&Dr){const e=`(request-target): get ${s}${c}\nhost: ${o}\ndate: ${a.toUTCString()}`,r=Rr.createSign("SHA256");r.write(e),r.end();const n=r.sign(t.claims.activitypub.privateKey.replace(/\\n/g,"\n"),"base64");u.signature=`keyId="${t.claims.activitypub.url}#main-key",headers="(request-target) host date",signature="${n}",algorithm="rsa-sha256"`}Nt.get(e.url,{headers:u}).then((e=>e.data)).then((e=>{r(e)})).catch((e=>{n(e)}))})()}));return Promise.race([i,n]).finally((()=>{clearTimeout(r)}))}var qr=Object.freeze({__proto__:null,fn:Tr,timeout:5e3}),Or=crypto;const Kr=e=>e instanceof CryptoKey;var Hr=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await Or.subtle.digest(r,t))};const Nr=new TextEncoder,Lr=new TextDecoder;const Gr=e=>(e=>{let t=e;"string"==typeof t&&(t=Nr.encode(t));const r=[];for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=Lr.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;ee.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function rn(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var nn=(e,...t)=>rn("Key must be ",e,...t);function an(e,t,...r){return rn(`Key for the ${e} algorithm must be `,t,...r)}var on=e=>Kr(e);const sn=["CryptoKey"];var cn=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function un(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var hn=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new Zr(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Zr('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Zr('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:i];if("PBKDF2"===n.name)return Or.subtle.importKey("raw",jr(e.k),...a);const o={...e};return delete o.alg,delete o.use,Or.subtle.importKey("jwk",o,...a)};var ln=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!on(t))throw new TypeError(an(e,t,...sn,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${sn.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!on(t))throw new TypeError(an(e,t,...sn));if("secret"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${sn.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};var fn=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var dn=async(e,t,r,n)=>{const i=await function(e,t,r){if(Kr(t))return tn(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(nn(t,...sn));return Or.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(nn(t,...sn,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,i);const a=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Zr(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,i.algorithm);try{return await Or.subtle.verify(a,i,r,n)}catch(e){return!1}};async function pn(e,t,r){var n;if(!un(e))throw new Jr("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Jr('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Jr("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Jr("JWS Payload missing");if("string"!=typeof e.signature)throw new Jr("JWS Signature missing or incorrect type");if(void 0!==e.header&&!un(e.header))throw new Jr("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=jr(e.protected);i=JSON.parse(Lr.decode(t))}catch(e){throw new Jr("JWS Protected Header is invalid")}if(!cn(i,e.header))throw new Jr("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a={...i,...e.header},o=function(e,t,r,n,i){if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of n.crit){if(!a.has(t))throw new Zr(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===n[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(n.crit)}(Jr,new Map([["b64",!0]]),null==r?void 0:r.crit,i,a);let s=!0;if(o.has("b64")&&(s=i.b64,"boolean"!=typeof s))throw new Jr('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:c}=a;if("string"!=typeof c||!c)throw new Jr('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=r&&fn("algorithms",r.algorithms);if(u&&!u.has(c))throw new Wr('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new Jr("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Jr("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(i,e),h=!0),ln(c,t,"verify");const l=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}(Nr.encode(null!==(n=e.protected)&&void 0!==n?n:""),Nr.encode("."),"string"==typeof e.payload?Nr.encode(e.payload):e.payload);let f;try{f=jr(e.signature)}catch(e){throw new Jr("Failed to base64url decode the signature")}if(!await dn(c,t,f,l))throw new Yr;let d;if(s)try{d=jr(e.payload)}catch(e){throw new Jr("Failed to base64url decode the payload")}else d="string"==typeof e.payload?Nr.encode(e.payload):e.payload;const p={payload:d};return void 0!==e.protected&&(p.protectedHeader=i),void 0!==e.header&&(p.unprotectedHeader=e.header),h?{...p,key:t}:p}const gn=(e,t)=>{if("string"!=typeof e||!e)throw new Vr(`${t} missing or invalid`)};const An=jr;function yn(e,t,r){var n;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var i=0;i=8&&(s-=8,o[u++]=255&c>>s)}if(s>=t.bits||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o}function mn(e,t,r){void 0===r&&(r={});for(var n=r.pad,i=void 0===n||n,a=(1<t.bits;)s-=t.bits,o+=t.chars[a&c>>s];if(s&&(o+=t.chars[a&c<1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,zn.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,"");else{if("string"!=typeof i)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in Wn.alphanumeric)return Wn.alphanumeric[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))};En.locales=void 0;var jn,zn=(jn=Zt)&&jn.__esModule?jn:{default:jn},Wn=Bn;var Zn=Object.keys(Wn.alphanumeric);En.locales=Zn;var Jn={exports:{}};(function(e){e.exports.is_uri=r,e.exports.is_http_uri=n,e.exports.is_https_uri=i,e.exports.is_web_uri=a,e.exports.isUri=r,e.exports.isHttpUri=n,e.exports.isHttpsUri=i,e.exports.isWebUri=a;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var r,n,i,a,o,s="",c="";if(s=(r=t(e))[1],n=r[2],i=r[3],a=r[4],o=r[5],s&&s.length&&i.length>=0){if(n&&n.length){if(0!==i.length&&!/^\//.test(i))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return c+=s+":",n&&n.length&&(c+="//"+n),c+=i,a&&a.length&&(c+="?"+a),o&&o.length&&(c+="#"+o),c}}}function n(e,n){if(r(e)){var i,a,o,s,c="",u="",h="",l="";if(c=(i=t(e))[1],u=i[2],a=i[3],o=i[4],s=i[5],c){if(n){if("https"!=c.toLowerCase())return}else if("http"!=c.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(h=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),l+=c+":",l+="//"+u,h&&(l+=h),l+=a,o&&o.length&&(l+="?"+o),s&&s.length&&(l+="#"+s),l}}}function i(e){return n(e,!0)}function a(e){return n(e)||i(e)}})(Jn);var Vn=Jn.exports;const Yn=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},{hasOwnProperty:$n}=Object.prototype,{propertyIsEnumerable:Xn}=Object,ei=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),ti=Lt,ri={concatArrays:!1,ignoreUndefined:!1},ni=e=>{const t=[];for(const r in e)$n.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(const n of r)Xn.call(e,n)&&t.push(n)}return t};function ii(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return ni(e).forEach((r=>{ei(t,r,ii(e[r]))})),t}(e):Yn(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return ni(e).forEach((r=>{ei(t,r,ii(e[r]))})),t}(e):e}const ai=(e,t,r,n)=>(r.forEach((r=>{void 0===t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?ei(e,r,si(e[r],t[r],n)):ei(e,r,ii(t[r])))})),e),oi=(e,t,r)=>{let n=e.slice(0,0),i=0;return[e,t].forEach((t=>{const a=[];for(let r=0;r!a.includes(e))),r)})),n};function si(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?oi(e,t,r):Yn(t)&&Yn(e)?ai(e,t,ni(t),r):ii(t)}var ci=function(...e){const t=si(ii(ri),this!==ti&&this||{},ri);let r={_:{}};for(const n of e)if(void 0!==n){if(!Yn(n))throw new TypeError("`"+n+"` is not an Option Object");r=si(r,{_:n},t)}return r._},ui=Gt(ci);const hi="adaptive",li="always",fi="never",di="activitypub",pi="aspe",gi="dns",Ai="graphql",yi="http",mi="irc",bi="matrix",wi="openpgp",vi="telegram",Ii="xmpp",Ei="plain",Bi="html",Ci="xml",_i="none",ki="nocors",Si="granted",Qi="server",xi="json",Pi="text",Mi="uri",Ui="fingerprint",Di="contains",Ri="equals",Fi="oneof",Ti=100,qi=101,Oi=200,Ki=201,Hi=301,Ni=401,Li={ASP:"asp",OPENPGP:"openpgp"},Gi={EDDSA:"eddsa",ES256:"es256",OPENPGP:"openpgp",UNKNOWN:"unknown",NONE:"none"},ji={PEM:"pem",JWK:"jwk",ARMORED_PGP:"armored_pgp",NONE:"none"},zi="none",Wi="hkp",Zi="wkd";class Ji{constructor(e,t){this.identifier=null,this.name=e,this.email=null,this.description=null,this.avatarUrl=null,this.themeColor=null,this.claims=t,this.isRevoked=!1}static fromJSON(e,t){let r,n;if("object"==typeof e&&t){if(2!==t)throw new Error("Invalid persona version");if(n=function(e){const t=e.claims.map((e=>iS.fromJSON(e))),r=new Ji(e.name,t);return r.identifier=e.identifier,r.email=e.email,r.description=e.description,r.avatarUrl=e.avatarUrl,r.themeColor=e.avatarUrl,r.isRevoked=e.isRevoked,r}(e),n instanceof Error)throw n;r=n}return r}setIdentifier(e){this.identifier=e}setDescription(e){this.description=e}setEmailAddress(e){this.email=e}setAvatarUrl(e){this.avatarUrl=e}addClaim(e){this.claims.push(e)}revoke(){this.isRevoked=!0}toJSON(){return{identifier:this.identifier,name:this.name,email:this.email,description:this.description,avatarUrl:this.avatarUrl,themeColor:this.themeColor,isRevoked:this.isRevoked,claims:this.claims.map((e=>e.toJSON()))}}}class Vi{constructor(e,t,r){this.profileVersion=2,this.profileType=e,this.identifier=t,this.personas=r||[],this.primaryPersonaIndex=r.length>0?0:-1,this.publicKey={keyType:Gi.NONE,fingerprint:null,encoding:ji.NONE,encodedKey:null,key:null,fetch:{method:zi,query:null,resolvedUrl:null}},this.verifiers=[]}static fromJSON(e){let t,r;if("object"==typeof e&&"profileVersion"in e){if(2!==e.profileVersion)throw new Error("Invalid profile version");if(r=function(e){if(!("profileVersion"in e)||2!==e.profileVersion)return new Error("Invalid profile");const t=e.personas.map((e=>Ji.fromJSON(e,2))),r=new Vi(e.profileType,e.identifier,t);return r.primaryPersonaIndex=e.primaryPersonaIndex,r.publicKey=e.publicKey,r.verifiers=e.verifiers,r}(e),r instanceof Error)throw r;t=r}return t}addVerifier(e,t){this.verifiers.push({name:e,url:t})}toJSON(){return{profileVersion:this.profileVersion,profileType:this.profileType,identifier:this.identifier,personas:this.personas.map((e=>e.toJSON())),primaryPersonaIndex:this.primaryPersonaIndex,publicKey:{keyType:this.publicKey.keyType,fingerprint:this.publicKey.fingerprint,encoding:this.publicKey.encoding,encodedKey:this.publicKey.encodedKey,fetch:{method:this.publicKey.fetch.method,query:this.publicKey.fetch.query,resolvedUrl:this.publicKey.fetch.resolvedUrl}},verifiers:this.verifiers}}}class Yi{constructor(e){this.about=e.about,this.profile=e.profile,this.claim=e.claim,this.proof=e.proof}toJSON(){return{about:this.about,profile:this.profile,claim:this.claim,proof:this.proof}}}const $i=/^aspe:([a-zA-Z0-9.\-_]*):([a-zA-Z0-9]*)/;var Xi=Object.freeze({__proto__:null,processURI:function(e){const t=e.match($i);return Xt(t[1])?new Yi({about:{id:"aspe",name:"ASPE"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:$i.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:pi,accessRestriction:_i,data:{aspeUri:e}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["claims"]}]}}):null},reURI:$i,tests:[{uri:"aspe:domain.tld:abc123def456",shouldMatch:!0},{uri:"aspe:domain.tld",shouldMatch:!1},{uri:"dns:domain.tld",shouldMatch:!1},{uri:"https://domain.tld",shouldMatch:!1}]});const ea=/^openpgp4fpr:(?:0x)?([a-zA-Z0-9.\-_]*)/,ta=/^https:\/\/(.*)\/.well-known\/openpgpkey\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/,ra=/^https:\/\/(openpgpkey.*)\/.well-known\/openpgpkey\/(.*)\/hu\/([a-zA-Z0-9]*)(?:\?l=(.*))?/;var na=Object.freeze({__proto__:null,processURI:function(e){let t=null,r=null,n=null;ea.test(e)&&(t=ea,r=Wi,n=e.match(t)),!r&&ra.test(e)&&(t=ra,r=Zi,n=e.match(t)),!r&&ta.test(e)&&(t=ta,r=Zi,n=e.match(t));let i=null;switch(r){case Wi:i=new Yi({about:{id:"openpgp",name:"OpenPGP"},profile:{display:`openpgp4fpr:${n[1]}`,uri:`https://keys.openpgp.org/search?q=${n[1]}`,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,fetcher:wi,accessRestriction:_i,data:{url:`https://keys.openpgp.org/vks/v1/by-fingerprint/${n[1].toUpperCase()}`,protocol:Wi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["notations","proof@ariadne.id"]}]}});break;case Zi:i=new Yi({about:{id:"openpgp",name:"OpenPGP"},profile:{display:"unknown fingerprint",uri:e,qr:null},claim:{uriRegularExpression:t.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:wi,accessRestriction:_i,data:{url:e,protocol:Zi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["notations","proof@ariadne.id"]}]}})}return i},reURI:/^(.*)/,tests:[{uri:"openpgp4fpr:123456789",shouldMatch:!0},{uri:"openpgp4fpr:abcdef123",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/domain.tld/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/hu/123abc456def",shouldMatch:!0},{uri:"https://domain.tld",shouldMatch:!0},{uri:"https://openpgpkey.domain.tld/.well-known/openpgpkey/hu/123abc456def?l=name",shouldMatch:!0},{uri:"https://domain.tld/.well-known/openpgpkey/123abc456def?l=name",shouldMatch:!0}]});const ia=/^dns:([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var aa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ia);return new Yi({about:{id:"dns",name:"DNS"},profile:{display:t[1],uri:`https://${t[1]}`,qr:null},claim:{uriRegularExpression:ia.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:gi,accessRestriction:Qi,data:{domain:t[1]}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["records","txt"]}]}})},reURI:ia,tests:[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const oa=/^irc:\/\/(.*)\/([a-zA-Z0-9\-[\]\\`_^{|}]*)/;var sa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(oa);return new Yi({about:{id:"irc",name:"IRC"},profile:{display:`${t[1]}/${t[2]}`,uri:e,qr:null},claim:{uriRegularExpression:oa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:mi,accessRestriction:Qi,data:{domain:t[1],nick:t[2]}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:[]}]}})},reURI:oa,tests:[{uri:"irc://chat.ircserver.org/Alice1",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice?param=123",shouldMatch:!0},{uri:"irc://chat.ircserver.org/alice_bob",shouldMatch:!0},{uri:"https://chat.ircserver.org/alice",shouldMatch:!1}]});const ca=/^xmpp:([a-zA-Z0-9.\-_]*)@([a-zA-Z0-9.\-_]*)(?:\?(.*))?/;var ua=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ca);return new Yi({about:{id:"xmpp",name:"XMPP",homepage:"https://xmpp.org"},profile:{display:`${t[1]}@${t[2]}`,uri:e,qr:e},claim:{uriRegularExpression:ca.toString(),uriIsAmbiguous:!1},proof:{request:{uri:null,fetcher:Ii,accessRestriction:Qi,data:{id:`${t[1]}@${t[2]}`}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:[]}]}})},reURI:ca,tests:[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]});const ha=/^matrix:u\/(?:@)?([^@:]*:[^?]*)(\?.*)?/;var la=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ha);if(!t[2])return null;const r=new URLSearchParams(t[2]);if(!r.has("org.keyoxide.e")||!r.has("org.keyoxide.r"))return null;const n=`${"!"!==r.get("org.keyoxide.r")[0]?"!":""}${r.get("org.keyoxide.r")}`,i=`${"$"!==r.get("org.keyoxide.e")[0]?"$":""}${r.get("org.keyoxide.e")}`,a=`https://matrix.to/#/@${t[1]}`,o=`https://matrix.to/#/${n}/${i}`;return new Yi({about:{id:"matrix",name:"Matrix",homepage:"https://matrix.org"},profile:{display:`@${t[1]}`,uri:a,qr:null},claim:{uriRegularExpression:ha.toString(),uriIsAmbiguous:!1},proof:{request:{uri:o,fetcher:bi,accessRestriction:Si,data:{eventId:i,roomId:n}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["content","body"]}]}})},reURI:ha,tests:[{uri:"matrix:u/alice:matrix.domain.org?org.keyoxide.r=123:domain.org&org.keyoxide.e=123",shouldMatch:!0},{uri:"matrix:u/alice:matrix.domain.org",shouldMatch:!0},{uri:"matrix:u/@alice:matrix.domain.org?org.keyoxide.r=!123:domain.org&org.keyoxide.e=$123",shouldMatch:!0},{uri:"xmpp:alice@domain.org",shouldMatch:!1},{uri:"https://domain.org/@alice",shouldMatch:!1}]});const fa=/https:\/\/t.me\/([A-Za-z0-9_]{5,32})\?proof=([A-Za-z0-9_]{5,32})/;var da=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(fa);return new Yi({about:{id:"telegram",name:"Telegram",homepage:"https://telegram.org"},profile:{display:`@${t[1]}`,uri:`https://t.me/${t[1]}`,qr:`https://t.me/${t[1]}`},claim:{uriRegularExpression:fa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://t.me/${t[2]}`,fetcher:vi,accessRestriction:Si,data:{user:t[1],chat:t[2]}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["text"]}]}})},reURI:fa,tests:[{uri:"https://t.me/alice?proof=foobar",shouldMatch:!0},{uri:"https://t.me/complex_user_1234?proof=complex_chat_1234",shouldMatch:!0},{uri:"https://t.me/foobar",shouldMatch:!1},{uri:"https://t.me/foobar?proof=",shouldMatch:!1},{uri:"https://t.me/?proof=foobar",shouldMatch:!1}]});const pa=/^https:\/\/twitter\.com\/(.*)\/status\/([0-9]*)(?:\?.*)?/;var ga=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(pa),r=new URLSearchParams;return r.set("url",t[0]),r.set("omit_script","1"),new Yi({about:{id:"twitter",name:"Twitter",homepage:"https://twitter.com"},profile:{display:`@${t[1]}`,uri:`https://twitter.com/${t[1]}`,qr:null},claim:{uriRegularExpression:pa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://publish.twitter.com/oembed?${r}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["html"]}]}})},reURI:pa,tests:[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]});const Aa=/^https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/(.*)\/?/;var ya=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Aa);return new Yi({about:{id:"reddit",name:"Reddit",homepage:"https://reddit.com"},profile:{display:t[1],uri:`https://www.reddit.com/user/${t[1]}`,qr:null},claim:{uriRegularExpression:Aa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://www.reddit.com/user/${t[1]}/comments/${t[2]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["data","children","data","selftext"]}]}})},reURI:Aa,tests:[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]});const ma=/^https:\/\/liberapay\.com\/(.*)\/?/;var ba=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(ma);return new Yi({about:{id:"liberapay",name:"Liberapay",homepage:"https://liberapay.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:ma.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:_i,data:{url:`https://liberapay.com/${t[1]}/public.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["statements","content"]}]}})},reURI:ma,tests:[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const wa=/^https:\/\/lichess\.org\/@\/(.*)\/?/;var va=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(wa);return new Yi({about:{id:"lichess",name:"Lichess",homepage:"https://lichess.org"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:wa.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lichess.org/api/user/${t[1]}`,fetcher:yi,accessRestriction:_i,data:{url:`https://lichess.org/api/user/${t[1]}`,format:xi}},response:{format:xi},target:[{format:Ui,encoding:Ei,relation:Di,path:["profile","links"]}]}})},reURI:wa,tests:[{uri:"https://lichess.org/@/Alice",shouldMatch:!0},{uri:"https://lichess.org/@/Alice/",shouldMatch:!0},{uri:"https://domain.org/@/Alice",shouldMatch:!1}]});const Ia=/^https:\/\/news\.ycombinator\.com\/user\?id=(.*)\/?/;var Ea=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ia);return new Yi({about:{id:"hackernews",name:"Hacker News",homepage:"https://news.ycombinator.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Ia.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,fetcher:yi,accessRestriction:ki,data:{url:`https://hacker-news.firebaseio.com/v0/user/${t[1]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Bi,relation:Di,path:["about"]}]}})},reURI:Ia,tests:[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]});const Ba=/^https:\/\/lobste\.rs\/(?:~|u\/)(.*)\/?/;var Ca=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ba);return new Yi({about:{id:"lobsters",name:"Lobsters",homepage:"https://lobste.rs"},profile:{display:t[1],uri:`https://lobste.rs/~${t[1]}`,qr:null},claim:{uriRegularExpression:Ba.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://lobste.rs/~${t[1]}.json`,fetcher:yi,accessRestriction:ki,data:{url:`https://lobste.rs/~${t[1]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["about"]}]}})},reURI:Ba,tests:[{uri:"https://lobste.rs/~Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/~Alice",shouldMatch:!1},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]});const _a=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var ka=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(_a);return new Yi({about:{id:"forem",name:"Forem",homepage:"https://www.forem.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:_a.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/api/articles/${t[2]}/${t[3]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["body_markdown"]}]}})},reURI:_a,tests:[{uri:"https://domain.org/alice/post",shouldMatch:!0},{uri:"https://domain.org/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Sa=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;const Qa={validate:async(e,t,r)=>{const n=`https://${new URL(e.proof.request.uri).hostname}/api/forgejo/v1/version`,i=await Kw({url:n,format:xi});return i&&"version"in i}};var xa=Object.freeze({__proto__:null,functions:Qa,processURI:function(e){const t=e.match(Sa);return new Yi({about:{id:"forgejo",name:"Forgejo",homepage:"https://forgejo.org"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Sa.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["description"]}]}})},reURI:Sa,tests:[{uri:"https://domain.org/alice/forgejo_proof",shouldMatch:!0},{uri:"https://domain.org/alice/forgejo_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Pa=/^https:\/\/(.*)\/(.*)\/(.*)\/?/;var Ma=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Pa);return new Yi({about:{id:"gitea",name:"Gitea",homepage:"https://about.gitea.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Pa.toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/api/v1/repos/${t[2]}/${t[3]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["description"]}]}})},reURI:Pa,tests:[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const Ua=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/;var Da=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ua);return new Yi({about:{id:"gitlab",name:"GitLab",homepage:"https://about.gitlab.com"},profile:{display:`${t[2]}@${t[1]}`,uri:`https://${t[1]}/${t[2]}`,qr:null},claim:{uriRegularExpression:Ua.toString(),uriIsAmbiguous:!0},proof:{request:{fetcher:yi,accessRestriction:_i,data:{url:`https://${t[1]}/api/v4/projects/${t[2]}%2Fgitlab_proof`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Ri,path:["description"]}]}})},reURI:Ua,tests:[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]});const Ra=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;var Fa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ra);return new Yi({about:{id:"github",name:"GitHub",homepage:"https://github.com"},profile:{display:t[1],uri:`https://github.com/${t[1]}`,qr:null},claim:{uriRegularExpression:Ra.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:_i,data:{url:`https://api.github.com/gists/${t[2]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["files","proof.md","content"]},{format:Mi,encoding:Ei,relation:Di,path:["files","openpgp.md","content"]}]}})},reURI:Ra,tests:[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]});const Ta=/^https:\/\/(.*)\/?/;const qa={postprocess:async(e,t,r)=>{switch(t.result.type){case"Note":{e.profile.uri=t.result.attributedTo,e.profile.display=t.result.attributedTo;const n=await Tr({url:t.result.attributedTo},r).catch((e=>null));n&&(e.profile.display=`@${n.preferredUsername}@${new URL(e.proof.request.uri).hostname}`);break}case"Person":e.profile.display=`@${t.result.preferredUsername}@${new URL(e.proof.request.uri).hostname}`}const n=await Oa(new URL(e.proof.request.uri).hostname);return n&&(e.about.name=n.software.name,e.about.id=n.software.name,e.about.homepage=n.software.homepage),{claimData:e,proofData:t}}},Oa=async e=>{const t=await fetch(`https://${e}/.well-known/nodeinfo`).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).catch((e=>null));if(!t)return null;{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:e.software.homepage||"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/2.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.1"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}{const e=t.links.find((e=>"http://nodeinfo.diaspora.software/ns/schema/1.0"===e.rel));if(e)return await fetch(e.href).then((e=>{if(200!==e.status)throw new Error("HTTP Status was not 200");return e.json()})).then((e=>({software:{name:e.software.name,version:e.software.version,homepage:"https://activitypub.rocks"}}))).catch((e=>null))}};var Ka=Object.freeze({__proto__:null,functions:qa,processURI:function(e){return new Yi({about:{id:"activitypub",name:"ActivityPub",homepage:"https://activitypub.rocks"},profile:{display:e,uri:e,qr:null},claim:{uriRegularExpression:Ta.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:di,accessRestriction:_i,data:{url:e}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["summary"]},{format:Mi,encoding:Ei,relation:Di,path:["attachment","value"]},{format:Mi,encoding:Ei,relation:Di,path:["content"]}]}})},reURI:Ta,tests:[{uri:"https://domain.org",shouldMatch:!0},{uri:"https://domain.org/@/alice/",shouldMatch:!0},{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/123456",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/users/alice/123456",shouldMatch:!0},{uri:"http://domain.org/alice",shouldMatch:!1}]});const Ha=/^https:\/\/(.*)\/u\/(.*)\/?/;var Na=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Ha);return new Yi({about:{id:"discourse",name:"Discourse",homepage:"https://www.discourse.org"},profile:{display:`${t[2]}@${t[1]}`,uri:e,qr:null},claim:{uriRegularExpression:Ha.toString().toString(),uriIsAmbiguous:!0},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://${t[1]}/u/${t[2]}.json`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["user","bio_raw"]}]}})},reURI:Ha,tests:[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]});const La=/^https:\/\/(.*)/;var Ga=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(La);return new Yi({about:{id:"owncast",name:"Owncast",homepage:"https://owncast.online"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:La.toString(),uriIsAmbiguous:!0},proof:{request:{uri:`${e}/api/config`,fetcher:yi,accessRestriction:_i,data:{url:`${e}/api/config`,format:xi}},response:{format:xi},target:[{format:Ui,encoding:Ei,relation:Di,path:["socialHandles","url"]}]}})},reURI:La,tests:[{uri:"https://live.domain.org",shouldMatch:!0},{uri:"https://live.domain.org/",shouldMatch:!0},{uri:"https://domain.org/live",shouldMatch:!0},{uri:"https://domain.org/live/",shouldMatch:!0}]});const ja=/^https:\/\/(.*(?:askubuntu|mathoverflow|serverfault|stackapps|stackoverflow|superuser)|.+\.stackexchange)\.com\/users\/(\d+)/,za=/\.stackexchange$/;var Wa=Object.freeze({__proto__:null,processURI:function(e){const[,t,r]=e.match(ja),n=t.replace(za,"");return new Yi({about:{id:"stackexchange",name:"Stack Exchange",homepage:"https://stackexchange.com"},profile:{display:`${r}@${n}`,uri:e,qr:null},claim:{uriRegularExpression:ja.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://${t}.com/users/${r}?tab=profile`,fetcher:yi,accessRestriction:_i,data:{url:`https://api.stackexchange.com/2.3/users/${r}?site=${n}&filter=!AH)b5JqVyImf`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["items","about_me"]}]}})},reURI:ja,tests:[{uri:"https://stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234?tab=topactivity",shouldMatch:!0},{uri:"https://stackoverflow.com/users/1234/alice?tab=profile",shouldMatch:!0},{uri:"https://meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://pt.meta.stackoverflow.com/users/1234",shouldMatch:!0},{uri:"https://serverfault.com/users/1234",shouldMatch:!0},{uri:"https://meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://gaming.meta.stackexchange.com/users/1234",shouldMatch:!0},{uri:"https://stackexchange.com/users/1234",shouldMatch:!1},{uri:"https://domain.com/users/1234",shouldMatch:!1},{uri:"https://meta.domain.com/users/1234",shouldMatch:!1}]});const Za=/^https:\/\/keybase.io\/(.*)\/?/;var Ja=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Za);return new Yi({about:{id:"keybase",name:"keybase",homepage:"https://keybase.io"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Za.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,fetcher:yi,accessRestriction:ki,data:{url:`https://keybase.io/_/api/1.0/user/lookup.json?username=${t[1]}`,format:xi}},response:{format:xi},target:[{format:Ui,encoding:Ei,relation:Di,path:["them","public_keys","primary","key_fingerprint"]}]}})},reURI:Za,tests:[{uri:"https://keybase.io/Alice",shouldMatch:!0},{uri:"https://keybase.io/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const Va=/^https:\/\/opencollective\.com\/(.*)\/?/;var Ya=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(Va);return new Yi({about:{id:"opencollective",name:"Open Collective",homepage:"https://opencollective.com"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:Va.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:Ai,accessRestriction:ki,data:{url:"https://api.opencollective.com/graphql/v2",query:`{ "query": "query { account(slug: \\"${t[1]}\\") { longDescription } }" }`}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["data","account","longDescription"]}]}})},reURI:Va,tests:[{uri:"https://opencollective.com/Alice",shouldMatch:!0},{uri:"https://opencollective.com/Alice/",shouldMatch:!0},{uri:"https://domain.org/Alice",shouldMatch:!1}]});const $a=/^https:\/\/orcid\.org\/(.*)\/?/;var Xa=Object.freeze({__proto__:null,processURI:function(e){const t=e.match($a);return new Yi({about:{id:"orcid",name:"ORCiD",homepage:"https://orcid.org/"},profile:{display:t[1],uri:e,qr:null},claim:{uriRegularExpression:$a.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:_i,data:{url:e,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["person","biography","content"]},{format:Mi,encoding:Ei,relation:Ri,path:["person","researcher-urls","researcher-url","url","value"]},{format:Mi,encoding:Ei,relation:Ri,path:["person","keywords","keyword","content"]}]}})},reURI:$a,tests:[{uri:"https://orcid.org/0000-0000-0000-0000",shouldMatch:!0},{uri:"https://orcid.org/0000-0000-0000-0000/",shouldMatch:!0},{uri:"https://domain.org/0000-0000-0000-0000",shouldMatch:!1}]});const eo=/^https:\/\/pronouns\.cc\/@(.*)\/?/;var to=Object.freeze({__proto__:null,processURI:function(e){const t=e.match(eo);return new Yi({about:{id:"pronounscc",name:"pronouns.cc",homepage:"https://pronouns.cc"},profile:{display:`@${t[1]}`,uri:`https://pronouns.cc/@${t[1]}`,qr:null},claim:{uriRegularExpression:eo.toString(),uriIsAmbiguous:!1},proof:{request:{uri:e,fetcher:yi,accessRestriction:ki,data:{url:`https://pronouns.cc/api/v1/users/${t[1]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["links"]},{format:Mi,encoding:Ei,relation:Di,path:["bio"]}]}})},reURI:eo,tests:[{uri:"https://pronouns.cc/@Alice",shouldMatch:!0},{uri:"https://pronouns.cc/@Alice/",shouldMatch:!0},{uri:"https://pronouns.cc/Alice",shouldMatch:!1},{uri:"https://pronouns.cc/Alice/",shouldMatch:!1}]});const ro=/^https:\/\/(?:discord\.gg|discord\.com\/invite)\/(.+)/;var no=Object.freeze({__proto__:null,functions:{postprocess:async(e,t,r)=>(e.profile.display=t.result.inviter.username,{claimData:e,proofData:t})},processURI:function(e){const t=e.match(ro);return new Yi({about:{id:"discord",name:"Discord",homepage:"https://discord.com"},profile:{display:"Unknown username",uri:null,qr:null},claim:{uriRegularExpression:ro.toString(),uriIsAmbiguous:!1},proof:{request:{uri:`https://discord.com/api/v10/invites/${t[1]}`,fetcher:yi,accessRestriction:ki,data:{url:`https://discord.com/api/v10/invites/${t[1]}`,format:xi}},response:{format:xi},target:[{format:Mi,encoding:Ei,relation:Di,path:["guild","description"]},{format:Mi,encoding:Ei,relation:Di,path:["guild","name"]}]}})},reURI:ro,tests:[{uri:"https://discord.com/invite/AbCdEf",shouldMatch:!0},{uri:"https://discord.com/invite/AbCdEfGh",shouldMatch:!0},{uri:"https://discord.gg/AbCdEf",shouldMatch:!0},{uri:"https://discord.gg/AbCdEfGh",shouldMatch:!0},{uri:"https://domain.com/invite/AbCdEf",shouldMatch:!1},{uri:"https://domain.gg/AbCdEf",shouldMatch:!1},{uri:"https://discord.com/invite/",shouldMatch:!1},{uri:"https://discord.gg/",shouldMatch:!1}]});const io={aspe:Xi,openpgp:na,dns:aa,irc:sa,xmpp:ua,matrix:la,telegram:da,twitter:ga,reddit:ya,liberapay:ba,lichess:va,hackernews:Ea,lobsters:Ca,forem:ka,forgejo:xa,gitea:Ma,gitlab:Da,github:Fa,activitypub:Ka,discourse:Na,owncast:Ga,stackexchange:Wa,keybase:Ja,opencollective:Ya,orcid:Xa,pronounscc:to,discord:no},ao=Object.keys(io),oo="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},so=Symbol("doneWritingPromise"),co=Symbol("doneWritingResolve"),uo=Symbol("doneWritingReject"),ho=Symbol("readingIndex");class lo extends Array{constructor(){super(),this[so]=new Promise(((e,t)=>{this[co]=e,this[uo]=t})),this[so].catch((()=>{}))}}function fo(e){return e&&e.getReader&&Array.isArray(e)}function po(e){if(!fo(e)){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=()=>{t.closed.catch((function(){})),r.call(t)},t}this.stream=e}lo.prototype.getReader=function(){return void 0===this[ho]&&(this[ho]=0),{read:async()=>(await this[so],this[ho]===this.length?{value:void 0,done:!0}:{value:this[this[ho]++],done:!1})}},lo.prototype.readToEnd=async function(e){await this[so];const t=e(this.slice(this[ho]));return this.length=0,t},lo.prototype.clone=function(){const e=new lo;return e[so]=this[so].then((()=>{e.push(...this)})),e},po.prototype.write=async function(e){this.stream.push(e)},po.prototype.close=async function(){this.stream[co]()},po.prototype.abort=async function(e){return this.stream[uo](e),e},po.prototype.releaseLock=function(){};const go="object"==typeof oo.process&&"object"==typeof oo.process.versions,Ao=go&&void 0;function yo(e){return fo(e)?"array":oo.ReadableStream&&oo.ReadableStream.prototype.isPrototypeOf(e)?"web":So&&So.prototype.isPrototypeOf(e)?"ponyfill":Ao&&Ao.prototype.isPrototypeOf(e)?"node":!(!e||!e.getReader)&&"web-like"}function mo(e){return Uint8Array.prototype.isPrototypeOf(e)}function bo(e){if(1===e.length)return e[0];let t=0;for(let r=0;r{t||(wo.isBuffer(n)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),r.enqueue(n),e.pause())})),e.on("end",(()=>{t||r.close()})),e.on("error",(e=>r.error(e)))},pull(){e.resume()},cancel(r){t=!0,e.destroy(r)}})};class e extends vo{constructor(e,t){super(t),this._reader=Ro(e)}async _read(e){try{for(;;){const{done:e,value:t}=await this._reader.read();if(e){this.push(null);break}if(!this.push(t))break}}catch(e){this.destroy(e)}}async _destroy(e,t){this._reader.cancel(e).then(t,t)}}Eo=function(t,r){return new e(t,r)}}const Bo=new WeakSet,Co=Symbol("externalBuffer");function _o(e){if(this.stream=e,e[Co]&&(this[Co]=e[Co].slice()),fo(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{},void(this._cancel=async()=>{})}let t=yo(e);if("node"===t&&(e=Io(e)),t){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{t.closed.catch((function(){})),t.releaseLock()},void(this._cancel=t.cancel.bind(t))}let r=!1;this._read=async()=>r||Bo.has(e)?{value:void 0,done:!0}:(r=!0,{value:e,done:!1}),this._releaseLock=()=>{if(r)try{Bo.add(e)}catch(e){}}}_o.prototype.read=async function(){return this[Co]&&this[Co].length?{done:!1,value:this[Co].shift()}:this._read()},_o.prototype.releaseLock=function(){this[Co]&&(this.stream[Co]=this[Co]),this._releaseLock()},_o.prototype.cancel=function(e){return this._cancel(e)},_o.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:r,value:n}=await this.read();if(n+="",r)return t.length?Do(t):void 0;const i=n.indexOf("\n")+1;i&&(e=Do(t.concat(n.substr(0,i))),t=[]),i!==n.length&&t.push(n.substr(i))}return this.unshift(...t),e},_o.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const r=t[0];return this.unshift(jo(t,1)),r},_o.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){const{done:n,value:i}=await this.read();if(n)return t.length?Do(t):void 0;if(t.push(i),r+=i.length,r>=e){const r=Do(t);return this.unshift(jo(r,e)),jo(r,0,e)}}},_o.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},_o.prototype.unshift=function(...e){this[Co]||(this[Co]=[]),1===e.length&&mo(e[0])&&this[Co].length&&e[0].length&&this[Co][0].byteOffset>=e[0].length?this[Co][0]=new Uint8Array(this[Co][0].buffer,this[Co][0].byteOffset-e[0].length,this[Co][0].byteLength+e[0].length):this[Co].unshift(...e.filter((e=>e&&e.length)))},_o.prototype.readToEnd=async function(e=Do){const t=[];for(;;){const{done:e,value:r}=await this.read();if(e)break;t.push(r)}return e(t)};let ko,{ReadableStream:So,WritableStream:Qo,TransformStream:xo}=oo;const Po=go&&void 0;function Mo(e){let t=yo(e);return"node"===t?Io(e):"web"===t&&ko?ko(e):t?e:new So({start(t){t.enqueue(e),t.close()}})}function Uo(e){if(yo(e))return e;const t=new lo;return(async()=>{const r=Fo(t);await r.write(e),await r.close()})(),t}function Do(e){return e.some((e=>yo(e)&&!fo(e)))?function(e){e=e.map(Mo);const t=Oo((async function(e){await Promise.all(n.map((t=>async function(e,t){if(yo(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}(t,e))))}));let r=Promise.resolve();const n=e.map(((n,i)=>Ho(n,((n,a)=>(r=r.then((()=>To(n,t.writable,{preventClose:i!==e.length-1}))),r)))));return t.readable}(e):e.some((e=>fo(e)))?function(e){const t=new lo;let r=Promise.resolve();return e.forEach(((n,i)=>(r=r.then((()=>To(n,t,{preventClose:i!==e.length-1}))),r))),t}(e):"string"==typeof e[0]?e.join(""):Po&&Po.isBuffer(e[0])?Po.concat(e):bo(e)}function Ro(e){return new _o(e)}function Fo(e){return new po(e)}async function To(e,t,{preventClose:r=!1,preventAbort:n=!1,preventCancel:i=!1}={}){if(yo(e)&&!fo(e)){e=Mo(e);try{if(e[Co]){const r=Fo(t);for(let t=0;t{t=e})),t=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function Ko(e,t=(()=>{}),r=(()=>{})){if(fo(e)){const n=new lo;return(async()=>{const i=Fo(n);try{const n=await zo(e),a=t(n),o=r();let s;s=void 0!==a&&void 0!==o?Do([a,o]):void 0!==a?a:o,await i.write(s),await i.close()}catch(e){await i.abort(e)}})(),n}if(yo(e))return qo(e,{async transform(e,r){try{const n=await t(e);void 0!==n&&r.enqueue(n)}catch(e){r.error(e)}},async flush(e){try{const t=await r();void 0!==t&&e.enqueue(t)}catch(t){e.error(t)}}});const n=t(e),i=r();return void 0!==n&&void 0!==i?Do([n,i]):void 0!==n?n:i}function Ho(e,t){if(yo(e)&&!fo(e)){let r;const n=new xo({start(e){r=e}}),i=To(e,n.writable),a=Oo((async function(e){r.error(e),await i,await new Promise(setTimeout)}));return t(n.readable,a.writable),a.readable}e=Uo(e);const r=new lo;return t(e,r),r}function No(e){if(fo(e))return e.clone();if(yo(e)){const t=function(e){if(fo(e))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(yo(e)){const t=Mo(e).tee();return t[0][Co]=t[1][Co]=e[Co],t}return[jo(e),jo(e)]}(e);return Go(e,t[0]),t[1]}return jo(e)}function Lo(e){return fo(e)?No(e):yo(e)?new So({start(t){const r=Ho(e,(async(e,r)=>{const n=Ro(e),i=Fo(r);try{for(;;){await i.ready;const{done:r,value:a}=await n.read();if(r){try{t.close()}catch(e){}return void await i.close()}try{t.enqueue(a)}catch(e){}await i.write(a)}}catch(e){t.error(e),await i.abort(e)}}));Go(e,r)}}):jo(e)}function Go(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach((([r,n])=>{"constructor"!==r&&(n.value?n.value=n.value.bind(t):n.get=n.get.bind(t),Object.defineProperty(e,r,n))}))}function jo(e,t=0,r=1/0){if(fo(e))throw Error("Not implemented");if(yo(e)){if(t>=0&&r>=0){let n=0;return qo(e,{transform(e,i){n=t&&i.enqueue(jo(e,Math.max(t-n,0),r-n)),n+=e.length):i.terminate()}})}if(t<0&&(r<0||r===1/0)){let n=[];return Ko(e,(e=>{e.length>=-t?n=[e]:n.push(e)}),(()=>jo(Do(n),t,r)))}if(0===t&&r<0){let n;return Ko(e,(e=>{const i=n?Do([n,e]):e;if(i.length>=-r)return n=jo(i,r),jo(i,t,r);n=i}))}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),Wo((async()=>jo(await zo(e),t,r)))}return e[Co]&&(e=Do(e[Co].concat([e]))),!mo(e)||Po&&Po.isBuffer(e)?e.slice(t,r):(r===1/0&&(r=e.length),e.subarray(t,r))}async function zo(e,t=Do){return fo(e)?e.readToEnd(t):yo(e)?Ro(e).readToEnd(t):e}function Wo(e){const t=new lo;return(async()=>{const r=Fo(t);try{await r.write(await e()),await r.close()}catch(e){await r.abort(e)}})(),t}class Zo{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");if(e instanceof Uint8Array){const t=e,r=Array(t.length);for(let e=0;eBigInt(0);){const e=r&BigInt(1);r>>=BigInt(1);const a=i*n%t.value;i=e?a:i,n=n*n%t.value}return new Zo(i)}modInv(e){const{gcd:t,x:r}=this._egcd(e);if(!t.isOne())throw Error("Inverse does not exist");return r.add(e).mod(e)}_egcd(e){let t=BigInt(0),r=BigInt(1),n=BigInt(1),i=BigInt(0),a=this.value;for(e=e.value;e!==BigInt(0);){const o=a/e;let s=t;t=n-o*t,n=s,s=r,r=i-o*r,i=s,s=e,e=a%e,a=s}return{x:new Zo(n),y:new Zo(i),gcd:new Zo(a)}}gcd(e){let t=this.value;for(e=e.value;e!==BigInt(0);){const r=e;e=t%e,t=r}return new Zo(t)}ileftShift(e){return this.value<<=e.value,this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value>>=e.value,this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value===e.value}lt(e){return this.valuee.value}gte(e){return this.value>=e.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.valueNumber.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return e}getBit(e){return(this.value>>BigInt(e)&BigInt(1))===BigInt(0)?0:1}bitLength(){const e=new Zo(0),t=new Zo(1),r=new Zo(-1),n=this.isNegative()?r:e;let i=1;const a=this.clone();for(;!a.irightShift(t).equal(n);)i++;return i}byteLength(){const e=new Zo(0),t=new Zo(-1),r=this.isNegative()?t:e,n=new Zo(8);let i=1;const a=this.clone();for(;!a.irightShift(n).equal(r);)i++;return i}toUint8Array(e="be",t){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const n=r.length/2,i=new Uint8Array(t||n),a=t?t-n:0;let o=0;for(;o{e[Jo][r]=t}))),void 0!==e[Jo][t])return e[Jo][t];throw Error("Invalid enum value.")}};const Yo=(()=>{try{return"development"===process.env.NODE_ENV}catch(e){}return!1})(),$o={isString:function(e){return"string"==typeof e||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:mo,isStream:yo,readNumber:function(e){let t=0;for(let r=0;r>8*(t-n-1)&255;return r},readDate:function(e){const t=$o.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return $o.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=7+(e[0]<<8|e[1])>>>3;return e.subarray(2,2+t)},leftPad(e,t){const r=new Uint8Array(t),n=t-e.length;return r.set(e,n),r},uint8ArrayToMPI:function(e){const t=$o.uint8ArrayBitLength(e);if(0===t)throw Error("Zero MPI");const r=e.subarray(e.length-Math.ceil(t/8)),n=new Uint8Array([(65280&t)>>8,255&t]);return $o.concatUint8Array([n,r])},uint8ArrayBitLength:function(e){let t;for(t=0;t>1);for(let r=0;r>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],r=e.length;let n,i=0;for(;i{if(!$o.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;rr("",!0)))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return Ko(e,r,(()=>r(new Uint8Array,!0)))},concat:Do,concatUint8Array:bo,equalsUint8Array:function(e,t){if(!$o.isUint8Array(e)||!$o.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r>>16;return 0!==r&&(e=r,t+=16),r=e>>8,0!==r&&(e=r,t+=8),r=e>>4,0!==r&&(e=r,t+=4),r=e>>2,0!==r&&(e=r,t+=2),r=e>>1,0!==r&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let n=0;n>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){return void 0!==oo&&oo.crypto&&oo.crypto.subtle},getBigInteger:async function(){if("undefined"!=typeof BigInt)return Zo;{const{default:e}=await Promise.resolve().then((function(){return gm}));return e}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return"undefined"!=typeof navigator?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(e){return!!$o.isString(e)&&/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}[0-9]*|xn--[a-zA-Z\-0-9]+)))$/.test(e)},canonicalizeEOL:function(e){let t=!1;return Ko(e,(e=>{let r;t&&(e=$o.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const n=[];for(let t=0;r=e.indexOf(10,t)+1,r;t=r)13!==e[r-2]&&n.push(r);if(!n.length)return e;const i=new Uint8Array(e.length+n.length);let a=0;for(let t=0;tt?new Uint8Array([13]):void 0))},nativeEOL:function(e){let t=!1;return Ko(e,(e=>{let r;13===(e=t&&10!==e[0]?$o.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let n=0;for(let t=0;t!==e.length;t=r){r=e.indexOf(13,t)+1,r||(r=e.length);const i=r-(10===e[r]?1:0);t&&e.copyWithin(n,t,i),n+=i-t}return e.subarray(0,n)}),(()=>t?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(e){return e.split("\n").map((e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]||"\r"===e[t]);t--);return e.substr(0,t+1)})).join("\n")},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch(e){}return t},constructAllowedPackets:function(e){const t={};return e.forEach((e=>{if(!e.tag)throw Error("Invalid input: expected a packet class");t[e.tag]=e})),t},anyPromise:function(e){return new Promise((async(t,r)=>{let n;await Promise.all(e.map((async e=>{try{t(await e)}catch(e){n=e}}))),r(n)}))},selectUint8Array:function(e,t,r){const n=Math.max(t.length,r.length),i=new Uint8Array(n);let a=0;for(let n=0;n{t=$o.concatUint8Array([t,e]);const r=[],n=Math.floor(t.length/45),i=45*n,a=es(t.subarray(0,i));for(let e=0;et.length?es(t)+"\n":""))}function ns(e){let t="";return Ko(e,(e=>{t+=e;let r=0;const n=[" ","\t","\r","\n"];for(let e=0;e0&&(i-r)%4!=0;i--)n.includes(t[i])&&r--;const a=ts(t.substr(0,i));return t=t.substr(i),a}),(()=>ts(t)))}function is(e){return ns(e.replace(/-/g,"+").replace(/_/g,"/"))}function as(e,t){let r=rs(e).replace(/[\r\n]/g,"");return t&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r}Xo?(es=e=>Xo.from(e).toString("base64"),ts=e=>{const t=Xo.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}):(es=e=>btoa($o.uint8ArrayToString(e)),ts=e=>$o.stringToUint8Array(atob(e)));var os={preferredHashAlgorithm:Vo.hash.sha256,preferredSymmetricAlgorithm:Vo.symmetric.aes256,preferredCompressionAlgorithm:Vo.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:Vo.aead.eax,aeadChunkSizeByte:12,v5Keys:!1,s2kIterationCountByte:224,allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,checksumRequired:!1,minRSABits:2047,passwordCollisionCheck:!1,revocationsExpire:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([Vo.symmetric.aes128,Vo.symmetric.aes192,Vo.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,additionalAllowedPackets:[],showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.11.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([Vo.hash.md5,Vo.hash.ripemd]),rejectMessageHashAlgorithms:new Set([Vo.hash.md5,Vo.hash.ripemd,Vo.hash.sha1]),rejectPublicKeyAlgorithms:new Set([Vo.publicKey.elgamal,Vo.publicKey.dsa]),rejectCurves:new Set([Vo.curve.secp256k1])};function ss(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?Vo.armor.multipartSection:/MESSAGE, PART \d+/.test(t[1])?Vo.armor.multipartLast:/SIGNED MESSAGE/.test(t[1])?Vo.armor.signed:/MESSAGE/.test(t[1])?Vo.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?Vo.armor.publicKey:/PRIVATE KEY BLOCK/.test(t[1])?Vo.armor.privateKey:/SIGNATURE/.test(t[1])?Vo.armor.signature:void 0}function cs(e,t){let r="";return t.showVersion&&(r+="Version: "+t.versionString+"\n"),t.showComment&&(r+="Comment: "+t.commentString+"\n"),e&&(r+="Comment: "+e+"\n"),r+="\n",r}function us(e){return rs(function(e){let t=13501623;return Ko(e,(e=>{const r=ls?Math.floor(e.length/4):0,n=new Uint32Array(e.buffer,e.byteOffset,r);for(let e=0;e>24&255]^hs[1][t>>16&255]^hs[2][t>>8&255]^hs[3][t>>0&255];for(let n=4*r;n>8^hs[0][255&t^e[n]]}),(()=>new Uint8Array([t,t>>8,t>>16])))}(e))}const hs=[Array(255),Array(255),Array(255),Array(255)];for(let e=0;e<=255;e++){let t=e<<16;for(let e=0;e<8;e++)t=t<<1^(0!=(8388608&t)?8801531:0);hs[0][e]=(16711680&t)>>16|65280&t|(255&t)<<16}for(let e=0;e<=255;e++)hs[1][e]=hs[0][e]>>8^hs[0][255&hs[0][e]];for(let e=0;e<=255;e++)hs[2][e]=hs[1][e]>>8^hs[0][255&hs[1][e]];for(let e=0;e<=255;e++)hs[3][e]=hs[2][e]>>8^hs[0][255&hs[2][e]];const ls=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function fs(e){for(let t=0;t=0&&n!==e.length-1&&(t=e.slice(0,n),r=e.slice(n+1).substr(0,4)),{body:t,checksum:r}}function ps(e,t=os){return new Promise((async(r,n)=>{try{const i=/^-----[^-]+-----$/m,a=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let o;const s=[];let c,u,h,l=s,f=[],d=ns(Ho(e,(async(e,t)=>{const p=Ro(e);try{for(;;){let e=await p.readLine();if(void 0===e)throw Error("Misformed armored text");if(e=$o.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),o)if(c)u||2!==o||(i.test(e)?(f=f.join("\r\n"),u=!0,fs(l),l=[],c=!1):f.push(e.replace(/^- /,"")));else if(i.test(e)&&n(Error("Mandatory blank line missing between armor headers and armor data")),a.test(e)){if(fs(l),c=!0,u||2!==o){r({text:f,data:d,headers:s,type:o});break}}else l.push(e);else i.test(e)&&(o=ss(e))}}catch(e){return void n(e)}const g=Fo(t);try{for(;;){await g.ready;const{done:e,value:t}=await p.read();if(e)throw Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await p.readToEnd();e.length||(e=""),e=r+e,e=$o.removeTrailingSpaces(e.replace(/\r/g,""));const t=e.split(i);if(1===t.length)throw Error("Misformed armored text");const n=ds(t[0].slice(0,-1));h=n.checksum,await g.write(n.body);break}await g.write(r)}await g.ready,await g.close()}catch(e){await g.abort(e)}})));d=Ho(d,(async(e,r)=>{const n=zo(us(Lo(e)));n.catch((()=>{})),await To(e,r,{preventClose:!0});const i=Fo(r);try{const e=(await n).replace("\n","");if(h!==e&&(h||t.checksumRequired))throw Error("Ascii armor integrity check failed");await i.ready,await i.close()}catch(e){await i.abort(e)}}))}catch(e){n(e)}})).then((async e=>(fo(e.data)&&(e.data=await zo(e.data)),e)))}function gs(e,t,r,n,i,a=os){let o,s;e===Vo.armor.signed&&(o=t.text,s=t.hash,t=t.data);const c=Lo(t),u=[];switch(e){case Vo.armor.multipartSection:u.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+n+"-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP MESSAGE, PART "+r+"/"+n+"-----\n");break;case Vo.armor.multipartLast:u.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP MESSAGE, PART "+r+"-----\n");break;case Vo.armor.signed:u.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),u.push("Hash: "+s+"\n\n"),u.push(o.replace(/^-/gm,"- -")),u.push("\n-----BEGIN PGP SIGNATURE-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP SIGNATURE-----\n");break;case Vo.armor.message:u.push("-----BEGIN PGP MESSAGE-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP MESSAGE-----\n");break;case Vo.armor.publicKey:u.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case Vo.armor.privateKey:u.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case Vo.armor.signature:u.push("-----BEGIN PGP SIGNATURE-----\n"),u.push(cs(i,a)),u.push(rs(t)),u.push("=",us(c)),u.push("-----END PGP SIGNATURE-----\n")}return $o.concat(u)}class As{constructor(){this.bytes=""}read(e){return this.bytes=$o.uint8ArrayToString(e.subarray(0,8)),this.bytes.length}write(){return $o.stringToUint8Array(this.bytes)}toHex(){return $o.uint8ArrayToHex($o.stringToUint8Array(this.bytes))}equals(e,t=!1){return t&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(e){return e.toHex()}static fromID(e){const t=new As;return t.read($o.hexToUint8Array(e)),t}static wildcard(){const e=new As;return e.read(new Uint8Array(8)),e}}var ys=function(){var e,t,r=!1;function n(r,n){var i=e[(t[r]+t[n])%255];return 0!==r&&0!==n||(i=0),i}var i,a,o,s,c=!1;function u(){function u(r){var n,i,a;for(i=a=function(r){var n=e[255-t[r]];return 0===r&&(n=0),n}(r),n=0;n<4;n++)a^=i=255&(i<<1|i>>>7);return 99^a}r||function(){e=[],t=[];var n,i,a=1;for(n=0;n<255;n++)e[n]=a,i=128&a,a<<=1,a&=255,128===i&&(a^=27),a^=e[n],t[e[n]]=n;e[255]=e[0],t[0]=0,r=!0}(),i=[],a=[],o=[[],[],[],[]],s=[[],[],[],[]];for(var h=0;h<256;h++){var l=u(h);i[h]=l,a[l]=h,o[0][h]=n(2,l)<<24|l<<16|l<<8|n(3,l),s[0][l]=n(14,h)<<24|n(9,h)<<16|n(13,h)<<8|n(11,h);for(var f=1;f<4;f++)o[f][h]=o[f-1][h]>>>8|o[f-1][h]<<24,s[f][l]=s[f-1][l]>>>8|s[f-1][l]<<24}c=!0}var h=function(e,t){c||u();var r=new Uint32Array(t);r.set(i,512),r.set(a,768);for(var n=0;n<4;n++)r.set(o[n],4096+1024*n>>2),r.set(s[n],8192+1024*n>>2);var h=function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0;var B=new e.Uint32Array(r),C=new e.Uint8Array(r);function _(e,t,r,s,c,u,h,l){e=e|0;t=t|0;r=r|0;s=s|0;c=c|0;u=u|0;h=h|0;l=l|0;var f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;f=r|0x400,d=r|0x800,p=r|0xc00;c=c^B[(e|0)>>2],u=u^B[(e|4)>>2],h=h^B[(e|8)>>2],l=l^B[(e|12)>>2];for(b=16;(b|0)<=s<<4;b=b+16|0){g=B[(r|c>>22&1020)>>2]^B[(f|u>>14&1020)>>2]^B[(d|h>>6&1020)>>2]^B[(p|l<<2&1020)>>2]^B[(e|b|0)>>2],A=B[(r|u>>22&1020)>>2]^B[(f|h>>14&1020)>>2]^B[(d|l>>6&1020)>>2]^B[(p|c<<2&1020)>>2]^B[(e|b|4)>>2],y=B[(r|h>>22&1020)>>2]^B[(f|l>>14&1020)>>2]^B[(d|c>>6&1020)>>2]^B[(p|u<<2&1020)>>2]^B[(e|b|8)>>2],m=B[(r|l>>22&1020)>>2]^B[(f|c>>14&1020)>>2]^B[(d|u>>6&1020)>>2]^B[(p|h<<2&1020)>>2]^B[(e|b|12)>>2];c=g,u=A,h=y,l=m}n=B[(t|c>>22&1020)>>2]<<24^B[(t|u>>14&1020)>>2]<<16^B[(t|h>>6&1020)>>2]<<8^B[(t|l<<2&1020)>>2]^B[(e|b|0)>>2],i=B[(t|u>>22&1020)>>2]<<24^B[(t|h>>14&1020)>>2]<<16^B[(t|l>>6&1020)>>2]<<8^B[(t|c<<2&1020)>>2]^B[(e|b|4)>>2],a=B[(t|h>>22&1020)>>2]<<24^B[(t|l>>14&1020)>>2]<<16^B[(t|c>>6&1020)>>2]<<8^B[(t|u<<2&1020)>>2]^B[(e|b|8)>>2],o=B[(t|l>>22&1020)>>2]<<24^B[(t|c>>14&1020)>>2]<<16^B[(t|u>>6&1020)>>2]<<8^B[(t|h<<2&1020)>>2]^B[(e|b|12)>>2]}function k(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;_(0x0000,0x0800,0x1000,E,e,t,r,n)}function S(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var a=0;_(0x0400,0x0c00,0x2000,E,e,n,r,t);a=i,i=o,o=a}function Q(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s^e,c^t,u^r,h^l);s=n,c=i,u=a,h=o}function x(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;var f=0;_(0x0400,0x0c00,0x2000,E,e,l,r,t);f=i,i=o,o=f;n=n^s,i=i^c,a=a^u,o=o^h;s=e,c=t,u=r,h=l}function P(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n=n^e,c=i=i^t,u=a=a^r,h=o=o^l}function M(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);n=n^e,i=i^t,a=a^r,o=o^l;s=e,c=t,u=r,h=l}function U(e,t,r,l){e=e|0;t=t|0;r=r|0;l=l|0;_(0x0000,0x0800,0x1000,E,s,c,u,h);s=n,c=i,u=a,h=o;n=n^e,i=i^t,a=a^r,o=o^l}function D(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;_(0x0000,0x0800,0x1000,E,l,f,d,p);p=~m&p|m&p+1;d=~y&d|y&d+((p|0)==0);f=~A&f|A&f+((d|0)==0);l=~g&l|g&l+((f|0)==0);n=n^e;i=i^t;a=a^r;o=o^s}function R(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0;e=e^s,t=t^c,r=r^u,n=n^h;i=b|0,a=w|0,o=v|0,l=I|0;for(;(A|0)<128;A=A+1|0){if(i>>>31){f=f^e,d=d^t,p=p^r,g=g^n}i=i<<1|a>>>31,a=a<<1|o>>>31,o=o<<1|l>>>31,l=l<<1;y=n&1;n=n>>>1|r<<31,r=r>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(y)e=e^0xe1000000}s=f,c=d,u=p,h=g}function F(e){e=e|0;E=e}function T(e,t,r,s){e=e|0;t=t|0;r=r|0;s=s|0;n=e,i=t,a=r,o=s}function q(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;s=e,c=t,u=r,h=n}function O(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;l=e,f=t,d=r,p=n}function K(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;g=e,A=t,y=r,m=n}function H(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;p=~m&p|m&n,d=~y&d|y&r,f=~A&f|A&t,l=~g&l|g&e}function N(e){e=e|0;if(e&15)return-1;C[e|0]=n>>>24,C[e|1]=n>>>16&255,C[e|2]=n>>>8&255,C[e|3]=n&255,C[e|4]=i>>>24,C[e|5]=i>>>16&255,C[e|6]=i>>>8&255,C[e|7]=i&255,C[e|8]=a>>>24,C[e|9]=a>>>16&255,C[e|10]=a>>>8&255,C[e|11]=a&255,C[e|12]=o>>>24,C[e|13]=o>>>16&255,C[e|14]=o>>>8&255,C[e|15]=o&255;return 16}function L(e){e=e|0;if(e&15)return-1;C[e|0]=s>>>24,C[e|1]=s>>>16&255,C[e|2]=s>>>8&255,C[e|3]=s&255,C[e|4]=c>>>24,C[e|5]=c>>>16&255,C[e|6]=c>>>8&255,C[e|7]=c&255,C[e|8]=u>>>24,C[e|9]=u>>>16&255,C[e|10]=u>>>8&255,C[e|11]=u&255,C[e|12]=h>>>24,C[e|13]=h>>>16&255,C[e|14]=h>>>8&255,C[e|15]=h&255;return 16}function G(){k(0,0,0,0);b=n,w=i,v=a,I=o}function j(e,t,r){e=e|0;t=t|0;r=r|0;var s=0;if(t&15)return-1;while((r|0)>=16){W[e&7](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);C[t|0]=n>>>24,C[t|1]=n>>>16&255,C[t|2]=n>>>8&255,C[t|3]=n&255,C[t|4]=i>>>24,C[t|5]=i>>>16&255,C[t|6]=i>>>8&255,C[t|7]=i&255,C[t|8]=a>>>24,C[t|9]=a>>>16&255,C[t|10]=a>>>8&255,C[t|11]=a&255,C[t|12]=o>>>24,C[t|13]=o>>>16&255,C[t|14]=o>>>8&255,C[t|15]=o&255;s=s+16|0,t=t+16|0,r=r-16|0}return s|0}function z(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;if(t&15)return-1;while((r|0)>=16){Z[e&1](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);n=n+16|0,t=t+16|0,r=r-16|0}return n|0}var W=[k,S,Q,x,P,M,U,D];var Z=[Q,R];return{set_rounds:F,set_state:T,set_iv:q,set_nonce:O,set_mask:K,set_counter:H,get_state:N,get_iv:L,gcm_init:G,cipher:j,mac:z}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return h.set_key=function(e,t,n,a,o,c,u,l,f){var d=r.subarray(0,60),p=r.subarray(256,316);d.set([t,n,a,o,c,u,l,f]);for(var g=e,A=1;g<4*e+28;g++){var y=d[g-1];(g%e==0||8===e&&g%e==4)&&(y=i[y>>>24]<<24^i[y>>>16&255]<<16^i[y>>>8&255]<<8^i[255&y]),g%e==0&&(y=y<<8^y>>>24^A<<24,A=A<<1^(128&A?27:0)),d[g]=d[g-e]^y}for(var m=0;m=g-4?y:s[0][i[y>>>24]]^s[1][i[y>>>16&255]]^s[2][i[y>>>8&255]]^s[3][i[255&y]];h.set_rounds(e+5)},h};return h.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},h.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},h.MAC={CBC:0,GCM:1},h.HEAP_DATA=16384,h}();function ms(e){return e instanceof Uint8Array}function bs(e,t){const r=e?e.byteLength:t||65536;if(4095&r||r<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e||new Uint8Array(new ArrayBuffer(r))}function ws(e,t,r,n,i){const a=e.length-t,o=ae+t.length),0),r=new Uint8Array(t);let n=0;for(let t=0;t>2,i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12),n>16?i.getUint32(16):0,n>16?i.getUint32(20):0,n>24?i.getUint32(24):0,n>24?i.getUint32(28):0),void 0!==t){if(16!==t.length)throw new Es("illegal iv size");let e=new DataView(t.buffer,t.byteOffset,t.byteLength);r.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(e){if(!ms(e))throw new TypeError("data isn't of expected type");let{heap:t,asm:r}=this.acquire_asm(),n=ys.ENC[this.mode],i=ys.HEAP_DATA,a=this.pos,o=this.len,s=0,c=e.length||0,u=0,h=0,l=new Uint8Array(o+c&-16);for(;c>0;)h=ws(t,a+o,e,s,c),o+=h,s+=h,c-=h,h=r.cipher(n,i+a,o),h&&l.set(t.subarray(a,a+h),u),u+=h,h0;)f=ws(t,a+o,e,s,c),o+=f,s+=f,c-=f,f=r.cipher(n,i+a,o-(c?0:l)),f&&d.set(t.subarray(a,a+f),u),u+=f,f0){if(a%16){if(this.hasOwnProperty("padding"))throw new Es("data length must be a multiple of the block size");a+=16-a%16}if(t.cipher(r,n+i,a),this.hasOwnProperty("padding")&&this.padding){let t=e[i+o-1];if(t<1||t>16||t>o)throw new Bs("bad padding");let r=0;for(let n=t;n>1;n--)r|=t^e[i+o-n];if(r)throw new Bs("bad padding");o-=t}}const s=new Uint8Array(o);return o>0&&s.set(e.subarray(i,i+o)),this.pos=0,this.len=0,this.release_asm(),s}}class Ss{static encrypt(e,t,r=!1){return new Ss(t,r).encrypt(e)}static decrypt(e,t,r=!1){return new Ss(t,r).decrypt(e)}constructor(e,t=!1,r){this.aes=r||new ks(e,void 0,t,"ECB")}encrypt(e){return vs(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return vs(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function Qs(e){const t=function(e){const t=new Ss(e);this.encrypt=function(e){return t.encrypt(e)},this.decrypt=function(e){return t.decrypt(e)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function xs(e,t,r,n,i,a){const o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],c=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],d=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let p,g,A,y,m,b,w,v,I,E,B,C,_,k,S=0,Q=t.length;const x=32===e.length?3:9;v=3===x?r?[0,32,2]:[30,-2,-2]:r?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],r&&(t=function(e,t){const r=8-e.length%8;let n;if(2===t&&r<8)n=32;else if(1===t)n=r;else{if(t||!(r<8)){if(8===r)return e;throw Error("des: invalid padding")}n=0}const i=new Uint8Array(e.length+r);for(let t=0;t>>4^w),w^=A,b^=A<<4,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,b=b<<1|b>>>31,w=w<<1|w>>>31,g=0;g>>4|w<<28)^e[p+1],A=b,b=w,w=A^(s[y>>>24&63]|u[y>>>16&63]|l[y>>>8&63]|d[63&y]|o[m>>>24&63]|c[m>>>16&63]|h[m>>>8&63]|f[63&m]);A=b,b=w,w=A}b=b>>>1|b<<31,w=w>>>1|w<<31,A=1431655765&(b>>>1^w),w^=A,b^=A<<1,A=16711935&(w>>>8^b),b^=A,w^=A<<8,A=858993459&(w>>>2^b),b^=A,w^=A<<2,A=65535&(b>>>16^w),w^=A,b^=A<<16,A=252645135&(b>>>4^w),w^=A,b^=A<<4,1===n&&(r?(I=b,B=w):(b^=E,w^=C)),P[M++]=b>>>24,P[M++]=b>>>16&255,P[M++]=b>>>8&255,P[M++]=255&b,P[M++]=w>>>24,P[M++]=w>>>16&255,P[M++]=w>>>8&255,P[M++]=255&w}return r||(P=function(e,t){let r,n=null;if(2===t)r=32;else if(1===t)n=e[e.length-1];else{if(t)throw Error("des: invalid padding");r=0}if(!n){for(n=1;e[e.length-n]===r;)n++;n--}return e.subarray(0,e.length-n)}(P,a)),P}function Ps(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],s=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],l=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],f=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length>8?3:1,A=Array(32*g),y=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let m,b,w,v=0,I=0;for(let E=0;E>>4^E),E^=w,g^=w<<4,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=858993459&(g>>>2^E),E^=w,g^=w<<2,w=65535&(E>>>-16^g),g^=w,E^=w<<-16,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=16711935&(E>>>8^g),g^=w,E^=w<<8,w=1431655765&(g>>>1^E),E^=w,g^=w<<1,w=g<<8|E>>>20&240,g=E<<24|E<<8&16711680|E>>>8&65280|E>>>24&240,E=w;for(let e=0;e<16;e++)y[e]?(g=g<<2|g>>>26,E=E<<2|E>>>26):(g=g<<1|g>>>27,E=E<<1|E>>>27),g&=-15,E&=-15,m=t[g>>>28]|r[g>>>24&15]|n[g>>>20&15]|i[g>>>16&15]|a[g>>>12&15]|o[g>>>8&15]|s[g>>>4&15],b=c[E>>>28]|u[E>>>24&15]|h[E>>>20&15]|l[E>>>16&15]|f[E>>>12&15]|d[E>>>8&15]|p[E>>>4&15],w=65535&(b>>>16^m),A[I++]=m^w,A[I++]=b^w<<16}return A}function Ms(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(e){return xs(Ps(this.key[2]),xs(Ps(this.key[1]),xs(Ps(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function Us(){this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),e.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(let e=0;e<16;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>>16&255,t[a+6]=s>>>8&255,t[a+7]=255&s}return t},this.decrypt=function(e){const t=Array(e.length);for(let a=0;a>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=s>>>24&255,t[a+5]=s>>16&255,t[a+6]=s>>8&255,t[a+7]=255&s}return t};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function r(e,t,r){const n=t+e,i=n<>>32-r;return(a[0][i>>>24]^a[1][i>>>16&255])-a[2][i>>>8&255]+a[3][255&i]}function n(e,t,r){const n=t^e,i=n<>>32-r;return a[0][i>>>24]-a[1][i>>>16&255]+a[2][i>>>8&255]^a[3][255&i]}function i(e,t,r){const n=t-e,i=n<>>32-r;return(a[0][i>>>24]+a[1][i>>>16&255]^a[2][i>>>8&255])-a[3][255&i]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(r){const n=[,,,,,,,,],i=Array(32);let o;for(let e=0;e<4;e++)o=4*e,n[e]=r[o]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3];const s=[6,7,4,5];let c,u=0;for(let r=0;r<2;r++)for(let r=0;r<4;r++){for(o=0;o<4;o++){const t=e[r][o];c=n[t[1]],c^=a[4][n[t[2]>>>2]>>>24-8*(3&t[2])&255],c^=a[5][n[t[3]>>>2]>>>24-8*(3&t[3])&255],c^=a[6][n[t[4]>>>2]>>>24-8*(3&t[4])&255],c^=a[7][n[t[5]>>>2]>>>24-8*(3&t[5])&255],c^=a[s[o]][n[t[6]>>>2]>>>24-8*(3&t[6])&255],n[t[0]]=c}for(o=0;o<4;o++){const e=t[r][o];c=a[4][n[e[0]>>>2]>>>24-8*(3&e[0])&255],c^=a[5][n[e[1]>>>2]>>>24-8*(3&e[1])&255],c^=a[6][n[e[2]>>>2]>>>24-8*(3&e[2])&255],c^=a[7][n[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=a[4+o][n[e[4]>>>2]>>>24-8*(3&e[4])&255],i[u]=c,u++}}for(let e=0;e<16;e++)this.masking[e]=i[e],this.rotate[e]=31&i[16+e]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Ds(e){this.cast5=new Us,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}Ms.keySize=Ms.prototype.keySize=24,Ms.blockSize=Ms.prototype.blockSize=8,Ds.blockSize=Ds.prototype.blockSize=8,Ds.keySize=Ds.prototype.keySize=16;const Rs=4294967295;function Fs(e,t){return(e<>>32-t)&Rs}function Ts(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function qs(e,t,r){e.splice(t,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function Os(e,t){return e>>>8*t&255}function Ks(e){this.tf=function(){let e=null,t=null,r=-1,n=[],i=[[],[],[],[]];function a(e){return i[0][Os(e,0)]^i[1][Os(e,1)]^i[2][Os(e,2)]^i[3][Os(e,3)]}function o(e){return i[0][Os(e,3)]^i[1][Os(e,0)]^i[2][Os(e,1)]^i[3][Os(e,2)]}function s(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Fs(t[2]^r+i+n[4*e+8]&Rs,31),t[3]=Fs(t[3],1)^r+2*i+n[4*e+9]&Rs,r=a(t[2]),i=o(t[3]),t[0]=Fs(t[0]^r+i+n[4*e+10]&Rs,31),t[1]=Fs(t[1],1)^r+2*i+n[4*e+11]&Rs}function c(e,t){let r=a(t[0]),i=o(t[1]);t[2]=Fs(t[2],1)^r+i+n[4*e+10]&Rs,t[3]=Fs(t[3]^r+2*i+n[4*e+11]&Rs,31),r=a(t[2]),i=o(t[3]),t[0]=Fs(t[0],1)^r+i+n[4*e+8]&Rs,t[1]=Fs(t[1]^r+2*i+n[4*e+9]&Rs,31)}return{name:"twofish",blocksize:16,open:function(t){let r,a,o,s,c;e=t;const u=[],h=[],l=[];let f;const d=[];let p,g,A;const y=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],m=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],b=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],w=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],v=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],I=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],E=[[],[]],B=[[],[],[],[]];function C(e){return e^e>>2^[0,90,180,238][3&e]}function _(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function k(e,t){let r,n,i;for(r=0;r<8;r++)n=t>>>24,t=t<<8&Rs|e>>>24,e=e<<8&Rs,i=n<<1,128&n&&(i^=333),t^=n^i<<16,i^=n>>>1,1&n&&(i^=166),t^=i<<24|i<<8;return t}function S(e,t){const r=t>>4,n=15&t,i=y[e][r^n],a=m[e][v[n]^I[r]];return w[e][v[a]^I[i]]<<4|b[e][i^a]}function Q(e,t){let r=Os(e,0),n=Os(e,1),i=Os(e,2),a=Os(e,3);switch(f){case 4:r=E[1][r]^Os(t[3],0),n=E[0][n]^Os(t[3],1),i=E[0][i]^Os(t[3],2),a=E[1][a]^Os(t[3],3);case 3:r=E[1][r]^Os(t[2],0),n=E[1][n]^Os(t[2],1),i=E[0][i]^Os(t[2],2),a=E[0][a]^Os(t[2],3);case 2:r=E[0][E[0][r]^Os(t[1],0)]^Os(t[0],0),n=E[0][E[1][n]^Os(t[1],1)]^Os(t[0],1),i=E[1][E[0][i]^Os(t[1],2)]^Os(t[0],2),a=E[1][E[1][a]^Os(t[1],3)]^Os(t[0],3)}return B[0][r]^B[1][n]^B[2][i]^B[3][a]}for(e=e.slice(0,32),r=e.length;16!==r&&24!==r&&32!==r;)e[r++]=0;for(r=0;r>2]=Ts(e,r);for(r=0;r<256;r++)E[0][r]=S(0,r),E[1][r]=S(1,r);for(r=0;r<256;r++)p=E[1][r],g=C(p),A=_(p),B[0][r]=p+(g<<8)+(A<<16)+(A<<24),B[2][r]=g+(A<<8)+(p<<16)+(A<<24),p=E[0][r],g=C(p),A=_(p),B[1][r]=A+(A<<8)+(g<<16)+(p<<24),B[3][r]=g+(p<<8)+(A<<16)+(g<<24);for(f=l.length/2,r=0;r=0;e--)c(e,a);qs(t,r,a[2]^n[0]),qs(t,r+4,a[3]^n[1]),qs(t,r+8,a[0]^n[2]),qs(t,r+12,a[1]^n[3]),r+=16},finalize:function(){return t}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}function Hs(){}function Ns(e){this.bf=new Hs,this.bf.init(e),this.encrypt=function(e){return this.bf.encryptBlock(e)}}Ks.keySize=Ks.prototype.keySize=32,Ks.blockSize=Ks.prototype.blockSize=16,Hs.prototype.BLOCKSIZE=8,Hs.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Hs.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Hs.prototype.NN=16,Hs.prototype._clean=function(e){return e<0&&(e=2147483648+(2147483647&e)),e},Hs.prototype._F=function(e){let t;const r=255&e,n=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][n],t+=this.sboxes[3][r],t},Hs.prototype._encryptBlock=function(e){let t,r=e[0],n=e[1];for(t=0;t>>24-8*t&255,i[t+n]=r[1]>>>24-8*t&255;return i},Hs.prototype._decryptBlock=function(e){let t,r=e[0],n=e[1];for(t=this.NN+1;t>1;--t){r^=this.parray[t],n=this._F(r)^n;const e=r;r=n,n=e}r^=this.parray[1],n^=this.parray[0],e[0]=this._clean(n),e[1]=this._clean(r)},Hs.prototype.init=function(e){let t,r=0;for(this.parray=[],t=0;t=e.length&&(r=0);this.parray[t]=this.PARRAY[t]^n}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],r=0;r<256;++r)this.sboxes[t][r]=this.SBOXES[t][r];const n=[0,0];for(t=0;t>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=t+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=r+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=c+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=u+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=h+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=l+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=f+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=d+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=p+(v<<5|v>>>27)+C+(I&E|~I&B)+0x5a827999|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;k=g+(v<<5|v>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;v=k;_=Me^ke^ve^be;Re=_<<1|_>>>31;k=Re+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;_=Ue^Se^Ie^we;Fe=_<<1|_>>>31;k=Fe+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;_=De^Qe^Ee^ve;Te=_<<1|_>>>31;k=Te+(v<<5|v>>>27)+C+(I^E^B)-0x359d3e2a|0;C=B;B=E;E=I<<30|I>>>2;I=v;v=k;n=n+v|0;i=i+I|0;a=a+E|0;o=o+B|0;s=s+C|0}function I(e){e=e|0;v(w[e|0]<<24|w[e|1]<<16|w[e|2]<<8|w[e|3],w[e|4]<<24|w[e|5]<<16|w[e|6]<<8|w[e|7],w[e|8]<<24|w[e|9]<<16|w[e|10]<<8|w[e|11],w[e|12]<<24|w[e|13]<<16|w[e|14]<<8|w[e|15],w[e|16]<<24|w[e|17]<<16|w[e|18]<<8|w[e|19],w[e|20]<<24|w[e|21]<<16|w[e|22]<<8|w[e|23],w[e|24]<<24|w[e|25]<<16|w[e|26]<<8|w[e|27],w[e|28]<<24|w[e|29]<<16|w[e|30]<<8|w[e|31],w[e|32]<<24|w[e|33]<<16|w[e|34]<<8|w[e|35],w[e|36]<<24|w[e|37]<<16|w[e|38]<<8|w[e|39],w[e|40]<<24|w[e|41]<<16|w[e|42]<<8|w[e|43],w[e|44]<<24|w[e|45]<<16|w[e|46]<<8|w[e|47],w[e|48]<<24|w[e|49]<<16|w[e|50]<<8|w[e|51],w[e|52]<<24|w[e|53]<<16|w[e|54]<<8|w[e|55],w[e|56]<<24|w[e|57]<<16|w[e|58]<<8|w[e|59],w[e|60]<<24|w[e|61]<<16|w[e|62]<<8|w[e|63])}function E(e){e=e|0;w[e|0]=n>>>24;w[e|1]=n>>>16&255;w[e|2]=n>>>8&255;w[e|3]=n&255;w[e|4]=i>>>24;w[e|5]=i>>>16&255;w[e|6]=i>>>8&255;w[e|7]=i&255;w[e|8]=a>>>24;w[e|9]=a>>>16&255;w[e|10]=a>>>8&255;w[e|11]=a&255;w[e|12]=o>>>24;w[e|13]=o>>>16&255;w[e|14]=o>>>8&255;w[e|15]=o&255;w[e|16]=s>>>24;w[e|17]=s>>>16&255;w[e|18]=s>>>8&255;w[e|19]=s&255}function B(){n=0x67452301;i=0xefcdab89;a=0x98badcfe;o=0x10325476;s=0xc3d2e1f0;c=u=0}function C(e,t,r,h,l,f,d){e=e|0;t=t|0;r=r|0;h=h|0;l=l|0;f=f|0;d=d|0;n=e;i=t;a=r;o=h;s=l;c=f;u=d}function _(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){I(e);e=e+64|0;t=t-64|0;r=r+64|0}c=c+r|0;if(c>>>0>>0)u=u+1|0;return r|0}function k(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=_(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;c=c+t|0;if(c>>>0>>0)u=u+1|0;w[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)w[e|i]=0x00;I(e);t=0;w[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)w[e|i]=0;w[e|56]=u>>>21&255;w[e|57]=u>>>13&255;w[e|58]=u>>>5&255;w[e|59]=u<<3&255|c>>>29;w[e|60]=c>>>21&255;w[e|61]=c>>>13&255;w[e|62]=c>>>5&255;w[e|63]=c<<3&255;I(e);if(~r)E(r);return n|0}function S(){n=h;i=l;a=f;o=d;s=p;c=64;u=0}function Q(){n=g;i=A;a=y;o=m;s=b;c=64;u=0}function x(e,t,r,w,I,E,C,_,k,S,Q,x,P,M,U,D){e=e|0;t=t|0;r=r|0;w=w|0;I=I|0;E=E|0;C=C|0;_=_|0;k=k|0;S=S|0;Q=Q|0;x=x|0;P=P|0;M=M|0;U=U|0;D=D|0;B();v(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,w^0x5c5c5c5c,I^0x5c5c5c5c,E^0x5c5c5c5c,C^0x5c5c5c5c,_^0x5c5c5c5c,k^0x5c5c5c5c,S^0x5c5c5c5c,Q^0x5c5c5c5c,x^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,U^0x5c5c5c5c,D^0x5c5c5c5c);g=n;A=i;y=a;m=o;b=s;B();v(e^0x36363636,t^0x36363636,r^0x36363636,w^0x36363636,I^0x36363636,E^0x36363636,C^0x36363636,_^0x36363636,k^0x36363636,S^0x36363636,Q^0x36363636,x^0x36363636,P^0x36363636,M^0x36363636,U^0x36363636,D^0x36363636);h=n;l=i;f=a;d=o;p=s;c=64;u=0}function P(e,t,r){e=e|0;t=t|0;r=r|0;var c=0,u=0,h=0,l=0,f=0,d=0;if(e&63)return-1;if(~r)if(r&31)return-1;d=k(e,t,-1)|0;c=n,u=i,h=a,l=o,f=s;Q();v(c,u,h,l,f,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~r)E(r);return d|0}function M(e,t,r,c,u){e=e|0;t=t|0;r=r|0;c=c|0;u=u|0;var h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~u)if(u&31)return-1;w[e+t|0]=r>>>24;w[e+t+1|0]=r>>>16&255;w[e+t+2|0]=r>>>8&255;w[e+t+3|0]=r&255;P(e,t+4|0,-1)|0;h=g=n,l=A=i,f=y=a,d=m=o,p=b=s;c=c-1|0;while((c|0)>0){S();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;Q();v(g,A,y,m,b,0x80000000,0,0,0,0,0,0,0,0,0,672);g=n,A=i,y=a,m=o,b=s;h=h^n;l=l^i;f=f^a;d=d^o;p=p^s;c=c-1|0}n=h;i=l;a=f;o=d;s=p;if(~u)E(u);return 0}return{reset:B,init:C,process:_,finish:k,hmac_reset:S,hmac_init:x,hmac_finish:P,pbkdf2_generate_block:M}};class Zs{constructor(){this.pos=0,this.len=0}reset(){const{asm:e}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,e.reset(),this}process(e){if(null!==this.result)throw new Is("state must be reset before processing new data");const{asm:t,heap:r}=this.acquire_asm();let n=this.pos,i=this.len,a=0,o=e.length,s=0;for(;o>0;)s=ws(r,n+i,e,a,o),i+=s,a+=s,o-=s,s=t.process(n,i),n+=s,i-=s,i||(n=0);return this.pos=n,this.len=i,this}finish(){if(null!==this.result)throw new Is("state must be reset before processing new data");const{asm:e,heap:t}=this.acquire_asm();return e.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(t.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const Js=[],Vs=[];class Ys extends Zs{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Js.pop()||bs(),this.asm=Vs.pop()||Ws({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Js.push(this.heap),Vs.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new Ys).process(e).finish().result}}Ys.NAME="sha1",Ys.heap_pool=[],Ys.asm_pool=[],Ys.asm_function=Ws;const $s=[],Xs=[];class ec extends Zs{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=$s.pop()||bs(),this.asm=Xs.pop()||function(e,t,r){"use asm";var n=0,i=0,a=0,o=0,s=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0,Q=new e.Uint8Array(r);function x(e,t,r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24|Q[e|57]<<16|Q[e|58]<<8|Q[e|59],Q[e|60]<<24|Q[e|61]<<16|Q[e|62]<<8|Q[e|63])}function M(e){e=e|0;Q[e|0]=n>>>24;Q[e|1]=n>>>16&255;Q[e|2]=n>>>8&255;Q[e|3]=n&255;Q[e|4]=i>>>24;Q[e|5]=i>>>16&255;Q[e|6]=i>>>8&255;Q[e|7]=i&255;Q[e|8]=a>>>24;Q[e|9]=a>>>16&255;Q[e|10]=a>>>8&255;Q[e|11]=a&255;Q[e|12]=o>>>24;Q[e|13]=o>>>16&255;Q[e|14]=o>>>8&255;Q[e|15]=o&255;Q[e|16]=s>>>24;Q[e|17]=s>>>16&255;Q[e|18]=s>>>8&255;Q[e|19]=s&255;Q[e|20]=c>>>24;Q[e|21]=c>>>16&255;Q[e|22]=c>>>8&255;Q[e|23]=c&255;Q[e|24]=u>>>24;Q[e|25]=u>>>16&255;Q[e|26]=u>>>8&255;Q[e|27]=u&255;Q[e|28]=h>>>24;Q[e|29]=h>>>16&255;Q[e|30]=h>>>8&255;Q[e|31]=h&255}function U(){n=0x6a09e667;i=0xbb67ae85;a=0x3c6ef372;o=0xa54ff53a;s=0x510e527f;c=0x9b05688c;u=0x1f83d9ab;h=0x5be0cd19;l=f=0}function D(e,t,r,d,p,g,A,y,m,b){e=e|0;t=t|0;r=r|0;d=d|0;p=p|0;g=g|0;A=A|0;y=y|0;m=m|0;b=b|0;n=e;i=t;a=r;o=d;s=p;c=g;u=A;h=y;l=m;f=b}function R(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){P(e);e=e+64|0;t=t-64|0;r=r+64|0}l=l+r|0;if(l>>>0>>0)f=f+1|0;return r|0}function F(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=R(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;l=l+t|0;if(l>>>0>>0)f=f+1|0;Q[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)Q[e|i]=0x00;P(e);t=0;Q[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)Q[e|i]=0;Q[e|56]=f>>>21&255;Q[e|57]=f>>>13&255;Q[e|58]=f>>>5&255;Q[e|59]=f<<3&255|l>>>29;Q[e|60]=l>>>21&255;Q[e|61]=l>>>13&255;Q[e|62]=l>>>5&255;Q[e|63]=l<<3&255;P(e);if(~r)M(r);return n|0}function T(){n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;l=64;f=0}function q(){n=v;i=I;a=E;o=B;s=C;c=_;u=k;h=S;l=64;f=0}function O(e,t,r,Q,P,M,D,R,F,T,q,O,K,H,N,L){e=e|0;t=t|0;r=r|0;Q=Q|0;P=P|0;M=M|0;D=D|0;R=R|0;F=F|0;T=T|0;q=q|0;O=O|0;K=K|0;H=H|0;N=N|0;L=L|0;U();x(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,Q^0x5c5c5c5c,P^0x5c5c5c5c,M^0x5c5c5c5c,D^0x5c5c5c5c,R^0x5c5c5c5c,F^0x5c5c5c5c,T^0x5c5c5c5c,q^0x5c5c5c5c,O^0x5c5c5c5c,K^0x5c5c5c5c,H^0x5c5c5c5c,N^0x5c5c5c5c,L^0x5c5c5c5c);v=n;I=i;E=a;B=o;C=s;_=c;k=u;S=h;U();x(e^0x36363636,t^0x36363636,r^0x36363636,Q^0x36363636,P^0x36363636,M^0x36363636,D^0x36363636,R^0x36363636,F^0x36363636,T^0x36363636,q^0x36363636,O^0x36363636,K^0x36363636,H^0x36363636,N^0x36363636,L^0x36363636);d=n;p=i;g=a;A=o;y=s;m=c;b=u;w=h;l=64;f=0}function K(e,t,r){e=e|0;t=t|0;r=r|0;var l=0,f=0,d=0,p=0,g=0,A=0,y=0,m=0,b=0;if(e&63)return-1;if(~r)if(r&31)return-1;b=F(e,t,-1)|0;l=n,f=i,d=a,p=o,g=s,A=c,y=u,m=h;q();x(l,f,d,p,g,A,y,m,0x80000000,0,0,0,0,0,0,768);if(~r)M(r);return b|0}function H(e,t,r,l,f){e=e|0;t=t|0;r=r|0;l=l|0;f=f|0;var d=0,p=0,g=0,A=0,y=0,m=0,b=0,w=0,v=0,I=0,E=0,B=0,C=0,_=0,k=0,S=0;if(e&63)return-1;if(~f)if(f&31)return-1;Q[e+t|0]=r>>>24;Q[e+t+1|0]=r>>>16&255;Q[e+t+2|0]=r>>>8&255;Q[e+t+3|0]=r&255;K(e,t+4|0,-1)|0;d=v=n,p=I=i,g=E=a,A=B=o,y=C=s,m=_=c,b=k=u,w=S=h;l=l-1|0;while((l|0)>0){T();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;q();x(v,I,E,B,C,_,k,S,0x80000000,0,0,0,0,0,0,768);v=n,I=i,E=a,B=o,C=s,_=c,k=u,S=h;d=d^n;p=p^i;g=g^a;A=A^o;y=y^s;m=m^c;b=b^u;w=w^h;l=l-1|0}n=d;i=p;a=g;o=A;s=y;c=m;u=b;h=w;if(~f)M(f);return 0}return{reset:U,init:D,process:R,finish:F,hmac_reset:T,hmac_init:O,hmac_finish:K,pbkdf2_generate_block:H}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&($s.push(this.heap),Xs.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new ec).process(e).finish().result}}ec.NAME="sha256";var tc=rc;function rc(e,t){if(!e)throw Error(t||"Assertion failed")}rc.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var nc=void 0!==oo?oo:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ic(e,t){return e(t={exports:{}},t.exports),t.exports}function ac(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var oc=ic((function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}));function sc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function cc(e){return 1===e.length?"0"+e:e}function uc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var hc={inherits:oc,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return a},split32:function(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,n){return e+t+r+n>>>0},sum32_5:function(e,t,r,n,i){return e+t+r+n+i>>>0},sum64:function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},sum64_hi:function(e,t,r,n){return(t+n>>>0>>0},sum64_lo:function(e,t,r,n){return t+n>>>0},sum64_4_hi:function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},sum64_5_hi:function(e,t,r,n,i,a,o,s,c,u){var h=0,l=t;return h+=(l=l+n>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function lc(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var fc=lc;lc.prototype.update=function(e,t){if(e=hc.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=hc.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a>>3},Bc=function(e){return pc(e,17)^pc(e,19)^e>>>10},Cc=hc.sum32,_c=hc.sum32_4,kc=hc.sum32_5,Sc=bc,Qc=wc,xc=vc,Pc=Ic,Mc=Ec,Uc=Bc,Dc=dc.BlockHash,Rc=[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];function Fc(){if(!(this instanceof Fc))return new Fc;Dc.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Rc,this.W=Array(64)}hc.inherits(Fc,Dc);var Tc=Fc;function qc(){if(!(this instanceof qc))return new qc;Tc.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Fc.blockSize=512,Fc.outSize=256,Fc.hmacStrength=192,Fc.padLength=64,Fc.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>>32-i,r)}function Mu(e,t,r,n,i,a,o){return Pu(t&r|~t&n,e,t,i,a,o)}function Uu(e,t,r,n,i,a,o){return Pu(t&n|r&~n,e,t,i,a,o)}function Du(e,t,r,n,i,a,o){return Pu(t^r^n,e,t,i,a,o)}function Ru(e,t,r,n,i,a,o){return Pu(r^(t|~n),e,t,i,a,o)}function Fu(e){const t=[];let r;for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}const Tu="0123456789abcdef".split("");function qu(e){let t="",r=0;for(;r<4;r++)t+=Tu[e>>8*r+4&15]+Tu[e>>8*r&15];return t}function Ou(e,t){return e+t&4294967295}const Ku=$o.getWebCrypto(),Hu=$o.getNodeCrypto(),Nu=Hu&&Hu.getHashes();function Lu(e){if(Hu&&Nu.includes(e))return async function(t){const r=Hu.createHash(e);return Ko(t,(e=>{r.update(e)}),(()=>new Uint8Array(r.digest())))}}function Gu(e,t){return async function(r,n=os){if(fo(r)&&(r=await zo(r)),!$o.isStream(r)&&Ku&&t&&r.length>=n.minBytesForWebCrypto)return new Uint8Array(await Ku.digest(t,r));const i=e();return Ko(r,(e=>{i.update(e)}),(()=>new Uint8Array(i.digest())))}}function ju(e,t){return async function(r,n=os){if(fo(r)&&(r=await zo(r)),$o.isStream(r)){const t=new e;return Ko(r,(e=>{t.process(e)}),(()=>t.finish().result))}return Ku&&t&&r.length>=n.minBytesForWebCrypto?new Uint8Array(await Ku.digest(t,r)):e.bytes(r)}}const zu={md5:Lu("md5")||async function(e){const t=function(e){const t=e.length,r=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)xu(r,Fu(e.substring(n-64,n)));e=e.substring(n-64);const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n>2]|=e.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(xu(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*t,xu(r,i),r}($o.uint8ArrayToString(e));return $o.hexToUint8Array(function(e){for(let t=0;tnew Uint8Array(a.update(e))))}(e,t,r,n);if($o.isAES(e))return function(e,t,r,n,i){if($o.getWebCrypto()&&24!==t.length&&!$o.isStream(r)&&r.length>=3e3*i.minBytesForWebCrypto)return async function(e,t,r,n){const i="AES-CBC",a=await Vu.importKey("raw",t,{name:i},!1,["encrypt"]),{blockSize:o}=Ju(e),s=$o.concatUint8Array([new Uint8Array(o),r]),c=new Uint8Array(await Vu.encrypt({name:i,iv:n},a,s)).subarray(0,r.length);return function(e,t){for(let r=0;ra.aes.AES_Encrypt_process(e)),(()=>a.aes.AES_Encrypt_finish()))}(e,t,r,n,i);const o=new(Ju(e))(t),s=o.blockSize,c=n.slice();let u=new Uint8Array;const h=e=>{e&&(u=$o.concatUint8Array([u,e]));const t=new Uint8Array(u.length);let r,n=0;for(;e?u.length>=s:u.length;){const e=o.encrypt(c);for(r=0;rnew Uint8Array(a.update(e))))}(e,t,r,n);if($o.isAES(e))return function(e,t,r,n){if($o.isStream(r)){const e=new Zu(t,n);return Ko(r,(t=>e.aes.AES_Decrypt_process(t)),(()=>e.aes.AES_Decrypt_finish()))}return Zu.decrypt(r,t,n)}(0,t,r,n);const a=new(Ju(e))(t),o=a.blockSize;let s=n,c=new Uint8Array;const u=e=>{e&&(c=$o.concatUint8Array([c,e]));const t=new Uint8Array(c.length);let r,n=0;for(;e?c.length>=o:c.length;){const e=a.encrypt(s);for(s=c.subarray(0,o),r=0;r48)throw new Es("illegal counter size");let e=Math.pow(2,r)-1;n.set_mask(0,0,e/4294967296|0,0|e)}else r=48,n.set_mask(0,0,65535,4294967295);if(void 0===e)throw Error("nonce is required");{let t=e.length;if(!t||t>16)throw new Es("illegal nonce size");let r=new DataView(new ArrayBuffer(16));new Uint8Array(r.buffer).set(e),n.set_nonce(r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12))}if(void 0!==t){if(t<0||t>=Math.pow(2,r))throw new Es("illegal counter value");n.set_counter(0,0,t/4294967296|0,0|t)}}}class rh{static encrypt(e,t,r=!0,n){return new rh(t,n,r).encrypt(e)}static decrypt(e,t,r=!0,n){return new rh(t,n,r).decrypt(e)}constructor(e,t,r=!0,n){this.aes=n||new ks(e,t,r,"CBC")}encrypt(e){return vs(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return vs(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}const nh=$o.getWebCrypto(),ih=$o.getNodeCrypto(),ah=16;function oh(e,t){const r=e.length-ah;for(let n=0;n>3),17+(u>>3)),8-(7&u)).subarray(1),d=new Uint8Array(wh),p=new Uint8Array(t.length+vh);let g,A=0;for(g=0;g16)throw new Es("illegal tagSize value");const s=t.length||0,c=new Uint8Array(16);12!==s?(this._gcm_mac_process(t),o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=s>>>29,o[12]=s>>>21&255,o[13]=s>>>13&255,o[14]=s>>>5&255,o[15]=s<<3&255,a.mac(ys.MAC.GCM,ys.HEAP_DATA,16),a.get_iv(ys.HEAP_DATA),a.set_iv(0,0,0,0),c.set(o.subarray(0,16))):(c.set(t),c[15]=1);const u=new DataView(c.buffer);if(this.gamma0=u.getUint32(12),a.set_nonce(u.getUint32(0),u.getUint32(4),u.getUint32(8),0),a.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>Sh)throw new Es("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");a.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(e,t,r,n,i){return new Qh(t,r,n,i).encrypt(e)}static decrypt(e,t,r,n,i){return new Qh(t,r,n,i).decrypt(e)}encrypt(e){return this.AES_GCM_encrypt(e)}decrypt(e){return this.AES_GCM_decrypt(e)}AES_GCM_Encrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.aes.pos,s=this.aes.len,c=0,u=s+r&-16,h=0;if((a-1<<4)+s+r>Sh)throw new RangeError("counter overflow");const l=new Uint8Array(u);for(;r>0;)h=ws(i,o+s,e,t,r),s+=h,t+=h,r-=h,h=n.cipher(ys.ENC.CTR,ys.HEAP_DATA+o,s),h=n.mac(ys.MAC.GCM,ys.HEAP_DATA+o,h),h&&l.set(i.subarray(o,o+h),c),a+=h>>>4,c+=h,h>>29,t[4]=u>>>21,t[5]=u>>>13&255,t[6]=u>>>5&255,t[7]=u<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(ys.MAC.GCM,ys.HEAP_DATA,16),e.get_iv(ys.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ys.ENC.CTR,ys.HEAP_DATA,16),s.set(t.subarray(0,n),o),this.counter=1,this.aes.pos=0,this.aes.len=0,s}AES_GCM_Decrypt_process(e){let t=0,r=e.length||0,{asm:n,heap:i}=this.aes.acquire_asm(),a=this.counter,o=this.tagSize,s=this.aes.pos,c=this.aes.len,u=0,h=c+r>o?c+r-o&-16:0,l=c+r-h,f=0;if((a-1<<4)+c+r>Sh)throw new RangeError("counter overflow");const d=new Uint8Array(h);for(;r>l;)f=ws(i,s+c,e,t,r-l),c+=f,t+=f,r-=f,f=n.mac(ys.MAC.GCM,ys.HEAP_DATA+s,f),f=n.cipher(ys.DEC.CTR,ys.HEAP_DATA+s,f),f&&d.set(i.subarray(s,s+f),u),a+=f>>>4,u+=f,s=0,c=0;return r>0&&(c+=ws(i,0,e,t,r)),this.counter=a,this.aes.pos=s,this.aes.len=c,d}AES_GCM_Decrypt_finish(){let{asm:e,heap:t}=this.aes.acquire_asm(),r=this.tagSize,n=this.adata,i=this.counter,a=this.aes.pos,o=this.aes.len,s=o-r;if(o>>29,t[4]=l>>>21,t[5]=l>>>13&255,t[6]=l>>>5&255,t[7]=l<<3&255,t[8]=t[9]=t[10]=0,t[11]=f>>>29,t[12]=f>>>21&255,t[13]=f>>>13&255,t[14]=f>>>5&255,t[15]=f<<3&255,e.mac(ys.MAC.GCM,ys.HEAP_DATA,16),e.get_iv(ys.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(ys.ENC.CTR,ys.HEAP_DATA,16);let d=0;for(let e=0;e0;){for(a=ws(r,0,e,n,i),n+=a,i-=a;15&a;)r[a++]=0;t.mac(ys.MAC.GCM,ys.HEAP_DATA,a)}}}const xh=$o.getWebCrypto(),Ph=$o.getNodeCrypto(),Mh=$o.getNodeBuffer(),Uh=16,Dh="AES-GCM";async function Rh(e,t){if(e!==Vo.symmetric.aes128&&e!==Vo.symmetric.aes192&&e!==Vo.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if($o.getNodeCrypto())return{encrypt:async function(e,r,n=new Uint8Array){const i=new Ph.createCipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n);const a=Mh.concat([i.update(e),i.final(),i.getAuthTag()]);return new Uint8Array(a)},decrypt:async function(e,r,n=new Uint8Array){const i=new Ph.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n),i.setAuthTag(e.slice(e.length-Uh,e.length));const a=Mh.concat([i.update(e.slice(0,e.length-Uh)),i.final()]);return new Uint8Array(a)}};if($o.getWebCrypto()&&24!==t.length){const e=await xh.importKey("raw",t,{name:Dh},!1,["encrypt","decrypt"]);return{encrypt:async function(r,n,i=new Uint8Array){if(!r.length)return Qh.encrypt(r,t,n,i);const a=await xh.encrypt({name:Dh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)},decrypt:async function(r,n,i=new Uint8Array){if(r.length===Uh)return Qh.decrypt(r,t,n,i);const a=await xh.decrypt({name:Dh,iv:n,additionalData:i,tagLength:128},e,r);return new Uint8Array(a)}}}return{encrypt:async function(e,r,n){return Qh.encrypt(e,t,r,n)},decrypt:async function(e,r,n){return Qh.decrypt(e,t,r,n)}}}Rh.getNonce=function(e,t){const r=e.slice();for(let e=0;e>>8)-1}(e,t,r,n)}function d(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function p(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function g(e,t,r){for(var n,i=~(r-1),a=0;a<16;a++)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function A(e,r){var n,i,a,o=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(p(s),p(s),p(s),i=0;i<2;i++){for(o[0]=s[0]-65517,n=1;n<15;n++)o[n]=s[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,g(s,o,1-a)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function y(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return A(r,e),A(n,t),f(r,0,n,0)}function m(e){var t=new Uint8Array(32);return A(t,e),1&t[0]}function b(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}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=n*N,_+=n*L,k+=n*G,S+=n*j,Q+=n*z,x+=n*W,P+=n*Z,M+=n*J,U+=n*V,D+=n*Y,w+=(n=t[15])*F,o+=38*(I+=n*q),s+=38*(E+=n*O),c+=38*(B+=n*K),u+=38*(C+=n*H),h+=38*(_+=n*N),l+=38*(k+=n*L),f+=38*(S+=n*G),d+=38*(Q+=n*j),p+=38*(x+=n*z),g+=38*(P+=n*W),A+=38*(M+=n*Z),y+=38*(U+=n*J),m+=38*(D+=n*V),b+=38*(R+=n*Y),a=(n=(a+=38*(v+=n*T))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=h,e[6]=l,e[7]=f,e[8]=d,e[9]=p,e[10]=g,e[11]=A,e[12]=y,e[13]=m,e[14]=b,e[15]=w}function E(e,t){I(e,t,t)}function B(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)E(i,i),2!==n&&4!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function C(e,r,n){var i,a,s=new Uint8Array(32),c=new Float64Array(80),u=t(),h=t(),l=t(),f=t(),d=t(),p=t();for(a=0;a<31;a++)s[a]=r[a];for(s[31]=127&r[31]|64,s[0]&=248,b(c,n),a=0;a<16;a++)h[a]=c[a],f[a]=u[a]=l[a]=0;for(u[0]=f[0]=1,a=254;a>=0;--a)g(u,h,i=s[a>>>3]>>>(7&a)&1),g(l,f,i),w(d,u,l),v(u,u,l),w(l,h,f),v(h,h,f),E(f,d),E(p,u),I(u,l,u),I(l,h,d),w(d,u,l),v(u,u,l),E(h,u),v(l,f,p),I(u,l,o),w(u,u,f),I(l,l,u),I(u,f,p),I(f,h,c),E(h,d),g(u,h,i),g(l,f,i);for(a=0;a<16;a++)c[a+16]=u[a],c[a+32]=l[a],c[a+48]=h[a],c[a+64]=f[a];var y=c.subarray(32),m=c.subarray(16);return B(y,y),I(m,m,y),A(e,m),0}function _(e,t){return C(e,t,n)}function k(e,r){var n=t(),i=t(),a=t(),o=t(),s=t(),u=t(),h=t(),l=t(),f=t();v(n,e[1],e[0]),v(f,r[1],r[0]),I(n,n,f),w(i,e[0],e[1]),w(f,r[0],r[1]),I(i,i,f),I(a,e[3],r[3]),I(a,a,c),I(o,e[2],r[2]),w(o,o,o),v(s,i,n),v(u,o,a),w(h,o,a),w(l,i,n),I(e[0],s,u),I(e[1],l,h),I(e[2],h,u),I(e[3],s,l)}function S(e,t,r){var n;for(n=0;n<4;n++)g(e[n],t[n],r)}function Q(e,r){var n=t(),i=t(),a=t();B(a,r[2]),I(n,r[0],a),I(i,r[1],a),A(e,i),e[31]^=m(n)<<7}function x(e,t,r){var n,o;for(d(e[0],i),d(e[1],a),d(e[2],a),d(e[3],i),o=255;o>=0;--o)S(e,t,n=r[o/8|0]>>(7&o)&1),k(t,e),k(e,e),S(e,t,n)}function P(e,r){var n=[t(),t(),t(),t()];d(n[0],u),d(n[1],h),d(n[2],a),I(n[3],u,h),x(e,n,r)}function M(n,i,a){var o,s,c=[t(),t(),t(),t()];for(a||r(i,32),(o=e.hash(i.subarray(0,32)))[0]&=248,o[31]&=127,o[31]|=64,P(c,o),Q(n,c),s=0;s<32;s++)i[s+32]=n[s];return 0}var U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function D(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i>4)*U[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*U[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function R(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;D(e,r)}function F(e,r){var n=t(),o=t(),c=t(),u=t(),h=t(),f=t(),p=t();return d(e[2],a),b(e[1],r),E(c,e[1]),I(u,c,s),v(c,c,e[2]),w(u,e[2],u),E(h,u),E(f,h),I(p,f,h),I(n,p,c),I(n,n,u),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)E(i,i),1!==n&&I(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),I(n,n,c),I(n,n,u),I(n,n,u),I(e[0],n,u),E(o,e[0]),I(o,o,u),y(o,c)&&I(e[0],e[0],l),E(o,e[0]),I(o,o,u),y(o,c)?-1:(m(e[0])===r[31]>>7&&v(e[0],i,e[0]),I(e[3],e[0],e[1]),0)}var T=64;function q(){for(var e=0;e=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return M(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(q(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;re&&(c.imod(a.leftShift(i)).iadd(a),u=c.mod(o).toNumber())}while(!await Lh(c,t,r));return c}async function Lh(e,t,r){return!(t&&!e.dec().gcd(t).isOne()||!await async function(e){const t=await $o.getBigInteger();return Gh.every((r=>0!==e.mod(new t(r))))}(e)||!await async function(e,t){const r=await $o.getBigInteger();return(t=t||new r(2)).modExp(e.dec(),e).isOne()}(e)||!await async function(e,t,r){const n=await $o.getBigInteger(),i=e.bitLength();t||(t=Math.max(1,i/48|0));const a=e.dec();let o=0;for(;!a.getBit(o);)o++;const s=e.rightShift(new n(o));for(;t>0;t--){let t,r=(await Kh(new n(2),a)).modExp(s,e);if(!r.isOne()&&!r.equal(a)){for(t=1;tt-11)throw Error("Message too long");const n=function(e){const t=new Uint8Array(e);let r=0;for(;r=8&!n;if(t)return $o.selectUint8Array(o,a,t);if(o)return a;throw Error("Decryption error")}async function Zh(e,t,r){let n;if(t.length!==Wu.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(jh[e].length);for(n=0;n{Yh.generateKeyPair("rsa",r,((r,n,i)=>{r?t(r):e(Xh.decode(i,"der"))}))}));return{n:n.modulus.toArrayLike(Uint8Array),e:n.publicExponent.toArrayLike(Uint8Array),d:n.privateExponent.toArrayLike(Uint8Array),p:n.prime2.toArrayLike(Uint8Array),q:n.prime1.toArrayLike(Uint8Array),u:n.coefficient.toArrayLike(Uint8Array)}}let r,n,i;do{n=await Nh(e-(e>>1),t,40),r=await Nh(e>>1,t,40),i=r.mul(n)}while(i.bitLength()!==e);const a=r.dec().imul(n.dec());return n.lt(r)&&([r,n]=[n,r]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:r.toUint8Array(),q:n.toUint8Array(),u:r.modInv(n).toUint8Array()}},validateParams:async function(e,t,r,n,i,a){const o=await $o.getBigInteger();if(e=new o(e),n=new o(n),i=new o(i),!n.mul(i).equal(e))return!1;const s=new o(2);if(a=new o(a),!n.mul(a).mod(i).isOne())return!1;t=new o(t),r=new o(r);const c=new o(Math.floor(e.bitLength()/3)),u=await Kh(s,s.leftShift(c)),h=u.mul(r).mul(t);return!(!h.mod(n.dec()).equal(u)||!h.mod(i.dec()).equal(u))}}),rl=Object.freeze({__proto__:null,encrypt:async function(e,t,r,n){const i=await $o.getBigInteger();t=new i(t),r=new i(r),n=new i(n);const a=new i(zh(e,t.byteLength())),o=await Kh(new i(1),t.dec());return{c1:r.modExp(o,t).toUint8Array(),c2:n.modExp(o,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,r,n,i){const a=await $o.getBigInteger();return e=new a(e),t=new a(t),r=new a(r),n=new a(n),Wh(e.modExp(n,r).modInv(r).imul(t).imod(r).toUint8Array("be",r.byteLength()),i)},validateParams:async function(e,t,r,n){const i=await $o.getBigInteger();e=new i(e),t=new i(t),r=new i(r);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const o=new i(e.bitLength()),s=new i(1023);if(o.lt(s))return!1;if(!t.modExp(e.dec(),e).isOne())return!1;let c=t;const u=new i(1),h=new i(2).leftShift(new i(17));for(;u.lt(h);){if(c=c.mul(t).imod(e),c.isOne())return!1;u.iinc()}n=new i(n);const l=new i(2),f=await Kh(l.leftShift(o.dec()),l.leftShift(o)),d=e.dec().imul(f).iadd(n);return!!r.equal(t.modExp(d,e))}});class nl{constructor(e){if(e instanceof nl)this.oid=e.oid;else if($o.isArray(e)||$o.isUint8Array(e)){if(6===(e=new Uint8Array(e))[0]){if(e[1]!==e.length-2)throw Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.oid=e.subarray(1,1+t),1+this.oid.length}throw Error("Invalid oid")}write(){return $o.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return $o.uint8ArrayToHex(this.oid)}getName(){const e=this.toHex();if(Vo.curve[e])return Vo.write(Vo.curve,e);throw Error("Unknown curve object identifier.")}}function il(e,t){return e.keyPair({priv:t})}function al(e,t){const r=e.keyPair({pub:t});if(!0!==r.validate().result)throw Error("Invalid elliptic public key");return r}async function ol(e){if(!os.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await Promise.resolve().then((function(){return Pb}));return new t.ec(e)}function sl(e){let t,r=0;const n=e[0];return n<192?([r]=e,t=1):n<255?(r=(e[0]-192<<8)+e[1]+192,t=2):255===n&&(r=$o.readNumber(e.subarray(1,5)),t=5),{len:r,offset:t}}function cl(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):$o.concatUint8Array([new Uint8Array([255]),$o.writeNumber(e,4)])}function ul(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function hl(e){return new Uint8Array([192|e])}function ll(e,t){return $o.concatUint8Array([hl(e),cl(t)])}function fl(e){return[Vo.packet.literalData,Vo.packet.compressedData,Vo.packet.symmetricallyEncryptedData,Vo.packet.symEncryptedIntegrityProtectedData,Vo.packet.aeadEncryptedData].includes(e)}async function dl(e,t){const r=Ro(e);let n,i;try{const a=await r.peekBytes(2);if(!a||a.length<2||0==(128&a[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const o=await r.readByte();let s,c,u=-1,h=-1;h=0,0!=(64&o)&&(h=1),h?u=63&o:(u=(63&o)>>2,c=3&o);const l=fl(u);let f,d=null;if(l){if("array"===$o.isStream(e)){const e=new lo;n=Fo(e),d=e}else{const e=new xo;n=Fo(e.writable),d=e.readable}i=t({tag:u,packet:d})}else d=[];do{if(h){const e=await r.readByte();if(f=!1,e<192)s=e;else if(e>=192&&e<224)s=(e-192<<8)+await r.readByte()+192;else if(e>223&&e<255){if(s=1<<(31&e),f=!0,!l)throw new TypeError("This packet type does not support partial lengths.")}else s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte()}else switch(c){case 0:s=await r.readByte();break;case 1:s=await r.readByte()<<8|await r.readByte();break;case 2:s=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte();break;default:s=1/0}if(s>0){let e=0;for(;;){n&&await n.ready;const{done:t,value:i}=await r.read();if(t){if(s===1/0)break;throw Error("Unexpected end of packet")}const a=s===1/0?i:i.subarray(0,s-e);if(n?await n.write(a):d.push(a),e+=i.length,e>=s){r.unshift(i.subarray(s-e+i.length));break}}}}while(f);const p=await r.peekBytes(l?1/0:2);return n?(await n.ready,await n.close()):(d=$o.concatUint8Array(d),await t({tag:u,packet:d})),!p||!p.length}catch(e){if(n)return await n.abort(e),!0;throw e}finally{n&&await i,r.releaseLock()}}class pl extends Error{constructor(...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,pl),this.name="UnsupportedError"}}class gl{constructor(e,t){this.tag=e,this.rawContent=t}write(){return this.rawContent}}const Al=$o.getWebCrypto(),yl=$o.getNodeCrypto(),ml={p256:"P-256",p384:"P-384",p521:"P-521"},bl=yl?yl.getCurves():[],wl=yl?{secp256k1:bl.includes("secp256k1")?"secp256k1":void 0,p256:bl.includes("prime256v1")?"prime256v1":void 0,p384:bl.includes("secp384r1")?"secp384r1":void 0,p521:bl.includes("secp521r1")?"secp521r1":void 0,ed25519:bl.includes("ED25519")?"ED25519":void 0,curve25519:bl.includes("X25519")?"X25519":void 0,brainpoolP256r1:bl.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:bl.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:bl.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},vl={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:wl.p256,web:ml.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha384,cipher:Vo.symmetric.aes192,node:wl.p384,web:ml.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha512,cipher:Vo.symmetric.aes256,node:wl.p521,web:ml.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:wl.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:Vo.publicKey.eddsaLegacy,hash:Vo.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:Vo.publicKey.ecdh,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha256,cipher:Vo.symmetric.aes128,node:wl.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha384,cipher:Vo.symmetric.aes192,node:wl.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:Vo.publicKey.ecdsa,hash:Vo.hash.sha512,cipher:Vo.symmetric.aes256,node:wl.brainpoolP512r1,payloadSize:64}};class Il{constructor(e,t){try{($o.isArray(e)||$o.isUint8Array(e))&&(e=new nl(e)),e instanceof nl&&(e=e.getName()),this.name=Vo.write(Vo.curve,e)}catch(e){throw new pl("Unknown curve")}t=t||vl[this.name],this.keyType=t.keyType,this.oid=t.oid,this.hash=t.hash,this.cipher=t.cipher,this.node=t.node&&vl[this.name],this.web=t.web&&vl[this.name],this.payloadSize=t.payloadSize,this.web&&$o.getWebCrypto()?this.type="web":this.node&&$o.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let e;switch(this.type){case"web":try{return await async function(e){const t=await Al.generateKey({name:"ECDSA",namedCurve:ml[e]},!0,["sign","verify"]),r=await Al.exportKey("jwk",t.privateKey);return{publicKey:Bl(await Al.exportKey("jwk",t.publicKey)),privateKey:is(r.d)}}(this.name)}catch(e){$o.printDebugError("Browser did not support generating ec key "+e.message);break}case"node":return async function(e){const t=yl.createECDH(wl[e]);return await t.generateKeys(),{publicKey:new Uint8Array(t.getPublicKey()),privateKey:new Uint8Array(t.getPrivateKey())}}(this.name);case"curve25519":{const t=Oh(32);t[0]=127&t[0]|64,t[31]&=248;const r=t.slice().reverse();return e=Th.box.keyPair.fromSecretKey(r),{publicKey:$o.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:t}}case"ed25519":{const e=Oh(32),t=Th.sign.keyPair.fromSeed(e);return{publicKey:$o.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:e}}}const t=await ol(this.name);return e=await t.genKeyPair({entropy:$o.uint8ArrayToString(Oh(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}}}async function El(e,t,r,n){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===Vo.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if("curve25519"===a){n=n.slice().reverse();const{publicKey:e}=Th.box.keyPair.fromSecretKey(n);r=new Uint8Array(r);const t=new Uint8Array([64,...e]);return!!$o.equalsUint8Array(t,r)}const o=await ol(a);try{r=al(o,r).getPublic()}catch(e){return!1}return!!il(o,n).getPublic().eq(r)}function Bl(e){const t=is(e.x),r=is(e.y),n=new Uint8Array(t.length+r.length+1);return n[0]=4,n.set(t,1),n.set(r,t.length+1),n}function Cl(e,t,r){const n=e,i=r.slice(1,n+1),a=r.slice(n+1,2*n+1);return{kty:"EC",crv:t,x:as(i,!0),y:as(a,!0),ext:!0}}function _l(e,t,r,n){const i=Cl(e,t,r);return i.d=as(n,!0),i}const kl=$o.getWebCrypto(),Sl=$o.getNodeCrypto();async function Ql(e,t,r,n,i,a){const o=new Il(e);if(r&&!$o.isStream(r)){const a={publicKey:n,privateKey:i};switch(o.type){case"web":try{return await async function(e,t,r,n){const i=e.payloadSize,a=_l(e.payloadSize,ml[e.name],n.publicKey,n.privateKey),o=await kl.importKey("jwk",a,{name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,e.hash)}},!1,["sign"]),s=new Uint8Array(await kl.sign({name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,t)}},o,r));return{r:s.slice(0,i),s:s.slice(i,i<<1)}}(o,t,r,a)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;$o.printDebugError("Browser did not support signing: "+e.message)}break;case"node":{const e=await async function(e,t,r,n){const i=Sl.createSign(Vo.read(Vo.hash,t));i.write(r),i.end();const a=Ul.encode({version:1,parameters:e.oid,privateKey:Array.from(n.privateKey),publicKey:{unused:0,data:Array.from(n.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return Ml.decode(i.sign(a),"der")}(o,t,r,a);return{r:e.r.toArrayLike(Uint8Array),s:e.s.toArrayLike(Uint8Array)}}}}return async function(e,t,r){const n=il(await ol(e.name),r).sign(t);return{r:n.r.toArrayLike(Uint8Array),s:n.s.toArrayLike(Uint8Array)}}(o,a,i)}async function xl(e,t,r,n,i,a){const o=new Il(e);if(n&&!$o.isStream(n))switch(o.type){case"web":try{return await async function(e,t,{r:r,s:n},i,a){const o=Cl(e.payloadSize,ml[e.name],a),s=await kl.importKey("jwk",o,{name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,e.hash)}},!1,["verify"]),c=$o.concatUint8Array([r,n]).buffer;return kl.verify({name:"ECDSA",namedCurve:ml[e.name],hash:{name:Vo.read(Vo.webHash,t)}},s,c,i)}(o,t,r,n,i)}catch(e){if("p521"!==o.name&&("DataError"===e.name||"OperationError"===e.name))throw e;$o.printDebugError("Browser did not support verifying: "+e.message)}break;case"node":return async function(e,t,{r:r,s:n},i,a){const{default:o}=await Promise.resolve().then((function(){return fm})),s=Sl.createVerify(Vo.read(Vo.hash,t));s.write(i),s.end();const c=Rl.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:e.oid},subjectPublicKey:{unused:0,data:Array.from(a)}},"pem",{label:"PUBLIC KEY"}),u=Ml.encode({r:new o(r),s:new o(n)},"der");try{return s.verify(c,u)}catch(e){return!1}}(o,t,r,n,i)}return async function(e,t,r,n){return al(await ol(e.name),n).verify(r,t)}(o,r,void 0===t?n:a,i)}const Pl=void 0,Ml=Sl?Pl.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,Ul=Sl?Pl.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())})):void 0,Dl=Sl?Pl.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,Rl=Sl?Pl.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Dl),this.key("subjectPublicKey").bitstr())})):void 0;var Fl=Object.freeze({__proto__:null,sign:Ql,verify:xl,validateParams:async function(e,t,r){const n=new Il(e);if(n.keyType!==Vo.publicKey.ecdsa)return!1;switch(n.type){case"web":case"node":{const n=Oh(8),i=Vo.hash.sha256,a=await Wu.digest(i,n);try{const o=await Ql(e,i,n,t,r,a);return await xl(e,i,o,n,t,a)}catch(e){return!1}}default:return El(Vo.publicKey.ecdsa,e,t,r)}}});Th.hash=e=>new Uint8Array(eu().update(e).digest());var Tl=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){if(Wu.getHashByteLength(t)new Uint8Array(eu().update(e).digest());var Ol=Object.freeze({__proto__:null,generate:async function(e){if(e===Vo.publicKey.ed25519){const e=Oh(32),{publicKey:t}=Th.sign.keyPair.fromSeed(e);return{A:t,seed:e}}throw Error("Unsupported EdDSA algorithm")},sign:async function(e,t,r,n,i,a){if(Wu.getHashByteLength(t)=0;--e)for(let t=s-1;t>=0;--t)c[1]=s*e+(t+1),u[0]=a[0]^c[0],u[1]=a[1]^c[1],u[2]=o[2*t],u[3]=o[2*t+1],u=Nl(r.decrypt(Ll(u))),a=u.subarray(0,2),o[2*t]=u[2],o[2*t+1]=u[3];if(a[0]===n[0]&&a[1]===n[1])return Ll(o);throw Error("Key Data Integrity failed")}function Nl(e){const{length:t}=e,r=function(e){if($o.isString(e)){const{length:t}=e,r=new ArrayBuffer(t),n=new Uint8Array(r);for(let r=0;r0){const r=e[t-1];if(r>=1){const n=e.subarray(t-r),i=new Uint8Array(r).fill(r);if($o.equalsUint8Array(n,i))return e.subarray(0,t-r)}}throw Error("Invalid padding")}var Wl=Object.freeze({__proto__:null,encode:jl,decode:zl});const Zl=$o.getWebCrypto(),Jl=$o.getNodeCrypto();function Vl(e,t,r,n){return $o.concatUint8Array([t.write(),new Uint8Array([e]),r.write(),$o.stringToUint8Array("Anonymous Sender "),n.subarray(0,20)])}async function Yl(e,t,r,n,i=!1,a=!1){let o;if(i){for(o=0;o=0&&0===t[o];o--);t=t.subarray(0,o+1)}return(await Wu.digest(e,$o.concatUint8Array([new Uint8Array([0,0,0,1]),t,n]))).subarray(0,r)}async function $l(e,t,r,n){if(n.length!==e.payloadSize){const t=new Uint8Array(e.payloadSize);t.set(n,e.payloadSize-n.length),n=t}switch(e.type){case"curve25519":{const e=n.slice().reverse();return{secretKey:e,sharedKey:Th.scalarMult(e,t.subarray(1))}}case"web":if(e.web&&$o.getWebCrypto())try{return await async function(e,t,r,n){const i=_l(e.payloadSize,e.web.web,r,n);let a=Zl.importKey("jwk",i,{name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]);const o=Cl(e.payloadSize,e.web.web,t);let s=Zl.importKey("jwk",o,{name:"ECDH",namedCurve:e.web.web},!0,[]);[a,s]=await Promise.all([a,s]);let c=Zl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:s},a,e.web.sharedSize),u=Zl.exportKey("jwk",a);[c,u]=await Promise.all([c,u]);const h=new Uint8Array(c);return{secretKey:is(u.d),sharedKey:h}}(e,t,r,n)}catch(e){$o.printDebugError(e)}break;case"node":return async function(e,t,r){const n=Jl.createECDH(e.node.node);n.setPrivateKey(r);const i=new Uint8Array(n.computeSecret(t));return{secretKey:new Uint8Array(n.getPrivateKey()),sharedKey:i}}(e,t,n)}return async function(e,t,r){const n=await ol(e.name);t=al(n,t),r=il(n,r);const i=new Uint8Array(r.getPrivate()),a=r.derive(t.getPublic()),o=n.curve.p.byteLength();return{secretKey:i,sharedKey:a.toArrayLike(Uint8Array,"be",o)}}(e,t,n)}var Xl=Object.freeze({__proto__:null,validateParams:async function(e,t,r){return El(Vo.publicKey.ecdh,e,t,r)},encrypt:async function(e,t,r,n,i){const a=jl(r),o=new Il(e),{publicKey:s,sharedKey:c}=await async function(e,t){switch(e.type){case"curve25519":{const r=Oh(32),{secretKey:n,sharedKey:i}=await $l(e,t,null,r);let{publicKey:a}=Th.box.keyPair.fromSecretKey(n);return a=$o.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&$o.getWebCrypto())try{return await async function(e,t){const r=Cl(e.payloadSize,e.web.web,t);let n=Zl.generateKey({name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]),i=Zl.importKey("jwk",r,{name:"ECDH",namedCurve:e.web.web},!1,[]);[n,i]=await Promise.all([n,i]);let a=Zl.deriveBits({name:"ECDH",namedCurve:e.web.web,public:i},n.privateKey,e.web.sharedSize),o=Zl.exportKey("jwk",n.publicKey);[a,o]=await Promise.all([a,o]);const s=new Uint8Array(a);return{publicKey:new Uint8Array(Bl(o)),sharedKey:s}}(e,t)}catch(e){$o.printDebugError(e)}break;case"node":return async function(e,t){const r=Jl.createECDH(e.node.node);r.generateKeys();const n=new Uint8Array(r.computeSecret(t));return{publicKey:new Uint8Array(r.getPublicKey()),sharedKey:n}}(e,t)}return async function(e,t){const r=await ol(e.name),n=await e.genKeyPair();t=al(r,t);const i=il(r,n.privateKey),a=n.publicKey,o=i.derive(t.getPublic()),s=r.curve.p.byteLength();return{publicKey:a,sharedKey:o.toArrayLike(Uint8Array,"be",s)}}(e,t)}(o,n),u=Vl(Vo.publicKey.ecdh,e,t,i),{keySize:h}=Ju(t.cipher);return{publicKey:s,wrappedKey:Kl(await Yl(t.hash,c,h,u),a)}},decrypt:async function(e,t,r,n,i,a,o){const s=new Il(e),{sharedKey:c}=await $l(s,r,i,a),u=Vl(Vo.publicKey.ecdh,e,t,o),{keySize:h}=Ju(t.cipher);let l;for(let r=0;r<3;r++)try{return zl(Hl(await Yl(t.hash,c,h,u,1===r,2===r),n))}catch(e){l=e}throw l}});const ef=$o.getWebCrypto(),tf=$o.getNodeCrypto(),rf=tf&&tf.webcrypto&&tf.webcrypto.subtle;async function nf(e,t,r,n,i){const a=Vo.read(Vo.webHash,e);if(!a)throw Error("Hash algo not supported with HKDF");if(ef||rf){const e=ef||rf,o=await e.importKey("raw",t,"HKDF",!1,["deriveBits"]),s=await e.deriveBits({name:"HKDF",hash:a,salt:r,info:n},o,8*i);return new Uint8Array(s)}if(tf){const a=Vo.read(Vo.hash,e),o=(e,t)=>tf.createHmac(a,e).update(t).digest(),s=o(r,t),c=s.length,u=Math.ceil(i/c),h=new Uint8Array(u*c),l=new Uint8Array(c+n.length+1);l.set(n,c);for(let e=0;e0?l:l.subarray(c));l.set(t,0),h.set(t,e*c)}return h.subarray(0,i)}throw Error("No HKDF implementation available")}const af={x25519:$o.encodeUTF8("OpenPGP X25519")};var of=Object.freeze({__proto__:null,generate:async function(e){if(e===Vo.publicKey.x25519){const e=Oh(32),{publicKey:t}=Th.box.keyPair.fromSecretKey(e);return{A:t,k:e}}throw Error("Unsupported ECDH algorithm")},validateParams:async function(e,t,r){if(e===Vo.publicKey.x25519){const{publicKey:e}=Th.box.keyPair.fromSecretKey(r);return $o.equalsUint8Array(t,e)}return!1},encrypt:async function(e,t,r){if(e===Vo.publicKey.x25519){const e=Oh(32),n=Th.scalarMult(e,r),{publicKey:i}=Th.box.keyPair.fromSecretKey(e),a=$o.concatUint8Array([i,r,n]),{keySize:o}=Ju(Vo.symmetric.aes128);return{ephemeralPublicKey:i,wrappedKey:Kl(await nf(Vo.hash.sha256,a,new Uint8Array,af.x25519,o),t)}}throw Error("Unsupported ECDH algorithm")},decrypt:async function(e,t,r,n,i){if(e===Vo.publicKey.x25519){const e=Th.scalarMult(i,t),a=$o.concatUint8Array([t,n,e]),{keySize:o}=Ju(Vo.symmetric.aes128);return Hl(await nf(Vo.hash.sha256,a,new Uint8Array,af.x25519,o),r)}throw Error("Unsupported ECDH algorithm")}}),sf=Object.freeze({__proto__:null,CurveWithOID:Il,ecdh:Xl,ecdhX:of,ecdsa:Fl,eddsaLegacy:Tl,eddsa:Ol,generate:async function(e){const t=await $o.getBigInteger();e=new Il(e);const r=await e.genKeyPair(),n=new t(r.publicKey).toUint8Array(),i=new t(r.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:n,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return vl[Vo.write(Vo.curve,e.toHex())].hash}}),cf=Object.freeze({__proto__:null,sign:async function(e,t,r,n,i,a){const o=await $o.getBigInteger(),s=new o(1);let c,u,h,l;n=new o(n),i=new o(i),r=new o(r),a=new o(a),r=r.mod(n),a=a.mod(i);const f=new o(t.subarray(0,i.byteLength())).mod(i);for(;;){if(c=await Kh(s,i),u=r.modExp(c,n).imod(i),u.isZero())continue;const e=a.mul(u).imod(i);if(l=f.add(e).imod(i),h=c.modInv(i).imul(l).imod(i),!h.isZero())break}return{r:u.toUint8Array("be",i.byteLength()),s:h.toUint8Array("be",i.byteLength())}},verify:async function(e,t,r,n,i,a,o,s){const c=await $o.getBigInteger(),u=new c(0);if(t=new c(t),r=new c(r),a=new c(a),o=new c(o),i=new c(i),s=new c(s),t.lte(u)||t.gte(o)||r.lte(u)||r.gte(o))return $o.printDebug("invalid DSA Signature"),!1;const h=new c(n.subarray(0,o.byteLength())).imod(o),l=r.modInv(o);if(l.isZero())return $o.printDebug("invalid DSA Signature"),!1;i=i.mod(a),s=s.mod(a);const f=h.mul(l).imod(o),d=t.mul(l).imod(o),p=i.modExp(f,a),g=s.modExp(d,a);return p.mul(g).imod(a).imod(o).equal(t)},validateParams:async function(e,t,r,n,i){const a=await $o.getBigInteger();e=new a(e),t=new a(t),r=new a(r),n=new a(n);const o=new a(1);if(r.lte(o)||r.gte(e))return!1;if(!e.dec().mod(t).isZero())return!1;if(!r.modExp(t,e).isOne())return!1;const s=new a(t.bitLength()),c=new a(150);if(s.lt(c)||!await Lh(t,null,32))return!1;i=new a(i);const u=new a(2),h=await Kh(u.leftShift(s.dec()),u.leftShift(s)),l=t.mul(h).add(i);return!!n.equal(r.modExp(l,e))}}),uf={rsa:tl,elgamal:rl,elliptic:sf,dsa:cf,nacl:Th},hf=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let r=0;switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaSign:return{s:$o.readMPI(t.subarray(r))};case Vo.publicKey.dsa:case Vo.publicKey.ecdsa:{const e=$o.readMPI(t.subarray(r));return r+=e.length+2,{r:e,s:$o.readMPI(t.subarray(r))}}case Vo.publicKey.eddsaLegacy:{let e=$o.readMPI(t.subarray(r));r+=e.length+2,e=$o.leftPad(e,32);let n=$o.readMPI(t.subarray(r));return n=$o.leftPad(n,32),{r:e,s:n}}case Vo.publicKey.ed25519:{const e=t.subarray(r,r+64);return r+=e.length,{RS:e}}default:throw new pl("Unknown signature algorithm.")}},verify:async function(e,t,r,n,i,a){switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaSign:{const{n:e,e:o}=n,s=$o.leftPad(r.s,e.length);return uf.rsa.verify(t,i,s,e,o,a)}case Vo.publicKey.dsa:{const{g:e,p:i,q:o,y:s}=n,{r:c,s:u}=r;return uf.dsa.verify(t,c,u,a,e,i,o,s)}case Vo.publicKey.ecdsa:{const{oid:e,Q:o}=n,s=new uf.elliptic.CurveWithOID(e).payloadSize,c=$o.leftPad(r.r,s),u=$o.leftPad(r.s,s);return uf.elliptic.ecdsa.verify(e,t,{r:c,s:u},i,o,a)}case Vo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=n;return uf.elliptic.eddsaLegacy.verify(e,t,r,i,o,a)}case Vo.publicKey.ed25519:{const{A:o}=n;return uf.elliptic.eddsa.verify(e,t,r,i,o,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,r,n,i,a){if(!r||!n)throw Error("Missing key parameters");switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaSign:{const{n:e,e:o}=r,{d:s,p:c,q:u,u:h}=n;return{s:await uf.rsa.sign(t,i,e,o,s,c,u,h,a)}}case Vo.publicKey.dsa:{const{g:e,p:i,q:o}=r,{x:s}=n;return uf.dsa.sign(t,a,e,i,o,s)}case Vo.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case Vo.publicKey.ecdsa:{const{oid:e,Q:o}=r,{d:s}=n;return uf.elliptic.ecdsa.sign(e,t,i,o,s,a)}case Vo.publicKey.eddsaLegacy:{const{oid:e,Q:o}=r,{seed:s}=n;return uf.elliptic.eddsaLegacy.sign(e,t,i,o,s,a)}case Vo.publicKey.ed25519:{const{A:o}=r,{seed:s}=n;return uf.elliptic.eddsa.sign(e,t,i,o,s,a)}default:throw Error("Unknown signature algorithm.")}}});class lf{constructor(e){e&&(this.data=e)}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.data=e.subarray(1,1+t),1+this.data.length}throw Error("Invalid symmetric key")}write(){return $o.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class ff{constructor(e){if(e){const{hash:t,cipher:r}=e;this.hash=t,this.cipher=r}else this.hash=null,this.cipher=null}read(e){if(e.length<4||3!==e[0]||1!==e[1])throw new pl("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}class df{static fromObject({wrappedKey:e,algorithm:t}){const r=new df;return r.wrappedKey=e,r.algorithm=t,r}read(e){let t=0,r=e[t++];this.algorithm=r%2?e[t++]:null,r-=r%2,this.wrappedKey=e.subarray(t,t+r),t+=r}write(){return $o.concatUint8Array([this.algorithm?new Uint8Array([this.wrappedKey.length+1,this.algorithm]):new Uint8Array([this.wrappedKey.length]),this.wrappedKey])}}function pf(e){try{e.getName()}catch(e){throw new pl("Unknown curve OID")}}var gf=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,r,n,i){switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:{const{n:e,e:t}=r;return{c:await uf.rsa.encrypt(n,e,t)}}case Vo.publicKey.elgamal:{const{p:e,g:t,y:i}=r;return uf.elgamal.encrypt(n,e,t,i)}case Vo.publicKey.ecdh:{const{oid:e,Q:t,kdfParams:a}=r,{publicKey:o,wrappedKey:s}=await uf.elliptic.ecdh.encrypt(e,a,n,t,i);return{V:o,C:new lf(s)}}case Vo.publicKey.x25519:{if(!$o.isAES(t))throw Error("X25519 keys can only encrypt AES session keys");const{A:i}=r,{ephemeralPublicKey:a,wrappedKey:o}=await uf.elliptic.ecdhX.encrypt(e,n,i);return{ephemeralPublicKey:a,C:df.fromObject({algorithm:t,wrappedKey:o})}}default:return[]}},publicKeyDecrypt:async function(e,t,r,n,i,a){switch(e){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaEncrypt:{const{c:e}=n,{n:i,e:o}=t,{d:s,p:c,q:u,u:h}=r;return uf.rsa.decrypt(e,i,o,s,c,u,h,a)}case Vo.publicKey.elgamal:{const{c1:e,c2:i}=n,o=t.p,s=r.x;return uf.elgamal.decrypt(e,i,o,s,a)}case Vo.publicKey.ecdh:{const{oid:e,Q:a,kdfParams:o}=t,{d:s}=r,{V:c,C:u}=n;return uf.elliptic.ecdh.decrypt(e,o,c,u.data,a,s,i)}case Vo.publicKey.x25519:{const{A:i}=t,{k:a}=r,{ephemeralPublicKey:o,C:s}=n;if(!$o.isAES(s.algorithm))throw Error("AES session key expected");return uf.elliptic.ecdhX.decrypt(e,o,s.wrappedKey,i,a)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let r=0;switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=$o.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{n:e,e:n}}}case Vo.publicKey.dsa:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=$o.readMPI(t.subarray(r));r+=n.length+2;const i=$o.readMPI(t.subarray(r));r+=i.length+2;const a=$o.readMPI(t.subarray(r));return r+=a.length+2,{read:r,publicParams:{p:e,q:n,g:i,y:a}}}case Vo.publicKey.elgamal:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=$o.readMPI(t.subarray(r));r+=n.length+2;const i=$o.readMPI(t.subarray(r));return r+=i.length+2,{read:r,publicParams:{p:e,g:n,y:i}}}case Vo.publicKey.ecdsa:{const e=new nl;r+=e.read(t),pf(e);const n=$o.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{oid:e,Q:n}}}case Vo.publicKey.eddsaLegacy:{const e=new nl;r+=e.read(t),pf(e);let n=$o.readMPI(t.subarray(r));return r+=n.length+2,n=$o.leftPad(n,33),{read:r,publicParams:{oid:e,Q:n}}}case Vo.publicKey.ecdh:{const e=new nl;r+=e.read(t),pf(e);const n=$o.readMPI(t.subarray(r));r+=n.length+2;const i=new ff;return r+=i.read(t.subarray(r)),{read:r,publicParams:{oid:e,Q:n,kdfParams:i}}}case Vo.publicKey.ed25519:case Vo.publicKey.x25519:{const e=t.subarray(r,r+32);return r+=e.length,{read:r,publicParams:{A:e}}}default:throw new pl("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,r){let n=0;switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:{const e=$o.readMPI(t.subarray(n));n+=e.length+2;const r=$o.readMPI(t.subarray(n));n+=r.length+2;const i=$o.readMPI(t.subarray(n));n+=i.length+2;const a=$o.readMPI(t.subarray(n));return n+=a.length+2,{read:n,privateParams:{d:e,p:r,q:i,u:a}}}case Vo.publicKey.dsa:case Vo.publicKey.elgamal:{const e=$o.readMPI(t.subarray(n));return n+=e.length+2,{read:n,privateParams:{x:e}}}case Vo.publicKey.ecdsa:case Vo.publicKey.ecdh:{const e=new Il(r.oid);let i=$o.readMPI(t.subarray(n));return n+=i.length+2,i=$o.leftPad(i,e.payloadSize),{read:n,privateParams:{d:i}}}case Vo.publicKey.eddsaLegacy:{const e=new Il(r.oid);let i=$o.readMPI(t.subarray(n));return n+=i.length+2,i=$o.leftPad(i,e.payloadSize),{read:n,privateParams:{seed:i}}}case Vo.publicKey.ed25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{seed:e}}}case Vo.publicKey.x25519:{const e=t.subarray(n,n+32);return n+=e.length,{read:n,privateParams:{k:e}}}default:throw new pl("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let r=0;switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:return{c:$o.readMPI(t.subarray(r))};case Vo.publicKey.elgamal:{const e=$o.readMPI(t.subarray(r));return r+=e.length+2,{c1:e,c2:$o.readMPI(t.subarray(r))}}case Vo.publicKey.ecdh:{const e=$o.readMPI(t.subarray(r));r+=e.length+2;const n=new lf;return n.read(t.subarray(r)),{V:e,C:n}}case Vo.publicKey.x25519:{const e=t.subarray(r,r+32);r+=e.length;const n=new df;return n.read(t.subarray(r)),{ephemeralPublicKey:e,C:n}}default:throw new pl("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const r=new Set([Vo.publicKey.ed25519,Vo.publicKey.x25519]),n=Object.keys(t).map((n=>{const i=t[n];return $o.isUint8Array(i)?r.has(e)?i:$o.uint8ArrayToMPI(i):i.write()}));return $o.concatUint8Array(n)},generateParams:function(e,t,r){switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:return uf.rsa.generate(t,65537).then((({n:e,e:t,d:r,p:n,q:i,u:a})=>({privateParams:{d:r,p:n,q:i,u:a},publicParams:{n:e,e:t}})));case Vo.publicKey.ecdsa:return uf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{d:r},publicParams:{oid:new nl(e),Q:t}})));case Vo.publicKey.eddsaLegacy:return uf.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{seed:r},publicParams:{oid:new nl(e),Q:t}})));case Vo.publicKey.ecdh:return uf.elliptic.generate(r).then((({oid:e,Q:t,secret:r,hash:n,cipher:i})=>({privateParams:{d:r},publicParams:{oid:new nl(e),Q:t,kdfParams:new ff({hash:n,cipher:i})}})));case Vo.publicKey.ed25519:return uf.elliptic.eddsa.generate(e).then((({A:e,seed:t})=>({privateParams:{seed:t},publicParams:{A:e}})));case Vo.publicKey.x25519:return uf.elliptic.ecdhX.generate(e).then((({A:e,k:t})=>({privateParams:{k:t},publicParams:{A:e}})));case Vo.publicKey.dsa:case Vo.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,r){if(!t||!r)throw Error("Missing key parameters");switch(e){case Vo.publicKey.rsaEncrypt:case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:{const{n:e,e:n}=t,{d:i,p:a,q:o,u:s}=r;return uf.rsa.validateParams(e,n,i,a,o,s)}case Vo.publicKey.dsa:{const{p:e,q:n,g:i,y:a}=t,{x:o}=r;return uf.dsa.validateParams(e,n,i,a,o)}case Vo.publicKey.elgamal:{const{p:e,g:n,y:i}=t,{x:a}=r;return uf.elgamal.validateParams(e,n,i,a)}case Vo.publicKey.ecdsa:case Vo.publicKey.ecdh:{const n=uf.elliptic[Vo.read(Vo.publicKey,e)],{oid:i,Q:a}=t,{d:o}=r;return n.validateParams(i,a,o)}case Vo.publicKey.eddsaLegacy:{const{Q:e,oid:n}=t,{seed:i}=r;return uf.elliptic.eddsaLegacy.validateParams(n,e,i)}case Vo.publicKey.ed25519:{const{A:n}=t,{seed:i}=r;return uf.elliptic.eddsa.validateParams(e,n,i)}case Vo.publicKey.x25519:{const{A:n}=t,{k:i}=r;return uf.elliptic.ecdhX.validateParams(e,n,i)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=Ju(e),r=await Oh(t),n=new Uint8Array([r[r.length-2],r[r.length-1]]);return $o.concat([r,n])},generateSessionKey:function(e){const{keySize:t}=Ju(e);return Oh(t)},getAEADMode:function(e){const t=Vo.read(Vo.aead,e);return Fh[t]},getCipher:Ju,getPreferredCurveHashAlgo:function(e,t){switch(e){case Vo.publicKey.ecdsa:case Vo.publicKey.eddsaLegacy:return uf.elliptic.getPreferredHashAlgo(t);case Vo.publicKey.ed25519:return uf.elliptic.eddsa.getPreferredHashAlgo(e);default:throw Error("Unknown elliptic signing algo")}}});const Af={cipher:zs,hash:Wu,mode:Fh,publicKey:uf,signature:hf,random:Hh,pkcs1:Jh,pkcs5:Wl,aesKW:Gl};Object.assign(Af,gf);var yf="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;const mf={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(let a=0;a=0;)e[t]=0}const kf=0,Sf=1,Qf=2,xf=29,Pf=256,Mf=Pf+1+xf,Uf=30,Df=19,Rf=2*Mf+1,Ff=15,Tf=16,qf=256,Of=16,Kf=17,Hf=18,Nf=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Lf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Gf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],jf=Array(2*(Mf+2));_f(jf);const zf=Array(2*Uf);_f(zf);const Wf=Array(512);_f(Wf);const Zf=Array(256);_f(Zf);const Jf=Array(xf);_f(Jf);const Vf=Array(Uf);function Yf(e){return e<256?Wf[e]:Wf[256+(e>>>7)]}function $f(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Xf(e,t,r){e.bi_valid>Tf-r?(e.bi_buf|=t<>Tf-e.bi_valid,e.bi_valid+=r-Tf):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function rd(e,t,r){const n=Array(Ff+1);let i,a,o=0;for(i=1;i<=Ff;i++)n[i]=o=o+r[i-1]<<1;for(a=0;a<=t;a++){const t=e[2*a+1];0!==t&&(e[2*a]=td(n[t]++,t))}}function nd(e){let t;for(t=0;t8?$f(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ad(e,t,r,n){const i=2*t,a=2*r;return e[i]>1;o>=1;o--)od(e,r,o);c=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],od(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[2*c]=r[2*o]+r[2*s],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[2*o+1]=r[2*s+1]=c,e.heap[1]=c++,od(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,h,l,f,d,p,g=0;for(f=0;f<=Ff;f++)e.bl_count[f]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;uc&&(f=c,g++),r[2*h+1]=f,h>n||(e.bl_count[f]++,d=0,h>=s&&(d=o[h-s]),p=r[2*h],e.opt_len+=p*(f+d),a&&(e.static_len+=p*(i[2*h+1]+d)));if(0!==g){do{for(f=c-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(f=c;0!==f;f--)for(h=e.bl_count[f];0!==h;)l=e.heap[--u],l>n||(r[2*l+1]!==f&&(e.opt_len+=(f-r[2*l+1])*r[2*l],r[2*l+1]=f),h--)}}(e,t),rd(r,u,e.bl_count)}function ud(e,t,r){let n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Zf[r]+Pf+1)]++,e.dyn_dtree[2*Yf(t)]++),e.last_lit===e.lit_bufsize-1}function dd(e,t,r,n){let i=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{i=i+t[n++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}const pd=function(){let e;const t=[];for(let r=0;r<256;r++){e=r;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();function gd(e,t,r,n){const i=pd,a=n+r;e^=-1;for(let r=n;r>>8^i[255&(e^t[r])];return-1^e}const Ad=3,yd=258,md=yd+Ad+1;function bd(e){const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(vf(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function wd(e,t){(function(e,t,r,n){let i,a,o=0;e.level>0?(e.strm.data_type===Cf&&(e.strm.data_type=function(e){let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Ef;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Bf;for(t=32;t=3&&0===e.bl_tree[2*Gf[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?ld(e,t,r,n):e.strategy===If||a===i?(Xf(e,(Sf<<1)+(n?1:0),3),sd(e,jf,zf)):(Xf(e,(Qf<<1)+(n?1:0),3),function(e,t,r,n){let i;for(Xf(e,t-257,5),Xf(e,r-1,5),Xf(e,n-4,4),i=0;i=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,bd(e.strm)}function vd(e,t,r,n){let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,vf(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=dd(e.adler,t,i,r):2===e.state.wrap&&(e.adler=gd(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Id(e,t){let r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-md?e.strstart-(e.w_size-md):0,u=e.window,h=e.w_mask,l=e.prev,f=e.strstart+yd;let d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(r=t,u[r+o]===p&&u[r+o-1]===d&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=l[t&h])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Ed(e){const t=e.w_size;let r,n,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-md)){vf(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do{i=e.head[--r],e.head[r]=i>=t?i-t:0}while(--n);n=t,r=n;do{i=e.prev[--r],e.prev[r]=i>=t?i-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=vd(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=Ad)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=Ad&&(e.ins_h=(e.ins_h<=Ad)if(n=fd(e,e.strstart-e.match_start,e.match_length-Ad),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ad){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=Ad&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=Ad-1)),e.prev_length>=Ad&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Ad,n=fd(e,e.strstart-1-e.prev_match,e.prev_length-Ad),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ed(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,wd(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-md&&(wd(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wd(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wd(e,!1),e.strm.avail_out),1)})),new _d(4,4,8,4,Bd),new _d(4,5,16,8,Bd),new _d(4,6,32,32,Bd),new _d(4,4,16,16,Cd),new _d(8,16,32,32,Cd),new _d(8,16,128,128,Cd),new _d(8,32,128,256,Cd),new _d(32,128,258,1024,Cd),new _d(32,258,258,4096,Cd);try{String.fromCharCode.call(null,0)}catch(oo){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(oo){}const kd=new wf(256);for(let e=0;e<256;e++)kd[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;kd[254]=kd[254]=1;var Sd=[0,1,3,7,15,31,63,127,255],Qd=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Qd.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Qd.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Sd[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var n=r-e;t|=(this.curByte&Sd[e]<>n,this.bitOffset+=e,e=0}}return t},Qd.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1},Qd.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+e.toString(16)).slice(-2))).join("")}(t)};var xd=Qd,Pd=function(){};Pd.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Pd.prototype.read=function(e,t,r){for(var n=0;n>>0},this.updateCRC=function(t){e=e<<8^Md[255&(e>>>24^t)]},this.updateCRCRun=function(t,r){for(;r-- >0;)e=e<<8^Md[255&(e>>>24^t)]}}),Dd=function(e,t){var r,n=e[t];for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},Rd=-2,Fd=-3,Td=-4,qd=-5,Od=-6,Kd=-7,Hd={"-1":"Bad file checksum"};Hd[Rd]="Not bzip data",Hd[Fd]="Unexpected input EOF",Hd[Td]="Unexpected output EOF",Hd[qd]="Data error",Hd[Od]="Out of memory",Hd[Kd]="Obsolete (pre 0.9.5) bzip format not supported.";var Nd=function(e,t){var r=Hd[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},Ld=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Ld.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new Ud,!0):(this.writeCount=-1,!1)},Ld.prototype._start_bunzip=function(e,t){var r=new Uint8Array(4);4===e.read(r,0,4)&&"BZh"===String.fromCharCode(r[0],r[1],r[2])||Nd(Rd,"bad magic");var n=r[3]-48;(n<1||n>9)&&Nd(Rd,"level out of range"),this.reader=new xd(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Ld.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if("177245385090"===i)return!1;"314159265359"!==i&&Nd(Rd),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&Nd(Kd);var a=n.read(24);a>this.dbufSize&&Nd(qd,"initial position out of bounds");var o=n.read(16),s=new Uint8Array(256),c=0;for(e=0;e<16;e++)if(o&1<<15-e){var u=16*e;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(s[c++]=u+t)}var h=n.read(3);(h<2||h>6)&&Nd(qd);var l=n.read(15);0===l&&Nd(qd);var f=new Uint8Array(256);for(e=0;e=h&&Nd(qd);d[e]=Dd(f,t)}var p,g=c+2,A=[];for(t=0;t20)&&Nd(qd),n.read(1);)n.read(1)?o--:o++;b[e]=o}for(y=m=b[0],e=1;em?m=b[e]:b[e]=l&&Nd(qd),p=A[d[_++]]),e=p.minLen,t=n.read(e);e>p.maxLen&&Nd(qd),!(t<=p.limit[e]);e++)t=t<<1|n.read(1);((t-=p.base[e])<0||t>=258)&&Nd(qd);var S=p.permute[t];if(0!==S&&1!==S){if(B)for(B=0,C+o>this.dbufSize&&Nd(qd),I[E=s[f[0]]]+=o;o--;)k[C++]=E;if(S>c)break;C>=this.dbufSize&&Nd(qd),I[E=s[E=Dd(f,e=S-1)]]++,k[C++]=E}else B||(B=1,o=0),o+=0===S?B:2*B,B<<=1}for((a<0||a>=C)&&Nd(qd),t=0,e=0;e<256;e++)r=t+I[e],I[e]=t,t=r;for(e=0;e>=8,P=-1),this.writePos=Q,this.writeCurrent=x,this.writeCount=C,this.writeRun=P,!0},Ld.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;var a=this.dbuf,o=this.writePos,s=this.writeCurrent,c=this.writeCount;this.outputsize;for(var u=this.writeRun;c;){for(c--,n=s,s=255&(o=a[o]),o>>=8,3==u++?(r=s,i=n,s=-1):(r=1,i=s),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;s!=n&&(u=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Nd(qd,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};const Gd=Symbol("verified"),jd=new Set([Vo.signatureSubpacket.issuer,Vo.signatureSubpacket.issuerFingerprint,Vo.signatureSubpacket.embeddedSignature]);class zd{static get tag(){return Vo.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new As,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[Gd]=null}read(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new pl(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=e[t++],this.publicKeyAlgorithm=e[t++],this.hashAlgorithm=e[t++],t+=this.readSubPackets(e.subarray(t,e.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=e.subarray(0,t),t+=this.readSubPackets(e.subarray(t,e.length),!1),this.signedHashValue=e.subarray(t,t+2),t+=2,this.params=Af.signature.parseSignatureParams(this.publicKeyAlgorithm,e.subarray(t,e.length))}writeParams(){return this.params instanceof Promise?Wo((async()=>Af.serializeParams(this.publicKeyAlgorithm,await this.params))):Af.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const e=[];return e.push(this.signatureData),e.push(this.writeUnhashedSubPackets()),e.push(this.signedHashValue),e.push(this.writeParams()),$o.concat(e)}async sign(e,t,r=new Date,n=!1){5===e.version?this.version=5:this.version=4;const i=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=$o.normalizeDate(r),this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyID=e.getKeyID(),i.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=$o.concat(i);const a=this.toHash(this.signatureType,t,n),o=await this.hash(this.signatureType,t,a,n);this.signedHashValue=jo(No(o),0,2);const s=async()=>Af.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,e.publicParams,e.privateParams,a,await zo(o));$o.isStream(o)?this.params=s():(this.params=await s(),this[Gd]=!0)}writeHashedSubPackets(){const e=Vo.signatureSubpacket,t=[];let r;if(null===this.created)throw Error("Missing signature creation time");t.push(Wd(e.signatureCreationTime,!0,$o.writeDate(this.created))),null!==this.signatureExpirationTime&&t.push(Wd(e.signatureExpirationTime,!0,$o.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&t.push(Wd(e.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),t.push(Wd(e.trustSignature,!0,r))),null!==this.regularExpression&&t.push(Wd(e.regularExpression,!0,this.regularExpression)),null!==this.revocable&&t.push(Wd(e.revocable,!0,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&t.push(Wd(e.keyExpirationTime,!0,$o.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredSymmetricAlgorithms)),t.push(Wd(e.preferredSymmetricAlgorithms,!1,r))),null!==this.revocationKeyClass&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=$o.concat([r,this.revocationKeyFingerprint]),t.push(Wd(e.revocationKey,!1,r))),this.issuerKeyID.isNull()||5===this.issuerKeyVersion||t.push(Wd(e.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach((({name:n,value:i,humanReadable:a,critical:o})=>{r=[new Uint8Array([a?128:0,0,0,0])];const s=$o.encodeUTF8(n);r.push($o.writeNumber(s.length,2)),r.push($o.writeNumber(i.length,2)),r.push(s),r.push(i),r=$o.concat(r),t.push(Wd(e.notationData,o,r))})),null!==this.preferredHashAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredHashAlgorithms)),t.push(Wd(e.preferredHashAlgorithms,!1,r))),null!==this.preferredCompressionAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredCompressionAlgorithms)),t.push(Wd(e.preferredCompressionAlgorithms,!1,r))),null!==this.keyServerPreferences&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.keyServerPreferences)),t.push(Wd(e.keyServerPreferences,!1,r))),null!==this.preferredKeyServer&&t.push(Wd(e.preferredKeyServer,!1,$o.encodeUTF8(this.preferredKeyServer))),null!==this.isPrimaryUserID&&t.push(Wd(e.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&t.push(Wd(e.policyURI,!1,$o.encodeUTF8(this.policyURI))),null!==this.keyFlags&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.keyFlags)),t.push(Wd(e.keyFlags,!0,r))),null!==this.signersUserID&&t.push(Wd(e.signersUserID,!1,$o.encodeUTF8(this.signersUserID))),null!==this.reasonForRevocationFlag&&(r=$o.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),t.push(Wd(e.reasonForRevocation,!0,r))),null!==this.features&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.features)),t.push(Wd(e.features,!1,r))),null!==this.signatureTargetPublicKeyAlgorithm&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push($o.stringToUint8Array(this.signatureTargetHash)),r=$o.concat(r),t.push(Wd(e.signatureTarget,!0,r))),null!==this.embeddedSignature&&t.push(Wd(e.embeddedSignature,!0,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=$o.concat(r),t.push(Wd(e.issuerFingerprint,5===this.version,r))),null!==this.preferredAEADAlgorithms&&(r=$o.stringToUint8Array($o.uint8ArrayToString(this.preferredAEADAlgorithms)),t.push(Wd(e.preferredAEADAlgorithms,!1,r)));const n=$o.concat(t),i=$o.writeNumber(n.length,2);return $o.concat([i,n])}writeUnhashedSubPackets(){const e=[];this.unhashedSubpackets.forEach((t=>{e.push(cl(t.length)),e.push(t)}));const t=$o.concat(e),r=$o.writeNumber(t.length,2);return $o.concat([r,t])}readSubPacket(e,t=!0){let r=0;const n=!!(128&e[r]),i=127&e[r];if(t||(this.unhashedSubpackets.push(e.subarray(r,e.length)),jd.has(i)))switch(r++,i){case Vo.signatureSubpacket.signatureCreationTime:this.created=$o.readDate(e.subarray(r,e.length));break;case Vo.signatureSubpacket.signatureExpirationTime:{const t=$o.readNumber(e.subarray(r,e.length));this.signatureNeverExpires=0===t,this.signatureExpirationTime=t;break}case Vo.signatureSubpacket.exportableCertification:this.exportable=1===e[r++];break;case Vo.signatureSubpacket.trustSignature:this.trustLevel=e[r++],this.trustAmount=e[r++];break;case Vo.signatureSubpacket.regularExpression:this.regularExpression=e[r];break;case Vo.signatureSubpacket.revocable:this.revocable=1===e[r++];break;case Vo.signatureSubpacket.keyExpirationTime:{const t=$o.readNumber(e.subarray(r,e.length));this.keyExpirationTime=t,this.keyNeverExpires=0===t;break}case Vo.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.revocationKey:this.revocationKeyClass=e[r++],this.revocationKeyAlgorithm=e[r++],this.revocationKeyFingerprint=e.subarray(r,r+20);break;case Vo.signatureSubpacket.issuer:this.issuerKeyID.read(e.subarray(r,e.length));break;case Vo.signatureSubpacket.notationData:{const t=!!(128&e[r]);r+=4;const i=$o.readNumber(e.subarray(r,r+2));r+=2;const a=$o.readNumber(e.subarray(r,r+2));r+=2;const o=$o.decodeUTF8(e.subarray(r,r+i)),s=e.subarray(r+i,r+i+a);this.rawNotations.push({name:o,humanReadable:t,value:s,critical:n}),t&&(this.notations[o]=$o.decodeUTF8(s));break}case Vo.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==e[r++];break;case Vo.signatureSubpacket.policyURI:this.policyURI=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.keyFlags:this.keyFlags=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.signersUserID:this.signersUserID=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=e[r++],this.reasonForRevocationString=$o.decodeUTF8(e.subarray(r,e.length));break;case Vo.signatureSubpacket.features:this.features=[...e.subarray(r,e.length)];break;case Vo.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=e[r++],this.signatureTargetHashAlgorithm=e[r++];const t=Af.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=$o.uint8ArrayToString(e.subarray(r,r+t));break}case Vo.signatureSubpacket.embeddedSignature:this.embeddedSignature=new zd,this.embeddedSignature.read(e.subarray(r,e.length));break;case Vo.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=e[r++],this.issuerFingerprint=e.subarray(r,e.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case Vo.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...e.subarray(r,e.length)];break;default:{const e=Error("Unknown signature subpacket type "+i);if(n)throw e;$o.printDebug(e)}}}readSubPackets(e,t=!0,r){const n=$o.readNumber(e.subarray(0,2));let i=2;for(;i<2+n;){const n=sl(e.subarray(i,e.length));i+=n.offset,this.readSubPacket(e.subarray(i,i+n.len),t,r),i+=n.len}return i}toSign(e,t){const r=Vo.signature;switch(e){case r.binary:return null!==t.text?$o.encodeUTF8(t.getText(!0)):t.getBytes(!0);case r.text:{const e=t.getBytes(!0);return $o.canonicalizeEOL(e)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let e,n;if(t.userID)n=180,e=t.userID;else{if(!t.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");n=209,e=t.userAttribute}const i=e.write();return $o.concat([this.toSign(r.key,t),new Uint8Array([n]),$o.writeNumber(i.length,4),i])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return $o.concat([this.toSign(r.key,t),this.toSign(r.key,{key:t.bind})]);case r.key:if(void 0===t.key)throw Error("Key packet is required for this signature.");return t.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,t);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(e,t){let r=0;return Ko(No(this.signatureData),(e=>{r+=e.length}),(()=>{const n=[];return 5!==this.version||this.signatureType!==Vo.signature.binary&&this.signatureType!==Vo.signature.text||(t?n.push(new Uint8Array(6)):n.push(e.writeHeader())),n.push(new Uint8Array([this.version,255])),5===this.version&&n.push(new Uint8Array(4)),n.push($o.writeNumber(r,4)),$o.concat(n)}))}toHash(e,t,r=!1){const n=this.toSign(e,t);return $o.concat([n,this.signatureData,this.calculateTrailer(t,r)])}async hash(e,t,r,n=!1){return r||(r=this.toHash(e,t,n)),Af.hash.digest(this.hashAlgorithm,r)}async verify(e,t,r,n=new Date,i=!1,a=os){if(!this.issuerKeyID.equals(e.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const o=t===Vo.signature.binary||t===Vo.signature.text;if(!this[Gd]||o){let n,a;if(this.hashed?a=await this.hashed:(n=this.toHash(t,r,i),a=await this.hash(t,r,n)),a=await zo(a),this.signedHashValue[0]!==a[0]||this.signedHashValue[1]!==a[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[Gd]=await Af.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,e.publicParams,n,a),!this[Gd])throw Error("Signature verification failed")}const s=$o.normalizeDate(n);if(s&&this.created>s)throw Error("Signature creation time is in the future");if(s&&s>=this.getExpirationTime())throw Error("Signature is expired");if(a.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+Vo.read(Vo.hash,this.hashAlgorithm).toUpperCase());if(a.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[Vo.signature.binary,Vo.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+Vo.read(Vo.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:e,critical:t})=>{if(t&&a.knownNotations.indexOf(e)<0)throw Error("Unknown critical notation: "+e)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(e=new Date){const t=$o.normalizeDate(e);return null!==t&&!(this.created<=t&&tzd.prototype.calculateTrailer.apply(await this.correspondingSig,e)))}async verify(){const e=await this.correspondingSig;if(!e||e.constructor.tag!==Vo.packet.signature)throw Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)}}function Jd(e,t){if(!t[e]){let r;try{r=Vo.read(Vo.packet,e)}catch(t){throw new pl("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+r)}return new t[e]}Zd.prototype.hash=zd.prototype.hash,Zd.prototype.toHash=zd.prototype.toHash,Zd.prototype.toSign=zd.prototype.toSign;class Vd extends Array{static async fromBinary(e,t,r=os){const n=new Vd;return await n.read(e,t,r),n}async read(e,t,r=os){r.additionalAllowedPackets.length&&(t={...t,...$o.constructAllowedPackets(r.additionalAllowedPackets)}),this.stream=Ho(e,(async(e,n)=>{const i=Fo(n);try{for(;;)if(await i.ready,await dl(e,(async e=>{try{if(e.tag===Vo.packet.marker||e.tag===Vo.packet.trust)return;const n=Jd(e.tag,t);n.packets=new Vd,n.fromStream=$o.isStream(e.packet),await n.read(e.packet,r),await i.write(n)}catch(t){const n=!r.ignoreUnsupportedPackets&&t instanceof pl,a=!(r.ignoreMalformedPackets||t instanceof pl);if(n||a||fl(e.tag))await i.abort(t);else{const t=new gl(e.tag,e.packet);await i.write(t)}$o.printDebugError(t)}})))return await i.ready,void await i.close()}catch(e){await i.abort(e)}}));const n=Ro(this.stream);for(;;){const{done:e,value:t}=await n.read();if(e?this.stream=null:this.push(t),e||fl(t.constructor.tag))break}n.releaseLock()}write(){const e=[];for(let t=0;t{if(t.push(e),i+=e.length,i>=a){const e=Math.min(Math.log(i)/Math.LN2|0,30),r=2**e,n=$o.concat([ul(e)].concat(t));return t=[n.subarray(1+r)],i=t[0].length,n.subarray(0,1+r)}}),(()=>$o.concat([cl(i)].concat(t)))))}else{if($o.isStream(n)){let t=0;e.push(Ko(No(n),(e=>{t+=e.length}),(()=>ll(r,t))))}else e.push(ll(r,n.length));e.push(n)}}return $o.concat(e)}filterByTag(...e){const t=new Vd,r=e=>t=>e===t;for(let n=0;nt.constructor.tag===e))}indexOfTag(...e){const t=[],r=this,n=e=>t=>e===t;for(let i=0;i>4)}read(e){let t=0;try{this.type=Vo.read(Vo.s2k,e[t++])}catch(e){throw new pl("Unknown S2K type.")}switch(this.algorithm=e[t++],this.type){case"simple":break;case"salted":this.salt=e.subarray(t,t+8),t+=8;break;case"iterated":this.salt=e.subarray(t,t+8),t+=8,this.c=e[t++];break;case"gnu":if("GNU"!==$o.uint8ArrayToString(e.subarray(t,t+3)))throw new pl("Unknown s2k type.");if(t+=3,1001!==1e3+e[t++])throw new pl("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw new pl("Unknown s2k type.")}return t}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...$o.stringToUint8Array("GNU"),1]);const e=[new Uint8Array([Vo.write(Vo.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return $o.concatUint8Array(e)}async produceKey(e,t){e=$o.encodeUTF8(e);const r=[];let n=0,i=0;for(;n{this.privateParams[e].fill(0),delete this.privateParams[e]})),this.privateParams=null,this.isEncrypted=!0)}}async function np(e,t,r){const{keySize:n}=Af.getCipher(r);return e.produceKey(t,n)}var ip=ic((function(e){!function(t){function r(e){function t(){return Ee0&&(t.semantic=" "),t}}function A(e,t){return function(){var n,a,s,u,h;for(u=r(),n=o("star"),s=0,h=void 0===t?0:t;null!==(a=e());)s+=1,c(n,a);return s>=h?n:(i(u),null)}}function y(e){return e.charCodeAt(0)>=128}function m(){return s("cr",h("\r")())}function b(){return s("crlf",l(m,I)())}function w(){return s("dquote",h('"')())}function v(){return s("htab",h("\t")())}function I(){return s("lf",h("\n")())}function E(){return s("sp",h(" ")())}function B(){return s("vchar",u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n})))}function C(){return s("wsp",f(E,v)())}function _(){var e=s("quoted-pair",f(l(h("\\"),f(B,C)),ne)());return null===e?null:(e.semantic=e.semantic[1],e)}function k(){return s("fws",f(ae,l(d(l(A(C),p(b))),A(C,1)))())}function S(){return s("ctext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=39||42<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),te)())}function Q(){return s("ccontent",f(S,_,x)())}function x(){return s("comment",l(h("("),A(l(d(k),Q)),d(k),h(")"))())}function P(){return s("cfws",f(l(A(l(d(k),x),1),d(k)),k)())}function M(){return s("atext",u((function(t){var r="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(r=r||y(t)),r})))}function U(){return s("atom",l(g(d(P)),A(M,1),g(d(P)))())}function D(){var e,t;return null===(e=s("dot-atom-text",A(M,1)()))||null!==(t=A(l(h("."),A(M,1)))())&&c(e,t),e}function R(){return s("dot-atom",l(p(d(P)),D,p(d(P)))())}function F(){return s("qtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33===r||35<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),re)())}function T(){return s("qcontent",f(F,_)())}function q(){return s("quoted-string",l(p(d(P)),p(w),A(l(d(g(k)),T)),d(p(k)),p(w),p(d(P)))())}function O(){return s("word",f(U,q)())}function K(){return s("address",f(H,G)())}function H(){return s("mailbox",f(N,X)())}function N(){return s("name-addr",l(d(j),L)())}function L(){return s("angle-addr",f(l(p(d(P)),h("<"),X,h(">"),p(d(P))),oe)())}function G(){return s("group",l(j,h(":"),d(Z),h(";"),p(d(P)))())}function j(){return s("display-name",(null!==(e=s("phrase",f(ie,A(O,1))()))&&(e.semantic=function(e){return e.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(e.semantic)),e));var e}function z(){return s("mailbox-list",f(l(H,A(l(h(","),H))),ue)())}function W(){return s("address-list",f(l(K,A(l(h(","),K))),he)())}function Z(){return s("group-list",f(z,p(P),le)())}function J(){return s("local-part",f(fe,R,q)())}function V(){return s("dtext",f((function(){return u((function(t){var r=t.charCodeAt(0),n=33<=r&&r<=90||94<=r&&r<=126;return e.rfc6532&&(n=n||y(t)),n}))}),pe)())}function Y(){return s("domain-literal",l(p(d(P)),h("["),A(l(d(k),V)),d(k),h("]"),p(d(P)))())}function $(){return s("domain",(t=f(de,R,Y)(),e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)));var t}function X(){return s("addr-spec",l(J,h("@"),$)())}function ee(){return e.strict?null:s("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function te(){return e.strict?null:s("obs-ctext",ee())}function re(){return e.strict?null:s("obs-qtext",ee())}function ne(){return e.strict?null:s("obs-qp",l(h("\\"),f(h("\0"),ee,I,m))())}function ie(){return e.strict?null:e.atInDisplayName?s("obs-phrase",l(O,A(f(O,h("."),h("@"),g(P))))()):s("obs-phrase",l(O,A(f(O,h("."),g(P))))())}function ae(){return e.strict?null:s("obs-FWS",A(l(p(d(b)),C),1)())}function oe(){return e.strict?null:s("obs-angle-addr",l(p(d(P)),h("<"),se,X,h(">"),p(d(P)))())}function se(){return e.strict?null:s("obs-route",l(ce,h(":"))())}function ce(){return e.strict?null:s("obs-domain-list",l(A(f(p(P),h(","))),h("@"),$,A(l(h(","),p(d(P)),d(l(h("@"),$)))))())}function ue(){return e.strict?null:s("obs-mbox-list",l(A(l(p(d(P)),h(","))),H,A(l(h(","),d(l(H,p(P))))))())}function he(){return e.strict?null:s("obs-addr-list",l(A(l(p(d(P)),h(","))),K,A(l(h(","),d(l(K,p(P))))))())}function le(){return e.strict?null:s("obs-group-list",l(A(l(p(d(P)),h(",")),1),p(d(P)))())}function fe(){return e.strict?null:s("obs-local-part",l(O,A(l(h("."),O)))())}function de(){return e.strict?null:s("obs-domain",l(U,A(l(h("."),U)))())}function pe(){return e.strict?null:s("obs-dtext",f(ee,_)())}function ge(e,t){var r,n,i;if(null==t)return null;for(n=[t];n.length>0;){if((i=n.pop()).name===e)return i;for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r])}return null}function Ae(e,t){var r,n,i,a,o;if(null==t)return null;for(n=[t],a=[],o={},r=0;r0;)if((i=n.pop()).name in o)a.push(i);else for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}function ye(t){var r,n,i,a,o;if(null===t)return null;for(r=[],n=Ae(["group","mailbox"],t),i=0;i1?null:t.addresses&&t.addresses[0]:null}(o):e.simple?o&&o.addresses:o}function me(e){var t,r=ge("display-name",e),n=[],i=Ae(["mailbox"],e);for(t=0;t0;)for("cfws"===(i=n.pop()).name&&a.push(i),r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}(0,e),i=Ae(["comment"],e),a=ge("local-part",r),o=ge("domain",r);return{node:e,parts:{name:t,address:r,local:a,domain:o,comments:n},type:e.name,name:we(t),address:we(r),local:we(a),domain:we(o),comments:ve(i),groupName:we(e.groupName)}}function we(e){return null!=e?e.semantic:null}function ve(e){var t="";if(e)for(var r=0;r`),t.userID=r.join(" "),t}read(e,t=os){const r=$o.decodeUTF8(e);if(r.length>t.maxUserIDLength)throw Error("User ID string is too long");try{const{name:e,address:t,comments:n}=ip.parseOneAddress({input:r,atInDisplayName:!0});this.comment=n.replace(/^\(|\)$/g,""),this.name=e,this.email=t}catch(e){}this.userID=r}write(){return $o.encodeUTF8(this.userID)}equals(e){return e&&e.userID===this.userID}}class op extends rp{static get tag(){return Vo.packet.secretSubkey}constructor(e=new Date,t=os){super(e,t)}}async function sp(e,t,r,n,i=new Date,a){let o,s;for(let c=e.length-1;c>=0;c--)try{(!o||e[c].created>=o.created)&&(await e[c].verify(t,r,n,i,void 0,a),o=e[c])}catch(e){s=e}if(!o)throw $o.wrapError(`Could not find valid ${Vo.read(Vo.signature,r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((e,t,r)=>t+" "+r.toLowerCase())),s);return o}function cp(e,t,r=new Date){const n=$o.normalizeDate(r);if(null!==n){const r=fp(e,t);return!(e.created<=n&&ne.equals(i.issuerKeyID)))||i.revoked||!1,i.revoked):c.length>0}function fp(e,t){let r;return!1===t.keyNeverExpires&&(r=e.created.getTime()+1e3*t.keyExpirationTime),r?new Date(r):1/0}function dp(e,t){const r=e.algorithm;return r!==Vo.publicKey.rsaEncrypt&&r!==Vo.publicKey.elgamal&&r!==Vo.publicKey.ecdh&&r!==Vo.publicKey.x25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Vo.keyFlags.signData))}function pp(e,t){const r=e.algorithm;return r!==Vo.publicKey.dsa&&r!==Vo.publicKey.rsaSign&&r!==Vo.publicKey.ecdsa&&r!==Vo.publicKey.eddsaLegacy&&r!==Vo.publicKey.ed25519&&(!t.keyFlags||0!=(t.keyFlags[0]&Vo.keyFlags.encryptCommunication)||0!=(t.keyFlags[0]&Vo.keyFlags.encryptStorage))}function gp(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||!e.keyFlags||0!=(e.keyFlags[0]&Vo.keyFlags.encryptCommunication)||0!=(e.keyFlags[0]&Vo.keyFlags.encryptStorage)}function Ap(e,t){const r=Vo.write(Vo.publicKey,e.algorithm),n=e.getAlgorithmInfo();if(t.rejectPublicKeyAlgorithms.has(r))throw Error(n.algorithm+" keys are considered too weak.");switch(r){case Vo.publicKey.rsaEncryptSign:case Vo.publicKey.rsaSign:case Vo.publicKey.rsaEncrypt:if(n.bitse.getKeys(s).length>0));return 0===c.length?null:(await Promise.all(c.map((async t=>{const a=await t.getSigningKey(s,e.created,void 0,n);if(e.revoked||await i.isRevoked(e,a.keyPacket,r,n))throw Error("User certificate is revoked");try{await e.verify(a.keyPacket,Vo.signature.certGeneric,o,r,void 0,n)}catch(e){throw $o.wrapError("User certificate is invalid",e)}}))),!0)}async verifyAllCertifications(e,t=new Date,r){const n=this,i=this.selfCertifications.concat(this.otherCertifications);return Promise.all(i.map((async i=>({keyID:i.issuerKeyID,valid:await n.verifyCertificate(i,e,t,r).catch((()=>!1))}))))}async verify(e=new Date,t){if(!this.selfCertifications.length)throw Error("No self-certifications found");const r=this,n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};let a;for(let o=this.selfCertifications.length-1;o>=0;o--)try{const a=this.selfCertifications[o];if(a.revoked||await r.isRevoked(a,void 0,e,t))throw Error("Self-certification is revoked");try{await a.verify(n,Vo.signature.certGeneric,i,e,void 0,t)}catch(e){throw $o.wrapError("Self-certification is invalid",e)}return!0}catch(e){a=e}throw a}async update(e,t,r){const n=this.mainKey.keyPacket,i={userID:this.userID,userAttribute:this.userAttribute,key:n};await hp(e,this,"selfCertifications",t,(async function(e){try{return await e.verify(n,Vo.signature.certGeneric,i,t,!1,r),!0}catch(e){return!1}})),await hp(e,this,"otherCertifications",t),await hp(e,this,"revocationSignatures",t,(function(e){return lp(n,Vo.signature.certRevocation,i,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Vo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=os){const a={userID:this.userID,userAttribute:this.userAttribute,key:e},o=new yp(a.userID||a.userAttribute,this.mainKey);return o.revocationSignatures.push(await up(a,null,e,{signatureType:Vo.signature.certRevocation,reasonForRevocationFlag:Vo.write(Vo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}}class mp{constructor(e,t){this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=t}toPacketList(){const e=new Vd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.bindingSignatures),e}clone(){const e=new mp(this.keyPacket,this.mainKey);return e.bindingSignatures=[...this.bindingSignatures],e.revocationSignatures=[...this.revocationSignatures],e}async isRevoked(e,t,r=new Date,n=os){const i=this.mainKey.keyPacket;return lp(i,Vo.signature.subkeyRevocation,{key:i,bind:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verify(e=new Date,t=os){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket},i=await sp(this.bindingSignatures,r,Vo.signature.subkeyBinding,n,e,t);if(i.revoked||await this.isRevoked(i,null,e,t))throw Error("Subkey is revoked");if(cp(this.keyPacket,i,e))throw Error("Subkey is expired");return i}async getExpirationTime(e=new Date,t=os){const r=this.mainKey.keyPacket,n={key:r,bind:this.keyPacket};let i;try{i=await sp(this.bindingSignatures,r,Vo.signature.subkeyBinding,n,e,t)}catch(e){return null}const a=fp(this.keyPacket,i),o=i.getExpirationTime();return ai.bindingSignatures[t].created&&(i.bindingSignatures[t]=e),!1;try{return await e.verify(n,Vo.signature.subkeyBinding,a,t,void 0,r),!0}catch(e){return!1}})),await hp(e,this,"revocationSignatures",t,(function(e){return lp(n,Vo.signature.subkeyRevocation,a,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=Vo.reasonForRevocation.noReason,string:r=""}={},n=new Date,i=os){const a={key:e,bind:this.keyPacket},o=new mp(this.keyPacket,this.mainKey);return o.revocationSignatures.push(await up(a,null,e,{signatureType:Vo.signature.subkeyRevocation,reasonForRevocationFlag:Vo.write(Vo.reasonForRevocation,t),reasonForRevocationString:r},n,void 0,void 0,!1,i)),await o.update(this),o}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((e=>{mp.prototype[e]=function(){return this.keyPacket[e]()}}));const bp=$o.constructAllowedPackets([zd]),wp=new Set([Vo.packet.publicKey,Vo.packet.privateKey]),vp=new Set([Vo.packet.publicKey,Vo.packet.privateKey,Vo.packet.publicSubkey,Vo.packet.privateSubkey]);class Ip{packetListToStructure(e,t=new Set){let r,n,i,a;for(const o of e){if(o instanceof gl){vp.has(o.tag)&&!a&&(a=wp.has(o.tag)?wp:vp);continue}const e=o.constructor.tag;if(a){if(!a.has(e))continue;a=null}if(t.has(e))throw Error("Unexpected packet type: "+e);switch(e){case Vo.packet.publicKey:case Vo.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=o,n=this.getKeyID(),!n)throw Error("Missing Key ID");break;case Vo.packet.userID:case Vo.packet.userAttribute:r=new yp(o,this),this.users.push(r);break;case Vo.packet.publicSubkey:case Vo.packet.secretSubkey:r=null,i=new mp(o,this),this.subkeys.push(i);break;case Vo.packet.signature:switch(o.signatureType){case Vo.signature.certGeneric:case Vo.signature.certPersona:case Vo.signature.certCasual:case Vo.signature.certPositive:if(!r){$o.printDebug("Dropping certification signatures without preceding user packet");continue}o.issuerKeyID.equals(n)?r.selfCertifications.push(o):r.otherCertifications.push(o);break;case Vo.signature.certRevocation:r?r.revocationSignatures.push(o):this.directSignatures.push(o);break;case Vo.signature.key:this.directSignatures.push(o);break;case Vo.signature.subkeyBinding:if(!i){$o.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}i.bindingSignatures.push(o);break;case Vo.signature.keyRevocation:this.revocationSignatures.push(o);break;case Vo.signature.subkeyRevocation:if(!i){$o.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}i.revocationSignatures.push(o)}}}}toPacketList(){const e=new Vd;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map((t=>e.push(...t.toPacketList()))),this.subkeys.map((t=>e.push(...t.toPacketList()))),e}clone(e=!1){const t=new this.constructor(this.toPacketList());return e&&t.getKeys().forEach((e=>{if(e.keyPacket=Object.create(Object.getPrototypeOf(e.keyPacket),Object.getOwnPropertyDescriptors(e.keyPacket)),!e.keyPacket.isDecrypted())return;const t={};Object.keys(e.keyPacket.privateParams).forEach((r=>{t[r]=new Uint8Array(e.keyPacket.privateParams[r])})),e.keyPacket.privateParams=t})),t}getSubkeys(e=null){return this.subkeys.filter((t=>!e||t.getKeyID().equals(e,!0)))}getKeys(e=null){const t=[];return e&&!this.getKeyID().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map((e=>e.getKeyID()))}getUserIDs(){return this.users.map((e=>e.userID?e.userID.userID:null)).filter((e=>null!==e))}write(){return this.toPacketList().write()}async getSigningKey(e=null,t=new Date,r={},n=os){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await sp(r.bindingSignatures,i,Vo.signature.subkeyBinding,e,t,n);if(!dp(r.keyPacket,a))continue;if(!a.embeddedSignature)throw Error("Missing embedded signature");return await sp([a.embeddedSignature],r.keyPacket,Vo.signature.keyBinding,e,t,n),Ap(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&dp(i,a.selfCertification))return Ap(i,n),this}catch(e){o=e}throw $o.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),o)}async getEncryptionKey(e,t=new Date,r={},n=os){await this.verifyPrimaryKey(t,r,n);const i=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let o;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,n);const e={key:i,bind:r.keyPacket},a=await sp(r.bindingSignatures,i,Vo.signature.subkeyBinding,e,t,n);if(pp(r.keyPacket,a))return Ap(r.keyPacket,n),r}catch(e){o=e}try{const a=await this.getPrimaryUser(t,r,n);if((!e||i.getKeyID().equals(e))&&pp(i,a.selfCertification))return Ap(i,n),this}catch(e){o=e}throw $o.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),o)}async isRevoked(e,t,r=new Date,n=os){return lp(this.keyPacket,Vo.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,t,r,n)}async verifyPrimaryKey(e=new Date,t={},r=os){const n=this.keyPacket;if(await this.isRevoked(null,null,e,r))throw Error("Primary key is revoked");const{selfCertification:i}=await this.getPrimaryUser(e,t,r);if(cp(n,i,e))throw Error("Primary key is expired");const a=await sp(this.directSignatures,n,Vo.signature.key,{key:n},e,r).catch((()=>{}));if(a&&cp(n,a,e))throw Error("Primary key is expired")}async getExpirationTime(e,t=os){let r;try{const{selfCertification:n}=await this.getPrimaryUser(null,e,t),i=fp(this.keyPacket,n),a=n.getExpirationTime(),o=await sp(this.directSignatures,this.keyPacket,Vo.signature.key,{key:this.keyPacket},null,t).catch((()=>{}));if(o){const e=fp(this.keyPacket,o);r=Math.min(i,a,e)}else r=ie.subkeys.some((e=>t.hasSameFingerprintAs(e))))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,r)}const n=this.clone();return await hp(e,n,"revocationSignatures",t,(i=>lp(n.keyPacket,Vo.signature.keyRevocation,n,[i],null,e.keyPacket,t,r))),await hp(e,n,"directSignatures",t),await Promise.all(e.users.map((async e=>{const i=n.users.filter((t=>e.userID&&e.userID.equals(t.userID)||e.userAttribute&&e.userAttribute.equals(t.userAttribute)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.users.push(t)}}))),await Promise.all(e.subkeys.map((async e=>{const i=n.subkeys.filter((t=>t.hasSameFingerprintAs(e)));if(i.length>0)await Promise.all(i.map((n=>n.update(e,t,r))));else{const t=e.clone();t.mainKey=n,n.subkeys.push(t)}}))),n}async getRevocationCertificate(e=new Date,t=os){const r={key:this.keyPacket},n=await sp(this.revocationSignatures,this.keyPacket,Vo.signature.keyRevocation,r,e,t),i=new Vd;return i.push(n),gs(Vo.armor.publicKey,i.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,t=new Date,r=os){const n=await ps(e,r),i=(await Vd.fromBinary(n.data,bp,r)).findPacket(Vo.packet.signature);if(!i||i.signatureType!==Vo.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!i.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await i.verify(this.keyPacket,Vo.signature.keyRevocation,{key:this.keyPacket},t,void 0,r)}catch(e){throw $o.wrapError("Could not verify revocation signature",e)}const a=this.clone();return a.revocationSignatures.push(i),a}async signPrimaryUser(e,t,r,n=os){const{index:i,user:a}=await this.getPrimaryUser(t,r,n),o=await a.certify(e,t,n),s=this.clone();return s.users[i]=o,s}async signAllUsers(e,t=new Date,r=os){const n=this.clone();return n.users=await Promise.all(this.users.map((function(n){return n.certify(e,t,r)}))),n}async verifyPrimaryUser(e,t=new Date,r,n=os){const i=this.keyPacket,{user:a}=await this.getPrimaryUser(t,r,n);return e?await a.verifyAllCertifications(e,t,n):[{keyID:i.getKeyID(),valid:await a.verify(t,n).catch((()=>!1))}]}async verifyAllUsers(e,t=new Date,r=os){const n=this.keyPacket,i=[];return await Promise.all(this.users.map((async a=>{const o=e?await a.verifyAllCertifications(e,t,r):[{keyID:n.getKeyID(),valid:await a.verify(t,r).catch((()=>!1))}];i.push(...o.map((e=>({userID:a.userID?a.userID.userID:null,userAttribute:a.userAttribute,keyID:e.keyID,valid:e.valid}))))}))),i}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((e=>{Ip.prototype[e]=mp.prototype[e]}));class Ep extends Ip{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([Vo.packet.secretKey,Vo.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=os){return gs(Vo.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class Bp extends Ep{constructor(e){if(super(),this.packetListToStructure(e,new Set([Vo.packet.publicKey,Vo.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new Vd,t=this.toPacketList();for(const r of t)switch(r.constructor.tag){case Vo.packet.secretKey:{const t=Xd.fromSecretKeyPacket(r);e.push(t);break}case Vo.packet.secretSubkey:{const t=ep.fromSecretSubkeyPacket(r);e.push(t);break}default:e.push(r)}return new Ep(e)}armor(e=os){return gs(Vo.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,t=new Date,r={},n=os){const i=this.keyPacket,a=[];for(let r=0;re.isDecrypted()))}async validate(e=os){if(!this.isPrivate())throw Error("Cannot validate a public key");let t;if(this.keyPacket.isDummy()){const r=await this.getSigningKey(null,null,void 0,{...e,rejectPublicKeyAlgorithms:new Set,minRSABits:0});r&&!r.keyPacket.isDummy()&&(t=r.keyPacket)}else t=this.keyPacket;if(t)return t.validate();{const e=this.getKeys(),t=e.map((e=>e.keyPacket.isDummy())).every(Boolean);if(t)throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(e.map((async e=>e.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()}))}async revoke({flag:e=Vo.reasonForRevocation.noReason,string:t=""}={},r=new Date,n=os){if(!this.isPrivate())throw Error("Need private key for revoking");const i={key:this.keyPacket},a=this.clone();return a.revocationSignatures.push(await up(i,null,this.keyPacket,{signatureType:Vo.signature.keyRevocation,reasonForRevocationFlag:Vo.write(Vo.reasonForRevocation,e),reasonForRevocationString:t},r,void 0,void 0,void 0,n)),a}async addSubkey(e={}){const t={...os,...e.config};if(e.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(e.rsaBits0&&(a.keyExpirationTime=r.keyExpirationTime,a.keyNeverExpires=!1),await up(i,null,t,a,r.date,void 0,void 0,void 0,n)}(i,r,e,t),o=this.toPacketList();return o.push(i,a),new Bp(o)}}const Cp=$o.constructAllowedPackets([Xd,ep,rp,op,ap,tp,zd]);async function _p({armoredKey:e,binaryKey:t,config:r,...n}){if(r={...os,...r},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!$o.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!$o.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const i=Object.keys(n);if(i.length>0)throw Error("Unknown option: "+i.join(", "));let a;if(e){const{type:t,data:n}=await ps(e,r);if(t!==Vo.armor.publicKey&&t!==Vo.armor.privateKey)throw Error("Armored text not of type key");a=n}else a=t;return function(e){for(const t of e)switch(t.constructor.tag){case Vo.packet.secretKey:return new Bp(e);case Vo.packet.publicKey:return new Ep(e)}throw Error("No key packet found")}(await Vd.fromBinary(a,Cp,r))}Object.keys(os).length;const kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function Sp(){}const Qp="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function xp(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Pp=Sp,Mp=Promise,Up=Promise.prototype.then,Dp=Promise.resolve.bind(Mp),Rp=Promise.reject.bind(Mp);function Fp(e){return new Mp(e)}function Tp(e){return Dp(e)}function qp(e){return Rp(e)}function Op(e,t,r){return Up.call(e,t,r)}function Kp(e,t,r){Op(Op(e,t,r),void 0,Pp)}function Hp(e,t){Kp(e,t)}function Np(e,t){Kp(e,void 0,t)}function Lp(e,t,r){return Op(e,t,r)}function Gp(e){Op(e,void 0,Pp)}const jp=(()=>{const e=Qp&&Qp.queueMicrotask;if("function"==typeof e)return e;const t=Tp(void 0);return e=>Op(t,e)})();function zp(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Wp(e,t,r){try{return Tp(zp(e,t,r))}catch(e){return qp(e)}}class Zp{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,a=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}function Jp(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?Xp(e):"closed"===t._state?function(e){Xp(e),rg(e)}(e):eg(e,t._storedError)}function Vp(e,t){return Py(e._ownerReadableStream,t)}function Yp(e){"readable"===e._ownerReadableStream._state?tg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){eg(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function $p(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Xp(e){e._closedPromise=Fp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function eg(e,t){Xp(e),tg(e,t)}function tg(e,t){void 0!==e._closedPromise_reject&&(Gp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function rg(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const ng=kp("[[AbortSteps]]"),ig=kp("[[ErrorSteps]]"),ag=kp("[[CancelSteps]]"),og=kp("[[PullSteps]]"),sg=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},cg=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function ug(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(t+" is not an object.");var r}function hg(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function lg(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function fg(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function dg(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function pg(e){return Number(e)}function gg(e){return 0===e?0:e}function Ag(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=gg(n),!sg(n))throw new TypeError(t+" is not a finite number");if(n=function(e){return gg(cg(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return sg(n)&&0!==n?n:0}function yg(e,t){if(!Qy(e))throw new TypeError(t+" is not a ReadableStream.")}function mg(e){return new Eg(e)}function bg(e,t){e._reader._readRequests.push(t)}function wg(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function vg(e){return e._reader._readRequests.length}function Ig(e){const t=e._reader;return void 0!==t&&!!Bg(t)}class Eg{constructor(e){if(fg(e,1,"ReadableStreamDefaultReader"),yg(e,"First parameter"),xy(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Jp(this,e),this._readRequests=new Zp}get closed(){return Bg(this)?this._closedPromise:qp(_g("closed"))}cancel(e=void 0){return Bg(this)?void 0===this._ownerReadableStream?qp($p("cancel")):Vp(this,e):qp(_g("cancel"))}read(){if(!Bg(this))return qp(_g("read"));if(void 0===this._ownerReadableStream)return qp($p("read from"));let e,t;const r=Fp(((r,n)=>{e=r,t=n}));return Cg(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!Bg(this))throw _g("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Yp(this)}}}function Bg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function Cg(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[og](t)}function _g(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let kg;Object.defineProperties(Eg.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Eg.prototype,kp.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof kp.asyncIterator&&(kg={[kp.asyncIterator](){return this}},Object.defineProperty(kg,kp.asyncIterator,{enumerable:!1}));class Sg{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Lp(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Lp(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(void 0===e._ownerReadableStream)return qp($p("iterate"));let t,r;const n=Fp(((e,n)=>{t=e,r=n}));return Cg(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,jp((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Yp(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,Yp(e),r(t)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t._ownerReadableStream)return qp($p("finish iterating"));if(!this._preventCancel){const r=Vp(t,e);return Yp(t),Lp(r,(()=>({value:e,done:!0})))}return Yp(t),Tp({value:e,done:!0})}}const Qg={next(){return xg(this)?this._asyncIteratorImpl.next():qp(Pg("next"))},return(e){return xg(this)?this._asyncIteratorImpl.return(e):qp(Pg("return"))}};function xg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function Pg(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}void 0!==kg&&Object.setPrototypeOf(Qg,kg);const Mg=Number.isNaN||function(e){return e!=e};function Ug(e){return!!function(e){return"number"==typeof e&&(!Mg(e)&&!(e<0))}(e)&&e!==1/0}function Dg(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Rg(e,t,r){if(!Ug(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Fg(e){e._queue=new Zp,e._queueTotalSize=0}function Tg(e){return e.slice()}class qg{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Hg(this))throw rA("view");return this._view}respond(e){if(!Hg(this))throw rA("respond");if(fg(e,1,"respond"),e=Ag(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!Ug(t=Number(t)))throw new RangeError("bytesWritten must be a finite");Yg(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Hg(this))throw rA("respondWithNewView");if(fg(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){const r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,Yg(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(qg.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(qg.prototype,kp.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Og{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Kg(this))throw nA("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(qg.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest}get desiredSize(){if(!Kg(this))throw nA("desiredSize");return tA(this)}close(){if(!Kg(this))throw nA("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw eA(e,t),t}Xg(e),My(t)}}(this)}enqueue(e){if(!Kg(this))throw nA("enqueue");if(fg(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,a=t.byteLength,o=n;Ig(r)?0===vg(r)?jg(e,o,i,a):wg(r,new Uint8Array(o,i,a),!1):oA(r)?(jg(e,o,i,a),Vg(e)):jg(e,o,i,a),Ng(e)}(this,e)}error(e=void 0){if(!Kg(this))throw nA("error");eA(this,e)}[ag](e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),Fg(this);const t=this._cancelAlgorithm(e);return Xg(this),t}[og](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();this._queueTotalSize-=t.byteLength,Zg(this);const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return void e._chunkSteps(r)}const r=this._autoAllocateChunkSize;if(void 0!==r){let n;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:n,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}bg(t,e),Ng(this)}}function Kg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Hg(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Ng(e){const t=function(e){const t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Ig(t)&&vg(t)>0)return!0;if(oA(t)&&aA(t)>0)return!0;return tA(e)>0}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Kp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Ng(e))}),(t=>{eA(e,t)}))))}function Lg(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=Gg(t);"default"===t.readerType?wg(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Gg(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function jg(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function zg(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r;let s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);const u=e._queue;for(;s>0;){const r=u.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;h=t.buffer,l=i,f=r.buffer,d=r.byteOffset,p=n,new Uint8Array(h).set(new Uint8Array(f,d,p),l),r.byteLength===n?u.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,Wg(e,n,t),s-=n}var h,l,f,d,p;return c}function Wg(e,t,r){Jg(e),r.bytesFilled+=t}function Zg(e){0===e._queueTotalSize&&e._closeRequested?(Xg(e),My(e._controlledReadableByteStream)):Ng(e)}function Jg(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Vg(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();zg(e,t)&&($g(e),Lg(e._controlledReadableByteStream,t))}}function Yg(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=t.buffer;const r=e._controlledReadableByteStream;if(oA(r))for(;aA(r)>0;)Lg(r,$g(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Wg(e,t,r),r.bytesFilled0){const t=r.byteOffset+r.bytesFilled,i=r.buffer.slice(t-n,t);jg(e,i,0,i.byteLength)}r.buffer=r.buffer,r.bytesFilled-=n,Lg(e._controlledReadableByteStream,r),Vg(e)}(e,t,r);Ng(e)}function $g(e){const t=e._pendingPullIntos.shift();return Jg(e),t}function Xg(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function eA(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(function(e){Jg(e),e._pendingPullIntos=new Zp}(e),Fg(e),Xg(e),Uy(r,t))}function tA(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function rA(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function nA(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function iA(e,t){e._reader._readIntoRequests.push(t)}function aA(e){return e._reader._readIntoRequests.length}function oA(e){const t=e._reader;return void 0!==t&&!!cA(t)}Object.defineProperties(Og.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Og.prototype,kp.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class sA{constructor(e){if(fg(e,1,"ReadableStreamBYOBReader"),yg(e,"First parameter"),xy(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Kg(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Jp(this,e),this._readIntoRequests=new Zp}get closed(){return cA(this)?this._closedPromise:qp(uA("closed"))}cancel(e=void 0){return cA(this)?void 0===this._ownerReadableStream?qp($p("cancel")):Vp(this,e):qp(uA("cancel"))}read(e){if(!cA(this))return qp(uA("read"));if(!ArrayBuffer.isView(e))return qp(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return qp(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return qp(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return qp($p("read from"));let t,r;const n=Fp(((e,n)=>{t=e,r=n}));return function(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,o={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),void iA(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(zg(e,o)){const t=Gg(o);return Zg(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return eA(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(o),iA(n,r),Ng(e)}else{const e=new a(o.buffer,o.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!cA(this))throw uA("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Yp(this)}}}function cA(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function uA(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function hA(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(Mg(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function lA(e){const{size:t}=e;return t||(()=>1)}function fA(e,t){ug(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:pg(r),size:void 0===n?void 0:dA(n,t+" has member 'size' that")}}function dA(e,t){return hg(e,t),t=>pg(e(t))}function pA(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function gA(e,t,r){return hg(e,r),()=>Wp(e,t,[])}function AA(e,t,r){return hg(e,r),r=>zp(e,t,[r])}function yA(e,t,r){return hg(e,r),(r,n)=>Wp(e,t,[r,n])}function mA(e,t){if(!IA(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(sA.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(sA.prototype,kp.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class bA{constructor(e={},t={}){void 0===e?e=null:lg(e,"First parameter");const r=fA(t,"Second parameter"),n=function(e,t){ug(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,a=null==e?void 0:e.type,o=null==e?void 0:e.write;return{abort:void 0===r?void 0:pA(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:gA(n,e,t+" has member 'close' that"),start:void 0===i?void 0:AA(i,e,t+" has member 'start' that"),write:void 0===o?void 0:yA(o,e,t+" has member 'write' that"),type:a}}(e,"First parameter");if(vA(this),void 0!==n.type)throw new RangeError("Invalid type is specified");const i=lA(r);!function(e,t,r,n){const i=Object.create(OA.prototype);let a=()=>{},o=()=>Tp(void 0),s=()=>Tp(void 0),c=()=>Tp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.write&&(o=e=>t.write(e,i)),void 0!==t.close&&(s=()=>t.close()),void 0!==t.abort&&(c=e=>t.abort(e)),KA(e,i,a,o,s,c,r,n)}(this,n,hA(r,1),i)}get locked(){if(!IA(this))throw WA("locked");return EA(this)}abort(e=void 0){return IA(this)?EA(this)?qp(new TypeError("Cannot abort a stream that already has a writer")):BA(this,e):qp(WA("abort"))}close(){return IA(this)?EA(this)?qp(new TypeError("Cannot close a stream that already has a writer")):QA(this)?qp(new TypeError("Cannot close an already-closing stream")):CA(this):qp(WA("close"))}getWriter(){if(!IA(this))throw WA("getWriter");return wA(this)}}function wA(e){return new MA(e)}function vA(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new Zp,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function IA(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function EA(e){return void 0!==e._writer}function BA(e,t){const r=e._state;if("closed"===r||"errored"===r)return Tp(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let n=!1;"erroring"===r&&(n=!0,t=void 0);const i=Fp(((r,i)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,n||kA(e,t),i}function CA(e){const t=e._state;if("closed"===t||"errored"===t)return qp(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=Fp(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&iy(n),Rg(i=e._writableStreamController,qA,0),LA(i),r}function _A(e,t){"writable"!==e._state?SA(e):kA(e,t)}function kA(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&RA(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&SA(e)}function SA(e){e._state="errored",e._writableStreamController[ig]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Zp,void 0===e._pendingAbortRequest)return void xA(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void xA(e);Kp(e._writableStreamController[ng](r._reason),(()=>{r._resolve(),xA(e)}),(t=>{r._reject(t),xA(e)}))}function QA(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function xA(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&$A(t,e._storedError)}function PA(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){ey(e)}(r):iy(r)),e._backpressure=t}Object.defineProperties(bA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(bA.prototype,kp.toStringTag,{value:"WritableStream",configurable:!0});class MA{constructor(e){if(fg(e,1,"WritableStreamDefaultWriter"),mA(e,"First parameter"),EA(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!QA(e)&&e._backpressure?ey(this):ry(this),VA(this);else if("erroring"===t)ty(this,e._storedError),VA(this);else if("closed"===t)ry(this),VA(this),XA(this);else{const t=e._storedError;ty(this,t),YA(this,t)}}get closed(){return UA(this)?this._closedPromise:qp(ZA("closed"))}get desiredSize(){if(!UA(this))throw ZA("desiredSize");if(void 0===this._ownerWritableStream)throw JA("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:NA(t._writableStreamController)}(this)}get ready(){return UA(this)?this._readyPromise:qp(ZA("ready"))}abort(e=void 0){return UA(this)?void 0===this._ownerWritableStream?qp(JA("abort")):function(e,t){return BA(e._ownerWritableStream,t)}(this,e):qp(ZA("abort"))}close(){if(!UA(this))return qp(ZA("close"));const e=this._ownerWritableStream;return void 0===e?qp(JA("close")):QA(e)?qp(new TypeError("Cannot close an already-closing stream")):DA(this)}releaseLock(){if(!UA(this))throw ZA("releaseLock");void 0!==this._ownerWritableStream&&FA(this)}write(e=void 0){return UA(this)?void 0===this._ownerWritableStream?qp(JA("write to")):TA(this,e):qp(ZA("write"))}}function UA(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function DA(e){return CA(e._ownerWritableStream)}function RA(e,t){"pending"===e._readyPromiseState?ny(e,t):function(e,t){ty(e,t)}(e,t)}function FA(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");RA(e,r),function(e,t){"pending"===e._closedPromiseState?$A(e,t):function(e,t){YA(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function TA(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return GA(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return qp(JA("write to"));const a=r._state;if("errored"===a)return qp(r._storedError);if(QA(r)||"closed"===a)return qp(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return qp(r._storedError);const o=function(e){return Fp(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{Rg(e,t,r)}catch(t){return void GA(e,t)}const n=e._controlledWritableStream;QA(n)||"writable"!==n._state||PA(n,jA(e)),LA(e)}(n,t,i),o}Object.defineProperties(MA.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(MA.prototype,kp.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const qA={};class OA{constructor(){throw new TypeError("Illegal constructor")}error(e=void 0){if(!function(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&zA(this,e)}[ng](e){const t=this._abortAlgorithm(e);return HA(this),t}[ig](){Fg(this)}}function KA(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Fg(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;const c=jA(t);PA(e,c),Kp(Tp(r()),(()=>{t._started=!0,LA(t)}),(r=>{t._started=!0,_A(e,r)}))}function HA(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function NA(e){return e._strategyHWM-e._queueTotalSize}function LA(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void SA(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===qA?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Dg(e);const r=e._closeAlgorithm();HA(e),Kp(r,(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&XA(t)}(t)}),(e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),_A(e,t)}(t,e)}))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r);Kp(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(Dg(e),!QA(r)&&"writable"===t){const t=jA(e);PA(r,t)}LA(e)}),(t=>{"writable"===r._state&&HA(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,_A(e,t)}(r,t)}))}(e,r)}function GA(e,t){"writable"===e._controlledWritableStream._state&&zA(e,t)}function jA(e){return NA(e)<=0}function zA(e,t){const r=e._controlledWritableStream;HA(e),kA(r,t)}function WA(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function ZA(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function JA(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function VA(e){e._closedPromise=Fp(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function YA(e,t){VA(e),$A(e,t)}function $A(e,t){void 0!==e._closedPromise_reject&&(Gp(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function XA(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function ey(e){e._readyPromise=Fp(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function ty(e,t){ey(e),ny(e,t)}function ry(e){ey(e),iy(e)}function ny(e,t){void 0!==e._readyPromise_reject&&(Gp(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function iy(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(OA.prototype,{error:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(OA.prototype,kp.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const ay="undefined"!=typeof DOMException?DOMException:void 0,oy=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(ay)?ay:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(e.prototype=Object.create(Error.prototype),"constructor",{value:e,writable:!0,configurable:!0}),e}();function sy(e,t,r,n,i,a){const o=mg(e),s=wA(t);e._disturbed=!0;let c=!1,u=Tp(void 0);return Fp(((h,l)=>{let f;if(void 0!==a){if(f=()=>{const r=new oy("Aborted","AbortError"),a=[];n||a.push((()=>"writable"===t._state?BA(t,r):Tp(void 0))),i||a.push((()=>"readable"===e._state?Py(e,r):Tp(void 0))),g((()=>Promise.all(a.map((e=>e())))),!0,r)},a.aborted)return void f();a.addEventListener("abort",f)}if(p(e,o._closedPromise,(e=>{n?A(!0,e):g((()=>BA(t,e)),!0,e)})),p(t,s._closedPromise,(t=>{i?A(!0,t):g((()=>Py(e,t)),!0,t)})),function(e,t,r){"closed"===e._state?r():Hp(t,r)}(e,o._closedPromise,(()=>{r?A():g((()=>function(e){const t=e._ownerWritableStream,r=t._state;return QA(t)||"closed"===r?Tp(void 0):"errored"===r?qp(t._storedError):DA(e)}(s)))})),QA(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");i?A(!0,t):g((()=>Py(e,t)),!0,t)}function d(){const e=u;return Op(u,(()=>e!==u?d():void 0))}function p(e,t,r){"errored"===e._state?r(e._storedError):Np(t,r)}function g(e,r,n){function i(){Kp(e(),(()=>y(r,n)),(e=>y(!0,e)))}c||(c=!0,"writable"!==t._state||QA(t)?i():Hp(d(),i))}function A(e,r){c||(c=!0,"writable"!==t._state||QA(t)?y(e,r):Hp(d(),(()=>y(e,r))))}function y(e,t){FA(s),Yp(o),void 0!==a&&a.removeEventListener("abort",f),e?l(t):h(void 0)}Gp(Fp(((e,t)=>{!function r(n){n?e():Op(c?Tp(!0):Op(s._readyPromise,(()=>Fp(((e,t)=>{Cg(o,{_chunkSteps:t=>{u=Op(TA(s,t),void 0,Sp),e(!1)},_closeSteps:()=>e(!0),_errorSteps:t})})))),r,t)}(!1)})))}))}class cy{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!uy(this))throw by("desiredSize");return Ay(this)}close(){if(!uy(this))throw by("close");if(!yy(this))throw new TypeError("The stream is not in a state that permits close");dy(this)}enqueue(e=void 0){if(!uy(this))throw by("enqueue");if(!yy(this))throw new TypeError("The stream is not in a state that permits enqueue");return py(this,e)}error(e=void 0){if(!uy(this))throw by("error");gy(this,e)}[ag](e){Fg(this);const t=this._cancelAlgorithm(e);return fy(this),t}[og](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=Dg(this);this._closeRequested&&0===this._queue.length?(fy(this),My(t)):hy(this),e._chunkSteps(r)}else bg(t,e),hy(this)}}function uy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function hy(e){ly(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Kp(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,hy(e))}),(t=>{gy(e,t)}))))}function ly(e){const t=e._controlledReadableStream;return!!yy(e)&&(!!e._started&&(!!(xy(t)&&vg(t)>0)||Ay(e)>0))}function fy(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function dy(e){if(!yy(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(fy(e),My(t))}function py(e,t){if(!yy(e))return;const r=e._controlledReadableStream;if(xy(r)&&vg(r)>0)wg(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw gy(e,t),t}try{Rg(e,t,r)}catch(t){throw gy(e,t),t}}hy(e)}function gy(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(Fg(e),fy(e),Uy(r,t))}function Ay(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function yy(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function my(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Fg(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,Kp(Tp(r()),(()=>{t._started=!0,hy(t)}),(e=>{gy(t,e)}))}function by(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function wy(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function vy(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function Iy(e,t,r){return hg(e,r),r=>zp(e,t,[r])}function Ey(e,t){if("bytes"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function By(e,t){if("byob"!=(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Cy(e,t){ug(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal;return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(a,t+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!n,preventClose:!!i,signal:a}}Object.defineProperties(cy.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(cy.prototype,kp.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class _y{constructor(e={},t={}){void 0===e?e=null:lg(e,"First parameter");const r=fA(t,"Second parameter"),n=function(e,t){ug(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,o=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:Ag(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===i?void 0:wy(i,r,t+" has member 'cancel' that"),pull:void 0===a?void 0:vy(a,r,t+" has member 'pull' that"),start:void 0===o?void 0:Iy(o,r,t+" has member 'start' that"),type:void 0===s?void 0:Ey(s,t+" has member 'type' that")}}(e,"First parameter");if(Sy(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(Og.prototype);let i=()=>{},a=()=>Tp(void 0),o=()=>Tp(void 0);void 0!==t.start&&(i=()=>t.start(n)),void 0!==t.pull&&(a=()=>t.pull(n)),void 0!==t.cancel&&(o=e=>t.cancel(e));const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Fg(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new Zp,e._readableStreamController=t,Kp(Tp(r()),(()=>{t._started=!0,Ng(t)}),(e=>{eA(t,e)}))}(e,n,i,a,o,r,s)}(this,n,hA(r,0))}else{const e=lA(r);!function(e,t,r,n){const i=Object.create(cy.prototype);let a=()=>{},o=()=>Tp(void 0),s=()=>Tp(void 0);void 0!==t.start&&(a=()=>t.start(i)),void 0!==t.pull&&(o=()=>t.pull(i)),void 0!==t.cancel&&(s=e=>t.cancel(e)),my(e,i,a,o,s,r,n)}(this,n,hA(r,1),e)}}get locked(){if(!Qy(this))throw Dy("locked");return xy(this)}cancel(e=void 0){return Qy(this)?xy(this)?qp(new TypeError("Cannot cancel a stream that already has a reader")):Py(this,e):qp(Dy("cancel"))}getReader(e=void 0){if(!Qy(this))throw Dy("getReader");const t=function(e,t){ug(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:By(r,t+" has member 'mode' that")}}(e,"First parameter");return void 0===t.mode?mg(this):function(e){return new sA(e)}(this)}pipeThrough(e,t={}){if(!Qy(this))throw Dy("pipeThrough");fg(e,1,"pipeThrough");const r=function(e,t){ug(e,t);const r=null==e?void 0:e.readable;dg(r,"readable","ReadableWritablePair"),yg(r,t+" has member 'readable' that");const n=null==e?void 0:e.writable;return dg(n,"writable","ReadableWritablePair"),mA(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=Cy(t,"Second parameter");if(xy(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(EA(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Gp(sy(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!Qy(this))return qp(Dy("pipeTo"));if(void 0===e)return qp("Parameter 1 is required in 'pipeTo'.");if(!IA(e))return qp(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=Cy(t,"Second parameter")}catch(e){return qp(e)}return xy(this)?qp(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):EA(e)?qp(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sy(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!Qy(this))throw Dy("tee");const e=function(e,t){const r=mg(e);let n,i,a,o,s,c=!1,u=!1,h=!1;const l=Fp((e=>{s=e}));function f(){return c||(c=!0,Cg(r,{_chunkSteps:e=>{jp((()=>{c=!1;const t=e,r=e;u||py(a._readableStreamController,t),h||py(o._readableStreamController,r)}))},_closeSteps:()=>{c=!1,u||dy(a._readableStreamController),h||dy(o._readableStreamController),u&&h||s(void 0)},_errorSteps:()=>{c=!1}})),Tp(void 0)}function d(){}return a=ky(d,f,(function(t){if(u=!0,n=t,h){const t=Tg([n,i]),r=Py(e,t);s(r)}return l})),o=ky(d,f,(function(t){if(h=!0,i=t,u){const t=Tg([n,i]),r=Py(e,t);s(r)}return l})),Np(r._closedPromise,(e=>{gy(a._readableStreamController,e),gy(o._readableStreamController,e),u&&h||s(void 0)})),[a,o]}(this);return Tg(e)}values(e=void 0){if(!Qy(this))throw Dy("values");return function(e,t){const r=mg(e),n=new Sg(r,t),i=Object.create(Qg);return i._asyncIteratorImpl=n,i}(this,function(e,t){return ug(e,"First parameter"),{preventCancel:!!(null==e?void 0:e.preventCancel)}}(e).preventCancel)}}function ky(e,t,r,n=1,i=(()=>1)){const a=Object.create(_y.prototype);return Sy(a),my(a,Object.create(cy.prototype),e,t,r,n,i),a}function Sy(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Qy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function xy(e){return void 0!==e._reader}function Py(e,t){return e._disturbed=!0,"closed"===e._state?Tp(void 0):"errored"===e._state?qp(e._storedError):(My(e),Lp(e._readableStreamController[ag](t),Sp))}function My(e){e._state="closed";const t=e._reader;void 0!==t&&(rg(t),Bg(t)&&(t._readRequests.forEach((e=>{e._closeSteps()})),t._readRequests=new Zp))}function Uy(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(tg(r,t),Bg(r)?(r._readRequests.forEach((e=>{e._errorSteps(t)})),r._readRequests=new Zp):(r._readIntoRequests.forEach((e=>{e._errorSteps(t)})),r._readIntoRequests=new Zp))}function Dy(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Ry(e,t){ug(e,t);const r=null==e?void 0:e.highWaterMark;return dg(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:pg(r)}}Object.defineProperties(_y.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(_y.prototype,kp.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof kp.asyncIterator&&Object.defineProperty(_y.prototype,kp.asyncIterator,{value:_y.prototype.values,writable:!0,configurable:!0});const Fy=function(e){return e.byteLength};class Ty{constructor(e){fg(e,1,"ByteLengthQueuingStrategy"),e=Ry(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Oy(this))throw qy("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Oy(this))throw qy("size");return Fy}}function qy(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Oy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(Ty.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Ty.prototype,kp.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Ky=function(){return 1};class Hy{constructor(e){fg(e,1,"CountQueuingStrategy"),e=Ry(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Ly(this))throw Ny("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Ly(this))throw Ny("size");return Ky}}function Ny(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Ly(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function Gy(e,t,r){return hg(e,r),r=>Wp(e,t,[r])}function jy(e,t,r){return hg(e,r),r=>zp(e,t,[r])}function zy(e,t,r){return hg(e,r),(r,n)=>Wp(e,t,[r,n])}Object.defineProperties(Hy.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Hy.prototype,kp.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Wy{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=fA(t,"Second parameter"),i=fA(r,"Third parameter"),a=function(e,t){ug(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,a=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:Gy(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===i?void 0:jy(i,e,t+" has member 'start' that"),transform:void 0===a?void 0:zy(a,e,t+" has member 'transform' that"),writableType:o}}(e,"First parameter");if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified");const o=hA(i,0),s=lA(i),c=hA(n,1),u=lA(n);let h;!function(e,t,r,n,i,a){function o(){return t}e._writable=function(e,t,r,n,i=1,a=(()=>1)){const o=Object.create(bA.prototype);return vA(o),KA(o,Object.create(OA.prototype),e,t,r,n,i,a),o}(o,(function(t){return function(e,t){const r=e._transformStreamController;return e._backpressure?Lp(e._backpressureChangePromise,(()=>{const n=e._writable;if("erroring"===n._state)throw n._storedError;return rm(r,t)})):rm(r,t)}(e,t)}),(function(){return function(e){const t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return em(r),Lp(n,(()=>{if("errored"===t._state)throw t._storedError;dy(t._readableStreamController)}),(r=>{throw Jy(e,r),t._storedError}))}(e)}),(function(t){return function(e,t){return Jy(e,t),Tp(void 0)}(e,t)}),r,n),e._readable=ky(o,(function(){return function(e){return Yy(e,!1),e._backpressureChangePromise}(e)}),(function(t){return Vy(e,t),Tp(void 0)}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Yy(e,!0),e._transformStreamController=void 0}(this,Fp((e=>{h=e})),c,u,o,s),function(e,t){const r=Object.create($y.prototype);let n=e=>{try{return tm(r,e),Tp(void 0)}catch(e){return qp(e)}},i=()=>Tp(void 0);void 0!==t.transform&&(n=e=>t.transform(e,r)),void 0!==t.flush&&(i=()=>t.flush(r)),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,a),void 0!==a.start?h(a.start(this._transformStreamController)):h(void 0)}get readable(){if(!Zy(this))throw im("readable");return this._readable}get writable(){if(!Zy(this))throw im("writable");return this._writable}}function Zy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Jy(e,t){gy(e._readable._readableStreamController,t),Vy(e,t)}function Vy(e,t){em(e._transformStreamController),GA(e._writable._writableStreamController,t),e._backpressure&&Yy(e,!1)}function Yy(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=Fp((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Wy.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty(Wy.prototype,kp.toStringTag,{value:"TransformStream",configurable:!0});class $y{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Xy(this))throw nm("desiredSize");return Ay(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!Xy(this))throw nm("enqueue");tm(this,e)}error(e=void 0){if(!Xy(this))throw nm("error");var t;t=e,Jy(this._controlledTransformStream,t)}terminate(){if(!Xy(this))throw nm("terminate");!function(e){const t=e._controlledTransformStream;dy(t._readable._readableStreamController),Vy(t,new TypeError("TransformStream terminated"))}(this)}}function Xy(e){return!!xp(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function em(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function tm(e,t){const r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!yy(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{py(n,t)}catch(e){throw Vy(r,e),r._readable._storedError}const i=function(e){return!ly(e)}(n);i!==r._backpressure&&Yy(r,!0)}function rm(e,t){return Lp(e._transformAlgorithm(t),void 0,(t=>{throw Jy(e._controlledTransformStream,t),t}))}function nm(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function im(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties($y.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof kp.toStringTag&&Object.defineProperty($y.prototype,kp.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var am=function(e,t){return am=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},am(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. diff --git a/package.json b/package.json index ddb847a..7c37594 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "doipjs", - "version": "2.0.0", + "version": "2.0.1", "description": "Decentralized Online Identity Proofs library in Node.js", "type": "module", "main": "./src/index.js", diff --git a/src/constants.js b/src/constants.js index d959563..ef44c1a 100644 --- a/src/constants.js +++ b/src/constants.js @@ -22,4 +22,4 @@ limitations under the License. * doip.js library version * @constant {string} */ -export const version = '2.0.0' +export const version = '2.0.1'