mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-29 00:11:02 -05:00
17 lines
No EOL
737 KiB
JavaScript
Generated
17 lines
No EOL
737 KiB
JavaScript
Generated
require('./sourcemap-register.js');(()=>{var Ae={7351:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};Object.defineProperty(Se,"__esModule",{value:true});Se.issue=Se.issueCommand=void 0;const rt=$e(Ke(2037));const it=Ke(5278);function issueCommand(Ae,Se,Ke){const qe=new Command(Ae,Se,Ke);process.stdout.write(qe.toString()+rt.EOL)}Se.issueCommand=issueCommand;function issue(Ae,Se=""){issueCommand(Ae,{},Se)}Se.issue=issue;const nt="::";class Command{constructor(Ae,Se,Ke){if(!Ae){Ae="missing.command"}this.command=Ae;this.properties=Se;this.message=Ke}toString(){let Ae=nt+this.command;if(this.properties&&Object.keys(this.properties).length>0){Ae+=" ";let Se=true;for(const Ke in this.properties){if(this.properties.hasOwnProperty(Ke)){const qe=this.properties[Ke];if(qe){if(Se){Se=false}else{Ae+=","}Ae+=`${Ke}=${escapeProperty(qe)}`}}}}Ae+=`${nt}${escapeData(this.message)}`;return Ae}}function escapeData(Ae){return it.toCommandValue(Ae).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(Ae){return it.toCommandValue(Ae).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.getIDToken=Se.getState=Se.saveState=Se.group=Se.endGroup=Se.startGroup=Se.info=Se.notice=Se.warning=Se.error=Se.debug=Se.isDebug=Se.setFailed=Se.setCommandEcho=Se.setOutput=Se.getBooleanInput=Se.getMultilineInput=Se.getInput=Se.addPath=Se.setSecret=Se.exportVariable=Se.ExitCode=void 0;const it=Ke(7351);const nt=Ke(717);const st=Ke(5278);const ut=$e(Ke(2037));const ht=$e(Ke(1017));const ft=Ke(8041);var yt;(function(Ae){Ae[Ae["Success"]=0]="Success";Ae[Ae["Failure"]=1]="Failure"})(yt=Se.ExitCode||(Se.ExitCode={}));function exportVariable(Ae,Se){const Ke=st.toCommandValue(Se);process.env[Ae]=Ke;const qe=process.env["GITHUB_ENV"]||"";if(qe){return nt.issueFileCommand("ENV",nt.prepareKeyValueMessage(Ae,Se))}it.issueCommand("set-env",{name:Ae},Ke)}Se.exportVariable=exportVariable;function setSecret(Ae){it.issueCommand("add-mask",{},Ae)}Se.setSecret=setSecret;function addPath(Ae){const Se=process.env["GITHUB_PATH"]||"";if(Se){nt.issueFileCommand("PATH",Ae)}else{it.issueCommand("add-path",{},Ae)}process.env["PATH"]=`${Ae}${ht.delimiter}${process.env["PATH"]}`}Se.addPath=addPath;function getInput(Ae,Se){const Ke=process.env[`INPUT_${Ae.replace(/ /g,"_").toUpperCase()}`]||"";if(Se&&Se.required&&!Ke){throw new Error(`Input required and not supplied: ${Ae}`)}if(Se&&Se.trimWhitespace===false){return Ke}return Ke.trim()}Se.getInput=getInput;function getMultilineInput(Ae,Se){const Ke=getInput(Ae,Se).split("\n").filter((Ae=>Ae!==""));if(Se&&Se.trimWhitespace===false){return Ke}return Ke.map((Ae=>Ae.trim()))}Se.getMultilineInput=getMultilineInput;function getBooleanInput(Ae,Se){const Ke=["true","True","TRUE"];const qe=["false","False","FALSE"];const Fe=getInput(Ae,Se);if(Ke.includes(Fe))return true;if(qe.includes(Fe))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${Ae}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}Se.getBooleanInput=getBooleanInput;function setOutput(Ae,Se){const Ke=process.env["GITHUB_OUTPUT"]||"";if(Ke){return nt.issueFileCommand("OUTPUT",nt.prepareKeyValueMessage(Ae,Se))}process.stdout.write(ut.EOL);it.issueCommand("set-output",{name:Ae},st.toCommandValue(Se))}Se.setOutput=setOutput;function setCommandEcho(Ae){it.issue("echo",Ae?"on":"off")}Se.setCommandEcho=setCommandEcho;function setFailed(Ae){process.exitCode=yt.Failure;error(Ae)}Se.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}Se.isDebug=isDebug;function debug(Ae){it.issueCommand("debug",{},Ae)}Se.debug=debug;function error(Ae,Se={}){it.issueCommand("error",st.toCommandProperties(Se),Ae instanceof Error?Ae.toString():Ae)}Se.error=error;function warning(Ae,Se={}){it.issueCommand("warning",st.toCommandProperties(Se),Ae instanceof Error?Ae.toString():Ae)}Se.warning=warning;function notice(Ae,Se={}){it.issueCommand("notice",st.toCommandProperties(Se),Ae instanceof Error?Ae.toString():Ae)}Se.notice=notice;function info(Ae){process.stdout.write(Ae+ut.EOL)}Se.info=info;function startGroup(Ae){it.issue("group",Ae)}Se.startGroup=startGroup;function endGroup(){it.issue("endgroup")}Se.endGroup=endGroup;function group(Ae,Se){return rt(this,void 0,void 0,(function*(){startGroup(Ae);let Ke;try{Ke=yield Se()}finally{endGroup()}return Ke}))}Se.group=group;function saveState(Ae,Se){const Ke=process.env["GITHUB_STATE"]||"";if(Ke){return nt.issueFileCommand("STATE",nt.prepareKeyValueMessage(Ae,Se))}it.issueCommand("save-state",{name:Ae},st.toCommandValue(Se))}Se.saveState=saveState;function getState(Ae){return process.env[`STATE_${Ae}`]||""}Se.getState=getState;function getIDToken(Ae){return rt(this,void 0,void 0,(function*(){return yield ft.OidcClient.getIDToken(Ae)}))}Se.getIDToken=getIDToken;var mt=Ke(1327);Object.defineProperty(Se,"summary",{enumerable:true,get:function(){return mt.summary}});var vt=Ke(1327);Object.defineProperty(Se,"markdownSummary",{enumerable:true,get:function(){return vt.markdownSummary}});var _t=Ke(2981);Object.defineProperty(Se,"toPosixPath",{enumerable:true,get:function(){return _t.toPosixPath}});Object.defineProperty(Se,"toWin32Path",{enumerable:true,get:function(){return _t.toWin32Path}});Object.defineProperty(Se,"toPlatformPath",{enumerable:true,get:function(){return _t.toPlatformPath}})},717:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};Object.defineProperty(Se,"__esModule",{value:true});Se.prepareKeyValueMessage=Se.issueFileCommand=void 0;const rt=$e(Ke(7147));const it=$e(Ke(2037));const nt=Ke(5840);const st=Ke(5278);function issueFileCommand(Ae,Se){const Ke=process.env[`GITHUB_${Ae}`];if(!Ke){throw new Error(`Unable to find environment variable for file command ${Ae}`)}if(!rt.existsSync(Ke)){throw new Error(`Missing file at path: ${Ke}`)}rt.appendFileSync(Ke,`${st.toCommandValue(Se)}${it.EOL}`,{encoding:"utf8"})}Se.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(Ae,Se){const Ke=`ghadelimiter_${nt.v4()}`;const qe=st.toCommandValue(Se);if(Ae.includes(Ke)){throw new Error(`Unexpected input: name should not contain the delimiter "${Ke}"`)}if(qe.includes(Ke)){throw new Error(`Unexpected input: value should not contain the delimiter "${Ke}"`)}return`${Ae}<<${Ke}${it.EOL}${qe}${it.EOL}${Ke}`}Se.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(Ae,Se,Ke){"use strict";var qe=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.OidcClient=void 0;const Fe=Ke(6255);const $e=Ke(5526);const rt=Ke(2186);class OidcClient{static createHttpClient(Ae=true,Se=10){const Ke={allowRetries:Ae,maxRetries:Se};return new Fe.HttpClient("actions/oidc-client",[new $e.BearerCredentialHandler(OidcClient.getRequestToken())],Ke)}static getRequestToken(){const Ae=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!Ae){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return Ae}static getIDTokenUrl(){const Ae=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!Ae){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return Ae}static getCall(Ae){var Se;return qe(this,void 0,void 0,(function*(){const Ke=OidcClient.createHttpClient();const qe=yield Ke.getJson(Ae).catch((Ae=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${Ae.statusCode}\n \n Error Message: ${Ae.result.message}`)}));const Fe=(Se=qe.result)===null||Se===void 0?void 0:Se.value;if(!Fe){throw new Error("Response json body do not have ID Token field")}return Fe}))}static getIDToken(Ae){return qe(this,void 0,void 0,(function*(){try{let Se=OidcClient.getIDTokenUrl();if(Ae){const Ke=encodeURIComponent(Ae);Se=`${Se}&audience=${Ke}`}rt.debug(`ID token url is ${Se}`);const Ke=yield OidcClient.getCall(Se);rt.setSecret(Ke);return Ke}catch(Ae){throw new Error(`Error message: ${Ae.message}`)}}))}}Se.OidcClient=OidcClient},2981:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};Object.defineProperty(Se,"__esModule",{value:true});Se.toPlatformPath=Se.toWin32Path=Se.toPosixPath=void 0;const rt=$e(Ke(1017));function toPosixPath(Ae){return Ae.replace(/[\\]/g,"/")}Se.toPosixPath=toPosixPath;function toWin32Path(Ae){return Ae.replace(/[/]/g,"\\")}Se.toWin32Path=toWin32Path;function toPlatformPath(Ae){return Ae.replace(/[/\\]/g,rt.sep)}Se.toPlatformPath=toPlatformPath},1327:function(Ae,Se,Ke){"use strict";var qe=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.summary=Se.markdownSummary=Se.SUMMARY_DOCS_URL=Se.SUMMARY_ENV_VAR=void 0;const Fe=Ke(2037);const $e=Ke(7147);const{access:rt,appendFile:it,writeFile:nt}=$e.promises;Se.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Se.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return qe(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const Ae=process.env[Se.SUMMARY_ENV_VAR];if(!Ae){throw new Error(`Unable to find environment variable for $${Se.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield rt(Ae,$e.constants.R_OK|$e.constants.W_OK)}catch(Se){throw new Error(`Unable to access summary file: '${Ae}'. Check if the file has correct read/write permissions.`)}this._filePath=Ae;return this._filePath}))}wrap(Ae,Se,Ke={}){const qe=Object.entries(Ke).map((([Ae,Se])=>` ${Ae}="${Se}"`)).join("");if(!Se){return`<${Ae}${qe}>`}return`<${Ae}${qe}>${Se}</${Ae}>`}write(Ae){return qe(this,void 0,void 0,(function*(){const Se=!!(Ae===null||Ae===void 0?void 0:Ae.overwrite);const Ke=yield this.filePath();const qe=Se?nt:it;yield qe(Ke,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return qe(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(Ae,Se=false){this._buffer+=Ae;return Se?this.addEOL():this}addEOL(){return this.addRaw(Fe.EOL)}addCodeBlock(Ae,Se){const Ke=Object.assign({},Se&&{lang:Se});const qe=this.wrap("pre",this.wrap("code",Ae),Ke);return this.addRaw(qe).addEOL()}addList(Ae,Se=false){const Ke=Se?"ol":"ul";const qe=Ae.map((Ae=>this.wrap("li",Ae))).join("");const Fe=this.wrap(Ke,qe);return this.addRaw(Fe).addEOL()}addTable(Ae){const Se=Ae.map((Ae=>{const Se=Ae.map((Ae=>{if(typeof Ae==="string"){return this.wrap("td",Ae)}const{header:Se,data:Ke,colspan:qe,rowspan:Fe}=Ae;const $e=Se?"th":"td";const rt=Object.assign(Object.assign({},qe&&{colspan:qe}),Fe&&{rowspan:Fe});return this.wrap($e,Ke,rt)})).join("");return this.wrap("tr",Se)})).join("");const Ke=this.wrap("table",Se);return this.addRaw(Ke).addEOL()}addDetails(Ae,Se){const Ke=this.wrap("details",this.wrap("summary",Ae)+Se);return this.addRaw(Ke).addEOL()}addImage(Ae,Se,Ke){const{width:qe,height:Fe}=Ke||{};const $e=Object.assign(Object.assign({},qe&&{width:qe}),Fe&&{height:Fe});const rt=this.wrap("img",null,Object.assign({src:Ae,alt:Se},$e));return this.addRaw(rt).addEOL()}addHeading(Ae,Se){const Ke=`h${Se}`;const qe=["h1","h2","h3","h4","h5","h6"].includes(Ke)?Ke:"h1";const Fe=this.wrap(qe,Ae);return this.addRaw(Fe).addEOL()}addSeparator(){const Ae=this.wrap("hr",null);return this.addRaw(Ae).addEOL()}addBreak(){const Ae=this.wrap("br",null);return this.addRaw(Ae).addEOL()}addQuote(Ae,Se){const Ke=Object.assign({},Se&&{cite:Se});const qe=this.wrap("blockquote",Ae,Ke);return this.addRaw(qe).addEOL()}addLink(Ae,Se){const Ke=this.wrap("a",Ae,{href:Se});return this.addRaw(Ke).addEOL()}}const st=new Summary;Se.markdownSummary=st;Se.summary=st},5278:(Ae,Se)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se.toCommandProperties=Se.toCommandValue=void 0;function toCommandValue(Ae){if(Ae===null||Ae===undefined){return""}else if(typeof Ae==="string"||Ae instanceof String){return Ae}return JSON.stringify(Ae)}Se.toCommandValue=toCommandValue;function toCommandProperties(Ae){if(!Object.keys(Ae).length){return{}}return{title:Ae.title,file:Ae.file,line:Ae.startLine,endLine:Ae.endLine,col:Ae.startColumn,endColumn:Ae.endColumn}}Se.toCommandProperties=toCommandProperties},1514:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.getExecOutput=Se.exec=void 0;const it=Ke(1576);const nt=$e(Ke(8159));function exec(Ae,Se,Ke){return rt(this,void 0,void 0,(function*(){const qe=nt.argStringToArray(Ae);if(qe.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const Fe=qe[0];Se=qe.slice(1).concat(Se||[]);const $e=new nt.ToolRunner(Fe,Se,Ke);return $e.exec()}))}Se.exec=exec;function getExecOutput(Ae,Se,Ke){var qe,Fe;return rt(this,void 0,void 0,(function*(){let $e="";let rt="";const nt=new it.StringDecoder("utf8");const st=new it.StringDecoder("utf8");const ut=(qe=Ke===null||Ke===void 0?void 0:Ke.listeners)===null||qe===void 0?void 0:qe.stdout;const ht=(Fe=Ke===null||Ke===void 0?void 0:Ke.listeners)===null||Fe===void 0?void 0:Fe.stderr;const stdErrListener=Ae=>{rt+=st.write(Ae);if(ht){ht(Ae)}};const stdOutListener=Ae=>{$e+=nt.write(Ae);if(ut){ut(Ae)}};const ft=Object.assign(Object.assign({},Ke===null||Ke===void 0?void 0:Ke.listeners),{stdout:stdOutListener,stderr:stdErrListener});const yt=yield exec(Ae,Se,Object.assign(Object.assign({},Ke),{listeners:ft}));$e+=nt.end();rt+=st.end();return{exitCode:yt,stdout:$e,stderr:rt}}))}Se.getExecOutput=getExecOutput},8159:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.argStringToArray=Se.ToolRunner=void 0;const it=$e(Ke(2037));const nt=$e(Ke(2361));const st=$e(Ke(2081));const ut=$e(Ke(1017));const ht=$e(Ke(7436));const ft=$e(Ke(1962));const yt=Ke(9512);const mt=process.platform==="win32";class ToolRunner extends nt.EventEmitter{constructor(Ae,Se,Ke){super();if(!Ae){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=Ae;this.args=Se||[];this.options=Ke||{}}_debug(Ae){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(Ae)}}_getCommandString(Ae,Se){const Ke=this._getSpawnFileName();const qe=this._getSpawnArgs(Ae);let Fe=Se?"":"[command]";if(mt){if(this._isCmdFile()){Fe+=Ke;for(const Ae of qe){Fe+=` ${Ae}`}}else if(Ae.windowsVerbatimArguments){Fe+=`"${Ke}"`;for(const Ae of qe){Fe+=` ${Ae}`}}else{Fe+=this._windowsQuoteCmdArg(Ke);for(const Ae of qe){Fe+=` ${this._windowsQuoteCmdArg(Ae)}`}}}else{Fe+=Ke;for(const Ae of qe){Fe+=` ${Ae}`}}return Fe}_processLineBuffer(Ae,Se,Ke){try{let qe=Se+Ae.toString();let Fe=qe.indexOf(it.EOL);while(Fe>-1){const Ae=qe.substring(0,Fe);Ke(Ae);qe=qe.substring(Fe+it.EOL.length);Fe=qe.indexOf(it.EOL)}return qe}catch(Ae){this._debug(`error processing line. Failed with error ${Ae}`);return""}}_getSpawnFileName(){if(mt){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(Ae){if(mt){if(this._isCmdFile()){let Se=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const Ke of this.args){Se+=" ";Se+=Ae.windowsVerbatimArguments?Ke:this._windowsQuoteCmdArg(Ke)}Se+='"';return[Se]}}return this.args}_endsWith(Ae,Se){return Ae.endsWith(Se)}_isCmdFile(){const Ae=this.toolPath.toUpperCase();return this._endsWith(Ae,".CMD")||this._endsWith(Ae,".BAT")}_windowsQuoteCmdArg(Ae){if(!this._isCmdFile()){return this._uvQuoteCmdArg(Ae)}if(!Ae){return'""'}const Se=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let Ke=false;for(const qe of Ae){if(Se.some((Ae=>Ae===qe))){Ke=true;break}}if(!Ke){return Ae}let qe='"';let Fe=true;for(let Se=Ae.length;Se>0;Se--){qe+=Ae[Se-1];if(Fe&&Ae[Se-1]==="\\"){qe+="\\"}else if(Ae[Se-1]==='"'){Fe=true;qe+='"'}else{Fe=false}}qe+='"';return qe.split("").reverse().join("")}_uvQuoteCmdArg(Ae){if(!Ae){return'""'}if(!Ae.includes(" ")&&!Ae.includes("\t")&&!Ae.includes('"')){return Ae}if(!Ae.includes('"')&&!Ae.includes("\\")){return`"${Ae}"`}let Se='"';let Ke=true;for(let qe=Ae.length;qe>0;qe--){Se+=Ae[qe-1];if(Ke&&Ae[qe-1]==="\\"){Se+="\\"}else if(Ae[qe-1]==='"'){Ke=true;Se+="\\"}else{Ke=false}}Se+='"';return Se.split("").reverse().join("")}_cloneExecOptions(Ae){Ae=Ae||{};const Se={cwd:Ae.cwd||process.cwd(),env:Ae.env||process.env,silent:Ae.silent||false,windowsVerbatimArguments:Ae.windowsVerbatimArguments||false,failOnStdErr:Ae.failOnStdErr||false,ignoreReturnCode:Ae.ignoreReturnCode||false,delay:Ae.delay||1e4};Se.outStream=Ae.outStream||process.stdout;Se.errStream=Ae.errStream||process.stderr;return Se}_getSpawnOptions(Ae,Se){Ae=Ae||{};const Ke={};Ke.cwd=Ae.cwd;Ke.env=Ae.env;Ke["windowsVerbatimArguments"]=Ae.windowsVerbatimArguments||this._isCmdFile();if(Ae.windowsVerbatimArguments){Ke.argv0=`"${Se}"`}return Ke}exec(){return rt(this,void 0,void 0,(function*(){if(!ft.isRooted(this.toolPath)&&(this.toolPath.includes("/")||mt&&this.toolPath.includes("\\"))){this.toolPath=ut.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield ht.which(this.toolPath,true);return new Promise(((Ae,Se)=>rt(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const Ae of this.args){this._debug(` ${Ae}`)}const Ke=this._cloneExecOptions(this.options);if(!Ke.silent&&Ke.outStream){Ke.outStream.write(this._getCommandString(Ke)+it.EOL)}const qe=new ExecState(Ke,this.toolPath);qe.on("debug",(Ae=>{this._debug(Ae)}));if(this.options.cwd&&!(yield ft.exists(this.options.cwd))){return Se(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const Fe=this._getSpawnFileName();const $e=st.spawn(Fe,this._getSpawnArgs(Ke),this._getSpawnOptions(this.options,Fe));let rt="";if($e.stdout){$e.stdout.on("data",(Ae=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(Ae)}if(!Ke.silent&&Ke.outStream){Ke.outStream.write(Ae)}rt=this._processLineBuffer(Ae,rt,(Ae=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(Ae)}}))}))}let nt="";if($e.stderr){$e.stderr.on("data",(Ae=>{qe.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(Ae)}if(!Ke.silent&&Ke.errStream&&Ke.outStream){const Se=Ke.failOnStdErr?Ke.errStream:Ke.outStream;Se.write(Ae)}nt=this._processLineBuffer(Ae,nt,(Ae=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(Ae)}}))}))}$e.on("error",(Ae=>{qe.processError=Ae.message;qe.processExited=true;qe.processClosed=true;qe.CheckComplete()}));$e.on("exit",(Ae=>{qe.processExitCode=Ae;qe.processExited=true;this._debug(`Exit code ${Ae} received from tool '${this.toolPath}'`);qe.CheckComplete()}));$e.on("close",(Ae=>{qe.processExitCode=Ae;qe.processExited=true;qe.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);qe.CheckComplete()}));qe.on("done",((Ke,qe)=>{if(rt.length>0){this.emit("stdline",rt)}if(nt.length>0){this.emit("errline",nt)}$e.removeAllListeners();if(Ke){Se(Ke)}else{Ae(qe)}}));if(this.options.input){if(!$e.stdin){throw new Error("child process missing stdin")}$e.stdin.end(this.options.input)}}))))}))}}Se.ToolRunner=ToolRunner;function argStringToArray(Ae){const Se=[];let Ke=false;let qe=false;let Fe="";function append(Ae){if(qe&&Ae!=='"'){Fe+="\\"}Fe+=Ae;qe=false}for(let $e=0;$e<Ae.length;$e++){const rt=Ae.charAt($e);if(rt==='"'){if(!qe){Ke=!Ke}else{append(rt)}continue}if(rt==="\\"&&qe){append(rt);continue}if(rt==="\\"&&Ke){qe=true;continue}if(rt===" "&&!Ke){if(Fe.length>0){Se.push(Fe);Fe=""}continue}append(rt)}if(Fe.length>0){Se.push(Fe.trim())}return Se}Se.argStringToArray=argStringToArray;class ExecState extends nt.EventEmitter{constructor(Ae,Se){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!Se){throw new Error("toolPath must not be empty")}this.options=Ae;this.toolPath=Se;if(Ae.delay){this.delay=Ae.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=yt.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(Ae){this.emit("debug",Ae)}_setResult(){let Ae;if(this.processExited){if(this.processError){Ae=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){Ae=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){Ae=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",Ae,this.processExitCode)}static HandleTimeout(Ae){if(Ae.done){return}if(!Ae.processClosed&&Ae.processExited){const Se=`The STDIO streams did not close within ${Ae.delay/1e3} seconds of the exit event from process '${Ae.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;Ae._debug(Se)}Ae._setResult()}}},5526:function(Ae,Se){"use strict";var Ke=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.PersonalAccessTokenCredentialHandler=Se.BearerCredentialHandler=Se.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(Ae,Se){this.username=Ae;this.password=Se}prepareRequest(Ae){if(!Ae.headers){throw Error("The request has no headers")}Ae.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return Ke(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}Se.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(Ae){this.token=Ae}prepareRequest(Ae){if(!Ae.headers){throw Error("The request has no headers")}Ae.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return Ke(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}Se.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(Ae){this.token=Ae}prepareRequest(Ae){if(!Ae.headers){throw Error("The request has no headers")}Ae.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return Ke(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}Se.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Object.defineProperty(Ae,qe,{enumerable:true,get:function(){return Se[Ke]}})}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.HttpClient=Se.isHttps=Se.HttpClientResponse=Se.HttpClientError=Se.getProxyUrl=Se.MediaTypes=Se.Headers=Se.HttpCodes=void 0;const it=$e(Ke(3685));const nt=$e(Ke(5687));const st=$e(Ke(9835));const ut=$e(Ke(4294));var ht;(function(Ae){Ae[Ae["OK"]=200]="OK";Ae[Ae["MultipleChoices"]=300]="MultipleChoices";Ae[Ae["MovedPermanently"]=301]="MovedPermanently";Ae[Ae["ResourceMoved"]=302]="ResourceMoved";Ae[Ae["SeeOther"]=303]="SeeOther";Ae[Ae["NotModified"]=304]="NotModified";Ae[Ae["UseProxy"]=305]="UseProxy";Ae[Ae["SwitchProxy"]=306]="SwitchProxy";Ae[Ae["TemporaryRedirect"]=307]="TemporaryRedirect";Ae[Ae["PermanentRedirect"]=308]="PermanentRedirect";Ae[Ae["BadRequest"]=400]="BadRequest";Ae[Ae["Unauthorized"]=401]="Unauthorized";Ae[Ae["PaymentRequired"]=402]="PaymentRequired";Ae[Ae["Forbidden"]=403]="Forbidden";Ae[Ae["NotFound"]=404]="NotFound";Ae[Ae["MethodNotAllowed"]=405]="MethodNotAllowed";Ae[Ae["NotAcceptable"]=406]="NotAcceptable";Ae[Ae["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";Ae[Ae["RequestTimeout"]=408]="RequestTimeout";Ae[Ae["Conflict"]=409]="Conflict";Ae[Ae["Gone"]=410]="Gone";Ae[Ae["TooManyRequests"]=429]="TooManyRequests";Ae[Ae["InternalServerError"]=500]="InternalServerError";Ae[Ae["NotImplemented"]=501]="NotImplemented";Ae[Ae["BadGateway"]=502]="BadGateway";Ae[Ae["ServiceUnavailable"]=503]="ServiceUnavailable";Ae[Ae["GatewayTimeout"]=504]="GatewayTimeout"})(ht=Se.HttpCodes||(Se.HttpCodes={}));var ft;(function(Ae){Ae["Accept"]="accept";Ae["ContentType"]="content-type"})(ft=Se.Headers||(Se.Headers={}));var yt;(function(Ae){Ae["ApplicationJson"]="application/json"})(yt=Se.MediaTypes||(Se.MediaTypes={}));function getProxyUrl(Ae){const Se=st.getProxyUrl(new URL(Ae));return Se?Se.href:""}Se.getProxyUrl=getProxyUrl;const mt=[ht.MovedPermanently,ht.ResourceMoved,ht.SeeOther,ht.TemporaryRedirect,ht.PermanentRedirect];const vt=[ht.BadGateway,ht.ServiceUnavailable,ht.GatewayTimeout];const _t=["OPTIONS","GET","DELETE","HEAD"];const Rt=10;const Kt=5;class HttpClientError extends Error{constructor(Ae,Se){super(Ae);this.name="HttpClientError";this.statusCode=Se;Object.setPrototypeOf(this,HttpClientError.prototype)}}Se.HttpClientError=HttpClientError;class HttpClientResponse{constructor(Ae){this.message=Ae}readBody(){return rt(this,void 0,void 0,(function*(){return new Promise((Ae=>rt(this,void 0,void 0,(function*(){let Se=Buffer.alloc(0);this.message.on("data",(Ae=>{Se=Buffer.concat([Se,Ae])}));this.message.on("end",(()=>{Ae(Se.toString())}))}))))}))}}Se.HttpClientResponse=HttpClientResponse;function isHttps(Ae){const Se=new URL(Ae);return Se.protocol==="https:"}Se.isHttps=isHttps;class HttpClient{constructor(Ae,Se,Ke){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=Ae;this.handlers=Se||[];this.requestOptions=Ke;if(Ke){if(Ke.ignoreSslError!=null){this._ignoreSslError=Ke.ignoreSslError}this._socketTimeout=Ke.socketTimeout;if(Ke.allowRedirects!=null){this._allowRedirects=Ke.allowRedirects}if(Ke.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=Ke.allowRedirectDowngrade}if(Ke.maxRedirects!=null){this._maxRedirects=Math.max(Ke.maxRedirects,0)}if(Ke.keepAlive!=null){this._keepAlive=Ke.keepAlive}if(Ke.allowRetries!=null){this._allowRetries=Ke.allowRetries}if(Ke.maxRetries!=null){this._maxRetries=Ke.maxRetries}}}options(Ae,Se){return rt(this,void 0,void 0,(function*(){return this.request("OPTIONS",Ae,null,Se||{})}))}get(Ae,Se){return rt(this,void 0,void 0,(function*(){return this.request("GET",Ae,null,Se||{})}))}del(Ae,Se){return rt(this,void 0,void 0,(function*(){return this.request("DELETE",Ae,null,Se||{})}))}post(Ae,Se,Ke){return rt(this,void 0,void 0,(function*(){return this.request("POST",Ae,Se,Ke||{})}))}patch(Ae,Se,Ke){return rt(this,void 0,void 0,(function*(){return this.request("PATCH",Ae,Se,Ke||{})}))}put(Ae,Se,Ke){return rt(this,void 0,void 0,(function*(){return this.request("PUT",Ae,Se,Ke||{})}))}head(Ae,Se){return rt(this,void 0,void 0,(function*(){return this.request("HEAD",Ae,null,Se||{})}))}sendStream(Ae,Se,Ke,qe){return rt(this,void 0,void 0,(function*(){return this.request(Ae,Se,Ke,qe)}))}getJson(Ae,Se={}){return rt(this,void 0,void 0,(function*(){Se[ft.Accept]=this._getExistingOrDefaultHeader(Se,ft.Accept,yt.ApplicationJson);const Ke=yield this.get(Ae,Se);return this._processResponse(Ke,this.requestOptions)}))}postJson(Ae,Se,Ke={}){return rt(this,void 0,void 0,(function*(){const qe=JSON.stringify(Se,null,2);Ke[ft.Accept]=this._getExistingOrDefaultHeader(Ke,ft.Accept,yt.ApplicationJson);Ke[ft.ContentType]=this._getExistingOrDefaultHeader(Ke,ft.ContentType,yt.ApplicationJson);const Fe=yield this.post(Ae,qe,Ke);return this._processResponse(Fe,this.requestOptions)}))}putJson(Ae,Se,Ke={}){return rt(this,void 0,void 0,(function*(){const qe=JSON.stringify(Se,null,2);Ke[ft.Accept]=this._getExistingOrDefaultHeader(Ke,ft.Accept,yt.ApplicationJson);Ke[ft.ContentType]=this._getExistingOrDefaultHeader(Ke,ft.ContentType,yt.ApplicationJson);const Fe=yield this.put(Ae,qe,Ke);return this._processResponse(Fe,this.requestOptions)}))}patchJson(Ae,Se,Ke={}){return rt(this,void 0,void 0,(function*(){const qe=JSON.stringify(Se,null,2);Ke[ft.Accept]=this._getExistingOrDefaultHeader(Ke,ft.Accept,yt.ApplicationJson);Ke[ft.ContentType]=this._getExistingOrDefaultHeader(Ke,ft.ContentType,yt.ApplicationJson);const Fe=yield this.patch(Ae,qe,Ke);return this._processResponse(Fe,this.requestOptions)}))}request(Ae,Se,Ke,qe){return rt(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const Fe=new URL(Se);let $e=this._prepareRequest(Ae,Fe,qe);const rt=this._allowRetries&&_t.includes(Ae)?this._maxRetries+1:1;let it=0;let nt;do{nt=yield this.requestRaw($e,Ke);if(nt&&nt.message&&nt.message.statusCode===ht.Unauthorized){let Ae;for(const Se of this.handlers){if(Se.canHandleAuthentication(nt)){Ae=Se;break}}if(Ae){return Ae.handleAuthentication(this,$e,Ke)}else{return nt}}let Se=this._maxRedirects;while(nt.message.statusCode&&mt.includes(nt.message.statusCode)&&this._allowRedirects&&Se>0){const rt=nt.message.headers["location"];if(!rt){break}const it=new URL(rt);if(Fe.protocol==="https:"&&Fe.protocol!==it.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield nt.readBody();if(it.hostname!==Fe.hostname){for(const Ae in qe){if(Ae.toLowerCase()==="authorization"){delete qe[Ae]}}}$e=this._prepareRequest(Ae,it,qe);nt=yield this.requestRaw($e,Ke);Se--}if(!nt.message.statusCode||!vt.includes(nt.message.statusCode)){return nt}it+=1;if(it<rt){yield nt.readBody();yield this._performExponentialBackoff(it)}}while(it<rt);return nt}))}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(Ae,Se){return rt(this,void 0,void 0,(function*(){return new Promise(((Ke,qe)=>{function callbackForResult(Ae,Se){if(Ae){qe(Ae)}else if(!Se){qe(new Error("Unknown error"))}else{Ke(Se)}}this.requestRawWithCallback(Ae,Se,callbackForResult)}))}))}requestRawWithCallback(Ae,Se,Ke){if(typeof Se==="string"){if(!Ae.options.headers){Ae.options.headers={}}Ae.options.headers["Content-Length"]=Buffer.byteLength(Se,"utf8")}let qe=false;function handleResult(Ae,Se){if(!qe){qe=true;Ke(Ae,Se)}}const Fe=Ae.httpModule.request(Ae.options,(Ae=>{const Se=new HttpClientResponse(Ae);handleResult(undefined,Se)}));let $e;Fe.on("socket",(Ae=>{$e=Ae}));Fe.setTimeout(this._socketTimeout||3*6e4,(()=>{if($e){$e.end()}handleResult(new Error(`Request timeout: ${Ae.options.path}`))}));Fe.on("error",(function(Ae){handleResult(Ae)}));if(Se&&typeof Se==="string"){Fe.write(Se,"utf8")}if(Se&&typeof Se!=="string"){Se.on("close",(function(){Fe.end()}));Se.pipe(Fe)}else{Fe.end()}}getAgent(Ae){const Se=new URL(Ae);return this._getAgent(Se)}_prepareRequest(Ae,Se,Ke){const qe={};qe.parsedUrl=Se;const Fe=qe.parsedUrl.protocol==="https:";qe.httpModule=Fe?nt:it;const $e=Fe?443:80;qe.options={};qe.options.host=qe.parsedUrl.hostname;qe.options.port=qe.parsedUrl.port?parseInt(qe.parsedUrl.port):$e;qe.options.path=(qe.parsedUrl.pathname||"")+(qe.parsedUrl.search||"");qe.options.method=Ae;qe.options.headers=this._mergeHeaders(Ke);if(this.userAgent!=null){qe.options.headers["user-agent"]=this.userAgent}qe.options.agent=this._getAgent(qe.parsedUrl);if(this.handlers){for(const Ae of this.handlers){Ae.prepareRequest(qe.options)}}return qe}_mergeHeaders(Ae){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(Ae||{}))}return lowercaseKeys(Ae||{})}_getExistingOrDefaultHeader(Ae,Se,Ke){let qe;if(this.requestOptions&&this.requestOptions.headers){qe=lowercaseKeys(this.requestOptions.headers)[Se]}return Ae[Se]||qe||Ke}_getAgent(Ae){let Se;const Ke=st.getProxyUrl(Ae);const qe=Ke&&Ke.hostname;if(this._keepAlive&&qe){Se=this._proxyAgent}if(this._keepAlive&&!qe){Se=this._agent}if(Se){return Se}const Fe=Ae.protocol==="https:";let $e=100;if(this.requestOptions){$e=this.requestOptions.maxSockets||it.globalAgent.maxSockets}if(Ke&&Ke.hostname){const Ae={maxSockets:$e,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(Ke.username||Ke.password)&&{proxyAuth:`${Ke.username}:${Ke.password}`}),{host:Ke.hostname,port:Ke.port})};let qe;const rt=Ke.protocol==="https:";if(Fe){qe=rt?ut.httpsOverHttps:ut.httpsOverHttp}else{qe=rt?ut.httpOverHttps:ut.httpOverHttp}Se=qe(Ae);this._proxyAgent=Se}if(this._keepAlive&&!Se){const Ae={keepAlive:this._keepAlive,maxSockets:$e};Se=Fe?new nt.Agent(Ae):new it.Agent(Ae);this._agent=Se}if(!Se){Se=Fe?nt.globalAgent:it.globalAgent}if(Fe&&this._ignoreSslError){Se.options=Object.assign(Se.options||{},{rejectUnauthorized:false})}return Se}_performExponentialBackoff(Ae){return rt(this,void 0,void 0,(function*(){Ae=Math.min(Rt,Ae);const Se=Kt*Math.pow(2,Ae);return new Promise((Ae=>setTimeout((()=>Ae()),Se)))}))}_processResponse(Ae,Se){return rt(this,void 0,void 0,(function*(){return new Promise(((Ke,qe)=>rt(this,void 0,void 0,(function*(){const Fe=Ae.message.statusCode||0;const $e={statusCode:Fe,result:null,headers:{}};if(Fe===ht.NotFound){Ke($e)}function dateTimeDeserializer(Ae,Se){if(typeof Se==="string"){const Ae=new Date(Se);if(!isNaN(Ae.valueOf())){return Ae}}return Se}let rt;let it;try{it=yield Ae.readBody();if(it&&it.length>0){if(Se&&Se.deserializeDates){rt=JSON.parse(it,dateTimeDeserializer)}else{rt=JSON.parse(it)}$e.result=rt}$e.headers=Ae.message.headers}catch(Ae){}if(Fe>299){let Ae;if(rt&&rt.message){Ae=rt.message}else if(it&&it.length>0){Ae=it}else{Ae=`Failed request: (${Fe})`}const Se=new HttpClientError(Ae,Fe);Se.result=$e.result;qe(Se)}else{Ke($e)}}))))}))}}Se.HttpClient=HttpClient;const lowercaseKeys=Ae=>Object.keys(Ae).reduce(((Se,Ke)=>(Se[Ke.toLowerCase()]=Ae[Ke],Se)),{})},9835:(Ae,Se)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se.checkBypass=Se.getProxyUrl=void 0;function getProxyUrl(Ae){const Se=Ae.protocol==="https:";if(checkBypass(Ae)){return undefined}const Ke=(()=>{if(Se){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(Ke){return new URL(Ke)}else{return undefined}}Se.getProxyUrl=getProxyUrl;function checkBypass(Ae){if(!Ae.hostname){return false}const Se=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!Se){return false}let Ke;if(Ae.port){Ke=Number(Ae.port)}else if(Ae.protocol==="http:"){Ke=80}else if(Ae.protocol==="https:"){Ke=443}const qe=[Ae.hostname.toUpperCase()];if(typeof Ke==="number"){qe.push(`${qe[0]}:${Ke}`)}for(const Ae of Se.split(",").map((Ae=>Ae.trim().toUpperCase())).filter((Ae=>Ae))){if(qe.some((Se=>Se===Ae))){return true}}return false}Se.checkBypass=checkBypass},1962:function(Ae,Se,Ke){"use strict";var qe=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};var Fe;Object.defineProperty(Se,"__esModule",{value:true});const $e=Ke(9491);const rt=Ke(7147);const it=Ke(1017);Fe=rt.promises,Se.chmod=Fe.chmod,Se.copyFile=Fe.copyFile,Se.lstat=Fe.lstat,Se.mkdir=Fe.mkdir,Se.readdir=Fe.readdir,Se.readlink=Fe.readlink,Se.rename=Fe.rename,Se.rmdir=Fe.rmdir,Se.stat=Fe.stat,Se.symlink=Fe.symlink,Se.unlink=Fe.unlink;Se.IS_WINDOWS=process.platform==="win32";function exists(Ae){return qe(this,void 0,void 0,(function*(){try{yield Se.stat(Ae)}catch(Ae){if(Ae.code==="ENOENT"){return false}throw Ae}return true}))}Se.exists=exists;function isDirectory(Ae,Ke=false){return qe(this,void 0,void 0,(function*(){const qe=Ke?yield Se.stat(Ae):yield Se.lstat(Ae);return qe.isDirectory()}))}Se.isDirectory=isDirectory;function isRooted(Ae){Ae=normalizeSeparators(Ae);if(!Ae){throw new Error('isRooted() parameter "p" cannot be empty')}if(Se.IS_WINDOWS){return Ae.startsWith("\\")||/^[A-Z]:/i.test(Ae)}return Ae.startsWith("/")}Se.isRooted=isRooted;function mkdirP(Ae,Ke=1e3,Fe=1){return qe(this,void 0,void 0,(function*(){$e.ok(Ae,"a path argument must be provided");Ae=it.resolve(Ae);if(Fe>=Ke)return Se.mkdir(Ae);try{yield Se.mkdir(Ae);return}catch(qe){switch(qe.code){case"ENOENT":{yield mkdirP(it.dirname(Ae),Ke,Fe+1);yield Se.mkdir(Ae);return}default:{let Ke;try{Ke=yield Se.stat(Ae)}catch(Ae){throw qe}if(!Ke.isDirectory())throw qe}}}}))}Se.mkdirP=mkdirP;function tryGetExecutablePath(Ae,Ke){return qe(this,void 0,void 0,(function*(){let qe=undefined;try{qe=yield Se.stat(Ae)}catch(Se){if(Se.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${Ae}': ${Se}`)}}if(qe&&qe.isFile()){if(Se.IS_WINDOWS){const Se=it.extname(Ae).toUpperCase();if(Ke.some((Ae=>Ae.toUpperCase()===Se))){return Ae}}else{if(isUnixExecutable(qe)){return Ae}}}const Fe=Ae;for(const $e of Ke){Ae=Fe+$e;qe=undefined;try{qe=yield Se.stat(Ae)}catch(Se){if(Se.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${Ae}': ${Se}`)}}if(qe&&qe.isFile()){if(Se.IS_WINDOWS){try{const Ke=it.dirname(Ae);const qe=it.basename(Ae).toUpperCase();for(const Fe of yield Se.readdir(Ke)){if(qe===Fe.toUpperCase()){Ae=it.join(Ke,Fe);break}}}catch(Se){console.log(`Unexpected error attempting to determine the actual case of the file '${Ae}': ${Se}`)}return Ae}else{if(isUnixExecutable(qe)){return Ae}}}}return""}))}Se.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(Ae){Ae=Ae||"";if(Se.IS_WINDOWS){Ae=Ae.replace(/\//g,"\\");return Ae.replace(/\\\\+/g,"\\")}return Ae.replace(/\/\/+/g,"/")}function isUnixExecutable(Ae){return(Ae.mode&1)>0||(Ae.mode&8)>0&&Ae.gid===process.getgid()||(Ae.mode&64)>0&&Ae.uid===process.getuid()}},7436:function(Ae,Se,Ke){"use strict";var qe=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});const Fe=Ke(2081);const $e=Ke(1017);const rt=Ke(3837);const it=Ke(1962);const nt=rt.promisify(Fe.exec);function cp(Ae,Se,Ke={}){return qe(this,void 0,void 0,(function*(){const{force:qe,recursive:Fe}=readCopyOptions(Ke);const rt=(yield it.exists(Se))?yield it.stat(Se):null;if(rt&&rt.isFile()&&!qe){return}const nt=rt&&rt.isDirectory()?$e.join(Se,$e.basename(Ae)):Se;if(!(yield it.exists(Ae))){throw new Error(`no such file or directory: ${Ae}`)}const st=yield it.stat(Ae);if(st.isDirectory()){if(!Fe){throw new Error(`Failed to copy. ${Ae} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(Ae,nt,0,qe)}}else{if($e.relative(Ae,nt)===""){throw new Error(`'${nt}' and '${Ae}' are the same file`)}yield copyFile(Ae,nt,qe)}}))}Se.cp=cp;function mv(Ae,Se,Ke={}){return qe(this,void 0,void 0,(function*(){if(yield it.exists(Se)){let qe=true;if(yield it.isDirectory(Se)){Se=$e.join(Se,$e.basename(Ae));qe=yield it.exists(Se)}if(qe){if(Ke.force==null||Ke.force){yield rmRF(Se)}else{throw new Error("Destination already exists")}}}yield mkdirP($e.dirname(Se));yield it.rename(Ae,Se)}))}Se.mv=mv;function rmRF(Ae){return qe(this,void 0,void 0,(function*(){if(it.IS_WINDOWS){try{if(yield it.isDirectory(Ae,true)){yield nt(`rd /s /q "${Ae}"`)}else{yield nt(`del /f /a "${Ae}"`)}}catch(Ae){if(Ae.code!=="ENOENT")throw Ae}try{yield it.unlink(Ae)}catch(Ae){if(Ae.code!=="ENOENT")throw Ae}}else{let Se=false;try{Se=yield it.isDirectory(Ae)}catch(Ae){if(Ae.code!=="ENOENT")throw Ae;return}if(Se){yield nt(`rm -rf "${Ae}"`)}else{yield it.unlink(Ae)}}}))}Se.rmRF=rmRF;function mkdirP(Ae){return qe(this,void 0,void 0,(function*(){yield it.mkdirP(Ae)}))}Se.mkdirP=mkdirP;function which(Ae,Se){return qe(this,void 0,void 0,(function*(){if(!Ae){throw new Error("parameter 'tool' is required")}if(Se){const Se=yield which(Ae,false);if(!Se){if(it.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${Ae}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${Ae}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const Se=[];if(it.IS_WINDOWS&&process.env.PATHEXT){for(const Ae of process.env.PATHEXT.split($e.delimiter)){if(Ae){Se.push(Ae)}}}if(it.isRooted(Ae)){const Ke=yield it.tryGetExecutablePath(Ae,Se);if(Ke){return Ke}return""}if(Ae.includes("/")||it.IS_WINDOWS&&Ae.includes("\\")){return""}const Ke=[];if(process.env.PATH){for(const Ae of process.env.PATH.split($e.delimiter)){if(Ae){Ke.push(Ae)}}}for(const qe of Ke){const Ke=yield it.tryGetExecutablePath(qe+$e.sep+Ae,Se);if(Ke){return Ke}}return""}catch(Ae){throw new Error(`which failed with message ${Ae.message}`)}}))}Se.which=which;function readCopyOptions(Ae){const Se=Ae.force==null?true:Ae.force;const Ke=Boolean(Ae.recursive);return{force:Se,recursive:Ke}}function cpDirRecursive(Ae,Se,Ke,Fe){return qe(this,void 0,void 0,(function*(){if(Ke>=255)return;Ke++;yield mkdirP(Se);const qe=yield it.readdir(Ae);for(const $e of qe){const qe=`${Ae}/${$e}`;const rt=`${Se}/${$e}`;const nt=yield it.lstat(qe);if(nt.isDirectory()){yield cpDirRecursive(qe,rt,Ke,Fe)}else{yield copyFile(qe,rt,Fe)}}yield it.chmod(Se,(yield it.stat(Ae)).mode)}))}function copyFile(Ae,Se,Ke){return qe(this,void 0,void 0,(function*(){if((yield it.lstat(Ae)).isSymbolicLink()){try{yield it.lstat(Se);yield it.unlink(Se)}catch(Ae){if(Ae.code==="EPERM"){yield it.chmod(Se,"0666");yield it.unlink(Se)}}const Ke=yield it.readlink(Ae);yield it.symlink(Ke,Se,it.IS_WINDOWS?"junction":null)}else if(!(yield it.exists(Se))||Ke){yield it.copyFile(Ae,Se)}}))}},2764:Ae=>{"use strict";Ae.exports=addressparser;function addressparser(Ae){var Se=new Tokenizer(Ae);var Ke=Se.tokenize();var qe=[];var Fe=[];var $e=[];Ke.forEach((function(Ae){if(Ae.type==="operator"&&(Ae.value===","||Ae.value===";")){if(Fe.length){qe.push(Fe)}Fe=[]}else{Fe.push(Ae)}}));if(Fe.length){qe.push(Fe)}qe.forEach((function(Ae){Ae=_handleAddress(Ae);if(Ae.length){$e=$e.concat(Ae)}}));return $e}function _handleAddress(Ae){var Se;var Ke=false;var qe="text";var Fe;var $e=[];var rt={address:[],comment:[],group:[],text:[]};var it;var nt;for(it=0,nt=Ae.length;it<nt;it++){Se=Ae[it];if(Se.type==="operator"){switch(Se.value){case"<":qe="address";break;case"(":qe="comment";break;case":":qe="group";Ke=true;break;default:qe="text"}}else if(Se.value){if(qe==="address"){Se.value=Se.value.replace(/^[^<]*<\s*/,"")}rt[qe].push(Se.value)}}if(!rt.text.length&&rt.comment.length){rt.text=rt.comment;rt.comment=[]}if(Ke){rt.text=rt.text.join(" ");$e.push({name:rt.text||Fe&&Fe.name,group:rt.group.length?addressparser(rt.group.join(",")):[]})}else{if(!rt.address.length&&rt.text.length){for(it=rt.text.length-1;it>=0;it--){if(rt.text[it].match(/^[^@\s]+@[^@\s]+$/)){rt.address=rt.text.splice(it,1);break}}var _regexHandler=function(Ae){if(!rt.address.length){rt.address=[Ae.trim()];return" "}else{return Ae}};if(!rt.address.length){for(it=rt.text.length-1;it>=0;it--){rt.text[it]=rt.text[it].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,_regexHandler).trim();if(rt.address.length){break}}}}if(!rt.text.length&&rt.comment.length){rt.text=rt.comment;rt.comment=[]}if(rt.address.length>1){rt.text=rt.text.concat(rt.address.splice(1))}rt.text=rt.text.join(" ");rt.address=rt.address.join(" ");if(!rt.address&&Ke){return[]}else{Fe={address:rt.address||rt.text||"",name:rt.text||rt.address||""};if(Fe.address===Fe.name){if((Fe.address||"").match(/@/)){Fe.name=""}else{Fe.address=""}}$e.push(Fe)}}return $e}function Tokenizer(Ae){this.str=(Ae||"").toString();this.operatorCurrent="";this.operatorExpecting="";this.node=null;this.escaped=false;this.list=[]}Tokenizer.prototype.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""};Tokenizer.prototype.tokenize=function(){var Ae,Se=[];for(var Ke=0,qe=this.str.length;Ke<qe;Ke++){Ae=this.str.charAt(Ke);this.checkChar(Ae)}this.list.forEach((function(Ae){Ae.value=(Ae.value||"").toString().trim();if(Ae.value){Se.push(Ae)}}));return Se};Tokenizer.prototype.checkChar=function(Ae){if((Ae in this.operators||Ae==="\\")&&this.escaped){this.escaped=false}else if(this.operatorExpecting&&Ae===this.operatorExpecting){this.node={type:"operator",value:Ae};this.list.push(this.node);this.node=null;this.operatorExpecting="";this.escaped=false;return}else if(!this.operatorExpecting&&Ae in this.operators){this.node={type:"operator",value:Ae};this.list.push(this.node);this.node=null;this.operatorExpecting=this.operators[Ae];this.escaped=false;return}if(!this.escaped&&Ae==="\\"){this.escaped=true;return}if(!this.node){this.node={type:"text",value:""};this.list.push(this.node)}if(this.escaped&&Ae!=="\\"){this.node.value+="\\"}this.node.value+=Ae;this.escaped=false}},4293:(Ae,Se,Ke)=>{"use strict";const qe=Se;qe.bignum=Ke(6641);qe.define=Ke(5245).define;qe.base=Ke(8096);qe.constants=Ke(3371);qe.decoders=Ke(4952);qe.encoders=Ke(9083)},5245:(Ae,Se,Ke)=>{"use strict";const qe=Ke(9083);const Fe=Ke(4952);const $e=Ke(4124);const rt=Se;rt.define=function define(Ae,Se){return new Entity(Ae,Se)};function Entity(Ae,Se){this.name=Ae;this.body=Se;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(Ae){const Se=this.name;function Generated(Ae){this._initNamed(Ae,Se)}$e(Generated,Ae);Generated.prototype._initNamed=function _initNamed(Se,Ke){Ae.call(this,Se,Ke)};return new Generated(this)};Entity.prototype._getDecoder=function _getDecoder(Ae){Ae=Ae||"der";if(!this.decoders.hasOwnProperty(Ae))this.decoders[Ae]=this._createNamed(Fe[Ae]);return this.decoders[Ae]};Entity.prototype.decode=function decode(Ae,Se,Ke){return this._getDecoder(Se).decode(Ae,Ke)};Entity.prototype._getEncoder=function _getEncoder(Ae){Ae=Ae||"der";if(!this.encoders.hasOwnProperty(Ae))this.encoders[Ae]=this._createNamed(qe[Ae]);return this.encoders[Ae]};Entity.prototype.encode=function encode(Ae,Se,Ke){return this._getEncoder(Se).encode(Ae,Ke)}},5298:(Ae,Se,Ke)=>{"use strict";const qe=Ke(4124);const Fe=Ke(3744).b;const $e=Ke(5118).Buffer;function DecoderBuffer(Ae,Se){Fe.call(this,Se);if(!$e.isBuffer(Ae)){this.error("Input not Buffer");return}this.base=Ae;this.offset=0;this.length=Ae.length}qe(DecoderBuffer,Fe);Se.C=DecoderBuffer;DecoderBuffer.isDecoderBuffer=function isDecoderBuffer(Ae){if(Ae instanceof DecoderBuffer){return true}const Se=typeof Ae==="object"&&$e.isBuffer(Ae.base)&&Ae.constructor.name==="DecoderBuffer"&&typeof Ae.offset==="number"&&typeof Ae.length==="number"&&typeof Ae.save==="function"&&typeof Ae.restore==="function"&&typeof Ae.isEmpty==="function"&&typeof Ae.readUInt8==="function"&&typeof Ae.skip==="function"&&typeof Ae.raw==="function";return Se};DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:Fe.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(Ae){const Se=new DecoderBuffer(this.base);Se.offset=Ae.offset;Se.length=this.offset;this.offset=Ae.offset;Fe.prototype.restore.call(this,Ae.reporter);return Se};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(Ae){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(Ae||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(Ae,Se){if(!(this.offset+Ae<=this.length))return this.error(Se||"DecoderBuffer overrun");const Ke=new DecoderBuffer(this.base);Ke._reporterState=this._reporterState;Ke.offset=this.offset;Ke.length=this.offset+Ae;this.offset+=Ae;return Ke};DecoderBuffer.prototype.raw=function raw(Ae){return this.base.slice(Ae?Ae.offset:this.offset,this.length)};function EncoderBuffer(Ae,Se){if(Array.isArray(Ae)){this.length=0;this.value=Ae.map((function(Ae){if(!EncoderBuffer.isEncoderBuffer(Ae))Ae=new EncoderBuffer(Ae,Se);this.length+=Ae.length;return Ae}),this)}else if(typeof Ae==="number"){if(!(0<=Ae&&Ae<=255))return Se.error("non-byte EncoderBuffer value");this.value=Ae;this.length=1}else if(typeof Ae==="string"){this.value=Ae;this.length=$e.byteLength(Ae)}else if($e.isBuffer(Ae)){this.value=Ae;this.length=Ae.length}else{return Se.error("Unsupported type: "+typeof Ae)}}Se.R=EncoderBuffer;EncoderBuffer.isEncoderBuffer=function isEncoderBuffer(Ae){if(Ae instanceof EncoderBuffer){return true}const Se=typeof Ae==="object"&&Ae.constructor.name==="EncoderBuffer"&&typeof Ae.length==="number"&&typeof Ae.join==="function";return Se};EncoderBuffer.prototype.join=function join(Ae,Se){if(!Ae)Ae=$e.alloc(this.length);if(!Se)Se=0;if(this.length===0)return Ae;if(Array.isArray(this.value)){this.value.forEach((function(Ke){Ke.join(Ae,Se);Se+=Ke.length}))}else{if(typeof this.value==="number")Ae[Se]=this.value;else if(typeof this.value==="string")Ae.write(this.value,Se);else if($e.isBuffer(this.value))this.value.copy(Ae,Se);Se+=this.length}return Ae}},8096:(Ae,Se,Ke)=>{"use strict";const qe=Se;qe.Reporter=Ke(3744).b;qe.DecoderBuffer=Ke(5298).C;qe.EncoderBuffer=Ke(5298).R;qe.Node=Ke(842)},842:(Ae,Se,Ke)=>{"use strict";const qe=Ke(3744).b;const Fe=Ke(5298).R;const $e=Ke(5298).C;const rt=Ke(910);const it=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"];const nt=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(it);const st=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(Ae,Se,Ke){const qe={};this._baseState=qe;qe.name=Ke;qe.enc=Ae;qe.parent=Se||null;qe.children=null;qe.tag=null;qe.args=null;qe.reverseArgs=null;qe.choice=null;qe.optional=false;qe.any=false;qe.obj=false;qe.use=null;qe.useDecoder=null;qe.key=null;qe["default"]=null;qe.explicit=null;qe.implicit=null;qe.contains=null;if(!qe.parent){qe.children=[];this._wrap()}}Ae.exports=Node;const ut=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){const Ae=this._baseState;const Se={};ut.forEach((function(Ke){Se[Ke]=Ae[Ke]}));const Ke=new this.constructor(Se.parent);Ke._baseState=Se;return Ke};Node.prototype._wrap=function wrap(){const Ae=this._baseState;nt.forEach((function(Se){this[Se]=function _wrappedMethod(){const Ke=new this.constructor(this);Ae.children.push(Ke);return Ke[Se].apply(Ke,arguments)}}),this)};Node.prototype._init=function init(Ae){const Se=this._baseState;rt(Se.parent===null);Ae.call(this);Se.children=Se.children.filter((function(Ae){return Ae._baseState.parent===this}),this);rt.equal(Se.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(Ae){const Se=this._baseState;const Ke=Ae.filter((function(Ae){return Ae instanceof this.constructor}),this);Ae=Ae.filter((function(Ae){return!(Ae instanceof this.constructor)}),this);if(Ke.length!==0){rt(Se.children===null);Se.children=Ke;Ke.forEach((function(Ae){Ae._baseState.parent=this}),this)}if(Ae.length!==0){rt(Se.args===null);Se.args=Ae;Se.reverseArgs=Ae.map((function(Ae){if(typeof Ae!=="object"||Ae.constructor!==Object)return Ae;const Se={};Object.keys(Ae).forEach((function(Ke){if(Ke==(Ke|0))Ke|=0;const qe=Ae[Ke];Se[qe]=Ke}));return Se}))}};st.forEach((function(Ae){Node.prototype[Ae]=function _overrided(){const Se=this._baseState;throw new Error(Ae+" not implemented for encoding: "+Se.enc)}}));it.forEach((function(Ae){Node.prototype[Ae]=function _tagMethod(){const Se=this._baseState;const Ke=Array.prototype.slice.call(arguments);rt(Se.tag===null);Se.tag=Ae;this._useArgs(Ke);return this}}));Node.prototype.use=function use(Ae){rt(Ae);const Se=this._baseState;rt(Se.use===null);Se.use=Ae;return this};Node.prototype.optional=function optional(){const Ae=this._baseState;Ae.optional=true;return this};Node.prototype.def=function def(Ae){const Se=this._baseState;rt(Se["default"]===null);Se["default"]=Ae;Se.optional=true;return this};Node.prototype.explicit=function explicit(Ae){const Se=this._baseState;rt(Se.explicit===null&&Se.implicit===null);Se.explicit=Ae;return this};Node.prototype.implicit=function implicit(Ae){const Se=this._baseState;rt(Se.explicit===null&&Se.implicit===null);Se.implicit=Ae;return this};Node.prototype.obj=function obj(){const Ae=this._baseState;const Se=Array.prototype.slice.call(arguments);Ae.obj=true;if(Se.length!==0)this._useArgs(Se);return this};Node.prototype.key=function key(Ae){const Se=this._baseState;rt(Se.key===null);Se.key=Ae;return this};Node.prototype.any=function any(){const Ae=this._baseState;Ae.any=true;return this};Node.prototype.choice=function choice(Ae){const Se=this._baseState;rt(Se.choice===null);Se.choice=Ae;this._useArgs(Object.keys(Ae).map((function(Se){return Ae[Se]})));return this};Node.prototype.contains=function contains(Ae){const Se=this._baseState;rt(Se.use===null);Se.contains=Ae;return this};Node.prototype._decode=function decode(Ae,Se){const Ke=this._baseState;if(Ke.parent===null)return Ae.wrapResult(Ke.children[0]._decode(Ae,Se));let qe=Ke["default"];let Fe=true;let rt=null;if(Ke.key!==null)rt=Ae.enterKey(Ke.key);if(Ke.optional){let qe=null;if(Ke.explicit!==null)qe=Ke.explicit;else if(Ke.implicit!==null)qe=Ke.implicit;else if(Ke.tag!==null)qe=Ke.tag;if(qe===null&&!Ke.any){const qe=Ae.save();try{if(Ke.choice===null)this._decodeGeneric(Ke.tag,Ae,Se);else this._decodeChoice(Ae,Se);Fe=true}catch(Ae){Fe=false}Ae.restore(qe)}else{Fe=this._peekTag(Ae,qe,Ke.any);if(Ae.isError(Fe))return Fe}}let it;if(Ke.obj&&Fe)it=Ae.enterObject();if(Fe){if(Ke.explicit!==null){const Se=this._decodeTag(Ae,Ke.explicit);if(Ae.isError(Se))return Se;Ae=Se}const Fe=Ae.offset;if(Ke.use===null&&Ke.choice===null){let Se;if(Ke.any)Se=Ae.save();const Fe=this._decodeTag(Ae,Ke.implicit!==null?Ke.implicit:Ke.tag,Ke.any);if(Ae.isError(Fe))return Fe;if(Ke.any)qe=Ae.raw(Se);else Ae=Fe}if(Se&&Se.track&&Ke.tag!==null)Se.track(Ae.path(),Fe,Ae.length,"tagged");if(Se&&Se.track&&Ke.tag!==null)Se.track(Ae.path(),Ae.offset,Ae.length,"content");if(Ke.any){}else if(Ke.choice===null){qe=this._decodeGeneric(Ke.tag,Ae,Se)}else{qe=this._decodeChoice(Ae,Se)}if(Ae.isError(qe))return qe;if(!Ke.any&&Ke.choice===null&&Ke.children!==null){Ke.children.forEach((function decodeChildren(Ke){Ke._decode(Ae,Se)}))}if(Ke.contains&&(Ke.tag==="octstr"||Ke.tag==="bitstr")){const Fe=new $e(qe);qe=this._getUse(Ke.contains,Ae._reporterState.obj)._decode(Fe,Se)}}if(Ke.obj&&Fe)qe=Ae.leaveObject(it);if(Ke.key!==null&&(qe!==null||Fe===true))Ae.leaveKey(rt,Ke.key,qe);else if(rt!==null)Ae.exitKey(rt);return qe};Node.prototype._decodeGeneric=function decodeGeneric(Ae,Se,Ke){const qe=this._baseState;if(Ae==="seq"||Ae==="set")return null;if(Ae==="seqof"||Ae==="setof")return this._decodeList(Se,Ae,qe.args[0],Ke);else if(/str$/.test(Ae))return this._decodeStr(Se,Ae,Ke);else if(Ae==="objid"&&qe.args)return this._decodeObjid(Se,qe.args[0],qe.args[1],Ke);else if(Ae==="objid")return this._decodeObjid(Se,null,null,Ke);else if(Ae==="gentime"||Ae==="utctime")return this._decodeTime(Se,Ae,Ke);else if(Ae==="null_")return this._decodeNull(Se,Ke);else if(Ae==="bool")return this._decodeBool(Se,Ke);else if(Ae==="objDesc")return this._decodeStr(Se,Ae,Ke);else if(Ae==="int"||Ae==="enum")return this._decodeInt(Se,qe.args&&qe.args[0],Ke);if(qe.use!==null){return this._getUse(qe.use,Se._reporterState.obj)._decode(Se,Ke)}else{return Se.error("unknown tag: "+Ae)}};Node.prototype._getUse=function _getUse(Ae,Se){const Ke=this._baseState;Ke.useDecoder=this._use(Ae,Se);rt(Ke.useDecoder._baseState.parent===null);Ke.useDecoder=Ke.useDecoder._baseState.children[0];if(Ke.implicit!==Ke.useDecoder._baseState.implicit){Ke.useDecoder=Ke.useDecoder.clone();Ke.useDecoder._baseState.implicit=Ke.implicit}return Ke.useDecoder};Node.prototype._decodeChoice=function decodeChoice(Ae,Se){const Ke=this._baseState;let qe=null;let Fe=false;Object.keys(Ke.choice).some((function($e){const rt=Ae.save();const it=Ke.choice[$e];try{const Ke=it._decode(Ae,Se);if(Ae.isError(Ke))return false;qe={type:$e,value:Ke};Fe=true}catch(Se){Ae.restore(rt);return false}return true}),this);if(!Fe)return Ae.error("Choice not matched");return qe};Node.prototype._createEncoderBuffer=function createEncoderBuffer(Ae){return new Fe(Ae,this.reporter)};Node.prototype._encode=function encode(Ae,Se,Ke){const qe=this._baseState;if(qe["default"]!==null&&qe["default"]===Ae)return;const Fe=this._encodeValue(Ae,Se,Ke);if(Fe===undefined)return;if(this._skipDefault(Fe,Se,Ke))return;return Fe};Node.prototype._encodeValue=function encode(Ae,Se,Ke){const Fe=this._baseState;if(Fe.parent===null)return Fe.children[0]._encode(Ae,Se||new qe);let $e=null;this.reporter=Se;if(Fe.optional&&Ae===undefined){if(Fe["default"]!==null)Ae=Fe["default"];else return}let rt=null;let it=false;if(Fe.any){$e=this._createEncoderBuffer(Ae)}else if(Fe.choice){$e=this._encodeChoice(Ae,Se)}else if(Fe.contains){rt=this._getUse(Fe.contains,Ke)._encode(Ae,Se);it=true}else if(Fe.children){rt=Fe.children.map((function(Ke){if(Ke._baseState.tag==="null_")return Ke._encode(null,Se,Ae);if(Ke._baseState.key===null)return Se.error("Child should have a key");const qe=Se.enterKey(Ke._baseState.key);if(typeof Ae!=="object")return Se.error("Child expected, but input is not object");const Fe=Ke._encode(Ae[Ke._baseState.key],Se,Ae);Se.leaveKey(qe);return Fe}),this).filter((function(Ae){return Ae}));rt=this._createEncoderBuffer(rt)}else{if(Fe.tag==="seqof"||Fe.tag==="setof"){if(!(Fe.args&&Fe.args.length===1))return Se.error("Too many args for : "+Fe.tag);if(!Array.isArray(Ae))return Se.error("seqof/setof, but data is not Array");const Ke=this.clone();Ke._baseState.implicit=null;rt=this._createEncoderBuffer(Ae.map((function(Ke){const qe=this._baseState;return this._getUse(qe.args[0],Ae)._encode(Ke,Se)}),Ke))}else if(Fe.use!==null){$e=this._getUse(Fe.use,Ke)._encode(Ae,Se)}else{rt=this._encodePrimitive(Fe.tag,Ae);it=true}}if(!Fe.any&&Fe.choice===null){const Ae=Fe.implicit!==null?Fe.implicit:Fe.tag;const Ke=Fe.implicit===null?"universal":"context";if(Ae===null){if(Fe.use===null)Se.error("Tag could be omitted only for .use()")}else{if(Fe.use===null)$e=this._encodeComposite(Ae,it,Ke,rt)}}if(Fe.explicit!==null)$e=this._encodeComposite(Fe.explicit,false,"context",$e);return $e};Node.prototype._encodeChoice=function encodeChoice(Ae,Se){const Ke=this._baseState;const qe=Ke.choice[Ae.type];if(!qe){rt(false,Ae.type+" not found in "+JSON.stringify(Object.keys(Ke.choice)))}return qe._encode(Ae.value,Se)};Node.prototype._encodePrimitive=function encodePrimitive(Ae,Se){const Ke=this._baseState;if(/str$/.test(Ae))return this._encodeStr(Se,Ae);else if(Ae==="objid"&&Ke.args)return this._encodeObjid(Se,Ke.reverseArgs[0],Ke.args[1]);else if(Ae==="objid")return this._encodeObjid(Se,null,null);else if(Ae==="gentime"||Ae==="utctime")return this._encodeTime(Se,Ae);else if(Ae==="null_")return this._encodeNull();else if(Ae==="int"||Ae==="enum")return this._encodeInt(Se,Ke.args&&Ke.reverseArgs[0]);else if(Ae==="bool")return this._encodeBool(Se);else if(Ae==="objDesc")return this._encodeStr(Se,Ae);else throw new Error("Unsupported tag: "+Ae)};Node.prototype._isNumstr=function isNumstr(Ae){return/^[0-9 ]*$/.test(Ae)};Node.prototype._isPrintstr=function isPrintstr(Ae){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(Ae)}},3744:(Ae,Se,Ke)=>{"use strict";const qe=Ke(4124);function Reporter(Ae){this._reporterState={obj:null,path:[],options:Ae||{},errors:[]}}Se.b=Reporter;Reporter.prototype.isError=function isError(Ae){return Ae instanceof ReporterError};Reporter.prototype.save=function save(){const Ae=this._reporterState;return{obj:Ae.obj,pathLen:Ae.path.length}};Reporter.prototype.restore=function restore(Ae){const Se=this._reporterState;Se.obj=Ae.obj;Se.path=Se.path.slice(0,Ae.pathLen)};Reporter.prototype.enterKey=function enterKey(Ae){return this._reporterState.path.push(Ae)};Reporter.prototype.exitKey=function exitKey(Ae){const Se=this._reporterState;Se.path=Se.path.slice(0,Ae-1)};Reporter.prototype.leaveKey=function leaveKey(Ae,Se,Ke){const qe=this._reporterState;this.exitKey(Ae);if(qe.obj!==null)qe.obj[Se]=Ke};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){const Ae=this._reporterState;const Se=Ae.obj;Ae.obj={};return Se};Reporter.prototype.leaveObject=function leaveObject(Ae){const Se=this._reporterState;const Ke=Se.obj;Se.obj=Ae;return Ke};Reporter.prototype.error=function error(Ae){let Se;const Ke=this._reporterState;const qe=Ae instanceof ReporterError;if(qe){Se=Ae}else{Se=new ReporterError(Ke.path.map((function(Ae){return"["+JSON.stringify(Ae)+"]"})).join(""),Ae.message||Ae,Ae.stack)}if(!Ke.options.partial)throw Se;if(!qe)Ke.errors.push(Se);return Se};Reporter.prototype.wrapResult=function wrapResult(Ae){const Se=this._reporterState;if(!Se.options.partial)return Ae;return{result:this.isError(Ae)?null:Ae,errors:Se.errors}};function ReporterError(Ae,Se){this.path=Ae;this.rethrow(Se)}qe(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(Ae){this.message=Ae+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(Ae){this.stack=Ae.stack}}return this}},1188:(Ae,Se)=>{"use strict";function reverse(Ae){const Se={};Object.keys(Ae).forEach((function(Ke){if((Ke|0)==Ke)Ke=Ke|0;const qe=Ae[Ke];Se[qe]=Ke}));return Se}Se.tagClass={0:"universal",1:"application",2:"context",3:"private"};Se.tagClassByName=reverse(Se.tagClass);Se.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};Se.tagByName=reverse(Se.tag)},3371:(Ae,Se,Ke)=>{"use strict";const qe=Se;qe._reverse=function reverse(Ae){const Se={};Object.keys(Ae).forEach((function(Ke){if((Ke|0)==Ke)Ke=Ke|0;const qe=Ae[Ke];Se[qe]=Ke}));return Se};qe.der=Ke(1188)},3332:(Ae,Se,Ke)=>{"use strict";const qe=Ke(4124);const Fe=Ke(6641);const $e=Ke(5298).C;const rt=Ke(842);const it=Ke(1188);function DERDecoder(Ae){this.enc="der";this.name=Ae.name;this.entity=Ae;this.tree=new DERNode;this.tree._init(Ae.body)}Ae.exports=DERDecoder;DERDecoder.prototype.decode=function decode(Ae,Se){if(!$e.isDecoderBuffer(Ae)){Ae=new $e(Ae,Se)}return this.tree._decode(Ae,Se)};function DERNode(Ae){rt.call(this,"der",Ae)}qe(DERNode,rt);DERNode.prototype._peekTag=function peekTag(Ae,Se,Ke){if(Ae.isEmpty())return false;const qe=Ae.save();const Fe=derDecodeTag(Ae,'Failed to peek tag: "'+Se+'"');if(Ae.isError(Fe))return Fe;Ae.restore(qe);return Fe.tag===Se||Fe.tagStr===Se||Fe.tagStr+"of"===Se||Ke};DERNode.prototype._decodeTag=function decodeTag(Ae,Se,Ke){const qe=derDecodeTag(Ae,'Failed to decode tag of "'+Se+'"');if(Ae.isError(qe))return qe;let Fe=derDecodeLen(Ae,qe.primitive,'Failed to get length of "'+Se+'"');if(Ae.isError(Fe))return Fe;if(!Ke&&qe.tag!==Se&&qe.tagStr!==Se&&qe.tagStr+"of"!==Se){return Ae.error('Failed to match tag: "'+Se+'"')}if(qe.primitive||Fe!==null)return Ae.skip(Fe,'Failed to match body of: "'+Se+'"');const $e=Ae.save();const rt=this._skipUntilEnd(Ae,'Failed to skip indefinite length body: "'+this.tag+'"');if(Ae.isError(rt))return rt;Fe=Ae.offset-$e.offset;Ae.restore($e);return Ae.skip(Fe,'Failed to match body of: "'+Se+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(Ae,Se){for(;;){const Ke=derDecodeTag(Ae,Se);if(Ae.isError(Ke))return Ke;const qe=derDecodeLen(Ae,Ke.primitive,Se);if(Ae.isError(qe))return qe;let Fe;if(Ke.primitive||qe!==null)Fe=Ae.skip(qe);else Fe=this._skipUntilEnd(Ae,Se);if(Ae.isError(Fe))return Fe;if(Ke.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(Ae,Se,Ke,qe){const Fe=[];while(!Ae.isEmpty()){const Se=this._peekTag(Ae,"end");if(Ae.isError(Se))return Se;const $e=Ke.decode(Ae,"der",qe);if(Ae.isError($e)&&Se)break;Fe.push($e)}return Fe};DERNode.prototype._decodeStr=function decodeStr(Ae,Se){if(Se==="bitstr"){const Se=Ae.readUInt8();if(Ae.isError(Se))return Se;return{unused:Se,data:Ae.raw()}}else if(Se==="bmpstr"){const Se=Ae.raw();if(Se.length%2===1)return Ae.error("Decoding of string type: bmpstr length mismatch");let Ke="";for(let Ae=0;Ae<Se.length/2;Ae++){Ke+=String.fromCharCode(Se.readUInt16BE(Ae*2))}return Ke}else if(Se==="numstr"){const Se=Ae.raw().toString("ascii");if(!this._isNumstr(Se)){return Ae.error("Decoding of string type: "+"numstr unsupported characters")}return Se}else if(Se==="octstr"){return Ae.raw()}else if(Se==="objDesc"){return Ae.raw()}else if(Se==="printstr"){const Se=Ae.raw().toString("ascii");if(!this._isPrintstr(Se)){return Ae.error("Decoding of string type: "+"printstr unsupported characters")}return Se}else if(/str$/.test(Se)){return Ae.raw().toString()}else{return Ae.error("Decoding of string type: "+Se+" unsupported")}};DERNode.prototype._decodeObjid=function decodeObjid(Ae,Se,Ke){let qe;const Fe=[];let $e=0;let rt=0;while(!Ae.isEmpty()){rt=Ae.readUInt8();$e<<=7;$e|=rt&127;if((rt&128)===0){Fe.push($e);$e=0}}if(rt&128)Fe.push($e);const it=Fe[0]/40|0;const nt=Fe[0]%40;if(Ke)qe=Fe;else qe=[it,nt].concat(Fe.slice(1));if(Se){let Ae=Se[qe.join(" ")];if(Ae===undefined)Ae=Se[qe.join(".")];if(Ae!==undefined)qe=Ae}return qe};DERNode.prototype._decodeTime=function decodeTime(Ae,Se){const Ke=Ae.raw().toString();let qe;let Fe;let $e;let rt;let it;let nt;if(Se==="gentime"){qe=Ke.slice(0,4)|0;Fe=Ke.slice(4,6)|0;$e=Ke.slice(6,8)|0;rt=Ke.slice(8,10)|0;it=Ke.slice(10,12)|0;nt=Ke.slice(12,14)|0}else if(Se==="utctime"){qe=Ke.slice(0,2)|0;Fe=Ke.slice(2,4)|0;$e=Ke.slice(4,6)|0;rt=Ke.slice(6,8)|0;it=Ke.slice(8,10)|0;nt=Ke.slice(10,12)|0;if(qe<70)qe=2e3+qe;else qe=1900+qe}else{return Ae.error("Decoding "+Se+" time is not supported yet")}return Date.UTC(qe,Fe-1,$e,rt,it,nt,0)};DERNode.prototype._decodeNull=function decodeNull(){return null};DERNode.prototype._decodeBool=function decodeBool(Ae){const Se=Ae.readUInt8();if(Ae.isError(Se))return Se;else return Se!==0};DERNode.prototype._decodeInt=function decodeInt(Ae,Se){const Ke=Ae.raw();let qe=new Fe(Ke);if(Se)qe=Se[qe.toString(10)]||qe;return qe};DERNode.prototype._use=function use(Ae,Se){if(typeof Ae==="function")Ae=Ae(Se);return Ae._getDecoder("der").tree};function derDecodeTag(Ae,Se){let Ke=Ae.readUInt8(Se);if(Ae.isError(Ke))return Ke;const qe=it.tagClass[Ke>>6];const Fe=(Ke&32)===0;if((Ke&31)===31){let qe=Ke;Ke=0;while((qe&128)===128){qe=Ae.readUInt8(Se);if(Ae.isError(qe))return qe;Ke<<=7;Ke|=qe&127}}else{Ke&=31}const $e=it.tag[Ke];return{cls:qe,primitive:Fe,tag:Ke,tagStr:$e}}function derDecodeLen(Ae,Se,Ke){let qe=Ae.readUInt8(Ke);if(Ae.isError(qe))return qe;if(!Se&&qe===128)return null;if((qe&128)===0){return qe}const Fe=qe&127;if(Fe>4)return Ae.error("length octect is too long");qe=0;for(let Se=0;Se<Fe;Se++){qe<<=8;const Se=Ae.readUInt8(Ke);if(Ae.isError(Se))return Se;qe|=Se}return qe}},4952:(Ae,Se,Ke)=>{"use strict";const qe=Se;qe.der=Ke(3332);qe.pem=Ke(8361)},8361:(Ae,Se,Ke)=>{"use strict";const qe=Ke(4124);const Fe=Ke(5118).Buffer;const $e=Ke(3332);function PEMDecoder(Ae){$e.call(this,Ae);this.enc="pem"}qe(PEMDecoder,$e);Ae.exports=PEMDecoder;PEMDecoder.prototype.decode=function decode(Ae,Se){const Ke=Ae.toString().split(/[\r\n]+/g);const qe=Se.label.toUpperCase();const rt=/^-----(BEGIN|END) ([^-]+)-----$/;let it=-1;let nt=-1;for(let Ae=0;Ae<Ke.length;Ae++){const Se=Ke[Ae].match(rt);if(Se===null)continue;if(Se[2]!==qe)continue;if(it===-1){if(Se[1]!=="BEGIN")break;it=Ae}else{if(Se[1]!=="END")break;nt=Ae;break}}if(it===-1||nt===-1)throw new Error("PEM section not found for: "+qe);const st=Ke.slice(it+1,nt).join("");st.replace(/[^a-z0-9+/=]+/gi,"");const ut=Fe.from(st,"base64");return $e.prototype.decode.call(this,ut,Se)}},5769:(Ae,Se,Ke)=>{"use strict";const qe=Ke(4124);const Fe=Ke(5118).Buffer;const $e=Ke(842);const rt=Ke(1188);function DEREncoder(Ae){this.enc="der";this.name=Ae.name;this.entity=Ae;this.tree=new DERNode;this.tree._init(Ae.body)}Ae.exports=DEREncoder;DEREncoder.prototype.encode=function encode(Ae,Se){return this.tree._encode(Ae,Se).join()};function DERNode(Ae){$e.call(this,"der",Ae)}qe(DERNode,$e);DERNode.prototype._encodeComposite=function encodeComposite(Ae,Se,Ke,qe){const $e=encodeTag(Ae,Se,Ke,this.reporter);if(qe.length<128){const Ae=Fe.alloc(2);Ae[0]=$e;Ae[1]=qe.length;return this._createEncoderBuffer([Ae,qe])}let rt=1;for(let Ae=qe.length;Ae>=256;Ae>>=8)rt++;const it=Fe.alloc(1+1+rt);it[0]=$e;it[1]=128|rt;for(let Ae=1+rt,Se=qe.length;Se>0;Ae--,Se>>=8)it[Ae]=Se&255;return this._createEncoderBuffer([it,qe])};DERNode.prototype._encodeStr=function encodeStr(Ae,Se){if(Se==="bitstr"){return this._createEncoderBuffer([Ae.unused|0,Ae.data])}else if(Se==="bmpstr"){const Se=Fe.alloc(Ae.length*2);for(let Ke=0;Ke<Ae.length;Ke++){Se.writeUInt16BE(Ae.charCodeAt(Ke),Ke*2)}return this._createEncoderBuffer(Se)}else if(Se==="numstr"){if(!this._isNumstr(Ae)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(Ae)}else if(Se==="printstr"){if(!this._isPrintstr(Ae)){return this.reporter.error("Encoding of string type: printstr supports "+"only latin upper and lower case letters, "+"digits, space, apostrophe, left and rigth "+"parenthesis, plus sign, comma, hyphen, "+"dot, slash, colon, equal sign, "+"question mark")}return this._createEncoderBuffer(Ae)}else if(/str$/.test(Se)){return this._createEncoderBuffer(Ae)}else if(Se==="objDesc"){return this._createEncoderBuffer(Ae)}else{return this.reporter.error("Encoding of string type: "+Se+" unsupported")}};DERNode.prototype._encodeObjid=function encodeObjid(Ae,Se,Ke){if(typeof Ae==="string"){if(!Se)return this.reporter.error("string objid given, but no values map found");if(!Se.hasOwnProperty(Ae))return this.reporter.error("objid not found in values map");Ae=Se[Ae].split(/[\s.]+/g);for(let Se=0;Se<Ae.length;Se++)Ae[Se]|=0}else if(Array.isArray(Ae)){Ae=Ae.slice();for(let Se=0;Se<Ae.length;Se++)Ae[Se]|=0}if(!Array.isArray(Ae)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(Ae))}if(!Ke){if(Ae[1]>=40)return this.reporter.error("Second objid identifier OOB");Ae.splice(0,2,Ae[0]*40+Ae[1])}let qe=0;for(let Se=0;Se<Ae.length;Se++){let Ke=Ae[Se];for(qe++;Ke>=128;Ke>>=7)qe++}const $e=Fe.alloc(qe);let rt=$e.length-1;for(let Se=Ae.length-1;Se>=0;Se--){let Ke=Ae[Se];$e[rt--]=Ke&127;while((Ke>>=7)>0)$e[rt--]=128|Ke&127}return this._createEncoderBuffer($e)};function two(Ae){if(Ae<10)return"0"+Ae;else return Ae}DERNode.prototype._encodeTime=function encodeTime(Ae,Se){let Ke;const qe=new Date(Ae);if(Se==="gentime"){Ke=[two(qe.getUTCFullYear()),two(qe.getUTCMonth()+1),two(qe.getUTCDate()),two(qe.getUTCHours()),two(qe.getUTCMinutes()),two(qe.getUTCSeconds()),"Z"].join("")}else if(Se==="utctime"){Ke=[two(qe.getUTCFullYear()%100),two(qe.getUTCMonth()+1),two(qe.getUTCDate()),two(qe.getUTCHours()),two(qe.getUTCMinutes()),two(qe.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+Se+" time is not supported yet")}return this._encodeStr(Ke,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(Ae,Se){if(typeof Ae==="string"){if(!Se)return this.reporter.error("String int or enum given, but no values map");if(!Se.hasOwnProperty(Ae)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(Ae))}Ae=Se[Ae]}if(typeof Ae!=="number"&&!Fe.isBuffer(Ae)){const Se=Ae.toArray();if(!Ae.sign&&Se[0]&128){Se.unshift(0)}Ae=Fe.from(Se)}if(Fe.isBuffer(Ae)){let Se=Ae.length;if(Ae.length===0)Se++;const Ke=Fe.alloc(Se);Ae.copy(Ke);if(Ae.length===0)Ke[0]=0;return this._createEncoderBuffer(Ke)}if(Ae<128)return this._createEncoderBuffer(Ae);if(Ae<256)return this._createEncoderBuffer([0,Ae]);let Ke=1;for(let Se=Ae;Se>=256;Se>>=8)Ke++;const qe=new Array(Ke);for(let Se=qe.length-1;Se>=0;Se--){qe[Se]=Ae&255;Ae>>=8}if(qe[0]&128){qe.unshift(0)}return this._createEncoderBuffer(Fe.from(qe))};DERNode.prototype._encodeBool=function encodeBool(Ae){return this._createEncoderBuffer(Ae?255:0)};DERNode.prototype._use=function use(Ae,Se){if(typeof Ae==="function")Ae=Ae(Se);return Ae._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(Ae,Se,Ke){const qe=this._baseState;let Fe;if(qe["default"]===null)return false;const $e=Ae.join();if(qe.defaultBuffer===undefined)qe.defaultBuffer=this._encodeValue(qe["default"],Se,Ke).join();if($e.length!==qe.defaultBuffer.length)return false;for(Fe=0;Fe<$e.length;Fe++)if($e[Fe]!==qe.defaultBuffer[Fe])return false;return true};function encodeTag(Ae,Se,Ke,qe){let Fe;if(Ae==="seqof")Ae="seq";else if(Ae==="setof")Ae="set";if(rt.tagByName.hasOwnProperty(Ae))Fe=rt.tagByName[Ae];else if(typeof Ae==="number"&&(Ae|0)===Ae)Fe=Ae;else return qe.error("Unknown tag: "+Ae);if(Fe>=31)return qe.error("Multi-octet tag encoding unsupported");if(!Se)Fe|=32;Fe|=rt.tagClassByName[Ke||"universal"]<<6;return Fe}},9083:(Ae,Se,Ke)=>{"use strict";const qe=Se;qe.der=Ke(5769);qe.pem=Ke(279)},279:(Ae,Se,Ke)=>{"use strict";const qe=Ke(4124);const Fe=Ke(5769);function PEMEncoder(Ae){Fe.call(this,Ae);this.enc="pem"}qe(PEMEncoder,Fe);Ae.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(Ae,Se){const Ke=Fe.prototype.encode.call(this,Ae);const qe=Ke.toString("base64");const $e=["-----BEGIN "+Se.label+"-----"];for(let Ae=0;Ae<qe.length;Ae+=64)$e.push(qe.slice(Ae,Ae+64));$e.push("-----END "+Se.label+"-----");return $e.join("\n")}},6641:function(Ae,Se,Ke){Ae=Ke.nmd(Ae);(function(Ae,Se){"use strict";function assert(Ae,Se){if(!Ae)throw new Error(Se||"Assertion failed")}function inherits(Ae,Se){Ae.super_=Se;var TempCtor=function(){};TempCtor.prototype=Se.prototype;Ae.prototype=new TempCtor;Ae.prototype.constructor=Ae}function BN(Ae,Se,Ke){if(BN.isBN(Ae)){return Ae}this.negative=0;this.words=null;this.length=0;this.red=null;if(Ae!==null){if(Se==="le"||Se==="be"){Ke=Se;Se=10}this._init(Ae||0,Se||10,Ke||"be")}}if(typeof Ae==="object"){Ae.exports=BN}else{Se.BN=BN}BN.BN=BN;BN.wordSize=26;var qe;try{qe=Ke(4300).Buffer}catch(Ae){}BN.isBN=function isBN(Ae){if(Ae instanceof BN){return true}return Ae!==null&&typeof Ae==="object"&&Ae.constructor.wordSize===BN.wordSize&&Array.isArray(Ae.words)};BN.max=function max(Ae,Se){if(Ae.cmp(Se)>0)return Ae;return Se};BN.min=function min(Ae,Se){if(Ae.cmp(Se)<0)return Ae;return Se};BN.prototype._init=function init(Ae,Se,Ke){if(typeof Ae==="number"){return this._initNumber(Ae,Se,Ke)}if(typeof Ae==="object"){return this._initArray(Ae,Se,Ke)}if(Se==="hex"){Se=16}assert(Se===(Se|0)&&Se>=2&&Se<=36);Ae=Ae.toString().replace(/\s+/g,"");var qe=0;if(Ae[0]==="-"){qe++}if(Se===16){this._parseHex(Ae,qe)}else{this._parseBase(Ae,Se,qe)}if(Ae[0]==="-"){this.negative=1}this.strip();if(Ke!=="le")return;this._initArray(this.toArray(),Se,Ke)};BN.prototype._initNumber=function _initNumber(Ae,Se,Ke){if(Ae<0){this.negative=1;Ae=-Ae}if(Ae<67108864){this.words=[Ae&67108863];this.length=1}else if(Ae<4503599627370496){this.words=[Ae&67108863,Ae/67108864&67108863];this.length=2}else{assert(Ae<9007199254740992);this.words=[Ae&67108863,Ae/67108864&67108863,1];this.length=3}if(Ke!=="le")return;this._initArray(this.toArray(),Se,Ke)};BN.prototype._initArray=function _initArray(Ae,Se,Ke){assert(typeof Ae.length==="number");if(Ae.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(Ae.length/3);this.words=new Array(this.length);for(var qe=0;qe<this.length;qe++){this.words[qe]=0}var Fe,$e;var rt=0;if(Ke==="be"){for(qe=Ae.length-1,Fe=0;qe>=0;qe-=3){$e=Ae[qe]|Ae[qe-1]<<8|Ae[qe-2]<<16;this.words[Fe]|=$e<<rt&67108863;this.words[Fe+1]=$e>>>26-rt&67108863;rt+=24;if(rt>=26){rt-=26;Fe++}}}else if(Ke==="le"){for(qe=0,Fe=0;qe<Ae.length;qe+=3){$e=Ae[qe]|Ae[qe+1]<<8|Ae[qe+2]<<16;this.words[Fe]|=$e<<rt&67108863;this.words[Fe+1]=$e>>>26-rt&67108863;rt+=24;if(rt>=26){rt-=26;Fe++}}}return this.strip()};function parseHex(Ae,Se,Ke){var qe=0;var Fe=Math.min(Ae.length,Ke);for(var $e=Se;$e<Fe;$e++){var rt=Ae.charCodeAt($e)-48;qe<<=4;if(rt>=49&&rt<=54){qe|=rt-49+10}else if(rt>=17&&rt<=22){qe|=rt-17+10}else{qe|=rt&15}}return qe}BN.prototype._parseHex=function _parseHex(Ae,Se){this.length=Math.ceil((Ae.length-Se)/6);this.words=new Array(this.length);for(var Ke=0;Ke<this.length;Ke++){this.words[Ke]=0}var qe,Fe;var $e=0;for(Ke=Ae.length-6,qe=0;Ke>=Se;Ke-=6){Fe=parseHex(Ae,Ke,Ke+6);this.words[qe]|=Fe<<$e&67108863;this.words[qe+1]|=Fe>>>26-$e&4194303;$e+=24;if($e>=26){$e-=26;qe++}}if(Ke+6!==Se){Fe=parseHex(Ae,Se,Ke+6);this.words[qe]|=Fe<<$e&67108863;this.words[qe+1]|=Fe>>>26-$e&4194303}this.strip()};function parseBase(Ae,Se,Ke,qe){var Fe=0;var $e=Math.min(Ae.length,Ke);for(var rt=Se;rt<$e;rt++){var it=Ae.charCodeAt(rt)-48;Fe*=qe;if(it>=49){Fe+=it-49+10}else if(it>=17){Fe+=it-17+10}else{Fe+=it}}return Fe}BN.prototype._parseBase=function _parseBase(Ae,Se,Ke){this.words=[0];this.length=1;for(var qe=0,Fe=1;Fe<=67108863;Fe*=Se){qe++}qe--;Fe=Fe/Se|0;var $e=Ae.length-Ke;var rt=$e%qe;var it=Math.min($e,$e-rt)+Ke;var nt=0;for(var st=Ke;st<it;st+=qe){nt=parseBase(Ae,st,st+qe,Se);this.imuln(Fe);if(this.words[0]+nt<67108864){this.words[0]+=nt}else{this._iaddn(nt)}}if(rt!==0){var ut=1;nt=parseBase(Ae,st,Ae.length,Se);for(st=0;st<rt;st++){ut*=Se}this.imuln(ut);if(this.words[0]+nt<67108864){this.words[0]+=nt}else{this._iaddn(nt)}}};BN.prototype.copy=function copy(Ae){Ae.words=new Array(this.length);for(var Se=0;Se<this.length;Se++){Ae.words[Se]=this.words[Se]}Ae.length=this.length;Ae.negative=this.negative;Ae.red=this.red};BN.prototype.clone=function clone(){var Ae=new BN(null);this.copy(Ae);return Ae};BN.prototype._expand=function _expand(Ae){while(this.length<Ae){this.words[this.length++]=0}return this};BN.prototype.strip=function strip(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var Fe=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"];var $e=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];var rt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];BN.prototype.toString=function toString(Ae,Se){Ae=Ae||10;Se=Se|0||1;var Ke;if(Ae===16||Ae==="hex"){Ke="";var qe=0;var it=0;for(var nt=0;nt<this.length;nt++){var st=this.words[nt];var ut=((st<<qe|it)&16777215).toString(16);it=st>>>24-qe&16777215;if(it!==0||nt!==this.length-1){Ke=Fe[6-ut.length]+ut+Ke}else{Ke=ut+Ke}qe+=2;if(qe>=26){qe-=26;nt--}}if(it!==0){Ke=it.toString(16)+Ke}while(Ke.length%Se!==0){Ke="0"+Ke}if(this.negative!==0){Ke="-"+Ke}return Ke}if(Ae===(Ae|0)&&Ae>=2&&Ae<=36){var ht=$e[Ae];var ft=rt[Ae];Ke="";var yt=this.clone();yt.negative=0;while(!yt.isZero()){var mt=yt.modn(ft).toString(Ae);yt=yt.idivn(ft);if(!yt.isZero()){Ke=Fe[ht-mt.length]+mt+Ke}else{Ke=mt+Ke}}if(this.isZero()){Ke="0"+Ke}while(Ke.length%Se!==0){Ke="0"+Ke}if(this.negative!==0){Ke="-"+Ke}return Ke}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var Ae=this.words[0];if(this.length===2){Ae+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){Ae+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-Ae:Ae};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(Ae,Se){assert(typeof qe!=="undefined");return this.toArrayLike(qe,Ae,Se)};BN.prototype.toArray=function toArray(Ae,Se){return this.toArrayLike(Array,Ae,Se)};BN.prototype.toArrayLike=function toArrayLike(Ae,Se,Ke){var qe=this.byteLength();var Fe=Ke||Math.max(1,qe);assert(qe<=Fe,"byte array longer than desired length");assert(Fe>0,"Requested array length <= 0");this.strip();var $e=Se==="le";var rt=new Ae(Fe);var it,nt;var st=this.clone();if(!$e){for(nt=0;nt<Fe-qe;nt++){rt[nt]=0}for(nt=0;!st.isZero();nt++){it=st.andln(255);st.iushrn(8);rt[Fe-nt-1]=it}}else{for(nt=0;!st.isZero();nt++){it=st.andln(255);st.iushrn(8);rt[nt]=it}for(;nt<Fe;nt++){rt[nt]=0}}return rt};if(Math.clz32){BN.prototype._countBits=function _countBits(Ae){return 32-Math.clz32(Ae)}}else{BN.prototype._countBits=function _countBits(Ae){var Se=Ae;var Ke=0;if(Se>=4096){Ke+=13;Se>>>=13}if(Se>=64){Ke+=7;Se>>>=7}if(Se>=8){Ke+=4;Se>>>=4}if(Se>=2){Ke+=2;Se>>>=2}return Ke+Se}}BN.prototype._zeroBits=function _zeroBits(Ae){if(Ae===0)return 26;var Se=Ae;var Ke=0;if((Se&8191)===0){Ke+=13;Se>>>=13}if((Se&127)===0){Ke+=7;Se>>>=7}if((Se&15)===0){Ke+=4;Se>>>=4}if((Se&3)===0){Ke+=2;Se>>>=2}if((Se&1)===0){Ke++}return Ke};BN.prototype.bitLength=function bitLength(){var Ae=this.words[this.length-1];var Se=this._countBits(Ae);return(this.length-1)*26+Se};function toBitArray(Ae){var Se=new Array(Ae.bitLength());for(var Ke=0;Ke<Se.length;Ke++){var qe=Ke/26|0;var Fe=Ke%26;Se[Ke]=(Ae.words[qe]&1<<Fe)>>>Fe}return Se}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var Ae=0;for(var Se=0;Se<this.length;Se++){var Ke=this._zeroBits(this.words[Se]);Ae+=Ke;if(Ke!==26)break}return Ae};BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)};BN.prototype.toTwos=function toTwos(Ae){if(this.negative!==0){return this.abs().inotn(Ae).iaddn(1)}return this.clone()};BN.prototype.fromTwos=function fromTwos(Ae){if(this.testn(Ae-1)){return this.notn(Ae).iaddn(1).ineg()}return this.clone()};BN.prototype.isNeg=function isNeg(){return this.negative!==0};BN.prototype.neg=function neg(){return this.clone().ineg()};BN.prototype.ineg=function ineg(){if(!this.isZero()){this.negative^=1}return this};BN.prototype.iuor=function iuor(Ae){while(this.length<Ae.length){this.words[this.length++]=0}for(var Se=0;Se<Ae.length;Se++){this.words[Se]=this.words[Se]|Ae.words[Se]}return this.strip()};BN.prototype.ior=function ior(Ae){assert((this.negative|Ae.negative)===0);return this.iuor(Ae)};BN.prototype.or=function or(Ae){if(this.length>Ae.length)return this.clone().ior(Ae);return Ae.clone().ior(this)};BN.prototype.uor=function uor(Ae){if(this.length>Ae.length)return this.clone().iuor(Ae);return Ae.clone().iuor(this)};BN.prototype.iuand=function iuand(Ae){var Se;if(this.length>Ae.length){Se=Ae}else{Se=this}for(var Ke=0;Ke<Se.length;Ke++){this.words[Ke]=this.words[Ke]&Ae.words[Ke]}this.length=Se.length;return this.strip()};BN.prototype.iand=function iand(Ae){assert((this.negative|Ae.negative)===0);return this.iuand(Ae)};BN.prototype.and=function and(Ae){if(this.length>Ae.length)return this.clone().iand(Ae);return Ae.clone().iand(this)};BN.prototype.uand=function uand(Ae){if(this.length>Ae.length)return this.clone().iuand(Ae);return Ae.clone().iuand(this)};BN.prototype.iuxor=function iuxor(Ae){var Se;var Ke;if(this.length>Ae.length){Se=this;Ke=Ae}else{Se=Ae;Ke=this}for(var qe=0;qe<Ke.length;qe++){this.words[qe]=Se.words[qe]^Ke.words[qe]}if(this!==Se){for(;qe<Se.length;qe++){this.words[qe]=Se.words[qe]}}this.length=Se.length;return this.strip()};BN.prototype.ixor=function ixor(Ae){assert((this.negative|Ae.negative)===0);return this.iuxor(Ae)};BN.prototype.xor=function xor(Ae){if(this.length>Ae.length)return this.clone().ixor(Ae);return Ae.clone().ixor(this)};BN.prototype.uxor=function uxor(Ae){if(this.length>Ae.length)return this.clone().iuxor(Ae);return Ae.clone().iuxor(this)};BN.prototype.inotn=function inotn(Ae){assert(typeof Ae==="number"&&Ae>=0);var Se=Math.ceil(Ae/26)|0;var Ke=Ae%26;this._expand(Se);if(Ke>0){Se--}for(var qe=0;qe<Se;qe++){this.words[qe]=~this.words[qe]&67108863}if(Ke>0){this.words[qe]=~this.words[qe]&67108863>>26-Ke}return this.strip()};BN.prototype.notn=function notn(Ae){return this.clone().inotn(Ae)};BN.prototype.setn=function setn(Ae,Se){assert(typeof Ae==="number"&&Ae>=0);var Ke=Ae/26|0;var qe=Ae%26;this._expand(Ke+1);if(Se){this.words[Ke]=this.words[Ke]|1<<qe}else{this.words[Ke]=this.words[Ke]&~(1<<qe)}return this.strip()};BN.prototype.iadd=function iadd(Ae){var Se;if(this.negative!==0&&Ae.negative===0){this.negative=0;Se=this.isub(Ae);this.negative^=1;return this._normSign()}else if(this.negative===0&&Ae.negative!==0){Ae.negative=0;Se=this.isub(Ae);Ae.negative=1;return Se._normSign()}var Ke,qe;if(this.length>Ae.length){Ke=this;qe=Ae}else{Ke=Ae;qe=this}var Fe=0;for(var $e=0;$e<qe.length;$e++){Se=(Ke.words[$e]|0)+(qe.words[$e]|0)+Fe;this.words[$e]=Se&67108863;Fe=Se>>>26}for(;Fe!==0&&$e<Ke.length;$e++){Se=(Ke.words[$e]|0)+Fe;this.words[$e]=Se&67108863;Fe=Se>>>26}this.length=Ke.length;if(Fe!==0){this.words[this.length]=Fe;this.length++}else if(Ke!==this){for(;$e<Ke.length;$e++){this.words[$e]=Ke.words[$e]}}return this};BN.prototype.add=function add(Ae){var Se;if(Ae.negative!==0&&this.negative===0){Ae.negative=0;Se=this.sub(Ae);Ae.negative^=1;return Se}else if(Ae.negative===0&&this.negative!==0){this.negative=0;Se=Ae.sub(this);this.negative=1;return Se}if(this.length>Ae.length)return this.clone().iadd(Ae);return Ae.clone().iadd(this)};BN.prototype.isub=function isub(Ae){if(Ae.negative!==0){Ae.negative=0;var Se=this.iadd(Ae);Ae.negative=1;return Se._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(Ae);this.negative=1;return this._normSign()}var Ke=this.cmp(Ae);if(Ke===0){this.negative=0;this.length=1;this.words[0]=0;return this}var qe,Fe;if(Ke>0){qe=this;Fe=Ae}else{qe=Ae;Fe=this}var $e=0;for(var rt=0;rt<Fe.length;rt++){Se=(qe.words[rt]|0)-(Fe.words[rt]|0)+$e;$e=Se>>26;this.words[rt]=Se&67108863}for(;$e!==0&&rt<qe.length;rt++){Se=(qe.words[rt]|0)+$e;$e=Se>>26;this.words[rt]=Se&67108863}if($e===0&&rt<qe.length&&qe!==this){for(;rt<qe.length;rt++){this.words[rt]=qe.words[rt]}}this.length=Math.max(this.length,rt);if(qe!==this){this.negative=1}return this.strip()};BN.prototype.sub=function sub(Ae){return this.clone().isub(Ae)};function smallMulTo(Ae,Se,Ke){Ke.negative=Se.negative^Ae.negative;var qe=Ae.length+Se.length|0;Ke.length=qe;qe=qe-1|0;var Fe=Ae.words[0]|0;var $e=Se.words[0]|0;var rt=Fe*$e;var it=rt&67108863;var nt=rt/67108864|0;Ke.words[0]=it;for(var st=1;st<qe;st++){var ut=nt>>>26;var ht=nt&67108863;var ft=Math.min(st,Se.length-1);for(var yt=Math.max(0,st-Ae.length+1);yt<=ft;yt++){var mt=st-yt|0;Fe=Ae.words[mt]|0;$e=Se.words[yt]|0;rt=Fe*$e+ht;ut+=rt/67108864|0;ht=rt&67108863}Ke.words[st]=ht|0;nt=ut|0}if(nt!==0){Ke.words[st]=nt|0}else{Ke.length--}return Ke.strip()}var it=function comb10MulTo(Ae,Se,Ke){var qe=Ae.words;var Fe=Se.words;var $e=Ke.words;var rt=0;var it;var nt;var st;var ut=qe[0]|0;var ht=ut&8191;var ft=ut>>>13;var yt=qe[1]|0;var mt=yt&8191;var vt=yt>>>13;var _t=qe[2]|0;var Rt=_t&8191;var Kt=_t>>>13;var It=qe[3]|0;var Ut=It&8191;var Ot=It>>>13;var Nt=qe[4]|0;var jt=Nt&8191;var Ft=Nt>>>13;var Lt=qe[5]|0;var Ht=Lt&8191;var Wt=Lt>>>13;var Gt=qe[6]|0;var $t=Gt&8191;var Yt=Gt>>>13;var Vt=qe[7]|0;var Zt=Vt&8191;var Qt=Vt>>>13;var er=qe[8]|0;var tr=er&8191;var rr=er>>>13;var ir=qe[9]|0;var nr=ir&8191;var sr=ir>>>13;var ar=Fe[0]|0;var cr=ar&8191;var ur=ar>>>13;var hr=Fe[1]|0;var fr=hr&8191;var lr=hr>>>13;var dr=Fe[2]|0;var yr=dr&8191;var Cr=dr>>>13;var Rr=Fe[3]|0;var Dr=Rr&8191;var Tr=Rr>>>13;var Kr=Fe[4]|0;var Ir=Kr&8191;var Ur=Kr>>>13;var Or=Fe[5]|0;var Nr=Or&8191;var jr=Or>>>13;var Lr=Fe[6]|0;var Wr=Lr&8191;var Qr=Lr>>>13;var ti=Fe[7]|0;var ri=ti&8191;var ii=ti>>>13;var oi=Fe[8]|0;var ci=oi&8191;var fi=oi>>>13;var li=Fe[9]|0;var di=li&8191;var pi=li>>>13;Ke.negative=Ae.negative^Se.negative;Ke.length=19;it=Math.imul(ht,cr);nt=Math.imul(ht,ur);nt=nt+Math.imul(ft,cr)|0;st=Math.imul(ft,ur);var yi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(yi>>>26)|0;yi&=67108863;it=Math.imul(mt,cr);nt=Math.imul(mt,ur);nt=nt+Math.imul(vt,cr)|0;st=Math.imul(vt,ur);it=it+Math.imul(ht,fr)|0;nt=nt+Math.imul(ht,lr)|0;nt=nt+Math.imul(ft,fr)|0;st=st+Math.imul(ft,lr)|0;var gi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(gi>>>26)|0;gi&=67108863;it=Math.imul(Rt,cr);nt=Math.imul(Rt,ur);nt=nt+Math.imul(Kt,cr)|0;st=Math.imul(Kt,ur);it=it+Math.imul(mt,fr)|0;nt=nt+Math.imul(mt,lr)|0;nt=nt+Math.imul(vt,fr)|0;st=st+Math.imul(vt,lr)|0;it=it+Math.imul(ht,yr)|0;nt=nt+Math.imul(ht,Cr)|0;nt=nt+Math.imul(ft,yr)|0;st=st+Math.imul(ft,Cr)|0;var vi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(vi>>>26)|0;vi&=67108863;it=Math.imul(Ut,cr);nt=Math.imul(Ut,ur);nt=nt+Math.imul(Ot,cr)|0;st=Math.imul(Ot,ur);it=it+Math.imul(Rt,fr)|0;nt=nt+Math.imul(Rt,lr)|0;nt=nt+Math.imul(Kt,fr)|0;st=st+Math.imul(Kt,lr)|0;it=it+Math.imul(mt,yr)|0;nt=nt+Math.imul(mt,Cr)|0;nt=nt+Math.imul(vt,yr)|0;st=st+Math.imul(vt,Cr)|0;it=it+Math.imul(ht,Dr)|0;nt=nt+Math.imul(ht,Tr)|0;nt=nt+Math.imul(ft,Dr)|0;st=st+Math.imul(ft,Tr)|0;var wi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(wi>>>26)|0;wi&=67108863;it=Math.imul(jt,cr);nt=Math.imul(jt,ur);nt=nt+Math.imul(Ft,cr)|0;st=Math.imul(Ft,ur);it=it+Math.imul(Ut,fr)|0;nt=nt+Math.imul(Ut,lr)|0;nt=nt+Math.imul(Ot,fr)|0;st=st+Math.imul(Ot,lr)|0;it=it+Math.imul(Rt,yr)|0;nt=nt+Math.imul(Rt,Cr)|0;nt=nt+Math.imul(Kt,yr)|0;st=st+Math.imul(Kt,Cr)|0;it=it+Math.imul(mt,Dr)|0;nt=nt+Math.imul(mt,Tr)|0;nt=nt+Math.imul(vt,Dr)|0;st=st+Math.imul(vt,Tr)|0;it=it+Math.imul(ht,Ir)|0;nt=nt+Math.imul(ht,Ur)|0;nt=nt+Math.imul(ft,Ir)|0;st=st+Math.imul(ft,Ur)|0;var ki=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(ki>>>26)|0;ki&=67108863;it=Math.imul(Ht,cr);nt=Math.imul(Ht,ur);nt=nt+Math.imul(Wt,cr)|0;st=Math.imul(Wt,ur);it=it+Math.imul(jt,fr)|0;nt=nt+Math.imul(jt,lr)|0;nt=nt+Math.imul(Ft,fr)|0;st=st+Math.imul(Ft,lr)|0;it=it+Math.imul(Ut,yr)|0;nt=nt+Math.imul(Ut,Cr)|0;nt=nt+Math.imul(Ot,yr)|0;st=st+Math.imul(Ot,Cr)|0;it=it+Math.imul(Rt,Dr)|0;nt=nt+Math.imul(Rt,Tr)|0;nt=nt+Math.imul(Kt,Dr)|0;st=st+Math.imul(Kt,Tr)|0;it=it+Math.imul(mt,Ir)|0;nt=nt+Math.imul(mt,Ur)|0;nt=nt+Math.imul(vt,Ir)|0;st=st+Math.imul(vt,Ur)|0;it=it+Math.imul(ht,Nr)|0;nt=nt+Math.imul(ht,jr)|0;nt=nt+Math.imul(ft,Nr)|0;st=st+Math.imul(ft,jr)|0;var Si=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Si>>>26)|0;Si&=67108863;it=Math.imul($t,cr);nt=Math.imul($t,ur);nt=nt+Math.imul(Yt,cr)|0;st=Math.imul(Yt,ur);it=it+Math.imul(Ht,fr)|0;nt=nt+Math.imul(Ht,lr)|0;nt=nt+Math.imul(Wt,fr)|0;st=st+Math.imul(Wt,lr)|0;it=it+Math.imul(jt,yr)|0;nt=nt+Math.imul(jt,Cr)|0;nt=nt+Math.imul(Ft,yr)|0;st=st+Math.imul(Ft,Cr)|0;it=it+Math.imul(Ut,Dr)|0;nt=nt+Math.imul(Ut,Tr)|0;nt=nt+Math.imul(Ot,Dr)|0;st=st+Math.imul(Ot,Tr)|0;it=it+Math.imul(Rt,Ir)|0;nt=nt+Math.imul(Rt,Ur)|0;nt=nt+Math.imul(Kt,Ir)|0;st=st+Math.imul(Kt,Ur)|0;it=it+Math.imul(mt,Nr)|0;nt=nt+Math.imul(mt,jr)|0;nt=nt+Math.imul(vt,Nr)|0;st=st+Math.imul(vt,jr)|0;it=it+Math.imul(ht,Wr)|0;nt=nt+Math.imul(ht,Qr)|0;nt=nt+Math.imul(ft,Wr)|0;st=st+Math.imul(ft,Qr)|0;var Ei=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Ei>>>26)|0;Ei&=67108863;it=Math.imul(Zt,cr);nt=Math.imul(Zt,ur);nt=nt+Math.imul(Qt,cr)|0;st=Math.imul(Qt,ur);it=it+Math.imul($t,fr)|0;nt=nt+Math.imul($t,lr)|0;nt=nt+Math.imul(Yt,fr)|0;st=st+Math.imul(Yt,lr)|0;it=it+Math.imul(Ht,yr)|0;nt=nt+Math.imul(Ht,Cr)|0;nt=nt+Math.imul(Wt,yr)|0;st=st+Math.imul(Wt,Cr)|0;it=it+Math.imul(jt,Dr)|0;nt=nt+Math.imul(jt,Tr)|0;nt=nt+Math.imul(Ft,Dr)|0;st=st+Math.imul(Ft,Tr)|0;it=it+Math.imul(Ut,Ir)|0;nt=nt+Math.imul(Ut,Ur)|0;nt=nt+Math.imul(Ot,Ir)|0;st=st+Math.imul(Ot,Ur)|0;it=it+Math.imul(Rt,Nr)|0;nt=nt+Math.imul(Rt,jr)|0;nt=nt+Math.imul(Kt,Nr)|0;st=st+Math.imul(Kt,jr)|0;it=it+Math.imul(mt,Wr)|0;nt=nt+Math.imul(mt,Qr)|0;nt=nt+Math.imul(vt,Wr)|0;st=st+Math.imul(vt,Qr)|0;it=it+Math.imul(ht,ri)|0;nt=nt+Math.imul(ht,ii)|0;nt=nt+Math.imul(ft,ri)|0;st=st+Math.imul(ft,ii)|0;var Mi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Mi>>>26)|0;Mi&=67108863;it=Math.imul(tr,cr);nt=Math.imul(tr,ur);nt=nt+Math.imul(rr,cr)|0;st=Math.imul(rr,ur);it=it+Math.imul(Zt,fr)|0;nt=nt+Math.imul(Zt,lr)|0;nt=nt+Math.imul(Qt,fr)|0;st=st+Math.imul(Qt,lr)|0;it=it+Math.imul($t,yr)|0;nt=nt+Math.imul($t,Cr)|0;nt=nt+Math.imul(Yt,yr)|0;st=st+Math.imul(Yt,Cr)|0;it=it+Math.imul(Ht,Dr)|0;nt=nt+Math.imul(Ht,Tr)|0;nt=nt+Math.imul(Wt,Dr)|0;st=st+Math.imul(Wt,Tr)|0;it=it+Math.imul(jt,Ir)|0;nt=nt+Math.imul(jt,Ur)|0;nt=nt+Math.imul(Ft,Ir)|0;st=st+Math.imul(Ft,Ur)|0;it=it+Math.imul(Ut,Nr)|0;nt=nt+Math.imul(Ut,jr)|0;nt=nt+Math.imul(Ot,Nr)|0;st=st+Math.imul(Ot,jr)|0;it=it+Math.imul(Rt,Wr)|0;nt=nt+Math.imul(Rt,Qr)|0;nt=nt+Math.imul(Kt,Wr)|0;st=st+Math.imul(Kt,Qr)|0;it=it+Math.imul(mt,ri)|0;nt=nt+Math.imul(mt,ii)|0;nt=nt+Math.imul(vt,ri)|0;st=st+Math.imul(vt,ii)|0;it=it+Math.imul(ht,ci)|0;nt=nt+Math.imul(ht,fi)|0;nt=nt+Math.imul(ft,ci)|0;st=st+Math.imul(ft,fi)|0;var Pi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Pi>>>26)|0;Pi&=67108863;it=Math.imul(nr,cr);nt=Math.imul(nr,ur);nt=nt+Math.imul(sr,cr)|0;st=Math.imul(sr,ur);it=it+Math.imul(tr,fr)|0;nt=nt+Math.imul(tr,lr)|0;nt=nt+Math.imul(rr,fr)|0;st=st+Math.imul(rr,lr)|0;it=it+Math.imul(Zt,yr)|0;nt=nt+Math.imul(Zt,Cr)|0;nt=nt+Math.imul(Qt,yr)|0;st=st+Math.imul(Qt,Cr)|0;it=it+Math.imul($t,Dr)|0;nt=nt+Math.imul($t,Tr)|0;nt=nt+Math.imul(Yt,Dr)|0;st=st+Math.imul(Yt,Tr)|0;it=it+Math.imul(Ht,Ir)|0;nt=nt+Math.imul(Ht,Ur)|0;nt=nt+Math.imul(Wt,Ir)|0;st=st+Math.imul(Wt,Ur)|0;it=it+Math.imul(jt,Nr)|0;nt=nt+Math.imul(jt,jr)|0;nt=nt+Math.imul(Ft,Nr)|0;st=st+Math.imul(Ft,jr)|0;it=it+Math.imul(Ut,Wr)|0;nt=nt+Math.imul(Ut,Qr)|0;nt=nt+Math.imul(Ot,Wr)|0;st=st+Math.imul(Ot,Qr)|0;it=it+Math.imul(Rt,ri)|0;nt=nt+Math.imul(Rt,ii)|0;nt=nt+Math.imul(Kt,ri)|0;st=st+Math.imul(Kt,ii)|0;it=it+Math.imul(mt,ci)|0;nt=nt+Math.imul(mt,fi)|0;nt=nt+Math.imul(vt,ci)|0;st=st+Math.imul(vt,fi)|0;it=it+Math.imul(ht,di)|0;nt=nt+Math.imul(ht,pi)|0;nt=nt+Math.imul(ft,di)|0;st=st+Math.imul(ft,pi)|0;var xi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(xi>>>26)|0;xi&=67108863;it=Math.imul(nr,fr);nt=Math.imul(nr,lr);nt=nt+Math.imul(sr,fr)|0;st=Math.imul(sr,lr);it=it+Math.imul(tr,yr)|0;nt=nt+Math.imul(tr,Cr)|0;nt=nt+Math.imul(rr,yr)|0;st=st+Math.imul(rr,Cr)|0;it=it+Math.imul(Zt,Dr)|0;nt=nt+Math.imul(Zt,Tr)|0;nt=nt+Math.imul(Qt,Dr)|0;st=st+Math.imul(Qt,Tr)|0;it=it+Math.imul($t,Ir)|0;nt=nt+Math.imul($t,Ur)|0;nt=nt+Math.imul(Yt,Ir)|0;st=st+Math.imul(Yt,Ur)|0;it=it+Math.imul(Ht,Nr)|0;nt=nt+Math.imul(Ht,jr)|0;nt=nt+Math.imul(Wt,Nr)|0;st=st+Math.imul(Wt,jr)|0;it=it+Math.imul(jt,Wr)|0;nt=nt+Math.imul(jt,Qr)|0;nt=nt+Math.imul(Ft,Wr)|0;st=st+Math.imul(Ft,Qr)|0;it=it+Math.imul(Ut,ri)|0;nt=nt+Math.imul(Ut,ii)|0;nt=nt+Math.imul(Ot,ri)|0;st=st+Math.imul(Ot,ii)|0;it=it+Math.imul(Rt,ci)|0;nt=nt+Math.imul(Rt,fi)|0;nt=nt+Math.imul(Kt,ci)|0;st=st+Math.imul(Kt,fi)|0;it=it+Math.imul(mt,di)|0;nt=nt+Math.imul(mt,pi)|0;nt=nt+Math.imul(vt,di)|0;st=st+Math.imul(vt,pi)|0;var Ci=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Ci>>>26)|0;Ci&=67108863;it=Math.imul(nr,yr);nt=Math.imul(nr,Cr);nt=nt+Math.imul(sr,yr)|0;st=Math.imul(sr,Cr);it=it+Math.imul(tr,Dr)|0;nt=nt+Math.imul(tr,Tr)|0;nt=nt+Math.imul(rr,Dr)|0;st=st+Math.imul(rr,Tr)|0;it=it+Math.imul(Zt,Ir)|0;nt=nt+Math.imul(Zt,Ur)|0;nt=nt+Math.imul(Qt,Ir)|0;st=st+Math.imul(Qt,Ur)|0;it=it+Math.imul($t,Nr)|0;nt=nt+Math.imul($t,jr)|0;nt=nt+Math.imul(Yt,Nr)|0;st=st+Math.imul(Yt,jr)|0;it=it+Math.imul(Ht,Wr)|0;nt=nt+Math.imul(Ht,Qr)|0;nt=nt+Math.imul(Wt,Wr)|0;st=st+Math.imul(Wt,Qr)|0;it=it+Math.imul(jt,ri)|0;nt=nt+Math.imul(jt,ii)|0;nt=nt+Math.imul(Ft,ri)|0;st=st+Math.imul(Ft,ii)|0;it=it+Math.imul(Ut,ci)|0;nt=nt+Math.imul(Ut,fi)|0;nt=nt+Math.imul(Ot,ci)|0;st=st+Math.imul(Ot,fi)|0;it=it+Math.imul(Rt,di)|0;nt=nt+Math.imul(Rt,pi)|0;nt=nt+Math.imul(Kt,di)|0;st=st+Math.imul(Kt,pi)|0;var Ri=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Ri>>>26)|0;Ri&=67108863;it=Math.imul(nr,Dr);nt=Math.imul(nr,Tr);nt=nt+Math.imul(sr,Dr)|0;st=Math.imul(sr,Tr);it=it+Math.imul(tr,Ir)|0;nt=nt+Math.imul(tr,Ur)|0;nt=nt+Math.imul(rr,Ir)|0;st=st+Math.imul(rr,Ur)|0;it=it+Math.imul(Zt,Nr)|0;nt=nt+Math.imul(Zt,jr)|0;nt=nt+Math.imul(Qt,Nr)|0;st=st+Math.imul(Qt,jr)|0;it=it+Math.imul($t,Wr)|0;nt=nt+Math.imul($t,Qr)|0;nt=nt+Math.imul(Yt,Wr)|0;st=st+Math.imul(Yt,Qr)|0;it=it+Math.imul(Ht,ri)|0;nt=nt+Math.imul(Ht,ii)|0;nt=nt+Math.imul(Wt,ri)|0;st=st+Math.imul(Wt,ii)|0;it=it+Math.imul(jt,ci)|0;nt=nt+Math.imul(jt,fi)|0;nt=nt+Math.imul(Ft,ci)|0;st=st+Math.imul(Ft,fi)|0;it=it+Math.imul(Ut,di)|0;nt=nt+Math.imul(Ut,pi)|0;nt=nt+Math.imul(Ot,di)|0;st=st+Math.imul(Ot,pi)|0;var Di=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Di>>>26)|0;Di&=67108863;it=Math.imul(nr,Ir);nt=Math.imul(nr,Ur);nt=nt+Math.imul(sr,Ir)|0;st=Math.imul(sr,Ur);it=it+Math.imul(tr,Nr)|0;nt=nt+Math.imul(tr,jr)|0;nt=nt+Math.imul(rr,Nr)|0;st=st+Math.imul(rr,jr)|0;it=it+Math.imul(Zt,Wr)|0;nt=nt+Math.imul(Zt,Qr)|0;nt=nt+Math.imul(Qt,Wr)|0;st=st+Math.imul(Qt,Qr)|0;it=it+Math.imul($t,ri)|0;nt=nt+Math.imul($t,ii)|0;nt=nt+Math.imul(Yt,ri)|0;st=st+Math.imul(Yt,ii)|0;it=it+Math.imul(Ht,ci)|0;nt=nt+Math.imul(Ht,fi)|0;nt=nt+Math.imul(Wt,ci)|0;st=st+Math.imul(Wt,fi)|0;it=it+Math.imul(jt,di)|0;nt=nt+Math.imul(jt,pi)|0;nt=nt+Math.imul(Ft,di)|0;st=st+Math.imul(Ft,pi)|0;var Ti=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Ti>>>26)|0;Ti&=67108863;it=Math.imul(nr,Nr);nt=Math.imul(nr,jr);nt=nt+Math.imul(sr,Nr)|0;st=Math.imul(sr,jr);it=it+Math.imul(tr,Wr)|0;nt=nt+Math.imul(tr,Qr)|0;nt=nt+Math.imul(rr,Wr)|0;st=st+Math.imul(rr,Qr)|0;it=it+Math.imul(Zt,ri)|0;nt=nt+Math.imul(Zt,ii)|0;nt=nt+Math.imul(Qt,ri)|0;st=st+Math.imul(Qt,ii)|0;it=it+Math.imul($t,ci)|0;nt=nt+Math.imul($t,fi)|0;nt=nt+Math.imul(Yt,ci)|0;st=st+Math.imul(Yt,fi)|0;it=it+Math.imul(Ht,di)|0;nt=nt+Math.imul(Ht,pi)|0;nt=nt+Math.imul(Wt,di)|0;st=st+Math.imul(Wt,pi)|0;var Ki=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Ki>>>26)|0;Ki&=67108863;it=Math.imul(nr,Wr);nt=Math.imul(nr,Qr);nt=nt+Math.imul(sr,Wr)|0;st=Math.imul(sr,Qr);it=it+Math.imul(tr,ri)|0;nt=nt+Math.imul(tr,ii)|0;nt=nt+Math.imul(rr,ri)|0;st=st+Math.imul(rr,ii)|0;it=it+Math.imul(Zt,ci)|0;nt=nt+Math.imul(Zt,fi)|0;nt=nt+Math.imul(Qt,ci)|0;st=st+Math.imul(Qt,fi)|0;it=it+Math.imul($t,di)|0;nt=nt+Math.imul($t,pi)|0;nt=nt+Math.imul(Yt,di)|0;st=st+Math.imul(Yt,pi)|0;var qi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(qi>>>26)|0;qi&=67108863;it=Math.imul(nr,ri);nt=Math.imul(nr,ii);nt=nt+Math.imul(sr,ri)|0;st=Math.imul(sr,ii);it=it+Math.imul(tr,ci)|0;nt=nt+Math.imul(tr,fi)|0;nt=nt+Math.imul(rr,ci)|0;st=st+Math.imul(rr,fi)|0;it=it+Math.imul(Zt,di)|0;nt=nt+Math.imul(Zt,pi)|0;nt=nt+Math.imul(Qt,di)|0;st=st+Math.imul(Qt,pi)|0;var ji=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(ji>>>26)|0;ji&=67108863;it=Math.imul(nr,ci);nt=Math.imul(nr,fi);nt=nt+Math.imul(sr,ci)|0;st=Math.imul(sr,fi);it=it+Math.imul(tr,di)|0;nt=nt+Math.imul(tr,pi)|0;nt=nt+Math.imul(rr,di)|0;st=st+Math.imul(rr,pi)|0;var zi=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(zi>>>26)|0;zi&=67108863;it=Math.imul(nr,di);nt=Math.imul(nr,pi);nt=nt+Math.imul(sr,di)|0;st=Math.imul(sr,pi);var Li=(rt+it|0)+((nt&8191)<<13)|0;rt=(st+(nt>>>13)|0)+(Li>>>26)|0;Li&=67108863;$e[0]=yi;$e[1]=gi;$e[2]=vi;$e[3]=wi;$e[4]=ki;$e[5]=Si;$e[6]=Ei;$e[7]=Mi;$e[8]=Pi;$e[9]=xi;$e[10]=Ci;$e[11]=Ri;$e[12]=Di;$e[13]=Ti;$e[14]=Ki;$e[15]=qi;$e[16]=ji;$e[17]=zi;$e[18]=Li;if(rt!==0){$e[19]=rt;Ke.length++}return Ke};if(!Math.imul){it=smallMulTo}function bigMulTo(Ae,Se,Ke){Ke.negative=Se.negative^Ae.negative;Ke.length=Ae.length+Se.length;var qe=0;var Fe=0;for(var $e=0;$e<Ke.length-1;$e++){var rt=Fe;Fe=0;var it=qe&67108863;var nt=Math.min($e,Se.length-1);for(var st=Math.max(0,$e-Ae.length+1);st<=nt;st++){var ut=$e-st;var ht=Ae.words[ut]|0;var ft=Se.words[st]|0;var yt=ht*ft;var mt=yt&67108863;rt=rt+(yt/67108864|0)|0;mt=mt+it|0;it=mt&67108863;rt=rt+(mt>>>26)|0;Fe+=rt>>>26;rt&=67108863}Ke.words[$e]=it;qe=rt;rt=Fe}if(qe!==0){Ke.words[$e]=qe}else{Ke.length--}return Ke.strip()}function jumboMulTo(Ae,Se,Ke){var qe=new FFTM;return qe.mulp(Ae,Se,Ke)}BN.prototype.mulTo=function mulTo(Ae,Se){var Ke;var qe=this.length+Ae.length;if(this.length===10&&Ae.length===10){Ke=it(this,Ae,Se)}else if(qe<63){Ke=smallMulTo(this,Ae,Se)}else if(qe<1024){Ke=bigMulTo(this,Ae,Se)}else{Ke=jumboMulTo(this,Ae,Se)}return Ke};function FFTM(Ae,Se){this.x=Ae;this.y=Se}FFTM.prototype.makeRBT=function makeRBT(Ae){var Se=new Array(Ae);var Ke=BN.prototype._countBits(Ae)-1;for(var qe=0;qe<Ae;qe++){Se[qe]=this.revBin(qe,Ke,Ae)}return Se};FFTM.prototype.revBin=function revBin(Ae,Se,Ke){if(Ae===0||Ae===Ke-1)return Ae;var qe=0;for(var Fe=0;Fe<Se;Fe++){qe|=(Ae&1)<<Se-Fe-1;Ae>>=1}return qe};FFTM.prototype.permute=function permute(Ae,Se,Ke,qe,Fe,$e){for(var rt=0;rt<$e;rt++){qe[rt]=Se[Ae[rt]];Fe[rt]=Ke[Ae[rt]]}};FFTM.prototype.transform=function transform(Ae,Se,Ke,qe,Fe,$e){this.permute($e,Ae,Se,Ke,qe,Fe);for(var rt=1;rt<Fe;rt<<=1){var it=rt<<1;var nt=Math.cos(2*Math.PI/it);var st=Math.sin(2*Math.PI/it);for(var ut=0;ut<Fe;ut+=it){var ht=nt;var ft=st;for(var yt=0;yt<rt;yt++){var mt=Ke[ut+yt];var vt=qe[ut+yt];var _t=Ke[ut+yt+rt];var Rt=qe[ut+yt+rt];var Kt=ht*_t-ft*Rt;Rt=ht*Rt+ft*_t;_t=Kt;Ke[ut+yt]=mt+_t;qe[ut+yt]=vt+Rt;Ke[ut+yt+rt]=mt-_t;qe[ut+yt+rt]=vt-Rt;if(yt!==it){Kt=nt*ht-st*ft;ft=nt*ft+st*ht;ht=Kt}}}}};FFTM.prototype.guessLen13b=function guessLen13b(Ae,Se){var Ke=Math.max(Se,Ae)|1;var qe=Ke&1;var Fe=0;for(Ke=Ke/2|0;Ke;Ke=Ke>>>1){Fe++}return 1<<Fe+1+qe};FFTM.prototype.conjugate=function conjugate(Ae,Se,Ke){if(Ke<=1)return;for(var qe=0;qe<Ke/2;qe++){var Fe=Ae[qe];Ae[qe]=Ae[Ke-qe-1];Ae[Ke-qe-1]=Fe;Fe=Se[qe];Se[qe]=-Se[Ke-qe-1];Se[Ke-qe-1]=-Fe}};FFTM.prototype.normalize13b=function normalize13b(Ae,Se){var Ke=0;for(var qe=0;qe<Se/2;qe++){var Fe=Math.round(Ae[2*qe+1]/Se)*8192+Math.round(Ae[2*qe]/Se)+Ke;Ae[qe]=Fe&67108863;if(Fe<67108864){Ke=0}else{Ke=Fe/67108864|0}}return Ae};FFTM.prototype.convert13b=function convert13b(Ae,Se,Ke,qe){var Fe=0;for(var $e=0;$e<Se;$e++){Fe=Fe+(Ae[$e]|0);Ke[2*$e]=Fe&8191;Fe=Fe>>>13;Ke[2*$e+1]=Fe&8191;Fe=Fe>>>13}for($e=2*Se;$e<qe;++$e){Ke[$e]=0}assert(Fe===0);assert((Fe&~8191)===0)};FFTM.prototype.stub=function stub(Ae){var Se=new Array(Ae);for(var Ke=0;Ke<Ae;Ke++){Se[Ke]=0}return Se};FFTM.prototype.mulp=function mulp(Ae,Se,Ke){var qe=2*this.guessLen13b(Ae.length,Se.length);var Fe=this.makeRBT(qe);var $e=this.stub(qe);var rt=new Array(qe);var it=new Array(qe);var nt=new Array(qe);var st=new Array(qe);var ut=new Array(qe);var ht=new Array(qe);var ft=Ke.words;ft.length=qe;this.convert13b(Ae.words,Ae.length,rt,qe);this.convert13b(Se.words,Se.length,st,qe);this.transform(rt,$e,it,nt,qe,Fe);this.transform(st,$e,ut,ht,qe,Fe);for(var yt=0;yt<qe;yt++){var mt=it[yt]*ut[yt]-nt[yt]*ht[yt];nt[yt]=it[yt]*ht[yt]+nt[yt]*ut[yt];it[yt]=mt}this.conjugate(it,nt,qe);this.transform(it,nt,ft,$e,qe,Fe);this.conjugate(ft,$e,qe);this.normalize13b(ft,qe);Ke.negative=Ae.negative^Se.negative;Ke.length=Ae.length+Se.length;return Ke.strip()};BN.prototype.mul=function mul(Ae){var Se=new BN(null);Se.words=new Array(this.length+Ae.length);return this.mulTo(Ae,Se)};BN.prototype.mulf=function mulf(Ae){var Se=new BN(null);Se.words=new Array(this.length+Ae.length);return jumboMulTo(this,Ae,Se)};BN.prototype.imul=function imul(Ae){return this.clone().mulTo(Ae,this)};BN.prototype.imuln=function imuln(Ae){assert(typeof Ae==="number");assert(Ae<67108864);var Se=0;for(var Ke=0;Ke<this.length;Ke++){var qe=(this.words[Ke]|0)*Ae;var Fe=(qe&67108863)+(Se&67108863);Se>>=26;Se+=qe/67108864|0;Se+=Fe>>>26;this.words[Ke]=Fe&67108863}if(Se!==0){this.words[Ke]=Se;this.length++}return this};BN.prototype.muln=function muln(Ae){return this.clone().imuln(Ae)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(Ae){var Se=toBitArray(Ae);if(Se.length===0)return new BN(1);var Ke=this;for(var qe=0;qe<Se.length;qe++,Ke=Ke.sqr()){if(Se[qe]!==0)break}if(++qe<Se.length){for(var Fe=Ke.sqr();qe<Se.length;qe++,Fe=Fe.sqr()){if(Se[qe]===0)continue;Ke=Ke.mul(Fe)}}return Ke};BN.prototype.iushln=function iushln(Ae){assert(typeof Ae==="number"&&Ae>=0);var Se=Ae%26;var Ke=(Ae-Se)/26;var qe=67108863>>>26-Se<<26-Se;var Fe;if(Se!==0){var $e=0;for(Fe=0;Fe<this.length;Fe++){var rt=this.words[Fe]&qe;var it=(this.words[Fe]|0)-rt<<Se;this.words[Fe]=it|$e;$e=rt>>>26-Se}if($e){this.words[Fe]=$e;this.length++}}if(Ke!==0){for(Fe=this.length-1;Fe>=0;Fe--){this.words[Fe+Ke]=this.words[Fe]}for(Fe=0;Fe<Ke;Fe++){this.words[Fe]=0}this.length+=Ke}return this.strip()};BN.prototype.ishln=function ishln(Ae){assert(this.negative===0);return this.iushln(Ae)};BN.prototype.iushrn=function iushrn(Ae,Se,Ke){assert(typeof Ae==="number"&&Ae>=0);var qe;if(Se){qe=(Se-Se%26)/26}else{qe=0}var Fe=Ae%26;var $e=Math.min((Ae-Fe)/26,this.length);var rt=67108863^67108863>>>Fe<<Fe;var it=Ke;qe-=$e;qe=Math.max(0,qe);if(it){for(var nt=0;nt<$e;nt++){it.words[nt]=this.words[nt]}it.length=$e}if($e===0){}else if(this.length>$e){this.length-=$e;for(nt=0;nt<this.length;nt++){this.words[nt]=this.words[nt+$e]}}else{this.words[0]=0;this.length=1}var st=0;for(nt=this.length-1;nt>=0&&(st!==0||nt>=qe);nt--){var ut=this.words[nt]|0;this.words[nt]=st<<26-Fe|ut>>>Fe;st=ut&rt}if(it&&st!==0){it.words[it.length++]=st}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(Ae,Se,Ke){assert(this.negative===0);return this.iushrn(Ae,Se,Ke)};BN.prototype.shln=function shln(Ae){return this.clone().ishln(Ae)};BN.prototype.ushln=function ushln(Ae){return this.clone().iushln(Ae)};BN.prototype.shrn=function shrn(Ae){return this.clone().ishrn(Ae)};BN.prototype.ushrn=function ushrn(Ae){return this.clone().iushrn(Ae)};BN.prototype.testn=function testn(Ae){assert(typeof Ae==="number"&&Ae>=0);var Se=Ae%26;var Ke=(Ae-Se)/26;var qe=1<<Se;if(this.length<=Ke)return false;var Fe=this.words[Ke];return!!(Fe&qe)};BN.prototype.imaskn=function imaskn(Ae){assert(typeof Ae==="number"&&Ae>=0);var Se=Ae%26;var Ke=(Ae-Se)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=Ke){return this}if(Se!==0){Ke++}this.length=Math.min(Ke,this.length);if(Se!==0){var qe=67108863^67108863>>>Se<<Se;this.words[this.length-1]&=qe}return this.strip()};BN.prototype.maskn=function maskn(Ae){return this.clone().imaskn(Ae)};BN.prototype.iaddn=function iaddn(Ae){assert(typeof Ae==="number");assert(Ae<67108864);if(Ae<0)return this.isubn(-Ae);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<Ae){this.words[0]=Ae-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(Ae);this.negative=1;return this}return this._iaddn(Ae)};BN.prototype._iaddn=function _iaddn(Ae){this.words[0]+=Ae;for(var Se=0;Se<this.length&&this.words[Se]>=67108864;Se++){this.words[Se]-=67108864;if(Se===this.length-1){this.words[Se+1]=1}else{this.words[Se+1]++}}this.length=Math.max(this.length,Se+1);return this};BN.prototype.isubn=function isubn(Ae){assert(typeof Ae==="number");assert(Ae<67108864);if(Ae<0)return this.iaddn(-Ae);if(this.negative!==0){this.negative=0;this.iaddn(Ae);this.negative=1;return this}this.words[0]-=Ae;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var Se=0;Se<this.length&&this.words[Se]<0;Se++){this.words[Se]+=67108864;this.words[Se+1]-=1}}return this.strip()};BN.prototype.addn=function addn(Ae){return this.clone().iaddn(Ae)};BN.prototype.subn=function subn(Ae){return this.clone().isubn(Ae)};BN.prototype.iabs=function iabs(){this.negative=0;return this};BN.prototype.abs=function abs(){return this.clone().iabs()};BN.prototype._ishlnsubmul=function _ishlnsubmul(Ae,Se,Ke){var qe=Ae.length+Ke;var Fe;this._expand(qe);var $e;var rt=0;for(Fe=0;Fe<Ae.length;Fe++){$e=(this.words[Fe+Ke]|0)+rt;var it=(Ae.words[Fe]|0)*Se;$e-=it&67108863;rt=($e>>26)-(it/67108864|0);this.words[Fe+Ke]=$e&67108863}for(;Fe<this.length-Ke;Fe++){$e=(this.words[Fe+Ke]|0)+rt;rt=$e>>26;this.words[Fe+Ke]=$e&67108863}if(rt===0)return this.strip();assert(rt===-1);rt=0;for(Fe=0;Fe<this.length;Fe++){$e=-(this.words[Fe]|0)+rt;rt=$e>>26;this.words[Fe]=$e&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(Ae,Se){var Ke=this.length-Ae.length;var qe=this.clone();var Fe=Ae;var $e=Fe.words[Fe.length-1]|0;var rt=this._countBits($e);Ke=26-rt;if(Ke!==0){Fe=Fe.ushln(Ke);qe.iushln(Ke);$e=Fe.words[Fe.length-1]|0}var it=qe.length-Fe.length;var nt;if(Se!=="mod"){nt=new BN(null);nt.length=it+1;nt.words=new Array(nt.length);for(var st=0;st<nt.length;st++){nt.words[st]=0}}var ut=qe.clone()._ishlnsubmul(Fe,1,it);if(ut.negative===0){qe=ut;if(nt){nt.words[it]=1}}for(var ht=it-1;ht>=0;ht--){var ft=(qe.words[Fe.length+ht]|0)*67108864+(qe.words[Fe.length+ht-1]|0);ft=Math.min(ft/$e|0,67108863);qe._ishlnsubmul(Fe,ft,ht);while(qe.negative!==0){ft--;qe.negative=0;qe._ishlnsubmul(Fe,1,ht);if(!qe.isZero()){qe.negative^=1}}if(nt){nt.words[ht]=ft}}if(nt){nt.strip()}qe.strip();if(Se!=="div"&&Ke!==0){qe.iushrn(Ke)}return{div:nt||null,mod:qe}};BN.prototype.divmod=function divmod(Ae,Se,Ke){assert(!Ae.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var qe,Fe,$e;if(this.negative!==0&&Ae.negative===0){$e=this.neg().divmod(Ae,Se);if(Se!=="mod"){qe=$e.div.neg()}if(Se!=="div"){Fe=$e.mod.neg();if(Ke&&Fe.negative!==0){Fe.iadd(Ae)}}return{div:qe,mod:Fe}}if(this.negative===0&&Ae.negative!==0){$e=this.divmod(Ae.neg(),Se);if(Se!=="mod"){qe=$e.div.neg()}return{div:qe,mod:$e.mod}}if((this.negative&Ae.negative)!==0){$e=this.neg().divmod(Ae.neg(),Se);if(Se!=="div"){Fe=$e.mod.neg();if(Ke&&Fe.negative!==0){Fe.isub(Ae)}}return{div:$e.div,mod:Fe}}if(Ae.length>this.length||this.cmp(Ae)<0){return{div:new BN(0),mod:this}}if(Ae.length===1){if(Se==="div"){return{div:this.divn(Ae.words[0]),mod:null}}if(Se==="mod"){return{div:null,mod:new BN(this.modn(Ae.words[0]))}}return{div:this.divn(Ae.words[0]),mod:new BN(this.modn(Ae.words[0]))}}return this._wordDiv(Ae,Se)};BN.prototype.div=function div(Ae){return this.divmod(Ae,"div",false).div};BN.prototype.mod=function mod(Ae){return this.divmod(Ae,"mod",false).mod};BN.prototype.umod=function umod(Ae){return this.divmod(Ae,"mod",true).mod};BN.prototype.divRound=function divRound(Ae){var Se=this.divmod(Ae);if(Se.mod.isZero())return Se.div;var Ke=Se.div.negative!==0?Se.mod.isub(Ae):Se.mod;var qe=Ae.ushrn(1);var Fe=Ae.andln(1);var $e=Ke.cmp(qe);if($e<0||Fe===1&&$e===0)return Se.div;return Se.div.negative!==0?Se.div.isubn(1):Se.div.iaddn(1)};BN.prototype.modn=function modn(Ae){assert(Ae<=67108863);var Se=(1<<26)%Ae;var Ke=0;for(var qe=this.length-1;qe>=0;qe--){Ke=(Se*Ke+(this.words[qe]|0))%Ae}return Ke};BN.prototype.idivn=function idivn(Ae){assert(Ae<=67108863);var Se=0;for(var Ke=this.length-1;Ke>=0;Ke--){var qe=(this.words[Ke]|0)+Se*67108864;this.words[Ke]=qe/Ae|0;Se=qe%Ae}return this.strip()};BN.prototype.divn=function divn(Ae){return this.clone().idivn(Ae)};BN.prototype.egcd=function egcd(Ae){assert(Ae.negative===0);assert(!Ae.isZero());var Se=this;var Ke=Ae.clone();if(Se.negative!==0){Se=Se.umod(Ae)}else{Se=Se.clone()}var qe=new BN(1);var Fe=new BN(0);var $e=new BN(0);var rt=new BN(1);var it=0;while(Se.isEven()&&Ke.isEven()){Se.iushrn(1);Ke.iushrn(1);++it}var nt=Ke.clone();var st=Se.clone();while(!Se.isZero()){for(var ut=0,ht=1;(Se.words[0]&ht)===0&&ut<26;++ut,ht<<=1);if(ut>0){Se.iushrn(ut);while(ut-- >0){if(qe.isOdd()||Fe.isOdd()){qe.iadd(nt);Fe.isub(st)}qe.iushrn(1);Fe.iushrn(1)}}for(var ft=0,yt=1;(Ke.words[0]&yt)===0&&ft<26;++ft,yt<<=1);if(ft>0){Ke.iushrn(ft);while(ft-- >0){if($e.isOdd()||rt.isOdd()){$e.iadd(nt);rt.isub(st)}$e.iushrn(1);rt.iushrn(1)}}if(Se.cmp(Ke)>=0){Se.isub(Ke);qe.isub($e);Fe.isub(rt)}else{Ke.isub(Se);$e.isub(qe);rt.isub(Fe)}}return{a:$e,b:rt,gcd:Ke.iushln(it)}};BN.prototype._invmp=function _invmp(Ae){assert(Ae.negative===0);assert(!Ae.isZero());var Se=this;var Ke=Ae.clone();if(Se.negative!==0){Se=Se.umod(Ae)}else{Se=Se.clone()}var qe=new BN(1);var Fe=new BN(0);var $e=Ke.clone();while(Se.cmpn(1)>0&&Ke.cmpn(1)>0){for(var rt=0,it=1;(Se.words[0]&it)===0&&rt<26;++rt,it<<=1);if(rt>0){Se.iushrn(rt);while(rt-- >0){if(qe.isOdd()){qe.iadd($e)}qe.iushrn(1)}}for(var nt=0,st=1;(Ke.words[0]&st)===0&&nt<26;++nt,st<<=1);if(nt>0){Ke.iushrn(nt);while(nt-- >0){if(Fe.isOdd()){Fe.iadd($e)}Fe.iushrn(1)}}if(Se.cmp(Ke)>=0){Se.isub(Ke);qe.isub(Fe)}else{Ke.isub(Se);Fe.isub(qe)}}var ut;if(Se.cmpn(1)===0){ut=qe}else{ut=Fe}if(ut.cmpn(0)<0){ut.iadd(Ae)}return ut};BN.prototype.gcd=function gcd(Ae){if(this.isZero())return Ae.abs();if(Ae.isZero())return this.abs();var Se=this.clone();var Ke=Ae.clone();Se.negative=0;Ke.negative=0;for(var qe=0;Se.isEven()&&Ke.isEven();qe++){Se.iushrn(1);Ke.iushrn(1)}do{while(Se.isEven()){Se.iushrn(1)}while(Ke.isEven()){Ke.iushrn(1)}var Fe=Se.cmp(Ke);if(Fe<0){var $e=Se;Se=Ke;Ke=$e}else if(Fe===0||Ke.cmpn(1)===0){break}Se.isub(Ke)}while(true);return Ke.iushln(qe)};BN.prototype.invm=function invm(Ae){return this.egcd(Ae).a.umod(Ae)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(Ae){return this.words[0]&Ae};BN.prototype.bincn=function bincn(Ae){assert(typeof Ae==="number");var Se=Ae%26;var Ke=(Ae-Se)/26;var qe=1<<Se;if(this.length<=Ke){this._expand(Ke+1);this.words[Ke]|=qe;return this}var Fe=qe;for(var $e=Ke;Fe!==0&&$e<this.length;$e++){var rt=this.words[$e]|0;rt+=Fe;Fe=rt>>>26;rt&=67108863;this.words[$e]=rt}if(Fe!==0){this.words[$e]=Fe;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(Ae){var Se=Ae<0;if(this.negative!==0&&!Se)return-1;if(this.negative===0&&Se)return 1;this.strip();var Ke;if(this.length>1){Ke=1}else{if(Se){Ae=-Ae}assert(Ae<=67108863,"Number is too big");var qe=this.words[0]|0;Ke=qe===Ae?0:qe<Ae?-1:1}if(this.negative!==0)return-Ke|0;return Ke};BN.prototype.cmp=function cmp(Ae){if(this.negative!==0&&Ae.negative===0)return-1;if(this.negative===0&&Ae.negative!==0)return 1;var Se=this.ucmp(Ae);if(this.negative!==0)return-Se|0;return Se};BN.prototype.ucmp=function ucmp(Ae){if(this.length>Ae.length)return 1;if(this.length<Ae.length)return-1;var Se=0;for(var Ke=this.length-1;Ke>=0;Ke--){var qe=this.words[Ke]|0;var Fe=Ae.words[Ke]|0;if(qe===Fe)continue;if(qe<Fe){Se=-1}else if(qe>Fe){Se=1}break}return Se};BN.prototype.gtn=function gtn(Ae){return this.cmpn(Ae)===1};BN.prototype.gt=function gt(Ae){return this.cmp(Ae)===1};BN.prototype.gten=function gten(Ae){return this.cmpn(Ae)>=0};BN.prototype.gte=function gte(Ae){return this.cmp(Ae)>=0};BN.prototype.ltn=function ltn(Ae){return this.cmpn(Ae)===-1};BN.prototype.lt=function lt(Ae){return this.cmp(Ae)===-1};BN.prototype.lten=function lten(Ae){return this.cmpn(Ae)<=0};BN.prototype.lte=function lte(Ae){return this.cmp(Ae)<=0};BN.prototype.eqn=function eqn(Ae){return this.cmpn(Ae)===0};BN.prototype.eq=function eq(Ae){return this.cmp(Ae)===0};BN.red=function red(Ae){return new Red(Ae)};BN.prototype.toRed=function toRed(Ae){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return Ae.convertTo(this)._forceRed(Ae)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(Ae){this.red=Ae;return this};BN.prototype.forceRed=function forceRed(Ae){assert(!this.red,"Already a number in reduction context");return this._forceRed(Ae)};BN.prototype.redAdd=function redAdd(Ae){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,Ae)};BN.prototype.redIAdd=function redIAdd(Ae){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,Ae)};BN.prototype.redSub=function redSub(Ae){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,Ae)};BN.prototype.redISub=function redISub(Ae){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,Ae)};BN.prototype.redShl=function redShl(Ae){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,Ae)};BN.prototype.redMul=function redMul(Ae){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,Ae);return this.red.mul(this,Ae)};BN.prototype.redIMul=function redIMul(Ae){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,Ae);return this.red.imul(this,Ae)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(Ae){assert(this.red&&!Ae.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,Ae)};var nt={k256:null,p224:null,p192:null,p25519:null};function MPrime(Ae,Se){this.name=Ae;this.p=new BN(Se,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var Ae=new BN(null);Ae.words=new Array(Math.ceil(this.n/13));return Ae};MPrime.prototype.ireduce=function ireduce(Ae){var Se=Ae;var Ke;do{this.split(Se,this.tmp);Se=this.imulK(Se);Se=Se.iadd(this.tmp);Ke=Se.bitLength()}while(Ke>this.n);var qe=Ke<this.n?-1:Se.ucmp(this.p);if(qe===0){Se.words[0]=0;Se.length=1}else if(qe>0){Se.isub(this.p)}else{if(Se.strip!==undefined){Se.strip()}else{Se._strip()}}return Se};MPrime.prototype.split=function split(Ae,Se){Ae.iushrn(this.n,0,Se)};MPrime.prototype.imulK=function imulK(Ae){return Ae.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(Ae,Se){var Ke=4194303;var qe=Math.min(Ae.length,9);for(var Fe=0;Fe<qe;Fe++){Se.words[Fe]=Ae.words[Fe]}Se.length=qe;if(Ae.length<=9){Ae.words[0]=0;Ae.length=1;return}var $e=Ae.words[9];Se.words[Se.length++]=$e&Ke;for(Fe=10;Fe<Ae.length;Fe++){var rt=Ae.words[Fe]|0;Ae.words[Fe-10]=(rt&Ke)<<4|$e>>>22;$e=rt}$e>>>=22;Ae.words[Fe-10]=$e;if($e===0&&Ae.length>10){Ae.length-=10}else{Ae.length-=9}};K256.prototype.imulK=function imulK(Ae){Ae.words[Ae.length]=0;Ae.words[Ae.length+1]=0;Ae.length+=2;var Se=0;for(var Ke=0;Ke<Ae.length;Ke++){var qe=Ae.words[Ke]|0;Se+=qe*977;Ae.words[Ke]=Se&67108863;Se=qe*64+(Se/67108864|0)}if(Ae.words[Ae.length-1]===0){Ae.length--;if(Ae.words[Ae.length-1]===0){Ae.length--}}return Ae};function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}inherits(P224,MPrime);function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}inherits(P192,MPrime);function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}inherits(P25519,MPrime);P25519.prototype.imulK=function imulK(Ae){var Se=0;for(var Ke=0;Ke<Ae.length;Ke++){var qe=(Ae.words[Ke]|0)*19+Se;var Fe=qe&67108863;qe>>>=26;Ae.words[Ke]=Fe;Se=qe}if(Se!==0){Ae.words[Ae.length++]=Se}return Ae};BN._prime=function prime(Ae){if(nt[Ae])return nt[Ae];var prime;if(Ae==="k256"){prime=new K256}else if(Ae==="p224"){prime=new P224}else if(Ae==="p192"){prime=new P192}else if(Ae==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+Ae)}nt[Ae]=prime;return prime};function Red(Ae){if(typeof Ae==="string"){var Se=BN._prime(Ae);this.m=Se.p;this.prime=Se}else{assert(Ae.gtn(1),"modulus must be greater than 1");this.m=Ae;this.prime=null}}Red.prototype._verify1=function _verify1(Ae){assert(Ae.negative===0,"red works only with positives");assert(Ae.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(Ae,Se){assert((Ae.negative|Se.negative)===0,"red works only with positives");assert(Ae.red&&Ae.red===Se.red,"red works only with red numbers")};Red.prototype.imod=function imod(Ae){if(this.prime)return this.prime.ireduce(Ae)._forceRed(this);return Ae.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(Ae){if(Ae.isZero()){return Ae.clone()}return this.m.sub(Ae)._forceRed(this)};Red.prototype.add=function add(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.add(Se);if(Ke.cmp(this.m)>=0){Ke.isub(this.m)}return Ke._forceRed(this)};Red.prototype.iadd=function iadd(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.iadd(Se);if(Ke.cmp(this.m)>=0){Ke.isub(this.m)}return Ke};Red.prototype.sub=function sub(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.sub(Se);if(Ke.cmpn(0)<0){Ke.iadd(this.m)}return Ke._forceRed(this)};Red.prototype.isub=function isub(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.isub(Se);if(Ke.cmpn(0)<0){Ke.iadd(this.m)}return Ke};Red.prototype.shl=function shl(Ae,Se){this._verify1(Ae);return this.imod(Ae.ushln(Se))};Red.prototype.imul=function imul(Ae,Se){this._verify2(Ae,Se);return this.imod(Ae.imul(Se))};Red.prototype.mul=function mul(Ae,Se){this._verify2(Ae,Se);return this.imod(Ae.mul(Se))};Red.prototype.isqr=function isqr(Ae){return this.imul(Ae,Ae.clone())};Red.prototype.sqr=function sqr(Ae){return this.mul(Ae,Ae)};Red.prototype.sqrt=function sqrt(Ae){if(Ae.isZero())return Ae.clone();var Se=this.m.andln(3);assert(Se%2===1);if(Se===3){var Ke=this.m.add(new BN(1)).iushrn(2);return this.pow(Ae,Ke)}var qe=this.m.subn(1);var Fe=0;while(!qe.isZero()&&qe.andln(1)===0){Fe++;qe.iushrn(1)}assert(!qe.isZero());var $e=new BN(1).toRed(this);var rt=$e.redNeg();var it=this.m.subn(1).iushrn(1);var nt=this.m.bitLength();nt=new BN(2*nt*nt).toRed(this);while(this.pow(nt,it).cmp(rt)!==0){nt.redIAdd(rt)}var st=this.pow(nt,qe);var ut=this.pow(Ae,qe.addn(1).iushrn(1));var ht=this.pow(Ae,qe);var ft=Fe;while(ht.cmp($e)!==0){var yt=ht;for(var mt=0;yt.cmp($e)!==0;mt++){yt=yt.redSqr()}assert(mt<ft);var vt=this.pow(st,new BN(1).iushln(ft-mt-1));ut=ut.redMul(vt);st=vt.redSqr();ht=ht.redMul(st);ft=mt}return ut};Red.prototype.invm=function invm(Ae){var Se=Ae._invmp(this.m);if(Se.negative!==0){Se.negative=0;return this.imod(Se).redNeg()}else{return this.imod(Se)}};Red.prototype.pow=function pow(Ae,Se){if(Se.isZero())return new BN(1).toRed(this);if(Se.cmpn(1)===0)return Ae.clone();var Ke=4;var qe=new Array(1<<Ke);qe[0]=new BN(1).toRed(this);qe[1]=Ae;for(var Fe=2;Fe<qe.length;Fe++){qe[Fe]=this.mul(qe[Fe-1],Ae)}var $e=qe[0];var rt=0;var it=0;var nt=Se.bitLength()%26;if(nt===0){nt=26}for(Fe=Se.length-1;Fe>=0;Fe--){var st=Se.words[Fe];for(var ut=nt-1;ut>=0;ut--){var ht=st>>ut&1;if($e!==qe[0]){$e=this.sqr($e)}if(ht===0&&rt===0){it=0;continue}rt<<=1;rt|=ht;it++;if(it!==Ke&&(Fe!==0||ut!==0))continue;$e=this.mul($e,qe[rt]);it=0;rt=0}nt=26}return $e};Red.prototype.convertTo=function convertTo(Ae){var Se=Ae.umod(this.m);return Se===Ae?Se.clone():Se};Red.prototype.convertFrom=function convertFrom(Ae){var Se=Ae.clone();Se.red=null;return Se};BN.mont=function mont(Ae){return new Mont(Ae)};function Mont(Ae){Red.call(this,Ae);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(1).iushln(this.shift);this.r2=this.imod(this.r.sqr());this.rinv=this.r._invmp(this.m);this.minv=this.rinv.mul(this.r).isubn(1).div(this.m);this.minv=this.minv.umod(this.r);this.minv=this.r.sub(this.minv)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(Ae){return this.imod(Ae.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(Ae){var Se=this.imod(Ae.mul(this.rinv));Se.red=null;return Se};Mont.prototype.imul=function imul(Ae,Se){if(Ae.isZero()||Se.isZero()){Ae.words[0]=0;Ae.length=1;return Ae}var Ke=Ae.imul(Se);var qe=Ke.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var Fe=Ke.isub(qe).iushrn(this.shift);var $e=Fe;if(Fe.cmp(this.m)>=0){$e=Fe.isub(this.m)}else if(Fe.cmpn(0)<0){$e=Fe.iadd(this.m)}return $e._forceRed(this)};Mont.prototype.mul=function mul(Ae,Se){if(Ae.isZero()||Se.isZero())return new BN(0)._forceRed(this);var Ke=Ae.mul(Se);var qe=Ke.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var Fe=Ke.isub(qe).iushrn(this.shift);var $e=Fe;if(Fe.cmp(this.m)>=0){$e=Fe.isub(this.m)}else if(Fe.cmpn(0)<0){$e=Fe.iadd(this.m)}return $e._forceRed(this)};Mont.prototype.invm=function invm(Ae){var Se=this.imod(Ae._invmp(this.m).mul(this.r2));return Se._forceRed(this)}})(false||Ae,this)},4124:(Ae,Se,Ke)=>{try{var qe=Ke(3837);if(typeof qe.inherits!=="function")throw"";Ae.exports=qe.inherits}catch(Se){Ae.exports=Ke(8544)}},8544:Ae=>{if(typeof Object.create==="function"){Ae.exports=function inherits(Ae,Se){if(Se){Ae.super_=Se;Ae.prototype=Object.create(Se.prototype,{constructor:{value:Ae,enumerable:false,writable:true,configurable:true}})}}}else{Ae.exports=function inherits(Ae,Se){if(Se){Ae.super_=Se;var TempCtor=function(){};TempCtor.prototype=Se.prototype;Ae.prototype=new TempCtor;Ae.prototype.constructor=Ae}}}},910:Ae=>{Ae.exports=assert;function assert(Ae,Se){if(!Ae)throw new Error(Se||"Assertion failed")}assert.equal=function assertEqual(Ae,Se,Ke){if(Ae!=Se)throw new Error(Ke||"Assertion failed: "+Ae+" != "+Se)}},7946:(Ae,Se,Ke)=>{"use strict";
|
|
/*! OpenPGP.js v5.8.0 - 2023-04-18 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */const qe="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Object.defineProperty(Se,"__esModule",{value:!0});var Fe=Ke(4300),$e=Ke(2781),rt=Ke(6113),it=Ke(9796),nt=Ke(2037),st=Ke(3837),ut=Ke(4293);function c(Ae){return Ae&&"object"==typeof Ae&&"default"in Ae?Ae:{default:Ae}}var ht=c(Fe),ft=c($e),yt=c(rt),mt=c(it),vt=c(nt),_t=c(st),Rt=c(ut);const Kt=Symbol("doneWritingPromise"),It=Symbol("doneWritingResolve"),Ut=Symbol("doneWritingReject"),Ot=Symbol("readingIndex");class v extends Array{constructor(){super(),this[Kt]=new Promise(((Ae,Se)=>{this[It]=Ae,this[Ut]=Se})),this[Kt].catch((()=>{}))}}function _(Ae){return Ae&&Ae.getReader&&Array.isArray(Ae)}function k(Ae){if(!_(Ae)){const Se=Ae.getWriter(),Ke=Se.releaseLock;return Se.releaseLock=()=>{Se.closed.catch((function(){})),Ke.call(Se)},Se}this.stream=Ae}v.prototype.getReader=function(){return void 0===this[Ot]&&(this[Ot]=0),{read:async()=>(await this[Kt],this[Ot]===this.length?{value:void 0,done:!0}:{value:this[this[Ot]++],done:!1})}},v.prototype.readToEnd=async function(Ae){await this[Kt];const Se=Ae(this.slice(this[Ot]));return this.length=0,Se},v.prototype.clone=function(){const Ae=new v;return Ae[Kt]=this[Kt].then((()=>{Ae.push(...this)})),Ae},k.prototype.write=async function(Ae){this.stream.push(Ae)},k.prototype.close=async function(){this.stream[It]()},k.prototype.abort=async function(Ae){return this.stream[Ut](Ae),Ae},k.prototype.releaseLock=function(){};const Nt="object"==typeof qe.process&&"object"==typeof qe.process.versions,jt=Nt&&ft.default.Readable;function E(Ae){return _(Ae)?"array":qe.ReadableStream&&qe.ReadableStream.prototype.isPrototypeOf(Ae)?"web":Zt&&Zt.prototype.isPrototypeOf(Ae)?"ponyfill":jt&&jt.prototype.isPrototypeOf(Ae)?"node":!(!Ae||!Ae.getReader)&&"web-like"}function P(Ae){return Uint8Array.prototype.isPrototypeOf(Ae)}function x(Ae){if(1===Ae.length)return Ae[0];let Se=0;for(let Ke=0;Ke<Ae.length;Ke++){if(!P(Ae[Ke]))throw Error("concatUint8Array: Data must be in the form of a Uint8Array");Se+=Ae[Ke].length}const Ke=new Uint8Array(Se);let qe=0;return Ae.forEach((function(Ae){Ke.set(Ae,qe),qe+=Ae.length})),Ke}const Ft=Nt&&ht.default.Buffer,Lt=Nt&&ft.default.Readable;let Ht,Wt;if(Lt){Ht=function(Ae){let Se=!1;return new Zt({start(Ke){Ae.pause(),Ae.on("data",(qe=>{Se||(Ft.isBuffer(qe)&&(qe=new Uint8Array(qe.buffer,qe.byteOffset,qe.byteLength)),Ke.enqueue(qe),Ae.pause())})),Ae.on("end",(()=>{Se||Ke.close()})),Ae.on("error",(Ae=>Ke.error(Ae)))},pull(){Ae.resume()},cancel(Ke){Se=!0,Ae.destroy(Ke)}})};class e extends Lt{constructor(Ae,Se){super(Se),this._reader=H(Ae)}async _read(Ae){try{for(;;){const{done:Ae,value:Se}=await this._reader.read();if(Ae){this.push(null);break}if(!this.push(Se)||this._cancelling){this._reading=!1;break}}}catch(Ae){this.emit("error",Ae)}}_destroy(Ae){this._reader.cancel(Ae)}}Wt=function(Ae,Se){return new e(Ae,Se)}}const Gt=new WeakSet,$t=Symbol("externalBuffer");function I(Ae){if(this.stream=Ae,Ae[$t]&&(this[$t]=Ae[$t].slice()),_(Ae)){const Se=Ae.getReader();return this._read=Se.read.bind(Se),this._releaseLock=()=>{},void(this._cancel=()=>{})}let Se=E(Ae);if("node"===Se&&(Ae=Ht(Ae)),Se){const Se=Ae.getReader();return this._read=Se.read.bind(Se),this._releaseLock=()=>{Se.closed.catch((function(){})),Se.releaseLock()},void(this._cancel=Se.cancel.bind(Se))}let Ke=!1;this._read=async()=>Ke||Gt.has(Ae)?{value:void 0,done:!0}:(Ke=!0,{value:Ae,done:!1}),this._releaseLock=()=>{if(Ke)try{Gt.add(Ae)}catch(Ae){}}}I.prototype.read=async function(){if(this[$t]&&this[$t].length){return{done:!1,value:this[$t].shift()}}return this._read()},I.prototype.releaseLock=function(){this[$t]&&(this.stream[$t]=this[$t]),this._releaseLock()},I.prototype.cancel=function(Ae){return this._cancel(Ae)},I.prototype.readLine=async function(){let Ae,Se=[];for(;!Ae;){let{done:Ke,value:qe}=await this.read();if(qe+="",Ke)return Se.length?W(Se):void 0;const Fe=qe.indexOf("\n")+1;Fe&&(Ae=W(Se.concat(qe.substr(0,Fe))),Se=[]),Fe!==qe.length&&Se.push(qe.substr(Fe))}return this.unshift(...Se),Ae},I.prototype.readByte=async function(){const{done:Ae,value:Se}=await this.read();if(Ae)return;const Ke=Se[0];return this.unshift(re(Se,1)),Ke},I.prototype.readBytes=async function(Ae){const Se=[];let Ke=0;for(;;){const{done:qe,value:Fe}=await this.read();if(qe)return Se.length?W(Se):void 0;if(Se.push(Fe),Ke+=Fe.length,Ke>=Ae){const Ke=W(Se);return this.unshift(re(Ke,Ae)),re(Ke,0,Ae)}}},I.prototype.peekBytes=async function(Ae){const Se=await this.readBytes(Ae);return this.unshift(Se),Se},I.prototype.unshift=function(...Ae){this[$t]||(this[$t]=[]),1===Ae.length&&P(Ae[0])&&this[$t].length&&Ae[0].length&&this[$t][0].byteOffset>=Ae[0].length?this[$t][0]=new Uint8Array(this[$t][0].buffer,this[$t][0].byteOffset-Ae[0].length,this[$t][0].byteLength+Ae[0].length):this[$t].unshift(...Ae.filter((Ae=>Ae&&Ae.length)))},I.prototype.readToEnd=async function(Ae=W){const Se=[];for(;;){const{done:Ae,value:Ke}=await this.read();if(Ae)break;Se.push(Ke)}return Ae(Se)};let Yt,Vt,{ReadableStream:Zt,WritableStream:Qt,TransformStream:er}=qe;async function O(){if(er)return;const[Ae,Se]=await Promise.all([Promise.resolve().then((function(){return Zy})),Promise.resolve().then((function(){return rm}))]);({ReadableStream:Zt,WritableStream:Qt,TransformStream:er}=Ae);const{createReadableStreamWrapper:Ke}=Se;qe.ReadableStream&&Zt!==qe.ReadableStream&&(Yt=Ke(Zt),Vt=Ke(qe.ReadableStream))}const tr=Nt&&ht.default.Buffer;function j(Ae){let Se=E(Ae);return"node"===Se?Ht(Ae):"web"===Se&&Yt?Yt(Ae):Se?Ae:new Zt({start(Se){Se.enqueue(Ae),Se.close()}})}function L(Ae){if(E(Ae))return Ae;const Se=new v;return(async()=>{const Ke=G(Se);await Ke.write(Ae),await Ke.close()})(),Se}function W(Ae){return Ae.some((Ae=>E(Ae)&&!_(Ae)))?function(Ae){Ae=Ae.map(j);const Se=Z((async function(Ae){await Promise.all(qe.map((Se=>ne(Se,Ae))))}));let Ke=Promise.resolve();const qe=Ae.map(((qe,Fe)=>X(qe,((qe,$e)=>(Ke=Ke.then((()=>V(qe,Se.writable,{preventClose:Fe!==Ae.length-1}))),Ke)))));return Se.readable}(Ae):Ae.some((Ae=>_(Ae)))?function(Ae){const Se=new v;let Ke=Promise.resolve();return Ae.forEach(((qe,Fe)=>(Ke=Ke.then((()=>V(qe,Se,{preventClose:Fe!==Ae.length-1}))),Ke))),Se}(Ae):"string"==typeof Ae[0]?Ae.join(""):tr&&tr.isBuffer(Ae[0])?tr.concat(Ae):x(Ae)}function H(Ae){return new I(Ae)}function G(Ae){return new k(Ae)}async function V(Ae,Se,{preventClose:Ke=!1,preventAbort:qe=!1,preventCancel:Fe=!1}={}){if(E(Ae)&&!_(Ae)){Ae=j(Ae);try{if(Ae[$t]){const Ke=G(Se);for(let Se=0;Se<Ae[$t].length;Se++)await Ke.ready,await Ke.write(Ae[$t][Se]);Ke.releaseLock()}await Ae.pipeTo(Se,{preventClose:Ke,preventAbort:qe,preventCancel:Fe})}catch(Ae){}return}const $e=H(Ae=L(Ae)),rt=G(Se);try{for(;;){await rt.ready;const{done:Ae,value:Se}=await $e.read();if(Ae){Ke||await rt.close();break}await rt.write(Se)}}catch(Ae){qe||await rt.abort(Ae)}finally{$e.releaseLock(),rt.releaseLock()}}function $(Ae,Se){const Ke=new er(Se);return V(Ae,Ke.writable),Ke.readable}function Z(Ae){let Se,Ke,qe=!1;return{readable:new Zt({start(Ae){Ke=Ae},pull(){Se?Se():qe=!0},cancel:Ae},{highWaterMark:0}),writable:new Qt({write:async function(Ae){Ke.enqueue(Ae),qe?qe=!1:(await new Promise((Ae=>{Se=Ae})),Se=null)},close:Ke.close.bind(Ke),abort:Ke.error.bind(Ke)})}}function Y(Ae,Se=(()=>{}),Ke=(()=>{})){if(_(Ae)){const qe=new v;return(async()=>{const Fe=G(qe);try{const qe=await ie(Ae),$e=Se(qe),rt=Ke();let it;it=void 0!==$e&&void 0!==rt?W([$e,rt]):void 0!==$e?$e:rt,await Fe.write(it),await Fe.close()}catch(Ae){await Fe.abort(Ae)}})(),qe}if(E(Ae))return $(Ae,{async transform(Ae,Ke){try{const qe=await Se(Ae);void 0!==qe&&Ke.enqueue(qe)}catch(Ae){Ke.error(Ae)}},async flush(Ae){try{const Se=await Ke();void 0!==Se&&Ae.enqueue(Se)}catch(Se){Ae.error(Se)}}});const qe=Se(Ae),Fe=Ke();return void 0!==qe&&void 0!==Fe?W([qe,Fe]):void 0!==qe?qe:Fe}function X(Ae,Se){if(E(Ae)&&!_(Ae)){let Ke;const qe=new er({start(Ae){Ke=Ae}}),Fe=V(Ae,qe.writable),$e=Z((async function(Ae){Ke.error(Ae),await Fe,await new Promise(setTimeout)}));return Se(qe.readable,$e.writable),$e.readable}Ae=L(Ae);const Ke=new v;return Se(Ae,Ke),Ke}function Q(Ae,Se){let Ke;const qe=X(Ae,((Ae,Fe)=>{const $e=H(Ae);$e.remainder=()=>($e.releaseLock(),V(Ae,Fe),qe),Ke=Se($e)}));return Ke}function J(Ae){if(_(Ae))return Ae.clone();if(E(Ae)){const Se=function(Ae){if(_(Ae))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(E(Ae)){const Se=j(Ae).tee();return Se[0][$t]=Se[1][$t]=Ae[$t],Se}return[re(Ae),re(Ae)]}(Ae);return te(Ae,Se[0]),Se[1]}return re(Ae)}function ee(Ae){return _(Ae)?J(Ae):E(Ae)?new Zt({start(Se){const Ke=X(Ae,(async(Ae,Ke)=>{const qe=H(Ae),Fe=G(Ke);try{for(;;){await Fe.ready;const{done:Ke,value:$e}=await qe.read();if(Ke){try{Se.close()}catch(Ae){}return void await Fe.close()}try{Se.enqueue($e)}catch(Ae){}await Fe.write($e)}}catch(Ae){Se.error(Ae),await Fe.abort(Ae)}}));te(Ae,Ke)}}):re(Ae)}function te(Ae,Se){Object.entries(Object.getOwnPropertyDescriptors(Ae.constructor.prototype)).forEach((([Ke,qe])=>{"constructor"!==Ke&&(qe.value?qe.value=qe.value.bind(Se):qe.get=qe.get.bind(Se),Object.defineProperty(Ae,Ke,qe))}))}function re(Ae,Se=0,Ke=1/0){if(_(Ae))throw Error("Not implemented");if(E(Ae)){if(Se>=0&&Ke>=0){let qe=0;return $(Ae,{transform(Ae,Fe){qe<Ke?(qe+Ae.length>=Se&&Fe.enqueue(re(Ae,Math.max(Se-qe,0),Ke-qe)),qe+=Ae.length):Fe.terminate()}})}if(Se<0&&(Ke<0||Ke===1/0)){let qe=[];return Y(Ae,(Ae=>{Ae.length>=-Se?qe=[Ae]:qe.push(Ae)}),(()=>re(W(qe),Se,Ke)))}if(0===Se&&Ke<0){let qe;return Y(Ae,(Ae=>{const Fe=qe?W([qe,Ae]):Ae;if(Fe.length>=-Ke)return qe=re(Fe,Ke),re(Fe,Se,Ke);qe=Fe}))}return console.warn(`stream.slice(input, ${Se}, ${Ke}) not implemented efficiently.`),ae((async()=>re(await ie(Ae),Se,Ke)))}return Ae[$t]&&(Ae=W(Ae[$t].concat([Ae]))),!P(Ae)||tr&&tr.isBuffer(Ae)?Ae.slice(Se,Ke):(Ke===1/0&&(Ke=Ae.length),Ae.subarray(Se,Ke))}async function ie(Ae,Se=W){return _(Ae)?Ae.readToEnd(Se):E(Ae)?H(Ae).readToEnd(Se):Ae}async function ne(Ae,Se){if(E(Ae)){if(Ae.cancel)return Ae.cancel(Se);if(Ae.destroy)return Ae.destroy(Se),await new Promise(setTimeout),Se}}function ae(Ae){const Se=new v;return(async()=>{const Ke=G(Se);try{await Ke.write(await Ae()),await Ke.close()}catch(Ae){await Ke.abort(Ae)}})(),Se}class se{constructor(Ae){if(void 0===Ae)throw Error("Invalid BigInteger input");if(Ae instanceof Uint8Array){const Se=Ae,Ke=Array(Se.length);for(let Ae=0;Ae<Se.length;Ae++){const qe=Se[Ae].toString(16);Ke[Ae]=Se[Ae]<=15?"0"+qe:qe}this.value=BigInt("0x0"+Ke.join(""))}else this.value=BigInt(Ae)}clone(){return new se(this.value)}iinc(){return this.value++,this}inc(){return this.clone().iinc()}idec(){return this.value--,this}dec(){return this.clone().idec()}iadd(Ae){return this.value+=Ae.value,this}add(Ae){return this.clone().iadd(Ae)}isub(Ae){return this.value-=Ae.value,this}sub(Ae){return this.clone().isub(Ae)}imul(Ae){return this.value*=Ae.value,this}mul(Ae){return this.clone().imul(Ae)}imod(Ae){return this.value%=Ae.value,this.isNegative()&&this.iadd(Ae),this}mod(Ae){return this.clone().imod(Ae)}modExp(Ae,Se){if(Se.isZero())throw Error("Modulo cannot be zero");if(Se.isOne())return new se(0);if(Ae.isNegative())throw Error("Unsopported negative exponent");let Ke=Ae.value,qe=this.value;qe%=Se.value;let Fe=BigInt(1);for(;Ke>BigInt(0);){const Ae=Ke&BigInt(1);Ke>>=BigInt(1);const $e=Fe*qe%Se.value;Fe=Ae?$e:Fe,qe=qe*qe%Se.value}return new se(Fe)}modInv(Ae){const{gcd:Se,x:Ke}=this._egcd(Ae);if(!Se.isOne())throw Error("Inverse does not exist");return Ke.add(Ae).mod(Ae)}_egcd(Ae){let Se=BigInt(0),Ke=BigInt(1),qe=BigInt(1),Fe=BigInt(0),$e=this.value;for(Ae=Ae.value;Ae!==BigInt(0);){const rt=$e/Ae;let it=Se;Se=qe-rt*Se,qe=it,it=Ke,Ke=Fe-rt*Ke,Fe=it,it=Ae,Ae=$e%Ae,$e=it}return{x:new se(qe),y:new se(Fe),gcd:new se($e)}}gcd(Ae){let Se=this.value;for(Ae=Ae.value;Ae!==BigInt(0);){const Ke=Ae;Ae=Se%Ae,Se=Ke}return new se(Se)}ileftShift(Ae){return this.value<<=Ae.value,this}leftShift(Ae){return this.clone().ileftShift(Ae)}irightShift(Ae){return this.value>>=Ae.value,this}rightShift(Ae){return this.clone().irightShift(Ae)}equal(Ae){return this.value===Ae.value}lt(Ae){return this.value<Ae.value}lte(Ae){return this.value<=Ae.value}gt(Ae){return this.value>Ae.value}gte(Ae){return this.value>=Ae.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.value<BigInt(0)}isEven(){return!(this.value&BigInt(1))}abs(){const Ae=this.clone();return this.isNegative()&&(Ae.value=-Ae.value),Ae}toString(){return this.value.toString()}toNumber(){const Ae=Number(this.value);if(Ae>Number.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return Ae}getBit(Ae){return(this.value>>BigInt(Ae)&BigInt(1))===BigInt(0)?0:1}bitLength(){const Ae=new se(0),Se=new se(1),Ke=new se(-1),qe=this.isNegative()?Ke:Ae;let Fe=1;const $e=this.clone();for(;!$e.irightShift(Se).equal(qe);)Fe++;return Fe}byteLength(){const Ae=new se(0),Se=new se(-1),Ke=this.isNegative()?Se:Ae,qe=new se(8);let Fe=1;const $e=this.clone();for(;!$e.irightShift(qe).equal(Ke);)Fe++;return Fe}toUint8Array(Ae="be",Se){let Ke=this.value.toString(16);Ke.length%2==1&&(Ke="0"+Ke);const qe=Ke.length/2,Fe=new Uint8Array(Se||qe),$e=Se?Se-qe:0;let rt=0;for(;rt<qe;)Fe[rt+$e]=parseInt(Ke.slice(2*rt,2*rt+2),16),rt++;return"be"!==Ae&&Fe.reverse(),Fe}}const oe=()=>"undefined"!=typeof BigInt;const rr=(()=>{try{return"development"===process.env.NODE_ENV}catch(Ae){}return!1})(),ir={isString:function(Ae){return"string"==typeof Ae||Ae instanceof String},isArray:function(Ae){return Ae instanceof Array},isUint8Array:P,isStream:E,readNumber:function(Ae){let Se=0;for(let Ke=0;Ke<Ae.length;Ke++)Se+=256**Ke*Ae[Ae.length-1-Ke];return Se},writeNumber:function(Ae,Se){const Ke=new Uint8Array(Se);for(let qe=0;qe<Se;qe++)Ke[qe]=Ae>>8*(Se-qe-1)&255;return Ke},readDate:function(Ae){const Se=ir.readNumber(Ae);return new Date(1e3*Se)},writeDate:function(Ae){const Se=Math.floor(Ae.getTime()/1e3);return ir.writeNumber(Se,4)},normalizeDate:function(Ae=Date.now()){return null===Ae||Ae===1/0?Ae:new Date(1e3*Math.floor(+Ae/1e3))},readMPI:function(Ae){const Se=(Ae[0]<<8|Ae[1])+7>>>3;return Ae.subarray(2,2+Se)},leftPad(Ae,Se){const Ke=new Uint8Array(Se),qe=Se-Ae.length;return Ke.set(Ae,qe),Ke},uint8ArrayToMPI:function(Ae){const Se=ir.uint8ArrayBitLength(Ae);if(0===Se)throw Error("Zero MPI");const Ke=Ae.subarray(Ae.length-Math.ceil(Se/8)),qe=new Uint8Array([(65280&Se)>>8,255&Se]);return ir.concatUint8Array([qe,Ke])},uint8ArrayBitLength:function(Ae){let Se;for(Se=0;Se<Ae.length&&0===Ae[Se];Se++);if(Se===Ae.length)return 0;const Ke=Ae.subarray(Se);return 8*(Ke.length-1)+ir.nbits(Ke[0])},hexToUint8Array:function(Ae){const Se=new Uint8Array(Ae.length>>1);for(let Ke=0;Ke<Ae.length>>1;Ke++)Se[Ke]=parseInt(Ae.substr(Ke<<1,2),16);return Se},uint8ArrayToHex:function(Ae){const Se=[],Ke=Ae.length;let qe,Fe=0;for(;Fe<Ke;){for(qe=Ae[Fe++].toString(16);qe.length<2;)qe="0"+qe;Se.push(""+qe)}return Se.join("")},stringToUint8Array:function(Ae){return Y(Ae,(Ae=>{if(!ir.isString(Ae))throw Error("stringToUint8Array: Data must be in the form of a string");const Se=new Uint8Array(Ae.length);for(let Ke=0;Ke<Ae.length;Ke++)Se[Ke]=Ae.charCodeAt(Ke);return Se}))},uint8ArrayToString:function(Ae){const Se=[],Ke=16384,qe=(Ae=new Uint8Array(Ae)).length;for(let Fe=0;Fe<qe;Fe+=Ke)Se.push(String.fromCharCode.apply(String,Ae.subarray(Fe,Fe+Ke<qe?Fe+Ke:qe)));return Se.join("")},encodeUTF8:function(Ae){const Se=new TextEncoder("utf-8");function r(Ae,Ke=!1){return Se.encode(Ae,{stream:!Ke})}return Y(Ae,r,(()=>r("",!0)))},decodeUTF8:function(Ae){const Se=new TextDecoder("utf-8");function r(Ae,Ke=!1){return Se.decode(Ae,{stream:!Ke})}return Y(Ae,r,(()=>r(new Uint8Array,!0)))},concat:W,concatUint8Array:x,equalsUint8Array:function(Ae,Se){if(!ir.isUint8Array(Ae)||!ir.isUint8Array(Se))throw Error("Data must be in the form of a Uint8Array");if(Ae.length!==Se.length)return!1;for(let Ke=0;Ke<Ae.length;Ke++)if(Ae[Ke]!==Se[Ke])return!1;return!0},writeChecksum:function(Ae){let Se=0;for(let Ke=0;Ke<Ae.length;Ke++)Se=Se+Ae[Ke]&65535;return ir.writeNumber(Se,2)},printDebug:function(Ae){rr&&console.log("[OpenPGP.js debug]",Ae)},printDebugError:function(Ae){rr&&console.error("[OpenPGP.js debug]",Ae)},nbits:function(Ae){let Se=1,Ke=Ae>>>16;return 0!==Ke&&(Ae=Ke,Se+=16),Ke=Ae>>8,0!==Ke&&(Ae=Ke,Se+=8),Ke=Ae>>4,0!==Ke&&(Ae=Ke,Se+=4),Ke=Ae>>2,0!==Ke&&(Ae=Ke,Se+=2),Ke=Ae>>1,0!==Ke&&(Ae=Ke,Se+=1),Se},double:function(Ae){const Se=new Uint8Array(Ae.length),Ke=Ae.length-1;for(let qe=0;qe<Ke;qe++)Se[qe]=Ae[qe]<<1^Ae[qe+1]>>7;return Se[Ke]=Ae[Ke]<<1^135*(Ae[0]>>7),Se},shiftRight:function(Ae,Se){if(Se)for(let Ke=Ae.length-1;Ke>=0;Ke--)Ae[Ke]>>=Se,Ke>0&&(Ae[Ke]|=Ae[Ke-1]<<8-Se);return Ae},getWebCrypto:function(){return void 0!==qe&&qe.crypto&&qe.crypto.subtle},getBigInteger:async function(){if(oe())return se;{const{default:Ae}=await Promise.resolve().then((function(){return am}));return Ae}},getNodeCrypto:function(){return yt.default},getNodeZlib:function(){return mt.default},getNodeBuffer:function(){return(ht.default||{}).Buffer},getHardwareConcurrency:function(){if("undefined"!=typeof navigator)return navigator.hardwareConcurrency||1;return vt.default.cpus().length},isEmailAddress:function(Ae){if(!ir.isString(Ae))return!1;return/^(([^<>()[\]\\.,;:\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,}|xn--[a-zA-Z\-0-9]+)))$/.test(Ae)},canonicalizeEOL:function(Ae){let Se=!1;return Y(Ae,(Ae=>{let Ke;Se&&(Ae=ir.concatUint8Array([new Uint8Array([13]),Ae])),13===Ae[Ae.length-1]?(Se=!0,Ae=Ae.subarray(0,-1)):Se=!1;const qe=[];for(let Se=0;Ke=Ae.indexOf(10,Se)+1,Ke;Se=Ke)13!==Ae[Ke-2]&&qe.push(Ke);if(!qe.length)return Ae;const Fe=new Uint8Array(Ae.length+qe.length);let $e=0;for(let Se=0;Se<qe.length;Se++){const Ke=Ae.subarray(qe[Se-1]||0,qe[Se]);Fe.set(Ke,$e),$e+=Ke.length,Fe[$e-1]=13,Fe[$e]=10,$e++}return Fe.set(Ae.subarray(qe[qe.length-1]||0),$e),Fe}),(()=>Se?new Uint8Array([13]):void 0))},nativeEOL:function(Ae){let Se=!1;return Y(Ae,(Ae=>{let Ke;13===(Ae=Se&&10!==Ae[0]?ir.concatUint8Array([new Uint8Array([13]),Ae]):new Uint8Array(Ae))[Ae.length-1]?(Se=!0,Ae=Ae.subarray(0,-1)):Se=!1;let qe=0;for(let Se=0;Se!==Ae.length;Se=Ke){Ke=Ae.indexOf(13,Se)+1,Ke||(Ke=Ae.length);const Fe=Ke-(10===Ae[Ke]?1:0);Se&&Ae.copyWithin(qe,Se,Fe),qe+=Fe-Se}return Ae.subarray(0,qe)}),(()=>Se?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(Ae){return Ae.split("\n").map((Ae=>{let Se=Ae.length-1;for(;Se>=0&&(" "===Ae[Se]||"\t"===Ae[Se]||"\r"===Ae[Se]);Se--);return Ae.substr(0,Se+1)})).join("\n")},wrapError:function(Ae,Se){if(!Se)return Error(Ae);try{Se.message=Ae+": "+Se.message}catch(Ae){}return Se},constructAllowedPackets:function(Ae){const Se={};return Ae.forEach((Ae=>{if(!Ae.tag)throw Error("Invalid input: expected a packet class");Se[Ae.tag]=Ae})),Se},anyPromise:function(Ae){return new Promise((async(Se,Ke)=>{let qe;await Promise.all(Ae.map((async Ae=>{try{Se(await Ae)}catch(Ae){qe=Ae}}))),Ke(qe)}))},selectUint8Array:function(Ae,Se,Ke){const qe=Math.max(Se.length,Ke.length),Fe=new Uint8Array(qe);let $e=0;for(let qe=0;qe<Fe.length;qe++)Fe[qe]=Se[qe]&256-Ae|Ke[qe]&255+Ae,$e+=Ae&qe<Se.length|1-Ae&qe<Ke.length;return Fe.subarray(0,$e)},selectUint8:function(Ae,Se,Ke){return Se&256-Ae|Ke&255+Ae}},nr=ir.getNodeBuffer();let sr,ar;function le(Ae){let Se=new Uint8Array;return Y(Ae,(Ae=>{Se=ir.concatUint8Array([Se,Ae]);const Ke=[],qe=Math.floor(Se.length/45),Fe=45*qe,$e=sr(Se.subarray(0,Fe));for(let Ae=0;Ae<qe;Ae++)Ke.push($e.substr(60*Ae,60)),Ke.push("\n");return Se=Se.subarray(Fe),Ke.join("")}),(()=>Se.length?sr(Se)+"\n":""))}function pe(Ae){let Se="";return Y(Ae,(Ae=>{Se+=Ae;let Ke=0;const qe=[" ","\t","\r","\n"];for(let Ae=0;Ae<qe.length;Ae++){const Fe=qe[Ae];for(let Ae=Se.indexOf(Fe);-1!==Ae;Ae=Se.indexOf(Fe,Ae+1))Ke++}let Fe=Se.length;for(;Fe>0&&(Fe-Ke)%4!=0;Fe--)qe.includes(Se[Fe])&&Ke--;const $e=ar(Se.substr(0,Fe));return Se=Se.substr(Fe),$e}),(()=>ar(Se)))}function ye(Ae){return pe(Ae.replace(/-/g,"+").replace(/_/g,"/"))}function be(Ae,Se){let Ke=le(Ae).replace(/[\r\n]/g,"");return Se&&(Ke=Ke.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),Ke}nr?(sr=Ae=>nr.from(Ae).toString("base64"),ar=Ae=>{const Se=nr.from(Ae,"base64");return new Uint8Array(Se.buffer,Se.byteOffset,Se.byteLength)}):(sr=Ae=>btoa(ir.uint8ArrayToString(Ae)),ar=Ae=>ir.stringToUint8Array(atob(Ae)));const cr=Symbol("byValue");var ur={curve:{p256:"p256","P-256":"p256",secp256r1:"p256",prime256v1:"p256","1.2.840.10045.3.1.7":"p256","2a8648ce3d030107":"p256","2A8648CE3D030107":"p256",p384:"p384","P-384":"p384",secp384r1:"p384","1.3.132.0.34":"p384","2b81040022":"p384","2B81040022":"p384",p521:"p521","P-521":"p521",secp521r1:"p521","1.3.132.0.35":"p521","2b81040023":"p521","2B81040023":"p521",secp256k1:"secp256k1","1.3.132.0.10":"secp256k1","2b8104000a":"secp256k1","2B8104000A":"secp256k1",ED25519:"ed25519",ed25519:"ed25519",Ed25519:"ed25519","1.3.6.1.4.1.11591.15.1":"ed25519","2b06010401da470f01":"ed25519","2B06010401DA470F01":"ed25519",X25519:"curve25519",cv25519:"curve25519",curve25519:"curve25519",Curve25519:"curve25519","1.3.6.1.4.1.3029.1.5.1":"curve25519","2b060104019755010501":"curve25519","2B060104019755010501":"curve25519",brainpoolP256r1:"brainpoolP256r1","1.3.36.3.3.2.8.1.1.7":"brainpoolP256r1","2b2403030208010107":"brainpoolP256r1","2B2403030208010107":"brainpoolP256r1",brainpoolP384r1:"brainpoolP384r1","1.3.36.3.3.2.8.1.1.11":"brainpoolP384r1","2b240303020801010b":"brainpoolP384r1","2B240303020801010B":"brainpoolP384r1",brainpoolP512r1:"brainpoolP512r1","1.3.36.3.3.2.8.1.1.13":"brainpoolP512r1","2b240303020801010d":"brainpoolP512r1","2B240303020801010D":"brainpoolP512r1"},s2k:{simple:0,salted:1,iterated:3,gnu:101},publicKey:{rsaEncryptSign:1,rsaEncrypt:2,rsaSign:3,elgamal:16,dsa:17,ecdh:18,ecdsa:19,eddsa:22,aedh:23,aedsa:24},symmetric:{plaintext:0,idea:1,tripledes:2,cast5:3,blowfish:4,aes128:7,aes192:8,aes256:9,twofish:10},compression:{uncompressed:0,zip:1,zlib:2,bzip2:3},hash:{md5:1,sha1:2,ripemd:3,sha256:8,sha384:9,sha512:10,sha224:11},webHash:{"SHA-1":2,"SHA-256":8,"SHA-384":9,"SHA-512":10},aead:{eax:1,ocb:2,experimentalGCM:100},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressedData:8,symmetricallyEncryptedData:9,marker:10,literalData:11,trust:12,userID:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtectedData:18,modificationDetectionCode:19,aeadEncryptedData:20},literal:{binary:98,text:116,utf8:117,mime:109},signature:{binary:0,text:1,standalone:2,certGeneric:16,certPersona:17,certCasual:18,certPositive:19,certRevocation:48,subkeyBinding:24,keyBinding:25,key:31,keyRevocation:32,subkeyRevocation:40,timestamp:64,thirdParty:80},signatureSubpacket:{signatureCreationTime:2,signatureExpirationTime:3,exportableCertification:4,trustSignature:5,regularExpression:6,revocable:7,keyExpirationTime:9,placeholderBackwardsCompatibility:10,preferredSymmetricAlgorithms:11,revocationKey:12,issuer:16,notationData:20,preferredHashAlgorithms:21,preferredCompressionAlgorithms:22,keyServerPreferences:23,preferredKeyServer:24,primaryUserID:25,policyURI:26,keyFlags:27,signersUserID:28,reasonForRevocation:29,features:30,signatureTarget:31,embeddedSignature:32,issuerFingerprint:33,preferredAEADAlgorithms:34},keyFlags:{certifyKeys:1,signData:2,encryptCommunication:4,encryptStorage:8,splitPrivateKey:16,authentication:32,sharedPrivateKey:128},armor:{multipartSection:0,multipartLast:1,signed:2,message:3,publicKey:4,privateKey:5,signature:6},reasonForRevocation:{noReason:0,keySuperseded:1,keyCompromised:2,keyRetired:3,userIDInvalid:32},features:{modificationDetection:1,aead:2,v5Keys:4},write:function(Ae,Se){if("number"==typeof Se&&(Se=this.read(Ae,Se)),void 0!==Ae[Se])return Ae[Se];throw Error("Invalid enum value.")},read:function(Ae,Se){if(Ae[cr]||(Ae[cr]=[],Object.entries(Ae).forEach((([Se,Ke])=>{Ae[cr][Ke]=Se}))),void 0!==Ae[cr][Se])return Ae[cr][Se];throw Error("Invalid enum value.")}},hr={preferredHashAlgorithm:ur.hash.sha256,preferredSymmetricAlgorithm:ur.symmetric.aes256,preferredCompressionAlgorithm:ur.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:ur.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([ur.symmetric.aes128,ur.symmetric.aes192,ur.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,additionalAllowedPackets:[],showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.8.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([ur.hash.md5,ur.hash.ripemd]),rejectMessageHashAlgorithms:new Set([ur.hash.md5,ur.hash.ripemd,ur.hash.sha1]),rejectPublicKeyAlgorithms:new Set([ur.publicKey.elgamal,ur.publicKey.dsa]),rejectCurves:new Set([ur.curve.secp256k1])};function ve(Ae){const Se=Ae.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!Se)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(Se[1])?ur.armor.multipartSection:/MESSAGE, PART \d+/.test(Se[1])?ur.armor.multipartLast:/SIGNED MESSAGE/.test(Se[1])?ur.armor.signed:/MESSAGE/.test(Se[1])?ur.armor.message:/PUBLIC KEY BLOCK/.test(Se[1])?ur.armor.publicKey:/PRIVATE KEY BLOCK/.test(Se[1])?ur.armor.privateKey:/SIGNATURE/.test(Se[1])?ur.armor.signature:void 0}function _e(Ae,Se){let Ke="";return Se.showVersion&&(Ke+="Version: "+Se.versionString+"\n"),Se.showComment&&(Ke+="Comment: "+Se.commentString+"\n"),Ae&&(Ke+="Comment: "+Ae+"\n"),Ke+="\n",Ke}function ke(Ae){return le(function(Ae){let Se=13501623;return Y(Ae,(Ae=>{const Ke=lr?Math.floor(Ae.length/4):0,qe=new Uint32Array(Ae.buffer,Ae.byteOffset,Ke);for(let Ae=0;Ae<Ke;Ae++)Se^=qe[Ae],Se=fr[0][Se>>24&255]^fr[1][Se>>16&255]^fr[2][Se>>8&255]^fr[3][Se>>0&255];for(let qe=4*Ke;qe<Ae.length;qe++)Se=Se>>8^fr[0][255&Se^Ae[qe]]}),(()=>new Uint8Array([Se,Se>>8,Se>>16])))}(Ae))}const fr=[Array(255),Array(255),Array(255),Array(255)];for(let Ae=0;Ae<=255;Ae++){let Se=Ae<<16;for(let Ae=0;Ae<8;Ae++)Se=Se<<1^(0!=(8388608&Se)?8801531:0);fr[0][Ae]=(16711680&Se)>>16|65280&Se|(255&Se)<<16}for(let Ae=0;Ae<=255;Ae++)fr[1][Ae]=fr[0][Ae]>>8^fr[0][255&fr[0][Ae]];for(let Ae=0;Ae<=255;Ae++)fr[2][Ae]=fr[1][Ae]>>8^fr[0][255&fr[1][Ae]];for(let Ae=0;Ae<=255;Ae++)fr[3][Ae]=fr[2][Ae]>>8^fr[0][255&fr[2][Ae]];const lr=function(){const Ae=new ArrayBuffer(2);return new DataView(Ae).setInt16(0,255,!0),255===new Int16Array(Ae)[0]}();function Ee(Ae){for(let Se=0;Se<Ae.length;Se++)/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(Ae[Se])||ir.printDebugError(Error("Improperly formatted armor header: "+Ae[Se])),/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(Ae[Se])||ir.printDebugError(Error("Unknown header: "+Ae[Se]))}function Pe(Ae){let Se=Ae,Ke="";const qe=Ae.lastIndexOf("=");return qe>=0&&qe!==Ae.length-1&&(Se=Ae.slice(0,qe),Ke=Ae.slice(qe+1).substr(0,4)),{body:Se,checksum:Ke}}function xe(Ae,Se=hr){return new Promise((async(Ke,qe)=>{try{const Fe=/^-----[^-]+-----$/m,$e=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let rt;const it=[];let nt,st,ut,ht=it,ft=[],yt=pe(X(Ae,(async(Ae,Se)=>{const mt=H(Ae);try{for(;;){let Ae=await mt.readLine();if(void 0===Ae)throw Error("Misformed armored text");if(Ae=ir.removeTrailingSpaces(Ae.replace(/[\r\n]/g,"")),rt)if(nt)st||2!==rt||(Fe.test(Ae)?(ft=ft.join("\r\n"),st=!0,Ee(ht),ht=[],nt=!1):ft.push(Ae.replace(/^- /,"")));else if(Fe.test(Ae)&&qe(Error("Mandatory blank line missing between armor headers and armor data")),$e.test(Ae)){if(Ee(ht),nt=!0,st||2!==rt){Ke({text:ft,data:yt,headers:it,type:rt});break}}else ht.push(Ae);else Fe.test(Ae)&&(rt=ve(Ae))}}catch(Ae){return void qe(Ae)}const vt=G(Se);try{for(;;){await vt.ready;const{done:Ae,value:Se}=await mt.read();if(Ae)throw Error("Misformed armored text");const Ke=Se+"";if(-1!==Ke.indexOf("=")||-1!==Ke.indexOf("-")){let Ae=await mt.readToEnd();Ae.length||(Ae=""),Ae=Ke+Ae,Ae=ir.removeTrailingSpaces(Ae.replace(/\r/g,""));const Se=Ae.split(Fe);if(1===Se.length)throw Error("Misformed armored text");const qe=Pe(Se[0].slice(0,-1));ut=qe.checksum,await vt.write(qe.body);break}await vt.write(Ke)}await vt.ready,await vt.close()}catch(Ae){await vt.abort(Ae)}})));yt=X(yt,(async(Ae,Ke)=>{const qe=ie(ke(ee(Ae)));qe.catch((()=>{})),await V(Ae,Ke,{preventClose:!0});const Fe=G(Ke);try{const Ae=(await qe).replace("\n","");if(ut!==Ae&&(ut||Se.checksumRequired))throw Error("Ascii armor integrity check failed");await Fe.ready,await Fe.close()}catch(Ae){await Fe.abort(Ae)}}))}catch(Ae){qe(Ae)}})).then((async Ae=>(_(Ae.data)&&(Ae.data=await ie(Ae.data)),Ae)))}function Me(Ae,Se,Ke,qe,Fe,$e=hr){let rt,it;Ae===ur.armor.signed&&(rt=Se.text,it=Se.hash,Se=Se.data);const nt=ee(Se),st=[];switch(Ae){case ur.armor.multipartSection:st.push("-----BEGIN PGP MESSAGE, PART "+Ke+"/"+qe+"-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP MESSAGE, PART "+Ke+"/"+qe+"-----\n");break;case ur.armor.multipartLast:st.push("-----BEGIN PGP MESSAGE, PART "+Ke+"-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP MESSAGE, PART "+Ke+"-----\n");break;case ur.armor.signed:st.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),st.push("Hash: "+it+"\n\n"),st.push(rt.replace(/^-/gm,"- -")),st.push("\n-----BEGIN PGP SIGNATURE-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP SIGNATURE-----\n");break;case ur.armor.message:st.push("-----BEGIN PGP MESSAGE-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP MESSAGE-----\n");break;case ur.armor.publicKey:st.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case ur.armor.privateKey:st.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case ur.armor.signature:st.push("-----BEGIN PGP SIGNATURE-----\n"),st.push(_e(Fe,$e)),st.push(le(Se)),st.push("=",ke(nt)),st.push("-----END PGP SIGNATURE-----\n")}return ir.concat(st)}class Ce{constructor(){this.bytes=""}read(Ae){this.bytes=ir.uint8ArrayToString(Ae.subarray(0,8))}write(){return ir.stringToUint8Array(this.bytes)}toHex(){return ir.uint8ArrayToHex(ir.stringToUint8Array(this.bytes))}equals(Ae,Se=!1){return Se&&(Ae.isWildcard()||this.isWildcard())||this.bytes===Ae.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(Ae){return Ae.toHex()}static fromID(Ae){const Se=new Ce;return Se.read(ir.hexToUint8Array(Ae)),Se}static wildcard(){const Ae=new Ce;return Ae.read(new Uint8Array(8)),Ae}}var dr=function(){var Ae,Se,Ke=!1;function i(Ke,qe){var Fe=Ae[(Se[Ke]+Se[qe])%255];return 0!==Ke&&0!==qe||(Fe=0),Fe}var qe,Fe,$e,rt,it=!1;function u(){function u(Ke){var qe,Fe,$e;for(Fe=$e=function(Ke){var qe=Ae[255-Se[Ke]];return 0===Ke&&(qe=0),qe}(Ke),qe=0;qe<4;qe++)$e^=Fe=255&(Fe<<1|Fe>>>7);return $e^=99}Ke||function(){Ae=[],Se=[];var qe,Fe,$e=1;for(qe=0;qe<255;qe++)Ae[qe]=$e,Fe=128&$e,$e<<=1,$e&=255,128===Fe&&($e^=27),$e^=Ae[qe],Se[Ae[qe]]=qe;Ae[255]=Ae[0],Se[0]=0,Ke=!0}(),qe=[],Fe=[],$e=[[],[],[],[]],rt=[[],[],[],[]];for(var nt=0;nt<256;nt++){var st=u(nt);qe[nt]=st,Fe[st]=nt,$e[0][nt]=i(2,st)<<24|st<<16|st<<8|i(3,st),rt[0][st]=i(14,nt)<<24|i(9,nt)<<16|i(13,nt)<<8|i(11,nt);for(var ut=1;ut<4;ut++)$e[ut][nt]=$e[ut-1][nt]>>>8|$e[ut-1][nt]<<24,rt[ut][st]=rt[ut-1][st]>>>8|rt[ut-1][st]<<24}it=!0}var h=function(Ae,Se){it||u();var Ke=new Uint32Array(Se);Ke.set(qe,512),Ke.set(Fe,768);for(var nt=0;nt<4;nt++)Ke.set($e[nt],4096+1024*nt>>2),Ke.set(rt[nt],8192+1024*nt>>2);var st=function(Ae,Se,Ke){"use asm";var qe=0,Fe=0,$e=0,rt=0,it=0,nt=0,st=0,ut=0,ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,jt=0;var Ft=new Ae.Uint32Array(Ke),Lt=new Ae.Uint8Array(Ke);function P(Ae,Se,Ke,it,nt,st,ut,ht){Ae=Ae|0;Se=Se|0;Ke=Ke|0;it=it|0;nt=nt|0;st=st|0;ut=ut|0;ht=ht|0;var ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0;ft=Ke|0x400,yt=Ke|0x800,mt=Ke|0xc00;nt=nt^Ft[(Ae|0)>>2],st=st^Ft[(Ae|4)>>2],ut=ut^Ft[(Ae|8)>>2],ht=ht^Ft[(Ae|12)>>2];for(It=16;(It|0)<=it<<4;It=It+16|0){vt=Ft[(Ke|nt>>22&1020)>>2]^Ft[(ft|st>>14&1020)>>2]^Ft[(yt|ut>>6&1020)>>2]^Ft[(mt|ht<<2&1020)>>2]^Ft[(Ae|It|0)>>2],_t=Ft[(Ke|st>>22&1020)>>2]^Ft[(ft|ut>>14&1020)>>2]^Ft[(yt|ht>>6&1020)>>2]^Ft[(mt|nt<<2&1020)>>2]^Ft[(Ae|It|4)>>2],Rt=Ft[(Ke|ut>>22&1020)>>2]^Ft[(ft|ht>>14&1020)>>2]^Ft[(yt|nt>>6&1020)>>2]^Ft[(mt|st<<2&1020)>>2]^Ft[(Ae|It|8)>>2],Kt=Ft[(Ke|ht>>22&1020)>>2]^Ft[(ft|nt>>14&1020)>>2]^Ft[(yt|st>>6&1020)>>2]^Ft[(mt|ut<<2&1020)>>2]^Ft[(Ae|It|12)>>2];nt=vt,st=_t,ut=Rt,ht=Kt}qe=Ft[(Se|nt>>22&1020)>>2]<<24^Ft[(Se|st>>14&1020)>>2]<<16^Ft[(Se|ut>>6&1020)>>2]<<8^Ft[(Se|ht<<2&1020)>>2]^Ft[(Ae|It|0)>>2],Fe=Ft[(Se|st>>22&1020)>>2]<<24^Ft[(Se|ut>>14&1020)>>2]<<16^Ft[(Se|ht>>6&1020)>>2]<<8^Ft[(Se|nt<<2&1020)>>2]^Ft[(Ae|It|4)>>2],$e=Ft[(Se|ut>>22&1020)>>2]<<24^Ft[(Se|ht>>14&1020)>>2]<<16^Ft[(Se|nt>>6&1020)>>2]<<8^Ft[(Se|st<<2&1020)>>2]^Ft[(Ae|It|8)>>2],rt=Ft[(Se|ht>>22&1020)>>2]<<24^Ft[(Se|nt>>14&1020)>>2]<<16^Ft[(Se|st>>6&1020)>>2]<<8^Ft[(Se|ut<<2&1020)>>2]^Ft[(Ae|It|12)>>2]}function x(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;P(0x0000,0x0800,0x1000,jt,Ae,Se,Ke,qe)}function M(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;var $e=0;P(0x0400,0x0c00,0x2000,jt,Ae,qe,Ke,Se);$e=Fe,Fe=rt,rt=$e}function C(Ae,Se,Ke,ht){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;P(0x0000,0x0800,0x1000,jt,it^Ae,nt^Se,st^Ke,ut^ht);it=qe,nt=Fe,st=$e,ut=rt}function K(Ae,Se,Ke,ht){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;var ft=0;P(0x0400,0x0c00,0x2000,jt,Ae,ht,Ke,Se);ft=Fe,Fe=rt,rt=ft;qe=qe^it,Fe=Fe^nt,$e=$e^st,rt=rt^ut;it=Ae,nt=Se,st=Ke,ut=ht}function D(Ae,Se,Ke,ht){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;P(0x0000,0x0800,0x1000,jt,it,nt,st,ut);it=qe=qe^Ae,nt=Fe=Fe^Se,st=$e=$e^Ke,ut=rt=rt^ht}function R(Ae,Se,Ke,ht){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;P(0x0000,0x0800,0x1000,jt,it,nt,st,ut);qe=qe^Ae,Fe=Fe^Se,$e=$e^Ke,rt=rt^ht;it=Ae,nt=Se,st=Ke,ut=ht}function U(Ae,Se,Ke,ht){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;P(0x0000,0x0800,0x1000,jt,it,nt,st,ut);it=qe,nt=Fe,st=$e,ut=rt;qe=qe^Ae,Fe=Fe^Se,$e=$e^Ke,rt=rt^ht}function I(Ae,Se,Ke,it){Ae=Ae|0;Se=Se|0;Ke=Ke|0;it=it|0;P(0x0000,0x0800,0x1000,jt,ht,ft,yt,mt);mt=~Kt&mt|Kt&mt+1;yt=~Rt&yt|Rt&yt+((mt|0)==0);ft=~_t&ft|_t&ft+((yt|0)==0);ht=~vt&ht|vt&ht+((ft|0)==0);qe=qe^Ae;Fe=Fe^Se;$e=$e^Ke;rt=rt^it}function B(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;var Fe=0,$e=0,rt=0,ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0;Ae=Ae^it,Se=Se^nt,Ke=Ke^st,qe=qe^ut;Fe=It|0,$e=Ut|0,rt=Ot|0,ht=Nt|0;for(;(_t|0)<128;_t=_t+1|0){if(Fe>>>31){ft=ft^Ae,yt=yt^Se,mt=mt^Ke,vt=vt^qe}Fe=Fe<<1|$e>>>31,$e=$e<<1|rt>>>31,rt=rt<<1|ht>>>31,ht=ht<<1;Rt=qe&1;qe=qe>>>1|Ke<<31,Ke=Ke>>>1|Se<<31,Se=Se>>>1|Ae<<31,Ae=Ae>>>1;if(Rt)Ae=Ae^0xe1000000}it=ft,nt=yt,st=mt,ut=vt}function T(Ae){Ae=Ae|0;jt=Ae}function z(Ae,Se,Ke,it){Ae=Ae|0;Se=Se|0;Ke=Ke|0;it=it|0;qe=Ae,Fe=Se,$e=Ke,rt=it}function q(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;it=Ae,nt=Se,st=Ke,ut=qe}function F(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;ht=Ae,ft=Se,yt=Ke,mt=qe}function O(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;vt=Ae,_t=Se,Rt=Ke,Kt=qe}function N(Ae,Se,Ke,qe){Ae=Ae|0;Se=Se|0;Ke=Ke|0;qe=qe|0;mt=~Kt&mt|Kt&qe,yt=~Rt&yt|Rt&Ke,ft=~_t&ft|_t&Se,ht=~vt&ht|vt&Ae}function j(Ae){Ae=Ae|0;if(Ae&15)return-1;Lt[Ae|0]=qe>>>24,Lt[Ae|1]=qe>>>16&255,Lt[Ae|2]=qe>>>8&255,Lt[Ae|3]=qe&255,Lt[Ae|4]=Fe>>>24,Lt[Ae|5]=Fe>>>16&255,Lt[Ae|6]=Fe>>>8&255,Lt[Ae|7]=Fe&255,Lt[Ae|8]=$e>>>24,Lt[Ae|9]=$e>>>16&255,Lt[Ae|10]=$e>>>8&255,Lt[Ae|11]=$e&255,Lt[Ae|12]=rt>>>24,Lt[Ae|13]=rt>>>16&255,Lt[Ae|14]=rt>>>8&255,Lt[Ae|15]=rt&255;return 16}function L(Ae){Ae=Ae|0;if(Ae&15)return-1;Lt[Ae|0]=it>>>24,Lt[Ae|1]=it>>>16&255,Lt[Ae|2]=it>>>8&255,Lt[Ae|3]=it&255,Lt[Ae|4]=nt>>>24,Lt[Ae|5]=nt>>>16&255,Lt[Ae|6]=nt>>>8&255,Lt[Ae|7]=nt&255,Lt[Ae|8]=st>>>24,Lt[Ae|9]=st>>>16&255,Lt[Ae|10]=st>>>8&255,Lt[Ae|11]=st&255,Lt[Ae|12]=ut>>>24,Lt[Ae|13]=ut>>>16&255,Lt[Ae|14]=ut>>>8&255,Lt[Ae|15]=ut&255;return 16}function W(){x(0,0,0,0);It=qe,Ut=Fe,Ot=$e,Nt=rt}function H(Ae,Se,Ke){Ae=Ae|0;Se=Se|0;Ke=Ke|0;var it=0;if(Se&15)return-1;while((Ke|0)>=16){Ht[Ae&7](Lt[Se|0]<<24|Lt[Se|1]<<16|Lt[Se|2]<<8|Lt[Se|3],Lt[Se|4]<<24|Lt[Se|5]<<16|Lt[Se|6]<<8|Lt[Se|7],Lt[Se|8]<<24|Lt[Se|9]<<16|Lt[Se|10]<<8|Lt[Se|11],Lt[Se|12]<<24|Lt[Se|13]<<16|Lt[Se|14]<<8|Lt[Se|15]);Lt[Se|0]=qe>>>24,Lt[Se|1]=qe>>>16&255,Lt[Se|2]=qe>>>8&255,Lt[Se|3]=qe&255,Lt[Se|4]=Fe>>>24,Lt[Se|5]=Fe>>>16&255,Lt[Se|6]=Fe>>>8&255,Lt[Se|7]=Fe&255,Lt[Se|8]=$e>>>24,Lt[Se|9]=$e>>>16&255,Lt[Se|10]=$e>>>8&255,Lt[Se|11]=$e&255,Lt[Se|12]=rt>>>24,Lt[Se|13]=rt>>>16&255,Lt[Se|14]=rt>>>8&255,Lt[Se|15]=rt&255;it=it+16|0,Se=Se+16|0,Ke=Ke-16|0}return it|0}function G(Ae,Se,Ke){Ae=Ae|0;Se=Se|0;Ke=Ke|0;var qe=0;if(Se&15)return-1;while((Ke|0)>=16){Wt[Ae&1](Lt[Se|0]<<24|Lt[Se|1]<<16|Lt[Se|2]<<8|Lt[Se|3],Lt[Se|4]<<24|Lt[Se|5]<<16|Lt[Se|6]<<8|Lt[Se|7],Lt[Se|8]<<24|Lt[Se|9]<<16|Lt[Se|10]<<8|Lt[Se|11],Lt[Se|12]<<24|Lt[Se|13]<<16|Lt[Se|14]<<8|Lt[Se|15]);qe=qe+16|0,Se=Se+16|0,Ke=Ke-16|0}return qe|0}var Ht=[x,M,C,K,D,R,U,I];var Wt=[C,B];return{set_rounds:T,set_state:z,set_iv:q,set_nonce:F,set_mask:O,set_counter:N,get_state:j,get_iv:L,gcm_init:W,cipher:H,mac:G}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},Ae,Se);return st.set_key=function(Ae,Se,Fe,$e,it,nt,ut,ht,ft){var yt=Ke.subarray(0,60),mt=Ke.subarray(256,316);yt.set([Se,Fe,$e,it,nt,ut,ht,ft]);for(var vt=Ae,_t=1;vt<4*Ae+28;vt++){var Rt=yt[vt-1];(vt%Ae==0||8===Ae&&vt%Ae==4)&&(Rt=qe[Rt>>>24]<<24^qe[Rt>>>16&255]<<16^qe[Rt>>>8&255]<<8^qe[255&Rt]),vt%Ae==0&&(Rt=Rt<<8^Rt>>>24^_t<<24,_t=_t<<1^(128&_t?27:0)),yt[vt]=yt[vt-Ae]^Rt}for(var Kt=0;Kt<vt;Kt+=4)for(var It=0;It<4;It++){Rt=yt[vt-(4+Kt)+(4-It)%4];mt[Kt+It]=Kt<4||Kt>=vt-4?Rt:rt[0][qe[Rt>>>24]]^rt[1][qe[Rt>>>16&255]]^rt[2][qe[Rt>>>8&255]]^rt[3][qe[255&Rt]]}st.set_rounds(Ae+5)},st};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 De(Ae){return Ae instanceof Uint8Array}function Re(Ae,Se){const Ke=Ae?Ae.byteLength:Se||65536;if(4095&Ke||Ke<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return Ae=Ae||new Uint8Array(new ArrayBuffer(Ke))}function Ue(Ae,Se,Ke,qe,Fe){const $e=Ae.length-Se,rt=$e<Fe?$e:Fe;return Ae.set(Ke.subarray(qe,qe+rt),Se),rt}function Ie(...Ae){const Se=Ae.reduce(((Ae,Se)=>Ae+Se.length),0),Ke=new Uint8Array(Se);let qe=0;for(let Se=0;Se<Ae.length;Se++)Ke.set(Ae[Se],qe),qe+=Ae[Se].length;return Ke}class Be extends Error{constructor(...Ae){super(...Ae)}}class Te extends Error{constructor(...Ae){super(...Ae)}}class ze extends Error{constructor(...Ae){super(...Ae)}}const yr=[],Cr=[];class Oe{constructor(Ae,Se,Ke=!0,qe,Fe,$e){this.pos=0,this.len=0,this.mode=qe,this.pos=0,this.len=0,this.key=Ae,this.iv=Se,this.padding=Ke,this.acquire_asm(Fe,$e)}acquire_asm(Ae,Se){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Ae||yr.pop()||Re().subarray(dr.HEAP_DATA),this.asm=Se||Cr.pop()||new dr(null,this.heap.buffer),this.reset(this.key,this.iv)),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(yr.push(this.heap),Cr.push(this.asm)),this.heap=void 0,this.asm=void 0}reset(Ae,Se){const{asm:Ke}=this.acquire_asm(),qe=Ae.length;if(16!==qe&&24!==qe&&32!==qe)throw new Te("illegal key size");const Fe=new DataView(Ae.buffer,Ae.byteOffset,Ae.byteLength);if(Ke.set_key(qe>>2,Fe.getUint32(0),Fe.getUint32(4),Fe.getUint32(8),Fe.getUint32(12),qe>16?Fe.getUint32(16):0,qe>16?Fe.getUint32(20):0,qe>24?Fe.getUint32(24):0,qe>24?Fe.getUint32(28):0),void 0!==Se){if(16!==Se.length)throw new Te("illegal iv size");let Ae=new DataView(Se.buffer,Se.byteOffset,Se.byteLength);Ke.set_iv(Ae.getUint32(0),Ae.getUint32(4),Ae.getUint32(8),Ae.getUint32(12))}else Ke.set_iv(0,0,0,0)}AES_Encrypt_process(Ae){if(!De(Ae))throw new TypeError("data isn't of expected type");let{heap:Se,asm:Ke}=this.acquire_asm(),qe=dr.ENC[this.mode],Fe=dr.HEAP_DATA,$e=this.pos,rt=this.len,it=0,nt=Ae.length||0,st=0,ut=0,ht=new Uint8Array(rt+nt&-16);for(;nt>0;)ut=Ue(Se,$e+rt,Ae,it,nt),rt+=ut,it+=ut,nt-=ut,ut=Ke.cipher(qe,Fe+$e,rt),ut&&ht.set(Se.subarray($e,$e+ut),st),st+=ut,ut<rt?($e+=ut,rt-=ut):($e=0,rt=0);return this.pos=$e,this.len=rt,ht}AES_Encrypt_finish(){let{heap:Ae,asm:Se}=this.acquire_asm(),Ke=dr.ENC[this.mode],qe=dr.HEAP_DATA,Fe=this.pos,$e=this.len,rt=16-$e%16,it=$e;if(this.hasOwnProperty("padding")){if(this.padding){for(let Se=0;Se<rt;++Se)Ae[Fe+$e+Se]=rt;$e+=rt,it=$e}else if($e%16)throw new Te("data length must be a multiple of the block size")}else $e+=rt;const nt=new Uint8Array(it);return $e&&Se.cipher(Ke,qe+Fe,$e),it&&nt.set(Ae.subarray(Fe,Fe+it)),this.pos=0,this.len=0,this.release_asm(),nt}AES_Decrypt_process(Ae){if(!De(Ae))throw new TypeError("data isn't of expected type");let{heap:Se,asm:Ke}=this.acquire_asm(),qe=dr.DEC[this.mode],Fe=dr.HEAP_DATA,$e=this.pos,rt=this.len,it=0,nt=Ae.length||0,st=0,ut=rt+nt&-16,ht=0,ft=0;this.padding&&(ht=rt+nt-ut||16,ut-=ht);const yt=new Uint8Array(ut);for(;nt>0;)ft=Ue(Se,$e+rt,Ae,it,nt),rt+=ft,it+=ft,nt-=ft,ft=Ke.cipher(qe,Fe+$e,rt-(nt?0:ht)),ft&&yt.set(Se.subarray($e,$e+ft),st),st+=ft,ft<rt?($e+=ft,rt-=ft):($e=0,rt=0);return this.pos=$e,this.len=rt,yt}AES_Decrypt_finish(){let{heap:Ae,asm:Se}=this.acquire_asm(),Ke=dr.DEC[this.mode],qe=dr.HEAP_DATA,Fe=this.pos,$e=this.len,rt=$e;if($e>0){if($e%16){if(this.hasOwnProperty("padding"))throw new Te("data length must be a multiple of the block size");$e+=16-$e%16}if(Se.cipher(Ke,qe+Fe,$e),this.hasOwnProperty("padding")&&this.padding){let Se=Ae[Fe+rt-1];if(Se<1||Se>16||Se>rt)throw new ze("bad padding");let Ke=0;for(let qe=Se;qe>1;qe--)Ke|=Se^Ae[Fe+rt-qe];if(Ke)throw new ze("bad padding");rt-=Se}}const it=new Uint8Array(rt);return rt>0&&it.set(Ae.subarray(Fe,Fe+rt)),this.pos=0,this.len=0,this.release_asm(),it}}class Ne{static encrypt(Ae,Se,Ke=!1){return new Ne(Se,Ke).encrypt(Ae)}static decrypt(Ae,Se,Ke=!1){return new Ne(Se,Ke).decrypt(Ae)}constructor(Ae,Se=!1,Ke){this.aes=Ke||new Oe(Ae,void 0,Se,"ECB")}encrypt(Ae){return Ie(this.aes.AES_Encrypt_process(Ae),this.aes.AES_Encrypt_finish())}decrypt(Ae){return Ie(this.aes.AES_Decrypt_process(Ae),this.aes.AES_Decrypt_finish())}}function je(Ae){const t=function(Ae){const Se=new Ne(Ae);this.encrypt=function(Ae){return Se.encrypt(Ae)},this.decrypt=function(Ae){return Se.decrypt(Ae)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=Ae/8,t}function Le(Ae,Se,Ke,qe,Fe,$e){const rt=[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],it=[-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],nt=[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],st=[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],ut=[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],ht=[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],ft=[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],yt=[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 mt,vt,_t,Rt,Kt,It,Ut,Ot,Nt,jt,Ft,Lt,Ht,Wt,Gt=0,$t=Se.length;const Yt=32===Ae.length?3:9;Ot=3===Yt?Ke?[0,32,2]:[30,-2,-2]:Ke?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],Ke&&(Se=function(Ae,Se){const Ke=8-Ae.length%8;let qe;if(2===Se&&Ke<8)qe=32;else if(1===Se)qe=Ke;else{if(Se||!(Ke<8)){if(8===Ke)return Ae;throw Error("des: invalid padding")}qe=0}const Fe=new Uint8Array(Ae.length+Ke);for(let Se=0;Se<Ae.length;Se++)Fe[Se]=Ae[Se];for(let Se=0;Se<Ke;Se++)Fe[Ae.length+Se]=qe;return Fe}(Se,$e),$t=Se.length);let Vt=new Uint8Array($t),Zt=0;for(1===qe&&(Nt=Fe[Gt++]<<24|Fe[Gt++]<<16|Fe[Gt++]<<8|Fe[Gt++],Ft=Fe[Gt++]<<24|Fe[Gt++]<<16|Fe[Gt++]<<8|Fe[Gt++],Gt=0);Gt<$t;){for(It=Se[Gt++]<<24|Se[Gt++]<<16|Se[Gt++]<<8|Se[Gt++],Ut=Se[Gt++]<<24|Se[Gt++]<<16|Se[Gt++]<<8|Se[Gt++],1===qe&&(Ke?(It^=Nt,Ut^=Ft):(jt=Nt,Lt=Ft,Nt=It,Ft=Ut)),_t=252645135&(It>>>4^Ut),Ut^=_t,It^=_t<<4,_t=65535&(It>>>16^Ut),Ut^=_t,It^=_t<<16,_t=858993459&(Ut>>>2^It),It^=_t,Ut^=_t<<2,_t=16711935&(Ut>>>8^It),It^=_t,Ut^=_t<<8,_t=1431655765&(It>>>1^Ut),Ut^=_t,It^=_t<<1,It=It<<1|It>>>31,Ut=Ut<<1|Ut>>>31,vt=0;vt<Yt;vt+=3){for(Ht=Ot[vt+1],Wt=Ot[vt+2],mt=Ot[vt];mt!==Ht;mt+=Wt)Rt=Ut^Ae[mt],Kt=(Ut>>>4|Ut<<28)^Ae[mt+1],_t=It,It=Ut,Ut=_t^(it[Rt>>>24&63]|st[Rt>>>16&63]|ht[Rt>>>8&63]|yt[63&Rt]|rt[Kt>>>24&63]|nt[Kt>>>16&63]|ut[Kt>>>8&63]|ft[63&Kt]);_t=It,It=Ut,Ut=_t}It=It>>>1|It<<31,Ut=Ut>>>1|Ut<<31,_t=1431655765&(It>>>1^Ut),Ut^=_t,It^=_t<<1,_t=16711935&(Ut>>>8^It),It^=_t,Ut^=_t<<8,_t=858993459&(Ut>>>2^It),It^=_t,Ut^=_t<<2,_t=65535&(It>>>16^Ut),Ut^=_t,It^=_t<<16,_t=252645135&(It>>>4^Ut),Ut^=_t,It^=_t<<4,1===qe&&(Ke?(Nt=It,Ft=Ut):(It^=jt,Ut^=Lt)),Vt[Zt++]=It>>>24,Vt[Zt++]=It>>>16&255,Vt[Zt++]=It>>>8&255,Vt[Zt++]=255&It,Vt[Zt++]=Ut>>>24,Vt[Zt++]=Ut>>>16&255,Vt[Zt++]=Ut>>>8&255,Vt[Zt++]=255&Ut}return Ke||(Vt=function(Ae,Se){let Ke,qe=null;if(2===Se)Ke=32;else if(1===Se)qe=Ae[Ae.length-1];else{if(Se)throw Error("des: invalid padding");Ke=0}if(!qe){for(qe=1;Ae[Ae.length-qe]===Ke;)qe++;qe--}return Ae.subarray(0,Ae.length-qe)}(Vt,$e)),Vt}function We(Ae){const Se=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],Ke=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],qe=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],Fe=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],$e=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],rt=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],it=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],nt=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],st=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],ut=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],ht=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],ft=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],yt=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],mt=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],vt=Ae.length>8?3:1,_t=Array(32*vt),Rt=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let Kt,It,Ut,Ot=0,Nt=0;for(let jt=0;jt<vt;jt++){let vt=Ae[Ot++]<<24|Ae[Ot++]<<16|Ae[Ot++]<<8|Ae[Ot++],jt=Ae[Ot++]<<24|Ae[Ot++]<<16|Ae[Ot++]<<8|Ae[Ot++];Ut=252645135&(vt>>>4^jt),jt^=Ut,vt^=Ut<<4,Ut=65535&(jt>>>-16^vt),vt^=Ut,jt^=Ut<<-16,Ut=858993459&(vt>>>2^jt),jt^=Ut,vt^=Ut<<2,Ut=65535&(jt>>>-16^vt),vt^=Ut,jt^=Ut<<-16,Ut=1431655765&(vt>>>1^jt),jt^=Ut,vt^=Ut<<1,Ut=16711935&(jt>>>8^vt),vt^=Ut,jt^=Ut<<8,Ut=1431655765&(vt>>>1^jt),jt^=Ut,vt^=Ut<<1,Ut=vt<<8|jt>>>20&240,vt=jt<<24|jt<<8&16711680|jt>>>8&65280|jt>>>24&240,jt=Ut;for(let Ae=0;Ae<16;Ae++)Rt[Ae]?(vt=vt<<2|vt>>>26,jt=jt<<2|jt>>>26):(vt=vt<<1|vt>>>27,jt=jt<<1|jt>>>27),vt&=-15,jt&=-15,Kt=Se[vt>>>28]|Ke[vt>>>24&15]|qe[vt>>>20&15]|Fe[vt>>>16&15]|$e[vt>>>12&15]|rt[vt>>>8&15]|it[vt>>>4&15],It=nt[jt>>>28]|st[jt>>>24&15]|ut[jt>>>20&15]|ht[jt>>>16&15]|ft[jt>>>12&15]|yt[jt>>>8&15]|mt[jt>>>4&15],Ut=65535&(It>>>16^Kt),_t[Nt++]=Kt^Ut,_t[Nt++]=It^Ut<<16}return _t}function He(Ae){this.key=[];for(let Se=0;Se<3;Se++)this.key.push(new Uint8Array(Ae.subarray(8*Se,8*Se+8)));this.encrypt=function(Ae){return Le(We(this.key[2]),Le(We(this.key[1]),Le(We(this.key[0]),Ae,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function Ge(){this.BlockSize=8,this.KeySize=16,this.setKey=function(Ae){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),Ae.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(Ae),!0},this.reset=function(){for(let Ae=0;Ae<16;Ae++)this.masking[Ae]=0,this.rotate[Ae]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(Ae){const Se=Array(Ae.length);for(let Ke=0;Ke<Ae.length;Ke+=8){let qe,Fe=Ae[Ke]<<24|Ae[Ke+1]<<16|Ae[Ke+2]<<8|Ae[Ke+3],$e=Ae[Ke+4]<<24|Ae[Ke+5]<<16|Ae[Ke+6]<<8|Ae[Ke+7];qe=$e,$e=Fe^r($e,this.masking[0],this.rotate[0]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[1],this.rotate[1]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[2],this.rotate[2]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[3],this.rotate[3]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[4],this.rotate[4]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[5],this.rotate[5]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[6],this.rotate[6]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[7],this.rotate[7]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[8],this.rotate[8]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[9],this.rotate[9]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[10],this.rotate[10]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[11],this.rotate[11]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[12],this.rotate[12]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[13],this.rotate[13]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[14],this.rotate[14]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[15],this.rotate[15]),Fe=qe,Se[Ke]=$e>>>24&255,Se[Ke+1]=$e>>>16&255,Se[Ke+2]=$e>>>8&255,Se[Ke+3]=255&$e,Se[Ke+4]=Fe>>>24&255,Se[Ke+5]=Fe>>>16&255,Se[Ke+6]=Fe>>>8&255,Se[Ke+7]=255&Fe}return Se},this.decrypt=function(Ae){const Se=Array(Ae.length);for(let Ke=0;Ke<Ae.length;Ke+=8){let qe,Fe=Ae[Ke]<<24|Ae[Ke+1]<<16|Ae[Ke+2]<<8|Ae[Ke+3],$e=Ae[Ke+4]<<24|Ae[Ke+5]<<16|Ae[Ke+6]<<8|Ae[Ke+7];qe=$e,$e=Fe^r($e,this.masking[15],this.rotate[15]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[14],this.rotate[14]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[13],this.rotate[13]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[12],this.rotate[12]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[11],this.rotate[11]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[10],this.rotate[10]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[9],this.rotate[9]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[8],this.rotate[8]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[7],this.rotate[7]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[6],this.rotate[6]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[5],this.rotate[5]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[4],this.rotate[4]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[3],this.rotate[3]),Fe=qe,qe=$e,$e=Fe^n($e,this.masking[2],this.rotate[2]),Fe=qe,qe=$e,$e=Fe^i($e,this.masking[1],this.rotate[1]),Fe=qe,qe=$e,$e=Fe^r($e,this.masking[0],this.rotate[0]),Fe=qe,Se[Ke]=$e>>>24&255,Se[Ke+1]=$e>>>16&255,Se[Ke+2]=$e>>>8&255,Se[Ke+3]=255&$e,Se[Ke+4]=Fe>>>24&255,Se[Ke+5]=Fe>>16&255,Se[Ke+6]=Fe>>8&255,Se[Ke+7]=255&Fe}return Se};const Ae=[,,,,];Ae[0]=[,,,,],Ae[0][0]=[4,0,13,15,12,14,8],Ae[0][1]=[5,2,16,18,17,19,10],Ae[0][2]=[6,3,23,22,21,20,9],Ae[0][3]=[7,1,26,25,27,24,11],Ae[1]=[,,,,],Ae[1][0]=[0,6,21,23,20,22,16],Ae[1][1]=[1,4,0,2,1,3,18],Ae[1][2]=[2,5,7,6,5,4,17],Ae[1][3]=[3,7,10,9,11,8,19],Ae[2]=[,,,,],Ae[2][0]=[4,0,13,15,12,14,8],Ae[2][1]=[5,2,16,18,17,19,10],Ae[2][2]=[6,3,23,22,21,20,9],Ae[2][3]=[7,1,26,25,27,24,11],Ae[3]=[,,,,],Ae[3][0]=[0,6,21,23,20,22,16],Ae[3][1]=[1,4,0,2,1,3,18],Ae[3][2]=[2,5,7,6,5,4,17],Ae[3][3]=[3,7,10,9,11,8,19];const Se=[,,,,];function r(Ae,Se,qe){const Fe=Se+Ae,$e=Fe<<qe|Fe>>>32-qe;return(Ke[0][$e>>>24]^Ke[1][$e>>>16&255])-Ke[2][$e>>>8&255]+Ke[3][255&$e]}function i(Ae,Se,qe){const Fe=Se^Ae,$e=Fe<<qe|Fe>>>32-qe;return Ke[0][$e>>>24]-Ke[1][$e>>>16&255]+Ke[2][$e>>>8&255]^Ke[3][255&$e]}function n(Ae,Se,qe){const Fe=Se-Ae,$e=Fe<<qe|Fe>>>32-qe;return(Ke[0][$e>>>24]+Ke[1][$e>>>16&255]^Ke[2][$e>>>8&255])-Ke[3][255&$e]}Se[0]=[,,,,],Se[0][0]=[24,25,23,22,18],Se[0][1]=[26,27,21,20,22],Se[0][2]=[28,29,19,18,25],Se[0][3]=[30,31,17,16,28],Se[1]=[,,,,],Se[1][0]=[3,2,12,13,8],Se[1][1]=[1,0,14,15,13],Se[1][2]=[7,6,8,9,3],Se[1][3]=[5,4,10,11,7],Se[2]=[,,,,],Se[2][0]=[19,18,28,29,25],Se[2][1]=[17,16,30,31,28],Se[2][2]=[23,22,24,25,18],Se[2][3]=[21,20,26,27,22],Se[3]=[,,,,],Se[3][0]=[8,9,7,6,3],Se[3][1]=[10,11,5,4,7],Se[3][2]=[12,13,3,2,8],Se[3][3]=[14,15,1,0,13],this.keySchedule=function(qe){const Fe=[,,,,,,,,],$e=Array(32);let rt;for(let Ae=0;Ae<4;Ae++)rt=4*Ae,Fe[Ae]=qe[rt]<<24|qe[rt+1]<<16|qe[rt+2]<<8|qe[rt+3];const it=[6,7,4,5];let nt,st=0;for(let qe=0;qe<2;qe++)for(let qe=0;qe<4;qe++){for(rt=0;rt<4;rt++){const Se=Ae[qe][rt];nt=Fe[Se[1]],nt^=Ke[4][Fe[Se[2]>>>2]>>>24-8*(3&Se[2])&255],nt^=Ke[5][Fe[Se[3]>>>2]>>>24-8*(3&Se[3])&255],nt^=Ke[6][Fe[Se[4]>>>2]>>>24-8*(3&Se[4])&255],nt^=Ke[7][Fe[Se[5]>>>2]>>>24-8*(3&Se[5])&255],nt^=Ke[it[rt]][Fe[Se[6]>>>2]>>>24-8*(3&Se[6])&255],Fe[Se[0]]=nt}for(rt=0;rt<4;rt++){const Ae=Se[qe][rt];nt=Ke[4][Fe[Ae[0]>>>2]>>>24-8*(3&Ae[0])&255],nt^=Ke[5][Fe[Ae[1]>>>2]>>>24-8*(3&Ae[1])&255],nt^=Ke[6][Fe[Ae[2]>>>2]>>>24-8*(3&Ae[2])&255],nt^=Ke[7][Fe[Ae[3]>>>2]>>>24-8*(3&Ae[3])&255],nt^=Ke[4+rt][Fe[Ae[4]>>>2]>>>24-8*(3&Ae[4])&255],$e[st]=nt,st++}}for(let Ae=0;Ae<16;Ae++)this.masking[Ae]=$e[Ae],this.rotate[Ae]=31&$e[16+Ae]};const Ke=[,,,,,,,,];Ke[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],Ke[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],Ke[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],Ke[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],Ke[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],Ke[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],Ke[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],Ke[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 Ve(Ae){this.cast5=new Ge,this.cast5.setKey(Ae),this.encrypt=function(Ae){return this.cast5.encrypt(Ae)}}He.keySize=He.prototype.keySize=24,He.blockSize=He.prototype.blockSize=8,Ve.blockSize=Ve.prototype.blockSize=8,Ve.keySize=Ve.prototype.keySize=16;const Rr=4294967295;function Ze(Ae,Se){return(Ae<<Se|Ae>>>32-Se)&Rr}function Ye(Ae,Se){return Ae[Se]|Ae[Se+1]<<8|Ae[Se+2]<<16|Ae[Se+3]<<24}function Xe(Ae,Se,Ke){Ae.splice(Se,4,255&Ke,Ke>>>8&255,Ke>>>16&255,Ke>>>24&255)}function Qe(Ae,Se){return Ae>>>8*Se&255}function Je(Ae){this.tf=function(){let Ae=null,Se=null,Ke=-1,qe=[],Fe=[[],[],[],[]];function a(Ae){return Fe[0][Qe(Ae,0)]^Fe[1][Qe(Ae,1)]^Fe[2][Qe(Ae,2)]^Fe[3][Qe(Ae,3)]}function s(Ae){return Fe[0][Qe(Ae,3)]^Fe[1][Qe(Ae,0)]^Fe[2][Qe(Ae,1)]^Fe[3][Qe(Ae,2)]}function o(Ae,Se){let Ke=a(Se[0]),Fe=s(Se[1]);Se[2]=Ze(Se[2]^Ke+Fe+qe[4*Ae+8]&Rr,31),Se[3]=Ze(Se[3],1)^Ke+2*Fe+qe[4*Ae+9]&Rr,Ke=a(Se[2]),Fe=s(Se[3]),Se[0]=Ze(Se[0]^Ke+Fe+qe[4*Ae+10]&Rr,31),Se[1]=Ze(Se[1],1)^Ke+2*Fe+qe[4*Ae+11]&Rr}function c(Ae,Se){let Ke=a(Se[0]),Fe=s(Se[1]);Se[2]=Ze(Se[2],1)^Ke+Fe+qe[4*Ae+10]&Rr,Se[3]=Ze(Se[3]^Ke+2*Fe+qe[4*Ae+11]&Rr,31),Ke=a(Se[2]),Fe=s(Se[3]),Se[0]=Ze(Se[0],1)^Ke+Fe+qe[4*Ae+8]&Rr,Se[1]=Ze(Se[1]^Ke+2*Fe+qe[4*Ae+9]&Rr,31)}return{name:"twofish",blocksize:16,open:function(Se){let Ke,$e,rt,it,nt;Ae=Se;const st=[],ut=[],ht=[];let ft;const yt=[];let mt,vt,_t;const Rt=[[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]],Kt=[[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]],It=[[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]],Ut=[[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]],Ot=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],Nt=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],jt=[[],[]],Ft=[[],[],[],[]];function E(Ae){return Ae^Ae>>2^[0,90,180,238][3&Ae]}function P(Ae){return Ae^Ae>>1^Ae>>2^[0,238,180,90][3&Ae]}function x(Ae,Se){let Ke,qe,Fe;for(Ke=0;Ke<8;Ke++)qe=Se>>>24,Se=Se<<8&Rr|Ae>>>24,Ae=Ae<<8&Rr,Fe=qe<<1,128&qe&&(Fe^=333),Se^=qe^Fe<<16,Fe^=qe>>>1,1&qe&&(Fe^=166),Se^=Fe<<24|Fe<<8;return Se}function M(Ae,Se){const Ke=Se>>4,qe=15&Se,Fe=Rt[Ae][Ke^qe],$e=Kt[Ae][Ot[qe]^Nt[Ke]];return Ut[Ae][Ot[$e]^Nt[Fe]]<<4|It[Ae][Fe^$e]}function C(Ae,Se){let Ke=Qe(Ae,0),qe=Qe(Ae,1),Fe=Qe(Ae,2),$e=Qe(Ae,3);switch(ft){case 4:Ke=jt[1][Ke]^Qe(Se[3],0),qe=jt[0][qe]^Qe(Se[3],1),Fe=jt[0][Fe]^Qe(Se[3],2),$e=jt[1][$e]^Qe(Se[3],3);case 3:Ke=jt[1][Ke]^Qe(Se[2],0),qe=jt[1][qe]^Qe(Se[2],1),Fe=jt[0][Fe]^Qe(Se[2],2),$e=jt[0][$e]^Qe(Se[2],3);case 2:Ke=jt[0][jt[0][Ke]^Qe(Se[1],0)]^Qe(Se[0],0),qe=jt[0][jt[1][qe]^Qe(Se[1],1)]^Qe(Se[0],1),Fe=jt[1][jt[0][Fe]^Qe(Se[1],2)]^Qe(Se[0],2),$e=jt[1][jt[1][$e]^Qe(Se[1],3)]^Qe(Se[0],3)}return Ft[0][Ke]^Ft[1][qe]^Ft[2][Fe]^Ft[3][$e]}for(Ae=Ae.slice(0,32),Ke=Ae.length;16!==Ke&&24!==Ke&&32!==Ke;)Ae[Ke++]=0;for(Ke=0;Ke<Ae.length;Ke+=4)ht[Ke>>2]=Ye(Ae,Ke);for(Ke=0;Ke<256;Ke++)jt[0][Ke]=M(0,Ke),jt[1][Ke]=M(1,Ke);for(Ke=0;Ke<256;Ke++)mt=jt[1][Ke],vt=E(mt),_t=P(mt),Ft[0][Ke]=mt+(vt<<8)+(_t<<16)+(_t<<24),Ft[2][Ke]=vt+(_t<<8)+(mt<<16)+(_t<<24),mt=jt[0][Ke],vt=E(mt),_t=P(mt),Ft[1][Ke]=_t+(_t<<8)+(vt<<16)+(mt<<24),Ft[3][Ke]=vt+(mt<<8)+(_t<<16)+(vt<<24);for(ft=ht.length/2,Ke=0;Ke<ft;Ke++)$e=ht[Ke+Ke],st[Ke]=$e,rt=ht[Ke+Ke+1],ut[Ke]=rt,yt[ft-Ke-1]=x($e,rt);for(Ke=0;Ke<40;Ke+=2)$e=16843009*Ke,rt=$e+16843009,$e=C($e,st),rt=Ze(C(rt,ut),8),qe[Ke]=$e+rt&Rr,qe[Ke+1]=Ze($e+2*rt,9);for(Ke=0;Ke<256;Ke++)switch($e=rt=it=nt=Ke,ft){case 4:$e=jt[1][$e]^Qe(yt[3],0),rt=jt[0][rt]^Qe(yt[3],1),it=jt[0][it]^Qe(yt[3],2),nt=jt[1][nt]^Qe(yt[3],3);case 3:$e=jt[1][$e]^Qe(yt[2],0),rt=jt[1][rt]^Qe(yt[2],1),it=jt[0][it]^Qe(yt[2],2),nt=jt[0][nt]^Qe(yt[2],3);case 2:Fe[0][Ke]=Ft[0][jt[0][jt[0][$e]^Qe(yt[1],0)]^Qe(yt[0],0)],Fe[1][Ke]=Ft[1][jt[0][jt[1][rt]^Qe(yt[1],1)]^Qe(yt[0],1)],Fe[2][Ke]=Ft[2][jt[1][jt[0][it]^Qe(yt[1],2)]^Qe(yt[0],2)],Fe[3][Ke]=Ft[3][jt[1][jt[1][nt]^Qe(yt[1],3)]^Qe(yt[0],3)]}},close:function(){qe=[],Fe=[[],[],[],[]]},encrypt:function(Ae,Fe){Se=Ae,Ke=Fe;const $e=[Ye(Se,Ke)^qe[0],Ye(Se,Ke+4)^qe[1],Ye(Se,Ke+8)^qe[2],Ye(Se,Ke+12)^qe[3]];for(let Ae=0;Ae<8;Ae++)o(Ae,$e);return Xe(Se,Ke,$e[2]^qe[4]),Xe(Se,Ke+4,$e[3]^qe[5]),Xe(Se,Ke+8,$e[0]^qe[6]),Xe(Se,Ke+12,$e[1]^qe[7]),Ke+=16,Se},decrypt:function(Ae,Fe){Se=Ae,Ke=Fe;const $e=[Ye(Se,Ke)^qe[4],Ye(Se,Ke+4)^qe[5],Ye(Se,Ke+8)^qe[6],Ye(Se,Ke+12)^qe[7]];for(let Ae=7;Ae>=0;Ae--)c(Ae,$e);Xe(Se,Ke,$e[2]^qe[0]),Xe(Se,Ke+4,$e[3]^qe[1]),Xe(Se,Ke+8,$e[0]^qe[2]),Xe(Se,Ke+12,$e[1]^qe[3]),Ke+=16},finalize:function(){return Se}}}(),this.tf.open(Array.from(Ae),0),this.encrypt=function(Ae){return this.tf.encrypt(Array.from(Ae),0)}}function et(){}function tt(Ae){this.bf=new et,this.bf.init(Ae),this.encrypt=function(Ae){return this.bf.encryptBlock(Ae)}}Je.keySize=Je.prototype.keySize=32,Je.blockSize=Je.prototype.blockSize=16,et.prototype.BLOCKSIZE=8,et.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]],et.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],et.prototype.NN=16,et.prototype._clean=function(Ae){if(Ae<0){Ae=(2147483647&Ae)+2147483648}return Ae},et.prototype._F=function(Ae){let Se;const Ke=255&Ae,qe=255&(Ae>>>=8),Fe=255&(Ae>>>=8),$e=255&(Ae>>>=8);return Se=this.sboxes[0][$e]+this.sboxes[1][Fe],Se^=this.sboxes[2][qe],Se+=this.sboxes[3][Ke],Se},et.prototype._encryptBlock=function(Ae){let Se,Ke=Ae[0],qe=Ae[1];for(Se=0;Se<this.NN;++Se){Ke^=this.parray[Se],qe=this._F(Ke)^qe;const Ae=Ke;Ke=qe,qe=Ae}Ke^=this.parray[this.NN+0],qe^=this.parray[this.NN+1],Ae[0]=this._clean(qe),Ae[1]=this._clean(Ke)},et.prototype.encryptBlock=function(Ae){let Se;const Ke=[0,0],qe=this.BLOCKSIZE/2;for(Se=0;Se<this.BLOCKSIZE/2;++Se)Ke[0]=Ke[0]<<8|255&Ae[Se+0],Ke[1]=Ke[1]<<8|255&Ae[Se+qe];this._encryptBlock(Ke);const Fe=[];for(Se=0;Se<this.BLOCKSIZE/2;++Se)Fe[Se+0]=Ke[0]>>>24-8*Se&255,Fe[Se+qe]=Ke[1]>>>24-8*Se&255;return Fe},et.prototype._decryptBlock=function(Ae){let Se,Ke=Ae[0],qe=Ae[1];for(Se=this.NN+1;Se>1;--Se){Ke^=this.parray[Se],qe=this._F(Ke)^qe;const Ae=Ke;Ke=qe,qe=Ae}Ke^=this.parray[1],qe^=this.parray[0],Ae[0]=this._clean(qe),Ae[1]=this._clean(Ke)},et.prototype.init=function(Ae){let Se,Ke=0;for(this.parray=[],Se=0;Se<this.NN+2;++Se){let qe=0;for(let Se=0;Se<4;++Se)qe=qe<<8|255&Ae[Ke],++Ke>=Ae.length&&(Ke=0);this.parray[Se]=this.PARRAY[Se]^qe}for(this.sboxes=[],Se=0;Se<4;++Se)for(this.sboxes[Se]=[],Ke=0;Ke<256;++Ke)this.sboxes[Se][Ke]=this.SBOXES[Se][Ke];const qe=[0,0];for(Se=0;Se<this.NN+2;Se+=2)this._encryptBlock(qe),this.parray[Se+0]=qe[0],this.parray[Se+1]=qe[1];for(Se=0;Se<4;++Se)for(Ke=0;Ke<256;Ke+=2)this._encryptBlock(qe),this.sboxes[Se][Ke+0]=qe[0],this.sboxes[Se][Ke+1]=qe[1]},tt.keySize=tt.prototype.keySize=16,tt.blockSize=tt.prototype.blockSize=8;const Dr=je(128),Tr=je(192),Kr=je(256),at=function(Ae){this.key=Ae,this.encrypt=function(Ae,Se){return Le(We(this.key),Ae,!0,0,null,Se)},this.decrypt=function(Ae,Se){return Le(We(this.key),Ae,!1,0,null,Se)}};var Ir=Object.freeze({__proto__:null,aes128:Dr,aes192:Tr,aes256:Kr,des:at,tripledes:He,cast5:Ve,twofish:Je,blowfish:tt,idea:function(){throw Error("IDEA symmetric-key algorithm not implemented")}}),ot=function(Ae,Se,Ke){"use asm";var qe=0,Fe=0,$e=0,rt=0,it=0,nt=0,st=0;var ut=0,ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0;var Ut=new Ae.Uint8Array(Ke);function _(Ae,Se,Ke,nt,st,ut,ht,ft,yt,mt,vt,_t,Rt,Kt,It,Ut){Ae=Ae|0;Se=Se|0;Ke=Ke|0;nt=nt|0;st=st|0;ut=ut|0;ht=ht|0;ft=ft|0;yt=yt|0;mt=mt|0;vt=vt|0;_t=_t|0;Rt=Rt|0;Kt=Kt|0;It=It|0;Ut=Ut|0;var Ot=0,Nt=0,jt=0,Ft=0,Lt=0,Ht=0,Wt=0,Gt=0,$t=0,Yt=0,Vt=0,Zt=0,Qt=0,er=0,tr=0,rr=0,ir=0,nr=0,sr=0,ar=0,cr=0,ur=0,hr=0,fr=0,lr=0,dr=0,yr=0,Cr=0,Rr=0,Dr=0,Tr=0,Kr=0,Ir=0,Ur=0,Or=0,Nr=0,jr=0,Lr=0,Wr=0,Qr=0,ti=0,ri=0,ii=0,oi=0,ci=0,fi=0,li=0,di=0,pi=0,yi=0,gi=0,vi=0,wi=0,ki=0,Si=0,Ei=0,Mi=0,Pi=0,xi=0,Ci=0,Ri=0,Di=0,Ti=0,Ki=0,qi=0,ji=0,zi=0,Li=0,Hi=0,$i=0,Yi=0;Ot=qe;Nt=Fe;jt=$e;Ft=rt;Lt=it;Wt=Ae+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=Se+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=Ke+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=nt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=st+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=ut+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=ht+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=ft+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=yt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=mt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=vt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=_t+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=Rt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=Kt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=It+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Wt=Ut+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Kt^yt^Ke^Ae;Gt=Ht<<1|Ht>>>31;Wt=Gt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=It^mt^nt^Se;$t=Ht<<1|Ht>>>31;Wt=$t+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ut^vt^st^Ke;Yt=Ht<<1|Ht>>>31;Wt=Yt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Gt^_t^ut^nt;Vt=Ht<<1|Ht>>>31;Wt=Vt+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|~Nt&Ft)+0x5a827999|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=$t^Rt^ht^st;Zt=Ht<<1|Ht>>>31;Wt=Zt+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Yt^Kt^ft^ut;Qt=Ht<<1|Ht>>>31;Wt=Qt+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Vt^It^yt^ht;er=Ht<<1|Ht>>>31;Wt=er+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Zt^Ut^mt^ft;tr=Ht<<1|Ht>>>31;Wt=tr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Qt^Gt^vt^yt;rr=Ht<<1|Ht>>>31;Wt=rr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=er^$t^_t^mt;ir=Ht<<1|Ht>>>31;Wt=ir+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=tr^Yt^Rt^vt;nr=Ht<<1|Ht>>>31;Wt=nr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=rr^Vt^Kt^_t;sr=Ht<<1|Ht>>>31;Wt=sr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ir^Zt^It^Rt;ar=Ht<<1|Ht>>>31;Wt=ar+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=nr^Qt^Ut^Kt;cr=Ht<<1|Ht>>>31;Wt=cr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=sr^er^Gt^It;ur=Ht<<1|Ht>>>31;Wt=ur+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ar^tr^$t^Ut;hr=Ht<<1|Ht>>>31;Wt=hr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=cr^rr^Yt^Gt;fr=Ht<<1|Ht>>>31;Wt=fr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ur^ir^Vt^$t;lr=Ht<<1|Ht>>>31;Wt=lr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=hr^nr^Zt^Yt;dr=Ht<<1|Ht>>>31;Wt=dr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=fr^sr^Qt^Vt;yr=Ht<<1|Ht>>>31;Wt=yr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=lr^ar^er^Zt;Cr=Ht<<1|Ht>>>31;Wt=Cr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=dr^cr^tr^Qt;Rr=Ht<<1|Ht>>>31;Wt=Rr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=yr^ur^rr^er;Dr=Ht<<1|Ht>>>31;Wt=Dr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Cr^hr^ir^tr;Tr=Ht<<1|Ht>>>31;Wt=Tr+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)+0x6ed9eba1|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Rr^fr^nr^rr;Kr=Ht<<1|Ht>>>31;Wt=Kr+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Dr^lr^sr^ir;Ir=Ht<<1|Ht>>>31;Wt=Ir+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Tr^dr^ar^nr;Ur=Ht<<1|Ht>>>31;Wt=Ur+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Kr^yr^cr^sr;Or=Ht<<1|Ht>>>31;Wt=Or+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ir^Cr^ur^ar;Nr=Ht<<1|Ht>>>31;Wt=Nr+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ur^Rr^hr^cr;jr=Ht<<1|Ht>>>31;Wt=jr+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Or^Dr^fr^ur;Lr=Ht<<1|Ht>>>31;Wt=Lr+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Nr^Tr^lr^hr;Wr=Ht<<1|Ht>>>31;Wt=Wr+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=jr^Kr^dr^fr;Qr=Ht<<1|Ht>>>31;Wt=Qr+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Lr^Ir^yr^lr;ti=Ht<<1|Ht>>>31;Wt=ti+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Wr^Ur^Cr^dr;ri=Ht<<1|Ht>>>31;Wt=ri+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Qr^Or^Rr^yr;ii=Ht<<1|Ht>>>31;Wt=ii+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ti^Nr^Dr^Cr;oi=Ht<<1|Ht>>>31;Wt=oi+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ri^jr^Tr^Rr;ci=Ht<<1|Ht>>>31;Wt=ci+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ii^Lr^Kr^Dr;fi=Ht<<1|Ht>>>31;Wt=fi+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=oi^Wr^Ir^Tr;li=Ht<<1|Ht>>>31;Wt=li+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ci^Qr^Ur^Kr;di=Ht<<1|Ht>>>31;Wt=di+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=fi^ti^Or^Ir;pi=Ht<<1|Ht>>>31;Wt=pi+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=li^ri^Nr^Ur;yi=Ht<<1|Ht>>>31;Wt=yi+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=di^ii^jr^Or;gi=Ht<<1|Ht>>>31;Wt=gi+(Ot<<5|Ot>>>27)+Lt+(Nt&jt|Nt&Ft|jt&Ft)-0x70e44324|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=pi^oi^Lr^Nr;vi=Ht<<1|Ht>>>31;Wt=vi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=yi^ci^Wr^jr;wi=Ht<<1|Ht>>>31;Wt=wi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=gi^fi^Qr^Lr;ki=Ht<<1|Ht>>>31;Wt=ki+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=vi^li^ti^Wr;Si=Ht<<1|Ht>>>31;Wt=Si+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=wi^di^ri^Qr;Ei=Ht<<1|Ht>>>31;Wt=Ei+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ki^pi^ii^ti;Mi=Ht<<1|Ht>>>31;Wt=Mi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Si^yi^oi^ri;Pi=Ht<<1|Ht>>>31;Wt=Pi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ei^gi^ci^ii;xi=Ht<<1|Ht>>>31;Wt=xi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Mi^vi^fi^oi;Ci=Ht<<1|Ht>>>31;Wt=Ci+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Pi^wi^li^ci;Ri=Ht<<1|Ht>>>31;Wt=Ri+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=xi^ki^di^fi;Di=Ht<<1|Ht>>>31;Wt=Di+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ci^Si^pi^li;Ti=Ht<<1|Ht>>>31;Wt=Ti+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ri^Ei^yi^di;Ki=Ht<<1|Ht>>>31;Wt=Ki+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Di^Mi^gi^pi;qi=Ht<<1|Ht>>>31;Wt=qi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ti^Pi^vi^yi;ji=Ht<<1|Ht>>>31;Wt=ji+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Ki^xi^wi^gi;zi=Ht<<1|Ht>>>31;Wt=zi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=qi^Ci^ki^vi;Li=Ht<<1|Ht>>>31;Wt=Li+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=ji^Ri^Si^wi;Hi=Ht<<1|Ht>>>31;Wt=Hi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=zi^Di^Ei^ki;$i=Ht<<1|Ht>>>31;Wt=$i+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;Ht=Li^Ti^Mi^Si;Yi=Ht<<1|Ht>>>31;Wt=Yi+(Ot<<5|Ot>>>27)+Lt+(Nt^jt^Ft)-0x359d3e2a|0;Lt=Ft;Ft=jt;jt=Nt<<30|Nt>>>2;Nt=Ot;Ot=Wt;qe=qe+Ot|0;Fe=Fe+Nt|0;$e=$e+jt|0;rt=rt+Ft|0;it=it+Lt|0}function k(Ae){Ae=Ae|0;_(Ut[Ae|0]<<24|Ut[Ae|1]<<16|Ut[Ae|2]<<8|Ut[Ae|3],Ut[Ae|4]<<24|Ut[Ae|5]<<16|Ut[Ae|6]<<8|Ut[Ae|7],Ut[Ae|8]<<24|Ut[Ae|9]<<16|Ut[Ae|10]<<8|Ut[Ae|11],Ut[Ae|12]<<24|Ut[Ae|13]<<16|Ut[Ae|14]<<8|Ut[Ae|15],Ut[Ae|16]<<24|Ut[Ae|17]<<16|Ut[Ae|18]<<8|Ut[Ae|19],Ut[Ae|20]<<24|Ut[Ae|21]<<16|Ut[Ae|22]<<8|Ut[Ae|23],Ut[Ae|24]<<24|Ut[Ae|25]<<16|Ut[Ae|26]<<8|Ut[Ae|27],Ut[Ae|28]<<24|Ut[Ae|29]<<16|Ut[Ae|30]<<8|Ut[Ae|31],Ut[Ae|32]<<24|Ut[Ae|33]<<16|Ut[Ae|34]<<8|Ut[Ae|35],Ut[Ae|36]<<24|Ut[Ae|37]<<16|Ut[Ae|38]<<8|Ut[Ae|39],Ut[Ae|40]<<24|Ut[Ae|41]<<16|Ut[Ae|42]<<8|Ut[Ae|43],Ut[Ae|44]<<24|Ut[Ae|45]<<16|Ut[Ae|46]<<8|Ut[Ae|47],Ut[Ae|48]<<24|Ut[Ae|49]<<16|Ut[Ae|50]<<8|Ut[Ae|51],Ut[Ae|52]<<24|Ut[Ae|53]<<16|Ut[Ae|54]<<8|Ut[Ae|55],Ut[Ae|56]<<24|Ut[Ae|57]<<16|Ut[Ae|58]<<8|Ut[Ae|59],Ut[Ae|60]<<24|Ut[Ae|61]<<16|Ut[Ae|62]<<8|Ut[Ae|63])}function A(Ae){Ae=Ae|0;Ut[Ae|0]=qe>>>24;Ut[Ae|1]=qe>>>16&255;Ut[Ae|2]=qe>>>8&255;Ut[Ae|3]=qe&255;Ut[Ae|4]=Fe>>>24;Ut[Ae|5]=Fe>>>16&255;Ut[Ae|6]=Fe>>>8&255;Ut[Ae|7]=Fe&255;Ut[Ae|8]=$e>>>24;Ut[Ae|9]=$e>>>16&255;Ut[Ae|10]=$e>>>8&255;Ut[Ae|11]=$e&255;Ut[Ae|12]=rt>>>24;Ut[Ae|13]=rt>>>16&255;Ut[Ae|14]=rt>>>8&255;Ut[Ae|15]=rt&255;Ut[Ae|16]=it>>>24;Ut[Ae|17]=it>>>16&255;Ut[Ae|18]=it>>>8&255;Ut[Ae|19]=it&255}function S(){qe=0x67452301;Fe=0xefcdab89;$e=0x98badcfe;rt=0x10325476;it=0xc3d2e1f0;nt=st=0}function E(Ae,Se,Ke,ut,ht,ft,yt){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ut=ut|0;ht=ht|0;ft=ft|0;yt=yt|0;qe=Ae;Fe=Se;$e=Ke;rt=ut;it=ht;nt=ft;st=yt}function P(Ae,Se){Ae=Ae|0;Se=Se|0;var Ke=0;if(Ae&63)return-1;while((Se|0)>=64){k(Ae);Ae=Ae+64|0;Se=Se-64|0;Ke=Ke+64|0}nt=nt+Ke|0;if(nt>>>0<Ke>>>0)st=st+1|0;return Ke|0}function x(Ae,Se,Ke){Ae=Ae|0;Se=Se|0;Ke=Ke|0;var qe=0,Fe=0;if(Ae&63)return-1;if(~Ke)if(Ke&31)return-1;if((Se|0)>=64){qe=P(Ae,Se)|0;if((qe|0)==-1)return-1;Ae=Ae+qe|0;Se=Se-qe|0}qe=qe+Se|0;nt=nt+Se|0;if(nt>>>0<Se>>>0)st=st+1|0;Ut[Ae|Se]=0x80;if((Se|0)>=56){for(Fe=Se+1|0;(Fe|0)<64;Fe=Fe+1|0)Ut[Ae|Fe]=0x00;k(Ae);Se=0;Ut[Ae|0]=0}for(Fe=Se+1|0;(Fe|0)<59;Fe=Fe+1|0)Ut[Ae|Fe]=0;Ut[Ae|56]=st>>>21&255;Ut[Ae|57]=st>>>13&255;Ut[Ae|58]=st>>>5&255;Ut[Ae|59]=st<<3&255|nt>>>29;Ut[Ae|60]=nt>>>21&255;Ut[Ae|61]=nt>>>13&255;Ut[Ae|62]=nt>>>5&255;Ut[Ae|63]=nt<<3&255;k(Ae);if(~Ke)A(Ke);return qe|0}function M(){qe=ut;Fe=ht;$e=ft;rt=yt;it=mt;nt=64;st=0}function C(){qe=vt;Fe=_t;$e=Rt;rt=Kt;it=It;nt=64;st=0}function K(Ae,Se,Ke,Ut,Ot,Nt,jt,Ft,Lt,Ht,Wt,Gt,$t,Yt,Vt,Zt){Ae=Ae|0;Se=Se|0;Ke=Ke|0;Ut=Ut|0;Ot=Ot|0;Nt=Nt|0;jt=jt|0;Ft=Ft|0;Lt=Lt|0;Ht=Ht|0;Wt=Wt|0;Gt=Gt|0;$t=$t|0;Yt=Yt|0;Vt=Vt|0;Zt=Zt|0;S();_(Ae^0x5c5c5c5c,Se^0x5c5c5c5c,Ke^0x5c5c5c5c,Ut^0x5c5c5c5c,Ot^0x5c5c5c5c,Nt^0x5c5c5c5c,jt^0x5c5c5c5c,Ft^0x5c5c5c5c,Lt^0x5c5c5c5c,Ht^0x5c5c5c5c,Wt^0x5c5c5c5c,Gt^0x5c5c5c5c,$t^0x5c5c5c5c,Yt^0x5c5c5c5c,Vt^0x5c5c5c5c,Zt^0x5c5c5c5c);vt=qe;_t=Fe;Rt=$e;Kt=rt;It=it;S();_(Ae^0x36363636,Se^0x36363636,Ke^0x36363636,Ut^0x36363636,Ot^0x36363636,Nt^0x36363636,jt^0x36363636,Ft^0x36363636,Lt^0x36363636,Ht^0x36363636,Wt^0x36363636,Gt^0x36363636,$t^0x36363636,Yt^0x36363636,Vt^0x36363636,Zt^0x36363636);ut=qe;ht=Fe;ft=$e;yt=rt;mt=it;nt=64;st=0}function D(Ae,Se,Ke){Ae=Ae|0;Se=Se|0;Ke=Ke|0;var nt=0,st=0,ut=0,ht=0,ft=0,yt=0;if(Ae&63)return-1;if(~Ke)if(Ke&31)return-1;yt=x(Ae,Se,-1)|0;nt=qe,st=Fe,ut=$e,ht=rt,ft=it;C();_(nt,st,ut,ht,ft,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~Ke)A(Ke);return yt|0}function R(Ae,Se,Ke,nt,st){Ae=Ae|0;Se=Se|0;Ke=Ke|0;nt=nt|0;st=st|0;var ut=0,ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0;if(Ae&63)return-1;if(~st)if(st&31)return-1;Ut[Ae+Se|0]=Ke>>>24;Ut[Ae+Se+1|0]=Ke>>>16&255;Ut[Ae+Se+2|0]=Ke>>>8&255;Ut[Ae+Se+3|0]=Ke&255;D(Ae,Se+4|0,-1)|0;ut=vt=qe,ht=_t=Fe,ft=Rt=$e,yt=Kt=rt,mt=It=it;nt=nt-1|0;while((nt|0)>0){M();_(vt,_t,Rt,Kt,It,0x80000000,0,0,0,0,0,0,0,0,0,672);vt=qe,_t=Fe,Rt=$e,Kt=rt,It=it;C();_(vt,_t,Rt,Kt,It,0x80000000,0,0,0,0,0,0,0,0,0,672);vt=qe,_t=Fe,Rt=$e,Kt=rt,It=it;ut=ut^qe;ht=ht^Fe;ft=ft^$e;yt=yt^rt;mt=mt^it;nt=nt-1|0}qe=ut;Fe=ht;$e=ft;rt=yt;it=mt;if(~st)A(st);return 0}return{reset:S,init:E,process:P,finish:x,hmac_reset:M,hmac_init:K,hmac_finish:D,pbkdf2_generate_block:R}};class ct{constructor(){this.pos=0,this.len=0}reset(){const{asm:Ae}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,Ae.reset(),this}process(Ae){if(null!==this.result)throw new Be("state must be reset before processing new data");const{asm:Se,heap:Ke}=this.acquire_asm();let qe=this.pos,Fe=this.len,$e=0,rt=Ae.length,it=0;for(;rt>0;)it=Ue(Ke,qe+Fe,Ae,$e,rt),Fe+=it,$e+=it,rt-=it,it=Se.process(qe,Fe),qe+=it,Fe-=it,Fe||(qe=0);return this.pos=qe,this.len=Fe,this}finish(){if(null!==this.result)throw new Be("state must be reset before processing new data");const{asm:Ae,heap:Se}=this.acquire_asm();return Ae.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(Se.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const Ur=[],Or=[];class dt extends ct{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=Ur.pop()||Re(),this.asm=Or.pop()||ot({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Ur.push(this.heap),Or.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(Ae){return(new dt).process(Ae).finish().result}}dt.NAME="sha1",dt.heap_pool=[],dt.asm_pool=[],dt.asm_function=ot;const Nr=[],jr=[];class pt extends ct{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=Nr.pop()||Re(),this.asm=jr.pop()||function(Ae,Se,Ke){"use asm";var qe=0,Fe=0,$e=0,rt=0,it=0,nt=0,st=0,ut=0,ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,jt=0,Ft=0,Lt=0,Ht=0,Wt=0,Gt=0,$t=new Ae.Uint8Array(Ke);function K(Ae,Se,Ke,ht,ft,yt,mt,vt,_t,Rt,Kt,It,Ut,Ot,Nt,jt){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;ft=ft|0;yt=yt|0;mt=mt|0;vt=vt|0;_t=_t|0;Rt=Rt|0;Kt=Kt|0;It=It|0;Ut=Ut|0;Ot=Ot|0;Nt=Nt|0;jt=jt|0;var Ft=0,Lt=0,Ht=0,Wt=0,Gt=0,$t=0,Yt=0,Vt=0;Ft=qe;Lt=Fe;Ht=$e;Wt=rt;Gt=it;$t=nt;Yt=st;Vt=ut;Vt=Ae+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0x428a2f98|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Yt=Se+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0x71374491|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;$t=Ke+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0xb5c0fbcf|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;Gt=ht+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0xe9b5dba5|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;Wt=ft+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0x3956c25b|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;Ht=yt+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0x59f111f1|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;Lt=mt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0x923f82a4|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;Ft=vt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0xab1c5ed5|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;Vt=_t+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0xd807aa98|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Yt=Rt+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0x12835b01|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;$t=Kt+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0x243185be|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;Gt=It+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0x550c7dc3|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;Wt=Ut+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0x72be5d74|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;Ht=Ot+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0x80deb1fe|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;Lt=Nt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0x9bdc06a7|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;Ft=jt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0xc19bf174|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;Ae=(Se>>>7^Se>>>18^Se>>>3^Se<<25^Se<<14)+(Nt>>>17^Nt>>>19^Nt>>>10^Nt<<15^Nt<<13)+Ae+Rt|0;Vt=Ae+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0xe49b69c1|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Se=(Ke>>>7^Ke>>>18^Ke>>>3^Ke<<25^Ke<<14)+(jt>>>17^jt>>>19^jt>>>10^jt<<15^jt<<13)+Se+Kt|0;Yt=Se+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0xefbe4786|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;Ke=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+Ke+It|0;$t=Ke+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0x0fc19dc6|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Se>>>17^Se>>>19^Se>>>10^Se<<15^Se<<13)+ht+Ut|0;Gt=ht+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0x240ca1cc|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;ft=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+(Ke>>>17^Ke>>>19^Ke>>>10^Ke<<15^Ke<<13)+ft+Ot|0;Wt=ft+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0x2de92c6f|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;yt=(mt>>>7^mt>>>18^mt>>>3^mt<<25^mt<<14)+(ht>>>17^ht>>>19^ht>>>10^ht<<15^ht<<13)+yt+Nt|0;Ht=yt+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0x4a7484aa|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;mt=(vt>>>7^vt>>>18^vt>>>3^vt<<25^vt<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+mt+jt|0;Lt=mt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0x5cb0a9dc|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;vt=(_t>>>7^_t>>>18^_t>>>3^_t<<25^_t<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+vt+Ae|0;Ft=vt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0x76f988da|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;_t=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(mt>>>17^mt>>>19^mt>>>10^mt<<15^mt<<13)+_t+Se|0;Vt=_t+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0x983e5152|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Rt=(Kt>>>7^Kt>>>18^Kt>>>3^Kt<<25^Kt<<14)+(vt>>>17^vt>>>19^vt>>>10^vt<<15^vt<<13)+Rt+Ke|0;Yt=Rt+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0xa831c66d|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;Kt=(It>>>7^It>>>18^It>>>3^It<<25^It<<14)+(_t>>>17^_t>>>19^_t>>>10^_t<<15^_t<<13)+Kt+ht|0;$t=Kt+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0xb00327c8|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;It=(Ut>>>7^Ut>>>18^Ut>>>3^Ut<<25^Ut<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+It+ft|0;Gt=It+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0xbf597fc7|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;Ut=(Ot>>>7^Ot>>>18^Ot>>>3^Ot<<25^Ot<<14)+(Kt>>>17^Kt>>>19^Kt>>>10^Kt<<15^Kt<<13)+Ut+yt|0;Wt=Ut+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0xc6e00bf3|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;Ot=(Nt>>>7^Nt>>>18^Nt>>>3^Nt<<25^Nt<<14)+(It>>>17^It>>>19^It>>>10^It<<15^It<<13)+Ot+mt|0;Ht=Ot+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0xd5a79147|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;Nt=(jt>>>7^jt>>>18^jt>>>3^jt<<25^jt<<14)+(Ut>>>17^Ut>>>19^Ut>>>10^Ut<<15^Ut<<13)+Nt+vt|0;Lt=Nt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0x06ca6351|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;jt=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Ot>>>17^Ot>>>19^Ot>>>10^Ot<<15^Ot<<13)+jt+_t|0;Ft=jt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0x14292967|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;Ae=(Se>>>7^Se>>>18^Se>>>3^Se<<25^Se<<14)+(Nt>>>17^Nt>>>19^Nt>>>10^Nt<<15^Nt<<13)+Ae+Rt|0;Vt=Ae+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0x27b70a85|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Se=(Ke>>>7^Ke>>>18^Ke>>>3^Ke<<25^Ke<<14)+(jt>>>17^jt>>>19^jt>>>10^jt<<15^jt<<13)+Se+Kt|0;Yt=Se+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0x2e1b2138|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;Ke=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+Ke+It|0;$t=Ke+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0x4d2c6dfc|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Se>>>17^Se>>>19^Se>>>10^Se<<15^Se<<13)+ht+Ut|0;Gt=ht+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0x53380d13|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;ft=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+(Ke>>>17^Ke>>>19^Ke>>>10^Ke<<15^Ke<<13)+ft+Ot|0;Wt=ft+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0x650a7354|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;yt=(mt>>>7^mt>>>18^mt>>>3^mt<<25^mt<<14)+(ht>>>17^ht>>>19^ht>>>10^ht<<15^ht<<13)+yt+Nt|0;Ht=yt+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0x766a0abb|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;mt=(vt>>>7^vt>>>18^vt>>>3^vt<<25^vt<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+mt+jt|0;Lt=mt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0x81c2c92e|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;vt=(_t>>>7^_t>>>18^_t>>>3^_t<<25^_t<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+vt+Ae|0;Ft=vt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0x92722c85|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;_t=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(mt>>>17^mt>>>19^mt>>>10^mt<<15^mt<<13)+_t+Se|0;Vt=_t+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0xa2bfe8a1|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Rt=(Kt>>>7^Kt>>>18^Kt>>>3^Kt<<25^Kt<<14)+(vt>>>17^vt>>>19^vt>>>10^vt<<15^vt<<13)+Rt+Ke|0;Yt=Rt+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0xa81a664b|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;Kt=(It>>>7^It>>>18^It>>>3^It<<25^It<<14)+(_t>>>17^_t>>>19^_t>>>10^_t<<15^_t<<13)+Kt+ht|0;$t=Kt+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0xc24b8b70|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;It=(Ut>>>7^Ut>>>18^Ut>>>3^Ut<<25^Ut<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+It+ft|0;Gt=It+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0xc76c51a3|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;Ut=(Ot>>>7^Ot>>>18^Ot>>>3^Ot<<25^Ot<<14)+(Kt>>>17^Kt>>>19^Kt>>>10^Kt<<15^Kt<<13)+Ut+yt|0;Wt=Ut+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0xd192e819|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;Ot=(Nt>>>7^Nt>>>18^Nt>>>3^Nt<<25^Nt<<14)+(It>>>17^It>>>19^It>>>10^It<<15^It<<13)+Ot+mt|0;Ht=Ot+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0xd6990624|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;Nt=(jt>>>7^jt>>>18^jt>>>3^jt<<25^jt<<14)+(Ut>>>17^Ut>>>19^Ut>>>10^Ut<<15^Ut<<13)+Nt+vt|0;Lt=Nt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0xf40e3585|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;jt=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Ot>>>17^Ot>>>19^Ot>>>10^Ot<<15^Ot<<13)+jt+_t|0;Ft=jt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0x106aa070|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;Ae=(Se>>>7^Se>>>18^Se>>>3^Se<<25^Se<<14)+(Nt>>>17^Nt>>>19^Nt>>>10^Nt<<15^Nt<<13)+Ae+Rt|0;Vt=Ae+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0x19a4c116|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Se=(Ke>>>7^Ke>>>18^Ke>>>3^Ke<<25^Ke<<14)+(jt>>>17^jt>>>19^jt>>>10^jt<<15^jt<<13)+Se+Kt|0;Yt=Se+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0x1e376c08|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;Ke=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+Ke+It|0;$t=Ke+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0x2748774c|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Se>>>17^Se>>>19^Se>>>10^Se<<15^Se<<13)+ht+Ut|0;Gt=ht+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0x34b0bcb5|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;ft=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+(Ke>>>17^Ke>>>19^Ke>>>10^Ke<<15^Ke<<13)+ft+Ot|0;Wt=ft+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0x391c0cb3|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;yt=(mt>>>7^mt>>>18^mt>>>3^mt<<25^mt<<14)+(ht>>>17^ht>>>19^ht>>>10^ht<<15^ht<<13)+yt+Nt|0;Ht=yt+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0x4ed8aa4a|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;mt=(vt>>>7^vt>>>18^vt>>>3^vt<<25^vt<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+mt+jt|0;Lt=mt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0x5b9cca4f|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;vt=(_t>>>7^_t>>>18^_t>>>3^_t<<25^_t<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+vt+Ae|0;Ft=vt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0x682e6ff3|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;_t=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(mt>>>17^mt>>>19^mt>>>10^mt<<15^mt<<13)+_t+Se|0;Vt=_t+Vt+(Gt>>>6^Gt>>>11^Gt>>>25^Gt<<26^Gt<<21^Gt<<7)+(Yt^Gt&($t^Yt))+0x748f82ee|0;Wt=Wt+Vt|0;Vt=Vt+(Ft&Lt^Ht&(Ft^Lt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Rt=(Kt>>>7^Kt>>>18^Kt>>>3^Kt<<25^Kt<<14)+(vt>>>17^vt>>>19^vt>>>10^vt<<15^vt<<13)+Rt+Ke|0;Yt=Rt+Yt+(Wt>>>6^Wt>>>11^Wt>>>25^Wt<<26^Wt<<21^Wt<<7)+($t^Wt&(Gt^$t))+0x78a5636f|0;Ht=Ht+Yt|0;Yt=Yt+(Vt&Ft^Lt&(Vt^Ft))+(Vt>>>2^Vt>>>13^Vt>>>22^Vt<<30^Vt<<19^Vt<<10)|0;Kt=(It>>>7^It>>>18^It>>>3^It<<25^It<<14)+(_t>>>17^_t>>>19^_t>>>10^_t<<15^_t<<13)+Kt+ht|0;$t=Kt+$t+(Ht>>>6^Ht>>>11^Ht>>>25^Ht<<26^Ht<<21^Ht<<7)+(Gt^Ht&(Wt^Gt))+0x84c87814|0;Lt=Lt+$t|0;$t=$t+(Yt&Vt^Ft&(Yt^Vt))+(Yt>>>2^Yt>>>13^Yt>>>22^Yt<<30^Yt<<19^Yt<<10)|0;It=(Ut>>>7^Ut>>>18^Ut>>>3^Ut<<25^Ut<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+It+ft|0;Gt=It+Gt+(Lt>>>6^Lt>>>11^Lt>>>25^Lt<<26^Lt<<21^Lt<<7)+(Wt^Lt&(Ht^Wt))+0x8cc70208|0;Ft=Ft+Gt|0;Gt=Gt+($t&Yt^Vt&($t^Yt))+($t>>>2^$t>>>13^$t>>>22^$t<<30^$t<<19^$t<<10)|0;Ut=(Ot>>>7^Ot>>>18^Ot>>>3^Ot<<25^Ot<<14)+(Kt>>>17^Kt>>>19^Kt>>>10^Kt<<15^Kt<<13)+Ut+yt|0;Wt=Ut+Wt+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Ht^Ft&(Lt^Ht))+0x90befffa|0;Vt=Vt+Wt|0;Wt=Wt+(Gt&$t^Yt&(Gt^$t))+(Gt>>>2^Gt>>>13^Gt>>>22^Gt<<30^Gt<<19^Gt<<10)|0;Ot=(Nt>>>7^Nt>>>18^Nt>>>3^Nt<<25^Nt<<14)+(It>>>17^It>>>19^It>>>10^It<<15^It<<13)+Ot+mt|0;Ht=Ot+Ht+(Vt>>>6^Vt>>>11^Vt>>>25^Vt<<26^Vt<<21^Vt<<7)+(Lt^Vt&(Ft^Lt))+0xa4506ceb|0;Yt=Yt+Ht|0;Ht=Ht+(Wt&Gt^$t&(Wt^Gt))+(Wt>>>2^Wt>>>13^Wt>>>22^Wt<<30^Wt<<19^Wt<<10)|0;Nt=(jt>>>7^jt>>>18^jt>>>3^jt<<25^jt<<14)+(Ut>>>17^Ut>>>19^Ut>>>10^Ut<<15^Ut<<13)+Nt+vt|0;Lt=Nt+Lt+(Yt>>>6^Yt>>>11^Yt>>>25^Yt<<26^Yt<<21^Yt<<7)+(Ft^Yt&(Vt^Ft))+0xbef9a3f7|0;$t=$t+Lt|0;Lt=Lt+(Ht&Wt^Gt&(Ht^Wt))+(Ht>>>2^Ht>>>13^Ht>>>22^Ht<<30^Ht<<19^Ht<<10)|0;jt=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Ot>>>17^Ot>>>19^Ot>>>10^Ot<<15^Ot<<13)+jt+_t|0;Ft=jt+Ft+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(Vt^$t&(Yt^Vt))+0xc67178f2|0;Gt=Gt+Ft|0;Ft=Ft+(Lt&Ht^Wt&(Lt^Ht))+(Lt>>>2^Lt>>>13^Lt>>>22^Lt<<30^Lt<<19^Lt<<10)|0;qe=qe+Ft|0;Fe=Fe+Lt|0;$e=$e+Ht|0;rt=rt+Wt|0;it=it+Gt|0;nt=nt+$t|0;st=st+Yt|0;ut=ut+Vt|0}function D(Ae){Ae=Ae|0;K($t[Ae|0]<<24|$t[Ae|1]<<16|$t[Ae|2]<<8|$t[Ae|3],$t[Ae|4]<<24|$t[Ae|5]<<16|$t[Ae|6]<<8|$t[Ae|7],$t[Ae|8]<<24|$t[Ae|9]<<16|$t[Ae|10]<<8|$t[Ae|11],$t[Ae|12]<<24|$t[Ae|13]<<16|$t[Ae|14]<<8|$t[Ae|15],$t[Ae|16]<<24|$t[Ae|17]<<16|$t[Ae|18]<<8|$t[Ae|19],$t[Ae|20]<<24|$t[Ae|21]<<16|$t[Ae|22]<<8|$t[Ae|23],$t[Ae|24]<<24|$t[Ae|25]<<16|$t[Ae|26]<<8|$t[Ae|27],$t[Ae|28]<<24|$t[Ae|29]<<16|$t[Ae|30]<<8|$t[Ae|31],$t[Ae|32]<<24|$t[Ae|33]<<16|$t[Ae|34]<<8|$t[Ae|35],$t[Ae|36]<<24|$t[Ae|37]<<16|$t[Ae|38]<<8|$t[Ae|39],$t[Ae|40]<<24|$t[Ae|41]<<16|$t[Ae|42]<<8|$t[Ae|43],$t[Ae|44]<<24|$t[Ae|45]<<16|$t[Ae|46]<<8|$t[Ae|47],$t[Ae|48]<<24|$t[Ae|49]<<16|$t[Ae|50]<<8|$t[Ae|51],$t[Ae|52]<<24|$t[Ae|53]<<16|$t[Ae|54]<<8|$t[Ae|55],$t[Ae|56]<<24|$t[Ae|57]<<16|$t[Ae|58]<<8|$t[Ae|59],$t[Ae|60]<<24|$t[Ae|61]<<16|$t[Ae|62]<<8|$t[Ae|63])}function R(Ae){Ae=Ae|0;$t[Ae|0]=qe>>>24;$t[Ae|1]=qe>>>16&255;$t[Ae|2]=qe>>>8&255;$t[Ae|3]=qe&255;$t[Ae|4]=Fe>>>24;$t[Ae|5]=Fe>>>16&255;$t[Ae|6]=Fe>>>8&255;$t[Ae|7]=Fe&255;$t[Ae|8]=$e>>>24;$t[Ae|9]=$e>>>16&255;$t[Ae|10]=$e>>>8&255;$t[Ae|11]=$e&255;$t[Ae|12]=rt>>>24;$t[Ae|13]=rt>>>16&255;$t[Ae|14]=rt>>>8&255;$t[Ae|15]=rt&255;$t[Ae|16]=it>>>24;$t[Ae|17]=it>>>16&255;$t[Ae|18]=it>>>8&255;$t[Ae|19]=it&255;$t[Ae|20]=nt>>>24;$t[Ae|21]=nt>>>16&255;$t[Ae|22]=nt>>>8&255;$t[Ae|23]=nt&255;$t[Ae|24]=st>>>24;$t[Ae|25]=st>>>16&255;$t[Ae|26]=st>>>8&255;$t[Ae|27]=st&255;$t[Ae|28]=ut>>>24;$t[Ae|29]=ut>>>16&255;$t[Ae|30]=ut>>>8&255;$t[Ae|31]=ut&255}function U(){qe=0x6a09e667;Fe=0xbb67ae85;$e=0x3c6ef372;rt=0xa54ff53a;it=0x510e527f;nt=0x9b05688c;st=0x1f83d9ab;ut=0x5be0cd19;ht=ft=0}function I(Ae,Se,Ke,yt,mt,vt,_t,Rt,Kt,It){Ae=Ae|0;Se=Se|0;Ke=Ke|0;yt=yt|0;mt=mt|0;vt=vt|0;_t=_t|0;Rt=Rt|0;Kt=Kt|0;It=It|0;qe=Ae;Fe=Se;$e=Ke;rt=yt;it=mt;nt=vt;st=_t;ut=Rt;ht=Kt;ft=It}function B(Ae,Se){Ae=Ae|0;Se=Se|0;var Ke=0;if(Ae&63)return-1;while((Se|0)>=64){D(Ae);Ae=Ae+64|0;Se=Se-64|0;Ke=Ke+64|0}ht=ht+Ke|0;if(ht>>>0<Ke>>>0)ft=ft+1|0;return Ke|0}function T(Ae,Se,Ke){Ae=Ae|0;Se=Se|0;Ke=Ke|0;var qe=0,Fe=0;if(Ae&63)return-1;if(~Ke)if(Ke&31)return-1;if((Se|0)>=64){qe=B(Ae,Se)|0;if((qe|0)==-1)return-1;Ae=Ae+qe|0;Se=Se-qe|0}qe=qe+Se|0;ht=ht+Se|0;if(ht>>>0<Se>>>0)ft=ft+1|0;$t[Ae|Se]=0x80;if((Se|0)>=56){for(Fe=Se+1|0;(Fe|0)<64;Fe=Fe+1|0)$t[Ae|Fe]=0x00;D(Ae);Se=0;$t[Ae|0]=0}for(Fe=Se+1|0;(Fe|0)<59;Fe=Fe+1|0)$t[Ae|Fe]=0;$t[Ae|56]=ft>>>21&255;$t[Ae|57]=ft>>>13&255;$t[Ae|58]=ft>>>5&255;$t[Ae|59]=ft<<3&255|ht>>>29;$t[Ae|60]=ht>>>21&255;$t[Ae|61]=ht>>>13&255;$t[Ae|62]=ht>>>5&255;$t[Ae|63]=ht<<3&255;D(Ae);if(~Ke)R(Ke);return qe|0}function z(){qe=yt;Fe=mt;$e=vt;rt=_t;it=Rt;nt=Kt;st=It;ut=Ut;ht=64;ft=0}function q(){qe=Ot;Fe=Nt;$e=jt;rt=Ft;it=Lt;nt=Ht;st=Wt;ut=Gt;ht=64;ft=0}function F(Ae,Se,Ke,$t,Yt,Vt,Zt,Qt,er,tr,rr,ir,nr,sr,ar,cr){Ae=Ae|0;Se=Se|0;Ke=Ke|0;$t=$t|0;Yt=Yt|0;Vt=Vt|0;Zt=Zt|0;Qt=Qt|0;er=er|0;tr=tr|0;rr=rr|0;ir=ir|0;nr=nr|0;sr=sr|0;ar=ar|0;cr=cr|0;U();K(Ae^0x5c5c5c5c,Se^0x5c5c5c5c,Ke^0x5c5c5c5c,$t^0x5c5c5c5c,Yt^0x5c5c5c5c,Vt^0x5c5c5c5c,Zt^0x5c5c5c5c,Qt^0x5c5c5c5c,er^0x5c5c5c5c,tr^0x5c5c5c5c,rr^0x5c5c5c5c,ir^0x5c5c5c5c,nr^0x5c5c5c5c,sr^0x5c5c5c5c,ar^0x5c5c5c5c,cr^0x5c5c5c5c);Ot=qe;Nt=Fe;jt=$e;Ft=rt;Lt=it;Ht=nt;Wt=st;Gt=ut;U();K(Ae^0x36363636,Se^0x36363636,Ke^0x36363636,$t^0x36363636,Yt^0x36363636,Vt^0x36363636,Zt^0x36363636,Qt^0x36363636,er^0x36363636,tr^0x36363636,rr^0x36363636,ir^0x36363636,nr^0x36363636,sr^0x36363636,ar^0x36363636,cr^0x36363636);yt=qe;mt=Fe;vt=$e;_t=rt;Rt=it;Kt=nt;It=st;Ut=ut;ht=64;ft=0}function O(Ae,Se,Ke){Ae=Ae|0;Se=Se|0;Ke=Ke|0;var ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0;if(Ae&63)return-1;if(~Ke)if(Ke&31)return-1;It=T(Ae,Se,-1)|0;ht=qe,ft=Fe,yt=$e,mt=rt,vt=it,_t=nt,Rt=st,Kt=ut;q();K(ht,ft,yt,mt,vt,_t,Rt,Kt,0x80000000,0,0,0,0,0,0,768);if(~Ke)R(Ke);return It|0}function N(Ae,Se,Ke,ht,ft){Ae=Ae|0;Se=Se|0;Ke=Ke|0;ht=ht|0;ft=ft|0;var yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,jt=0,Ft=0,Lt=0,Ht=0,Wt=0,Gt=0;if(Ae&63)return-1;if(~ft)if(ft&31)return-1;$t[Ae+Se|0]=Ke>>>24;$t[Ae+Se+1|0]=Ke>>>16&255;$t[Ae+Se+2|0]=Ke>>>8&255;$t[Ae+Se+3|0]=Ke&255;O(Ae,Se+4|0,-1)|0;yt=Ot=qe,mt=Nt=Fe,vt=jt=$e,_t=Ft=rt,Rt=Lt=it,Kt=Ht=nt,It=Wt=st,Ut=Gt=ut;ht=ht-1|0;while((ht|0)>0){z();K(Ot,Nt,jt,Ft,Lt,Ht,Wt,Gt,0x80000000,0,0,0,0,0,0,768);Ot=qe,Nt=Fe,jt=$e,Ft=rt,Lt=it,Ht=nt,Wt=st,Gt=ut;q();K(Ot,Nt,jt,Ft,Lt,Ht,Wt,Gt,0x80000000,0,0,0,0,0,0,768);Ot=qe,Nt=Fe,jt=$e,Ft=rt,Lt=it,Ht=nt,Wt=st,Gt=ut;yt=yt^qe;mt=mt^Fe;vt=vt^$e;_t=_t^rt;Rt=Rt^it;Kt=Kt^nt;It=It^st;Ut=Ut^ut;ht=ht-1|0}qe=yt;Fe=mt;$e=vt;rt=_t;it=Rt;nt=Kt;st=It;ut=Ut;if(~ft)R(ft);return 0}return{reset:U,init:I,process:B,finish:T,hmac_reset:z,hmac_init:F,hmac_finish:O,pbkdf2_generate_block:N}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Nr.push(this.heap),jr.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(Ae){return(new pt).process(Ae).finish().result}}pt.NAME="sha256";var Lr=bt;function bt(Ae,Se){if(!Ae)throw Error(Se||"Assertion failed")}bt.equal=function(Ae,Se,Ke){if(Ae!=Se)throw Error(Ke||"Assertion failed: "+Ae+" != "+Se)};var Wr=void 0!==qe?qe:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function gt(Ae,Se){return Ae(Se={exports:{}},Se.exports),Se.exports}function wt(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Qr=gt((function(Ae){Ae.exports="function"==typeof Object.create?function(Ae,Se){Ae.super_=Se,Ae.prototype=Object.create(Se.prototype,{constructor:{value:Ae,enumerable:!1,writable:!0,configurable:!0}})}:function(Ae,Se){Ae.super_=Se;var r=function(){};r.prototype=Se.prototype,Ae.prototype=new r,Ae.prototype.constructor=Ae}})),ti=gt((function(Ae){try{var Se=_t.default;if("function"!=typeof Se.inherits)throw"";Ae.exports=Se.inherits}catch(Se){Ae.exports=Qr}}));var kt=function(Ae,Se){if(Array.isArray(Ae))return Ae.slice();if(!Ae)return[];var Ke=[];if("string"==typeof Ae)if(Se){if("hex"===Se)for((Ae=Ae.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(Ae="0"+Ae),qe=0;qe<Ae.length;qe+=2)Ke.push(parseInt(Ae[qe]+Ae[qe+1],16))}else for(var qe=0;qe<Ae.length;qe++){var Fe=Ae.charCodeAt(qe),$e=Fe>>8,rt=255&Fe;$e?Ke.push($e,rt):Ke.push(rt)}else for(qe=0;qe<Ae.length;qe++)Ke[qe]=0|Ae[qe];return Ke};var At=function(Ae){for(var Se="",Ke=0;Ke<Ae.length;Ke++)Se+=Pt(Ae[Ke].toString(16));return Se};function St(Ae){return(Ae>>>24|Ae>>>8&65280|Ae<<8&16711680|(255&Ae)<<24)>>>0}var Et=function(Ae,Se){for(var Ke="",qe=0;qe<Ae.length;qe++){var Fe=Ae[qe];"little"===Se&&(Fe=St(Fe)),Ke+=xt(Fe.toString(16))}return Ke};function Pt(Ae){return 1===Ae.length?"0"+Ae:Ae}function xt(Ae){return 7===Ae.length?"0"+Ae:6===Ae.length?"00"+Ae:5===Ae.length?"000"+Ae:4===Ae.length?"0000"+Ae:3===Ae.length?"00000"+Ae:2===Ae.length?"000000"+Ae:1===Ae.length?"0000000"+Ae:Ae}var Mt=function(Ae,Se,Ke,qe){var Fe=Ke-Se;Lr(Fe%4==0);for(var $e=Array(Fe/4),rt=0,it=Se;rt<$e.length;rt++,it+=4){var nt;nt="big"===qe?Ae[it]<<24|Ae[it+1]<<16|Ae[it+2]<<8|Ae[it+3]:Ae[it+3]<<24|Ae[it+2]<<16|Ae[it+1]<<8|Ae[it],$e[rt]=nt>>>0}return $e};var Ct=function(Ae,Se){for(var Ke=Array(4*Ae.length),qe=0,Fe=0;qe<Ae.length;qe++,Fe+=4){var $e=Ae[qe];"big"===Se?(Ke[Fe]=$e>>>24,Ke[Fe+1]=$e>>>16&255,Ke[Fe+2]=$e>>>8&255,Ke[Fe+3]=255&$e):(Ke[Fe+3]=$e>>>24,Ke[Fe+2]=$e>>>16&255,Ke[Fe+1]=$e>>>8&255,Ke[Fe]=255&$e)}return Ke};var ri={inherits:ti,toArray:kt,toHex:At,htonl:St,toHex32:Et,zero2:Pt,zero8:xt,join32:Mt,split32:Ct,rotr32:function(Ae,Se){return Ae>>>Se|Ae<<32-Se},rotl32:function(Ae,Se){return Ae<<Se|Ae>>>32-Se},sum32:function(Ae,Se){return Ae+Se>>>0},sum32_3:function(Ae,Se,Ke){return Ae+Se+Ke>>>0},sum32_4:function(Ae,Se,Ke,qe){return Ae+Se+Ke+qe>>>0},sum32_5:function(Ae,Se,Ke,qe,Fe){return Ae+Se+Ke+qe+Fe>>>0},sum64:function(Ae,Se,Ke,qe){var Fe=Ae[Se],$e=qe+Ae[Se+1]>>>0,rt=($e<qe?1:0)+Ke+Fe;Ae[Se]=rt>>>0,Ae[Se+1]=$e},sum64_hi:function(Ae,Se,Ke,qe){return(Se+qe>>>0<Se?1:0)+Ae+Ke>>>0},sum64_lo:function(Ae,Se,Ke,qe){return Se+qe>>>0},sum64_4_hi:function(Ae,Se,Ke,qe,Fe,$e,rt,it){var nt=0,st=Se;return nt+=(st=st+qe>>>0)<Se?1:0,nt+=(st=st+$e>>>0)<$e?1:0,Ae+Ke+Fe+rt+(nt+=(st=st+it>>>0)<it?1:0)>>>0},sum64_4_lo:function(Ae,Se,Ke,qe,Fe,$e,rt,it){return Se+qe+$e+it>>>0},sum64_5_hi:function(Ae,Se,Ke,qe,Fe,$e,rt,it,nt,st){var ut=0,ht=Se;return ut+=(ht=ht+qe>>>0)<Se?1:0,ut+=(ht=ht+$e>>>0)<$e?1:0,ut+=(ht=ht+it>>>0)<it?1:0,Ae+Ke+Fe+rt+nt+(ut+=(ht=ht+st>>>0)<st?1:0)>>>0},sum64_5_lo:function(Ae,Se,Ke,qe,Fe,$e,rt,it,nt,st){return Se+qe+$e+it+st>>>0},rotr64_hi:function(Ae,Se,Ke){return(Se<<32-Ke|Ae>>>Ke)>>>0},rotr64_lo:function(Ae,Se,Ke){return(Ae<<32-Ke|Se>>>Ke)>>>0},shr64_hi:function(Ae,Se,Ke){return Ae>>>Ke},shr64_lo:function(Ae,Se,Ke){return(Ae<<32-Ke|Se>>>Ke)>>>0}};function Dt(){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 ii=Dt;Dt.prototype.update=function(Ae,Se){if(Ae=ri.toArray(Ae,Se),this.pending?this.pending=this.pending.concat(Ae):this.pending=Ae,this.pendingTotal+=Ae.length,this.pending.length>=this._delta8){var Ke=(Ae=this.pending).length%this._delta8;this.pending=Ae.slice(Ae.length-Ke,Ae.length),0===this.pending.length&&(this.pending=null),Ae=ri.join32(Ae,0,Ae.length-Ke,this.endian);for(var qe=0;qe<Ae.length;qe+=this._delta32)this._update(Ae,qe,qe+this._delta32)}return this},Dt.prototype.digest=function(Ae){return this.update(this._pad()),Lr(null===this.pending),this._digest(Ae)},Dt.prototype._pad=function(){var Ae=this.pendingTotal,Se=this._delta8,Ke=Se-(Ae+this.padLength)%Se,qe=Array(Ke+this.padLength);qe[0]=128;for(var Fe=1;Fe<Ke;Fe++)qe[Fe]=0;if(Ae<<=3,"big"===this.endian){for(var $e=8;$e<this.padLength;$e++)qe[Fe++]=0;qe[Fe++]=0,qe[Fe++]=0,qe[Fe++]=0,qe[Fe++]=0,qe[Fe++]=Ae>>>24&255,qe[Fe++]=Ae>>>16&255,qe[Fe++]=Ae>>>8&255,qe[Fe++]=255&Ae}else for(qe[Fe++]=255&Ae,qe[Fe++]=Ae>>>8&255,qe[Fe++]=Ae>>>16&255,qe[Fe++]=Ae>>>24&255,qe[Fe++]=0,qe[Fe++]=0,qe[Fe++]=0,qe[Fe++]=0,$e=8;$e<this.padLength;$e++)qe[Fe++]=0;return qe};var oi={BlockHash:ii},ci=ri.rotr32;var Bt=function(Ae,Se,Ke,qe){return 0===Ae?Tt(Se,Ke,qe):1===Ae||3===Ae?qt(Se,Ke,qe):2===Ae?zt(Se,Ke,qe):void 0};function Tt(Ae,Se,Ke){return Ae&Se^~Ae&Ke}function zt(Ae,Se,Ke){return Ae&Se^Ae&Ke^Se&Ke}function qt(Ae,Se,Ke){return Ae^Se^Ke}var fi={ft_1:Bt,ch32:Tt,maj32:zt,p32:qt,s0_256:function(Ae){return ci(Ae,2)^ci(Ae,13)^ci(Ae,22)},s1_256:function(Ae){return ci(Ae,6)^ci(Ae,11)^ci(Ae,25)},g0_256:function(Ae){return ci(Ae,7)^ci(Ae,18)^Ae>>>3},g1_256:function(Ae){return ci(Ae,17)^ci(Ae,19)^Ae>>>10}},li=ri.sum32,di=ri.sum32_4,pi=ri.sum32_5,yi=fi.ch32,gi=fi.maj32,vi=fi.s0_256,wi=fi.s1_256,ki=fi.g0_256,Si=fi.g1_256,Ei=oi.BlockHash,Mi=[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 Xt(){if(!(this instanceof Xt))return new Xt;Ei.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Mi,this.W=Array(64)}ri.inherits(Xt,Ei);var Pi=Xt;function Jt(){if(!(this instanceof Jt))return new Jt;Pi.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Xt.blockSize=512,Xt.outSize=256,Xt.hmacStrength=192,Xt.padLength=64,Xt.prototype._update=function(Ae,Se){for(var Ke=this.W,qe=0;qe<16;qe++)Ke[qe]=Ae[Se+qe];for(;qe<Ke.length;qe++)Ke[qe]=di(Si(Ke[qe-2]),Ke[qe-7],ki(Ke[qe-15]),Ke[qe-16]);var Fe=this.h[0],$e=this.h[1],rt=this.h[2],it=this.h[3],nt=this.h[4],st=this.h[5],ut=this.h[6],ht=this.h[7];for(Lr(this.k.length===Ke.length),qe=0;qe<Ke.length;qe++){var ft=pi(ht,wi(nt),yi(nt,st,ut),this.k[qe],Ke[qe]),yt=li(vi(Fe),gi(Fe,$e,rt));ht=ut,ut=st,st=nt,nt=li(it,ft),it=rt,rt=$e,$e=Fe,Fe=li(ft,yt)}this.h[0]=li(this.h[0],Fe),this.h[1]=li(this.h[1],$e),this.h[2]=li(this.h[2],rt),this.h[3]=li(this.h[3],it),this.h[4]=li(this.h[4],nt),this.h[5]=li(this.h[5],st),this.h[6]=li(this.h[6],ut),this.h[7]=li(this.h[7],ht)},Xt.prototype._digest=function(Ae){return"hex"===Ae?ri.toHex32(this.h,"big"):ri.split32(this.h,"big")},ri.inherits(Jt,Pi);var xi=Jt;Jt.blockSize=512,Jt.outSize=224,Jt.hmacStrength=192,Jt.padLength=64,Jt.prototype._digest=function(Ae){return"hex"===Ae?ri.toHex32(this.h.slice(0,7),"big"):ri.split32(this.h.slice(0,7),"big")};var Ci=ri.rotr64_hi,Ri=ri.rotr64_lo,Di=ri.shr64_hi,Ti=ri.shr64_lo,Ki=ri.sum64,qi=ri.sum64_hi,ji=ri.sum64_lo,zi=ri.sum64_4_hi,Li=ri.sum64_4_lo,Hi=ri.sum64_5_hi,$i=ri.sum64_5_lo,Yi=oi.BlockHash,Vi=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function pr(){if(!(this instanceof pr))return new pr;Yi.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Vi,this.W=Array(160)}ri.inherits(pr,Yi);var Zi=pr;function br(Ae,Se,Ke,qe,Fe){var $e=Ae&Ke^~Ae&Fe;return $e<0&&($e+=4294967296),$e}function mr(Ae,Se,Ke,qe,Fe,$e){var rt=Se&qe^~Se&$e;return rt<0&&(rt+=4294967296),rt}function gr(Ae,Se,Ke,qe,Fe){var $e=Ae&Ke^Ae&Fe^Ke&Fe;return $e<0&&($e+=4294967296),$e}function wr(Ae,Se,Ke,qe,Fe,$e){var rt=Se&qe^Se&$e^qe&$e;return rt<0&&(rt+=4294967296),rt}function vr(Ae,Se){var Ke=Ci(Ae,Se,28)^Ci(Se,Ae,2)^Ci(Se,Ae,7);return Ke<0&&(Ke+=4294967296),Ke}function _r(Ae,Se){var Ke=Ri(Ae,Se,28)^Ri(Se,Ae,2)^Ri(Se,Ae,7);return Ke<0&&(Ke+=4294967296),Ke}function kr(Ae,Se){var Ke=Ci(Ae,Se,14)^Ci(Ae,Se,18)^Ci(Se,Ae,9);return Ke<0&&(Ke+=4294967296),Ke}function Ar(Ae,Se){var Ke=Ri(Ae,Se,14)^Ri(Ae,Se,18)^Ri(Se,Ae,9);return Ke<0&&(Ke+=4294967296),Ke}function Sr(Ae,Se){var Ke=Ci(Ae,Se,1)^Ci(Ae,Se,8)^Di(Ae,Se,7);return Ke<0&&(Ke+=4294967296),Ke}function Er(Ae,Se){var Ke=Ri(Ae,Se,1)^Ri(Ae,Se,8)^Ti(Ae,Se,7);return Ke<0&&(Ke+=4294967296),Ke}function Pr(Ae,Se){var Ke=Ci(Ae,Se,19)^Ci(Se,Ae,29)^Di(Ae,Se,6);return Ke<0&&(Ke+=4294967296),Ke}function xr(Ae,Se){var Ke=Ri(Ae,Se,19)^Ri(Se,Ae,29)^Ti(Ae,Se,6);return Ke<0&&(Ke+=4294967296),Ke}function Mr(){if(!(this instanceof Mr))return new Mr;Zi.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}pr.blockSize=1024,pr.outSize=512,pr.hmacStrength=192,pr.padLength=128,pr.prototype._prepareBlock=function(Ae,Se){for(var Ke=this.W,qe=0;qe<32;qe++)Ke[qe]=Ae[Se+qe];for(;qe<Ke.length;qe+=2){var Fe=Pr(Ke[qe-4],Ke[qe-3]),$e=xr(Ke[qe-4],Ke[qe-3]),rt=Ke[qe-14],it=Ke[qe-13],nt=Sr(Ke[qe-30],Ke[qe-29]),st=Er(Ke[qe-30],Ke[qe-29]),ut=Ke[qe-32],ht=Ke[qe-31];Ke[qe]=zi(Fe,$e,rt,it,nt,st,ut,ht),Ke[qe+1]=Li(Fe,$e,rt,it,nt,st,ut,ht)}},pr.prototype._update=function(Ae,Se){this._prepareBlock(Ae,Se);var Ke=this.W,qe=this.h[0],Fe=this.h[1],$e=this.h[2],rt=this.h[3],it=this.h[4],nt=this.h[5],st=this.h[6],ut=this.h[7],ht=this.h[8],ft=this.h[9],yt=this.h[10],mt=this.h[11],vt=this.h[12],_t=this.h[13],Rt=this.h[14],Kt=this.h[15];Lr(this.k.length===Ke.length);for(var It=0;It<Ke.length;It+=2){var Ut=Rt,Ot=Kt,Nt=kr(ht,ft),jt=Ar(ht,ft),Ft=br(ht,ft,yt,mt,vt),Lt=mr(ht,ft,yt,mt,vt,_t),Ht=this.k[It],Wt=this.k[It+1],Gt=Ke[It],$t=Ke[It+1],Yt=Hi(Ut,Ot,Nt,jt,Ft,Lt,Ht,Wt,Gt,$t),Vt=$i(Ut,Ot,Nt,jt,Ft,Lt,Ht,Wt,Gt,$t);Ut=vr(qe,Fe),Ot=_r(qe,Fe),Nt=gr(qe,Fe,$e,rt,it),jt=wr(qe,Fe,$e,rt,it,nt);var Zt=qi(Ut,Ot,Nt,jt),Qt=ji(Ut,Ot,Nt,jt);Rt=vt,Kt=_t,vt=yt,_t=mt,yt=ht,mt=ft,ht=qi(st,ut,Yt,Vt),ft=ji(ut,ut,Yt,Vt),st=it,ut=nt,it=$e,nt=rt,$e=qe,rt=Fe,qe=qi(Yt,Vt,Zt,Qt),Fe=ji(Yt,Vt,Zt,Qt)}Ki(this.h,0,qe,Fe),Ki(this.h,2,$e,rt),Ki(this.h,4,it,nt),Ki(this.h,6,st,ut),Ki(this.h,8,ht,ft),Ki(this.h,10,yt,mt),Ki(this.h,12,vt,_t),Ki(this.h,14,Rt,Kt)},pr.prototype._digest=function(Ae){return"hex"===Ae?ri.toHex32(this.h,"big"):ri.split32(this.h,"big")},ri.inherits(Mr,Zi);var Xi=Mr;Mr.blockSize=1024,Mr.outSize=384,Mr.hmacStrength=192,Mr.padLength=128,Mr.prototype._digest=function(Ae){return"hex"===Ae?ri.toHex32(this.h.slice(0,12),"big"):ri.split32(this.h.slice(0,12),"big")};var Ji=ri.rotl32,en=ri.sum32,tn=ri.sum32_3,an=ri.sum32_4,cn=oi.BlockHash;function Br(){if(!(this instanceof Br))return new Br;cn.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}ri.inherits(Br,cn);var un=Br;function zr(Ae,Se,Ke,qe){return Ae<=15?Se^Ke^qe:Ae<=31?Se&Ke|~Se&qe:Ae<=47?(Se|~Ke)^qe:Ae<=63?Se&qe|Ke&~qe:Se^(Ke|~qe)}function qr(Ae){return Ae<=15?0:Ae<=31?1518500249:Ae<=47?1859775393:Ae<=63?2400959708:2840853838}function Fr(Ae){return Ae<=15?1352829926:Ae<=31?1548603684:Ae<=47?1836072691:Ae<=63?2053994217:0}Br.blockSize=512,Br.outSize=160,Br.hmacStrength=192,Br.padLength=64,Br.prototype._update=function(Ae,Se){for(var Ke=this.h[0],qe=this.h[1],Fe=this.h[2],$e=this.h[3],rt=this.h[4],it=Ke,nt=qe,st=Fe,ut=$e,ht=rt,ft=0;ft<80;ft++){var yt=en(Ji(an(Ke,zr(ft,qe,Fe,$e),Ae[ln[ft]+Se],qr(ft)),yn[ft]),rt);Ke=rt,rt=$e,$e=Ji(Fe,10),Fe=qe,qe=yt,yt=en(Ji(an(it,zr(79-ft,nt,st,ut),Ae[pn[ft]+Se],Fr(ft)),mn[ft]),ht),it=ht,ht=ut,ut=Ji(st,10),st=nt,nt=yt}yt=tn(this.h[1],Fe,ut),this.h[1]=tn(this.h[2],$e,ht),this.h[2]=tn(this.h[3],rt,it),this.h[3]=tn(this.h[4],Ke,nt),this.h[4]=tn(this.h[0],qe,st),this.h[0]=yt},Br.prototype._digest=function(Ae){return"hex"===Ae?ri.toHex32(this.h,"little"):ri.split32(this.h,"little")};var ln=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],pn=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],yn=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],mn=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],gn={ripemd160:un};function Hr(Ae,Se){let Ke=Ae[0],qe=Ae[1],Fe=Ae[2],$e=Ae[3];Ke=Vr(Ke,qe,Fe,$e,Se[0],7,-680876936),$e=Vr($e,Ke,qe,Fe,Se[1],12,-389564586),Fe=Vr(Fe,$e,Ke,qe,Se[2],17,606105819),qe=Vr(qe,Fe,$e,Ke,Se[3],22,-1044525330),Ke=Vr(Ke,qe,Fe,$e,Se[4],7,-176418897),$e=Vr($e,Ke,qe,Fe,Se[5],12,1200080426),Fe=Vr(Fe,$e,Ke,qe,Se[6],17,-1473231341),qe=Vr(qe,Fe,$e,Ke,Se[7],22,-45705983),Ke=Vr(Ke,qe,Fe,$e,Se[8],7,1770035416),$e=Vr($e,Ke,qe,Fe,Se[9],12,-1958414417),Fe=Vr(Fe,$e,Ke,qe,Se[10],17,-42063),qe=Vr(qe,Fe,$e,Ke,Se[11],22,-1990404162),Ke=Vr(Ke,qe,Fe,$e,Se[12],7,1804603682),$e=Vr($e,Ke,qe,Fe,Se[13],12,-40341101),Fe=Vr(Fe,$e,Ke,qe,Se[14],17,-1502002290),qe=Vr(qe,Fe,$e,Ke,Se[15],22,1236535329),Ke=$r(Ke,qe,Fe,$e,Se[1],5,-165796510),$e=$r($e,Ke,qe,Fe,Se[6],9,-1069501632),Fe=$r(Fe,$e,Ke,qe,Se[11],14,643717713),qe=$r(qe,Fe,$e,Ke,Se[0],20,-373897302),Ke=$r(Ke,qe,Fe,$e,Se[5],5,-701558691),$e=$r($e,Ke,qe,Fe,Se[10],9,38016083),Fe=$r(Fe,$e,Ke,qe,Se[15],14,-660478335),qe=$r(qe,Fe,$e,Ke,Se[4],20,-405537848),Ke=$r(Ke,qe,Fe,$e,Se[9],5,568446438),$e=$r($e,Ke,qe,Fe,Se[14],9,-1019803690),Fe=$r(Fe,$e,Ke,qe,Se[3],14,-187363961),qe=$r(qe,Fe,$e,Ke,Se[8],20,1163531501),Ke=$r(Ke,qe,Fe,$e,Se[13],5,-1444681467),$e=$r($e,Ke,qe,Fe,Se[2],9,-51403784),Fe=$r(Fe,$e,Ke,qe,Se[7],14,1735328473),qe=$r(qe,Fe,$e,Ke,Se[12],20,-1926607734),Ke=Zr(Ke,qe,Fe,$e,Se[5],4,-378558),$e=Zr($e,Ke,qe,Fe,Se[8],11,-2022574463),Fe=Zr(Fe,$e,Ke,qe,Se[11],16,1839030562),qe=Zr(qe,Fe,$e,Ke,Se[14],23,-35309556),Ke=Zr(Ke,qe,Fe,$e,Se[1],4,-1530992060),$e=Zr($e,Ke,qe,Fe,Se[4],11,1272893353),Fe=Zr(Fe,$e,Ke,qe,Se[7],16,-155497632),qe=Zr(qe,Fe,$e,Ke,Se[10],23,-1094730640),Ke=Zr(Ke,qe,Fe,$e,Se[13],4,681279174),$e=Zr($e,Ke,qe,Fe,Se[0],11,-358537222),Fe=Zr(Fe,$e,Ke,qe,Se[3],16,-722521979),qe=Zr(qe,Fe,$e,Ke,Se[6],23,76029189),Ke=Zr(Ke,qe,Fe,$e,Se[9],4,-640364487),$e=Zr($e,Ke,qe,Fe,Se[12],11,-421815835),Fe=Zr(Fe,$e,Ke,qe,Se[15],16,530742520),qe=Zr(qe,Fe,$e,Ke,Se[2],23,-995338651),Ke=Yr(Ke,qe,Fe,$e,Se[0],6,-198630844),$e=Yr($e,Ke,qe,Fe,Se[7],10,1126891415),Fe=Yr(Fe,$e,Ke,qe,Se[14],15,-1416354905),qe=Yr(qe,Fe,$e,Ke,Se[5],21,-57434055),Ke=Yr(Ke,qe,Fe,$e,Se[12],6,1700485571),$e=Yr($e,Ke,qe,Fe,Se[3],10,-1894986606),Fe=Yr(Fe,$e,Ke,qe,Se[10],15,-1051523),qe=Yr(qe,Fe,$e,Ke,Se[1],21,-2054922799),Ke=Yr(Ke,qe,Fe,$e,Se[8],6,1873313359),$e=Yr($e,Ke,qe,Fe,Se[15],10,-30611744),Fe=Yr(Fe,$e,Ke,qe,Se[6],15,-1560198380),qe=Yr(qe,Fe,$e,Ke,Se[13],21,1309151649),Ke=Yr(Ke,qe,Fe,$e,Se[4],6,-145523070),$e=Yr($e,Ke,qe,Fe,Se[11],10,-1120210379),Fe=Yr(Fe,$e,Ke,qe,Se[2],15,718787259),qe=Yr(qe,Fe,$e,Ke,Se[9],21,-343485551),Ae[0]=ei(Ke,Ae[0]),Ae[1]=ei(qe,Ae[1]),Ae[2]=ei(Fe,Ae[2]),Ae[3]=ei($e,Ae[3])}function Gr(Ae,Se,Ke,qe,Fe,$e){return Se=ei(ei(Se,Ae),ei(qe,$e)),ei(Se<<Fe|Se>>>32-Fe,Ke)}function Vr(Ae,Se,Ke,qe,Fe,$e,rt){return Gr(Se&Ke|~Se&qe,Ae,Se,Fe,$e,rt)}function $r(Ae,Se,Ke,qe,Fe,$e,rt){return Gr(Se&qe|Ke&~qe,Ae,Se,Fe,$e,rt)}function Zr(Ae,Se,Ke,qe,Fe,$e,rt){return Gr(Se^Ke^qe,Ae,Se,Fe,$e,rt)}function Yr(Ae,Se,Ke,qe,Fe,$e,rt){return Gr(Ke^(Se|~qe),Ae,Se,Fe,$e,rt)}function Xr(Ae){const Se=[];let Ke;for(Ke=0;Ke<64;Ke+=4)Se[Ke>>2]=Ae.charCodeAt(Ke)+(Ae.charCodeAt(Ke+1)<<8)+(Ae.charCodeAt(Ke+2)<<16)+(Ae.charCodeAt(Ke+3)<<24);return Se}const bn="0123456789abcdef".split("");function Jr(Ae){let Se="",Ke=0;for(;Ke<4;Ke++)Se+=bn[Ae>>8*Ke+4&15]+bn[Ae>>8*Ke&15];return Se}function ei(Ae,Se){return Ae+Se&4294967295}const vn=ir.getWebCrypto(),wn=ir.getNodeCrypto(),Bn=wn&&wn.getHashes();function ni(Ae){if(wn&&Bn.includes(Ae))return async function(Se){const Ke=wn.createHash(Ae);return Y(Se,(Ae=>{Ke.update(Ae)}),(()=>new Uint8Array(Ke.digest())))}}function ai(Ae,Se){return async function(Ke,qe=hr){if(_(Ke)&&(Ke=await ie(Ke)),!ir.isStream(Ke)&&vn&&Se&&Ke.length>=qe.minBytesForWebCrypto)return new Uint8Array(await vn.digest(Se,Ke));const Fe=Ae();return Y(Ke,(Ae=>{Fe.update(Ae)}),(()=>new Uint8Array(Fe.digest())))}}function si(Ae,Se){return async function(Ke,qe=hr){if(_(Ke)&&(Ke=await ie(Ke)),ir.isStream(Ke)){const Se=new Ae;return Y(Ke,(Ae=>{Se.process(Ae)}),(()=>Se.finish().result))}return vn&&Se&&Ke.length>=qe.minBytesForWebCrypto?new Uint8Array(await vn.digest(Se,Ke)):Ae.bytes(Ke)}}const Tn={md5:ni("md5")||async function(Ae){const Se=function(Ae){const Se=Ae.length,Ke=[1732584193,-271733879,-1732584194,271733878];let qe;for(qe=64;qe<=Ae.length;qe+=64)Hr(Ke,Xr(Ae.substring(qe-64,qe)));Ae=Ae.substring(qe-64);const Fe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(qe=0;qe<Ae.length;qe++)Fe[qe>>2]|=Ae.charCodeAt(qe)<<(qe%4<<3);if(Fe[qe>>2]|=128<<(qe%4<<3),qe>55)for(Hr(Ke,Fe),qe=0;qe<16;qe++)Fe[qe]=0;return Fe[14]=8*Se,Hr(Ke,Fe),Ke}(ir.uint8ArrayToString(Ae));return ir.hexToUint8Array(function(Ae){for(let Se=0;Se<Ae.length;Se++)Ae[Se]=Jr(Ae[Se]);return Ae.join("")}(Se))},sha1:ni("sha1")||si(dt,"SHA-1"),sha224:ni("sha224")||ai(xi),sha256:ni("sha256")||si(pt,"SHA-256"),sha384:ni("sha384")||ai(Xi,"SHA-384"),sha512:ni("sha512")||ai(Zi,"SHA-512"),ripemd:ni("ripemd160")||ai(un)};var In={md5:Tn.md5,sha1:Tn.sha1,sha224:Tn.sha224,sha256:Tn.sha256,sha384:Tn.sha384,sha512:Tn.sha512,ripemd:Tn.ripemd,digest:function(Ae,Se){switch(Ae){case ur.hash.md5:return this.md5(Se);case ur.hash.sha1:return this.sha1(Se);case ur.hash.ripemd:return this.ripemd(Se);case ur.hash.sha256:return this.sha256(Se);case ur.hash.sha384:return this.sha384(Se);case ur.hash.sha512:return this.sha512(Se);case ur.hash.sha224:return this.sha224(Se);default:throw Error("Invalid hash function.")}},getHashByteLength:function(Ae){switch(Ae){case ur.hash.md5:return 16;case ur.hash.sha1:case ur.hash.ripemd:return 20;case ur.hash.sha256:return 32;case ur.hash.sha384:return 48;case ur.hash.sha512:return 64;case ur.hash.sha224:return 28;default:throw Error("Invalid hash algorithm.")}}};class ui{static encrypt(Ae,Se,Ke){return new ui(Se,Ke).encrypt(Ae)}static decrypt(Ae,Se,Ke){return new ui(Se,Ke).decrypt(Ae)}constructor(Ae,Se,Ke){this.aes=Ke||new Oe(Ae,Se,!0,"CFB"),delete this.aes.padding}encrypt(Ae){return Ie(this.aes.AES_Encrypt_process(Ae),this.aes.AES_Encrypt_finish())}decrypt(Ae){return Ie(this.aes.AES_Decrypt_process(Ae),this.aes.AES_Decrypt_finish())}}function hi(Ae){const Se=ur.read(ur.symmetric,Ae);return Ir[Se]}const qn=ir.getWebCrypto(),zn=ir.getNodeCrypto(),Fn=zn?zn.getCiphers():[],Hn={idea:Fn.includes("idea-cfb")?"idea-cfb":void 0,tripledes:Fn.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,cast5:Fn.includes("cast5-cfb")?"cast5-cfb":void 0,blowfish:Fn.includes("bf-cfb")?"bf-cfb":void 0,aes128:Fn.includes("aes-128-cfb")?"aes-128-cfb":void 0,aes192:Fn.includes("aes-192-cfb")?"aes-192-cfb":void 0,aes256:Fn.includes("aes-256-cfb")?"aes-256-cfb":void 0};var Gn=Object.freeze({__proto__:null,encrypt:async function(Ae,Se,Ke,qe,Fe){const $e=ur.read(ur.symmetric,Ae);if(ir.getNodeCrypto()&&Hn[$e])return function(Ae,Se,Ke,qe){const Fe=ur.read(ur.symmetric,Ae),$e=new zn.createCipheriv(Hn[Fe],Se,qe);return Y(Ke,(Ae=>new Uint8Array($e.update(Ae))))}(Ae,Se,Ke,qe);if("aes"===$e.substr(0,3))return function(Ae,Se,Ke,qe,Fe){if(ir.getWebCrypto()&&24!==Se.length&&!ir.isStream(Ke)&&Ke.length>=3e3*Fe.minBytesForWebCrypto)return async function(Ae,Se,Ke,qe){const Fe="AES-CBC",$e=await qn.importKey("raw",Se,{name:Fe},!1,["encrypt"]),{blockSize:rt}=hi(Ae),it=ir.concatUint8Array([new Uint8Array(rt),Ke]),nt=new Uint8Array(await qn.encrypt({name:Fe,iv:qe},$e,it)).subarray(0,Ke.length);return function(Ae,Se){for(let Ke=0;Ke<Ae.length;Ke++)Ae[Ke]=Ae[Ke]^Se[Ke]}(nt,Ke),nt}(Ae,Se,Ke,qe);const $e=new ui(Se,qe);return Y(Ke,(Ae=>$e.aes.AES_Encrypt_process(Ae)),(()=>$e.aes.AES_Encrypt_finish()))}(Ae,Se,Ke,qe,Fe);const rt=new(hi(Ae))(Se),it=rt.blockSize,nt=qe.slice();let st=new Uint8Array;const h=Ae=>{Ae&&(st=ir.concatUint8Array([st,Ae]));const Se=new Uint8Array(st.length);let Ke,qe=0;for(;Ae?st.length>=it:st.length;){const Ae=rt.encrypt(nt);for(Ke=0;Ke<it;Ke++)nt[Ke]=st[Ke]^Ae[Ke],Se[qe++]=nt[Ke];st=st.subarray(it)}return Se.subarray(0,qe)};return Y(Ke,h,h)},decrypt:async function(Ae,Se,Ke,qe){const Fe=ur.read(ur.symmetric,Ae);if(ir.getNodeCrypto()&&Hn[Fe])return function(Ae,Se,Ke,qe){const Fe=ur.read(ur.symmetric,Ae),$e=new zn.createDecipheriv(Hn[Fe],Se,qe);return Y(Ke,(Ae=>new Uint8Array($e.update(Ae))))}(Ae,Se,Ke,qe);if("aes"===Fe.substr(0,3))return function(Ae,Se,Ke,qe){if(ir.isStream(Ke)){const Ae=new ui(Se,qe);return Y(Ke,(Se=>Ae.aes.AES_Decrypt_process(Se)),(()=>Ae.aes.AES_Decrypt_finish()))}return ui.decrypt(Ke,Se,qe)}(0,Se,Ke,qe);const $e=new(hi(Ae))(Se),rt=$e.blockSize;let it=qe,nt=new Uint8Array;const u=Ae=>{Ae&&(nt=ir.concatUint8Array([nt,Ae]));const Se=new Uint8Array(nt.length);let Ke,qe=0;for(;Ae?nt.length>=rt:nt.length;){const Ae=$e.encrypt(it);for(it=nt,Ke=0;Ke<rt;Ke++)Se[qe++]=it[Ke]^Ae[Ke];nt=nt.subarray(rt)}return Se.subarray(0,qe)};return Y(Ke,u,u)}});class bi{static encrypt(Ae,Se,Ke){return new bi(Se,Ke).encrypt(Ae)}static decrypt(Ae,Se,Ke){return new bi(Se,Ke).encrypt(Ae)}constructor(Ae,Se,Ke){this.aes=Ke||new Oe(Ae,void 0,!1,"CTR"),delete this.aes.padding,this.AES_CTR_set_options(Se)}encrypt(Ae){return Ie(this.aes.AES_Encrypt_process(Ae),this.aes.AES_Encrypt_finish())}decrypt(Ae){return Ie(this.aes.AES_Encrypt_process(Ae),this.aes.AES_Encrypt_finish())}AES_CTR_set_options(Ae,Se,Ke){let{asm:qe}=this.aes.acquire_asm();if(void 0!==Ke){if(Ke<8||Ke>48)throw new Te("illegal counter size");let Ae=Math.pow(2,Ke)-1;qe.set_mask(0,0,Ae/4294967296|0,0|Ae)}else Ke=48,qe.set_mask(0,0,65535,4294967295);if(void 0===Ae)throw Error("nonce is required");{let Se=Ae.length;if(!Se||Se>16)throw new Te("illegal nonce size");let Ke=new DataView(new ArrayBuffer(16));new Uint8Array(Ke.buffer).set(Ae),qe.set_nonce(Ke.getUint32(0),Ke.getUint32(4),Ke.getUint32(8),Ke.getUint32(12))}if(void 0!==Se){if(Se<0||Se>=Math.pow(2,Ke))throw new Te("illegal counter value");qe.set_counter(0,0,Se/4294967296|0,0|Se)}}}class mi{static encrypt(Ae,Se,Ke=!0,qe){return new mi(Se,qe,Ke).encrypt(Ae)}static decrypt(Ae,Se,Ke=!0,qe){return new mi(Se,qe,Ke).decrypt(Ae)}constructor(Ae,Se,Ke=!0,qe){this.aes=qe||new Oe(Ae,Se,Ke,"CBC")}encrypt(Ae){return Ie(this.aes.AES_Encrypt_process(Ae),this.aes.AES_Encrypt_finish())}decrypt(Ae){return Ie(this.aes.AES_Decrypt_process(Ae),this.aes.AES_Decrypt_finish())}}const Yn=ir.getWebCrypto(),Zn=ir.getNodeCrypto(),Qn=16;function _i(Ae,Se){const Ke=Ae.length-Qn;for(let qe=0;qe<Qn;qe++)Ae[qe+Ke]^=Se[qe];return Ae}const Xn=new Uint8Array(Qn);async function Ai(Ae){const Se=await async function(Ae){if(ir.getWebCrypto()&&24!==Ae.length)return Ae=await Yn.importKey("raw",Ae,{name:"AES-CBC",length:8*Ae.length},!1,["encrypt"]),async function(Se){const Ke=await Yn.encrypt({name:"AES-CBC",iv:Xn,length:8*Qn},Ae,Se);return new Uint8Array(Ke).subarray(0,Ke.byteLength-Qn)};if(ir.getNodeCrypto())return async function(Se){const Ke=new Zn.createCipheriv("aes-"+8*Ae.length+"-cbc",Ae,Xn).update(Se);return new Uint8Array(Ke)};return async function(Se){return mi.encrypt(Se,Ae,!1,Xn)}}(Ae),Ke=ir.double(await Se(Xn)),qe=ir.double(Ke);return async function(Ae){return(await Se(function(Ae,Se,Ke){if(Ae.length&&Ae.length%Qn==0)return _i(Ae,Se);const qe=new Uint8Array(Ae.length+(Qn-Ae.length%Qn));return qe.set(Ae),qe[Ae.length]=128,_i(qe,Ke)}(Ae,Ke,qe))).subarray(-Qn)}}const Jn=ir.getWebCrypto(),es=ir.getNodeCrypto(),ts=ir.getNodeBuffer(),rs=16,ns=rs,ss=rs,as=new Uint8Array(rs),os=new Uint8Array(rs);os[rs-1]=1;const cs=new Uint8Array(rs);async function Ui(Ae){const Se=await Ai(Ae);return function(Ae,Ke){return Se(ir.concatUint8Array([Ae,Ke]))}}async function Ii(Ae){return ir.getWebCrypto()&&24!==Ae.length?(Ae=await Jn.importKey("raw",Ae,{name:"AES-CTR",length:8*Ae.length},!1,["encrypt"]),async function(Se,Ke){const qe=await Jn.encrypt({name:"AES-CTR",counter:Ke,length:8*rs},Ae,Se);return new Uint8Array(qe)}):ir.getNodeCrypto()?async function(Se,Ke){const qe=new es.createCipheriv("aes-"+8*Ae.length+"-ctr",Ae,Ke),Fe=ts.concat([qe.update(Se),qe.final()]);return new Uint8Array(Fe)}:async function(Se,Ke){return bi.encrypt(Se,Ae,Ke)}}async function Bi(Ae,Se){if(Ae!==ur.symmetric.aes128&&Ae!==ur.symmetric.aes192&&Ae!==ur.symmetric.aes256)throw Error("EAX mode supports only AES cipher");const[Ke,qe]=await Promise.all([Ui(Se),Ii(Se)]);return{encrypt:async function(Ae,Se,Fe){const[$e,rt]=await Promise.all([Ke(as,Se),Ke(os,Fe)]),it=await qe(Ae,$e),nt=await Ke(cs,it);for(let Ae=0;Ae<ss;Ae++)nt[Ae]^=rt[Ae]^$e[Ae];return ir.concatUint8Array([it,nt])},decrypt:async function(Ae,Se,Fe){if(Ae.length<ss)throw Error("Invalid EAX ciphertext");const $e=Ae.subarray(0,-ss),rt=Ae.subarray(-ss),[it,nt,st]=await Promise.all([Ke(as,Se),Ke(os,Fe),Ke(cs,$e)]),ut=st;for(let Ae=0;Ae<ss;Ae++)ut[Ae]^=nt[Ae]^it[Ae];if(!ir.equalsUint8Array(rt,ut))throw Error("Authentication tag mismatch");return await qe($e,it)}}}cs[rs-1]=2,Bi.getNonce=function(Ae,Se){const Ke=Ae.slice();for(let Ae=0;Ae<Se.length;Ae++)Ke[8+Ae]^=Se[Ae];return Ke},Bi.blockLength=rs,Bi.ivLength=ns,Bi.tagLength=ss;const us=16,hs=15,fs=16;function Fi(Ae){let Se=0;for(let Ke=1;0==(Ae&Ke);Ke<<=1)Se++;return Se}function Oi(Ae,Se){for(let Ke=0;Ke<Ae.length;Ke++)Ae[Ke]^=Se[Ke];return Ae}function Ni(Ae,Se){return Oi(Ae.slice(),Se)}const ls=new Uint8Array(us),ds=new Uint8Array([1]);async function Wi(Ae,Se){let Ke,qe,Fe,$e=0;function s(Ae,Se,qe,rt){const it=Se.length/us|0;!function(Ae,Se){const Ke=ir.nbits(Math.max(Ae.length,Se.length)/us|0)-1;for(let Ae=$e+1;Ae<=Ke;Ae++)Fe[Ae]=ir.double(Fe[Ae-1]);$e=Ke}(Se,rt);const nt=ir.concatUint8Array([ls.subarray(0,hs-qe.length),ds,qe]),st=63&nt[us-1];nt[us-1]&=192;const ut=Ke(nt),ht=ir.concatUint8Array([ut,Ni(ut.subarray(0,8),ut.subarray(1,9))]),ft=ir.shiftRight(ht.subarray(0+(st>>3),17+(st>>3)),8-(7&st)).subarray(1),yt=new Uint8Array(us),mt=new Uint8Array(Se.length+fs);let vt,_t=0;for(vt=0;vt<it;vt++)Oi(ft,Fe[Fi(vt+1)]),mt.set(Oi(Ae(Ni(ft,Se)),ft),_t),Oi(yt,Ae===Ke?Se:mt.subarray(_t)),Se=Se.subarray(us),_t+=us;if(Se.length){Oi(ft,Fe.x);const qe=Ke(ft);mt.set(Ni(Se,qe),_t);const $e=new Uint8Array(us);$e.set(Ae===Ke?Se:mt.subarray(_t,-fs),0),$e[Se.length]=128,Oi(yt,$e),_t+=Se.length}const Rt=Oi(Ke(Oi(Oi(yt,ft),Fe.$)),function(Ae){if(!Ae.length)return ls;const Se=Ae.length/us|0,qe=new Uint8Array(us),$e=new Uint8Array(us);for(let rt=0;rt<Se;rt++)Oi(qe,Fe[Fi(rt+1)]),Oi($e,Ke(Ni(qe,Ae))),Ae=Ae.subarray(us);if(Ae.length){Oi(qe,Fe.x);const Se=new Uint8Array(us);Se.set(Ae,0),Se[Ae.length]=128,Oi(Se,qe),Oi($e,Ke(Se))}return $e}(rt));return mt.set(Rt,_t),mt}return function(Ae,Se){const $e=ur.read(ur.symmetric,Ae),rt=new Ir[$e](Se);Ke=rt.encrypt.bind(rt),qe=rt.decrypt.bind(rt);const it=Ke(ls),nt=ir.double(it);Fe=[],Fe[0]=ir.double(nt),Fe.x=it,Fe.$=nt}(Ae,Se),{encrypt:async function(Ae,Se,qe){return s(Ke,Ae,Se,qe)},decrypt:async function(Ae,Se,Ke){if(Ae.length<fs)throw Error("Invalid OCB ciphertext");const Fe=Ae.subarray(-fs);Ae=Ae.subarray(0,-fs);const $e=s(qe,Ae,Se,Ke);if(ir.equalsUint8Array(Fe,$e.subarray(-fs)))return $e.subarray(0,-fs);throw Error("Authentication tag mismatch")}}}Wi.getNonce=function(Ae,Se){const Ke=Ae.slice();for(let Ae=0;Ae<Se.length;Ae++)Ke[7+Ae]^=Se[Ae];return Ke},Wi.blockLength=us,Wi.ivLength=hs,Wi.tagLength=fs;const ps=68719476704;class Gi{constructor(Ae,Se,Ke,qe=16,Fe){this.tagSize=qe,this.gamma0=0,this.counter=1,this.aes=Fe||new Oe(Ae,void 0,!1,"CTR");let{asm:$e,heap:rt}=this.aes.acquire_asm();if($e.gcm_init(),this.tagSize<4||this.tagSize>16)throw new Te("illegal tagSize value");const it=Se.length||0,nt=new Uint8Array(16);12!==it?(this._gcm_mac_process(Se),rt[0]=0,rt[1]=0,rt[2]=0,rt[3]=0,rt[4]=0,rt[5]=0,rt[6]=0,rt[7]=0,rt[8]=0,rt[9]=0,rt[10]=0,rt[11]=it>>>29,rt[12]=it>>>21&255,rt[13]=it>>>13&255,rt[14]=it>>>5&255,rt[15]=it<<3&255,$e.mac(dr.MAC.GCM,dr.HEAP_DATA,16),$e.get_iv(dr.HEAP_DATA),$e.set_iv(0,0,0,0),nt.set(rt.subarray(0,16))):(nt.set(Se),nt[15]=1);const st=new DataView(nt.buffer);if(this.gamma0=st.getUint32(12),$e.set_nonce(st.getUint32(0),st.getUint32(4),st.getUint32(8),0),$e.set_mask(0,0,0,4294967295),void 0!==Ke){if(Ke.length>ps)throw new Te("illegal adata length");Ke.length?(this.adata=Ke,this._gcm_mac_process(Ke)):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");$e.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(Ae,Se,Ke,qe,Fe){return new Gi(Se,Ke,qe,Fe).encrypt(Ae)}static decrypt(Ae,Se,Ke,qe,Fe){return new Gi(Se,Ke,qe,Fe).decrypt(Ae)}encrypt(Ae){return this.AES_GCM_encrypt(Ae)}decrypt(Ae){return this.AES_GCM_decrypt(Ae)}AES_GCM_Encrypt_process(Ae){let Se=0,Ke=Ae.length||0,{asm:qe,heap:Fe}=this.aes.acquire_asm(),$e=this.counter,rt=this.aes.pos,it=this.aes.len,nt=0,st=it+Ke&-16,ut=0;if(($e-1<<4)+it+Ke>ps)throw new RangeError("counter overflow");const ht=new Uint8Array(st);for(;Ke>0;)ut=Ue(Fe,rt+it,Ae,Se,Ke),it+=ut,Se+=ut,Ke-=ut,ut=qe.cipher(dr.ENC.CTR,dr.HEAP_DATA+rt,it),ut=qe.mac(dr.MAC.GCM,dr.HEAP_DATA+rt,ut),ut&&ht.set(Fe.subarray(rt,rt+ut),nt),$e+=ut>>>4,nt+=ut,ut<it?(rt+=ut,it-=ut):(rt=0,it=0);return this.counter=$e,this.aes.pos=rt,this.aes.len=it,ht}AES_GCM_Encrypt_finish(){let{asm:Ae,heap:Se}=this.aes.acquire_asm(),Ke=this.counter,qe=this.tagSize,Fe=this.adata,$e=this.aes.pos,rt=this.aes.len;const it=new Uint8Array(rt+qe);Ae.cipher(dr.ENC.CTR,dr.HEAP_DATA+$e,rt+15&-16),rt&&it.set(Se.subarray($e,$e+rt));let nt=rt;for(;15&nt;nt++)Se[$e+nt]=0;Ae.mac(dr.MAC.GCM,dr.HEAP_DATA+$e,nt);const st=void 0!==Fe?Fe.length:0,ut=(Ke-1<<4)+rt;return Se[0]=0,Se[1]=0,Se[2]=0,Se[3]=st>>>29,Se[4]=st>>>21,Se[5]=st>>>13&255,Se[6]=st>>>5&255,Se[7]=st<<3&255,Se[8]=Se[9]=Se[10]=0,Se[11]=ut>>>29,Se[12]=ut>>>21&255,Se[13]=ut>>>13&255,Se[14]=ut>>>5&255,Se[15]=ut<<3&255,Ae.mac(dr.MAC.GCM,dr.HEAP_DATA,16),Ae.get_iv(dr.HEAP_DATA),Ae.set_counter(0,0,0,this.gamma0),Ae.cipher(dr.ENC.CTR,dr.HEAP_DATA,16),it.set(Se.subarray(0,qe),rt),this.counter=1,this.aes.pos=0,this.aes.len=0,it}AES_GCM_Decrypt_process(Ae){let Se=0,Ke=Ae.length||0,{asm:qe,heap:Fe}=this.aes.acquire_asm(),$e=this.counter,rt=this.tagSize,it=this.aes.pos,nt=this.aes.len,st=0,ut=nt+Ke>rt?nt+Ke-rt&-16:0,ht=nt+Ke-ut,ft=0;if(($e-1<<4)+nt+Ke>ps)throw new RangeError("counter overflow");const yt=new Uint8Array(ut);for(;Ke>ht;)ft=Ue(Fe,it+nt,Ae,Se,Ke-ht),nt+=ft,Se+=ft,Ke-=ft,ft=qe.mac(dr.MAC.GCM,dr.HEAP_DATA+it,ft),ft=qe.cipher(dr.DEC.CTR,dr.HEAP_DATA+it,ft),ft&&yt.set(Fe.subarray(it,it+ft),st),$e+=ft>>>4,st+=ft,it=0,nt=0;return Ke>0&&(nt+=Ue(Fe,0,Ae,Se,Ke)),this.counter=$e,this.aes.pos=it,this.aes.len=nt,yt}AES_GCM_Decrypt_finish(){let{asm:Ae,heap:Se}=this.aes.acquire_asm(),Ke=this.tagSize,qe=this.adata,Fe=this.counter,$e=this.aes.pos,rt=this.aes.len,it=rt-Ke;if(rt<Ke)throw new Be("authentication tag not found");const nt=new Uint8Array(it),st=new Uint8Array(Se.subarray($e+it,$e+rt));let ut=it;for(;15&ut;ut++)Se[$e+ut]=0;Ae.mac(dr.MAC.GCM,dr.HEAP_DATA+$e,ut),Ae.cipher(dr.DEC.CTR,dr.HEAP_DATA+$e,ut),it&&nt.set(Se.subarray($e,$e+it));const ht=void 0!==qe?qe.length:0,ft=(Fe-1<<4)+rt-Ke;Se[0]=0,Se[1]=0,Se[2]=0,Se[3]=ht>>>29,Se[4]=ht>>>21,Se[5]=ht>>>13&255,Se[6]=ht>>>5&255,Se[7]=ht<<3&255,Se[8]=Se[9]=Se[10]=0,Se[11]=ft>>>29,Se[12]=ft>>>21&255,Se[13]=ft>>>13&255,Se[14]=ft>>>5&255,Se[15]=ft<<3&255,Ae.mac(dr.MAC.GCM,dr.HEAP_DATA,16),Ae.get_iv(dr.HEAP_DATA),Ae.set_counter(0,0,0,this.gamma0),Ae.cipher(dr.ENC.CTR,dr.HEAP_DATA,16);let yt=0;for(let Ae=0;Ae<Ke;++Ae)yt|=st[Ae]^Se[Ae];if(yt)throw new ze("data integrity check failed");return this.counter=1,this.aes.pos=0,this.aes.len=0,nt}AES_GCM_decrypt(Ae){const Se=this.AES_GCM_Decrypt_process(Ae),Ke=this.AES_GCM_Decrypt_finish(),qe=new Uint8Array(Se.length+Ke.length);return Se.length&&qe.set(Se),Ke.length&&qe.set(Ke,Se.length),qe}AES_GCM_encrypt(Ae){const Se=this.AES_GCM_Encrypt_process(Ae),Ke=this.AES_GCM_Encrypt_finish(),qe=new Uint8Array(Se.length+Ke.length);return Se.length&&qe.set(Se),Ke.length&&qe.set(Ke,Se.length),qe}_gcm_mac_process(Ae){let{asm:Se,heap:Ke}=this.aes.acquire_asm(),qe=0,Fe=Ae.length||0,$e=0;for(;Fe>0;){for($e=Ue(Ke,0,Ae,qe,Fe),qe+=$e,Fe-=$e;15&$e;)Ke[$e++]=0;Se.mac(dr.MAC.GCM,dr.HEAP_DATA,$e)}}}const ys=ir.getWebCrypto(),ms=ir.getNodeCrypto(),gs=ir.getNodeBuffer(),bs=16,vs="AES-GCM";async function Qi(Ae,Se){if(Ae!==ur.symmetric.aes128&&Ae!==ur.symmetric.aes192&&Ae!==ur.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(ir.getWebCrypto()&&24!==Se.length){const Ae=await ys.importKey("raw",Se,{name:vs},!1,["encrypt","decrypt"]);return{encrypt:async function(Ke,qe,Fe=new Uint8Array){if(!Ke.length)return Gi.encrypt(Ke,Se,qe,Fe);const $e=await ys.encrypt({name:vs,iv:qe,additionalData:Fe,tagLength:8*bs},Ae,Ke);return new Uint8Array($e)},decrypt:async function(Ke,qe,Fe=new Uint8Array){if(Ke.length===bs)return Gi.decrypt(Ke,Se,qe,Fe);const $e=await ys.decrypt({name:vs,iv:qe,additionalData:Fe,tagLength:8*bs},Ae,Ke);return new Uint8Array($e)}}}return ir.getNodeCrypto()?{encrypt:async function(Ae,Ke,qe=new Uint8Array){const Fe=new ms.createCipheriv("aes-"+8*Se.length+"-gcm",Se,Ke);Fe.setAAD(qe);const $e=gs.concat([Fe.update(Ae),Fe.final(),Fe.getAuthTag()]);return new Uint8Array($e)},decrypt:async function(Ae,Ke,qe=new Uint8Array){const Fe=new ms.createDecipheriv("aes-"+8*Se.length+"-gcm",Se,Ke);Fe.setAAD(qe),Fe.setAuthTag(Ae.slice(Ae.length-bs,Ae.length));const $e=gs.concat([Fe.update(Ae.slice(0,Ae.length-bs)),Fe.final()]);return new Uint8Array($e)}}:{encrypt:async function(Ae,Ke,qe){return Gi.encrypt(Ae,Se,Ke,qe)},decrypt:async function(Ae,Ke,qe){return Gi.decrypt(Ae,Se,Ke,qe)}}}Qi.getNonce=function(Ae,Se){const Ke=Ae.slice();for(let Ae=0;Ae<Se.length;Ae++)Ke[4+Ae]^=Se[Ae];return Ke},Qi.blockLength=16,Qi.ivLength=12,Qi.tagLength=bs;var ws={cfb:Gn,gcm:Qi,experimentalGCM:Qi,eax:Bi,ocb:Wi},_s=gt((function(Ae){!function(Ae){var t=function(Ae){var Se,Ke=new Float64Array(16);if(Ae)for(Se=0;Se<Ae.length;Se++)Ke[Se]=Ae[Se];return Ke},r=function(){throw Error("no PRNG")},Se=new Uint8Array(32);Se[0]=9;var Ke=t(),qe=t([1]),Fe=t([56129,1]),$e=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),rt=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),it=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),nt=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),st=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function l(Ae,Se,Ke,qe){return function(Ae,Se,Ke,qe,Fe){var $e,rt=0;for($e=0;$e<Fe;$e++)rt|=Ae[Se+$e]^Ke[qe+$e];return(1&rt-1>>>8)-1}(Ae,Se,Ke,qe,32)}function p(Ae,Se){var Ke;for(Ke=0;Ke<16;Ke++)Ae[Ke]=0|Se[Ke]}function y(Ae){var Se,Ke,qe=1;for(Se=0;Se<16;Se++)Ke=Ae[Se]+qe+65535,qe=Math.floor(Ke/65536),Ae[Se]=Ke-65536*qe;Ae[0]+=qe-1+37*(qe-1)}function b(Ae,Se,Ke){for(var qe,Fe=~(Ke-1),$e=0;$e<16;$e++)qe=Fe&(Ae[$e]^Se[$e]),Ae[$e]^=qe,Se[$e]^=qe}function m(Ae,Se){var Ke,qe,Fe,$e=t(),rt=t();for(Ke=0;Ke<16;Ke++)rt[Ke]=Se[Ke];for(y(rt),y(rt),y(rt),qe=0;qe<2;qe++){for($e[0]=rt[0]-65517,Ke=1;Ke<15;Ke++)$e[Ke]=rt[Ke]-65535-($e[Ke-1]>>16&1),$e[Ke-1]&=65535;$e[15]=rt[15]-32767-($e[14]>>16&1),Fe=$e[15]>>16&1,$e[14]&=65535,b(rt,$e,1-Fe)}for(Ke=0;Ke<16;Ke++)Ae[2*Ke]=255&rt[Ke],Ae[2*Ke+1]=rt[Ke]>>8}function g(Ae,Se){var Ke=new Uint8Array(32),qe=new Uint8Array(32);return m(Ke,Ae),m(qe,Se),l(Ke,0,qe,0)}function w(Ae){var Se=new Uint8Array(32);return m(Se,Ae),1&Se[0]}function v(Ae,Se){var Ke;for(Ke=0;Ke<16;Ke++)Ae[Ke]=Se[2*Ke]+(Se[2*Ke+1]<<8);Ae[15]&=32767}function _(Ae,Se,Ke){for(var qe=0;qe<16;qe++)Ae[qe]=Se[qe]+Ke[qe]}function k(Ae,Se,Ke){for(var qe=0;qe<16;qe++)Ae[qe]=Se[qe]-Ke[qe]}function A(Ae,Se,Ke){var qe,Fe,$e=0,rt=0,it=0,nt=0,st=0,ut=0,ht=0,ft=0,yt=0,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,jt=0,Ft=0,Lt=0,Ht=0,Wt=0,Gt=0,$t=0,Yt=0,Vt=0,Zt=0,Qt=0,er=0,tr=0,rr=Ke[0],ir=Ke[1],nr=Ke[2],sr=Ke[3],ar=Ke[4],cr=Ke[5],ur=Ke[6],hr=Ke[7],fr=Ke[8],lr=Ke[9],dr=Ke[10],yr=Ke[11],Cr=Ke[12],Rr=Ke[13],Dr=Ke[14],Tr=Ke[15];$e+=(qe=Se[0])*rr,rt+=qe*ir,it+=qe*nr,nt+=qe*sr,st+=qe*ar,ut+=qe*cr,ht+=qe*ur,ft+=qe*hr,yt+=qe*fr,mt+=qe*lr,vt+=qe*dr,_t+=qe*yr,Rt+=qe*Cr,Kt+=qe*Rr,It+=qe*Dr,Ut+=qe*Tr,rt+=(qe=Se[1])*rr,it+=qe*ir,nt+=qe*nr,st+=qe*sr,ut+=qe*ar,ht+=qe*cr,ft+=qe*ur,yt+=qe*hr,mt+=qe*fr,vt+=qe*lr,_t+=qe*dr,Rt+=qe*yr,Kt+=qe*Cr,It+=qe*Rr,Ut+=qe*Dr,Ot+=qe*Tr,it+=(qe=Se[2])*rr,nt+=qe*ir,st+=qe*nr,ut+=qe*sr,ht+=qe*ar,ft+=qe*cr,yt+=qe*ur,mt+=qe*hr,vt+=qe*fr,_t+=qe*lr,Rt+=qe*dr,Kt+=qe*yr,It+=qe*Cr,Ut+=qe*Rr,Ot+=qe*Dr,Nt+=qe*Tr,nt+=(qe=Se[3])*rr,st+=qe*ir,ut+=qe*nr,ht+=qe*sr,ft+=qe*ar,yt+=qe*cr,mt+=qe*ur,vt+=qe*hr,_t+=qe*fr,Rt+=qe*lr,Kt+=qe*dr,It+=qe*yr,Ut+=qe*Cr,Ot+=qe*Rr,Nt+=qe*Dr,jt+=qe*Tr,st+=(qe=Se[4])*rr,ut+=qe*ir,ht+=qe*nr,ft+=qe*sr,yt+=qe*ar,mt+=qe*cr,vt+=qe*ur,_t+=qe*hr,Rt+=qe*fr,Kt+=qe*lr,It+=qe*dr,Ut+=qe*yr,Ot+=qe*Cr,Nt+=qe*Rr,jt+=qe*Dr,Ft+=qe*Tr,ut+=(qe=Se[5])*rr,ht+=qe*ir,ft+=qe*nr,yt+=qe*sr,mt+=qe*ar,vt+=qe*cr,_t+=qe*ur,Rt+=qe*hr,Kt+=qe*fr,It+=qe*lr,Ut+=qe*dr,Ot+=qe*yr,Nt+=qe*Cr,jt+=qe*Rr,Ft+=qe*Dr,Lt+=qe*Tr,ht+=(qe=Se[6])*rr,ft+=qe*ir,yt+=qe*nr,mt+=qe*sr,vt+=qe*ar,_t+=qe*cr,Rt+=qe*ur,Kt+=qe*hr,It+=qe*fr,Ut+=qe*lr,Ot+=qe*dr,Nt+=qe*yr,jt+=qe*Cr,Ft+=qe*Rr,Lt+=qe*Dr,Ht+=qe*Tr,ft+=(qe=Se[7])*rr,yt+=qe*ir,mt+=qe*nr,vt+=qe*sr,_t+=qe*ar,Rt+=qe*cr,Kt+=qe*ur,It+=qe*hr,Ut+=qe*fr,Ot+=qe*lr,Nt+=qe*dr,jt+=qe*yr,Ft+=qe*Cr,Lt+=qe*Rr,Ht+=qe*Dr,Wt+=qe*Tr,yt+=(qe=Se[8])*rr,mt+=qe*ir,vt+=qe*nr,_t+=qe*sr,Rt+=qe*ar,Kt+=qe*cr,It+=qe*ur,Ut+=qe*hr,Ot+=qe*fr,Nt+=qe*lr,jt+=qe*dr,Ft+=qe*yr,Lt+=qe*Cr,Ht+=qe*Rr,Wt+=qe*Dr,Gt+=qe*Tr,mt+=(qe=Se[9])*rr,vt+=qe*ir,_t+=qe*nr,Rt+=qe*sr,Kt+=qe*ar,It+=qe*cr,Ut+=qe*ur,Ot+=qe*hr,Nt+=qe*fr,jt+=qe*lr,Ft+=qe*dr,Lt+=qe*yr,Ht+=qe*Cr,Wt+=qe*Rr,Gt+=qe*Dr,$t+=qe*Tr,vt+=(qe=Se[10])*rr,_t+=qe*ir,Rt+=qe*nr,Kt+=qe*sr,It+=qe*ar,Ut+=qe*cr,Ot+=qe*ur,Nt+=qe*hr,jt+=qe*fr,Ft+=qe*lr,Lt+=qe*dr,Ht+=qe*yr,Wt+=qe*Cr,Gt+=qe*Rr,$t+=qe*Dr,Yt+=qe*Tr,_t+=(qe=Se[11])*rr,Rt+=qe*ir,Kt+=qe*nr,It+=qe*sr,Ut+=qe*ar,Ot+=qe*cr,Nt+=qe*ur,jt+=qe*hr,Ft+=qe*fr,Lt+=qe*lr,Ht+=qe*dr,Wt+=qe*yr,Gt+=qe*Cr,$t+=qe*Rr,Yt+=qe*Dr,Vt+=qe*Tr,Rt+=(qe=Se[12])*rr,Kt+=qe*ir,It+=qe*nr,Ut+=qe*sr,Ot+=qe*ar,Nt+=qe*cr,jt+=qe*ur,Ft+=qe*hr,Lt+=qe*fr,Ht+=qe*lr,Wt+=qe*dr,Gt+=qe*yr,$t+=qe*Cr,Yt+=qe*Rr,Vt+=qe*Dr,Zt+=qe*Tr,Kt+=(qe=Se[13])*rr,It+=qe*ir,Ut+=qe*nr,Ot+=qe*sr,Nt+=qe*ar,jt+=qe*cr,Ft+=qe*ur,Lt+=qe*hr,Ht+=qe*fr,Wt+=qe*lr,Gt+=qe*dr,$t+=qe*yr,Yt+=qe*Cr,Vt+=qe*Rr,Zt+=qe*Dr,Qt+=qe*Tr,It+=(qe=Se[14])*rr,Ut+=qe*ir,Ot+=qe*nr,Nt+=qe*sr,jt+=qe*ar,Ft+=qe*cr,Lt+=qe*ur,Ht+=qe*hr,Wt+=qe*fr,Gt+=qe*lr,$t+=qe*dr,Yt+=qe*yr,Vt+=qe*Cr,Zt+=qe*Rr,Qt+=qe*Dr,er+=qe*Tr,Ut+=(qe=Se[15])*rr,rt+=38*(Nt+=qe*nr),it+=38*(jt+=qe*sr),nt+=38*(Ft+=qe*ar),st+=38*(Lt+=qe*cr),ut+=38*(Ht+=qe*ur),ht+=38*(Wt+=qe*hr),ft+=38*(Gt+=qe*fr),yt+=38*($t+=qe*lr),mt+=38*(Yt+=qe*dr),vt+=38*(Vt+=qe*yr),_t+=38*(Zt+=qe*Cr),Rt+=38*(Qt+=qe*Rr),Kt+=38*(er+=qe*Dr),It+=38*(tr+=qe*Tr),$e=(qe=($e+=38*(Ot+=qe*ir))+(Fe=1)+65535)-65536*(Fe=Math.floor(qe/65536)),rt=(qe=rt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),it=(qe=it+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),nt=(qe=nt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),st=(qe=st+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),ut=(qe=ut+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),ht=(qe=ht+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),ft=(qe=ft+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),yt=(qe=yt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),mt=(qe=mt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),vt=(qe=vt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),_t=(qe=_t+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),Rt=(qe=Rt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),Kt=(qe=Kt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),It=(qe=It+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),Ut=(qe=Ut+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),$e=(qe=($e+=Fe-1+37*(Fe-1))+(Fe=1)+65535)-65536*(Fe=Math.floor(qe/65536)),rt=(qe=rt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),it=(qe=it+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),nt=(qe=nt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),st=(qe=st+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),ut=(qe=ut+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),ht=(qe=ht+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),ft=(qe=ft+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),yt=(qe=yt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),mt=(qe=mt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),vt=(qe=vt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),_t=(qe=_t+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),Rt=(qe=Rt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),Kt=(qe=Kt+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),It=(qe=It+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),Ut=(qe=Ut+Fe+65535)-65536*(Fe=Math.floor(qe/65536)),$e+=Fe-1+37*(Fe-1),Ae[0]=$e,Ae[1]=rt,Ae[2]=it,Ae[3]=nt,Ae[4]=st,Ae[5]=ut,Ae[6]=ht,Ae[7]=ft,Ae[8]=yt,Ae[9]=mt,Ae[10]=vt,Ae[11]=_t,Ae[12]=Rt,Ae[13]=Kt,Ae[14]=It,Ae[15]=Ut}function S(Ae,Se){A(Ae,Se,Se)}function E(Ae,Se){var Ke,qe=t();for(Ke=0;Ke<16;Ke++)qe[Ke]=Se[Ke];for(Ke=253;Ke>=0;Ke--)S(qe,qe),2!==Ke&&4!==Ke&&A(qe,qe,Se);for(Ke=0;Ke<16;Ke++)Ae[Ke]=qe[Ke]}function P(Ae,Se,Ke){var qe,$e,rt=new Uint8Array(32),it=new Float64Array(80),nt=t(),st=t(),ut=t(),ht=t(),ft=t(),yt=t();for($e=0;$e<31;$e++)rt[$e]=Se[$e];for(rt[31]=127&Se[31]|64,rt[0]&=248,v(it,Ke),$e=0;$e<16;$e++)st[$e]=it[$e],ht[$e]=nt[$e]=ut[$e]=0;for(nt[0]=ht[0]=1,$e=254;$e>=0;--$e)b(nt,st,qe=rt[$e>>>3]>>>(7&$e)&1),b(ut,ht,qe),_(ft,nt,ut),k(nt,nt,ut),_(ut,st,ht),k(st,st,ht),S(ht,ft),S(yt,nt),A(nt,ut,nt),A(ut,st,ft),_(ft,nt,ut),k(nt,nt,ut),S(st,nt),k(ut,ht,yt),A(nt,ut,Fe),_(nt,nt,ht),A(ut,ut,nt),A(nt,ht,yt),A(ht,st,it),S(st,ft),b(nt,st,qe),b(ut,ht,qe);for($e=0;$e<16;$e++)it[$e+16]=nt[$e],it[$e+32]=ut[$e],it[$e+48]=st[$e],it[$e+64]=ht[$e];var mt=it.subarray(32),vt=it.subarray(16);return E(mt,mt),A(vt,vt,mt),m(Ae,vt),0}function x(Ae,Ke){return P(Ae,Ke,Se)}function M(Ae,Se){var Ke=t(),qe=t(),Fe=t(),$e=t(),it=t(),nt=t(),st=t(),ut=t(),ht=t();k(Ke,Ae[1],Ae[0]),k(ht,Se[1],Se[0]),A(Ke,Ke,ht),_(qe,Ae[0],Ae[1]),_(ht,Se[0],Se[1]),A(qe,qe,ht),A(Fe,Ae[3],Se[3]),A(Fe,Fe,rt),A($e,Ae[2],Se[2]),_($e,$e,$e),k(it,qe,Ke),k(nt,$e,Fe),_(st,$e,Fe),_(ut,qe,Ke),A(Ae[0],it,nt),A(Ae[1],ut,st),A(Ae[2],st,nt),A(Ae[3],it,ut)}function C(Ae,Se,Ke){var qe;for(qe=0;qe<4;qe++)b(Ae[qe],Se[qe],Ke)}function K(Ae,Se){var Ke=t(),qe=t(),Fe=t();E(Fe,Se[2]),A(Ke,Se[0],Fe),A(qe,Se[1],Fe),m(Ae,qe),Ae[31]^=w(Ke)<<7}function D(Ae,Se,Fe){var $e,rt;for(p(Ae[0],Ke),p(Ae[1],qe),p(Ae[2],qe),p(Ae[3],Ke),rt=255;rt>=0;--rt)C(Ae,Se,$e=Fe[rt/8|0]>>(7&rt)&1),M(Se,Ae),M(Ae,Ae),C(Ae,Se,$e)}function R(Ae,Se){var Ke=[t(),t(),t(),t()];p(Ke[0],it),p(Ke[1],nt),p(Ke[2],qe),A(Ke[3],it,nt),D(Ae,Ke,Se)}function U(Se,Ke,qe){var Fe,$e,rt=[t(),t(),t(),t()];for(qe||r(Ke,32),(Fe=Ae.hash(Ke.subarray(0,32)))[0]&=248,Fe[31]&=127,Fe[31]|=64,R(rt,Fe),K(Se,rt),$e=0;$e<32;$e++)Ke[$e+32]=Se[$e];return 0}var ut=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 B(Ae,Se){var Ke,qe,Fe,$e;for(qe=63;qe>=32;--qe){for(Ke=0,Fe=qe-32,$e=qe-12;Fe<$e;++Fe)Se[Fe]+=Ke-16*Se[qe]*ut[Fe-(qe-32)],Ke=Math.floor((Se[Fe]+128)/256),Se[Fe]-=256*Ke;Se[Fe]+=Ke,Se[qe]=0}for(Ke=0,Fe=0;Fe<32;Fe++)Se[Fe]+=Ke-(Se[31]>>4)*ut[Fe],Ke=Se[Fe]>>8,Se[Fe]&=255;for(Fe=0;Fe<32;Fe++)Se[Fe]-=Ke*ut[Fe];for(qe=0;qe<32;qe++)Se[qe+1]+=Se[qe]>>8,Ae[qe]=255&Se[qe]}function T(Ae){var Se,Ke=new Float64Array(64);for(Se=0;Se<64;Se++)Ke[Se]=Ae[Se];for(Se=0;Se<64;Se++)Ae[Se]=0;B(Ae,Ke)}function z(Ae,Se){var Fe=t(),rt=t(),it=t(),nt=t(),ut=t(),ht=t(),ft=t();return p(Ae[2],qe),v(Ae[1],Se),S(it,Ae[1]),A(nt,it,$e),k(it,it,Ae[2]),_(nt,Ae[2],nt),S(ut,nt),S(ht,ut),A(ft,ht,ut),A(Fe,ft,it),A(Fe,Fe,nt),function(Ae,Se){var Ke,qe=t();for(Ke=0;Ke<16;Ke++)qe[Ke]=Se[Ke];for(Ke=250;Ke>=0;Ke--)S(qe,qe),1!==Ke&&A(qe,qe,Se);for(Ke=0;Ke<16;Ke++)Ae[Ke]=qe[Ke]}(Fe,Fe),A(Fe,Fe,it),A(Fe,Fe,nt),A(Fe,Fe,nt),A(Ae[0],Fe,nt),S(rt,Ae[0]),A(rt,rt,nt),g(rt,it)&&A(Ae[0],Ae[0],st),S(rt,Ae[0]),A(rt,rt,nt),g(rt,it)?-1:(w(Ae[0])===Se[31]>>7&&k(Ae[0],Ke,Ae[0]),A(Ae[3],Ae[0],Ae[1]),0)}var ht=64;function F(){for(var Ae=0;Ae<arguments.length;Ae++)if(!(arguments[Ae]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function O(Ae){for(var Se=0;Se<Ae.length;Se++)Ae[Se]=0}Ae.scalarMult=function(Ae,Se){if(F(Ae,Se),32!==Ae.length)throw Error("bad n size");if(32!==Se.length)throw Error("bad p size");var Ke=new Uint8Array(32);return P(Ke,Ae,Se),Ke},Ae.box={},Ae.box.keyPair=function(){var Ae,Se,Ke=new Uint8Array(32),qe=new Uint8Array(32);return Ae=Ke,r(Se=qe,32),x(Ae,Se),{publicKey:Ke,secretKey:qe}},Ae.box.keyPair.fromSecretKey=function(Ae){if(F(Ae),32!==Ae.length)throw Error("bad secret key size");var Se=new Uint8Array(32);return x(Se,Ae),{publicKey:Se,secretKey:new Uint8Array(Ae)}},Ae.sign=function(Se,Ke){if(F(Se,Ke),64!==Ke.length)throw Error("bad secret key size");var qe=new Uint8Array(ht+Se.length);return function(Se,Ke,qe,Fe){var $e,rt,it,nt,st,ut=new Float64Array(64),ht=[t(),t(),t(),t()];($e=Ae.hash(Fe.subarray(0,32)))[0]&=248,$e[31]&=127,$e[31]|=64;var ft=qe+64;for(nt=0;nt<qe;nt++)Se[64+nt]=Ke[nt];for(nt=0;nt<32;nt++)Se[32+nt]=$e[32+nt];for(T(it=Ae.hash(Se.subarray(32,ft))),R(ht,it),K(Se,ht),nt=32;nt<64;nt++)Se[nt]=Fe[nt];for(T(rt=Ae.hash(Se.subarray(0,ft))),nt=0;nt<64;nt++)ut[nt]=0;for(nt=0;nt<32;nt++)ut[nt]=it[nt];for(nt=0;nt<32;nt++)for(st=0;st<32;st++)ut[nt+st]+=rt[nt]*$e[st];B(Se.subarray(32),ut)}(qe,Se,Se.length,Ke),qe},Ae.sign.detached=function(Se,Ke){for(var qe=Ae.sign(Se,Ke),Fe=new Uint8Array(ht),$e=0;$e<Fe.length;$e++)Fe[$e]=qe[$e];return Fe},Ae.sign.detached.verify=function(Se,Ke,qe){if(F(Se,Ke,qe),Ke.length!==ht)throw Error("bad signature size");if(32!==qe.length)throw Error("bad public key size");var Fe,$e=new Uint8Array(ht+Se.length),rt=new Uint8Array(ht+Se.length);for(Fe=0;Fe<ht;Fe++)$e[Fe]=Ke[Fe];for(Fe=0;Fe<Se.length;Fe++)$e[Fe+ht]=Se[Fe];return function(Se,Ke,qe,Fe){var $e,rt,it=new Uint8Array(32),nt=[t(),t(),t(),t()],st=[t(),t(),t(),t()];if(qe<64)return-1;if(z(st,Fe))return-1;for($e=0;$e<qe;$e++)Se[$e]=Ke[$e];for($e=0;$e<32;$e++)Se[$e+32]=Fe[$e];if(T(rt=Ae.hash(Se.subarray(0,qe))),D(nt,st,rt),R(st,Ke.subarray(32)),M(nt,st),K(it,nt),qe-=64,l(Ke,0,it,0)){for($e=0;$e<qe;$e++)Se[$e]=0;return-1}for($e=0;$e<qe;$e++)Se[$e]=Ke[$e+64];return qe}(rt,$e,$e.length,qe)>=0},Ae.sign.keyPair=function(){var Ae=new Uint8Array(32),Se=new Uint8Array(64);return U(Ae,Se),{publicKey:Ae,secretKey:Se}},Ae.sign.keyPair.fromSecretKey=function(Ae){if(F(Ae),64!==Ae.length)throw Error("bad secret key size");for(var Se=new Uint8Array(32),Ke=0;Ke<Se.length;Ke++)Se[Ke]=Ae[32+Ke];return{publicKey:Se,secretKey:new Uint8Array(Ae)}},Ae.sign.keyPair.fromSeed=function(Ae){if(F(Ae),32!==Ae.length)throw Error("bad seed size");for(var Se=new Uint8Array(32),Ke=new Uint8Array(64),qe=0;qe<32;qe++)Ke[qe]=Ae[qe];return U(Se,Ke,!0),{publicKey:Se,secretKey:Ke}},Ae.setPRNG=function(Ae){r=Ae},function(){var Se="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(Se&&Se.getRandomValues){Ae.setPRNG((function(Ae,Ke){var qe,Fe=new Uint8Array(Ke);for(qe=0;qe<Ke;qe+=65536)Se.getRandomValues(Fe.subarray(qe,qe+Math.min(Ke-qe,65536)));for(qe=0;qe<Ke;qe++)Ae[qe]=Fe[qe];O(Fe)}))}else void 0!==wt&&(Se=yt.default)&&Se.randomBytes&&Ae.setPRNG((function(Ae,Ke){var qe,Fe=Se.randomBytes(Ke);for(qe=0;qe<Ke;qe++)Ae[qe]=Fe[qe];O(Fe)}))}()}(Ae.exports?Ae.exports:self.nacl=self.nacl||{})}));const ks=ir.getNodeCrypto();function rn(Ae){const Se=new Uint8Array(Ae);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(Se);else{if(!ks)throw Error("No secure random number generator available.");{const Ae=ks.randomBytes(Se.length);Se.set(Ae)}}return Se}async function nn(Ae,Se){const Ke=await ir.getBigInteger();if(Se.lt(Ae))throw Error("Illegal parameter value: max <= min");const qe=Se.sub(Ae),Fe=qe.byteLength();return new Ke(await rn(Fe+8)).mod(qe).add(Ae)}var As=Object.freeze({__proto__:null,getRandomBytes:rn,getRandomBigInteger:nn});async function sn(Ae,Se,Ke){const qe=await ir.getBigInteger(),Fe=new qe(1),$e=Fe.leftShift(new qe(Ae-1)),rt=new qe(30),it=[1,6,5,4,3,2,1,4,3,2,1,2,1,4,3,2,1,2,1,4,3,2,1,6,5,4,3,2,1,2],nt=await nn($e,$e.leftShift(Fe));let st=nt.mod(rt).toNumber();do{nt.iadd(new qe(it[st])),st=(st+it[st])%it.length,nt.bitLength()>Ae&&(nt.imod($e.leftShift(Fe)).iadd($e),st=nt.mod(rt).toNumber())}while(!await on(nt,Se,Ke));return nt}async function on(Ae,Se,Ke){return!(Se&&!Ae.dec().gcd(Se).isOne())&&(!!await async function(Ae){const Se=await ir.getBigInteger();return Ss.every((Ke=>0!==Ae.mod(new Se(Ke))))}(Ae)&&(!!await async function(Ae,Se){const Ke=await ir.getBigInteger();return Se=Se||new Ke(2),Se.modExp(Ae.dec(),Ae).isOne()}(Ae)&&!!await async function(Ae,Se,Ke){const qe=await ir.getBigInteger(),Fe=Ae.bitLength();Se||(Se=Math.max(1,Fe/48|0));const $e=Ae.dec();let rt=0;for(;!$e.getBit(rt);)rt++;const it=Ae.rightShift(new qe(rt));for(;Se>0;Se--){let Se,Fe=(Ke?Ke():await nn(new qe(2),$e)).modExp(it,Ae);if(!Fe.isOne()&&!Fe.equal($e)){for(Se=1;Se<rt;Se++){if(Fe=Fe.mul(Fe).mod(Ae),Fe.isOne())return!1;if(Fe.equal($e))break}if(Se===rt)return!1}}return!0}(Ae,Ke)))}const Ss=[7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999];const Es=[];function hn(Ae,Se){const Ke=Ae.length;if(Ke>Se-11)throw Error("Message too long");const qe=function(Ae){const Se=new Uint8Array(Ae);let Ke=0;for(;Ke<Ae;){const qe=rn(Ae-Ke);for(let Ae=0;Ae<qe.length;Ae++)0!==qe[Ae]&&(Se[Ke++]=qe[Ae])}return Se}(Se-Ke-3),Fe=new Uint8Array(Se);return Fe[1]=2,Fe.set(qe,2),Fe.set(Ae,Se-Ke),Fe}function dn(Ae,Se){let Ke=2,qe=1;for(let Se=Ke;Se<Ae.length;Se++)qe&=0!==Ae[Se],Ke+=qe;const Fe=Ke-2,$e=Ae.subarray(Ke+1),rt=0===Ae[0]&2===Ae[1]&Fe>=8&!qe;if(Se)return ir.selectUint8Array(rt,$e,Se);if(rt)return $e;throw Error("Decryption error")}async function fn(Ae,Se,Ke){let qe;if(Se.length!==In.getHashByteLength(Ae))throw Error("Invalid hash length");const Fe=new Uint8Array(Es[Ae].length);for(qe=0;qe<Es[Ae].length;qe++)Fe[qe]=Es[Ae][qe];const $e=Fe.length+Se.length;if(Ke<$e+11)throw Error("Intended encoded message length too short");const rt=new Uint8Array(Ke-$e-3).fill(255),it=new Uint8Array(Ke);return it[1]=1,it.set(rt,2),it.set(Fe,Ke-$e),it.set(Se,Ke-Se.length),it}Es[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],Es[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],Es[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],Es[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],Es[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],Es[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],Es[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];var Ms=Object.freeze({__proto__:null,emeEncode:hn,emeDecode:dn,emsaEncode:fn});const Ps=ir.getWebCrypto(),xs=ir.getNodeCrypto(),Cs=xs?Rt.default:void 0,Rs=xs?Cs.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())})):void 0,Ds=xs?Cs.define("RSAPubliceKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})):void 0;var Us=Object.freeze({__proto__:null,sign:async function(Ae,Se,Ke,qe,Fe,$e,rt,it,nt){if(Se&&!ir.isStream(Se))if(ir.getWebCrypto())try{return await async function(Ae,Se,Ke,qe,Fe,$e,rt,it){const nt=await async function(Ae,Se,Ke,qe,Fe,$e){const rt=await ir.getBigInteger(),it=new rt(qe),nt=new rt(Fe),st=new rt(Ke);let ut=st.mod(nt.dec()),ht=st.mod(it.dec());return ht=ht.toUint8Array(),ut=ut.toUint8Array(),{kty:"RSA",n:be(Ae,!0),e:be(Se,!0),d:be(Ke,!0),p:be(Fe,!0),q:be(qe,!0),dp:be(ut,!0),dq:be(ht,!0),qi:be($e,!0),ext:!0}}(Ke,qe,Fe,$e,rt,it),st={name:"RSASSA-PKCS1-v1_5",hash:{name:Ae}},ut=await Ps.importKey("jwk",nt,st,!1,["sign"]);return new Uint8Array(await Ps.sign("RSASSA-PKCS1-v1_5",ut,Se))}(ur.read(ur.webHash,Ae),Se,Ke,qe,Fe,$e,rt,it)}catch(Ae){ir.printDebugError(Ae)}else if(ir.getNodeCrypto())return async function(Ae,Se,Ke,qe,Fe,$e,rt,it){const{default:nt}=await Promise.resolve().then((function(){return nm})),st=new nt($e),ut=new nt(rt),ht=new nt(Fe),ft=ht.mod(ut.subn(1)),yt=ht.mod(st.subn(1)),mt=xs.createSign(ur.read(ur.hash,Ae));mt.write(Se),mt.end();const vt={version:0,modulus:new nt(Ke),publicExponent:new nt(qe),privateExponent:new nt(Fe),prime1:new nt(rt),prime2:new nt($e),exponent1:ft,exponent2:yt,coefficient:new nt(it)};if(void 0!==xs.createPrivateKey){const Ae=Rs.encode(vt,"der");return new Uint8Array(mt.sign({key:Ae,format:"der",type:"pkcs1"}))}const _t=Rs.encode(vt,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(mt.sign(_t))}(Ae,Se,Ke,qe,Fe,$e,rt,it);return async function(Ae,Se,Ke,qe){const Fe=await ir.getBigInteger();Se=new Fe(Se);const $e=new Fe(await fn(Ae,qe,Se.byteLength()));if(Ke=new Fe(Ke),$e.gte(Se))throw Error("Message size cannot exceed modulus size");return $e.modExp(Ke,Se).toUint8Array("be",Se.byteLength())}(Ae,Ke,Fe,nt)},verify:async function(Ae,Se,Ke,qe,Fe,$e){if(Se&&!ir.isStream(Se))if(ir.getWebCrypto())try{return await async function(Ae,Se,Ke,qe,Fe){const $e=function(Ae,Se){return{kty:"RSA",n:be(Ae,!0),e:be(Se,!0),ext:!0}}(qe,Fe),rt=await Ps.importKey("jwk",$e,{name:"RSASSA-PKCS1-v1_5",hash:{name:Ae}},!1,["verify"]);return Ps.verify("RSASSA-PKCS1-v1_5",rt,Ke,Se)}(ur.read(ur.webHash,Ae),Se,Ke,qe,Fe)}catch(Ae){ir.printDebugError(Ae)}else if(ir.getNodeCrypto())return async function(Ae,Se,Ke,qe,Fe){const{default:$e}=await Promise.resolve().then((function(){return nm})),rt=xs.createVerify(ur.read(ur.hash,Ae));rt.write(Se),rt.end();const it={modulus:new $e(qe),publicExponent:new $e(Fe)};let nt;if(void 0!==xs.createPrivateKey){nt={key:Ds.encode(it,"der"),format:"der",type:"pkcs1"}}else nt=Ds.encode(it,"pem",{label:"RSA PUBLIC KEY"});try{return await rt.verify(nt,Ke)}catch(Ae){return!1}}(Ae,Se,Ke,qe,Fe);return async function(Ae,Se,Ke,qe,Fe){const $e=await ir.getBigInteger();if(Ke=new $e(Ke),Se=new $e(Se),qe=new $e(qe),Se.gte(Ke))throw Error("Signature size cannot exceed modulus size");const rt=Se.modExp(qe,Ke).toUint8Array("be",Ke.byteLength()),it=await fn(Ae,Fe,Ke.byteLength());return ir.equalsUint8Array(rt,it)}(Ae,Ke,qe,Fe,$e)},encrypt:async function(Ae,Se,Ke){return ir.getNodeCrypto()?async function(Ae,Se,Ke){const{default:qe}=await Promise.resolve().then((function(){return nm})),Fe={modulus:new qe(Se),publicExponent:new qe(Ke)};let $e;if(void 0!==xs.createPrivateKey){$e={key:Ds.encode(Fe,"der"),format:"der",type:"pkcs1",padding:xs.constants.RSA_PKCS1_PADDING}}else{$e={key:Ds.encode(Fe,"pem",{label:"RSA PUBLIC KEY"}),padding:xs.constants.RSA_PKCS1_PADDING}}return new Uint8Array(xs.publicEncrypt($e,Ae))}(Ae,Se,Ke):async function(Ae,Se,Ke){const qe=await ir.getBigInteger();if(Se=new qe(Se),Ae=new qe(hn(Ae,Se.byteLength())),Ke=new qe(Ke),Ae.gte(Se))throw Error("Message size cannot exceed modulus size");return Ae.modExp(Ke,Se).toUint8Array("be",Se.byteLength())}(Ae,Se,Ke)},decrypt:async function(Ae,Se,Ke,qe,Fe,$e,rt,it){return ir.getNodeCrypto()?async function(Ae,Se,Ke,qe,Fe,$e,rt,it){const{default:nt}=await Promise.resolve().then((function(){return nm})),st=new nt(Fe),ut=new nt($e),ht=new nt(qe),ft=ht.mod(ut.subn(1)),yt=ht.mod(st.subn(1)),mt={version:0,modulus:new nt(Se),publicExponent:new nt(Ke),privateExponent:new nt(qe),prime1:new nt($e),prime2:new nt(Fe),exponent1:ft,exponent2:yt,coefficient:new nt(rt)};let vt;if(void 0!==xs.createPrivateKey){vt={key:Rs.encode(mt,"der"),format:"der",type:"pkcs1",padding:xs.constants.RSA_PKCS1_PADDING}}else{vt={key:Rs.encode(mt,"pem",{label:"RSA PRIVATE KEY"}),padding:xs.constants.RSA_PKCS1_PADDING}}try{return new Uint8Array(xs.privateDecrypt(vt,Ae))}catch(Ae){if(it)return it;throw Error("Decryption error")}}(Ae,Se,Ke,qe,Fe,$e,rt,it):async function(Ae,Se,Ke,qe,Fe,$e,rt,it){const nt=await ir.getBigInteger();if(Ae=new nt(Ae),Se=new nt(Se),Ke=new nt(Ke),qe=new nt(qe),Fe=new nt(Fe),$e=new nt($e),rt=new nt(rt),Ae.gte(Se))throw Error("Data too large.");const st=qe.mod($e.dec()),ut=qe.mod(Fe.dec()),ht=(await nn(new nt(2),Se)).mod(Se),ft=ht.modInv(Se).modExp(Ke,Se);Ae=Ae.mul(ft).mod(Se);const yt=Ae.modExp(ut,Fe),mt=Ae.modExp(st,$e),vt=rt.mul(mt.sub(yt)).mod($e);let _t=vt.mul(Fe).add(yt);return _t=_t.mul(ht).mod(Se),dn(_t.toUint8Array("be",Se.byteLength()),it)}(Ae,Se,Ke,qe,Fe,$e,rt,it)},generate:async function(Ae,Se){if(Se=new(await ir.getBigInteger())(Se),ir.getWebCrypto()){const Ke={name:"RSASSA-PKCS1-v1_5",modulusLength:Ae,publicExponent:Se.toUint8Array(),hash:{name:"SHA-1"}},qe=await Ps.generateKey(Ke,!0,["sign","verify"]),Fe=await Ps.exportKey("jwk",qe.privateKey);return{n:ye(Fe.n),e:Se.toUint8Array(),d:ye(Fe.d),p:ye(Fe.q),q:ye(Fe.p),u:ye(Fe.qi)}}if(ir.getNodeCrypto()&&xs.generateKeyPair&&Rs){const Ke={modulusLength:Ae,publicExponent:Se.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},qe=await new Promise(((Ae,Se)=>{xs.generateKeyPair("rsa",Ke,((Ke,qe,Fe)=>{Ke?Se(Ke):Ae(Rs.decode(Fe,"der"))}))}));return{n:qe.modulus.toArrayLike(Uint8Array),e:qe.publicExponent.toArrayLike(Uint8Array),d:qe.privateExponent.toArrayLike(Uint8Array),p:qe.prime2.toArrayLike(Uint8Array),q:qe.prime1.toArrayLike(Uint8Array),u:qe.coefficient.toArrayLike(Uint8Array)}}let Ke,qe,Fe;do{qe=await sn(Ae-(Ae>>1),Se,40),Ke=await sn(Ae>>1,Se,40),Fe=Ke.mul(qe)}while(Fe.bitLength()!==Ae);const $e=Ke.dec().imul(qe.dec());return qe.lt(Ke)&&([Ke,qe]=[qe,Ke]),{n:Fe.toUint8Array(),e:Se.toUint8Array(),d:Se.modInv($e).toUint8Array(),p:Ke.toUint8Array(),q:qe.toUint8Array(),u:Ke.modInv(qe).toUint8Array()}},validateParams:async function(Ae,Se,Ke,qe,Fe,$e){const rt=await ir.getBigInteger();if(Ae=new rt(Ae),qe=new rt(qe),Fe=new rt(Fe),!qe.mul(Fe).equal(Ae))return!1;const it=new rt(2);if($e=new rt($e),!qe.mul($e).mod(Fe).isOne())return!1;Se=new rt(Se),Ke=new rt(Ke);const nt=new rt(Math.floor(Ae.bitLength()/3)),st=await nn(it,it.leftShift(nt)),ut=st.mul(Ke).mul(Se);return!(!ut.mod(qe.dec()).equal(st)||!ut.mod(Fe.dec()).equal(st))}});var Zs=Object.freeze({__proto__:null,encrypt:async function(Ae,Se,Ke,qe){const Fe=await ir.getBigInteger();Se=new Fe(Se),Ke=new Fe(Ke),qe=new Fe(qe);const $e=new Fe(hn(Ae,Se.byteLength())),rt=await nn(new Fe(1),Se.dec());return{c1:Ke.modExp(rt,Se).toUint8Array(),c2:qe.modExp(rt,Se).imul($e).imod(Se).toUint8Array()}},decrypt:async function(Ae,Se,Ke,qe,Fe){const $e=await ir.getBigInteger();return Ae=new $e(Ae),Se=new $e(Se),Ke=new $e(Ke),qe=new $e(qe),dn(Ae.modExp(qe,Ke).modInv(Ke).imul(Se).imod(Ke).toUint8Array("be",Ke.byteLength()),Fe)},validateParams:async function(Ae,Se,Ke,qe){const Fe=await ir.getBigInteger();Ae=new Fe(Ae),Se=new Fe(Se),Ke=new Fe(Ke);const $e=new Fe(1);if(Se.lte($e)||Se.gte(Ae))return!1;const rt=new Fe(Ae.bitLength()),it=new Fe(1023);if(rt.lt(it))return!1;if(!Se.modExp(Ae.dec(),Ae).isOne())return!1;let nt=Se;const st=new Fe(1),ut=new Fe(2).leftShift(new Fe(17));for(;st.lt(ut);){if(nt=nt.mul(Se).imod(Ae),nt.isOne())return!1;st.iinc()}qe=new Fe(qe);const ht=new Fe(2),ft=await nn(ht.leftShift(rt.dec()),ht.leftShift(rt)),yt=Ae.dec().imul(ft).iadd(qe);return!!Ke.equal(Se.modExp(yt,Ae))}});class _n{constructor(Ae){if(Ae instanceof _n)this.oid=Ae.oid;else if(ir.isArray(Ae)||ir.isUint8Array(Ae)){if(6===(Ae=new Uint8Array(Ae))[0]){if(Ae[1]!==Ae.length-2)throw Error("Length mismatch in DER encoded oid");Ae=Ae.subarray(2)}this.oid=Ae}else this.oid=""}read(Ae){if(Ae.length>=1){const Se=Ae[0];if(Ae.length>=1+Se)return this.oid=Ae.subarray(1,1+Se),1+this.oid.length}throw Error("Invalid oid")}write(){return ir.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return ir.uint8ArrayToHex(this.oid)}getName(){const Ae=this.toHex();if(ur.curve[Ae])return ur.write(ur.curve,Ae);throw Error("Unknown curve object identifier.")}}function kn(Ae,Se){return Ae.keyPair({priv:Se})}function An(Ae,Se){const Ke=Ae.keyPair({pub:Se});if(!0!==Ke.validate().result)throw Error("Invalid elliptic public key");return Ke}async function Sn(Ae){if(!hr.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:Se}=await Promise.resolve().then((function(){return Xm}));return new Se.ec(Ae)}function En(Ae){let Se,Ke=0;const qe=Ae[0];return qe<192?([Ke]=Ae,Se=1):qe<255?(Ke=(Ae[0]-192<<8)+Ae[1]+192,Se=2):255===qe&&(Ke=ir.readNumber(Ae.subarray(1,5)),Se=5),{len:Ke,offset:Se}}function Pn(Ae){return Ae<192?new Uint8Array([Ae]):Ae>191&&Ae<8384?new Uint8Array([192+(Ae-192>>8),Ae-192&255]):ir.concatUint8Array([new Uint8Array([255]),ir.writeNumber(Ae,4)])}function xn(Ae){if(Ae<0||Ae>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+Ae])}function Mn(Ae){return new Uint8Array([192|Ae])}function Cn(Ae,Se){return ir.concatUint8Array([Mn(Ae),Pn(Se)])}function Kn(Ae){return[ur.packet.literalData,ur.packet.compressedData,ur.packet.symmetricallyEncryptedData,ur.packet.symEncryptedIntegrityProtectedData,ur.packet.aeadEncryptedData].includes(Ae)}async function Dn(Ae,Se){const Ke=H(Ae);let qe,Fe;try{const $e=await Ke.peekBytes(2);if(!$e||$e.length<2||0==(128&$e[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const rt=await Ke.readByte();let it,nt,st=-1,ut=-1;ut=0,0!=(64&rt)&&(ut=1),ut?st=63&rt:(st=(63&rt)>>2,nt=3&rt);const ht=Kn(st);let ft,yt=null;if(ht){if("array"===ir.isStream(Ae)){const Ae=new v;qe=G(Ae),yt=Ae}else{const Ae=new er;qe=G(Ae.writable),yt=Ae.readable}Fe=Se({tag:st,packet:yt})}else yt=[];do{if(ut){const Ae=await Ke.readByte();if(ft=!1,Ae<192)it=Ae;else if(Ae>=192&&Ae<224)it=(Ae-192<<8)+await Ke.readByte()+192;else if(Ae>223&&Ae<255){if(it=1<<(31&Ae),ft=!0,!ht)throw new TypeError("This packet type does not support partial lengths.")}else it=await Ke.readByte()<<24|await Ke.readByte()<<16|await Ke.readByte()<<8|await Ke.readByte()}else switch(nt){case 0:it=await Ke.readByte();break;case 1:it=await Ke.readByte()<<8|await Ke.readByte();break;case 2:it=await Ke.readByte()<<24|await Ke.readByte()<<16|await Ke.readByte()<<8|await Ke.readByte();break;default:it=1/0}if(it>0){let Ae=0;for(;;){qe&&await qe.ready;const{done:Se,value:Fe}=await Ke.read();if(Se){if(it===1/0)break;throw Error("Unexpected end of packet")}const $e=it===1/0?Fe:Fe.subarray(0,it-Ae);if(qe?await qe.write($e):yt.push($e),Ae+=Fe.length,Ae>=it){Ke.unshift(Fe.subarray(it-Ae+Fe.length));break}}}}while(ft);const mt=await Ke.peekBytes(ht?1/0:2);return qe?(await qe.ready,await qe.close()):(yt=ir.concatUint8Array(yt),await Se({tag:st,packet:yt})),!mt||!mt.length}catch(Ae){if(qe)return await qe.abort(Ae),!0;throw Ae}finally{qe&&await Fe,Ke.releaseLock()}}class Rn extends Error{constructor(...Ae){super(...Ae),Error.captureStackTrace&&Error.captureStackTrace(this,Rn),this.name="UnsupportedError"}}class Un{constructor(Ae,Se){this.tag=Ae,this.rawContent=Se}write(){return this.rawContent}}const ea=ir.getWebCrypto(),ta=ir.getNodeCrypto(),sa={p256:"P-256",p384:"P-384",p521:"P-521"},ua=ta?ta.getCurves():[],ha=ta?{secp256k1:ua.includes("secp256k1")?"secp256k1":void 0,p256:ua.includes("prime256v1")?"prime256v1":void 0,p384:ua.includes("secp384r1")?"secp384r1":void 0,p521:ua.includes("secp521r1")?"secp521r1":void 0,ed25519:ua.includes("ED25519")?"ED25519":void 0,curve25519:ua.includes("X25519")?"X25519":void 0,brainpoolP256r1:ua.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:ua.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:ua.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},da={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha256,cipher:ur.symmetric.aes128,node:ha.p256,web:sa.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha384,cipher:ur.symmetric.aes192,node:ha.p384,web:sa.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha512,cipher:ur.symmetric.aes256,node:ha.p521,web:sa.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha256,cipher:ur.symmetric.aes128,node:ha.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:ur.publicKey.eddsa,hash:ur.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:ur.publicKey.ecdh,hash:ur.hash.sha256,cipher:ur.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha256,cipher:ur.symmetric.aes128,node:ha.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha384,cipher:ur.symmetric.aes192,node:ha.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:ur.publicKey.ecdsa,hash:ur.hash.sha512,cipher:ur.symmetric.aes256,node:ha.brainpoolP512r1,payloadSize:64}};class On{constructor(Ae,Se){try{(ir.isArray(Ae)||ir.isUint8Array(Ae))&&(Ae=new _n(Ae)),Ae instanceof _n&&(Ae=Ae.getName()),this.name=ur.write(ur.curve,Ae)}catch(Ae){throw new Rn("Unknown curve")}Se=Se||da[this.name],this.keyType=Se.keyType,this.oid=Se.oid,this.hash=Se.hash,this.cipher=Se.cipher,this.node=Se.node&&da[this.name],this.web=Se.web&&da[this.name],this.payloadSize=Se.payloadSize,this.web&&ir.getWebCrypto()?this.type="web":this.node&&ir.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let Ae;switch(this.type){case"web":try{return await async function(Ae){const Se=await ea.generateKey({name:"ECDSA",namedCurve:sa[Ae]},!0,["sign","verify"]),Ke=await ea.exportKey("jwk",Se.privateKey),qe=await ea.exportKey("jwk",Se.publicKey);return{publicKey:jn(qe),privateKey:ye(Ke.d)}}(this.name)}catch(Ae){ir.printDebugError("Browser did not support generating ec key "+Ae.message);break}case"node":return async function(Ae){const Se=ta.createECDH(ha[Ae]);return await Se.generateKeys(),{publicKey:new Uint8Array(Se.getPublicKey()),privateKey:new Uint8Array(Se.getPrivateKey())}}(this.name);case"curve25519":{const Se=rn(32);Se[0]=127&Se[0]|64,Se[31]&=248;const Ke=Se.slice().reverse();Ae=_s.box.keyPair.fromSecretKey(Ke);return{publicKey:ir.concatUint8Array([new Uint8Array([64]),Ae.publicKey]),privateKey:Se}}case"ed25519":{const Ae=rn(32),Se=_s.sign.keyPair.fromSeed(Ae);return{publicKey:ir.concatUint8Array([new Uint8Array([64]),Se.publicKey]),privateKey:Ae}}}const Se=await Sn(this.name);return Ae=await Se.genKeyPair({entropy:ir.uint8ArrayToString(rn(32))}),{publicKey:new Uint8Array(Ae.getPublic("array",!1)),privateKey:Ae.getPrivate().toArrayLike(Uint8Array)}}}async function Nn(Ae,Se,Ke,qe){const Fe={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:Ae===ur.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},$e=Se.getName();if(!Fe[$e])return!1;if("curve25519"===$e){qe=qe.slice().reverse();const{publicKey:Ae}=_s.box.keyPair.fromSecretKey(qe);Ke=new Uint8Array(Ke);const Se=new Uint8Array([64,...Ae]);return!!ir.equalsUint8Array(Se,Ke)}const rt=await Sn($e);try{Ke=An(rt,Ke).getPublic()}catch(Ae){return!1}return!!kn(rt,qe).getPublic().eq(Ke)}function jn(Ae){const Se=ye(Ae.x),Ke=ye(Ae.y),qe=new Uint8Array(Se.length+Ke.length+1);return qe[0]=4,qe.set(Se,1),qe.set(Ke,Se.length+1),qe}function Ln(Ae,Se,Ke){const qe=Ae,Fe=Ke.slice(1,qe+1),$e=Ke.slice(qe+1,2*qe+1);return{kty:"EC",crv:Se,x:be(Fe,!0),y:be($e,!0),ext:!0}}function Wn(Ae,Se,Ke,qe){const Fe=Ln(Ae,Se,Ke);return Fe.d=be(qe,!0),Fe}const ma=ir.getWebCrypto(),ga=ir.getNodeCrypto();async function Vn(Ae,Se,Ke,qe,Fe,$e){const rt=new On(Ae);if(Ke&&!ir.isStream(Ke)){const $e={publicKey:qe,privateKey:Fe};switch(rt.type){case"web":try{return await async function(Ae,Se,Ke,qe){const Fe=Ae.payloadSize,$e=Wn(Ae.payloadSize,sa[Ae.name],qe.publicKey,qe.privateKey),rt=await ma.importKey("jwk",$e,{name:"ECDSA",namedCurve:sa[Ae.name],hash:{name:ur.read(ur.webHash,Ae.hash)}},!1,["sign"]),it=new Uint8Array(await ma.sign({name:"ECDSA",namedCurve:sa[Ae.name],hash:{name:ur.read(ur.webHash,Se)}},rt,Ke));return{r:it.slice(0,Fe),s:it.slice(Fe,Fe<<1)}}(rt,Se,Ke,$e)}catch(Ae){if("p521"!==rt.name&&("DataError"===Ae.name||"OperationError"===Ae.name))throw Ae;ir.printDebugError("Browser did not support signing: "+Ae.message)}break;case"node":{const Ae=await async function(Ae,Se,Ke,qe){const Fe=ga.createSign(ur.read(ur.hash,Se));Fe.write(Ke),Fe.end();const $e=wa.encode({version:1,parameters:Ae.oid,privateKey:Array.from(qe.privateKey),publicKey:{unused:0,data:Array.from(qe.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return va.decode(Fe.sign($e),"der")}(rt,Se,Ke,$e);return{r:Ae.r.toArrayLike(Uint8Array),s:Ae.s.toArrayLike(Uint8Array)}}}}return async function(Ae,Se,Ke){const qe=await Sn(Ae.name),Fe=kn(qe,Ke),$e=Fe.sign(Se);return{r:$e.r.toArrayLike(Uint8Array),s:$e.s.toArrayLike(Uint8Array)}}(rt,$e,Fe)}async function $n(Ae,Se,Ke,qe,Fe,$e){const rt=new On(Ae);if(qe&&!ir.isStream(qe))switch(rt.type){case"web":try{return await async function(Ae,Se,{r:Ke,s:qe},Fe,$e){const rt=Ln(Ae.payloadSize,sa[Ae.name],$e),it=await ma.importKey("jwk",rt,{name:"ECDSA",namedCurve:sa[Ae.name],hash:{name:ur.read(ur.webHash,Ae.hash)}},!1,["verify"]),nt=ir.concatUint8Array([Ke,qe]).buffer;return ma.verify({name:"ECDSA",namedCurve:sa[Ae.name],hash:{name:ur.read(ur.webHash,Se)}},it,nt,Fe)}(rt,Se,Ke,qe,Fe)}catch(Ae){if("p521"!==rt.name&&("DataError"===Ae.name||"OperationError"===Ae.name))throw Ae;ir.printDebugError("Browser did not support verifying: "+Ae.message)}break;case"node":return async function(Ae,Se,{r:Ke,s:qe},Fe,$e){const{default:rt}=await Promise.resolve().then((function(){return nm})),it=ga.createVerify(ur.read(ur.hash,Se));it.write(Fe),it.end();const nt=Ea.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:Ae.oid},subjectPublicKey:{unused:0,data:Array.from($e)}},"pem",{label:"PUBLIC KEY"}),st=va.encode({r:new rt(Ke),s:new rt(qe)},"der");try{return it.verify(nt,st)}catch(Ae){return!1}}(rt,Se,Ke,qe,Fe)}return async function(Ae,Se,Ke,qe){const Fe=await Sn(Ae.name),$e=An(Fe,qe);return $e.verify(Ke,Se)}(rt,Ke,void 0===Se?qe:$e,Fe)}const ba=ga?Rt.default:void 0,va=ga?ba.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,wa=ga?ba.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,Sa=ga?ba.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,Ea=ga?ba.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Sa),this.key("subjectPublicKey").bitstr())})):void 0;var Ma=Object.freeze({__proto__:null,sign:Vn,verify:$n,validateParams:async function(Ae,Se,Ke){const qe=new On(Ae);if(qe.keyType!==ur.publicKey.ecdsa)return!1;switch(qe.type){case"web":case"node":{const qe=rn(8),Fe=ur.hash.sha256,$e=await In.digest(Fe,qe);try{const rt=await Vn(Ae,Fe,qe,Se,Ke,$e);return await $n(Ae,Fe,rt,qe,Se,$e)}catch(Ae){return!1}}default:return Nn(ur.publicKey.ecdsa,Ae,Se,Ke)}}});_s.hash=Ae=>new Uint8Array(Zi().update(Ae).digest());var Pa=Object.freeze({__proto__:null,sign:async function(Ae,Se,Ke,qe,Fe,$e){if(In.getHashByteLength(Se)<In.getHashByteLength(ur.hash.sha256))throw Error("Hash algorithm too weak: sha256 or stronger is required for EdDSA.");const rt=ir.concatUint8Array([Fe,qe.subarray(1)]),it=_s.sign.detached($e,rt);return{r:it.subarray(0,32),s:it.subarray(32)}},verify:async function(Ae,Se,{r:Ke,s:qe},Fe,$e,rt){const it=ir.concatUint8Array([Ke,qe]);return _s.sign.detached.verify(rt,it,$e.subarray(1))},validateParams:async function(Ae,Se,Ke){if("ed25519"!==Ae.getName())return!1;const{publicKey:qe}=_s.sign.keyPair.fromSeed(Ke),Fe=new Uint8Array([64,...qe]);return ir.equalsUint8Array(Se,Fe)}});function ra(Ae,Se){const Ke=new Ir["aes"+8*Ae.length](Ae),qe=new Uint32Array([2795939494,2795939494]),Fe=na(Se);let $e=qe;const rt=Fe,it=Fe.length/2,nt=new Uint32Array([0,0]);let st=new Uint32Array(4);for(let Ae=0;Ae<=5;++Ae)for(let Se=0;Se<it;++Se)nt[1]=it*Ae+(1+Se),st[0]=$e[0],st[1]=$e[1],st[2]=rt[2*Se],st[3]=rt[2*Se+1],st=na(Ke.encrypt(aa(st))),$e=st.subarray(0,2),$e[0]^=nt[0],$e[1]^=nt[1],rt[2*Se]=st[2],rt[2*Se+1]=st[3];return aa($e,rt)}function ia(Ae,Se){const Ke=new Ir["aes"+8*Ae.length](Ae),qe=new Uint32Array([2795939494,2795939494]),Fe=na(Se);let $e=Fe.subarray(0,2);const rt=Fe.subarray(2),it=Fe.length/2-1,nt=new Uint32Array([0,0]);let st=new Uint32Array(4);for(let Ae=5;Ae>=0;--Ae)for(let Se=it-1;Se>=0;--Se)nt[1]=it*Ae+(Se+1),st[0]=$e[0]^nt[0],st[1]=$e[1]^nt[1],st[2]=rt[2*Se],st[3]=rt[2*Se+1],st=na(Ke.decrypt(aa(st))),$e=st.subarray(0,2),rt[2*Se]=st[2],rt[2*Se+1]=st[3];if($e[0]===qe[0]&&$e[1]===qe[1])return aa(rt);throw Error("Key Data Integrity failed")}function na(Ae){const{length:Se}=Ae,Ke=function(Ae){if(ir.isString(Ae)){const{length:Se}=Ae,Ke=new ArrayBuffer(Se),qe=new Uint8Array(Ke);for(let Ke=0;Ke<Se;++Ke)qe[Ke]=Ae.charCodeAt(Ke);return Ke}return new Uint8Array(Ae).buffer}(Ae),qe=new DataView(Ke),Fe=new Uint32Array(Se/4);for(let Ae=0;Ae<Se/4;++Ae)Fe[Ae]=qe.getUint32(4*Ae);return Fe}function aa(){let Ae=0;for(let Se=0;Se<arguments.length;++Se)Ae+=4*arguments[Se].length;const Se=new ArrayBuffer(Ae),Ke=new DataView(Se);let qe=0;for(let Ae=0;Ae<arguments.length;++Ae){for(let Se=0;Se<arguments[Ae].length;++Se)Ke.setUint32(qe+4*Se,arguments[Ae][Se]);qe+=4*arguments[Ae].length}return new Uint8Array(Se)}var Ca=Object.freeze({__proto__:null,wrap:ra,unwrap:ia});function oa(Ae){const Se=8-Ae.length%8,Ke=new Uint8Array(Ae.length+Se).fill(Se);return Ke.set(Ae),Ke}function ca(Ae){const Se=Ae.length;if(Se>0){const Ke=Ae[Se-1];if(Ke>=1){const qe=Ae.subarray(Se-Ke),Fe=new Uint8Array(Ke).fill(Ke);if(ir.equalsUint8Array(qe,Fe))return Ae.subarray(0,Se-Ke)}}throw Error("Invalid padding")}var Ba=Object.freeze({__proto__:null,encode:oa,decode:ca});const Ra=ir.getWebCrypto(),Da=ir.getNodeCrypto();function fa(Ae,Se,Ke,qe){return ir.concatUint8Array([Se.write(),new Uint8Array([Ae]),Ke.write(),ir.stringToUint8Array("Anonymous Sender "),qe.subarray(0,20)])}async function la(Ae,Se,Ke,qe,Fe=!1,$e=!1){let rt;if(Fe){for(rt=0;rt<Se.length&&0===Se[rt];rt++);Se=Se.subarray(rt)}if($e){for(rt=Se.length-1;rt>=0&&0===Se[rt];rt--);Se=Se.subarray(0,rt+1)}return(await In.digest(Ae,ir.concatUint8Array([new Uint8Array([0,0,0,1]),Se,qe]))).subarray(0,Ke)}async function pa(Ae,Se){switch(Ae.type){case"curve25519":{const Ke=rn(32),{secretKey:qe,sharedKey:Fe}=await ya(Ae,Se,null,Ke);let{publicKey:$e}=_s.box.keyPair.fromSecretKey(qe);return $e=ir.concatUint8Array([new Uint8Array([64]),$e]),{publicKey:$e,sharedKey:Fe}}case"web":if(Ae.web&&ir.getWebCrypto())try{return await async function(Ae,Se){const Ke=Ln(Ae.payloadSize,Ae.web.web,Se);let qe=Ra.generateKey({name:"ECDH",namedCurve:Ae.web.web},!0,["deriveKey","deriveBits"]),Fe=Ra.importKey("jwk",Ke,{name:"ECDH",namedCurve:Ae.web.web},!1,[]);[qe,Fe]=await Promise.all([qe,Fe]);let $e=Ra.deriveBits({name:"ECDH",namedCurve:Ae.web.web,public:Fe},qe.privateKey,Ae.web.sharedSize),rt=Ra.exportKey("jwk",qe.publicKey);[$e,rt]=await Promise.all([$e,rt]);const it=new Uint8Array($e),nt=new Uint8Array(jn(rt));return{publicKey:nt,sharedKey:it}}(Ae,Se)}catch(Ae){ir.printDebugError(Ae)}break;case"node":return async function(Ae,Se){const Ke=Da.createECDH(Ae.node.node);Ke.generateKeys();const qe=new Uint8Array(Ke.computeSecret(Se)),Fe=new Uint8Array(Ke.getPublicKey());return{publicKey:Fe,sharedKey:qe}}(Ae,Se)}return async function(Ae,Se){const Ke=await Sn(Ae.name),qe=await Ae.genKeyPair();Se=An(Ke,Se);const Fe=kn(Ke,qe.privateKey),$e=qe.publicKey,rt=Fe.derive(Se.getPublic()),it=Ke.curve.p.byteLength(),nt=rt.toArrayLike(Uint8Array,"be",it);return{publicKey:$e,sharedKey:nt}}(Ae,Se)}async function ya(Ae,Se,Ke,qe){if(qe.length!==Ae.payloadSize){const Se=new Uint8Array(Ae.payloadSize);Se.set(qe,Ae.payloadSize-qe.length),qe=Se}switch(Ae.type){case"curve25519":{const Ae=qe.slice().reverse();return{secretKey:Ae,sharedKey:_s.scalarMult(Ae,Se.subarray(1))}}case"web":if(Ae.web&&ir.getWebCrypto())try{return await async function(Ae,Se,Ke,qe){const Fe=Wn(Ae.payloadSize,Ae.web.web,Ke,qe);let $e=Ra.importKey("jwk",Fe,{name:"ECDH",namedCurve:Ae.web.web},!0,["deriveKey","deriveBits"]);const rt=Ln(Ae.payloadSize,Ae.web.web,Se);let it=Ra.importKey("jwk",rt,{name:"ECDH",namedCurve:Ae.web.web},!0,[]);[$e,it]=await Promise.all([$e,it]);let nt=Ra.deriveBits({name:"ECDH",namedCurve:Ae.web.web,public:it},$e,Ae.web.sharedSize),st=Ra.exportKey("jwk",$e);[nt,st]=await Promise.all([nt,st]);const ut=new Uint8Array(nt);return{secretKey:ye(st.d),sharedKey:ut}}(Ae,Se,Ke,qe)}catch(Ae){ir.printDebugError(Ae)}break;case"node":return async function(Ae,Se,Ke){const qe=Da.createECDH(Ae.node.node);qe.setPrivateKey(Ke);const Fe=new Uint8Array(qe.computeSecret(Se));return{secretKey:new Uint8Array(qe.getPrivateKey()),sharedKey:Fe}}(Ae,Se,qe)}return async function(Ae,Se,Ke){const qe=await Sn(Ae.name);Se=An(qe,Se),Ke=kn(qe,Ke);const Fe=new Uint8Array(Ke.getPrivate()),$e=Ke.derive(Se.getPublic()),rt=qe.curve.p.byteLength(),it=$e.toArrayLike(Uint8Array,"be",rt);return{secretKey:Fe,sharedKey:it}}(Ae,Se,qe)}var Ta=Object.freeze({__proto__:null,validateParams:async function(Ae,Se,Ke){return Nn(ur.publicKey.ecdh,Ae,Se,Ke)},encrypt:async function(Ae,Se,Ke,qe,Fe){const $e=oa(Ke),rt=new On(Ae),{publicKey:it,sharedKey:nt}=await pa(rt,qe),st=fa(ur.publicKey.ecdh,Ae,Se,Fe),{keySize:ut}=hi(Se.cipher);return{publicKey:it,wrappedKey:ra(await la(Se.hash,nt,ut,st),$e)}},decrypt:async function(Ae,Se,Ke,qe,Fe,$e,rt){const it=new On(Ae),{sharedKey:nt}=await ya(it,Ke,Fe,$e),st=fa(ur.publicKey.ecdh,Ae,Se,rt),{keySize:ut}=hi(Se.cipher);let ht;for(let Ke=0;Ke<3;Ke++)try{return ca(ia(await la(Se.hash,nt,ut,st,1===Ke,2===Ke),qe))}catch(Ae){ht=Ae}throw ht}}),Ka=Object.freeze({__proto__:null,Curve:On,ecdh:Ta,ecdsa:Ma,eddsa:Pa,generate:async function(Ae){const Se=await ir.getBigInteger();Ae=new On(Ae);const Ke=await Ae.genKeyPair(),qe=new Se(Ke.publicKey).toUint8Array(),Fe=new Se(Ke.privateKey).toUint8Array("be",Ae.payloadSize);return{oid:Ae.oid,Q:qe,secret:Fe,hash:Ae.hash,cipher:Ae.cipher}},getPreferredHashAlgo:function(Ae){return da[ur.write(ur.curve,Ae.toHex())].hash}});var Ia=Object.freeze({__proto__:null,sign:async function(Ae,Se,Ke,qe,Fe,$e){const rt=await ir.getBigInteger(),it=new rt(1);let nt,st,ut,ht;qe=new rt(qe),Fe=new rt(Fe),Ke=new rt(Ke),$e=new rt($e),Ke=Ke.mod(qe),$e=$e.mod(Fe);const ft=new rt(Se.subarray(0,Fe.byteLength())).mod(Fe);for(;;){if(nt=await nn(it,Fe),st=Ke.modExp(nt,qe).imod(Fe),st.isZero())continue;const Ae=$e.mul(st).imod(Fe);if(ht=ft.add(Ae).imod(Fe),ut=nt.modInv(Fe).imul(ht).imod(Fe),!ut.isZero())break}return{r:st.toUint8Array("be",Fe.byteLength()),s:ut.toUint8Array("be",Fe.byteLength())}},verify:async function(Ae,Se,Ke,qe,Fe,$e,rt,it){const nt=await ir.getBigInteger(),st=new nt(0);if(Se=new nt(Se),Ke=new nt(Ke),$e=new nt($e),rt=new nt(rt),Fe=new nt(Fe),it=new nt(it),Se.lte(st)||Se.gte(rt)||Ke.lte(st)||Ke.gte(rt))return ir.printDebug("invalid DSA Signature"),!1;const ut=new nt(qe.subarray(0,rt.byteLength())).imod(rt),ht=Ke.modInv(rt);if(ht.isZero())return ir.printDebug("invalid DSA Signature"),!1;Fe=Fe.mod($e),it=it.mod($e);const ft=ut.mul(ht).imod(rt),yt=Se.mul(ht).imod(rt),mt=Fe.modExp(ft,$e),vt=it.modExp(yt,$e);return mt.mul(vt).imod($e).imod(rt).equal(Se)},validateParams:async function(Ae,Se,Ke,qe,Fe){const $e=await ir.getBigInteger();Ae=new $e(Ae),Se=new $e(Se),Ke=new $e(Ke),qe=new $e(qe);const rt=new $e(1);if(Ke.lte(rt)||Ke.gte(Ae))return!1;if(!Ae.dec().mod(Se).isZero())return!1;if(!Ke.modExp(Se,Ae).isOne())return!1;const it=new $e(Se.bitLength()),nt=new $e(150);if(it.lt(nt)||!await on(Se,null,32))return!1;Fe=new $e(Fe);const st=new $e(2),ut=await nn(st.leftShift(it.dec()),st.leftShift(it)),ht=Se.mul(ut).add(Fe);return!!qe.equal(Ke.modExp(ht,Ae))}}),Ua={rsa:Us,elgamal:Zs,elliptic:Ka,dsa:Ia,nacl:_s};var Oa=Object.freeze({__proto__:null,parseSignatureParams:function(Ae,Se){let Ke=0;switch(Ae){case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaSign:return{s:ir.readMPI(Se.subarray(Ke))};case ur.publicKey.dsa:case ur.publicKey.ecdsa:{const Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2;return{r:Ae,s:ir.readMPI(Se.subarray(Ke))}}case ur.publicKey.eddsa:{let Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2,Ae=ir.leftPad(Ae,32);let qe=ir.readMPI(Se.subarray(Ke));return qe=ir.leftPad(qe,32),{r:Ae,s:qe}}default:throw new Rn("Unknown signature algorithm.")}},verify:async function(Ae,Se,Ke,qe,Fe,$e){switch(Ae){case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaSign:{const{n:Ae,e:rt}=qe,it=ir.leftPad(Ke.s,Ae.length);return Ua.rsa.verify(Se,Fe,it,Ae,rt,$e)}case ur.publicKey.dsa:{const{g:Ae,p:Fe,q:rt,y:it}=qe,{r:nt,s:st}=Ke;return Ua.dsa.verify(Se,nt,st,$e,Ae,Fe,rt,it)}case ur.publicKey.ecdsa:{const{oid:Ae,Q:rt}=qe,it=new Ua.elliptic.Curve(Ae).payloadSize,nt=ir.leftPad(Ke.r,it),st=ir.leftPad(Ke.s,it);return Ua.elliptic.ecdsa.verify(Ae,Se,{r:nt,s:st},Fe,rt,$e)}case ur.publicKey.eddsa:{const{oid:Ae,Q:rt}=qe;return Ua.elliptic.eddsa.verify(Ae,Se,Ke,Fe,rt,$e)}default:throw Error("Unknown signature algorithm.")}},sign:async function(Ae,Se,Ke,qe,Fe,$e){if(!Ke||!qe)throw Error("Missing key parameters");switch(Ae){case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaSign:{const{n:Ae,e:rt}=Ke,{d:it,p:nt,q:st,u:ut}=qe;return{s:await Ua.rsa.sign(Se,Fe,Ae,rt,it,nt,st,ut,$e)}}case ur.publicKey.dsa:{const{g:Ae,p:Fe,q:rt}=Ke,{x:it}=qe;return Ua.dsa.sign(Se,$e,Ae,Fe,rt,it)}case ur.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case ur.publicKey.ecdsa:{const{oid:Ae,Q:rt}=Ke,{d:it}=qe;return Ua.elliptic.ecdsa.sign(Ae,Se,Fe,rt,it,$e)}case ur.publicKey.eddsa:{const{oid:Ae,Q:rt}=Ke,{seed:it}=qe;return Ua.elliptic.eddsa.sign(Ae,Se,Fe,rt,it,$e)}default:throw Error("Unknown signature algorithm.")}}});class _a{constructor(Ae){Ae=void 0===Ae?new Uint8Array([]):ir.isString(Ae)?ir.stringToUint8Array(Ae):new Uint8Array(Ae),this.data=Ae}read(Ae){if(Ae.length>=1){const Se=Ae[0];if(Ae.length>=1+Se)return this.data=Ae.subarray(1,1+Se),1+this.data.length}throw Error("Invalid symmetric key")}write(){return ir.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class ka{constructor(Ae){if(Ae){const{hash:Se,cipher:Ke}=Ae;this.hash=Se,this.cipher=Ke}else this.hash=null,this.cipher=null}read(Ae){if(Ae.length<4||3!==Ae[0]||1!==Ae[1])throw Error("Cannot read KDFParams");return this.hash=Ae[2],this.cipher=Ae[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function Aa(Ae){try{Ae.getName()}catch(Ae){throw new Rn("Unknown curve OID")}}var Na=Object.freeze({__proto__:null,publicKeyEncrypt:async function(Ae,Se,Ke,qe){switch(Ae){case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaEncryptSign:{const{n:Ae,e:qe}=Se;return{c:await Ua.rsa.encrypt(Ke,Ae,qe)}}case ur.publicKey.elgamal:{const{p:Ae,g:qe,y:Fe}=Se;return Ua.elgamal.encrypt(Ke,Ae,qe,Fe)}case ur.publicKey.ecdh:{const{oid:Ae,Q:Fe,kdfParams:$e}=Se,{publicKey:rt,wrappedKey:it}=await Ua.elliptic.ecdh.encrypt(Ae,$e,Ke,Fe,qe);return{V:rt,C:new _a(it)}}default:return[]}},publicKeyDecrypt:async function(Ae,Se,Ke,qe,Fe,$e){switch(Ae){case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaEncrypt:{const{c:Ae}=qe,{n:Fe,e:rt}=Se,{d:it,p:nt,q:st,u:ut}=Ke;return Ua.rsa.decrypt(Ae,Fe,rt,it,nt,st,ut,$e)}case ur.publicKey.elgamal:{const{c1:Ae,c2:Fe}=qe,rt=Se.p,it=Ke.x;return Ua.elgamal.decrypt(Ae,Fe,rt,it,$e)}case ur.publicKey.ecdh:{const{oid:Ae,Q:$e,kdfParams:rt}=Se,{d:it}=Ke,{V:nt,C:st}=qe;return Ua.elliptic.ecdh.decrypt(Ae,rt,nt,st.data,$e,it,Fe)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(Ae,Se){let Ke=0;switch(Ae){case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaSign:{const Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2;const qe=ir.readMPI(Se.subarray(Ke));return Ke+=qe.length+2,{read:Ke,publicParams:{n:Ae,e:qe}}}case ur.publicKey.dsa:{const Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2;const qe=ir.readMPI(Se.subarray(Ke));Ke+=qe.length+2;const Fe=ir.readMPI(Se.subarray(Ke));Ke+=Fe.length+2;const $e=ir.readMPI(Se.subarray(Ke));return Ke+=$e.length+2,{read:Ke,publicParams:{p:Ae,q:qe,g:Fe,y:$e}}}case ur.publicKey.elgamal:{const Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2;const qe=ir.readMPI(Se.subarray(Ke));Ke+=qe.length+2;const Fe=ir.readMPI(Se.subarray(Ke));return Ke+=Fe.length+2,{read:Ke,publicParams:{p:Ae,g:qe,y:Fe}}}case ur.publicKey.ecdsa:{const Ae=new _n;Ke+=Ae.read(Se),Aa(Ae);const qe=ir.readMPI(Se.subarray(Ke));return Ke+=qe.length+2,{read:Ke,publicParams:{oid:Ae,Q:qe}}}case ur.publicKey.eddsa:{const Ae=new _n;Ke+=Ae.read(Se),Aa(Ae);let qe=ir.readMPI(Se.subarray(Ke));return Ke+=qe.length+2,qe=ir.leftPad(qe,33),{read:Ke,publicParams:{oid:Ae,Q:qe}}}case ur.publicKey.ecdh:{const Ae=new _n;Ke+=Ae.read(Se),Aa(Ae);const qe=ir.readMPI(Se.subarray(Ke));Ke+=qe.length+2;const Fe=new ka;return Ke+=Fe.read(Se.subarray(Ke)),{read:Ke,publicParams:{oid:Ae,Q:qe,kdfParams:Fe}}}default:throw new Rn("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(Ae,Se,Ke){let qe=0;switch(Ae){case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaSign:{const Ae=ir.readMPI(Se.subarray(qe));qe+=Ae.length+2;const Ke=ir.readMPI(Se.subarray(qe));qe+=Ke.length+2;const Fe=ir.readMPI(Se.subarray(qe));qe+=Fe.length+2;const $e=ir.readMPI(Se.subarray(qe));return qe+=$e.length+2,{read:qe,privateParams:{d:Ae,p:Ke,q:Fe,u:$e}}}case ur.publicKey.dsa:case ur.publicKey.elgamal:{const Ae=ir.readMPI(Se.subarray(qe));return qe+=Ae.length+2,{read:qe,privateParams:{x:Ae}}}case ur.publicKey.ecdsa:case ur.publicKey.ecdh:{const Ae=new On(Ke.oid);let Fe=ir.readMPI(Se.subarray(qe));return qe+=Fe.length+2,Fe=ir.leftPad(Fe,Ae.payloadSize),{read:qe,privateParams:{d:Fe}}}case ur.publicKey.eddsa:{const Ae=new On(Ke.oid);let Fe=ir.readMPI(Se.subarray(qe));return qe+=Fe.length+2,Fe=ir.leftPad(Fe,Ae.payloadSize),{read:qe,privateParams:{seed:Fe}}}default:throw new Rn("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(Ae,Se){let Ke=0;switch(Ae){case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaEncryptSign:return{c:ir.readMPI(Se.subarray(Ke))};case ur.publicKey.elgamal:{const Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2;return{c1:Ae,c2:ir.readMPI(Se.subarray(Ke))}}case ur.publicKey.ecdh:{const Ae=ir.readMPI(Se.subarray(Ke));Ke+=Ae.length+2;const qe=new _a;return qe.read(Se.subarray(Ke)),{V:Ae,C:qe}}default:throw new Rn("Unknown public key encryption algorithm.")}},serializeParams:function(Ae,Se){const Ke=Object.keys(Se).map((Ae=>{const Ke=Se[Ae];return ir.isUint8Array(Ke)?ir.uint8ArrayToMPI(Ke):Ke.write()}));return ir.concatUint8Array(Ke)},generateParams:function(Ae,Se,Ke){switch(Ae){case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaSign:return Ua.rsa.generate(Se,65537).then((({n:Ae,e:Se,d:Ke,p:qe,q:Fe,u:$e})=>({privateParams:{d:Ke,p:qe,q:Fe,u:$e},publicParams:{n:Ae,e:Se}})));case ur.publicKey.ecdsa:return Ua.elliptic.generate(Ke).then((({oid:Ae,Q:Se,secret:Ke})=>({privateParams:{d:Ke},publicParams:{oid:new _n(Ae),Q:Se}})));case ur.publicKey.eddsa:return Ua.elliptic.generate(Ke).then((({oid:Ae,Q:Se,secret:Ke})=>({privateParams:{seed:Ke},publicParams:{oid:new _n(Ae),Q:Se}})));case ur.publicKey.ecdh:return Ua.elliptic.generate(Ke).then((({oid:Ae,Q:Se,secret:Ke,hash:qe,cipher:Fe})=>({privateParams:{d:Ke},publicParams:{oid:new _n(Ae),Q:Se,kdfParams:new ka({hash:qe,cipher:Fe})}})));case ur.publicKey.dsa:case ur.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(Ae,Se,Ke){if(!Se||!Ke)throw Error("Missing key parameters");switch(Ae){case ur.publicKey.rsaEncrypt:case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaSign:{const{n:Ae,e:qe}=Se,{d:Fe,p:$e,q:rt,u:it}=Ke;return Ua.rsa.validateParams(Ae,qe,Fe,$e,rt,it)}case ur.publicKey.dsa:{const{p:Ae,q:qe,g:Fe,y:$e}=Se,{x:rt}=Ke;return Ua.dsa.validateParams(Ae,qe,Fe,$e,rt)}case ur.publicKey.elgamal:{const{p:Ae,g:qe,y:Fe}=Se,{x:$e}=Ke;return Ua.elgamal.validateParams(Ae,qe,Fe,$e)}case ur.publicKey.ecdsa:case ur.publicKey.ecdh:{const qe=Ua.elliptic[ur.read(ur.publicKey,Ae)],{oid:Fe,Q:$e}=Se,{d:rt}=Ke;return qe.validateParams(Fe,$e,rt)}case ur.publicKey.eddsa:{const{oid:Ae,Q:qe}=Se,{seed:Fe}=Ke;return Ua.elliptic.eddsa.validateParams(Ae,qe,Fe)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(Ae){const{blockSize:Se}=hi(Ae),Ke=await rn(Se),qe=new Uint8Array([Ke[Ke.length-2],Ke[Ke.length-1]]);return ir.concat([Ke,qe])},generateSessionKey:function(Ae){const{keySize:Se}=hi(Ae);return rn(Se)},getAEADMode:function(Ae){const Se=ur.read(ur.aead,Ae);return ws[Se]},getCipher:hi});const qa={cipher:Ir,hash:In,mode:ws,publicKey:Ua,signature:Oa,random:As,pkcs1:Ms,pkcs5:Ba,aesKW:Ca};Object.assign(qa,Na);var ja="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function xa(Ae,Se){return Ae.length===Se?Ae:Ae.subarray?Ae.subarray(0,Se):(Ae.length=Se,Ae)}const za={arraySet:function(Ae,Se,Ke,qe,Fe){if(Se.subarray&&Ae.subarray)Ae.set(Se.subarray(Ke,Ke+qe),Fe);else for(let $e=0;$e<qe;$e++)Ae[Fe+$e]=Se[Ke+$e]},flattenChunks:function(Ae){let Se,Ke,qe,Fe,$e;for(qe=0,Se=0,Ke=Ae.length;Se<Ke;Se++)qe+=Ae[Se].length;const rt=new Uint8Array(qe);for(Fe=0,Se=0,Ke=Ae.length;Se<Ke;Se++)$e=Ae[Se],rt.set($e,Fe),Fe+=$e.length;return rt}},Fa={arraySet:function(Ae,Se,Ke,qe,Fe){for(let $e=0;$e<qe;$e++)Ae[Fe+$e]=Se[Ke+$e]},flattenChunks:function(Ae){return[].concat.apply([],Ae)}};let La=ja?Uint8Array:Array,Ha=ja?Uint16Array:Array,Wa=ja?Int32Array:Array,Ga=ja?za.flattenChunks:Fa.flattenChunks,$a=ja?za.arraySet:Fa.arraySet;const Ya=0,Va=1,Za=2,Qa=3,Xa=4,Ja=5,ro=6,no=0,so=1,ao=2,oo=-2,co=-3,uo=-5,ho=-1,fo=1,lo=2,po=3,yo=4,mo=0,go=1,bo=2,vo=8;function is(Ae){let Se=Ae.length;for(;--Se>=0;)Ae[Se]=0}const wo=0,_o=1,ko=2,To=29,Oo=256,Ho=Oo+1+To,Wo=30,$o=19,Yo=2*Ho+1,Vo=15,Zo=16,Qo=7,Xo=256,Jo=16,ec=17,tc=18,rc=[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],nc=[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],sc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ac=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],oc=Array(2*(Ho+2));is(oc);const cc=Array(2*Wo);is(cc);const uc=Array(512);is(uc);const hc=Array(256);is(hc);const fc=Array(To);is(fc);const lc=Array(Wo);function Ks(Ae,Se,Ke,qe,Fe){this.static_tree=Ae,this.extra_bits=Se,this.extra_base=Ke,this.elems=qe,this.max_length=Fe,this.has_stree=Ae&&Ae.length}let dc,pc,yc;function Is(Ae,Se){this.dyn_tree=Ae,this.max_code=0,this.stat_desc=Se}function Bs(Ae){return Ae<256?uc[Ae]:uc[256+(Ae>>>7)]}function Ts(Ae,Se){Ae.pending_buf[Ae.pending++]=255&Se,Ae.pending_buf[Ae.pending++]=Se>>>8&255}function zs(Ae,Se,Ke){Ae.bi_valid>Zo-Ke?(Ae.bi_buf|=Se<<Ae.bi_valid&65535,Ts(Ae,Ae.bi_buf),Ae.bi_buf=Se>>Zo-Ae.bi_valid,Ae.bi_valid+=Ke-Zo):(Ae.bi_buf|=Se<<Ae.bi_valid&65535,Ae.bi_valid+=Ke)}function qs(Ae,Se,Ke){zs(Ae,Ke[2*Se],Ke[2*Se+1])}function Fs(Ae,Se){let Ke=0;do{Ke|=1&Ae,Ae>>>=1,Ke<<=1}while(--Se>0);return Ke>>>1}function Os(Ae,Se,Ke){const qe=Array(Vo+1);let Fe,$e,rt=0;for(Fe=1;Fe<=Vo;Fe++)qe[Fe]=rt=rt+Ke[Fe-1]<<1;for($e=0;$e<=Se;$e++){const Se=Ae[2*$e+1];0!==Se&&(Ae[2*$e]=Fs(qe[Se]++,Se))}}function Ns(Ae){let Se;for(Se=0;Se<Ho;Se++)Ae.dyn_ltree[2*Se]=0;for(Se=0;Se<Wo;Se++)Ae.dyn_dtree[2*Se]=0;for(Se=0;Se<$o;Se++)Ae.bl_tree[2*Se]=0;Ae.dyn_ltree[2*Xo]=1,Ae.opt_len=Ae.static_len=0,Ae.last_lit=Ae.matches=0}function js(Ae){Ae.bi_valid>8?Ts(Ae,Ae.bi_buf):Ae.bi_valid>0&&(Ae.pending_buf[Ae.pending++]=Ae.bi_buf),Ae.bi_buf=0,Ae.bi_valid=0}function Ls(Ae,Se,Ke,qe){const Fe=2*Se,$e=2*Ke;return Ae[Fe]<Ae[$e]||Ae[Fe]===Ae[$e]&&qe[Se]<=qe[Ke]}function Ws(Ae,Se,Ke){const qe=Ae.heap[Ke];let Fe=Ke<<1;for(;Fe<=Ae.heap_len&&(Fe<Ae.heap_len&&Ls(Se,Ae.heap[Fe+1],Ae.heap[Fe],Ae.depth)&&Fe++,!Ls(Se,qe,Ae.heap[Fe],Ae.depth));)Ae.heap[Ke]=Ae.heap[Fe],Ke=Fe,Fe<<=1;Ae.heap[Ke]=qe}function Hs(Ae,Se,Ke){let qe,Fe,$e,rt,it=0;if(0!==Ae.last_lit)do{qe=Ae.pending_buf[Ae.d_buf+2*it]<<8|Ae.pending_buf[Ae.d_buf+2*it+1],Fe=Ae.pending_buf[Ae.l_buf+it],it++,0===qe?qs(Ae,Fe,Se):($e=hc[Fe],qs(Ae,$e+Oo+1,Se),rt=rc[$e],0!==rt&&(Fe-=fc[$e],zs(Ae,Fe,rt)),qe--,$e=Bs(qe),qs(Ae,$e,Ke),rt=nc[$e],0!==rt&&(qe-=lc[$e],zs(Ae,qe,rt)))}while(it<Ae.last_lit);qs(Ae,Xo,Se)}function Gs(Ae,Se){const Ke=Se.dyn_tree,qe=Se.stat_desc.static_tree,Fe=Se.stat_desc.has_stree,$e=Se.stat_desc.elems;let rt,it,nt,st=-1;for(Ae.heap_len=0,Ae.heap_max=Yo,rt=0;rt<$e;rt++)0!==Ke[2*rt]?(Ae.heap[++Ae.heap_len]=st=rt,Ae.depth[rt]=0):Ke[2*rt+1]=0;for(;Ae.heap_len<2;)nt=Ae.heap[++Ae.heap_len]=st<2?++st:0,Ke[2*nt]=1,Ae.depth[nt]=0,Ae.opt_len--,Fe&&(Ae.static_len-=qe[2*nt+1]);for(Se.max_code=st,rt=Ae.heap_len>>1;rt>=1;rt--)Ws(Ae,Ke,rt);nt=$e;do{rt=Ae.heap[1],Ae.heap[1]=Ae.heap[Ae.heap_len--],Ws(Ae,Ke,1),it=Ae.heap[1],Ae.heap[--Ae.heap_max]=rt,Ae.heap[--Ae.heap_max]=it,Ke[2*nt]=Ke[2*rt]+Ke[2*it],Ae.depth[nt]=(Ae.depth[rt]>=Ae.depth[it]?Ae.depth[rt]:Ae.depth[it])+1,Ke[2*rt+1]=Ke[2*it+1]=nt,Ae.heap[1]=nt++,Ws(Ae,Ke,1)}while(Ae.heap_len>=2);Ae.heap[--Ae.heap_max]=Ae.heap[1],function(Ae,Se){const Ke=Se.dyn_tree,qe=Se.max_code,Fe=Se.stat_desc.static_tree,$e=Se.stat_desc.has_stree,rt=Se.stat_desc.extra_bits,it=Se.stat_desc.extra_base,nt=Se.stat_desc.max_length;let st,ut,ht,ft,yt,mt,vt=0;for(ft=0;ft<=Vo;ft++)Ae.bl_count[ft]=0;for(Ke[2*Ae.heap[Ae.heap_max]+1]=0,st=Ae.heap_max+1;st<Yo;st++)ut=Ae.heap[st],ft=Ke[2*Ke[2*ut+1]+1]+1,ft>nt&&(ft=nt,vt++),Ke[2*ut+1]=ft,ut>qe||(Ae.bl_count[ft]++,yt=0,ut>=it&&(yt=rt[ut-it]),mt=Ke[2*ut],Ae.opt_len+=mt*(ft+yt),$e&&(Ae.static_len+=mt*(Fe[2*ut+1]+yt)));if(0!==vt){do{for(ft=nt-1;0===Ae.bl_count[ft];)ft--;Ae.bl_count[ft]--,Ae.bl_count[ft+1]+=2,Ae.bl_count[nt]--,vt-=2}while(vt>0);for(ft=nt;0!==ft;ft--)for(ut=Ae.bl_count[ft];0!==ut;)ht=Ae.heap[--st],ht>qe||(Ke[2*ht+1]!==ft&&(Ae.opt_len+=(ft-Ke[2*ht+1])*Ke[2*ht],Ke[2*ht+1]=ft),ut--)}}(Ae,Se),Os(Ke,st,Ae.bl_count)}function Vs(Ae,Se,Ke){let qe,Fe,$e=-1,rt=Se[1],it=0,nt=7,st=4;for(0===rt&&(nt=138,st=3),Se[2*(Ke+1)+1]=65535,qe=0;qe<=Ke;qe++)Fe=rt,rt=Se[2*(qe+1)+1],++it<nt&&Fe===rt||(it<st?Ae.bl_tree[2*Fe]+=it:0!==Fe?(Fe!==$e&&Ae.bl_tree[2*Fe]++,Ae.bl_tree[2*Jo]++):it<=10?Ae.bl_tree[2*ec]++:Ae.bl_tree[2*tc]++,it=0,$e=Fe,0===rt?(nt=138,st=3):Fe===rt?(nt=6,st=3):(nt=7,st=4))}function $s(Ae,Se,Ke){let qe,Fe,$e=-1,rt=Se[1],it=0,nt=7,st=4;for(0===rt&&(nt=138,st=3),qe=0;qe<=Ke;qe++)if(Fe=rt,rt=Se[2*(qe+1)+1],!(++it<nt&&Fe===rt)){if(it<st)do{qs(Ae,Fe,Ae.bl_tree)}while(0!=--it);else 0!==Fe?(Fe!==$e&&(qs(Ae,Fe,Ae.bl_tree),it--),qs(Ae,Jo,Ae.bl_tree),zs(Ae,it-3,2)):it<=10?(qs(Ae,ec,Ae.bl_tree),zs(Ae,it-3,3)):(qs(Ae,tc,Ae.bl_tree),zs(Ae,it-11,7));it=0,$e=Fe,0===rt?(nt=138,st=3):Fe===rt?(nt=6,st=3):(nt=7,st=4)}}is(lc);let mc=!1;function Ys(Ae){mc||(!function(){let Ae,Se,Ke,qe,Fe;const $e=Array(Vo+1);for(Ke=0,qe=0;qe<To-1;qe++)for(fc[qe]=Ke,Ae=0;Ae<1<<rc[qe];Ae++)hc[Ke++]=qe;for(hc[Ke-1]=qe,Fe=0,qe=0;qe<16;qe++)for(lc[qe]=Fe,Ae=0;Ae<1<<nc[qe];Ae++)uc[Fe++]=qe;for(Fe>>=7;qe<Wo;qe++)for(lc[qe]=Fe<<7,Ae=0;Ae<1<<nc[qe]-7;Ae++)uc[256+Fe++]=qe;for(Se=0;Se<=Vo;Se++)$e[Se]=0;for(Ae=0;Ae<=143;)oc[2*Ae+1]=8,Ae++,$e[8]++;for(;Ae<=255;)oc[2*Ae+1]=9,Ae++,$e[9]++;for(;Ae<=279;)oc[2*Ae+1]=7,Ae++,$e[7]++;for(;Ae<=287;)oc[2*Ae+1]=8,Ae++,$e[8]++;for(Os(oc,Ho+1,$e),Ae=0;Ae<Wo;Ae++)cc[2*Ae+1]=5,cc[2*Ae]=Fs(Ae,5);dc=new Ks(oc,rc,Oo+1,Ho,Vo),pc=new Ks(cc,nc,0,Wo,Vo),yc=new Ks([],sc,0,$o,Qo)}(),mc=!0),Ae.l_desc=new Is(Ae.dyn_ltree,dc),Ae.d_desc=new Is(Ae.dyn_dtree,pc),Ae.bl_desc=new Is(Ae.bl_tree,yc),Ae.bi_buf=0,Ae.bi_valid=0,Ns(Ae)}function Xs(Ae,Se,Ke,qe){zs(Ae,(wo<<1)+(qe?1:0),3),function(Ae,Se,Ke,qe){js(Ae),qe&&(Ts(Ae,Ke),Ts(Ae,~Ke)),$a(Ae.pending_buf,Ae.window,Se,Ke,Ae.pending),Ae.pending+=Ke}(Ae,Se,Ke,!0)}function Qs(Ae){zs(Ae,_o<<1,3),qs(Ae,Xo,oc),function(Ae){16===Ae.bi_valid?(Ts(Ae,Ae.bi_buf),Ae.bi_buf=0,Ae.bi_valid=0):Ae.bi_valid>=8&&(Ae.pending_buf[Ae.pending++]=255&Ae.bi_buf,Ae.bi_buf>>=8,Ae.bi_valid-=8)}(Ae)}function Js(Ae,Se,Ke,qe){let Fe,$e,rt=0;Ae.level>0?(Ae.strm.data_type===bo&&(Ae.strm.data_type=function(Ae){let Se,Ke=4093624447;for(Se=0;Se<=31;Se++,Ke>>>=1)if(1&Ke&&0!==Ae.dyn_ltree[2*Se])return mo;if(0!==Ae.dyn_ltree[18]||0!==Ae.dyn_ltree[20]||0!==Ae.dyn_ltree[26])return go;for(Se=32;Se<Oo;Se++)if(0!==Ae.dyn_ltree[2*Se])return go;return mo}(Ae)),Gs(Ae,Ae.l_desc),Gs(Ae,Ae.d_desc),rt=function(Ae){let Se;for(Vs(Ae,Ae.dyn_ltree,Ae.l_desc.max_code),Vs(Ae,Ae.dyn_dtree,Ae.d_desc.max_code),Gs(Ae,Ae.bl_desc),Se=$o-1;Se>=3&&0===Ae.bl_tree[2*ac[Se]+1];Se--);return Ae.opt_len+=3*(Se+1)+5+5+4,Se}(Ae),Fe=Ae.opt_len+3+7>>>3,$e=Ae.static_len+3+7>>>3,$e<=Fe&&(Fe=$e)):Fe=$e=Ke+5,Ke+4<=Fe&&-1!==Se?Xs(Ae,Se,Ke,qe):Ae.strategy===yo||$e===Fe?(zs(Ae,(_o<<1)+(qe?1:0),3),Hs(Ae,oc,cc)):(zs(Ae,(ko<<1)+(qe?1:0),3),function(Ae,Se,Ke,qe){let Fe;for(zs(Ae,Se-257,5),zs(Ae,Ke-1,5),zs(Ae,qe-4,4),Fe=0;Fe<qe;Fe++)zs(Ae,Ae.bl_tree[2*ac[Fe]+1],3);$s(Ae,Ae.dyn_ltree,Se-1),$s(Ae,Ae.dyn_dtree,Ke-1)}(Ae,Ae.l_desc.max_code+1,Ae.d_desc.max_code+1,rt+1),Hs(Ae,Ae.dyn_ltree,Ae.dyn_dtree)),Ns(Ae),qe&&js(Ae)}function eo(Ae,Se,Ke){return Ae.pending_buf[Ae.d_buf+2*Ae.last_lit]=Se>>>8&255,Ae.pending_buf[Ae.d_buf+2*Ae.last_lit+1]=255&Se,Ae.pending_buf[Ae.l_buf+Ae.last_lit]=255&Ke,Ae.last_lit++,0===Se?Ae.dyn_ltree[2*Ke]++:(Ae.matches++,Se--,Ae.dyn_ltree[2*(hc[Ke]+Oo+1)]++,Ae.dyn_dtree[2*Bs(Se)]++),Ae.last_lit===Ae.lit_bufsize-1}function to(Ae,Se,Ke,qe){let Fe=65535&Ae|0,$e=Ae>>>16&65535|0,rt=0;for(;0!==Ke;){rt=Ke>2e3?2e3:Ke,Ke-=rt;do{Fe=Fe+Se[qe++]|0,$e=$e+Fe|0}while(--rt);Fe%=65521,$e%=65521}return Fe|$e<<16|0}const gc=function(){let Ae;const Se=[];for(let Ke=0;Ke<256;Ke++){Ae=Ke;for(let Se=0;Se<8;Se++)Ae=1&Ae?3988292384^Ae>>>1:Ae>>>1;Se[Ke]=Ae}return Se}();function io(Ae,Se,Ke,qe){const Fe=gc,$e=qe+Ke;Ae^=-1;for(let Ke=qe;Ke<$e;Ke++)Ae=Ae>>>8^Fe[255&(Ae^Se[Ke])];return-1^Ae}var bc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const vc=9,wc=3,_c=258,kc=_c+wc+1,Ac=32,Sc=42,Ec=69,Mc=73,Pc=91,xc=103,Cc=113,Bc=666,Rc=1,Dc=2,Tc=3,Kc=4,Ic=3;function Ao(Ae,Se){return Ae.msg=bc[Se],Se}function So(Ae){return(Ae<<1)-(Ae>4?9:0)}function Eo(Ae){let Se=Ae.length;for(;--Se>=0;)Ae[Se]=0}function Po(Ae){const Se=Ae.state;let Ke=Se.pending;Ke>Ae.avail_out&&(Ke=Ae.avail_out),0!==Ke&&($a(Ae.output,Se.pending_buf,Se.pending_out,Ke,Ae.next_out),Ae.next_out+=Ke,Se.pending_out+=Ke,Ae.total_out+=Ke,Ae.avail_out-=Ke,Se.pending-=Ke,0===Se.pending&&(Se.pending_out=0))}function xo(Ae,Se){Js(Ae,Ae.block_start>=0?Ae.block_start:-1,Ae.strstart-Ae.block_start,Se),Ae.block_start=Ae.strstart,Po(Ae.strm)}function Mo(Ae,Se){Ae.pending_buf[Ae.pending++]=Se}function Co(Ae,Se){Ae.pending_buf[Ae.pending++]=Se>>>8&255,Ae.pending_buf[Ae.pending++]=255&Se}function Ko(Ae,Se,Ke,qe){let Fe=Ae.avail_in;return Fe>qe&&(Fe=qe),0===Fe?0:(Ae.avail_in-=Fe,$a(Se,Ae.input,Ae.next_in,Fe,Ke),1===Ae.state.wrap?Ae.adler=to(Ae.adler,Se,Fe,Ke):2===Ae.state.wrap&&(Ae.adler=io(Ae.adler,Se,Fe,Ke)),Ae.next_in+=Fe,Ae.total_in+=Fe,Fe)}function Do(Ae,Se){let Ke,qe,Fe=Ae.max_chain_length,$e=Ae.strstart,rt=Ae.prev_length,it=Ae.nice_match;const nt=Ae.strstart>Ae.w_size-kc?Ae.strstart-(Ae.w_size-kc):0,st=Ae.window,ut=Ae.w_mask,ht=Ae.prev,ft=Ae.strstart+_c;let yt=st[$e+rt-1],mt=st[$e+rt];Ae.prev_length>=Ae.good_match&&(Fe>>=2),it>Ae.lookahead&&(it=Ae.lookahead);do{if(Ke=Se,st[Ke+rt]===mt&&st[Ke+rt-1]===yt&&st[Ke]===st[$e]&&st[++Ke]===st[$e+1]){$e+=2,Ke++;do{}while(st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&st[++$e]===st[++Ke]&&$e<ft);if(qe=_c-(ft-$e),$e=ft-_c,qe>rt){if(Ae.match_start=Se,rt=qe,qe>=it)break;yt=st[$e+rt-1],mt=st[$e+rt]}}}while((Se=ht[Se&ut])>nt&&0!=--Fe);return rt<=Ae.lookahead?rt:Ae.lookahead}function Ro(Ae){const Se=Ae.w_size;let Ke,qe,Fe,$e,rt;do{if($e=Ae.window_size-Ae.lookahead-Ae.strstart,Ae.strstart>=Se+(Se-kc)){$a(Ae.window,Ae.window,Se,Se,0),Ae.match_start-=Se,Ae.strstart-=Se,Ae.block_start-=Se,qe=Ae.hash_size,Ke=qe;do{Fe=Ae.head[--Ke],Ae.head[Ke]=Fe>=Se?Fe-Se:0}while(--qe);qe=Se,Ke=qe;do{Fe=Ae.prev[--Ke],Ae.prev[Ke]=Fe>=Se?Fe-Se:0}while(--qe);$e+=Se}if(0===Ae.strm.avail_in)break;if(qe=Ko(Ae.strm,Ae.window,Ae.strstart+Ae.lookahead,$e),Ae.lookahead+=qe,Ae.lookahead+Ae.insert>=wc)for(rt=Ae.strstart-Ae.insert,Ae.ins_h=Ae.window[rt],Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[rt+1])&Ae.hash_mask;Ae.insert&&(Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[rt+wc-1])&Ae.hash_mask,Ae.prev[rt&Ae.w_mask]=Ae.head[Ae.ins_h],Ae.head[Ae.ins_h]=rt,rt++,Ae.insert--,!(Ae.lookahead+Ae.insert<wc)););}while(Ae.lookahead<kc&&0!==Ae.strm.avail_in)}function Uo(Ae,Se){let Ke,qe;for(;;){if(Ae.lookahead<kc){if(Ro(Ae),Ae.lookahead<kc&&Se===Ya)return Rc;if(0===Ae.lookahead)break}if(Ke=0,Ae.lookahead>=wc&&(Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[Ae.strstart+wc-1])&Ae.hash_mask,Ke=Ae.prev[Ae.strstart&Ae.w_mask]=Ae.head[Ae.ins_h],Ae.head[Ae.ins_h]=Ae.strstart),0!==Ke&&Ae.strstart-Ke<=Ae.w_size-kc&&(Ae.match_length=Do(Ae,Ke)),Ae.match_length>=wc)if(qe=eo(Ae,Ae.strstart-Ae.match_start,Ae.match_length-wc),Ae.lookahead-=Ae.match_length,Ae.match_length<=Ae.max_lazy_match&&Ae.lookahead>=wc){Ae.match_length--;do{Ae.strstart++,Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[Ae.strstart+wc-1])&Ae.hash_mask,Ke=Ae.prev[Ae.strstart&Ae.w_mask]=Ae.head[Ae.ins_h],Ae.head[Ae.ins_h]=Ae.strstart}while(0!=--Ae.match_length);Ae.strstart++}else Ae.strstart+=Ae.match_length,Ae.match_length=0,Ae.ins_h=Ae.window[Ae.strstart],Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[Ae.strstart+1])&Ae.hash_mask;else qe=eo(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++;if(qe&&(xo(Ae,!1),0===Ae.strm.avail_out))return Rc}return Ae.insert=Ae.strstart<wc-1?Ae.strstart:wc-1,Se===Xa?(xo(Ae,!0),0===Ae.strm.avail_out?Tc:Kc):Ae.last_lit&&(xo(Ae,!1),0===Ae.strm.avail_out)?Rc:Dc}function Io(Ae,Se){let Ke,qe,Fe;for(;;){if(Ae.lookahead<kc){if(Ro(Ae),Ae.lookahead<kc&&Se===Ya)return Rc;if(0===Ae.lookahead)break}if(Ke=0,Ae.lookahead>=wc&&(Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[Ae.strstart+wc-1])&Ae.hash_mask,Ke=Ae.prev[Ae.strstart&Ae.w_mask]=Ae.head[Ae.ins_h],Ae.head[Ae.ins_h]=Ae.strstart),Ae.prev_length=Ae.match_length,Ae.prev_match=Ae.match_start,Ae.match_length=wc-1,0!==Ke&&Ae.prev_length<Ae.max_lazy_match&&Ae.strstart-Ke<=Ae.w_size-kc&&(Ae.match_length=Do(Ae,Ke),Ae.match_length<=5&&(Ae.strategy===fo||Ae.match_length===wc&&Ae.strstart-Ae.match_start>4096)&&(Ae.match_length=wc-1)),Ae.prev_length>=wc&&Ae.match_length<=Ae.prev_length){Fe=Ae.strstart+Ae.lookahead-wc,qe=eo(Ae,Ae.strstart-1-Ae.prev_match,Ae.prev_length-wc),Ae.lookahead-=Ae.prev_length-1,Ae.prev_length-=2;do{++Ae.strstart<=Fe&&(Ae.ins_h=(Ae.ins_h<<Ae.hash_shift^Ae.window[Ae.strstart+wc-1])&Ae.hash_mask,Ke=Ae.prev[Ae.strstart&Ae.w_mask]=Ae.head[Ae.ins_h],Ae.head[Ae.ins_h]=Ae.strstart)}while(0!=--Ae.prev_length);if(Ae.match_available=0,Ae.match_length=wc-1,Ae.strstart++,qe&&(xo(Ae,!1),0===Ae.strm.avail_out))return Rc}else if(Ae.match_available){if(qe=eo(Ae,0,Ae.window[Ae.strstart-1]),qe&&xo(Ae,!1),Ae.strstart++,Ae.lookahead--,0===Ae.strm.avail_out)return Rc}else Ae.match_available=1,Ae.strstart++,Ae.lookahead--}return Ae.match_available&&(qe=eo(Ae,0,Ae.window[Ae.strstart-1]),Ae.match_available=0),Ae.insert=Ae.strstart<wc-1?Ae.strstart:wc-1,Se===Xa?(xo(Ae,!0),0===Ae.strm.avail_out?Tc:Kc):Ae.last_lit&&(xo(Ae,!1),0===Ae.strm.avail_out)?Rc:Dc}class Bo{constructor(Ae,Se,Ke,qe,Fe){this.good_length=Ae,this.max_lazy=Se,this.nice_length=Ke,this.max_chain=qe,this.func=Fe}}const Uc=[new Bo(0,0,0,0,(function(Ae,Se){let Ke=65535;for(Ke>Ae.pending_buf_size-5&&(Ke=Ae.pending_buf_size-5);;){if(Ae.lookahead<=1){if(Ro(Ae),0===Ae.lookahead&&Se===Ya)return Rc;if(0===Ae.lookahead)break}Ae.strstart+=Ae.lookahead,Ae.lookahead=0;const qe=Ae.block_start+Ke;if((0===Ae.strstart||Ae.strstart>=qe)&&(Ae.lookahead=Ae.strstart-qe,Ae.strstart=qe,xo(Ae,!1),0===Ae.strm.avail_out))return Rc;if(Ae.strstart-Ae.block_start>=Ae.w_size-kc&&(xo(Ae,!1),0===Ae.strm.avail_out))return Rc}return Ae.insert=0,Se===Xa?(xo(Ae,!0),0===Ae.strm.avail_out?Tc:Kc):(Ae.strstart>Ae.block_start&&(xo(Ae,!1),Ae.strm.avail_out),Rc)})),new Bo(4,4,8,4,Uo),new Bo(4,5,16,8,Uo),new Bo(4,6,32,32,Uo),new Bo(4,4,16,16,Io),new Bo(8,16,32,32,Io),new Bo(8,16,128,128,Io),new Bo(8,32,128,256,Io),new Bo(32,128,258,1024,Io),new Bo(32,258,258,4096,Io)];class zo{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vo,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ha(1146),this.dyn_dtree=new Ha(122),this.bl_tree=new Ha(78),Eo(this.dyn_ltree),Eo(this.dyn_dtree),Eo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ha(16),this.heap=new Ha(573),Eo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ha(573),Eo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}}function qo(Ae){const Se=function(Ae){let Se;return Ae&&Ae.state?(Ae.total_in=Ae.total_out=0,Ae.data_type=bo,Se=Ae.state,Se.pending=0,Se.pending_out=0,Se.wrap<0&&(Se.wrap=-Se.wrap),Se.status=Se.wrap?Sc:Cc,Ae.adler=2===Se.wrap?0:1,Se.last_flush=Ya,Ys(Se),no):Ao(Ae,oo)}(Ae);return Se===no&&function(Ae){Ae.window_size=2*Ae.w_size,Eo(Ae.head),Ae.max_lazy_match=Uc[Ae.level].max_lazy,Ae.good_match=Uc[Ae.level].good_length,Ae.nice_match=Uc[Ae.level].nice_length,Ae.max_chain_length=Uc[Ae.level].max_chain,Ae.strstart=0,Ae.block_start=0,Ae.lookahead=0,Ae.insert=0,Ae.match_length=Ae.prev_length=wc-1,Ae.match_available=0,Ae.ins_h=0}(Ae.state),Se}function Fo(Ae,Se){let Ke,qe,Fe,$e;if(!Ae||!Ae.state||Se>Ja||Se<0)return Ae?Ao(Ae,oo):oo;if(qe=Ae.state,!Ae.output||!Ae.input&&0!==Ae.avail_in||qe.status===Bc&&Se!==Xa)return Ao(Ae,0===Ae.avail_out?uo:oo);if(qe.strm=Ae,Ke=qe.last_flush,qe.last_flush=Se,qe.status===Sc)if(2===qe.wrap)Ae.adler=0,Mo(qe,31),Mo(qe,139),Mo(qe,8),qe.gzhead?(Mo(qe,(qe.gzhead.text?1:0)+(qe.gzhead.hcrc?2:0)+(qe.gzhead.extra?4:0)+(qe.gzhead.name?8:0)+(qe.gzhead.comment?16:0)),Mo(qe,255&qe.gzhead.time),Mo(qe,qe.gzhead.time>>8&255),Mo(qe,qe.gzhead.time>>16&255),Mo(qe,qe.gzhead.time>>24&255),Mo(qe,9===qe.level?2:qe.strategy>=lo||qe.level<2?4:0),Mo(qe,255&qe.gzhead.os),qe.gzhead.extra&&qe.gzhead.extra.length&&(Mo(qe,255&qe.gzhead.extra.length),Mo(qe,qe.gzhead.extra.length>>8&255)),qe.gzhead.hcrc&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending,0)),qe.gzindex=0,qe.status=Ec):(Mo(qe,0),Mo(qe,0),Mo(qe,0),Mo(qe,0),Mo(qe,0),Mo(qe,9===qe.level?2:qe.strategy>=lo||qe.level<2?4:0),Mo(qe,Ic),qe.status=Cc);else{let Se=vo+(qe.w_bits-8<<4)<<8,Ke=-1;Ke=qe.strategy>=lo||qe.level<2?0:qe.level<6?1:6===qe.level?2:3,Se|=Ke<<6,0!==qe.strstart&&(Se|=Ac),Se+=31-Se%31,qe.status=Cc,Co(qe,Se),0!==qe.strstart&&(Co(qe,Ae.adler>>>16),Co(qe,65535&Ae.adler)),Ae.adler=1}if(qe.status===Ec)if(qe.gzhead.extra){for(Fe=qe.pending;qe.gzindex<(65535&qe.gzhead.extra.length)&&(qe.pending!==qe.pending_buf_size||(qe.gzhead.hcrc&&qe.pending>Fe&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending-Fe,Fe)),Po(Ae),Fe=qe.pending,qe.pending!==qe.pending_buf_size));)Mo(qe,255&qe.gzhead.extra[qe.gzindex]),qe.gzindex++;qe.gzhead.hcrc&&qe.pending>Fe&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending-Fe,Fe)),qe.gzindex===qe.gzhead.extra.length&&(qe.gzindex=0,qe.status=Mc)}else qe.status=Mc;if(qe.status===Mc)if(qe.gzhead.name){Fe=qe.pending;do{if(qe.pending===qe.pending_buf_size&&(qe.gzhead.hcrc&&qe.pending>Fe&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending-Fe,Fe)),Po(Ae),Fe=qe.pending,qe.pending===qe.pending_buf_size)){$e=1;break}$e=qe.gzindex<qe.gzhead.name.length?255&qe.gzhead.name.charCodeAt(qe.gzindex++):0,Mo(qe,$e)}while(0!==$e);qe.gzhead.hcrc&&qe.pending>Fe&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending-Fe,Fe)),0===$e&&(qe.gzindex=0,qe.status=Pc)}else qe.status=Pc;if(qe.status===Pc)if(qe.gzhead.comment){Fe=qe.pending;do{if(qe.pending===qe.pending_buf_size&&(qe.gzhead.hcrc&&qe.pending>Fe&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending-Fe,Fe)),Po(Ae),Fe=qe.pending,qe.pending===qe.pending_buf_size)){$e=1;break}$e=qe.gzindex<qe.gzhead.comment.length?255&qe.gzhead.comment.charCodeAt(qe.gzindex++):0,Mo(qe,$e)}while(0!==$e);qe.gzhead.hcrc&&qe.pending>Fe&&(Ae.adler=io(Ae.adler,qe.pending_buf,qe.pending-Fe,Fe)),0===$e&&(qe.status=xc)}else qe.status=xc;if(qe.status===xc&&(qe.gzhead.hcrc?(qe.pending+2>qe.pending_buf_size&&Po(Ae),qe.pending+2<=qe.pending_buf_size&&(Mo(qe,255&Ae.adler),Mo(qe,Ae.adler>>8&255),Ae.adler=0,qe.status=Cc)):qe.status=Cc),0!==qe.pending){if(Po(Ae),0===Ae.avail_out)return qe.last_flush=-1,no}else if(0===Ae.avail_in&&So(Se)<=So(Ke)&&Se!==Xa)return Ao(Ae,uo);if(qe.status===Bc&&0!==Ae.avail_in)return Ao(Ae,uo);if(0!==Ae.avail_in||0!==qe.lookahead||Se!==Ya&&qe.status!==Bc){var rt=qe.strategy===lo?function(Ae,Se){let Ke;for(;;){if(0===Ae.lookahead&&(Ro(Ae),0===Ae.lookahead)){if(Se===Ya)return Rc;break}if(Ae.match_length=0,Ke=eo(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++,Ke&&(xo(Ae,!1),0===Ae.strm.avail_out))return Rc}return Ae.insert=0,Se===Xa?(xo(Ae,!0),0===Ae.strm.avail_out?Tc:Kc):Ae.last_lit&&(xo(Ae,!1),0===Ae.strm.avail_out)?Rc:Dc}(qe,Se):qe.strategy===po?function(Ae,Se){let Ke,qe,Fe,$e;const rt=Ae.window;for(;;){if(Ae.lookahead<=_c){if(Ro(Ae),Ae.lookahead<=_c&&Se===Ya)return Rc;if(0===Ae.lookahead)break}if(Ae.match_length=0,Ae.lookahead>=wc&&Ae.strstart>0&&(Fe=Ae.strstart-1,qe=rt[Fe],qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe])){$e=Ae.strstart+_c;do{}while(qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe]&&qe===rt[++Fe]&&Fe<$e);Ae.match_length=_c-($e-Fe),Ae.match_length>Ae.lookahead&&(Ae.match_length=Ae.lookahead)}if(Ae.match_length>=wc?(Ke=eo(Ae,1,Ae.match_length-wc),Ae.lookahead-=Ae.match_length,Ae.strstart+=Ae.match_length,Ae.match_length=0):(Ke=eo(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++),Ke&&(xo(Ae,!1),0===Ae.strm.avail_out))return Rc}return Ae.insert=0,Se===Xa?(xo(Ae,!0),0===Ae.strm.avail_out?Tc:Kc):Ae.last_lit&&(xo(Ae,!1),0===Ae.strm.avail_out)?Rc:Dc}(qe,Se):Uc[qe.level].func(qe,Se);if(rt!==Tc&&rt!==Kc||(qe.status=Bc),rt===Rc||rt===Tc)return 0===Ae.avail_out&&(qe.last_flush=-1),no;if(rt===Dc&&(Se===Va?Qs(qe):Se!==Ja&&(Xs(qe,0,0,!1),Se===Qa&&(Eo(qe.head),0===qe.lookahead&&(qe.strstart=0,qe.block_start=0,qe.insert=0))),Po(Ae),0===Ae.avail_out))return qe.last_flush=-1,no}return Se!==Xa?no:qe.wrap<=0?so:(2===qe.wrap?(Mo(qe,255&Ae.adler),Mo(qe,Ae.adler>>8&255),Mo(qe,Ae.adler>>16&255),Mo(qe,Ae.adler>>24&255),Mo(qe,255&Ae.total_in),Mo(qe,Ae.total_in>>8&255),Mo(qe,Ae.total_in>>16&255),Mo(qe,Ae.total_in>>24&255)):(Co(qe,Ae.adler>>>16),Co(qe,65535&Ae.adler)),Po(Ae),qe.wrap>0&&(qe.wrap=-qe.wrap),0!==qe.pending?no:so)}try{String.fromCharCode.call(null,0)}catch(qe){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(qe){}const qc=new La(256);for(let Ae=0;Ae<256;Ae++)qc[Ae]=Ae>=252?6:Ae>=248?5:Ae>=240?4:Ae>=224?3:Ae>=192?2:1;function No(Ae){let Se,Ke,qe,Fe,$e=0;const rt=Ae.length;for(qe=0;qe<rt;qe++)Se=Ae.charCodeAt(qe),55296==(64512&Se)&&qe+1<rt&&(Ke=Ae.charCodeAt(qe+1),56320==(64512&Ke)&&(Se=65536+(Se-55296<<10)+(Ke-56320),qe++)),$e+=Se<128?1:Se<2048?2:Se<65536?3:4;const it=new La($e);for(Fe=0,qe=0;Fe<$e;qe++)Se=Ae.charCodeAt(qe),55296==(64512&Se)&&qe+1<rt&&(Ke=Ae.charCodeAt(qe+1),56320==(64512&Ke)&&(Se=65536+(Se-55296<<10)+(Ke-56320),qe++)),Se<128?it[Fe++]=Se:Se<2048?(it[Fe++]=192|Se>>>6,it[Fe++]=128|63&Se):Se<65536?(it[Fe++]=224|Se>>>12,it[Fe++]=128|Se>>>6&63,it[Fe++]=128|63&Se):(it[Fe++]=240|Se>>>18,it[Fe++]=128|Se>>>12&63,it[Fe++]=128|Se>>>6&63,it[Fe++]=128|63&Se);return it}qc[254]=qc[254]=1;class jo{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}class Lo{constructor(Ae){this.options={level:ho,method:vo,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...Ae||{}};const Se=this.options;Se.raw&&Se.windowBits>0?Se.windowBits=-Se.windowBits:Se.gzip&&Se.windowBits>0&&Se.windowBits<16&&(Se.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new jo,this.strm.avail_out=0;var Ke,qe,Fe=function(Ae,Se,Ke,qe,Fe,$e){if(!Ae)return oo;let rt=1;if(Se===ho&&(Se=6),qe<0?(rt=0,qe=-qe):qe>15&&(rt=2,qe-=16),Fe<1||Fe>vc||Ke!==vo||qe<8||qe>15||Se<0||Se>9||$e<0||$e>yo)return Ao(Ae,oo);8===qe&&(qe=9);const it=new zo;return Ae.state=it,it.strm=Ae,it.wrap=rt,it.gzhead=null,it.w_bits=qe,it.w_size=1<<it.w_bits,it.w_mask=it.w_size-1,it.hash_bits=Fe+7,it.hash_size=1<<it.hash_bits,it.hash_mask=it.hash_size-1,it.hash_shift=~~((it.hash_bits+wc-1)/wc),it.window=new La(2*it.w_size),it.head=new Ha(it.hash_size),it.prev=new Ha(it.w_size),it.lit_bufsize=1<<Fe+6,it.pending_buf_size=4*it.lit_bufsize,it.pending_buf=new La(it.pending_buf_size),it.d_buf=1*it.lit_bufsize,it.l_buf=3*it.lit_bufsize,it.level=Se,it.strategy=$e,it.method=Ke,qo(Ae)}(this.strm,Se.level,Se.method,Se.windowBits,Se.memLevel,Se.strategy);if(Fe!==no)throw Error(bc[Fe]);if(Se.header&&(Ke=this.strm,qe=Se.header,Ke&&Ke.state&&(2!==Ke.state.wrap||(Ke.state.gzhead=qe))),Se.dictionary){let Ae;if(Ae="string"==typeof Se.dictionary?No(Se.dictionary):Se.dictionary instanceof ArrayBuffer?new Uint8Array(Se.dictionary):Se.dictionary,Fe=function(Ae,Se){let Ke,qe,Fe,$e,rt,it,nt,st,ut=Se.length;if(!Ae||!Ae.state)return oo;if(Ke=Ae.state,$e=Ke.wrap,2===$e||1===$e&&Ke.status!==Sc||Ke.lookahead)return oo;for(1===$e&&(Ae.adler=to(Ae.adler,Se,ut,0)),Ke.wrap=0,ut>=Ke.w_size&&(0===$e&&(Eo(Ke.head),Ke.strstart=0,Ke.block_start=0,Ke.insert=0),st=new La(Ke.w_size),$a(st,Se,ut-Ke.w_size,Ke.w_size,0),Se=st,ut=Ke.w_size),rt=Ae.avail_in,it=Ae.next_in,nt=Ae.input,Ae.avail_in=ut,Ae.next_in=0,Ae.input=Se,Ro(Ke);Ke.lookahead>=wc;){qe=Ke.strstart,Fe=Ke.lookahead-(wc-1);do{Ke.ins_h=(Ke.ins_h<<Ke.hash_shift^Ke.window[qe+wc-1])&Ke.hash_mask,Ke.prev[qe&Ke.w_mask]=Ke.head[Ke.ins_h],Ke.head[Ke.ins_h]=qe,qe++}while(--Fe);Ke.strstart=qe,Ke.lookahead=wc-1,Ro(Ke)}return Ke.strstart+=Ke.lookahead,Ke.block_start=Ke.strstart,Ke.insert=Ke.lookahead,Ke.lookahead=0,Ke.match_length=Ke.prev_length=wc-1,Ke.match_available=0,Ae.next_in=it,Ae.input=nt,Ae.avail_in=rt,Ke.wrap=$e,no}(this.strm,Ae),Fe!==no)throw Error(bc[Fe]);this._dict_set=!0}}push(Ae,Se){const{strm:Ke,options:{chunkSize:qe}}=this;var Fe,$e;if(this.ended)return!1;$e=Se===~~Se?Se:!0===Se?Xa:Ya,"string"==typeof Ae?Ke.input=No(Ae):Ae instanceof ArrayBuffer?Ke.input=new Uint8Array(Ae):Ke.input=Ae,Ke.next_in=0,Ke.avail_in=Ke.input.length;do{if(0===Ke.avail_out&&(Ke.output=new La(qe),Ke.next_out=0,Ke.avail_out=qe),(Fe=Fo(Ke,$e))!==so&&Fe!==no)return this.onEnd(Fe),this.ended=!0,!1;0!==Ke.avail_out&&(0!==Ke.avail_in||$e!==Xa&&$e!==Za)||this.onData(xa(Ke.output,Ke.next_out))}while((Ke.avail_in>0||0===Ke.avail_out)&&Fe!==so);return $e===Xa?(Fe=function(Ae){let Se;return Ae&&Ae.state?(Se=Ae.state.status,Se!==Sc&&Se!==Ec&&Se!==Mc&&Se!==Pc&&Se!==xc&&Se!==Cc&&Se!==Bc?Ao(Ae,oo):(Ae.state=null,Se===Cc?Ao(Ae,co):no)):oo}(this.strm),this.onEnd(Fe),this.ended=!0,Fe===no):$e!==Za||(this.onEnd(no),Ke.avail_out=0,!0)}onData(Ae){this.chunks.push(Ae)}onEnd(Ae){Ae===no&&(this.result=Ga(this.chunks)),this.chunks=[],this.err=Ae,this.msg=this.strm.msg}}const zc=30,Lc=12;function Go(Ae,Se){let Ke,qe,Fe,$e,rt,it,nt,st,ut,ht;const ft=Ae.state;Ke=Ae.next_in;const yt=Ae.input,mt=Ke+(Ae.avail_in-5);qe=Ae.next_out;const vt=Ae.output,_t=qe-(Se-Ae.avail_out),Rt=qe+(Ae.avail_out-257),Kt=ft.dmax,It=ft.wsize,Ut=ft.whave,Ot=ft.wnext,Nt=ft.window;Fe=ft.hold,$e=ft.bits;const jt=ft.lencode,Ft=ft.distcode,Lt=(1<<ft.lenbits)-1,Ht=(1<<ft.distbits)-1;e:do{$e<15&&(Fe+=yt[Ke++]<<$e,$e+=8,Fe+=yt[Ke++]<<$e,$e+=8),rt=jt[Fe&Lt];t:for(;;){if(it=rt>>>24,Fe>>>=it,$e-=it,it=rt>>>16&255,0===it)vt[qe++]=65535&rt;else{if(!(16&it)){if(0==(64&it)){rt=jt[(65535&rt)+(Fe&(1<<it)-1)];continue t}if(32&it){ft.mode=Lc;break e}Ae.msg="invalid literal/length code",ft.mode=zc;break e}nt=65535&rt,it&=15,it&&($e<it&&(Fe+=yt[Ke++]<<$e,$e+=8),nt+=Fe&(1<<it)-1,Fe>>>=it,$e-=it),$e<15&&(Fe+=yt[Ke++]<<$e,$e+=8,Fe+=yt[Ke++]<<$e,$e+=8),rt=Ft[Fe&Ht];r:for(;;){if(it=rt>>>24,Fe>>>=it,$e-=it,it=rt>>>16&255,!(16&it)){if(0==(64&it)){rt=Ft[(65535&rt)+(Fe&(1<<it)-1)];continue r}Ae.msg="invalid distance code",ft.mode=zc;break e}if(st=65535&rt,it&=15,$e<it&&(Fe+=yt[Ke++]<<$e,$e+=8,$e<it&&(Fe+=yt[Ke++]<<$e,$e+=8)),st+=Fe&(1<<it)-1,st>Kt){Ae.msg="invalid distance too far back",ft.mode=zc;break e}if(Fe>>>=it,$e-=it,it=qe-_t,st>it){if(it=st-it,it>Ut&&ft.sane){Ae.msg="invalid distance too far back",ft.mode=zc;break e}if(ut=0,ht=Nt,0===Ot){if(ut+=It-it,it<nt){nt-=it;do{vt[qe++]=Nt[ut++]}while(--it);ut=qe-st,ht=vt}}else if(Ot<it){if(ut+=It+Ot-it,it-=Ot,it<nt){nt-=it;do{vt[qe++]=Nt[ut++]}while(--it);if(ut=0,Ot<nt){it=Ot,nt-=it;do{vt[qe++]=Nt[ut++]}while(--it);ut=qe-st,ht=vt}}}else if(ut+=Ot-it,it<nt){nt-=it;do{vt[qe++]=Nt[ut++]}while(--it);ut=qe-st,ht=vt}for(;nt>2;)vt[qe++]=ht[ut++],vt[qe++]=ht[ut++],vt[qe++]=ht[ut++],nt-=3;nt&&(vt[qe++]=ht[ut++],nt>1&&(vt[qe++]=ht[ut++]))}else{ut=qe-st;do{vt[qe++]=vt[ut++],vt[qe++]=vt[ut++],vt[qe++]=vt[ut++],nt-=3}while(nt>2);nt&&(vt[qe++]=vt[ut++],nt>1&&(vt[qe++]=vt[ut++]))}break}}break}}while(Ke<mt&&qe<Rt);nt=$e>>3,Ke-=nt,$e-=nt<<3,Fe&=(1<<$e)-1,Ae.next_in=Ke,Ae.next_out=qe,Ae.avail_in=Ke<mt?mt-Ke+5:5-(Ke-mt),Ae.avail_out=qe<Rt?Rt-qe+257:257-(qe-Rt),ft.hold=Fe,ft.bits=$e}const Hc=15,Wc=852,Qc=592,eu=0,ru=1,iu=2,nu=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],su=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ou=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],pu=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function ic(Ae,Se,Ke,qe,Fe,$e,rt,it){const nt=it.bits;let st,ut,ht,ft,yt,mt=0,vt=0,_t=0,Rt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,jt=0,Ft=null,Lt=0;const Ht=new Ha(Hc+1),Wt=new Ha(Hc+1);let Gt,$t,Yt,Vt=null,Zt=0;for(mt=0;mt<=Hc;mt++)Ht[mt]=0;for(vt=0;vt<qe;vt++)Ht[Se[Ke+vt]]++;for(Kt=nt,Rt=Hc;Rt>=1&&0===Ht[Rt];Rt--);if(Kt>Rt&&(Kt=Rt),0===Rt)return Fe[$e++]=20971520,Fe[$e++]=20971520,it.bits=1,0;for(_t=1;_t<Rt&&0===Ht[_t];_t++);for(Kt<_t&&(Kt=_t),Ot=1,mt=1;mt<=Hc;mt++)if(Ot<<=1,Ot-=Ht[mt],Ot<0)return-1;if(Ot>0&&(Ae===eu||1!==Rt))return-1;for(Wt[1]=0,mt=1;mt<Hc;mt++)Wt[mt+1]=Wt[mt]+Ht[mt];for(vt=0;vt<qe;vt++)0!==Se[Ke+vt]&&(rt[Wt[Se[Ke+vt]]++]=vt);Ae===eu?(Ft=Vt=rt,yt=19):Ae===ru?(Ft=nu,Lt-=257,Vt=su,Zt-=257,yt=256):(Ft=ou,Vt=pu,yt=-1),jt=0,vt=0,mt=_t,ft=$e,It=Kt,Ut=0,ht=-1,Nt=1<<Kt;const Qt=Nt-1;if(Ae===ru&&Nt>Wc||Ae===iu&&Nt>Qc)return 1;for(;;){Gt=mt-Ut,rt[vt]<yt?($t=0,Yt=rt[vt]):rt[vt]>yt?($t=Vt[Zt+rt[vt]],Yt=Ft[Lt+rt[vt]]):($t=96,Yt=0),st=1<<mt-Ut,ut=1<<It,_t=ut;do{ut-=st,Fe[ft+(jt>>Ut)+ut]=Gt<<24|$t<<16|Yt|0}while(0!==ut);for(st=1<<mt-1;jt&st;)st>>=1;if(0!==st?(jt&=st-1,jt+=st):jt=0,vt++,0==--Ht[mt]){if(mt===Rt)break;mt=Se[Ke+rt[vt]]}if(mt>Kt&&(jt&Qt)!==ht){for(0===Ut&&(Ut=Kt),ft+=_t,It=mt-Ut,Ot=1<<It;It+Ut<Rt&&(Ot-=Ht[It+Ut],!(Ot<=0));)It++,Ot<<=1;if(Nt+=1<<It,Ae===ru&&Nt>Wc||Ae===iu&&Nt>Qc)return 1;ht=jt&Qt,Fe[ht]=Kt<<24|It<<16|ft-$e|0}}return 0!==jt&&(Fe[ft+jt]=mt-Ut<<24|64<<16|0),it.bits=Kt,0}const yu=0,_u=1,Au=2,Mu=1,Cu=2,Ru=3,Ku=4,qu=5,Wu=6,Vu=7,lh=8,ph=9,yh=10,wh=11,kh=12,Ah=13,Sh=14,Mh=15,Uh=16,Nh=17,Fh=18,Lh=19,Hh=20,Wh=21,Gh=22,Vh=23,Jf=24,vl=25,_l=26,id=27,yd=28,md=29,gd=30,bd=852,vd=592;function Fc(Ae){return(Ae>>>24&255)+(Ae>>>8&65280)+((65280&Ae)<<8)+((255&Ae)<<24)}class Oc{constructor(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ha(320),this.work=new Ha(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function Nc(Ae){let Se;return Ae&&Ae.state?(Se=Ae.state,Se.wsize=0,Se.whave=0,Se.wnext=0,function(Ae){let Se;return Ae&&Ae.state?(Se=Ae.state,Ae.total_in=Ae.total_out=Se.total=0,Ae.msg="",Se.wrap&&(Ae.adler=1&Se.wrap),Se.mode=Mu,Se.last=0,Se.havedict=0,Se.dmax=32768,Se.head=null,Se.hold=0,Se.bits=0,Se.lencode=Se.lendyn=new Wa(bd),Se.distcode=Se.distdyn=new Wa(vd),Se.sane=1,Se.back=-1,no):oo}(Ae)):oo}function jc(Ae,Se){let Ke,qe;return Ae?(qe=new Oc,Ae.state=qe,qe.window=null,Ke=function(Ae,Se){let Ke,qe;return Ae&&Ae.state?(qe=Ae.state,Se<0?(Ke=0,Se=-Se):(Ke=1+(Se>>4),Se<48&&(Se&=15)),Se&&(Se<8||Se>15)?oo:(null!==qe.window&&qe.wbits!==Se&&(qe.window=null),qe.wrap=Ke,qe.wbits=Se,Nc(Ae))):oo}(Ae,Se),Ke!==no&&(Ae.state=null),Ke):oo}let wd,Nd,Fd=!0;function Gc(Ae){if(Fd){let Se;for(wd=new Wa(512),Nd=new Wa(32),Se=0;Se<144;)Ae.lens[Se++]=8;for(;Se<256;)Ae.lens[Se++]=9;for(;Se<280;)Ae.lens[Se++]=7;for(;Se<288;)Ae.lens[Se++]=8;for(ic(_u,Ae.lens,0,288,wd,0,Ae.work,{bits:9}),Se=0;Se<32;)Ae.lens[Se++]=5;ic(Au,Ae.lens,0,32,Nd,0,Ae.work,{bits:5}),Fd=!1}Ae.lencode=wd,Ae.lenbits=9,Ae.distcode=Nd,Ae.distbits=5}function Vc(Ae,Se,Ke,qe){let Fe;const $e=Ae.state;return null===$e.window&&($e.wsize=1<<$e.wbits,$e.wnext=0,$e.whave=0,$e.window=new La($e.wsize)),qe>=$e.wsize?($a($e.window,Se,Ke-$e.wsize,$e.wsize,0),$e.wnext=0,$e.whave=$e.wsize):(Fe=$e.wsize-$e.wnext,Fe>qe&&(Fe=qe),$a($e.window,Se,Ke-qe,Fe,$e.wnext),(qe-=Fe)?($a($e.window,Se,Ke-qe,qe,0),$e.wnext=qe,$e.whave=$e.wsize):($e.wnext+=Fe,$e.wnext===$e.wsize&&($e.wnext=0),$e.whave<$e.wsize&&($e.whave+=Fe))),0}function $c(Ae,Se){let Ke,qe,Fe,$e,rt,it,nt,st,ut,ht,ft,yt,mt,vt,_t,Rt,Kt,It,Ut,Ot,Nt,jt,Ft,Lt,Ht=0,Wt=new La(4);const Gt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Ae||!Ae.state||!Ae.output||!Ae.input&&0!==Ae.avail_in)return oo;Ke=Ae.state,Ke.mode===kh&&(Ke.mode=Ah),rt=Ae.next_out,Fe=Ae.output,nt=Ae.avail_out,$e=Ae.next_in,qe=Ae.input,it=Ae.avail_in,st=Ke.hold,ut=Ke.bits,ht=it,ft=nt,jt=no;e:for(;;)switch(Ke.mode){case Mu:if(0===Ke.wrap){Ke.mode=Ah;break}for(;ut<16;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(2&Ke.wrap&&35615===st){Ke.check=0,Wt[0]=255&st,Wt[1]=st>>>8&255,Ke.check=io(Ke.check,Wt,2,0),st=0,ut=0,Ke.mode=Cu;break}if(Ke.flags=0,Ke.head&&(Ke.head.done=!1),!(1&Ke.wrap)||(((255&st)<<8)+(st>>8))%31){Ae.msg="incorrect header check",Ke.mode=gd;break}if((15&st)!==vo){Ae.msg="unknown compression method",Ke.mode=gd;break}if(st>>>=4,ut-=4,Nt=8+(15&st),0===Ke.wbits)Ke.wbits=Nt;else if(Nt>Ke.wbits){Ae.msg="invalid window size",Ke.mode=gd;break}Ke.dmax=1<<Nt,Ae.adler=Ke.check=1,Ke.mode=512&st?yh:kh,st=0,ut=0;break;case Cu:for(;ut<16;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(Ke.flags=st,(255&Ke.flags)!==vo){Ae.msg="unknown compression method",Ke.mode=gd;break}if(57344&Ke.flags){Ae.msg="unknown header flags set",Ke.mode=gd;break}Ke.head&&(Ke.head.text=st>>8&1),512&Ke.flags&&(Wt[0]=255&st,Wt[1]=st>>>8&255,Ke.check=io(Ke.check,Wt,2,0)),st=0,ut=0,Ke.mode=Ru;case Ru:for(;ut<32;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ke.head&&(Ke.head.time=st),512&Ke.flags&&(Wt[0]=255&st,Wt[1]=st>>>8&255,Wt[2]=st>>>16&255,Wt[3]=st>>>24&255,Ke.check=io(Ke.check,Wt,4,0)),st=0,ut=0,Ke.mode=Ku;case Ku:for(;ut<16;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ke.head&&(Ke.head.xflags=255&st,Ke.head.os=st>>8),512&Ke.flags&&(Wt[0]=255&st,Wt[1]=st>>>8&255,Ke.check=io(Ke.check,Wt,2,0)),st=0,ut=0,Ke.mode=qu;case qu:if(1024&Ke.flags){for(;ut<16;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ke.length=st,Ke.head&&(Ke.head.extra_len=st),512&Ke.flags&&(Wt[0]=255&st,Wt[1]=st>>>8&255,Ke.check=io(Ke.check,Wt,2,0)),st=0,ut=0}else Ke.head&&(Ke.head.extra=null);Ke.mode=Wu;case Wu:if(1024&Ke.flags&&(yt=Ke.length,yt>it&&(yt=it),yt&&(Ke.head&&(Nt=Ke.head.extra_len-Ke.length,Ke.head.extra||(Ke.head.extra=Array(Ke.head.extra_len)),$a(Ke.head.extra,qe,$e,yt,Nt)),512&Ke.flags&&(Ke.check=io(Ke.check,qe,yt,$e)),it-=yt,$e+=yt,Ke.length-=yt),Ke.length))break e;Ke.length=0,Ke.mode=Vu;case Vu:if(2048&Ke.flags){if(0===it)break e;yt=0;do{Nt=qe[$e+yt++],Ke.head&&Nt&&Ke.length<65536&&(Ke.head.name+=String.fromCharCode(Nt))}while(Nt&&yt<it);if(512&Ke.flags&&(Ke.check=io(Ke.check,qe,yt,$e)),it-=yt,$e+=yt,Nt)break e}else Ke.head&&(Ke.head.name=null);Ke.length=0,Ke.mode=lh;case lh:if(4096&Ke.flags){if(0===it)break e;yt=0;do{Nt=qe[$e+yt++],Ke.head&&Nt&&Ke.length<65536&&(Ke.head.comment+=String.fromCharCode(Nt))}while(Nt&&yt<it);if(512&Ke.flags&&(Ke.check=io(Ke.check,qe,yt,$e)),it-=yt,$e+=yt,Nt)break e}else Ke.head&&(Ke.head.comment=null);Ke.mode=ph;case ph:if(512&Ke.flags){for(;ut<16;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(st!==(65535&Ke.check)){Ae.msg="header crc mismatch",Ke.mode=gd;break}st=0,ut=0}Ke.head&&(Ke.head.hcrc=Ke.flags>>9&1,Ke.head.done=!0),Ae.adler=Ke.check=0,Ke.mode=kh;break;case yh:for(;ut<32;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ae.adler=Ke.check=Fc(st),st=0,ut=0,Ke.mode=wh;case wh:if(0===Ke.havedict)return Ae.next_out=rt,Ae.avail_out=nt,Ae.next_in=$e,Ae.avail_in=it,Ke.hold=st,Ke.bits=ut,ao;Ae.adler=Ke.check=1,Ke.mode=kh;case kh:if(Se===Ja||Se===ro)break e;case Ah:if(Ke.last){st>>>=7&ut,ut-=7&ut,Ke.mode=id;break}for(;ut<3;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}switch(Ke.last=1&st,st>>>=1,ut-=1,3&st){case 0:Ke.mode=Sh;break;case 1:if(Gc(Ke),Ke.mode=Hh,Se===ro){st>>>=2,ut-=2;break e}break;case 2:Ke.mode=Nh;break;case 3:Ae.msg="invalid block type",Ke.mode=gd}st>>>=2,ut-=2;break;case Sh:for(st>>>=7&ut,ut-=7&ut;ut<32;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if((65535&st)!=(st>>>16^65535)){Ae.msg="invalid stored block lengths",Ke.mode=gd;break}if(Ke.length=65535&st,st=0,ut=0,Ke.mode=Mh,Se===ro)break e;case Mh:Ke.mode=Uh;case Uh:if(yt=Ke.length,yt){if(yt>it&&(yt=it),yt>nt&&(yt=nt),0===yt)break e;$a(Fe,qe,$e,yt,rt),it-=yt,$e+=yt,nt-=yt,rt+=yt,Ke.length-=yt;break}Ke.mode=kh;break;case Nh:for(;ut<14;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(Ke.nlen=257+(31&st),st>>>=5,ut-=5,Ke.ndist=1+(31&st),st>>>=5,ut-=5,Ke.ncode=4+(15&st),st>>>=4,ut-=4,Ke.nlen>286||Ke.ndist>30){Ae.msg="too many length or distance symbols",Ke.mode=gd;break}Ke.have=0,Ke.mode=Fh;case Fh:for(;Ke.have<Ke.ncode;){for(;ut<3;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ke.lens[Gt[Ke.have++]]=7&st,st>>>=3,ut-=3}for(;Ke.have<19;)Ke.lens[Gt[Ke.have++]]=0;if(Ke.lencode=Ke.lendyn,Ke.lenbits=7,Ft={bits:Ke.lenbits},jt=ic(yu,Ke.lens,0,19,Ke.lencode,0,Ke.work,Ft),Ke.lenbits=Ft.bits,jt){Ae.msg="invalid code lengths set",Ke.mode=gd;break}Ke.have=0,Ke.mode=Lh;case Lh:for(;Ke.have<Ke.nlen+Ke.ndist;){for(;Ht=Ke.lencode[st&(1<<Ke.lenbits)-1],_t=Ht>>>24,Rt=Ht>>>16&255,Kt=65535&Ht,!(_t<=ut);){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(Kt<16)st>>>=_t,ut-=_t,Ke.lens[Ke.have++]=Kt;else{if(16===Kt){for(Lt=_t+2;ut<Lt;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(st>>>=_t,ut-=_t,0===Ke.have){Ae.msg="invalid bit length repeat",Ke.mode=gd;break}Nt=Ke.lens[Ke.have-1],yt=3+(3&st),st>>>=2,ut-=2}else if(17===Kt){for(Lt=_t+3;ut<Lt;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}st>>>=_t,ut-=_t,Nt=0,yt=3+(7&st),st>>>=3,ut-=3}else{for(Lt=_t+7;ut<Lt;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}st>>>=_t,ut-=_t,Nt=0,yt=11+(127&st),st>>>=7,ut-=7}if(Ke.have+yt>Ke.nlen+Ke.ndist){Ae.msg="invalid bit length repeat",Ke.mode=gd;break}for(;yt--;)Ke.lens[Ke.have++]=Nt}}if(Ke.mode===gd)break;if(0===Ke.lens[256]){Ae.msg="invalid code -- missing end-of-block",Ke.mode=gd;break}if(Ke.lenbits=9,Ft={bits:Ke.lenbits},jt=ic(_u,Ke.lens,0,Ke.nlen,Ke.lencode,0,Ke.work,Ft),Ke.lenbits=Ft.bits,jt){Ae.msg="invalid literal/lengths set",Ke.mode=gd;break}if(Ke.distbits=6,Ke.distcode=Ke.distdyn,Ft={bits:Ke.distbits},jt=ic(Au,Ke.lens,Ke.nlen,Ke.ndist,Ke.distcode,0,Ke.work,Ft),Ke.distbits=Ft.bits,jt){Ae.msg="invalid distances set",Ke.mode=gd;break}if(Ke.mode=Hh,Se===ro)break e;case Hh:Ke.mode=Wh;case Wh:if(it>=6&&nt>=258){Ae.next_out=rt,Ae.avail_out=nt,Ae.next_in=$e,Ae.avail_in=it,Ke.hold=st,Ke.bits=ut,Go(Ae,ft),rt=Ae.next_out,Fe=Ae.output,nt=Ae.avail_out,$e=Ae.next_in,qe=Ae.input,it=Ae.avail_in,st=Ke.hold,ut=Ke.bits,Ke.mode===kh&&(Ke.back=-1);break}for(Ke.back=0;Ht=Ke.lencode[st&(1<<Ke.lenbits)-1],_t=Ht>>>24,Rt=Ht>>>16&255,Kt=65535&Ht,!(_t<=ut);){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(Rt&&0==(240&Rt)){for(It=_t,Ut=Rt,Ot=Kt;Ht=Ke.lencode[Ot+((st&(1<<It+Ut)-1)>>It)],_t=Ht>>>24,Rt=Ht>>>16&255,Kt=65535&Ht,!(It+_t<=ut);){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}st>>>=It,ut-=It,Ke.back+=It}if(st>>>=_t,ut-=_t,Ke.back+=_t,Ke.length=Kt,0===Rt){Ke.mode=_l;break}if(32&Rt){Ke.back=-1,Ke.mode=kh;break}if(64&Rt){Ae.msg="invalid literal/length code",Ke.mode=gd;break}Ke.extra=15&Rt,Ke.mode=Gh;case Gh:if(Ke.extra){for(Lt=Ke.extra;ut<Lt;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ke.length+=st&(1<<Ke.extra)-1,st>>>=Ke.extra,ut-=Ke.extra,Ke.back+=Ke.extra}Ke.was=Ke.length,Ke.mode=Vh;case Vh:for(;Ht=Ke.distcode[st&(1<<Ke.distbits)-1],_t=Ht>>>24,Rt=Ht>>>16&255,Kt=65535&Ht,!(_t<=ut);){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(0==(240&Rt)){for(It=_t,Ut=Rt,Ot=Kt;Ht=Ke.distcode[Ot+((st&(1<<It+Ut)-1)>>It)],_t=Ht>>>24,Rt=Ht>>>16&255,Kt=65535&Ht,!(It+_t<=ut);){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}st>>>=It,ut-=It,Ke.back+=It}if(st>>>=_t,ut-=_t,Ke.back+=_t,64&Rt){Ae.msg="invalid distance code",Ke.mode=gd;break}Ke.offset=Kt,Ke.extra=15&Rt,Ke.mode=Jf;case Jf:if(Ke.extra){for(Lt=Ke.extra;ut<Lt;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}Ke.offset+=st&(1<<Ke.extra)-1,st>>>=Ke.extra,ut-=Ke.extra,Ke.back+=Ke.extra}if(Ke.offset>Ke.dmax){Ae.msg="invalid distance too far back",Ke.mode=gd;break}Ke.mode=vl;case vl:if(0===nt)break e;if(yt=ft-nt,Ke.offset>yt){if(yt=Ke.offset-yt,yt>Ke.whave&&Ke.sane){Ae.msg="invalid distance too far back",Ke.mode=gd;break}yt>Ke.wnext?(yt-=Ke.wnext,mt=Ke.wsize-yt):mt=Ke.wnext-yt,yt>Ke.length&&(yt=Ke.length),vt=Ke.window}else vt=Fe,mt=rt-Ke.offset,yt=Ke.length;yt>nt&&(yt=nt),nt-=yt,Ke.length-=yt;do{Fe[rt++]=vt[mt++]}while(--yt);0===Ke.length&&(Ke.mode=Wh);break;case _l:if(0===nt)break e;Fe[rt++]=Ke.length,nt--,Ke.mode=Wh;break;case id:if(Ke.wrap){for(;ut<32;){if(0===it)break e;it--,st|=qe[$e++]<<ut,ut+=8}if(ft-=nt,Ae.total_out+=ft,Ke.total+=ft,ft&&(Ae.adler=Ke.check=Ke.flags?io(Ke.check,Fe,ft,rt-ft):to(Ke.check,Fe,ft,rt-ft)),ft=nt,(Ke.flags?st:Fc(st))!==Ke.check){Ae.msg="incorrect data check",Ke.mode=gd;break}st=0,ut=0}Ke.mode=yd;case yd:if(Ke.wrap&&Ke.flags){for(;ut<32;){if(0===it)break e;it--,st+=qe[$e++]<<ut,ut+=8}if(st!==(4294967295&Ke.total)){Ae.msg="incorrect length check",Ke.mode=gd;break}st=0,ut=0}Ke.mode=md;case md:jt=so;break e;case gd:jt=co;break e;default:return oo}return Ae.next_out=rt,Ae.avail_out=nt,Ae.next_in=$e,Ae.avail_in=it,Ke.hold=st,Ke.bits=ut,(Ke.wsize||ft!==Ae.avail_out&&Ke.mode<gd&&(Ke.mode<id||Se!==Xa))&&Vc(Ae,Ae.output,Ae.next_out,ft-Ae.avail_out),ht-=Ae.avail_in,ft-=Ae.avail_out,Ae.total_in+=ht,Ae.total_out+=ft,Ke.total+=ft,Ke.wrap&&ft&&(Ae.adler=Ke.check=Ke.flags?io(Ke.check,Fe,ft,Ae.next_out-ft):to(Ke.check,Fe,ft,Ae.next_out-ft)),Ae.data_type=Ke.bits+(Ke.last?64:0)+(Ke.mode===kh?128:0)+(Ke.mode===Hh||Ke.mode===Mh?256:0),(0===ht&&0===ft||Se===Xa)&&jt===no&&(jt=uo),jt}function Zc(Ae,Se){const Ke=Se.length;let qe,Fe;return Ae&&Ae.state?(qe=Ae.state,0!==qe.wrap&&qe.mode!==wh?oo:qe.mode===wh&&(Fe=1,Fe=to(Fe,Se,Ke,0),Fe!==qe.check)?co:(Vc(Ae,Se,Ke,Ke),qe.havedict=1,no)):oo}class Yc{constructor(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}}class Xc{constructor(Ae){this.options={chunkSize:16384,windowBits:0,...Ae||{}};const Se=this.options;Se.raw&&Se.windowBits>=0&&Se.windowBits<16&&(Se.windowBits=-Se.windowBits,0===Se.windowBits&&(Se.windowBits=-15)),!(Se.windowBits>=0&&Se.windowBits<16)||Ae&&Ae.windowBits||(Se.windowBits+=32),Se.windowBits>15&&Se.windowBits<48&&0==(15&Se.windowBits)&&(Se.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new jo,this.strm.avail_out=0;let Ke=jc(this.strm,Se.windowBits);if(Ke!==no)throw Error(bc[Ke]);if(this.header=new Yc,function(Ae,Se){let Ke;Ae&&Ae.state&&(Ke=Ae.state,0==(2&Ke.wrap)||(Ke.head=Se,Se.done=!1))}(this.strm,this.header),Se.dictionary&&("string"==typeof Se.dictionary?Se.dictionary=No(Se.dictionary):Se.dictionary instanceof ArrayBuffer&&(Se.dictionary=new Uint8Array(Se.dictionary)),Se.raw&&(Ke=Zc(this.strm,Se.dictionary),Ke!==no)))throw Error(bc[Ke])}push(Ae,Se){const{strm:Ke,options:{chunkSize:qe,dictionary:Fe}}=this;let $e,rt,it=!1;if(this.ended)return!1;rt=Se===~~Se?Se:!0===Se?Xa:Ya,"string"==typeof Ae?Ke.input=function(Ae){const Se=new La(Ae.length);for(let Ke=0,qe=Se.length;Ke<qe;Ke++)Se[Ke]=Ae.charCodeAt(Ke);return Se}(Ae):Ae instanceof ArrayBuffer?Ke.input=new Uint8Array(Ae):Ke.input=Ae,Ke.next_in=0,Ke.avail_in=Ke.input.length;do{if(0===Ke.avail_out&&(Ke.output=new La(qe),Ke.next_out=0,Ke.avail_out=qe),$e=$c(Ke,Ya),$e===ao&&Fe&&($e=Zc(this.strm,Fe)),$e===uo&&!0===it&&($e=no,it=!1),$e!==so&&$e!==no)return this.onEnd($e),this.ended=!0,!1;Ke.next_out&&(0!==Ke.avail_out&&$e!==so&&(0!==Ke.avail_in||rt!==Xa&&rt!==Za)||this.onData(xa(Ke.output,Ke.next_out))),0===Ke.avail_in&&0===Ke.avail_out&&(it=!0)}while((Ke.avail_in>0||0===Ke.avail_out)&&$e!==so);return $e===so&&(rt=Xa),rt===Xa?($e=function(Ae){if(!Ae||!Ae.state)return oo;const Se=Ae.state;return Se.window&&(Se.window=null),Ae.state=null,no}(this.strm),this.onEnd($e),this.ended=!0,$e===no):rt!==Za||(this.onEnd(no),Ke.avail_out=0,!0)}onData(Ae){this.chunks.push(Ae)}onEnd(Ae){Ae===no&&(this.result=Ga(this.chunks)),this.chunks=[],this.err=Ae,this.msg=this.strm.msg}}var Wd=[0,1,3,7,15,31,63,127,255],Jc=function(Ae){this.stream=Ae,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Jc.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Jc.prototype.read=function(Ae){for(var Se=0;Ae>0;){this._ensureByte();var Ke=8-this.bitOffset;if(Ae>=Ke)Se<<=Ke,Se|=Wd[Ke]&this.curByte,this.hasByte=!1,this.bitOffset=0,Ae-=Ke;else{Se<<=Ae;var qe=Ke-Ae;Se|=(this.curByte&Wd[Ae]<<qe)>>qe,this.bitOffset+=Ae,Ae=0}}return Se},Jc.prototype.seek=function(Ae){var Se=Ae%8,Ke=(Ae-Se)/8;this.bitOffset=Se,this.stream.seek(Ke),this.hasByte=!1},Jc.prototype.pi=function(){var Ae,Se=new Uint8Array(6);for(Ae=0;Ae<Se.length;Ae++)Se[Ae]=this.read(8);return function(Ae){return Array.prototype.map.call(Ae,(Ae=>("00"+Ae.toString(16)).slice(-2))).join("")}(Se)};var vp=Jc,tu=function(){};tu.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},tu.prototype.read=function(Ae,Se,Ke){for(var qe=0;qe<Ke;){var Fe=this.readByte();if(Fe<0)return 0===qe?-1:qe;Ae[Se++]=Fe,qe++}return qe},tu.prototype.seek=function(Ae){throw Error("abstract method seek() not implemented")},tu.prototype.writeByte=function(Ae){throw Error("abstract method readByte() not implemented")},tu.prototype.write=function(Ae,Se,Ke){var qe;for(qe=0;qe<Ke;qe++)this.writeByte(Ae[Se++]);return Ke},tu.prototype.flush=function(){};var Tp,Ip=tu,Up=(Tp=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),function(){var Ae=4294967295;this.getCRC=function(){return~Ae>>>0},this.updateCRC=function(Se){Ae=Ae<<8^Tp[255&(Ae>>>24^Se)]},this.updateCRCRun=function(Se,Ke){for(;Ke-- >0;)Ae=Ae<<8^Tp[255&(Ae>>>24^Se)]}}),au=function(Ae,Se){var Ke,qe=Ae[Se];for(Ke=Se;Ke>0;Ke--)Ae[Ke]=Ae[Ke-1];return Ae[0]=qe,qe},Op={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Np={};Np[Op.LAST_BLOCK]="Bad file checksum",Np[Op.NOT_BZIP_DATA]="Not bzip data",Np[Op.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Np[Op.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Np[Op.DATA_ERROR]="Data error",Np[Op.OUT_OF_MEMORY]="Out of memory",Np[Op.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var cu=function(Ae,Se){var Ke=Np[Ae]||"unknown error";Se&&(Ke+=": "+Se);var qe=new TypeError(Ke);throw qe.errorCode=Ae,qe},uu=function(Ae,Se){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(Ae,Se)};uu.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new Up,!0):(this.writeCount=-1,!1)},uu.prototype._start_bunzip=function(Ae,Se){var Ke=new Uint8Array(4);4===Ae.read(Ke,0,4)&&"BZh"===String.fromCharCode(Ke[0],Ke[1],Ke[2])||cu(Op.NOT_BZIP_DATA,"bad magic");var qe=Ke[3]-48;(qe<1||qe>9)&&cu(Op.NOT_BZIP_DATA,"level out of range"),this.reader=new vp(Ae),this.dbufSize=1e5*qe,this.nextoutput=0,this.outputStream=Se,this.streamCRC=0},uu.prototype._get_next_block=function(){var Ae,Se,Ke,qe=this.reader,Fe=qe.pi();if("177245385090"===Fe)return!1;"314159265359"!==Fe&&cu(Op.NOT_BZIP_DATA),this.targetBlockCRC=qe.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,qe.read(1)&&cu(Op.OBSOLETE_INPUT);var $e=qe.read(24);$e>this.dbufSize&&cu(Op.DATA_ERROR,"initial position out of bounds");var rt=qe.read(16),it=new Uint8Array(256),nt=0;for(Ae=0;Ae<16;Ae++)if(rt&1<<15-Ae){var st=16*Ae;for(Ke=qe.read(16),Se=0;Se<16;Se++)Ke&1<<15-Se&&(it[nt++]=st+Se)}var ut=qe.read(3);(ut<2||ut>6)&&cu(Op.DATA_ERROR);var ht=qe.read(15);0===ht&&cu(Op.DATA_ERROR);var ft=new Uint8Array(256);for(Ae=0;Ae<ut;Ae++)ft[Ae]=Ae;var yt=new Uint8Array(ht);for(Ae=0;Ae<ht;Ae++){for(Se=0;qe.read(1);Se++)Se>=ut&&cu(Op.DATA_ERROR);yt[Ae]=au(ft,Se)}var mt,vt=nt+2,_t=[];for(Se=0;Se<ut;Se++){var Rt,Kt,It=new Uint8Array(vt),Ut=new Uint16Array(21);for(rt=qe.read(5),Ae=0;Ae<vt;Ae++){for(;(rt<1||rt>20)&&cu(Op.DATA_ERROR),qe.read(1);)qe.read(1)?rt--:rt++;It[Ae]=rt}for(Rt=Kt=It[0],Ae=1;Ae<vt;Ae++)It[Ae]>Kt?Kt=It[Ae]:It[Ae]<Rt&&(Rt=It[Ae]);mt={},_t.push(mt),mt.permute=new Uint16Array(258),mt.limit=new Uint32Array(22),mt.base=new Uint32Array(21),mt.minLen=Rt,mt.maxLen=Kt;var Ot=0;for(Ae=Rt;Ae<=Kt;Ae++)for(Ut[Ae]=mt.limit[Ae]=0,rt=0;rt<vt;rt++)It[rt]===Ae&&(mt.permute[Ot++]=rt);for(Ae=0;Ae<vt;Ae++)Ut[It[Ae]]++;for(Ot=rt=0,Ae=Rt;Ae<Kt;Ae++)Ot+=Ut[Ae],mt.limit[Ae]=Ot-1,Ot<<=1,rt+=Ut[Ae],mt.base[Ae+1]=Ot-rt;mt.limit[Kt+1]=Number.MAX_VALUE,mt.limit[Kt]=Ot+Ut[Kt]-1,mt.base[Rt]=0}var Nt=new Uint32Array(256);for(Ae=0;Ae<256;Ae++)ft[Ae]=Ae;var jt,Ft=0,Lt=0,Ht=0,Wt=this.dbuf=new Uint32Array(this.dbufSize);for(vt=0;;){for(vt--||(vt=49,Ht>=ht&&cu(Op.DATA_ERROR),mt=_t[yt[Ht++]]),Ae=mt.minLen,Se=qe.read(Ae);Ae>mt.maxLen&&cu(Op.DATA_ERROR),!(Se<=mt.limit[Ae]);Ae++)Se=Se<<1|qe.read(1);((Se-=mt.base[Ae])<0||Se>=258)&&cu(Op.DATA_ERROR);var Gt=mt.permute[Se];if(0!==Gt&&1!==Gt){if(Ft)for(Ft=0,Lt+rt>this.dbufSize&&cu(Op.DATA_ERROR),Nt[jt=it[ft[0]]]+=rt;rt--;)Wt[Lt++]=jt;if(Gt>nt)break;Lt>=this.dbufSize&&cu(Op.DATA_ERROR),Nt[jt=it[jt=au(ft,Ae=Gt-1)]]++,Wt[Lt++]=jt}else Ft||(Ft=1,rt=0),rt+=0===Gt?Ft:2*Ft,Ft<<=1}for(($e<0||$e>=Lt)&&cu(Op.DATA_ERROR),Se=0,Ae=0;Ae<256;Ae++)Ke=Se+Nt[Ae],Nt[Ae]=Se,Se=Ke;for(Ae=0;Ae<Lt;Ae++)Wt[Nt[jt=255&Wt[Ae]]]|=Ae<<8,Nt[jt]++;var $t=0,Yt=0,Vt=0;return Lt&&(Yt=255&($t=Wt[$e]),$t>>=8,Vt=-1),this.writePos=$t,this.writeCurrent=Yt,this.writeCount=Lt,this.writeRun=Vt,!0},uu.prototype._read_bunzip=function(Ae,Se){var Ke,qe,Fe;if(this.writeCount<0)return 0;var $e=this.dbuf,rt=this.writePos,it=this.writeCurrent,nt=this.writeCount;this.outputsize;for(var st=this.writeRun;nt;){for(nt--,qe=it,it=255&(rt=$e[rt]),rt>>=8,3==st++?(Ke=it,Fe=qe,it=-1):(Ke=1,Fe=it),this.blockCRC.updateCRCRun(Fe,Ke);Ke--;)this.outputStream.writeByte(Fe),this.nextoutput++;it!=qe&&(st=0)}return this.writeCount=nt,this.blockCRC.getCRC()!==this.targetBlockCRC&&cu(Op.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var hu=function(Ae){if("readByte"in Ae)return Ae;var Se=new Ip;return Se.pos=0,Se.readByte=function(){return Ae[this.pos++]},Se.seek=function(Ae){this.pos=Ae},Se.eof=function(){return this.pos>=Ae.length},Se},du=function(Ae){var Se=new Ip,Ke=!0;if(Ae)if("number"==typeof Ae)Se.buffer=new Uint8Array(Ae),Ke=!1;else{if("writeByte"in Ae)return Ae;Se.buffer=Ae,Ke=!1}else Se.buffer=new Uint8Array(16384);return Se.pos=0,Se.writeByte=function(Ae){if(Ke&&this.pos>=this.buffer.length){var Se=new Uint8Array(2*this.buffer.length);Se.set(this.buffer),this.buffer=Se}this.buffer[this.pos++]=Ae},Se.getBuffer=function(){if(this.pos!==this.buffer.length){if(!Ke)throw new TypeError("outputsize does not match decoded input");var Ae=new Uint8Array(this.pos);Ae.set(this.buffer.subarray(0,this.pos)),this.buffer=Ae}return this.buffer},Se._coerced=!0,Se};var fu=function(Ae,Se,Ke){for(var qe=hu(Ae),Fe=du(Se),$e=new uu(qe,Fe);!("eof"in qe)||!qe.eof();)if($e._init_block())$e._read_bunzip();else{var rt=$e.reader.read(32)>>>0;if(rt!==$e.streamCRC&&cu(Op.DATA_ERROR,"Bad stream CRC (got "+$e.streamCRC.toString(16)+" expected "+rt.toString(16)+")"),!Ke||!("eof"in qe)||qe.eof())break;$e._start_bunzip(qe,Fe)}if("getBuffer"in Fe)return Fe.getBuffer()};class lu{static get tag(){return ur.packet.literalData}constructor(Ae=new Date){this.format=ur.literal.utf8,this.date=ir.normalizeDate(Ae),this.text=null,this.data=null,this.filename=""}setText(Ae,Se=ur.literal.utf8){this.format=Se,this.text=Ae,this.data=null}getText(Ae=!1){return(null===this.text||ir.isStream(this.text))&&(this.text=ir.decodeUTF8(ir.nativeEOL(this.getBytes(Ae)))),this.text}setBytes(Ae,Se){this.format=Se,this.data=Ae,this.text=null}getBytes(Ae=!1){return null===this.data&&(this.data=ir.canonicalizeEOL(ir.encodeUTF8(this.text))),Ae?ee(this.data):this.data}setFilename(Ae){this.filename=Ae}getFilename(){return this.filename}async read(Ae){await Q(Ae,(async Ae=>{const Se=await Ae.readByte(),Ke=await Ae.readByte();this.filename=ir.decodeUTF8(await Ae.readBytes(Ke)),this.date=ir.readDate(await Ae.readBytes(4));let qe=Ae.remainder();_(qe)&&(qe=await ie(qe)),this.setBytes(qe,Se)}))}writeHeader(){const Ae=ir.encodeUTF8(this.filename),Se=new Uint8Array([Ae.length]),Ke=new Uint8Array([this.format]),qe=ir.writeDate(this.date);return ir.concatUint8Array([Ke,Se,Ae,qe])}write(){const Ae=this.writeHeader(),Se=this.getBytes();return ir.concat([Ae,Se])}}const qp=Symbol("verified"),jp=new Set([ur.signatureSubpacket.issuer,ur.signatureSubpacket.issuerFingerprint,ur.signatureSubpacket.embeddedSignature]);class bu{static get tag(){return ur.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 Ce,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[qp]=null}read(Ae){let Se=0;if(this.version=Ae[Se++],4!==this.version&&5!==this.version)throw new Rn(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=Ae[Se++],this.publicKeyAlgorithm=Ae[Se++],this.hashAlgorithm=Ae[Se++],Se+=this.readSubPackets(Ae.subarray(Se,Ae.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=Ae.subarray(0,Se),Se+=this.readSubPackets(Ae.subarray(Se,Ae.length),!1),this.signedHashValue=Ae.subarray(Se,Se+2),Se+=2,this.params=qa.signature.parseSignatureParams(this.publicKeyAlgorithm,Ae.subarray(Se,Ae.length))}writeParams(){return this.params instanceof Promise?ae((async()=>qa.serializeParams(this.publicKeyAlgorithm,await this.params))):qa.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const Ae=[];return Ae.push(this.signatureData),Ae.push(this.writeUnhashedSubPackets()),Ae.push(this.signedHashValue),Ae.push(this.writeParams()),ir.concat(Ae)}async sign(Ae,Se,Ke=new Date,qe=!1){5===Ae.version?this.version=5:this.version=4;const Fe=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=ir.normalizeDate(Ke),this.issuerKeyVersion=Ae.version,this.issuerFingerprint=Ae.getFingerprintBytes(),this.issuerKeyID=Ae.getKeyID(),Fe.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=ir.concat(Fe);const $e=this.toHash(this.signatureType,Se,qe),rt=await this.hash(this.signatureType,Se,$e,qe);this.signedHashValue=re(J(rt),0,2);const o=async()=>qa.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,Ae.publicParams,Ae.privateParams,$e,await ie(rt));ir.isStream(rt)?this.params=o():(this.params=await o(),this[qp]=!0)}writeHashedSubPackets(){const Ae=ur.signatureSubpacket,Se=[];let Ke;if(null===this.created)throw Error("Missing signature creation time");Se.push(mu(Ae.signatureCreationTime,!0,ir.writeDate(this.created))),null!==this.signatureExpirationTime&&Se.push(mu(Ae.signatureExpirationTime,!0,ir.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&Se.push(mu(Ae.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(Ke=new Uint8Array([this.trustLevel,this.trustAmount]),Se.push(mu(Ae.trustSignature,!0,Ke))),null!==this.regularExpression&&Se.push(mu(Ae.regularExpression,!0,this.regularExpression)),null!==this.revocable&&Se.push(mu(Ae.revocable,!0,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&Se.push(mu(Ae.keyExpirationTime,!0,ir.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.preferredSymmetricAlgorithms)),Se.push(mu(Ae.preferredSymmetricAlgorithms,!1,Ke))),null!==this.revocationKeyClass&&(Ke=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),Ke=ir.concat([Ke,this.revocationKeyFingerprint]),Se.push(mu(Ae.revocationKey,!1,Ke))),this.issuerKeyID.isNull()||5===this.issuerKeyVersion||Se.push(mu(Ae.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach((({name:qe,value:Fe,humanReadable:$e,critical:rt})=>{Ke=[new Uint8Array([$e?128:0,0,0,0])];const it=ir.encodeUTF8(qe);Ke.push(ir.writeNumber(it.length,2)),Ke.push(ir.writeNumber(Fe.length,2)),Ke.push(it),Ke.push(Fe),Ke=ir.concat(Ke),Se.push(mu(Ae.notationData,rt,Ke))})),null!==this.preferredHashAlgorithms&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.preferredHashAlgorithms)),Se.push(mu(Ae.preferredHashAlgorithms,!1,Ke))),null!==this.preferredCompressionAlgorithms&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.preferredCompressionAlgorithms)),Se.push(mu(Ae.preferredCompressionAlgorithms,!1,Ke))),null!==this.keyServerPreferences&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.keyServerPreferences)),Se.push(mu(Ae.keyServerPreferences,!1,Ke))),null!==this.preferredKeyServer&&Se.push(mu(Ae.preferredKeyServer,!1,ir.encodeUTF8(this.preferredKeyServer))),null!==this.isPrimaryUserID&&Se.push(mu(Ae.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&Se.push(mu(Ae.policyURI,!1,ir.encodeUTF8(this.policyURI))),null!==this.keyFlags&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.keyFlags)),Se.push(mu(Ae.keyFlags,!0,Ke))),null!==this.signersUserID&&Se.push(mu(Ae.signersUserID,!1,ir.encodeUTF8(this.signersUserID))),null!==this.reasonForRevocationFlag&&(Ke=ir.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),Se.push(mu(Ae.reasonForRevocation,!0,Ke))),null!==this.features&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.features)),Se.push(mu(Ae.features,!1,Ke))),null!==this.signatureTargetPublicKeyAlgorithm&&(Ke=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],Ke.push(ir.stringToUint8Array(this.signatureTargetHash)),Ke=ir.concat(Ke),Se.push(mu(Ae.signatureTarget,!0,Ke))),null!==this.embeddedSignature&&Se.push(mu(Ae.embeddedSignature,!0,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(Ke=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],Ke=ir.concat(Ke),Se.push(mu(Ae.issuerFingerprint,5===this.version,Ke))),null!==this.preferredAEADAlgorithms&&(Ke=ir.stringToUint8Array(ir.uint8ArrayToString(this.preferredAEADAlgorithms)),Se.push(mu(Ae.preferredAEADAlgorithms,!1,Ke)));const qe=ir.concat(Se),Fe=ir.writeNumber(qe.length,2);return ir.concat([Fe,qe])}writeUnhashedSubPackets(){const Ae=[];this.unhashedSubpackets.forEach((Se=>{Ae.push(Pn(Se.length)),Ae.push(Se)}));const Se=ir.concat(Ae),Ke=ir.writeNumber(Se.length,2);return ir.concat([Ke,Se])}readSubPacket(Ae,Se=!0){let Ke=0;const qe=!!(128&Ae[Ke]),Fe=127&Ae[Ke];if(Se||(this.unhashedSubpackets.push(Ae.subarray(Ke,Ae.length)),jp.has(Fe)))switch(Ke++,Fe){case ur.signatureSubpacket.signatureCreationTime:this.created=ir.readDate(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.signatureExpirationTime:{const Se=ir.readNumber(Ae.subarray(Ke,Ae.length));this.signatureNeverExpires=0===Se,this.signatureExpirationTime=Se;break}case ur.signatureSubpacket.exportableCertification:this.exportable=1===Ae[Ke++];break;case ur.signatureSubpacket.trustSignature:this.trustLevel=Ae[Ke++],this.trustAmount=Ae[Ke++];break;case ur.signatureSubpacket.regularExpression:this.regularExpression=Ae[Ke];break;case ur.signatureSubpacket.revocable:this.revocable=1===Ae[Ke++];break;case ur.signatureSubpacket.keyExpirationTime:{const Se=ir.readNumber(Ae.subarray(Ke,Ae.length));this.keyExpirationTime=Se,this.keyNeverExpires=0===Se;break}case ur.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...Ae.subarray(Ke,Ae.length)];break;case ur.signatureSubpacket.revocationKey:this.revocationKeyClass=Ae[Ke++],this.revocationKeyAlgorithm=Ae[Ke++],this.revocationKeyFingerprint=Ae.subarray(Ke,Ke+20);break;case ur.signatureSubpacket.issuer:this.issuerKeyID.read(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.notationData:{const Se=!!(128&Ae[Ke]);Ke+=4;const Fe=ir.readNumber(Ae.subarray(Ke,Ke+2));Ke+=2;const $e=ir.readNumber(Ae.subarray(Ke,Ke+2));Ke+=2;const rt=ir.decodeUTF8(Ae.subarray(Ke,Ke+Fe)),it=Ae.subarray(Ke+Fe,Ke+Fe+$e);this.rawNotations.push({name:rt,humanReadable:Se,value:it,critical:qe}),Se&&(this.notations[rt]=ir.decodeUTF8(it));break}case ur.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...Ae.subarray(Ke,Ae.length)];break;case ur.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...Ae.subarray(Ke,Ae.length)];break;case ur.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...Ae.subarray(Ke,Ae.length)];break;case ur.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=ir.decodeUTF8(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==Ae[Ke++];break;case ur.signatureSubpacket.policyURI:this.policyURI=ir.decodeUTF8(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.keyFlags:this.keyFlags=[...Ae.subarray(Ke,Ae.length)];break;case ur.signatureSubpacket.signersUserID:this.signersUserID=ir.decodeUTF8(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=Ae[Ke++],this.reasonForRevocationString=ir.decodeUTF8(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.features:this.features=[...Ae.subarray(Ke,Ae.length)];break;case ur.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=Ae[Ke++],this.signatureTargetHashAlgorithm=Ae[Ke++];const Se=qa.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=ir.uint8ArrayToString(Ae.subarray(Ke,Ke+Se));break}case ur.signatureSubpacket.embeddedSignature:this.embeddedSignature=new bu,this.embeddedSignature.read(Ae.subarray(Ke,Ae.length));break;case ur.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=Ae[Ke++],this.issuerFingerprint=Ae.subarray(Ke,Ae.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case ur.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...Ae.subarray(Ke,Ae.length)];break;default:{const Ae=Error("Unknown signature subpacket type "+Fe);if(qe)throw Ae;ir.printDebug(Ae)}}}readSubPackets(Ae,Se=!0,Ke){const qe=ir.readNumber(Ae.subarray(0,2));let Fe=2;for(;Fe<2+qe;){const qe=En(Ae.subarray(Fe,Ae.length));Fe+=qe.offset,this.readSubPacket(Ae.subarray(Fe,Fe+qe.len),Se,Ke),Fe+=qe.len}return Fe}toSign(Ae,Se){const Ke=ur.signature;switch(Ae){case Ke.binary:return null!==Se.text?ir.encodeUTF8(Se.getText(!0)):Se.getBytes(!0);case Ke.text:{const Ae=Se.getBytes(!0);return ir.canonicalizeEOL(Ae)}case Ke.standalone:return new Uint8Array(0);case Ke.certGeneric:case Ke.certPersona:case Ke.certCasual:case Ke.certPositive:case Ke.certRevocation:{let Ae,qe;if(Se.userID)qe=180,Ae=Se.userID;else{if(!Se.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");qe=209,Ae=Se.userAttribute}const Fe=Ae.write();return ir.concat([this.toSign(Ke.key,Se),new Uint8Array([qe]),ir.writeNumber(Fe.length,4),Fe])}case Ke.subkeyBinding:case Ke.subkeyRevocation:case Ke.keyBinding:return ir.concat([this.toSign(Ke.key,Se),this.toSign(Ke.key,{key:Se.bind})]);case Ke.key:if(void 0===Se.key)throw Error("Key packet is required for this signature.");return Se.key.writeForHash(this.version);case Ke.keyRevocation:return this.toSign(Ke.key,Se);case Ke.timestamp:return new Uint8Array(0);case Ke.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(Ae,Se){let Ke=0;return Y(J(this.signatureData),(Ae=>{Ke+=Ae.length}),(()=>{const qe=[];return 5!==this.version||this.signatureType!==ur.signature.binary&&this.signatureType!==ur.signature.text||(Se?qe.push(new Uint8Array(6)):qe.push(Ae.writeHeader())),qe.push(new Uint8Array([this.version,255])),5===this.version&&qe.push(new Uint8Array(4)),qe.push(ir.writeNumber(Ke,4)),ir.concat(qe)}))}toHash(Ae,Se,Ke=!1){const qe=this.toSign(Ae,Se);return ir.concat([qe,this.signatureData,this.calculateTrailer(Se,Ke)])}async hash(Ae,Se,Ke,qe=!1){return Ke||(Ke=this.toHash(Ae,Se,qe)),qa.hash.digest(this.hashAlgorithm,Ke)}async verify(Ae,Se,Ke,qe=new Date,Fe=!1,$e=hr){if(!this.issuerKeyID.equals(Ae.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==Ae.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const rt=Se===ur.signature.binary||Se===ur.signature.text;if(!(this[qp]&&!rt)){let qe,$e;if(this.hashed?$e=await this.hashed:(qe=this.toHash(Se,Ke,Fe),$e=await this.hash(Se,Ke,qe)),$e=await ie($e),this.signedHashValue[0]!==$e[0]||this.signedHashValue[1]!==$e[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[qp]=await qa.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,Ae.publicParams,qe,$e),!this[qp])throw Error("Signature verification failed")}const it=ir.normalizeDate(qe);if(it&&this.created>it)throw Error("Signature creation time is in the future");if(it&&it>=this.getExpirationTime())throw Error("Signature is expired");if($e.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+ur.read(ur.hash,this.hashAlgorithm).toUpperCase());if($e.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[ur.signature.binary,ur.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+ur.read(ur.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:Ae,critical:Se})=>{if(Se&&$e.knownNotations.indexOf(Ae)<0)throw Error("Unknown critical notation: "+Ae)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(Ae=new Date){const Se=ir.normalizeDate(Ae);return null!==Se&&!(this.created<=Se&&Se<this.getExpirationTime())}getExpirationTime(){return this.signatureNeverExpires?1/0:new Date(this.created.getTime()+1e3*this.signatureExpirationTime)}}function mu(Ae,Se,Ke){const qe=[];return qe.push(Pn(Ke.length+1)),qe.push(new Uint8Array([(Se?128:0)|Ae])),qe.push(Ke),ir.concat(qe)}class gu{static get tag(){return ur.packet.onePassSignature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.issuerKeyID=null,this.flags=null}read(Ae){let Se=0;if(this.version=Ae[Se++],3!==this.version)throw new Rn(`Version ${this.version} of the one-pass signature packet is unsupported.`);return this.signatureType=Ae[Se++],this.hashAlgorithm=Ae[Se++],this.publicKeyAlgorithm=Ae[Se++],this.issuerKeyID=new Ce,this.issuerKeyID.read(Ae.subarray(Se,Se+8)),Se+=8,this.flags=Ae[Se++],this}write(){const Ae=new Uint8Array([3,this.signatureType,this.hashAlgorithm,this.publicKeyAlgorithm]),Se=new Uint8Array([this.flags]);return ir.concatUint8Array([Ae,this.issuerKeyID.write(),Se])}calculateTrailer(...Ae){return ae((async()=>bu.prototype.calculateTrailer.apply(await this.correspondingSig,Ae)))}async verify(){const Ae=await this.correspondingSig;if(!Ae||Ae.constructor.tag!==ur.packet.signature)throw Error("Corresponding signature packet missing");if(Ae.signatureType!==this.signatureType||Ae.hashAlgorithm!==this.hashAlgorithm||Ae.publicKeyAlgorithm!==this.publicKeyAlgorithm||!Ae.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return Ae.hashed=this.hashed,Ae.verify.apply(Ae,arguments)}}function wu(Ae,Se){if(!Se[Ae]){let Ke;try{Ke=ur.read(ur.packet,Ae)}catch(Se){throw new Rn("Unknown packet type with tag: "+Ae)}throw Error("Packet not allowed in this context: "+Ke)}return new Se[Ae]}gu.prototype.hash=bu.prototype.hash,gu.prototype.toHash=bu.prototype.toHash,gu.prototype.toSign=bu.prototype.toSign;class vu extends Array{static async fromBinary(Ae,Se,Ke=hr){const qe=new vu;return await qe.read(Ae,Se,Ke),qe}async read(Ae,Se,Ke=hr){Ke.additionalAllowedPackets.length&&(Se={...Se,...ir.constructAllowedPackets(Ke.additionalAllowedPackets)}),this.stream=X(Ae,(async(Ae,qe)=>{const Fe=G(qe);try{for(;;){await Fe.ready;if(await Dn(Ae,(async Ae=>{try{if(Ae.tag===ur.packet.marker||Ae.tag===ur.packet.trust)return;const qe=wu(Ae.tag,Se);qe.packets=new vu,qe.fromStream=ir.isStream(Ae.packet),await qe.read(Ae.packet,Ke),await Fe.write(qe)}catch(Se){const qe=!Ke.ignoreUnsupportedPackets&&Se instanceof Rn,$e=!(Ke.ignoreMalformedPackets||Se instanceof Rn);if(qe||$e||Kn(Ae.tag))await Fe.abort(Se);else{const Se=new Un(Ae.tag,Ae.packet);await Fe.write(Se)}ir.printDebugError(Se)}})))return await Fe.ready,void await Fe.close()}}catch(Ae){await Fe.abort(Ae)}}));const qe=H(this.stream);for(;;){const{done:Ae,value:Se}=await qe.read();if(Ae?this.stream=null:this.push(Se),Ae||Kn(Se.constructor.tag))break}qe.releaseLock()}write(){const Ae=[];for(let Se=0;Se<this.length;Se++){const Ke=this[Se]instanceof Un?this[Se].tag:this[Se].constructor.tag,qe=this[Se].write();if(ir.isStream(qe)&&Kn(this[Se].constructor.tag)){let Se=[],Fe=0;const $e=512;Ae.push(Mn(Ke)),Ae.push(Y(qe,(Ae=>{if(Se.push(Ae),Fe+=Ae.length,Fe>=$e){const Ae=Math.min(Math.log(Fe)/Math.LN2|0,30),Ke=2**Ae,qe=ir.concat([xn(Ae)].concat(Se));return Se=[qe.subarray(1+Ke)],Fe=Se[0].length,qe.subarray(0,1+Ke)}}),(()=>ir.concat([Pn(Fe)].concat(Se)))))}else{if(ir.isStream(qe)){let Se=0;Ae.push(Y(J(qe),(Ae=>{Se+=Ae.length}),(()=>Cn(Ke,Se))))}else Ae.push(Cn(Ke,qe.length));Ae.push(qe)}}return ir.concat(Ae)}filterByTag(...Ae){const Se=new vu,r=Ae=>Se=>Ae===Se;for(let Ke=0;Ke<this.length;Ke++)Ae.some(r(this[Ke].constructor.tag))&&Se.push(this[Ke]);return Se}findPacket(Ae){return this.find((Se=>Se.constructor.tag===Ae))}indexOfTag(...Ae){const Se=[],Ke=this,i=Ae=>Se=>Ae===Se;for(let qe=0;qe<this.length;qe++)Ae.some(i(Ke[qe].constructor.tag))&&Se.push(qe);return Se}}const Lp=ir.constructAllowedPackets([lu,gu,bu]);class ku{static get tag(){return ur.packet.compressedData}constructor(Ae=hr){this.packets=null,this.algorithm=Ae.preferredCompressionAlgorithm,this.compressed=null,this.deflateLevel=Ae.deflateLevel}async read(Ae,Se=hr){await Q(Ae,(async Ae=>{this.algorithm=await Ae.readByte(),this.compressed=Ae.remainder(),await this.decompress(Se)}))}write(){return null===this.compressed&&this.compress(),ir.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(Ae=hr){const Se=ur.read(ur.compression,this.algorithm),Ke=$p[Se];if(!Ke)throw Error(Se+" decompression not supported");this.packets=await vu.fromBinary(Ke(this.compressed),Lp,Ae)}compress(){const Ae=ur.read(ur.compression,this.algorithm),Se=Gp[Ae];if(!Se)throw Error(Ae+" compression not supported");this.compressed=Se(this.packets.write(),this.deflateLevel)}}const Hp=ir.getNodeZlib();function Su(Ae){return Ae}function Eu(Ae,Se,Ke={}){return function(qe){return!ir.isStream(qe)||_(qe)?ae((()=>ie(qe).then((Se=>new Promise(((qe,Fe)=>{Ae(Se,Ke,((Ae,Se)=>{if(Ae)return Fe(Ae);qe(Se)}))})))))):Ht(Wt(qe).pipe(Se(Ke)))}}function Pu(Ae,Se={}){return function(Ke){const qe=new Ae(Se);return Y(Ke,(Ae=>{if(Ae.length)return qe.push(Ae,Za),qe.result}),(()=>{if(Ae===Lo)return qe.push([],Xa),qe.result}))}}function xu(Ae){return function(Se){return ae((async()=>Ae(await ie(Se))))}}const Gp=Hp?{zip:(Ae,Se)=>Eu(Hp.deflateRaw,Hp.createDeflateRaw,{level:Se})(Ae),zlib:(Ae,Se)=>Eu(Hp.deflate,Hp.createDeflate,{level:Se})(Ae)}:{zip:(Ae,Se)=>Pu(Lo,{raw:!0,level:Se})(Ae),zlib:(Ae,Se)=>Pu(Lo,{level:Se})(Ae)},$p=Hp?{uncompressed:Su,zip:Eu(Hp.inflateRaw,Hp.createInflateRaw),zlib:Eu(Hp.inflate,Hp.createInflate),bzip2:xu(fu)}:{uncompressed:Su,zip:Pu(Xc,{raw:!0}),zlib:Pu(Xc),bzip2:xu(fu)},Vp=ir.constructAllowedPackets([lu,ku,gu,bu]);class Du{static get tag(){return ur.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(Ae){await Q(Ae,(async Ae=>{const Se=await Ae.readByte();if(1!==Se)throw new Rn(`Version ${Se} of the SEIP packet is unsupported.`);this.encrypted=Ae.remainder()}))}write(){return ir.concat([new Uint8Array([1]),this.encrypted])}async encrypt(Ae,Se,Ke=hr){const{blockSize:qe}=qa.getCipher(Ae);let Fe=this.packets.write();_(Fe)&&(Fe=await ie(Fe));const $e=await qa.getPrefixRandom(Ae),rt=new Uint8Array([211,20]),it=ir.concat([$e,Fe,rt]),nt=await qa.hash.sha1(ee(it)),st=ir.concat([it,nt]);return this.encrypted=await qa.mode.cfb.encrypt(Ae,Se,st,new Uint8Array(qe),Ke),!0}async decrypt(Ae,Se,Ke=hr){const{blockSize:qe}=qa.getCipher(Ae);let Fe=J(this.encrypted);_(Fe)&&(Fe=await ie(Fe));const $e=await qa.mode.cfb.decrypt(Ae,Se,Fe,new Uint8Array(qe)),rt=re(ee($e),-20),it=re($e,0,-20),nt=Promise.all([ie(await qa.hash.sha1(ee(it))),ie(rt)]).then((([Ae,Se])=>{if(!ir.equalsUint8Array(Ae,Se))throw Error("Modification detected.");return new Uint8Array})),st=re(it,qe+2);let ut=re(st,0,-2);return ut=W([ut,ae((()=>nt))]),ir.isStream(Fe)&&Ke.allowUnauthenticatedStream||(ut=await ie(ut)),this.packets=await vu.fromBinary(ut,Vp,Ke),!0}}const Qp=ir.constructAllowedPackets([lu,ku,gu,bu]);class Uu{static get tag(){return ur.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=ur.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(Ae){await Q(Ae,(async Ae=>{const Se=await Ae.readByte();if(1!==Se)throw new Rn(`Version ${Se} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await Ae.readByte(),this.aeadAlgorithm=await Ae.readByte(),this.chunkSizeByte=await Ae.readByte();const Ke=qa.getAEADMode(this.aeadAlgorithm);this.iv=await Ae.readBytes(Ke.ivLength),this.encrypted=Ae.remainder()}))}write(){return ir.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(Ae,Se,Ke=hr){this.packets=await vu.fromBinary(await this.crypt("decrypt",Se,J(this.encrypted)),Qp,Ke)}async encrypt(Ae,Se,Ke=hr){this.cipherAlgorithm=Ae;const{ivLength:qe}=qa.getAEADMode(this.aeadAlgorithm);this.iv=qa.random.getRandomBytes(qe),this.chunkSizeByte=Ke.aeadChunkSizeByte;const Fe=this.packets.write();this.encrypted=await this.crypt("encrypt",Se,Fe)}async crypt(Ae,Se,Ke){const qe=qa.getAEADMode(this.aeadAlgorithm),Fe=await qe(this.cipherAlgorithm,Se),$e="decrypt"===Ae?qe.tagLength:0,rt="encrypt"===Ae?qe.tagLength:0,it=2**(this.chunkSizeByte+6)+$e,nt=new ArrayBuffer(21),st=new Uint8Array(nt,0,13),ut=new Uint8Array(nt),ht=new DataView(nt),ft=new Uint8Array(nt,5,8);st.set([192|Uu.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let yt=0,mt=Promise.resolve(),vt=0,_t=0;const Rt=this.iv;return X(Ke,(async(Se,Ke)=>{if("array"!==ir.isStream(Se)){const Ae=new er({},{highWaterMark:ir.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:Ae=>Ae.length});V(Ae.readable,Ke),Ke=Ae.writable}const nt=H(Se),Kt=G(Ke);try{for(;;){let Se=await nt.readBytes(it+$e)||new Uint8Array;const Ke=Se.subarray(Se.length-$e);let It,Ut;if(Se=Se.subarray(0,Se.length-$e),!yt||Se.length?(nt.unshift(Ke),It=Fe[Ae](Se,qe.getNonce(Rt,ft),st),_t+=Se.length-$e+rt):(ht.setInt32(17,vt),It=Fe[Ae](Ke,qe.getNonce(Rt,ft),ut),_t+=rt,Ut=!0),vt+=Se.length-$e,mt=mt.then((()=>It)).then((async Ae=>{await Kt.ready,await Kt.write(Ae),_t-=Ae.length})).catch((Ae=>Kt.abort(Ae))),(Ut||_t>Kt.desiredSize)&&await mt,Ut){await Kt.close();break}ht.setInt32(9,++yt)}}catch(Ae){await Kt.abort(Ae)}}))}}class Iu{static get tag(){return ur.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new Ce,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(Ae){if(this.version=Ae[0],3!==this.version)throw new Rn(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(Ae.subarray(1,Ae.length)),this.publicKeyAlgorithm=Ae[9],this.encrypted=qa.parseEncSessionKeyParams(this.publicKeyAlgorithm,Ae.subarray(10))}write(){const Ae=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),qa.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return ir.concatUint8Array(Ae)}async encrypt(Ae){const Se=ir.concatUint8Array([new Uint8Array([ur.write(ur.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,ir.writeChecksum(this.sessionKey)]),Ke=ur.write(ur.publicKey,this.publicKeyAlgorithm);this.encrypted=await qa.publicKeyEncrypt(Ke,Ae.publicParams,Se,Ae.getFingerprintBytes())}async decrypt(Ae,Se){if(this.publicKeyAlgorithm!==Ae.algorithm)throw Error("Decryption error");const Ke=Se?ir.concatUint8Array([new Uint8Array([Se.sessionKeyAlgorithm]),Se.sessionKey,ir.writeChecksum(Se.sessionKey)]):null,qe=await qa.publicKeyDecrypt(this.publicKeyAlgorithm,Ae.publicParams,Ae.privateParams,this.encrypted,Ae.getFingerprintBytes(),Ke),Fe=qe[0],$e=qe.subarray(1,qe.length-2),rt=qe.subarray(qe.length-2),it=ir.writeChecksum($e),nt=it[0]===rt[0]&it[1]===rt[1];if(Se){const Ae=nt&Fe===Se.sessionKeyAlgorithm&$e.length===Se.sessionKey.length;this.sessionKeyAlgorithm=ir.selectUint8(Ae,Fe,Se.sessionKeyAlgorithm),this.sessionKey=ir.selectUint8Array(Ae,$e,Se.sessionKey)}else{if(!(nt&&ur.read(ur.symmetric,Fe)))throw Error("Decryption error");this.sessionKey=$e,this.sessionKeyAlgorithm=Fe}}}class Bu{constructor(Ae=hr){this.algorithm=ur.hash.sha256,this.type="iterated",this.c=Ae.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(Ae){let Se=0;switch(this.type=ur.read(ur.s2k,Ae[Se++]),this.algorithm=Ae[Se++],this.type){case"simple":break;case"salted":this.salt=Ae.subarray(Se,Se+8),Se+=8;break;case"iterated":this.salt=Ae.subarray(Se,Se+8),Se+=8,this.c=Ae[Se++];break;case"gnu":if("GNU"!==ir.uint8ArrayToString(Ae.subarray(Se,Se+3)))throw Error("Unknown s2k type.");Se+=3;if(1001!==1e3+Ae[Se++])throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return Se}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...ir.stringToUint8Array("GNU"),1]);const Ae=[new Uint8Array([ur.write(ur.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":Ae.push(this.salt);break;case"iterated":Ae.push(this.salt),Ae.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return ir.concatUint8Array(Ae)}async produceKey(Ae,Se){Ae=ir.encodeUTF8(Ae);const Ke=[];let qe=0,Fe=0;for(;qe<Se;){let Se;switch(this.type){case"simple":Se=ir.concatUint8Array([new Uint8Array(Fe),Ae]);break;case"salted":Se=ir.concatUint8Array([new Uint8Array(Fe),this.salt,Ae]);break;case"iterated":{const Ke=ir.concatUint8Array([this.salt,Ae]);let qe=Ke.length;const $e=Math.max(this.getCount(),qe);Se=new Uint8Array(Fe+$e),Se.set(Ke,Fe);for(let Ae=Fe+qe;Ae<$e;Ae+=qe,qe*=2)Se.copyWithin(Ae,Fe,Ae);break}case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}const $e=await qa.hash.digest(this.algorithm,Se);Ke.push($e),qe+=$e.length,Fe++}return ir.concatUint8Array(Ke).subarray(0,Se)}}class Tu{static get tag(){return ur.packet.symEncryptedSessionKey}constructor(Ae=hr){this.version=Ae.aeadProtect?5:4,this.sessionKey=null,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm=ur.symmetric.aes256,this.aeadAlgorithm=ur.write(ur.aead,Ae.preferredAEADAlgorithm),this.encrypted=null,this.s2k=null,this.iv=null}read(Ae){let Se=0;if(this.version=Ae[Se++],4!==this.version&&5!==this.version)throw new Rn(`Version ${this.version} of the SKESK packet is unsupported.`);const Ke=Ae[Se++];if(5===this.version&&(this.aeadAlgorithm=Ae[Se++]),this.s2k=new Bu,Se+=this.s2k.read(Ae.subarray(Se,Ae.length)),5===this.version){const Ke=qa.getAEADMode(this.aeadAlgorithm);this.iv=Ae.subarray(Se,Se+=Ke.ivLength)}5===this.version||Se<Ae.length?(this.encrypted=Ae.subarray(Se,Ae.length),this.sessionKeyEncryptionAlgorithm=Ke):this.sessionKeyAlgorithm=Ke}write(){const Ae=null===this.encrypted?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm;let Se;return 5===this.version?Se=ir.concatUint8Array([new Uint8Array([this.version,Ae,this.aeadAlgorithm]),this.s2k.write(),this.iv,this.encrypted]):(Se=ir.concatUint8Array([new Uint8Array([this.version,Ae]),this.s2k.write()]),null!==this.encrypted&&(Se=ir.concatUint8Array([Se,this.encrypted]))),Se}async decrypt(Ae){const Se=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,{blockSize:Ke,keySize:qe}=qa.getCipher(Se),Fe=await this.s2k.produceKey(Ae,qe);if(5===this.version){const Ae=qa.getAEADMode(this.aeadAlgorithm),Ke=new Uint8Array([192|Tu.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),qe=await Ae(Se,Fe);this.sessionKey=await qe.decrypt(this.encrypted,this.iv,Ke)}else if(null!==this.encrypted){const Ae=await qa.mode.cfb.decrypt(Se,Fe,this.encrypted,new Uint8Array(Ke));this.sessionKeyAlgorithm=ur.write(ur.symmetric,Ae[0]),this.sessionKey=Ae.subarray(1,Ae.length)}else this.sessionKey=Fe}async encrypt(Ae,Se=hr){const Ke=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=Ke,this.s2k=new Bu(Se),this.s2k.salt=qa.random.getRandomBytes(8);const{blockSize:qe,keySize:Fe}=qa.getCipher(Ke),$e=await this.s2k.produceKey(Ae,Fe);if(null===this.sessionKey&&(this.sessionKey=qa.generateSessionKey(this.sessionKeyAlgorithm)),5===this.version){const Ae=qa.getAEADMode(this.aeadAlgorithm);this.iv=qa.random.getRandomBytes(Ae.ivLength);const Se=new Uint8Array([192|Tu.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),qe=await Ae(Ke,$e);this.encrypted=await qe.encrypt(this.sessionKey,this.iv,Se)}else{const Ae=ir.concatUint8Array([new Uint8Array([this.sessionKeyAlgorithm]),this.sessionKey]);this.encrypted=await qa.mode.cfb.encrypt(Ke,$e,Ae,new Uint8Array(qe),Se)}}}class zu{static get tag(){return ur.packet.publicKey}constructor(Ae=new Date,Se=hr){this.version=Se.v5Keys?5:4,this.created=ir.normalizeDate(Ae),this.algorithm=null,this.publicParams=null,this.expirationTimeV3=0,this.fingerprint=null,this.keyID=null}static fromSecretKeyPacket(Ae){const Se=new zu,{version:Ke,created:qe,algorithm:Fe,publicParams:$e,keyID:rt,fingerprint:it}=Ae;return Se.version=Ke,Se.created=qe,Se.algorithm=Fe,Se.publicParams=$e,Se.keyID=rt,Se.fingerprint=it,Se}async read(Ae){let Se=0;if(this.version=Ae[Se++],4===this.version||5===this.version){this.created=ir.readDate(Ae.subarray(Se,Se+4)),Se+=4,this.algorithm=Ae[Se++],5===this.version&&(Se+=4);const{read:Ke,publicParams:qe}=qa.parsePublicKeyParams(this.algorithm,Ae.subarray(Se));return this.publicParams=qe,Se+=Ke,await this.computeFingerprintAndKeyID(),Se}throw new Rn(`Version ${this.version} of the key packet is unsupported.`)}write(){const Ae=[];Ae.push(new Uint8Array([this.version])),Ae.push(ir.writeDate(this.created)),Ae.push(new Uint8Array([this.algorithm]));const Se=qa.serializeParams(this.algorithm,this.publicParams);return 5===this.version&&Ae.push(ir.writeNumber(Se.length,4)),Ae.push(Se),ir.concatUint8Array(Ae)}writeForHash(Ae){const Se=this.writePublicKey();return 5===Ae?ir.concatUint8Array([new Uint8Array([154]),ir.writeNumber(Se.length,4),Se]):ir.concatUint8Array([new Uint8Array([153]),ir.writeNumber(Se.length,2),Se])}isDecrypted(){return null}getCreationTime(){return this.created}getKeyID(){return this.keyID}async computeFingerprintAndKeyID(){if(await this.computeFingerprint(),this.keyID=new Ce,5===this.version)this.keyID.read(this.fingerprint.subarray(0,8));else{if(4!==this.version)throw Error("Unsupported key version");this.keyID.read(this.fingerprint.subarray(12,20))}}async computeFingerprint(){const Ae=this.writeForHash(this.version);if(5===this.version)this.fingerprint=await qa.hash.sha256(Ae);else{if(4!==this.version)throw Error("Unsupported key version");this.fingerprint=await qa.hash.sha1(Ae)}}getFingerprintBytes(){return this.fingerprint}getFingerprint(){return ir.uint8ArrayToHex(this.getFingerprintBytes())}hasSameFingerprintAs(Ae){return this.version===Ae.version&&ir.equalsUint8Array(this.writePublicKey(),Ae.writePublicKey())}getAlgorithmInfo(){const Ae={};Ae.algorithm=ur.read(ur.publicKey,this.algorithm);const Se=this.publicParams.n||this.publicParams.p;return Se?Ae.bits=ir.uint8ArrayBitLength(Se):Ae.curve=this.publicParams.oid.getName(),Ae}}zu.prototype.readPublicKey=zu.prototype.read,zu.prototype.writePublicKey=zu.prototype.write;const Xp=ir.constructAllowedPackets([lu,ku,gu,bu]);class Fu{static get tag(){return ur.packet.symmetricallyEncryptedData}constructor(){this.encrypted=null,this.packets=null}read(Ae){this.encrypted=Ae}write(){return this.encrypted}async decrypt(Ae,Se,Ke=hr){if(!Ke.allowUnauthenticatedMessages)throw Error("Message is not authenticated.");const{blockSize:qe}=qa.getCipher(Ae),Fe=await ie(J(this.encrypted)),$e=await qa.mode.cfb.decrypt(Ae,Se,Fe.subarray(qe+2),Fe.subarray(2,qe+2));this.packets=await vu.fromBinary($e,Xp,Ke)}async encrypt(Ae,Se,Ke=hr){const qe=this.packets.write(),{blockSize:Fe}=qa.getCipher(Ae),$e=await qa.getPrefixRandom(Ae),rt=await qa.mode.cfb.encrypt(Ae,Se,$e,new Uint8Array(Fe),Ke),it=await qa.mode.cfb.encrypt(Ae,Se,qe,rt.subarray(2),Ke);this.encrypted=ir.concat([rt,it])}}class Ou extends zu{static get tag(){return ur.packet.publicSubkey}constructor(Ae,Se){super(Ae,Se)}static fromSecretSubkeyPacket(Ae){const Se=new Ou,{version:Ke,created:qe,algorithm:Fe,publicParams:$e,keyID:rt,fingerprint:it}=Ae;return Se.version=Ke,Se.created=qe,Se.algorithm=Fe,Se.publicParams=$e,Se.keyID=rt,Se.fingerprint=it,Se}}class Nu{static get tag(){return ur.packet.userAttribute}constructor(){this.attributes=[]}read(Ae){let Se=0;for(;Se<Ae.length;){const Ke=En(Ae.subarray(Se,Ae.length));Se+=Ke.offset,this.attributes.push(ir.uint8ArrayToString(Ae.subarray(Se,Se+Ke.len))),Se+=Ke.len}}write(){const Ae=[];for(let Se=0;Se<this.attributes.length;Se++)Ae.push(Pn(this.attributes[Se].length)),Ae.push(ir.stringToUint8Array(this.attributes[Se]));return ir.concatUint8Array(Ae)}equals(Ae){return!!(Ae&&Ae instanceof Nu)&&this.attributes.every((function(Se,Ke){return Se===Ae.attributes[Ke]}))}}class ju extends zu{static get tag(){return ur.packet.secretKey}constructor(Ae=new Date,Se=hr){super(Ae,Se),this.keyMaterial=null,this.isEncrypted=null,this.s2kUsage=0,this.s2k=null,this.symmetric=null,this.aead=null,this.privateParams=null}async read(Ae){let Se=await this.readPublicKey(Ae);if(this.s2kUsage=Ae[Se++],5===this.version&&Se++,255===this.s2kUsage||254===this.s2kUsage||253===this.s2kUsage){if(this.symmetric=Ae[Se++],253===this.s2kUsage&&(this.aead=Ae[Se++]),this.s2k=new Bu,Se+=this.s2k.read(Ae.subarray(Se,Ae.length)),"gnu-dummy"===this.s2k.type)return}else this.s2kUsage&&(this.symmetric=this.s2kUsage);if(this.s2kUsage&&(this.iv=Ae.subarray(Se,Se+qa.getCipher(this.symmetric).blockSize),Se+=this.iv.length),5===this.version&&(Se+=4),this.keyMaterial=Ae.subarray(Se),this.isEncrypted=!!this.s2kUsage,!this.isEncrypted){const Se=this.keyMaterial.subarray(0,-2);if(!ir.equalsUint8Array(ir.writeChecksum(Se),this.keyMaterial.subarray(-2)))throw Error("Key checksum mismatch");try{const{privateParams:Ae}=qa.parsePrivateKeyParams(this.algorithm,Se,this.publicParams);this.privateParams=Ae}catch(Ae){if(Ae instanceof Rn)throw Ae;throw Error("Error reading MPIs")}}}write(){const Ae=[this.writePublicKey()];Ae.push(new Uint8Array([this.s2kUsage]));const Se=[];return 255!==this.s2kUsage&&254!==this.s2kUsage&&253!==this.s2kUsage||(Se.push(this.symmetric),253===this.s2kUsage&&Se.push(this.aead),Se.push(...this.s2k.write())),this.s2kUsage&&"gnu-dummy"!==this.s2k.type&&Se.push(...this.iv),5===this.version&&Ae.push(new Uint8Array([Se.length])),Ae.push(new Uint8Array(Se)),this.isDummy()||(this.s2kUsage||(this.keyMaterial=qa.serializeParams(this.algorithm,this.privateParams)),5===this.version&&Ae.push(ir.writeNumber(this.keyMaterial.length,4)),Ae.push(this.keyMaterial),this.s2kUsage||Ae.push(ir.writeChecksum(this.keyMaterial))),ir.concatUint8Array(Ae)}isDecrypted(){return!1===this.isEncrypted}isDummy(){return!(!this.s2k||"gnu-dummy"!==this.s2k.type)}makeDummy(Ae=hr){this.isDummy()||(this.isDecrypted()&&this.clearPrivateParams(),this.isEncrypted=null,this.keyMaterial=null,this.s2k=new Bu(Ae),this.s2k.algorithm=0,this.s2k.c=0,this.s2k.type="gnu-dummy",this.s2kUsage=254,this.symmetric=ur.symmetric.aes256)}async encrypt(Ae,Se=hr){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key packet is already encrypted");if(!Ae)throw Error("A non-empty passphrase is required for key encryption.");this.s2k=new Bu(Se),this.s2k.salt=qa.random.getRandomBytes(8);const Ke=qa.serializeParams(this.algorithm,this.privateParams);this.symmetric=ur.symmetric.aes256;const qe=await Lu(this.s2k,Ae,this.symmetric),{blockSize:Fe}=qa.getCipher(this.symmetric);if(this.iv=qa.random.getRandomBytes(Fe),Se.aeadProtect){this.s2kUsage=253,this.aead=ur.aead.eax;const Ae=qa.getAEADMode(this.aead),Se=await Ae(this.symmetric,qe);this.keyMaterial=await Se.encrypt(Ke,this.iv.subarray(0,Ae.ivLength),new Uint8Array)}else this.s2kUsage=254,this.keyMaterial=await qa.mode.cfb.encrypt(this.symmetric,qe,ir.concatUint8Array([Ke,await qa.hash.sha1(Ke,Se)]),this.iv,Se)}async decrypt(Ae){if(this.isDummy())return!1;if(this.isDecrypted())throw Error("Key packet is already decrypted.");let Se,Ke;if(254!==this.s2kUsage&&253!==this.s2kUsage)throw 255===this.s2kUsage?Error("Encrypted private key is authenticated using an insecure two-byte hash"):Error("Private key is encrypted using an insecure S2K function: unsalted MD5");if(Se=await Lu(this.s2k,Ae,this.symmetric),253===this.s2kUsage){const qe=qa.getAEADMode(this.aead),Fe=await qe(this.symmetric,Se);try{Ke=await Fe.decrypt(this.keyMaterial,this.iv.subarray(0,qe.ivLength),new Uint8Array)}catch(Ae){if("Authentication tag mismatch"===Ae.message)throw Error("Incorrect key passphrase: "+Ae.message);throw Ae}}else{const Ae=await qa.mode.cfb.decrypt(this.symmetric,Se,this.keyMaterial,this.iv);Ke=Ae.subarray(0,-20);const qe=await qa.hash.sha1(Ke);if(!ir.equalsUint8Array(qe,Ae.subarray(-20)))throw Error("Incorrect key passphrase")}try{const{privateParams:Ae}=qa.parsePrivateKeyParams(this.algorithm,Ke,this.publicParams);this.privateParams=Ae}catch(Ae){throw Error("Error reading MPIs")}this.isEncrypted=!1,this.keyMaterial=null,this.s2kUsage=0}async validate(){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key is not decrypted");let Ae;try{Ae=await qa.validateParams(this.algorithm,this.publicParams,this.privateParams)}catch(Se){Ae=!1}if(!Ae)throw Error("Key is invalid")}async generate(Ae,Se){const{privateParams:Ke,publicParams:qe}=await qa.generateParams(this.algorithm,Ae,Se);this.privateParams=Ke,this.publicParams=qe,this.isEncrypted=!1}clearPrivateParams(){this.isDummy()||(Object.keys(this.privateParams).forEach((Ae=>{this.privateParams[Ae].fill(0),delete this.privateParams[Ae]})),this.privateParams=null,this.isEncrypted=!0)}}async function Lu(Ae,Se,Ke){const{keySize:qe}=qa.getCipher(Ke);return Ae.produceKey(Se,qe)}var Jp=gt((function(Ae){!function(Se){function r(Ae){function t(){return Ke<qe}function r(){return Ke}function n(Ae){Ke=Ae}function a(){Ke=0,qe=Se.length}function s(Ae,Se){return{name:Ae,tokens:Se||"",semantic:Se||"",children:[]}}function o(Ae,Se){var Ke;return null===Se?null:((Ke=s(Ae)).tokens=Se.tokens,Ke.semantic=Se.semantic,Ke.children.push(Se),Ke)}function c(Ae,Se){return null!==Se&&(Ae.tokens+=Se.tokens,Ae.semantic+=Se.semantic),Ae.children.push(Se),Ae}function u(Ae){var qe;return t()&&Ae(qe=Se[Ke])?(Ke+=1,s("token",qe)):null}function h(Ae){return function(){return o("literal",u((function(Se){return Se===Ae})))}}function d(){var Ae=arguments;return function(){var Se,Ke,qe,Fe;for(Fe=r(),Ke=s("and"),Se=0;Se<Ae.length;Se+=1){if(null===(qe=Ae[Se]()))return n(Fe),null;c(Ke,qe)}return Ke}}function f(){var Ae=arguments;return function(){var Se,Ke,qe;for(qe=r(),Se=0;Se<Ae.length;Se+=1){if(null!==(Ke=Ae[Se]()))return Ke;n(qe)}return null}}function l(Ae){return function(){var Se,Ke;return Ke=r(),null!==(Se=Ae())?Se:(n(Ke),s("opt"))}}function p(Ae){return function(){var Se=Ae();return null!==Se&&(Se.semantic=""),Se}}function y(Ae){return function(){var Se=Ae();return null!==Se&&Se.semantic.length>0&&(Se.semantic=" "),Se}}function b(Ae,Se){return function(){var Ke,qe,Fe,$e,rt;for($e=r(),Ke=s("star"),Fe=0,rt=void 0===Se?0:Se;null!==(qe=Ae());)Fe+=1,c(Ke,qe);return Fe>=rt?Ke:(n($e),null)}}function m(Ae){return Ae.charCodeAt(0)>=128}function g(){return o("cr",h("\r")())}function w(){return o("crlf",d(g,k)())}function v(){return o("dquote",h('"')())}function _(){return o("htab",h("\t")())}function k(){return o("lf",h("\n")())}function A(){return o("sp",h(" ")())}function S(){return o("vchar",u((function(Se){var Ke=Se.charCodeAt(0),qe=33<=Ke&&Ke<=126;return Ae.rfc6532&&(qe=qe||m(Se)),qe})))}function E(){return o("wsp",f(A,_)())}function P(){var Ae=o("quoted-pair",f(d(h("\\"),f(S,E)),ie)());return null===Ae?null:(Ae.semantic=Ae.semantic[1],Ae)}function x(){return o("fws",f(ae,d(l(d(b(E),p(w))),b(E,1)))())}function M(){return o("ctext",f((function(){return u((function(Se){var Ke=Se.charCodeAt(0),qe=33<=Ke&&Ke<=39||42<=Ke&&Ke<=91||93<=Ke&&Ke<=126;return Ae.rfc6532&&(qe=qe||m(Se)),qe}))}),te)())}function C(){return o("ccontent",f(M,P,K)())}function K(){return o("comment",d(h("("),b(d(l(x),C)),l(x),h(")"))())}function D(){return o("cfws",f(d(b(d(l(x),K),1),l(x)),x)())}function R(){return o("atext",u((function(Se){var Ke="a"<=Se&&Se<="z"||"A"<=Se&&Se<="Z"||"0"<=Se&&Se<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(Se)>=0;return Ae.rfc6532&&(Ke=Ke||m(Se)),Ke})))}function U(){return o("atom",d(y(l(D)),b(R,1),y(l(D)))())}function I(){var Ae,Se;return null===(Ae=o("dot-atom-text",b(R,1)()))||null!==(Se=b(d(h("."),b(R,1)))())&&c(Ae,Se),Ae}function B(){return o("dot-atom",d(p(l(D)),I,p(l(D)))())}function T(){return o("qtext",f((function(){return u((function(Se){var Ke=Se.charCodeAt(0),qe=33===Ke||35<=Ke&&Ke<=91||93<=Ke&&Ke<=126;return Ae.rfc6532&&(qe=qe||m(Se)),qe}))}),re)())}function z(){return o("qcontent",f(T,P)())}function q(){return o("quoted-string",d(p(l(D)),p(v),b(d(l(y(x)),z)),l(p(x)),p(v),p(l(D)))())}function F(){return o("word",f(U,q)())}function O(){return o("address",f(N,W)())}function N(){return o("mailbox",f(j,J)())}function j(){return o("name-addr",d(l(H),L)())}function L(){return o("angle-addr",f(d(p(l(D)),h("<"),J,h(">"),p(l(D))),se)())}function W(){return o("group",d(H,h(":"),l($),h(";"),p(l(D)))())}function H(){return o("display-name",(null!==(Ae=o("phrase",f(ne,b(F,1))()))&&(Ae.semantic=function(Ae){return Ae.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(Ae.semantic)),Ae));var Ae}function G(){return o("mailbox-list",f(d(N,b(d(h(","),N))),ue)())}function V(){return o("address-list",f(d(O,b(d(h(","),O))),he)())}function $(){return o("group-list",f(G,p(D),de)())}function Z(){return o("local-part",f(fe,B,q)())}function Y(){return o("dtext",f((function(){return u((function(Se){var Ke=Se.charCodeAt(0),qe=33<=Ke&&Ke<=90||94<=Ke&&Ke<=126;return Ae.rfc6532&&(qe=qe||m(Se)),qe}))}),pe)())}function X(){return o("domain-literal",d(p(l(D)),h("["),b(d(l(x),Y)),l(x),h("]"),p(l(D)))())}function Q(){return o("domain",(Se=f(le,B,X)(),Ae.rejectTLD&&Se&&Se.semantic&&Se.semantic.indexOf(".")<0?null:(Se&&(Se.semantic=Se.semantic.replace(/\s+/g,"")),Se)));var Se}function J(){return o("addr-spec",d(Z,h("@"),Q)())}function ee(){return Ae.strict?null:o("obs-NO-WS-CTL",u((function(Ae){var Se=Ae.charCodeAt(0);return 1<=Se&&Se<=8||11===Se||12===Se||14<=Se&&Se<=31||127===Se})))}function te(){return Ae.strict?null:o("obs-ctext",ee())}function re(){return Ae.strict?null:o("obs-qtext",ee())}function ie(){return Ae.strict?null:o("obs-qp",d(h("\\"),f(h("\0"),ee,k,g))())}function ne(){return Ae.strict?null:Ae.atInDisplayName?o("obs-phrase",d(F,b(f(F,h("."),h("@"),y(D))))()):o("obs-phrase",d(F,b(f(F,h("."),y(D))))())}function ae(){return Ae.strict?null:o("obs-FWS",b(d(p(l(w)),E),1)())}function se(){return Ae.strict?null:o("obs-angle-addr",d(p(l(D)),h("<"),oe,J,h(">"),p(l(D)))())}function oe(){return Ae.strict?null:o("obs-route",d(ce,h(":"))())}function ce(){return Ae.strict?null:o("obs-domain-list",d(b(f(p(D),h(","))),h("@"),Q,b(d(h(","),p(l(D)),l(d(h("@"),Q)))))())}function ue(){return Ae.strict?null:o("obs-mbox-list",d(b(d(p(l(D)),h(","))),N,b(d(h(","),l(d(N,p(D))))))())}function he(){return Ae.strict?null:o("obs-addr-list",d(b(d(p(l(D)),h(","))),O,b(d(h(","),l(d(O,p(D))))))())}function de(){return Ae.strict?null:o("obs-group-list",d(b(d(p(l(D)),h(",")),1),p(l(D)))())}function fe(){return Ae.strict?null:o("obs-local-part",d(F,b(d(h("."),F)))())}function le(){return Ae.strict?null:o("obs-domain",d(U,b(d(h("."),U)))())}function pe(){return Ae.strict?null:o("obs-dtext",f(ee,P)())}function ye(Ae,Se){var Ke,qe,Fe;if(null==Se)return null;for(qe=[Se];qe.length>0;){if((Fe=qe.pop()).name===Ae)return Fe;for(Ke=Fe.children.length-1;Ke>=0;Ke-=1)qe.push(Fe.children[Ke])}return null}function be(Ae,Se){var Ke,qe,Fe,$e,rt;if(null==Se)return null;for(qe=[Se],$e=[],rt={},Ke=0;Ke<Ae.length;Ke+=1)rt[Ae[Ke]]=!0;for(;qe.length>0;)if((Fe=qe.pop()).name in rt)$e.push(Fe);else for(Ke=Fe.children.length-1;Ke>=0;Ke-=1)qe.push(Fe.children[Ke]);return $e}function me(Se){var Ke,qe,Fe,$e,rt;if(null===Se)return null;for(Ke=[],qe=be(["group","mailbox"],Se),Fe=0;Fe<qe.length;Fe+=1)"group"===($e=qe[Fe]).name?Ke.push(ge($e)):"mailbox"===$e.name&&Ke.push(we($e));return rt={ast:Se,addresses:Ke},Ae.simple&&(rt=function(Ae){var Se;if(Ae&&Ae.addresses)for(Se=0;Se<Ae.addresses.length;Se+=1)delete Ae.addresses[Se].node;return Ae}(rt)),Ae.oneResult?function(Se){if(!Se)return null;if(!Ae.partial&&Se.addresses.length>1)return null;return Se.addresses&&Se.addresses[0]}(rt):Ae.simple?rt&&rt.addresses:rt}function ge(Ae){var Se,Ke=ye("display-name",Ae),qe=[],Fe=be(["mailbox"],Ae);for(Se=0;Se<Fe.length;Se+=1)qe.push(we(Fe[Se]));return{node:Ae,parts:{name:Ke},type:Ae.name,name:ve(Ke),addresses:qe}}function we(Ae){var Se=ye("display-name",Ae),Ke=ye("addr-spec",Ae),qe=function(Ae,Se){var Ke,qe,Fe,$e;if(null==Se)return null;for(qe=[Se],$e=[];qe.length>0;)for((Fe=qe.pop()).name===Ae&&$e.push(Fe),Ke=Fe.children.length-1;Ke>=0;Ke-=1)qe.push(Fe.children[Ke]);return $e}("cfws",Ae),Fe=be(["comment"],Ae),$e=ye("local-part",Ke),rt=ye("domain",Ke);return{node:Ae,parts:{name:Se,address:Ke,local:$e,domain:rt,comments:qe},type:Ae.name,name:ve(Se),address:ve(Ke),local:ve($e),domain:ve(rt),comments:_e(Fe),groupName:ve(Ae.groupName)}}function ve(Ae){return null!=Ae?Ae.semantic:null}function _e(Ae){var Se="";if(Ae)for(var Ke=0;Ke<Ae.length;Ke+=1)Se+=ve(Ae[Ke]);return Se}var Se,Ke,qe,Fe,$e;if(null===(Ae=i(Ae,{})))return null;if(Se=Ae.input,$e={address:O,"address-list":V,"angle-addr":L,from:function(){return o("from",f(G,V)())},group:W,mailbox:N,"mailbox-list":G,"reply-to":function(){return o("reply-to",V())},sender:function(){return o("sender",f(N,O)())}}[Ae.startAt]||V,!Ae.strict){if(a(),Ae.strict=!0,Fe=$e(Se),Ae.partial||!t())return me(Fe);Ae.strict=!1}return a(),Fe=$e(Se),!Ae.partial&&t()?null:me(Fe)}function i(Ae,Se){function r(Ae){return"[object String]"===Object.prototype.toString.call(Ae)}function i(Ae){return null==Ae}var Ke,qe;if(r(Ae))Ae={input:Ae};else if(!function(Ae){return Ae===Object(Ae)}(Ae))return null;if(!r(Ae.input))return null;if(!Se)return null;for(qe in Ke={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1})i(Ae[qe])&&(Ae[qe]=i(Se[qe])?Ke[qe]:Se[qe]);return Ae}r.parseOneAddress=function(Ae){return r(i(Ae,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseAddressList=function(Ae){return r(i(Ae,{rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseFrom=function(Ae){return r(i(Ae,{rfc6532:!0,simple:!0,startAt:"from"}))},r.parseSender=function(Ae){return r(i(Ae,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},r.parseReplyTo=function(Ae){return r(i(Ae,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},Ae.exports=r}()}));class Hu{static get tag(){return ur.packet.userID}constructor(){this.userID="",this.name="",this.email="",this.comment=""}static fromObject(Ae){if(ir.isString(Ae)||Ae.name&&!ir.isString(Ae.name)||Ae.email&&!ir.isEmailAddress(Ae.email)||Ae.comment&&!ir.isString(Ae.comment))throw Error("Invalid user ID format");const Se=new Hu;Object.assign(Se,Ae);const Ke=[];return Se.name&&Ke.push(Se.name),Se.comment&&Ke.push(`(${Se.comment})`),Se.email&&Ke.push(`<${Se.email}>`),Se.userID=Ke.join(" "),Se}read(Ae,Se=hr){const Ke=ir.decodeUTF8(Ae);if(Ke.length>Se.maxUserIDLength)throw Error("User ID string is too long");try{const{name:Ae,address:Se,comments:qe}=Jp.parseOneAddress({input:Ke,atInDisplayName:!0});this.comment=qe.replace(/^\(|\)$/g,""),this.name=Ae,this.email=Se}catch(Ae){}this.userID=Ke}write(){return ir.encodeUTF8(this.userID)}equals(Ae){return Ae&&Ae.userID===this.userID}}class Gu extends ju{static get tag(){return ur.packet.secretSubkey}constructor(Ae=new Date,Se=hr){super(Ae,Se)}}const ey=ir.constructAllowedPackets([bu]);class $u{constructor(Ae){this.packets=Ae||new vu}write(){return this.packets.write()}armor(Ae=hr){return Me(ur.armor.signature,this.write(),void 0,void 0,void 0,Ae)}getSigningKeyIDs(){return this.packets.map((Ae=>Ae.issuerKeyID))}}async function Zu(Ae,Se){const Ke=new Gu(Ae.date,Se);return Ke.packets=null,Ke.algorithm=ur.write(ur.publicKey,Ae.algorithm),await Ke.generate(Ae.rsaBits,Ae.curve),await Ke.computeFingerprintAndKeyID(),Ke}async function Yu(Ae,Se){const Ke=new ju(Ae.date,Se);return Ke.packets=null,Ke.algorithm=ur.write(ur.publicKey,Ae.algorithm),await Ke.generate(Ae.rsaBits,Ae.curve,Ae.config),await Ke.computeFingerprintAndKeyID(),Ke}async function Xu(Ae,Se,Ke,qe,Fe=new Date,$e){let rt,it;for(let nt=Ae.length-1;nt>=0;nt--)try{(!rt||Ae[nt].created>=rt.created)&&(await Ae[nt].verify(Se,Ke,qe,Fe,void 0,$e),rt=Ae[nt])}catch(Ae){it=Ae}if(!rt)throw ir.wrapError(`Could not find valid ${ur.read(ur.signature,Ke)} signature in key ${Se.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((Ae,Se,Ke)=>Se+" "+Ke.toLowerCase())),it);return rt}function Qu(Ae,Se,Ke=new Date){const qe=ir.normalizeDate(Ke);if(null!==qe){const Ke=ah(Ae,Se);return!(Ae.created<=qe&&qe<Ke)}return!1}async function Ju(Ae,Se,Ke,qe){const Fe={};Fe.key=Se,Fe.bind=Ae;const $e=new bu;return $e.signatureType=ur.signature.subkeyBinding,$e.publicKeyAlgorithm=Se.algorithm,$e.hashAlgorithm=await eh(null,Ae,void 0,void 0,qe),Ke.sign?($e.keyFlags=[ur.keyFlags.signData],$e.embeddedSignature=await rh(Fe,null,Ae,{signatureType:ur.signature.keyBinding},Ke.date,void 0,void 0,void 0,qe)):$e.keyFlags=[ur.keyFlags.encryptCommunication|ur.keyFlags.encryptStorage],Ke.keyExpirationTime>0&&($e.keyExpirationTime=Ke.keyExpirationTime,$e.keyNeverExpires=!1),await $e.sign(Se,Fe,Ke.date),$e}async function eh(Ae,Se,Ke=new Date,qe={},Fe){let $e=Fe.preferredHashAlgorithm,rt=$e;if(Ae){const Se=await Ae.getPrimaryUser(Ke,qe,Fe);Se.selfCertification.preferredHashAlgorithms&&([rt]=Se.selfCertification.preferredHashAlgorithms,$e=qa.hash.getHashByteLength($e)<=qa.hash.getHashByteLength(rt)?rt:$e)}switch(Object.getPrototypeOf(Se)){case ju.prototype:case zu.prototype:case Gu.prototype:case Ou.prototype:switch(Se.algorithm){case ur.publicKey.ecdh:case ur.publicKey.ecdsa:case ur.publicKey.eddsa:rt=qa.publicKey.elliptic.getPreferredHashAlgo(Se.publicParams.oid)}}return qa.hash.getHashByteLength($e)<=qa.hash.getHashByteLength(rt)?rt:$e}async function th(Ae,Se=[],Ke=new Date,qe=[],Fe=hr){const $e={symmetric:ur.symmetric.aes128,aead:ur.aead.eax,compression:ur.compression.uncompressed}[Ae],rt={symmetric:Fe.preferredSymmetricAlgorithm,aead:Fe.preferredAEADAlgorithm,compression:Fe.preferredCompressionAlgorithm}[Ae],it={symmetric:"preferredSymmetricAlgorithms",aead:"preferredAEADAlgorithms",compression:"preferredCompressionAlgorithms"}[Ae],nt=await Promise.all(Se.map((async function(Ae,Se){const $e=(await Ae.getPrimaryUser(Ke,qe[Se],Fe)).selfCertification[it];return!!$e&&$e.indexOf(rt)>=0})));return nt.every(Boolean)?rt:$e}async function rh(Ae,Se,Ke,qe,Fe,$e,rt=[],it=!1,nt){if(Ke.isDummy())throw Error("Cannot sign with a gnu-dummy key.");if(!Ke.isDecrypted())throw Error("Signing key is not decrypted.");const st=new bu;return Object.assign(st,qe),st.publicKeyAlgorithm=Ke.algorithm,st.hashAlgorithm=await eh(Se,Ke,Fe,$e,nt),st.rawNotations=rt,await st.sign(Ke,Ae,Fe,it),st}async function ih(Ae,Se,Ke,qe=new Date,Fe){(Ae=Ae[Ke])&&(Se[Ke].length?await Promise.all(Ae.map((async function(Ae){Ae.isExpired(qe)||Fe&&!await Fe(Ae)||Se[Ke].some((function(Se){return ir.equalsUint8Array(Se.writeParams(),Ae.writeParams())}))||Se[Ke].push(Ae)}))):Se[Ke]=Ae)}async function nh(Ae,Se,Ke,qe,Fe,$e,rt=new Date,it){$e=$e||Ae;const nt=[];return await Promise.all(qe.map((async function(Ae){try{Fe&&!Ae.issuerKeyID.equals(Fe.issuerKeyID)||(await Ae.verify($e,Se,Ke,it.revocationsExpire?rt:null,!1,it),nt.push(Ae.issuerKeyID))}catch(Ae){}}))),Fe?(Fe.revoked=!!nt.some((Ae=>Ae.equals(Fe.issuerKeyID)))||(Fe.revoked||!1),Fe.revoked):nt.length>0}function ah(Ae,Se){let Ke;return!1===Se.keyNeverExpires&&(Ke=Ae.created.getTime()+1e3*Se.keyExpirationTime),Ke?new Date(Ke):1/0}function sh(Ae,Se={}){switch(Ae.type=Ae.type||Se.type,Ae.curve=Ae.curve||Se.curve,Ae.rsaBits=Ae.rsaBits||Se.rsaBits,Ae.keyExpirationTime=void 0!==Ae.keyExpirationTime?Ae.keyExpirationTime:Se.keyExpirationTime,Ae.passphrase=ir.isString(Ae.passphrase)?Ae.passphrase:Se.passphrase,Ae.date=Ae.date||Se.date,Ae.sign=Ae.sign||!1,Ae.type){case"ecc":try{Ae.curve=ur.write(ur.curve,Ae.curve)}catch(Ae){throw Error("Unknown curve")}Ae.curve!==ur.curve.ed25519&&Ae.curve!==ur.curve.curve25519||(Ae.curve=Ae.sign?ur.curve.ed25519:ur.curve.curve25519),Ae.sign?Ae.algorithm=Ae.curve===ur.curve.ed25519?ur.publicKey.eddsa:ur.publicKey.ecdsa:Ae.algorithm=ur.publicKey.ecdh;break;case"rsa":Ae.algorithm=ur.publicKey.rsaEncryptSign;break;default:throw Error("Unsupported key type "+Ae.type)}return Ae}function oh(Ae,Se){const Ke=Ae.algorithm;return Ke!==ur.publicKey.rsaEncrypt&&Ke!==ur.publicKey.elgamal&&Ke!==ur.publicKey.ecdh&&(!Se.keyFlags||0!=(Se.keyFlags[0]&ur.keyFlags.signData))}function ch(Ae,Se){const Ke=Ae.algorithm;return Ke!==ur.publicKey.dsa&&Ke!==ur.publicKey.rsaSign&&Ke!==ur.publicKey.ecdsa&&Ke!==ur.publicKey.eddsa&&(!Se.keyFlags||0!=(Se.keyFlags[0]&ur.keyFlags.encryptCommunication)||0!=(Se.keyFlags[0]&ur.keyFlags.encryptStorage))}function uh(Ae,Se){return!!Se.allowInsecureDecryptionWithSigningKeys||(!Ae.keyFlags||0!=(Ae.keyFlags[0]&ur.keyFlags.encryptCommunication)||0!=(Ae.keyFlags[0]&ur.keyFlags.encryptStorage))}function hh(Ae,Se){const Ke=ur.write(ur.publicKey,Ae.algorithm),qe=Ae.getAlgorithmInfo();if(Se.rejectPublicKeyAlgorithms.has(Ke))throw Error(qe.algorithm+" keys are considered too weak.");switch(Ke){case ur.publicKey.rsaEncryptSign:case ur.publicKey.rsaSign:case ur.publicKey.rsaEncrypt:if(qe.bits<Se.minRSABits)throw Error(`RSA keys shorter than ${Se.minRSABits} bits are considered too weak.`);break;case ur.publicKey.ecdsa:case ur.publicKey.eddsa:case ur.publicKey.ecdh:if(Se.rejectCurves.has(qe.curve))throw Error(`Support for ${qe.algorithm} keys using curve ${qe.curve} is disabled.`)}}class dh{constructor(Ae,Se){this.userID=Ae.constructor.tag===ur.packet.userID?Ae:null,this.userAttribute=Ae.constructor.tag===ur.packet.userAttribute?Ae:null,this.selfCertifications=[],this.otherCertifications=[],this.revocationSignatures=[],this.mainKey=Se}toPacketList(){const Ae=new vu;return Ae.push(this.userID||this.userAttribute),Ae.push(...this.revocationSignatures),Ae.push(...this.selfCertifications),Ae.push(...this.otherCertifications),Ae}clone(){const Ae=new dh(this.userID||this.userAttribute,this.mainKey);return Ae.selfCertifications=[...this.selfCertifications],Ae.otherCertifications=[...this.otherCertifications],Ae.revocationSignatures=[...this.revocationSignatures],Ae}async certify(Ae,Se,Ke){const qe=this.mainKey.keyPacket,Fe={userID:this.userID,userAttribute:this.userAttribute,key:qe},$e=new dh(Fe.userID||Fe.userAttribute,this.mainKey);return $e.otherCertifications=await Promise.all(Ae.map((async function(Ae){if(!Ae.isPrivate())throw Error("Need private key for signing");if(Ae.hasSameFingerprintAs(qe))throw Error("The user's own key can only be used for self-certifications");const $e=await Ae.getSigningKey(void 0,Se,void 0,Ke);return rh(Fe,Ae,$e.keyPacket,{signatureType:ur.signature.certGeneric,keyFlags:[ur.keyFlags.certifyKeys|ur.keyFlags.signData]},Se,void 0,void 0,void 0,Ke)}))),await $e.update(this,Se,Ke),$e}async isRevoked(Ae,Se,Ke=new Date,qe=hr){const Fe=this.mainKey.keyPacket;return nh(Fe,ur.signature.certRevocation,{key:Fe,userID:this.userID,userAttribute:this.userAttribute},this.revocationSignatures,Ae,Se,Ke,qe)}async verifyCertificate(Ae,Se,Ke=new Date,qe){const Fe=this,$e=this.mainKey.keyPacket,rt={userID:this.userID,userAttribute:this.userAttribute,key:$e},{issuerKeyID:it}=Ae,nt=Se.filter((Ae=>Ae.getKeys(it).length>0));return 0===nt.length?null:(await Promise.all(nt.map((async Se=>{const $e=await Se.getSigningKey(it,Ae.created,void 0,qe);if(Ae.revoked||await Fe.isRevoked(Ae,$e.keyPacket,Ke,qe))throw Error("User certificate is revoked");try{await Ae.verify($e.keyPacket,ur.signature.certGeneric,rt,Ke,void 0,qe)}catch(Ae){throw ir.wrapError("User certificate is invalid",Ae)}}))),!0)}async verifyAllCertifications(Ae,Se=new Date,Ke){const qe=this,Fe=this.selfCertifications.concat(this.otherCertifications);return Promise.all(Fe.map((async Fe=>({keyID:Fe.issuerKeyID,valid:await qe.verifyCertificate(Fe,Ae,Se,Ke).catch((()=>!1))}))))}async verify(Ae=new Date,Se){if(!this.selfCertifications.length)throw Error("No self-certifications found");const Ke=this,qe=this.mainKey.keyPacket,Fe={userID:this.userID,userAttribute:this.userAttribute,key:qe};let $e;for(let rt=this.selfCertifications.length-1;rt>=0;rt--)try{const $e=this.selfCertifications[rt];if($e.revoked||await Ke.isRevoked($e,void 0,Ae,Se))throw Error("Self-certification is revoked");try{await $e.verify(qe,ur.signature.certGeneric,Fe,Ae,void 0,Se)}catch(Ae){throw ir.wrapError("Self-certification is invalid",Ae)}return!0}catch(Ae){$e=Ae}throw $e}async update(Ae,Se,Ke){const qe=this.mainKey.keyPacket,Fe={userID:this.userID,userAttribute:this.userAttribute,key:qe};await ih(Ae,this,"selfCertifications",Se,(async function(Ae){try{return await Ae.verify(qe,ur.signature.certGeneric,Fe,Se,!1,Ke),!0}catch(Ae){return!1}})),await ih(Ae,this,"otherCertifications",Se),await ih(Ae,this,"revocationSignatures",Se,(function(Ae){return nh(qe,ur.signature.certRevocation,Fe,[Ae],void 0,void 0,Se,Ke)}))}async revoke(Ae,{flag:Se=ur.reasonForRevocation.noReason,string:Ke=""}={},qe=new Date,Fe=hr){const $e={userID:this.userID,userAttribute:this.userAttribute,key:Ae},rt=new dh($e.userID||$e.userAttribute,this.mainKey);return rt.revocationSignatures.push(await rh($e,null,Ae,{signatureType:ur.signature.certRevocation,reasonForRevocationFlag:ur.write(ur.reasonForRevocation,Se),reasonForRevocationString:Ke},qe,void 0,void 0,!1,Fe)),await rt.update(this),rt}}class fh{constructor(Ae,Se){this.keyPacket=Ae,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=Se}toPacketList(){const Ae=new vu;return Ae.push(this.keyPacket),Ae.push(...this.revocationSignatures),Ae.push(...this.bindingSignatures),Ae}clone(){const Ae=new fh(this.keyPacket,this.mainKey);return Ae.bindingSignatures=[...this.bindingSignatures],Ae.revocationSignatures=[...this.revocationSignatures],Ae}async isRevoked(Ae,Se,Ke=new Date,qe=hr){const Fe=this.mainKey.keyPacket;return nh(Fe,ur.signature.subkeyRevocation,{key:Fe,bind:this.keyPacket},this.revocationSignatures,Ae,Se,Ke,qe)}async verify(Ae=new Date,Se=hr){const Ke=this.mainKey.keyPacket,qe={key:Ke,bind:this.keyPacket},Fe=await Xu(this.bindingSignatures,Ke,ur.signature.subkeyBinding,qe,Ae,Se);if(Fe.revoked||await this.isRevoked(Fe,null,Ae,Se))throw Error("Subkey is revoked");if(Qu(this.keyPacket,Fe,Ae))throw Error("Subkey is expired");return Fe}async getExpirationTime(Ae=new Date,Se=hr){const Ke=this.mainKey.keyPacket,qe={key:Ke,bind:this.keyPacket};let Fe;try{Fe=await Xu(this.bindingSignatures,Ke,ur.signature.subkeyBinding,qe,Ae,Se)}catch(Ae){return null}const $e=ah(this.keyPacket,Fe),rt=Fe.getExpirationTime();return $e<rt?$e:rt}async update(Ae,Se=new Date,Ke=hr){const qe=this.mainKey.keyPacket;if(!this.hasSameFingerprintAs(Ae))throw Error("Subkey update method: fingerprints of subkeys not equal");this.keyPacket.constructor.tag===ur.packet.publicSubkey&&Ae.keyPacket.constructor.tag===ur.packet.secretSubkey&&(this.keyPacket=Ae.keyPacket);const Fe=this,$e={key:qe,bind:Fe.keyPacket};await ih(Ae,this,"bindingSignatures",Se,(async function(Ae){for(let Se=0;Se<Fe.bindingSignatures.length;Se++)if(Fe.bindingSignatures[Se].issuerKeyID.equals(Ae.issuerKeyID))return Ae.created>Fe.bindingSignatures[Se].created&&(Fe.bindingSignatures[Se]=Ae),!1;try{return await Ae.verify(qe,ur.signature.subkeyBinding,$e,Se,void 0,Ke),!0}catch(Ae){return!1}})),await ih(Ae,this,"revocationSignatures",Se,(function(Ae){return nh(qe,ur.signature.subkeyRevocation,$e,[Ae],void 0,void 0,Se,Ke)}))}async revoke(Ae,{flag:Se=ur.reasonForRevocation.noReason,string:Ke=""}={},qe=new Date,Fe=hr){const $e={key:Ae,bind:this.keyPacket},rt=new fh(this.keyPacket,this.mainKey);return rt.revocationSignatures.push(await rh($e,null,Ae,{signatureType:ur.signature.subkeyRevocation,reasonForRevocationFlag:ur.write(ur.reasonForRevocation,Se),reasonForRevocationString:Ke},qe,void 0,void 0,!1,Fe)),await rt.update(this),rt}hasSameFingerprintAs(Ae){return this.keyPacket.hasSameFingerprintAs(Ae.keyPacket||Ae)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((Ae=>{fh.prototype[Ae]=function(){return this.keyPacket[Ae]()}}));const ty=ir.constructAllowedPackets([bu]),iy=new Set([ur.packet.publicKey,ur.packet.privateKey]),ay=new Set([ur.packet.publicKey,ur.packet.privateKey,ur.packet.publicSubkey,ur.packet.privateSubkey]);class bh{packetListToStructure(Ae,Se=new Set){let Ke,qe,Fe,$e;for(const rt of Ae){if(rt instanceof Un){ay.has(rt.tag)&&!$e&&($e=iy.has(rt.tag)?iy:ay);continue}const Ae=rt.constructor.tag;if($e){if(!$e.has(Ae))continue;$e=null}if(Se.has(Ae))throw Error("Unexpected packet type: "+Ae);switch(Ae){case ur.packet.publicKey:case ur.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=rt,qe=this.getKeyID(),!qe)throw Error("Missing Key ID");break;case ur.packet.userID:case ur.packet.userAttribute:Ke=new dh(rt,this),this.users.push(Ke);break;case ur.packet.publicSubkey:case ur.packet.secretSubkey:Ke=null,Fe=new fh(rt,this),this.subkeys.push(Fe);break;case ur.packet.signature:switch(rt.signatureType){case ur.signature.certGeneric:case ur.signature.certPersona:case ur.signature.certCasual:case ur.signature.certPositive:if(!Ke){ir.printDebug("Dropping certification signatures without preceding user packet");continue}rt.issuerKeyID.equals(qe)?Ke.selfCertifications.push(rt):Ke.otherCertifications.push(rt);break;case ur.signature.certRevocation:Ke?Ke.revocationSignatures.push(rt):this.directSignatures.push(rt);break;case ur.signature.key:this.directSignatures.push(rt);break;case ur.signature.subkeyBinding:if(!Fe){ir.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}Fe.bindingSignatures.push(rt);break;case ur.signature.keyRevocation:this.revocationSignatures.push(rt);break;case ur.signature.subkeyRevocation:if(!Fe){ir.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}Fe.revocationSignatures.push(rt)}}}}toPacketList(){const Ae=new vu;return Ae.push(this.keyPacket),Ae.push(...this.revocationSignatures),Ae.push(...this.directSignatures),this.users.map((Se=>Ae.push(...Se.toPacketList()))),this.subkeys.map((Se=>Ae.push(...Se.toPacketList()))),Ae}clone(Ae=!1){const Se=new this.constructor(this.toPacketList());return Ae&&Se.getKeys().forEach((Ae=>{if(Ae.keyPacket=Object.create(Object.getPrototypeOf(Ae.keyPacket),Object.getOwnPropertyDescriptors(Ae.keyPacket)),!Ae.keyPacket.isDecrypted())return;const Se={};Object.keys(Ae.keyPacket.privateParams).forEach((Ke=>{Se[Ke]=new Uint8Array(Ae.keyPacket.privateParams[Ke])})),Ae.keyPacket.privateParams=Se})),Se}getSubkeys(Ae=null){return this.subkeys.filter((Se=>!Ae||Se.getKeyID().equals(Ae,!0)))}getKeys(Ae=null){const Se=[];return Ae&&!this.getKeyID().equals(Ae,!0)||Se.push(this),Se.concat(this.getSubkeys(Ae))}getKeyIDs(){return this.getKeys().map((Ae=>Ae.getKeyID()))}getUserIDs(){return this.users.map((Ae=>Ae.userID?Ae.userID.userID:null)).filter((Ae=>null!==Ae))}write(){return this.toPacketList().write()}async getSigningKey(Ae=null,Se=new Date,Ke={},qe=hr){await this.verifyPrimaryKey(Se,Ke,qe);const Fe=this.keyPacket,$e=this.subkeys.slice().sort(((Ae,Se)=>Se.keyPacket.created-Ae.keyPacket.created));let rt;for(const Ke of $e)if(!Ae||Ke.getKeyID().equals(Ae))try{await Ke.verify(Se,qe);const Ae={key:Fe,bind:Ke.keyPacket},$e=await Xu(Ke.bindingSignatures,Fe,ur.signature.subkeyBinding,Ae,Se,qe);if(!oh(Ke.keyPacket,$e))continue;if(!$e.embeddedSignature)throw Error("Missing embedded signature");return await Xu([$e.embeddedSignature],Ke.keyPacket,ur.signature.keyBinding,Ae,Se,qe),hh(Ke.keyPacket,qe),Ke}catch(Ae){rt=Ae}try{const $e=await this.getPrimaryUser(Se,Ke,qe);if((!Ae||Fe.getKeyID().equals(Ae))&&oh(Fe,$e.selfCertification))return hh(Fe,qe),this}catch(Ae){rt=Ae}throw ir.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),rt)}async getEncryptionKey(Ae,Se=new Date,Ke={},qe=hr){await this.verifyPrimaryKey(Se,Ke,qe);const Fe=this.keyPacket,$e=this.subkeys.slice().sort(((Ae,Se)=>Se.keyPacket.created-Ae.keyPacket.created));let rt;for(const Ke of $e)if(!Ae||Ke.getKeyID().equals(Ae))try{await Ke.verify(Se,qe);const Ae={key:Fe,bind:Ke.keyPacket},$e=await Xu(Ke.bindingSignatures,Fe,ur.signature.subkeyBinding,Ae,Se,qe);if(ch(Ke.keyPacket,$e))return hh(Ke.keyPacket,qe),Ke}catch(Ae){rt=Ae}try{const $e=await this.getPrimaryUser(Se,Ke,qe);if((!Ae||Fe.getKeyID().equals(Ae))&&ch(Fe,$e.selfCertification))return hh(Fe,qe),this}catch(Ae){rt=Ae}throw ir.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),rt)}async isRevoked(Ae,Se,Ke=new Date,qe=hr){return nh(this.keyPacket,ur.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,Ae,Se,Ke,qe)}async verifyPrimaryKey(Ae=new Date,Se={},Ke=hr){const qe=this.keyPacket;if(await this.isRevoked(null,null,Ae,Ke))throw Error("Primary key is revoked");const{selfCertification:Fe}=await this.getPrimaryUser(Ae,Se,Ke);if(Qu(qe,Fe,Ae))throw Error("Primary key is expired");const $e=await Xu(this.directSignatures,qe,ur.signature.key,{key:qe},Ae,Ke).catch((()=>{}));if($e&&Qu(qe,$e,Ae))throw Error("Primary key is expired")}async getExpirationTime(Ae,Se=hr){let Ke;try{const{selfCertification:qe}=await this.getPrimaryUser(null,Ae,Se),Fe=ah(this.keyPacket,qe),$e=qe.getExpirationTime(),rt=await Xu(this.directSignatures,this.keyPacket,ur.signature.key,{key:this.keyPacket},null,Se).catch((()=>{}));if(rt){const Ae=ah(this.keyPacket,rt);Ke=Math.min(Fe,$e,Ae)}else Ke=Fe<$e?Fe:$e}catch(Ae){Ke=null}return ir.normalizeDate(Ke)}async getPrimaryUser(Ae=new Date,Se={},Ke=hr){const qe=this.keyPacket,Fe=[];let $e;for(let rt=0;rt<this.users.length;rt++)try{const $e=this.users[rt];if(!$e.userID)continue;if(void 0!==Se.name&&$e.userID.name!==Se.name||void 0!==Se.email&&$e.userID.email!==Se.email||void 0!==Se.comment&&$e.userID.comment!==Se.comment)throw Error("Could not find user that matches that user ID");const it={userID:$e.userID,key:qe},nt=await Xu($e.selfCertifications,qe,ur.signature.certGeneric,it,Ae,Ke);Fe.push({index:rt,user:$e,selfCertification:nt})}catch(Ae){$e=Ae}if(!Fe.length)throw $e||Error("Could not find primary user");await Promise.all(Fe.map((async function(Se){return Se.selfCertification.revoked||Se.user.isRevoked(Se.selfCertification,null,Ae,Ke)})));const rt=Fe.sort((function(Ae,Se){const Ke=Ae.selfCertification,qe=Se.selfCertification;return qe.revoked-Ke.revoked||Ke.isPrimaryUserID-qe.isPrimaryUserID||Ke.created-qe.created})).pop(),{user:it,selfCertification:nt}=rt;if(nt.revoked||await it.isRevoked(nt,null,Ae,Ke))throw Error("Primary user is revoked");return rt}async update(Ae,Se=new Date,Ke=hr){if(!this.hasSameFingerprintAs(Ae))throw Error("Primary key fingerprints must be equal to update the key");if(!this.isPrivate()&&Ae.isPrivate()){if(!(this.subkeys.length===Ae.subkeys.length&&this.subkeys.every((Se=>Ae.subkeys.some((Ae=>Se.hasSameFingerprintAs(Ae)))))))throw Error("Cannot update public key with private key if subkeys mismatch");return Ae.update(this,Ke)}const qe=this.clone();return await ih(Ae,qe,"revocationSignatures",Se,(Fe=>nh(qe.keyPacket,ur.signature.keyRevocation,qe,[Fe],null,Ae.keyPacket,Se,Ke))),await ih(Ae,qe,"directSignatures",Se),await Promise.all(Ae.users.map((async Ae=>{const Fe=qe.users.filter((Se=>Ae.userID&&Ae.userID.equals(Se.userID)||Ae.userAttribute&&Ae.userAttribute.equals(Se.userAttribute)));if(Fe.length>0)await Promise.all(Fe.map((qe=>qe.update(Ae,Se,Ke))));else{const Se=Ae.clone();Se.mainKey=qe,qe.users.push(Se)}}))),await Promise.all(Ae.subkeys.map((async Ae=>{const Fe=qe.subkeys.filter((Se=>Se.hasSameFingerprintAs(Ae)));if(Fe.length>0)await Promise.all(Fe.map((qe=>qe.update(Ae,Se,Ke))));else{const Se=Ae.clone();Se.mainKey=qe,qe.subkeys.push(Se)}}))),qe}async getRevocationCertificate(Ae=new Date,Se=hr){const Ke={key:this.keyPacket},qe=await Xu(this.revocationSignatures,this.keyPacket,ur.signature.keyRevocation,Ke,Ae,Se),Fe=new vu;return Fe.push(qe),Me(ur.armor.publicKey,Fe.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(Ae,Se=new Date,Ke=hr){const qe=await xe(Ae,Ke),Fe=(await vu.fromBinary(qe.data,ty,Ke)).findPacket(ur.packet.signature);if(!Fe||Fe.signatureType!==ur.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!Fe.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await Fe.verify(this.keyPacket,ur.signature.keyRevocation,{key:this.keyPacket},Se,void 0,Ke)}catch(Ae){throw ir.wrapError("Could not verify revocation signature",Ae)}const $e=this.clone();return $e.revocationSignatures.push(Fe),$e}async signPrimaryUser(Ae,Se,Ke,qe=hr){const{index:Fe,user:$e}=await this.getPrimaryUser(Se,Ke,qe),rt=await $e.certify(Ae,Se,qe),it=this.clone();return it.users[Fe]=rt,it}async signAllUsers(Ae,Se=new Date,Ke=hr){const qe=this.clone();return qe.users=await Promise.all(this.users.map((function(qe){return qe.certify(Ae,Se,Ke)}))),qe}async verifyPrimaryUser(Ae,Se=new Date,Ke,qe=hr){const Fe=this.keyPacket,{user:$e}=await this.getPrimaryUser(Se,Ke,qe);return Ae?await $e.verifyAllCertifications(Ae,Se,qe):[{keyID:Fe.getKeyID(),valid:await $e.verify(Se,qe).catch((()=>!1))}]}async verifyAllUsers(Ae,Se=new Date,Ke=hr){const qe=this.keyPacket,Fe=[];return await Promise.all(this.users.map((async $e=>{const rt=Ae?await $e.verifyAllCertifications(Ae,Se,Ke):[{keyID:qe.getKeyID(),valid:await $e.verify(Se,Ke).catch((()=>!1))}];Fe.push(...rt.map((Ae=>({userID:$e.userID.userID,keyID:Ae.keyID,valid:Ae.valid}))))}))),Fe}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((Ae=>{bh.prototype[Ae]=fh.prototype[Ae]}));class mh extends bh{constructor(Ae){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],Ae&&(this.packetListToStructure(Ae,new Set([ur.packet.secretKey,ur.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(Ae=hr){return Me(ur.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,Ae)}}class gh extends mh{constructor(Ae){if(super(),this.packetListToStructure(Ae,new Set([ur.packet.publicKey,ur.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const Ae=new vu,Se=this.toPacketList();for(const Ke of Se)switch(Ke.constructor.tag){case ur.packet.secretKey:{const Se=zu.fromSecretKeyPacket(Ke);Ae.push(Se);break}case ur.packet.secretSubkey:{const Se=Ou.fromSecretSubkeyPacket(Ke);Ae.push(Se);break}default:Ae.push(Ke)}return new mh(Ae)}armor(Ae=hr){return Me(ur.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,Ae)}async getDecryptionKeys(Ae,Se=new Date,Ke={},qe=hr){const Fe=this.keyPacket,$e=[];for(let Ke=0;Ke<this.subkeys.length;Ke++)if(!Ae||this.subkeys[Ke].getKeyID().equals(Ae,!0))try{const Ae={key:Fe,bind:this.subkeys[Ke].keyPacket};uh(await Xu(this.subkeys[Ke].bindingSignatures,Fe,ur.signature.subkeyBinding,Ae,Se,qe),qe)&&$e.push(this.subkeys[Ke])}catch(Ae){}const rt=await this.getPrimaryUser(Se,Ke,qe);return Ae&&!Fe.getKeyID().equals(Ae,!0)||!uh(rt.selfCertification,qe)||$e.push(this),$e}isDecrypted(){return this.getKeys().some((({keyPacket:Ae})=>Ae.isDecrypted()))}async validate(Ae=hr){if(!this.isPrivate())throw Error("Cannot validate a public key");let Se;if(this.keyPacket.isDummy()){const Ke=await this.getSigningKey(null,null,void 0,{...Ae,rejectPublicKeyAlgorithms:new Set,minRSABits:0});Ke&&!Ke.keyPacket.isDummy()&&(Se=Ke.keyPacket)}else Se=this.keyPacket;if(Se)return Se.validate();{const Ae=this.getKeys(),Se=Ae.map((Ae=>Ae.keyPacket.isDummy())).every(Boolean);if(Se)throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(Ae.map((async Ae=>Ae.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:Ae})=>{Ae.isDecrypted()&&Ae.clearPrivateParams()}))}async revoke({flag:Ae=ur.reasonForRevocation.noReason,string:Se=""}={},Ke=new Date,qe=hr){if(!this.isPrivate())throw Error("Need private key for revoking");const Fe={key:this.keyPacket},$e=this.clone();return $e.revocationSignatures.push(await rh(Fe,null,this.keyPacket,{signatureType:ur.signature.keyRevocation,reasonForRevocationFlag:ur.write(ur.reasonForRevocation,Ae),reasonForRevocationString:Se},Ke,void 0,void 0,void 0,qe)),$e}async addSubkey(Ae={}){const Se={...hr,...Ae.config};if(Ae.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(Ae.rsaBits<Se.minRSABits)throw Error(`rsaBits should be at least ${Se.minRSABits}, got: ${Ae.rsaBits}`);const Ke=this.keyPacket;if(Ke.isDummy())throw Error("Cannot add subkey to gnu-dummy primary key");if(!Ke.isDecrypted())throw Error("Key is not decrypted");const qe=Ke.getAlgorithmInfo();qe.type=qe.curve?"ecc":"rsa",qe.rsaBits=qe.bits||4096,qe.curve=qe.curve||"curve25519",Ae=sh(Ae,qe);const Fe=await Zu(Ae);hh(Fe,Se);const $e=await Ju(Fe,Ke,Ae,Se),rt=this.toPacketList();return rt.push(Fe,$e),new gh(rt)}}const oy=ir.constructAllowedPackets([zu,Ou,ju,Gu,Hu,Nu,bu]);function vh(Ae){for(const Se of Ae)switch(Se.constructor.tag){case ur.packet.secretKey:return new gh(Ae);case ur.packet.publicKey:return new mh(Ae)}throw Error("No key packet found")}async function _h(Ae,Se,Ke,qe){Ke.passphrase&&await Ae.encrypt(Ke.passphrase,qe),await Promise.all(Se.map((async function(Ae,Se){const Fe=Ke.subkeys[Se].passphrase;Fe&&await Ae.encrypt(Fe,qe)})));const Fe=new vu;Fe.push(Ae),await Promise.all(Ke.userIDs.map((async function(Se,Fe){function a(Ae,Se){return[Se,...Ae.filter((Ae=>Ae!==Se))]}const $e=Hu.fromObject(Se),rt={};rt.userID=$e,rt.key=Ae;const it=new bu;return it.signatureType=ur.signature.certGeneric,it.publicKeyAlgorithm=Ae.algorithm,it.hashAlgorithm=await eh(null,Ae,void 0,void 0,qe),it.keyFlags=[ur.keyFlags.certifyKeys|ur.keyFlags.signData],it.preferredSymmetricAlgorithms=a([ur.symmetric.aes256,ur.symmetric.aes128,ur.symmetric.aes192],qe.preferredSymmetricAlgorithm),qe.aeadProtect&&(it.preferredAEADAlgorithms=a([ur.aead.eax,ur.aead.ocb],qe.preferredAEADAlgorithm)),it.preferredHashAlgorithms=a([ur.hash.sha256,ur.hash.sha512],qe.preferredHashAlgorithm),it.preferredCompressionAlgorithms=a([ur.compression.zlib,ur.compression.zip,ur.compression.uncompressed],qe.preferredCompressionAlgorithm),0===Fe&&(it.isPrimaryUserID=!0),it.features=[0],it.features[0]|=ur.features.modificationDetection,qe.aeadProtect&&(it.features[0]|=ur.features.aead),qe.v5Keys&&(it.features[0]|=ur.features.v5Keys),Ke.keyExpirationTime>0&&(it.keyExpirationTime=Ke.keyExpirationTime,it.keyNeverExpires=!1),await it.sign(Ae,rt,Ke.date),{userIDPacket:$e,signaturePacket:it}}))).then((Ae=>{Ae.forEach((({userIDPacket:Ae,signaturePacket:Se})=>{Fe.push(Ae),Fe.push(Se)}))})),await Promise.all(Se.map((async function(Se,Fe){const $e=Ke.subkeys[Fe];return{secretSubkeyPacket:Se,subkeySignaturePacket:await Ju(Se,Ae,$e,qe)}}))).then((Ae=>{Ae.forEach((({secretSubkeyPacket:Ae,subkeySignaturePacket:Se})=>{Fe.push(Ae),Fe.push(Se)}))}));const $e={key:Ae};return Fe.push(await rh($e,null,Ae,{signatureType:ur.signature.keyRevocation,reasonForRevocationFlag:ur.reasonForRevocation.noReason,reasonForRevocationString:""},Ke.date,void 0,void 0,void 0,qe)),Ke.passphrase&&Ae.clearPrivateParams(),await Promise.all(Se.map((async function(Ae,Se){Ke.subkeys[Se].passphrase&&Ae.clearPrivateParams()}))),new gh(Fe)}const ly=ir.constructAllowedPackets([lu,ku,Uu,Du,Fu,Iu,Tu,gu,bu]),dy=ir.constructAllowedPackets([Tu]),yy=ir.constructAllowedPackets([bu]);class Eh{constructor(Ae){this.packets=Ae||new vu}getEncryptionKeyIDs(){const Ae=[];return this.packets.filterByTag(ur.packet.publicKeyEncryptedSessionKey).forEach((function(Se){Ae.push(Se.publicKeyID)})),Ae}getSigningKeyIDs(){const Ae=this.unwrapCompressed(),Se=Ae.packets.filterByTag(ur.packet.onePassSignature);if(Se.length>0)return Se.map((Ae=>Ae.issuerKeyID));return Ae.packets.filterByTag(ur.packet.signature).map((Ae=>Ae.issuerKeyID))}async decrypt(Ae,Se,Ke,qe=new Date,Fe=hr){const $e=Ke||await this.decryptSessionKeys(Ae,Se,qe,Fe),rt=this.packets.filterByTag(ur.packet.symmetricallyEncryptedData,ur.packet.symEncryptedIntegrityProtectedData,ur.packet.aeadEncryptedData);if(0===rt.length)throw Error("No encrypted data found");const it=rt[0];let nt=null;const st=Promise.all($e.map((async({algorithm:Ae,data:Se})=>{if(!ir.isUint8Array(Se)||!ir.isString(Ae))throw Error("Invalid session key for decryption.");try{const Ke=ur.write(ur.symmetric,Ae);await it.decrypt(Ke,Se,Fe)}catch(Ae){ir.printDebugError(Ae),nt=Ae}})));if(ne(it.encrypted),it.encrypted=null,await st,!it.packets||!it.packets.length)throw nt||Error("Decryption failed.");const ut=new Eh(it.packets);return it.packets=new vu,ut}async decryptSessionKeys(Ae,Se,Ke=new Date,qe=hr){let Fe,$e=[];if(Se){const Ae=this.packets.filterByTag(ur.packet.symEncryptedSessionKey);if(0===Ae.length)throw Error("No symmetrically encrypted session key packet found.");await Promise.all(Se.map((async function(Se,Ke){let Fe;Fe=Ke?await vu.fromBinary(Ae.write(),dy,qe):Ae,await Promise.all(Fe.map((async function(Ae){try{await Ae.decrypt(Se),$e.push(Ae)}catch(Ae){ir.printDebugError(Ae)}})))})))}else{if(!Ae)throw Error("No key or password specified.");{const Se=this.packets.filterByTag(ur.packet.publicKeyEncryptedSessionKey);if(0===Se.length)throw Error("No public key encrypted session key packet found.");await Promise.all(Se.map((async function(Se){await Promise.all(Ae.map((async function(Ae){let rt=[ur.symmetric.aes256,ur.symmetric.aes128,ur.symmetric.tripledes,ur.symmetric.cast5];try{const Se=await Ae.getPrimaryUser(Ke,void 0,qe);Se.selfCertification.preferredSymmetricAlgorithms&&(rt=rt.concat(Se.selfCertification.preferredSymmetricAlgorithms))}catch(Ae){}const it=(await Ae.getDecryptionKeys(Se.publicKeyID,null,void 0,qe)).map((Ae=>Ae.keyPacket));await Promise.all(it.map((async function(Ae){if(!Ae||Ae.isDummy())return;if(!Ae.isDecrypted())throw Error("Decryption key is not decrypted.");if(qe.constantTimePKCS1Decryption&&(Se.publicKeyAlgorithm===ur.publicKey.rsaEncrypt||Se.publicKeyAlgorithm===ur.publicKey.rsaEncryptSign||Se.publicKeyAlgorithm===ur.publicKey.rsaSign||Se.publicKeyAlgorithm===ur.publicKey.elgamal)){const Ke=Se.write();await Promise.all(Array.from(qe.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map((async Se=>{const qe=new Iu;qe.read(Ke);const rt={sessionKeyAlgorithm:Se,sessionKey:qa.generateSessionKey(Se)};try{await qe.decrypt(Ae,rt),$e.push(qe)}catch(Ae){ir.printDebugError(Ae),Fe=Ae}})))}else try{if(await Se.decrypt(Ae),!rt.includes(ur.write(ur.symmetric,Se.sessionKeyAlgorithm)))throw Error("A non-preferred symmetric algorithm was used.");$e.push(Se)}catch(Ae){ir.printDebugError(Ae),Fe=Ae}})))}))),ne(Se.encrypted),Se.encrypted=null})))}}if($e.length>0){if($e.length>1){const Ae=new Set;$e=$e.filter((Se=>{const Ke=Se.sessionKeyAlgorithm+ir.uint8ArrayToString(Se.sessionKey);return!Ae.has(Ke)&&(Ae.add(Ke),!0)}))}return $e.map((Ae=>({data:Ae.sessionKey,algorithm:ur.read(ur.symmetric,Ae.sessionKeyAlgorithm)})))}throw Fe||Error("Session key decryption failed.")}getLiteralData(){const Ae=this.unwrapCompressed().packets.findPacket(ur.packet.literalData);return Ae&&Ae.getBytes()||null}getFilename(){const Ae=this.unwrapCompressed().packets.findPacket(ur.packet.literalData);return Ae&&Ae.getFilename()||null}getText(){const Ae=this.unwrapCompressed().packets.findPacket(ur.packet.literalData);return Ae?Ae.getText():null}static async generateSessionKey(Ae=[],Se=new Date,Ke=[],qe=hr){const Fe=await th("symmetric",Ae,Se,Ke,qe),$e=ur.read(ur.symmetric,Fe),rt=qe.aeadProtect&&await async function(Ae,Se=new Date,Ke=[],qe=hr){let Fe=!0;return await Promise.all(Ae.map((async function(Ae,$e){const rt=await Ae.getPrimaryUser(Se,Ke[$e],qe);rt.selfCertification.features&&rt.selfCertification.features[0]&ur.features.aead||(Fe=!1)}))),Fe}(Ae,Se,Ke,qe)?ur.read(ur.aead,await th("aead",Ae,Se,Ke,qe)):void 0;return{data:qa.generateSessionKey(Fe),algorithm:$e,aeadAlgorithm:rt}}async encrypt(Ae,Se,Ke,qe=!1,Fe=[],$e=new Date,rt=[],it=hr){if(Ke){if(!ir.isUint8Array(Ke.data)||!ir.isString(Ke.algorithm))throw Error("Invalid session key for encryption.")}else if(Ae&&Ae.length)Ke=await Eh.generateSessionKey(Ae,$e,rt,it);else{if(!Se||!Se.length)throw Error("No keys, passwords, or session key provided.");Ke=await Eh.generateSessionKey(void 0,void 0,void 0,it)}const{data:nt,algorithm:st,aeadAlgorithm:ut}=Ke,ht=await Eh.encryptSessionKey(nt,st,ut,Ae,Se,qe,Fe,$e,rt,it);let ft;ut?(ft=new Uu,ft.aeadAlgorithm=ur.write(ur.aead,ut)):ft=new Du,ft.packets=this.packets;const yt=ur.write(ur.symmetric,st);return await ft.encrypt(yt,nt,it),ht.packets.push(ft),ft.packets=new vu,ht}static async encryptSessionKey(Ae,Se,Ke,qe,Fe,$e=!1,rt=[],it=new Date,nt=[],st=hr){const ut=new vu,ht=ur.write(ur.symmetric,Se),ft=Ke&&ur.write(ur.aead,Ke);if(qe){const Se=await Promise.all(qe.map((async function(Se,Ke){const qe=await Se.getEncryptionKey(rt[Ke],it,nt,st),Fe=new Iu;return Fe.publicKeyID=$e?Ce.wildcard():qe.getKeyID(),Fe.publicKeyAlgorithm=qe.keyPacket.algorithm,Fe.sessionKey=Ae,Fe.sessionKeyAlgorithm=ht,await Fe.encrypt(qe.keyPacket),delete Fe.sessionKey,Fe})));ut.push(...Se)}if(Fe){const t=async function(Ae,Se){try{return await Ae.decrypt(Se),1}catch(Ae){return 0}},r=(Ae,Se)=>Ae+Se,i=async function(Ae,Se,Ke,qe){const $e=new Tu(st);if($e.sessionKey=Ae,$e.sessionKeyAlgorithm=Se,Ke&&($e.aeadAlgorithm=Ke),await $e.encrypt(qe,st),st.passwordCollisionCheck){if(1!==(await Promise.all(Fe.map((Ae=>t($e,Ae))))).reduce(r))return i(Ae,Se,qe)}return delete $e.sessionKey,$e},Se=await Promise.all(Fe.map((Se=>i(Ae,ht,ft,Se))));ut.push(...Se)}return new Eh(ut)}async sign(Ae=[],Se=null,Ke=[],qe=new Date,Fe=[],$e=[],rt=hr){const it=new vu,nt=this.packets.findPacket(ur.packet.literalData);if(!nt)throw Error("No literal data packet to sign.");let st,ut;const ht=null===nt.text?ur.signature.binary:ur.signature.text;if(Se)for(ut=Se.packets.filterByTag(ur.packet.signature),st=ut.length-1;st>=0;st--){const Se=ut[st],Ke=new gu;Ke.signatureType=Se.signatureType,Ke.hashAlgorithm=Se.hashAlgorithm,Ke.publicKeyAlgorithm=Se.publicKeyAlgorithm,Ke.issuerKeyID=Se.issuerKeyID,Ae.length||0!==st||(Ke.flags=1),it.push(Ke)}return await Promise.all(Array.from(Ae).reverse().map((async function(Se,$e){if(!Se.isPrivate())throw Error("Need private key for signing");const it=Ke[Ae.length-1-$e],nt=await Se.getSigningKey(it,qe,Fe,rt),st=new gu;return st.signatureType=ht,st.hashAlgorithm=await eh(Se,nt.keyPacket,qe,Fe,rt),st.publicKeyAlgorithm=nt.keyPacket.algorithm,st.issuerKeyID=nt.getKeyID(),$e===Ae.length-1&&(st.flags=1),st}))).then((Ae=>{Ae.forEach((Ae=>it.push(Ae)))})),it.push(nt),it.push(...await Ph(nt,Ae,Se,Ke,qe,Fe,$e,!1,rt)),new Eh(it)}compress(Ae,Se=hr){if(Ae===ur.compression.uncompressed)return this;const Ke=new ku(Se);Ke.algorithm=Ae,Ke.packets=this.packets;const qe=new vu;return qe.push(Ke),new Eh(qe)}async signDetached(Ae=[],Se=null,Ke=[],qe=new Date,Fe=[],$e=[],rt=hr){const it=this.packets.findPacket(ur.packet.literalData);if(!it)throw Error("No literal data packet to sign.");return new $u(await Ph(it,Ae,Se,Ke,qe,Fe,$e,!0,rt))}async verify(Ae,Se=new Date,Ke=hr){const qe=this.unwrapCompressed(),Fe=qe.packets.filterByTag(ur.packet.literalData);if(1!==Fe.length)throw Error("Can only verify message with one literal data packet.");_(qe.packets.stream)&&qe.packets.push(...await ie(qe.packets.stream,(Ae=>Ae||[])));const $e=qe.packets.filterByTag(ur.packet.onePassSignature).reverse(),rt=qe.packets.filterByTag(ur.packet.signature);return $e.length&&!rt.length&&ir.isStream(qe.packets.stream)&&!_(qe.packets.stream)?(await Promise.all($e.map((async Ae=>{Ae.correspondingSig=new Promise(((Se,Ke)=>{Ae.correspondingSigResolve=Se,Ae.correspondingSigReject=Ke})),Ae.signatureData=ae((async()=>(await Ae.correspondingSig).signatureData)),Ae.hashed=ie(await Ae.hash(Ae.signatureType,Fe[0],void 0,!1)),Ae.hashed.catch((()=>{}))}))),qe.packets.stream=X(qe.packets.stream,(async(Ae,Se)=>{const Ke=H(Ae),qe=G(Se);try{for(let Ae=0;Ae<$e.length;Ae++){const{value:Se}=await Ke.read();$e[Ae].correspondingSigResolve(Se)}await Ke.readToEnd(),await qe.ready,await qe.close()}catch(Ae){$e.forEach((Se=>{Se.correspondingSigReject(Ae)})),await qe.abort(Ae)}})),xh($e,Fe,Ae,Se,!1,Ke)):xh(rt,Fe,Ae,Se,!1,Ke)}verifyDetached(Ae,Se,Ke=new Date,qe=hr){const Fe=this.unwrapCompressed().packets.filterByTag(ur.packet.literalData);if(1!==Fe.length)throw Error("Can only verify message with one literal data packet.");return xh(Ae.packets,Fe,Se,Ke,!0,qe)}unwrapCompressed(){const Ae=this.packets.filterByTag(ur.packet.compressedData);return Ae.length?new Eh(Ae[0].packets):this}async appendSignature(Ae,Se=hr){await this.packets.read(ir.isUint8Array(Ae)?Ae:(await xe(Ae)).data,yy,Se)}write(){return this.packets.write()}armor(Ae=hr){return Me(ur.armor.message,this.write(),null,null,null,Ae)}}async function Ph(Ae,Se,Ke=null,qe=[],Fe=new Date,$e=[],rt=[],it=!1,nt=hr){const st=new vu,ut=null===Ae.text?ur.signature.binary:ur.signature.text;if(await Promise.all(Se.map((async(Se,Ke)=>{const st=$e[Ke];if(!Se.isPrivate())throw Error("Need private key for signing");const ht=await Se.getSigningKey(qe[Ke],Fe,st,nt);return rh(Ae,Se,ht.keyPacket,{signatureType:ut},Fe,st,rt,it,nt)}))).then((Ae=>{st.push(...Ae)})),Ke){const Ae=Ke.packets.filterByTag(ur.packet.signature);st.push(...Ae)}return st}async function xh(Ae,Se,Ke,qe=new Date,Fe=!1,$e=hr){return Promise.all(Ae.filter((function(Ae){return["text","binary"].includes(ur.read(ur.signature,Ae.signatureType))})).map((async function(Ae){return async function(Ae,Se,Ke,qe=new Date,Fe=!1,$e=hr){let rt,it;for(const Se of Ke){const Ke=Se.getKeys(Ae.issuerKeyID);if(Ke.length>0){rt=Se,it=Ke[0];break}}const nt=Ae instanceof gu?Ae.correspondingSig:Ae,st={keyID:Ae.issuerKeyID,verified:(async()=>{if(!it)throw Error("Could not find signing key with key ID "+Ae.issuerKeyID.toHex());await Ae.verify(it.keyPacket,Ae.signatureType,Se[0],qe,Fe,$e);const Ke=await nt;if(it.getCreationTime()>Ke.created)throw Error("Key is newer than the signature");try{await rt.getSigningKey(it.getKeyID(),Ke.created,void 0,$e)}catch(Ae){if(!$e.allowInsecureVerificationWithReformattedKeys||!Ae.message.match(/Signature creation time is in the future/))throw Ae;await rt.getSigningKey(it.getKeyID(),qe,void 0,$e)}return!0})(),signature:(async()=>{const Ae=await nt,Se=new vu;return Ae&&Se.push(Ae),new $u(Se)})()};return st.signature.catch((()=>{})),st.verified.catch((()=>{})),st}(Ae,Se,Ke,qe,Fe,$e)})))}const my=ir.constructAllowedPackets([bu]);class Ch{constructor(Ae,Se){if(this.text=ir.removeTrailingSpaces(Ae).replace(/\r?\n/g,"\r\n"),Se&&!(Se instanceof $u))throw Error("Invalid signature input");this.signature=Se||new $u(new vu)}getSigningKeyIDs(){const Ae=[];return this.signature.packets.forEach((function(Se){Ae.push(Se.issuerKeyID)})),Ae}async sign(Ae,Se=null,Ke=[],qe=new Date,Fe=[],$e=[],rt=hr){const it=new lu;it.setText(this.text);const nt=new $u(await Ph(it,Ae,Se,Ke,qe,Fe,$e,!0,rt));return new Ch(this.text,nt)}verify(Ae,Se=new Date,Ke=hr){const qe=this.signature.packets,Fe=new lu;return Fe.setText(this.text),xh(qe,[Fe],Ae,Se,!0,Ke)}getText(){return this.text.replace(/\r\n/g,"\n")}armor(Ae=hr){let Se=this.signature.packets.map((function(Ae){return ur.read(ur.hash,Ae.hashAlgorithm).toUpperCase()}));Se=Se.filter((function(Ae,Se,Ke){return Ke.indexOf(Ae)===Se}));const Ke={hash:Se.join(),text:this.text,data:this.signature.packets.write()};return Me(ur.armor.signed,Ke,void 0,void 0,void 0,Ae)}}function Kh(Ae){if(!(Ae instanceof Eh))throw Error("Parameter [message] needs to be of type Message")}function Dh(Ae){if(!(Ae instanceof Ch||Ae instanceof Eh))throw Error("Parameter [message] needs to be of type Message or CleartextMessage")}function Rh(Ae){if("armored"!==Ae&&"binary"!==Ae&&"object"!==Ae)throw Error("Unsupported format "+Ae)}const gy=Object.keys(hr).length;function Ih(Ae){const Se=Object.keys(Ae);if(Se.length!==gy)for(const Ae of Se)if(void 0===hr[Ae])throw Error("Unknown config property: "+Ae)}function Bh(Ae){return Ae&&!ir.isArray(Ae)&&(Ae=[Ae]),Ae}async function Th(Ae,Se,Ke="utf8"){const qe=ir.isStream(Ae);return"array"===qe?ie(Ae):"node"===Se?(Ae=Wt(Ae),"binary"!==Ke&&Ae.setEncoding(Ke),Ae):"web"===Se&&"ponyfill"===qe?Vt(Ae):Ae}function zh(Ae,Se){Ae.data=X(Se.packets.stream,(async(Se,Ke)=>{await V(Ae.data,Ke,{preventClose:!0});const qe=G(Ke);try{await ie(Se,(Ae=>Ae)),await qe.close()}catch(Ae){await qe.abort(Ae)}}))}function qh(Ae,Se,Ke){switch(Se){case"object":return Ae;case"armored":return Ae.armor(Ke);case"binary":return Ae.write();default:throw Error("Unsupported format "+Se)}}const vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:Ae=>`Symbol(${Ae})`;function Oh(){}const wy="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function jh(Ae){return"object"==typeof Ae&&null!==Ae||"function"==typeof Ae}const _y=Oh,ky=Promise,Ay=Promise.prototype.then,Ey=Promise.resolve.bind(ky),My=Promise.reject.bind(ky);function $h(Ae){return new ky(Ae)}function Zh(Ae){return Ey(Ae)}function Yh(Ae){return My(Ae)}function Xh(Ae,Se,Ke){return Ay.call(Ae,Se,Ke)}function Qh(Ae,Se,Ke){Xh(Xh(Ae,Se,Ke),void 0,_y)}function Jh(Ae,Se){Qh(Ae,Se)}function ed(Ae,Se){Qh(Ae,void 0,Se)}function td(Ae,Se,Ke){return Xh(Ae,Se,Ke)}function rd(Ae){Xh(Ae,void 0,_y)}const Py=(()=>{const Ae=wy&&wy.queueMicrotask;if("function"==typeof Ae)return Ae;const Se=Zh(void 0);return Ae=>Xh(Se,Ae)})();function nd(Ae,Se,Ke){if("function"!=typeof Ae)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(Ae,Se,Ke)}function ad(Ae,Se,Ke){try{return Zh(nd(Ae,Se,Ke))}catch(Ae){return Yh(Ae)}}class sd{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(Ae){const Se=this._back;let Ke=Se;16383===Se._elements.length&&(Ke={_elements:[],_next:void 0}),Se._elements.push(Ae),Ke!==Se&&(this._back=Ke,Se._next=Ke),++this._size}shift(){const Ae=this._front;let Se=Ae;const Ke=this._cursor;let qe=Ke+1;const Fe=Ae._elements,$e=Fe[Ke];return 16384===qe&&(Se=Ae._next,qe=0),--this._size,this._cursor=qe,Ae!==Se&&(this._front=Se),Fe[Ke]=void 0,$e}forEach(Ae){let Se=this._cursor,Ke=this._front,qe=Ke._elements;for(;!(Se===qe.length&&void 0===Ke._next||Se===qe.length&&(Ke=Ke._next,qe=Ke._elements,Se=0,0===qe.length));)Ae(qe[Se]),++Se}peek(){const Ae=this._front,Se=this._cursor;return Ae._elements[Se]}}function od(Ae,Se){Ae._ownerReadableStream=Se,Se._reader=Ae,"readable"===Se._state?dd(Ae):"closed"===Se._state?function(Ae){dd(Ae),pd(Ae)}(Ae):fd(Ae,Se._storedError)}function cd(Ae,Se){return Gl(Ae._ownerReadableStream,Se)}function ud(Ae){"readable"===Ae._ownerReadableStream._state?ld(Ae,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(Ae,Se){fd(Ae,Se)}(Ae,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),Ae._ownerReadableStream._reader=void 0,Ae._ownerReadableStream=void 0}function hd(Ae){return new TypeError("Cannot "+Ae+" a stream using a released reader")}function dd(Ae){Ae._closedPromise=$h(((Se,Ke)=>{Ae._closedPromise_resolve=Se,Ae._closedPromise_reject=Ke}))}function fd(Ae,Se){dd(Ae),ld(Ae,Se)}function ld(Ae,Se){void 0!==Ae._closedPromise_reject&&(rd(Ae._closedPromise),Ae._closedPromise_reject(Se),Ae._closedPromise_resolve=void 0,Ae._closedPromise_reject=void 0)}function pd(Ae){void 0!==Ae._closedPromise_resolve&&(Ae._closedPromise_resolve(void 0),Ae._closedPromise_resolve=void 0,Ae._closedPromise_reject=void 0)}const Cy=vy("[[AbortSteps]]"),Dy=vy("[[ErrorSteps]]"),Ty=vy("[[CancelSteps]]"),Ky=vy("[[PullSteps]]"),Iy=Number.isFinite||function(Ae){return"number"==typeof Ae&&isFinite(Ae)},Uy=Math.trunc||function(Ae){return Ae<0?Math.ceil(Ae):Math.floor(Ae)};function _d(Ae,Se){if(void 0!==Ae&&("object"!=typeof(Ke=Ae)&&"function"!=typeof Ke))throw new TypeError(Se+" is not an object.");var Ke}function kd(Ae,Se){if("function"!=typeof Ae)throw new TypeError(Se+" is not a function.")}function Ad(Ae,Se){if(!function(Ae){return"object"==typeof Ae&&null!==Ae||"function"==typeof Ae}(Ae))throw new TypeError(Se+" is not an object.")}function Sd(Ae,Se,Ke){if(void 0===Ae)throw new TypeError(`Parameter ${Se} is required in '${Ke}'.`)}function Ed(Ae,Se,Ke){if(void 0===Ae)throw new TypeError(`${Se} is required in '${Ke}'.`)}function Pd(Ae){return Number(Ae)}function xd(Ae){return 0===Ae?0:Ae}function Md(Ae,Se){const Ke=Number.MAX_SAFE_INTEGER;let qe=Number(Ae);if(qe=xd(qe),!Iy(qe))throw new TypeError(Se+" is not a finite number");if(qe=function(Ae){return xd(Uy(Ae))}(qe),qe<0||qe>Ke)throw new TypeError(`${Se} is outside the accepted range of 0 to ${Ke}, inclusive`);return Iy(qe)&&0!==qe?qe:0}function Cd(Ae,Se){if(!Wl(Ae))throw new TypeError(Se+" is not a ReadableStream.")}function Kd(Ae){return new Bd(Ae)}function Dd(Ae,Se){Ae._reader._readRequests.push(Se)}function Rd(Ae,Se,Ke){const qe=Ae._reader._readRequests.shift();Ke?qe._closeSteps():qe._chunkSteps(Se)}function Ud(Ae){return Ae._reader._readRequests.length}function Id(Ae){const Se=Ae._reader;return void 0!==Se&&!!Td(Se)}class Bd{constructor(Ae){if(Sd(Ae,1,"ReadableStreamDefaultReader"),Cd(Ae,"First parameter"),Hl(Ae))throw new TypeError("This stream has already been locked for exclusive reading by another reader");od(this,Ae),this._readRequests=new sd}get closed(){return Td(this)?this._closedPromise:Yh(qd("closed"))}cancel(Ae=undefined){return Td(this)?void 0===this._ownerReadableStream?Yh(hd("cancel")):cd(this,Ae):Yh(qd("cancel"))}read(){if(!Td(this))return Yh(qd("read"));if(void 0===this._ownerReadableStream)return Yh(hd("read from"));let Ae,Se;const Ke=$h(((Ke,qe)=>{Ae=Ke,Se=qe}));return zd(this,{_chunkSteps:Se=>Ae({value:Se,done:!1}),_closeSteps:()=>Ae({value:void 0,done:!0}),_errorSteps:Ae=>Se(Ae)}),Ke}releaseLock(){if(!Td(this))throw qd("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");ud(this)}}}function Td(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_readRequests")}function zd(Ae,Se){const Ke=Ae._ownerReadableStream;Ke._disturbed=!0,"closed"===Ke._state?Se._closeSteps():"errored"===Ke._state?Se._errorSteps(Ke._storedError):Ke._readableStreamController[Ky](Se)}function qd(Ae){return new TypeError(`ReadableStreamDefaultReader.prototype.${Ae} can only be used on a ReadableStreamDefaultReader`)}let zy;Object.defineProperties(Bd.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Bd.prototype,vy.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof vy.asyncIterator&&(zy={[vy.asyncIterator](){return this}},Object.defineProperty(zy,vy.asyncIterator,{enumerable:!1}));class Od{constructor(Ae,Se){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=Ae,this._preventCancel=Se}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?td(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(Ae){const t=()=>this._returnSteps(Ae);return this._ongoingPromise?td(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const Ae=this._reader;if(void 0===Ae._ownerReadableStream)return Yh(hd("iterate"));let Se,Ke;const qe=$h(((Ae,qe)=>{Se=Ae,Ke=qe}));return zd(Ae,{_chunkSteps:Ae=>{this._ongoingPromise=void 0,Py((()=>Se({value:Ae,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ud(Ae),Se({value:void 0,done:!0})},_errorSteps:Se=>{this._ongoingPromise=void 0,this._isFinished=!0,ud(Ae),Ke(Se)}}),qe}_returnSteps(Ae){if(this._isFinished)return Promise.resolve({value:Ae,done:!0});this._isFinished=!0;const Se=this._reader;if(void 0===Se._ownerReadableStream)return Yh(hd("finish iterating"));if(!this._preventCancel){const Ke=cd(Se,Ae);return ud(Se),td(Ke,(()=>({value:Ae,done:!0})))}return ud(Se),Zh({value:Ae,done:!0})}}const Fy={next(){return jd(this)?this._asyncIteratorImpl.next():Yh(Ld("next"))},return(Ae){return jd(this)?this._asyncIteratorImpl.return(Ae):Yh(Ld("return"))}};function jd(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_asyncIteratorImpl")}function Ld(Ae){return new TypeError(`ReadableStreamAsyncIterator.${Ae} can only be used on a ReadableSteamAsyncIterator`)}void 0!==zy&&Object.setPrototypeOf(Fy,zy);const Wy=Number.isNaN||function(Ae){return Ae!=Ae};function Hd(Ae){return!!function(Ae){if("number"!=typeof Ae)return!1;if(Wy(Ae))return!1;if(Ae<0)return!1;return!0}(Ae)&&Ae!==1/0}function Gd(Ae){const Se=Ae._queue.shift();return Ae._queueTotalSize-=Se.size,Ae._queueTotalSize<0&&(Ae._queueTotalSize=0),Se.value}function Vd(Ae,Se,Ke){if(!Hd(Ke=Number(Ke)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");Ae._queue.push({value:Se,size:Ke}),Ae._queueTotalSize+=Ke}function $d(Ae){Ae._queue=new sd,Ae._queueTotalSize=0}function Zd(Ae){return Ae.slice()}class Yd{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Jd(this))throw bf("view");return this._view}respond(Ae){if(!Jd(this))throw bf("respond");if(Sd(Ae,1,"respond"),Ae=Md(Ae,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(Ae,Se){if(Se=Number(Se),!Hd(Se))throw new RangeError("bytesWritten must be a finite");hf(Ae,Se)}(this._associatedReadableByteStreamController,Ae)}respondWithNewView(Ae){if(!Jd(this))throw bf("respondWithNewView");if(Sd(Ae,1,"respondWithNewView"),!ArrayBuffer.isView(Ae))throw new TypeError("You can only respond with array buffer views");if(0===Ae.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===Ae.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(Ae,Se){const Ke=Ae._pendingPullIntos.peek();if(Ke.byteOffset+Ke.bytesFilled!==Se.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(Ke.byteLength!==Se.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");Ke.buffer=Se.buffer,hf(Ae,Se.byteLength)}(this._associatedReadableByteStreamController,Ae)}}Object.defineProperties(Yd.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Yd.prototype,vy.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Xd{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Qd(this))throw mf("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const Ae=this._pendingPullIntos.peek(),Se=new Uint8Array(Ae.buffer,Ae.byteOffset+Ae.bytesFilled,Ae.byteLength-Ae.bytesFilled),Ke=Object.create(Yd.prototype);!function(Ae,Se,Ke){Ae._associatedReadableByteStreamController=Se,Ae._view=Ke}(Ke,this,Se),this._byobRequest=Ke}return this._byobRequest}get desiredSize(){if(!Qd(this))throw mf("desiredSize");return pf(this)}close(){if(!Qd(this))throw mf("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const Ae=this._controlledReadableByteStream._state;if("readable"!==Ae)throw new TypeError(`The stream (in ${Ae} state) is not in the readable state and cannot be closed`);!function(Ae){const Se=Ae._controlledReadableByteStream;if(Ae._closeRequested||"readable"!==Se._state)return;if(Ae._queueTotalSize>0)return void(Ae._closeRequested=!0);if(Ae._pendingPullIntos.length>0){if(Ae._pendingPullIntos.peek().bytesFilled>0){const Se=new TypeError("Insufficient bytes to fill elements in the given buffer");throw lf(Ae,Se),Se}}ff(Ae),Vl(Se)}(this)}enqueue(Ae){if(!Qd(this))throw mf("enqueue");if(Sd(Ae,1,"enqueue"),!ArrayBuffer.isView(Ae))throw new TypeError("chunk must be an array buffer view");if(0===Ae.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===Ae.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 Se=this._controlledReadableByteStream._state;if("readable"!==Se)throw new TypeError(`The stream (in ${Se} state) is not in the readable state and cannot be enqueued to`);!function(Ae,Se){const Ke=Ae._controlledReadableByteStream;if(Ae._closeRequested||"readable"!==Ke._state)return;const qe=Se.buffer,Fe=Se.byteOffset,$e=Se.byteLength,rt=qe;if(Id(Ke))if(0===Ud(Ke))nf(Ae,rt,Fe,$e);else{Rd(Ke,new Uint8Array(rt,Fe,$e),!1)}else vf(Ke)?(nf(Ae,rt,Fe,$e),uf(Ae)):nf(Ae,rt,Fe,$e);ef(Ae)}(this,Ae)}error(Ae=undefined){if(!Qd(this))throw mf("error");lf(this,Ae)}[Ty](Ae){if(this._pendingPullIntos.length>0){this._pendingPullIntos.peek().bytesFilled=0}$d(this);const Se=this._cancelAlgorithm(Ae);return ff(this),Se}[Ky](Ae){const Se=this._controlledReadableByteStream;if(this._queueTotalSize>0){const Se=this._queue.shift();this._queueTotalSize-=Se.byteLength,of(this);const Ke=new Uint8Array(Se.buffer,Se.byteOffset,Se.byteLength);return void Ae._chunkSteps(Ke)}const Ke=this._autoAllocateChunkSize;if(void 0!==Ke){let qe;try{qe=new ArrayBuffer(Ke)}catch(Se){return void Ae._errorSteps(Se)}const Fe={buffer:qe,byteOffset:0,byteLength:Ke,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Fe)}Dd(Se,Ae),ef(this)}}function Qd(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_controlledReadableByteStream")}function Jd(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_associatedReadableByteStreamController")}function ef(Ae){const Se=function(Ae){const Se=Ae._controlledReadableByteStream;if("readable"!==Se._state)return!1;if(Ae._closeRequested)return!1;if(!Ae._started)return!1;if(Id(Se)&&Ud(Se)>0)return!0;if(vf(Se)&&wf(Se)>0)return!0;const Ke=pf(Ae);if(Ke>0)return!0;return!1}(Ae);if(!Se)return;if(Ae._pulling)return void(Ae._pullAgain=!0);Ae._pulling=!0;Qh(Ae._pullAlgorithm(),(()=>{Ae._pulling=!1,Ae._pullAgain&&(Ae._pullAgain=!1,ef(Ae))}),(Se=>{lf(Ae,Se)}))}function tf(Ae,Se){let Ke=!1;"closed"===Ae._state&&(Ke=!0);const qe=rf(Se);"default"===Se.readerType?Rd(Ae,qe,Ke):function(Ae,Se,Ke){const qe=Ae._reader,Fe=qe._readIntoRequests.shift();Ke?Fe._closeSteps(Se):Fe._chunkSteps(Se)}(Ae,qe,Ke)}function rf(Ae){const Se=Ae.bytesFilled,Ke=Ae.elementSize;return new Ae.viewConstructor(Ae.buffer,Ae.byteOffset,Se/Ke)}function nf(Ae,Se,Ke,qe){Ae._queue.push({buffer:Se,byteOffset:Ke,byteLength:qe}),Ae._queueTotalSize+=qe}function af(Ae,Se){const Ke=Se.elementSize,qe=Se.bytesFilled-Se.bytesFilled%Ke,Fe=Math.min(Ae._queueTotalSize,Se.byteLength-Se.bytesFilled),$e=Se.bytesFilled+Fe,rt=$e-$e%Ke;let it=Fe,nt=!1;rt>qe&&(it=rt-Se.bytesFilled,nt=!0);const st=Ae._queue;for(;it>0;){const Ke=st.peek(),qe=Math.min(it,Ke.byteLength),Fe=Se.byteOffset+Se.bytesFilled;ut=Se.buffer,ht=Fe,ft=Ke.buffer,yt=Ke.byteOffset,mt=qe,new Uint8Array(ut).set(new Uint8Array(ft,yt,mt),ht),Ke.byteLength===qe?st.shift():(Ke.byteOffset+=qe,Ke.byteLength-=qe),Ae._queueTotalSize-=qe,sf(Ae,qe,Se),it-=qe}var ut,ht,ft,yt,mt;return nt}function sf(Ae,Se,Ke){cf(Ae),Ke.bytesFilled+=Se}function of(Ae){0===Ae._queueTotalSize&&Ae._closeRequested?(ff(Ae),Vl(Ae._controlledReadableByteStream)):ef(Ae)}function cf(Ae){null!==Ae._byobRequest&&(Ae._byobRequest._associatedReadableByteStreamController=void 0,Ae._byobRequest._view=null,Ae._byobRequest=null)}function uf(Ae){for(;Ae._pendingPullIntos.length>0;){if(0===Ae._queueTotalSize)return;const Se=Ae._pendingPullIntos.peek();af(Ae,Se)&&(df(Ae),tf(Ae._controlledReadableByteStream,Se))}}function hf(Ae,Se){const Ke=Ae._pendingPullIntos.peek();if("closed"===Ae._controlledReadableByteStream._state){if(0!==Se)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(Ae,Se){Se.buffer=Se.buffer;const Ke=Ae._controlledReadableByteStream;if(vf(Ke))for(;wf(Ke)>0;)tf(Ke,df(Ae))}(Ae,Ke)}else!function(Ae,Se,Ke){if(Ke.bytesFilled+Se>Ke.byteLength)throw new RangeError("bytesWritten out of range");if(sf(Ae,Se,Ke),Ke.bytesFilled<Ke.elementSize)return;df(Ae);const qe=Ke.bytesFilled%Ke.elementSize;if(qe>0){const Se=Ke.byteOffset+Ke.bytesFilled,Fe=Ke.buffer.slice(Se-qe,Se);nf(Ae,Fe,0,Fe.byteLength)}Ke.buffer=Ke.buffer,Ke.bytesFilled-=qe,tf(Ae._controlledReadableByteStream,Ke),uf(Ae)}(Ae,Se,Ke);ef(Ae)}function df(Ae){const Se=Ae._pendingPullIntos.shift();return cf(Ae),Se}function ff(Ae){Ae._pullAlgorithm=void 0,Ae._cancelAlgorithm=void 0}function lf(Ae,Se){const Ke=Ae._controlledReadableByteStream;"readable"===Ke._state&&(!function(Ae){cf(Ae),Ae._pendingPullIntos=new sd}(Ae),$d(Ae),ff(Ae),$l(Ke,Se))}function pf(Ae){const Se=Ae._controlledReadableByteStream._state;return"errored"===Se?null:"closed"===Se?0:Ae._strategyHWM-Ae._queueTotalSize}function yf(Ae,Se,Ke){const qe=Object.create(Xd.prototype);let n=()=>{},a=()=>Zh(void 0),s=()=>Zh(void 0);void 0!==Se.start&&(n=()=>Se.start(qe)),void 0!==Se.pull&&(a=()=>Se.pull(qe)),void 0!==Se.cancel&&(s=Ae=>Se.cancel(Ae));const Fe=Se.autoAllocateChunkSize;if(0===Fe)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(Ae,Se,Ke,qe,Fe,$e,rt){Se._controlledReadableByteStream=Ae,Se._pullAgain=!1,Se._pulling=!1,Se._byobRequest=null,Se._queue=Se._queueTotalSize=void 0,$d(Se),Se._closeRequested=!1,Se._started=!1,Se._strategyHWM=$e,Se._pullAlgorithm=qe,Se._cancelAlgorithm=Fe,Se._autoAllocateChunkSize=rt,Se._pendingPullIntos=new sd,Ae._readableStreamController=Se,Qh(Zh(Ke()),(()=>{Se._started=!0,ef(Se)}),(Ae=>{lf(Se,Ae)}))}(Ae,qe,n,a,s,Ke,Fe)}function bf(Ae){return new TypeError(`ReadableStreamBYOBRequest.prototype.${Ae} can only be used on a ReadableStreamBYOBRequest`)}function mf(Ae){return new TypeError(`ReadableByteStreamController.prototype.${Ae} can only be used on a ReadableByteStreamController`)}function gf(Ae,Se){Ae._reader._readIntoRequests.push(Se)}function wf(Ae){return Ae._reader._readIntoRequests.length}function vf(Ae){const Se=Ae._reader;return void 0!==Se&&!!kf(Se)}Object.defineProperties(Xd.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Xd.prototype,vy.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class _f{constructor(Ae){if(Sd(Ae,1,"ReadableStreamBYOBReader"),Cd(Ae,"First parameter"),Hl(Ae))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Qd(Ae._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");od(this,Ae),this._readIntoRequests=new sd}get closed(){return kf(this)?this._closedPromise:Yh(Af("closed"))}cancel(Ae=undefined){return kf(this)?void 0===this._ownerReadableStream?Yh(hd("cancel")):cd(this,Ae):Yh(Af("cancel"))}read(Ae){if(!kf(this))return Yh(Af("read"));if(!ArrayBuffer.isView(Ae))return Yh(new TypeError("view must be an array buffer view"));if(0===Ae.byteLength)return Yh(new TypeError("view must have non-zero byteLength"));if(0===Ae.buffer.byteLength)return Yh(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return Yh(hd("read from"));let Se,Ke;const qe=$h(((Ae,qe)=>{Se=Ae,Ke=qe}));return function(Ae,Se,Ke){const qe=Ae._ownerReadableStream;qe._disturbed=!0,"errored"===qe._state?Ke._errorSteps(qe._storedError):function(Ae,Se,Ke){const qe=Ae._controlledReadableByteStream;let Fe=1;Se.constructor!==DataView&&(Fe=Se.constructor.BYTES_PER_ELEMENT);const $e=Se.constructor,rt={buffer:Se.buffer,byteOffset:Se.byteOffset,byteLength:Se.byteLength,bytesFilled:0,elementSize:Fe,viewConstructor:$e,readerType:"byob"};if(Ae._pendingPullIntos.length>0)return Ae._pendingPullIntos.push(rt),void gf(qe,Ke);if("closed"!==qe._state){if(Ae._queueTotalSize>0){if(af(Ae,rt)){const Se=rf(rt);return of(Ae),void Ke._chunkSteps(Se)}if(Ae._closeRequested){const Se=new TypeError("Insufficient bytes to fill elements in the given buffer");return lf(Ae,Se),void Ke._errorSteps(Se)}}Ae._pendingPullIntos.push(rt),gf(qe,Ke),ef(Ae)}else{const Ae=new $e(rt.buffer,rt.byteOffset,0);Ke._closeSteps(Ae)}}(qe._readableStreamController,Se,Ke)}(this,Ae,{_chunkSteps:Ae=>Se({value:Ae,done:!1}),_closeSteps:Ae=>Se({value:Ae,done:!0}),_errorSteps:Ae=>Ke(Ae)}),qe}releaseLock(){if(!kf(this))throw Af("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");ud(this)}}}function kf(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_readIntoRequests")}function Af(Ae){return new TypeError(`ReadableStreamBYOBReader.prototype.${Ae} can only be used on a ReadableStreamBYOBReader`)}function Sf(Ae,Se){const{highWaterMark:Ke}=Ae;if(void 0===Ke)return Se;if(Wy(Ke)||Ke<0)throw new RangeError("Invalid highWaterMark");return Ke}function Ef(Ae){const{size:Se}=Ae;return Se||(()=>1)}function Pf(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.highWaterMark,qe=null==Ae?void 0:Ae.size;return{highWaterMark:void 0===Ke?void 0:Pd(Ke),size:void 0===qe?void 0:xf(qe,Se+" has member 'size' that")}}function xf(Ae,Se){return kd(Ae,Se),Se=>Pd(Ae(Se))}function Mf(Ae,Se,Ke){return kd(Ae,Ke),Ke=>ad(Ae,Se,[Ke])}function Cf(Ae,Se,Ke){return kd(Ae,Ke),()=>ad(Ae,Se,[])}function Kf(Ae,Se,Ke){return kd(Ae,Ke),Ke=>nd(Ae,Se,[Ke])}function Df(Ae,Se,Ke){return kd(Ae,Ke),(Ke,qe)=>ad(Ae,Se,[Ke,qe])}function Rf(Ae,Se){if(!Tf(Ae))throw new TypeError(Se+" is not a WritableStream.")}Object.defineProperties(_f.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(_f.prototype,vy.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class Uf{constructor(Ae={},Se={}){void 0===Ae?Ae=null:Ad(Ae,"First parameter");const Ke=Pf(Se,"Second parameter"),qe=function(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.abort,qe=null==Ae?void 0:Ae.close,Fe=null==Ae?void 0:Ae.start,$e=null==Ae?void 0:Ae.type,rt=null==Ae?void 0:Ae.write;return{abort:void 0===Ke?void 0:Mf(Ke,Ae,Se+" has member 'abort' that"),close:void 0===qe?void 0:Cf(qe,Ae,Se+" has member 'close' that"),start:void 0===Fe?void 0:Kf(Fe,Ae,Se+" has member 'start' that"),write:void 0===rt?void 0:Df(rt,Ae,Se+" has member 'write' that"),type:$e}}(Ae,"First parameter");Bf(this);if(void 0!==qe.type)throw new RangeError("Invalid type is specified");const Fe=Ef(Ke);!function(Ae,Se,Ke,qe){const Fe=Object.create(el.prototype);let a=()=>{},s=()=>Zh(void 0),o=()=>Zh(void 0),c=()=>Zh(void 0);void 0!==Se.start&&(a=()=>Se.start(Fe));void 0!==Se.write&&(s=Ae=>Se.write(Ae,Fe));void 0!==Se.close&&(o=()=>Se.close());void 0!==Se.abort&&(c=Ae=>Se.abort(Ae));tl(Ae,Fe,a,s,o,c,Ke,qe)}(this,qe,Sf(Ke,1),Fe)}get locked(){if(!Tf(this))throw cl("locked");return zf(this)}abort(Ae=undefined){return Tf(this)?zf(this)?Yh(new TypeError("Cannot abort a stream that already has a writer")):qf(this,Ae):Yh(cl("abort"))}close(){return Tf(this)?zf(this)?Yh(new TypeError("Cannot close a stream that already has a writer")):Lf(this)?Yh(new TypeError("Cannot close an already-closing stream")):Ff(this):Yh(cl("close"))}getWriter(){if(!Tf(this))throw cl("getWriter");return If(this)}}function If(Ae){return new Gf(Ae)}function Bf(Ae){Ae._state="writable",Ae._storedError=void 0,Ae._writer=void 0,Ae._writableStreamController=void 0,Ae._writeRequests=new sd,Ae._inFlightWriteRequest=void 0,Ae._closeRequest=void 0,Ae._inFlightCloseRequest=void 0,Ae._pendingAbortRequest=void 0,Ae._backpressure=!1}function Tf(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_writableStreamController")}function zf(Ae){return void 0!==Ae._writer}function qf(Ae,Se){const Ke=Ae._state;if("closed"===Ke||"errored"===Ke)return Zh(void 0);if(void 0!==Ae._pendingAbortRequest)return Ae._pendingAbortRequest._promise;let qe=!1;"erroring"===Ke&&(qe=!0,Se=void 0);const Fe=$h(((Ke,Fe)=>{Ae._pendingAbortRequest={_promise:void 0,_resolve:Ke,_reject:Fe,_reason:Se,_wasAlreadyErroring:qe}}));return Ae._pendingAbortRequest._promise=Fe,qe||Nf(Ae,Se),Fe}function Ff(Ae){const Se=Ae._state;if("closed"===Se||"errored"===Se)return Yh(new TypeError(`The stream (in ${Se} state) is not in the writable state and cannot be closed`));const Ke=$h(((Se,Ke)=>{const qe={_resolve:Se,_reject:Ke};Ae._closeRequest=qe})),qe=Ae._writer;var Fe;return void 0!==qe&&Ae._backpressure&&"writable"===Se&&wl(qe),Vd(Fe=Ae._writableStreamController,Gy,0),nl(Fe),Ke}function Of(Ae,Se){"writable"!==Ae._state?jf(Ae):Nf(Ae,Se)}function Nf(Ae,Se){const Ke=Ae._writableStreamController;Ae._state="erroring",Ae._storedError=Se;const qe=Ae._writer;void 0!==qe&&Yf(qe,Se),!function(Ae){if(void 0===Ae._inFlightWriteRequest&&void 0===Ae._inFlightCloseRequest)return!1;return!0}(Ae)&&Ke._started&&jf(Ae)}function jf(Ae){Ae._state="errored",Ae._writableStreamController[Dy]();const Se=Ae._storedError;if(Ae._writeRequests.forEach((Ae=>{Ae._reject(Se)})),Ae._writeRequests=new sd,void 0===Ae._pendingAbortRequest)return void Wf(Ae);const Ke=Ae._pendingAbortRequest;if(Ae._pendingAbortRequest=void 0,Ke._wasAlreadyErroring)return Ke._reject(Se),void Wf(Ae);Qh(Ae._writableStreamController[Cy](Ke._reason),(()=>{Ke._resolve(),Wf(Ae)}),(Se=>{Ke._reject(Se),Wf(Ae)}))}function Lf(Ae){return void 0!==Ae._closeRequest||void 0!==Ae._inFlightCloseRequest}function Wf(Ae){void 0!==Ae._closeRequest&&(Ae._closeRequest._reject(Ae._storedError),Ae._closeRequest=void 0);const Se=Ae._writer;void 0!==Se&&ll(Se,Ae._storedError)}function Hf(Ae,Se){const Ke=Ae._writer;void 0!==Ke&&Se!==Ae._backpressure&&(Se?function(Ae){yl(Ae)}(Ke):wl(Ke)),Ae._backpressure=Se}Object.defineProperties(Uf.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Uf.prototype,vy.toStringTag,{value:"WritableStream",configurable:!0});class Gf{constructor(Ae){if(Sd(Ae,1,"WritableStreamDefaultWriter"),Rf(Ae,"First parameter"),zf(Ae))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=Ae,Ae._writer=this;const Se=Ae._state;if("writable"===Se)!Lf(Ae)&&Ae._backpressure?yl(this):ml(this),dl(this);else if("erroring"===Se)bl(this,Ae._storedError),dl(this);else if("closed"===Se)ml(this),dl(Ke=this),pl(Ke);else{const Se=Ae._storedError;bl(this,Se),fl(this,Se)}var Ke}get closed(){return Vf(this)?this._closedPromise:Yh(ul("closed"))}get desiredSize(){if(!Vf(this))throw ul("desiredSize");if(void 0===this._ownerWritableStream)throw hl("desiredSize");return function(Ae){const Se=Ae._ownerWritableStream,Ke=Se._state;if("errored"===Ke||"erroring"===Ke)return null;if("closed"===Ke)return 0;return il(Se._writableStreamController)}(this)}get ready(){return Vf(this)?this._readyPromise:Yh(ul("ready"))}abort(Ae=undefined){return Vf(this)?void 0===this._ownerWritableStream?Yh(hl("abort")):function(Ae,Se){const Ke=Ae._ownerWritableStream;return qf(Ke,Se)}(this,Ae):Yh(ul("abort"))}close(){if(!Vf(this))return Yh(ul("close"));const Ae=this._ownerWritableStream;return void 0===Ae?Yh(hl("close")):Lf(Ae)?Yh(new TypeError("Cannot close an already-closing stream")):$f(this)}releaseLock(){if(!Vf(this))throw ul("releaseLock");void 0!==this._ownerWritableStream&&Xf(this)}write(Ae=undefined){return Vf(this)?void 0===this._ownerWritableStream?Yh(hl("write to")):Qf(this,Ae):Yh(ul("write"))}}function Vf(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_ownerWritableStream")}function $f(Ae){return Ff(Ae._ownerWritableStream)}function Zf(Ae,Se){"pending"===Ae._closedPromiseState?ll(Ae,Se):function(Ae,Se){fl(Ae,Se)}(Ae,Se)}function Yf(Ae,Se){"pending"===Ae._readyPromiseState?gl(Ae,Se):function(Ae,Se){bl(Ae,Se)}(Ae,Se)}function Xf(Ae){const Se=Ae._ownerWritableStream,Ke=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Yf(Ae,Ke),Zf(Ae,Ke),Se._writer=void 0,Ae._ownerWritableStream=void 0}function Qf(Ae,Se){const Ke=Ae._ownerWritableStream,qe=Ke._writableStreamController,Fe=function(Ae,Se){try{return Ae._strategySizeAlgorithm(Se)}catch(Se){return al(Ae,Se),1}}(qe,Se);if(Ke!==Ae._ownerWritableStream)return Yh(hl("write to"));const $e=Ke._state;if("errored"===$e)return Yh(Ke._storedError);if(Lf(Ke)||"closed"===$e)return Yh(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===$e)return Yh(Ke._storedError);const rt=function(Ae){return $h(((Se,Ke)=>{const qe={_resolve:Se,_reject:Ke};Ae._writeRequests.push(qe)}))}(Ke);return function(Ae,Se,Ke){try{Vd(Ae,Se,Ke)}catch(Se){return void al(Ae,Se)}const qe=Ae._controlledWritableStream;if(!Lf(qe)&&"writable"===qe._state){Hf(qe,sl(Ae))}nl(Ae)}(qe,Se,Fe),rt}Object.defineProperties(Gf.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Gf.prototype,vy.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Gy={};class el{constructor(){throw new TypeError("Illegal constructor")}error(Ae=undefined){if(!function(Ae){if(!jh(Ae))return!1;if(!Object.prototype.hasOwnProperty.call(Ae,"_controlledWritableStream"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&ol(this,Ae)}[Cy](Ae){const Se=this._abortAlgorithm(Ae);return rl(this),Se}[Dy](){$d(this)}}function tl(Ae,Se,Ke,qe,Fe,$e,rt,it){Se._controlledWritableStream=Ae,Ae._writableStreamController=Se,Se._queue=void 0,Se._queueTotalSize=void 0,$d(Se),Se._started=!1,Se._strategySizeAlgorithm=it,Se._strategyHWM=rt,Se._writeAlgorithm=qe,Se._closeAlgorithm=Fe,Se._abortAlgorithm=$e;const nt=sl(Se);Hf(Ae,nt);Qh(Zh(Ke()),(()=>{Se._started=!0,nl(Se)}),(Ke=>{Se._started=!0,Of(Ae,Ke)}))}function rl(Ae){Ae._writeAlgorithm=void 0,Ae._closeAlgorithm=void 0,Ae._abortAlgorithm=void 0,Ae._strategySizeAlgorithm=void 0}function il(Ae){return Ae._strategyHWM-Ae._queueTotalSize}function nl(Ae){const Se=Ae._controlledWritableStream;if(!Ae._started)return;if(void 0!==Se._inFlightWriteRequest)return;if("erroring"===Se._state)return void jf(Se);if(0===Ae._queue.length)return;const Ke=Ae._queue.peek().value;Ke===Gy?function(Ae){const Se=Ae._controlledWritableStream;(function(Ae){Ae._inFlightCloseRequest=Ae._closeRequest,Ae._closeRequest=void 0})(Se),Gd(Ae);const Ke=Ae._closeAlgorithm();rl(Ae),Qh(Ke,(()=>{!function(Ae){Ae._inFlightCloseRequest._resolve(void 0),Ae._inFlightCloseRequest=void 0,"erroring"===Ae._state&&(Ae._storedError=void 0,void 0!==Ae._pendingAbortRequest&&(Ae._pendingAbortRequest._resolve(),Ae._pendingAbortRequest=void 0)),Ae._state="closed";const Se=Ae._writer;void 0!==Se&&pl(Se)}(Se)}),(Ae=>{!function(Ae,Se){Ae._inFlightCloseRequest._reject(Se),Ae._inFlightCloseRequest=void 0,void 0!==Ae._pendingAbortRequest&&(Ae._pendingAbortRequest._reject(Se),Ae._pendingAbortRequest=void 0),Of(Ae,Se)}(Se,Ae)}))}(Ae):function(Ae,Se){const Ke=Ae._controlledWritableStream;!function(Ae){Ae._inFlightWriteRequest=Ae._writeRequests.shift()}(Ke);const qe=Ae._writeAlgorithm(Se);Qh(qe,(()=>{!function(Ae){Ae._inFlightWriteRequest._resolve(void 0),Ae._inFlightWriteRequest=void 0}(Ke);const Se=Ke._state;if(Gd(Ae),!Lf(Ke)&&"writable"===Se){const Se=sl(Ae);Hf(Ke,Se)}nl(Ae)}),(Se=>{"writable"===Ke._state&&rl(Ae),function(Ae,Se){Ae._inFlightWriteRequest._reject(Se),Ae._inFlightWriteRequest=void 0,Of(Ae,Se)}(Ke,Se)}))}(Ae,Ke)}function al(Ae,Se){"writable"===Ae._controlledWritableStream._state&&ol(Ae,Se)}function sl(Ae){return il(Ae)<=0}function ol(Ae,Se){const Ke=Ae._controlledWritableStream;rl(Ae),Nf(Ke,Se)}function cl(Ae){return new TypeError(`WritableStream.prototype.${Ae} can only be used on a WritableStream`)}function ul(Ae){return new TypeError(`WritableStreamDefaultWriter.prototype.${Ae} can only be used on a WritableStreamDefaultWriter`)}function hl(Ae){return new TypeError("Cannot "+Ae+" a stream using a released writer")}function dl(Ae){Ae._closedPromise=$h(((Se,Ke)=>{Ae._closedPromise_resolve=Se,Ae._closedPromise_reject=Ke,Ae._closedPromiseState="pending"}))}function fl(Ae,Se){dl(Ae),ll(Ae,Se)}function ll(Ae,Se){void 0!==Ae._closedPromise_reject&&(rd(Ae._closedPromise),Ae._closedPromise_reject(Se),Ae._closedPromise_resolve=void 0,Ae._closedPromise_reject=void 0,Ae._closedPromiseState="rejected")}function pl(Ae){void 0!==Ae._closedPromise_resolve&&(Ae._closedPromise_resolve(void 0),Ae._closedPromise_resolve=void 0,Ae._closedPromise_reject=void 0,Ae._closedPromiseState="resolved")}function yl(Ae){Ae._readyPromise=$h(((Se,Ke)=>{Ae._readyPromise_resolve=Se,Ae._readyPromise_reject=Ke})),Ae._readyPromiseState="pending"}function bl(Ae,Se){yl(Ae),gl(Ae,Se)}function ml(Ae){yl(Ae),wl(Ae)}function gl(Ae,Se){void 0!==Ae._readyPromise_reject&&(rd(Ae._readyPromise),Ae._readyPromise_reject(Se),Ae._readyPromise_resolve=void 0,Ae._readyPromise_reject=void 0,Ae._readyPromiseState="rejected")}function wl(Ae){void 0!==Ae._readyPromise_resolve&&(Ae._readyPromise_resolve(void 0),Ae._readyPromise_resolve=void 0,Ae._readyPromise_reject=void 0,Ae._readyPromiseState="fulfilled")}Object.defineProperties(el.prototype,{error:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(el.prototype,vy.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const $y="undefined"!=typeof DOMException?DOMException:void 0;const Vy=function(Ae){if("function"!=typeof Ae&&"object"!=typeof Ae)return!1;try{return new Ae,!0}catch(Ae){return!1}}($y)?$y:function(){const e=function(Ae,Se){this.message=Ae||"",this.name=Se||"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 kl(Ae,Se,Ke,qe,Fe,$e){const rt=Kd(Ae),it=If(Se);Ae._disturbed=!0;let nt=!1,st=Zh(void 0);return $h(((ut,ht)=>{let ft;if(void 0!==$e){if(ft=()=>{const Ke=new Vy("Aborted","AbortError"),$e=[];qe||$e.push((()=>"writable"===Se._state?qf(Se,Ke):Zh(void 0))),Fe||$e.push((()=>"readable"===Ae._state?Gl(Ae,Ke):Zh(void 0))),y((()=>Promise.all($e.map((Ae=>Ae())))),!0,Ke)},$e.aborted)return void ft();$e.addEventListener("abort",ft)}if(p(Ae,rt._closedPromise,(Ae=>{qe?b(!0,Ae):y((()=>qf(Se,Ae)),!0,Ae)})),p(Se,it._closedPromise,(Se=>{Fe?b(!0,Se):y((()=>Gl(Ae,Se)),!0,Se)})),function(Ae,Se,Ke){"closed"===Ae._state?Ke():Jh(Se,Ke)}(Ae,rt._closedPromise,(()=>{Ke?b():y((()=>function(Ae){const Se=Ae._ownerWritableStream,Ke=Se._state;return Lf(Se)||"closed"===Ke?Zh(void 0):"errored"===Ke?Yh(Se._storedError):$f(Ae)}(it)))})),Lf(Se)||"closed"===Se._state){const Se=new TypeError("the destination writable stream closed before all data could be piped to it");Fe?b(!0,Se):y((()=>Gl(Ae,Se)),!0,Se)}function l(){const Ae=st;return Xh(st,(()=>Ae!==st?l():void 0))}function p(Ae,Se,Ke){"errored"===Ae._state?Ke(Ae._storedError):ed(Se,Ke)}function y(Ae,Ke,qe){function n(){Qh(Ae(),(()=>m(Ke,qe)),(Ae=>m(!0,Ae)))}nt||(nt=!0,"writable"!==Se._state||Lf(Se)?n():Jh(l(),n))}function b(Ae,Ke){nt||(nt=!0,"writable"!==Se._state||Lf(Se)?m(Ae,Ke):Jh(l(),(()=>m(Ae,Ke))))}function m(Ae,Se){Xf(it),ud(rt),void 0!==$e&&$e.removeEventListener("abort",ft),Ae?ht(Se):ut(void 0)}rd($h(((Ae,Se)=>{!function r(Ke){Ke?Ae():Xh(nt?Zh(!0):Xh(it._readyPromise,(()=>$h(((Ae,Se)=>{zd(rt,{_chunkSteps:Se=>{st=Xh(Qf(it,Se),void 0,Oh),Ae(!1)},_closeSteps:()=>Ae(!0),_errorSteps:Se})})))),r,Se)}(!1)})))}))}class Al{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Sl(this))throw Il("desiredSize");return Dl(this)}close(){if(!Sl(this))throw Il("close");if(!Rl(this))throw new TypeError("The stream is not in a state that permits close");Ml(this)}enqueue(Ae=undefined){if(!Sl(this))throw Il("enqueue");if(!Rl(this))throw new TypeError("The stream is not in a state that permits enqueue");return Cl(this,Ae)}error(Ae=undefined){if(!Sl(this))throw Il("error");Kl(this,Ae)}[Ty](Ae){$d(this);const Se=this._cancelAlgorithm(Ae);return xl(this),Se}[Ky](Ae){const Se=this._controlledReadableStream;if(this._queue.length>0){const Ke=Gd(this);this._closeRequested&&0===this._queue.length?(xl(this),Vl(Se)):El(this),Ae._chunkSteps(Ke)}else Dd(Se,Ae),El(this)}}function Sl(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_controlledReadableStream")}function El(Ae){if(!Pl(Ae))return;if(Ae._pulling)return void(Ae._pullAgain=!0);Ae._pulling=!0;Qh(Ae._pullAlgorithm(),(()=>{Ae._pulling=!1,Ae._pullAgain&&(Ae._pullAgain=!1,El(Ae))}),(Se=>{Kl(Ae,Se)}))}function Pl(Ae){const Se=Ae._controlledReadableStream;if(!Rl(Ae))return!1;if(!Ae._started)return!1;if(Hl(Se)&&Ud(Se)>0)return!0;return Dl(Ae)>0}function xl(Ae){Ae._pullAlgorithm=void 0,Ae._cancelAlgorithm=void 0,Ae._strategySizeAlgorithm=void 0}function Ml(Ae){if(!Rl(Ae))return;const Se=Ae._controlledReadableStream;Ae._closeRequested=!0,0===Ae._queue.length&&(xl(Ae),Vl(Se))}function Cl(Ae,Se){if(!Rl(Ae))return;const Ke=Ae._controlledReadableStream;if(Hl(Ke)&&Ud(Ke)>0)Rd(Ke,Se,!1);else{let Ke;try{Ke=Ae._strategySizeAlgorithm(Se)}catch(Se){throw Kl(Ae,Se),Se}try{Vd(Ae,Se,Ke)}catch(Se){throw Kl(Ae,Se),Se}}El(Ae)}function Kl(Ae,Se){const Ke=Ae._controlledReadableStream;"readable"===Ke._state&&($d(Ae),xl(Ae),$l(Ke,Se))}function Dl(Ae){const Se=Ae._controlledReadableStream._state;return"errored"===Se?null:"closed"===Se?0:Ae._strategyHWM-Ae._queueTotalSize}function Rl(Ae){const Se=Ae._controlledReadableStream._state;return!Ae._closeRequested&&"readable"===Se}function Ul(Ae,Se,Ke,qe,Fe,$e,rt){Se._controlledReadableStream=Ae,Se._queue=void 0,Se._queueTotalSize=void 0,$d(Se),Se._started=!1,Se._closeRequested=!1,Se._pullAgain=!1,Se._pulling=!1,Se._strategySizeAlgorithm=rt,Se._strategyHWM=$e,Se._pullAlgorithm=qe,Se._cancelAlgorithm=Fe,Ae._readableStreamController=Se;Qh(Zh(Ke()),(()=>{Se._started=!0,El(Se)}),(Ae=>{Kl(Se,Ae)}))}function Il(Ae){return new TypeError(`ReadableStreamDefaultController.prototype.${Ae} can only be used on a ReadableStreamDefaultController`)}function Bl(Ae,Se,Ke){return kd(Ae,Ke),Ke=>ad(Ae,Se,[Ke])}function Tl(Ae,Se,Ke){return kd(Ae,Ke),Ke=>ad(Ae,Se,[Ke])}function zl(Ae,Se,Ke){return kd(Ae,Ke),Ke=>nd(Ae,Se,[Ke])}function ql(Ae,Se){if("bytes"!==(Ae=""+Ae))throw new TypeError(`${Se} '${Ae}' is not a valid enumeration value for ReadableStreamType`);return Ae}function Fl(Ae,Se){if("byob"!==(Ae=""+Ae))throw new TypeError(`${Se} '${Ae}' is not a valid enumeration value for ReadableStreamReaderMode`);return Ae}function Ol(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.preventAbort,qe=null==Ae?void 0:Ae.preventCancel,Fe=null==Ae?void 0:Ae.preventClose,$e=null==Ae?void 0:Ae.signal;return void 0!==$e&&function(Ae,Se){if(!function(Ae){if("object"!=typeof Ae||null===Ae)return!1;try{return"boolean"==typeof Ae.aborted}catch(Ae){return!1}}(Ae))throw new TypeError(Se+" is not an AbortSignal.")}($e,Se+" has member 'signal' that"),{preventAbort:!!Ke,preventCancel:!!qe,preventClose:!!Fe,signal:$e}}Object.defineProperties(Al.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Al.prototype,vy.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Nl{constructor(Ae={},Se={}){void 0===Ae?Ae=null:Ad(Ae,"First parameter");const Ke=Pf(Se,"Second parameter"),qe=function(Ae,Se){_d(Ae,Se);const Ke=Ae,qe=null==Ke?void 0:Ke.autoAllocateChunkSize,Fe=null==Ke?void 0:Ke.cancel,$e=null==Ke?void 0:Ke.pull,rt=null==Ke?void 0:Ke.start,it=null==Ke?void 0:Ke.type;return{autoAllocateChunkSize:void 0===qe?void 0:Md(qe,Se+" has member 'autoAllocateChunkSize' that"),cancel:void 0===Fe?void 0:Bl(Fe,Ke,Se+" has member 'cancel' that"),pull:void 0===$e?void 0:Tl($e,Ke,Se+" has member 'pull' that"),start:void 0===rt?void 0:zl(rt,Ke,Se+" has member 'start' that"),type:void 0===it?void 0:ql(it,Se+" has member 'type' that")}}(Ae,"First parameter");if(Ll(this),"bytes"===qe.type){if(void 0!==Ke.size)throw new RangeError("The strategy for a byte stream cannot have a size function");yf(this,qe,Sf(Ke,0))}else{const Ae=Ef(Ke);!function(Ae,Se,Ke,qe){const Fe=Object.create(Al.prototype);let a=()=>{},s=()=>Zh(void 0),o=()=>Zh(void 0);void 0!==Se.start&&(a=()=>Se.start(Fe)),void 0!==Se.pull&&(s=()=>Se.pull(Fe)),void 0!==Se.cancel&&(o=Ae=>Se.cancel(Ae)),Ul(Ae,Fe,a,s,o,Ke,qe)}(this,qe,Sf(Ke,1),Ae)}}get locked(){if(!Wl(this))throw Zl("locked");return Hl(this)}cancel(Ae=undefined){return Wl(this)?Hl(this)?Yh(new TypeError("Cannot cancel a stream that already has a reader")):Gl(this,Ae):Yh(Zl("cancel"))}getReader(Ae=undefined){if(!Wl(this))throw Zl("getReader");const Se=function(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.mode;return{mode:void 0===Ke?void 0:Fl(Ke,Se+" has member 'mode' that")}}(Ae,"First parameter");return void 0===Se.mode?Kd(this):function(Ae){return new _f(Ae)}(this)}pipeThrough(Ae,Se={}){if(!Wl(this))throw Zl("pipeThrough");Sd(Ae,1,"pipeThrough");const Ke=function(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.readable;Ed(Ke,"readable","ReadableWritablePair"),Cd(Ke,Se+" has member 'readable' that");const qe=null==Ae?void 0:Ae.writable;return Ed(qe,"writable","ReadableWritablePair"),Rf(qe,Se+" has member 'writable' that"),{readable:Ke,writable:qe}}(Ae,"First parameter"),qe=Ol(Se,"Second parameter");if(Hl(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(zf(Ke.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return rd(kl(this,Ke.writable,qe.preventClose,qe.preventAbort,qe.preventCancel,qe.signal)),Ke.readable}pipeTo(Ae,Se={}){if(!Wl(this))return Yh(Zl("pipeTo"));if(void 0===Ae)return Yh("Parameter 1 is required in 'pipeTo'.");if(!Tf(Ae))return Yh(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let Ke;try{Ke=Ol(Se,"Second parameter")}catch(Ae){return Yh(Ae)}return Hl(this)?Yh(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):zf(Ae)?Yh(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):kl(this,Ae,Ke.preventClose,Ke.preventAbort,Ke.preventCancel,Ke.signal)}tee(){if(!Wl(this))throw Zl("tee");const Ae=function(Ae,Se){const Ke=Kd(Ae);let qe,Fe,$e,rt,it,nt=!1,st=!1,ut=!1;const ht=$h((Ae=>{it=Ae}));function f(){return nt||(nt=!0,zd(Ke,{_chunkSteps:Ae=>{Py((()=>{nt=!1;const Se=Ae,Ke=Ae;st||Cl($e._readableStreamController,Se),ut||Cl(rt._readableStreamController,Ke)}))},_closeSteps:()=>{nt=!1,st||Ml($e._readableStreamController),ut||Ml(rt._readableStreamController),st&&ut||it(void 0)},_errorSteps:()=>{nt=!1}})),Zh(void 0)}function l(){}return $e=jl(l,f,(function(Se){if(st=!0,qe=Se,ut){const Se=Zd([qe,Fe]),Ke=Gl(Ae,Se);it(Ke)}return ht})),rt=jl(l,f,(function(Se){if(ut=!0,Fe=Se,st){const Se=Zd([qe,Fe]),Ke=Gl(Ae,Se);it(Ke)}return ht})),ed(Ke._closedPromise,(Ae=>{Kl($e._readableStreamController,Ae),Kl(rt._readableStreamController,Ae),st&&ut||it(void 0)})),[$e,rt]}(this);return Zd(Ae)}values(Ae=undefined){if(!Wl(this))throw Zl("values");return function(Ae,Se){const Ke=Kd(Ae),qe=new Od(Ke,Se),Fe=Object.create(Fy);return Fe._asyncIteratorImpl=qe,Fe}(this,function(Ae,Se){return _d(Ae,Se),{preventCancel:!!(null==Ae?void 0:Ae.preventCancel)}}(Ae,"First parameter").preventCancel)}}function jl(Ae,Se,Ke,qe=1,Fe=(()=>1)){const $e=Object.create(Nl.prototype);Ll($e);return Ul($e,Object.create(Al.prototype),Ae,Se,Ke,qe,Fe),$e}function Ll(Ae){Ae._state="readable",Ae._reader=void 0,Ae._storedError=void 0,Ae._disturbed=!1}function Wl(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_readableStreamController")}function Hl(Ae){return void 0!==Ae._reader}function Gl(Ae,Se){if(Ae._disturbed=!0,"closed"===Ae._state)return Zh(void 0);if("errored"===Ae._state)return Yh(Ae._storedError);Vl(Ae);return td(Ae._readableStreamController[Ty](Se),Oh)}function Vl(Ae){Ae._state="closed";const Se=Ae._reader;void 0!==Se&&(pd(Se),Td(Se)&&(Se._readRequests.forEach((Ae=>{Ae._closeSteps()})),Se._readRequests=new sd))}function $l(Ae,Se){Ae._state="errored",Ae._storedError=Se;const Ke=Ae._reader;void 0!==Ke&&(ld(Ke,Se),Td(Ke)?(Ke._readRequests.forEach((Ae=>{Ae._errorSteps(Se)})),Ke._readRequests=new sd):(Ke._readIntoRequests.forEach((Ae=>{Ae._errorSteps(Se)})),Ke._readIntoRequests=new sd))}function Zl(Ae){return new TypeError(`ReadableStream.prototype.${Ae} can only be used on a ReadableStream`)}function Yl(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.highWaterMark;return Ed(Ke,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Pd(Ke)}}Object.defineProperties(Nl.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Nl.prototype,vy.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof vy.asyncIterator&&Object.defineProperty(Nl.prototype,vy.asyncIterator,{value:Nl.prototype.values,writable:!0,configurable:!0});const Xl=function(Ae){return Ae.byteLength};class Ql{constructor(Ae){Sd(Ae,1,"ByteLengthQueuingStrategy"),Ae=Yl(Ae,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=Ae.highWaterMark}get highWaterMark(){if(!ep(this))throw Jl("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ep(this))throw Jl("size");return Xl}}function Jl(Ae){return new TypeError(`ByteLengthQueuingStrategy.prototype.${Ae} can only be used on a ByteLengthQueuingStrategy`)}function ep(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(Ql.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(Ql.prototype,vy.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const tp=function(){return 1};class rp{constructor(Ae){Sd(Ae,1,"CountQueuingStrategy"),Ae=Yl(Ae,"First parameter"),this._countQueuingStrategyHighWaterMark=Ae.highWaterMark}get highWaterMark(){if(!np(this))throw ip("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!np(this))throw ip("size");return tp}}function ip(Ae){return new TypeError(`CountQueuingStrategy.prototype.${Ae} can only be used on a CountQueuingStrategy`)}function np(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_countQueuingStrategyHighWaterMark")}function ap(Ae,Se,Ke){return kd(Ae,Ke),Ke=>ad(Ae,Se,[Ke])}function sp(Ae,Se,Ke){return kd(Ae,Ke),Ke=>nd(Ae,Se,[Ke])}function op(Ae,Se,Ke){return kd(Ae,Ke),(Ke,qe)=>ad(Ae,Se,[Ke,qe])}Object.defineProperties(rp.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(rp.prototype,vy.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class cp{constructor(Ae={},Se={},Ke={}){void 0===Ae&&(Ae=null);const qe=Pf(Se,"Second parameter"),Fe=Pf(Ke,"Third parameter"),$e=function(Ae,Se){_d(Ae,Se);const Ke=null==Ae?void 0:Ae.flush,qe=null==Ae?void 0:Ae.readableType,Fe=null==Ae?void 0:Ae.start,$e=null==Ae?void 0:Ae.transform,rt=null==Ae?void 0:Ae.writableType;return{flush:void 0===Ke?void 0:ap(Ke,Ae,Se+" has member 'flush' that"),readableType:qe,start:void 0===Fe?void 0:sp(Fe,Ae,Se+" has member 'start' that"),transform:void 0===$e?void 0:op($e,Ae,Se+" has member 'transform' that"),writableType:rt}}(Ae,"First parameter");if(void 0!==$e.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==$e.writableType)throw new RangeError("Invalid writableType specified");const rt=Sf(Fe,0),it=Ef(Fe),nt=Sf(qe,1),st=Ef(qe);let ut;!function(Ae,Se,Ke,qe,Fe,$e){function s(){return Se}function o(Se){return function(Ae,Se){const Ke=Ae._transformStreamController;if(Ae._backpressure){return td(Ae._backpressureChangePromise,(()=>{const qe=Ae._writable;if("erroring"===qe._state)throw qe._storedError;return mp(Ke,Se)}))}return mp(Ke,Se)}(Ae,Se)}function c(Se){return function(Ae,Se){return hp(Ae,Se),Zh(void 0)}(Ae,Se)}function u(){return function(Ae){const Se=Ae._readable,Ke=Ae._transformStreamController,qe=Ke._flushAlgorithm();return yp(Ke),td(qe,(()=>{if("errored"===Se._state)throw Se._storedError;Ml(Se._readableStreamController)}),(Ke=>{throw hp(Ae,Ke),Se._storedError}))}(Ae)}function h(){return function(Ae){return fp(Ae,!1),Ae._backpressureChangePromise}(Ae)}function d(Se){return dp(Ae,Se),Zh(void 0)}Ae._writable=function(Ae,Se,Ke,qe,Fe=1,$e=(()=>1)){const rt=Object.create(Uf.prototype);return Bf(rt),tl(rt,Object.create(el.prototype),Ae,Se,Ke,qe,Fe,$e),rt}(s,o,u,c,Ke,qe),Ae._readable=jl(s,h,d,Fe,$e),Ae._backpressure=void 0,Ae._backpressureChangePromise=void 0,Ae._backpressureChangePromise_resolve=void 0,fp(Ae,!0),Ae._transformStreamController=void 0}(this,$h((Ae=>{ut=Ae})),nt,st,rt,it),function(Ae,Se){const Ke=Object.create(lp.prototype);let i=Ae=>{try{return bp(Ke,Ae),Zh(void 0)}catch(Ae){return Yh(Ae)}},n=()=>Zh(void 0);void 0!==Se.transform&&(i=Ae=>Se.transform(Ae,Ke));void 0!==Se.flush&&(n=()=>Se.flush(Ke));!function(Ae,Se,Ke,qe){Se._controlledTransformStream=Ae,Ae._transformStreamController=Se,Se._transformAlgorithm=Ke,Se._flushAlgorithm=qe}(Ae,Ke,i,n)}(this,$e),void 0!==$e.start?ut($e.start(this._transformStreamController)):ut(void 0)}get readable(){if(!up(this))throw wp("readable");return this._readable}get writable(){if(!up(this))throw wp("writable");return this._writable}}function up(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_transformStreamController")}function hp(Ae,Se){Kl(Ae._readable._readableStreamController,Se),dp(Ae,Se)}function dp(Ae,Se){yp(Ae._transformStreamController),al(Ae._writable._writableStreamController,Se),Ae._backpressure&&fp(Ae,!1)}function fp(Ae,Se){void 0!==Ae._backpressureChangePromise&&Ae._backpressureChangePromise_resolve(),Ae._backpressureChangePromise=$h((Se=>{Ae._backpressureChangePromise_resolve=Se})),Ae._backpressure=Se}Object.defineProperties(cp.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(cp.prototype,vy.toStringTag,{value:"TransformStream",configurable:!0});class lp{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!pp(this))throw gp("desiredSize");return Dl(this._controlledTransformStream._readable._readableStreamController)}enqueue(Ae=undefined){if(!pp(this))throw gp("enqueue");bp(this,Ae)}error(Ae=undefined){if(!pp(this))throw gp("error");var Se;Se=Ae,hp(this._controlledTransformStream,Se)}terminate(){if(!pp(this))throw gp("terminate");!function(Ae){const Se=Ae._controlledTransformStream,Ke=Se._readable._readableStreamController;Ml(Ke);dp(Se,new TypeError("TransformStream terminated"))}(this)}}function pp(Ae){return!!jh(Ae)&&!!Object.prototype.hasOwnProperty.call(Ae,"_controlledTransformStream")}function yp(Ae){Ae._transformAlgorithm=void 0,Ae._flushAlgorithm=void 0}function bp(Ae,Se){const Ke=Ae._controlledTransformStream,qe=Ke._readable._readableStreamController;if(!Rl(qe))throw new TypeError("Readable side is not in a state that permits enqueue");try{Cl(qe,Se)}catch(Ae){throw dp(Ke,Ae),Ke._readable._storedError}const Fe=function(Ae){return!Pl(Ae)}(qe);Fe!==Ke._backpressure&&fp(Ke,!0)}function mp(Ae,Se){return td(Ae._transformAlgorithm(Se),void 0,(Se=>{throw hp(Ae._controlledTransformStream,Se),Se}))}function gp(Ae){return new TypeError(`TransformStreamDefaultController.prototype.${Ae} can only be used on a TransformStreamDefaultController`)}function wp(Ae){return new TypeError(`TransformStream.prototype.${Ae} can only be used on a TransformStream`)}Object.defineProperties(lp.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof vy.toStringTag&&Object.defineProperty(lp.prototype,vy.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var Zy=Object.freeze({__proto__:null,ByteLengthQueuingStrategy:Ql,CountQueuingStrategy:rp,ReadableByteStreamController:Xd,ReadableStream:Nl,ReadableStreamBYOBReader:_f,ReadableStreamBYOBRequest:Yd,ReadableStreamDefaultController:Al,ReadableStreamDefaultReader:Bd,TransformStream:cp,TransformStreamDefaultController:lp,WritableStream:Uf,WritableStreamDefaultController:el,WritableStreamDefaultWriter:Gf}),_p=function(Ae,Se){return _p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,Se){Ae.__proto__=Se}||function(Ae,Se){for(var Ke in Se)Object.prototype.hasOwnProperty.call(Se,Ke)&&(Ae[Ke]=Se[Ke])},_p(Ae,Se)
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */};function kp(Ae,Se){if("function"!=typeof Se&&null!==Se)throw new TypeError("Class extends value "+Se+" is not a constructor or null");function r(){this.constructor=Ae}_p(Ae,Se),Ae.prototype=null===Se?Object.create(Se):(r.prototype=Se.prototype,new r)}function Ap(Ae){if(!Ae)throw new TypeError("Assertion failed")}function Sp(){}function Ep(Ae){return"object"==typeof Ae&&null!==Ae||"function"==typeof Ae}function Pp(Ae){if("function"!=typeof Ae)return!1;var Se=!1;try{new Ae({start:function(){Se=!0}})}catch(Ae){}return Se}function xp(Ae){return!!Ep(Ae)&&"function"==typeof Ae.getReader}function Mp(Ae){return!!Ep(Ae)&&"function"==typeof Ae.getWriter}function Cp(Ae){return!!Ep(Ae)&&(!!xp(Ae.readable)&&!!Mp(Ae.writable))}function Kp(Ae){try{return Ae.getReader({mode:"byob"}).releaseLock(),!0}catch(Ae){return!1}}function Dp(Ae,Se){var Ke=(void 0===Se?{}:Se).type;return Ap(xp(Ae)),Ap(!1===Ae.locked),"bytes"===(Ke=Rp(Ke))?new Jy(Ae):new Xy(Ae)}function Rp(Ae){var Se=Ae+"";if("bytes"===Se)return Se;if(void 0===Ae)return Ae;throw new RangeError("Invalid type is specified")}var Qy=function(){function e(Ae){this._underlyingReader=void 0,this._readerMode=void 0,this._readableStreamController=void 0,this._pendingRead=void 0,this._underlyingStream=Ae,this._attachDefaultReader()}return e.prototype.start=function(Ae){this._readableStreamController=Ae},e.prototype.cancel=function(Ae){return Ap(void 0!==this._underlyingReader),this._underlyingReader.cancel(Ae)},e.prototype._attachDefaultReader=function(){if("default"!==this._readerMode){this._detachReader();var Ae=this._underlyingStream.getReader();this._readerMode="default",this._attachReader(Ae)}},e.prototype._attachReader=function(Ae){var Se=this;Ap(void 0===this._underlyingReader),this._underlyingReader=Ae;var Ke=this._underlyingReader.closed;Ke&&Ke.then((function(){return Se._finishPendingRead()})).then((function(){Ae===Se._underlyingReader&&Se._readableStreamController.close()}),(function(Ke){Ae===Se._underlyingReader&&Se._readableStreamController.error(Ke)})).catch(Sp)},e.prototype._detachReader=function(){void 0!==this._underlyingReader&&(this._underlyingReader.releaseLock(),this._underlyingReader=void 0,this._readerMode=void 0)},e.prototype._pullWithDefaultReader=function(){var Ae=this;this._attachDefaultReader();var Se=this._underlyingReader.read().then((function(Se){var Ke=Ae._readableStreamController;Se.done?Ae._tryClose():Ke.enqueue(Se.value)}));return this._setPendingRead(Se),Se},e.prototype._tryClose=function(){try{this._readableStreamController.close()}catch(Ae){}},e.prototype._setPendingRead=function(Ae){var Se,Ke=this,i=function(){Ke._pendingRead===Se&&(Ke._pendingRead=void 0)};this._pendingRead=Se=Ae.then(i,i)},e.prototype._finishPendingRead=function(){var Ae=this;if(this._pendingRead){var t=function(){return Ae._finishPendingRead()};return this._pendingRead.then(t,t)}},e}(),Xy=function(Ae){function t(){return null!==Ae&&Ae.apply(this,arguments)||this}return kp(t,Ae),t.prototype.pull=function(){return this._pullWithDefaultReader()},t}(Qy);function Bp(Ae){return new Uint8Array(Ae.buffer,Ae.byteOffset,Ae.byteLength)}var Jy=function(Ae){function t(Se){var Ke=this,qe=Kp(Se);return(Ke=Ae.call(this,Se)||this)._supportsByob=qe,Ke}return kp(t,Ae),Object.defineProperty(t.prototype,"type",{get:function(){return"bytes"},enumerable:!1,configurable:!0}),t.prototype._attachByobReader=function(){if("byob"!==this._readerMode){Ap(this._supportsByob),this._detachReader();var Ae=this._underlyingStream.getReader({mode:"byob"});this._readerMode="byob",this._attachReader(Ae)}},t.prototype.pull=function(){if(this._supportsByob){var Ae=this._readableStreamController.byobRequest;if(Ae)return this._pullWithByobRequest(Ae)}return this._pullWithDefaultReader()},t.prototype._pullWithByobRequest=function(Ae){var Se=this;this._attachByobReader();var Ke=new Uint8Array(Ae.view.byteLength),qe=this._underlyingReader.read(Ke).then((function(Ke){var qe,Fe,$e;Se._readableStreamController,Ke.done?(Se._tryClose(),Ae.respond(0)):(qe=Ke.value,Fe=Ae.view,$e=Bp(qe),Bp(Fe).set($e,0),Ae.respond(Ke.value.byteLength))}));return this._setPendingRead(qe),qe},t}(Qy);function zp(Ae){Ap(Mp(Ae)),Ap(!1===Ae.locked);var Se=Ae.getWriter();return new em(Se)}var em=function(){function e(Ae){var Se=this;this._writableStreamController=void 0,this._pendingWrite=void 0,this._state="writable",this._storedError=void 0,this._underlyingWriter=Ae,this._errorPromise=new Promise((function(Ae,Ke){Se._errorPromiseReject=Ke})),this._errorPromise.catch(Sp)}return e.prototype.start=function(Ae){var Se=this;this._writableStreamController=Ae,this._underlyingWriter.closed.then((function(){Se._state="closed"})).catch((function(Ae){return Se._finishErroring(Ae)}))},e.prototype.write=function(Ae){var Se=this,Ke=this._underlyingWriter;if(null===Ke.desiredSize)return Ke.ready;var qe=Ke.write(Ae);qe.catch((function(Ae){return Se._finishErroring(Ae)})),Ke.ready.catch((function(Ae){return Se._startErroring(Ae)}));var Fe=Promise.race([qe,this._errorPromise]);return this._setPendingWrite(Fe),Fe},e.prototype.close=function(){var Ae=this;return void 0===this._pendingWrite?this._underlyingWriter.close():this._finishPendingWrite().then((function(){return Ae.close()}))},e.prototype.abort=function(Ae){if("errored"!==this._state)return this._underlyingWriter.abort(Ae)},e.prototype._setPendingWrite=function(Ae){var Se,Ke=this,i=function(){Ke._pendingWrite===Se&&(Ke._pendingWrite=void 0)};this._pendingWrite=Se=Ae.then(i,i)},e.prototype._finishPendingWrite=function(){var Ae=this;if(void 0===this._pendingWrite)return Promise.resolve();var t=function(){return Ae._finishPendingWrite()};return this._pendingWrite.then(t,t)},e.prototype._startErroring=function(Ae){var Se=this;if("writable"===this._state){this._state="erroring",this._storedError=Ae;var r=function(){return Se._finishErroring(Ae)};void 0===this._pendingWrite?r():this._finishPendingWrite().then(r,r),this._writableStreamController.error(Ae)}},e.prototype._finishErroring=function(Ae){"writable"===this._state&&this._startErroring(Ae),"erroring"===this._state&&(this._state="errored",this._errorPromiseReject(this._storedError))},e}();function Fp(Ae){Ap(Cp(Ae));var Se=Ae.readable,Ke=Ae.writable;Ap(!1===Se.locked),Ap(!1===Ke.locked);var qe,Fe=Se.getReader();try{qe=Ke.getWriter()}catch(Ae){throw Fe.releaseLock(),Ae}return new tm(Fe,qe)}var tm=function(){function e(Ae,Se){var Ke=this;this._transformStreamController=void 0,this._onRead=function(Ae){if(!Ae.done)return Ke._transformStreamController.enqueue(Ae.value),Ke._reader.read().then(Ke._onRead)},this._onError=function(Ae){Ke._flushReject(Ae),Ke._transformStreamController.error(Ae),Ke._reader.cancel(Ae).catch(Sp),Ke._writer.abort(Ae).catch(Sp)},this._onTerminate=function(){Ke._flushResolve(),Ke._transformStreamController.terminate();var Ae=new TypeError("TransformStream terminated");Ke._writer.abort(Ae).catch(Sp)},this._reader=Ae,this._writer=Se,this._flushPromise=new Promise((function(Ae,Se){Ke._flushResolve=Ae,Ke._flushReject=Se}))}return e.prototype.start=function(Ae){this._transformStreamController=Ae,this._reader.read().then(this._onRead).then(this._onTerminate,this._onError);var Se=this._reader.closed;Se&&Se.then(this._onTerminate,this._onError)},e.prototype.transform=function(Ae){return this._writer.write(Ae)},e.prototype.flush=function(){var Ae=this;return this._writer.close().then((function(){return Ae._flushPromise}))},e}(),rm=Object.freeze({__proto__:null,createReadableStreamWrapper:function(Ae){Ap(function(Ae){return!!Pp(Ae)&&!!xp(new Ae)}(Ae));var Se=function(Ae){try{return new Ae({type:"bytes"}),!0}catch(Ae){return!1}}(Ae);return function(Ke,qe){var Fe=(void 0===qe?{}:qe).type;if("bytes"!==(Fe=Rp(Fe))||Se||(Fe=void 0),Ke.constructor===Ae&&("bytes"!==Fe||Kp(Ke)))return Ke;if("bytes"===Fe){var $e=Dp(Ke,{type:Fe});return new Ae($e)}$e=Dp(Ke);return new Ae($e)}},createTransformStreamWrapper:function(Ae){return Ap(function(Ae){return!!Pp(Ae)&&!!Cp(new Ae)}(Ae)),function(Se){if(Se.constructor===Ae)return Se;var Ke=Fp(Se);return new Ae(Ke)}},createWrappingReadableSource:Dp,createWrappingTransformer:Fp,createWrappingWritableSink:zp,createWritableStreamWrapper:function(Ae){return Ap(function(Ae){return!!Pp(Ae)&&!!Mp(new Ae)}(Ae)),function(Se){if(Se.constructor===Ae)return Se;var Ke=zp(Se);return new Ae(Ke)}}}),im=gt((function(Ae){!function(Ae,Se){function r(Ae,Se){if(!Ae)throw Error(Se||"Assertion failed")}function i(Ae,Se){Ae.super_=Se;var r=function(){};r.prototype=Se.prototype,Ae.prototype=new r,Ae.prototype.constructor=Ae}function n(Ae,Se,Ke){if(n.isBN(Ae))return Ae;this.negative=0,this.words=null,this.length=0,this.red=null,null!==Ae&&("le"!==Se&&"be"!==Se||(Ke=Se,Se=10),this._init(Ae||0,Se||10,Ke||"be"))}var Ke;"object"==typeof Ae?Ae.exports=n:Se.BN=n,n.BN=n,n.wordSize=26;try{Ke=ht.default.Buffer}catch(Ae){}function s(Ae,Se,Ke){for(var qe=0,Fe=Math.min(Ae.length,Ke),$e=Se;$e<Fe;$e++){var rt=Ae.charCodeAt($e)-48;qe<<=4,qe|=rt>=49&&rt<=54?rt-49+10:rt>=17&&rt<=22?rt-17+10:15&rt}return qe}function o(Ae,Se,Ke,qe){for(var Fe=0,$e=Math.min(Ae.length,Ke),rt=Se;rt<$e;rt++){var it=Ae.charCodeAt(rt)-48;Fe*=qe,Fe+=it>=49?it-49+10:it>=17?it-17+10:it}return Fe}n.isBN=function(Ae){return Ae instanceof n||null!==Ae&&"object"==typeof Ae&&Ae.constructor.wordSize===n.wordSize&&Array.isArray(Ae.words)},n.max=function(Ae,Se){return Ae.cmp(Se)>0?Ae:Se},n.min=function(Ae,Se){return Ae.cmp(Se)<0?Ae:Se},n.prototype._init=function(Ae,Se,Ke){if("number"==typeof Ae)return this._initNumber(Ae,Se,Ke);if("object"==typeof Ae)return this._initArray(Ae,Se,Ke);"hex"===Se&&(Se=16),r(Se===(0|Se)&&Se>=2&&Se<=36);var qe=0;"-"===(Ae=Ae.toString().replace(/\s+/g,""))[0]&&qe++,16===Se?this._parseHex(Ae,qe):this._parseBase(Ae,Se,qe),"-"===Ae[0]&&(this.negative=1),this.strip(),"le"===Ke&&this._initArray(this.toArray(),Se,Ke)},n.prototype._initNumber=function(Ae,Se,Ke){Ae<0&&(this.negative=1,Ae=-Ae),Ae<67108864?(this.words=[67108863&Ae],this.length=1):Ae<4503599627370496?(this.words=[67108863&Ae,Ae/67108864&67108863],this.length=2):(r(Ae<9007199254740992),this.words=[67108863&Ae,Ae/67108864&67108863,1],this.length=3),"le"===Ke&&this._initArray(this.toArray(),Se,Ke)},n.prototype._initArray=function(Ae,Se,Ke){if(r("number"==typeof Ae.length),Ae.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Ae.length/3),this.words=Array(this.length);for(var qe=0;qe<this.length;qe++)this.words[qe]=0;var Fe,$e,rt=0;if("be"===Ke)for(qe=Ae.length-1,Fe=0;qe>=0;qe-=3)$e=Ae[qe]|Ae[qe-1]<<8|Ae[qe-2]<<16,this.words[Fe]|=$e<<rt&67108863,this.words[Fe+1]=$e>>>26-rt&67108863,(rt+=24)>=26&&(rt-=26,Fe++);else if("le"===Ke)for(qe=0,Fe=0;qe<Ae.length;qe+=3)$e=Ae[qe]|Ae[qe+1]<<8|Ae[qe+2]<<16,this.words[Fe]|=$e<<rt&67108863,this.words[Fe+1]=$e>>>26-rt&67108863,(rt+=24)>=26&&(rt-=26,Fe++);return this.strip()},n.prototype._parseHex=function(Ae,Se){this.length=Math.ceil((Ae.length-Se)/6),this.words=Array(this.length);for(var Ke=0;Ke<this.length;Ke++)this.words[Ke]=0;var qe,Fe,$e=0;for(Ke=Ae.length-6,qe=0;Ke>=Se;Ke-=6)Fe=s(Ae,Ke,Ke+6),this.words[qe]|=Fe<<$e&67108863,this.words[qe+1]|=Fe>>>26-$e&4194303,($e+=24)>=26&&($e-=26,qe++);Ke+6!==Se&&(Fe=s(Ae,Se,Ke+6),this.words[qe]|=Fe<<$e&67108863,this.words[qe+1]|=Fe>>>26-$e&4194303),this.strip()},n.prototype._parseBase=function(Ae,Se,Ke){this.words=[0],this.length=1;for(var qe=0,Fe=1;Fe<=67108863;Fe*=Se)qe++;qe--,Fe=Fe/Se|0;for(var $e=Ae.length-Ke,rt=$e%qe,it=Math.min($e,$e-rt)+Ke,nt=0,st=Ke;st<it;st+=qe)nt=o(Ae,st,st+qe,Se),this.imuln(Fe),this.words[0]+nt<67108864?this.words[0]+=nt:this._iaddn(nt);if(0!==rt){var ut=1;for(nt=o(Ae,st,Ae.length,Se),st=0;st<rt;st++)ut*=Se;this.imuln(ut),this.words[0]+nt<67108864?this.words[0]+=nt:this._iaddn(nt)}},n.prototype.copy=function(Ae){Ae.words=Array(this.length);for(var Se=0;Se<this.length;Se++)Ae.words[Se]=this.words[Se];Ae.length=this.length,Ae.negative=this.negative,Ae.red=this.red},n.prototype.clone=function(){var Ae=new n(null);return this.copy(Ae),Ae},n.prototype._expand=function(Ae){for(;this.length<Ae;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var qe=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Fe=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],$e=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(Ae,Se,Ke){Ke.negative=Se.negative^Ae.negative;var qe=Ae.length+Se.length|0;Ke.length=qe,qe=qe-1|0;var Fe=0|Ae.words[0],$e=0|Se.words[0],rt=Fe*$e,it=67108863&rt,nt=rt/67108864|0;Ke.words[0]=it;for(var st=1;st<qe;st++){for(var ut=nt>>>26,ht=67108863&nt,ft=Math.min(st,Se.length-1),yt=Math.max(0,st-Ae.length+1);yt<=ft;yt++){var mt=st-yt|0;ut+=(rt=(Fe=0|Ae.words[mt])*($e=0|Se.words[yt])+ht)/67108864|0,ht=67108863&rt}Ke.words[st]=0|ht,nt=0|ut}return 0!==nt?Ke.words[st]=0|nt:Ke.length--,Ke.strip()}n.prototype.toString=function(Ae,Se){var Ke;if(Se=0|Se||1,16===(Ae=Ae||10)||"hex"===Ae){Ke="";for(var rt=0,it=0,nt=0;nt<this.length;nt++){var st=this.words[nt],ut=(16777215&(st<<rt|it)).toString(16);Ke=0!==(it=st>>>24-rt&16777215)||nt!==this.length-1?qe[6-ut.length]+ut+Ke:ut+Ke,(rt+=2)>=26&&(rt-=26,nt--)}for(0!==it&&(Ke=it.toString(16)+Ke);Ke.length%Se!=0;)Ke="0"+Ke;return 0!==this.negative&&(Ke="-"+Ke),Ke}if(Ae===(0|Ae)&&Ae>=2&&Ae<=36){var ht=Fe[Ae],ft=$e[Ae];Ke="";var yt=this.clone();for(yt.negative=0;!yt.isZero();){var mt=yt.modn(ft).toString(Ae);Ke=(yt=yt.idivn(ft)).isZero()?mt+Ke:qe[ht-mt.length]+mt+Ke}for(this.isZero()&&(Ke="0"+Ke);Ke.length%Se!=0;)Ke="0"+Ke;return 0!==this.negative&&(Ke="-"+Ke),Ke}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var Ae=this.words[0];return 2===this.length?Ae+=67108864*this.words[1]:3===this.length&&1===this.words[2]?Ae+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-Ae:Ae},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(Ae,Se){return r(void 0!==Ke),this.toArrayLike(Ke,Ae,Se)},n.prototype.toArray=function(Ae,Se){return this.toArrayLike(Array,Ae,Se)},n.prototype.toArrayLike=function(Ae,Se,Ke){var qe=this.byteLength(),Fe=Ke||Math.max(1,qe);r(qe<=Fe,"byte array longer than desired length"),r(Fe>0,"Requested array length <= 0"),this.strip();var $e,rt,it="le"===Se,nt=new Ae(Fe),st=this.clone();if(it){for(rt=0;!st.isZero();rt++)$e=st.andln(255),st.iushrn(8),nt[rt]=$e;for(;rt<Fe;rt++)nt[rt]=0}else{for(rt=0;rt<Fe-qe;rt++)nt[rt]=0;for(rt=0;!st.isZero();rt++)$e=st.andln(255),st.iushrn(8),nt[Fe-rt-1]=$e}return nt},n.prototype._countBits=Math.clz32?function(Ae){return 32-Math.clz32(Ae)}:function(Ae){var Se=Ae,Ke=0;return Se>=4096&&(Ke+=13,Se>>>=13),Se>=64&&(Ke+=7,Se>>>=7),Se>=8&&(Ke+=4,Se>>>=4),Se>=2&&(Ke+=2,Se>>>=2),Ke+Se},n.prototype._zeroBits=function(Ae){if(0===Ae)return 26;var Se=Ae,Ke=0;return 0==(8191&Se)&&(Ke+=13,Se>>>=13),0==(127&Se)&&(Ke+=7,Se>>>=7),0==(15&Se)&&(Ke+=4,Se>>>=4),0==(3&Se)&&(Ke+=2,Se>>>=2),0==(1&Se)&&Ke++,Ke},n.prototype.bitLength=function(){var Ae=this.words[this.length-1],Se=this._countBits(Ae);return 26*(this.length-1)+Se},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Ae=0,Se=0;Se<this.length;Se++){var Ke=this._zeroBits(this.words[Se]);if(Ae+=Ke,26!==Ke)break}return Ae},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(Ae){return 0!==this.negative?this.abs().inotn(Ae).iaddn(1):this.clone()},n.prototype.fromTwos=function(Ae){return this.testn(Ae-1)?this.notn(Ae).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(Ae){for(;this.length<Ae.length;)this.words[this.length++]=0;for(var Se=0;Se<Ae.length;Se++)this.words[Se]=this.words[Se]|Ae.words[Se];return this.strip()},n.prototype.ior=function(Ae){return r(0==(this.negative|Ae.negative)),this.iuor(Ae)},n.prototype.or=function(Ae){return this.length>Ae.length?this.clone().ior(Ae):Ae.clone().ior(this)},n.prototype.uor=function(Ae){return this.length>Ae.length?this.clone().iuor(Ae):Ae.clone().iuor(this)},n.prototype.iuand=function(Ae){var Se;Se=this.length>Ae.length?Ae:this;for(var Ke=0;Ke<Se.length;Ke++)this.words[Ke]=this.words[Ke]&Ae.words[Ke];return this.length=Se.length,this.strip()},n.prototype.iand=function(Ae){return r(0==(this.negative|Ae.negative)),this.iuand(Ae)},n.prototype.and=function(Ae){return this.length>Ae.length?this.clone().iand(Ae):Ae.clone().iand(this)},n.prototype.uand=function(Ae){return this.length>Ae.length?this.clone().iuand(Ae):Ae.clone().iuand(this)},n.prototype.iuxor=function(Ae){var Se,Ke;this.length>Ae.length?(Se=this,Ke=Ae):(Se=Ae,Ke=this);for(var qe=0;qe<Ke.length;qe++)this.words[qe]=Se.words[qe]^Ke.words[qe];if(this!==Se)for(;qe<Se.length;qe++)this.words[qe]=Se.words[qe];return this.length=Se.length,this.strip()},n.prototype.ixor=function(Ae){return r(0==(this.negative|Ae.negative)),this.iuxor(Ae)},n.prototype.xor=function(Ae){return this.length>Ae.length?this.clone().ixor(Ae):Ae.clone().ixor(this)},n.prototype.uxor=function(Ae){return this.length>Ae.length?this.clone().iuxor(Ae):Ae.clone().iuxor(this)},n.prototype.inotn=function(Ae){r("number"==typeof Ae&&Ae>=0);var Se=0|Math.ceil(Ae/26),Ke=Ae%26;this._expand(Se),Ke>0&&Se--;for(var qe=0;qe<Se;qe++)this.words[qe]=67108863&~this.words[qe];return Ke>0&&(this.words[qe]=~this.words[qe]&67108863>>26-Ke),this.strip()},n.prototype.notn=function(Ae){return this.clone().inotn(Ae)},n.prototype.setn=function(Ae,Se){r("number"==typeof Ae&&Ae>=0);var Ke=Ae/26|0,qe=Ae%26;return this._expand(Ke+1),this.words[Ke]=Se?this.words[Ke]|1<<qe:this.words[Ke]&~(1<<qe),this.strip()},n.prototype.iadd=function(Ae){var Se,Ke,qe;if(0!==this.negative&&0===Ae.negative)return this.negative=0,Se=this.isub(Ae),this.negative^=1,this._normSign();if(0===this.negative&&0!==Ae.negative)return Ae.negative=0,Se=this.isub(Ae),Ae.negative=1,Se._normSign();this.length>Ae.length?(Ke=this,qe=Ae):(Ke=Ae,qe=this);for(var Fe=0,$e=0;$e<qe.length;$e++)Se=(0|Ke.words[$e])+(0|qe.words[$e])+Fe,this.words[$e]=67108863&Se,Fe=Se>>>26;for(;0!==Fe&&$e<Ke.length;$e++)Se=(0|Ke.words[$e])+Fe,this.words[$e]=67108863&Se,Fe=Se>>>26;if(this.length=Ke.length,0!==Fe)this.words[this.length]=Fe,this.length++;else if(Ke!==this)for(;$e<Ke.length;$e++)this.words[$e]=Ke.words[$e];return this},n.prototype.add=function(Ae){var Se;return 0!==Ae.negative&&0===this.negative?(Ae.negative=0,Se=this.sub(Ae),Ae.negative^=1,Se):0===Ae.negative&&0!==this.negative?(this.negative=0,Se=Ae.sub(this),this.negative=1,Se):this.length>Ae.length?this.clone().iadd(Ae):Ae.clone().iadd(this)},n.prototype.isub=function(Ae){if(0!==Ae.negative){Ae.negative=0;var Se=this.iadd(Ae);return Ae.negative=1,Se._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(Ae),this.negative=1,this._normSign();var Ke,qe,Fe=this.cmp(Ae);if(0===Fe)return this.negative=0,this.length=1,this.words[0]=0,this;Fe>0?(Ke=this,qe=Ae):(Ke=Ae,qe=this);for(var $e=0,rt=0;rt<qe.length;rt++)$e=(Se=(0|Ke.words[rt])-(0|qe.words[rt])+$e)>>26,this.words[rt]=67108863&Se;for(;0!==$e&&rt<Ke.length;rt++)$e=(Se=(0|Ke.words[rt])+$e)>>26,this.words[rt]=67108863&Se;if(0===$e&&rt<Ke.length&&Ke!==this)for(;rt<Ke.length;rt++)this.words[rt]=Ke.words[rt];return this.length=Math.max(this.length,rt),Ke!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(Ae){return this.clone().isub(Ae)};var l=function(Ae,Se,Ke){var qe,Fe,$e,rt=Ae.words,it=Se.words,nt=Ke.words,st=0,ut=0|rt[0],ht=8191&ut,ft=ut>>>13,yt=0|rt[1],mt=8191&yt,vt=yt>>>13,_t=0|rt[2],Rt=8191&_t,Kt=_t>>>13,It=0|rt[3],Ut=8191&It,Ot=It>>>13,Nt=0|rt[4],jt=8191&Nt,Ft=Nt>>>13,Lt=0|rt[5],Ht=8191&Lt,Wt=Lt>>>13,Gt=0|rt[6],$t=8191&Gt,Yt=Gt>>>13,Vt=0|rt[7],Zt=8191&Vt,Qt=Vt>>>13,er=0|rt[8],tr=8191&er,rr=er>>>13,ir=0|rt[9],nr=8191&ir,sr=ir>>>13,ar=0|it[0],cr=8191&ar,ur=ar>>>13,hr=0|it[1],fr=8191&hr,lr=hr>>>13,dr=0|it[2],yr=8191&dr,Cr=dr>>>13,Rr=0|it[3],Dr=8191&Rr,Tr=Rr>>>13,Kr=0|it[4],Ir=8191&Kr,Ur=Kr>>>13,Or=0|it[5],Nr=8191&Or,jr=Or>>>13,Lr=0|it[6],Wr=8191&Lr,Qr=Lr>>>13,ti=0|it[7],ri=8191&ti,ii=ti>>>13,oi=0|it[8],ci=8191&oi,fi=oi>>>13,li=0|it[9],di=8191&li,pi=li>>>13;Ke.negative=Ae.negative^Se.negative,Ke.length=19;var yi=(st+(qe=Math.imul(ht,cr))|0)+((8191&(Fe=(Fe=Math.imul(ht,ur))+Math.imul(ft,cr)|0))<<13)|0;st=(($e=Math.imul(ft,ur))+(Fe>>>13)|0)+(yi>>>26)|0,yi&=67108863,qe=Math.imul(mt,cr),Fe=(Fe=Math.imul(mt,ur))+Math.imul(vt,cr)|0,$e=Math.imul(vt,ur);var gi=(st+(qe=qe+Math.imul(ht,fr)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,lr)|0)+Math.imul(ft,fr)|0))<<13)|0;st=(($e=$e+Math.imul(ft,lr)|0)+(Fe>>>13)|0)+(gi>>>26)|0,gi&=67108863,qe=Math.imul(Rt,cr),Fe=(Fe=Math.imul(Rt,ur))+Math.imul(Kt,cr)|0,$e=Math.imul(Kt,ur),qe=qe+Math.imul(mt,fr)|0,Fe=(Fe=Fe+Math.imul(mt,lr)|0)+Math.imul(vt,fr)|0,$e=$e+Math.imul(vt,lr)|0;var vi=(st+(qe=qe+Math.imul(ht,yr)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,Cr)|0)+Math.imul(ft,yr)|0))<<13)|0;st=(($e=$e+Math.imul(ft,Cr)|0)+(Fe>>>13)|0)+(vi>>>26)|0,vi&=67108863,qe=Math.imul(Ut,cr),Fe=(Fe=Math.imul(Ut,ur))+Math.imul(Ot,cr)|0,$e=Math.imul(Ot,ur),qe=qe+Math.imul(Rt,fr)|0,Fe=(Fe=Fe+Math.imul(Rt,lr)|0)+Math.imul(Kt,fr)|0,$e=$e+Math.imul(Kt,lr)|0,qe=qe+Math.imul(mt,yr)|0,Fe=(Fe=Fe+Math.imul(mt,Cr)|0)+Math.imul(vt,yr)|0,$e=$e+Math.imul(vt,Cr)|0;var wi=(st+(qe=qe+Math.imul(ht,Dr)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,Tr)|0)+Math.imul(ft,Dr)|0))<<13)|0;st=(($e=$e+Math.imul(ft,Tr)|0)+(Fe>>>13)|0)+(wi>>>26)|0,wi&=67108863,qe=Math.imul(jt,cr),Fe=(Fe=Math.imul(jt,ur))+Math.imul(Ft,cr)|0,$e=Math.imul(Ft,ur),qe=qe+Math.imul(Ut,fr)|0,Fe=(Fe=Fe+Math.imul(Ut,lr)|0)+Math.imul(Ot,fr)|0,$e=$e+Math.imul(Ot,lr)|0,qe=qe+Math.imul(Rt,yr)|0,Fe=(Fe=Fe+Math.imul(Rt,Cr)|0)+Math.imul(Kt,yr)|0,$e=$e+Math.imul(Kt,Cr)|0,qe=qe+Math.imul(mt,Dr)|0,Fe=(Fe=Fe+Math.imul(mt,Tr)|0)+Math.imul(vt,Dr)|0,$e=$e+Math.imul(vt,Tr)|0;var ki=(st+(qe=qe+Math.imul(ht,Ir)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,Ur)|0)+Math.imul(ft,Ir)|0))<<13)|0;st=(($e=$e+Math.imul(ft,Ur)|0)+(Fe>>>13)|0)+(ki>>>26)|0,ki&=67108863,qe=Math.imul(Ht,cr),Fe=(Fe=Math.imul(Ht,ur))+Math.imul(Wt,cr)|0,$e=Math.imul(Wt,ur),qe=qe+Math.imul(jt,fr)|0,Fe=(Fe=Fe+Math.imul(jt,lr)|0)+Math.imul(Ft,fr)|0,$e=$e+Math.imul(Ft,lr)|0,qe=qe+Math.imul(Ut,yr)|0,Fe=(Fe=Fe+Math.imul(Ut,Cr)|0)+Math.imul(Ot,yr)|0,$e=$e+Math.imul(Ot,Cr)|0,qe=qe+Math.imul(Rt,Dr)|0,Fe=(Fe=Fe+Math.imul(Rt,Tr)|0)+Math.imul(Kt,Dr)|0,$e=$e+Math.imul(Kt,Tr)|0,qe=qe+Math.imul(mt,Ir)|0,Fe=(Fe=Fe+Math.imul(mt,Ur)|0)+Math.imul(vt,Ir)|0,$e=$e+Math.imul(vt,Ur)|0;var Si=(st+(qe=qe+Math.imul(ht,Nr)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,jr)|0)+Math.imul(ft,Nr)|0))<<13)|0;st=(($e=$e+Math.imul(ft,jr)|0)+(Fe>>>13)|0)+(Si>>>26)|0,Si&=67108863,qe=Math.imul($t,cr),Fe=(Fe=Math.imul($t,ur))+Math.imul(Yt,cr)|0,$e=Math.imul(Yt,ur),qe=qe+Math.imul(Ht,fr)|0,Fe=(Fe=Fe+Math.imul(Ht,lr)|0)+Math.imul(Wt,fr)|0,$e=$e+Math.imul(Wt,lr)|0,qe=qe+Math.imul(jt,yr)|0,Fe=(Fe=Fe+Math.imul(jt,Cr)|0)+Math.imul(Ft,yr)|0,$e=$e+Math.imul(Ft,Cr)|0,qe=qe+Math.imul(Ut,Dr)|0,Fe=(Fe=Fe+Math.imul(Ut,Tr)|0)+Math.imul(Ot,Dr)|0,$e=$e+Math.imul(Ot,Tr)|0,qe=qe+Math.imul(Rt,Ir)|0,Fe=(Fe=Fe+Math.imul(Rt,Ur)|0)+Math.imul(Kt,Ir)|0,$e=$e+Math.imul(Kt,Ur)|0,qe=qe+Math.imul(mt,Nr)|0,Fe=(Fe=Fe+Math.imul(mt,jr)|0)+Math.imul(vt,Nr)|0,$e=$e+Math.imul(vt,jr)|0;var Ei=(st+(qe=qe+Math.imul(ht,Wr)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,Qr)|0)+Math.imul(ft,Wr)|0))<<13)|0;st=(($e=$e+Math.imul(ft,Qr)|0)+(Fe>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,qe=Math.imul(Zt,cr),Fe=(Fe=Math.imul(Zt,ur))+Math.imul(Qt,cr)|0,$e=Math.imul(Qt,ur),qe=qe+Math.imul($t,fr)|0,Fe=(Fe=Fe+Math.imul($t,lr)|0)+Math.imul(Yt,fr)|0,$e=$e+Math.imul(Yt,lr)|0,qe=qe+Math.imul(Ht,yr)|0,Fe=(Fe=Fe+Math.imul(Ht,Cr)|0)+Math.imul(Wt,yr)|0,$e=$e+Math.imul(Wt,Cr)|0,qe=qe+Math.imul(jt,Dr)|0,Fe=(Fe=Fe+Math.imul(jt,Tr)|0)+Math.imul(Ft,Dr)|0,$e=$e+Math.imul(Ft,Tr)|0,qe=qe+Math.imul(Ut,Ir)|0,Fe=(Fe=Fe+Math.imul(Ut,Ur)|0)+Math.imul(Ot,Ir)|0,$e=$e+Math.imul(Ot,Ur)|0,qe=qe+Math.imul(Rt,Nr)|0,Fe=(Fe=Fe+Math.imul(Rt,jr)|0)+Math.imul(Kt,Nr)|0,$e=$e+Math.imul(Kt,jr)|0,qe=qe+Math.imul(mt,Wr)|0,Fe=(Fe=Fe+Math.imul(mt,Qr)|0)+Math.imul(vt,Wr)|0,$e=$e+Math.imul(vt,Qr)|0;var Mi=(st+(qe=qe+Math.imul(ht,ri)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,ii)|0)+Math.imul(ft,ri)|0))<<13)|0;st=(($e=$e+Math.imul(ft,ii)|0)+(Fe>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,qe=Math.imul(tr,cr),Fe=(Fe=Math.imul(tr,ur))+Math.imul(rr,cr)|0,$e=Math.imul(rr,ur),qe=qe+Math.imul(Zt,fr)|0,Fe=(Fe=Fe+Math.imul(Zt,lr)|0)+Math.imul(Qt,fr)|0,$e=$e+Math.imul(Qt,lr)|0,qe=qe+Math.imul($t,yr)|0,Fe=(Fe=Fe+Math.imul($t,Cr)|0)+Math.imul(Yt,yr)|0,$e=$e+Math.imul(Yt,Cr)|0,qe=qe+Math.imul(Ht,Dr)|0,Fe=(Fe=Fe+Math.imul(Ht,Tr)|0)+Math.imul(Wt,Dr)|0,$e=$e+Math.imul(Wt,Tr)|0,qe=qe+Math.imul(jt,Ir)|0,Fe=(Fe=Fe+Math.imul(jt,Ur)|0)+Math.imul(Ft,Ir)|0,$e=$e+Math.imul(Ft,Ur)|0,qe=qe+Math.imul(Ut,Nr)|0,Fe=(Fe=Fe+Math.imul(Ut,jr)|0)+Math.imul(Ot,Nr)|0,$e=$e+Math.imul(Ot,jr)|0,qe=qe+Math.imul(Rt,Wr)|0,Fe=(Fe=Fe+Math.imul(Rt,Qr)|0)+Math.imul(Kt,Wr)|0,$e=$e+Math.imul(Kt,Qr)|0,qe=qe+Math.imul(mt,ri)|0,Fe=(Fe=Fe+Math.imul(mt,ii)|0)+Math.imul(vt,ri)|0,$e=$e+Math.imul(vt,ii)|0;var Pi=(st+(qe=qe+Math.imul(ht,ci)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,fi)|0)+Math.imul(ft,ci)|0))<<13)|0;st=(($e=$e+Math.imul(ft,fi)|0)+(Fe>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,qe=Math.imul(nr,cr),Fe=(Fe=Math.imul(nr,ur))+Math.imul(sr,cr)|0,$e=Math.imul(sr,ur),qe=qe+Math.imul(tr,fr)|0,Fe=(Fe=Fe+Math.imul(tr,lr)|0)+Math.imul(rr,fr)|0,$e=$e+Math.imul(rr,lr)|0,qe=qe+Math.imul(Zt,yr)|0,Fe=(Fe=Fe+Math.imul(Zt,Cr)|0)+Math.imul(Qt,yr)|0,$e=$e+Math.imul(Qt,Cr)|0,qe=qe+Math.imul($t,Dr)|0,Fe=(Fe=Fe+Math.imul($t,Tr)|0)+Math.imul(Yt,Dr)|0,$e=$e+Math.imul(Yt,Tr)|0,qe=qe+Math.imul(Ht,Ir)|0,Fe=(Fe=Fe+Math.imul(Ht,Ur)|0)+Math.imul(Wt,Ir)|0,$e=$e+Math.imul(Wt,Ur)|0,qe=qe+Math.imul(jt,Nr)|0,Fe=(Fe=Fe+Math.imul(jt,jr)|0)+Math.imul(Ft,Nr)|0,$e=$e+Math.imul(Ft,jr)|0,qe=qe+Math.imul(Ut,Wr)|0,Fe=(Fe=Fe+Math.imul(Ut,Qr)|0)+Math.imul(Ot,Wr)|0,$e=$e+Math.imul(Ot,Qr)|0,qe=qe+Math.imul(Rt,ri)|0,Fe=(Fe=Fe+Math.imul(Rt,ii)|0)+Math.imul(Kt,ri)|0,$e=$e+Math.imul(Kt,ii)|0,qe=qe+Math.imul(mt,ci)|0,Fe=(Fe=Fe+Math.imul(mt,fi)|0)+Math.imul(vt,ci)|0,$e=$e+Math.imul(vt,fi)|0;var xi=(st+(qe=qe+Math.imul(ht,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(ht,pi)|0)+Math.imul(ft,di)|0))<<13)|0;st=(($e=$e+Math.imul(ft,pi)|0)+(Fe>>>13)|0)+(xi>>>26)|0,xi&=67108863,qe=Math.imul(nr,fr),Fe=(Fe=Math.imul(nr,lr))+Math.imul(sr,fr)|0,$e=Math.imul(sr,lr),qe=qe+Math.imul(tr,yr)|0,Fe=(Fe=Fe+Math.imul(tr,Cr)|0)+Math.imul(rr,yr)|0,$e=$e+Math.imul(rr,Cr)|0,qe=qe+Math.imul(Zt,Dr)|0,Fe=(Fe=Fe+Math.imul(Zt,Tr)|0)+Math.imul(Qt,Dr)|0,$e=$e+Math.imul(Qt,Tr)|0,qe=qe+Math.imul($t,Ir)|0,Fe=(Fe=Fe+Math.imul($t,Ur)|0)+Math.imul(Yt,Ir)|0,$e=$e+Math.imul(Yt,Ur)|0,qe=qe+Math.imul(Ht,Nr)|0,Fe=(Fe=Fe+Math.imul(Ht,jr)|0)+Math.imul(Wt,Nr)|0,$e=$e+Math.imul(Wt,jr)|0,qe=qe+Math.imul(jt,Wr)|0,Fe=(Fe=Fe+Math.imul(jt,Qr)|0)+Math.imul(Ft,Wr)|0,$e=$e+Math.imul(Ft,Qr)|0,qe=qe+Math.imul(Ut,ri)|0,Fe=(Fe=Fe+Math.imul(Ut,ii)|0)+Math.imul(Ot,ri)|0,$e=$e+Math.imul(Ot,ii)|0,qe=qe+Math.imul(Rt,ci)|0,Fe=(Fe=Fe+Math.imul(Rt,fi)|0)+Math.imul(Kt,ci)|0,$e=$e+Math.imul(Kt,fi)|0;var Ci=(st+(qe=qe+Math.imul(mt,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(mt,pi)|0)+Math.imul(vt,di)|0))<<13)|0;st=(($e=$e+Math.imul(vt,pi)|0)+(Fe>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,qe=Math.imul(nr,yr),Fe=(Fe=Math.imul(nr,Cr))+Math.imul(sr,yr)|0,$e=Math.imul(sr,Cr),qe=qe+Math.imul(tr,Dr)|0,Fe=(Fe=Fe+Math.imul(tr,Tr)|0)+Math.imul(rr,Dr)|0,$e=$e+Math.imul(rr,Tr)|0,qe=qe+Math.imul(Zt,Ir)|0,Fe=(Fe=Fe+Math.imul(Zt,Ur)|0)+Math.imul(Qt,Ir)|0,$e=$e+Math.imul(Qt,Ur)|0,qe=qe+Math.imul($t,Nr)|0,Fe=(Fe=Fe+Math.imul($t,jr)|0)+Math.imul(Yt,Nr)|0,$e=$e+Math.imul(Yt,jr)|0,qe=qe+Math.imul(Ht,Wr)|0,Fe=(Fe=Fe+Math.imul(Ht,Qr)|0)+Math.imul(Wt,Wr)|0,$e=$e+Math.imul(Wt,Qr)|0,qe=qe+Math.imul(jt,ri)|0,Fe=(Fe=Fe+Math.imul(jt,ii)|0)+Math.imul(Ft,ri)|0,$e=$e+Math.imul(Ft,ii)|0,qe=qe+Math.imul(Ut,ci)|0,Fe=(Fe=Fe+Math.imul(Ut,fi)|0)+Math.imul(Ot,ci)|0,$e=$e+Math.imul(Ot,fi)|0;var Ri=(st+(qe=qe+Math.imul(Rt,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(Rt,pi)|0)+Math.imul(Kt,di)|0))<<13)|0;st=(($e=$e+Math.imul(Kt,pi)|0)+(Fe>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,qe=Math.imul(nr,Dr),Fe=(Fe=Math.imul(nr,Tr))+Math.imul(sr,Dr)|0,$e=Math.imul(sr,Tr),qe=qe+Math.imul(tr,Ir)|0,Fe=(Fe=Fe+Math.imul(tr,Ur)|0)+Math.imul(rr,Ir)|0,$e=$e+Math.imul(rr,Ur)|0,qe=qe+Math.imul(Zt,Nr)|0,Fe=(Fe=Fe+Math.imul(Zt,jr)|0)+Math.imul(Qt,Nr)|0,$e=$e+Math.imul(Qt,jr)|0,qe=qe+Math.imul($t,Wr)|0,Fe=(Fe=Fe+Math.imul($t,Qr)|0)+Math.imul(Yt,Wr)|0,$e=$e+Math.imul(Yt,Qr)|0,qe=qe+Math.imul(Ht,ri)|0,Fe=(Fe=Fe+Math.imul(Ht,ii)|0)+Math.imul(Wt,ri)|0,$e=$e+Math.imul(Wt,ii)|0,qe=qe+Math.imul(jt,ci)|0,Fe=(Fe=Fe+Math.imul(jt,fi)|0)+Math.imul(Ft,ci)|0,$e=$e+Math.imul(Ft,fi)|0;var Di=(st+(qe=qe+Math.imul(Ut,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(Ut,pi)|0)+Math.imul(Ot,di)|0))<<13)|0;st=(($e=$e+Math.imul(Ot,pi)|0)+(Fe>>>13)|0)+(Di>>>26)|0,Di&=67108863,qe=Math.imul(nr,Ir),Fe=(Fe=Math.imul(nr,Ur))+Math.imul(sr,Ir)|0,$e=Math.imul(sr,Ur),qe=qe+Math.imul(tr,Nr)|0,Fe=(Fe=Fe+Math.imul(tr,jr)|0)+Math.imul(rr,Nr)|0,$e=$e+Math.imul(rr,jr)|0,qe=qe+Math.imul(Zt,Wr)|0,Fe=(Fe=Fe+Math.imul(Zt,Qr)|0)+Math.imul(Qt,Wr)|0,$e=$e+Math.imul(Qt,Qr)|0,qe=qe+Math.imul($t,ri)|0,Fe=(Fe=Fe+Math.imul($t,ii)|0)+Math.imul(Yt,ri)|0,$e=$e+Math.imul(Yt,ii)|0,qe=qe+Math.imul(Ht,ci)|0,Fe=(Fe=Fe+Math.imul(Ht,fi)|0)+Math.imul(Wt,ci)|0,$e=$e+Math.imul(Wt,fi)|0;var Ti=(st+(qe=qe+Math.imul(jt,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(jt,pi)|0)+Math.imul(Ft,di)|0))<<13)|0;st=(($e=$e+Math.imul(Ft,pi)|0)+(Fe>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,qe=Math.imul(nr,Nr),Fe=(Fe=Math.imul(nr,jr))+Math.imul(sr,Nr)|0,$e=Math.imul(sr,jr),qe=qe+Math.imul(tr,Wr)|0,Fe=(Fe=Fe+Math.imul(tr,Qr)|0)+Math.imul(rr,Wr)|0,$e=$e+Math.imul(rr,Qr)|0,qe=qe+Math.imul(Zt,ri)|0,Fe=(Fe=Fe+Math.imul(Zt,ii)|0)+Math.imul(Qt,ri)|0,$e=$e+Math.imul(Qt,ii)|0,qe=qe+Math.imul($t,ci)|0,Fe=(Fe=Fe+Math.imul($t,fi)|0)+Math.imul(Yt,ci)|0,$e=$e+Math.imul(Yt,fi)|0;var Ki=(st+(qe=qe+Math.imul(Ht,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(Ht,pi)|0)+Math.imul(Wt,di)|0))<<13)|0;st=(($e=$e+Math.imul(Wt,pi)|0)+(Fe>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,qe=Math.imul(nr,Wr),Fe=(Fe=Math.imul(nr,Qr))+Math.imul(sr,Wr)|0,$e=Math.imul(sr,Qr),qe=qe+Math.imul(tr,ri)|0,Fe=(Fe=Fe+Math.imul(tr,ii)|0)+Math.imul(rr,ri)|0,$e=$e+Math.imul(rr,ii)|0,qe=qe+Math.imul(Zt,ci)|0,Fe=(Fe=Fe+Math.imul(Zt,fi)|0)+Math.imul(Qt,ci)|0,$e=$e+Math.imul(Qt,fi)|0;var qi=(st+(qe=qe+Math.imul($t,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul($t,pi)|0)+Math.imul(Yt,di)|0))<<13)|0;st=(($e=$e+Math.imul(Yt,pi)|0)+(Fe>>>13)|0)+(qi>>>26)|0,qi&=67108863,qe=Math.imul(nr,ri),Fe=(Fe=Math.imul(nr,ii))+Math.imul(sr,ri)|0,$e=Math.imul(sr,ii),qe=qe+Math.imul(tr,ci)|0,Fe=(Fe=Fe+Math.imul(tr,fi)|0)+Math.imul(rr,ci)|0,$e=$e+Math.imul(rr,fi)|0;var ji=(st+(qe=qe+Math.imul(Zt,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(Zt,pi)|0)+Math.imul(Qt,di)|0))<<13)|0;st=(($e=$e+Math.imul(Qt,pi)|0)+(Fe>>>13)|0)+(ji>>>26)|0,ji&=67108863,qe=Math.imul(nr,ci),Fe=(Fe=Math.imul(nr,fi))+Math.imul(sr,ci)|0,$e=Math.imul(sr,fi);var zi=(st+(qe=qe+Math.imul(tr,di)|0)|0)+((8191&(Fe=(Fe=Fe+Math.imul(tr,pi)|0)+Math.imul(rr,di)|0))<<13)|0;st=(($e=$e+Math.imul(rr,pi)|0)+(Fe>>>13)|0)+(zi>>>26)|0,zi&=67108863;var Li=(st+(qe=Math.imul(nr,di))|0)+((8191&(Fe=(Fe=Math.imul(nr,pi))+Math.imul(sr,di)|0))<<13)|0;return st=(($e=Math.imul(sr,pi))+(Fe>>>13)|0)+(Li>>>26)|0,Li&=67108863,nt[0]=yi,nt[1]=gi,nt[2]=vi,nt[3]=wi,nt[4]=ki,nt[5]=Si,nt[6]=Ei,nt[7]=Mi,nt[8]=Pi,nt[9]=xi,nt[10]=Ci,nt[11]=Ri,nt[12]=Di,nt[13]=Ti,nt[14]=Ki,nt[15]=qi,nt[16]=ji,nt[17]=zi,nt[18]=Li,0!==st&&(nt[19]=st,Ke.length++),Ke};function p(Ae,Se,Ke){return(new y).mulp(Ae,Se,Ke)}function y(Ae,Se){this.x=Ae,this.y=Se}Math.imul||(l=f),n.prototype.mulTo=function(Ae,Se){var Ke,qe=this.length+Ae.length;return Ke=10===this.length&&10===Ae.length?l(this,Ae,Se):qe<63?f(this,Ae,Se):qe<1024?function(Ae,Se,Ke){Ke.negative=Se.negative^Ae.negative,Ke.length=Ae.length+Se.length;for(var qe=0,Fe=0,$e=0;$e<Ke.length-1;$e++){var rt=Fe;Fe=0;for(var it=67108863&qe,nt=Math.min($e,Se.length-1),st=Math.max(0,$e-Ae.length+1);st<=nt;st++){var ut=$e-st,ht=(0|Ae.words[ut])*(0|Se.words[st]),ft=67108863&ht;it=67108863&(ft=ft+it|0),Fe+=(rt=(rt=rt+(ht/67108864|0)|0)+(ft>>>26)|0)>>>26,rt&=67108863}Ke.words[$e]=it,qe=rt,rt=Fe}return 0!==qe?Ke.words[$e]=qe:Ke.length--,Ke.strip()}(this,Ae,Se):p(this,Ae,Se),Ke},y.prototype.makeRBT=function(Ae){for(var Se=Array(Ae),Ke=n.prototype._countBits(Ae)-1,qe=0;qe<Ae;qe++)Se[qe]=this.revBin(qe,Ke,Ae);return Se},y.prototype.revBin=function(Ae,Se,Ke){if(0===Ae||Ae===Ke-1)return Ae;for(var qe=0,Fe=0;Fe<Se;Fe++)qe|=(1&Ae)<<Se-Fe-1,Ae>>=1;return qe},y.prototype.permute=function(Ae,Se,Ke,qe,Fe,$e){for(var rt=0;rt<$e;rt++)qe[rt]=Se[Ae[rt]],Fe[rt]=Ke[Ae[rt]]},y.prototype.transform=function(Ae,Se,Ke,qe,Fe,$e){this.permute($e,Ae,Se,Ke,qe,Fe);for(var rt=1;rt<Fe;rt<<=1)for(var it=rt<<1,nt=Math.cos(2*Math.PI/it),st=Math.sin(2*Math.PI/it),ut=0;ut<Fe;ut+=it)for(var ht=nt,ft=st,yt=0;yt<rt;yt++){var mt=Ke[ut+yt],vt=qe[ut+yt],_t=Ke[ut+yt+rt],Rt=qe[ut+yt+rt],Kt=ht*_t-ft*Rt;Rt=ht*Rt+ft*_t,_t=Kt,Ke[ut+yt]=mt+_t,qe[ut+yt]=vt+Rt,Ke[ut+yt+rt]=mt-_t,qe[ut+yt+rt]=vt-Rt,yt!==it&&(Kt=nt*ht-st*ft,ft=nt*ft+st*ht,ht=Kt)}},y.prototype.guessLen13b=function(Ae,Se){var Ke=1|Math.max(Se,Ae),qe=1&Ke,Fe=0;for(Ke=Ke/2|0;Ke;Ke>>>=1)Fe++;return 1<<Fe+1+qe},y.prototype.conjugate=function(Ae,Se,Ke){if(!(Ke<=1))for(var qe=0;qe<Ke/2;qe++){var Fe=Ae[qe];Ae[qe]=Ae[Ke-qe-1],Ae[Ke-qe-1]=Fe,Fe=Se[qe],Se[qe]=-Se[Ke-qe-1],Se[Ke-qe-1]=-Fe}},y.prototype.normalize13b=function(Ae,Se){for(var Ke=0,qe=0;qe<Se/2;qe++){var Fe=8192*Math.round(Ae[2*qe+1]/Se)+Math.round(Ae[2*qe]/Se)+Ke;Ae[qe]=67108863&Fe,Ke=Fe<67108864?0:Fe/67108864|0}return Ae},y.prototype.convert13b=function(Ae,Se,Ke,qe){for(var Fe=0,$e=0;$e<Se;$e++)Fe+=0|Ae[$e],Ke[2*$e]=8191&Fe,Fe>>>=13,Ke[2*$e+1]=8191&Fe,Fe>>>=13;for($e=2*Se;$e<qe;++$e)Ke[$e]=0;r(0===Fe),r(0==(-8192&Fe))},y.prototype.stub=function(Ae){for(var Se=Array(Ae),Ke=0;Ke<Ae;Ke++)Se[Ke]=0;return Se},y.prototype.mulp=function(Ae,Se,Ke){var qe=2*this.guessLen13b(Ae.length,Se.length),Fe=this.makeRBT(qe),$e=this.stub(qe),rt=Array(qe),it=Array(qe),nt=Array(qe),st=Array(qe),ut=Array(qe),ht=Array(qe),ft=Ke.words;ft.length=qe,this.convert13b(Ae.words,Ae.length,rt,qe),this.convert13b(Se.words,Se.length,st,qe),this.transform(rt,$e,it,nt,qe,Fe),this.transform(st,$e,ut,ht,qe,Fe);for(var yt=0;yt<qe;yt++){var mt=it[yt]*ut[yt]-nt[yt]*ht[yt];nt[yt]=it[yt]*ht[yt]+nt[yt]*ut[yt],it[yt]=mt}return this.conjugate(it,nt,qe),this.transform(it,nt,ft,$e,qe,Fe),this.conjugate(ft,$e,qe),this.normalize13b(ft,qe),Ke.negative=Ae.negative^Se.negative,Ke.length=Ae.length+Se.length,Ke.strip()},n.prototype.mul=function(Ae){var Se=new n(null);return Se.words=Array(this.length+Ae.length),this.mulTo(Ae,Se)},n.prototype.mulf=function(Ae){var Se=new n(null);return Se.words=Array(this.length+Ae.length),p(this,Ae,Se)},n.prototype.imul=function(Ae){return this.clone().mulTo(Ae,this)},n.prototype.imuln=function(Ae){r("number"==typeof Ae),r(Ae<67108864);for(var Se=0,Ke=0;Ke<this.length;Ke++){var qe=(0|this.words[Ke])*Ae,Fe=(67108863&qe)+(67108863&Se);Se>>=26,Se+=qe/67108864|0,Se+=Fe>>>26,this.words[Ke]=67108863&Fe}return 0!==Se&&(this.words[Ke]=Se,this.length++),this},n.prototype.muln=function(Ae){return this.clone().imuln(Ae)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(Ae){var Se=function(Ae){for(var Se=Array(Ae.bitLength()),Ke=0;Ke<Se.length;Ke++){var qe=Ke/26|0,Fe=Ke%26;Se[Ke]=(Ae.words[qe]&1<<Fe)>>>Fe}return Se}(Ae);if(0===Se.length)return new n(1);for(var Ke=this,qe=0;qe<Se.length&&0===Se[qe];qe++,Ke=Ke.sqr());if(++qe<Se.length)for(var Fe=Ke.sqr();qe<Se.length;qe++,Fe=Fe.sqr())0!==Se[qe]&&(Ke=Ke.mul(Fe));return Ke},n.prototype.iushln=function(Ae){r("number"==typeof Ae&&Ae>=0);var Se,Ke=Ae%26,qe=(Ae-Ke)/26,Fe=67108863>>>26-Ke<<26-Ke;if(0!==Ke){var $e=0;for(Se=0;Se<this.length;Se++){var rt=this.words[Se]&Fe,it=(0|this.words[Se])-rt<<Ke;this.words[Se]=it|$e,$e=rt>>>26-Ke}$e&&(this.words[Se]=$e,this.length++)}if(0!==qe){for(Se=this.length-1;Se>=0;Se--)this.words[Se+qe]=this.words[Se];for(Se=0;Se<qe;Se++)this.words[Se]=0;this.length+=qe}return this.strip()},n.prototype.ishln=function(Ae){return r(0===this.negative),this.iushln(Ae)},n.prototype.iushrn=function(Ae,Se,Ke){var qe;r("number"==typeof Ae&&Ae>=0),qe=Se?(Se-Se%26)/26:0;var Fe=Ae%26,$e=Math.min((Ae-Fe)/26,this.length),rt=67108863^67108863>>>Fe<<Fe,it=Ke;if(qe=Math.max(0,qe-=$e),it){for(var nt=0;nt<$e;nt++)it.words[nt]=this.words[nt];it.length=$e}if(0===$e);else if(this.length>$e)for(this.length-=$e,nt=0;nt<this.length;nt++)this.words[nt]=this.words[nt+$e];else this.words[0]=0,this.length=1;var st=0;for(nt=this.length-1;nt>=0&&(0!==st||nt>=qe);nt--){var ut=0|this.words[nt];this.words[nt]=st<<26-Fe|ut>>>Fe,st=ut&rt}return it&&0!==st&&(it.words[it.length++]=st),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(Ae,Se,Ke){return r(0===this.negative),this.iushrn(Ae,Se,Ke)},n.prototype.shln=function(Ae){return this.clone().ishln(Ae)},n.prototype.ushln=function(Ae){return this.clone().iushln(Ae)},n.prototype.shrn=function(Ae){return this.clone().ishrn(Ae)},n.prototype.ushrn=function(Ae){return this.clone().iushrn(Ae)},n.prototype.testn=function(Ae){r("number"==typeof Ae&&Ae>=0);var Se=Ae%26,Ke=(Ae-Se)/26,qe=1<<Se;return!(this.length<=Ke)&&!!(this.words[Ke]&qe)},n.prototype.imaskn=function(Ae){r("number"==typeof Ae&&Ae>=0);var Se=Ae%26,Ke=(Ae-Se)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=Ke)return this;if(0!==Se&&Ke++,this.length=Math.min(Ke,this.length),0!==Se){var qe=67108863^67108863>>>Se<<Se;this.words[this.length-1]&=qe}return this.strip()},n.prototype.maskn=function(Ae){return this.clone().imaskn(Ae)},n.prototype.iaddn=function(Ae){return r("number"==typeof Ae),r(Ae<67108864),Ae<0?this.isubn(-Ae):0!==this.negative?1===this.length&&(0|this.words[0])<Ae?(this.words[0]=Ae-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(Ae),this.negative=1,this):this._iaddn(Ae)},n.prototype._iaddn=function(Ae){this.words[0]+=Ae;for(var Se=0;Se<this.length&&this.words[Se]>=67108864;Se++)this.words[Se]-=67108864,Se===this.length-1?this.words[Se+1]=1:this.words[Se+1]++;return this.length=Math.max(this.length,Se+1),this},n.prototype.isubn=function(Ae){if(r("number"==typeof Ae),r(Ae<67108864),Ae<0)return this.iaddn(-Ae);if(0!==this.negative)return this.negative=0,this.iaddn(Ae),this.negative=1,this;if(this.words[0]-=Ae,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Se=0;Se<this.length&&this.words[Se]<0;Se++)this.words[Se]+=67108864,this.words[Se+1]-=1;return this.strip()},n.prototype.addn=function(Ae){return this.clone().iaddn(Ae)},n.prototype.subn=function(Ae){return this.clone().isubn(Ae)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(Ae,Se,Ke){var qe,Fe,$e=Ae.length+Ke;this._expand($e);var rt=0;for(qe=0;qe<Ae.length;qe++){Fe=(0|this.words[qe+Ke])+rt;var it=(0|Ae.words[qe])*Se;rt=((Fe-=67108863&it)>>26)-(it/67108864|0),this.words[qe+Ke]=67108863&Fe}for(;qe<this.length-Ke;qe++)rt=(Fe=(0|this.words[qe+Ke])+rt)>>26,this.words[qe+Ke]=67108863&Fe;if(0===rt)return this.strip();for(r(-1===rt),rt=0,qe=0;qe<this.length;qe++)rt=(Fe=-(0|this.words[qe])+rt)>>26,this.words[qe]=67108863&Fe;return this.negative=1,this.strip()},n.prototype._wordDiv=function(Ae,Se){var Ke=(this.length,Ae.length),qe=this.clone(),Fe=Ae,$e=0|Fe.words[Fe.length-1];0!==(Ke=26-this._countBits($e))&&(Fe=Fe.ushln(Ke),qe.iushln(Ke),$e=0|Fe.words[Fe.length-1]);var rt,it=qe.length-Fe.length;if("mod"!==Se){(rt=new n(null)).length=it+1,rt.words=Array(rt.length);for(var nt=0;nt<rt.length;nt++)rt.words[nt]=0}var st=qe.clone()._ishlnsubmul(Fe,1,it);0===st.negative&&(qe=st,rt&&(rt.words[it]=1));for(var ut=it-1;ut>=0;ut--){var ht=67108864*(0|qe.words[Fe.length+ut])+(0|qe.words[Fe.length+ut-1]);for(ht=Math.min(ht/$e|0,67108863),qe._ishlnsubmul(Fe,ht,ut);0!==qe.negative;)ht--,qe.negative=0,qe._ishlnsubmul(Fe,1,ut),qe.isZero()||(qe.negative^=1);rt&&(rt.words[ut]=ht)}return rt&&rt.strip(),qe.strip(),"div"!==Se&&0!==Ke&&qe.iushrn(Ke),{div:rt||null,mod:qe}},n.prototype.divmod=function(Ae,Se,Ke){return r(!Ae.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===Ae.negative?($e=this.neg().divmod(Ae,Se),"mod"!==Se&&(qe=$e.div.neg()),"div"!==Se&&(Fe=$e.mod.neg(),Ke&&0!==Fe.negative&&Fe.iadd(Ae)),{div:qe,mod:Fe}):0===this.negative&&0!==Ae.negative?($e=this.divmod(Ae.neg(),Se),"mod"!==Se&&(qe=$e.div.neg()),{div:qe,mod:$e.mod}):0!=(this.negative&Ae.negative)?($e=this.neg().divmod(Ae.neg(),Se),"div"!==Se&&(Fe=$e.mod.neg(),Ke&&0!==Fe.negative&&Fe.isub(Ae)),{div:$e.div,mod:Fe}):Ae.length>this.length||this.cmp(Ae)<0?{div:new n(0),mod:this}:1===Ae.length?"div"===Se?{div:this.divn(Ae.words[0]),mod:null}:"mod"===Se?{div:null,mod:new n(this.modn(Ae.words[0]))}:{div:this.divn(Ae.words[0]),mod:new n(this.modn(Ae.words[0]))}:this._wordDiv(Ae,Se);var qe,Fe,$e},n.prototype.div=function(Ae){return this.divmod(Ae,"div",!1).div},n.prototype.mod=function(Ae){return this.divmod(Ae,"mod",!1).mod},n.prototype.umod=function(Ae){return this.divmod(Ae,"mod",!0).mod},n.prototype.divRound=function(Ae){var Se=this.divmod(Ae);if(Se.mod.isZero())return Se.div;var Ke=0!==Se.div.negative?Se.mod.isub(Ae):Se.mod,qe=Ae.ushrn(1),Fe=Ae.andln(1),$e=Ke.cmp(qe);return $e<0||1===Fe&&0===$e?Se.div:0!==Se.div.negative?Se.div.isubn(1):Se.div.iaddn(1)},n.prototype.modn=function(Ae){r(Ae<=67108863);for(var Se=(1<<26)%Ae,Ke=0,qe=this.length-1;qe>=0;qe--)Ke=(Se*Ke+(0|this.words[qe]))%Ae;return Ke},n.prototype.idivn=function(Ae){r(Ae<=67108863);for(var Se=0,Ke=this.length-1;Ke>=0;Ke--){var qe=(0|this.words[Ke])+67108864*Se;this.words[Ke]=qe/Ae|0,Se=qe%Ae}return this.strip()},n.prototype.divn=function(Ae){return this.clone().idivn(Ae)},n.prototype.egcd=function(Ae){r(0===Ae.negative),r(!Ae.isZero());var Se=this,Ke=Ae.clone();Se=0!==Se.negative?Se.umod(Ae):Se.clone();for(var qe=new n(1),Fe=new n(0),$e=new n(0),rt=new n(1),it=0;Se.isEven()&&Ke.isEven();)Se.iushrn(1),Ke.iushrn(1),++it;for(var nt=Ke.clone(),st=Se.clone();!Se.isZero();){for(var ut=0,ht=1;0==(Se.words[0]&ht)&&ut<26;++ut,ht<<=1);if(ut>0)for(Se.iushrn(ut);ut-- >0;)(qe.isOdd()||Fe.isOdd())&&(qe.iadd(nt),Fe.isub(st)),qe.iushrn(1),Fe.iushrn(1);for(var ft=0,yt=1;0==(Ke.words[0]&yt)&&ft<26;++ft,yt<<=1);if(ft>0)for(Ke.iushrn(ft);ft-- >0;)($e.isOdd()||rt.isOdd())&&($e.iadd(nt),rt.isub(st)),$e.iushrn(1),rt.iushrn(1);Se.cmp(Ke)>=0?(Se.isub(Ke),qe.isub($e),Fe.isub(rt)):(Ke.isub(Se),$e.isub(qe),rt.isub(Fe))}return{a:$e,b:rt,gcd:Ke.iushln(it)}},n.prototype._invmp=function(Ae){r(0===Ae.negative),r(!Ae.isZero());var Se=this,Ke=Ae.clone();Se=0!==Se.negative?Se.umod(Ae):Se.clone();for(var qe,Fe=new n(1),$e=new n(0),rt=Ke.clone();Se.cmpn(1)>0&&Ke.cmpn(1)>0;){for(var it=0,nt=1;0==(Se.words[0]&nt)&&it<26;++it,nt<<=1);if(it>0)for(Se.iushrn(it);it-- >0;)Fe.isOdd()&&Fe.iadd(rt),Fe.iushrn(1);for(var st=0,ut=1;0==(Ke.words[0]&ut)&&st<26;++st,ut<<=1);if(st>0)for(Ke.iushrn(st);st-- >0;)$e.isOdd()&&$e.iadd(rt),$e.iushrn(1);Se.cmp(Ke)>=0?(Se.isub(Ke),Fe.isub($e)):(Ke.isub(Se),$e.isub(Fe))}return(qe=0===Se.cmpn(1)?Fe:$e).cmpn(0)<0&&qe.iadd(Ae),qe},n.prototype.gcd=function(Ae){if(this.isZero())return Ae.abs();if(Ae.isZero())return this.abs();var Se=this.clone(),Ke=Ae.clone();Se.negative=0,Ke.negative=0;for(var qe=0;Se.isEven()&&Ke.isEven();qe++)Se.iushrn(1),Ke.iushrn(1);for(;;){for(;Se.isEven();)Se.iushrn(1);for(;Ke.isEven();)Ke.iushrn(1);var Fe=Se.cmp(Ke);if(Fe<0){var $e=Se;Se=Ke,Ke=$e}else if(0===Fe||0===Ke.cmpn(1))break;Se.isub(Ke)}return Ke.iushln(qe)},n.prototype.invm=function(Ae){return this.egcd(Ae).a.umod(Ae)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(Ae){return this.words[0]&Ae},n.prototype.bincn=function(Ae){r("number"==typeof Ae);var Se=Ae%26,Ke=(Ae-Se)/26,qe=1<<Se;if(this.length<=Ke)return this._expand(Ke+1),this.words[Ke]|=qe,this;for(var Fe=qe,$e=Ke;0!==Fe&&$e<this.length;$e++){var rt=0|this.words[$e];Fe=(rt+=Fe)>>>26,rt&=67108863,this.words[$e]=rt}return 0!==Fe&&(this.words[$e]=Fe,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(Ae){var Se,Ke=Ae<0;if(0!==this.negative&&!Ke)return-1;if(0===this.negative&&Ke)return 1;if(this.strip(),this.length>1)Se=1;else{Ke&&(Ae=-Ae),r(Ae<=67108863,"Number is too big");var qe=0|this.words[0];Se=qe===Ae?0:qe<Ae?-1:1}return 0!==this.negative?0|-Se:Se},n.prototype.cmp=function(Ae){if(0!==this.negative&&0===Ae.negative)return-1;if(0===this.negative&&0!==Ae.negative)return 1;var Se=this.ucmp(Ae);return 0!==this.negative?0|-Se:Se},n.prototype.ucmp=function(Ae){if(this.length>Ae.length)return 1;if(this.length<Ae.length)return-1;for(var Se=0,Ke=this.length-1;Ke>=0;Ke--){var qe=0|this.words[Ke],Fe=0|Ae.words[Ke];if(qe!==Fe){qe<Fe?Se=-1:qe>Fe&&(Se=1);break}}return Se},n.prototype.gtn=function(Ae){return 1===this.cmpn(Ae)},n.prototype.gt=function(Ae){return 1===this.cmp(Ae)},n.prototype.gten=function(Ae){return this.cmpn(Ae)>=0},n.prototype.gte=function(Ae){return this.cmp(Ae)>=0},n.prototype.ltn=function(Ae){return-1===this.cmpn(Ae)},n.prototype.lt=function(Ae){return-1===this.cmp(Ae)},n.prototype.lten=function(Ae){return this.cmpn(Ae)<=0},n.prototype.lte=function(Ae){return this.cmp(Ae)<=0},n.prototype.eqn=function(Ae){return 0===this.cmpn(Ae)},n.prototype.eq=function(Ae){return 0===this.cmp(Ae)},n.red=function(Ae){return new k(Ae)},n.prototype.toRed=function(Ae){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),Ae.convertTo(this)._forceRed(Ae)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(Ae){return this.red=Ae,this},n.prototype.forceRed=function(Ae){return r(!this.red,"Already a number in reduction context"),this._forceRed(Ae)},n.prototype.redAdd=function(Ae){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,Ae)},n.prototype.redIAdd=function(Ae){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Ae)},n.prototype.redSub=function(Ae){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,Ae)},n.prototype.redISub=function(Ae){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,Ae)},n.prototype.redShl=function(Ae){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,Ae)},n.prototype.redMul=function(Ae){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ae),this.red.mul(this,Ae)},n.prototype.redIMul=function(Ae){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ae),this.red.imul(this,Ae)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(Ae){return r(this.red&&!Ae.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Ae)};var rt={k256:null,p224:null,p192:null,p25519:null};function m(Ae,Se){this.name=Ae,this.p=new n(Se,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(Ae){if("string"==typeof Ae){var Se=n._prime(Ae);this.m=Se.p,this.prime=Se}else r(Ae.gtn(1),"modulus must be greater than 1"),this.m=Ae,this.prime=null}function A(Ae){k.call(this,Ae),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var Ae=new n(null);return Ae.words=Array(Math.ceil(this.n/13)),Ae},m.prototype.ireduce=function(Ae){var Se,Ke=Ae;do{this.split(Ke,this.tmp),Se=(Ke=(Ke=this.imulK(Ke)).iadd(this.tmp)).bitLength()}while(Se>this.n);var qe=Se<this.n?-1:Ke.ucmp(this.p);return 0===qe?(Ke.words[0]=0,Ke.length=1):qe>0?Ke.isub(this.p):Ke.strip(),Ke},m.prototype.split=function(Ae,Se){Ae.iushrn(this.n,0,Se)},m.prototype.imulK=function(Ae){return Ae.imul(this.k)},i(g,m),g.prototype.split=function(Ae,Se){for(var Ke=4194303,qe=Math.min(Ae.length,9),Fe=0;Fe<qe;Fe++)Se.words[Fe]=Ae.words[Fe];if(Se.length=qe,Ae.length<=9)return Ae.words[0]=0,void(Ae.length=1);var $e=Ae.words[9];for(Se.words[Se.length++]=$e&Ke,Fe=10;Fe<Ae.length;Fe++){var rt=0|Ae.words[Fe];Ae.words[Fe-10]=(rt&Ke)<<4|$e>>>22,$e=rt}$e>>>=22,Ae.words[Fe-10]=$e,0===$e&&Ae.length>10?Ae.length-=10:Ae.length-=9},g.prototype.imulK=function(Ae){Ae.words[Ae.length]=0,Ae.words[Ae.length+1]=0,Ae.length+=2;for(var Se=0,Ke=0;Ke<Ae.length;Ke++){var qe=0|Ae.words[Ke];Se+=977*qe,Ae.words[Ke]=67108863&Se,Se=64*qe+(Se/67108864|0)}return 0===Ae.words[Ae.length-1]&&(Ae.length--,0===Ae.words[Ae.length-1]&&Ae.length--),Ae},i(w,m),i(v,m),i(_,m),_.prototype.imulK=function(Ae){for(var Se=0,Ke=0;Ke<Ae.length;Ke++){var qe=19*(0|Ae.words[Ke])+Se,Fe=67108863&qe;qe>>>=26,Ae.words[Ke]=Fe,Se=qe}return 0!==Se&&(Ae.words[Ae.length++]=Se),Ae},n._prime=function(Ae){if(rt[Ae])return rt[Ae];var Se;if("k256"===Ae)Se=new g;else if("p224"===Ae)Se=new w;else if("p192"===Ae)Se=new v;else{if("p25519"!==Ae)throw Error("Unknown prime "+Ae);Se=new _}return rt[Ae]=Se,Se},k.prototype._verify1=function(Ae){r(0===Ae.negative,"red works only with positives"),r(Ae.red,"red works only with red numbers")},k.prototype._verify2=function(Ae,Se){r(0==(Ae.negative|Se.negative),"red works only with positives"),r(Ae.red&&Ae.red===Se.red,"red works only with red numbers")},k.prototype.imod=function(Ae){return this.prime?this.prime.ireduce(Ae)._forceRed(this):Ae.umod(this.m)._forceRed(this)},k.prototype.neg=function(Ae){return Ae.isZero()?Ae.clone():this.m.sub(Ae)._forceRed(this)},k.prototype.add=function(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.add(Se);return Ke.cmp(this.m)>=0&&Ke.isub(this.m),Ke._forceRed(this)},k.prototype.iadd=function(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.iadd(Se);return Ke.cmp(this.m)>=0&&Ke.isub(this.m),Ke},k.prototype.sub=function(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.sub(Se);return Ke.cmpn(0)<0&&Ke.iadd(this.m),Ke._forceRed(this)},k.prototype.isub=function(Ae,Se){this._verify2(Ae,Se);var Ke=Ae.isub(Se);return Ke.cmpn(0)<0&&Ke.iadd(this.m),Ke},k.prototype.shl=function(Ae,Se){return this._verify1(Ae),this.imod(Ae.ushln(Se))},k.prototype.imul=function(Ae,Se){return this._verify2(Ae,Se),this.imod(Ae.imul(Se))},k.prototype.mul=function(Ae,Se){return this._verify2(Ae,Se),this.imod(Ae.mul(Se))},k.prototype.isqr=function(Ae){return this.imul(Ae,Ae.clone())},k.prototype.sqr=function(Ae){return this.mul(Ae,Ae)},k.prototype.sqrt=function(Ae){if(Ae.isZero())return Ae.clone();var Se=this.m.andln(3);if(r(Se%2==1),3===Se){var Ke=this.m.add(new n(1)).iushrn(2);return this.pow(Ae,Ke)}for(var qe=this.m.subn(1),Fe=0;!qe.isZero()&&0===qe.andln(1);)Fe++,qe.iushrn(1);r(!qe.isZero());var $e=new n(1).toRed(this),rt=$e.redNeg(),it=this.m.subn(1).iushrn(1),nt=this.m.bitLength();for(nt=new n(2*nt*nt).toRed(this);0!==this.pow(nt,it).cmp(rt);)nt.redIAdd(rt);for(var st=this.pow(nt,qe),ut=this.pow(Ae,qe.addn(1).iushrn(1)),ht=this.pow(Ae,qe),ft=Fe;0!==ht.cmp($e);){for(var yt=ht,mt=0;0!==yt.cmp($e);mt++)yt=yt.redSqr();r(mt<ft);var vt=this.pow(st,new n(1).iushln(ft-mt-1));ut=ut.redMul(vt),st=vt.redSqr(),ht=ht.redMul(st),ft=mt}return ut},k.prototype.invm=function(Ae){var Se=Ae._invmp(this.m);return 0!==Se.negative?(Se.negative=0,this.imod(Se).redNeg()):this.imod(Se)},k.prototype.pow=function(Ae,Se){if(Se.isZero())return new n(1).toRed(this);if(0===Se.cmpn(1))return Ae.clone();var Ke=Array(16);Ke[0]=new n(1).toRed(this),Ke[1]=Ae;for(var qe=2;qe<Ke.length;qe++)Ke[qe]=this.mul(Ke[qe-1],Ae);var Fe=Ke[0],$e=0,rt=0,it=Se.bitLength()%26;for(0===it&&(it=26),qe=Se.length-1;qe>=0;qe--){for(var nt=Se.words[qe],st=it-1;st>=0;st--){var ut=nt>>st&1;Fe!==Ke[0]&&(Fe=this.sqr(Fe)),0!==ut||0!==$e?($e<<=1,$e|=ut,(4===++rt||0===qe&&0===st)&&(Fe=this.mul(Fe,Ke[$e]),rt=0,$e=0)):rt=0}it=26}return Fe},k.prototype.convertTo=function(Ae){var Se=Ae.umod(this.m);return Se===Ae?Se.clone():Se},k.prototype.convertFrom=function(Ae){var Se=Ae.clone();return Se.red=null,Se},n.mont=function(Ae){return new A(Ae)},i(A,k),A.prototype.convertTo=function(Ae){return this.imod(Ae.ushln(this.shift))},A.prototype.convertFrom=function(Ae){var Se=this.imod(Ae.mul(this.rinv));return Se.red=null,Se},A.prototype.imul=function(Ae,Se){if(Ae.isZero()||Se.isZero())return Ae.words[0]=0,Ae.length=1,Ae;var Ke=Ae.imul(Se),qe=Ke.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Fe=Ke.isub(qe).iushrn(this.shift),$e=Fe;return Fe.cmp(this.m)>=0?$e=Fe.isub(this.m):Fe.cmpn(0)<0&&($e=Fe.iadd(this.m)),$e._forceRed(this)},A.prototype.mul=function(Ae,Se){if(Ae.isZero()||Se.isZero())return new n(0)._forceRed(this);var Ke=Ae.mul(Se),qe=Ke.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Fe=Ke.isub(qe).iushrn(this.shift),$e=Fe;return Fe.cmp(this.m)>=0?$e=Fe.isub(this.m):Fe.cmpn(0)<0&&($e=Fe.iadd(this.m)),$e._forceRed(this)},A.prototype.invm=function(Ae){return this.imod(Ae._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ae,Wr)})),nm=Object.freeze({__proto__:null,default:im,__moduleExports:im});class Wp{constructor(Ae){if(void 0===Ae)throw Error("Invalid BigInteger input");this.value=new im(Ae)}clone(){const Ae=new Wp(null);return this.value.copy(Ae.value),Ae}iinc(){return this.value.iadd(new im(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new im(1)),this}dec(){return this.clone().idec()}iadd(Ae){return this.value.iadd(Ae.value),this}add(Ae){return this.clone().iadd(Ae)}isub(Ae){return this.value.isub(Ae.value),this}sub(Ae){return this.clone().isub(Ae)}imul(Ae){return this.value.imul(Ae.value),this}mul(Ae){return this.clone().imul(Ae)}imod(Ae){return this.value=this.value.umod(Ae.value),this}mod(Ae){return this.clone().imod(Ae)}modExp(Ae,Se){const Ke=Se.isEven()?im.red(Se.value):im.mont(Se.value),qe=this.clone();return qe.value=qe.value.toRed(Ke).redPow(Ae.value).fromRed(),qe}modInv(Ae){if(!this.gcd(Ae).isOne())throw Error("Inverse does not exist");return new Wp(this.value.invm(Ae.value))}gcd(Ae){return new Wp(this.value.gcd(Ae.value))}ileftShift(Ae){return this.value.ishln(Ae.value.toNumber()),this}leftShift(Ae){return this.clone().ileftShift(Ae)}irightShift(Ae){return this.value.ishrn(Ae.value.toNumber()),this}rightShift(Ae){return this.clone().irightShift(Ae)}equal(Ae){return this.value.eq(Ae.value)}lt(Ae){return this.value.lt(Ae.value)}lte(Ae){return this.value.lte(Ae.value)}gt(Ae){return this.value.gt(Ae.value)}gte(Ae){return this.value.gte(Ae.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new im(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const Ae=this.clone();return Ae.value=Ae.value.abs(),Ae}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(Ae){return this.value.testn(Ae)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(Ae="be",Se){return this.value.toArrayLike(Uint8Array,Ae,Se)}}var sm,am=Object.freeze({__proto__:null,default:Wp}),om=gt((function(Ae,Se){var Ke=Se;function i(Ae){return 1===Ae.length?"0"+Ae:Ae}function n(Ae){for(var Se="",Ke=0;Ke<Ae.length;Ke++)Se+=i(Ae[Ke].toString(16));return Se}Ke.toArray=function(Ae,Se){if(Array.isArray(Ae))return Ae.slice();if(!Ae)return[];var Ke=[];if("string"!=typeof Ae){for(var qe=0;qe<Ae.length;qe++)Ke[qe]=0|Ae[qe];return Ke}if("hex"===Se){(Ae=Ae.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(Ae="0"+Ae);for(qe=0;qe<Ae.length;qe+=2)Ke.push(parseInt(Ae[qe]+Ae[qe+1],16))}else for(qe=0;qe<Ae.length;qe++){var Fe=Ae.charCodeAt(qe),$e=Fe>>8,rt=255&Fe;$e?Ke.push($e,rt):Ke.push(rt)}return Ke},Ke.zero2=i,Ke.toHex=n,Ke.encode=function(Ae,Se){return"hex"===Se?n(Ae):Ae}})),cm=gt((function(Ae,Se){var Ke=Se;Ke.assert=Lr,Ke.toArray=om.toArray,Ke.zero2=om.zero2,Ke.toHex=om.toHex,Ke.encode=om.encode,Ke.getNAF=function(Ae,Se){for(var Ke=[],qe=1<<Se+1,Fe=Ae.clone();Fe.cmpn(1)>=0;){var $e;if(Fe.isOdd()){var rt=Fe.andln(qe-1);$e=rt>(qe>>1)-1?(qe>>1)-rt:rt,Fe.isubn($e)}else $e=0;Ke.push($e);for(var it=0!==Fe.cmpn(0)&&0===Fe.andln(qe-1)?Se+1:1,nt=1;nt<it;nt++)Ke.push(0);Fe.iushrn(it)}return Ke},Ke.getJSF=function(Ae,Se){var Ke=[[],[]];Ae=Ae.clone(),Se=Se.clone();for(var qe=0,Fe=0;Ae.cmpn(-qe)>0||Se.cmpn(-Fe)>0;){var $e,rt,it,nt=Ae.andln(3)+qe&3,st=Se.andln(3)+Fe&3;if(3===nt&&(nt=-1),3===st&&(st=-1),0==(1&nt))$e=0;else $e=3!==(it=Ae.andln(7)+qe&7)&&5!==it||2!==st?nt:-nt;if(Ke[0].push($e),0==(1&st))rt=0;else rt=3!==(it=Se.andln(7)+Fe&7)&&5!==it||2!==nt?st:-st;Ke[1].push(rt),2*qe===$e+1&&(qe=1-qe),2*Fe===rt+1&&(Fe=1-Fe),Ae.iushrn(1),Se.iushrn(1)}return Ke},Ke.cachedProperty=function(Ae,Se,Ke){var qe="_"+Se;Ae.prototype[Se]=function(){return void 0!==this[qe]?this[qe]:this[qe]=Ke.call(this)}},Ke.parseBytes=function(Ae){return"string"==typeof Ae?Ke.toArray(Ae,"hex"):Ae},Ke.intFromLE=function(Ae){return new im(Ae,"hex","le")}})),Zp=function(Ae){return sm||(sm=new Yp(null)),sm.generate(Ae)};function Yp(Ae){this.rand=Ae}var um=Yp;if(Yp.prototype.generate=function(Ae){return this._rand(Ae)},Yp.prototype._rand=function(Ae){if(this.rand.getBytes)return this.rand.getBytes(Ae);for(var Se=new Uint8Array(Ae),Ke=0;Ke<Se.length;Ke++)Se[Ke]=this.rand.getByte();return Se},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Yp.prototype._rand=function(Ae){var Se=new Uint8Array(Ae);return self.crypto.getRandomValues(Se),Se}:self.msCrypto&&self.msCrypto.getRandomValues?Yp.prototype._rand=function(Ae){var Se=new Uint8Array(Ae);return self.msCrypto.getRandomValues(Se),Se}:"object"==typeof window&&(Yp.prototype._rand=function(){throw Error("Not implemented yet")});else try{var hm=yt.default;if("function"!=typeof hm.randomBytes)throw Error("Not supported");Yp.prototype._rand=function(Ae){return hm.randomBytes(Ae)}}catch(qe){}Zp.Rand=um;var fm=cm.getNAF,lm=cm.getJSF,dm=cm.assert;function ry(Ae,Se){this.type=Ae,this.p=new im(Se.p,16),this.red=Se.prime?im.red(Se.prime):im.mont(this.p),this.zero=new im(0).toRed(this.red),this.one=new im(1).toRed(this.red),this.two=new im(2).toRed(this.red),this.n=Se.n&&new im(Se.n,16),this.g=Se.g&&this.pointFromJSON(Se.g,Se.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var Ke=this.n&&this.p.div(this.n);!Ke||Ke.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pm=ry;function ny(Ae,Se){this.curve=Ae,this.type=Se,this.precomputed=null}ry.prototype.point=function(){throw Error("Not implemented")},ry.prototype.validate=function(){throw Error("Not implemented")},ry.prototype._fixedNafMul=function(Ae,Se){dm(Ae.precomputed);var Ke=Ae._getDoubles(),qe=fm(Se,1),Fe=(1<<Ke.step+1)-(Ke.step%2==0?2:1);Fe/=3;for(var $e=[],rt=0;rt<qe.length;rt+=Ke.step){var it=0;for(Se=rt+Ke.step-1;Se>=rt;Se--)it=(it<<1)+qe[Se];$e.push(it)}for(var nt=this.jpoint(null,null,null),st=this.jpoint(null,null,null),ut=Fe;ut>0;ut--){for(rt=0;rt<$e.length;rt++){(it=$e[rt])===ut?st=st.mixedAdd(Ke.points[rt]):it===-ut&&(st=st.mixedAdd(Ke.points[rt].neg()))}nt=nt.add(st)}return nt.toP()},ry.prototype._wnafMul=function(Ae,Se){var Ke=4,qe=Ae._getNAFPoints(Ke);Ke=qe.wnd;for(var Fe=qe.points,$e=fm(Se,Ke),rt=this.jpoint(null,null,null),it=$e.length-1;it>=0;it--){for(Se=0;it>=0&&0===$e[it];it--)Se++;if(it>=0&&Se++,rt=rt.dblp(Se),it<0)break;var nt=$e[it];dm(0!==nt),rt="affine"===Ae.type?nt>0?rt.mixedAdd(Fe[nt-1>>1]):rt.mixedAdd(Fe[-nt-1>>1].neg()):nt>0?rt.add(Fe[nt-1>>1]):rt.add(Fe[-nt-1>>1].neg())}return"affine"===Ae.type?rt.toP():rt},ry.prototype._wnafMulAdd=function(Ae,Se,Ke,qe,Fe){for(var $e=this._wnafT1,rt=this._wnafT2,it=this._wnafT3,nt=0,st=0;st<qe;st++){var ut=(jt=Se[st])._getNAFPoints(Ae);$e[st]=ut.wnd,rt[st]=ut.points}for(st=qe-1;st>=1;st-=2){var ht=st-1,ft=st;if(1===$e[ht]&&1===$e[ft]){var yt=[Se[ht],null,null,Se[ft]];0===Se[ht].y.cmp(Se[ft].y)?(yt[1]=Se[ht].add(Se[ft]),yt[2]=Se[ht].toJ().mixedAdd(Se[ft].neg())):0===Se[ht].y.cmp(Se[ft].y.redNeg())?(yt[1]=Se[ht].toJ().mixedAdd(Se[ft]),yt[2]=Se[ht].add(Se[ft].neg())):(yt[1]=Se[ht].toJ().mixedAdd(Se[ft]),yt[2]=Se[ht].toJ().mixedAdd(Se[ft].neg()));var mt=[-3,-1,-5,-7,0,7,5,1,3],vt=lm(Ke[ht],Ke[ft]);nt=Math.max(vt[0].length,nt),it[ht]=Array(nt),it[ft]=Array(nt);for(var _t=0;_t<nt;_t++){var Rt=0|vt[0][_t],Kt=0|vt[1][_t];it[ht][_t]=mt[3*(Rt+1)+(Kt+1)],it[ft][_t]=0,rt[ht]=yt}}else it[ht]=fm(Ke[ht],$e[ht]),it[ft]=fm(Ke[ft],$e[ft]),nt=Math.max(it[ht].length,nt),nt=Math.max(it[ft].length,nt)}var It=this.jpoint(null,null,null),Ut=this._wnafT4;for(st=nt;st>=0;st--){for(var Ot=0;st>=0;){var Nt=!0;for(_t=0;_t<qe;_t++)Ut[_t]=0|it[_t][st],0!==Ut[_t]&&(Nt=!1);if(!Nt)break;Ot++,st--}if(st>=0&&Ot++,It=It.dblp(Ot),st<0)break;for(_t=0;_t<qe;_t++){var jt,Ft=Ut[_t];0!==Ft&&(Ft>0?jt=rt[_t][Ft-1>>1]:Ft<0&&(jt=rt[_t][-Ft-1>>1].neg()),It="affine"===jt.type?It.mixedAdd(jt):It.add(jt))}}for(st=0;st<qe;st++)rt[st]=null;return Fe?It:It.toP()},ry.BasePoint=ny,ny.prototype.eq=function(){throw Error("Not implemented")},ny.prototype.validate=function(){return this.curve.validate(this)},ry.prototype.decodePoint=function(Ae,Se){Ae=cm.toArray(Ae,Se);var Ke=this.p.byteLength();if((4===Ae[0]||6===Ae[0]||7===Ae[0])&&Ae.length-1==2*Ke)return 6===Ae[0]?dm(Ae[Ae.length-1]%2==0):7===Ae[0]&&dm(Ae[Ae.length-1]%2==1),this.point(Ae.slice(1,1+Ke),Ae.slice(1+Ke,1+2*Ke));if((2===Ae[0]||3===Ae[0])&&Ae.length-1===Ke)return this.pointFromX(Ae.slice(1,1+Ke),3===Ae[0]);throw Error("Unknown point format")},ny.prototype.encodeCompressed=function(Ae){return this.encode(Ae,!0)},ny.prototype._encode=function(Ae){var Se=this.curve.p.byteLength(),Ke=this.getX().toArray("be",Se);return Ae?[this.getY().isEven()?2:3].concat(Ke):[4].concat(Ke,this.getY().toArray("be",Se))},ny.prototype.encode=function(Ae,Se){return cm.encode(this._encode(Se),Ae)},ny.prototype.precompute=function(Ae){if(this.precomputed)return this;var Se={doubles:null,naf:null,beta:null};return Se.naf=this._getNAFPoints(8),Se.doubles=this._getDoubles(4,Ae),Se.beta=this._getBeta(),this.precomputed=Se,this},ny.prototype._hasDoubles=function(Ae){if(!this.precomputed)return!1;var Se=this.precomputed.doubles;return!!Se&&Se.points.length>=Math.ceil((Ae.bitLength()+1)/Se.step)},ny.prototype._getDoubles=function(Ae,Se){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Ke=[this],qe=this,Fe=0;Fe<Se;Fe+=Ae){for(var $e=0;$e<Ae;$e++)qe=qe.dbl();Ke.push(qe)}return{step:Ae,points:Ke}},ny.prototype._getNAFPoints=function(Ae){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var Se=[this],Ke=(1<<Ae)-1,qe=1===Ke?null:this.dbl(),Fe=1;Fe<Ke;Fe++)Se[Fe]=Se[Fe-1].add(qe);return{wnd:Ae,points:Se}},ny.prototype._getBeta=function(){return null},ny.prototype.dblp=function(Ae){for(var Se=this,Ke=0;Ke<Ae;Ke++)Se=Se.dbl();return Se};var ym=cm.assert;function sy(Ae){pm.call(this,"short",Ae),this.a=new im(Ae.a,16).toRed(this.red),this.b=new im(Ae.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(Ae),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}ti(sy,pm);var mm=sy;function cy(Ae,Se,Ke,qe){pm.BasePoint.call(this,Ae,"affine"),null===Se&&null===Ke?(this.x=null,this.y=null,this.inf=!0):(this.x=new im(Se,16),this.y=new im(Ke,16),qe&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function uy(Ae,Se,Ke,qe){pm.BasePoint.call(this,Ae,"jacobian"),null===Se&&null===Ke&&null===qe?(this.x=this.curve.one,this.y=this.curve.one,this.z=new im(0)):(this.x=new im(Se,16),this.y=new im(Ke,16),this.z=new im(qe,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}function hy(Ae){pm.call(this,"mont",Ae),this.a=new im(Ae.a,16).toRed(this.red),this.b=new im(Ae.b,16).toRed(this.red),this.i4=new im(4).toRed(this.red).redInvm(),this.two=new im(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}sy.prototype._getEndomorphism=function(Ae){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var Se,Ke;if(Ae.beta)Se=new im(Ae.beta,16).toRed(this.red);else{var qe=this._getEndoRoots(this.p);Se=(Se=qe[0].cmp(qe[1])<0?qe[0]:qe[1]).toRed(this.red)}if(Ae.lambda)Ke=new im(Ae.lambda,16);else{var Fe=this._getEndoRoots(this.n);0===this.g.mul(Fe[0]).x.cmp(this.g.x.redMul(Se))?Ke=Fe[0]:(Ke=Fe[1],ym(0===this.g.mul(Ke).x.cmp(this.g.x.redMul(Se))))}return{beta:Se,lambda:Ke,basis:Ae.basis?Ae.basis.map((function(Ae){return{a:new im(Ae.a,16),b:new im(Ae.b,16)}})):this._getEndoBasis(Ke)}}},sy.prototype._getEndoRoots=function(Ae){var Se=Ae===this.p?this.red:im.mont(Ae),Ke=new im(2).toRed(Se).redInvm(),qe=Ke.redNeg(),Fe=new im(3).toRed(Se).redNeg().redSqrt().redMul(Ke);return[qe.redAdd(Fe).fromRed(),qe.redSub(Fe).fromRed()]},sy.prototype._getEndoBasis=function(Ae){for(var Se,Ke,qe,Fe,$e,rt,it,nt,st,ut=this.n.ushrn(Math.floor(this.n.bitLength()/2)),ht=Ae,ft=this.n.clone(),yt=new im(1),mt=new im(0),vt=new im(0),_t=new im(1),Rt=0;0!==ht.cmpn(0);){var Kt=ft.div(ht);nt=ft.sub(Kt.mul(ht)),st=vt.sub(Kt.mul(yt));var It=_t.sub(Kt.mul(mt));if(!qe&&nt.cmp(ut)<0)Se=it.neg(),Ke=yt,qe=nt.neg(),Fe=st;else if(qe&&2==++Rt)break;it=nt,ft=ht,ht=nt,vt=yt,yt=st,_t=mt,mt=It}$e=nt.neg(),rt=st;var Ut=qe.sqr().add(Fe.sqr());return $e.sqr().add(rt.sqr()).cmp(Ut)>=0&&($e=Se,rt=Ke),qe.negative&&(qe=qe.neg(),Fe=Fe.neg()),$e.negative&&($e=$e.neg(),rt=rt.neg()),[{a:qe,b:Fe},{a:$e,b:rt}]},sy.prototype._endoSplit=function(Ae){var Se=this.endo.basis,Ke=Se[0],qe=Se[1],Fe=qe.b.mul(Ae).divRound(this.n),$e=Ke.b.neg().mul(Ae).divRound(this.n),rt=Fe.mul(Ke.a),it=$e.mul(qe.a),nt=Fe.mul(Ke.b),st=$e.mul(qe.b);return{k1:Ae.sub(rt).sub(it),k2:nt.add(st).neg()}},sy.prototype.pointFromX=function(Ae,Se){(Ae=new im(Ae,16)).red||(Ae=Ae.toRed(this.red));var Ke=Ae.redSqr().redMul(Ae).redIAdd(Ae.redMul(this.a)).redIAdd(this.b),qe=Ke.redSqrt();if(0!==qe.redSqr().redSub(Ke).cmp(this.zero))throw Error("invalid point");var Fe=qe.fromRed().isOdd();return(Se&&!Fe||!Se&&Fe)&&(qe=qe.redNeg()),this.point(Ae,qe)},sy.prototype.validate=function(Ae){if(Ae.inf)return!0;var Se=Ae.x,Ke=Ae.y,qe=this.a.redMul(Se),Fe=Se.redSqr().redMul(Se).redIAdd(qe).redIAdd(this.b);return 0===Ke.redSqr().redISub(Fe).cmpn(0)},sy.prototype._endoWnafMulAdd=function(Ae,Se,Ke){for(var qe=this._endoWnafT1,Fe=this._endoWnafT2,$e=0;$e<Ae.length;$e++){var rt=this._endoSplit(Se[$e]),it=Ae[$e],nt=it._getBeta();rt.k1.negative&&(rt.k1.ineg(),it=it.neg(!0)),rt.k2.negative&&(rt.k2.ineg(),nt=nt.neg(!0)),qe[2*$e]=it,qe[2*$e+1]=nt,Fe[2*$e]=rt.k1,Fe[2*$e+1]=rt.k2}for(var st=this._wnafMulAdd(1,qe,Fe,2*$e,Ke),ut=0;ut<2*$e;ut++)qe[ut]=null,Fe[ut]=null;return st},ti(cy,pm.BasePoint),sy.prototype.point=function(Ae,Se,Ke){return new cy(this,Ae,Se,Ke)},sy.prototype.pointFromJSON=function(Ae,Se){return cy.fromJSON(this,Ae,Se)},cy.prototype._getBeta=function(){if(this.curve.endo){var Ae=this.precomputed;if(Ae&&Ae.beta)return Ae.beta;var Se=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(Ae){var Ke=this.curve,i=function(Ae){return Ke.point(Ae.x.redMul(Ke.endo.beta),Ae.y)};Ae.beta=Se,Se.precomputed={beta:null,naf:Ae.naf&&{wnd:Ae.naf.wnd,points:Ae.naf.points.map(i)},doubles:Ae.doubles&&{step:Ae.doubles.step,points:Ae.doubles.points.map(i)}}}return Se}},cy.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},cy.fromJSON=function(Ae,Se,Ke){"string"==typeof Se&&(Se=JSON.parse(Se));var qe=Ae.point(Se[0],Se[1],Ke);if(!Se[2])return qe;function n(Se){return Ae.point(Se[0],Se[1],Ke)}var Fe=Se[2];return qe.precomputed={beta:null,doubles:Fe.doubles&&{step:Fe.doubles.step,points:[qe].concat(Fe.doubles.points.map(n))},naf:Fe.naf&&{wnd:Fe.naf.wnd,points:[qe].concat(Fe.naf.points.map(n))}},qe},cy.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},cy.prototype.isInfinity=function(){return this.inf},cy.prototype.add=function(Ae){if(this.inf)return Ae;if(Ae.inf)return this;if(this.eq(Ae))return this.dbl();if(this.neg().eq(Ae))return this.curve.point(null,null);if(0===this.x.cmp(Ae.x))return this.curve.point(null,null);var Se=this.y.redSub(Ae.y);0!==Se.cmpn(0)&&(Se=Se.redMul(this.x.redSub(Ae.x).redInvm()));var Ke=Se.redSqr().redISub(this.x).redISub(Ae.x),qe=Se.redMul(this.x.redSub(Ke)).redISub(this.y);return this.curve.point(Ke,qe)},cy.prototype.dbl=function(){if(this.inf)return this;var Ae=this.y.redAdd(this.y);if(0===Ae.cmpn(0))return this.curve.point(null,null);var Se=this.curve.a,Ke=this.x.redSqr(),qe=Ae.redInvm(),Fe=Ke.redAdd(Ke).redIAdd(Ke).redIAdd(Se).redMul(qe),$e=Fe.redSqr().redISub(this.x.redAdd(this.x)),rt=Fe.redMul(this.x.redSub($e)).redISub(this.y);return this.curve.point($e,rt)},cy.prototype.getX=function(){return this.x.fromRed()},cy.prototype.getY=function(){return this.y.fromRed()},cy.prototype.mul=function(Ae){return Ae=new im(Ae,16),this.isInfinity()?this:this._hasDoubles(Ae)?this.curve._fixedNafMul(this,Ae):this.curve.endo?this.curve._endoWnafMulAdd([this],[Ae]):this.curve._wnafMul(this,Ae)},cy.prototype.mulAdd=function(Ae,Se,Ke){var qe=[this,Se],Fe=[Ae,Ke];return this.curve.endo?this.curve._endoWnafMulAdd(qe,Fe):this.curve._wnafMulAdd(1,qe,Fe,2)},cy.prototype.jmulAdd=function(Ae,Se,Ke){var qe=[this,Se],Fe=[Ae,Ke];return this.curve.endo?this.curve._endoWnafMulAdd(qe,Fe,!0):this.curve._wnafMulAdd(1,qe,Fe,2,!0)},cy.prototype.eq=function(Ae){return this===Ae||this.inf===Ae.inf&&(this.inf||0===this.x.cmp(Ae.x)&&0===this.y.cmp(Ae.y))},cy.prototype.neg=function(Ae){if(this.inf)return this;var Se=this.curve.point(this.x,this.y.redNeg());if(Ae&&this.precomputed){var Ke=this.precomputed,i=function(Ae){return Ae.neg()};Se.precomputed={naf:Ke.naf&&{wnd:Ke.naf.wnd,points:Ke.naf.points.map(i)},doubles:Ke.doubles&&{step:Ke.doubles.step,points:Ke.doubles.points.map(i)}}}return Se},cy.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},ti(uy,pm.BasePoint),sy.prototype.jpoint=function(Ae,Se,Ke){return new uy(this,Ae,Se,Ke)},uy.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var Ae=this.z.redInvm(),Se=Ae.redSqr(),Ke=this.x.redMul(Se),qe=this.y.redMul(Se).redMul(Ae);return this.curve.point(Ke,qe)},uy.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},uy.prototype.add=function(Ae){if(this.isInfinity())return Ae;if(Ae.isInfinity())return this;var Se=Ae.z.redSqr(),Ke=this.z.redSqr(),qe=this.x.redMul(Se),Fe=Ae.x.redMul(Ke),$e=this.y.redMul(Se.redMul(Ae.z)),rt=Ae.y.redMul(Ke.redMul(this.z)),it=qe.redSub(Fe),nt=$e.redSub(rt);if(0===it.cmpn(0))return 0!==nt.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var st=it.redSqr(),ut=st.redMul(it),ht=qe.redMul(st),ft=nt.redSqr().redIAdd(ut).redISub(ht).redISub(ht),yt=nt.redMul(ht.redISub(ft)).redISub($e.redMul(ut)),mt=this.z.redMul(Ae.z).redMul(it);return this.curve.jpoint(ft,yt,mt)},uy.prototype.mixedAdd=function(Ae){if(this.isInfinity())return Ae.toJ();if(Ae.isInfinity())return this;var Se=this.z.redSqr(),Ke=this.x,qe=Ae.x.redMul(Se),Fe=this.y,$e=Ae.y.redMul(Se).redMul(this.z),rt=Ke.redSub(qe),it=Fe.redSub($e);if(0===rt.cmpn(0))return 0!==it.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var nt=rt.redSqr(),st=nt.redMul(rt),ut=Ke.redMul(nt),ht=it.redSqr().redIAdd(st).redISub(ut).redISub(ut),ft=it.redMul(ut.redISub(ht)).redISub(Fe.redMul(st)),yt=this.z.redMul(rt);return this.curve.jpoint(ht,ft,yt)},uy.prototype.dblp=function(Ae){if(0===Ae)return this;if(this.isInfinity())return this;if(!Ae)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var Se=this,Ke=0;Ke<Ae;Ke++)Se=Se.dbl();return Se}var qe=this.curve.a,Fe=this.curve.tinv,$e=this.x,rt=this.y,it=this.z,nt=it.redSqr().redSqr(),st=rt.redAdd(rt);for(Ke=0;Ke<Ae;Ke++){var ut=$e.redSqr(),ht=st.redSqr(),ft=ht.redSqr(),yt=ut.redAdd(ut).redIAdd(ut).redIAdd(qe.redMul(nt)),mt=$e.redMul(ht),vt=yt.redSqr().redISub(mt.redAdd(mt)),_t=mt.redISub(vt),Rt=yt.redMul(_t);Rt=Rt.redIAdd(Rt).redISub(ft);var Kt=st.redMul(it);Ke+1<Ae&&(nt=nt.redMul(ft)),$e=vt,it=Kt,st=Rt}return this.curve.jpoint($e,st.redMul(Fe),it)},uy.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},uy.prototype._zeroDbl=function(){var Ae,Se,Ke;if(this.zOne){var qe=this.x.redSqr(),Fe=this.y.redSqr(),$e=Fe.redSqr(),rt=this.x.redAdd(Fe).redSqr().redISub(qe).redISub($e);rt=rt.redIAdd(rt);var it=qe.redAdd(qe).redIAdd(qe),nt=it.redSqr().redISub(rt).redISub(rt),st=$e.redIAdd($e);st=(st=st.redIAdd(st)).redIAdd(st),Ae=nt,Se=it.redMul(rt.redISub(nt)).redISub(st),Ke=this.y.redAdd(this.y)}else{var ut=this.x.redSqr(),ht=this.y.redSqr(),ft=ht.redSqr(),yt=this.x.redAdd(ht).redSqr().redISub(ut).redISub(ft);yt=yt.redIAdd(yt);var mt=ut.redAdd(ut).redIAdd(ut),vt=mt.redSqr(),_t=ft.redIAdd(ft);_t=(_t=_t.redIAdd(_t)).redIAdd(_t),Ae=vt.redISub(yt).redISub(yt),Se=mt.redMul(yt.redISub(Ae)).redISub(_t),Ke=(Ke=this.y.redMul(this.z)).redIAdd(Ke)}return this.curve.jpoint(Ae,Se,Ke)},uy.prototype._threeDbl=function(){var Ae,Se,Ke;if(this.zOne){var qe=this.x.redSqr(),Fe=this.y.redSqr(),$e=Fe.redSqr(),rt=this.x.redAdd(Fe).redSqr().redISub(qe).redISub($e);rt=rt.redIAdd(rt);var it=qe.redAdd(qe).redIAdd(qe).redIAdd(this.curve.a),nt=it.redSqr().redISub(rt).redISub(rt);Ae=nt;var st=$e.redIAdd($e);st=(st=st.redIAdd(st)).redIAdd(st),Se=it.redMul(rt.redISub(nt)).redISub(st),Ke=this.y.redAdd(this.y)}else{var ut=this.z.redSqr(),ht=this.y.redSqr(),ft=this.x.redMul(ht),yt=this.x.redSub(ut).redMul(this.x.redAdd(ut));yt=yt.redAdd(yt).redIAdd(yt);var mt=ft.redIAdd(ft),vt=(mt=mt.redIAdd(mt)).redAdd(mt);Ae=yt.redSqr().redISub(vt),Ke=this.y.redAdd(this.z).redSqr().redISub(ht).redISub(ut);var _t=ht.redSqr();_t=(_t=(_t=_t.redIAdd(_t)).redIAdd(_t)).redIAdd(_t),Se=yt.redMul(mt.redISub(Ae)).redISub(_t)}return this.curve.jpoint(Ae,Se,Ke)},uy.prototype._dbl=function(){var Ae=this.curve.a,Se=this.x,Ke=this.y,qe=this.z,Fe=qe.redSqr().redSqr(),$e=Se.redSqr(),rt=Ke.redSqr(),it=$e.redAdd($e).redIAdd($e).redIAdd(Ae.redMul(Fe)),nt=Se.redAdd(Se),st=(nt=nt.redIAdd(nt)).redMul(rt),ut=it.redSqr().redISub(st.redAdd(st)),ht=st.redISub(ut),ft=rt.redSqr();ft=(ft=(ft=ft.redIAdd(ft)).redIAdd(ft)).redIAdd(ft);var yt=it.redMul(ht).redISub(ft),mt=Ke.redAdd(Ke).redMul(qe);return this.curve.jpoint(ut,yt,mt)},uy.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var Ae=this.x.redSqr(),Se=this.y.redSqr(),Ke=this.z.redSqr(),qe=Se.redSqr(),Fe=Ae.redAdd(Ae).redIAdd(Ae),$e=Fe.redSqr(),rt=this.x.redAdd(Se).redSqr().redISub(Ae).redISub(qe),it=(rt=(rt=(rt=rt.redIAdd(rt)).redAdd(rt).redIAdd(rt)).redISub($e)).redSqr(),nt=qe.redIAdd(qe);nt=(nt=(nt=nt.redIAdd(nt)).redIAdd(nt)).redIAdd(nt);var st=Fe.redIAdd(rt).redSqr().redISub($e).redISub(it).redISub(nt),ut=Se.redMul(st);ut=(ut=ut.redIAdd(ut)).redIAdd(ut);var ht=this.x.redMul(it).redISub(ut);ht=(ht=ht.redIAdd(ht)).redIAdd(ht);var ft=this.y.redMul(st.redMul(nt.redISub(st)).redISub(rt.redMul(it)));ft=(ft=(ft=ft.redIAdd(ft)).redIAdd(ft)).redIAdd(ft);var yt=this.z.redAdd(rt).redSqr().redISub(Ke).redISub(it);return this.curve.jpoint(ht,ft,yt)},uy.prototype.mul=function(Ae,Se){return Ae=new im(Ae,Se),this.curve._wnafMul(this,Ae)},uy.prototype.eq=function(Ae){if("affine"===Ae.type)return this.eq(Ae.toJ());if(this===Ae)return!0;var Se=this.z.redSqr(),Ke=Ae.z.redSqr();if(0!==this.x.redMul(Ke).redISub(Ae.x.redMul(Se)).cmpn(0))return!1;var qe=Se.redMul(this.z),Fe=Ke.redMul(Ae.z);return 0===this.y.redMul(Fe).redISub(Ae.y.redMul(qe)).cmpn(0)},uy.prototype.eqXToP=function(Ae){var Se=this.z.redSqr(),Ke=Ae.toRed(this.curve.red).redMul(Se);if(0===this.x.cmp(Ke))return!0;for(var qe=Ae.clone(),Fe=this.curve.redN.redMul(Se);;){if(qe.iadd(this.curve.n),qe.cmp(this.curve.p)>=0)return!1;if(Ke.redIAdd(Fe),0===this.x.cmp(Ke))return!0}},uy.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},uy.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},ti(hy,pm);var gm=hy;function fy(Ae,Se,Ke){pm.BasePoint.call(this,Ae,"projective"),null===Se&&null===Ke?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new im(Se,16),this.z=new im(Ke,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}hy.prototype.validate=function(Ae){var Se=Ae.normalize().x,Ke=Se.redSqr(),qe=Ke.redMul(Se).redAdd(Ke.redMul(this.a)).redAdd(Se);return 0===qe.redSqrt().redSqr().cmp(qe)},ti(fy,pm.BasePoint),hy.prototype.decodePoint=function(Ae,Se){if(33===(Ae=cm.toArray(Ae,Se)).length&&64===Ae[0]&&(Ae=Ae.slice(1,33).reverse()),32!==Ae.length)throw Error("Unknown point compression format");return this.point(Ae,1)},hy.prototype.point=function(Ae,Se){return new fy(this,Ae,Se)},hy.prototype.pointFromJSON=function(Ae){return fy.fromJSON(this,Ae)},fy.prototype.precompute=function(){},fy.prototype._encode=function(Ae){var Se=this.curve.p.byteLength();return Ae?[64].concat(this.getX().toArray("le",Se)):this.getX().toArray("be",Se)},fy.fromJSON=function(Ae,Se){return new fy(Ae,Se[0],Se[1]||Ae.one)},fy.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},fy.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},fy.prototype.dbl=function(){var Ae=this.x.redAdd(this.z).redSqr(),Se=this.x.redSub(this.z).redSqr(),Ke=Ae.redSub(Se),qe=Ae.redMul(Se),Fe=Ke.redMul(Se.redAdd(this.curve.a24.redMul(Ke)));return this.curve.point(qe,Fe)},fy.prototype.add=function(){throw Error("Not supported on Montgomery curve")},fy.prototype.diffAdd=function(Ae,Se){var Ke=this.x.redAdd(this.z),qe=this.x.redSub(this.z),Fe=Ae.x.redAdd(Ae.z),$e=Ae.x.redSub(Ae.z).redMul(Ke),rt=Fe.redMul(qe),it=Se.z.redMul($e.redAdd(rt).redSqr()),nt=Se.x.redMul($e.redISub(rt).redSqr());return this.curve.point(it,nt)},fy.prototype.mul=function(Ae){for(var Se=(Ae=new im(Ae,16)).clone(),Ke=this,qe=this.curve.point(null,null),Fe=[];0!==Se.cmpn(0);Se.iushrn(1))Fe.push(Se.andln(1));for(var $e=Fe.length-1;$e>=0;$e--)0===Fe[$e]?(Ke=Ke.diffAdd(qe,this),qe=qe.dbl()):(qe=Ke.diffAdd(qe,this),Ke=Ke.dbl());return qe},fy.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},fy.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},fy.prototype.eq=function(Ae){return 0===this.getX().cmp(Ae.getX())},fy.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},fy.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var bm=cm.assert;function py(Ae){this.twisted=1!=(0|Ae.a),this.mOneA=this.twisted&&-1==(0|Ae.a),this.extended=this.mOneA,pm.call(this,"edwards",Ae),this.a=new im(Ae.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new im(Ae.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new im(Ae.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),bm(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|Ae.c)}ti(py,pm);var vm=py;function by(Ae,Se,Ke,qe,Fe){pm.BasePoint.call(this,Ae,"projective"),null===Se&&null===Ke&&null===qe?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new im(Se,16),this.y=new im(Ke,16),this.z=qe?new im(qe,16):this.curve.one,this.t=Fe&&new im(Fe,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}py.prototype._mulA=function(Ae){return this.mOneA?Ae.redNeg():this.a.redMul(Ae)},py.prototype._mulC=function(Ae){return this.oneC?Ae:this.c.redMul(Ae)},py.prototype.jpoint=function(Ae,Se,Ke,qe){return this.point(Ae,Se,Ke,qe)},py.prototype.pointFromX=function(Ae,Se){(Ae=new im(Ae,16)).red||(Ae=Ae.toRed(this.red));var Ke=Ae.redSqr(),qe=this.c2.redSub(this.a.redMul(Ke)),Fe=this.one.redSub(this.c2.redMul(this.d).redMul(Ke)),$e=qe.redMul(Fe.redInvm()),rt=$e.redSqrt();if(0!==rt.redSqr().redSub($e).cmp(this.zero))throw Error("invalid point");var it=rt.fromRed().isOdd();return(Se&&!it||!Se&&it)&&(rt=rt.redNeg()),this.point(Ae,rt)},py.prototype.pointFromY=function(Ae,Se){(Ae=new im(Ae,16)).red||(Ae=Ae.toRed(this.red));var Ke=Ae.redSqr(),qe=Ke.redSub(this.c2),Fe=Ke.redMul(this.d).redMul(this.c2).redSub(this.a),$e=qe.redMul(Fe.redInvm());if(0===$e.cmp(this.zero)){if(Se)throw Error("invalid point");return this.point(this.zero,Ae)}var rt=$e.redSqrt();if(0!==rt.redSqr().redSub($e).cmp(this.zero))throw Error("invalid point");return rt.fromRed().isOdd()!==Se&&(rt=rt.redNeg()),this.point(rt,Ae)},py.prototype.validate=function(Ae){if(Ae.isInfinity())return!0;Ae.normalize();var Se=Ae.x.redSqr(),Ke=Ae.y.redSqr(),qe=Se.redMul(this.a).redAdd(Ke),Fe=this.c2.redMul(this.one.redAdd(this.d.redMul(Se).redMul(Ke)));return 0===qe.cmp(Fe)},ti(by,pm.BasePoint),py.prototype.pointFromJSON=function(Ae){return by.fromJSON(this,Ae)},py.prototype.point=function(Ae,Se,Ke,qe){return new by(this,Ae,Se,Ke,qe)},by.fromJSON=function(Ae,Se){return new by(Ae,Se[0],Se[1],Se[2])},by.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},by.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},by.prototype._extDbl=function(){var Ae=this.x.redSqr(),Se=this.y.redSqr(),Ke=this.z.redSqr();Ke=Ke.redIAdd(Ke);var qe=this.curve._mulA(Ae),Fe=this.x.redAdd(this.y).redSqr().redISub(Ae).redISub(Se),$e=qe.redAdd(Se),rt=$e.redSub(Ke),it=qe.redSub(Se),nt=Fe.redMul(rt),st=$e.redMul(it),ut=Fe.redMul(it),ht=rt.redMul($e);return this.curve.point(nt,st,ht,ut)},by.prototype._projDbl=function(){var Ae,Se,Ke,qe=this.x.redAdd(this.y).redSqr(),Fe=this.x.redSqr(),$e=this.y.redSqr();if(this.curve.twisted){var rt=(st=this.curve._mulA(Fe)).redAdd($e);if(this.zOne)Ae=qe.redSub(Fe).redSub($e).redMul(rt.redSub(this.curve.two)),Se=rt.redMul(st.redSub($e)),Ke=rt.redSqr().redSub(rt).redSub(rt);else{var it=this.z.redSqr(),nt=rt.redSub(it).redISub(it);Ae=qe.redSub(Fe).redISub($e).redMul(nt),Se=rt.redMul(st.redSub($e)),Ke=rt.redMul(nt)}}else{var st=Fe.redAdd($e);it=this.curve._mulC(this.z).redSqr(),nt=st.redSub(it).redSub(it);Ae=this.curve._mulC(qe.redISub(st)).redMul(nt),Se=this.curve._mulC(st).redMul(Fe.redISub($e)),Ke=st.redMul(nt)}return this.curve.point(Ae,Se,Ke)},by.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},by.prototype._extAdd=function(Ae){var Se=this.y.redSub(this.x).redMul(Ae.y.redSub(Ae.x)),Ke=this.y.redAdd(this.x).redMul(Ae.y.redAdd(Ae.x)),qe=this.t.redMul(this.curve.dd).redMul(Ae.t),Fe=this.z.redMul(Ae.z.redAdd(Ae.z)),$e=Ke.redSub(Se),rt=Fe.redSub(qe),it=Fe.redAdd(qe),nt=Ke.redAdd(Se),st=$e.redMul(rt),ut=it.redMul(nt),ht=$e.redMul(nt),ft=rt.redMul(it);return this.curve.point(st,ut,ft,ht)},by.prototype._projAdd=function(Ae){var Se,Ke,qe=this.z.redMul(Ae.z),Fe=qe.redSqr(),$e=this.x.redMul(Ae.x),rt=this.y.redMul(Ae.y),it=this.curve.d.redMul($e).redMul(rt),nt=Fe.redSub(it),st=Fe.redAdd(it),ut=this.x.redAdd(this.y).redMul(Ae.x.redAdd(Ae.y)).redISub($e).redISub(rt),ht=qe.redMul(nt).redMul(ut);return this.curve.twisted?(Se=qe.redMul(st).redMul(rt.redSub(this.curve._mulA($e))),Ke=nt.redMul(st)):(Se=qe.redMul(st).redMul(rt.redSub($e)),Ke=this.curve._mulC(nt).redMul(st)),this.curve.point(ht,Se,Ke)},by.prototype.add=function(Ae){return this.isInfinity()?Ae:Ae.isInfinity()?this:this.curve.extended?this._extAdd(Ae):this._projAdd(Ae)},by.prototype.mul=function(Ae){return this._hasDoubles(Ae)?this.curve._fixedNafMul(this,Ae):this.curve._wnafMul(this,Ae)},by.prototype.mulAdd=function(Ae,Se,Ke){return this.curve._wnafMulAdd(1,[this,Se],[Ae,Ke],2,!1)},by.prototype.jmulAdd=function(Ae,Se,Ke){return this.curve._wnafMulAdd(1,[this,Se],[Ae,Ke],2,!0)},by.prototype.normalize=function(){if(this.zOne)return this;var Ae=this.z.redInvm();return this.x=this.x.redMul(Ae),this.y=this.y.redMul(Ae),this.t&&(this.t=this.t.redMul(Ae)),this.z=this.curve.one,this.zOne=!0,this},by.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},by.prototype.getX=function(){return this.normalize(),this.x.fromRed()},by.prototype.getY=function(){return this.normalize(),this.y.fromRed()},by.prototype.eq=function(Ae){return this===Ae||0===this.getX().cmp(Ae.getX())&&0===this.getY().cmp(Ae.getY())},by.prototype.eqXToP=function(Ae){var Se=Ae.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(Se))return!0;for(var Ke=Ae.clone(),qe=this.curve.redN.redMul(this.z);;){if(Ke.iadd(this.curve.n),Ke.cmp(this.curve.p)>=0)return!1;if(Se.redIAdd(qe),0===this.x.cmp(Se))return!0}},by.prototype.toP=by.prototype.normalize,by.prototype.mixedAdd=by.prototype.add;var wm=gt((function(Ae,Se){var Ke=Se;Ke.base=pm,Ke.short=mm,Ke.mont=gm,Ke.edwards=vm})),_m=ri.rotl32,km=ri.sum32,Am=ri.sum32_5,Sm=fi.ft_1,Em=oi.BlockHash,Mm=[1518500249,1859775393,2400959708,3395469782];function Sy(){if(!(this instanceof Sy))return new Sy;Em.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}ri.inherits(Sy,Em);var Pm=Sy;Sy.blockSize=512,Sy.outSize=160,Sy.hmacStrength=80,Sy.padLength=64,Sy.prototype._update=function(Ae,Se){for(var Ke=this.W,qe=0;qe<16;qe++)Ke[qe]=Ae[Se+qe];for(;qe<Ke.length;qe++)Ke[qe]=_m(Ke[qe-3]^Ke[qe-8]^Ke[qe-14]^Ke[qe-16],1);var Fe=this.h[0],$e=this.h[1],rt=this.h[2],it=this.h[3],nt=this.h[4];for(qe=0;qe<Ke.length;qe++){var st=~~(qe/20),ut=Am(_m(Fe,5),Sm(st,$e,rt,it),nt,Ke[qe],Mm[st]);nt=it,it=rt,rt=_m($e,30),$e=Fe,Fe=ut}this.h[0]=km(this.h[0],Fe),this.h[1]=km(this.h[1],$e),this.h[2]=km(this.h[2],rt),this.h[3]=km(this.h[3],it),this.h[4]=km(this.h[4],nt)},Sy.prototype._digest=function(Ae){return"hex"===Ae?ri.toHex32(this.h,"big"):ri.split32(this.h,"big")};var xm={sha1:Pm,sha224:xi,sha256:Pi,sha384:Xi,sha512:Zi};function xy(Ae,Se,Ke){if(!(this instanceof xy))return new xy(Ae,Se,Ke);this.Hash=Ae,this.blockSize=Ae.blockSize/8,this.outSize=Ae.outSize/8,this.inner=null,this.outer=null,this._init(ri.toArray(Se,Ke))}var Cm=xy;xy.prototype._init=function(Ae){Ae.length>this.blockSize&&(Ae=(new this.Hash).update(Ae).digest()),Lr(Ae.length<=this.blockSize);for(var Se=Ae.length;Se<this.blockSize;Se++)Ae.push(0);for(Se=0;Se<Ae.length;Se++)Ae[Se]^=54;for(this.inner=(new this.Hash).update(Ae),Se=0;Se<Ae.length;Se++)Ae[Se]^=106;this.outer=(new this.Hash).update(Ae)},xy.prototype.update=function(Ae,Se){return this.inner.update(Ae,Se),this},xy.prototype.digest=function(Ae){return this.outer.update(this.inner.digest()),this.outer.digest(Ae)};var Bm=gt((function(Ae,Se){var Ke=Se;Ke.utils=ri,Ke.common=oi,Ke.sha=xm,Ke.ripemd=gn,Ke.hmac=Cm,Ke.sha1=Ke.sha.sha1,Ke.sha256=Ke.sha.sha256,Ke.sha224=Ke.sha.sha224,Ke.sha384=Ke.sha.sha384,Ke.sha512=Ke.sha.sha512,Ke.ripemd160=Ke.ripemd.ripemd160})),Rm={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}},Dm=gt((function(Ae,Se){var Ke,qe=Se,Fe=cm.assert;function a(Ae){if("short"===Ae.type)this.curve=new wm.short(Ae);else if("edwards"===Ae.type)this.curve=new wm.edwards(Ae);else{if("mont"!==Ae.type)throw Error("Unknown curve type.");this.curve=new wm.mont(Ae)}this.g=this.curve.g,this.n=this.curve.n,this.hash=Ae.hash,Fe(this.g.validate(),"Invalid curve"),Fe(this.g.mul(this.n).isInfinity(),"Invalid curve, n*G != O")}function s(Ae,Se){Object.defineProperty(qe,Ae,{configurable:!0,enumerable:!0,get:function(){var Ke=new a(Se);return Object.defineProperty(qe,Ae,{configurable:!0,enumerable:!0,value:Ke}),Ke}})}qe.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Bm.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Bm.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Bm.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Bm.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Bm.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",cofactor:"8",hash:Bm.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",cofactor:"8",hash:Bm.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]}),s("brainpoolP256r1",{type:"short",prime:null,p:"A9FB57DB A1EEA9BC 3E660A90 9D838D72 6E3BF623 D5262028 2013481D 1F6E5377",a:"7D5A0975 FC2C3057 EEF67530 417AFFE7 FB8055C1 26DC5C6C E94A4B44 F330B5D9",b:"26DC5C6C E94A4B44 F330B5D9 BBD77CBF 95841629 5CF7E1CE 6BCCDC18 FF8C07B6",n:"A9FB57DB A1EEA9BC 3E660A90 9D838D71 8C397AA3 B561A6F7 901E0E82 974856A7",hash:Bm.sha256,gRed:!1,g:["8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262","547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997"]}),s("brainpoolP384r1",{type:"short",prime:null,p:"8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B4 12B1DA19 7FB71123ACD3A729 901D1A71 87470013 3107EC53",a:"7BC382C6 3D8C150C 3C72080A CE05AFA0 C2BEA28E 4FB22787 139165EF BA91F90F8AA5814A 503AD4EB 04A8C7DD 22CE2826",b:"04A8C7DD 22CE2826 8B39B554 16F0447C 2FB77DE1 07DCD2A6 2E880EA5 3EEB62D57CB43902 95DBC994 3AB78696 FA504C11",n:"8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B3 1F166E6C AC0425A7CF3AB6AF 6B7FC310 3B883202 E9046565",hash:Bm.sha384,gRed:!1,g:["1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E","8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315"]}),s("brainpoolP512r1",{type:"short",prime:null,p:"AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 703308717D4D9B00 9BC66842 AECDA12A E6A380E6 2881FF2F 2D82C685 28AA6056 583A48F3",a:"7830A331 8B603B89 E2327145 AC234CC5 94CBDD8D 3DF91610 A83441CA EA9863BC2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A7 2BF2C7B9 E7C1AC4D 77FC94CA",b:"3DF91610 A83441CA EA9863BC 2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A72BF2C7B9 E7C1AC4D 77FC94CA DC083E67 984050B7 5EBAE5DD 2809BD63 8016F723",n:"AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 70330870553E5C41 4CA92619 41866119 7FAC1047 1DB1D381 085DDADD B5879682 9CA90069",hash:Bm.sha512,gRed:!1,g:["81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822","7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892"]});try{Ke=Rm}catch(Ae){Ke=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Bm.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Ke]})}));function Ry(Ae){if(!(this instanceof Ry))return new Ry(Ae);this.hash=Ae.hash,this.predResist=!!Ae.predResist,this.outLen=this.hash.outSize,this.minEntropy=Ae.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var Se=om.toArray(Ae.entropy,Ae.entropyEnc||"hex"),Ke=om.toArray(Ae.nonce,Ae.nonceEnc||"hex"),qe=om.toArray(Ae.pers,Ae.persEnc||"hex");Lr(Se.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(Se,Ke,qe)}var Tm=Ry;Ry.prototype._init=function(Ae,Se,Ke){var qe=Ae.concat(Se).concat(Ke);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var Fe=0;Fe<this.V.length;Fe++)this.K[Fe]=0,this.V[Fe]=1;this._update(qe),this._reseed=1,this.reseedInterval=281474976710656},Ry.prototype._hmac=function(){return new Bm.hmac(this.hash,this.K)},Ry.prototype._update=function(Ae){var Se=this._hmac().update(this.V).update([0]);Ae&&(Se=Se.update(Ae)),this.K=Se.digest(),this.V=this._hmac().update(this.V).digest(),Ae&&(this.K=this._hmac().update(this.V).update([1]).update(Ae).digest(),this.V=this._hmac().update(this.V).digest())},Ry.prototype.reseed=function(Ae,Se,Ke,qe){"string"!=typeof Se&&(qe=Ke,Ke=Se,Se=null),Ae=om.toArray(Ae,Se),Ke=om.toArray(Ke,qe),Lr(Ae.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(Ae.concat(Ke||[])),this._reseed=1},Ry.prototype.generate=function(Ae,Se,Ke,qe){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof Se&&(qe=Ke,Ke=Se,Se=null),Ke&&(Ke=om.toArray(Ke,qe||"hex"),this._update(Ke));for(var Fe=[];Fe.length<Ae;)this.V=this._hmac().update(this.V).digest(),Fe=Fe.concat(this.V);var $e=Fe.slice(0,Ae);return this._update(Ke),this._reseed++,om.encode($e,Se)};var Km=cm.assert;function By(Ae,Se){this.ec=Ae,this.priv=null,this.pub=null,Se.priv&&this._importPrivate(Se.priv,Se.privEnc),Se.pub&&this._importPublic(Se.pub,Se.pubEnc)}var Im=By;By.fromPublic=function(Ae,Se,Ke){return Se instanceof By?Se:new By(Ae,{pub:Se,pubEnc:Ke})},By.fromPrivate=function(Ae,Se,Ke){return Se instanceof By?Se:new By(Ae,{priv:Se,privEnc:Ke})},By.prototype.validate=function(){var Ae=this.getPublic();return Ae.isInfinity()?{result:!1,reason:"Invalid public key"}:Ae.validate()?Ae.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},By.prototype.getPublic=function(Ae,Se){return this.pub||(this.pub=this.ec.g.mul(this.priv)),Ae?this.pub.encode(Ae,Se):this.pub},By.prototype.getPrivate=function(Ae){return"hex"===Ae?this.priv.toString(16,2):this.priv},By.prototype._importPrivate=function(Ae,Se){if(this.priv=new im(Ae,Se||16),"mont"===this.ec.curve.type){var Ke=this.ec.curve.one,qe=Ke.ushln(252).sub(Ke).ushln(3);this.priv=this.priv.or(Ke.ushln(254)),this.priv=this.priv.and(qe)}else this.priv=this.priv.umod(this.ec.curve.n)},By.prototype._importPublic=function(Ae,Se){if(Ae.x||Ae.y)return"mont"===this.ec.curve.type?Km(Ae.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Km(Ae.x&&Ae.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(Ae.x,Ae.y));this.pub=this.ec.curve.decodePoint(Ae,Se)},By.prototype.derive=function(Ae){return Ae.mul(this.priv).getX()},By.prototype.sign=function(Ae,Se,Ke){return this.ec.sign(Ae,this,Se,Ke)},By.prototype.verify=function(Ae,Se){return this.ec.verify(Ae,Se,this)},By.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Um=cm.assert;function qy(Ae,Se){if(Ae instanceof qy)return Ae;this._importDER(Ae,Se)||(Um(Ae.r&&Ae.s,"Signature without r or s"),this.r=new im(Ae.r,16),this.s=new im(Ae.s,16),void 0===Ae.recoveryParam?this.recoveryParam=null:this.recoveryParam=Ae.recoveryParam)}var Om=qy;function Oy(){this.place=0}function Ny(Ae,Se){var Ke=Ae[Se.place++];if(!(128&Ke))return Ke;for(var qe=15&Ke,Fe=0,$e=0,rt=Se.place;$e<qe;$e++,rt++)Fe<<=8,Fe|=Ae[rt];return Se.place=rt,Fe}function jy(Ae){for(var Se=0,Ke=Ae.length-1;!Ae[Se]&&!(128&Ae[Se+1])&&Se<Ke;)Se++;return 0===Se?Ae:Ae.slice(Se)}function Ly(Ae,Se){if(Se<128)Ae.push(Se);else{var Ke=1+(Math.log(Se)/Math.LN2>>>3);for(Ae.push(128|Ke);--Ke;)Ae.push(Se>>>(Ke<<3)&255);Ae.push(Se)}}qy.prototype._importDER=function(Ae,Se){Ae=cm.toArray(Ae,Se);var Ke=new Oy;if(48!==Ae[Ke.place++])return!1;if(Ny(Ae,Ke)+Ke.place!==Ae.length)return!1;if(2!==Ae[Ke.place++])return!1;var qe=Ny(Ae,Ke),Fe=Ae.slice(Ke.place,qe+Ke.place);if(Ke.place+=qe,2!==Ae[Ke.place++])return!1;var $e=Ny(Ae,Ke);if(Ae.length!==$e+Ke.place)return!1;var rt=Ae.slice(Ke.place,$e+Ke.place);return 0===Fe[0]&&128&Fe[1]&&(Fe=Fe.slice(1)),0===rt[0]&&128&rt[1]&&(rt=rt.slice(1)),this.r=new im(Fe),this.s=new im(rt),this.recoveryParam=null,!0},qy.prototype.toDER=function(Ae){var Se=this.r.toArray(),Ke=this.s.toArray();for(128&Se[0]&&(Se=[0].concat(Se)),128&Ke[0]&&(Ke=[0].concat(Ke)),Se=jy(Se),Ke=jy(Ke);!(Ke[0]||128&Ke[1]);)Ke=Ke.slice(1);var qe=[2];Ly(qe,Se.length),(qe=qe.concat(Se)).push(2),Ly(qe,Ke.length);var Fe=qe.concat(Ke),$e=[48];return Ly($e,Fe.length),$e=$e.concat(Fe),cm.encode($e,Ae)};var Nm=cm.assert;function Hy(Ae){if(!(this instanceof Hy))return new Hy(Ae);"string"==typeof Ae&&(Nm(Dm.hasOwnProperty(Ae),"Unknown curve "+Ae),Ae=Dm[Ae]),Ae instanceof Dm.PresetCurve&&(Ae={curve:Ae}),this.curve=Ae.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=Ae.curve.g,this.g.precompute(Ae.curve.n.bitLength()+1),this.hash=Ae.hash||Ae.curve.hash}var qm=Hy;Hy.prototype.keyPair=function(Ae){return new Im(this,Ae)},Hy.prototype.keyFromPrivate=function(Ae,Se){return Im.fromPrivate(this,Ae,Se)},Hy.prototype.keyFromPublic=function(Ae,Se){return Im.fromPublic(this,Ae,Se)},Hy.prototype.genKeyPair=function(Ae){Ae||(Ae={});var Se=new Tm({hash:this.hash,pers:Ae.pers,persEnc:Ae.persEnc||"utf8",entropy:Ae.entropy||Zp(this.hash.hmacStrength),entropyEnc:Ae.entropy&&Ae.entropyEnc||"utf8",nonce:this.n.toArray()});if("mont"===this.curve.type){var Ke=new im(Se.generate(32));return this.keyFromPrivate(Ke)}for(var qe=this.n.byteLength(),Fe=this.n.sub(new im(2));;){if(!((Ke=new im(Se.generate(qe))).cmp(Fe)>0))return Ke.iaddn(1),this.keyFromPrivate(Ke)}},Hy.prototype._truncateToN=function(Ae,Se,Ke){var qe=(Ke=Ke||8*Ae.byteLength())-this.n.bitLength();return qe>0&&(Ae=Ae.ushrn(qe)),!Se&&Ae.cmp(this.n)>=0?Ae.sub(this.n):Ae},Hy.prototype.truncateMsg=function(Ae){var Se;return Ae instanceof Uint8Array?(Se=8*Ae.byteLength,Ae=this._truncateToN(new im(Ae,16),!1,Se)):"string"==typeof Ae?(Se=4*Ae.length,Ae=this._truncateToN(new im(Ae,16),!1,Se)):Ae=this._truncateToN(new im(Ae,16)),Ae},Hy.prototype.sign=function(Ae,Se,Ke,qe){"object"==typeof Ke&&(qe=Ke,Ke=null),qe||(qe={}),Se=this.keyFromPrivate(Se,Ke),Ae=this.truncateMsg(Ae);for(var Fe=this.n.byteLength(),$e=Se.getPrivate().toArray("be",Fe),rt=Ae.toArray("be",Fe),it=new Tm({hash:this.hash,entropy:$e,nonce:rt,pers:qe.pers,persEnc:qe.persEnc||"utf8"}),nt=this.n.sub(new im(1)),st=0;;st++){var ut=qe.k?qe.k(st):new im(it.generate(this.n.byteLength()));if(!((ut=this._truncateToN(ut,!0)).cmpn(1)<=0||ut.cmp(nt)>=0)){var ht=this.g.mul(ut);if(!ht.isInfinity()){var ft=ht.getX(),yt=ft.umod(this.n);if(0!==yt.cmpn(0)){var mt=ut.invm(this.n).mul(yt.mul(Se.getPrivate()).iadd(Ae));if(0!==(mt=mt.umod(this.n)).cmpn(0)){var vt=(ht.getY().isOdd()?1:0)|(0!==ft.cmp(yt)?2:0);return qe.canonical&&mt.cmp(this.nh)>0&&(mt=this.n.sub(mt),vt^=1),new Om({r:yt,s:mt,recoveryParam:vt})}}}}}},Hy.prototype.verify=function(Ae,Se,Ke,qe){return Ke=this.keyFromPublic(Ke,qe),Se=new Om(Se,"hex"),this._verify(this.truncateMsg(Ae),Se,Ke)||this._verify(this._truncateToN(new im(Ae,16)),Se,Ke)},Hy.prototype._verify=function(Ae,Se,Ke){var qe=Se.r,Fe=Se.s;if(qe.cmpn(1)<0||qe.cmp(this.n)>=0)return!1;if(Fe.cmpn(1)<0||Fe.cmp(this.n)>=0)return!1;var $e,rt=Fe.invm(this.n),it=rt.mul(Ae).umod(this.n),nt=rt.mul(qe).umod(this.n);return this.curve._maxwellTrick?!($e=this.g.jmulAdd(it,Ke.getPublic(),nt)).isInfinity()&&$e.eqXToP(qe):!($e=this.g.mulAdd(it,Ke.getPublic(),nt)).isInfinity()&&0===$e.getX().umod(this.n).cmp(qe)},Hy.prototype.recoverPubKey=function(Ae,Se,Ke,qe){Nm((3&Ke)===Ke,"The recovery param is more than two bits"),Se=new Om(Se,qe);var Fe=this.n,$e=new im(Ae),rt=Se.r,it=Se.s,nt=1&Ke,st=Ke>>1;if(rt.cmp(this.curve.p.umod(this.curve.n))>=0&&st)throw Error("Unable to find sencond key candinate");rt=st?this.curve.pointFromX(rt.add(this.curve.n),nt):this.curve.pointFromX(rt,nt);var ut=Se.r.invm(Fe),ht=Fe.sub($e).mul(ut).umod(Fe),ft=it.mul(ut).umod(Fe);return this.g.mulAdd(ht,rt,ft)},Hy.prototype.getKeyRecoveryParam=function(Ae,Se,Ke,qe){if(null!==(Se=new Om(Se,qe)).recoveryParam)return Se.recoveryParam;for(var Fe=0;Fe<4;Fe++){var $e;try{$e=this.recoverPubKey(Ae,Se,Fe)}catch(Ae){continue}if($e.eq(Ke))return Fe}throw Error("Unable to find valid recovery factor")};var jm=cm.assert,zm=cm.parseBytes,Fm=cm.cachedProperty;function Yy(Ae,Se){if(this.eddsa=Ae,Se.hasOwnProperty("secret")&&(this._secret=zm(Se.secret)),Ae.isPoint(Se.pub))this._pub=Se.pub;else if(this._pubBytes=zm(Se.pub),this._pubBytes&&33===this._pubBytes.length&&64===this._pubBytes[0]&&(this._pubBytes=this._pubBytes.slice(1,33)),this._pubBytes&&32!==this._pubBytes.length)throw Error("Unknown point compression format")}Yy.fromPublic=function(Ae,Se){return Se instanceof Yy?Se:new Yy(Ae,{pub:Se})},Yy.fromSecret=function(Ae,Se){return Se instanceof Yy?Se:new Yy(Ae,{secret:Se})},Yy.prototype.secret=function(){return this._secret},Fm(Yy,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Fm(Yy,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Fm(Yy,"privBytes",(function(){var Ae=this.eddsa,Se=this.hash(),Ke=Ae.encodingLength-1,qe=Se.slice(0,Ae.encodingLength);return qe[0]&=248,qe[Ke]&=127,qe[Ke]|=64,qe})),Fm(Yy,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Fm(Yy,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Fm(Yy,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Yy.prototype.sign=function(Ae){return jm(this._secret,"KeyPair can only verify"),this.eddsa.sign(Ae,this)},Yy.prototype.verify=function(Ae,Se){return this.eddsa.verify(Ae,Se,this)},Yy.prototype.getSecret=function(Ae){return jm(this._secret,"KeyPair is public only"),cm.encode(this.secret(),Ae)},Yy.prototype.getPublic=function(Ae,Se){return cm.encode((Se?[64]:[]).concat(this.pubBytes()),Ae)};var Lm=Yy,Hm=cm.assert,Wm=cm.cachedProperty,Gm=cm.parseBytes;function tb(Ae,Se){this.eddsa=Ae,"object"!=typeof Se&&(Se=Gm(Se)),Array.isArray(Se)&&(Se={R:Se.slice(0,Ae.encodingLength),S:Se.slice(Ae.encodingLength)}),Hm(Se.R&&Se.S,"Signature without R or S"),Ae.isPoint(Se.R)&&(this._R=Se.R),Se.S instanceof im&&(this._S=Se.S),this._Rencoded=Array.isArray(Se.R)?Se.R:Se.Rencoded,this._Sencoded=Array.isArray(Se.S)?Se.S:Se.Sencoded}Wm(tb,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Wm(tb,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Wm(tb,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Wm(tb,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),tb.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},tb.prototype.toHex=function(){return cm.encode(this.toBytes(),"hex").toUpperCase()};var $m=tb,Ym=cm.assert,Vm=cm.parseBytes;function ab(Ae){if(Ym("ed25519"===Ae,"only tested with ed25519 so far"),!(this instanceof ab))return new ab(Ae);Ae=Dm[Ae].curve;this.curve=Ae,this.g=Ae.g,this.g.precompute(Ae.n.bitLength()+1),this.pointClass=Ae.point().constructor,this.encodingLength=Math.ceil(Ae.n.bitLength()/8),this.hash=Bm.sha512}var Zm=ab;ab.prototype.sign=function(Ae,Se){Ae=Vm(Ae);var Ke=this.keyFromSecret(Se),qe=this.hashInt(Ke.messagePrefix(),Ae),Fe=this.g.mul(qe),$e=this.encodePoint(Fe),rt=this.hashInt($e,Ke.pubBytes(),Ae).mul(Ke.priv()),it=qe.add(rt).umod(this.curve.n);return this.makeSignature({R:Fe,S:it,Rencoded:$e})},ab.prototype.verify=function(Ae,Se,Ke){Ae=Vm(Ae),Se=this.makeSignature(Se);var qe=this.keyFromPublic(Ke),Fe=this.hashInt(Se.Rencoded(),qe.pubBytes(),Ae),$e=this.g.mul(Se.S());return Se.R().add(qe.pub().mul(Fe)).eq($e)},ab.prototype.hashInt=function(){for(var Ae=this.hash(),Se=0;Se<arguments.length;Se++)Ae.update(arguments[Se]);return cm.intFromLE(Ae.digest()).umod(this.curve.n)},ab.prototype.keyPair=function(Ae){return new Lm(this,Ae)},ab.prototype.keyFromPublic=function(Ae){return Lm.fromPublic(this,Ae)},ab.prototype.keyFromSecret=function(Ae){return Lm.fromSecret(this,Ae)},ab.prototype.genKeyPair=function(Ae){Ae||(Ae={});var Se=new Tm({hash:this.hash,pers:Ae.pers,persEnc:Ae.persEnc||"utf8",entropy:Ae.entropy||Zp(this.hash.hmacStrength),entropyEnc:Ae.entropy&&Ae.entropyEnc||"utf8",nonce:this.curve.n.toArray()});return this.keyFromSecret(Se.generate(32))},ab.prototype.makeSignature=function(Ae){return Ae instanceof $m?Ae:new $m(this,Ae)},ab.prototype.encodePoint=function(Ae){var Se=Ae.getY().toArray("le",this.encodingLength);return Se[this.encodingLength-1]|=Ae.getX().isOdd()?128:0,Se},ab.prototype.decodePoint=function(Ae){var Se=(Ae=cm.parseBytes(Ae)).length-1,Ke=Ae.slice(0,Se).concat(-129&Ae[Se]),qe=0!=(128&Ae[Se]),Fe=cm.intFromLE(Ke);return this.curve.pointFromY(Fe,qe)},ab.prototype.encodeInt=function(Ae){return Ae.toArray("le",this.encodingLength)},ab.prototype.decodeInt=function(Ae){return cm.intFromLE(Ae)},ab.prototype.isPoint=function(Ae){return Ae instanceof this.pointClass};var Qm=gt((function(Ae,Se){var Ke=Se;Ke.utils=cm,Ke.rand=Zp,Ke.curve=wm,Ke.curves=Dm,Ke.ec=qm,Ke.eddsa=Zm})),Xm=Object.freeze({__proto__:null,default:Qm,__moduleExports:Qm});Se.AEADEncryptedDataPacket=Uu,Se.CleartextMessage=Ch,Se.CompressedDataPacket=ku,Se.LiteralDataPacket=lu,Se.MarkerPacket=class{static get tag(){return ur.packet.marker}read(Ae){return 80===Ae[0]&&71===Ae[1]&&80===Ae[2]}write(){return new Uint8Array([80,71,80])}},Se.Message=Eh,Se.OnePassSignaturePacket=gu,Se.PacketList=vu,Se.PrivateKey=gh,Se.PublicKey=mh,Se.PublicKeyEncryptedSessionKeyPacket=Iu,Se.PublicKeyPacket=zu,Se.PublicSubkeyPacket=Ou,Se.SecretKeyPacket=ju,Se.SecretSubkeyPacket=Gu,Se.Signature=$u,Se.SignaturePacket=bu,Se.Subkey=fh,Se.SymEncryptedIntegrityProtectedDataPacket=Du,Se.SymEncryptedSessionKeyPacket=Tu,Se.SymmetricallyEncryptedDataPacket=Fu,Se.TrustPacket=class{static get tag(){return ur.packet.trust}read(){throw new Rn("Trust packets are not supported")}write(){throw new Rn("Trust packets are not supported")}},Se.UnparseablePacket=Un,Se.UserAttributePacket=Nu,Se.UserIDPacket=Hu,Se.armor=Me,Se.config=hr,Se.createCleartextMessage=async function({text:Ae,...Se}){if(!Ae)throw Error("createCleartextMessage: must pass options object containing `text`");if(!ir.isString(Ae))throw Error("createCleartextMessage: options.text must be a string");const Ke=Object.keys(Se);if(Ke.length>0)throw Error("Unknown option: "+Ke.join(", "));return new Ch(Ae)},Se.createMessage=async function({text:Ae,binary:Se,filename:Ke,date:qe=new Date,format:Fe=(void 0!==Ae?"utf8":"binary"),...$e}){let rt=void 0!==Ae?Ae:Se;if(void 0===rt)throw Error("createMessage: must pass options object containing `text` or `binary`");if(Ae&&!ir.isString(Ae)&&!ir.isStream(Ae))throw Error("createMessage: options.text must be a string or stream");if(Se&&!ir.isUint8Array(Se)&&!ir.isStream(Se))throw Error("createMessage: options.binary must be a Uint8Array or stream");const it=Object.keys($e);if(it.length>0)throw Error("Unknown option: "+it.join(", "));const nt=ir.isStream(rt);nt&&(await O(),rt=j(rt));const st=new lu(qe);void 0!==Ae?st.setText(rt,ur.write(ur.literal,Fe)):st.setBytes(rt,ur.write(ur.literal,Fe)),void 0!==Ke&&st.setFilename(Ke);const ut=new vu;ut.push(st);const ht=new Eh(ut);return ht.fromStream=nt,ht},Se.decrypt=async function({message:Ae,decryptionKeys:Se,passwords:Ke,sessionKeys:qe,verificationKeys:Fe,expectSigned:$e=!1,format:rt="utf8",signature:it=null,date:nt=new Date,config:st,...ut}){if(Ih(st={...hr,...st}),Kh(Ae),Fe=Bh(Fe),Se=Bh(Se),Ke=Bh(Ke),qe=Bh(qe),ut.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decrypt, pass `decryptionKeys` instead");if(ut.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.decrypt, pass `verificationKeys` instead");const ht=Object.keys(ut);if(ht.length>0)throw Error("Unknown option: "+ht.join(", "));try{const ut=await Ae.decrypt(Se,Ke,qe,nt,st);Fe||(Fe=[]);const ht={};if(ht.signatures=it?await ut.verifyDetached(it,Fe,nt,st):await ut.verify(Fe,nt,st),ht.data="binary"===rt?ut.getLiteralData():ut.getText(),ht.filename=ut.getFilename(),zh(ht,Ae),$e){if(0===Fe.length)throw Error("Verification keys are required to verify message signatures");if(0===ht.signatures.length)throw Error("Message is not signed");ht.data=W([ht.data,ae((async()=>{await ir.anyPromise(ht.signatures.map((Ae=>Ae.verified)))}))])}return ht.data=await Th(ht.data,Ae.fromStream,rt),ht}catch(Ae){throw ir.wrapError("Error decrypting message",Ae)}},Se.decryptKey=async function({privateKey:Ae,passphrase:Se,config:Ke,...qe}){Ih(Ke={...hr,...Ke});const Fe=Object.keys(qe);if(Fe.length>0)throw Error("Unknown option: "+Fe.join(", "));if(!Ae.isPrivate())throw Error("Cannot decrypt a public key");const $e=Ae.clone(!0),rt=ir.isArray(Se)?Se:[Se];try{return await Promise.all($e.getKeys().map((Ae=>ir.anyPromise(rt.map((Se=>Ae.keyPacket.decrypt(Se))))))),await $e.validate(Ke),$e}catch(Ae){throw $e.clearPrivateParams(),ir.wrapError("Error decrypting private key",Ae)}},Se.decryptSessionKeys=async function({message:Ae,decryptionKeys:Se,passwords:Ke,date:qe=new Date,config:Fe,...$e}){if(Ih(Fe={...hr,...Fe}),Kh(Ae),Se=Bh(Se),Ke=Bh(Ke),$e.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decryptSessionKeys, pass `decryptionKeys` instead");const rt=Object.keys($e);if(rt.length>0)throw Error("Unknown option: "+rt.join(", "));try{return await Ae.decryptSessionKeys(Se,Ke,qe,Fe)}catch(Ae){throw ir.wrapError("Error decrypting session keys",Ae)}},Se.encrypt=async function({message:Ae,encryptionKeys:Se,signingKeys:Ke,passwords:qe,sessionKey:Fe,format:$e="armored",signature:rt=null,wildcard:it=!1,signingKeyIDs:nt=[],encryptionKeyIDs:st=[],date:ut=new Date,signingUserIDs:ht=[],encryptionUserIDs:ft=[],signatureNotations:yt=[],config:mt,...vt}){if(Ih(mt={...hr,...mt}),Kh(Ae),Rh($e),Se=Bh(Se),Ke=Bh(Ke),qe=Bh(qe),nt=Bh(nt),st=Bh(st),ht=Bh(ht),ft=Bh(ft),yt=Bh(yt),vt.detached)throw Error("The `detached` option has been removed from openpgp.encrypt, separately call openpgp.sign instead. Don't forget to remove the `privateKeys` option as well.");if(vt.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encrypt, pass `encryptionKeys` instead");if(vt.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.encrypt, pass `signingKeys` instead");if(void 0!==vt.armor)throw Error("The `armor` option has been removed from openpgp.encrypt, pass `format` instead.");const _t=Object.keys(vt);if(_t.length>0)throw Error("Unknown option: "+_t.join(", "));Ke||(Ke=[]);const Rt=Ae.fromStream;try{if((Ke.length||rt)&&(Ae=await Ae.sign(Ke,rt,nt,ut,ht,yt,mt)),Ae=Ae.compress(await th("compression",Se,ut,ft,mt),mt),Ae=await Ae.encrypt(Se,qe,Fe,it,st,ut,ft,mt),"object"===$e)return Ae;const vt="armored"===$e;return Th(vt?Ae.armor(mt):Ae.write(),Rt,vt?"utf8":"binary")}catch(Ae){throw ir.wrapError("Error encrypting message",Ae)}},Se.encryptKey=async function({privateKey:Ae,passphrase:Se,config:Ke,...qe}){Ih(Ke={...hr,...Ke});const Fe=Object.keys(qe);if(Fe.length>0)throw Error("Unknown option: "+Fe.join(", "));if(!Ae.isPrivate())throw Error("Cannot encrypt a public key");const $e=Ae.clone(!0),rt=$e.getKeys(),it=ir.isArray(Se)?Se:Array(rt.length).fill(Se);if(it.length!==rt.length)throw Error("Invalid number of passphrases given for key encryption");try{return await Promise.all(rt.map((async(Ae,Se)=>{const{keyPacket:qe}=Ae;await qe.encrypt(it[Se],Ke),qe.clearPrivateParams()}))),$e}catch(Ae){throw $e.clearPrivateParams(),ir.wrapError("Error encrypting private key",Ae)}},Se.encryptSessionKey=async function({data:Ae,algorithm:Se,aeadAlgorithm:Ke,encryptionKeys:qe,passwords:Fe,format:$e="armored",wildcard:rt=!1,encryptionKeyIDs:it=[],date:nt=new Date,encryptionUserIDs:st=[],config:ut,...ht}){if(Ih(ut={...hr,...ut}),function(Ae,Se){if(!ir.isUint8Array(Ae))throw Error("Parameter ["+(Se||"data")+"] must be of type Uint8Array")}(Ae),function(Ae,Se){if(!ir.isString(Ae))throw Error("Parameter ["+(Se||"data")+"] must be of type String")}(Se,"algorithm"),Rh($e),qe=Bh(qe),Fe=Bh(Fe),it=Bh(it),st=Bh(st),ht.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encryptSessionKey, pass `encryptionKeys` instead");const ft=Object.keys(ht);if(ft.length>0)throw Error("Unknown option: "+ft.join(", "));if(!(qe&&0!==qe.length||Fe&&0!==Fe.length))throw Error("No encryption keys or passwords provided.");try{return qh(await Eh.encryptSessionKey(Ae,Se,Ke,qe,Fe,rt,it,nt,st,ut),$e,ut)}catch(Ae){throw ir.wrapError("Error encrypting session key",Ae)}},Se.enums=ur,Se.generateKey=async function({userIDs:Ae=[],passphrase:Se,type:Ke="ecc",rsaBits:qe=4096,curve:Fe="curve25519",keyExpirationTime:$e=0,date:rt=new Date,subkeys:it=[{}],format:nt="armored",config:st,...ut}){Ih(st={...hr,...st}),Ae=Bh(Ae);const ht=Object.keys(ut);if(ht.length>0)throw Error("Unknown option: "+ht.join(", "));if(0===Ae.length)throw Error("UserIDs are required for key generation");if("rsa"===Ke&&qe<st.minRSABits)throw Error(`rsaBits should be at least ${st.minRSABits}, got: ${qe}`);const ft={userIDs:Ae,passphrase:Se,type:Ke,rsaBits:qe,curve:Fe,keyExpirationTime:$e,date:rt,subkeys:it};try{const{key:Ae,revocationCertificate:Se}=await async function(Ae,Se){Ae.sign=!0,(Ae=sh(Ae)).subkeys=Ae.subkeys.map(((Se,Ke)=>sh(Ae.subkeys[Ke],Ae)));let Ke=[Yu(Ae,Se)];Ke=Ke.concat(Ae.subkeys.map((Ae=>Zu(Ae,Se))));const qe=await Promise.all(Ke),Fe=await _h(qe[0],qe.slice(1),Ae,Se),$e=await Fe.getRevocationCertificate(Ae.date,Se);return Fe.revocationSignatures=[],{key:Fe,revocationCertificate:$e}}(ft,st);return Ae.getKeys().forEach((({keyPacket:Ae})=>hh(Ae,st))),{privateKey:qh(Ae,nt,st),publicKey:qh(Ae.toPublic(),nt,st),revocationCertificate:Se}}catch(Ae){throw ir.wrapError("Error generating keypair",Ae)}},Se.generateSessionKey=async function({encryptionKeys:Ae,date:Se=new Date,encryptionUserIDs:Ke=[],config:qe,...Fe}){if(Ih(qe={...hr,...qe}),Ae=Bh(Ae),Ke=Bh(Ke),Fe.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.generateSessionKey, pass `encryptionKeys` instead");const $e=Object.keys(Fe);if($e.length>0)throw Error("Unknown option: "+$e.join(", "));try{return await Eh.generateSessionKey(Ae,Se,Ke,qe)}catch(Ae){throw ir.wrapError("Error generating session key",Ae)}},Se.readCleartextMessage=async function({cleartextMessage:Ae,config:Se,...Ke}){if(Se={...hr,...Se},!Ae)throw Error("readCleartextMessage: must pass options object containing `cleartextMessage`");if(!ir.isString(Ae))throw Error("readCleartextMessage: options.cleartextMessage must be a string");const qe=Object.keys(Ke);if(qe.length>0)throw Error("Unknown option: "+qe.join(", "));const Fe=await xe(Ae);if(Fe.type!==ur.armor.signed)throw Error("No cleartext signed message.");const $e=await vu.fromBinary(Fe.data,my,Se);!function(Ae,Se){const r=function(Ae){const r=Ae=>Se=>Ae.hashAlgorithm===Se;for(let Ke=0;Ke<Se.length;Ke++)if(Se[Ke].constructor.tag===ur.packet.signature&&!Ae.some(r(Se[Ke])))return!1;return!0};let Ke=null,qe=[];if(Ae.forEach((function(Ae){if(Ke=Ae.match(/Hash: (.+)/),!Ke)throw Error('Only "Hash" header allowed in cleartext signed message');Ke=Ke[1].replace(/\s/g,""),Ke=Ke.split(","),Ke=Ke.map((function(Ae){Ae=Ae.toLowerCase();try{return ur.write(ur.hash,Ae)}catch(Se){throw Error("Unknown hash algorithm in armor header: "+Ae)}})),qe=qe.concat(Ke)})),!qe.length&&!r([ur.hash.md5]))throw Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(qe.length&&!r(qe))throw Error("Hash algorithm mismatch in armor header and signature")}(Fe.headers,$e);const rt=new $u($e);return new Ch(Fe.text,rt)},Se.readKey=async function({armoredKey:Ae,binaryKey:Se,config:Ke,...qe}){if(Ke={...hr,...Ke},!Ae&&!Se)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(Ae&&!ir.isString(Ae))throw Error("readKey: options.armoredKey must be a string");if(Se&&!ir.isUint8Array(Se))throw Error("readKey: options.binaryKey must be a Uint8Array");const Fe=Object.keys(qe);if(Fe.length>0)throw Error("Unknown option: "+Fe.join(", "));let $e;if(Ae){const{type:Se,data:qe}=await xe(Ae,Ke);if(Se!==ur.armor.publicKey&&Se!==ur.armor.privateKey)throw Error("Armored text not of type key");$e=qe}else $e=Se;return vh(await vu.fromBinary($e,oy,Ke))},Se.readKeys=async function({armoredKeys:Ae,binaryKeys:Se,config:Ke,...qe}){Ke={...hr,...Ke};let Fe=Ae||Se;if(!Fe)throw Error("readKeys: must pass options object containing `armoredKeys` or `binaryKeys`");if(Ae&&!ir.isString(Ae))throw Error("readKeys: options.armoredKeys must be a string");if(Se&&!ir.isUint8Array(Se))throw Error("readKeys: options.binaryKeys must be a Uint8Array");const $e=Object.keys(qe);if($e.length>0)throw Error("Unknown option: "+$e.join(", "));if(Ae){const{type:Se,data:qe}=await xe(Ae,Ke);if(Se!==ur.armor.publicKey&&Se!==ur.armor.privateKey)throw Error("Armored text not of type key");Fe=qe}const rt=[],it=await vu.fromBinary(Fe,oy,Ke),nt=it.indexOfTag(ur.packet.publicKey,ur.packet.secretKey);if(0===nt.length)throw Error("No key packet found");for(let Ae=0;Ae<nt.length;Ae++){const Se=vh(it.slice(nt[Ae],nt[Ae+1]));rt.push(Se)}return rt},Se.readMessage=async function({armoredMessage:Ae,binaryMessage:Se,config:Ke,...qe}){Ke={...hr,...Ke};let Fe=Ae||Se;if(!Fe)throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`");if(Ae&&!ir.isString(Ae)&&!ir.isStream(Ae))throw Error("readMessage: options.armoredMessage must be a string or stream");if(Se&&!ir.isUint8Array(Se)&&!ir.isStream(Se))throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream");const $e=Object.keys(qe);if($e.length>0)throw Error("Unknown option: "+$e.join(", "));const rt=ir.isStream(Fe);if(rt&&(await O(),Fe=j(Fe)),Ae){const{type:Ae,data:Se}=await xe(Fe,Ke);if(Ae!==ur.armor.message)throw Error("Armored text not of type message");Fe=Se}const it=await vu.fromBinary(Fe,ly,Ke),nt=new Eh(it);return nt.fromStream=rt,nt},Se.readPrivateKey=async function({armoredKey:Ae,binaryKey:Se,config:Ke,...qe}){if(Ke={...hr,...Ke},!Ae&&!Se)throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`");if(Ae&&!ir.isString(Ae))throw Error("readPrivateKey: options.armoredKey must be a string");if(Se&&!ir.isUint8Array(Se))throw Error("readPrivateKey: options.binaryKey must be a Uint8Array");const Fe=Object.keys(qe);if(Fe.length>0)throw Error("Unknown option: "+Fe.join(", "));let $e;if(Ae){const{type:Se,data:qe}=await xe(Ae,Ke);if(Se!==ur.armor.privateKey)throw Error("Armored text not of type private key");$e=qe}else $e=Se;const rt=await vu.fromBinary($e,oy,Ke);return new gh(rt)},Se.readPrivateKeys=async function({armoredKeys:Ae,binaryKeys:Se,config:Ke}){Ke={...hr,...Ke};let qe=Ae||Se;if(!qe)throw Error("readPrivateKeys: must pass options object containing `armoredKeys` or `binaryKeys`");if(Ae&&!ir.isString(Ae))throw Error("readPrivateKeys: options.armoredKeys must be a string");if(Se&&!ir.isUint8Array(Se))throw Error("readPrivateKeys: options.binaryKeys must be a Uint8Array");if(Ae){const{type:Se,data:Fe}=await xe(Ae,Ke);if(Se!==ur.armor.privateKey)throw Error("Armored text not of type private key");qe=Fe}const Fe=[],$e=await vu.fromBinary(qe,oy,Ke),rt=$e.indexOfTag(ur.packet.secretKey);if(0===rt.length)throw Error("No secret key packet found");for(let Ae=0;Ae<rt.length;Ae++){const Se=$e.slice(rt[Ae],rt[Ae+1]),Ke=new gh(Se);Fe.push(Ke)}return Fe},Se.readSignature=async function({armoredSignature:Ae,binarySignature:Se,config:Ke,...qe}){Ke={...hr,...Ke};let Fe=Ae||Se;if(!Fe)throw Error("readSignature: must pass options object containing `armoredSignature` or `binarySignature`");if(Ae&&!ir.isString(Ae))throw Error("readSignature: options.armoredSignature must be a string");if(Se&&!ir.isUint8Array(Se))throw Error("readSignature: options.binarySignature must be a Uint8Array");const $e=Object.keys(qe);if($e.length>0)throw Error("Unknown option: "+$e.join(", "));if(Ae){const{type:Ae,data:Se}=await xe(Fe,Ke);if(Ae!==ur.armor.signature)throw Error("Armored text not of type signature");Fe=Se}const rt=await vu.fromBinary(Fe,ey,Ke);return new $u(rt)},Se.reformatKey=async function({privateKey:Ae,userIDs:Se=[],passphrase:Ke,keyExpirationTime:qe=0,date:Fe,format:$e="armored",config:rt,...it}){Ih(rt={...hr,...rt}),Se=Bh(Se);const nt=Object.keys(it);if(nt.length>0)throw Error("Unknown option: "+nt.join(", "));if(0===Se.length)throw Error("UserIDs are required for key reformat");const st={privateKey:Ae,userIDs:Se,passphrase:Ke,keyExpirationTime:qe,date:Fe};try{const{key:Ae,revocationCertificate:Se}=await async function(Ae,Se){Ae=o(Ae);const{privateKey:Ke}=Ae;if(!Ke.isPrivate())throw Error("Cannot reformat a public key");if(Ke.keyPacket.isDummy())throw Error("Cannot reformat a gnu-dummy primary key");if(!Ke.getKeys().every((({keyPacket:Ae})=>Ae.isDecrypted())))throw Error("Key is not decrypted");const qe=Ke.keyPacket;Ae.subkeys||(Ae.subkeys=await Promise.all(Ke.subkeys.map((async Ae=>{const Ke=Ae.keyPacket,Fe={key:qe,bind:Ke},$e=await Xu(Ae.bindingSignatures,qe,ur.signature.subkeyBinding,Fe,null,Se).catch((()=>({})));return{sign:$e.keyFlags&&$e.keyFlags[0]&ur.keyFlags.signData}}))));const Fe=Ke.subkeys.map((Ae=>Ae.keyPacket));if(Ae.subkeys.length!==Fe.length)throw Error("Number of subkey options does not match number of subkeys");Ae.subkeys=Ae.subkeys.map((Se=>o(Se,Ae)));const $e=await _h(qe,Fe,Ae,Se),rt=await $e.getRevocationCertificate(Ae.date,Se);return $e.revocationSignatures=[],{key:$e,revocationCertificate:rt};function o(Ae,Se={}){return Ae.keyExpirationTime=Ae.keyExpirationTime||Se.keyExpirationTime,Ae.passphrase=ir.isString(Ae.passphrase)?Ae.passphrase:Se.passphrase,Ae.date=Ae.date||Se.date,Ae}}(st,rt);return{privateKey:qh(Ae,$e,rt),publicKey:qh(Ae.toPublic(),$e,rt),revocationCertificate:Se}}catch(Ae){throw ir.wrapError("Error reformatting keypair",Ae)}},Se.revokeKey=async function({key:Ae,revocationCertificate:Se,reasonForRevocation:Ke,date:qe=new Date,format:Fe="armored",config:$e,...rt}){Ih($e={...hr,...$e});const it=Object.keys(rt);if(it.length>0)throw Error("Unknown option: "+it.join(", "));try{const rt=Se?await Ae.applyRevocationCertificate(Se,qe,$e):await Ae.revoke(Ke,qe,$e);return rt.isPrivate()?{privateKey:qh(rt,Fe,$e),publicKey:qh(rt.toPublic(),Fe,$e)}:{privateKey:null,publicKey:qh(rt,Fe,$e)}}catch(Ae){throw ir.wrapError("Error revoking key",Ae)}},Se.sign=async function({message:Ae,signingKeys:Se,format:Ke="armored",detached:qe=!1,signingKeyIDs:Fe=[],date:$e=new Date,signingUserIDs:rt=[],signatureNotations:it=[],config:nt,...st}){if(Ih(nt={...hr,...nt}),Dh(Ae),Rh(Ke),Se=Bh(Se),Fe=Bh(Fe),rt=Bh(rt),it=Bh(it),st.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.sign, pass `signingKeys` instead");if(void 0!==st.armor)throw Error("The `armor` option has been removed from openpgp.sign, pass `format` instead.");const ut=Object.keys(st);if(ut.length>0)throw Error("Unknown option: "+ut.join(", "));if(Ae instanceof Ch&&"binary"===Ke)throw Error("Cannot return signed cleartext message in binary format");if(Ae instanceof Ch&&qe)throw Error("Cannot detach-sign a cleartext message");if(!Se||0===Se.length)throw Error("No signing keys provided");try{let st;if(st=qe?await Ae.signDetached(Se,void 0,Fe,$e,rt,it,nt):await Ae.sign(Se,void 0,Fe,$e,rt,it,nt),"object"===Ke)return st;const ut="armored"===Ke;return st=ut?st.armor(nt):st.write(),qe&&(st=X(Ae.packets.write(),(async(Ae,Se)=>{await Promise.all([V(st,Se),ie(Ae).catch((()=>{}))])}))),Th(st,Ae.fromStream,ut?"utf8":"binary")}catch(Ae){throw ir.wrapError("Error signing message",Ae)}},Se.unarmor=xe,Se.verify=async function({message:Ae,verificationKeys:Se,expectSigned:Ke=!1,format:qe="utf8",signature:Fe=null,date:$e=new Date,config:rt,...it}){if(Ih(rt={...hr,...rt}),Dh(Ae),Se=Bh(Se),it.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.verify, pass `verificationKeys` instead");const nt=Object.keys(it);if(nt.length>0)throw Error("Unknown option: "+nt.join(", "));if(Ae instanceof Ch&&"binary"===qe)throw Error("Can't return cleartext message data as binary");if(Ae instanceof Ch&&Fe)throw Error("Can't verify detached cleartext signature");try{const it={};if(it.signatures=Fe?await Ae.verifyDetached(Fe,Se,$e,rt):await Ae.verify(Se,$e,rt),it.data="binary"===qe?Ae.getLiteralData():Ae.getText(),Ae.fromStream&&zh(it,Ae),Ke){if(0===it.signatures.length)throw Error("Message is not signed");it.data=W([it.data,ae((async()=>{await ir.anyPromise(it.signatures.map((Ae=>Ae.verified)))}))])}return it.data=await Th(it.data,Ae.fromStream,qe),it}catch(Ae){throw ir.wrapError("Error verifying signed message",Ae)}}},5118:(Ae,Se,Ke)=>{"use strict";var qe=Ke(4300);var Fe=qe.Buffer;var $e={};var rt;for(rt in qe){if(!qe.hasOwnProperty(rt))continue;if(rt==="SlowBuffer"||rt==="Buffer")continue;$e[rt]=qe[rt]}var it=$e.Buffer={};for(rt in Fe){if(!Fe.hasOwnProperty(rt))continue;if(rt==="allocUnsafe"||rt==="allocUnsafeSlow")continue;it[rt]=Fe[rt]}$e.Buffer.prototype=Fe.prototype;if(!it.from||it.from===Uint8Array.from){it.from=function(Ae,Se,Ke){if(typeof Ae==="number"){throw new TypeError('The "value" argument must not be of type number. Received type '+typeof Ae)}if(Ae&&typeof Ae.length==="undefined"){throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ae)}return Fe(Ae,Se,Ke)}}if(!it.alloc){it.alloc=function(Ae,Se,Ke){if(typeof Ae!=="number"){throw new TypeError('The "size" argument must be of type number. Received type '+typeof Ae)}if(Ae<0||Ae>=2*(1<<30)){throw new RangeError('The value "'+Ae+'" is invalid for option "size"')}var qe=Fe(Ae);if(!Se||Se.length===0){qe.fill(0)}else if(typeof Ke==="string"){qe.fill(Se,Ke)}else{qe.fill(Se)}return qe}}if(!$e.kStringMaxLength){try{$e.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(Ae){}}if(!$e.constants){$e.constants={MAX_LENGTH:$e.kMaxLength};if($e.kStringMaxLength){$e.constants.MAX_STRING_LENGTH=$e.kStringMaxLength}}Ae.exports=$e},4294:(Ae,Se,Ke)=>{Ae.exports=Ke(4219)},4219:(Ae,Se,Ke)=>{"use strict";var qe=Ke(1808);var Fe=Ke(4404);var $e=Ke(3685);var rt=Ke(5687);var it=Ke(2361);var nt=Ke(9491);var st=Ke(3837);Se.httpOverHttp=httpOverHttp;Se.httpsOverHttp=httpsOverHttp;Se.httpOverHttps=httpOverHttps;Se.httpsOverHttps=httpsOverHttps;function httpOverHttp(Ae){var Se=new TunnelingAgent(Ae);Se.request=$e.request;return Se}function httpsOverHttp(Ae){var Se=new TunnelingAgent(Ae);Se.request=$e.request;Se.createSocket=createSecureSocket;Se.defaultPort=443;return Se}function httpOverHttps(Ae){var Se=new TunnelingAgent(Ae);Se.request=rt.request;return Se}function httpsOverHttps(Ae){var Se=new TunnelingAgent(Ae);Se.request=rt.request;Se.createSocket=createSecureSocket;Se.defaultPort=443;return Se}function TunnelingAgent(Ae){var Se=this;Se.options=Ae||{};Se.proxyOptions=Se.options.proxy||{};Se.maxSockets=Se.options.maxSockets||$e.Agent.defaultMaxSockets;Se.requests=[];Se.sockets=[];Se.on("free",(function onFree(Ae,Ke,qe,Fe){var $e=toOptions(Ke,qe,Fe);for(var rt=0,it=Se.requests.length;rt<it;++rt){var nt=Se.requests[rt];if(nt.host===$e.host&&nt.port===$e.port){Se.requests.splice(rt,1);nt.request.onSocket(Ae);return}}Ae.destroy();Se.removeSocket(Ae)}))}st.inherits(TunnelingAgent,it.EventEmitter);TunnelingAgent.prototype.addRequest=function addRequest(Ae,Se,Ke,qe){var Fe=this;var $e=mergeOptions({request:Ae},Fe.options,toOptions(Se,Ke,qe));if(Fe.sockets.length>=this.maxSockets){Fe.requests.push($e);return}Fe.createSocket($e,(function(Se){Se.on("free",onFree);Se.on("close",onCloseOrRemove);Se.on("agentRemove",onCloseOrRemove);Ae.onSocket(Se);function onFree(){Fe.emit("free",Se,$e)}function onCloseOrRemove(Ae){Fe.removeSocket(Se);Se.removeListener("free",onFree);Se.removeListener("close",onCloseOrRemove);Se.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(Ae,Se){var Ke=this;var qe={};Ke.sockets.push(qe);var Fe=mergeOptions({},Ke.proxyOptions,{method:"CONNECT",path:Ae.host+":"+Ae.port,agent:false,headers:{host:Ae.host+":"+Ae.port}});if(Ae.localAddress){Fe.localAddress=Ae.localAddress}if(Fe.proxyAuth){Fe.headers=Fe.headers||{};Fe.headers["Proxy-Authorization"]="Basic "+new Buffer(Fe.proxyAuth).toString("base64")}ut("making CONNECT request");var $e=Ke.request(Fe);$e.useChunkedEncodingByDefault=false;$e.once("response",onResponse);$e.once("upgrade",onUpgrade);$e.once("connect",onConnect);$e.once("error",onError);$e.end();function onResponse(Ae){Ae.upgrade=true}function onUpgrade(Ae,Se,Ke){process.nextTick((function(){onConnect(Ae,Se,Ke)}))}function onConnect(Fe,rt,it){$e.removeAllListeners();rt.removeAllListeners();if(Fe.statusCode!==200){ut("tunneling socket could not be established, statusCode=%d",Fe.statusCode);rt.destroy();var nt=new Error("tunneling socket could not be established, "+"statusCode="+Fe.statusCode);nt.code="ECONNRESET";Ae.request.emit("error",nt);Ke.removeSocket(qe);return}if(it.length>0){ut("got illegal response body from proxy");rt.destroy();var nt=new Error("got illegal response body from proxy");nt.code="ECONNRESET";Ae.request.emit("error",nt);Ke.removeSocket(qe);return}ut("tunneling connection has established");Ke.sockets[Ke.sockets.indexOf(qe)]=rt;return Se(rt)}function onError(Se){$e.removeAllListeners();ut("tunneling socket could not be established, cause=%s\n",Se.message,Se.stack);var Fe=new Error("tunneling socket could not be established, "+"cause="+Se.message);Fe.code="ECONNRESET";Ae.request.emit("error",Fe);Ke.removeSocket(qe)}};TunnelingAgent.prototype.removeSocket=function removeSocket(Ae){var Se=this.sockets.indexOf(Ae);if(Se===-1){return}this.sockets.splice(Se,1);var Ke=this.requests.shift();if(Ke){this.createSocket(Ke,(function(Ae){Ke.request.onSocket(Ae)}))}};function createSecureSocket(Ae,Se){var Ke=this;TunnelingAgent.prototype.createSocket.call(Ke,Ae,(function(qe){var $e=Ae.request.getHeader("host");var rt=mergeOptions({},Ke.options,{socket:qe,servername:$e?$e.replace(/:.*$/,""):Ae.host});var it=Fe.connect(0,rt);Ke.sockets[Ke.sockets.indexOf(qe)]=it;Se(it)}))}function toOptions(Ae,Se,Ke){if(typeof Ae==="string"){return{host:Ae,port:Se,localAddress:Ke}}return Ae}function mergeOptions(Ae){for(var Se=1,Ke=arguments.length;Se<Ke;++Se){var qe=arguments[Se];if(typeof qe==="object"){var Fe=Object.keys(qe);for(var $e=0,rt=Fe.length;$e<rt;++$e){var it=Fe[$e];if(qe[it]!==undefined){Ae[it]=qe[it]}}}}return Ae}var ut;if(process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)){ut=function(){var Ae=Array.prototype.slice.call(arguments);if(typeof Ae[0]==="string"){Ae[0]="TUNNEL: "+Ae[0]}else{Ae.unshift("TUNNEL:")}console.error.apply(console,Ae)}}else{ut=function(){}}Se.debug=ut},5840:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Object.defineProperty(Se,"v1",{enumerable:true,get:function(){return qe.default}});Object.defineProperty(Se,"v3",{enumerable:true,get:function(){return Fe.default}});Object.defineProperty(Se,"v4",{enumerable:true,get:function(){return $e.default}});Object.defineProperty(Se,"v5",{enumerable:true,get:function(){return rt.default}});Object.defineProperty(Se,"NIL",{enumerable:true,get:function(){return it.default}});Object.defineProperty(Se,"version",{enumerable:true,get:function(){return nt.default}});Object.defineProperty(Se,"validate",{enumerable:true,get:function(){return st.default}});Object.defineProperty(Se,"stringify",{enumerable:true,get:function(){return ut.default}});Object.defineProperty(Se,"parse",{enumerable:true,get:function(){return ht.default}});var qe=_interopRequireDefault(Ke(8628));var Fe=_interopRequireDefault(Ke(6409));var $e=_interopRequireDefault(Ke(5122));var rt=_interopRequireDefault(Ke(9120));var it=_interopRequireDefault(Ke(5332));var nt=_interopRequireDefault(Ke(1595));var st=_interopRequireDefault(Ke(6900));var ut=_interopRequireDefault(Ke(8950));var ht=_interopRequireDefault(Ke(2746));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}},4569:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(6113));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function md5(Ae){if(Array.isArray(Ae)){Ae=Buffer.from(Ae)}else if(typeof Ae==="string"){Ae=Buffer.from(Ae,"utf8")}return qe.default.createHash("md5").update(Ae).digest()}var Fe=md5;Se["default"]=Fe},5332:(Ae,Se)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var Ke="00000000-0000-0000-0000-000000000000";Se["default"]=Ke},2746:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(6900));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function parse(Ae){if(!(0,qe.default)(Ae)){throw TypeError("Invalid UUID")}let Se;const Ke=new Uint8Array(16);Ke[0]=(Se=parseInt(Ae.slice(0,8),16))>>>24;Ke[1]=Se>>>16&255;Ke[2]=Se>>>8&255;Ke[3]=Se&255;Ke[4]=(Se=parseInt(Ae.slice(9,13),16))>>>8;Ke[5]=Se&255;Ke[6]=(Se=parseInt(Ae.slice(14,18),16))>>>8;Ke[7]=Se&255;Ke[8]=(Se=parseInt(Ae.slice(19,23),16))>>>8;Ke[9]=Se&255;Ke[10]=(Se=parseInt(Ae.slice(24,36),16))/1099511627776&255;Ke[11]=Se/4294967296&255;Ke[12]=Se>>>24&255;Ke[13]=Se>>>16&255;Ke[14]=Se>>>8&255;Ke[15]=Se&255;return Ke}var Fe=parse;Se["default"]=Fe},814:(Ae,Se)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var Ke=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;Se["default"]=Ke},807:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=rng;var qe=_interopRequireDefault(Ke(6113));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}const Fe=new Uint8Array(256);let $e=Fe.length;function rng(){if($e>Fe.length-16){qe.default.randomFillSync(Fe);$e=0}return Fe.slice($e,$e+=16)}},5274:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(6113));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function sha1(Ae){if(Array.isArray(Ae)){Ae=Buffer.from(Ae)}else if(typeof Ae==="string"){Ae=Buffer.from(Ae,"utf8")}return qe.default.createHash("sha1").update(Ae).digest()}var Fe=sha1;Se["default"]=Fe},8950:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(6900));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}const Fe=[];for(let Ae=0;Ae<256;++Ae){Fe.push((Ae+256).toString(16).substr(1))}function stringify(Ae,Se=0){const Ke=(Fe[Ae[Se+0]]+Fe[Ae[Se+1]]+Fe[Ae[Se+2]]+Fe[Ae[Se+3]]+"-"+Fe[Ae[Se+4]]+Fe[Ae[Se+5]]+"-"+Fe[Ae[Se+6]]+Fe[Ae[Se+7]]+"-"+Fe[Ae[Se+8]]+Fe[Ae[Se+9]]+"-"+Fe[Ae[Se+10]]+Fe[Ae[Se+11]]+Fe[Ae[Se+12]]+Fe[Ae[Se+13]]+Fe[Ae[Se+14]]+Fe[Ae[Se+15]]).toLowerCase();if(!(0,qe.default)(Ke)){throw TypeError("Stringified UUID is invalid")}return Ke}var $e=stringify;Se["default"]=$e},8628:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(807));var Fe=_interopRequireDefault(Ke(8950));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}let $e;let rt;let it=0;let nt=0;function v1(Ae,Se,Ke){let st=Se&&Ke||0;const ut=Se||new Array(16);Ae=Ae||{};let ht=Ae.node||$e;let ft=Ae.clockseq!==undefined?Ae.clockseq:rt;if(ht==null||ft==null){const Se=Ae.random||(Ae.rng||qe.default)();if(ht==null){ht=$e=[Se[0]|1,Se[1],Se[2],Se[3],Se[4],Se[5]]}if(ft==null){ft=rt=(Se[6]<<8|Se[7])&16383}}let yt=Ae.msecs!==undefined?Ae.msecs:Date.now();let mt=Ae.nsecs!==undefined?Ae.nsecs:nt+1;const vt=yt-it+(mt-nt)/1e4;if(vt<0&&Ae.clockseq===undefined){ft=ft+1&16383}if((vt<0||yt>it)&&Ae.nsecs===undefined){mt=0}if(mt>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}it=yt;nt=mt;rt=ft;yt+=122192928e5;const _t=((yt&268435455)*1e4+mt)%4294967296;ut[st++]=_t>>>24&255;ut[st++]=_t>>>16&255;ut[st++]=_t>>>8&255;ut[st++]=_t&255;const Rt=yt/4294967296*1e4&268435455;ut[st++]=Rt>>>8&255;ut[st++]=Rt&255;ut[st++]=Rt>>>24&15|16;ut[st++]=Rt>>>16&255;ut[st++]=ft>>>8|128;ut[st++]=ft&255;for(let Ae=0;Ae<6;++Ae){ut[st+Ae]=ht[Ae]}return Se||(0,Fe.default)(ut)}var st=v1;Se["default"]=st},6409:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(5998));var Fe=_interopRequireDefault(Ke(4569));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}const $e=(0,qe.default)("v3",48,Fe.default);var rt=$e;Se["default"]=rt},5998:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=_default;Se.URL=Se.DNS=void 0;var qe=_interopRequireDefault(Ke(8950));var Fe=_interopRequireDefault(Ke(2746));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function stringToBytes(Ae){Ae=unescape(encodeURIComponent(Ae));const Se=[];for(let Ke=0;Ke<Ae.length;++Ke){Se.push(Ae.charCodeAt(Ke))}return Se}const $e="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Se.DNS=$e;const rt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Se.URL=rt;function _default(Ae,Se,Ke){function generateUUID(Ae,$e,rt,it){if(typeof Ae==="string"){Ae=stringToBytes(Ae)}if(typeof $e==="string"){$e=(0,Fe.default)($e)}if($e.length!==16){throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)")}let nt=new Uint8Array(16+Ae.length);nt.set($e);nt.set(Ae,$e.length);nt=Ke(nt);nt[6]=nt[6]&15|Se;nt[8]=nt[8]&63|128;if(rt){it=it||0;for(let Ae=0;Ae<16;++Ae){rt[it+Ae]=nt[Ae]}return rt}return(0,qe.default)(nt)}try{generateUUID.name=Ae}catch(Ae){}generateUUID.DNS=$e;generateUUID.URL=rt;return generateUUID}},5122:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(807));var Fe=_interopRequireDefault(Ke(8950));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function v4(Ae,Se,Ke){Ae=Ae||{};const $e=Ae.random||(Ae.rng||qe.default)();$e[6]=$e[6]&15|64;$e[8]=$e[8]&63|128;if(Se){Ke=Ke||0;for(let Ae=0;Ae<16;++Ae){Se[Ke+Ae]=$e[Ae]}return Se}return(0,Fe.default)($e)}var $e=v4;Se["default"]=$e},9120:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(5998));var Fe=_interopRequireDefault(Ke(5274));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}const $e=(0,qe.default)("v5",80,Fe.default);var rt=$e;Se["default"]=rt},6900:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(814));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function validate(Ae){return typeof Ae==="string"&&qe.default.test(Ae)}var Fe=validate;Se["default"]=Fe},1595:(Ae,Se,Ke)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:true});Se["default"]=void 0;var qe=_interopRequireDefault(Ke(6900));function _interopRequireDefault(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function version(Ae){if(!(0,qe.default)(Ae)){throw TypeError("Invalid UUID")}return parseInt(Ae.substr(14,1),16)}var Fe=version;Se["default"]=Fe},8954:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;var Fe=Object.getOwnPropertyDescriptor(Se,Ke);if(!Fe||("get"in Fe?!Se.__esModule:Fe.writable||Fe.configurable)){Fe={enumerable:true,get:function(){return Se[Ke]}}}Object.defineProperty(Ae,qe,Fe)}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.prototype.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.getInputs=void 0;const it=$e(Ke(2186));function getInputs(){return rt(this,void 0,void 0,(function*(){return{gpgPrivateKey:it.getInput("gpg_private_key",{required:true}),passphrase:it.getInput("passphrase"),gitConfigGlobal:it.getBooleanInput("git_config_global"),gitUserSigningkey:it.getBooleanInput("git_user_signingkey"),gitCommitGpgsign:it.getBooleanInput("git_commit_gpgsign"),gitTagGpgsign:it.getBooleanInput("git_tag_gpgsign"),gitPushGpgsign:it.getInput("git_push_gpgsign")||"if-asked",gitCommitterName:it.getInput("git_committer_name"),gitCommitterEmail:it.getInput("git_committer_email"),workdir:it.getInput("workdir")||".",fingerprint:it.getInput("fingerprint")}}))}Se.getInputs=getInputs},6350:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;var Fe=Object.getOwnPropertyDescriptor(Se,Ke);if(!Fe||("get"in Fe?!Se.__esModule:Fe.writable||Fe.configurable)){Fe={enumerable:true,get:function(){return Se[Ke]}}}Object.defineProperty(Ae,qe,Fe)}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.prototype.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.setConfig=void 0;const it=$e(Ke(1514));const git=(Ae=[])=>rt(void 0,void 0,void 0,(function*(){return yield it.getExecOutput(`git`,Ae,{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}return Ae.stdout.trim()}))}));function setConfig(Ae,Se,Ke){return rt(this,void 0,void 0,(function*(){const qe=["config"];if(Ke){qe.push("--global")}qe.push(Ae,Se);yield git(qe)}))}Se.setConfig=setConfig},3759:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;var Fe=Object.getOwnPropertyDescriptor(Se,Ke);if(!Fe||("get"in Fe?!Se.__esModule:Fe.writable||Fe.configurable)){Fe={enumerable:true,get:function(){return Se[Ke]}}}Object.defineProperty(Ae,qe,Fe)}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.prototype.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});Se.killAgent=Se.deleteKey=Se.presetPassphrase=Se.configureAgent=Se.getKeygrip=Se.parseKeygripFromGpgColonsOutput=Se.getKeygrips=Se.importKey=Se.getDirs=Se.getVersion=Se.agentConfig=void 0;const it=$e(Ke(1514));const nt=$e(Ke(7147));const st=$e(Ke(1017));const ut=$e(Ke(2037));const ht=$e(Ke(5728));Se.agentConfig=`default-cache-ttl 21600\nmax-cache-ttl 31536000\nallow-preset-passphrase`;const getGnupgHome=()=>rt(void 0,void 0,void 0,(function*(){if(process.env.GNUPGHOME){return process.env.GNUPGHOME}let Ae=st.join(process.env.HOME||"",".gnupg");if(ut.platform()=="win32"&&!process.env.HOME){Ae=st.join(process.env.USERPROFILE||"",".gnupg")}return Ae}));const gpgConnectAgent=Ae=>rt(void 0,void 0,void 0,(function*(){return yield it.getExecOutput(`gpg-connect-agent "${Ae}" /bye`,[],{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}for(const Se of Ae.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(Se.startsWith("ERR")){throw new Error(Se)}}return Ae.stdout.trim()}))}));const getVersion=()=>rt(void 0,void 0,void 0,(function*(){return yield it.getExecOutput("gpg",["--version"],{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}let Se="";let Ke="";for(const qe of Ae.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(qe.startsWith("gpg (GnuPG) ")){Se=qe.substr("gpg (GnuPG) ".length).trim()}else if(qe.startsWith("gpg (GnuPG/MacGPG2) ")){Se=qe.substr("gpg (GnuPG/MacGPG2) ".length).trim()}else if(qe.startsWith("libgcrypt ")){Ke=qe.substr("libgcrypt ".length).trim()}}return{gnupg:Se,libgcrypt:Ke}}))}));Se.getVersion=getVersion;const getDirs=()=>rt(void 0,void 0,void 0,(function*(){return yield it.getExecOutput("gpgconf",["--list-dirs"],{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}let Se="";let Ke="";let qe="";let Fe="";for(const $e of Ae.stdout.replace(/\r/g,"").trim().split(/\n/g)){if($e.startsWith("libdir:")){Se=$e.substr("libdir:".length).replace("%3a",":").trim()}else if($e.startsWith("libexecdir:")){Ke=$e.substr("libexecdir:".length).replace("%3a",":").trim()}else if($e.startsWith("datadir:")){qe=$e.substr("datadir:".length).replace("%3a",":").trim()}else if($e.startsWith("homedir:")){Fe=$e.substr("homedir:".length).replace("%3a",":").trim()}}return{libdir:Se,libexecdir:Ke,datadir:qe,homedir:Fe}}))}));Se.getDirs=getDirs;const importKey=Ae=>rt(void 0,void 0,void 0,(function*(){const Se=nt.mkdtempSync(st.join(ut.tmpdir(),"ghaction-import-gpg-"));const Ke=`${Se}/key.pgp`;nt.writeFileSync(Ke,(yield ht.isArmored(Ae))?Ae:Buffer.from(Ae,"base64").toString(),{mode:384});return yield it.getExecOutput("gpg",["--import","--batch","--yes",Ke],{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}if(Ae.stderr!=""){return Ae.stderr.trim()}return Ae.stdout.trim()})).finally((()=>{nt.unlinkSync(Ke)}))}));Se.importKey=importKey;const getKeygrips=Ae=>rt(void 0,void 0,void 0,(function*(){return yield it.getExecOutput("gpg",["--batch","--with-colons","--with-keygrip","--list-secret-keys",Ae],{ignoreReturnCode:true,silent:true}).then((Ae=>{const Se=[];for(const Ke of Ae.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(Ke.startsWith("grp")){Se.push(Ke.replace(/(grp|:)/g,"").trim())}}return Se}))}));Se.getKeygrips=getKeygrips;const parseKeygripFromGpgColonsOutput=(Ae,Se)=>{let Ke="";let qe=false;const Fe=Ae.replace(/\r/g,"").trim().split(/\n/g);for(const Ae of Fe){if(Ae.startsWith(`fpr:`)&&Ae.includes(`:${Se}:`)){qe=true;continue}if(Ae.startsWith("grp:")&&qe){Ke=Ae.replace(/(grp|:)/g,"").trim();break}}return Ke};Se.parseKeygripFromGpgColonsOutput=parseKeygripFromGpgColonsOutput;const getKeygrip=Ae=>rt(void 0,void 0,void 0,(function*(){return yield it.getExecOutput("gpg",["--batch","--with-colons","--with-keygrip","--list-secret-keys",Ae],{ignoreReturnCode:true,silent:true}).then((Ke=>(0,Se.parseKeygripFromGpgColonsOutput)(Ke.stdout,Ae)))}));Se.getKeygrip=getKeygrip;const configureAgent=Ae=>rt(void 0,void 0,void 0,(function*(){const Se=st.join(yield getGnupgHome(),"gpg-agent.conf");yield nt.writeFile(Se,Ae,(function(Ae){if(Ae)throw Ae}));yield gpgConnectAgent("RELOADAGENT")}));Se.configureAgent=configureAgent;const presetPassphrase=(Ae,Se)=>rt(void 0,void 0,void 0,(function*(){const Ke=Buffer.from(Se,"utf8").toString("hex").toUpperCase();yield gpgConnectAgent(`PRESET_PASSPHRASE ${Ae} -1 ${Ke}`);return yield gpgConnectAgent(`KEYINFO ${Ae}`)}));Se.presetPassphrase=presetPassphrase;const deleteKey=Ae=>rt(void 0,void 0,void 0,(function*(){yield it.getExecOutput("gpg",["--batch","--yes","--delete-secret-keys",Ae],{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}}));yield it.getExecOutput("gpg",["--batch","--yes","--delete-keys",Ae],{ignoreReturnCode:true,silent:true}).then((Ae=>{if(Ae.stderr.length>0&&Ae.exitCode!=0){throw new Error(Ae.stderr)}}))}));Se.deleteKey=deleteKey;const killAgent=()=>rt(void 0,void 0,void 0,(function*(){yield gpgConnectAgent("KILLAGENT")}));Se.killAgent=killAgent},399:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;var Fe=Object.getOwnPropertyDescriptor(Se,Ke);if(!Fe||("get"in Fe?!Se.__esModule:Fe.writable||Fe.configurable)){Fe={enumerable:true,get:function(){return Se[Ke]}}}Object.defineProperty(Ae,qe,Fe)}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.prototype.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};Object.defineProperty(Se,"__esModule",{value:true});const it=$e(Ke(2186));const nt=$e(Ke(8954));const st=$e(Ke(6350));const ut=$e(Ke(3759));const ht=$e(Ke(5728));const ft=$e(Ke(963));function run(){return rt(this,void 0,void 0,(function*(){try{const Ae=yield nt.getInputs();if(Ae.workdir&&Ae.workdir!=="."){it.info(`Using ${Ae.workdir} as working directory...`);process.chdir(Ae.workdir)}const Se=yield ut.getVersion();const Ke=yield ut.getDirs();yield it.group(`GnuPG info`,(()=>rt(this,void 0,void 0,(function*(){it.info(`Version : ${Se.gnupg} (libgcrypt ${Se.libgcrypt})`);it.info(`Libdir : ${Ke.libdir}`);it.info(`Libexecdir : ${Ke.libexecdir}`);it.info(`Datadir : ${Ke.datadir}`);it.info(`Homedir : ${Ke.homedir}`)}))));const qe=yield ht.readPrivateKey(Ae.gpgPrivateKey);yield it.group(`GPG private key info`,(()=>rt(this,void 0,void 0,(function*(){it.info(`Fingerprint : ${qe.fingerprint}`);it.info(`KeyID : ${qe.keyID}`);it.info(`Name : ${qe.name}`);it.info(`Email : ${qe.email}`);it.info(`CreationTime : ${qe.creationTime}`)}))));ft.setFingerprint(qe.fingerprint);let Fe=qe.fingerprint;if(Ae.fingerprint){Fe=Ae.fingerprint}yield it.group(`Fingerprint to use`,(()=>rt(this,void 0,void 0,(function*(){it.info(Fe)}))));yield it.group(`Importing GPG private key`,(()=>rt(this,void 0,void 0,(function*(){yield ut.importKey(Ae.gpgPrivateKey).then((Ae=>{it.info(Ae)}))}))));if(Ae.passphrase&&!Ae.fingerprint){it.info("Configuring GnuPG agent");yield ut.configureAgent(ut.agentConfig);yield it.group(`Getting keygrips`,(()=>rt(this,void 0,void 0,(function*(){for(const Se of yield ut.getKeygrips(Fe)){it.info(`Presetting passphrase for ${Se}`);yield ut.presetPassphrase(Se,Ae.passphrase).then((Ae=>{it.debug(Ae)}))}}))))}if(Ae.passphrase&&Ae.fingerprint){it.info("Configuring GnuPG agent");yield ut.configureAgent(ut.agentConfig);yield it.group(`Getting keygrip for fingerprint`,(()=>rt(this,void 0,void 0,(function*(){const Se=yield ut.getKeygrip(Fe);it.info(`Presetting passphrase for key ${Fe} with keygrip ${Se}`);yield ut.presetPassphrase(Se,Ae.passphrase).then((Ae=>{it.debug(Ae)}))}))))}yield it.group(`Setting outputs`,(()=>rt(this,void 0,void 0,(function*(){it.info(`fingerprint=${Fe}`);it.setOutput("fingerprint",Fe);it.info(`keyid=${qe.keyID}`);it.setOutput("keyid",qe.keyID);it.info(`name=${qe.name}`);it.setOutput("name",qe.name);it.info(`email=${qe.email}`);it.setOutput("email",qe.email)}))));if(Ae.gitUserSigningkey){it.info("Setting GPG signing keyID for this Git repository");yield st.setConfig("user.signingkey",qe.keyID,Ae.gitConfigGlobal);const Se=Ae.gitCommitterEmail||qe.email;const Ke=Ae.gitCommitterName||qe.name;if(Se!=qe.email){it.setFailed(`Committer email "${Ae.gitCommitterEmail}" (name: "${Ae.gitCommitterName}") does not match GPG private key email "${qe.email}" (name: "${qe.name}")`);return}it.info(`Configuring Git committer (${Ke} <${Se}>)`);yield st.setConfig("user.name",Ke,Ae.gitConfigGlobal);yield st.setConfig("user.email",Se,Ae.gitConfigGlobal);if(Ae.gitCommitGpgsign){it.info("Sign all commits automatically");yield st.setConfig("commit.gpgsign","true",Ae.gitConfigGlobal)}if(Ae.gitTagGpgsign){it.info("Sign all tags automatically");yield st.setConfig("tag.gpgsign","true",Ae.gitConfigGlobal)}if(Ae.gitPushGpgsign){it.info("Sign all pushes automatically");yield st.setConfig("push.gpgsign",Ae.gitPushGpgsign,Ae.gitConfigGlobal)}}}catch(Ae){it.setFailed(Ae.message)}}))}function cleanup(){return rt(this,void 0,void 0,(function*(){if(ft.fingerprint.length<=0){it.debug("Primary key fingerprint is not defined. Skipping cleanup.");return}try{it.info(`Removing key ${ft.fingerprint}`);yield ut.deleteKey(ft.fingerprint);it.info("Killing GnuPG agent");yield ut.killAgent()}catch(Ae){it.warning(Ae.message)}}))}if(!ft.IsPost){run()}else{cleanup()}},5728:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;var Fe=Object.getOwnPropertyDescriptor(Se,Ke);if(!Fe||("get"in Fe?!Se.__esModule:Fe.writable||Fe.configurable)){Fe={enumerable:true,get:function(){return Se[Ke]}}}Object.defineProperty(Ae,qe,Fe)}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.prototype.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};var rt=this&&this.__awaiter||function(Ae,Se,Ke,qe){function adopt(Ae){return Ae instanceof Ke?Ae:new Ke((function(Se){Se(Ae)}))}return new(Ke||(Ke=Promise))((function(Ke,Fe){function fulfilled(Ae){try{step(qe.next(Ae))}catch(Ae){Fe(Ae)}}function rejected(Ae){try{step(qe["throw"](Ae))}catch(Ae){Fe(Ae)}}function step(Ae){Ae.done?Ke(Ae.value):adopt(Ae.value).then(fulfilled,rejected)}step((qe=qe.apply(Ae,Se||[])).next())}))};var it=this&&this.__importDefault||function(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}};Object.defineProperty(Se,"__esModule",{value:true});Se.isArmored=Se.generateKeyPair=Se.readPrivateKey=void 0;const nt=$e(Ke(7946));const st=it(Ke(2764));const readPrivateKey=Ae=>rt(void 0,void 0,void 0,(function*(){const Ke=yield nt.readKey({armoredKey:(yield(0,Se.isArmored)(Ae))?Ae:Buffer.from(Ae,"base64").toString()});const qe=yield Ke.getPrimaryUser().then((Ae=>{var Se;return(0,st.default)((Se=Ae.user.userID)===null||Se===void 0?void 0:Se.userID)[0]}));return{fingerprint:Ke.getFingerprint().toUpperCase(),keyID:Ke.getKeyID().toHex().toUpperCase(),name:qe.name,email:qe.address,creationTime:Ke.getCreationTime()}}));Se.readPrivateKey=readPrivateKey;const generateKeyPair=(Ae,Se,Ke,qe)=>rt(void 0,void 0,void 0,(function*(){const Fe=yield nt.generateKey({userIDs:[{name:Ae,email:Se}],passphrase:Ke,type:qe});return{publicKey:Fe.publicKey.replace(/\r\n/g,"\n").trim(),privateKey:Fe.privateKey.replace(/\r\n/g,"\n").trim()}}));Se.generateKeyPair=generateKeyPair;const isArmored=Ae=>rt(void 0,void 0,void 0,(function*(){return Ae.trimLeft().startsWith("---")}));Se.isArmored=isArmored},963:function(Ae,Se,Ke){"use strict";var qe=this&&this.__createBinding||(Object.create?function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;var Fe=Object.getOwnPropertyDescriptor(Se,Ke);if(!Fe||("get"in Fe?!Se.__esModule:Fe.writable||Fe.configurable)){Fe={enumerable:true,get:function(){return Se[Ke]}}}Object.defineProperty(Ae,qe,Fe)}:function(Ae,Se,Ke,qe){if(qe===undefined)qe=Ke;Ae[qe]=Se[Ke]});var Fe=this&&this.__setModuleDefault||(Object.create?function(Ae,Se){Object.defineProperty(Ae,"default",{enumerable:true,value:Se})}:function(Ae,Se){Ae["default"]=Se});var $e=this&&this.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var Se={};if(Ae!=null)for(var Ke in Ae)if(Ke!=="default"&&Object.prototype.hasOwnProperty.call(Ae,Ke))qe(Se,Ae,Ke);Fe(Se,Ae);return Se};Object.defineProperty(Se,"__esModule",{value:true});Se.setFingerprint=Se.fingerprint=Se.IsPost=void 0;const rt=$e(Ke(2186));Se.IsPost=!!process.env["STATE_isPost"];Se.fingerprint=process.env["STATE_fingerprint"]||"";function setFingerprint(Ae){rt.saveState("fingerprint",Ae)}Se.setFingerprint=setFingerprint;if(!Se.IsPost){rt.saveState("isPost","true")}},9491:Ae=>{"use strict";Ae.exports=require("assert")},4300:Ae=>{"use strict";Ae.exports=require("buffer")},2081:Ae=>{"use strict";Ae.exports=require("child_process")},6113:Ae=>{"use strict";Ae.exports=require("crypto")},2361:Ae=>{"use strict";Ae.exports=require("events")},7147:Ae=>{"use strict";Ae.exports=require("fs")},3685:Ae=>{"use strict";Ae.exports=require("http")},5687:Ae=>{"use strict";Ae.exports=require("https")},1808:Ae=>{"use strict";Ae.exports=require("net")},2037:Ae=>{"use strict";Ae.exports=require("os")},1017:Ae=>{"use strict";Ae.exports=require("path")},2781:Ae=>{"use strict";Ae.exports=require("stream")},1576:Ae=>{"use strict";Ae.exports=require("string_decoder")},9512:Ae=>{"use strict";Ae.exports=require("timers")},4404:Ae=>{"use strict";Ae.exports=require("tls")},3837:Ae=>{"use strict";Ae.exports=require("util")},9796:Ae=>{"use strict";Ae.exports=require("zlib")}};var Se={};function __nccwpck_require__(Ke){var qe=Se[Ke];if(qe!==undefined){return qe.exports}var Fe=Se[Ke]={id:Ke,loaded:false,exports:{}};var $e=true;try{Ae[Ke].call(Fe.exports,Fe,Fe.exports,__nccwpck_require__);$e=false}finally{if($e)delete Se[Ke]}Fe.loaded=true;return Fe.exports}(()=>{__nccwpck_require__.nmd=Ae=>{Ae.paths=[];if(!Ae.children)Ae.children=[];return Ae}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var Ke=__nccwpck_require__(399);module.exports=Ke})();
|
|
//# sourceMappingURL=index.js.map
|